Server memory instrumentation and fixes.

Ylian Saint-Hilaire committed Mar 7, 2019 at 19:56 UTC ff663b630db8af5754cf3b67fbd4e8df30af725d
9 files changed +2141508 -28
heapdump-1982251193.610099.heapsnapshot new
+2139467
@@ -0,0 +1,2139467 @@
1 +{"snapshot":{"meta":{"node_fields":["type","name","id","self_size","edge_count","trace_node_id"],"node_types":[["hidden","array","string","object","code","closure","regexp","number","native","synthetic","concatenated string","sliced string","symbol","bigint"],"string","number","number","number","number","number"],"edge_fields":["type","name_or_index","to_node"],"edge_types":[["context","element","property","internal","hidden","shortcut","weak"],"string_or_number","node"],"trace_function_info_fields":["function_id","name","script_name","script_id","line","column"],"trace_node_fields":["id","function_info_index","count","size","children"],"sample_fields":["timestamp_us","last_assigned_id"],"location_fields":["object_index","script_id","line","column"]},"node_count":464771,"edge_count":1615204,"trace_function_count":0},
2 +"nodes":[9,1,1,0,44,0
3 +,9,2,3,0,22,0
4 +,9,3,5,0,1,0
5 +,9,4,7,0,116,0
6 +,9,5,9,0,526,0
7 +,9,6,11,0,0,0
8 +,9,7,13,0,0,0
9 +,9,8,15,0,414,0
10 +,9,9,17,0,5,0
11 +,9,10,19,0,0,0
12 +,9,11,21,0,5,0
13 +,9,12,23,0,235,0
14 +,9,13,25,0,528,0
15 +,9,14,27,0,909,0
16 +,9,15,29,0,121,0
17 +,9,16,31,0,244,0
18 +,9,17,33,0,0,0
19 +,9,5,35,0,3,0
20 +,9,18,37,0,1,0
21 +,9,19,39,0,0,0
22 +,9,20,41,0,4010,0
23 +,9,21,43,0,0,0
24 +,9,22,45,0,0,0
25 +,9,23,47,0,0,0
26 +,0,24,49,80,1,0
27 +,0,24,51,80,1,0
28 +,0,24,53,80,1,0
29 +,0,25,55,48,3,0
30 +,0,25,57,48,20,0
31 +,0,25,59,48,4,0
32 +,0,25,61,48,3,0
33 +,0,25,63,48,3,0
34 +,0,25,65,48,3,0
35 +,2,1,67,24,1,0
36 +,0,24,69,80,1,0
37 +,0,24,71,80,1,0
38 +,0,24,73,80,1,0
39 +,0,24,75,80,1,0
40 +,0,24,77,80,1,0
41 +,0,24,79,80,1,0
42 +,0,26,81,80,1,0
43 +,0,27,83,80,1,0
44 +,0,24,85,80,1,0
45 +,0,24,87,80,1,0
46 +,0,24,89,80,1,0
47 +,0,24,91,80,1,0
48 +,0,24,93,80,1,0
49 +,0,24,95,80,1,0
50 +,0,24,97,80,1,0
51 +,0,24,99,80,1,0
52 +,0,24,101,80,1,0
53 +,0,24,103,80,1,0
54 +,1,1,105,16,1,0
55 +,1,1,107,16,0,0
56 +,0,28,109,32,2,0
57 +,0,25,111,48,3,0
58 +,0,25,113,48,3,0
59 +,0,25,115,48,3,0
60 +,0,25,117,48,3,0
61 +,0,25,119,48,3,0
62 +,0,24,121,80,1,0
63 +,0,24,123,80,1,0
64 +,0,24,125,80,1,0
65 +,0,24,127,80,1,0
66 +,0,24,129,80,1,0
67 +,0,24,131,80,1,0
68 +,0,24,133,80,1,0
69 +,0,24,135,80,1,0
70 +,0,24,137,80,1,0
71 +,0,24,139,80,1,0
72 +,0,24,141,80,1,0
73 +,0,24,143,80,1,0
74 +,0,24,145,80,1,0
75 +,0,24,147,80,1,0
76 +,0,24,149,80,1,0
77 +,0,24,151,80,1,0
78 +,0,24,153,80,1,0
79 +,0,24,155,80,1,0
80 +,0,24,157,80,1,0
81 +,0,24,159,80,1,0
82 +,0,24,161,80,1,0
83 +,0,24,163,80,1,0
84 +,0,24,165,80,1,0
85 +,0,24,167,80,1,0
86 +,0,24,169,80,1,0
87 +,0,24,171,80,1,0
88 +,0,24,173,80,1,0
89 +,0,24,175,80,1,0
90 +,0,24,177,80,1,0
91 +,0,24,179,80,1,0
92 +,0,24,181,80,1,0
93 +,0,24,183,80,1,0
94 +,0,24,185,80,1,0
95 +,0,24,187,80,1,0
96 +,0,24,189,80,1,0
97 +,0,24,191,80,1,0
98 +,0,24,193,80,1,0
99 +,0,24,195,80,1,0
100 +,0,24,197,80,1,0
101 +,0,24,199,80,1,0
102 +,0,24,201,80,1,0
103 +,0,24,203,80,1,0
104 +,0,29,205,80,1,0
105 +,0,30,207,80,1,0
106 +,0,31,209,80,1,0
107 +,0,32,211,80,1,0
108 +,0,33,213,80,1,0
109 +,0,34,215,80,1,0
110 +,0,35,217,80,1,0
111 +,0,36,219,80,1,0
112 +,0,37,221,80,1,0
113 +,0,38,223,80,1,0
114 +,0,39,225,80,1,0
115 +,0,40,227,80,1,0
116 +,0,41,229,80,1,0
117 +,0,42,231,80,1,0
118 +,0,43,233,80,1,0
119 +,0,44,235,80,1,0
120 +,0,45,237,80,1,0
121 +,0,46,239,80,1,0
122 +,0,47,241,80,1,0
123 +,0,48,243,80,1,0
124 +,0,29,245,80,1,0
125 +,0,24,247,80,1,0
126 +,0,24,249,80,1,0
127 +,0,24,251,80,1,0
128 +,0,24,253,80,1,0
129 +,0,24,255,80,1,0
130 +,0,24,257,80,1,0
131 +,0,24,259,80,1,0
132 +,0,24,261,80,1,0
133 +,0,24,263,80,1,0
134 +,0,24,265,80,1,0
135 +,0,24,267,80,1,0
136 +,0,24,269,80,1,0
137 +,0,24,271,80,1,0
138 +,0,24,273,80,1,0
139 +,0,24,275,80,1,0
140 +,0,24,277,80,1,0
141 +,0,24,279,80,1,0
142 +,0,24,281,80,1,0
143 +,0,24,283,80,1,0
144 +,0,24,285,80,1,0
145 +,0,24,287,80,1,0
146 +,0,24,289,80,1,0
147 +,0,49,291,24,1,0
148 +,0,28,293,16,1,0
149 +,1,1,295,16,1,0
150 +,1,1,297,24,1,0
151 +,0,50,299,24,1,0
152 +,0,28,301,32,2,0
153 +,0,28,303,32,2,0
154 +,0,28,305,32,2,0
155 +,0,28,307,32,2,0
156 +,0,28,309,32,2,0
157 +,0,28,311,32,2,0
158 +,0,28,313,32,2,0
159 +,0,28,315,32,2,0
160 +,0,28,317,32,2,0
161 +,0,28,319,32,2,0
162 +,0,28,321,32,2,0
163 +,1,1,323,32,1,0
164 +,1,51,325,72,1,0
165 +,1,1,327,40,1,0
166 +,1,1,329,40,1,0
167 +,0,28,331,16,1,0
168 +,0,52,333,40,1,0
169 +,0,53,335,80,1,0
170 +,0,28,337,16,1,0
171 +,0,28,339,24,1,0
172 +,7,54,341,16,1,0
173 +,7,54,343,16,1,0
174 +,7,54,345,16,1,0
175 +,7,54,347,16,1,0
176 +,7,54,349,16,1,0
177 +,0,25,351,48,3,0
178 +,0,24,353,80,2,0
179 +,0,24,355,80,2,0
180 +,4,1,357,128,2,0
181 +,0,28,359,16,1,0
182 +,0,55,361,16,0,0
183 +,0,55,363,16,0,0
184 +,0,52,365,40,2,0
185 +,0,55,367,16,0,0
186 +,0,52,369,40,1,0
187 +,0,52,371,40,1,0
188 +,0,52,373,40,1,0
189 +,0,55,375,16,0,0
190 +,0,52,377,40,1,0
191 +,0,52,379,40,2,0
192 +,0,52,381,40,1,0
193 +,0,55,383,16,0,0
194 +,0,52,385,40,1,0
195 +,1,1,387,262160,0,0
196 +,1,1,389,2064,256,0
197 +,1,1,391,2064,0,0
198 +,1,1,393,2064,0,0
199 +,1,1,395,80,1,0
200 +,1,1,397,152,3,0
201 +,0,28,399,5448,559,0
202 +,1,1,401,4136,28,0
203 +,0,28,403,752,22,0
204 +,0,28,405,10152,1166,0
205 +,1,1,407,32,1,0
206 +,4,1,409,224,4,0
207 +,4,1,411,224,4,0
208 +,4,1,413,224,4,0
209 +,1,1,415,24,1,0
210 +,4,56,417,480,4,0
211 +,4,56,419,480,4,0
212 +,4,56,421,480,4,0
213 +,2,57,423,32,1,0
214 +,2,58,425,32,1,0
215 +,2,59,427,48,1,0
216 +,2,60,429,40,1,0
217 +,2,61,431,32,1,0
218 +,2,62,433,40,1,0
219 +,2,63,435,40,1,0
220 +,2,64,437,48,1,0
221 +,2,65,439,32,1,0
222 +,2,66,441,40,1,0
223 +,2,67,443,40,1,0
224 +,2,68,445,40,1,0
225 +,2,69,447,32,1,0
226 +,2,70,449,32,1,0
227 +,2,71,451,32,1,0
228 +,2,72,453,32,1,0
229 +,2,73,455,32,1,0
230 +,2,74,457,32,1,0
231 +,2,75,459,40,1,0
232 +,2,76,461,40,1,0
233 +,2,77,463,32,1,0
234 +,2,78,465,32,1,0
235 +,2,79,467,32,1,0
236 +,2,80,469,40,1,0
237 +,2,81,471,32,1,0
238 +,2,82,473,32,1,0
239 +,2,83,475,40,1,0
240 +,2,84,477,40,1,0
241 +,2,85,479,32,1,0
242 +,2,86,481,32,1,0
243 +,2,87,483,32,1,0
244 +,2,88,485,40,1,0
245 +,2,89,487,40,1,0
246 +,2,90,489,32,1,0
247 +,2,91,491,40,1,0
248 +,2,92,493,40,1,0
249 +,2,93,495,32,1,0
250 +,2,94,497,40,1,0
251 +,2,95,499,40,1,0
252 +,2,96,501,40,1,0
253 +,2,97,503,40,1,0
254 +,2,98,505,40,1,0
255 +,2,99,507,32,1,0
256 +,2,100,509,32,1,0
257 +,2,101,511,32,1,0
258 +,2,102,513,40,1,0
259 +,2,103,515,32,1,0
260 +,2,104,517,40,1,0
261 +,2,105,519,32,1,0
262 +,2,106,521,32,1,0
263 +,2,107,523,40,1,0
264 +,2,108,525,40,1,0
265 +,2,109,527,40,1,0
266 +,2,110,529,40,1,0
267 +,2,111,531,40,1,0
268 +,2,112,533,32,1,0
269 +,2,113,535,32,1,0
270 +,2,114,537,32,1,0
271 +,2,115,539,48,1,0
272 +,2,116,541,40,1,0
273 +,2,117,543,32,1,0
274 +,2,118,545,32,1,0
275 +,2,119,547,40,1,0
276 +,2,120,549,32,1,0
277 +,2,121,551,32,1,0
278 +,2,122,553,32,1,0
279 +,2,123,555,40,1,0
280 +,2,124,557,32,1,0
281 +,2,125,559,32,1,0
282 +,2,126,561,32,1,0
283 +,2,127,563,40,1,0
284 +,2,128,565,32,1,0
285 +,2,129,567,40,1,0
286 +,2,130,569,32,1,0
287 +,2,131,571,32,1,0
288 +,2,132,573,32,1,0
289 +,2,133,575,40,1,0
290 +,2,134,577,40,1,0
291 +,2,135,579,32,1,0
292 +,2,136,581,32,1,0
293 +,2,137,583,56,1,0
294 +,2,138,585,32,1,0
295 +,2,139,587,48,1,0
296 +,2,140,589,40,1,0
297 +,2,141,591,32,1,0
298 +,2,142,593,32,1,0
299 +,2,143,595,48,1,0
300 +,2,144,597,56,1,0
301 +,2,145,599,40,1,0
302 +,2,146,601,32,1,0
303 +,2,147,603,40,1,0
304 +,2,148,605,32,1,0
305 +,2,149,607,32,1,0
306 +,2,150,609,32,1,0
307 +,2,151,611,32,1,0
308 +,2,152,613,40,1,0
309 +,2,153,615,48,1,0
310 +,2,154,617,40,1,0
311 +,2,155,619,40,1,0
312 +,2,156,621,32,1,0
313 +,2,157,623,32,1,0
314 +,2,158,625,32,1,0
315 +,2,159,627,32,1,0
316 +,2,160,629,40,1,0
317 +,2,161,631,40,1,0
318 +,2,162,633,40,1,0
319 +,2,163,635,32,1,0
320 +,2,164,637,40,1,0
321 +,2,165,639,32,1,0
322 +,2,166,641,48,1,0
323 +,2,167,643,48,1,0
324 +,2,168,645,32,1,0
325 +,2,169,647,40,1,0
326 +,2,170,649,32,1,0
327 +,2,171,651,32,1,0
328 +,2,172,653,32,1,0
329 +,2,173,655,40,1,0
330 +,2,174,657,32,1,0
331 +,2,175,659,32,1,0
332 +,2,176,661,32,1,0
333 +,2,177,663,32,1,0
334 +,2,178,665,40,1,0
335 +,2,179,667,32,1,0
336 +,2,180,669,40,1,0
337 +,2,181,671,32,1,0
338 +,2,182,673,40,1,0
339 +,2,183,675,32,1,0
340 +,2,184,677,32,1,0
341 +,2,185,679,32,1,0
342 +,2,186,681,40,1,0
343 +,2,187,683,32,1,0
344 +,2,188,685,32,1,0
345 +,2,189,687,32,1,0
346 +,2,190,689,32,1,0
347 +,2,191,691,32,1,0
348 +,2,192,693,40,1,0
349 +,2,193,695,32,1,0
350 +,2,194,697,32,1,0
351 +,2,195,699,32,1,0
352 +,2,196,701,32,1,0
353 +,2,197,703,32,1,0
354 +,2,198,705,40,1,0
355 +,2,199,707,32,1,0
356 +,2,200,709,40,1,0
357 +,2,201,711,32,1,0
358 +,2,54,713,32,1,0
359 +,2,202,715,40,1,0
360 +,2,203,717,32,1,0
361 +,2,204,719,32,1,0
362 +,2,205,721,32,1,0
363 +,2,206,723,40,1,0
364 +,2,207,725,32,1,0
365 +,2,208,727,32,1,0
366 +,2,209,729,32,1,0
367 +,2,210,731,40,1,0
368 +,2,211,733,32,1,0
369 +,2,212,735,32,1,0
370 +,2,213,737,48,1,0
371 +,2,214,739,32,1,0
372 +,2,215,741,32,1,0
373 +,2,216,743,56,1,0
374 +,2,217,745,40,1,0
375 +,2,218,747,40,1,0
376 +,2,219,749,32,1,0
377 +,2,220,751,32,1,0
378 +,2,221,753,32,1,0
379 +,2,222,755,40,1,0
380 +,2,223,757,32,1,0
381 +,2,224,759,56,1,0
382 +,2,225,761,40,1,0
383 +,2,226,763,32,1,0
384 +,2,227,765,40,1,0
385 +,2,228,767,32,1,0
386 +,2,229,769,32,1,0
387 +,2,230,771,32,1,0
388 +,2,231,773,32,1,0
389 +,2,232,775,40,1,0
390 +,2,233,777,32,1,0
391 +,2,234,779,32,1,0
392 +,2,235,781,32,1,0
393 +,2,236,783,32,1,0
394 +,2,237,785,32,1,0
395 +,2,238,787,40,1,0
396 +,2,239,789,32,1,0
397 +,2,240,791,32,1,0
398 +,2,241,793,40,1,0
399 +,2,242,795,40,1,0
400 +,2,243,797,48,1,0
401 +,2,244,799,32,1,0
402 +,2,245,801,40,1,0
403 +,2,246,803,32,1,0
404 +,2,247,805,40,1,0
405 +,2,248,807,40,1,0
406 +,2,249,809,32,1,0
407 +,2,250,811,32,1,0
408 +,2,251,813,32,1,0
409 +,2,252,815,40,1,0
410 +,2,253,817,32,1,0
411 +,2,254,819,40,1,0
412 +,2,255,821,32,1,0
413 +,2,256,823,32,1,0
414 +,2,257,825,40,1,0
415 +,2,258,827,32,1,0
416 +,2,259,829,40,1,0
417 +,2,260,831,32,1,0
418 +,2,261,833,32,1,0
419 +,2,262,835,40,1,0
420 +,2,263,837,40,1,0
421 +,2,264,839,32,1,0
422 +,2,265,841,32,1,0
423 +,2,266,843,32,1,0
424 +,2,267,845,40,1,0
425 +,2,268,847,32,1,0
426 +,2,269,849,40,1,0
427 +,2,270,851,40,1,0
428 +,2,271,853,40,1,0
429 +,2,272,855,48,1,0
430 +,2,273,857,40,1,0
431 +,2,274,859,48,1,0
432 +,2,275,861,32,1,0
433 +,2,276,863,32,1,0
434 +,2,277,865,32,1,0
435 +,2,278,867,32,1,0
436 +,2,279,869,32,1,0
437 +,2,280,871,40,1,0
438 +,2,281,873,32,1,0
439 +,2,282,875,32,1,0
440 +,2,283,877,32,1,0
441 +,2,284,879,32,1,0
442 +,2,285,881,32,1,0
443 +,2,286,883,32,1,0
444 +,2,287,885,40,1,0
445 +,2,288,887,32,1,0
446 +,2,289,889,32,1,0
447 +,2,290,891,32,1,0
448 +,0,291,893,32,1,0
449 +,0,291,895,32,1,0
450 +,0,291,897,32,1,0
451 +,0,291,899,32,1,0
452 +,0,291,901,32,1,0
453 +,0,291,903,32,1,0
454 +,0,291,905,32,1,0
455 +,0,291,907,32,1,0
456 +,0,291,909,32,1,0
457 +,0,291,911,32,1,0
458 +,0,291,913,32,1,0
459 +,0,291,915,32,1,0
460 +,0,291,917,32,1,0
461 +,0,291,919,32,1,0
462 +,0,291,921,32,1,0
463 +,0,291,923,32,1,0
464 +,0,291,925,32,1,0
465 +,0,291,927,32,1,0
466 +,0,291,929,32,1,0
467 +,0,291,931,32,1,0
468 +,0,291,933,32,1,0
469 +,0,291,935,32,1,0
470 +,0,291,937,32,1,0
471 +,0,291,939,32,1,0
472 +,0,291,941,32,1,0
473 +,0,291,943,32,1,0
474 +,0,291,945,32,1,0
475 +,0,291,947,32,1,0
476 +,0,291,949,32,1,0
477 +,0,291,951,32,1,0
478 +,0,291,953,32,1,0
479 +,0,291,955,32,1,0
480 +,12,256,957,32,2,0
481 +,12,256,959,32,2,0
482 +,12,256,961,32,2,0
483 +,12,256,963,32,2,0
484 +,12,256,965,32,2,0
485 +,12,256,967,32,2,0
486 +,12,256,969,32,2,0
487 +,12,256,971,32,2,0
488 +,12,256,973,32,2,0
489 +,12,256,975,32,2,0
490 +,12,256,977,32,2,0
491 +,12,256,979,32,2,0
492 +,12,256,981,32,2,0
493 +,12,256,983,32,2,0
494 +,0,292,985,64,5,0
495 +,0,292,987,64,5,0
496 +,0,292,989,64,5,0
497 +,0,292,991,64,5,0
498 +,0,292,993,64,5,0
499 +,0,292,995,64,5,0
500 +,0,292,997,64,5,0
501 +,0,292,999,64,5,0
502 +,0,292,1001,64,5,0
503 +,0,292,1003,64,5,0
504 +,0,292,1005,64,5,0
505 +,0,24,1007,80,1,0
506 +,0,24,1009,80,1,0
507 +,0,24,1011,80,1,0
508 +,0,24,1013,80,1,0
509 +,0,24,1015,80,1,0
510 +,0,24,1017,80,1,0
511 +,0,24,1019,80,1,0
512 +,0,24,1021,80,1,0
513 +,0,24,1023,80,1,0
514 +,0,24,1025,80,1,0
515 +,0,24,1027,80,1,0
516 +,0,24,1029,80,1,0
517 +,0,24,1031,80,1,0
518 +,0,24,1033,80,1,0
519 +,0,24,1035,80,1,0
520 +,0,24,1037,80,1,0
521 +,0,24,1039,80,1,0
522 +,0,24,1041,80,1,0
523 +,0,24,1043,80,1,0
524 +,0,24,1045,80,1,0
525 +,0,24,1047,80,1,0
526 +,0,24,1049,80,1,0
527 +,0,24,1051,80,1,0
528 +,0,24,1053,80,1,0
529 +,0,24,1055,80,1,0
530 +,0,24,1057,80,1,0
531 +,0,24,1059,80,1,0
532 +,0,24,1061,80,1,0
533 +,0,24,1063,80,1,0
534 +,0,24,1065,80,1,0
535 +,0,24,1067,80,1,0
536 +,0,24,1069,80,1,0
537 +,0,24,1071,80,1,0
538 +,0,24,1073,80,1,0
539 +,0,24,1075,80,1,0
540 +,0,24,1077,80,1,0
541 +,0,24,1079,80,1,0
542 +,4,293,1081,352,4,0
543 +,5,1,1083,64,8,0
544 +,3,204,1085,56,4,0
545 +,0,28,1087,136,4,0
546 +,5,1,1089,64,6,0
547 +,3,294,1091,56,5,0
548 +,4,295,1093,768,9,0
549 +,5,1,1095,64,6,0
550 +,3,204,1097,56,3,0
551 +,4,296,1099,320,4,0
552 +,2,297,1101,32,1,0
553 +,5,298,1103,64,11,0
554 +,2,299,1105,32,1,0
555 +,2,300,1107,40,1,0
556 +,3,294,1109,208,24,0
557 +,3,204,1111,32,3,0
558 +,2,301,1113,48,1,0
559 +,0,28,1115,35112,4,0
560 +,5,302,1117,64,6,0
561 +,3,294,1119,152,15,0
562 +,2,303,1121,72,1,0
563 +,3,304,1123,272,19,0
564 +,3,65,1125,32,4,0
565 +,3,204,1127,56,15,0
566 +,5,61,1129,56,6,0
567 +,3,204,1131,24,6,0
568 +,0,28,1133,488,4,0
569 +,5,305,1135,64,6,0
570 +,3,294,1137,192,21,0
571 +,0,28,1139,88,4,0
572 +,5,306,1141,64,6,0
573 +,3,294,1143,296,34,0
574 +,3,307,1145,344,16,0
575 +,3,65,1147,32,4,0
576 +,3,204,1149,24,9,0
577 +,3,204,1151,56,4,0
578 +,3,65,1153,32,4,0
579 +,3,308,1155,72,4,0
580 +,0,28,1157,304,4,0
581 +,5,309,1159,56,6,0
582 +,3,294,1161,152,11,0
583 +,3,308,1163,72,4,0
584 +,0,28,1165,248,4,0
585 +,5,310,1167,56,6,0
586 +,5,311,1169,48,5,0
587 +,0,28,1171,216,4,0
588 +,5,312,1173,56,6,0
589 +,3,65,1175,32,2,0
590 +,0,28,1177,128,4,0
591 +,5,313,1179,56,6,0
592 +,3,308,1181,72,4,0
593 +,0,28,1183,176,4,0
594 +,5,314,1185,64,6,0
595 +,3,294,1187,320,38,0
596 +,5,315,1189,64,6,0
597 +,3,316,1191,240,23,0
598 +,0,28,1193,280,4,0
599 +,5,317,1195,64,6,0
600 +,0,28,1197,280,4,0
601 +,5,1,1199,64,6,0
602 +,0,28,1201,104,4,0
603 +,5,318,1203,64,6,0
604 +,3,319,1205,208,42,0
605 +,3,65,1207,32,4,0
606 +,2,320,1209,32,1,0
607 +,3,204,1211,24,10,0
608 +,0,28,1213,208,4,0
609 +,5,321,1215,64,6,0
610 +,3,294,1217,368,43,0
611 +,3,322,1219,216,22,0
612 +,0,28,1221,480,4,0
613 +,5,323,1223,64,6,0
614 +,0,28,1225,160,4,0
615 +,5,1,1227,64,6,0
616 +,3,67,1229,64,2,0
617 +,3,324,1231,32,18,0
618 +,0,28,1233,368,4,0
619 +,5,325,1235,64,6,0
620 +,3,294,1237,184,16,0
621 +,4,326,1239,192,5,0
622 +,3,204,1241,40,3,0
623 +,1,1,1243,24616,29,0
624 +,1,1,1245,3112,4,0
625 +,1,1,1247,3112,1,0
626 +,2,327,1249,40,1,0
627 +,0,291,1251,32,2,0
628 +,2,328,1253,48,1,0
629 +,0,291,1255,32,2,0
630 +,2,329,1257,48,1,0
631 +,0,291,1259,32,2,0
632 +,2,330,1261,48,1,0
633 +,0,291,1263,32,2,0
634 +,2,331,1265,40,1,0
635 +,0,291,1267,32,2,0
636 +,2,332,1269,40,1,0
637 +,0,291,1271,32,2,0
638 +,2,333,1273,48,1,0
639 +,0,291,1275,32,2,0
640 +,2,334,1277,64,1,0
641 +,0,291,1279,32,2,0
642 +,2,335,1281,40,1,0
643 +,12,256,1283,32,2,0
644 +,2,336,1285,32,1,0
645 +,12,256,1287,32,2,0
646 +,2,337,1289,32,1,0
647 +,12,256,1291,32,2,0
648 +,2,338,1293,32,1,0
649 +,2,339,1295,32,1,0
650 +,2,340,1297,32,1,0
651 +,2,341,1299,40,1,0
652 +,2,342,1301,40,1,0
653 +,2,343,1303,32,1,0
654 +,2,344,1305,40,1,0
655 +,2,345,1307,40,1,0
656 +,2,346,1309,40,1,0
657 +,2,347,1311,48,1,0
658 +,2,348,1313,48,1,0
659 +,2,349,1315,40,1,0
660 +,2,350,1317,32,1,0
661 +,2,351,1319,32,1,0
662 +,2,352,1321,48,1,0
663 +,2,353,1323,32,1,0
664 +,2,354,1325,32,1,0
665 +,2,355,1327,40,1,0
666 +,2,356,1329,32,1,0
667 +,2,357,1331,32,1,0
668 +,2,358,1333,32,1,0
669 +,2,359,1335,32,1,0
670 +,2,360,1337,32,1,0
671 +,2,361,1339,40,1,0
672 +,2,362,1341,32,1,0
673 +,2,363,1343,32,1,0
674 +,2,364,1345,32,1,0
675 +,2,365,1347,32,1,0
676 +,2,366,1349,32,1,0
677 +,2,367,1351,32,1,0
678 +,2,368,1353,32,1,0
679 +,2,369,1355,32,1,0
680 +,2,370,1357,32,1,0
681 +,2,371,1359,32,1,0
682 +,2,372,1361,32,1,0
683 +,2,373,1363,32,1,0
684 +,2,374,1365,40,1,0
685 +,2,375,1367,32,1,0
686 +,2,376,1369,40,1,0
687 +,2,377,1371,32,1,0
688 +,2,378,1373,40,1,0
689 +,2,379,1375,32,1,0
690 +,2,380,1377,32,1,0
691 +,2,381,1379,32,1,0
692 +,2,382,1381,32,1,0
693 +,2,383,1383,32,1,0
694 +,2,384,1385,32,1,0
695 +,2,385,1387,32,1,0
696 +,2,386,1389,40,1,0
697 +,2,387,1391,40,1,0
698 +,2,388,1393,32,1,0
699 +,2,389,1395,40,1,0
700 +,2,390,1397,32,1,0
701 +,2,391,1399,32,1,0
702 +,2,392,1401,40,1,0
703 +,2,393,1403,40,1,0
704 +,2,394,1405,32,1,0
705 +,2,395,1407,48,1,0
706 +,2,396,1409,48,1,0
707 +,2,397,1411,32,1,0
708 +,2,398,1413,32,1,0
709 +,2,399,1415,32,1,0
710 +,2,400,1417,32,1,0
711 +,2,401,1419,32,1,0
712 +,2,402,1421,40,1,0
713 +,2,403,1423,32,1,0
714 +,2,404,1425,40,1,0
715 +,2,405,1427,32,1,0
716 +,2,406,1429,40,1,0
717 +,2,407,1431,32,1,0
718 +,2,408,1433,32,1,0
719 +,2,409,1435,32,1,0
720 +,2,410,1437,40,1,0
721 +,2,411,1439,32,1,0
722 +,2,412,1441,48,1,0
723 +,2,413,1443,40,1,0
724 +,2,414,1445,32,1,0
725 +,2,415,1447,32,1,0
726 +,2,416,1449,32,1,0
727 +,2,417,1451,40,1,0
728 +,2,418,1453,40,1,0
729 +,2,419,1455,40,1,0
730 +,2,420,1457,32,1,0
731 +,2,421,1459,32,1,0
732 +,2,422,1461,32,1,0
733 +,2,423,1463,32,1,0
734 +,2,424,1465,40,1,0
735 +,2,425,1467,32,1,0
736 +,2,426,1469,40,1,0
737 +,2,427,1471,32,1,0
738 +,2,428,1473,32,1,0
739 +,2,429,1475,40,1,0
740 +,2,430,1477,40,1,0
741 +,2,431,1479,40,1,0
742 +,2,432,1481,32,1,0
743 +,2,433,1483,32,1,0
744 +,2,434,1485,32,1,0
745 +,2,435,1487,40,1,0
746 +,2,436,1489,40,1,0
747 +,2,437,1491,40,1,0
748 +,2,438,1493,40,1,0
749 +,2,439,1495,40,1,0
750 +,2,440,1497,32,1,0
751 +,2,441,1499,40,1,0
752 +,2,442,1501,40,1,0
753 +,2,443,1503,40,1,0
754 +,2,444,1505,32,1,0
755 +,2,445,1507,32,1,0
756 +,2,446,1509,32,1,0
757 +,2,447,1511,48,1,0
758 +,2,448,1513,32,1,0
759 +,2,449,1515,32,1,0
760 +,2,450,1517,32,1,0
761 +,2,451,1519,40,1,0
762 +,2,452,1521,32,1,0
763 +,2,453,1523,32,1,0
764 +,2,454,1525,40,1,0
765 +,2,455,1527,32,1,0
766 +,2,456,1529,40,1,0
767 +,2,457,1531,32,1,0
768 +,2,458,1533,40,1,0
769 +,2,459,1535,32,1,0
770 +,2,460,1537,32,1,0
771 +,2,461,1539,32,1,0
772 +,2,462,1541,40,1,0
773 +,2,463,1543,40,1,0
774 +,2,464,1545,32,1,0
775 +,2,465,1547,32,1,0
776 +,2,466,1549,32,1,0
777 +,2,467,1551,32,1,0
778 +,2,468,1553,40,1,0
779 +,2,469,1555,32,1,0
780 +,2,470,1557,32,1,0
781 +,2,471,1559,32,1,0
782 +,2,472,1561,32,1,0
783 +,2,473,1563,32,1,0
784 +,2,474,1565,40,1,0
785 +,2,298,1567,32,1,0
786 +,2,475,1569,32,1,0
787 +,2,476,1571,32,1,0
788 +,2,477,1573,32,1,0
789 +,2,478,1575,40,1,0
790 +,2,479,1577,32,1,0
791 +,2,480,1579,40,1,0
792 +,2,481,1581,32,1,0
793 +,2,482,1583,40,1,0
794 +,2,483,1585,32,1,0
795 +,2,484,1587,32,1,0
796 +,2,485,1589,32,1,0
797 +,2,486,1591,32,1,0
798 +,2,487,1593,48,1,0
799 +,2,488,1595,40,1,0
800 +,2,489,1597,40,1,0
801 +,2,490,1599,32,1,0
802 +,2,491,1601,32,1,0
803 +,2,492,1603,32,1,0
804 +,2,493,1605,40,1,0
805 +,2,494,1607,32,1,0
806 +,2,495,1609,32,1,0
807 +,2,496,1611,48,1,0
808 +,2,497,1613,32,1,0
809 +,2,498,1615,40,1,0
810 +,2,499,1617,32,1,0
811 +,2,500,1619,32,1,0
812 +,2,501,1621,40,1,0
813 +,2,502,1623,32,1,0
814 +,2,503,1625,32,1,0
815 +,2,504,1627,40,1,0
816 +,2,505,1629,32,1,0
817 +,2,506,1631,40,1,0
818 +,2,507,1633,32,1,0
819 +,2,508,1635,32,1,0
820 +,2,509,1637,40,1,0
821 +,2,510,1639,48,1,0
822 +,2,511,1641,32,1,0
823 +,2,512,1643,40,1,0
824 +,2,513,1645,40,1,0
825 +,2,514,1647,40,1,0
826 +,2,515,1649,40,1,0
827 +,0,516,1651,2040,237,0
828 +,3,146,1653,40,98,0
829 +,3,465,1655,24,60,0
830 +,5,67,1657,64,12,0
831 +,0,24,1659,80,4,0
832 +,0,517,1661,168,3,0
833 +,3,204,1663,32,3,0
834 +,4,518,1665,1472,3,0
835 +,4,519,1667,128,4,0
836 +,4,520,1669,128,4,0
837 +,4,521,1671,256,6,0
838 +,4,522,1673,320,7,0
839 +,4,523,1675,352,7,0
840 +,4,524,1677,224,5,0
841 +,4,525,1679,192,8,0
842 +,4,526,1681,192,8,0
843 +,4,527,1683,192,8,0
844 +,4,528,1685,1056,12,0
845 +,4,529,1687,160,5,0
846 +,4,530,1689,1440,14,0
847 +,4,531,1691,1056,11,0
848 +,4,532,1693,192,5,0
849 +,4,533,1695,192,5,0
850 +,4,534,1697,96,5,0
851 +,4,535,1699,224,5,0
852 +,4,536,1701,96,4,0
853 +,4,537,1703,160,8,0
854 +,4,538,1705,160,5,0
855 +,4,539,1707,1472,14,0
856 +,4,540,1709,1152,12,0
857 +,4,541,1711,224,6,0
858 +,4,542,1713,224,6,0
859 +,4,543,1715,320,7,0
860 +,4,544,1717,256,5,0
861 +,4,545,1719,768,7,0
862 +,4,546,1721,416,5,0
863 +,4,547,1723,320,4,0
864 +,4,548,1725,320,4,0
865 +,4,549,1727,320,5,0
866 +,4,550,1729,832,8,0
867 +,4,551,1731,1536,14,0
868 +,4,552,1733,1440,9,0
869 +,4,553,1735,1088,12,0
870 +,4,554,1737,192,5,0
871 +,4,555,1739,384,7,0
872 +,4,556,1741,96,4,0
873 +,4,557,1743,96,4,0
874 +,4,558,1745,800,7,0
875 +,4,559,1747,928,5,0
876 +,4,560,1749,928,5,0
877 +,4,561,1751,672,4,0
878 +,4,562,1753,352,4,0
879 +,4,563,1755,352,4,0
880 +,4,564,1757,1184,4,0
881 +,4,565,1759,352,4,0
882 +,4,566,1761,352,4,0
883 +,4,567,1763,288,5,0
884 +,4,568,1765,2944,18,0
885 +,4,569,1767,160,3,0
886 +,4,570,1769,160,5,0
887 +,4,571,1771,160,5,0
888 +,4,572,1773,160,5,0
889 +,4,573,1775,160,5,0
890 +,4,574,1777,160,5,0
891 +,4,575,1779,160,5,0
892 +,4,576,1781,288,5,0
893 +,4,577,1783,160,4,0
894 +,4,578,1785,160,4,0
895 +,4,579,1787,992,13,0
896 +,4,580,1789,192,6,0
897 +,4,581,1791,320,6,0
898 +,4,582,1793,224,4,0
899 +,4,583,1795,128,4,0
900 +,4,584,1797,128,3,0
901 +,4,585,1799,128,3,0
902 +,4,586,1801,128,3,0
903 +,4,587,1803,128,3,0
904 +,4,588,1805,128,4,0
905 +,4,589,1807,96,4,0
906 +,4,590,1809,96,4,0
907 +,4,591,1811,96,4,0
908 +,4,592,1813,128,4,0
909 +,4,593,1815,128,4,0
910 +,4,594,1817,864,9,0
911 +,4,595,1819,608,6,0
912 +,4,596,1821,576,6,0
913 +,4,597,1823,416,5,0
914 +,4,598,1825,544,9,0
915 +,4,599,1827,192,4,0
916 +,4,600,1829,128,5,0
917 +,4,601,1831,480,7,0
918 +,4,602,1833,224,4,0
919 +,4,603,1835,352,8,0
920 +,4,604,1837,352,8,0
921 +,4,605,1839,320,7,0
922 +,4,606,1841,320,7,0
923 +,4,607,1843,320,7,0
924 +,4,608,1845,160,4,0
925 +,4,609,1847,192,5,0
926 +,4,610,1849,384,6,0
927 +,4,611,1851,416,6,0
928 +,4,612,1853,352,6,0
929 +,4,613,1855,384,7,0
930 +,4,614,1857,448,6,0
931 +,4,615,1859,352,4,0
932 +,4,616,1861,448,5,0
933 +,4,617,1863,576,5,0
934 +,4,618,1865,576,5,0
935 +,4,619,1867,640,6,0
936 +,4,620,1869,224,3,0
937 +,4,621,1871,160,4,0
938 +,4,622,1873,256,4,0
939 +,4,623,1875,10848,34,0
940 +,4,624,1877,3104,16,0
941 +,4,625,1879,128,4,0
942 +,4,626,1881,15360,65,0
943 +,4,627,1883,128,4,0
944 +,4,628,1885,128,4,0
945 +,4,629,1887,160,4,0
946 +,4,630,1889,128,4,0
947 +,4,631,1891,96,3,0
948 +,4,632,1893,96,3,0
949 +,4,633,1895,3456,10,0
950 +,4,634,1897,128,4,0
951 +,4,635,1899,6848,25,0
952 +,4,636,1901,128,4,0
953 +,4,637,1903,1120,9,0
954 +,4,638,1905,1600,13,0
955 +,4,639,1907,2496,8,0
956 +,4,640,1909,1152,5,0
957 +,4,641,1911,128,4,0
958 +,4,642,1913,128,4,0
959 +,4,643,1915,96,4,0
960 +,4,644,1917,96,4,0
961 +,4,645,1919,96,4,0
962 +,4,646,1921,96,4,0
963 +,4,647,1923,128,4,0
964 +,4,648,1925,544,20,0
965 +,4,649,1927,320,4,0
966 +,4,650,1929,320,4,0
967 +,4,651,1931,288,4,0
968 +,4,652,1933,288,4,0
969 +,4,653,1935,288,4,0
970 +,4,654,1937,288,4,0
971 +,4,655,1939,288,4,0
972 +,4,656,1941,288,4,0
973 +,4,657,1943,640,7,0
974 +,4,658,1945,608,6,0
975 +,4,659,1947,576,7,0
976 +,4,660,1949,544,6,0
977 +,4,661,1951,576,7,0
978 +,4,662,1953,544,6,0
979 +,4,663,1955,576,7,0
980 +,4,664,1957,544,6,0
981 +,4,665,1959,160,4,0
982 +,4,666,1961,96,4,0
983 +,4,667,1963,192,10,0
984 +,4,668,1965,288,4,0
985 +,4,669,1967,288,4,0
986 +,4,670,1969,576,7,0
987 +,4,671,1971,544,6,0
988 +,4,672,1973,96,4,0
989 +,4,673,1975,224,5,0
990 +,4,674,1977,96,4,0
991 +,4,675,1979,1024,5,0
992 +,4,676,1981,192,3,0
993 +,4,677,1983,256,3,0
994 +,4,678,1985,704,8,0
995 +,4,679,1987,960,5,0
996 +,4,680,1989,192,3,0
997 +,4,681,1991,192,3,0
998 +,4,682,1993,736,8,0
999 +,4,683,1995,96,4,0
1000 +,4,684,1997,832,7,0
1001 +,4,685,1999,96,4,0
1002 +,4,686,2001,2656,15,0
1003 +,4,687,2003,96,4,0
1004 +,4,688,2005,1312,9,0
1005 +,4,689,2007,6624,29,0
1006 +,4,690,2009,96,4,0
1007 +,4,691,2011,96,4,0
1008 +,4,692,2013,1440,13,0
1009 +,4,693,2015,1472,13,0
1010 +,4,694,2017,3136,12,0
1011 +,4,695,2019,224,5,0
1012 +,4,696,2021,576,7,0
1013 +,4,697,2023,3136,12,0
1014 +,4,698,2025,224,5,0
1015 +,4,699,2027,576,7,0
1016 +,4,700,2029,5120,21,0
1017 +,4,701,2031,6400,37,0
1018 +,4,702,2033,224,5,0
1019 +,4,703,2035,832,9,0
1020 +,4,704,2037,3008,12,0
1021 +,4,705,2039,224,5,0
1022 +,4,706,2041,448,7,0
1023 +,4,707,2043,4512,32,0
1024 +,4,708,2045,3040,12,0
1025 +,4,709,2047,224,5,0
1026 +,4,710,2049,224,5,0
1027 +,4,711,2051,224,5,0
1028 +,4,712,2053,1792,16,0
1029 +,4,713,2055,2976,12,0
1030 +,4,714,2057,224,5,0
1031 +,4,715,2059,224,5,0
1032 +,4,716,2061,224,5,0
1033 +,4,717,2063,704,7,0
1034 +,4,718,2065,224,5,0
1035 +,4,719,2067,224,5,0
1036 +,4,720,2069,384,6,0
1037 +,4,721,2071,704,7,0
1038 +,4,722,2073,224,5,0
1039 +,4,723,2075,224,5,0
1040 +,4,724,2077,384,6,0
1041 +,4,725,2079,384,6,0
1042 +,4,726,2081,4256,31,0
1043 +,4,727,2083,4064,22,0
1044 +,4,728,2085,4128,23,0
1045 +,4,729,2087,96,4,0
1046 +,4,730,2089,96,4,0
1047 +,4,731,2091,96,4,0
1048 +,4,732,2093,96,4,0
1049 +,4,733,2095,96,4,0
1050 +,4,734,2097,96,4,0
1051 +,4,735,2099,96,4,0
1052 +,4,736,2101,96,4,0
1053 +,4,737,2103,96,4,0
1054 +,4,738,2105,96,4,0
1055 +,4,739,2107,96,4,0
1056 +,4,740,2109,96,4,0
1057 +,4,741,2111,96,4,0
1058 +,4,742,2113,96,4,0
1059 +,4,743,2115,96,4,0
1060 +,4,744,2117,96,4,0
1061 +,4,745,2119,96,4,0
1062 +,4,746,2121,96,4,0
1063 +,4,747,2123,96,4,0
1064 +,4,748,2125,96,4,0
1065 +,4,749,2127,96,4,0
1066 +,4,750,2129,96,4,0
1067 +,4,751,2131,96,4,0
1068 +,4,752,2133,96,4,0
1069 +,4,753,2135,96,4,0
1070 +,4,754,2137,96,4,0
1071 +,4,755,2139,96,4,0
1072 +,4,756,2141,96,4,0
1073 +,4,757,2143,96,4,0
1074 +,4,758,2145,96,4,0
1075 +,4,759,2147,96,4,0
1076 +,4,760,2149,96,4,0
1077 +,4,761,2151,96,4,0
1078 +,4,762,2153,96,4,0
1079 +,4,763,2155,96,4,0
1080 +,4,764,2157,96,4,0
1081 +,4,765,2159,96,4,0
1082 +,4,766,2161,96,4,0
1083 +,4,767,2163,96,4,0
1084 +,4,768,2165,96,4,0
1085 +,4,769,2167,96,4,0
1086 +,4,770,2169,96,4,0
1087 +,4,771,2171,96,4,0
1088 +,4,772,2173,96,4,0
1089 +,4,773,2175,96,4,0
1090 +,4,774,2177,96,4,0
1091 +,4,775,2179,96,4,0
1092 +,4,776,2181,96,4,0
1093 +,4,777,2183,96,4,0
1094 +,4,778,2185,96,4,0
1095 +,4,779,2187,96,4,0
1096 +,4,780,2189,96,4,0
1097 +,4,781,2191,288,5,0
1098 +,4,782,2193,224,5,0
1099 +,4,783,2195,224,5,0
1100 +,4,784,2197,576,12,0
1101 +,4,785,2199,96,4,0
1102 +,4,786,2201,96,4,0
1103 +,4,787,2203,96,4,0
1104 +,4,788,2205,96,4,0
1105 +,4,789,2207,96,4,0
1106 +,4,790,2209,96,4,0
1107 +,4,791,2211,96,4,0
1108 +,4,792,2213,96,4,0
1109 +,4,793,2215,96,4,0
1110 +,4,794,2217,96,4,0
1111 +,4,795,2219,96,4,0
1112 +,4,796,2221,96,4,0
1113 +,4,797,2223,96,4,0
1114 +,4,798,2225,96,4,0
1115 +,4,799,2227,96,4,0
1116 +,4,800,2229,96,4,0
1117 +,4,801,2231,96,4,0
1118 +,4,802,2233,96,4,0
1119 +,4,803,2235,96,4,0
1120 +,4,804,2237,96,4,0
1121 +,4,805,2239,96,4,0
1122 +,4,806,2241,96,4,0
1123 +,4,807,2243,96,4,0
1124 +,4,808,2245,96,4,0
1125 +,4,809,2247,96,4,0
1126 +,4,810,2249,96,4,0
1127 +,4,811,2251,96,4,0
1128 +,4,812,2253,96,4,0
1129 +,4,813,2255,96,4,0
1130 +,4,814,2257,96,4,0
1131 +,4,815,2259,96,4,0
1132 +,4,816,2261,96,4,0
1133 +,4,817,2263,96,4,0
1134 +,4,818,2265,96,4,0
1135 +,4,819,2267,96,4,0
1136 +,4,820,2269,128,5,0
1137 +,4,821,2271,96,4,0
1138 +,4,822,2273,1088,9,0
1139 +,4,823,2275,128,4,0
1140 +,4,824,2277,512,6,0
1141 +,4,825,2279,96,4,0
1142 +,4,826,2281,320,4,0
1143 +,4,827,2283,928,7,0
1144 +,4,828,2285,96,4,0
1145 +,4,829,2287,96,4,0
1146 +,4,830,2289,96,4,0
1147 +,4,831,2291,96,4,0
1148 +,4,832,2293,96,4,0
1149 +,4,833,2295,96,4,0
1150 +,4,834,2297,96,4,0
1151 +,4,835,2299,96,4,0
1152 +,4,836,2301,96,4,0
1153 +,4,837,2303,224,5,0
1154 +,4,838,2305,224,5,0
1155 +,4,839,2307,96,4,0
1156 +,4,840,2309,96,4,0
1157 +,4,841,2311,3360,17,0
1158 +,4,842,2313,3232,17,0
1159 +,4,843,2315,96,4,0
1160 +,4,844,2317,6208,28,0
1161 +,4,845,2319,96,4,0
1162 +,4,846,2321,6144,37,0
1163 +,4,847,2323,96,4,0
1164 +,4,848,2325,7200,37,0
1165 +,4,849,2327,96,4,0
1166 +,4,850,2329,7680,35,0
1167 +,4,851,2331,96,4,0
1168 +,4,852,2333,704,5,0
1169 +,4,853,2335,2304,16,0
1170 +,4,854,2337,2272,15,0
1171 +,4,855,2339,96,4,0
1172 +,4,856,2341,96,4,0
1173 +,4,857,2343,2464,17,0
1174 +,4,858,2345,1152,5,0
1175 +,4,859,2347,5344,44,0
1176 +,4,860,2349,1952,12,0
1177 +,4,861,2351,320,7,0
1178 +,4,862,2353,288,7,0
1179 +,4,863,2355,96,4,0
1180 +,4,864,2357,416,7,0
1181 +,4,865,2359,1216,12,0
1182 +,4,866,2361,384,7,0
1183 +,4,867,2363,608,6,0
1184 +,4,868,2365,96,4,0
1185 +,4,869,2367,384,6,0
1186 +,4,870,2369,576,6,0
1187 +,4,871,2371,576,6,0
1188 +,4,872,2373,480,8,0
1189 +,4,873,2375,480,7,0
1190 +,4,874,2377,608,6,0
1191 +,4,875,2379,192,4,0
1192 +,4,876,2381,704,10,0
1193 +,4,877,2383,448,4,0
1194 +,4,878,2385,192,4,0
1195 +,4,879,2387,512,4,0
1196 +,4,880,2389,320,6,0
1197 +,4,881,2391,192,5,0
1198 +,4,882,2393,384,5,0
1199 +,4,883,2395,96,4,0
1200 +,4,884,2397,96,4,0
1201 +,4,885,2399,96,4,0
1202 +,4,886,2401,96,4,0
1203 +,4,887,2403,96,4,0
1204 +,4,888,2405,1280,18,0
1205 +,4,889,2407,672,8,0
1206 +,4,890,2409,832,9,0
1207 +,4,891,2411,768,8,0
1208 +,4,892,2413,768,8,0
1209 +,4,893,2415,736,11,0
1210 +,4,894,2417,608,9,0
1211 +,4,895,2419,608,9,0
1212 +,4,896,2421,608,9,0
1213 +,4,897,2423,608,9,0
1214 +,4,898,2425,608,9,0
1215 +,4,899,2427,736,10,0
1216 +,4,900,2429,1440,21,0
1217 +,4,901,2431,1440,21,0
1218 +,4,902,2433,1440,21,0
1219 +,4,903,2435,1440,21,0
1220 +,4,904,2437,1024,11,0
1221 +,4,905,2439,448,5,0
1222 +,4,906,2441,416,5,0
1223 +,4,907,2443,256,6,0
1224 +,4,908,2445,256,6,0
1225 +,4,909,2447,256,6,0
1226 +,4,910,2449,544,7,0
1227 +,4,911,2451,512,7,0
1228 +,4,912,2453,8576,31,0
1229 +,4,913,2455,992,7,0
1230 +,4,914,2457,832,6,0
1231 +,4,915,2459,96,4,0
1232 +,4,916,2461,96,4,0
1233 +,4,917,2463,96,4,0
1234 +,4,918,2465,96,4,0
1235 +,4,919,2467,96,4,0
1236 +,4,920,2469,7104,27,0
1237 +,4,921,2471,96,4,0
1238 +,4,922,2473,768,8,0
1239 +,4,923,2475,96,4,0
1240 +,4,924,2477,96,4,0
1241 +,4,925,2479,96,4,0
1242 +,4,926,2481,96,4,0
1243 +,4,927,2483,96,4,0
1244 +,4,928,2485,96,4,0
1245 +,4,929,2487,704,7,0
1246 +,4,930,2489,96,4,0
1247 +,4,931,2491,96,4,0
1248 +,4,932,2493,96,4,0
1249 +,4,933,2495,1440,22,0
1250 +,4,934,2497,224,5,0
1251 +,4,935,2499,2112,5,0
1252 +,4,936,2501,96,4,0
1253 +,4,937,2503,96,4,0
1254 +,4,938,2505,96,4,0
1255 +,4,939,2507,96,4,0
1256 +,4,940,2509,448,5,0
1257 +,4,941,2511,544,10,0
1258 +,4,942,2513,416,4,0
1259 +,4,943,2515,2432,7,0
1260 +,4,944,2517,608,8,0
1261 +,4,945,2519,864,10,0
1262 +,4,946,2521,704,9,0
1263 +,4,947,2523,256,6,0
1264 +,4,948,2525,2272,28,0
1265 +,4,949,2527,224,5,0
1266 +,4,950,2529,2656,30,0
1267 +,4,951,2531,96,4,0
1268 +,4,952,2533,1536,18,0
1269 +,4,953,2535,736,8,0
1270 +,4,954,2537,352,7,0
1271 +,4,955,2539,416,9,0
1272 +,4,956,2541,288,7,0
1273 +,4,957,2543,1216,17,0
1274 +,4,958,2545,256,7,0
1275 +,4,959,2547,640,9,0
1276 +,4,960,2549,3360,41,0
1277 +,4,961,2551,1504,14,0
1278 +,4,962,2553,736,9,0
1279 +,4,963,2555,2720,13,0
1280 +,4,964,2557,2240,14,0
1281 +,4,965,2559,2944,16,0
1282 +,4,966,2561,128,4,0
1283 +,4,967,2563,128,4,0
1284 +,4,968,2565,96,4,0
1285 +,4,969,2567,96,4,0
1286 +,4,970,2569,96,4,0
1287 +,4,971,2571,96,4,0
1288 +,4,972,2573,96,4,0
1289 +,4,973,2575,96,4,0
1290 +,4,974,2577,96,4,0
1291 +,4,975,2579,96,4,0
1292 +,4,976,2581,96,4,0
1293 +,4,977,2583,96,4,0
1294 +,4,978,2585,96,4,0
1295 +,4,979,2587,96,4,0
1296 +,4,980,2589,96,4,0
1297 +,4,981,2591,96,4,0
1298 +,4,982,2593,96,4,0
1299 +,4,983,2595,96,4,0
1300 +,4,984,2597,96,4,0
1301 +,4,985,2599,96,4,0
1302 +,4,986,2601,96,4,0
1303 +,4,987,2603,2368,19,0
1304 +,4,988,2605,96,4,0
1305 +,4,989,2607,96,4,0
1306 +,4,990,2609,96,4,0
1307 +,4,991,2611,96,4,0
1308 +,4,992,2613,96,4,0
1309 +,4,993,2615,3328,24,0
1310 +,4,994,2617,320,8,0
1311 +,4,995,2619,2400,23,0
1312 +,4,996,2621,1664,11,0
1313 +,4,997,2623,96,4,0
1314 +,4,998,2625,96,4,0
1315 +,4,999,2627,416,6,0
1316 +,4,1000,2629,1184,8,0
1317 +,4,1001,2631,8192,47,0
1318 +,4,1002,2633,2976,23,0
1319 +,4,1003,2635,5184,38,0
1320 +,4,1004,2637,2016,14,0
1321 +,4,1005,2639,6272,41,0
1322 +,4,1006,2641,3488,34,0
1323 +,4,1007,2643,1248,8,0
1324 +,4,1008,2645,1664,10,0
1325 +,4,1009,2647,96,4,0
1326 +,4,1010,2649,256,6,0
1327 +,4,1011,2651,640,9,0
1328 +,4,1012,2653,96,4,0
1329 +,4,1013,2655,96,4,0
1330 +,4,1014,2657,96,4,0
1331 +,4,1015,2659,96,4,0
1332 +,4,1016,2661,96,4,0
1333 +,4,1017,2663,512,8,0
1334 +,4,1018,2665,96,4,0
1335 +,4,1019,2667,1952,17,0
1336 +,4,1020,2669,1120,13,0
1337 +,4,1021,2671,704,10,0
1338 +,4,1022,2673,96,4,0
1339 +,4,1023,2675,1696,6,0
1340 +,4,1024,2677,96,4,0
1341 +,4,1025,2679,1120,16,0
1342 +,4,1026,2681,96,4,0
1343 +,4,1027,2683,1600,28,0
1344 +,4,1028,2685,3328,24,0
1345 +,4,1029,2687,3552,27,0
1346 +,4,1030,2689,3456,25,0
1347 +,4,1031,2691,3360,25,0
1348 +,4,1032,2693,96,4,0
1349 +,4,1033,2695,256,6,0
1350 +,4,1034,2697,4032,24,0
1351 +,4,1035,2699,96,4,0
1352 +,4,1036,2701,96,4,0
1353 +,4,1037,2703,96,4,0
1354 +,4,1038,2705,96,4,0
1355 +,4,1039,2707,4032,35,0
1356 +,4,1040,2709,2432,19,0
1357 +,4,1041,2711,1568,12,0
1358 +,4,1042,2713,5504,67,0
1359 +,4,1043,2715,160,4,0
1360 +,4,1044,2717,416,7,0
1361 +,4,1045,2719,96,4,0
1362 +,4,1046,2721,256,6,0
1363 +,4,1047,2723,256,6,0
1364 +,4,1048,2725,256,6,0
1365 +,4,1049,2727,96,4,0
1366 +,4,1050,2729,96,4,0
1367 +,4,1051,2731,96,4,0
1368 +,4,1052,2733,96,4,0
1369 +,4,1053,2735,96,4,0
1370 +,4,1054,2737,96,4,0
1371 +,4,1055,2739,384,4,0
1372 +,4,1056,2741,224,3,0
1373 +,4,1057,2743,128,3,0
1374 +,4,1058,2745,128,3,0
1375 +,4,1059,2747,128,3,0
1376 +,4,1060,2749,192,3,0
1377 +,4,1061,2751,128,3,0
1378 +,4,1062,2753,128,3,0
1379 +,4,1063,2755,128,3,0
1380 +,4,1064,2757,128,3,0
1381 +,4,1065,2759,128,3,0
1382 +,4,1066,2761,128,3,0
1383 +,4,1067,2763,128,3,0
1384 +,4,1068,2765,128,3,0
1385 +,4,1069,2767,128,3,0
1386 +,4,1070,2769,128,3,0
1387 +,4,1071,2771,128,3,0
1388 +,4,1072,2773,5280,43,0
1389 +,4,1073,2775,256,3,0
1390 +,4,1074,2777,320,7,0
1391 +,4,1075,2779,608,6,0
1392 +,4,1076,2781,896,7,0
1393 +,4,1077,2783,480,7,0
1394 +,4,1078,2785,224,5,0
1395 +,4,1079,2787,1280,17,0
1396 +,4,1080,2789,1344,17,0
1397 +,4,1081,2791,480,8,0
1398 +,4,1082,2793,96,4,0
1399 +,4,1083,2795,1312,18,0
1400 +,4,1084,2797,1312,18,0
1401 +,4,1085,2799,352,4,0
1402 +,4,1086,2801,320,4,0
1403 +,4,1087,2803,544,4,0
1404 +,4,1088,2805,544,4,0
1405 +,4,1089,2807,352,4,0
1406 +,4,1090,2809,352,4,0
1407 +,4,1091,2811,352,4,0
1408 +,4,1092,2813,544,4,0
1409 +,4,1093,2815,544,4,0
1410 +,4,1094,2817,1728,10,0
1411 +,4,1095,2819,2176,14,0
1412 +,4,1096,2821,576,7,0
1413 +,4,1097,2823,608,7,0
1414 +,4,1098,2825,2944,18,0
1415 +,4,1099,2827,416,5,0
1416 +,4,1100,2829,416,5,0
1417 +,4,1101,2831,416,5,0
1418 +,4,1102,2833,160,3,0
1419 +,4,1103,2835,2240,7,0
1420 +,4,1104,2837,15232,65,0
1421 +,4,1105,2839,352,3,0
1422 +,4,1106,2841,96,4,0
1423 +,4,1107,2843,96,4,0
1424 +,4,1108,2845,224,5,0
1425 +,4,1109,2847,224,5,0
1426 +,4,1110,2849,576,7,0
1427 +,4,1111,2851,1952,17,0
1428 +,4,1112,2853,3328,28,0
1429 +,4,1113,2855,3680,19,0
1430 +,4,1114,2857,96,3,0
1431 +,4,1115,2859,224,4,0
1432 +,4,1116,2861,352,5,0
1433 +,4,1117,2863,416,4,0
1434 +,4,1118,2865,96,3,0
1435 +,4,1119,2867,96,3,0
1436 +,4,1120,2869,192,4,0
1437 +,4,1121,2871,128,3,0
1438 +,4,1122,2873,768,6,0
1439 +,4,1123,2875,192,4,0
1440 +,4,1124,2877,416,8,0
1441 +,4,1125,2879,224,5,0
1442 +,4,1126,2881,96,3,0
1443 +,4,1127,2883,96,3,0
1444 +,4,1128,2885,384,4,0
1445 +,4,1129,2887,704,4,0
1446 +,4,1130,2889,1120,4,0
1447 +,4,1131,2891,9472,38,0
1448 +,4,1132,2893,1984,4,0
1449 +,4,1133,2895,1952,4,0
1450 +,4,1134,2897,4352,25,0
1451 +,4,1135,2899,4032,56,0
1452 +,4,1136,2901,128,3,0
1453 +,4,1137,2903,288,5,0
1454 +,4,1138,2905,224,4,0
1455 +,4,1139,2907,128,3,0
1456 +,4,1140,2909,224,4,0
1457 +,4,1141,2911,128,3,0
1458 +,4,1142,2913,128,3,0
1459 +,4,1143,2915,128,3,0
1460 +,4,1144,2917,352,5,0
1461 +,4,1145,2919,160,3,0
1462 +,4,1146,2921,384,5,0
1463 +,4,1147,2923,160,3,0
1464 +,4,1148,2925,128,3,0
1465 +,4,1149,2927,128,3,0
1466 +,4,1150,2929,128,3,0
1467 +,4,1151,2931,128,3,0
1468 +,4,1152,2933,128,3,0
1469 +,4,1153,2935,128,3,0
1470 +,4,1154,2937,128,3,0
1471 +,4,1155,2939,128,3,0
1472 +,4,1156,2941,256,4,0
1473 +,4,1157,2943,288,5,0
1474 +,4,1158,2945,128,4,0
1475 +,4,1159,2947,128,4,0
1476 +,4,1160,2949,128,3,0
1477 +,4,1161,2951,128,3,0
1478 +,4,1162,2953,128,3,0
1479 +,4,1163,2955,96,4,0
1480 +,4,1164,2957,928,6,0
1481 +,4,1165,2959,352,9,0
1482 +,4,1166,2961,96,4,0
1483 +,4,1167,2963,96,4,0
1484 +,4,1168,2965,96,4,0
1485 +,4,1169,2967,96,4,0
1486 +,4,1170,2969,96,4,0
1487 +,4,1171,2971,96,4,0
1488 +,4,1172,2973,96,4,0
1489 +,4,1173,2975,96,4,0
1490 +,4,1174,2977,96,4,0
1491 +,4,1175,2979,96,4,0
1492 +,4,1176,2981,96,4,0
1493 +,4,1177,2983,96,4,0
1494 +,4,1178,2985,96,4,0
1495 +,4,1179,2987,96,4,0
1496 +,4,1180,2989,96,4,0
1497 +,4,1181,2991,96,4,0
1498 +,4,1182,2993,96,4,0
1499 +,4,1183,2995,96,4,0
1500 +,4,1184,2997,96,4,0
1501 +,4,1185,2999,96,4,0
1502 +,4,1186,3001,96,4,0
1503 +,4,1187,3003,96,4,0
1504 +,4,1188,3005,96,4,0
1505 +,4,1189,3007,96,4,0
1506 +,4,1190,3009,96,4,0
1507 +,4,1191,3011,96,4,0
1508 +,4,1192,3013,96,4,0
1509 +,4,1193,3015,96,4,0
1510 +,4,1194,3017,96,4,0
1511 +,4,1195,3019,96,4,0
1512 +,4,1196,3021,96,4,0
1513 +,4,1197,3023,96,4,0
1514 +,4,1198,3025,96,4,0
1515 +,4,1199,3027,96,4,0
1516 +,4,1200,3029,96,4,0
1517 +,4,1,3031,96,3,0
1518 +,4,1,3033,96,3,0
1519 +,4,1,3035,128,3,0
1520 +,4,1,3037,160,3,0
1521 +,4,1,3039,160,3,0
1522 +,4,1,3041,160,3,0
1523 +,4,1,3043,160,3,0
1524 +,4,1,3045,96,3,0
1525 +,4,1,3047,96,3,0
1526 +,4,1,3049,160,3,0
1527 +,4,1,3051,4000,16,0
1528 +,4,1,3053,3392,15,0
1529 +,4,1,3055,128,3,0
1530 +,4,1,3057,128,3,0
1531 +,4,1,3059,192,3,0
1532 +,4,1,3061,160,3,0
1533 +,4,1,3063,160,3,0
1534 +,4,1,3065,128,3,0
1535 +,4,1,3067,256,4,0
1536 +,4,1,3069,224,4,0
1537 +,4,1,3071,288,4,0
1538 +,4,1,3073,3360,17,0
1539 +,4,1,3075,128,3,0
1540 +,4,1,3077,128,3,0
1541 +,4,1,3079,128,3,0
1542 +,4,1,3081,3520,17,0
1543 +,4,1,3083,288,4,0
1544 +,4,1,3085,256,4,0
1545 +,4,1,3087,256,4,0
1546 +,4,1,3089,256,4,0
1547 +,4,1,3091,256,4,0
1548 +,4,1,3093,288,4,0
1549 +,4,1,3095,1120,7,0
1550 +,4,1,3097,1184,7,0
1551 +,4,1,3099,1248,7,0
1552 +,4,1,3101,1216,7,0
1553 +,4,1,3103,1216,6,0
1554 +,4,1,3105,1216,9,0
1555 +,4,1,3107,1216,9,0
1556 +,4,1,3109,1216,9,0
1557 +,4,1,3111,1216,9,0
1558 +,4,1,3113,1216,9,0
1559 +,4,1,3115,1408,10,0
1560 +,4,1,3117,928,7,0
1561 +,4,1,3119,992,7,0
1562 +,4,1,3121,1024,7,0
1563 +,4,1,3123,1024,7,0
1564 +,4,1,3125,992,6,0
1565 +,4,1,3127,672,6,0
1566 +,4,1,3129,672,6,0
1567 +,4,1,3131,704,6,0
1568 +,4,1,3133,704,6,0
1569 +,4,1,3135,864,7,0
1570 +,4,1,3137,704,6,0
1571 +,4,1,3139,704,6,0
1572 +,4,1,3141,672,6,0
1573 +,4,1,3143,672,6,0
1574 +,4,1,3145,352,4,0
1575 +,4,1,3147,128,3,0
1576 +,4,1,3149,320,3,0
1577 +,4,1,3151,224,4,0
1578 +,4,1,3153,224,4,0
1579 +,4,1,3155,192,4,0
1580 +,4,1,3157,448,5,0
1581 +,4,1,3159,480,5,0
1582 +,4,1,3161,480,5,0
1583 +,4,1,3163,512,5,0
1584 +,4,1,3165,448,5,0
1585 +,4,1,3167,416,5,0
1586 +,4,1,3169,480,5,0
1587 +,4,1,3171,480,5,0
1588 +,4,1,3173,448,5,0
1589 +,4,1,3175,256,4,0
1590 +,4,1,3177,160,4,0
1591 +,4,1,3179,1568,23,0
1592 +,4,1,3181,1312,10,0
1593 +,4,1,3183,640,5,0
1594 +,4,1,3185,1984,11,0
1595 +,4,1,3187,1088,5,0
1596 +,4,1,3189,2112,21,0
1597 +,4,1,3191,2112,21,0
1598 +,4,1,3193,2112,21,0
1599 +,4,1,3195,2112,21,0
1600 +,4,1,3197,128,3,0
1601 +,4,1,3199,1088,11,0
1602 +,4,1,3201,2656,8,0
1603 +,4,1,3203,128,3,0
1604 +,4,1,3205,128,3,0
1605 +,4,1,3207,128,3,0
1606 +,4,1,3209,416,3,0
1607 +,4,1,3211,320,5,0
1608 +,4,1,3213,288,4,0
1609 +,4,1,3215,320,4,0
1610 +,4,1,3217,224,4,0
1611 +,4,1,3219,224,4,0
1612 +,4,1,3221,416,5,0
1613 +,4,1,3223,1888,14,0
1614 +,4,1,3225,960,8,0
1615 +,4,1,3227,1760,9,0
1616 +,4,1,3229,352,4,0
1617 +,4,1,3231,288,4,0
1618 +,4,1,3233,416,6,0
1619 +,4,1,3235,224,4,0
1620 +,4,1,3237,256,4,0
1621 +,4,1,3239,384,4,0
1622 +,4,1,3241,1600,11,0
1623 +,4,1,3243,928,8,0
1624 +,4,1,3245,960,8,0
1625 +,4,1,3247,448,6,0
1626 +,4,1,3249,128,3,0
1627 +,4,1,3251,128,3,0
1628 +,4,1,3253,160,3,0
1629 +,4,1,3255,160,3,0
1630 +,4,1,3257,160,3,0
1631 +,4,1,3259,160,3,0
1632 +,4,1,3261,160,3,0
1633 +,4,1,3263,416,4,0
1634 +,4,1,3265,448,4,0
1635 +,4,1,3267,416,4,0
1636 +,4,1,3269,416,4,0
1637 +,4,1,3271,128,3,0
1638 +,4,1,3273,128,3,0
1639 +,4,1,3275,128,3,0
1640 +,4,1,3277,128,3,0
1641 +,4,1,3279,128,3,0
1642 +,4,1,3281,128,3,0
1643 +,4,1,3283,192,3,0
1644 +,4,1,3285,192,3,0
1645 +,4,1,3287,576,4,0
1646 +,4,1,3289,320,3,0
1647 +,4,1,3291,128,3,0
1648 +,4,1,3293,352,4,0
1649 +,4,1,3295,128,3,0
1650 +,4,1,3297,224,4,0
1651 +,4,1,3299,128,3,0
1652 +,4,1,3301,224,5,0
1653 +,4,1,3303,224,5,0
1654 +,4,1,3305,224,4,0
1655 +,4,1,3307,256,5,0
1656 +,4,1,3309,224,5,0
1657 +,4,1,3311,224,5,0
1658 +,4,1,3313,128,3,0
1659 +,4,1,3315,128,3,0
1660 +,4,1,3317,3488,16,0
1661 +,4,1,3319,128,3,0
1662 +,4,1,3321,160,3,0
1663 +,4,1,3323,128,3,0
1664 +,4,1,3325,128,3,0
1665 +,4,1,3327,128,3,0
1666 +,4,1,3329,3552,17,0
1667 +,4,1,3331,256,4,0
1668 +,4,1,3333,256,4,0
1669 +,4,1,3335,256,4,0
1670 +,4,1,3337,256,4,0
1671 +,4,1,3339,288,4,0
1672 +,4,1,3341,1088,7,0
1673 +,4,1,3343,1152,7,0
1674 +,4,1,3345,1216,7,0
1675 +,4,1,3347,1216,7,0
1676 +,4,1,3349,1216,9,0
1677 +,4,1,3351,928,7,0
1678 +,4,1,3353,960,7,0
1679 +,4,1,3355,1024,7,0
1680 +,4,1,3357,1056,7,0
1681 +,4,1,3359,1024,6,0
1682 +,4,1,3361,704,6,0
1683 +,4,1,3363,704,6,0
1684 +,4,1,3365,704,6,0
1685 +,4,1,3367,704,6,0
1686 +,4,1,3369,896,7,0
1687 +,4,1,3371,672,6,0
1688 +,4,1,3373,480,5,0
1689 +,4,1,3375,480,5,0
1690 +,4,1,3377,480,5,0
1691 +,4,1,3379,512,5,0
1692 +,4,1,3381,448,5,0
1693 +,4,1,3383,416,5,0
1694 +,4,1,3385,480,5,0
1695 +,4,1,3387,480,5,0
1696 +,4,1,3389,480,5,0
1697 +,4,1,3391,1280,10,0
1698 +,4,1,3393,1984,11,0
1699 +,4,1,3395,1088,5,0
1700 +,4,1,3397,2176,21,0
1701 +,4,1,3399,2176,21,0
1702 +,4,1,3401,2176,21,0
1703 +,4,1,3403,2176,21,0
1704 +,4,1,3405,1120,11,0
1705 +,4,1,3407,320,4,0
1706 +,4,1,3409,448,5,0
1707 +,4,1,3411,1888,14,0
1708 +,4,1,3413,992,8,0
1709 +,4,1,3415,1760,9,0
1710 +,4,1,3417,448,6,0
1711 +,4,1,3419,448,6,0
1712 +,4,1,3421,128,3,0
1713 +,4,1,3423,416,4,0
1714 +,4,1,3425,128,3,0
1715 +,4,1,3427,128,3,0
1716 +,4,1,3429,128,3,0
1717 +,4,1,3431,128,3,0
1718 +,4,1,3433,320,3,0
1719 +,4,1,3435,352,4,0
1720 +,4,1,3437,128,3,0
1721 +,4,1,3439,896,7,0
1722 +,4,1,3441,1024,7,0
1723 +,4,1,3443,992,6,0
1724 +,4,1,3445,704,6,0
1725 +,3,1201,3447,32,18,0
1726 +,5,1202,3449,64,8,0
1727 +,3,134,3451,72,4,0
1728 +,3,270,3453,72,4,0
1729 +,3,134,3455,72,4,0
1730 +,3,270,3457,72,4,0
1731 +,3,271,3459,72,4,0
1732 +,3,270,3461,72,4,0
1733 +,3,271,3463,72,4,0
1734 +,3,161,3465,72,4,0
1735 +,3,134,3467,72,4,0
1736 +,3,76,3469,72,4,0
1737 +,3,204,3471,32,3,0
1738 +,3,271,3473,72,4,0
1739 +,3,134,3475,72,4,0
1740 +,3,270,3477,72,4,0
1741 +,3,204,3479,56,25,0
1742 +,5,406,3481,64,6,0
1743 +,5,1203,3483,64,6,0
1744 +,5,1204,3485,64,6,0
1745 +,3,204,3487,56,17,0
1746 +,0,517,3489,168,4,0
1747 +,0,517,3491,168,6,0
1748 +,5,1205,3493,64,6,0
1749 +,5,1206,3495,64,8,0
1750 +,5,1206,3497,64,8,0
1751 +,5,1206,3499,64,8,0
1752 +,5,1206,3501,64,8,0
1753 +,0,1207,3503,64,3,0
1754 +,3,271,3505,56,73,0
1755 +,5,1208,3507,64,6,0
1756 +,5,1209,3509,64,6,0
1757 +,5,1210,3511,64,6,0
1758 +,5,1211,3513,64,6,0
1759 +,5,1212,3515,64,6,0
1760 +,5,1213,3517,64,6,0
1761 +,5,1214,3519,64,6,0
1762 +,5,1215,3521,64,6,0
1763 +,0,517,3523,168,5,0
1764 +,0,517,3525,168,7,0
1765 +,5,1216,3527,64,9,0
1766 +,5,1,3529,64,8,0
1767 +,0,517,3531,168,6,0
1768 +,0,1207,3533,64,2,0
1769 +,0,1207,3535,64,2,0
1770 +,0,1207,3537,64,2,0
1771 +,0,1207,3539,64,2,0
1772 +,12,256,3541,32,2,0
1773 +,3,1217,3543,32,5,0
1774 +,0,517,3545,168,7,0
1775 +,5,1,3547,64,8,0
1776 +,0,517,3549,168,5,0
1777 +,0,517,3551,168,7,0
1778 +,0,1207,3553,64,3,0
1779 +,0,1207,3555,64,2,0
1780 +,0,517,3557,168,7,0
1781 +,0,517,3559,168,7,0
1782 +,5,324,3561,64,8,0
1783 +,3,1218,3563,32,10,0
1784 +,3,1218,3565,32,10,0
1785 +,3,1201,3567,32,18,0
1786 +,3,1218,3569,32,8,0
1787 +,3,1218,3571,32,10,0
1788 +,3,1219,3573,32,6,0
1789 +,3,1201,3575,32,18,0
1790 +,3,1218,3577,32,10,0
1791 +,3,1218,3579,32,8,0
1792 +,3,1201,3581,32,18,0
1793 +,3,1220,3583,32,6,0
1794 +,3,1218,3585,32,8,0
1795 +,3,1202,3587,32,7,0
1796 +,3,1218,3589,32,8,0
1797 +,3,1219,3591,32,6,0
1798 +,3,1218,3593,32,8,0
1799 +,3,1201,3595,32,18,0
1800 +,3,1201,3597,32,18,0
1801 +,3,1218,3599,32,8,0
1802 +,3,1218,3601,32,10,0
1803 +,3,1201,3603,32,18,0
1804 +,3,1218,3605,32,8,0
1805 +,3,1218,3607,32,8,0
1806 +,3,1218,3609,32,8,0
1807 +,3,1201,3611,32,18,0
1808 +,3,1202,3613,32,7,0
1809 +,3,1202,3615,32,7,0
1810 +,3,1202,3617,32,9,0
1811 +,3,1202,3619,32,7,0
1812 +,3,1202,3621,32,7,0
1813 +,3,1202,3623,32,7,0
1814 +,3,1202,3625,32,7,0
1815 +,3,1201,3627,32,18,0
1816 +,3,1201,3629,32,18,0
1817 +,3,1201,3631,32,18,0
1818 +,3,1201,3633,32,18,0
1819 +,3,1218,3635,32,10,0
1820 +,3,1218,3637,32,10,0
1821 +,3,1218,3639,32,10,0
1822 +,3,1218,3641,32,10,0
1823 +,2,1221,3643,32,1,0
1824 +,2,1222,3645,40,1,0
1825 +,2,1223,3647,40,1,0
1826 +,2,1224,3649,48,1,0
1827 +,2,1225,3651,40,1,0
1828 +,2,1226,3653,40,1,0
1829 +,2,1227,3655,40,1,0
1830 +,2,1228,3657,48,1,0
1831 +,2,1229,3659,48,1,0
1832 +,2,1230,3661,40,1,0
1833 +,2,1231,3663,40,1,0
1834 +,2,1232,3665,40,1,0
1835 +,2,1233,3667,40,1,0
1836 +,2,1234,3669,40,1,0
1837 +,2,1235,3671,32,1,0
1838 +,2,1236,3673,40,1,0
1839 +,2,1237,3675,40,1,0
1840 +,2,1238,3677,40,1,0
1841 +,2,1239,3679,32,1,0
1842 +,2,1240,3681,40,1,0
1843 +,2,1241,3683,32,1,0
1844 +,2,1242,3685,40,1,0
1845 +,2,1243,3687,40,1,0
1846 +,2,1244,3689,40,1,0
1847 +,2,1245,3691,40,1,0
1848 +,2,1246,3693,40,1,0
1849 +,2,1247,3695,40,1,0
1850 +,2,1248,3697,40,1,0
1851 +,2,1249,3699,32,1,0
1852 +,2,1250,3701,32,1,0
1853 +,2,1251,3703,40,1,0
1854 +,2,1252,3705,32,1,0
1855 +,2,1253,3707,32,1,0
1856 +,2,1254,3709,40,1,0
1857 +,2,1255,3711,32,1,0
1858 +,2,1256,3713,40,1,0
1859 +,2,1257,3715,48,1,0
1860 +,2,1258,3717,48,1,0
1861 +,2,1259,3719,40,1,0
1862 +,2,1260,3721,32,1,0
1863 +,2,1261,3723,48,1,0
1864 +,4,1262,3725,83040,3,0
1865 +,4,1262,3727,83040,3,0
1866 +,4,1262,3729,83040,3,0
1867 +,1,1263,3731,80,3,0
1868 +,4,1264,3733,56,2,0
1869 +,4,136,3735,56,2,0
1870 +,4,61,3737,56,2,0
1871 +,4,77,3739,56,2,0
1872 +,4,85,3741,56,2,0
1873 +,4,265,3743,56,2,0
1874 +,4,1265,3745,56,2,0
1875 +,4,1264,3747,56,3,0
1876 +,4,69,3749,56,2,0
1877 +,4,143,3751,56,2,0
1878 +,4,144,3753,56,2,0
1879 +,2,1266,3755,48,1,0
1880 +,4,1266,3757,56,2,0
1881 +,2,1267,3759,48,1,0
1882 +,4,1267,3761,56,2,0
1883 +,2,1268,3763,32,1,0
1884 +,4,1268,3765,56,2,0
1885 +,4,213,3767,56,2,0
1886 +,2,1269,3769,32,1,0
1887 +,4,1269,3771,56,2,0
1888 +,4,99,3773,56,2,0
1889 +,2,1270,3775,40,1,0
1890 +,4,1270,3777,56,2,0
1891 +,4,107,3779,56,2,0
1892 +,2,1271,3781,32,1,0
1893 +,4,1271,3783,56,2,0
1894 +,4,145,3785,56,2,0
1895 +,4,242,3787,56,2,0
1896 +,4,164,3789,56,2,0
1897 +,2,1272,3791,32,1,0
1898 +,4,1272,3793,56,2,0
1899 +,2,1273,3795,32,1,0
1900 +,4,1273,3797,56,2,0
1901 +,4,168,3799,56,2,0
1902 +,4,122,3801,56,2,0
1903 +,4,283,3803,56,2,0
1904 +,4,204,3805,56,2,0
1905 +,4,1274,3807,56,4,0
1906 +,1,1,3809,544,31,0
1907 +,4,1275,3811,56,2,0
1908 +,2,1276,3813,32,1,0
1909 +,4,1276,3815,56,2,0
1910 +,2,1277,3817,32,1,0
1911 +,4,1277,3819,56,4,0
1912 +,2,1278,3821,32,1,0
1913 +,4,1278,3823,56,2,0
1914 +,2,1279,3825,32,1,0
1915 +,4,1279,3827,56,2,0
1916 +,2,1280,3829,32,1,0
1917 +,4,1280,3831,56,2,0
1918 +,2,1281,3833,32,1,0
1919 +,4,1281,3835,56,2,0
1920 +,2,1282,3837,32,1,0
1921 +,4,1282,3839,56,2,0
1922 +,2,1283,3841,32,1,0
1923 +,4,1283,3843,56,2,0
1924 +,4,1284,3845,56,2,0
1925 +,4,265,3847,56,2,0
1926 +,4,1285,3849,56,4,0
1927 +,4,1286,3851,56,4,0
1928 +,4,1287,3853,56,4,0
1929 +,4,1288,3855,56,4,0
1930 +,4,1289,3857,56,4,0
1931 +,4,1290,3859,56,4,0
1932 +,4,1291,3861,56,4,0
1933 +,4,1292,3863,56,4,0
1934 +,4,1293,3865,56,4,0
1935 +,4,1294,3867,56,4,0
1936 +,4,1295,3869,56,4,0
1937 +,4,1296,3871,56,4,0
1938 +,4,1297,3873,56,4,0
1939 +,4,1298,3875,56,4,0
1940 +,4,1299,3877,56,4,0
1941 +,4,1300,3879,56,4,0
1942 +,4,1301,3881,56,4,0
1943 +,4,1302,3883,56,4,0
1944 +,4,1303,3885,56,4,0
1945 +,4,1304,3887,56,4,0
1946 +,4,1305,3889,56,4,0
1947 +,4,265,3891,56,4,0
1948 +,4,283,3893,56,2,0
1949 +,4,1306,3895,56,2,0
1950 +,2,1307,3897,32,1,0
1951 +,4,1307,3899,56,2,0
1952 +,2,1308,3901,32,1,0
1953 +,4,1308,3903,56,2,0
1954 +,2,1309,3905,32,1,0
1955 +,4,1309,3907,56,2,0
1956 +,4,65,3909,56,2,0
1957 +,2,1310,3911,40,1,0
1958 +,2,1311,3913,32,1,0
1959 +,2,1312,3915,32,1,0
1960 +,2,1313,3917,40,1,0
1961 +,2,1314,3919,32,1,0
1962 +,4,1283,3921,56,2,0
1963 +,4,1310,3923,56,2,0
1964 +,4,1311,3925,56,2,0
1965 +,4,1312,3927,56,2,0
1966 +,4,1313,3929,56,2,0
1967 +,2,1315,3931,32,1,0
1968 +,4,1315,3933,56,2,0
1969 +,2,1316,3935,32,1,0
1970 +,4,1316,3937,56,2,0
1971 +,2,1317,3939,32,1,0
1972 +,4,1317,3941,56,2,0
1973 +,4,1314,3943,56,2,0
1974 +,4,168,3945,56,2,0
1975 +,4,122,3947,56,2,0
1976 +,2,1318,3949,32,1,0
1977 +,4,1318,3951,56,2,0
1978 +,2,1319,3953,32,1,0
1979 +,4,1319,3955,56,2,0
1980 +,2,1320,3957,32,1,0
1981 +,4,1320,3959,56,2,0
1982 +,2,1321,3961,32,1,0
1983 +,4,1321,3963,56,2,0
1984 +,2,1322,3965,32,1,0
1985 +,4,1322,3967,56,2,0
1986 +,2,1323,3969,32,1,0
1987 +,4,1323,3971,56,2,0
1988 +,2,1324,3973,40,1,0
1989 +,4,1324,3975,56,2,0
1990 +,2,1325,3977,40,1,0
1991 +,4,1325,3979,56,4,0
1992 +,2,1326,3981,40,1,0
1993 +,4,1326,3983,56,4,0
1994 +,2,1327,3985,40,1,0
1995 +,4,1327,3987,56,2,0
1996 +,2,1328,3989,40,1,0
1997 +,4,1328,3991,56,2,0
1998 +,2,1329,3993,40,1,0
1999 +,4,1329,3995,56,2,0
2000 +,2,1330,3997,40,1,0
2001 +,4,1330,3999,56,2,0
2002 +,2,1331,4001,40,1,0
2003 +,4,1331,4003,56,2,0
2004 +,2,1332,4005,40,1,0
2005 +,4,1332,4007,56,2,0
2006 +,2,1333,4009,48,1,0
2007 +,4,1333,4011,56,2,0
2008 +,4,282,4013,56,2,0
2009 +,4,1334,4015,56,2,0
2010 +,4,1335,4017,56,2,0
2011 +,4,1325,4019,56,2,0
2012 +,4,1,4021,56,2,0
2013 +,2,1336,4023,48,1,0
2014 +,4,1336,4025,56,2,0
2015 +,2,1337,4027,32,1,0
2016 +,4,1337,4029,56,2,0
2017 +,2,1338,4031,32,1,0
2018 +,4,1338,4033,56,2,0
2019 +,4,380,4035,56,2,0
2020 +,2,1339,4037,32,1,0
2021 +,4,1339,4039,56,2,0
2022 +,2,1340,4041,32,1,0
2023 +,4,1340,4043,56,2,0
2024 +,2,1341,4045,32,1,0
2025 +,4,1341,4047,56,2,0
2026 +,2,1342,4049,32,1,0
2027 +,4,1342,4051,56,2,0
2028 +,2,1343,4053,32,1,0
2029 +,4,1343,4055,56,2,0
2030 +,2,1344,4057,32,1,0
2031 +,4,1344,4059,56,2,0
2032 +,2,1345,4061,32,1,0
2033 +,4,1345,4063,56,2,0
2034 +,4,148,4065,56,2,0
2035 +,2,1346,4067,40,1,0
2036 +,4,1346,4069,56,2,0
2037 +,2,1347,4071,32,1,0
2038 +,4,1347,4073,56,2,0
2039 +,2,1348,4075,32,1,0
2040 +,4,1348,4077,56,2,0
2041 +,2,1349,4079,32,1,0
2042 +,4,1349,4081,56,2,0
2043 +,2,1350,4083,40,1,0
2044 +,4,1350,4085,56,2,0
2045 +,2,1351,4087,32,1,0
2046 +,4,1351,4089,56,2,0
2047 +,2,1352,4091,32,1,0
2048 +,4,1352,4093,56,2,0
2049 +,2,1353,4095,40,1,0
2050 +,4,1353,4097,56,2,0
2051 +,2,1354,4099,32,1,0
2052 +,4,1354,4101,56,2,0
2053 +,2,1355,4103,32,1,0
2054 +,4,1355,4105,56,2,0
2055 +,2,1356,4107,40,1,0
2056 +,4,1356,4109,56,2,0
2057 +,2,1357,4111,32,1,0
2058 +,4,1357,4113,56,2,0
2059 +,2,204,4115,32,1,0
2060 +,4,1306,4117,56,2,0
2061 +,4,1358,4119,56,2,0
2062 +,4,1359,4121,56,2,0
2063 +,2,1360,4123,32,1,0
2064 +,4,1361,4125,56,2,0
2065 +,4,1362,4127,56,2,0
2066 +,2,1363,4129,40,1,0
2067 +,4,1364,4131,56,2,0
2068 +,4,1365,4133,56,2,0
2069 +,2,1366,4135,32,1,0
2070 +,4,1367,4137,56,2,0
2071 +,4,1368,4139,56,2,0
2072 +,2,1369,4141,40,1,0
2073 +,4,1370,4143,56,2,0
2074 +,4,1371,4145,56,2,0
2075 +,2,1372,4147,32,1,0
2076 +,4,1373,4149,56,2,0
2077 +,4,1374,4151,56,2,0
2078 +,2,1375,4153,40,1,0
2079 +,4,1376,4155,56,2,0
2080 +,4,1377,4157,56,2,0
2081 +,2,1378,4159,32,1,0
2082 +,4,1379,4161,56,2,0
2083 +,4,1380,4163,56,2,0
2084 +,2,1381,4165,40,1,0
2085 +,4,1382,4167,56,2,0
2086 +,4,1383,4169,56,2,0
2087 +,2,1384,4171,32,1,0
2088 +,4,1385,4173,56,2,0
2089 +,4,1386,4175,56,2,0
2090 +,2,1387,4177,32,1,0
2091 +,4,1388,4179,56,2,0
2092 +,4,1389,4181,56,2,0
2093 +,2,1390,4183,32,1,0
2094 +,4,1391,4185,56,2,0
2095 +,4,1392,4187,56,2,0
2096 +,2,1393,4189,32,1,0
2097 +,4,1394,4191,56,2,0
2098 +,4,1395,4193,56,2,0
2099 +,2,1396,4195,32,1,0
2100 +,4,1397,4197,56,2,0
2101 +,4,1398,4199,56,2,0
2102 +,2,1399,4201,32,1,0
2103 +,4,1400,4203,56,2,0
2104 +,4,1401,4205,56,2,0
2105 +,2,1402,4207,32,1,0
2106 +,4,1403,4209,56,2,0
2107 +,4,1404,4211,56,2,0
2108 +,2,1405,4213,32,1,0
2109 +,4,1406,4215,56,2,0
2110 +,4,1407,4217,56,2,0
2111 +,2,1408,4219,32,1,0
2112 +,4,1409,4221,56,2,0
2113 +,4,1410,4223,56,2,0
2114 +,2,1411,4225,32,1,0
2115 +,4,1412,4227,56,2,0
2116 +,4,1413,4229,56,2,0
2117 +,4,226,4231,56,2,0
2118 +,4,130,4233,56,2,0
2119 +,4,1414,4235,56,2,0
2120 +,4,1415,4237,56,2,0
2121 +,4,1416,4239,56,2,0
2122 +,4,1417,4241,56,2,0
2123 +,4,1418,4243,56,2,0
2124 +,4,1419,4245,56,2,0
2125 +,4,1420,4247,56,2,0
2126 +,4,1421,4249,56,2,0
2127 +,2,1422,4251,32,1,0
2128 +,4,1422,4253,56,2,0
2129 +,4,265,4255,56,2,0
2130 +,2,1423,4257,32,1,0
2131 +,4,1423,4259,56,2,0
2132 +,4,1424,4261,56,2,0
2133 +,4,1425,4263,56,2,0
2134 +,4,1426,4265,56,2,0
2135 +,4,1427,4267,56,2,0
2136 +,2,1428,4269,48,1,0
2137 +,4,1428,4271,56,2,0
2138 +,4,126,4273,56,2,0
2139 +,4,265,4275,56,2,0
2140 +,4,225,4277,56,2,0
2141 +,2,1429,4279,40,1,0
2142 +,4,1429,4281,56,2,0
2143 +,4,1306,4283,56,2,0
2144 +,4,1309,4285,56,2,0
2145 +,4,1308,4287,56,2,0
2146 +,4,1430,4289,56,2,0
2147 +,4,1431,4291,56,2,0
2148 +,4,1432,4293,56,2,0
2149 +,4,1433,4295,56,2,0
2150 +,4,1434,4297,56,2,0
2151 +,4,1435,4299,56,2,0
2152 +,4,122,4301,56,2,0
2153 +,4,168,4303,56,2,0
2154 +,4,283,4305,56,2,0
2155 +,4,1310,4307,56,2,0
2156 +,4,1321,4309,56,2,0
2157 +,4,1311,4311,56,2,0
2158 +,4,1319,4313,56,2,0
2159 +,4,1312,4315,56,2,0
2160 +,4,1313,4317,56,2,0
2161 +,4,1318,4319,56,2,0
2162 +,4,1314,4321,56,2,0
2163 +,4,1276,4323,56,2,0
2164 +,4,1326,4325,56,2,0
2165 +,4,1320,4327,56,2,0
2166 +,4,1315,4329,56,2,0
2167 +,4,1323,4331,56,2,0
2168 +,4,1324,4333,56,2,0
2169 +,4,240,4335,56,2,0
2170 +,4,1317,4337,56,2,0
2171 +,4,1322,4339,56,2,0
2172 +,4,1281,4341,56,2,0
2173 +,2,1436,4343,32,1,0
2174 +,4,1436,4345,56,2,0
2175 +,4,1325,4347,56,4,0
2176 +,1,1,4349,128,5,0
2177 +,4,1437,4351,56,4,0
2178 +,4,1277,4353,56,4,0
2179 +,2,1438,4355,48,1,0
2180 +,4,133,4357,56,2,0
2181 +,2,1439,4359,48,1,0
2182 +,4,1439,4361,56,2,0
2183 +,2,1440,4363,32,1,0
2184 +,4,1440,4365,56,2,0
2185 +,4,257,4367,56,2,0
2186 +,2,1441,4369,32,1,0
2187 +,4,1441,4371,56,2,0
2188 +,4,1431,4373,56,2,0
2189 +,4,1432,4375,56,2,0
2190 +,4,1433,4377,56,2,0
2191 +,2,1442,4379,32,1,0
2192 +,4,1442,4381,56,2,0
2193 +,2,1443,4383,32,1,0
2194 +,4,1443,4385,56,2,0
2195 +,2,1444,4387,32,1,0
2196 +,4,1444,4389,56,2,0
2197 +,2,1445,4391,32,1,0
2198 +,4,1445,4393,56,2,0
2199 +,2,1446,4395,32,1,0
2200 +,4,1446,4397,56,2,0
2201 +,2,1447,4399,32,1,0
2202 +,4,1447,4401,56,2,0
2203 +,2,1448,4403,40,1,0
2204 +,4,1448,4405,56,2,0
2205 +,2,1449,4407,40,1,0
2206 +,4,1449,4409,56,2,0
2207 +,2,1450,4411,32,1,0
2208 +,4,1450,4413,56,2,0
2209 +,2,1451,4415,32,1,0
2210 +,4,1451,4417,56,2,0
2211 +,2,1452,4419,40,1,0
2212 +,4,1452,4421,56,2,0
2213 +,2,1453,4423,40,1,0
2214 +,4,1453,4425,56,2,0
2215 +,2,1454,4427,40,1,0
2216 +,4,1454,4429,56,2,0
2217 +,2,1455,4431,40,1,0
2218 +,4,1455,4433,56,2,0
2219 +,2,1456,4435,40,1,0
2220 +,4,1456,4437,56,2,0
2221 +,2,1457,4439,40,1,0
2222 +,4,1457,4441,56,2,0
2223 +,2,1441,4443,32,1,0
2224 +,2,1458,4445,32,1,0
2225 +,4,1458,4447,56,2,0
2226 +,2,1459,4449,32,1,0
2227 +,4,1459,4451,56,2,0
2228 +,2,1460,4453,32,1,0
2229 +,4,1460,4455,56,2,0
2230 +,4,101,4457,56,2,0
2231 +,4,265,4459,56,2,0
2232 +,2,1461,4461,40,1,0
2233 +,4,1461,4463,56,2,0
2234 +,2,1462,4465,40,1,0
2235 +,4,1462,4467,56,2,0
2236 +,2,1463,4469,40,1,0
2237 +,4,1463,4471,56,2,0
2238 +,2,1464,4473,40,1,0
2239 +,4,1464,4475,56,2,0
2240 +,2,1465,4477,40,1,0
2241 +,2,1466,4479,32,1,0
2242 +,4,1466,4481,56,2,0
2243 +,2,1467,4483,32,1,0
2244 +,4,1467,4485,56,2,0
2245 +,2,1468,4487,32,1,0
2246 +,4,1468,4489,56,2,0
2247 +,2,1469,4491,40,1,0
2248 +,4,1469,4493,56,2,0
2249 +,2,1470,4495,40,1,0
2250 +,4,1470,4497,56,2,0
2251 +,2,1471,4499,32,1,0
2252 +,4,1471,4501,56,2,0
2253 +,2,1472,4503,32,1,0
2254 +,4,1472,4505,56,2,0
2255 +,2,1473,4507,40,1,0
2256 +,4,1473,4509,56,2,0
2257 +,2,1474,4511,40,1,0
2258 +,4,1474,4513,56,2,0
2259 +,2,1475,4515,40,1,0
2260 +,4,1475,4517,56,2,0
2261 +,2,1476,4519,40,1,0
2262 +,4,1476,4521,56,2,0
2263 +,2,1477,4523,32,1,0
2264 +,4,1477,4525,56,2,0
2265 +,2,1478,4527,32,1,0
2266 +,4,1478,4529,56,2,0
2267 +,2,1479,4531,40,1,0
2268 +,4,1479,4533,56,2,0
2269 +,2,1480,4535,40,1,0
2270 +,4,1480,4537,56,2,0
2271 +,2,1481,4539,32,1,0
2272 +,4,1481,4541,56,2,0
2273 +,2,1482,4543,32,1,0
2274 +,4,1482,4545,56,2,0
2275 +,2,1483,4547,48,1,0
2276 +,4,1483,4549,56,2,0
2277 +,2,1484,4551,40,1,0
2278 +,4,1484,4553,56,2,0
2279 +,2,1485,4555,40,1,0
2280 +,4,1485,4557,56,2,0
2281 +,2,1486,4559,40,1,0
2282 +,4,1486,4561,56,2,0
2283 +,2,1487,4563,40,1,0
2284 +,4,1487,4565,56,2,0
2285 +,2,1488,4567,40,1,0
2286 +,4,1488,4569,56,2,0
2287 +,2,1489,4571,40,1,0
2288 +,4,1489,4573,56,2,0
2289 +,2,1490,4575,40,1,0
2290 +,4,1490,4577,56,2,0
2291 +,2,1491,4579,48,1,0
2292 +,4,1491,4581,56,2,0
2293 +,2,1492,4583,48,1,0
2294 +,4,1492,4585,56,2,0
2295 +,2,1493,4587,40,1,0
2296 +,4,1493,4589,56,2,0
2297 +,2,1494,4591,40,1,0
2298 +,4,1494,4593,56,2,0
2299 +,2,1495,4595,40,1,0
2300 +,4,1495,4597,56,2,0
2301 +,2,1496,4599,40,1,0
2302 +,4,1496,4601,56,2,0
2303 +,2,1497,4603,40,1,0
2304 +,4,1497,4605,56,2,0
2305 +,2,1498,4607,40,1,0
2306 +,4,1498,4609,56,2,0
2307 +,4,282,4611,56,2,0
2308 +,2,1499,4613,32,1,0
2309 +,4,1499,4615,56,2,0
2310 +,2,1500,4617,32,1,0
2311 +,4,1500,4619,56,2,0
2312 +,4,264,4621,56,2,0
2313 +,2,1501,4623,48,1,0
2314 +,2,1502,4625,48,1,0
2315 +,4,1503,4627,56,2,0
2316 +,4,1325,4629,56,4,0
2317 +,1,1,4631,1056,63,0
2318 +,2,1504,4633,48,1,0
2319 +,4,1504,4635,56,4,0
2320 +,4,1505,4637,56,4,0
2321 +,2,1506,4639,40,1,0
2322 +,4,1506,4641,56,2,0
2323 +,2,1507,4643,32,1,0
2324 +,4,1508,4645,56,2,0
2325 +,2,1509,4647,40,1,0
2326 +,4,1509,4649,56,4,0
2327 +,4,1504,4651,56,4,0
2328 +,4,1510,4653,56,4,0
2329 +,4,1506,4655,56,2,0
2330 +,4,1508,4657,56,2,0
2331 +,4,1509,4659,56,4,0
2332 +,4,1504,4661,56,4,0
2333 +,4,1511,4663,56,4,0
2334 +,2,1512,4665,40,1,0
2335 +,4,1513,4667,56,2,0
2336 +,4,1509,4669,56,4,0
2337 +,2,1514,4671,32,1,0
2338 +,4,1264,4673,56,3,0
2339 +,1,1,4675,200,10,0
2340 +,4,1514,4677,56,4,0
2341 +,0,291,4679,32,2,0
2342 +,2,1515,4681,40,1,0
2343 +,4,193,4683,56,4,0
2344 +,0,291,4685,32,2,0
2345 +,2,1516,4687,32,1,0
2346 +,2,1517,4689,32,1,0
2347 +,4,1517,4691,56,4,0
2348 +,0,291,4693,32,2,0
2349 +,2,1518,4695,40,1,0
2350 +,2,1519,4697,40,1,0
2351 +,4,1519,4699,56,4,0
2352 +,0,291,4701,32,2,0
2353 +,10,1520,4703,40,3,0
2354 +,4,1521,4705,56,2,0
2355 +,4,1522,4707,56,2,0
2356 +,4,1523,4709,56,2,0
2357 +,4,1524,4711,56,4,0
2358 +,2,1525,4713,32,1,0
2359 +,2,1526,4715,40,1,0
2360 +,2,1527,4717,40,1,0
2361 +,2,1528,4719,48,1,0
2362 +,2,1529,4721,40,1,0
2363 +,2,1530,4723,40,1,0
2364 +,2,1531,4725,40,1,0
2365 +,4,1532,4727,56,4,0
2366 +,4,1533,4729,56,4,0
2367 +,4,1534,4731,56,4,0
2368 +,4,1535,4733,56,4,0
2369 +,4,1536,4735,56,4,0
2370 +,4,1537,4737,56,4,0
2371 +,4,1538,4739,56,4,0
2372 +,4,1539,4741,56,4,0
2373 +,4,1540,4743,56,4,0
2374 +,4,1541,4745,56,4,0
2375 +,4,1542,4747,56,4,0
2376 +,4,1543,4749,56,4,0
2377 +,4,1544,4751,56,4,0
2378 +,4,1545,4753,56,4,0
2379 +,4,1546,4755,56,4,0
2380 +,4,1547,4757,56,4,0
2381 +,4,1548,4759,56,4,0
2382 +,4,1549,4761,56,4,0
2383 +,4,1550,4763,56,4,0
2384 +,4,1551,4765,56,4,0
2385 +,4,1552,4767,56,4,0
2386 +,4,1553,4769,56,4,0
2387 +,4,1554,4771,56,4,0
2388 +,4,1555,4773,56,4,0
2389 +,4,1556,4775,56,4,0
2390 +,4,1557,4777,56,4,0
2391 +,4,1558,4779,56,4,0
2392 +,4,1559,4781,56,4,0
2393 +,4,1560,4783,56,4,0
2394 +,4,1561,4785,56,4,0
2395 +,4,1562,4787,56,4,0
2396 +,4,1563,4789,56,4,0
2397 +,2,1564,4791,40,1,0
2398 +,2,1565,4793,40,1,0
2399 +,2,1566,4795,40,1,0
2400 +,4,1504,4797,56,4,0
2401 +,4,1567,4799,56,2,0
2402 +,2,1568,4801,32,1,0
2403 +,4,1569,4803,56,2,0
2404 +,4,1509,4805,56,4,0
2405 +,4,1570,4807,56,4,0
2406 +,4,1571,4809,56,4,0
2407 +,4,1501,4811,56,4,0
2408 +,4,1502,4813,56,4,0
2409 +,4,129,4815,56,2,0
2410 +,2,1572,4817,40,1,0
2411 +,4,1572,4819,56,2,0
2412 +,2,1573,4821,40,1,0
2413 +,4,1573,4823,56,2,0
2414 +,4,223,4825,56,2,0
2415 +,4,250,4827,56,2,0
2416 +,2,1574,4829,32,1,0
2417 +,4,1574,4831,56,2,0
2418 +,2,1575,4833,32,1,0
2419 +,4,1575,4835,56,2,0
2420 +,2,1576,4837,32,1,0
2421 +,4,1576,4839,56,2,0
2422 +,2,1577,4841,32,1,0
2423 +,4,1577,4843,56,2,0
2424 +,2,1578,4845,32,1,0
2425 +,4,1578,4847,56,2,0
2426 +,2,1579,4849,40,1,0
2427 +,4,1579,4851,56,2,0
2428 +,2,1580,4853,40,1,0
2429 +,4,1580,4855,56,2,0
2430 +,4,1283,4857,56,2,0
2431 +,2,1581,4859,32,1,0
2432 +,4,1581,4861,56,2,0
2433 +,2,1582,4863,40,1,0
2434 +,4,1582,4865,56,2,0
2435 +,2,1583,4867,32,1,0
2436 +,4,1583,4869,56,2,0
2437 +,2,1584,4871,32,1,0
2438 +,4,1584,4873,56,2,0
2439 +,4,1314,4875,56,2,0
2440 +,4,1276,4877,56,2,0
2441 +,2,1585,4879,32,1,0
2442 +,4,1585,4881,56,2,0
2443 +,4,1326,4883,56,2,0
2444 +,2,1586,4885,32,1,0
2445 +,4,1586,4887,56,2,0
2446 +,2,1587,4889,40,1,0
2447 +,4,1587,4891,56,2,0
2448 +,2,1588,4893,32,1,0
2449 +,4,1588,4895,56,2,0
2450 +,2,1589,4897,40,1,0
2451 +,4,1589,4899,56,2,0
2452 +,2,1590,4901,32,1,0
2453 +,4,1590,4903,56,2,0
2454 +,2,1591,4905,32,1,0
2455 +,4,1591,4907,56,2,0
2456 +,2,1592,4909,32,1,0
2457 +,4,1592,4911,56,2,0
2458 +,2,1593,4913,32,1,0
2459 +,4,1593,4915,56,2,0
2460 +,2,1594,4917,32,1,0
2461 +,4,1594,4919,56,2,0
2462 +,4,1317,4921,56,2,0
2463 +,2,1595,4923,32,1,0
2464 +,4,1595,4925,56,2,0
2465 +,2,1596,4927,32,1,0
2466 +,4,1596,4929,56,2,0
2467 +,2,1597,4931,32,1,0
2468 +,4,1597,4933,56,2,0
2469 +,2,1598,4935,32,1,0
2470 +,4,1598,4937,56,2,0
2471 +,2,1522,4939,32,1,0
2472 +,2,1523,4941,40,1,0
2473 +,2,1599,4943,32,1,0
2474 +,4,1599,4945,56,2,0
2475 +,2,1600,4947,40,1,0
2476 +,4,1600,4949,56,2,0
2477 +,4,265,4951,56,2,0
2478 +,2,1601,4953,32,1,0
2479 +,4,1601,4955,56,2,0
2480 +,2,1602,4957,32,1,0
2481 +,4,1603,4959,56,2,0
2482 +,2,1604,4961,40,1,0
2483 +,4,1605,4963,56,2,0
2484 +,2,1606,4965,48,1,0
2485 +,4,1606,4967,56,2,0
2486 +,2,1607,4969,48,1,0
2487 +,4,1607,4971,56,2,0
2488 +,2,1608,4973,40,1,0
2489 +,4,1608,4975,56,2,0
2490 +,2,1609,4977,40,1,0
2491 +,4,1609,4979,56,2,0
2492 +,4,282,4981,56,2,0
2493 +,4,1610,4983,56,2,0
2494 +,4,134,4985,56,2,0
2495 +,4,161,4987,56,2,0
2496 +,4,1306,4989,56,2,0
2497 +,2,1611,4991,32,1,0
2498 +,4,1611,4993,56,2,0
2499 +,2,1612,4995,32,1,0
2500 +,4,1612,4997,56,2,0
2501 +,4,229,4999,56,2,0
2502 +,4,228,5001,56,2,0
2503 +,4,214,5003,56,2,0
2504 +,4,258,5005,56,2,0
2505 +,2,1613,5007,32,1,0
2506 +,4,1613,5009,56,2,0
2507 +,2,1614,5011,32,1,0
2508 +,4,1614,5013,56,2,0
2509 +,4,76,5015,56,2,0
2510 +,4,1306,5017,56,2,0
2511 +,4,237,5019,56,2,0
2512 +,4,150,5021,56,2,0
2513 +,4,57,5023,56,2,0
2514 +,2,1615,5025,32,1,0
2515 +,4,1615,5027,56,2,0
2516 +,4,1348,5029,56,2,0
2517 +,4,122,5031,56,2,0
2518 +,4,1318,5033,56,2,0
2519 +,4,1616,5035,56,2,0
2520 +,4,283,5037,56,2,0
2521 +,2,1617,5039,40,1,0
2522 +,4,1617,5041,56,2,0
2523 +,2,1618,5043,32,1,0
2524 +,4,1459,5045,56,2,0
2525 +,2,1619,5047,40,1,0
2526 +,4,1619,5049,56,2,0
2527 +,2,1618,5051,32,1,0
2528 +,4,1306,5053,56,2,0
2529 +,4,177,5055,56,2,0
2530 +,4,142,5057,56,2,0
2531 +,4,240,5059,56,2,0
2532 +,4,150,5061,56,2,0
2533 +,4,1615,5063,56,2,0
2534 +,4,1348,5065,56,2,0
2535 +,4,122,5067,56,2,0
2536 +,4,1318,5069,56,2,0
2537 +,4,168,5071,56,2,0
2538 +,4,1616,5073,56,2,0
2539 +,4,283,5075,56,2,0
2540 +,2,1620,5077,32,1,0
2541 +,4,1620,5079,56,2,0
2542 +,4,267,5081,56,2,0
2543 +,4,277,5083,56,2,0
2544 +,4,128,5085,56,2,0
2545 +,4,160,5087,56,2,0
2546 +,4,162,5089,56,2,0
2547 +,2,1621,5091,32,1,0
2548 +,4,1621,5093,56,2,0
2549 +,2,1622,5095,32,1,0
2550 +,4,1622,5097,56,2,0
2551 +,2,1623,5099,40,1,0
2552 +,2,1624,5101,40,1,0
2553 +,2,1625,5103,48,1,0
2554 +,2,1626,5105,32,1,0
2555 +,2,1627,5107,32,1,0
2556 +,2,1628,5109,40,1,0
2557 +,2,1629,5111,40,1,0
2558 +,2,1630,5113,40,1,0
2559 +,4,255,5115,56,2,0
2560 +,4,265,5117,56,2,0
2561 +,4,282,5119,56,2,0
2562 +,4,1503,5121,56,2,0
2563 +,2,255,5123,32,1,0
2564 +,4,269,5125,56,2,0
2565 +,2,1631,5127,32,1,0
2566 +,2,1505,5129,40,1,0
2567 +,2,1510,5131,40,1,0
2568 +,2,1567,5133,32,1,0
2569 +,2,1511,5135,40,1,0
2570 +,2,1632,5137,40,1,0
2571 +,4,1504,5139,56,4,0
2572 +,4,1632,5141,56,2,0
2573 +,4,1509,5143,56,4,0
2574 +,2,1633,5145,32,1,0
2575 +,4,1633,5147,56,4,0
2576 +,2,1634,5149,48,1,0
2577 +,4,1634,5151,56,4,0
2578 +,4,284,5153,56,2,0
2579 +,4,1615,5155,56,2,0
2580 +,4,142,5157,56,2,0
2581 +,4,150,5159,56,2,0
2582 +,4,240,5161,56,2,0
2583 +,2,284,5163,32,1,0
2584 +,4,271,5165,56,2,0
2585 +,4,1440,5167,56,2,0
2586 +,2,1635,5169,40,1,0
2587 +,4,1635,5171,56,2,0
2588 +,2,1636,5173,32,1,0
2589 +,4,1636,5175,56,2,0
2590 +,2,1637,5177,40,1,0
2591 +,4,1637,5179,56,2,0
2592 +,2,1638,5181,32,1,0
2593 +,4,1638,5183,56,2,0
2594 +,2,1639,5185,40,1,0
2595 +,2,1640,5187,40,1,0
2596 +,2,1641,5189,48,1,0
2597 +,2,1642,5191,48,1,0
2598 +,2,1643,5193,40,1,0
2599 +,2,1644,5195,40,1,0
2600 +,2,1645,5197,32,1,0
2601 +,4,201,5199,56,2,0
2602 +,2,1646,5201,40,1,0
2603 +,4,1646,5203,56,2,0
2604 +,2,1647,5205,32,1,0
2605 +,4,1647,5207,56,2,0
2606 +,2,1648,5209,40,1,0
2607 +,4,1648,5211,56,2,0
2608 +,4,265,5213,56,2,0
2609 +,4,282,5215,56,2,0
2610 +,4,1325,5217,56,2,0
2611 +,4,222,5219,56,2,0
2612 +,2,1649,5221,32,1,0
2613 +,4,1649,5223,56,2,0
2614 +,4,272,5225,56,2,0
2615 +,4,75,5227,56,2,0
2616 +,2,1650,5229,32,1,0
2617 +,4,107,5231,56,2,0
2618 +,4,108,5233,56,2,0
2619 +,4,61,5235,56,2,0
2620 +,4,96,5237,56,2,0
2621 +,4,142,5239,56,2,0
2622 +,4,143,5241,56,2,0
2623 +,4,145,5243,56,2,0
2624 +,4,150,5245,56,2,0
2625 +,4,164,5247,56,2,0
2626 +,4,209,5249,56,2,0
2627 +,4,213,5251,56,2,0
2628 +,4,240,5253,56,2,0
2629 +,4,242,5255,56,2,0
2630 +,4,270,5257,56,2,0
2631 +,2,1651,5259,40,1,0
2632 +,4,1651,5261,56,2,0
2633 +,4,220,5263,56,2,0
2634 +,2,1652,5265,40,1,0
2635 +,4,1652,5267,56,2,0
2636 +,2,1653,5269,32,1,0
2637 +,2,1654,5271,32,1,0
2638 +,4,1654,5273,56,2,0
2639 +,2,1655,5275,32,1,0
2640 +,4,1655,5277,56,2,0
2641 +,2,1656,5279,32,1,0
2642 +,4,1656,5281,56,2,0
2643 +,2,1657,5283,32,1,0
2644 +,4,1657,5285,56,2,0
2645 +,2,1658,5287,32,1,0
2646 +,4,1658,5289,56,2,0
2647 +,2,1659,5291,32,1,0
2648 +,4,1659,5293,56,2,0
2649 +,2,1660,5295,32,1,0
2650 +,4,1660,5297,56,2,0
2651 +,2,1661,5299,32,1,0
2652 +,4,1661,5301,56,2,0
2653 +,2,1662,5303,32,1,0
2654 +,4,1662,5305,56,2,0
2655 +,2,1663,5307,32,1,0
2656 +,4,1663,5309,56,2,0
2657 +,2,1664,5311,32,1,0
2658 +,4,1664,5313,56,2,0
2659 +,2,1665,5315,32,1,0
2660 +,4,1665,5317,56,2,0
2661 +,2,1666,5319,32,1,0
2662 +,4,1666,5321,56,2,0
2663 +,2,1667,5323,32,1,0
2664 +,4,1667,5325,56,2,0
2665 +,2,1668,5327,32,1,0
2666 +,4,1668,5329,56,2,0
2667 +,2,1669,5331,32,1,0
2668 +,4,1669,5333,56,2,0
2669 +,2,1670,5335,32,1,0
2670 +,4,1670,5337,56,2,0
2671 +,2,1671,5339,32,1,0
2672 +,4,1671,5341,56,2,0
2673 +,2,1672,5343,32,1,0
2674 +,4,1672,5345,56,2,0
2675 +,4,1340,5347,56,2,0
2676 +,2,1673,5349,32,1,0
2677 +,4,1673,5351,56,2,0
2678 +,2,1674,5353,32,1,0
2679 +,4,1674,5355,56,2,0
2680 +,2,1675,5357,32,1,0
2681 +,4,1675,5359,56,2,0
2682 +,2,1521,5361,32,1,0
2683 +,2,1284,5363,32,1,0
2684 +,2,1676,5365,32,1,0
2685 +,4,1676,5367,56,2,0
2686 +,2,1677,5369,32,1,0
2687 +,4,1677,5371,56,2,0
2688 +,2,1678,5373,32,1,0
2689 +,4,1678,5375,56,2,0
2690 +,2,1679,5377,32,1,0
2691 +,4,1679,5379,56,2,0
2692 +,2,1680,5381,32,1,0
2693 +,4,1680,5383,56,2,0
2694 +,2,1681,5385,32,1,0
2695 +,4,1681,5387,56,2,0
2696 +,2,1682,5389,32,1,0
2697 +,4,1682,5391,56,2,0
2698 +,2,1683,5393,32,1,0
2699 +,4,1683,5395,56,2,0
2700 +,2,1684,5397,32,1,0
2701 +,4,1684,5399,56,2,0
2702 +,2,1685,5401,32,1,0
2703 +,4,1685,5403,56,2,0
2704 +,2,1686,5405,32,1,0
2705 +,2,1687,5407,32,1,0
2706 +,2,1688,5409,32,1,0
2707 +,2,1689,5411,32,1,0
2708 +,2,1690,5413,32,1,0
2709 +,2,1691,5415,32,1,0
2710 +,2,1692,5417,32,1,0
2711 +,2,1693,5419,32,1,0
2712 +,2,1653,5421,32,1,0
2713 +,4,1636,5423,56,2,0
2714 +,4,285,5425,56,2,0
2715 +,4,1615,5427,56,2,0
2716 +,4,150,5429,56,2,0
2717 +,4,57,5431,56,2,0
2718 +,2,285,5433,32,1,0
2719 +,4,78,5435,56,2,0
2720 +,4,265,5437,56,2,0
2721 +,4,282,5439,56,2,0
2722 +,4,165,5441,56,2,0
2723 +,4,1306,5443,56,2,0
2724 +,4,67,5445,56,2,0
2725 +,4,1432,5447,56,2,0
2726 +,4,1317,5449,56,2,0
2727 +,4,1694,5451,56,2,0
2728 +,4,1695,5453,56,2,0
2729 +,4,193,5455,56,2,0
2730 +,4,230,5457,56,2,0
2731 +,4,261,5459,56,2,0
2732 +,2,1696,5461,48,1,0
2733 +,4,1,5463,56,2,0
2734 +,4,1,5465,56,2,0
2735 +,4,1697,5467,56,2,0
2736 +,2,1697,5469,40,1,0
2737 +,4,1698,5471,56,2,0
2738 +,4,193,5473,56,2,0
2739 +,4,230,5475,56,2,0
2740 +,4,261,5477,56,2,0
2741 +,2,1699,5479,40,1,0
2742 +,2,1698,5481,48,1,0
2743 +,4,1,5483,56,2,0
2744 +,4,1,5485,56,2,0
2745 +,4,1,5487,56,2,0
2746 +,4,1,5489,56,2,0
2747 +,4,1,5491,56,2,0
2748 +,4,1,5493,56,2,0
2749 +,4,1,5495,56,2,0
2750 +,2,1700,5497,32,1,0
2751 +,4,1700,5499,56,2,0
2752 +,2,1701,5501,32,1,0
2753 +,4,1701,5503,56,2,0
2754 +,4,57,5505,56,2,0
2755 +,4,1598,5507,56,2,0
2756 +,2,1702,5509,32,1,0
2757 +,4,1702,5511,56,2,0
2758 +,2,1703,5513,32,1,0
2759 +,4,1703,5515,56,2,0
2760 +,2,1704,5517,32,1,0
2761 +,4,1704,5519,56,2,0
2762 +,4,381,5521,56,2,0
2763 +,2,1705,5523,40,1,0
2764 +,4,1705,5525,56,2,0
2765 +,2,1706,5527,40,1,0
2766 +,4,1706,5529,56,2,0
2767 +,2,1707,5531,32,1,0
2768 +,4,1707,5533,56,2,0
2769 +,2,1708,5535,32,1,0
2770 +,4,1708,5537,56,2,0
2771 +,2,1709,5539,32,1,0
2772 +,4,1709,5541,56,2,0
2773 +,4,1264,5543,56,2,0
2774 +,4,1264,5545,56,2,0
2775 +,4,1710,5547,56,2,0
2776 +,2,1711,5549,40,1,0
2777 +,4,1711,5551,56,2,0
2778 +,2,1712,5553,40,1,0
2779 +,4,1712,5555,56,2,0
2780 +,2,1713,5557,40,1,0
2781 +,4,1713,5559,56,2,0
2782 +,2,1714,5561,40,1,0
2783 +,4,1714,5563,56,2,0
2784 +,2,1715,5565,40,1,0
2785 +,4,1715,5567,56,2,0
2786 +,2,1716,5569,40,1,0
2787 +,4,1716,5571,56,2,0
2788 +,2,1717,5573,40,1,0
2789 +,4,1717,5575,56,2,0
2790 +,2,1718,5577,40,1,0
2791 +,4,1718,5579,56,2,0
2792 +,2,1719,5581,48,1,0
2793 +,4,1719,5583,56,2,0
2794 +,2,1720,5585,32,1,0
2795 +,4,1720,5587,56,2,0
2796 +,2,1721,5589,40,1,0
2797 +,4,1721,5591,56,2,0
2798 +,2,1722,5593,40,1,0
2799 +,4,1722,5595,56,2,0
2800 +,2,1723,5597,32,1,0
2801 +,4,1723,5599,56,2,0
2802 +,2,1724,5601,32,1,0
2803 +,4,1724,5603,56,2,0
2804 +,2,1725,5605,40,1,0
2805 +,4,1725,5607,56,2,0
2806 +,4,265,5609,56,2,0
2807 +,4,1264,5611,56,2,0
2808 +,2,1726,5613,48,1,0
2809 +,4,1726,5615,56,2,0
2810 +,4,1345,5617,56,2,0
2811 +,2,1727,5619,48,1,0
2812 +,4,1727,5621,56,2,0
2813 +,2,1728,5623,40,1,0
2814 +,4,1,5625,56,2,0
2815 +,2,1729,5627,40,1,0
2816 +,4,1,5629,56,2,0
2817 +,2,1730,5631,40,1,0
2818 +,4,1,5633,56,2,0
2819 +,2,1731,5635,40,1,0
2820 +,4,1264,5637,56,2,0
2821 +,2,1732,5639,40,1,0
2822 +,4,1732,5641,56,4,0
2823 +,1,1,5643,112,4,0
2824 +,4,1340,5645,56,4,0
2825 +,2,1733,5647,48,1,0
2826 +,4,1733,5649,56,4,0
2827 +,2,1734,5651,40,1,0
2828 +,4,1734,5653,56,4,0
2829 +,2,1735,5655,48,1,0
2830 +,4,1735,5657,56,4,0
2831 +,2,1736,5659,40,1,0
2832 +,4,1736,5661,56,4,0
2833 +,2,1737,5663,40,1,0
2834 +,2,1738,5665,48,1,0
2835 +,2,1739,5667,48,1,0
2836 +,4,62,5669,56,2,0
2837 +,4,1740,5671,56,2,0
2838 +,2,1740,5673,48,1,0
2839 +,4,1610,5675,56,2,0
2840 +,4,193,5677,56,2,0
2841 +,4,230,5679,56,2,0
2842 +,4,261,5681,56,2,0
2843 +,2,140,5683,40,1,0
2844 +,4,193,5685,56,2,0
2845 +,4,68,5687,56,2,0
2846 +,4,1,5689,56,2,0
2847 +,4,1,5691,56,2,0
2848 +,4,1,5693,56,2,0
2849 +,4,1,5695,56,2,0
2850 +,4,193,5697,56,2,0
2851 +,4,1741,5699,56,2,0
2852 +,2,1742,5701,32,1,0
2853 +,2,1743,5703,40,1,0
2854 +,2,1744,5705,32,1,0
2855 +,2,1745,5707,40,1,0
2856 +,4,1745,5709,56,4,0
2857 +,2,1746,5711,48,1,0
2858 +,4,1746,5713,56,4,0
2859 +,2,1747,5715,40,1,0
2860 +,2,1275,5717,40,1,0
2861 +,4,1264,5719,56,2,0
2862 +,4,1,5721,56,2,0
2863 +,4,1,5723,56,2,0
2864 +,4,1,5725,56,2,0
2865 +,4,1,5727,56,2,0
2866 +,4,1,5729,56,2,0
2867 +,4,1,5731,56,2,0
2868 +,4,1,5733,56,2,0
2869 +,4,1,5735,56,2,0
2870 +,4,1,5737,56,2,0
2871 +,1,1,5739,80,2,0
2872 +,4,193,5741,56,2,0
2873 +,4,1748,5743,56,2,0
2874 +,4,1306,5745,56,2,0
2875 +,4,243,5747,56,2,0
2876 +,4,1432,5749,56,2,0
2877 +,4,1317,5751,56,2,0
2878 +,4,193,5753,56,2,0
2879 +,2,1749,5755,40,1,0
2880 +,4,1750,5757,56,2,0
2881 +,4,1264,5759,56,2,0
2882 +,4,1264,5761,56,2,0
2883 +,4,1264,5763,56,2,0
2884 +,4,1264,5765,56,2,0
2885 +,4,193,5767,56,2,0
2886 +,4,1264,5769,56,2,0
2887 +,4,1264,5771,56,2,0
2888 +,4,1264,5773,56,2,0
2889 +,4,1264,5775,56,2,0
2890 +,4,1264,5777,56,2,0
2891 +,4,1264,5779,56,2,0
2892 +,4,1264,5781,56,2,0
2893 +,4,1264,5783,56,2,0
2894 +,4,1751,5785,56,4,0
2895 +,4,1752,5787,56,4,0
2896 +,4,1753,5789,56,4,0
2897 +,4,1,5791,56,2,0
2898 +,4,1754,5793,56,4,0
2899 +,4,94,5795,56,2,0
2900 +,4,173,5797,56,2,0
2901 +,4,232,5799,56,2,0
2902 +,1,1755,5801,32,1,0
2903 +,0,28,5803,24,1,0
2904 +,1,1755,5805,24,1,0
2905 +,0,28,5807,24,1,0
2906 +,1,1755,5809,24,1,0
2907 +,0,28,5811,24,1,0
2908 +,1,1755,5813,24,1,0
2909 +,0,28,5815,24,1,0
2910 +,1,1755,5817,32,1,0
2911 +,0,28,5819,24,1,0
2912 +,1,1755,5821,32,1,0
2913 +,0,28,5823,24,1,0
2914 +,1,1755,5825,32,1,0
2915 +,0,28,5827,24,1,0
2916 +,1,1755,5829,24,1,0
2917 +,0,28,5831,24,1,0
2918 +,1,1755,5833,24,1,0
2919 +,0,28,5835,24,1,0
2920 +,1,1755,5837,24,1,0
2921 +,0,28,5839,24,1,0
2922 +,1,1755,5841,24,1,0
2923 +,0,28,5843,24,1,0
2924 +,1,1755,5845,48,1,0
2925 +,0,28,5847,24,1,0
2926 +,1,1755,5849,24,1,0
2927 +,0,28,5851,24,1,0
2928 +,1,1755,5853,56,1,0
2929 +,0,28,5855,24,1,0
2930 +,1,1755,5857,48,1,0
2931 +,0,28,5859,24,1,0
2932 +,1,1755,5861,24,1,0
2933 +,0,28,5863,24,1,0
2934 +,1,1755,5865,24,1,0
2935 +,0,28,5867,24,1,0
2936 +,1,1755,5869,24,1,0
2937 +,0,28,5871,24,1,0
2938 +,1,1755,5873,24,1,0
2939 +,0,28,5875,24,1,0
2940 +,1,1755,5877,24,1,0
2941 +,0,28,5879,24,1,0
2942 +,1,1755,5881,24,1,0
2943 +,0,28,5883,24,1,0
2944 +,1,1755,5885,24,1,0
2945 +,0,28,5887,24,1,0
2946 +,1,1755,5889,56,1,0
2947 +,0,28,5891,24,1,0
2948 +,1,1755,5893,48,1,0
2949 +,0,28,5895,24,1,0
2950 +,1,1755,5897,32,1,0
2951 +,0,28,5899,24,1,0
2952 +,1,1755,5901,32,1,0
2953 +,0,28,5903,24,1,0
2954 +,1,1755,5905,32,1,0
2955 +,0,28,5907,24,1,0
2956 +,1,1755,5909,24,1,0
2957 +,0,28,5911,24,1,0
2958 +,1,1755,5913,40,1,0
2959 +,0,28,5915,24,1,0
2960 +,1,1755,5917,32,1,0
2961 +,0,28,5919,24,1,0
2962 +,1,1755,5921,24,1,0
2963 +,0,28,5923,24,1,0
2964 +,1,1755,5925,24,1,0
2965 +,0,28,5927,24,1,0
2966 +,1,1755,5929,32,1,0
2967 +,0,28,5931,24,1,0
2968 +,1,1755,5933,48,1,0
2969 +,0,28,5935,24,1,0
2970 +,1,1755,5937,56,1,0
2971 +,0,28,5939,24,1,0
2972 +,1,1755,5941,48,1,0
2973 +,0,28,5943,24,1,0
2974 +,1,1755,5945,48,1,0
2975 +,0,28,5947,24,1,0
2976 +,1,1755,5949,24,1,0
2977 +,0,28,5951,24,1,0
2978 +,1,1755,5953,24,1,0
2979 +,0,28,5955,24,1,0
2980 +,1,1755,5957,40,1,0
2981 +,0,28,5959,24,1,0
2982 +,1,1755,5961,24,1,0
2983 +,0,28,5963,24,1,0
2984 +,1,1755,5965,24,1,0
2985 +,0,28,5967,24,1,0
2986 +,1,1755,5969,40,1,0
2987 +,0,28,5971,24,1,0
2988 +,1,1755,5973,24,1,0
2989 +,0,28,5975,24,1,0
2990 +,1,1755,5977,24,1,0
2991 +,0,28,5979,24,1,0
2992 +,1,1755,5981,24,1,0
2993 +,0,28,5983,24,1,0
2994 +,1,1755,5985,24,1,0
2995 +,0,28,5987,24,1,0
2996 +,1,1755,5989,24,1,0
2997 +,0,28,5991,24,1,0
2998 +,1,1755,5993,48,1,0
2999 +,0,28,5995,24,1,0
3000 +,1,1755,5997,24,1,0
3001 +,0,28,5999,24,1,0
3002 +,1,1755,6001,24,1,0
3003 +,0,28,6003,24,1,0
3004 +,1,1755,6005,24,1,0
3005 +,0,28,6007,24,1,0
3006 +,1,1755,6009,72,1,0
3007 +,0,28,6011,24,1,0
3008 +,1,1755,6013,16,1,0
3009 +,0,28,6015,24,1,0
3010 +,1,1755,6017,48,1,0
3011 +,0,28,6019,24,1,0
3012 +,1,1755,6021,24,1,0
3013 +,0,28,6023,24,1,0
3014 +,1,1755,6025,24,1,0
3015 +,0,28,6027,24,1,0
3016 +,1,1755,6029,24,1,0
3017 +,0,28,6031,24,1,0
3018 +,1,1755,6033,24,1,0
3019 +,0,28,6035,24,1,0
3020 +,1,1755,6037,24,1,0
3021 +,0,28,6039,24,1,0
3022 +,1,1755,6041,24,1,0
3023 +,0,28,6043,24,1,0
3024 +,1,1755,6045,24,1,0
3025 +,0,28,6047,24,1,0
3026 +,1,1755,6049,24,1,0
3027 +,0,28,6051,24,1,0
3028 +,1,1755,6053,24,1,0
3029 +,0,28,6055,24,1,0
3030 +,1,1755,6057,56,1,0
3031 +,0,28,6059,24,1,0
3032 +,1,1755,6061,24,1,0
3033 +,0,28,6063,24,1,0
3034 +,1,1755,6065,32,1,0
3035 +,0,28,6067,24,1,0
3036 +,1,1755,6069,24,1,0
3037 +,0,28,6071,24,1,0
3038 +,1,1755,6073,24,1,0
3039 +,0,28,6075,24,1,0
3040 +,1,1755,6077,16,1,0
3041 +,0,28,6079,24,1,0
3042 +,1,1755,6081,16,1,0
3043 +,0,28,6083,24,1,0
3044 +,1,1755,6085,16,1,0
3045 +,0,28,6087,24,1,0
3046 +,1,1755,6089,16,1,0
3047 +,0,28,6091,24,1,0
3048 +,1,1755,6093,24,1,0
3049 +,0,28,6095,24,1,0
3050 +,1,1755,6097,24,1,0
3051 +,0,28,6099,24,1,0
3052 +,1,1755,6101,24,1,0
3053 +,0,28,6103,24,1,0
3054 +,1,1755,6105,24,1,0
3055 +,0,28,6107,24,1,0
3056 +,1,1755,6109,24,1,0
3057 +,0,28,6111,24,1,0
3058 +,1,1755,6113,24,1,0
3059 +,0,28,6115,24,1,0
3060 +,1,1755,6117,48,1,0
3061 +,0,28,6119,24,1,0
3062 +,1,1755,6121,40,1,0
3063 +,0,28,6123,24,1,0
3064 +,1,1755,6125,40,1,0
3065 +,0,28,6127,24,1,0
3066 +,1,1755,6129,32,1,0
3067 +,0,28,6131,24,1,0
3068 +,1,1755,6133,40,1,0
3069 +,0,28,6135,24,1,0
3070 +,1,1755,6137,24,1,0
3071 +,0,28,6139,24,1,0
3072 +,1,1755,6141,24,1,0
3073 +,0,28,6143,24,1,0
3074 +,1,1755,6145,40,1,0
3075 +,0,28,6147,24,1,0
3076 +,2,1756,6149,32,1,0
3077 +,1,1755,6151,24,1,0
3078 +,0,28,6153,24,1,0
3079 +,1,1755,6155,24,1,0
3080 +,0,28,6157,24,1,0
3081 +,1,1755,6159,24,1,0
3082 +,0,28,6161,24,1,0
3083 +,1,1755,6163,24,1,0
3084 +,0,28,6165,24,1,0
3085 +,1,1755,6167,24,1,0
3086 +,0,28,6169,24,1,0
3087 +,1,1755,6171,24,1,0
3088 +,0,28,6173,24,1,0
3089 +,1,1755,6175,24,1,0
3090 +,0,28,6177,24,1,0
3091 +,1,1755,6179,24,1,0
3092 +,0,28,6181,24,1,0
3093 +,1,1755,6183,32,1,0
3094 +,0,28,6185,24,1,0
3095 +,1,1755,6187,32,1,0
3096 +,0,28,6189,24,1,0
3097 +,1,1755,6191,32,1,0
3098 +,0,28,6193,24,1,0
3099 +,1,1755,6195,32,1,0
3100 +,0,28,6197,24,1,0
3101 +,1,1755,6199,32,1,0
3102 +,0,28,6201,24,1,0
3103 +,1,1755,6203,24,1,0
3104 +,0,28,6205,24,1,0
3105 +,1,1755,6207,32,1,0
3106 +,0,28,6209,24,1,0
3107 +,1,1755,6211,24,1,0
3108 +,0,28,6213,24,1,0
3109 +,1,1755,6215,24,1,0
3110 +,0,28,6217,24,1,0
3111 +,1,1755,6219,32,1,0
3112 +,0,28,6221,24,1,0
3113 +,7,54,6223,16,1,0
3114 +,1,1755,6225,16,1,0
3115 +,0,28,6227,24,1,0
3116 +,1,1755,6229,24,1,0
3117 +,0,28,6231,24,1,0
3118 +,1,1755,6233,24,1,0
3119 +,0,28,6235,24,1,0
3120 +,1,1755,6237,128,1,0
3121 +,0,28,6239,24,1,0
3122 +,1,1755,6241,64,1,0
3123 +,0,28,6243,24,1,0
3124 +,1,1755,6245,24,1,0
3125 +,0,28,6247,24,1,0
3126 +,1,1755,6249,224,1,0
3127 +,0,28,6251,24,1,0
3128 +,1,1755,6253,24,1,0
3129 +,0,28,6255,24,1,0
3130 +,1,1755,6257,24,1,0
3131 +,0,28,6259,24,1,0
3132 +,1,1755,6261,24,1,0
3133 +,0,28,6263,24,1,0
3134 +,1,1755,6265,24,1,0
3135 +,0,28,6267,24,1,0
3136 +,1,1755,6269,16,1,0
3137 +,0,28,6271,24,1,0
3138 +,1,1755,6273,16,1,0
3139 +,0,28,6275,24,1,0
3140 +,1,1755,6277,48,1,0
3141 +,0,28,6279,24,1,0
3142 +,1,1755,6281,24,1,0
3143 +,0,28,6283,24,1,0
3144 +,1,1755,6285,96,1,0
3145 +,0,28,6287,24,1,0
3146 +,1,1755,6289,24,1,0
3147 +,0,28,6291,24,1,0
3148 +,1,1755,6293,48,1,0
3149 +,0,28,6295,24,1,0
3150 +,1,1755,6297,64,1,0
3151 +,0,28,6299,24,1,0
3152 +,1,1755,6301,40,1,0
3153 +,0,28,6303,24,1,0
3154 +,1,1755,6305,40,1,0
3155 +,0,28,6307,24,1,0
3156 +,1,1755,6309,24,1,0
3157 +,0,28,6311,24,1,0
3158 +,1,1755,6313,24,1,0
3159 +,0,28,6315,24,1,0
3160 +,1,1755,6317,24,1,0
3161 +,0,28,6319,24,1,0
3162 +,1,1755,6321,24,1,0
3163 +,0,28,6323,24,1,0
3164 +,1,1755,6325,24,1,0
3165 +,0,28,6327,24,1,0
3166 +,1,1755,6329,24,1,0
3167 +,0,28,6331,24,1,0
3168 +,1,1,6333,24,1,0
3169 +,0,28,6335,24,1,0
3170 +,1,1755,6337,24,1,0
3171 +,0,28,6339,24,1,0
3172 +,1,1755,6341,48,1,0
3173 +,0,28,6343,24,1,0
3174 +,1,1755,6345,24,1,0
3175 +,0,28,6347,24,1,0
3176 +,1,1755,6349,24,1,0
3177 +,0,28,6351,24,1,0
3178 +,1,1755,6353,24,1,0
3179 +,0,28,6355,24,1,0
3180 +,1,1755,6357,24,1,0
3181 +,0,28,6359,24,1,0
3182 +,1,1755,6361,24,1,0
3183 +,0,28,6363,24,1,0
3184 +,1,1755,6365,24,1,0
3185 +,0,28,6367,24,1,0
3186 +,1,1755,6369,24,1,0
3187 +,0,28,6371,24,1,0
3188 +,1,1755,6373,24,1,0
3189 +,0,28,6375,24,1,0
3190 +,1,1755,6377,40,1,0
3191 +,0,28,6379,24,1,0
3192 +,1,1755,6381,32,1,0
3193 +,0,28,6383,24,1,0
3194 +,1,1755,6385,40,1,0
3195 +,0,28,6387,24,1,0
3196 +,1,1755,6389,32,1,0
3197 +,0,28,6391,24,1,0
3198 +,1,1755,6393,40,1,0
3199 +,0,28,6395,24,1,0
3200 +,1,1755,6397,32,1,0
3201 +,0,28,6399,24,1,0
3202 +,1,1755,6401,40,1,0
3203 +,0,28,6403,24,1,0
3204 +,1,1755,6405,32,1,0
3205 +,0,28,6407,24,1,0
3206 +,1,1755,6409,24,1,0
3207 +,0,28,6411,24,1,0
3208 +,1,1755,6413,24,1,0
3209 +,0,28,6415,24,1,0
3210 +,1,1755,6417,24,1,0
3211 +,0,28,6419,24,1,0
3212 +,1,1755,6421,24,1,0
3213 +,0,28,6423,24,1,0
3214 +,1,1755,6425,24,1,0
3215 +,0,28,6427,24,1,0
3216 +,1,1755,6429,32,1,0
3217 +,0,28,6431,24,1,0
3218 +,1,1755,6433,32,1,0
3219 +,0,28,6435,24,1,0
3220 +,1,1755,6437,24,1,0
3221 +,0,28,6439,24,1,0
3222 +,1,1755,6441,24,1,0
3223 +,0,28,6443,24,1,0
3224 +,1,1755,6445,24,1,0
3225 +,0,28,6447,24,1,0
3226 +,1,1,6449,96,1,0
3227 +,0,28,6451,24,1,0
3228 +,1,1,6453,48,1,0
3229 +,0,28,6455,24,1,0
3230 +,1,1755,6457,32,1,0
3231 +,0,28,6459,24,1,0
3232 +,1,1755,6461,16,1,0
3233 +,0,28,6463,24,1,0
3234 +,1,1755,6465,16,1,0
3235 +,0,28,6467,24,1,0
3236 +,1,1755,6469,32,1,0
3237 +,0,28,6471,24,1,0
3238 +,1,1755,6473,32,1,0
3239 +,0,28,6475,24,1,0
3240 +,1,1755,6477,16,1,0
3241 +,0,28,6479,24,1,0
3242 +,1,1755,6481,16,1,0
3243 +,0,28,6483,24,1,0
3244 +,1,1755,6485,32,1,0
3245 +,0,28,6487,24,1,0
3246 +,1,1755,6489,24,1,0
3247 +,0,28,6491,24,1,0
3248 +,1,1755,6493,40,1,0
3249 +,0,28,6495,24,1,0
3250 +,1,1755,6497,24,1,0
3251 +,0,28,6499,24,1,0
3252 +,1,1755,6501,64,1,0
3253 +,0,28,6503,24,1,0
3254 +,1,1755,6505,24,1,0
3255 +,0,28,6507,24,1,0
3256 +,1,1755,6509,48,1,0
3257 +,0,28,6511,24,1,0
3258 +,1,1755,6513,104,1,0
3259 +,0,28,6515,24,1,0
3260 +,1,1755,6517,24,1,0
3261 +,0,28,6519,24,1,0
3262 +,1,1755,6521,24,1,0
3263 +,0,28,6523,24,1,0
3264 +,1,1755,6525,56,1,0
3265 +,0,28,6527,24,1,0
3266 +,1,1755,6529,56,1,0
3267 +,0,28,6531,24,1,0
3268 +,1,1755,6533,56,1,0
3269 +,0,28,6535,24,1,0
3270 +,1,1755,6537,24,1,0
3271 +,0,28,6539,24,1,0
3272 +,1,1755,6541,40,1,0
3273 +,0,28,6543,24,1,0
3274 +,1,1,6545,56,1,0
3275 +,0,28,6547,24,1,0
3276 +,2,1757,6549,48,1,0
3277 +,1,1755,6551,56,1,0
3278 +,0,28,6553,24,1,0
3279 +,1,1755,6555,24,1,0
3280 +,0,28,6557,24,1,0
3281 +,1,1755,6559,40,1,0
3282 +,0,28,6561,24,1,0
3283 +,1,1,6563,56,1,0
3284 +,0,28,6565,24,1,0
3285 +,2,1758,6567,48,1,0
3286 +,1,1755,6569,80,1,0
3287 +,0,28,6571,24,1,0
3288 +,1,1755,6573,112,1,0
3289 +,0,28,6575,24,1,0
3290 +,2,1759,6577,48,1,0
3291 +,1,1755,6579,24,1,0
3292 +,0,28,6581,24,1,0
3293 +,1,1755,6583,40,1,0
3294 +,0,28,6585,24,1,0
3295 +,1,1755,6587,56,1,0
3296 +,0,28,6589,24,1,0
3297 +,1,1755,6591,24,1,0
3298 +,0,28,6593,24,1,0
3299 +,1,1755,6595,32,1,0
3300 +,0,28,6597,24,1,0
3301 +,1,1755,6599,104,1,0
3302 +,0,28,6601,24,1,0
3303 +,2,1760,6603,48,1,0
3304 +,1,1755,6605,56,1,0
3305 +,0,28,6607,24,1,0
3306 +,1,1755,6609,24,1,0
3307 +,0,28,6611,24,1,0
3308 +,1,1755,6613,24,1,0
3309 +,0,28,6615,24,1,0
3310 +,1,1755,6617,24,1,0
3311 +,0,28,6619,24,1,0
3312 +,1,1755,6621,56,1,0
3313 +,0,28,6623,24,1,0
3314 +,2,1761,6625,48,1,0
3315 +,1,1755,6627,56,1,0
3316 +,0,28,6629,24,1,0
3317 +,1,1755,6631,24,1,0
3318 +,0,28,6633,24,1,0
3319 +,1,1755,6635,24,1,0
3320 +,0,28,6637,24,1,0
3321 +,1,1755,6639,24,1,0
3322 +,0,28,6641,24,1,0
3323 +,1,1,6643,56,1,0
3324 +,0,28,6645,24,1,0
3325 +,2,1762,6647,56,1,0
3326 +,1,1,6649,32,1,0
3327 +,0,28,6651,24,1,0
3328 +,1,1755,6653,32,1,0
3329 +,0,28,6655,24,1,0
3330 +,1,1755,6657,24,1,0
3331 +,0,28,6659,24,1,0
3332 +,1,1755,6661,24,1,0
3333 +,0,28,6663,24,1,0
3334 +,1,1755,6665,32,1,0
3335 +,0,28,6667,24,1,0
3336 +,1,1,6669,56,1,0
3337 +,0,28,6671,24,1,0
3338 +,2,1763,6673,48,1,0
3339 +,1,1755,6675,32,1,0
3340 +,0,28,6677,24,1,0
3341 +,1,1755,6679,24,1,0
3342 +,0,28,6681,24,1,0
3343 +,1,1755,6683,24,1,0
3344 +,0,28,6685,24,1,0
3345 +,1,1755,6687,32,1,0
3346 +,0,28,6689,24,1,0
3347 +,1,1,6691,56,1,0
3348 +,0,28,6693,24,1,0
3349 +,2,1764,6695,56,1,0
3350 +,1,1,6697,32,1,0
3351 +,0,28,6699,24,1,0
3352 +,1,1755,6701,32,1,0
3353 +,0,28,6703,24,1,0
3354 +,1,1755,6705,96,1,0
3355 +,0,28,6707,24,1,0
3356 +,2,1765,6709,56,1,0
3357 +,7,54,6711,16,1,0
3358 +,7,54,6713,16,1,0
3359 +,1,1755,6715,80,1,0
3360 +,0,28,6717,24,1,0
3361 +,7,54,6719,16,1,0
3362 +,1,1755,6721,80,1,0
3363 +,0,28,6723,24,1,0
3364 +,7,54,6725,16,1,0
3365 +,1,1,6727,32,1,0
3366 +,0,28,6729,24,1,0
3367 +,1,1,6731,40,1,0
3368 +,0,28,6733,24,1,0
3369 +,1,1755,6735,24,1,0
3370 +,0,28,6737,24,1,0
3371 +,1,1755,6739,24,1,0
3372 +,0,28,6741,24,1,0
3373 +,1,1755,6743,24,1,0
3374 +,0,28,6745,24,1,0
3375 +,1,1755,6747,24,1,0
3376 +,0,28,6749,24,1,0
3377 +,1,1755,6751,24,1,0
3378 +,0,28,6753,24,1,0
3379 +,1,1,6755,56,1,0
3380 +,0,28,6757,24,1,0
3381 +,1,1,6759,56,1,0
3382 +,0,28,6761,24,1,0
3383 +,1,1,6763,56,1,0
3384 +,0,28,6765,24,1,0
3385 +,1,1,6767,56,1,0
3386 +,0,28,6769,24,1,0
3387 +,1,1,6771,24,1,0
3388 +,0,28,6773,24,1,0
3389 +,1,1,6775,24,1,0
3390 +,0,28,6777,24,1,0
3391 +,1,1,6779,40,1,0
3392 +,0,28,6781,24,1,0
3393 +,1,1,6783,32,1,0
3394 +,0,28,6785,24,1,0
3395 +,1,1755,6787,24,1,0
3396 +,0,28,6789,24,1,0
3397 +,1,1755,6791,24,1,0
3398 +,0,28,6793,24,1,0
3399 +,1,1755,6795,24,1,0
3400 +,0,28,6797,24,1,0
3401 +,1,1755,6799,24,1,0
3402 +,0,28,6801,24,1,0
3403 +,1,1755,6803,24,1,0
3404 +,0,28,6805,24,1,0
3405 +,1,1755,6807,24,1,0
3406 +,0,28,6809,24,1,0
3407 +,1,1755,6811,24,1,0
3408 +,0,28,6813,24,1,0
3409 +,1,1,6815,32,1,0
3410 +,0,28,6817,24,1,0
3411 +,2,1766,6819,56,1,0
3412 +,1,1,6821,24,1,0
3413 +,0,28,6823,24,1,0
3414 +,2,1767,6825,56,1,0
3415 +,1,1755,6827,24,1,0
3416 +,0,28,6829,24,1,0
3417 +,1,1755,6831,24,1,0
3418 +,0,28,6833,24,1,0
3419 +,1,1755,6835,24,1,0
3420 +,0,28,6837,24,1,0
3421 +,1,1755,6839,24,1,0
3422 +,0,28,6841,24,1,0
3423 +,1,1755,6843,24,1,0
3424 +,0,28,6845,24,1,0
3425 +,1,1755,6847,24,1,0
3426 +,0,28,6849,24,1,0
3427 +,1,1755,6851,24,1,0
3428 +,0,28,6853,24,1,0
3429 +,1,1755,6855,24,1,0
3430 +,0,28,6857,24,1,0
3431 +,1,1755,6859,24,1,0
3432 +,0,28,6861,24,1,0
3433 +,1,1755,6863,24,1,0
3434 +,0,28,6865,24,1,0
3435 +,1,1755,6867,24,1,0
3436 +,0,28,6869,24,1,0
3437 +,1,1755,6871,24,1,0
3438 +,0,28,6873,24,1,0
3439 +,1,1755,6875,24,1,0
3440 +,0,28,6877,24,1,0
3441 +,1,1755,6879,24,1,0
3442 +,0,28,6881,24,1,0
3443 +,1,1755,6883,24,1,0
3444 +,0,28,6885,24,1,0
3445 +,1,1755,6887,24,1,0
3446 +,0,28,6889,24,1,0
3447 +,1,1755,6891,24,1,0
3448 +,0,28,6893,24,1,0
3449 +,1,1755,6895,24,1,0
3450 +,0,28,6897,24,1,0
3451 +,1,1755,6899,24,1,0
3452 +,0,28,6901,24,1,0
3453 +,1,1755,6903,24,1,0
3454 +,0,28,6905,24,1,0
3455 +,1,1755,6907,24,1,0
3456 +,0,28,6909,24,1,0
3457 +,1,1755,6911,24,1,0
3458 +,0,28,6913,24,1,0
3459 +,1,1755,6915,24,1,0
3460 +,0,28,6917,24,1,0
3461 +,1,1755,6919,24,1,0
3462 +,0,28,6921,24,1,0
3463 +,1,1755,6923,24,1,0
3464 +,0,28,6925,24,1,0
3465 +,1,1755,6927,24,1,0
3466 +,0,28,6929,24,1,0
3467 +,1,1755,6931,24,1,0
3468 +,0,28,6933,24,1,0
3469 +,1,1755,6935,24,1,0
3470 +,0,28,6937,24,1,0
3471 +,1,1755,6939,24,1,0
3472 +,0,28,6941,24,1,0
3473 +,1,1755,6943,24,1,0
3474 +,0,28,6945,24,1,0
3475 +,1,1755,6947,24,1,0
3476 +,0,28,6949,24,1,0
3477 +,1,1755,6951,24,1,0
3478 +,0,28,6953,24,1,0
3479 +,1,1,6955,32,1,0
3480 +,0,28,6957,24,1,0
3481 +,1,1755,6959,24,1,0
3482 +,0,28,6961,24,1,0
3483 +,1,1755,6963,24,1,0
3484 +,0,28,6965,24,1,0
3485 +,1,1755,6967,24,1,0
3486 +,0,28,6969,24,1,0
3487 +,1,1755,6971,24,1,0
3488 +,0,28,6973,24,1,0
3489 +,1,1755,6975,24,1,0
3490 +,0,28,6977,24,1,0
3491 +,1,1755,6979,24,1,0
3492 +,0,28,6981,24,1,0
3493 +,1,1755,6983,24,1,0
3494 +,0,28,6985,24,1,0
3495 +,1,1755,6987,24,1,0
3496 +,0,28,6989,24,1,0
3497 +,1,1,6991,32,1,0
3498 +,0,28,6993,24,1,0
3499 +,1,1,6995,32,1,0
3500 +,0,28,6997,24,1,0
3501 +,1,1,6999,32,1,0
3502 +,0,28,7001,24,1,0
3503 +,1,1,7003,32,1,0
3504 +,0,28,7005,24,1,0
3505 +,1,1755,7007,32,1,0
3506 +,0,28,7009,24,1,0
3507 +,1,1,7011,32,1,0
3508 +,0,28,7013,24,1,0
3509 +,1,1,7015,32,1,0
3510 +,0,28,7017,24,1,0
3511 +,1,1,7019,32,1,0
3512 +,0,28,7021,24,1,0
3513 +,1,1755,7023,24,1,0
3514 +,0,28,7025,24,1,0
3515 +,1,1,7027,32,1,0
3516 +,0,28,7029,24,1,0
3517 +,1,1,7031,32,1,0
3518 +,0,28,7033,24,1,0
3519 +,1,1,7035,32,1,0
3520 +,0,28,7037,24,1,0
3521 +,1,1,7039,32,1,0
3522 +,0,28,7041,24,1,0
3523 +,1,1,7043,32,1,0
3524 +,0,28,7045,24,1,0
3525 +,1,1,7047,32,1,0
3526 +,0,28,7049,24,1,0
3527 +,1,1,7051,32,1,0
3528 +,0,28,7053,24,1,0
3529 +,1,1,7055,32,1,0
3530 +,0,28,7057,24,1,0
3531 +,1,1,7059,32,1,0
3532 +,0,28,7061,24,1,0
3533 +,1,1755,7063,24,1,0
3534 +,0,28,7065,24,1,0
3535 +,1,1755,7067,32,1,0
3536 +,0,28,7069,24,1,0
3537 +,2,1768,7071,56,1,0
3538 +,1,1755,7073,24,1,0
3539 +,0,28,7075,24,1,0
3540 +,1,1755,7077,24,1,0
3541 +,0,28,7079,24,1,0
3542 +,1,1755,7081,24,1,0
3543 +,0,28,7083,24,1,0
3544 +,1,1755,7085,24,1,0
3545 +,0,28,7087,24,1,0
3546 +,1,1755,7089,24,1,0
3547 +,0,28,7091,24,1,0
3548 +,1,1755,7093,24,1,0
3549 +,0,28,7095,24,1,0
3550 +,1,1755,7097,24,1,0
3551 +,0,28,7099,24,1,0
3552 +,1,1755,7101,24,1,0
3553 +,0,28,7103,24,1,0
3554 +,1,1755,7105,24,1,0
3555 +,0,28,7107,24,1,0
3556 +,1,1755,7109,24,1,0
3557 +,0,28,7111,24,1,0
3558 +,1,1755,7113,24,1,0
3559 +,0,28,7115,24,1,0
3560 +,1,1755,7117,24,1,0
3561 +,0,28,7119,24,1,0
3562 +,1,1755,7121,24,1,0
3563 +,0,28,7123,24,1,0
3564 +,1,1755,7125,24,1,0
3565 +,0,28,7127,24,1,0
3566 +,1,1755,7129,24,1,0
3567 +,0,28,7131,24,1,0
3568 +,1,1755,7133,24,1,0
3569 +,0,28,7135,24,1,0
3570 +,1,1755,7137,24,1,0
3571 +,0,28,7139,24,1,0
3572 +,1,1755,7141,24,1,0
3573 +,0,28,7143,24,1,0
3574 +,1,1755,7145,24,1,0
3575 +,0,28,7147,24,1,0
3576 +,1,1755,7149,24,1,0
3577 +,0,28,7151,24,1,0
3578 +,1,1755,7153,24,1,0
3579 +,0,28,7155,24,1,0
3580 +,1,1755,7157,24,1,0
3581 +,0,28,7159,24,1,0
3582 +,1,1755,7161,24,1,0
3583 +,0,28,7163,24,1,0
3584 +,1,1755,7165,24,1,0
3585 +,0,28,7167,24,1,0
3586 +,1,1755,7169,24,1,0
3587 +,0,28,7171,24,1,0
3588 +,1,1755,7173,24,1,0
3589 +,0,28,7175,24,1,0
3590 +,1,1755,7177,24,1,0
3591 +,0,28,7179,24,1,0
3592 +,1,1755,7181,24,1,0
3593 +,0,28,7183,24,1,0
3594 +,1,1755,7185,24,1,0
3595 +,0,28,7187,24,1,0
3596 +,1,1755,7189,24,1,0
3597 +,0,28,7191,24,1,0
3598 +,1,1755,7193,24,1,0
3599 +,0,28,7195,24,1,0
3600 +,1,1755,7197,24,1,0
3601 +,0,28,7199,24,1,0
3602 +,1,1755,7201,24,1,0
3603 +,0,28,7203,24,1,0
3604 +,1,1755,7205,24,1,0
3605 +,0,28,7207,24,1,0
3606 +,1,1755,7209,24,1,0
3607 +,0,28,7211,24,1,0
3608 +,1,1755,7213,24,1,0
3609 +,0,28,7215,24,1,0
3610 +,1,1755,7217,24,1,0
3611 +,0,28,7219,24,1,0
3612 +,1,1755,7221,40,1,0
3613 +,0,28,7223,24,1,0
3614 +,1,1755,7225,24,1,0
3615 +,0,28,7227,24,1,0
3616 +,1,1755,7229,32,1,0
3617 +,0,28,7231,24,1,0
3618 +,1,1755,7233,24,1,0
3619 +,0,28,7235,24,1,0
3620 +,1,1755,7237,24,1,0
3621 +,0,28,7239,24,1,0
3622 +,1,1755,7241,40,1,0
3623 +,0,28,7243,24,1,0
3624 +,1,1755,7245,24,1,0
3625 +,0,28,7247,24,1,0
3626 +,1,1,7249,40,1,0
3627 +,0,28,7251,24,1,0
3628 +,2,1769,7253,56,1,0
3629 +,1,1,7255,40,1,0
3630 +,0,28,7257,24,1,0
3631 +,2,1770,7259,56,1,0
3632 +,1,1,7261,40,1,0
3633 +,0,28,7263,24,1,0
3634 +,2,1771,7265,56,1,0
3635 +,1,1755,7267,24,1,0
3636 +,0,28,7269,24,1,0
3637 +,1,1755,7271,24,1,0
3638 +,0,28,7273,24,1,0
3639 +,1,1755,7275,24,1,0
3640 +,0,28,7277,24,1,0
3641 +,1,1755,7279,24,1,0
3642 +,0,28,7281,24,1,0
3643 +,1,1755,7283,24,1,0
3644 +,0,28,7285,24,1,0
3645 +,1,1755,7287,24,1,0
3646 +,0,28,7289,24,1,0
3647 +,1,1755,7291,24,1,0
3648 +,0,28,7293,24,1,0
3649 +,1,1755,7295,24,1,0
3650 +,0,28,7297,24,1,0
3651 +,1,1755,7299,24,1,0
3652 +,0,28,7301,24,1,0
3653 +,1,1755,7303,24,1,0
3654 +,0,28,7305,24,1,0
3655 +,1,1755,7307,24,1,0
3656 +,0,28,7309,24,1,0
3657 +,1,1755,7311,24,1,0
3658 +,0,28,7313,24,1,0
3659 +,1,1755,7315,72,1,0
3660 +,0,28,7317,24,1,0
3661 +,1,1755,7319,72,1,0
3662 +,0,28,7321,24,1,0
3663 +,1,1755,7323,24,1,0
3664 +,0,28,7325,24,1,0
3665 +,1,1755,7327,104,1,0
3666 +,0,28,7329,24,1,0
3667 +,1,1755,7331,24,1,0
3668 +,0,28,7333,24,1,0
3669 +,1,1755,7335,128,1,0
3670 +,0,28,7337,24,1,0
3671 +,1,1755,7339,24,1,0
3672 +,0,28,7341,24,1,0
3673 +,1,1755,7343,136,1,0
3674 +,0,28,7345,24,1,0
3675 +,1,1755,7347,24,1,0
3676 +,0,28,7349,24,1,0
3677 +,1,1755,7351,128,1,0
3678 +,0,28,7353,24,1,0
3679 +,1,1755,7355,24,1,0
3680 +,0,28,7357,24,1,0
3681 +,1,1755,7359,32,1,0
3682 +,0,28,7361,24,1,0
3683 +,1,1755,7363,56,1,0
3684 +,0,28,7365,24,1,0
3685 +,1,1755,7367,56,1,0
3686 +,0,28,7369,24,1,0
3687 +,1,1755,7371,24,1,0
3688 +,0,28,7373,24,1,0
3689 +,1,1755,7375,24,1,0
3690 +,0,28,7377,24,1,0
3691 +,1,1755,7379,72,1,0
3692 +,0,28,7381,24,1,0
3693 +,1,1755,7383,32,1,0
3694 +,0,28,7385,24,1,0
3695 +,1,1755,7387,120,1,0
3696 +,0,28,7389,24,1,0
3697 +,1,1755,7391,64,1,0
3698 +,0,28,7393,24,1,0
3699 +,2,1772,7395,48,1,0
3700 +,1,1,7397,48,1,0
3701 +,0,28,7399,24,1,0
3702 +,2,1773,7401,48,1,0
3703 +,1,1755,7403,24,1,0
3704 +,0,28,7405,24,1,0
3705 +,2,1774,7407,48,1,0
3706 +,1,1755,7409,24,1,0
3707 +,0,28,7411,24,1,0
3708 +,2,1775,7413,48,1,0
3709 +,1,1755,7415,24,1,0
3710 +,0,28,7417,24,1,0
3711 +,1,1755,7419,32,1,0
3712 +,0,28,7421,24,1,0
3713 +,2,1776,7423,48,1,0
3714 +,1,1,7425,24,1,0
3715 +,0,28,7427,24,1,0
3716 +,2,1777,7429,48,1,0
3717 +,1,1,7431,32,1,0
3718 +,0,28,7433,24,1,0
3719 +,2,1778,7435,48,1,0
3720 +,1,1,7437,32,1,0
3721 +,0,28,7439,24,1,0
3722 +,2,1779,7441,48,1,0
3723 +,1,1,7443,32,1,0
3724 +,0,28,7445,24,1,0
3725 +,2,1780,7447,48,1,0
3726 +,1,1755,7449,48,1,0
3727 +,0,28,7451,24,1,0
3728 +,2,1781,7453,56,1,0
3729 +,1,1755,7455,32,1,0
3730 +,0,28,7457,24,1,0
3731 +,7,54,7459,16,1,0
3732 +,1,1,7461,32,1,0
3733 +,0,28,7463,24,1,0
3734 +,1,1,7465,32,1,0
3735 +,0,28,7467,24,1,0
3736 +,1,1,7469,32,1,0
3737 +,0,28,7471,24,1,0
3738 +,1,1,7473,32,1,0
3739 +,0,28,7475,24,1,0
3740 +,1,1,7477,32,1,0
3741 +,0,28,7479,24,1,0
3742 +,1,1,7481,32,1,0
3743 +,0,28,7483,24,1,0
3744 +,1,1,7485,32,1,0
3745 +,0,28,7487,24,1,0
3746 +,1,1,7489,32,1,0
3747 +,0,28,7491,24,1,0
3748 +,1,1,7493,32,1,0
3749 +,0,28,7495,24,1,0
3750 +,1,1,7497,24,1,0
3751 +,0,28,7499,24,1,0
3752 +,1,1,7501,32,1,0
3753 +,0,28,7503,24,1,0
3754 +,1,1,7505,32,1,0
3755 +,0,28,7507,24,1,0
3756 +,1,1,7509,32,1,0
3757 +,0,28,7511,24,1,0
3758 +,1,1,7513,32,1,0
3759 +,0,28,7515,24,1,0
3760 +,1,1755,7517,32,1,0
3761 +,0,28,7519,24,1,0
3762 +,1,1,7521,32,1,0
3763 +,0,28,7523,24,1,0
3764 +,1,1755,7525,24,1,0
3765 +,0,28,7527,24,1,0
3766 +,1,1,7529,32,1,0
3767 +,0,28,7531,24,1,0
3768 +,1,1755,7533,32,1,0
3769 +,0,28,7535,24,1,0
3770 +,1,1,7537,32,1,0
3771 +,0,28,7539,24,1,0
3772 +,1,1,7541,32,1,0
3773 +,0,28,7543,24,1,0
3774 +,1,1,7545,32,1,0
3775 +,0,28,7547,24,1,0
3776 +,1,1755,7549,32,1,0
3777 +,0,28,7551,24,1,0
3778 +,1,1755,7553,32,1,0
3779 +,0,28,7555,24,1,0
3780 +,1,1755,7557,32,1,0
3781 +,0,28,7559,24,1,0
3782 +,1,1755,7561,32,1,0
3783 +,0,28,7563,24,1,0
3784 +,1,1,7565,32,1,0
3785 +,0,28,7567,24,1,0
3786 +,1,1,7569,32,1,0
3787 +,0,28,7571,24,1,0
3788 +,1,1,7573,32,1,0
3789 +,0,28,7575,24,1,0
3790 +,1,1,7577,32,1,0
3791 +,0,28,7579,24,1,0
3792 +,1,1,7581,32,1,0
3793 +,0,28,7583,24,1,0
3794 +,1,1,7585,32,1,0
3795 +,0,28,7587,24,1,0
3796 +,1,1,7589,32,1,0
3797 +,0,28,7591,24,1,0
3798 +,1,1755,7593,32,1,0
3799 +,0,28,7595,24,1,0
3800 +,1,1755,7597,24,1,0
3801 +,0,28,7599,24,1,0
3802 +,1,1755,7601,48,1,0
3803 +,0,28,7603,24,1,0
3804 +,1,1,7605,24,1,0
3805 +,0,28,7607,24,1,0
3806 +,1,1755,7609,24,1,0
3807 +,0,28,7611,24,1,0
3808 +,1,1755,7613,24,1,0
3809 +,0,28,7615,24,1,0
3810 +,1,1755,7617,24,1,0
3811 +,0,28,7619,24,1,0
3812 +,1,1755,7621,32,1,0
3813 +,0,28,7623,24,1,0
3814 +,1,1755,7625,24,1,0
3815 +,0,28,7627,24,1,0
3816 +,1,1755,7629,24,1,0
3817 +,0,28,7631,24,1,0
3818 +,1,1755,7633,24,1,0
3819 +,0,28,7635,24,1,0
3820 +,1,1755,7637,24,1,0
3821 +,0,28,7639,24,1,0
3822 +,1,1755,7641,24,1,0
3823 +,0,28,7643,24,1,0
3824 +,1,1755,7645,24,1,0
3825 +,0,28,7647,24,1,0
3826 +,1,1755,7649,24,1,0
3827 +,0,28,7651,24,1,0
3828 +,1,1,7653,24,1,0
3829 +,0,28,7655,24,1,0
3830 +,2,1782,7657,48,1,0
3831 +,1,1755,7659,48,1,0
3832 +,0,28,7661,24,1,0
3833 +,1,1755,7663,40,1,0
3834 +,0,28,7665,24,1,0
3835 +,1,1755,7667,40,1,0
3836 +,0,28,7669,24,1,0
3837 +,1,1755,7671,40,1,0
3838 +,0,28,7673,24,1,0
3839 +,1,1755,7675,40,1,0
3840 +,0,28,7677,24,1,0
3841 +,1,1755,7679,40,1,0
3842 +,0,28,7681,24,1,0
3843 +,1,1755,7683,32,1,0
3844 +,0,28,7685,24,1,0
3845 +,1,1755,7687,32,1,0
3846 +,0,28,7689,24,1,0
3847 +,1,1755,7691,32,1,0
3848 +,0,28,7693,24,1,0
3849 +,1,1755,7695,32,1,0
3850 +,0,28,7697,24,1,0
3851 +,1,1755,7699,32,1,0
3852 +,0,28,7701,24,1,0
3853 +,1,1755,7703,40,1,0
3854 +,0,28,7705,24,1,0
3855 +,1,1755,7707,48,1,0
3856 +,0,28,7709,24,1,0
3857 +,1,1755,7711,48,1,0
3858 +,0,28,7713,24,1,0
3859 +,1,1755,7715,48,1,0
3860 +,0,28,7717,24,1,0
3861 +,1,1755,7719,48,1,0
3862 +,0,28,7721,24,1,0
3863 +,1,1755,7723,40,1,0
3864 +,0,28,7725,24,1,0
3865 +,1,1755,7727,24,1,0
3866 +,0,28,7729,24,1,0
3867 +,1,1755,7731,24,1,0
3868 +,0,28,7733,24,1,0
3869 +,1,1755,7735,24,1,0
3870 +,0,28,7737,24,1,0
3871 +,1,1755,7739,24,1,0
3872 +,0,28,7741,24,1,0
3873 +,1,1755,7743,24,1,0
3874 +,0,28,7745,24,1,0
3875 +,1,1755,7747,32,1,0
3876 +,0,28,7749,24,1,0
3877 +,1,1755,7751,32,1,0
3878 +,0,28,7753,24,1,0
3879 +,1,1755,7755,112,1,0
3880 +,0,28,7757,24,1,0
3881 +,1,1755,7759,40,1,0
3882 +,0,28,7761,24,1,0
3883 +,1,1755,7763,32,1,0
3884 +,0,28,7765,24,1,0
3885 +,1,1755,7767,24,1,0
3886 +,0,28,7769,24,1,0
3887 +,1,1755,7771,24,1,0
3888 +,0,28,7773,24,1,0
3889 +,1,1755,7775,24,1,0
3890 +,0,28,7777,24,1,0
3891 +,1,1755,7779,24,1,0
3892 +,0,28,7781,24,1,0
3893 +,1,1,7783,56,1,0
3894 +,0,28,7785,24,1,0
3895 +,1,1755,7787,24,1,0
3896 +,0,28,7789,24,1,0
3897 +,1,1755,7791,104,1,0
3898 +,0,28,7793,24,1,0
3899 +,1,1755,7795,24,1,0
3900 +,0,28,7797,24,1,0
3901 +,1,1755,7799,40,1,0
3902 +,0,28,7801,24,1,0
3903 +,1,1755,7803,24,1,0
3904 +,0,28,7805,24,1,0
3905 +,1,1755,7807,24,1,0
3906 +,0,28,7809,24,1,0
3907 +,1,1755,7811,24,1,0
3908 +,0,28,7813,24,1,0
3909 +,1,1,7815,32,1,0
3910 +,0,28,7817,24,1,0
3911 +,1,1755,7819,24,1,0
3912 +,0,28,7821,24,1,0
3913 +,1,1755,7823,24,1,0
3914 +,0,28,7825,24,1,0
3915 +,1,1755,7827,24,1,0
3916 +,0,28,7829,24,1,0
3917 +,1,1755,7831,40,1,0
3918 +,0,28,7833,24,1,0
3919 +,1,1755,7835,24,1,0
3920 +,0,28,7837,24,1,0
3921 +,1,1755,7839,24,1,0
3922 +,0,28,7841,24,1,0
3923 +,1,1755,7843,24,1,0
3924 +,0,28,7845,24,1,0
3925 +,1,1755,7847,48,1,0
3926 +,0,28,7849,24,1,0
3927 +,2,1783,7851,32,1,0
3928 +,2,1784,7853,32,1,0
3929 +,1,1755,7855,24,1,0
3930 +,0,28,7857,24,1,0
3931 +,1,1755,7859,40,1,0
3932 +,0,28,7861,24,1,0
3933 +,1,1,7863,32,1,0
3934 +,0,28,7865,24,1,0
3935 +,1,1755,7867,24,1,0
3936 +,0,28,7869,24,1,0
3937 +,1,1755,7871,24,1,0
3938 +,0,28,7873,24,1,0
3939 +,1,1755,7875,24,1,0
3940 +,0,28,7877,24,1,0
3941 +,1,1,7879,32,1,0
3942 +,0,28,7881,24,1,0
3943 +,2,1785,7883,56,1,0
3944 +,1,1755,7885,24,1,0
3945 +,0,28,7887,24,1,0
3946 +,1,1,7889,56,1,0
3947 +,0,28,7891,24,1,0
3948 +,1,1755,7893,24,1,0
3949 +,0,28,7895,24,1,0
3950 +,1,1755,7897,32,1,0
3951 +,0,28,7899,24,1,0
3952 +,1,1755,7901,24,1,0
3953 +,0,28,7903,24,1,0
3954 +,1,1755,7905,40,1,0
3955 +,0,28,7907,24,1,0
3956 +,1,1755,7909,40,1,0
3957 +,0,28,7911,24,1,0
3958 +,1,1755,7913,48,1,0
3959 +,0,28,7915,24,1,0
3960 +,1,1755,7917,48,1,0
3961 +,0,28,7919,24,1,0
3962 +,1,1,7921,24,1,0
3963 +,0,28,7923,24,1,0
3964 +,1,1755,7925,24,1,0
3965 +,0,28,7927,24,1,0
3966 +,1,1,7929,32,1,0
3967 +,0,28,7931,24,1,0
3968 +,1,1755,7933,88,1,0
3969 +,0,28,7935,24,1,0
3970 +,1,1755,7937,24,1,0
3971 +,0,28,7939,24,1,0
3972 +,1,1755,7941,96,1,0
3973 +,0,28,7943,24,1,0
3974 +,1,1755,7945,24,1,0
3975 +,0,28,7947,24,1,0
3976 +,1,1755,7949,64,1,0
3977 +,0,28,7951,24,1,0
3978 +,2,1786,7953,48,1,0
3979 +,1,1755,7955,40,1,0
3980 +,0,28,7957,24,1,0
3981 +,1,1755,7959,24,1,0
3982 +,0,28,7961,24,1,0
3983 +,1,1755,7963,24,1,0
3984 +,0,28,7965,24,1,0
3985 +,1,1755,7967,24,1,0
3986 +,0,28,7969,24,1,0
3987 +,1,1755,7971,56,1,0
3988 +,0,28,7973,24,1,0
3989 +,1,1755,7975,24,1,0
3990 +,0,28,7977,24,1,0
3991 +,2,1787,7979,40,1,0
3992 +,1,1755,7981,40,1,0
3993 +,0,28,7983,24,1,0
3994 +,1,1,7985,48,1,0
3995 +,0,28,7987,24,1,0
3996 +,2,1788,7989,40,1,0
3997 +,1,1,7991,64,1,0
3998 +,0,28,7993,24,1,0
3999 +,2,1789,7995,56,1,0
4000 +,1,1,7997,48,1,0
4001 +,0,28,7999,24,1,0
4002 +,1,1,8001,48,1,0
4003 +,0,28,8003,24,1,0
4004 +,1,1,8005,24,1,0
4005 +,0,28,8007,24,1,0
4006 +,1,1,8009,24,1,0
4007 +,0,28,8011,24,1,0
4008 +,1,1755,8013,104,1,0
4009 +,0,28,8015,24,1,0
4010 +,2,1790,8017,40,1,0
4011 +,1,1755,8019,56,1,0
4012 +,0,28,8021,24,1,0
4013 +,1,1,8023,64,1,0
4014 +,0,28,8025,24,1,0
4015 +,2,1791,8027,40,1,0
4016 +,1,1,8029,32,1,0
4017 +,0,28,8031,24,1,0
4018 +,1,1,8033,24,1,0
4019 +,0,28,8035,24,1,0
4020 +,1,1,8037,24,1,0
4021 +,0,28,8039,24,1,0
4022 +,1,1755,8041,40,1,0
4023 +,0,28,8043,24,1,0
4024 +,1,1,8045,56,1,0
4025 +,0,28,8047,24,1,0
4026 +,1,1,8049,32,1,0
4027 +,0,28,8051,24,1,0
4028 +,1,1755,8053,56,1,0
4029 +,0,28,8055,24,1,0
4030 +,1,1755,8057,56,1,0
4031 +,0,28,8059,24,1,0
4032 +,1,1755,8061,64,1,0
4033 +,0,28,8063,24,1,0
4034 +,1,1755,8065,24,1,0
4035 +,0,28,8067,24,1,0
4036 +,1,1755,8069,24,1,0
4037 +,0,28,8071,24,1,0
4038 +,1,1755,8073,24,1,0
4039 +,0,28,8075,24,1,0
4040 +,1,1755,8077,24,1,0
4041 +,0,28,8079,24,1,0
4042 +,1,1755,8081,24,1,0
4043 +,0,28,8083,24,1,0
4044 +,1,1755,8085,24,1,0
4045 +,0,28,8087,24,1,0
4046 +,1,1755,8089,24,1,0
4047 +,0,28,8091,24,1,0
4048 +,1,1,8093,24,1,0
4049 +,0,28,8095,24,1,0
4050 +,2,1792,8097,40,1,0
4051 +,1,1755,8099,24,1,0
4052 +,0,28,8101,24,1,0
4053 +,1,1755,8103,24,1,0
4054 +,0,28,8105,24,1,0
4055 +,1,1755,8107,24,1,0
4056 +,0,28,8109,24,1,0
4057 +,1,1755,8111,24,1,0
4058 +,0,28,8113,24,1,0
4059 +,1,1755,8115,24,1,0
4060 +,0,28,8117,24,1,0
4061 +,1,1755,8119,24,1,0
4062 +,0,28,8121,24,1,0
4063 +,1,1755,8123,24,1,0
4064 +,0,28,8125,24,1,0
4065 +,1,1755,8127,24,1,0
4066 +,0,28,8129,24,1,0
4067 +,1,1755,8131,24,1,0
4068 +,0,28,8133,24,1,0
4069 +,1,1755,8135,24,1,0
4070 +,0,28,8137,24,1,0
4071 +,1,1755,8139,24,1,0
4072 +,0,28,8141,24,1,0
4073 +,1,1755,8143,24,1,0
4074 +,0,28,8145,24,1,0
4075 +,1,1755,8147,24,1,0
4076 +,0,28,8149,24,1,0
4077 +,1,1755,8151,24,1,0
4078 +,0,28,8153,24,1,0
4079 +,1,1755,8155,72,1,0
4080 +,0,28,8157,24,1,0
4081 +,1,1,8159,48,1,0
4082 +,0,28,8161,24,1,0
4083 +,1,1755,8163,24,1,0
4084 +,0,28,8165,24,1,0
4085 +,1,1755,8167,24,1,0
4086 +,0,28,8169,24,1,0
4087 +,1,1755,8171,24,1,0
4088 +,0,28,8173,24,1,0
4089 +,1,1755,8175,24,1,0
4090 +,0,28,8177,24,1,0
4091 +,1,1755,8179,24,1,0
4092 +,0,28,8181,24,1,0
4093 +,1,1,8183,48,1,0
4094 +,0,28,8185,24,1,0
4095 +,2,1793,8187,48,1,0
4096 +,1,1755,8189,96,1,0
4097 +,0,28,8191,24,1,0
4098 +,2,1794,8193,48,1,0
4099 +,1,1,8195,32,1,0
4100 +,0,28,8197,24,1,0
4101 +,2,1795,8199,48,1,0
4102 +,1,1,8201,80,1,0
4103 +,0,28,8203,24,1,0
4104 +,2,1796,8205,48,1,0
4105 +,1,1,8207,32,1,0
4106 +,0,28,8209,24,1,0
4107 +,2,1797,8211,48,1,0
4108 +,1,1,8213,32,1,0
4109 +,0,28,8215,24,1,0
4110 +,2,1798,8217,56,1,0
4111 +,1,1,8219,120,1,0
4112 +,0,28,8221,24,1,0
4113 +,2,1799,8223,48,1,0
4114 +,1,1,8225,88,1,0
4115 +,0,28,8227,24,1,0
4116 +,2,1800,8229,32,1,0
4117 +,2,1801,8231,56,1,0
4118 +,1,1,8233,32,1,0
4119 +,0,28,8235,24,1,0
4120 +,2,1802,8237,56,1,0
4121 +,1,1,8239,56,1,0
4122 +,0,28,8241,24,1,0
4123 +,2,1803,8243,56,1,0
4124 +,1,1755,8245,32,1,0
4125 +,0,28,8247,24,1,0
4126 +,2,1804,8249,48,1,0
4127 +,2,221,8251,32,1,0
4128 +,1,1,8253,32,1,0
4129 +,0,28,8255,24,1,0
4130 +,2,1805,8257,48,1,0
4131 +,1,1755,8259,80,1,0
4132 +,0,28,8261,24,1,0
4133 +,2,1806,8263,48,1,0
4134 +,1,1755,8265,56,1,0
4135 +,0,28,8267,24,1,0
4136 +,1,1755,8269,24,1,0
4137 +,0,28,8271,24,1,0
4138 +,1,1,8273,32,1,0
4139 +,0,28,8275,24,1,0
4140 +,2,1807,8277,48,1,0
4141 +,1,1755,8279,24,1,0
4142 +,0,28,8281,24,1,0
4143 +,1,1,8283,32,1,0
4144 +,0,28,8285,24,1,0
4145 +,2,1808,8287,56,1,0
4146 +,1,1,8289,32,1,0
4147 +,0,28,8291,24,1,0
4148 +,2,1809,8293,48,1,0
4149 +,1,1755,8295,32,1,0
4150 +,0,28,8297,24,1,0
4151 +,1,1755,8299,48,1,0
4152 +,0,28,8301,24,1,0
4153 +,1,1755,8303,160,1,0
4154 +,0,28,8305,24,1,0
4155 +,1,1755,8307,88,1,0
4156 +,0,28,8309,24,1,0
4157 +,1,1755,8311,128,1,0
4158 +,0,28,8313,24,1,0
4159 +,2,1810,8315,32,1,0
4160 +,1,1755,8317,64,1,0
4161 +,0,28,8319,24,1,0
4162 +,1,1755,8321,136,1,0
4163 +,0,28,8323,24,1,0
4164 +,1,1,8325,136,1,0
4165 +,0,28,8327,24,1,0
4166 +,2,1811,8329,64,1,0
4167 +,1,1755,8331,96,1,0
4168 +,0,28,8333,24,1,0
4169 +,1,1755,8335,40,1,0
4170 +,0,28,8337,24,1,0
4171 +,2,1812,8339,48,1,0
4172 +,1,1755,8341,56,1,0
4173 +,0,28,8343,24,1,0
4174 +,2,1813,8345,48,1,0
4175 +,1,1,8347,48,1,0
4176 +,0,28,8349,24,1,0
4177 +,2,1814,8351,48,1,0
4178 +,1,1755,8353,24,1,0
4179 +,0,28,8355,24,1,0
4180 +,1,1,8357,32,1,0
4181 +,0,28,8359,24,1,0
4182 +,2,1815,8361,48,1,0
4183 +,1,1755,8363,24,1,0
4184 +,0,28,8365,24,1,0
4185 +,2,1816,8367,48,1,0
4186 +,1,1755,8369,32,1,0
4187 +,0,28,8371,24,1,0
4188 +,2,1817,8373,48,1,0
4189 +,1,1,8375,32,1,0
4190 +,0,28,8377,24,1,0
4191 +,2,1818,8379,48,1,0
4192 +,1,1,8381,48,1,0
4193 +,0,28,8383,24,1,0
4194 +,2,1819,8385,56,1,0
4195 +,1,1755,8387,24,1,0
4196 +,0,28,8389,24,1,0
4197 +,1,1755,8391,24,1,0
4198 +,0,28,8393,24,1,0
4199 +,1,1,8395,48,1,0
4200 +,0,28,8397,24,1,0
4201 +,1,1,8399,48,1,0
4202 +,0,28,8401,24,1,0
4203 +,1,1,8403,56,1,0
4204 +,0,28,8405,24,1,0
4205 +,1,1,8407,56,1,0
4206 +,0,28,8409,24,1,0
4207 +,1,1,8411,56,1,0
4208 +,0,28,8413,24,1,0
4209 +,1,1,8415,56,1,0
4210 +,0,28,8417,24,1,0
4211 +,1,1,8419,56,1,0
4212 +,0,28,8421,24,1,0
4213 +,1,1,8423,56,1,0
4214 +,0,28,8425,24,1,0
4215 +,1,1,8427,56,1,0
4216 +,0,28,8429,24,1,0
4217 +,1,1755,8431,24,1,0
4218 +,0,28,8433,24,1,0
4219 +,1,1755,8435,24,1,0
4220 +,0,28,8437,24,1,0
4221 +,1,1755,8439,24,1,0
4222 +,0,28,8441,24,1,0
4223 +,1,1755,8443,32,1,0
4224 +,0,28,8445,24,1,0
4225 +,1,1755,8447,24,1,0
4226 +,0,28,8449,24,1,0
4227 +,1,1755,8451,64,1,0
4228 +,0,28,8453,24,1,0
4229 +,1,1,8455,56,1,0
4230 +,0,28,8457,24,1,0
4231 +,2,1820,8459,32,1,0
4232 +,2,1821,8461,32,1,0
4233 +,2,1822,8463,40,1,0
4234 +,2,1823,8465,32,1,0
4235 +,2,1824,8467,32,1,0
4236 +,2,1825,8469,48,1,0
4237 +,1,1,8471,32,1,0
4238 +,0,28,8473,24,1,0
4239 +,2,1826,8475,32,1,0
4240 +,2,1827,8477,32,1,0
4241 +,2,1828,8479,48,1,0
4242 +,1,1,8481,32,1,0
4243 +,0,28,8483,24,1,0
4244 +,2,1829,8485,32,1,0
4245 +,2,1830,8487,32,1,0
4246 +,2,1831,8489,48,1,0
4247 +,1,1,8491,32,1,0
4248 +,0,28,8493,24,1,0
4249 +,2,1832,8495,32,1,0
4250 +,2,1833,8497,32,1,0
4251 +,2,1834,8499,48,1,0
4252 +,1,1755,8501,48,1,0
4253 +,0,28,8503,24,1,0
4254 +,2,1835,8505,48,1,0
4255 +,1,1755,8507,40,1,0
4256 +,0,28,8509,24,1,0
4257 +,2,1836,8511,56,1,0
4258 +,1,1,8513,40,1,0
4259 +,0,28,8515,24,1,0
4260 +,2,1837,8517,56,1,0
4261 +,1,1,8519,32,1,0
4262 +,0,28,8521,24,1,0
4263 +,2,1838,8523,48,1,0
4264 +,1,1755,8525,24,1,0
4265 +,0,28,8527,24,1,0
4266 +,1,1,8529,56,1,0
4267 +,0,28,8531,24,1,0
4268 +,2,1839,8533,40,1,0
4269 +,2,1840,8535,32,1,0
4270 +,2,1841,8537,56,1,0
4271 +,1,1,8539,56,1,0
4272 +,0,28,8541,24,1,0
4273 +,2,1842,8543,40,1,0
4274 +,2,1843,8545,56,1,0
4275 +,1,1,8547,32,1,0
4276 +,0,28,8549,24,1,0
4277 +,2,1844,8551,32,1,0
4278 +,2,1845,8553,32,1,0
4279 +,2,1846,8555,48,1,0
4280 +,1,1,8557,56,1,0
4281 +,0,28,8559,24,1,0
4282 +,1,1755,8561,56,1,0
4283 +,0,28,8563,24,1,0
4284 +,1,1,8565,32,1,0
4285 +,0,28,8567,24,1,0
4286 +,2,1847,8569,32,1,0
4287 +,2,1848,8571,32,1,0
4288 +,2,1849,8573,48,1,0
4289 +,1,1755,8575,24,1,0
4290 +,0,28,8577,24,1,0
4291 +,1,1,8579,56,1,0
4292 +,0,28,8581,24,1,0
4293 +,2,1850,8583,40,1,0
4294 +,2,1851,8585,48,1,0
4295 +,1,1755,8587,48,1,0
4296 +,0,28,8589,24,1,0
4297 +,2,1852,8591,48,1,0
4298 +,1,1,8593,96,1,0
4299 +,0,28,8595,24,1,0
4300 +,2,1853,8597,56,1,0
4301 +,1,1755,8599,24,1,0
4302 +,0,28,8601,24,1,0
4303 +,1,1,8603,48,1,0
4304 +,0,28,8605,24,1,0
4305 +,2,1854,8607,32,1,0
4306 +,2,1855,8609,48,1,0
4307 +,1,1,8611,48,1,0
4308 +,0,28,8613,24,1,0
4309 +,2,1856,8615,56,1,0
4310 +,1,1,8617,40,1,0
4311 +,0,28,8619,24,1,0
4312 +,2,1857,8621,48,1,0
4313 +,1,1755,8623,56,1,0
4314 +,0,28,8625,24,1,0
4315 +,2,1858,8627,48,1,0
4316 +,1,1,8629,48,1,0
4317 +,0,28,8631,24,1,0
4318 +,2,1859,8633,48,1,0
4319 +,1,1755,8635,80,1,0
4320 +,0,28,8637,24,1,0
4321 +,2,1860,8639,48,1,0
4322 +,1,1,8641,32,1,0
4323 +,0,28,8643,24,1,0
4324 +,2,1861,8645,32,1,0
4325 +,2,1862,8647,32,1,0
4326 +,2,1863,8649,48,1,0
4327 +,1,1755,8651,88,1,0
4328 +,0,28,8653,24,1,0
4329 +,7,54,8655,16,1,0
4330 +,2,1864,8657,48,1,0
4331 +,1,1,8659,32,1,0
4332 +,0,28,8661,24,1,0
4333 +,2,1865,8663,32,1,0
4334 +,2,1866,8665,40,1,0
4335 +,2,1867,8667,48,1,0
4336 +,1,1,8669,32,1,0
4337 +,0,28,8671,24,1,0
4338 +,2,1868,8673,32,1,0
4339 +,2,1869,8675,32,1,0
4340 +,2,1870,8677,48,1,0
4341 +,1,1755,8679,80,1,0
4342 +,0,28,8681,24,1,0
4343 +,2,1871,8683,48,1,0
4344 +,1,1755,8685,80,1,0
4345 +,0,28,8687,24,1,0
4346 +,2,1872,8689,56,1,0
4347 +,1,1,8691,32,1,0
4348 +,0,28,8693,24,1,0
4349 +,2,1873,8695,32,1,0
4350 +,2,1874,8697,32,1,0
4351 +,2,1875,8699,48,1,0
4352 +,1,1755,8701,24,1,0
4353 +,0,28,8703,24,1,0
4354 +,1,1755,8705,24,1,0
4355 +,0,28,8707,24,1,0
4356 +,2,1876,8709,56,1,0
4357 +,1,1755,8711,80,1,0
4358 +,0,28,8713,24,1,0
4359 +,2,1877,8715,48,1,0
4360 +,1,1,8717,80,1,0
4361 +,0,28,8719,24,1,0
4362 +,2,1878,8721,56,1,0
4363 +,1,1,8723,80,1,0
4364 +,0,28,8725,24,1,0
4365 +,2,1879,8727,56,1,0
4366 +,1,1,8729,24,1,0
4367 +,0,28,8731,24,1,0
4368 +,2,1880,8733,48,1,0
4369 +,1,1755,8735,24,1,0
4370 +,0,28,8737,24,1,0
4371 +,1,1,8739,32,1,0
4372 +,0,28,8741,24,1,0
4373 +,2,1881,8743,64,1,0
4374 +,1,1,8745,56,1,0
4375 +,0,28,8747,24,1,0
4376 +,2,1882,8749,56,1,0
4377 +,1,1755,8751,24,1,0
4378 +,0,28,8753,24,1,0
4379 +,1,1755,8755,24,1,0
4380 +,0,28,8757,24,1,0
4381 +,1,1755,8759,24,1,0
4382 +,0,28,8761,24,1,0
4383 +,1,1,8763,24,1,0
4384 +,0,28,8765,24,1,0
4385 +,2,1883,8767,56,1,0
4386 +,1,1,8769,24,1,0
4387 +,0,28,8771,24,1,0
4388 +,2,1884,8773,64,1,0
4389 +,1,1,8775,32,1,0
4390 +,0,28,8777,24,1,0
4391 +,2,1885,8779,56,1,0
4392 +,1,1,8781,24,1,0
4393 +,0,28,8783,24,1,0
4394 +,2,1886,8785,48,1,0
4395 +,1,1755,8787,104,1,0
4396 +,0,28,8789,24,1,0
4397 +,1,1755,8791,72,1,0
4398 +,0,28,8793,24,1,0
4399 +,1,1755,8795,56,1,0
4400 +,0,28,8797,24,1,0
4401 +,1,1755,8799,136,1,0
4402 +,0,28,8801,24,1,0
4403 +,2,1887,8803,40,1,0
4404 +,2,1888,8805,40,1,0
4405 +,2,1889,8807,40,1,0
4406 +,1,1,8809,24,1,0
4407 +,0,28,8811,24,1,0
4408 +,2,1430,8813,40,1,0
4409 +,1,1755,8815,24,1,0
4410 +,0,28,8817,24,1,0
4411 +,1,1755,8819,32,1,0
4412 +,0,28,8821,24,1,0
4413 +,1,1755,8823,24,1,0
4414 +,0,28,8825,24,1,0
4415 +,1,1755,8827,32,1,0
4416 +,0,28,8829,24,1,0
4417 +,2,1890,8831,64,1,0
4418 +,1,1755,8833,32,1,0
4419 +,0,28,8835,24,1,0
4420 +,2,1891,8837,64,1,0
4421 +,1,1755,8839,32,1,0
4422 +,0,28,8841,24,1,0
4423 +,2,1892,8843,56,1,0
4424 +,1,1,8845,40,1,0
4425 +,0,28,8847,24,1,0
4426 +,2,1893,8849,56,1,0
4427 +,1,1,8851,40,1,0
4428 +,0,28,8853,24,1,0
4429 +,2,1894,8855,56,1,0
4430 +,1,1,8857,40,1,0
4431 +,0,28,8859,24,1,0
4432 +,2,1895,8861,56,1,0
4433 +,1,1755,8863,24,1,0
4434 +,0,28,8865,24,1,0
4435 +,1,1755,8867,24,1,0
4436 +,0,28,8869,24,1,0
4437 +,1,1,8871,120,1,0
4438 +,0,28,8873,24,1,0
4439 +,2,1896,8875,56,1,0
4440 +,1,1,8877,104,1,0
4441 +,0,28,8879,24,1,0
4442 +,2,1897,8881,56,1,0
4443 +,1,1,8883,104,1,0
4444 +,0,28,8885,24,1,0
4445 +,2,1898,8887,56,1,0
4446 +,1,1755,8889,24,1,0
4447 +,0,28,8891,24,1,0
4448 +,1,1755,8893,24,1,0
4449 +,0,28,8895,24,1,0
4450 +,1,1755,8897,24,1,0
4451 +,0,28,8899,24,1,0
4452 +,1,1755,8901,24,1,0
4453 +,0,28,8903,24,1,0
4454 +,1,1,8905,48,1,0
4455 +,0,28,8907,24,1,0
4456 +,2,1899,8909,56,1,0
4457 +,1,1,8911,64,1,0
4458 +,0,28,8913,24,1,0
4459 +,2,1900,8915,56,1,0
4460 +,1,1,8917,64,1,0
4461 +,0,28,8919,24,1,0
4462 +,2,1901,8921,56,1,0
4463 +,1,1755,8923,24,1,0
4464 +,0,28,8925,24,1,0
4465 +,1,1,8927,104,1,0
4466 +,0,28,8929,24,1,0
4467 +,2,1902,8931,56,1,0
4468 +,1,1,8933,104,1,0
4469 +,0,28,8935,24,1,0
4470 +,2,1903,8937,56,1,0
4471 +,1,1,8939,120,1,0
4472 +,0,28,8941,24,1,0
4473 +,2,1904,8943,56,1,0
4474 +,1,1,8945,128,1,0
4475 +,0,28,8947,24,1,0
4476 +,2,1905,8949,64,1,0
4477 +,1,1,8951,192,1,0
4478 +,0,28,8953,24,1,0
4479 +,2,1906,8955,56,1,0
4480 +,1,1,8957,88,1,0
4481 +,0,28,8959,24,1,0
4482 +,2,1907,8961,56,1,0
4483 +,1,1,8963,88,1,0
4484 +,0,28,8965,24,1,0
4485 +,2,1908,8967,40,1,0
4486 +,1,1,8969,104,1,0
4487 +,0,28,8971,24,1,0
4488 +,2,1909,8973,48,1,0
4489 +,1,1755,8975,24,1,0
4490 +,0,28,8977,24,1,0
4491 +,1,1755,8979,16,1,0
4492 +,0,28,8981,24,1,0
4493 +,1,1755,8983,16,1,0
4494 +,0,28,8985,24,1,0
4495 +,1,1755,8987,16,1,0
4496 +,0,28,8989,24,1,0
4497 +,1,1755,8991,24,1,0
4498 +,0,28,8993,24,1,0
4499 +,1,1755,8995,24,1,0
4500 +,0,28,8997,24,1,0
4501 +,1,1755,8999,16,1,0
4502 +,0,28,9001,24,1,0
4503 +,1,1755,9003,24,1,0
4504 +,0,28,9005,24,1,0
4505 +,1,1755,9007,24,1,0
4506 +,0,28,9009,24,1,0
4507 +,1,1755,9011,24,1,0
4508 +,0,28,9013,24,1,0
4509 +,1,1755,9015,24,1,0
4510 +,0,28,9017,24,1,0
4511 +,1,1755,9019,24,1,0
4512 +,0,28,9021,24,1,0
4513 +,1,1755,9023,24,1,0
4514 +,0,28,9025,24,1,0
4515 +,1,1755,9027,24,1,0
4516 +,0,28,9029,24,1,0
4517 +,1,1755,9031,24,1,0
4518 +,0,28,9033,24,1,0
4519 +,1,1755,9035,24,1,0
4520 +,0,28,9037,24,1,0
4521 +,1,1755,9039,112,1,0
4522 +,0,28,9041,24,1,0
4523 +,1,1755,9043,16,1,0
4524 +,0,28,9045,24,1,0
4525 +,1,1755,9047,24,1,0
4526 +,0,28,9049,24,1,0
4527 +,2,1910,9051,48,1,0
4528 +,1,1,9053,24,1,0
4529 +,0,28,9055,24,1,0
4530 +,2,1911,9057,48,1,0
4531 +,1,1,9059,32,1,0
4532 +,0,28,9061,24,1,0
4533 +,2,1912,9063,48,1,0
4534 +,1,1,9065,24,1,0
4535 +,0,28,9067,24,1,0
4536 +,2,1913,9069,48,1,0
4537 +,1,1,9071,88,1,0
4538 +,0,28,9073,24,1,0
4539 +,1,1,9075,24,1,0
4540 +,0,28,9077,24,1,0
4541 +,2,1914,9079,48,1,0
4542 +,1,1,9081,32,1,0
4543 +,0,28,9083,24,1,0
4544 +,2,1915,9085,48,1,0
4545 +,1,1,9087,24,1,0
4546 +,0,28,9089,24,1,0
4547 +,2,1916,9091,48,1,0
4548 +,1,1755,9093,32,1,0
4549 +,0,28,9095,24,1,0
4550 +,1,1755,9097,40,1,0
4551 +,0,28,9099,24,1,0
4552 +,1,1755,9101,32,1,0
4553 +,0,28,9103,24,1,0
4554 +,1,1755,9105,24,1,0
4555 +,0,28,9107,24,1,0
4556 +,1,1755,9109,56,1,0
4557 +,0,28,9111,24,1,0
4558 +,1,1755,9113,56,1,0
4559 +,0,28,9115,24,1,0
4560 +,1,1755,9117,32,1,0
4561 +,0,28,9119,24,1,0
4562 +,1,1755,9121,24,1,0
4563 +,0,28,9123,24,1,0
4564 +,1,1,9125,56,1,0
4565 +,0,28,9127,24,1,0
4566 +,2,1917,9129,56,1,0
4567 +,1,1,9131,56,1,0
4568 +,0,28,9133,24,1,0
4569 +,2,1918,9135,64,1,0
4570 +,1,1,9137,56,1,0
4571 +,0,28,9139,24,1,0
4572 +,2,1919,9141,56,1,0
4573 +,1,1755,9143,56,1,0
4574 +,0,28,9145,24,1,0
4575 +,1,1755,9147,56,1,0
4576 +,0,28,9149,24,1,0
4577 +,1,1,9151,24,1,0
4578 +,0,28,9153,24,1,0
4579 +,1,1,9155,32,1,0
4580 +,0,28,9157,24,1,0
4581 +,1,1,9159,24,1,0
4582 +,0,28,9161,24,1,0
4583 +,1,1,9163,24,1,0
4584 +,0,28,9165,24,1,0
4585 +,1,1,9167,24,1,0
4586 +,0,28,9169,24,1,0
4587 +,1,1,9171,32,1,0
4588 +,0,28,9173,24,1,0
4589 +,1,1,9175,64,1,0
4590 +,0,28,9177,24,1,0
4591 +,2,1920,9179,72,1,0
4592 +,1,1,9181,64,1,0
4593 +,0,28,9183,24,1,0
4594 +,1,1,9185,64,1,0
4595 +,0,28,9187,24,1,0
4596 +,2,1921,9189,72,1,0
4597 +,1,1,9191,64,1,0
4598 +,0,28,9193,24,1,0
4599 +,1,1,9195,64,1,0
4600 +,0,28,9197,24,1,0
4601 +,2,1922,9199,72,1,0
4602 +,1,1,9201,64,1,0
4603 +,0,28,9203,24,1,0
4604 +,1,1,9205,24,1,0
4605 +,0,28,9207,24,1,0
4606 +,1,1755,9209,40,1,0
4607 +,0,28,9211,24,1,0
4608 +,1,1755,9213,40,1,0
4609 +,0,28,9215,24,1,0
4610 +,1,1755,9217,40,1,0
4611 +,0,28,9219,24,1,0
4612 +,1,1755,9221,40,1,0
4613 +,0,28,9223,24,1,0
4614 +,1,1755,9225,40,1,0
4615 +,0,28,9227,24,1,0
4616 +,1,1755,9229,40,1,0
4617 +,0,28,9231,24,1,0
4618 +,1,1755,9233,40,1,0
4619 +,0,28,9235,24,1,0
4620 +,1,1755,9237,40,1,0
4621 +,0,28,9239,24,1,0
4622 +,1,1755,9241,40,1,0
4623 +,0,28,9243,24,1,0
4624 +,1,1755,9245,40,1,0
4625 +,0,28,9247,24,1,0
4626 +,1,1755,9249,56,1,0
4627 +,0,28,9251,24,1,0
4628 +,1,1755,9253,72,1,0
4629 +,0,28,9255,24,1,0
4630 +,1,1755,9257,32,1,0
4631 +,0,28,9259,24,1,0
4632 +,1,1755,9261,32,1,0
4633 +,0,28,9263,24,1,0
4634 +,1,1755,9265,72,1,0
4635 +,0,28,9267,24,1,0
4636 +,1,1755,9269,48,1,0
4637 +,0,28,9271,24,1,0
4638 +,1,1755,9273,48,1,0
4639 +,0,28,9275,24,1,0
4640 +,1,1755,9277,48,1,0
4641 +,0,28,9279,24,1,0
4642 +,1,1755,9281,16,1,0
4643 +,0,28,9283,24,1,0
4644 +,1,1755,9285,40,1,0
4645 +,0,28,9287,24,1,0
4646 +,1,1755,9289,224,1,0
4647 +,0,28,9291,24,1,0
4648 +,1,1755,9293,24,1,0
4649 +,0,28,9295,24,1,0
4650 +,1,1755,9297,24,1,0
4651 +,0,28,9299,24,1,0
4652 +,1,1755,9301,24,1,0
4653 +,0,28,9303,24,1,0
4654 +,1,1,9305,216,1,0
4655 +,0,28,9307,24,1,0
4656 +,7,54,9309,16,1,0
4657 +,1,1,9311,88,1,0
4658 +,0,28,9313,24,1,0
4659 +,1,1755,9315,24,1,0
4660 +,0,28,9317,24,1,0
4661 +,1,1755,9319,24,1,0
4662 +,0,28,9321,24,1,0
4663 +,1,1755,9323,24,1,0
4664 +,0,28,9325,24,1,0
4665 +,1,1755,9327,56,1,0
4666 +,0,28,9329,24,1,0
4667 +,2,1923,9331,48,1,0
4668 +,1,1755,9333,88,1,0
4669 +,0,28,9335,24,1,0
4670 +,1,1755,9337,56,1,0
4671 +,0,28,9339,24,1,0
4672 +,2,1924,9341,56,1,0
4673 +,1,1,9343,56,1,0
4674 +,0,28,9345,24,1,0
4675 +,1,1,9347,32,1,0
4676 +,0,28,9349,24,1,0
4677 +,2,1925,9351,56,1,0
4678 +,1,1,9353,32,1,0
4679 +,0,28,9355,24,1,0
4680 +,2,1926,9357,64,1,0
4681 +,1,1,9359,32,1,0
4682 +,0,28,9361,24,1,0
4683 +,2,1927,9363,64,1,0
4684 +,1,1,9365,56,1,0
4685 +,0,28,9367,24,1,0
4686 +,7,54,9369,16,1,0
4687 +,2,1928,9371,56,1,0
4688 +,1,1,9373,56,1,0
4689 +,0,28,9375,24,1,0
4690 +,7,54,9377,16,1,0
4691 +,2,1929,9379,56,1,0
4692 +,1,1,9381,56,1,0
4693 +,0,28,9383,24,1,0
4694 +,7,54,9385,16,1,0
4695 +,2,1930,9387,56,1,0
4696 +,1,1,9389,56,1,0
4697 +,0,28,9391,24,1,0
4698 +,7,54,9393,16,1,0
4699 +,2,1931,9395,56,1,0
4700 +,1,1,9397,56,1,0
4701 +,0,28,9399,24,1,0
4702 +,7,54,9401,16,1,0
4703 +,2,1932,9403,56,1,0
4704 +,1,1,9405,56,1,0
4705 +,0,28,9407,24,1,0
4706 +,7,54,9409,16,1,0
4707 +,2,1933,9411,56,1,0
4708 +,1,1,9413,56,1,0
4709 +,0,28,9415,24,1,0
4710 +,7,54,9417,16,1,0
4711 +,2,1934,9419,56,1,0
4712 +,1,1,9421,56,1,0
4713 +,0,28,9423,24,1,0
4714 +,7,54,9425,16,1,0
4715 +,2,1935,9427,56,1,0
4716 +,1,1,9429,56,1,0
4717 +,0,28,9431,24,1,0
4718 +,7,54,9433,16,1,0
4719 +,2,1936,9435,56,1,0
4720 +,1,1,9437,56,1,0
4721 +,0,28,9439,24,1,0
4722 +,7,54,9441,16,1,0
4723 +,2,1937,9443,56,1,0
4724 +,1,1,9445,64,1,0
4725 +,0,28,9447,24,1,0
4726 +,7,54,9449,16,1,0
4727 +,2,1938,9451,56,1,0
4728 +,1,1,9453,64,1,0
4729 +,0,28,9455,24,1,0
4730 +,7,54,9457,16,1,0
4731 +,2,1939,9459,56,1,0
4732 +,1,1,9461,64,1,0
4733 +,0,28,9463,24,1,0
4734 +,7,54,9465,16,1,0
4735 +,2,1940,9467,56,1,0
4736 +,1,1,9469,64,1,0
4737 +,0,28,9471,24,1,0
4738 +,7,54,9473,16,1,0
4739 +,2,1941,9475,56,1,0
4740 +,1,1,9477,64,1,0
4741 +,0,28,9479,24,1,0
4742 +,7,54,9481,16,1,0
4743 +,2,1942,9483,56,1,0
4744 +,1,1,9485,64,1,0
4745 +,0,28,9487,24,1,0
4746 +,7,54,9489,16,1,0
4747 +,2,1943,9491,56,1,0
4748 +,1,1,9493,64,1,0
4749 +,0,28,9495,24,1,0
4750 +,7,54,9497,16,1,0
4751 +,2,1944,9499,56,1,0
4752 +,1,1,9501,64,1,0
4753 +,0,28,9503,24,1,0
4754 +,7,54,9505,16,1,0
4755 +,2,1945,9507,56,1,0
4756 +,1,1,9509,56,1,0
4757 +,0,28,9511,24,1,0
4758 +,7,54,9513,16,1,0
4759 +,2,1946,9515,56,1,0
4760 +,1,1,9517,56,1,0
4761 +,0,28,9519,24,1,0
4762 +,7,54,9521,16,1,0
4763 +,2,1947,9523,56,1,0
4764 +,1,1755,9525,16,1,0
4765 +,0,28,9527,24,1,0
4766 +,1,1755,9529,24,1,0
4767 +,0,28,9531,24,1,0
4768 +,1,1755,9533,32,1,0
4769 +,0,28,9535,24,1,0
4770 +,1,1755,9537,32,1,0
4771 +,0,28,9539,24,1,0
4772 +,1,1755,9541,16,1,0
4773 +,0,28,9543,24,1,0
4774 +,1,1755,9545,16,1,0
4775 +,0,28,9547,24,1,0
4776 +,1,1755,9549,24,1,0
4777 +,0,28,9551,24,1,0
4778 +,1,1755,9553,16,1,0
4779 +,0,28,9555,24,1,0
4780 +,1,1755,9557,40,1,0
4781 +,0,28,9559,24,1,0
4782 +,1,1755,9561,24,1,0
4783 +,0,28,9563,24,1,0
4784 +,1,1755,9565,32,1,0
4785 +,0,28,9567,24,1,0
4786 +,1,1755,9569,24,1,0
4787 +,0,28,9571,24,1,0
4788 +,1,1755,9573,16,1,0
4789 +,0,28,9575,24,1,0
4790 +,1,1755,9577,16,1,0
4791 +,0,28,9579,24,1,0
4792 +,1,1755,9581,24,1,0
4793 +,0,28,9583,24,1,0
4794 +,1,1755,9585,24,1,0
4795 +,0,28,9587,24,1,0
4796 +,1,1755,9589,24,1,0
4797 +,0,28,9591,24,1,0
4798 +,1,1755,9593,128,1,0
4799 +,0,28,9595,24,1,0
4800 +,1,1755,9597,24,1,0
4801 +,0,28,9599,24,1,0
4802 +,1,1755,9601,24,1,0
4803 +,0,28,9603,24,1,0
4804 +,1,1755,9605,88,1,0
4805 +,0,28,9607,24,1,0
4806 +,1,1755,9609,160,1,0
4807 +,0,28,9611,24,1,0
4808 +,1,1755,9613,16,1,0
4809 +,0,28,9615,24,1,0
4810 +,1,1755,9617,24,1,0
4811 +,0,28,9619,24,1,0
4812 +,1,1755,9621,24,1,0
4813 +,0,28,9623,24,1,0
4814 +,1,1755,9625,16,1,0
4815 +,0,28,9627,24,1,0
4816 +,1,1755,9629,24,1,0
4817 +,0,28,9631,24,1,0
4818 +,1,1755,9633,16,1,0
4819 +,0,28,9635,24,1,0
4820 +,1,1755,9637,16,1,0
4821 +,0,28,9639,24,1,0
4822 +,1,1755,9641,16,1,0
4823 +,0,28,9643,24,1,0
4824 +,1,1755,9645,24,1,0
4825 +,0,28,9647,24,1,0
4826 +,1,1755,9649,16,1,0
4827 +,0,28,9651,24,1,0
4828 +,1,1755,9653,24,1,0
4829 +,0,28,9655,24,1,0
4830 +,1,1755,9657,16,1,0
4831 +,0,28,9659,24,1,0
4832 +,1,1755,9661,16,1,0
4833 +,0,28,9663,24,1,0
4834 +,1,1755,9665,16,1,0
4835 +,0,28,9667,24,1,0
4836 +,1,1755,9669,16,1,0
4837 +,0,28,9671,24,1,0
4838 +,1,1755,9673,16,1,0
4839 +,0,28,9675,24,1,0
4840 +,1,1755,9677,16,1,0
4841 +,0,28,9679,24,1,0
4842 +,1,1755,9681,16,1,0
4843 +,0,28,9683,24,1,0
4844 +,1,1755,9685,16,1,0
4845 +,0,28,9687,24,1,0
4846 +,1,1755,9689,16,1,0
4847 +,0,28,9691,24,1,0
4848 +,1,1755,9693,24,1,0
4849 +,0,28,9695,24,1,0
4850 +,1,1755,9697,24,1,0
4851 +,0,28,9699,24,1,0
4852 +,1,1755,9701,24,1,0
4853 +,0,28,9703,24,1,0
4854 +,1,1755,9705,24,1,0
4855 +,0,28,9707,24,1,0
4856 +,1,1755,9709,16,1,0
4857 +,0,28,9711,24,1,0
4858 +,1,1755,9713,16,1,0
4859 +,0,28,9715,24,1,0
4860 +,1,1755,9717,16,1,0
4861 +,0,28,9719,24,1,0
4862 +,1,1755,9721,24,1,0
4863 +,0,28,9723,24,1,0
4864 +,1,1755,9725,48,1,0
4865 +,0,28,9727,24,1,0
4866 +,1,1755,9729,32,1,0
4867 +,0,28,9731,24,1,0
4868 +,2,1948,9733,56,1,0
4869 +,1,1755,9735,24,1,0
4870 +,0,28,9737,24,1,0
4871 +,1,1755,9739,24,1,0
4872 +,0,28,9741,24,1,0
4873 +,1,1755,9743,24,1,0
4874 +,0,28,9745,24,1,0
4875 +,1,1755,9747,24,1,0
4876 +,0,28,9749,24,1,0
4877 +,1,1755,9751,24,1,0
4878 +,0,28,9753,24,1,0
4879 +,1,1755,9755,24,1,0
4880 +,0,28,9757,24,1,0
4881 +,1,1,9759,120,1,0
4882 +,0,28,9761,24,1,0
4883 +,2,1949,9763,56,1,0
4884 +,1,1,9765,120,1,0
4885 +,0,28,9767,24,1,0
4886 +,2,1950,9769,64,1,0
4887 +,1,1755,9771,24,1,0
4888 +,0,28,9773,24,1,0
4889 +,1,1755,9775,24,1,0
4890 +,0,28,9777,24,1,0
4891 +,1,1755,9779,24,1,0
4892 +,0,28,9781,24,1,0
4893 +,1,1755,9783,24,1,0
4894 +,0,28,9785,24,1,0
4895 +,1,1755,9787,24,1,0
4896 +,0,28,9789,24,1,0
4897 +,1,1755,9791,24,1,0
4898 +,0,28,9793,24,1,0
4899 +,1,1755,9795,24,1,0
4900 +,0,28,9797,24,1,0
4901 +,1,1755,9799,24,1,0
4902 +,0,28,9801,24,1,0
4903 +,1,1755,9803,24,1,0
4904 +,0,28,9805,24,1,0
4905 +,1,1755,9807,24,1,0
4906 +,0,28,9809,24,1,0
4907 +,1,1755,9811,24,1,0
4908 +,0,28,9813,24,1,0
4909 +,1,1755,9815,24,1,0
4910 +,0,28,9817,24,1,0
4911 +,1,1755,9819,24,1,0
4912 +,0,28,9821,24,1,0
4913 +,1,1755,9823,24,1,0
4914 +,0,28,9825,24,1,0
4915 +,1,1755,9827,24,1,0
4916 +,0,28,9829,24,1,0
4917 +,1,1755,9831,24,1,0
4918 +,0,28,9833,24,1,0
4919 +,1,1755,9835,24,1,0
4920 +,0,28,9837,24,1,0
4921 +,1,1755,9839,24,1,0
4922 +,0,28,9841,24,1,0
4923 +,1,1755,9843,24,1,0
4924 +,0,28,9845,24,1,0
4925 +,1,1755,9847,24,1,0
4926 +,0,28,9849,24,1,0
4927 +,1,1755,9851,24,1,0
4928 +,0,28,9853,24,1,0
4929 +,1,1755,9855,24,1,0
4930 +,0,28,9857,24,1,0
4931 +,1,1755,9859,24,1,0
4932 +,0,28,9861,24,1,0
4933 +,1,1755,9863,24,1,0
4934 +,0,28,9865,24,1,0
4935 +,1,1755,9867,24,1,0
4936 +,0,28,9869,24,1,0
4937 +,1,1755,9871,24,1,0
4938 +,0,28,9873,24,1,0
4939 +,1,1755,9875,24,1,0
4940 +,0,28,9877,24,1,0
4941 +,1,1755,9879,24,1,0
4942 +,0,28,9881,24,1,0
4943 +,1,1755,9883,24,1,0
4944 +,0,28,9885,24,1,0
4945 +,1,1755,9887,16,1,0
4946 +,0,28,9889,24,1,0
4947 +,1,1755,9891,16,1,0
4948 +,0,28,9893,24,1,0
4949 +,1,1,9895,32,1,0
4950 +,0,28,9897,24,1,0
4951 +,1,1,9899,32,1,0
4952 +,0,28,9901,24,1,0
4953 +,1,1,9903,32,1,0
4954 +,0,28,9905,24,1,0
4955 +,1,1,9907,32,1,0
4956 +,0,28,9909,24,1,0
4957 +,1,1,9911,32,1,0
4958 +,0,28,9913,24,1,0
4959 +,1,1,9915,32,1,0
4960 +,0,28,9917,24,1,0
4961 +,1,1,9919,32,1,0
4962 +,0,28,9921,24,1,0
4963 +,1,1,9923,32,1,0
4964 +,0,28,9925,24,1,0
4965 +,1,1,9927,32,1,0
4966 +,0,28,9929,24,1,0
4967 +,1,1755,9931,16,1,0
4968 +,0,28,9933,24,1,0
4969 +,1,1755,9935,16,1,0
4970 +,0,28,9937,24,1,0
4971 +,1,1755,9939,16,1,0
4972 +,0,28,9941,24,1,0
4973 +,1,1755,9943,16,1,0
4974 +,0,28,9945,24,1,0
4975 +,1,1755,9947,16,1,0
4976 +,0,28,9949,24,1,0
4977 +,1,1755,9951,16,1,0
4978 +,0,28,9953,24,1,0
4979 +,1,1755,9955,16,1,0
4980 +,0,28,9957,24,1,0
4981 +,1,1755,9959,16,1,0
4982 +,0,28,9961,24,1,0
4983 +,1,1755,9963,80,1,0
4984 +,0,28,9965,24,1,0
4985 +,1,1755,9967,72,1,0
4986 +,0,28,9969,24,1,0
4987 +,1,1,9971,24,1,0
4988 +,0,28,9973,24,1,0
4989 +,1,1755,9975,16,1,0
4990 +,0,28,9977,24,1,0
4991 +,1,1755,9979,16,1,0
4992 +,0,28,9981,24,1,0
4993 +,1,1755,9983,16,1,0
4994 +,0,28,9985,24,1,0
4995 +,1,1755,9987,16,1,0
4996 +,0,28,9989,24,1,0
4997 +,1,1755,9991,16,1,0
4998 +,0,28,9993,24,1,0
4999 +,1,1755,9995,16,1,0

This file is too large to show in full.

meshagent.js
+10
@@ -714,6 +714,16 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
714 obj.close(1);
715 }
716
717 + obj.sendUpdatedIntelAmtPolicy = function() {
718 + var mesh = obj.parent.meshes[obj.dbMeshKey];
719 + if (mesh != null) {
720 + // Send Intel AMT policy
721 + var amtPolicy = null;
722 + if (mesh.amt != null) { amtPolicy = mesh.amt; }
723 + obj.send(JSON.stringify({ action: 'amtPolicy', amtPolicy: amtPolicy }));
724 + }
725 + }
726 +
727 function agentCoreIsStable() {
728 // Check that the mesh exists
729 var mesh = obj.parent.meshes[obj.dbMeshKey];
meshcentral.js
+29 -13
@@ -96,7 +96,7 @@ function CreateMeshCentralServer(config, args) {
96 try { require('./pass').hash('test', function () { }); } catch (e) { console.log('Old version of node, must upgrade.'); return; } // TODO: Not sure if this test works or not.
97
98 // Check for invalid arguments
99 - var validArguments = ['_', 'notls', 'user', 'port', 'aliasport', 'mpsport', 'mpsaliasport', 'redirport', 'cert', 'mpscert', 'deletedomain', 'deletedefaultdomain', 'showall', 'showusers', 'shownodes', 'showmeshes', 'showevents', 'showpower', 'clearpower', 'showiplocations', 'help', 'exactports', 'install', 'uninstall', 'start', 'stop', 'restart', 'debug', 'filespath', 'datapath', 'noagentupdate', 'launch', 'noserverbackup', 'mongodb', 'mongodbcol', 'wanonly', 'lanonly', 'nousers', 'mpsdebug', 'mpspass', 'ciralocalfqdn', 'dbexport', 'dbexportmin', 'dbimport', 'dbmerge', 'dbencryptkey', 'selfupdate', 'tlsoffload', 'userallowedip', 'userblockedip', 'swarmallowedip', 'agentallowedip', 'agentblockedip', 'fastcert', 'swarmport', 'swarmdebug', 'logintoken', 'logintokenkey', 'logintokengen', 'logintokengen', 'mailtokengen', 'admin', 'unadmin', 'sessionkey', 'sessiontime', 'minify', 'minifycore', 'dblistconfigfiles', 'dbshowconfigfile', 'dbpushconfigfiles', 'dbpullconfigfiles', 'dbdeleteconfigfiles', 'configkey', 'loadconfigfromdb', 'npmpath'];
99 + var validArguments = ['_', 'notls', 'user', 'port', 'aliasport', 'mpsport', 'mpsaliasport', 'redirport', 'cert', 'mpscert', 'deletedomain', 'deletedefaultdomain', 'showall', 'showusers', 'shownodes', 'showmeshes', 'showevents', 'showpower', 'clearpower', 'showiplocations', 'help', 'exactports', 'install', 'uninstall', 'start', 'stop', 'restart', 'debug', 'filespath', 'datapath', 'noagentupdate', 'launch', 'noserverbackup', 'mongodb', 'mongodbcol', 'wanonly', 'lanonly', 'nousers', 'mpsdebug', 'mpspass', 'ciralocalfqdn', 'dbexport', 'dbexportmin', 'dbimport', 'dbmerge', 'dbencryptkey', 'selfupdate', 'tlsoffload', 'userallowedip', 'userblockedip', 'swarmallowedip', 'agentallowedip', 'agentblockedip', 'fastcert', 'swarmport', 'swarmdebug', 'logintoken', 'logintokenkey', 'logintokengen', 'logintokengen', 'mailtokengen', 'admin', 'unadmin', 'sessionkey', 'sessiontime', 'minify', 'minifycore', 'dblistconfigfiles', 'dbshowconfigfile', 'dbpushconfigfiles', 'dbpullconfigfiles', 'dbdeleteconfigfiles', 'configkey', 'loadconfigfromdb', 'npmpath', 'memorytracking'];
100 for (var arg in obj.args) { obj.args[arg.toLocaleLowerCase()] = obj.args[arg]; if (validArguments.indexOf(arg.toLocaleLowerCase()) == -1) { console.log('Invalid argument "' + arg + '", use --help.'); return; } }
101 if (obj.args.mongodb == true) { console.log('Must specify: --mongodb [connectionstring] \r\nSee https://docs.mongodb.com/manual/reference/connection-string/ for MongoDB connection string.'); return; }
102 for (i in obj.config.settings) { obj.args[i] = obj.config.settings[i]; } // Place all settings into arguments, arguments have already been placed into settings so arguments take precedence.
@@ -200,18 +200,20 @@ function CreateMeshCentralServer(config, args) {
200 // Get current and latest MeshCentral server versions using NPM
201 obj.getLatestServerVersion = function (callback) {
202 if (callback == null) return;
203 - if (typeof obj.args.selfupdate == 'string') { callback(obj.currentVer, obj.args.selfupdate); return; } // If we are targetting a specific version, return that one as current.
204 - var child_process = require('child_process');
205 - var npmpath = ((typeof obj.args.npmpath == 'string') ? obj.args.npmpath : 'npm');
206 - var xprocess = child_process.exec(npmpath + ' view meshcentral dist-tags.latest', { maxBuffer: 512000 }, function (error, stdout, stderr) { });
207 - xprocess.data = '';
208 - xprocess.stdout.on('data', function (data) { xprocess.data += data; });
209 - xprocess.stderr.on('data', function (data) { });
210 - xprocess.on('close', function (code) {
211 - var latestVer = null;
212 - if (code == 0) { try { latestVer = xprocess.data.split(' ').join('').split('\r').join('').split('\n').join(''); } catch (e) { } }
213 - callback(obj.currentVer, latestVer);
214 - });
203 + try {
204 + if (typeof obj.args.selfupdate == 'string') { callback(obj.currentVer, obj.args.selfupdate); return; } // If we are targetting a specific version, return that one as current.
205 + var child_process = require('child_process');
206 + var npmpath = ((typeof obj.args.npmpath == 'string') ? obj.args.npmpath : 'npm');
207 + var xprocess = child_process.exec(npmpath + ' view meshcentral dist-tags.latest', { maxBuffer: 512000 }, function (error, stdout, stderr) { });
208 + xprocess.data = '';
209 + xprocess.stdout.on('data', function (data) { xprocess.data += data; });
210 + xprocess.stderr.on('data', function (data) { });
211 + xprocess.on('close', function (code) {
212 + var latestVer = null;
213 + if (code == 0) { try { latestVer = xprocess.data.split(' ').join('').split('\r').join('').split('\n').join(''); } catch (e) { } }
214 + callback(obj.currentVer, latestVer);
215 + });
216 + } catch (ex) { callback(obj.currentVer, null); } // If the system is running out of memory, an exception here can easily happen.
217 };
218
219 // Initiate server self-update
@@ -510,6 +512,20 @@ function CreateMeshCentralServer(config, args) {
512 // Write the server state
513 obj.updateServerState('state', 'starting');
514
515 + // Start memory tracking if requested
516 + if (typeof obj.args.memorytracking == 'number') {
517 + var info = process.memoryUsage(), txt = [];
518 + info.time = Date.now();
519 + for (var i in info) { txt.push(i); }
520 + obj.fs.appendFile(obj.getConfigFilePath('memorytracking.txt'), txt.join(',') + '\r\n', function (err) { });
521 + setInterval(function () {
522 + var info = process.memoryUsage(), txt = [];
523 + info.time = Date.now();
524 + for (var i in info) { txt.push(info[i]); }
525 + obj.fs.appendFile(obj.getConfigFilePath('memorytracking.txt'), txt.join(',') + '\r\n', function (err) { });
526 + }, (obj.args.memorytracking * 1000));
527 + }
528 +
529 // Look to see if data and/or file path is specified
530 if (obj.args.datapath) { obj.datapath = obj.args.datapath; }
531 if (obj.args.filespath) { obj.filespath = obj.args.filespath; }
meshuser.js
+28 -7
@@ -470,7 +470,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
470
471 switch (cmd) {
472 case 'help': {
473 - r = 'Available commands: help, info, versions, args, resetserver, showconfig, usersessions, tasklimiter, setmaxtasks, cores, migrationagents, swarmstats, nodeconfig.';
473 + r = 'Available commands: help, info, versions, args, resetserver, showconfig, usersessions, tasklimiter, setmaxtasks, cores,\r\n'
474 + r += 'migrationagents, swarmstats, nodeconfig.';
475 break;
476 }
477 case 'info': {
@@ -580,6 +581,22 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
581 }
582 break;
583 }
584 + case 'heapdump': {
585 + var heapdump = null;
586 + try { heapdump = require('heapdump'); } catch (ex) { }
587 + if (heapdump == null) {
588 + r = 'Heapdump module not installed, run "npm install heapdump".';
589 + } else {
590 + heapdump.writeSnapshot(function (err, filename) {
591 + if (err != null) {
592 + try { ws.send(JSON.stringify({ action: 'serverconsole', value: 'Unable to write heapdump: ' + err })); } catch (ex) { }
593 + } else {
594 + try { ws.send(JSON.stringify({ action: 'serverconsole', value: 'Wrote heapdump at ' + filename })); } catch (ex) { }
595 + }
596 + });
597 + }
598 + break;
599 + }
600 default: { // This is an unknown command, return an error message
601 r = 'Unknown command \"' + cmd + '\", type \"help\" for list of avaialble commands.';
602 break;
@@ -1272,7 +1289,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
1289 for (var i = 0; i < command.nodeids.length; i++) {
1290 obj.db.Get(command.nodeids[i], function (err, nodes) {
1291 if (nodes.length != 1) return;
1275 - var node = nodes[0];
1292 + const node = nodes[0];
1293
1294 // Check if already in the right mesh
1295 if (node.meshid == command.meshid) return;
@@ -1281,21 +1298,25 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
1298 try { if (obj.parent.meshes[node.meshid].mtype != obj.parent.meshes[command.meshid].mtype) return; } catch (e) { return; };
1299
1300 // Make sure that we have rights on both source and destination mesh
1284 - var sourceMeshRights = user.links[node.meshid].rights;
1285 - var targetMeshRights = user.links[command.meshid].rights;
1301 + const sourceMeshRights = user.links[node.meshid].rights;
1302 + const targetMeshRights = user.links[command.meshid].rights;
1303 if (((sourceMeshRights & 4) == 0) || ((targetMeshRights & 4) == 0)) return;
1304
1305 // Perform the switch, start by saving the node with the new meshid.
1289 - var oldMeshId = node.meshid;
1306 + const oldMeshId = node.meshid;
1307 node.meshid = command.meshid;
1308 obj.db.Set(node);
1309
1310 // If the device is connected on this server, switch it now.
1311 var agentSession = obj.parent.wsagents[node._id];
1295 - if (agentSession != null) { agentSession.dbMeshKey = command.meshid; agentSession.meshid = command.meshid.split('/')[2]; }
1312 + if (agentSession != null) {
1313 + agentSession.dbMeshKey = command.meshid; // Switch the agent mesh
1314 + agentSession.meshid = command.meshid.split('/')[2]; // Switch the agent mesh
1315 + agentSession.sendUpdatedIntelAmtPolicy(); // Send the new Intel AMT policy
1316 + }
1317
1318 // Add the connection state
1298 - var state = obj.parent.parent.GetConnectivityState(node._id);
1319 + const state = obj.parent.parent.GetConnectivityState(node._id);
1320 if (state) {
1321 node.conn = state.connectivity;
1322 node.pwr = state.powerState;
package-lock.json new
+1961
@@ -0,0 +1,1961 @@
1 +{
2 + "name": "meshcentral",
3 + "version": "0.2.9-q",
4 + "lockfileVersion": 1,
5 + "requires": true,
6 + "dependencies": {
7 + "accepts": {
8 + "version": "1.3.5",
9 + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
10 + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
11 + "requires": {
12 + "mime-types": "~2.1.18",
13 + "negotiator": "0.6.1"
14 + }
15 + },
16 + "ajv": {
17 + "version": "6.6.1",
18 + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz",
19 + "integrity": "sha1-Y2D17Q2A8jLMKylMNi1dwuU43WE=",
20 + "requires": {
21 + "fast-deep-equal": "^2.0.1",
22 + "fast-json-stable-stringify": "^2.0.0",
23 + "json-schema-traverse": "^0.4.1",
24 + "uri-js": "^4.2.2"
25 + }
26 + },
27 + "align-text": {
28 + "version": "0.1.4",
29 + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
30 + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
31 + "optional": true,
32 + "requires": {
33 + "kind-of": "^3.0.2",
34 + "longest": "^1.0.1",
35 + "repeat-string": "^1.5.2"
36 + }
37 + },
38 + "amdefine": {
39 + "version": "1.0.1",
40 + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
41 + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
42 + },
43 + "archiver": {
44 + "version": "3.0.0",
45 + "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.0.0.tgz",
46 + "integrity": "sha1-ULJijPAyrcvzXTXREbUyTblb+2k=",
47 + "requires": {
48 + "archiver-utils": "^2.0.0",
49 + "async": "^2.0.0",
50 + "buffer-crc32": "^0.2.1",
51 + "glob": "^7.0.0",
52 + "readable-stream": "^2.0.0",
53 + "tar-stream": "^1.5.0",
54 + "zip-stream": "^2.0.1"
55 + },
56 + "dependencies": {
57 + "async": {
58 + "version": "2.6.1",
59 + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
60 + "integrity": "sha1-skWiPKcZMAROxT+kaqAKPofGphA=",
61 + "requires": {
62 + "lodash": "^4.17.10"
63 + }
64 + }
65 + }
66 + },
67 + "archiver-utils": {
68 + "version": "2.0.0",
69 + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.0.0.tgz",
70 + "integrity": "sha1-VjmBiotdidD/xRtyw5KDz0/qFKE=",
71 + "requires": {
72 + "glob": "^7.0.0",
73 + "graceful-fs": "^4.1.0",
74 + "lazystream": "^1.0.0",
75 + "lodash.assign": "^4.2.0",
76 + "lodash.defaults": "^4.2.0",
77 + "lodash.difference": "^4.5.0",
78 + "lodash.flatten": "^4.4.0",
79 + "lodash.isplainobject": "^4.0.6",
80 + "lodash.toarray": "^4.4.0",
81 + "lodash.union": "^4.6.0",
82 + "normalize-path": "^3.0.0",
83 + "readable-stream": "^2.0.0"
84 + }
85 + },
86 + "array-flatten": {
87 + "version": "1.1.1",
88 + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
89 + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
90 + },
91 + "asap": {
92 + "version": "2.0.6",
93 + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
94 + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
95 + },
96 + "asn1": {
97 + "version": "0.2.4",
98 + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
99 + "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
100 + "requires": {
101 + "safer-buffer": "~2.1.0"
102 + }
103 + },
104 + "assert-plus": {
105 + "version": "1.0.0",
106 + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
107 + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
108 + },
109 + "async": {
110 + "version": "0.2.10",
111 + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
112 + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E="
113 + },
114 + "async-limiter": {
115 + "version": "1.0.0",
116 + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
117 + "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg="
118 + },
119 + "asynckit": {
120 + "version": "0.4.0",
121 + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
122 + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
123 + },
124 + "authdog": {
125 + "version": "0.1.1",
126 + "resolved": "https://registry.npmjs.org/authdog/-/authdog-0.1.1.tgz",
127 + "integrity": "sha1-1uFBImEwCvtvWnuvaMqjy+984a4="
128 + },
129 + "aws-sign2": {
130 + "version": "0.7.0",
131 + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
132 + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
133 + },
134 + "aws4": {
135 + "version": "1.8.0",
136 + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
137 + "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8="
138 + },
139 + "balanced-match": {
140 + "version": "1.0.0",
141 + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
142 + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
143 + },
144 + "base64-js": {
145 + "version": "1.3.0",
146 + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
147 + "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM="
148 + },
149 + "bcrypt-pbkdf": {
150 + "version": "1.0.2",
151 + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
152 + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
153 + "requires": {
154 + "tweetnacl": "^0.14.3"
155 + }
156 + },
157 + "binary-search-tree": {
158 + "version": "0.2.5",
159 + "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz",
160 + "integrity": "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=",
161 + "requires": {
162 + "underscore": "~1.4.4"
163 + }
164 + },
165 + "bl": {
166 + "version": "1.2.2",
167 + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
168 + "integrity": "sha1-oWCRFxcQPAdBDO9j71Gzl8Alr5w=",
169 + "requires": {
170 + "readable-stream": "^2.3.5",
171 + "safe-buffer": "^5.1.1"
172 + }
173 + },
174 + "body-parser": {
175 + "version": "1.18.2",
176 + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz",
177 + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=",
178 + "requires": {
179 + "bytes": "3.0.0",
180 + "content-type": "~1.0.4",
181 + "debug": "2.6.9",
182 + "depd": "~1.1.1",
183 + "http-errors": "~1.6.2",
184 + "iconv-lite": "0.4.19",
185 + "on-finished": "~2.3.0",
186 + "qs": "6.5.1",
187 + "raw-body": "2.3.2",
188 + "type-is": "~1.6.15"
189 + },
190 + "dependencies": {
191 + "iconv-lite": {
192 + "version": "0.4.19",
193 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
194 + "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs="
195 + },
196 + "qs": {
197 + "version": "6.5.1",
198 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
199 + "integrity": "sha1-NJzfbu+J7EXBLX1es/wMhwNDptg="
200 + },
201 + "raw-body": {
202 + "version": "2.3.2",
203 + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
204 + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
205 + "requires": {
206 + "bytes": "3.0.0",
207 + "http-errors": "1.6.2",
208 + "iconv-lite": "0.4.19",
209 + "unpipe": "1.0.0"
210 + },
211 + "dependencies": {
212 + "depd": {
213 + "version": "1.1.1",
214 + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
215 + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
216 + },
217 + "http-errors": {
218 + "version": "1.6.2",
219 + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
220 + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
221 + "requires": {
222 + "depd": "1.1.1",
223 + "inherits": "2.0.3",
224 + "setprototypeof": "1.0.3",
225 + "statuses": ">= 1.3.1 < 2"
226 + }
227 + }
228 + }
229 + },
230 + "setprototypeof": {
231 + "version": "1.0.3",
232 + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
233 + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
234 + }
235 + }
236 + },
237 + "brace-expansion": {
238 + "version": "1.1.8",
239 + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
240 + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
241 + "requires": {
242 + "balanced-match": "^1.0.0",
243 + "concat-map": "0.0.1"
244 + }
245 + },
246 + "bson": {
247 + "version": "1.0.9",
248 + "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz",
249 + "integrity": "sha1-EjGfgyOxJUc5t8a++NPomuBaL1c="
250 + },
251 + "buffer": {
252 + "version": "5.2.1",
253 + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
254 + "integrity": "sha1-3Vf6DxCaxZxgJHkETcp7iz0LcdY=",
255 + "requires": {
256 + "base64-js": "^1.0.2",
257 + "ieee754": "^1.1.4"
258 + }
259 + },
260 + "buffer-alloc": {
261 + "version": "1.2.0",
262 + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
263 + "integrity": "sha1-iQ3ZDZI6hz4I4Q5f1RpX5bfM4Ow=",
264 + "requires": {
265 + "buffer-alloc-unsafe": "^1.1.0",
266 + "buffer-fill": "^1.0.0"
267 + }
268 + },
269 + "buffer-alloc-unsafe": {
270 + "version": "1.1.0",
271 + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
272 + "integrity": "sha1-vX3CauKXLQ7aJTvgYdupkjScGfA="
273 + },
274 + "buffer-crc32": {
275 + "version": "0.2.13",
276 + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
277 + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
278 + },
279 + "buffer-fill": {
280 + "version": "1.0.0",
281 + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
282 + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
283 + },
284 + "buffer-shims": {
285 + "version": "1.0.0",
286 + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
287 + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E="
288 + },
289 + "bytes": {
290 + "version": "3.0.0",
291 + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
292 + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
293 + },
294 + "camelcase": {
295 + "version": "1.2.1",
296 + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
297 + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
298 + "optional": true
299 + },
300 + "caseless": {
301 + "version": "0.12.0",
302 + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
303 + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
304 + },
305 + "center-align": {
306 + "version": "0.1.3",
307 + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
308 + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
309 + "optional": true,
310 + "requires": {
311 + "align-text": "^0.1.3",
312 + "lazy-cache": "^1.0.3"
313 + }
314 + },
315 + "cliui": {
316 + "version": "2.1.0",
317 + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
318 + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
319 + "optional": true,
320 + "requires": {
321 + "center-align": "^0.1.1",
322 + "right-align": "^0.1.1",
323 + "wordwrap": "0.0.2"
324 + },
325 + "dependencies": {
326 + "wordwrap": {
327 + "version": "0.0.2",
328 + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
329 + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
330 + "optional": true
331 + }
332 + }
333 + },
334 + "combined-stream": {
335 + "version": "1.0.7",
336 + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
337 + "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=",
338 + "requires": {
339 + "delayed-stream": "~1.0.0"
340 + }
341 + },
342 + "compress-commons": {
343 + "version": "1.2.2",
344 + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz",
345 + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=",
346 + "requires": {
347 + "buffer-crc32": "^0.2.1",
348 + "crc32-stream": "^2.0.0",
349 + "normalize-path": "^2.0.0",
350 + "readable-stream": "^2.0.0"
351 + },
352 + "dependencies": {
353 + "normalize-path": {
354 + "version": "2.1.1",
355 + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
356 + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
357 + "requires": {
358 + "remove-trailing-separator": "^1.0.1"
359 + }
360 + }
361 + }
362 + },
363 + "compressible": {
364 + "version": "2.0.15",
365 + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz",
366 + "integrity": "sha1-hXqasKfloH2Ng37UP+Le//ZP4hI=",
367 + "requires": {
368 + "mime-db": ">= 1.36.0 < 2"
369 + },
370 + "dependencies": {
371 + "mime-db": {
372 + "version": "1.37.0",
373 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
374 + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
375 + }
376 + }
377 + },
378 + "compression": {
379 + "version": "1.7.3",
380 + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz",
381 + "integrity": "sha1-J+DhdqryYPfywoE8PkQK258Zk9s=",
382 + "requires": {
383 + "accepts": "~1.3.5",
384 + "bytes": "3.0.0",
385 + "compressible": "~2.0.14",
386 + "debug": "2.6.9",
387 + "on-headers": "~1.0.1",
388 + "safe-buffer": "5.1.2",
389 + "vary": "~1.1.2"
390 + },
391 + "dependencies": {
392 + "accepts": {
393 + "version": "1.3.5",
394 + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
395 + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
396 + "requires": {
397 + "mime-types": "~2.1.18",
398 + "negotiator": "0.6.1"
399 + }
400 + },
401 + "mime-db": {
402 + "version": "1.37.0",
403 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
404 + "integrity": "sha1-C2oM5v2+lXbiXx8tL96IMNwK0Ng="
405 + },
406 + "mime-types": {
407 + "version": "2.1.21",
408 + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
409 + "integrity": "sha1-KJlaoey3cHQv5q5+WPkYHHRLP5Y=",
410 + "requires": {
411 + "mime-db": "~1.37.0"
412 + }
413 + },
414 + "safe-buffer": {
415 + "version": "5.1.2",
416 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
417 + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
418 + }
419 + }
420 + },
421 + "concat-map": {
422 + "version": "0.0.1",
423 + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
424 + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
425 + },
426 + "connect-redis": {
427 + "version": "3.4.0",
428 + "resolved": "https://registry.npmjs.org/connect-redis/-/connect-redis-3.4.0.tgz",
429 + "integrity": "sha1-QEDdN1W92/k0ePuEk3p0BSwxuWU=",
430 + "requires": {
431 + "debug": "^4.0.1",
432 + "redis": "^2.8.0"
433 + },
434 + "dependencies": {
435 + "debug": {
436 + "version": "4.1.0",
437 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz",
438 + "integrity": "sha1-NzaHv/pnizixzZH4YbY4UANd3Ic=",
439 + "requires": {
440 + "ms": "^2.1.1"
441 + }
442 + },
443 + "ms": {
444 + "version": "2.1.1",
445 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
446 + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo="
447 + }
448 + }
449 + },
450 + "content-disposition": {
451 + "version": "0.5.2",
452 + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
453 + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
454 + },
455 + "content-type": {
456 + "version": "1.0.4",
457 + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
458 + "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js="
459 + },
460 + "cookie": {
461 + "version": "0.3.1",
462 + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
463 + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
464 + },
465 + "cookie-session": {
466 + "version": "2.0.0-beta.3",
467 + "resolved": "https://registry.npmjs.org/cookie-session/-/cookie-session-2.0.0-beta.3.tgz",
468 + "integrity": "sha1-TkRr2fhb1+J9PiJvTpmvEgEaQ4Y=",
469 + "requires": {
470 + "cookies": "0.7.1",
471 + "debug": "3.1.0",
472 + "on-headers": "~1.0.1",
473 + "safe-buffer": "5.1.1"
474 + },
475 + "dependencies": {
476 + "debug": {
477 + "version": "3.1.0",
478 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
479 + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
480 + "requires": {
481 + "ms": "2.0.0"
482 + }
483 + }
484 + }
485 + },
486 + "cookie-signature": {
487 + "version": "1.0.6",
488 + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
489 + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
490 + },
491 + "cookies": {
492 + "version": "0.7.1",
493 + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.1.tgz",
494 + "integrity": "sha1-fIphX1SBxhq58WyDNzG8uPZjuZs=",
495 + "requires": {
496 + "depd": "~1.1.1",
497 + "keygrip": "~1.0.2"
498 + }
499 + },
500 + "core-util-is": {
501 + "version": "1.0.2",
502 + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
503 + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
504 + },
505 + "crc": {
506 + "version": "3.8.0",
507 + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz",
508 + "integrity": "sha1-rWAmnCyFb4wpnixMwN5FVpFAVsY=",
509 + "requires": {
510 + "buffer": "^5.1.0"
511 + }
512 + },
513 + "crc32-stream": {
514 + "version": "2.0.0",
515 + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz",
516 + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=",
517 + "requires": {
518 + "crc": "^3.4.4",
519 + "readable-stream": "^2.0.0"
520 + }
521 + },
522 + "dashdash": {
523 + "version": "1.14.1",
524 + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
525 + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
526 + "requires": {
527 + "assert-plus": "^1.0.0"
528 + }
529 + },
530 + "debug": {
531 + "version": "2.6.9",
532 + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
533 + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
534 + "requires": {
535 + "ms": "2.0.0"
536 + }
537 + },
538 + "decamelize": {
539 + "version": "1.2.0",
540 + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
541 + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
542 + "optional": true
543 + },
544 + "define-properties": {
545 + "version": "1.1.2",
546 + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
547 + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
548 + "requires": {
549 + "foreach": "^2.0.5",
550 + "object-keys": "^1.0.8"
551 + }
552 + },
553 + "delayed-stream": {
554 + "version": "1.0.0",
555 + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
556 + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
557 + },
558 + "depd": {
559 + "version": "1.1.2",
560 + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
561 + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
562 + },
563 + "destroy": {
564 + "version": "1.0.4",
565 + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
566 + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
567 + },
568 + "double-ended-queue": {
569 + "version": "2.1.0-0",
570 + "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
571 + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw="
572 + },
573 + "each-series": {
574 + "version": "1.0.0",
575 + "resolved": "https://registry.npmjs.org/each-series/-/each-series-1.0.0.tgz",
576 + "integrity": "sha1-+Ibmxm39sl7x/nNWQUbuXLR4r8s="
577 + },
578 + "ecc-jsbn": {
579 + "version": "0.1.2",
580 + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
581 + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
582 + "requires": {
583 + "jsbn": "~0.1.0",
584 + "safer-buffer": "^2.1.0"
585 + }
586 + },
587 + "ee-first": {
588 + "version": "1.1.1",
589 + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
590 + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
591 + },
592 + "encodeurl": {
593 + "version": "1.0.2",
594 + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
595 + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
596 + },
597 + "end-of-stream": {
598 + "version": "1.4.1",
599 + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
600 + "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=",
601 + "requires": {
602 + "once": "^1.4.0"
603 + }
604 + },
605 + "es-abstract": {
606 + "version": "1.12.0",
607 + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
608 + "integrity": "sha1-nbvdJ8aFbwABQhyhh4LXhr+KYWU=",
609 + "requires": {
610 + "es-to-primitive": "^1.1.1",
611 + "function-bind": "^1.1.1",
612 + "has": "^1.0.1",
613 + "is-callable": "^1.1.3",
614 + "is-regex": "^1.0.4"
615 + }
616 + },
617 + "es-to-primitive": {
618 + "version": "1.2.0",
619 + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
620 + "integrity": "sha1-7fckeAM0VujdqO8J4ArZZQcH83c=",
621 + "requires": {
622 + "is-callable": "^1.1.4",
623 + "is-date-object": "^1.0.1",
624 + "is-symbol": "^1.0.2"
625 + }
626 + },
627 + "es6-promise": {
628 + "version": "3.2.1",
629 + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz",
630 + "integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q="
631 + },
632 + "escape-html": {
633 + "version": "1.0.3",
634 + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
635 + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
636 + },
637 + "etag": {
638 + "version": "1.8.1",
639 + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
640 + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
641 + },
642 + "express": {
643 + "version": "4.16.4",
644 + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
645 + "integrity": "sha1-/d72GSYQniTFFeqX/S8b2/Yt8S4=",
646 + "requires": {
647 + "accepts": "~1.3.5",
648 + "array-flatten": "1.1.1",
649 + "body-parser": "1.18.3",
650 + "content-disposition": "0.5.2",
651 + "content-type": "~1.0.4",
652 + "cookie": "0.3.1",
653 + "cookie-signature": "1.0.6",
654 + "debug": "2.6.9",
655 + "depd": "~1.1.2",
656 + "encodeurl": "~1.0.2",
657 + "escape-html": "~1.0.3",
658 + "etag": "~1.8.1",
659 + "finalhandler": "1.1.1",
660 + "fresh": "0.5.2",
661 + "merge-descriptors": "1.0.1",
662 + "methods": "~1.1.2",
663 + "on-finished": "~2.3.0",
664 + "parseurl": "~1.3.2",
665 + "path-to-regexp": "0.1.7",
666 + "proxy-addr": "~2.0.4",
667 + "qs": "6.5.2",
668 + "range-parser": "~1.2.0",
669 + "safe-buffer": "5.1.2",
670 + "send": "0.16.2",
671 + "serve-static": "1.13.2",
672 + "setprototypeof": "1.1.0",
673 + "statuses": "~1.4.0",
674 + "type-is": "~1.6.16",
675 + "utils-merge": "1.0.1",
676 + "vary": "~1.1.2"
677 + },
678 + "dependencies": {
679 + "body-parser": {
680 + "version": "1.18.3",
681 + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
682 + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
683 + "requires": {
684 + "bytes": "3.0.0",
685 + "content-type": "~1.0.4",
686 + "debug": "2.6.9",
687 + "depd": "~1.1.2",
688 + "http-errors": "~1.6.3",
689 + "iconv-lite": "0.4.23",
690 + "on-finished": "~2.3.0",
691 + "qs": "6.5.2",
692 + "raw-body": "2.3.3",
693 + "type-is": "~1.6.16"
694 + }
695 + },
696 + "safe-buffer": {
697 + "version": "5.1.2",
698 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
699 + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
700 + }
701 + }
702 + },
703 + "express-handlebars": {
704 + "version": "3.0.0",
705 + "resolved": "https://registry.npmjs.org/express-handlebars/-/express-handlebars-3.0.0.tgz",
706 + "integrity": "sha1-gKBwu4GbCeSvLKbQeA91zgXnXC8=",
707 + "requires": {
708 + "glob": "^6.0.4",
709 + "graceful-fs": "^4.1.2",
710 + "handlebars": "^4.0.5",
711 + "object.assign": "^4.0.3",
712 + "promise": "^7.0.0"
713 + },
714 + "dependencies": {
715 + "glob": {
716 + "version": "6.0.4",
717 + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz",
718 + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=",
719 + "requires": {
720 + "inflight": "^1.0.4",
721 + "inherits": "2",
722 + "minimatch": "2 || 3",
723 + "once": "^1.3.0",
724 + "path-is-absolute": "^1.0.0"
725 + }
726 + },
727 + "graceful-fs": {
728 + "version": "4.1.11",
729 + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
730 + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
731 + }
732 + }
733 + },
734 + "express-ws": {
735 + "version": "4.0.0",
736 + "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-4.0.0.tgz",
737 + "integrity": "sha1-2r2NyXRRZBiQKkH+bjDtlJtNNsQ=",
738 + "requires": {
739 + "ws": "^5.2.0"
740 + },
741 + "dependencies": {
742 + "ws": {
743 + "version": "5.2.2",
744 + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
745 + "integrity": "sha1-3/7xSGa46NyRM1glFNG++vlumA8=",
746 + "requires": {
747 + "async-limiter": "~1.0.0"
748 + }
749 + }
750 + }
751 + },
752 + "extend": {
753 + "version": "3.0.2",
754 + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
755 + "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
756 + },
757 + "extsprintf": {
758 + "version": "1.3.0",
759 + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
760 + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
761 + },
762 + "fast-deep-equal": {
763 + "version": "2.0.1",
764 + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
765 + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
766 + },
767 + "fast-json-stable-stringify": {
768 + "version": "2.0.0",
769 + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
770 + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
771 + },
772 + "fd-slicer": {
773 + "version": "1.1.0",
774 + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
775 + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
776 + "requires": {
777 + "pend": "~1.2.0"
778 + }
779 + },
780 + "finalhandler": {
781 + "version": "1.1.1",
782 + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
783 + "integrity": "sha1-7r9O2EAHnIP0JJA4ydcDAIMBsQU=",
784 + "requires": {
785 + "debug": "2.6.9",
786 + "encodeurl": "~1.0.2",
787 + "escape-html": "~1.0.3",
788 + "on-finished": "~2.3.0",
789 + "parseurl": "~1.3.2",
790 + "statuses": "~1.4.0",
791 + "unpipe": "~1.0.0"
792 + }
793 + },
794 + "foreach": {
795 + "version": "2.0.5",
796 + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
797 + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
798 + },
799 + "forever-agent": {
800 + "version": "0.6.1",
801 + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
802 + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
803 + },
804 + "form-data": {
805 + "version": "2.3.3",
806 + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
807 + "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=",
808 + "requires": {
809 + "asynckit": "^0.4.0",
810 + "combined-stream": "^1.0.6",
811 + "mime-types": "^2.1.12"
812 + }
813 + },
814 + "forwarded": {
815 + "version": "0.1.2",
816 + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
817 + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
818 + },
819 + "fresh": {
820 + "version": "0.5.2",
821 + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
822 + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
823 + },
824 + "fs-constants": {
825 + "version": "1.0.0",
826 + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
827 + "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0="
828 + },
829 + "fs.realpath": {
830 + "version": "1.0.0",
831 + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
832 + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
833 + },
834 + "function-bind": {
835 + "version": "1.1.1",
836 + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
837 + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0="
838 + },
839 + "getpass": {
840 + "version": "0.1.7",
841 + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
842 + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
843 + "requires": {
844 + "assert-plus": "^1.0.0"
845 + }
846 + },
847 + "glob": {
848 + "version": "7.1.3",
849 + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
850 + "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=",
851 + "requires": {
852 + "fs.realpath": "^1.0.0",
853 + "inflight": "^1.0.4",
854 + "inherits": "2",
855 + "minimatch": "^3.0.4",
856 + "once": "^1.3.0",
857 + "path-is-absolute": "^1.0.0"
858 + }
859 + },
860 + "graceful-fs": {
861 + "version": "4.1.15",
862 + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
863 + "integrity": "sha1-/7cD4QZuig7qpMi4C6klPu77+wA="
864 + },
865 + "handlebars": {
866 + "version": "4.0.11",
867 + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz",
868 + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=",
869 + "requires": {
870 + "async": "^1.4.0",
871 + "optimist": "^0.6.1",
872 + "source-map": "^0.4.4",
873 + "uglify-js": "^2.6"
874 + },
875 + "dependencies": {
876 + "async": {
877 + "version": "1.5.2",
878 + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
879 + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
880 + }
881 + }
882 + },
883 + "har-schema": {
884 + "version": "2.0.0",
885 + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
886 + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
887 + },
888 + "har-validator": {
889 + "version": "5.1.3",
890 + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
891 + "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=",
892 + "requires": {
893 + "ajv": "^6.5.5",
894 + "har-schema": "^2.0.0"
895 + }
896 + },
897 + "has": {
898 + "version": "1.0.3",
899 + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
900 + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
901 + "requires": {
902 + "function-bind": "^1.1.1"
903 + }
904 + },
905 + "has-symbols": {
906 + "version": "1.0.0",
907 + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
908 + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
909 + },
910 + "heapdump": {
911 + "version": "0.3.12",
912 + "resolved": "https://registry.npmjs.org/heapdump/-/heapdump-0.3.12.tgz",
913 + "integrity": "sha512-OSVdkxGd9xAJNEP0RA/ZvKEzGTEjCnkvmMEGF1ScR/87tH92v5Dpv6g/Fs8GvZA9UxdMpxU1G9NEC2D0OxZjJQ==",
914 + "requires": {
915 + "nan": "^2.11.1"
916 + }
917 + },
918 + "http-errors": {
919 + "version": "1.6.3",
920 + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
921 + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
922 + "requires": {
923 + "depd": "~1.1.2",
924 + "inherits": "2.0.3",
925 + "setprototypeof": "1.1.0",
926 + "statuses": ">= 1.4.0 < 2"
927 + }
928 + },
929 + "http-signature": {
930 + "version": "1.2.0",
931 + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
932 + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
933 + "requires": {
934 + "assert-plus": "^1.0.0",
935 + "jsprim": "^1.2.2",
936 + "sshpk": "^1.7.0"
937 + }
938 + },
939 + "iconv-lite": {
940 + "version": "0.4.23",
941 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
942 + "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=",
943 + "requires": {
944 + "safer-buffer": ">= 2.1.2 < 3"
945 + }
946 + },
947 + "ieee754": {
948 + "version": "1.1.12",
949 + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
950 + "integrity": "sha1-UL8k5bnIu5ivSWTJQc2wkY2ntgs="
951 + },
952 + "immediate": {
953 + "version": "3.0.6",
954 + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
955 + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
956 + },
957 + "inflight": {
958 + "version": "1.0.6",
959 + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
960 + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
961 + "requires": {
962 + "once": "^1.3.0",
963 + "wrappy": "1"
964 + }
965 + },
966 + "inherits": {
967 + "version": "2.0.3",
968 + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
969 + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
970 + },
971 + "ipaddr.js": {
972 + "version": "1.8.0",
973 + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz",
974 + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4="
975 + },
976 + "ipcheck": {
977 + "version": "0.1.0",
978 + "resolved": "https://registry.npmjs.org/ipcheck/-/ipcheck-0.1.0.tgz",
979 + "integrity": "sha1-pvlCIokQAQ8WiBF7endLOcUiL4E="
980 + },
981 + "is-buffer": {
982 + "version": "1.1.6",
983 + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
984 + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
985 + "optional": true
986 + },
987 + "is-callable": {
988 + "version": "1.1.4",
989 + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
990 + "integrity": "sha1-HhrfIZ4e62hNaR+dagX/DTCiTXU="
991 + },
992 + "is-date-object": {
993 + "version": "1.0.1",
994 + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
995 + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
996 + },
997 + "is-regex": {
998 + "version": "1.0.4",
999 + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
1000 + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
1001 + "requires": {
1002 + "has": "^1.0.1"
1003 + }
1004 + },
1005 + "is-symbol": {
1006 + "version": "1.0.2",
1007 + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
1008 + "integrity": "sha1-oFX2rlcZLK7jKeeoYBGLSXqVDzg=",
1009 + "requires": {
1010 + "has-symbols": "^1.0.0"
1011 + }
1012 + },
1013 + "is-typedarray": {
1014 + "version": "1.0.0",
1015 + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
1016 + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
1017 + },
1018 + "isarray": {
1019 + "version": "1.0.0",
1020 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
1021 + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
1022 + },
1023 + "isstream": {
1024 + "version": "0.1.2",
1025 + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
1026 + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
1027 + },
1028 + "jsbn": {
1029 + "version": "0.1.1",
1030 + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
1031 + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
1032 + },
1033 + "json-schema": {
1034 + "version": "0.2.3",
1035 + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
1036 + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
1037 + },
1038 + "json-schema-traverse": {
1039 + "version": "0.4.1",
1040 + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
1041 + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA="
1042 + },
1043 + "json-stringify-safe": {
1044 + "version": "5.0.1",
1045 + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
1046 + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
1047 + },
1048 + "jsprim": {
1049 + "version": "1.4.1",
1050 + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
1051 + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
1052 + "requires": {
1053 + "assert-plus": "1.0.0",
1054 + "extsprintf": "1.3.0",
1055 + "json-schema": "0.2.3",
1056 + "verror": "1.10.0"
1057 + }
1058 + },
1059 + "keygrip": {
1060 + "version": "1.0.2",
1061 + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.2.tgz",
1062 + "integrity": "sha1-rTKXxVcGneqLz+ek+kkbdcXd65E="
1063 + },
1064 + "kind-of": {
1065 + "version": "3.2.2",
1066 + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1067 + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1068 + "optional": true,
1069 + "requires": {
1070 + "is-buffer": "^1.1.5"
1071 + }
1072 + },
1073 + "lazy-cache": {
1074 + "version": "1.0.4",
1075 + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
1076 + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
1077 + "optional": true
1078 + },
1079 + "lazystream": {
1080 + "version": "1.0.0",
1081 + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
1082 + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
1083 + "requires": {
1084 + "readable-stream": "^2.0.5"
1085 + }
1086 + },
1087 + "lie": {
1088 + "version": "3.1.1",
1089 + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
1090 + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
1091 + "requires": {
1092 + "immediate": "~3.0.5"
1093 + }
1094 + },
1095 + "localforage": {
1096 + "version": "1.5.6",
1097 + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.6.tgz",
1098 + "integrity": "sha1-0DTRXlNy7pfGQXPpqa65aBX13QY=",
1099 + "requires": {
1100 + "lie": "3.1.1"
1101 + }
1102 + },
1103 + "lodash": {
1104 + "version": "4.17.11",
1105 + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
1106 + "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40="
1107 + },
1108 + "lodash.assign": {
1109 + "version": "4.2.0",
1110 + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
1111 + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc="
1112 + },
1113 + "lodash.defaults": {
1114 + "version": "4.2.0",
1115 + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
1116 + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
1117 + },
1118 + "lodash.difference": {
1119 + "version": "4.5.0",
1120 + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz",
1121 + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw="
1122 + },
1123 + "lodash.flatten": {
1124 + "version": "4.4.0",
1125 + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
1126 + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8="
1127 + },
1128 + "lodash.isplainobject": {
1129 + "version": "4.0.6",
1130 + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
1131 + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
1132 + },
1133 + "lodash.toarray": {
1134 + "version": "4.4.0",
1135 + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz",
1136 + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE="
1137 + },
1138 + "lodash.union": {
1139 + "version": "4.6.0",
1140 + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz",
1141 + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg="
1142 + },
1143 + "longest": {
1144 + "version": "1.0.1",
1145 + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
1146 + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
1147 + "optional": true
1148 + },
1149 + "media-typer": {
1150 + "version": "0.3.0",
1151 + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
1152 + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
1153 + },
1154 + "merge-descriptors": {
1155 + "version": "1.0.1",
1156 + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
1157 + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
1158 + },
1159 + "methods": {
1160 + "version": "1.1.2",
1161 + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
1162 + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
1163 + },
1164 + "mime": {
1165 + "version": "1.4.1",
1166 + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
1167 + "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY="
1168 + },
1169 + "mime-db": {
1170 + "version": "1.37.0",
1171 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
1172 + "integrity": "sha1-C2oM5v2+lXbiXx8tL96IMNwK0Ng="
1173 + },
1174 + "mime-types": {
1175 + "version": "2.1.21",
1176 + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
1177 + "integrity": "sha1-KJlaoey3cHQv5q5+WPkYHHRLP5Y=",
1178 + "requires": {
1179 + "mime-db": "~1.37.0"
1180 + }
1181 + },
1182 + "minimatch": {
1183 + "version": "3.0.4",
1184 + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
1185 + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
1186 + "requires": {
1187 + "brace-expansion": "^1.1.7"
1188 + }
1189 + },
1190 + "minimist": {
1191 + "version": "1.2.0",
1192 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
1193 + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
1194 + },
1195 + "mkdirp": {
1196 + "version": "0.5.1",
1197 + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
1198 + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
1199 + "requires": {
1200 + "minimist": "0.0.8"
1201 + },
1202 + "dependencies": {
1203 + "minimist": {
1204 + "version": "0.0.8",
1205 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
1206 + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
1207 + }
1208 + }
1209 + },
1210 + "mongodb": {
1211 + "version": "2.2.36",
1212 + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.36.tgz",
1213 + "integrity": "sha1-HFc2gLKEn7D0esu6PcX6Io3pdfU=",
1214 + "requires": {
1215 + "es6-promise": "3.2.1",
1216 + "mongodb-core": "2.1.20",
1217 + "readable-stream": "2.2.7"
1218 + },
1219 + "dependencies": {
1220 + "process-nextick-args": {
1221 + "version": "1.0.7",
1222 + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
1223 + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
1224 + },
1225 + "readable-stream": {
1226 + "version": "2.2.7",
1227 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz",
1228 + "integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=",
1229 + "requires": {
1230 + "buffer-shims": "~1.0.0",
1231 + "core-util-is": "~1.0.0",
1232 + "inherits": "~2.0.1",
1233 + "isarray": "~1.0.0",
1234 + "process-nextick-args": "~1.0.6",
1235 + "string_decoder": "~1.0.0",
1236 + "util-deprecate": "~1.0.1"
1237 + }
1238 + },
1239 + "string_decoder": {
1240 + "version": "1.0.3",
1241 + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
1242 + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
1243 + "requires": {
1244 + "safe-buffer": "~5.1.0"
1245 + }
1246 + }
1247 + }
1248 + },
1249 + "mongodb-core": {
1250 + "version": "2.1.20",
1251 + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.20.tgz",
1252 + "integrity": "sha1-/s6N12tZ7n1/LTE7ZTIsFgSS2PE=",
1253 + "requires": {
1254 + "bson": "~1.0.4",
1255 + "require_optional": "~1.0.0"
1256 + }
1257 + },
1258 + "mongojs": {
1259 + "version": "2.6.0",
1260 + "resolved": "https://registry.npmjs.org/mongojs/-/mongojs-2.6.0.tgz",
1261 + "integrity": "sha1-Mz9YBiGg3GSACGXjjjam5h/xaYk=",
1262 + "requires": {
1263 + "each-series": "^1.0.0",
1264 + "mongodb": "^2.2.31",
1265 + "once": "^1.4.0",
1266 + "parse-mongo-url": "^1.1.1",
1267 + "readable-stream": "^2.3.3",
1268 + "thunky": "^1.0.2",
1269 + "to-mongodb-core": "^2.0.0",
1270 + "xtend": "^4.0.1"
1271 + }
1272 + },
1273 + "ms": {
1274 + "version": "2.0.0",
1275 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1276 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1277 + },
1278 + "multiparty": {
1279 + "version": "4.2.1",
1280 + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.2.1.tgz",
1281 + "integrity": "sha1-2bbEbYuN6rHucMc0sK93HdRuCxM=",
1282 + "requires": {
1283 + "fd-slicer": "1.1.0",
1284 + "http-errors": "~1.7.0",
1285 + "safe-buffer": "5.1.2",
1286 + "uid-safe": "2.1.5"
1287 + },
1288 + "dependencies": {
1289 + "fd-slicer": {
1290 + "version": "1.1.0",
1291 + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
1292 + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
1293 + "requires": {
1294 + "pend": "~1.2.0"
1295 + }
1296 + },
1297 + "http-errors": {
1298 + "version": "1.7.1",
1299 + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.1.tgz",
1300 + "integrity": "sha1-ak/+XTUYjhw5+HJTRpBYWFLh8Cc=",
1301 + "requires": {
1302 + "depd": "~1.1.2",
1303 + "inherits": "2.0.3",
1304 + "setprototypeof": "1.1.0",
1305 + "statuses": ">= 1.5.0 < 2",
1306 + "toidentifier": "1.0.0"
1307 + }
1308 + },
1309 + "safe-buffer": {
1310 + "version": "5.1.2",
1311 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1312 + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
1313 + },
1314 + "statuses": {
1315 + "version": "1.5.0",
1316 + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
1317 + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
1318 + }
1319 + }
1320 + },
1321 + "nan": {
1322 + "version": "2.11.1",
1323 + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz",
1324 + "integrity": "sha1-kOIrzLjKV+pM03zIPTgZtS7qZ2Y="
1325 + },
1326 + "nedb": {
1327 + "version": "1.8.0",
1328 + "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz",
1329 + "integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=",
1330 + "requires": {
1331 + "async": "0.2.10",
1332 + "binary-search-tree": "0.2.5",
1333 + "localforage": "^1.3.0",
1334 + "mkdirp": "~0.5.1",
1335 + "underscore": "~1.4.4"
1336 + }
1337 + },
1338 + "negotiator": {
1339 + "version": "0.6.1",
1340 + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
1341 + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
1342 + },
1343 + "node-forge": {
1344 + "version": "0.7.6",
1345 + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz",
1346 + "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw=="
1347 + },
1348 + "node-windows": {
1349 + "version": "0.1.14",
1350 + "resolved": "https://registry.npmjs.org/node-windows/-/node-windows-0.1.14.tgz",
1351 + "integrity": "sha1-MbsFA9o7xjfyv6qLJmZAouktiR8=",
1352 + "requires": {
1353 + "optimist": "~0.6.0",
1354 + "xml": "0.0.12"
1355 + }
1356 + },
1357 + "normalize-path": {
1358 + "version": "3.0.0",
1359 + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1360 + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU="
1361 + },
1362 + "oauth-sign": {
1363 + "version": "0.9.0",
1364 + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
1365 + "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU="
1366 + },
1367 + "object-keys": {
1368 + "version": "1.0.11",
1369 + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz",
1370 + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0="
1371 + },
1372 + "object.assign": {
1373 + "version": "4.1.0",
1374 + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
1375 + "integrity": "sha1-lovxEA15Vrs8oIbwBvhGs7xACNo=",
1376 + "requires": {
1377 + "define-properties": "^1.1.2",
1378 + "function-bind": "^1.1.1",
1379 + "has-symbols": "^1.0.0",
1380 + "object-keys": "^1.0.11"
1381 + }
1382 + },
1383 + "object.getownpropertydescriptors": {
1384 + "version": "2.0.3",
1385 + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
1386 + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
1387 + "requires": {
1388 + "define-properties": "^1.1.2",
1389 + "es-abstract": "^1.5.1"
1390 + }
1391 + },
1392 + "on-finished": {
1393 + "version": "2.3.0",
1394 + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
1395 + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
1396 + "requires": {
1397 + "ee-first": "1.1.1"
1398 + }
1399 + },
1400 + "on-headers": {
1401 + "version": "1.0.1",
1402 + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
1403 + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
1404 + },
1405 + "once": {
1406 + "version": "1.4.0",
1407 + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1408 + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
1409 + "requires": {
1410 + "wrappy": "1"
1411 + }
1412 + },
1413 + "optimist": {
1414 + "version": "0.6.1",
1415 + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
1416 + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
1417 + "requires": {
1418 + "minimist": "~0.0.1",
1419 + "wordwrap": "~0.0.2"
1420 + },
1421 + "dependencies": {
1422 + "minimist": {
1423 + "version": "0.0.10",
1424 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
1425 + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
1426 + }
1427 + }
1428 + },
1429 + "otplib": {
1430 + "version": "10.0.1",
1431 + "resolved": "https://registry.npmjs.org/otplib/-/otplib-10.0.1.tgz",
1432 + "integrity": "sha1-03/NEyAymMC5STfVXFo1J+2HeHU=",
1433 + "requires": {
1434 + "thirty-two": "1.0.2"
1435 + }
1436 + },
1437 + "parse-mongo-url": {
1438 + "version": "1.1.1",
1439 + "resolved": "https://registry.npmjs.org/parse-mongo-url/-/parse-mongo-url-1.1.1.tgz",
1440 + "integrity": "sha1-ZiON9fjnwMjKTNlw1KtqE3PrdbU="
1441 + },
1442 + "parseurl": {
1443 + "version": "1.3.2",
1444 + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
1445 + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
1446 + },
1447 + "path-is-absolute": {
1448 + "version": "1.0.1",
1449 + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1450 + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
1451 + },
1452 + "path-to-regexp": {
1453 + "version": "0.1.7",
1454 + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
1455 + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
1456 + },
1457 + "pend": {
1458 + "version": "1.2.0",
1459 + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
1460 + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
1461 + },
1462 + "performance-now": {
1463 + "version": "2.1.0",
1464 + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
1465 + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
1466 + },
1467 + "process-nextick-args": {
1468 + "version": "2.0.0",
1469 + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
1470 + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o="
1471 + },
1472 + "promise": {
1473 + "version": "7.3.1",
1474 + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
1475 + "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
1476 + "requires": {
1477 + "asap": "~2.0.3"
1478 + }
1479 + },
1480 + "proxy-addr": {
1481 + "version": "2.0.4",
1482 + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
1483 + "integrity": "sha1-7PxzO/Iv+Mb0B/onUye5q2fki5M=",
1484 + "requires": {
1485 + "forwarded": "~0.1.2",
1486 + "ipaddr.js": "1.8.0"
1487 + }
1488 + },
1489 + "psl": {
1490 + "version": "1.1.29",
1491 + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
1492 + "integrity": "sha1-YPWA02AXC7cip5fMcEQR5tqFDGc="
1493 + },
1494 + "punycode": {
1495 + "version": "2.1.1",
1496 + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
1497 + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew="
1498 + },
1499 + "qs": {
1500 + "version": "6.5.2",
1501 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
1502 + "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
1503 + },
1504 + "random-bytes": {
1505 + "version": "1.0.0",
1506 + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
1507 + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs="
1508 + },
1509 + "range-parser": {
1510 + "version": "1.2.0",
1511 + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
1512 + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
1513 + },
1514 + "raw-body": {
1515 + "version": "2.3.3",
1516 + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
1517 + "integrity": "sha1-GzJOzmtXBuFThVvBFIxlu39uoMM=",
1518 + "requires": {
1519 + "bytes": "3.0.0",
1520 + "http-errors": "1.6.3",
1521 + "iconv-lite": "0.4.23",
1522 + "unpipe": "1.0.0"
1523 + }
1524 + },
1525 + "readable-stream": {
1526 + "version": "2.3.6",
1527 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
1528 + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=",
1529 + "requires": {
1530 + "core-util-is": "~1.0.0",
1531 + "inherits": "~2.0.3",
1532 + "isarray": "~1.0.0",
1533 + "process-nextick-args": "~2.0.0",
1534 + "safe-buffer": "~5.1.1",
1535 + "string_decoder": "~1.1.1",
1536 + "util-deprecate": "~1.0.1"
1537 + }
1538 + },
1539 + "redis": {
1540 + "version": "2.8.0",
1541 + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz",
1542 + "integrity": "sha1-ICKI4/WMSfYHnZevehDhMDrhSwI=",
1543 + "requires": {
1544 + "double-ended-queue": "^2.1.0-0",
1545 + "redis-commands": "^1.2.0",
1546 + "redis-parser": "^2.6.0"
1547 + }
1548 + },
1549 + "redis-commands": {
1550 + "version": "1.4.0",
1551 + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.4.0.tgz",
1552 + "integrity": "sha1-UvnPmRU+/M5WqPhq+Ya9BOmIYC8="
1553 + },
1554 + "redis-parser": {
1555 + "version": "2.6.0",
1556 + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz",
1557 + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs="
1558 + },
1559 + "remove-trailing-separator": {
1560 + "version": "1.1.0",
1561 + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
1562 + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
1563 + },
1564 + "repeat-string": {
1565 + "version": "1.6.1",
1566 + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
1567 + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
1568 + "optional": true
1569 + },
1570 + "request": {
1571 + "version": "2.88.0",
1572 + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
1573 + "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=",
1574 + "requires": {
1575 + "aws-sign2": "~0.7.0",
1576 + "aws4": "^1.8.0",
1577 + "caseless": "~0.12.0",
1578 + "combined-stream": "~1.0.6",
1579 + "extend": "~3.0.2",
1580 + "forever-agent": "~0.6.1",
1581 + "form-data": "~2.3.2",
1582 + "har-validator": "~5.1.0",
1583 + "http-signature": "~1.2.0",
1584 + "is-typedarray": "~1.0.0",
1585 + "isstream": "~0.1.2",
1586 + "json-stringify-safe": "~5.0.1",
1587 + "mime-types": "~2.1.19",
1588 + "oauth-sign": "~0.9.0",
1589 + "performance-now": "^2.1.0",
1590 + "qs": "~6.5.2",
1591 + "safe-buffer": "^5.1.2",
1592 + "tough-cookie": "~2.4.3",
1593 + "tunnel-agent": "^0.6.0",
1594 + "uuid": "^3.3.2"
1595 + },
1596 + "dependencies": {
1597 + "safe-buffer": {
1598 + "version": "5.1.2",
1599 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1600 + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
1601 + }
1602 + }
1603 + },
1604 + "require_optional": {
1605 + "version": "1.0.1",
1606 + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
1607 + "integrity": "sha1-TPNaQkf2TKPfjC7yCMxJSxyo/C4=",
1608 + "requires": {
1609 + "resolve-from": "^2.0.0",
1610 + "semver": "^5.1.0"
1611 + }
1612 + },
1613 + "resolve-from": {
1614 + "version": "2.0.0",
1615 + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
1616 + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
1617 + },
1618 + "right-align": {
1619 + "version": "0.1.3",
1620 + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
1621 + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
1622 + "optional": true,
1623 + "requires": {
1624 + "align-text": "^0.1.1"
1625 + }
1626 + },
1627 + "safe-buffer": {
1628 + "version": "5.1.1",
1629 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
1630 + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM="
1631 + },
1632 + "safer-buffer": {
1633 + "version": "2.1.2",
1634 + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1635 + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
1636 + },
1637 + "semver": {
1638 + "version": "5.6.0",
1639 + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
1640 + "integrity": "sha1-fnQlb7qknHWqfHogXMInmcrIAAQ="
1641 + },
1642 + "send": {
1643 + "version": "0.16.2",
1644 + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
1645 + "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=",
1646 + "requires": {
1647 + "debug": "2.6.9",
1648 + "depd": "~1.1.2",
1649 + "destroy": "~1.0.4",
1650 + "encodeurl": "~1.0.2",
1651 + "escape-html": "~1.0.3",
1652 + "etag": "~1.8.1",
1653 + "fresh": "0.5.2",
1654 + "http-errors": "~1.6.2",
1655 + "mime": "1.4.1",
1656 + "ms": "2.0.0",
1657 + "on-finished": "~2.3.0",
1658 + "range-parser": "~1.2.0",
1659 + "statuses": "~1.4.0"
1660 + }
1661 + },
1662 + "serve-static": {
1663 + "version": "1.13.2",
1664 + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
1665 + "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=",
1666 + "requires": {
1667 + "encodeurl": "~1.0.2",
1668 + "escape-html": "~1.0.3",
1669 + "parseurl": "~1.3.2",
1670 + "send": "0.16.2"
1671 + }
1672 + },
1673 + "setprototypeof": {
1674 + "version": "1.1.0",
1675 + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
1676 + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY="
1677 + },
1678 + "source-map": {
1679 + "version": "0.4.4",
1680 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
1681 + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
1682 + "requires": {
1683 + "amdefine": ">=0.0.4"
1684 + }
1685 + },
1686 + "sshpk": {
1687 + "version": "1.15.2",
1688 + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz",
1689 + "integrity": "sha1-yUbWvZsaOdDoY1dj9SQtbtbctik=",
1690 + "requires": {
1691 + "asn1": "~0.2.3",
1692 + "assert-plus": "^1.0.0",
1693 + "bcrypt-pbkdf": "^1.0.0",
1694 + "dashdash": "^1.12.0",
1695 + "ecc-jsbn": "~0.1.1",
1696 + "getpass": "^0.1.1",
1697 + "jsbn": "~0.1.0",
1698 + "safer-buffer": "^2.0.2",
1699 + "tweetnacl": "~0.14.0"
1700 + }
1701 + },
1702 + "statuses": {
1703 + "version": "1.4.0",
1704 + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
1705 + "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic="
1706 + },
1707 + "string_decoder": {
1708 + "version": "1.1.1",
1709 + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1710 + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
1711 + "requires": {
1712 + "safe-buffer": "~5.1.0"
1713 + }
1714 + },
1715 + "tar-stream": {
1716 + "version": "1.6.2",
1717 + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
1718 + "integrity": "sha1-jqVdqzeXIlPZqa+Q/c1VmuQ1xVU=",
1719 + "requires": {
1720 + "bl": "^1.0.0",
1721 + "buffer-alloc": "^1.2.0",
1722 + "end-of-stream": "^1.0.0",
1723 + "fs-constants": "^1.0.0",
1724 + "readable-stream": "^2.3.0",
1725 + "to-buffer": "^1.1.1",
1726 + "xtend": "^4.0.0"
1727 + }
1728 + },
1729 + "thirty-two": {
1730 + "version": "1.0.2",
1731 + "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz",
1732 + "integrity": "sha1-TKL//AKlEpDSdEueP1V2k8prYno="
1733 + },
1734 + "thunky": {
1735 + "version": "1.0.3",
1736 + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz",
1737 + "integrity": "sha1-9d9zJFNAewkZHa5z4qjMc/OBqCY="
1738 + },
1739 + "to-buffer": {
1740 + "version": "1.1.1",
1741 + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
1742 + "integrity": "sha1-STvUj2LXxD/N7TE6A9ytsuEhOoA="
1743 + },
1744 + "to-mongodb-core": {
1745 + "version": "2.0.0",
1746 + "resolved": "https://registry.npmjs.org/to-mongodb-core/-/to-mongodb-core-2.0.0.tgz",
1747 + "integrity": "sha1-NZbsdhOsmtO5ioncua77pWnNJ+s="
1748 + },
1749 + "toidentifier": {
1750 + "version": "1.0.0",
1751 + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
1752 + "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM="
1753 + },
1754 + "tough-cookie": {
1755 + "version": "2.4.3",
1756 + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
1757 + "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=",
1758 + "requires": {
1759 + "psl": "^1.1.24",
1760 + "punycode": "^1.4.1"
1761 + },
1762 + "dependencies": {
1763 + "punycode": {
1764 + "version": "1.4.1",
1765 + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
1766 + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
1767 + }
1768 + }
1769 + },
1770 + "tunnel-agent": {
1771 + "version": "0.6.0",
1772 + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
1773 + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
1774 + "requires": {
1775 + "safe-buffer": "^5.0.1"
1776 + }
1777 + },
1778 + "tweetnacl": {
1779 + "version": "0.14.5",
1780 + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
1781 + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
1782 + },
1783 + "type-is": {
1784 + "version": "1.6.16",
1785 + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
1786 + "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=",
1787 + "requires": {
1788 + "media-typer": "0.3.0",
1789 + "mime-types": "~2.1.18"
1790 + }
1791 + },
1792 + "uglify-js": {
1793 + "version": "2.8.29",
1794 + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
1795 + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
1796 + "optional": true,
1797 + "requires": {
1798 + "source-map": "~0.5.1",
1799 + "uglify-to-browserify": "~1.0.0",
1800 + "yargs": "~3.10.0"
1801 + },
1802 + "dependencies": {
1803 + "source-map": {
1804 + "version": "0.5.7",
1805 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
1806 + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
1807 + "optional": true
1808 + }
1809 + }
1810 + },
1811 + "uglify-to-browserify": {
1812 + "version": "1.0.2",
1813 + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
1814 + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
1815 + "optional": true
1816 + },
1817 + "uid-safe": {
1818 + "version": "2.1.5",
1819 + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
1820 + "integrity": "sha1-Kz1cckDo/C5Y+Komnl7knAhXvTo=",
1821 + "requires": {
1822 + "random-bytes": "~1.0.0"
1823 + }
1824 + },
1825 + "underscore": {
1826 + "version": "1.4.4",
1827 + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
1828 + "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ="
1829 + },
1830 + "unpipe": {
1831 + "version": "1.0.0",
1832 + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1833 + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
1834 + },
1835 + "uri-js": {
1836 + "version": "4.2.2",
1837 + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
1838 + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=",
1839 + "requires": {
1840 + "punycode": "^2.1.0"
1841 + }
1842 + },
1843 + "util-deprecate": {
1844 + "version": "1.0.2",
1845 + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1846 + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
1847 + },
1848 + "util.promisify": {
1849 + "version": "1.0.0",
1850 + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
1851 + "integrity": "sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA=",
1852 + "requires": {
1853 + "define-properties": "^1.1.2",
1854 + "object.getownpropertydescriptors": "^2.0.3"
1855 + }
1856 + },
1857 + "utils-merge": {
1858 + "version": "1.0.1",
1859 + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1860 + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
1861 + },
1862 + "uuid": {
1863 + "version": "3.3.2",
1864 + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
1865 + "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE="
1866 + },
1867 + "vary": {
1868 + "version": "1.1.2",
1869 + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1870 + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
1871 + },
1872 + "verror": {
1873 + "version": "1.10.0",
1874 + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
1875 + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
1876 + "requires": {
1877 + "assert-plus": "^1.0.0",
1878 + "core-util-is": "1.0.2",
1879 + "extsprintf": "^1.2.0"
1880 + }
1881 + },
1882 + "window-size": {
1883 + "version": "0.1.0",
1884 + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
1885 + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
1886 + "optional": true
1887 + },
1888 + "wordwrap": {
1889 + "version": "0.0.3",
1890 + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
1891 + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
1892 + },
1893 + "wrappy": {
1894 + "version": "1.0.2",
1895 + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1896 + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
1897 + },
1898 + "ws": {
1899 + "version": "6.1.2",
1900 + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.2.tgz",
1901 + "integrity": "sha1-PMdGLph5LwrGeUJBSJA97TucOtg=",
1902 + "requires": {
1903 + "async-limiter": "~1.0.0"
1904 + }
1905 + },
1906 + "xml": {
1907 + "version": "0.0.12",
1908 + "resolved": "https://registry.npmjs.org/xml/-/xml-0.0.12.tgz",
1909 + "integrity": "sha1-8Is0cQmRK+AChXhfRvFa2OUKX2c="
1910 + },
1911 + "xmldom": {
1912 + "version": "0.1.27",
1913 + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
1914 + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
1915 + },
1916 + "xtend": {
1917 + "version": "4.0.1",
1918 + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
1919 + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
1920 + },
1921 + "yargs": {
1922 + "version": "3.10.0",
1923 + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
1924 + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
1925 + "optional": true,
1926 + "requires": {
1927 + "camelcase": "^1.0.2",
1928 + "cliui": "^2.1.0",
1929 + "decamelize": "^1.0.0",
1930 + "window-size": "0.1.0"
1931 + }
1932 + },
1933 + "yauzl": {
1934 + "version": "2.10.0",
1935 + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
1936 + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
1937 + "requires": {
1938 + "buffer-crc32": "~0.2.3",
1939 + "fd-slicer": "~1.1.0"
1940 + }
1941 + },
1942 + "yubikeyotp": {
1943 + "version": "0.2.0",
1944 + "resolved": "https://registry.npmjs.org/yubikeyotp/-/yubikeyotp-0.2.0.tgz",
1945 + "integrity": "sha1-i9xREizQDtjJGbnJyuuoUbJyqn0=",
1946 + "requires": {
1947 + "request": "*"
1948 + }
1949 + },
1950 + "zip-stream": {
1951 + "version": "2.0.1",
1952 + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-2.0.1.tgz",
1953 + "integrity": "sha1-SKBiSIr+kd2kL4I3APrliXU8zTQ=",
1954 + "requires": {
1955 + "archiver-utils": "^2.0.0",
1956 + "compress-commons": "^1.2.0",
1957 + "readable-stream": "^2.0.0"
1958 + }
1959 + }
1960 + }
1961 +}
package.json
+3 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.2.9-q",
3 + "version": "0.2.9-r",
4 "keywords": [
5 "Remote Management",
6 "Intel AMT",
@@ -35,6 +35,7 @@
35 "express": "^4.16.4",
36 "express-handlebars": "^3.0.0",
37 "express-ws": "^4.0.0",
38 + "heapdump": "^0.3.12",
39 "ipcheck": "^0.1.0",
40 "meshcentral": "*",
41 "minimist": "^1.2.0",
@@ -42,6 +43,7 @@
43 "multiparty": "^4.2.1",
44 "nedb": "^1.8.0",
45 "node-forge": "^0.7.6",
46 + "node-windows": "^0.1.14",
47 "otplib": "^10.0.1",
48 "util.promisify": "^1.0.0",
49 "ws": "^6.1.2",
swarmserver.js
+6 -3
@@ -23,7 +23,7 @@ module.exports.CreateSwarmServer = function (parent, db, args, certificates) {
23 obj.legacyAgentConnections = {};
24 obj.migrationAgents = {};
25 obj.agentActionCount = {};
26 - obj.stats = { blockedConnect: 0, connectCount: 0, clientCertConnectCount: 0, noCertConnectCount: 0, bytesIn: 0, bytesOut: 0, httpGetRequest: 0, pushedAgents: {}, close: 0, onclose: 0 }
26 + obj.stats = { blockedConnect: 0, connectCount: 0, clientCertConnectCount: 0, noCertConnectCount: 0, bytesIn: 0, bytesOut: 0, httpGetRequest: 0, pushedAgents: {}, close: 0, onclose: 0, agentType: {} }
27 const tls = require('tls');
28 const forge = require('node-forge');
29 const common = require('./common.js');
@@ -178,7 +178,7 @@ module.exports.CreateSwarmServer = function (parent, db, args, certificates) {
178 if ((this.tag.clientCert == null) || (this.tag.clientCert.subject == null)) {
179 /*console.log("Swarm Connection, no client cert: " + socket.remoteAddress);*/
180 this.write('HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nConnection: close\r\n\r\nMeshCentral2 legacy swarm server.\r\nNo client certificate given.');
181 - this.end();
181 + //this.end(); // If we don't close the connection, it may lead to less reconnection traffic.
182 return;
183 }
184
@@ -209,6 +209,9 @@ module.exports.CreateSwarmServer = function (parent, db, args, certificates) {
209 if (socket.pingTimer == null) { socket.pingTimer = setInterval(function () { obj.SendCommand(socket, LegacyMeshProtocol.PING); }, 20000); }
210 Debug(3, 'Swarm:NODEPUSH:' + JSON.stringify(nodeblock));
211
212 + // Log the agent type
213 + if (obj.stats.agenttype[nodeblock.agenttype] == null) { obj.stats.agenttype[nodeblock.agenttype] = 1; } else { obj.stats.agenttype[nodeblock.agenttype]++; }
214 +
215 // Check if this agent is asking of updates over and over again.
216 var actionCount = obj.agentActionCount[nodeblock.nodeidhex];
217 if (actionCount == null) { actionCount = 0; }
@@ -230,7 +233,7 @@ module.exports.CreateSwarmServer = function (parent, db, args, certificates) {
233
234 // Update stats
235 if (obj.stats.pushedAgents[nodeblock.agenttype] == null) { obj.stats.pushedAgents[nodeblock.agenttype] = {}; }
233 - if (obj.stats.pushedAgents[nodeblock.agenttype][nextAgentVersion] == null) { obj.stats.pushedAgents[nodeblock.agenttype][nextAgentVersion] = 0; } else { obj.stats.pushedAgents[nodeblock.agenttype][nextAgentVersion]++; }
236 + if (obj.stats.pushedAgents[nodeblock.agenttype][nextAgentVersion] == null) { obj.stats.pushedAgents[nodeblock.agenttype][nextAgentVersion] = 1; } else { obj.stats.pushedAgents[nodeblock.agenttype][nextAgentVersion]++; }
237
238 // Start the agent download using the task limiter so not to flood the server. Low priority task
239 obj.parent.taskLimiter.launch(function (socket, taskid, taskLimiterQueue) {
views/default-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!DOCTYPE html> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="format-detection" content="telephone=no"> <style>body{margin:0;padding:0;border:0;color:black;font-size:13px;font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;background-color:#d3d9d6;}#container{background-color:#fff;width:960px;min-width:960px;margin:0 auto;border-top:0;border-right:1px solid #b7b7b7;border-bottom:0;border-left:1px solid #b7b7b7;padding:0;}#masthead{width:auto;margin:0;padding:0;overflow:auto;text-align:right;background-color:#036;width:960px;}#column_l{position:relative;float:left;width:930px;margin:0;padding:0 15px;background-color:#fff;}#footer{clear:both;overflow:auto;width:100%;text-align:center;background-color:#113962;padding-top:5px;padding-bottom:5px;}#masthead img{float:left;}#masthead p{font-size:11px;color:#fff;margin:10px 10px 0;}#footer a{color:#fff;text-decoration:underline;}#footer a:hover{color:#fff;text-decoration:none;}a{color:#036;text-decoration:underline;}.i1{background:url(../images/icons50.png) 0px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i2{background:url(../images/icons50.png) -50px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i3{background:url(../images/icons50.png) -100px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i4{background:url(../images/icons50.png) -150px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i5{background:url(../images/icons50.png) -200px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i6{background:url(../images/icons50.png) -250px 0px;height:50px;width:50px;cursor:pointer;border:none;}.j1{background:url(../images/icons16.png) 0px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j2{background:url(../images/icons16.png) -16px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j3{background:url(../images/icons16.png) -32px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j4{background:url(../images/icons16.png) -48px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j5{background:url(../images/icons16.png) -64px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j6{background:url(../images/icons16.png) -80px 0px;height:16px;width:16px;cursor:pointer;border:none;}.lbbutton{width:74px;height:74px;border-radius:5px;background-color:white;margin-left:8px;margin-top:8px;position:relative;cursor:pointer;opacity:0.5;}.lbbutton:hover{opacity:1;}.lbbuttonsel{opacity:0.9;}.lbbuttonsel2{width:82px;border-radius:5px 0px 0px 5px;opacity:1;}.lb1{background:url(../images/leftbar-62.jpg) -0px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb2{background:url(../images/leftbar-62.jpg) -75px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb3{background:url(../images/leftbar-62.jpg) -150px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb4{background:url(../images/leftbar-62.jpg) -225px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb5{background:url(../images/leftbar-62.jpg) -294px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb6{background:url(../images/leftbar-62.jpg) -360px 0px;height:62px;width:62px;cursor:pointer;border:none;}.m0{background :url(../images/images16.png) -32px 0px;height :16px;width :16px;border:none;float:left }.m1{background :url(../images/images16.png) -16px 0px;height :16px;width :16px;border:none;float:left }.m2{background :url(../images/images16.png) -96px 0px;height :16px;width :16px;border:none;float:left }.m3{background :url(../images/images16.png) -112px 0px;height :16px;width :16px;border:none;float:left }.si0{background :url(../images/icons16.png) 0px 0px;height :16px;width :16px;border:none;float:left }.si1{background :url(../images/icons16.png) -16px 0px;height :16px;width :16px;border:none;float:left }.si2{background :url(../images/icons16.png) -32px 0px;height :16px;width :16px;border:none;float:left }.si3{background :url(../images/icons16.png) -48px 0px;height :16px;width :16px;border:none;float:left }.si4{background :url(../images/icons16.png) -64px 0px;height :16px;width :16px;border:none;float:left }.mi{background :url(../images/meshicon50.png) 0px 0px;height:50px;width:50px;cursor:pointer;border:none }#floatframe{position:fixed;top:200px;height:300px;z-index:200;display:none;}.style1{text-align:center;}.style2{text-align:center;background-color:#808080;font-weight:bold;}.style3{text-align:center;color:white;background-color:#808080;font-weight:bold;}.style3x{text-align:center;color:white;background-color:#808080;font-weight:bold;}.style3x:hover{background-color:#606060;}.style3sel{text-align:center;color:white;background-color:#003366;font-weight:bold;}.style4{color:white;text-decoration:none;}.style5{text-align:center;background-color:#808080;font-weight:normal;}.style6{text-align:center;background-color:#D3D9D6;}.style7{font-size:large;background-color:#FFFFFF;}.style10{background-color:#C9C9C9;}.style11{font-size:large;background-color:#C9C9C9;}.style14{text-align:left;background-color:#D3D9D6;}.auto-style1{text-align:right;background-color:#D3D9D6;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.fsize{float:right;text-align:right;width:180px;}.g1{background-position:0% 0%;width:14px;height:100%;float:left; background-image:linear-gradient(to right, #ffffff 0%, #c9c9c9 100%);background-color:#c9c9c9;background-repeat:repeat;background-attachment:scroll;}.g1s{background-image:linear-gradient(to right, #ffffff 0%, #b9b9b9 100%);}.g2{background-position:0% 0%;width:14px;height:100%;float:right; background-image:linear-gradient(to right, #c9c9c9 0%, #ffffff 100%);background-color:#c9c9c9;background-repeat:repeat;background-attachment:scroll;}.g2s{background-image:linear-gradient(to right, #b9b9b9 0%, #ffffff 100%);}.h1{background-position:0% 0%;width:14px;height:100%; background-image:linear-gradient(to right, #ffffff 0%, #d3d9d6 100%);background-color:#d3d9d6;background-repeat:repeat;background-attachment:scroll;}.h2{background-position:0% 0%;width:14px;height:100%; background-image:linear-gradient(to right, #d3d9d6 0%, #ffffff 100%);background-color:#d3d9d6;background-repeat:repeat;background-attachment:scroll;}.e1{font-size:large;margin-top:4px;margin-bottom:3px;overflow:hidden;word-wrap:hyphenate;white-space:nowrap;text-overflow:ellipsis;}.e2{float:left;height:100%;background-color:#c9c9c9;}.e2s{background-color:#b9b9b9;}.bar{font-size:large;background-color:#C9C9C9;height:24px;float:left;margin-bottom:2px;}.bar2{font-size:large;height:24px;float:left;margin-bottom:2px;}.bar18{font-size:large;background-color:#C9C9C9;height:18px;float:left;margin-bottom:2px;}.bar182{font-size:large;height:18px;float:left;margin-bottom:2px;}.devHeaderx{color:lightgray;}.DevSt{border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#DDDDDD;}.contextMenu{background:#F9F9F9;box-shadow:0 0 12px rgba( 0, 0, 0, .3 );border:1px solid #ccc; display:none;position:absolute;top:0;left:0;list-style:none;margin:0;padding:5px;min-width:100px;max-width:150px;z-index:500;}.cmtext{color:#444;display:inline-block;padding-left:8px;padding-right:8px;padding-top:5px;padding-bottom:5px;text-decoration:none;width:85%;cursor:default;overflow:hidden;position:relative;}.cmtext:hover{color:#f9f9f9;background:#444;}.gray{ filter:gray; -webkit-filter:grayscale(100%) opacity(60%); }.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.notifiyBox{position:absolute;z-index:1000;top:50px;right:26px;width:300px;text-align:left;background-color:#F0ECCD;border:4px solid #666;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-box-shadow:2px 2px 4px #888;-moz-box-shadow:2px 2px 4px #888;box-shadow:2px 2px 4px #888;max-height:200px;}.notifiyBox:before{content:' ';position:absolute;width:0;height:0;right:5px;top:-30px;border:15px solid;border-color:transparent #666 #666 transparent;}.notifiyBox:after{content:' ';position:absolute;width:0;height:0;right:7px;top:-24px;border:12px solid;border-color:transparent #F0ECCD #F0ECCD transparent;}.notification{width:100%;min-height:30px;}.notification:hover{background-color:#EFE8B6;}.deskToolsBar{padding:3px;}.deskToolsBar:hover{background-color:#EFE8B6;}.userTableHeader{border-bottom:1pt solid lightgray;padding-top:4px;padding-bottom:4px;}.viewSelector{width:32px;height:32px;background-color:#DDD;border-radius:3px;float:left;margin-left:5px;cursor:pointer;opacity:0.3;}.viewSelectorSel{background-color:#BBB;opacity:0.8;}.viewSelector:hover{opacity:0.5;background-color:#AAA;}.viewSelector1{margin-left:2px;margin-top:2px;background:url(../images/views.png) -0px 0px;height:28px;width:28px;}.viewSelector2{margin-left:2px;margin-top:2px;background:url(../images/views.png) -28px 0px;height:28px;width:28px;}.viewSelector3{margin-left:2px;margin-top:2px;background:url(../images/views.png) -56px 0px;height:28px;width:28px;}.viewSelector4{margin-left:2px;margin-top:2px;background:url(../images/views.png) -84px 0px;height:28px;width:28px;}.viewSelector5{margin-left:2px;margin-top:2px;background:url(../images/views.png) -112px 0px;height:28px;width:28px;}.backButtonEx{margin-left:2px;margin-top:2px;background:url(../images/views.png) -140px 0px;height:28px;width:28px;}.backButton{width:32px;height:32px;background-color:#DDD;border-radius:3px;float:left;margin-right:5px;cursor:pointer;opacity:0.3;}.backButton:hover{opacity:0.5;background-color:#AAA;}.hoverButton{opacity:0.5;}.hoverButton:hover{opacity:1;}</style> <style>.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f;}.ol-mouse-position{top:8px;right:8px;position:absolute;}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute;}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;}.ol-overlay-container{will-change:left,right,top,bottom;}.ol-unsupported{display:none;}.ol-unselectable, .ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing;}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px;}.ol-control:hover{background-color:rgba(255,255,255,.6);}.ol-zoom{top:.5em;right:.5em;}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear;}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s;}.ol-zoom-extent{top:4.643em;left:.5em;}.ol-full-screen{right:.5em;top:.5em;}@media print{.ol-control{display:none;}}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px;}.ol-control button::-moz-focus-inner{border:none;padding:0;}.ol-zoom-extent button{line-height:1.4em;}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform;}.ol-touch .ol-control button{font-size:1.5em;}.ol-touch .ol-zoom-extent{top:5.5em;}.ol-control button:focus, .ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7);}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0;}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px;}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);}.ol-attribution ul{margin:0;padding:0 .5em;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff;}.ol-attribution li{display:inline;list-style:none;line-height:inherit;}.ol-attribution li:not(:last-child):after{content:" ";}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle;}.ol-attribution button, .ol-attribution ul{display:inline-block;}.ol-attribution.ol-collapsed ul{display:none;}.ol-attribution.ol-logo-only ul{display:block;}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8);}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em;}.ol-attribution.ol-logo-only{background:0 0;bottom:.4em;height:1.1em;line-height:1em;}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em;}.ol-attribution.ol-logo-only button, .ol-attribution.ol-uncollapsible button{display:none;}.ol-zoomslider{top:4.5em;left:.5em;height:200px;}.ol-zoomslider button{position:relative;height:10px;}.ol-touch .ol-zoomslider{top:5.5em;}.ol-overviewmap{left:.5em;bottom:.5em;}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0;}.ol-overviewmap .ol-overviewmap-map, .ol-overviewmap button{display:inline-block;}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px;}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute;}.ol-overviewmap.ol-collapsed .ol-overviewmap-map, .ol-overviewmap.ol-uncollapsible button{display:none;}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8);}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7);}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move;}</style> <style> .ol-ctx-menu-container{position:absolute;padding:8px;background:#fff;color:#222;font-size:13px;border-radius:5px;box-shadow:3px 3px 5px rgba(0,0,0,.2);box-sizing:border-box}.ol-ctx-menu-container a,.ol-ctx-menu-container div,.ol-ctx-menu-container img,.ol-ctx-menu-container li,.ol-ctx-menu-container span,.ol-ctx-menu-container ul{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.ol-ctx-menu-container a img{border:none}.ol-ctx-menu-container *,.ol-ctx-menu-container :after,.ol-ctx-menu-container :before{box-sizing:inherit}.ol-ctx-menu-container.ol-ctx-menu-hidden{opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .3s,opacity .3s;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container ul{list-style:none}.ol-ctx-menu-container li{position:relative;line-height:20px;padding:2px 5px}.ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover{cursor:pointer;background-color:#333;color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-submenu .ol-ctx-menu-container{border:1px solid #eee;padding:8px;top:0;opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .3s,opacity .3s;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover .ol-ctx-menu-container{opacity:1;visibility:visible;-webkit-transition-delay:0s;transition-delay:0s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:after{position:absolute;top:7px;right:10px;content:"";display:inline-block;width:.6em;height:.6em;border-right:.3em solid #222;border-top:.3em solid #222;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover:after{border-color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-separator{padding:0}.ol-ctx-menu-container li.ol-ctx-menu-separator hr{border:0;height:1px;background-image:-webkit-linear-gradient(right,transparent,rgba(0,0,0,.75),transparent);background-image:linear-gradient(270deg,transparent,rgba(0,0,0,.75),transparent)}.ol-ctx-menu-icon{text-indent:20px;background-size:20px auto;background-repeat:no-repeat;background-position:0}.ol-ctx-menu-zoom-in{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaUlEQVQ4T72U7VHCQBCGn90GtAMuNGCswFiBWIFQgWMFxg6wArECsQKhArEBiB1Qwa1zgQn5IAYcxv13k71n3919L8KJQ07M47+BzgG9TRfZ/JBuWhS6BJFHRJICYrZGZIz3z5Ct2+B7gG6I6kt+wewdkQVwjtkAkR5mC8yu26A1oItR/cTsOweQBdgutD8G7jGm2PJ2n8oqUKIpIjd4HxTM8gvaT/F+AlmWnyWaIXKF95eNguFzTYFhNsdWu9kFgFlaFMANUH3D8wDLoLgSTSD2il8NCe2ZXQBxWDGwxmyUzzOMBZ7wy7Qb2K0wQfXjMOBuhlFpZtNty5sFaTQBuTusZdymeqs1SpYKcO9HkE3KbTd9WFijMHJQ5hBNEAYNq5Qd0dhyke0GiE4QzjqfW23mHT8Hl4DG4Lce3FPE7AtbBSdsbNqpoJLgYkRnNeUV+xwJDHTnUEkxHGbhBXUs5TjJjew/KPy94g+NRaIVRYmMXwAAAABJRU5ErkJggg==")}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-in{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABc0lEQVQ4T71U21ECQRDsJgGdvQDECMQIxAjECMQILCPwzAAjECIQI0AiEDPQAPaWCBhrcKHuCUcV5f7dY3v6tUscefHIePhfwBBCF8CZqRCReRs1tQxDCH1VfQLQz4EsSY4AvIjIsgm8AhhCGKrqa9zwrqoLAKckB5HtguR1E2gBMITQU9VPAD8GICIGtl3e+xHJBwBT59xtHcsCYJZlUwA3kcGHbfDep51OZywi3/acZZm9vyJ5WR5o38uACmDunNt6ZwAkUxFZDwghDFT1jeSjiJinhVUBVNVJkiTDKO8CQA+AsbNQ7s1Ps0VVn5MkSfcCtmBoDZi1Bdx4eJ7zbBolrwPy3o9J3rWSHPs3A1BbjVKlYBaIyDgvu9LDXDU2RTZmXVW1oKyLxRD+OrkOrJLy5mVM0iaftDhuhVbsvBzMglzKUNW6IV/OOWtCM8MmVvEkmbwt83LaB19fdgOtVquUZJeknaDdobTwbOcvBzPcN/AXH1DFFWP7u9oAAAAASUVORK5CYII=")}.ol-ctx-menu-zoom-out{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABU0lEQVQ4T72U7VECMRRFz3sNaAdkacC1AtcKxApcKnCsQOwAK3CtQKxAqEBsANYOqCDPyTIC+8WCw5jfybn33dxEOPGSE/P4b6BzQG89RT47ZJoWhy5B5BGRZAMxWyEyxvtnyFdt8AagS1F9KQ6YvSMyB84xGyDSw2yO2XUbtAJ0MaqfmH0XAPIA2y7tj4F7jAm2uG1yWQZKNEHkBu+Dg2njWBJNEbnC+8uaIFRuWfuG2QxbbrOrUd0A1Tc8D7AIjkur7DAAsVf8MiWMZ3ZR2m02LPIMscATfjHqBnY7TFD9OAy4zTCCPG/MUKMM5O6wkXFr9dZq7FQqqHk/hDzbFa73cFONTZFDdRyiCcKg5rrSiLaXkiI6RjjrfG6VzDs+B5eAxuDXeYpmNRGzL2wZ/wof+du4GNFpBVqqz5HA4MM5VEYYDrOs+1I6Q9u/4Q8O9wN/AGgWjBVqQjjgAAAAAElFTkSuQmCC")}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-out{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABYklEQVQ4T72U4VHCQBCF36tA91KAWIFYgViBWIFYgWMFYgdYgVCBWAFSgdiBFpAsFWSdxcDkQoBkhnF/ZjbfvX377ogjF4/Mw/8CVbUD4MynEJF5k2lqFapqz8yeAPRKkCXJEYAXEVnugm8BVXVgZq/FD+9mtgBwSrJfqF2QvN4FjYCq2jWzTwA/DhARh20qTdMRyQcA0xDCbZ3KCJhl2RTATaHgo+6HLMv8+xXJy+qB3l8FGoB5CKHsXcRV1b6ZvZF8FBH3NKotoJlNkiQZFONdlLtJ3rufbouZPSdJMjwIbKDQEzBrClx7eC4i33Uepmk6JnnXaOQifzMAtdGoRApugYiMI1uqKkrRWAfZo9MxM1+UZzFewl8mN4nYdVM83L7BkwbXLUrF3sfBLQDQBbDy08x8vOohXyEE71lVq9emuEk+3gZa3XYroCvwFyjP8yHJDsnxwaU08GxvS2uFhw78BbzWrxXgMbsHAAAAAElFTkSuQmCC")}</style> <script type="text/javascript" src="scripts/charts.js"></script> <script type="text/javascript" src="scripts/filesaver.1.1.20151003.js"></script> <script type="text/javascript" src="scripts/ol.js"></script> <script type="text/javascript" src="scripts/ol3-contextmenu.js"></script> <title>MeshCentral</title> </head> <body id="body" onload="if (typeof(startup) !== 'undefined') startup();" oncontextmenu="handleContextMenu(event)" style="display:none"> <div id="contextMenu" class="contextMenu noselect" style="display:none"> <div id="cxinfo" class="cmtext" onclick="cmaction(1,event)"><b>Information</b></div> <div id="cxdesktop" class="cmtext" onclick="cmaction(3,event)">Desktop</div> <div id="cxterminal" class="cmtext" onclick="cmaction(2,event)">Terminal</div> <div id="cxfiles" class="cmtext" onclick="cmaction(4,event)">Files</div> <div id="cxevents" class="cmtext" onclick="cmaction(5,event)">Events</div> <div id="cxconsole" class="cmtext" onclick="cmaction(6,event)">Console</div> <hr id="cxmgroupsplit"> <div id="cxmdesktop" class="cmtext" onclick="cmaction(7,event)" style="display:none">Multi-Desktop</div> </div> <div id="meshContextMenu" class="contextMenu,noselect" style="display:none;min-width:0px"> <div id="cxselectall" class="cmtext" onclick="cmmeshaction(1,event)">Select All</div> <div id="cxselectnone" class="cmtext" onclick="cmmeshaction(2,event)">Select None</div> <hr id="cxmgroupsplit2" style="display:none"> <div id="cxmmdesktop" class="cmtext" style="display:none" onclick="cmmeshaction(3,event)">Multi-Desktop</div> </div> <div id="container" style="max-height:100vh;position:relative"> <div id="notifiyBox" class="notifiyBox" style="display:none"></div> <div id="mastheadx"></div> <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"> <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px"> <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title}}}</font></strong> </div> <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px"> <strong><font style="font-size:14px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong> </div> <div style="float:right"> <div id="notificationCount" onclick="clickNotificationIcon()" class="unselectable" style="display:none;min-width:28px;font-size:20px;border-radius:5px;background-color:lightblue;text-align:center;margin:8px;cursor:pointer;padding:4px" title="Click to view current notifications">0</div> </div> <p id="logoutControl">{{{logoutControl}}}</p> </div> <div id="page_leftbar" style="height:calc(100vh - 66px);width:90px;position:absolute;z-index:1000;background:#113962;background:linear-gradient(to bottom, #104893 0%,#113962 100%);color:white;display:none"> <div style="height:16px"></div> <div id="LeftMenuMyDevices" class="lbbutton lbbuttonsel" title="My Devices" onclick="go(1)"> <div class="lb2" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyAccount" class="lbbutton" title="My Account" onclick="go(2)"> <div class="lb1" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyEvents" class="lbbutton" title="My Events" onclick="go(3)"> <div class="lb3" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyFiles" class="lbbutton" title="My Files" onclick="go(5)"> <div class="lb4" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyUsers" class="lbbutton" title="My Users" onclick="go(4)"> <div class="lb5" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyServer" class="lbbutton" title="My Server" onclick="go(6)" style="display:none"> <div class="lb6" style="position:absolute;top:6px;left:6px"></div> </div> </div> <div id="page_content" style="max-height:calc(100vh - 130px)"> <div id="topbarmaster"> <div id="topbar" class="noselect"> <div> <div style="position:relative"> <div style="position:absolute;top:3px;right:6px"> <span title="Toggle full width" style="cursor:pointer;color:white" onclick="toggleFullScreen(1)">&harr;</span> </div> <table id="MainMenuSpan" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="MainMenuMyDevices" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(1)">My Devices</td> <td id="MainMenuMyAccount" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(2)">My Account</td> <td id="MainMenuMyEvents" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(3)">My Events</td> <td id="MainMenuMyFiles" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(5)">My Files</td> <td id="MainMenuMyUsers" style="width:100px;height:24px;cursor:pointer;display:none" class="style3x" onclick="go(4)">My Users</td> <td id="MainMenuMyServer" style="width:100px;height:24px;cursor:pointer;display:none" class="style3x" onclick="go(6)">My Server</td> <td class="style3" style="text-align:right;height:24px">&nbsp;</td> </tr> </table> <div id="MainSubMenuSpan" style="display:none"> <table id="MainSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="MainDev" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(10)">General</td> <td id="MainDevDesktop" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(11)">Desktop</td> <td id="MainDevTerminal" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(12)">Terminal</td> <td id="MainDevFiles" style="width:100px;height:24px;cursor:pointer;display:none" class="style3x" onclick="go(13)">Files</td> <td id="MainDevEvents" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(16)">Events</td> <td id="MainDevAmt" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(14)">Intel&reg; AMT</td> <td id="MainDevConsole" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(15)">Console</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="MeshSubMenuSpan" style="display:none"> <table id="MeshSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="MeshGeneral" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(20)">General</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="UserSubMenuSpan" style="display:none"> <table id="UserSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="UserGeneral" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(30)">General</td> <td id="UserEvents" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(31)">Events</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="ServerSubMenuSpan" style="display:none"> <table id="ServerSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="ServerGeneral" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(6)">General</td> <td id="ServerConsole" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(115)">Console</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="UserDummyMenuSpan"> <table id="UserDummyMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr><td class="style3" style="text-align:right;height:24px">&nbsp;</td></tr> </table> </div> </div> </div> </div> </div> <div id="column_l"> <div id="p0" style="display:none"> <div id="p0message" style="margin:50px;text-align:center"><span id="p0span">Server disconnected</span>, <href onclick="reload()" style="cursor:pointer"><u>click to reconnect</u></href>.</div> </div> <div id="p1" style="display:none"> <div style="float:right;display:none" id="devListToolbarViewIcons"> <div id="devViewButton1" class="viewSelector" onclick="onDeviceViewChange(1)" title="Columns"><div class="viewSelector2"></div></div> <div id="devViewButton2" class="viewSelector" onclick="onDeviceViewChange(2)" title="List"><div class="viewSelector1"></div></div> <div id="devViewButton3" class="viewSelector" onclick="onDeviceViewChange(3)" title="Desktops"><div class="viewSelector3"></div></div> <div id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" title="Map"><div class="viewSelector4"></div></div> </div><div><h1>My Devices</h1></div> <table class="noselect" style="width:100%;height:24px;background-color:#d3d9d6;vertical-align:middle;border-spacing:0"> <tr> <td class="h1"></td> <td id="devListToolbar" class="style14" style="display:none"> &nbsp;&nbsp;<input type="button" id="SelectAllButton" onclick="selectallButtonFunction();" value="Select All">&nbsp; <input type="button" id="GroupActionButton" disabled="disabled" value="Group Action" onclick="groupActionFunction()">&nbsp; <input id="SearchInput" type="text" style="width:120px" placeholder="Filter" onchange="masterUpdate(5)" onkeyup="masterUpdate(5)" autocomplete="off" onfocus="onSearchFocus(1)" onblur="onSearchFocus(0)">&nbsp; <label><input type="checkbox" id="RealNameCheckBox" onclick="onRealNameCheckBox()"><span title="Show devices operating system name">OS Name</span></label> </td> <td id="kvmListToolbar" class="style14" style="height:100%;display:none"> &nbsp;&nbsp;<input type="button" onclick="connectAllKvmFunction()" value="Connect All">&nbsp; <input type="button" onclick="disconnectAllKvmFunction()" value="Disconnect All">&nbsp; <label><input type="checkbox" id="autoConnectDesktopCheckbox" onclick="autoConnectDesktops(event)" title="Automatic connect">Auto&nbsp;</label> <input type="button" onclick="showMultiDesktopSettings()" value="Settings">&nbsp; </td> <td id="devMapToolbar" class="style14" style="height:100%;display:none"> &nbsp;&nbsp;<input type="text" id="mapSearchLocation" placeholder="Search Location" onfocus="onMapSearchFocus(1)" onblur="onMapSearchFocus(0)"> <input type="button" value="Search" title="Search for location" onclick="getSearchLocation()"> <input type="button" id="refreshmap" title="Reset map view" value="Reset" style="margin-left:5px" onclick="refreshMap(false,true)"> </td> <td class="auto-style1" style="height:100%"> <div style="float:right;display:none" id="devListToolbarView"> View <select id="viewselect" onchange="onDeviceViewChange()"> <option value="1">Columns <option value="2">List <option value="3">Desktops <option id="viewselectmapoption" value="4">Map </select> </div> <div style="float:right;display:none" id="devListToolbarSort"> Sort <select id="sortselect" onchange="masterUpdate(6)"> <option>Group <option>Power <option>Device <option>Tags </select> &nbsp; </div> <div style="float:right;display:none" id="devListToolbarSize"> Size <select id="sizeselect" onchange="onDeviceViewChange()"> <option value="0">Small <option value="1">Medium <option value="2">Large </select> &nbsp; </div> </td> <td class="h2"></td> </tr> </table> <div id="NoMeshesPanel" style="display:none"> <table style="width:100%;padding:20px"> <tr> <td valign="top" style="width:50px"> <img src="images/info.png" height="48" width="47"> </td> <td> To get started, <a onclick="account_createMesh()" style="cursor:pointer"><strong>click here to create a device group</strong></a>. </td> </tr> </table> </div> <div id="xdevices" class="noselect" style="max-height:calc(100vh - 239px);overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;display:none"></div> <div id="xdevicesmap" style="height:calc(100vh - 239px);width:100%;overflow:hidden;position:relative;display:none"> <div id="xmapSearchResultsDlg" style="position:absolute;display:none;max-height:280px;left:5px;top:5px;max-width:250px;z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666"> <div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"> <div id="xmapSearchClose" style="float:right;padding:5px;cursor:pointer" onclick="mapCloseSearchWindow()"><b>X</b></div> <div style="padding:5px">Location Results</div> <div style="width:100%;margin:6px"></div> </div> <div id="xmapSearchResults" style="margin:6px"></div> </div> </div> <div id="xmap-info-window" style="text-shadow:0px 0px 15px #FFF"></div> </div> <div id="p2" style="display:none"> <h1>My Account</h1> <img id="p2AccountImage" alt="" width="150" height="103" src="images/mainaccount.jpg" style="margin-bottom:10px;margin-right:20px;float:right"> <div id="p2AccountSecurity" style="display:none"> <p><strong>Account security</strong></p> <div style="margin-left:25px"> <div id="manageAuthApp"><div style="width:15px;display:inline-block"><span id="authAppSetupCheck" style="color:green;font-size:10px"><strong>&#x2713;</strong></span></div><span><a onclick="account_manageAuthApp()" style="cursor:pointer">Manage authenticator app</a><br></span></div> <div id="manageHardwareOtp"><div style="width:15px;display:inline-block"><span id="authKeySetupCheck" style="color:green;font-size:10px"><strong>&#x2713;</strong></span></div><span><a onclick="account_manageHardwareOtp(0)" style="cursor:pointer">Manage security keys</a><br></span></div> <div id="manageOtp"><div style="width:15px;display:inline-block"><span id="authCodesSetupCheck" style="color:green;font-size:10px"><strong>&#x2713;</strong></span></div><span><a onclick="account_manageOtp(0)" style="cursor:pointer">Manage backup codes</a><br></span></div> </div> </div> <div id="p2AccountActions"> <p><strong>Account actions</strong></p> <p style="margin-left:40px"> <span id="verifyEmailId" style="display:none"><a onclick="account_showVerifyEmail()" style="cursor:pointer">Verify email</a><br></span> <a onclick="account_showChangeEmail()" style="cursor:pointer">Change email address</a><br> <a onclick="account_showChangePassword()" style="cursor:pointer">Change password</a><span id="p2nextPasswordUpdateTime"></span><br> <a onclick="account_showDeleteAccount()" style="cursor:pointer">Delete account</a><br> </p> <br style="clear:both"> </div> <strong>Device Groups</strong> ( <a onclick="account_createMesh()" style="cursor:pointer"><img height="12" src="images/icon-addnew.png" width="12" border="0"> New</a> ) <br><br> <div id="p2meshes"></div> <div id="p2noMeshFound" style="margin-left:40px;display:none">No device groups. <a onclick="account_createMesh()" style="cursor:pointer"><strong>Get started here!</strong></a></div> <br style="clear:both"> </div> <div id="p3" style="display:none"> <h1>My Events</h1> <table style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px;vertical-align:middle;border-spacing:0"> <tr> <td class="h1"></td> <td>&nbsp;<input id="p2deleteall" type="button" onclick="showDeleteAllEventsDialog()" style="display:none" value="Delete All..."></td> <td class="auto-style1"> Show <select id="p3limitdropdown" onchange="refreshEvents()"> <option value="60">Last 60 <option value="120">Last 120 <option value="250">Last 250 <option value="500">Last 500 <option value="1000">Last 1000 </select> </td> <td class="h2"></td> </tr> </table> <div id="p3events" style="height:calc(100vh - 243px);overflow-y:scroll"></div> </div> <div id="p4" style="display:none"> <h1>My Users</h1> <table style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px;vertical-align:middle;border-spacing:0"> <tr> <td class="h1"></td> <td class="style14"> <div style="float:right"> <input type="button" onclick="showUserBroadcastDialog()" style="margin-right:6px" value="Broadcast"> </div> <div> <input id="UserNewAccountButton" type="button" style="margin-left:6px" onclick="showCreateNewAccountDialog()" value="New Account..."> <input id="UserSearchInput" type="text" style="width:120px;margin-left:6px" placeholder="Filter" onchange="onUserSearchInputChanged()" onkeyup="onUserSearchInputChanged()" autocomplete="off" onfocus="onUserSearchFocus(1)" onblur="onUserSearchFocus(0)"> </div> </td> <td class="h2"></td> </tr> </table> <div id="p3users" style="max-height:calc(100vh - 243px);overflow-y:auto"></div> </div> <div id="p5" style="display:none"> <h1>My Files</h1> <table id="p5toolbar" style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign="bottom"> <div id="p5rightOfButtons" style="float:right;margin-top:3px"></div> <div> <input type="button" id="p5FolderUp" disabled="disabled" onclick="p5folderup();" value="Up">&nbsp; <input type="button" id="p5SelectAllButton" disabled="disabled" onclick="p5selectallfile();" value="Select All" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5RenameFileButton" disabled="disabled" value="Rename" onclick="p5renamefile();" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5DeleteFileButton" disabled="disabled" value="Delete" onclick="p5deletefile();" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5NewFolderButton" disabled="disabled" value="New Folder" onclick="p5createfolder();" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5UploadButton" disabled="disabled" value="Upload" onclick="p5uploadFile()" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5CutButton" disabled="disabled" value="Cut" onclick="p5copyFile(1)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p5CopyButton" disabled="disabled" value="Copy" onclick="p5copyFile(0)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p5PasteButton" disabled="disabled" value="Paste" onclick="p5pasteFile()" onkeypress="return false" onkeydown="return false">&nbsp; </div> </td> </tr> <tr> <td style="background-color:#E4E9E7;height:28px"> <div style="float:right"> <select id="p5sortdropdown" onchange="updateFiles()"> <option value="1" selected="selected">Sort by name <option value="2">Sort by size <option value="3">Sort by date <option value="4">Descend by name <option value="5">Descend by size <option value="6">Descend by date </select> </div> <div>&nbsp;&nbsp;<span id="p5currentpath"></span></div> </td> </tr> </table> <div id="p5filetable" style="width:100%;height:calc(100vh - 294px);overflow:auto;-webkit-user-select:none;position:relative"> <div id="p5PublicShare" style="display:none;width:100%;overflow:auto;-webkit-user-select:none;background-color:lightsteelblue"><div style="padding:4px">These files are shared publicly, click "link" to get public url.</div></div> <div id="bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:20px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&checkmark;</b></div> <div id="bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:20px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&#10007;</b></div> <span id="p5files"></span> </div> <table id="p5toolbarBottom" style="width:100%" cellpadding="0" cellspacing="0"> <tr><td class="style6" style="text-align:left;padding:3px">&nbsp;<span id="p5bottomstatus"></span></td></tr> </table> </div> <div id="p6" style="display:none"> <img id="MainMeshImage" src="serverpic.ashx" style="border-width:0px;height:200px;width:200px;float:right"> <h1>My Server</h1> <p id="p2ServerActions"><strong>Server actions</strong></p> <p style="margin-left:40px"> <div id="p2ServerActionsBackup" style="margin-left:40px"><a href="/backup.zip" rel="noreferrer noopener" target="_blank" style="cursor:pointer">Download server backup</a></div> <div id="p2ServerActionsRestore" style="margin-left:40px"><a onclick="server_showRestoreDlg()" style="cursor:pointer">Restore server with backup</a></div> <div id="p2ServerActionsVersion" style="margin-left:40px"><a onclick="server_showVersionDlg()" style="cursor:pointer">Check server version</a></div> <div id="p2ServerActionsErrors" style="margin-left:40px"><a onclick="server_showErrorsDlg()" style="cursor:pointer">Show server error log</a></div> </p> <br><strong>Server Statistics</strong><br><br> <div id="serverStats" style="margin-left:40px"> <div id="serverCpuChartView" style="display:none"> <div style="width:60px;display:inline-block"><canvas id="serverCpuChart" style="width:60px;height:60px"></canvas></div> <div style="width:160px;display:inline-block" id="serverCpuChartText"></div> </div> <div id="serverMemoryChartView" style="display:none"> <div style="width:60px;display:inline-block"><canvas id="serverMemoryChart" style="width:60px;height:60px"></canvas></div> <div style="width:160px;display:inline-block" id="serverMemoryChartText"></div> </div><br><br> <div id="serverStatsTable"></div> </div> </div> <div id="p10" style="display:none"> <table style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="width:auto" valign="top"> <div id="p10title"> <div id="p10BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>General - <span id="p10deviceName"></span></h1> </div> <div id="p10html"></div> </td> <td style="width:20px"></td> <td style="width:200px"> <a style="cursor:pointer" onclick="p10showiconselector()"><img id="MainComputerImage" style="border-width:0px;height:200px;width:200px"></a> <div style="width:100%;text-align:center"><strong><span id="MainComputerState"></span></strong></div> </td> </tr> </table><br> <div id="p10html2"></div> <div id="p10html3"></div> </div> <div id="p11" class="noselect" style="display:none"> <div id="p11title"> <div id="p11deviceNameHeader"> <div id="p11BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <div style="float:right" id="devListToolbarViewIcons"><div class="viewSelector" onclick="deskToggleFull(event)" title="Full Screen. Hold shift to browser full screen."><div class="viewSelector5"></div></div></div> <h1>Desktop - <span id="p11deviceName"></span></h1> </div> </div> <div id="p14warning" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showFeaturesDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Intel&reg; AMT Redirection port or KVM feature is disabled<span id="p14warninga">, click here to enable it.</span></div> </div> <div id="p14warning2" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showPowerActionDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Remote computer is not powered on, click here to issue a power command.</div> </div> <table id="deskarea0" cellpadding="0" cellspacing="0" style="width:100%;padding:0px;padding:0px;margin-top:0px"> <tr id="deskarea1"> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <span id="p14power"></span>&nbsp; <div style='cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px' title="Rotate Left" onclick="drotate(-1)">&olarr;</div> <div style='cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px' title="Rotate Right" onclick="drotate(1)">&orarr;</div> <input id="deskFocusBtn" type="button" title="Toggle focus mode, when active only the region around the mouse is updated" onkeypress="return false" onkeydown="return false" value="Focus All" onclick="deskToggleFocus()" style="margin-right:3px;display:none"> <input id="deskSaveBtn" type="button" title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value="Save..." onclick="deskSaveImage()" style="margin-right:3px"> <input id="deskActionsBtn" type="button" title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value="Actions" onclick="deviceActionFunction()" style="margin-right:3px"> <input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" style="margin-right:3px"> <input type="button" title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="margin-right:3px;display:none"> </div> <div> <div id="idx_deskFullBtn2" onclick="deskToggleFull(event)" style="float:left;font-size:large;cursor:pointer;display:none">&nbsp;&#x2716;</div> <input type="button" id="autoconnectbutton1" value="AutoConnect" onclick="autoConnectDesktop(event)" onkeypress="return false" onkeydown="return false" style="display:none"> <span id="connectbutton1span">&nbsp;<input type="button" id="connectbutton1" value="Connect" onclick="connectDesktop(event,1)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="connectbutton1hspan">&nbsp;<input type="button" id="connectbutton1h" value="HW Connect" onclick="connectDesktop(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="disconnectbutton1span">&nbsp;<input type="button" id="disconnectbutton1" value="Disconnect" onclick="connectDesktop(event,0)" onkeypress="return false" onkeydown="return false"></span> &nbsp;<span id="deskstatus">Disconnected</span> </div> </td> </tr> <tr id="deskarea2"> <td> <div style="background-color:gray"><div id="progressbar" style="height:2px;width:0%;background-color:red"></div></div> </td> </tr> <tr id="deskarea3"> <td id="deskarea3x" style="background:black;text-align:center;position:relative;overflow:hidden"> <div id="DeskFocus" style="overflow:hidden;color:transparent;border:3px dotted rgba(255,0,0,.2);position:absolute;border-radius:5px" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)"></div> <div id="DeskParent" style="overflow:hidden"> <canvas id="Desk" width="640" height="480" style="overflow:hidden;width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)" onmousewheel="dmousewheel(event)"></canvas> </div> <div id="DeskTools" style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid lightgray;display:none"> <a id="DeskToolsRefreshButton" style="float:right;padding:3px;cursor:pointer" onclick="refreshDeskTools()">Refresh</a> <div id="DeskToolsBar" style="position:absolute;padding:3px;border-radius:3px 3px 0px 0px;top:5px;left:4px;bottom:26px;background-color:lightgray;cursor:pointer">Processes</div> <div style="position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:lightgray;text-align:left"> <div style="border-bottom:1px solid darkgray;padding:3px"><a style="width:50px;padding-right:5px;float:left;cursor:pointer" title="Sort by process id" onclick="sortProcess(0)">PID</a><a style="cursor:pointer" title="Sort by name" onclick="sortProcess(1)">Name</a></div> <div id="DeskToolsProcesses" style="overflow-y:scroll;position:absolute;top:24px;bottom:0px;width:100%"></div> </div> </div> </td> </tr> <tr id="deskarea4"> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <select id="termdisplays" style="display:none" onchange="deskSetDisplay(event)" onclick="deskGetDisplayNumbers(event)"></select>&nbsp; <input id="DeskToolsButton" type="button" value="Tools" title="Toggle tools view" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">&nbsp; <span id="DeskChatButton" style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Open chat window to this computer"><img src='images/icon-chat.png' onclick="deviceChat()" height="16" width="16" style="padding-top:2px"></span> <span id="DeskNotifyButton" style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Display a notification on the remote computer"><img src='images/icon-notify.png' onclick="deviceToastFunction()" height="16" width="16" style="padding-top:2px"></span> <span id="DeskOpenWebButton" style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Open a web address on remote computer"><img src='images/icon-url2.png' onclick="deviceUrlFunction()" height="16" width="16" style="padding-top:2px"></span> </div> <div> <select style="margin-left:6px" id="deskkeys"> <option value="5">Win <option value="0">Win+Down <option value="1">Win+Up <option value="2">Win+L <option value="3">Win+M <option value="4">Shift+Win+M <option value="6">Win+R </select> <input id="DeskWD" type="button" value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()"> <input id="DeskClip" style="margin-left:6px;display:none" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()"> <input id="DeskCAD" type="button" value="Ctrl-Alt-Del" onkeypress="return false" onkeydown="return false" onclick="sendCAD()"> <label><span id="DeskControlSpan" style="margin-left:6px" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()">Input</span></label>&nbsp; </div> </td> </tr> </table> </div> <div id="p12" style="display:none"> <div id="p12title"> <div id="p12BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Terminal - <span id="p12deviceName"></span></h1> </div> <div id="p12warning" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showFeaturesDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Intel&reg; AMT Redirection port or KVM feature is disabled<span id="p14warninga">, click here to enable it.</span></div> </div> <div id="p12warning2" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showPowerActionDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Remote computer is not powered on, click here to issue a power command.</div> </div> <table cellpadding="0" cellspacing="0" style="width:100%;padding:0px;padding:0px;margin-top:0px"> <tr> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <input id="termActionsBtn" type="button" title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value="Actions" onclick="deviceActionFunction()" style="margin-right:3px"> </div> <div> <input type="button" id="autoconnectbutton2" value="AutoConnect" onclick="autoConnectTerminal(event)" onkeypress="return false" onkeydown="return false" style="display:none"> <span id="connectbutton2span">&nbsp;<input type="button" id="connectbutton2" value="Connect" onclick="connectTerminal(event,1)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="connectbutton2hspan">&nbsp;<input type="button" id="connectbutton2h" value="HW Connect" onclick="connectTerminal(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="disconnectbutton2span">&nbsp;<input type="button" id="disconnectbutton2" value="Disconnect" onclick="connectTerminal(event,0)" onkeypress="return false" onkeydown="return false"></span> &nbsp;<span id="termstatus">Disconnected</span> </div> </td> </tr> <tr> <td> <div style="background-color:gray"><div id="termprogressbar" style="height:2px;width:0%;background-color:red"></div></div> </td> </tr> <tr> <td style="background:black;text-align:center;height:500px;position:relative"> <pre id="Term" style="background:black;margin:0;padding:0"></pre> </td> </tr> <tr> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <span id="terminalSettingsButtons" style="display:none"> <input id="id_tcrbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="CR+LF" title="Toggle what the return key will send" onclick="termToggleCr()"> <input id="id_tfxkeysbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx()"> <input id="id_ttypebutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType()"> </span> <select id="specialkeylist" onkeypress="return false" style="margin-left:5px"></select> <input id="specialkeylistinput" type="button" onkeypress="return false" class="bottombutton" value="Send" title="Send the selected special key" onclick="sendSpecialKey()"> </div> <div> &nbsp; <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="ctrlcbutton" value="Ctl-C" onclick="termSendKey(3,'ctrlcbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="ctrlxbutton" value="Ctl-X" onclick="termSendKey(24,'ctrlxbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="escbutton" value="ESC" onclick="termSendKey(27,'escbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="bsbutton" value="Backspace" onclick="termSendKey(8,'bsbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="pastebutton" value="Paste" title="Paste text into the terminal" onclick="showTermPasteDialog()"> </div> </td> </tr> </table> </div> <div id="p13" style="display:none"> <div id="p13title"> <div id="p13BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Files - <span id="p13deviceName"></span></h1> </div> <table id="p13toolbar" style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="background-color:#C0C0C0;border-bottom:2px solid black;padding:2px"> <div style="float:right;text-align:right"> <input id="filesActionsBtn" type="button" title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value="Actions" onclick="deviceActionFunction()" style="margin-right:3px"> </div> <div> <input id="p13AutoConnect" value="AutoConnect" onclick="autoConnectFiles(event)" onkeypress="return false" onkeydown="return false" type="button" style="display:none"> <input id="p13Connect" value="Connect" onclick="connectFiles(event)" onkeypress="return false" onkeydown="return false" type="button"> <span id="p13Status">Disconnected</span> </div> </td> </tr> <tr> <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign="bottom"> <div id="p13rightOfButtons" style="float:right;margin-top:3px"></div> <div> <input type="button" id="p13FolderUp" disabled="disabled" onclick="p13folderup()" value="Up">&nbsp; <input type="button" id="p13SelectAllButton" disabled="disabled" onclick="p13selectallfile()" value="Select All" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13RenameFileButton" disabled="disabled" value="Rename" onclick="p13renamefile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13DeleteFileButton" disabled="disabled" value="Delete" onclick="p13deletefile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13NewFolderButton" disabled="disabled" value="New Folder" onclick="p13createfolder()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13UploadButton" disabled="disabled" value="Upload" onclick="p13uploadFile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13CutButton" disabled="disabled" value="Cut" onclick="p13copyFile(1)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13CopyButton" disabled="disabled" value="Copy" onclick="p13copyFile(0)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13PasteButton" disabled="disabled" value="Paste" onclick="p13pasteFile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13RefreshButton" disabled="disabled" value="Refresh" onclick="p13folderup(9999)" onkeypress="return false" onkeydown="return false">&nbsp; </div> </td> </tr> <tr> <td style="background-color:#E4E9E7;height:28px"> <div style="float:right"> <select id="p13sortdropdown" onchange="p13updateFiles()"> <option value="1" selected="selected">Sort by name <option value="2">Sort by size <option value="3">Sort by date <option value="4">Descend by name <option value="5">Descend by size <option value="6">Descend by date </select> </div> <div>&nbsp;&nbsp;<span id="p13currentpath"></span></div> </td> </tr> </table> <div id="p13filetable" style="width:100%;height:calc(100vh - 346px);overflow:auto;-webkit-user-select:none"> <div id="p13bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&checkmark;</b></div> <div id="p13bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&#10007;</b></div> <span id="p13files"></span> </div> <table id="p13toolbarBottom" style="width:100%" cellpadding="0" cellspacing="0"> <tr><td class="style6" style="text-align:left;padding:3px">&nbsp;<span id="p13bottomstatus"></span></td></tr> </table> </div> <div id="p14" style="display:none"> <div id="p14title"> <div id="p14BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Intel&reg; AMT - <span id="p14deviceName"></span></h1> </div> <iframe id="p14iframe" style="width:100%;height:calc(100vh - 242px);border:0;overflow:hidden" src="/commander.htm"></iframe> </div> <div id="p15" style="display:none"> <div id="p15title"> <div id="p15BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1><span id="p15deviceName"></span></h1> </div> <table cellpadding="0" cellspacing="0" style="width:100%;padding:0px;padding:0px;margin-top:0px"> <tr> <td style="background:#C0C0C0"> <div style="float:right;padding-right:4px"> <div style="padding:4px;display:inline-block" id="p15coreName" title="Information about current core running on this agent"></div> <input type="button" id="p15uploadCore" value="Agent Action" onclick="p15uploadCore(event)" title="Change the agent Java Script code module"> </div> <div id="p15statetext" style="padding:4px"></div> </td> </tr> <tr> <td> <div style="background-color:gray"><div id="consoleprogressbar" style="height:2px;width:0%;background-color:red"></div></div> </td> </tr> <tr> <td id="p15agentConsole" style="background:black;margin:0;padding:0;color:lightgray;width:100%;height:calc(100vh - 296px);max-height:500px;position:relative"> <pre id="p15agentConsoleText" style="position:absolute;margin:0;padding:0;top:0;bottom:0;left:0;right:0;overflow-y:scroll;overflow-x:auto"></pre> </td> </tr> <tr> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <table style="width:100%"> <tr> <td style="width:99%"> <input id="p15consoleText" style="width:100%" onkeyup="p15consoleSend(event)" onfocus="onConsoleFocus(1)" onblur="onConsoleFocus(0)"> </td> <td>&nbsp;</td> <td style="width:1%"><input id="id_p15consoleClear" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Clear" onclick="p15consoleClear()"></td> </tr> </table> </td> </tr> </table> </div> <div id="p16" style="display:none"> <div id="p16title"> <div id="p16BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Events - <span id="p16deviceName"></span></h1> </div> <div style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px"> <div class="style7" style="width:16px;height:100%;float:left">&nbsp;</div> <div class="h1" style="height:100%;float:left">&nbsp;</div> <div class="style14" style="height:100%;float:left">&nbsp;&nbsp;<input type="button" value="Refresh" onclick="refreshDeviceEvents()">&nbsp;</div> <div class="auto-style1" style="height:100%;float:right"> Show <select id="p16limitdropdown" onchange="refreshDeviceEvents()"> <option value="60">Last 60 <option value="120">Last 120 <option value="250">Last 250 <option value="500">Last 500 <option value="1000">Last 1000 </select> <div style="height:100%;width:20px;float:right;background-color:#ffffff"></div> <div class="h2" style="height:100%;float:right">&nbsp;</div> </div> </div> <div id="p16events" style="max-height:calc(100vh - 267px);overflow-y:auto"></div> </div> <div id="p20" style="display:none"> <picture id="MainMeshImage" style="border-width:0px;height:200px;width:200px;float:right"> <source type="image/webp" width="200" height="200" srcset="images/webp/mesh-200.webp"> <img alt="" width="200" height="200" src="images/mesh-200.jpg"> </source></picture> <div style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>General - <span id="p20meshName"></span></h1> <p id="p20info"> </div> <div id="p30" style="display:none"> <table style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="width:auto" valign="top"> <div id="p30title"> <div style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>General - <span id="p30userName"></span></h1> </div> <div id="p30html"></div> </td> <td style="width:20px"></td> <td style="width:200px"> <picture id="MainUserImage" style="border-width:0px;height:200px;width:200px;float:right"> <source type="image/webp" width="200" height="200" srcset="images/webp/user-200.webp"> <img alt="" width="200" height="200" src="images/user-200.jpg"> </source></picture> <div style="width:100%;text-align:center"><strong><span id="MainUserState"></span></strong></div> </td> </tr> </table><br> <div id="p30html2"></div> <div id="p30html3"></div> </div> <div id="p31" style="display:none"> <div style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Events - <span id="p31userName"></span></h1> <div style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px"> <div class="style7" style="width:16px;height:100%;float:left">&nbsp;</div> <div class="h1" style="height:100%;float:left">&nbsp;</div> <div class="style14" style="height:100%;float:left">&nbsp;&nbsp;<input type="button" value="Refresh" onclick="refreshUsersEvents()">&nbsp;</div> <div class="auto-style1" style="height:100%;float:right"> Show <select id="p31limitdropdown" onchange="refreshUsersEvents()"> <option value="60">Last 60 <option value="120">Last 120 <option value="250">Last 250 <option value="500">Last 500 <option value="1000">Last 1000 </select> <div style="height:100%;width:20px;float:right;background-color:#ffffff"></div> <div class="h2" style="height:100%;float:right;">&nbsp;</div> </div> </div> <div id="p31events" style="max-height:calc(100vh - 267px);overflow-y:scroll"></div> </div> <br id="column_l_bottomgap"> </div> <div id="footer" class="noselect"> <table cellpadding="0" cellspacing="10" style="width:100%"> <tr> <td style="text-align:left;color:white"> {{{footer}}} </td> <td style="text-align:right"> <a id="verifyEmailId2" style="color:yellow;margin-left:3px;cursor:pointer;display:none" onclick="account_showVerifyEmail()">Verify Email</a> <a style="margin-left:3px" href="terms">Terms &amp; Privacy</a> </td> </tr> </table> </div> <div id="dialog" style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:160px;width:400px;left:calc((100% / 2) - 200px);display:none"> <div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"> <div id="id_dialogclose" style="float:right;padding:3px;margin-right:3px;cursor:pointer" onclick="setDialogMode()">&#x2716;</div> <div id="id_dialogtitle" style="padding:5px"></div> <div style="width:100%;margin:6px"></div> </div> <div style="margin-right:16px;margin-left:8px"> <div id="dialog1" style="margin:auto;text-align:center;margin:3px"> <div id="id_dialogMessage" style="padding:10px"></div> </div> <div id="dialog2" style="margin:auto;margin:3px"> <div id="id_dialogOptions"></div> </div> <div id="dialog3" style="margin:auto;margin:3px"> <div style="height:26px"> <select id="d3uploadMode" style="float:right;width:260px" onchange="d3modechange()"> <option value="1">Local file upload <option value="2">Server file selection </select> <div>File Selection</div> </div> <div id="d3localmode" style="height:26px;display:none"> <form id="d3localmodeform" method="post" enctype="multipart/form-data" action="uploadfile.ashx" target="fileUploadFrame"> <input type="text" id="d3attrib" name="attrib" style="display:none"> <input type="file" id="d3localFile" name="files" style="float:right;width:260px" onchange="d3setActions()"> <input type="submit" id="d3submit" style="display:none"> </form> <div>Upload File</div> </div> <div id="d3servermode"> <div style="width:100%;background-color:#d3d9d6;text-align:left;padding:3px" valign="bottom"> <input type="button" id="p3FolderUp" disabled="disabled" onclick="d3folderup()" value="Up">&nbsp; </div> <div id="d3serverfiles" style="width:100%;height:150px;background-color:white;padding:2px;border:1px solid gray;overflow-y:scroll"></div> </div> </div> <div id="dialog7" style="margin:auto;margin:3px"> <div id="d7meshkvm"> <h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4> <div style="margin:3px 0 3px 0"> <select id="d7bitmapquality" style="float:right;width:200px;height:20px" dir="rtl"></select> <div style="height:20px">Quality</div> </div> <div style="margin:3px 0 3px 0"> <select id="d7bitmapscaling" style="float:right;width:200px;height:20px" dir="rtl"> <option selected="selected" value="1024">100% <option value="896">87.5% <option value="768">75% <option value="640">62.5% <option value="512">50% <option value="384">37.5% <option value="256">25% <option value="128">12.5% </select> <div style="height:20px">Scaling</div> </div> <div style="margin:3px 0 3px 0"> <select id="d7framelimiter" style="float:right;width:200px;height:20px" dir="rtl"> <option selected="selected" value="50">Fast <option value="100">Medium <option value="400">Slow <option value="1000">Very slow </select> <div style="height:20px">Frame rate</div> </div> </div> <div id="d7amtkvm"> <h4 style="width:100%;border-bottom:1px solid gray">Intel&reg; AMT Hardware KVM</h4> <div style='height:26px'> <select id="d7desktopmode" style="float:right;width:200px"> <option value="1">RLE8, Fastest <option value="2">RLE16, Recommended <option value="3">RAW8, Slow <option value="4">RAW16, Very Slow </select> <div>Image Encoding</div> </div> <div style="height:60px"> <div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:white"> <label><input type="checkbox" id='d7showfocus'>Show Focus Tool<br></label> <label><input type="checkbox" id='d7showcursor'>Show Local Mouse Cursor<br></label> </div> <div>Other Settings</div> </div> </div> </div> </div> <div id="idx_dlgButtonBar" style="padding:10px;margin-bottom:4px"> <input id="idx_dlgCancelButton" type="button" value="Cancel" style="float:right;width:80px;margin-left:5px" onclick="dialogclose(0)"> <input id="idx_dlgOkButton" type="button" value="OK" style="float:right;width:80px" onclick="dialogclose(1)"> <div style="height:25px"><input id="idx_dlgDeleteButton" type="button" value="Delete" style="width:80px;display:none" onclick="dialogclose(2)"></div> </div> </div> <iframe name="fileUploadFrame" style="display:none"></iframe> <form style="display:none" method="post" action="uploadfile.ashx" enctype="multipart/form-data" target="fileUploadFrame"><input id="p5fileDragName" name="name"><input id="p5fileDragSize" name="size"><input id="p5fileDragType" name="type"><input id="p5fileDragData" name="data"><input id="p5fileDragLink" name="link"><input type="submit" id="p5loginSubmit2" style="display:none"></form> <form style="display:none" method="post" action="uploadnodefile.ashx" enctype="multipart/form-data" target="fileUploadFrame"><input id="p13fileDragName" name="name"><input id="p13fileDragSize" name="size"><input id="p13fileDragType" name="type"><input id="p13fileDragData" name="data"><input id="p13fileDragLink" name="link"><input type="submit" id="p13loginSubmit2" style="display:none"></form> <audio id="chimes"><source src="sounds/chimes.mp3" type="audio/mp3"></source></audio> </div> </div> <script>if(!String.prototype.startsWith){String.prototype.startsWith=function(a){return this.lastIndexOf(a,0)===0}}if(!String.prototype.endsWith){String.prototype.endsWith=function(a){return this.indexOf(a,this.length-a.length)!==-1}}function Q(a){return document.getElementById(a)}function QS(a){try{return Q(a).style}catch(a){}}function QE(a,b){try{Q(a).disabled=!b}catch(a){}}function QV(a,b){try{QS(a).display=(b?"":"none")}catch(a){}}function QA(a,b){Q(a).innerHTML+=b}function QH(a,b){Q(a).innerHTML=b}function inputBoxFocus(b){Q(b).focus();var a=Q(b).value;Q(b).value="";Q(b).value=a}function ReadShort(b,a){return(b.charCodeAt(a)<<8)+b.charCodeAt(a+1)}function ReadShortX(b,a){return(b.charCodeAt(a+1)<<8)+b.charCodeAt(a)}function ReadInt(b,a){return(b.charCodeAt(a)*16777216)+(b.charCodeAt(a+1)<<16)+(b.charCodeAt(a+2)<<8)+b.charCodeAt(a+3)}function ReadSInt(b,a){return(b.charCodeAt(a)<<24)+(b.charCodeAt(a+1)<<16)+(b.charCodeAt(a+2)<<8)+b.charCodeAt(a+3)}function ReadIntX(b,a){return(b.charCodeAt(a+3)*16777216)+(b.charCodeAt(a+2)<<16)+(b.charCodeAt(a+1)<<8)+b.charCodeAt(a)}function ShortToStr(a){return String.fromCharCode((a>>8)&255,a&255)}function ShortToStrX(a){return String.fromCharCode(a&255,(a>>8)&255)}function IntToStr(a){return String.fromCharCode((a>>24)&255,(a>>16)&255,(a>>8)&255,a&255)}function IntToStrX(a){return String.fromCharCode(a&255,(a>>8)&255,(a>>16)&255,(a>>24)&255)}function MakeToArray(a){if(!a||a==null||typeof a=="object"){return a}return[a]}function SplitArray(a){return a.split(",")}function Clone(a){return JSON.parse(JSON.stringify(a))}function EscapeHtml(a){if(typeof a=="string"){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}if(typeof a=="boolean"){return a}if(typeof a=="number"){return a}}function EscapeHtmlBreaks(a){if(typeof a=="string"){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\r/g,"<br />").replace(/\n/g,"").replace(/\t/g,"&nbsp;&nbsp;")}if(typeof a=="boolean"){return a}if(typeof a=="number"){return a}}function ArrayElementMove(a,b,c){a.splice(c,0,a.splice(b,1)[0])}function ObjectToStringEx(e,a){var d="";if(e!=0&&(!e||e==null)){return"(Null)"}if(e instanceof Array){for(var b in e){d+="<br />"+gap(a)+"Item #"+b+": "+ObjectToStringEx(e[b],a+1)}}else{if(e instanceof Object){for(var b in e){d+="<br />"+gap(a)+b+" = "+ObjectToStringEx(e[b],a+1)}}else{d+=EscapeHtml(e)}}return d}function ObjectToStringEx2(e,a){var d="";if(e!=0&&(!e||e==null)){return"(Null)"}if(e instanceof Array){for(var b in e){d+="\r\n"+gap2(a)+"Item #"+b+": "+ObjectToStringEx2(e[b],a+1)}}else{if(e instanceof Object){for(var b in e){d+="\r\n"+gap2(a)+b+" = "+ObjectToStringEx2(e[b],a+1)}}else{d+=EscapeHtml(e)}}return d}function gap(a){var d="";for(var b=0;b<(a*4);b++){d+="&nbsp;"}return d}function gap2(a){var d="";for(var b=0;b<(a*4);b++){d+=" "}return d}function ObjectToString(a){return ObjectToStringEx(a,0)}function ObjectToString2(a){return ObjectToStringEx2(a,0)}function hex2rstr(a){if(typeof a!="string"||a.length==0){return""}var c="",b=(""+a).match(/../g),e;while(e=b.shift()){c+=String.fromCharCode("0x"+e)}return c}function char2hex(a){return(a+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++){c+=char2hex(b.charCodeAt(a))}return c}function encode_utf8(a){return unescape(encodeURIComponent(a))}function decode_utf8(a){return decodeURIComponent(escape(a))}function data2blob(c){var b=new Array(c.length);for(var d=0;d<c.length;d++){b[d]=c.charCodeAt(d)}var a=new Blob([new Uint8Array(b)]);return a}function random(a){return Math.floor(Math.random()*a)}function trademarks(a){return a.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}var MeshServerCreateControl=function(b,a){var c={};c.State=0;c.connectstate=0;c.pingTimer=null;c.authCookie=a;c.xxStateChange=function(e,d){if(c.State==e){return}var g=c.State;c.State=e;if(c.onStateChanged){c.onStateChanged(c,c.State,g,d)}};c.Start=function(){if(c.connectstate!=0){return}c.connectstate=0;var d=window.location.protocol.replace("http","ws")+"//"+window.location.host+b+"control.ashx";if(c.authCookie&&(c.authCookie!="")){d+="?auth="+c.authCookie}c.socket=new WebSocket(d);c.socket.onopen=function(g){c.connectstate=1};c.socket.onmessage=c.xxOnMessage;c.socket.onclose=function(g){c.Stop(g.code)};c.xxStateChange(1,0);if(c.pingTimer!=null){clearInterval(c.pingTimer)}c.pingTimer=setInterval(function(){c.send({action:"ping"})},29000)};c.Stop=function(d){c.connectstate=0;if(c.socket){c.socket.close();delete c.socket}if(c.pingTimer!=null){clearInterval(c.pingTimer);c.pingTimer=null}c.xxStateChange(0,d)};c.xxOnMessage=function(d){if(c.State==1){c.xxStateChange(2)}var g;try{g=JSON.parse(d.data)}catch(d){return}if((typeof g!="object")||(g.action=="pong")){return}if(g.action=="close"){if(g.msg){console.log(g.msg)}c.Stop(g.cause);return}if(c.onMessage){c.onMessage(c,g)}};c.send=function(d){if(c.socket!=null&&c.connectstate==1){c.socket.send(JSON.stringify(d))}};return c};function AmtStackCreateService(t){var s=new Object();s.wsman=t;s.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];s.PendingEnums=[];s.PendingBatchOperations=0;s.ActiveEnumsCount=0;s.MaxActiveEnumsCount=1;s.onProcessChanged=null;var n=0;var m=0;s.GetPendingActions=function(){return(s.PendingEnums.length*2)+(s.ActiveEnumsCount)+s.wsman.comm.PendingAjax.length+s.wsman.comm.ActiveAjaxCount+s.PendingBatchOperations};function r(){var u=s.GetPendingActions();if(n<u){n=u}if(s.onProcessChanged!=null&&m!=u){m=u;s.onProcessChanged(u,n)}if(u==0){n=0}}s.Subscribe=function(w,v,C,u,B,z,A,x,D,y){s.wsman.ExecSubscribe(s.CompleteName(w),v,C,function(G,F,E,H){r();u(s,w,E,H,B)},0,z,A,x,D,y);r()};s.UnSubscribe=function(v,u,y,w,x){s.wsman.ExecUnSubscribe(s.CompleteName(v),function(B,A,z,C){r();u(s,v,z,C,y)},0,w,x);r()};s.Get=function(v,u,x,w){s.wsman.ExecGet(s.CompleteName(v),function(A,z,y,B){r();u(s,v,y,B,x)},0,w);r()};s.Put=function(v,x,u,z,w,y){s.wsman.ExecPut(s.CompleteName(v),x,function(C,B,A,D){r();u(s,v,A,D,z)},0,w,y);r()};s.Create=function(v,x,u,y,w){s.wsman.ExecCreate(s.CompleteName(v),x,function(B,A,z,C){r();u(s,v,z,C,y)},0,w);r()};s.Delete=function(v,x,u,y,w){s.wsman.ExecDelete(s.CompleteName(v),x,function(B,A,z,C){r();u(s,v,z,C,y)},0,w);r()};s.Exec=function(x,w,u,v,A,y,z){s.wsman.ExecMethod(s.CompleteName(x),w,u,function(D,C,B,E){r();v(s,x,s.CompleteExecResponse(B),E,A)},0,y,z);r()};s.ExecWithXml=function(x,w,u,v,A,y,z){s.wsman.ExecMethodXml(s.CompleteName(x),w,execArgumentsToXml(u),function(D,C,B,E){r();v(s,x,s.CompleteExecResponse(B),E,A)},0,y,z);r()};s.Enum=function(v,u,x,w){if(s.ActiveEnumsCount<s.MaxActiveEnumsCount){s.ActiveEnumsCount++;s.wsman.ExecEnum(s.CompleteName(v),function(B,z,y,C,A){r();d(v,y,u,z,C,A)},x,w)}else{s.PendingEnums.push([v,u,x,w])}r()};function d(w,y,u,z,A,B,x){if(A!=200){u(s,w,null,A,B);c(1);return}if(y==null||y.Header.Method!="EnumerateResponse"||!y.Body.EnumerationContext){u(s,w,null,603,B);c(1);return}var v=y.Body.EnumerationContext;s.wsman.ExecPull(z,v,function(E,D,C,F){b(w,C,u,D,[],F,B,x)})}function b(z,B,u,C,x,D,E,A){if(D!=200){u(s,z,null,D,E);c(1);return}if(B==null||B.Header.Method!="PullResponse"){u(s,z,null,604,E);c(1);return}for(var w in B.Body.Items){if(B.Body.Items[w] instanceof Array){for(var y in B.Body.Items[w]){x.push(B.Body.Items[w][y])}}else{x.push(B.Body.Items[w])}}if(B.Body.EnumerationContext){var v=B.Body.EnumerationContext;s.wsman.ExecPull(C,v,function(H,G,F,I){b(z,F,u,G,x,I,E,1)})}else{c(1);u(s,z,x,D,E);r()}}function c(u){s.ActiveEnumsCount-=u;if(s.ActiveEnumsCount>=s.MaxActiveEnumsCount||s.PendingEnums.length==0){return}var v=s.PendingEnums.shift();s.Enum(v[0],v[1],v[2]);c(0)}s.BatchEnum=function(u,x,v,z,w,y){s.PendingBatchOperations+=(x.length*2);a(u,Clone(x),v,z,{},w,y);r()};function a(u,z,v,C,B,w,A){s.PendingBatchOperations-=2;var y=z.shift(),x=s.Enum;if(y[0]=="*"){x=s.Get;y=y.substring(1)}x(y,function(F,D,E,G,H){H[2][D]={response:(E==null?null:E.Body),responses:E,status:G};if(H[1].length==0||G==401||(w!=true&&G!=200&&G!=400)){s.PendingBatchOperations-=(z.length*2);r();v(s,u,H[2],G,C)}else{r();a(u,z,v,C,H[2],A)}},[u,z,B],A);r()}s.BatchGet=function(u,w,v,y,x){h({name:u,names:w,callback:v,current:0,responses:{},tag:y,pri:x});r()};function h(u){if(u.names.length<=u.current){u.callback(s,u.name,u.responses,200,u.tag)}else{s.wsman.ExecGet(s.CompleteName(u.names[u.current]),function(x,w,v,y){g(u,v,y)},u.pri);u.current++}r()}function g(u,v,w){if(v==null||w!=200){u.callback(s,u.name,null,w,u.tag)}else{u.responses[v.Header.Method]=v;h(u)}}s.CompleteName=function(u){if(u.indexOf("AMT_")==0){return s.pfx[0]+u}if(u.indexOf("CIM_")==0){return s.pfx[1]+u}if(u.indexOf("IPS_")==0){return s.pfx[2]+u}};s.CompleteExecResponse=function(u){if(u&&u!=null&&u.Body&&u.Body.ReturnValue){u.Body.ReturnValueStr=s.AmtStatusToStr(u.Body.ReturnValue)}return u};s.RequestPowerStateChange=function(v,u){s.CIM_PowerManagementService_RequestPowerStateChange(v,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',null,null,u)};s.SetBootConfigRole=function(v,u){s.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',v,u)};s.CancelAllQueries=function(u){s.wsman.CancelAllQueries(u)};s.AMT_AgentPresenceWatchdog_RegisterAgent=function(u){s.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},u)};s.AMT_AgentPresenceWatchdog_AssertPresence=function(v,u){s.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdog_AssertShutdown=function(v,u){s.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdog_AddAction=function(z,y,x,v,u,w,C,A,B){s.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:z,NewState:y,EventOnTransition:x,ActionSd:v,ActionEac:u},w,C,A,B)};s.AMT_AgentPresenceWatchdog_DeleteAllActions=function(u,x,v,w){s.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},u,x,v,w)};s.AMT_AgentPresenceWatchdogAction_GetActionEac=function(u){s.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},u)};s.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(u){s.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},u)};s.AMT_AgentPresenceWatchdogVA_AssertPresence=function(v,u){s.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(v,u){s.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdogVA_AddAction=function(z,y,x,v,u,w){s.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:z,NewState:y,EventOnTransition:x,ActionSd:v,ActionEac:u},w)};s.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(u,v){s.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:u},v)};s.AMT_AuditLog_ClearLog=function(u){s.Exec("AMT_AuditLog","ClearLog",{},u)};s.AMT_AuditLog_RequestStateChange=function(v,w,u){s.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_AuditLog_ReadRecords=function(v,u,w){s.Exec("AMT_AuditLog","ReadRecords",{StartIndex:v},u,w)};s.AMT_AuditLog_SetAuditLock=function(x,v,w,u){s.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:x,Flag:v,Handle:w},u)};s.AMT_AuditLog_ExportAuditLogSignature=function(v,u){s.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:v},u)};s.AMT_AuditLog_SetSigningKeyMaterial=function(y,x,w,v,u){s.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:y,SigningKey:x,LengthOfCertificates:w,Certificates:v},u)};s.AMT_AuditPolicyRule_SetAuditPolicy=function(w,u,x,y,v){s.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:w,AuditedAppID:u,EventID:x,PolicyType:y},v)};s.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(w,u,x,y,v){s.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:w,AuditedAppID:u,EventID:x,PolicyType:y},v)};s.AMT_AuthorizationService_AddUserAclEntryEx=function(x,w,y,u,z,v){s.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:x,DigestPassword:w,KerberosUserSid:y,AccessPermission:u,Realms:z},v)};s.AMT_AuthorizationService_EnumerateUserAclEntries=function(v,u){s.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:v},u)};s.AMT_AuthorizationService_GetUserAclEntryEx=function(v,u,w){s.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:v},u,w)};s.AMT_AuthorizationService_UpdateUserAclEntryEx=function(y,x,w,z,u,A,v){s.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:y,DigestUsername:x,DigestPassword:w,KerberosUserSid:z,AccessPermission:u,Realms:A},v)};s.AMT_AuthorizationService_RemoveUserAclEntry=function(v,u){s.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:v},u)};s.AMT_AuthorizationService_SetAdminAclEntryEx=function(w,v,u){s.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:w,DigestPassword:v},u)};s.AMT_AuthorizationService_GetAdminAclEntry=function(u){s.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},u)};s.AMT_AuthorizationService_GetAdminAclEntryStatus=function(u){s.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},u)};s.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(u){s.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},u)};s.AMT_AuthorizationService_SetAclEnabledState=function(w,v,u,x){s.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:w,Enabled:v},u,x)};s.AMT_AuthorizationService_GetAclEnabledState=function(v,u,w){s.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:v},u,w)};s.AMT_EndpointAccessControlService_RequestStateChange=function(v,w,u){s.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_EndpointAccessControlService_GetPosture=function(v,u){s.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:v},u)};s.AMT_EndpointAccessControlService_GetPostureHash=function(v,u){s.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:v},u)};s.AMT_EndpointAccessControlService_UpdatePostureState=function(v,u){s.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:v},u)};s.AMT_EndpointAccessControlService_GetEacOptions=function(u){s.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},u)};s.AMT_EndpointAccessControlService_SetEacOptions=function(v,w,u){s.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:v,PostureHashAlgorithm:w},u)};s.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(v,u){s.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:v},u)};s.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(v,u){s.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:v},u)};s.AMT_EthernetPortSettings_SetLinkPreference=function(v,w,u){s.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:v,Timeout:w},u)};s.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(v,u){s.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:v},u)};s.AMT_KerberosSettingData_GetCredentialCacheState=function(u){s.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},u)};s.AMT_KerberosSettingData_SetCredentialCacheState=function(v,u){s.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:v},u)};s.AMT_MessageLog_CancelIteration=function(v,u){s.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:v},u)};s.AMT_MessageLog_RequestStateChange=function(v,w,u){s.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_MessageLog_ClearLog=function(u){s.Exec("AMT_MessageLog","ClearLog",{},u)};s.AMT_MessageLog_GetRecords=function(v,w,u,x){s.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:v,MaxReadRecords:w},u,x)};s.AMT_MessageLog_GetRecord=function(v,w,u){s.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:v,PositionToNext:w},u)};s.AMT_MessageLog_PositionAtRecord=function(v,w,x,u){s.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:v,MoveAbsolute:w,RecordNumber:x},u)};s.AMT_MessageLog_PositionToFirstRecord=function(u,v){s.Exec("AMT_MessageLog","PositionToFirstRecord",{},u,v)};s.AMT_MessageLog_FreezeLog=function(v,u){s.Exec("AMT_MessageLog","FreezeLog",{Freeze:v},u)};s.AMT_PublicKeyManagementService_AddCRL=function(w,v,u){s.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:w,SerialNumbers:v},u)};s.AMT_PublicKeyManagementService_ResetCRLList=function(u,v){s.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:u},v)};s.AMT_PublicKeyManagementService_AddCertificate=function(v,u){s.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:v},u)};s.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(v,u){s.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:v},u)};s.AMT_PublicKeyManagementService_AddKey=function(v,u){s.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:v},u)};s.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(w,v,x,u){s.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:w,DNName:v,Usage:x},u)};s.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(v,x,w,u){s.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:v,SigningAlgorithm:x,NullSignedCertificateRequest:w},u)};s.AMT_PublicKeyManagementService_GenerateKeyPair=function(v,w,u){s.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:v,KeyLength:w},u)};s.AMT_RedirectionService_RequestStateChange=function(v,u){s.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:v},u)};s.AMT_RedirectionService_TerminateSession=function(v,u){s.Exec("AMT_RedirectionService","TerminateSession",{SessionType:v},u)};s.AMT_RemoteAccessService_AddMpServer=function(u,z,B,v,x,C,A,y,w){s.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:u,InfoFormat:z,Port:B,AuthMethod:v,Certificate:x,Username:C,Password:A,CN:y},w)};s.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(x,y,v,w,u){s.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:x,TunnelLifeTime:y,ExtendedData:v,MpServer:w},u)};s.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(u,v){s.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_CommitChanges=function(u,v){s.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_Unprovision=function(v,u){s.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:v},u)};s.AMT_SetupAndConfigurationService_PartialUnprovision=function(u,v){s.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(u,v){s.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(v,u){s.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:v},u)};s.AMT_SetupAndConfigurationService_SetMEBxPassword=function(v,u){s.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:v},u)};s.AMT_SetupAndConfigurationService_SetTLSPSK=function(v,w,u){s.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:v,PPS:w},u)};s.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(u){s.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},u)};s.AMT_SetupAndConfigurationService_GetUuid=function(u){s.Exec("AMT_SetupAndConfigurationService","GetUuid",{},u)};s.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(u){s.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},u)};s.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(u){s.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},u)};s.AMT_SystemDefensePolicy_GetTimeout=function(u){s.Exec("AMT_SystemDefensePolicy","GetTimeout",{},u)};s.AMT_SystemDefensePolicy_SetTimeout=function(v,u){s.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:v},u)};s.AMT_SystemDefensePolicy_UpdateStatistics=function(v,x,u,z,w,y){s.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:v,ResetOnRead:x},u,z,w,y)};s.AMT_SystemPowerScheme_SetPowerScheme=function(u,v,w){s.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},u,w,0,{InstanceID:v})};s.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(u,v){s.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},u,v)};s.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(v,x,y,u,w){s.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:v,Tm1:x,Tm2:y},u,w)};s.AMT_UserInitiatedConnectionService_RequestStateChange=function(v,w,u){s.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_WebUIService_RequestStateChange=function(v,w,u){s.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(y,z,x,w,u,v){s.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:y,WiFiEndpointSettingsInput:z,IEEE8021xSettingsInput:x,ClientCredential:w,CACredential:u},v)};s.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(y,z,x,w,u,v){s.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:y,WiFiEndpointSettingsInput:z,IEEE8021xSettingsInput:x,ClientCredential:w,CACredential:u},v)};s.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(u,v){s.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:u},v)};s.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(u,v){s.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:u},v)};s.CIM_Account_RequestStateChange=function(v,w,u){s.Exec("CIM_Account","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_AccountManagementService_CreateAccount=function(w,u,v){s.Exec("CIM_AccountManagementService","CreateAccount",{System:w,AccountTemplate:u},v)};s.CIM_BootConfigSetting_ChangeBootOrder=function(v,u){s.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:v},u)};s.CIM_BootService_SetBootConfigRole=function(u,w,v){s.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:u,Role:w},v,0,1)};s.CIM_Card_ConnectorPower=function(v,w,u){s.Exec("CIM_Card","ConnectorPower",{Connector:v,PoweredOn:w},u)};s.CIM_Card_IsCompatible=function(v,u){s.Exec("CIM_Card","IsCompatible",{ElementToCheck:v},u)};s.CIM_Chassis_IsCompatible=function(v,u){s.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:v},u)};s.CIM_Fan_SetSpeed=function(v,u){s.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:v},u)};s.CIM_KVMRedirectionSAP_RequestStateChange=function(v,w,u){s.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:v},u)};s.CIM_MediaAccessDevice_LockMedia=function(v,u){s.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:v},u)};s.CIM_MediaAccessDevice_SetPowerState=function(v,w,u){s.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_MediaAccessDevice_Reset=function(u){s.Exec("CIM_MediaAccessDevice","Reset",{},u)};s.CIM_MediaAccessDevice_EnableDevice=function(v,u){s.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:v},u)};s.CIM_MediaAccessDevice_OnlineDevice=function(v,u){s.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:v},u)};s.CIM_MediaAccessDevice_QuiesceDevice=function(v,u){s.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:v},u)};s.CIM_MediaAccessDevice_SaveProperties=function(u){s.Exec("CIM_MediaAccessDevice","SaveProperties",{},u)};s.CIM_MediaAccessDevice_RestoreProperties=function(u){s.Exec("CIM_MediaAccessDevice","RestoreProperties",{},u)};s.CIM_MediaAccessDevice_RequestStateChange=function(v,w,u){s.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_PhysicalFrame_IsCompatible=function(v,u){s.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:v},u)};s.CIM_PhysicalPackage_IsCompatible=function(v,u){s.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:v},u)};s.CIM_PowerManagementService_RequestPowerStateChange=function(w,v,x,y,u){s.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:w,ManagedElement:v,Time:x,TimeoutPeriod:y},u,0,1)};s.CIM_PowerSupply_SetPowerState=function(v,w,u){s.Exec("CIM_PowerSupply","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_PowerSupply_Reset=function(u){s.Exec("CIM_PowerSupply","Reset",{},u)};s.CIM_PowerSupply_EnableDevice=function(v,u){s.Exec("CIM_PowerSupply","EnableDevice",{Enabled:v},u)};s.CIM_PowerSupply_OnlineDevice=function(v,u){s.Exec("CIM_PowerSupply","OnlineDevice",{Online:v},u)};s.CIM_PowerSupply_QuiesceDevice=function(v,u){s.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:v},u)};s.CIM_PowerSupply_SaveProperties=function(u){s.Exec("CIM_PowerSupply","SaveProperties",{},u)};s.CIM_PowerSupply_RestoreProperties=function(u){s.Exec("CIM_PowerSupply","RestoreProperties",{},u)};s.CIM_PowerSupply_RequestStateChange=function(v,w,u){s.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_Processor_SetPowerState=function(v,w,u){s.Exec("CIM_Processor","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_Processor_Reset=function(u){s.Exec("CIM_Processor","Reset",{},u)};s.CIM_Processor_EnableDevice=function(v,u){s.Exec("CIM_Processor","EnableDevice",{Enabled:v},u)};s.CIM_Processor_OnlineDevice=function(v,u){s.Exec("CIM_Processor","OnlineDevice",{Online:v},u)};s.CIM_Processor_QuiesceDevice=function(v,u){s.Exec("CIM_Processor","QuiesceDevice",{Quiesce:v},u)};s.CIM_Processor_SaveProperties=function(u){s.Exec("CIM_Processor","SaveProperties",{},u)};s.CIM_Processor_RestoreProperties=function(u){s.Exec("CIM_Processor","RestoreProperties",{},u)};s.CIM_Processor_RequestStateChange=function(v,w,u){s.Exec("CIM_Processor","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_RecordLog_ClearLog=function(u){s.Exec("CIM_RecordLog","ClearLog",{},u)};s.CIM_RecordLog_RequestStateChange=function(v,w,u){s.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_RedirectionService_RequestStateChange=function(v,w,u){s.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_Sensor_SetPowerState=function(v,w,u){s.Exec("CIM_Sensor","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_Sensor_Reset=function(u){s.Exec("CIM_Sensor","Reset",{},u)};s.CIM_Sensor_EnableDevice=function(v,u){s.Exec("CIM_Sensor","EnableDevice",{Enabled:v},u)};s.CIM_Sensor_OnlineDevice=function(v,u){s.Exec("CIM_Sensor","OnlineDevice",{Online:v},u)};s.CIM_Sensor_QuiesceDevice=function(v,u){s.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:v},u)};s.CIM_Sensor_SaveProperties=function(u){s.Exec("CIM_Sensor","SaveProperties",{},u)};s.CIM_Sensor_RestoreProperties=function(u){s.Exec("CIM_Sensor","RestoreProperties",{},u)};s.CIM_Sensor_RequestStateChange=function(v,w,u){s.Exec("CIM_Sensor","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_StatisticalData_ResetSelectedStats=function(v,u){s.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:v},u)};s.CIM_Watchdog_KeepAlive=function(u){s.Exec("CIM_Watchdog","KeepAlive",{},u)};s.CIM_Watchdog_SetPowerState=function(v,w,u){s.Exec("CIM_Watchdog","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_Watchdog_Reset=function(u){s.Exec("CIM_Watchdog","Reset",{},u)};s.CIM_Watchdog_EnableDevice=function(v,u){s.Exec("CIM_Watchdog","EnableDevice",{Enabled:v},u)};s.CIM_Watchdog_OnlineDevice=function(v,u){s.Exec("CIM_Watchdog","OnlineDevice",{Online:v},u)};s.CIM_Watchdog_QuiesceDevice=function(v,u){s.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:v},u)};s.CIM_Watchdog_SaveProperties=function(u){s.Exec("CIM_Watchdog","SaveProperties",{},u)};s.CIM_Watchdog_RestoreProperties=function(u){s.Exec("CIM_Watchdog","RestoreProperties",{},u)};s.CIM_Watchdog_RequestStateChange=function(v,w,u){s.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_WiFiPort_SetPowerState=function(v,w,u){s.Exec("CIM_WiFiPort","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_WiFiPort_Reset=function(u){s.Exec("CIM_WiFiPort","Reset",{},u)};s.CIM_WiFiPort_EnableDevice=function(v,u){s.Exec("CIM_WiFiPort","EnableDevice",{Enabled:v},u)};s.CIM_WiFiPort_OnlineDevice=function(v,u){s.Exec("CIM_WiFiPort","OnlineDevice",{Online:v},u)};s.CIM_WiFiPort_QuiesceDevice=function(v,u){s.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:v},u)};s.CIM_WiFiPort_SaveProperties=function(u){s.Exec("CIM_WiFiPort","SaveProperties",{},u)};s.CIM_WiFiPort_RestoreProperties=function(u){s.Exec("CIM_WiFiPort","RestoreProperties",{},u)};s.CIM_WiFiPort_RequestStateChange=function(v,w,u){s.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.IPS_HostBasedSetupService_Setup=function(y,z,x,v,A,w,u){s.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:y,NetworkAdminPassword:z,McNonce:x,Certificate:v,SigningAlgorithm:A,DigitalSignature:w},u)};s.IPS_HostBasedSetupService_AddNextCertInChain=function(x,v,w,u){s.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:x,IsLeafCertificate:v,IsRootCertificate:w},u)};s.IPS_HostBasedSetupService_AdminSetup=function(x,y,w,z,v,u){s.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:x,NetworkAdminPassword:y,McNonce:w,SigningAlgorithm:z,DigitalSignature:v},u)};s.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(w,x,v,u){s.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:w,SigningAlgorithm:x,DigitalSignature:v},u)};s.IPS_HostBasedSetupService_DisableClientControlMode=function(u,v){s.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:u},v)};s.IPS_KVMRedirectionSettingData_TerminateSession=function(u){s.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},u)};s.IPS_OptInService_StartOptIn=function(u){s.Exec("IPS_OptInService","StartOptIn",{},u)};s.IPS_OptInService_CancelOptIn=function(u){s.Exec("IPS_OptInService","CancelOptIn",{},u)};s.IPS_OptInService_SendOptInCode=function(v,u){s.Exec("IPS_OptInService","SendOptInCode",{OptInCode:v},u)};s.IPS_OptInService_StartService=function(u){s.Exec("IPS_OptInService","StartService",{},u)};s.IPS_OptInService_StopService=function(u){s.Exec("IPS_OptInService","StopService",{},u)};s.IPS_OptInService_RequestStateChange=function(v,w,u){s.Exec("IPS_OptInService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.IPS_ProvisioningRecordLog_RequestStateChange=function(v,w,u){s.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.IPS_ProvisioningRecordLog_ClearLog=function(u,v){s.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:u},v)};s.IPS_SecIOService_RequestStateChange=function(v,w,u){s.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AmtStatusToStr=function(u){if(s.AmtStatusCodes[u]){return s.AmtStatusCodes[u]}else{return"UNKNOWN_ERROR"}};s.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};s.GetMessageLog=function(u,v){s.AMT_MessageLog_PositionToFirstRecord(k,[u,v,[]])};function k(w,u,v,x,y){if(x!=200||v.Body.ReturnValue!="0"){y[0](s,null,y[2]);return}s.AMT_MessageLog_GetRecords(v.Body.IterationIdentifier,390,l,y)}function l(D,A,C,E,G){if(E!=200||C.Body.ReturnValue!="0"){G[0](s,null,G[2]);return}var y,z,I,v,u=G[2],F=new Date(),H,B=C.Body.RecordArray;if(typeof B==="string"){C.Body.RecordArray=[C.Body.RecordArray]}for(y in B){v=null;try{v=window.atob(B[y])}catch(w){}if(v!=null){H=ReadIntX(v,0);if((H>0)&&(H<4294967295)){I={DeviceAddress:v.charCodeAt(4),EventSensorType:v.charCodeAt(5),EventType:v.charCodeAt(6),EventOffset:v.charCodeAt(7),EventSourceType:v.charCodeAt(8),EventSeverity:v.charCodeAt(9),SensorNumber:v.charCodeAt(10),Entity:v.charCodeAt(11),EntityInstance:v.charCodeAt(12),EventData:[],Time:new Date((H+(F.getTimezoneOffset()*60))*1000)};for(z=13;z<21;z++){I.EventData.push(v.charCodeAt(z))}I.EntityStr=o[I.Entity];I.Desc=j(I.EventSensorType,I.EventOffset,I.EventData,I.Entity);if(!I.EntityStr){I.EntityStr="Unknown"}u.push(I)}}}if(C.Body.NoMoreRecords!=true){s.AMT_MessageLog_GetRecords(C.Body.IterationIdentifier,390,l,[G[0],u,G[2]])}else{G[0](s,u,G[2])}}var e="Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var p="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|");var q="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|");var o="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");s.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|");s.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};function j(x,w,v,u){if(x==15){if(v[0]==235){return"Invalid Data"}if(w==0){return p[v[1]]}return q[v[1]]}if(x==18&&v[0]==170){return"Agent watchdog "+char2hex(v[4])+char2hex(v[3])+char2hex(v[2])+char2hex(v[1])+"-"+char2hex(v[6])+char2hex(v[5])+"-... changed to "+s.WatchdogCurrentStates[v[7]]}if(x==6){return"Authentication failed "+(v[1]+(v[2]<<8))+" times. The system may be under attack."}if(x==30){return"No bootable media"}if(x==32){return"Operating system lockup or power interrupt"}if(x==35){return"System boot failure"}if(x==37){return"System firmware started (at least one CPU is properly executing)."}return"Unknown Sensor Type #"+x}return s}var md5_k=[];for(var i=0;i<64;){md5_k[i]=0|(Math.abs(Math.sin(++i))*4294967296)}function hex_md5(p){var g,k,l,o,r=[],q=unescape(encodeURI(p)),e=q.length,m=[g=1732584193,k=-271733879,~g,~k],n=0;for(;n<=e;){r[n>>2]|=(q.charCodeAt(n)||128)<<8*(n++%4)}r[p=(e+8>>6)*16+14]=e*8;n=0;for(;n<p;n+=16){e=m;o=0;for(;o<64;){e=[l=e[3],((g=e[1]|0)+((l=((e[0]+[g&(k=e[2])|~g&l,l&g|~l&k,g^k^l,k^(g|~l)][e=o>>4])+(md5_k[o]+(r[[o,5*o+1,3*o+5,7*o][e]%16+n]|0))))<<(e=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*e+o++%4])|l>>>32-e)),g,k]}for(o=4;o;){m[--o]=m[o]+e[o]}}p="";for(;o<32;){p+=((m[o>>3]>>((1^o++&7)*4))&15).toString(16)}return p}function rstr_md5(a){return hex2rstr(hex_md5(a))}function execArgumentsToXml(c){if(c===undefined||c===null){return null}var d="";for(var b in c){var a=c[b];if(!a){continue}if(a.__parameterType==="reference"){d+=referenceToXml(b,a)}else{d+=instanceToXml(b,a)}}return d}function instanceToXml(d,c){if(c===undefined||c===null){return null}var b=!!c.__namespace;var j=b?"<q:":"<";var a=b?"</q:":"</";var e=b?(' xmlns:q="'+c.__namespace+'"'):"";var h="<r:"+d+e+">";for(var g in c){if(!c.hasOwnProperty(g)||g.indexOf("__")===0){continue}if(typeof c[g]==="function"||Array.isArray(c[g])){continue}if(typeof c[g]==="object"){console.error("only convert one level down...")}else{h+=j+g+">"+c[g].toString()+a+g+">"}}h+="</r:"+d+">";return h}function referenceToXml(b,a){if(a===undefined||a===null){return null}var c="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+a.__resourceUri+"</w:ResourceURI><w:SelectorSet>";for(var d in a){if(!a.hasOwnProperty(d)||d.indexOf("__")===0){continue}if(typeof a[d]==="function"||typeof a[d]==="object"||Array.isArray(a[d])){continue}c+='<w:Selector Name="'+d+'">'+a[d].toString()+"</w:Selector>"}c+="</w:SelectorSet></a:ReferenceParameters></r:"+b+">";return c}function GetSidString(c){var b="S-"+c.charCodeAt(0)+"-"+c.charCodeAt(7);for(var a=2;a<(c.length/4);a++){b+="-"+ReadIntX(c,a*4)}return b}function GetSidByteArray(d){if(!d||d==null){return null}var c=d.split("-");if(c.length<4||(c[0]!="s"&&c[0]!="S")){return null}for(var a=1;a<c.length;a++){var e=parseInt(c[a]);if(e!=c[a]){return null}c[a]=e}var b=String.fromCharCode(c[1])+String.fromCharCode(c.length-3)+ShortToStr(Math.floor(c[2]/Math.pow(2,32)))+IntToStr((c[2])&65535);for(var a=3;a<c.length;a++){b+=IntToStrX(c[a])}return b}var WsmanStackCreateService=function(h,l,n,k,m,g){var j={};j.NextMessageId=1;j.Address="/wsman";j.comm=CreateWsmanComm(h,l,n,k,m,g);j.PerformAjax=function(q,o,s,r,p){if(p==undefined){p=""}j.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+p+"><Header><a:Action>"+q,function(t,u,v){if(u!=200){o(j,null,{Header:{HttpError:u}},u,v);return}var w=j.ParseWsman(t);if(!w||w==null){o(j,null,{Header:{HttpError:u}},601,v)}else{o(j,w.Header.ResourceURI,w,200,v)}},s,r)};j.CancelAllQueries=function(o){j.comm.CancelAllQueries(o)};j.GetNameFromUrl=function(o){var p=o.lastIndexOf("/");return(p==-1)?o:o.substring(p+1)};j.ExecSubscribe=function(w,q,z,o,y,v,x,t,A,u){var r="",s="";if(A!=undefined&&u!=undefined){r="<t:IssuedTokens><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>"+A+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+u+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>";s='<Auth Profile="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/secprofile/http/digest"/>'}if(t!=undefined&&t!=null){t="<a:ReferenceParameters>"+t+"</a:ReferenceParameters>"}else{t=""}var p="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+w+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+d(x)+r+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.dmtf.org/wbem/wsman/1/wsman/'+q+'"><e:NotifyTo><a:Address>'+z+"</a:Address></e:NotifyTo>"+s+"</e:Delivery><e:Expires>PT0.000000S</e:Expires></e:Subscribe>";j.PerformAjax(p+"</Body></Envelope>",o,y,v,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')};j.ExecUnSubscribe=function(r,o,t,q,s){var p="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+r+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+d(s)+"</Header><Body><e:Unsubscribe/>";j.PerformAjax(p+"</Body></Envelope>",o,t,q,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};j.ExecPut=function(s,r,o,u,q,t){var p="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+d(t)+"</Header><Body>"+c(s,r);j.PerformAjax(p+"</Body></Envelope>",o,u,q)};j.ExecCreate=function(u,t,o,w,s,v){var r=j.GetNameFromUrl(u);var p="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+u+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+d(v)+"</Header><Body><g:"+r+' xmlns:g="'+u+'">';for(var q in t){p+="<g:"+q+">"+t[q]+"</g:"+q+">"}j.PerformAjax(p+"</g:"+r+"></Body></Envelope>",o,w,s)};j.ExecCreateXml=function(s,o,p,u,r){var q=j.GetNameFromUrl(s),t="";j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout></Header><Body><r:"+q+' xmlns:r="'+s+'">'+o+"</r:"+q+"></Body></Envelope>",p,u,r)};j.ExecDelete=function(s,r,o,t,q){var p="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+d(r)+"</Header><Body /></Envelope>";j.PerformAjax(p,o,t,q)};j.ExecGet=function(q,o,r,p){j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+q+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",o,r,p)};j.ExecMethod=function(u,s,o,q,w,t,v){var p="";for(var r in o){if(o[r]!=null){if(Array.isArray(o[r])){for(var y in o[r]){p+="<r:"+r+">"+o[r][y]+"</r:"+r+">"}}else{p+="<r:"+r+">"+o[r]+"</r:"+r+">"}}}j.ExecMethodXml(u,s,p,q,w,t,v)};j.ExecMethodXml=function(s,q,o,p,u,r,t){j.PerformAjax(s+"/"+q+"</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+d(t)+"</Header><Body><r:"+q+'_INPUT xmlns:r="'+s+'">'+o+"</r:"+q+"_INPUT></Body></Envelope>",p,u,r)};j.ExecEnum=function(q,o,r,p){j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+q+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',o,r,p)};j.ExecPull=function(r,p,o,s,q){j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+r+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+p+"</EnumerationContext><MaxElements>999</MaxElements><MaxCharacters>99999</MaxCharacters></Pull></Body></Envelope>",o,s,q)};j.ParseWsman=function(x){try{if(!x.childNodes){x=e(x)}var v={Header:{}},s=x.getElementsByTagName("Header")[0],w;if(!s){s=x.getElementsByTagName("a:Header")[0]}if(!s){return null}for(var u=0;u<s.childNodes.length;u++){var p=s.childNodes[u];v.Header[p.localName]=p.textContent}var o=x.getElementsByTagName("Body")[0];if(!o){o=x.getElementsByTagName("a:Body")[0]}if(!o){return null}if(o.childNodes.length>0){w=o.childNodes[0].localName;if(w.indexOf("_OUTPUT")==w.length-7){w=w.substring(0,w.length-7)}v.Header.Method=w;v.Body=b(o.childNodes[0])}return v}catch(q){console.log("Unable to parse XML: "+x);return null}};function b(u){var q,v={};for(var s=0;s<u.childNodes.length;s++){var o=u.childNodes[s];if(o.childElementCount==0){q=o.textContent}else{q=b(o)}if(q=="true"){q=true}if(q=="false"){q=false}var p=q;if(o.attributes.length>0){p={Value:q};for(var t=0;t<o.attributes.length;t++){p["@"+o.attributes[t].name]=o.attributes[t].value}}if(v[o.localName] instanceof Array){v[o.localName].push(p)}else{if(v[o.localName]==undefined){v[o.localName]=p}else{v[o.localName]=[v[o.localName],p]}}}return v}function c(t,r){if(!t||r===undefined||r===null){return""}var p=j.GetNameFromUrl(t);var s="<r:"+p+' xmlns:r="'+t+'">';for(var q in r){if(!r.hasOwnProperty(q)||q.indexOf("__")===0||q.indexOf("@")===0){continue}if(r[q]===undefined||r[q]===null||typeof r[q]==="function"){continue}if(typeof r[q]==="object"&&r[q]["ReferenceParameters"]){s+="<r:"+q+"><a:Address>"+r[q].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+r[q]["ReferenceParameters"]["ResourceURI"]+"</w:ResourceURI><w:SelectorSet>";var u=r[q]["ReferenceParameters"]["SelectorSet"]["Selector"];if(Array.isArray(u)){for(var o=0;o<u.length;o++){s+="<w:Selector"+a(u[o])+">"+u[o]["Value"]+"</w:Selector>"}}else{s+="<w:Selector"+a(u)+">"+u.Value+"</w:Selector>"}s+="</w:SelectorSet></a:ReferenceParameters></r:"+q+">"}else{if(Array.isArray(r[q])){for(var o=0;o<r[q].length;o++){s+="<r:"+q+">"+r[q][o].toString()+"</r:"+q+">"}}else{s+="<r:"+q+">"+r[q].toString()+"</r:"+q+">"}}}s+="</r:"+p+">";return s}function a(o){if(!o){return""}var q=" ";for(var p in o){if(!o.hasOwnProperty(p)||p.indexOf("@")!==0){continue}q+=p.substring(1)+'="'+o[p]+'" '}return q}function d(s){if(!s){return""}if(typeof s=="string"){return s}if(s.InstanceID){return'<w:SelectorSet><w:Selector Name="InstanceID">'+s.InstanceID+"</w:Selector></w:SelectorSet>"}var q="<w:SelectorSet>";for(var p in s){if(!s.hasOwnProperty(p)){continue}q+='<w:Selector Name="'+p+'">';if(s[p]["ReferenceParameters"]){q+="<a:EndpointReference>";q+="<a:Address>"+s[p]["Address"]+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+s[p]["ReferenceParameters"]["ResourceURI"]+"</w:ResourceURI><w:SelectorSet>";var r=s[p]["ReferenceParameters"]["SelectorSet"]["Selector"];if(Array.isArray(r)){for(var o=0;o<r.length;o++){q+="<w:Selector"+a(r[o])+">"+r[o]["Value"]+"</w:Selector>"}}else{q+="<w:Selector"+a(r)+">"+r.Value+"</w:Selector>"}q+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else{q+=s[p]}q+="</w:Selector>"}q+="</w:SelectorSet>";return q}function e(o){if(window.DOMParser){return new DOMParser().parseFromString(o,"text/xml")}else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=false;p.loadXML(o);return p}}return j};var CreateAmtRemoteDesktop=function(m,p){var o={};o.canvasid=m;o.CanvasId=Q(m);o.scrolldiv=p;o.canvas=Q(m).getContext("2d");o.protocol=2;o.state=0;o.acc="";o.ScreenWidth=960;o.ScreenHeight=700;o.width=0;o.height=0;o.rwidth=0;o.rheight=0;o.bpp=2;o.useZRLE=true;o.showmouse=true;o.buttonmask=0;o.spare=null;o.sparew=0;o.spareh=0;o.sparew2=0;o.spareh2=0;o.sparecache={};o.ZRLEfirst=1;o.onScreenSizeChange=null;o.frameRateDelay=0;o.kvmDataSupported=false;o.onKvmData=null;o.onKvmDataPending=[];o.onKvmDataAck=-1;o.holding=false;o.lastKeepAlive=Date.now();o.Debug=function(q){console.log(q)};o.xxStateChange=function(q){if(q==0){o.canvas.fillStyle="#000000";o.canvas.fillRect(0,0,o.width,o.height);o.canvas.canvas.width=o.rwidth=o.width=640;o.canvas.canvas.height=o.rheight=o.height=400;QS(o.canvasid).cursor="default"}else{QS(o.canvasid).cursor=o.showmouse?"default":"none"}};o.ProcessData=function(t){if(!t){return}o.acc+=t;while(o.acc.length>0){var q=0;if(o.state==0&&o.acc.length>=12){q=12;o.state=1;o.send("RFB 003.008\n")}else{if(o.state==1&&o.acc.length>=1){q=o.acc.charCodeAt(0)+1;o.send(String.fromCharCode(1));o.state=2}else{if(o.state==2&&o.acc.length>=4){q=4;if(ReadInt(o.acc,0)!=0){return o.Stop()}o.send(String.fromCharCode(1));o.state=3}else{if(o.state==3&&o.acc.length>=24){var D=ReadInt(o.acc,20);if(o.acc.length<24+D){return}q=24+D;o.canvas.canvas.width=o.rwidth=o.width=o.ScreenWidth=ReadShort(o.acc,0);o.canvas.canvas.height=o.rheight=o.height=o.ScreenHeight=ReadShort(o.acc,2);var G="";if(o.useZRLE){G+=IntToStr(16)}G+=IntToStr(0);G+=IntToStr(1092);o.send(String.fromCharCode(2,0)+ShortToStr((G.length/4)+1)+G+IntToStr(-223));if(o.bpp==1){o.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0))}o.state=4;o.parent.xxStateChange(3);h();if(o.onScreenSizeChange!=null){o.onScreenSizeChange(o,o.ScreenWidth,o.ScreenHeight)}}else{if(o.state==4){switch(o.acc.charCodeAt(0)){case 0:if(o.acc.length<4){return}o.state=100+ReadShort(o.acc,2);q=4;break;case 2:q=1;break;case 3:if(o.acc.length<8){return}var C=ReadInt(o.acc,4)+8;if(o.acc.length<C){return}q=n(o.acc);break}}else{if(o.state>100&&o.acc.length>=12){var I=ReadShort(o.acc,0),K=ReadShort(o.acc,2),H=ReadShort(o.acc,4),A=ReadShort(o.acc,6),F=H*A,z=ReadInt(o.acc,8);if(z<17){if(H<1||H>64||A<1||A>64){console.log("Invalid tile size ("+H+","+A+"), disconnecting.");return o.Stop()}if(o.sparew!=H||o.spareh!=A){o.sparew=o.sparew2=H;o.spareh=o.spareh2=A;var J=o.sparew2+"x"+o.spareh2;o.spare=o.sparecache[J];if(!o.spare){o.sparecache[J]=o.spare=o.canvas.createImageData(o.sparew2,o.spareh2)}}}if(z==4294967073){o.canvas.canvas.width=o.rwidth=o.width=H;o.canvas.canvas.height=o.rheight=o.height=A;o.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(o.width)+ShortToStr(o.height));q=12;if(o.onScreenSizeChange!=null){o.onScreenSizeChange(o,o.ScreenWidth,o.ScreenHeight)}}else{if(z==0){var E=12,r=12+(F*o.bpp);if(o.acc.length<r){return}q=r;for(var B=0;B<F;B++){j(o.acc.charCodeAt(E++)+((o.bpp==2)?(o.acc.charCodeAt(E++)<<8):0),B)}g(o.spare,I,K)}else{if(z==16){if(o.acc.length<16){return}var u=ReadInt(o.acc,12);if(o.acc.length<(16+u)){return}var E=16,v=5,w=0;if(u>5&&o.acc.charCodeAt(E)==0&&ReadShortX(o.acc,E+1)==(u-v)){a(o.acc,E+5,I,K,H,A,F,u)}q=16+u}else{o.Debug("Unknown Encoding: "+z);return o.Stop()}}}if(--o.state==100){o.state=4;if(o.frameRateDelay==0){h()}else{setTimeout(h,o.frameRateDelay)}}}}}}}}if(q==0){return}o.acc=o.acc.substring(q)}};function a(t,C,K,L,J,w,G,u){var H=t.charCodeAt(C++),A,I,F,B={},D=0,E=0,z;if(H==0){for(z=0;z<G;z++){j(t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0),z)}g(o.spare,K,L)}else{if(H==1){I=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0);o.canvas.fillStyle="rgb("+((o.bpp==1)?((I&224)+","+((I&28)<<3)+","+b((I&3)<<6)):(((I>>8)&248)+","+((I>>3)&252)+","+((I&31)<<3)))+")";o.canvas.fillRect(K,L,J,w)}else{if(H>1&&H<17){var r=4,q=15;for(z=0;z<H;z++){B[z]=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0)}if(H==2){r=1;q=1}else{if(H<=4){r=2;q=3}}while(D<G&&C<t.length){I=t.charCodeAt(C++);for(z=(8-r);z>=0;z-=r){j(B[(I>>z)&q],D++)}}g(o.spare,K,L)}else{if(H==128){while(D<G&&C<t.length){I=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0);E=1;do{E+=(F=t.charCodeAt(C++))}while(F==255);while(--E>=0){j(I,D++)}}g(o.spare,K,L)}else{if(H>129){for(z=0;z<(H-128);z++){B[z]=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0)}while(D<G&&C<t.length){E=1;A=t.charCodeAt(C++);I=B[A%128];if(A>127){do{E+=(F=t.charCodeAt(C++))}while(F==255)}while(--E>=0){j(I,D++)}}g(o.spare,K,L)}}}}}}o.hold=function(q){if(o.holding==q){return}o.holding=q;o.canvas.fillStyle="#000000";o.canvas.fillRect(0,0,o.width,o.height);if(o.holding==false){if((o.canvas.canvas.width!=o.width)||(o.canvas.canvas.height!=o.height)){o.canvas.canvas.width=o.width;o.canvas.canvas.height=o.height;if(o.onScreenSizeChange!=null){o.onScreenSizeChange(o,o.ScreenWidth,o.ScreenHeight)}}o.Send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(o.width)+ShortToStr(o.height))}else{o.UnGrabMouseInput();o.UnGrabKeyInput()}};function g(q,r,s){if(o.holding==true){return}o.canvas.putImageData(q,r,s)}function j(s,q){var r=q*4;if(o.bpp==1){o.spare.data[r++]=s&224;o.spare.data[r++]=(s&28)<<3;o.spare.data[r++]=b((s&3)<<6)}else{o.spare.data[r++]=(s>>8)&248;o.spare.data[r++]=(s>>3)&252;o.spare.data[r++]=(s&31)<<3}o.spare.data[r]=255}function b(q){return(q>127)?(q+32):q}function h(){if(o.holding==true){return}o.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(o.rwidth)+ShortToStr(o.rheight))}o.Start=function(){o.state=0;o.acc="";o.ZRLEfirst=1;o.onKvmDataPending=[];o.onKvmDataAck=-1;o.kvmDataSupported=false;for(var q in o.sparecache){delete o.sparecache[q]}};o.Stop=function(){o.UnGrabMouseInput();o.UnGrabKeyInput();o.parent.Stop()};o.send=function(q){o.parent.send(q)};var l={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};function k(q){if(q.code.startsWith("Key")&&q.code.length==4){return q.code.charCodeAt(3)+((q.shiftKey==false)?32:0)}if(q.code.startsWith("Digit")&&q.code.length==6){return q.code.charCodeAt(5)}if(q.code.startsWith("Numpad")&&q.code.length==7){return q.code.charCodeAt(6)}return l[q.code]}function c(q,r){if(!r){r=window.event}if(r.code){var s=k(r);if(s!=null){o.sendkey(s,q)}}else{var s=r.keyCode,t=s;if(r.shiftKey==false&&s>=65&&s<=90){t=s+32}if(s>=112&&s<=124){t=s+65358}if(s==8){t=65288}if(s==9){t=65289}if(s==13){t=65293}if(s==16){t=65505}if(s==17){t=65507}if(s==18){t=65513}if(s==27){t=65307}if(s==33){t=65365}if(s==34){t=65366}if(s==35){t=65367}if(s==36){t=65360}if(s==37){t=65361}if(s==38){t=65362}if(s==39){t=65363}if(s==40){t=65364}if(s==45){t=65379}if(s==46){t=65535}if(s>=96&&s<=105){t=s-48}if(s==106){t=42}if(s==107){t=43}if(s==109){t=45}if(s==110){t=46}if(s==111){t=47}if(s==186){t=59}if(s==187){t=61}if(s==188){t=44}if(s==189){t=45}if(s==190){t=46}if(s==191){t=47}if(s==192){t=96}if(s==219){t=91}if(s==220){t=92}if(s==221){t=93}if(s==222){t=39}o.sendkey(t,q)}return o.haltEvent(r)}o.sendkey=function(s,q){if(typeof s=="object"){for(var r in s){o.sendkey(s[r][0],s[r][1])}}else{o.send(String.fromCharCode(4,q,0,0)+IntToStr(s))}};function n(q){if(q.length<8){return 0}var s=ReadInt(o.acc,4)+8;if(q.length<s){return 0}if(o.onKvmData!=null){var r=q.substring(8,s);if((r.length>=16)&&(r.substring(0,15)=="\0KvmDataChannel")){if(o.kvmDataSupported==false){o.kvmDataSupported=true;console.log("KVM Data Channel Supported.")}if(((o.onKvmDataAck==-1)&&(r.length==16))||(r.charCodeAt(15)!=0)){o.onKvmDataAck=true}if(r.length>=16){o.onKvmData(r.substring(16))}if((o.onKvmDataAck==true)&&(o.onKvmDataPending.length>0)){o.sendKvmData(o.onKvmDataPending.shift())}}}return s}o.sendKvmData=function(q){if(o.onKvmDataAck!==true){o.onKvmDataPending.push(q)}else{q="\0KvmDataChannel\0"+q;o.send(String.fromCharCode(6,0,0,0)+IntToStr(q.length)+q);o.onKvmDataAck=false}};o.sendKeepAlive=function(){if(o.lastKeepAlive<Date.now()-5000){o.lastKeepAlive=Date.now();o.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\0KvmDataChannel\0")}};o.SendCtrlAltDelMsg=function(){o.sendcad()};o.sendcad=function(){o.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var e=false;var d=false;o.GrabMouseInput=function(){if(e==true){return}var q=o.canvas.canvas;q.onmouseup=o.mouseup;q.onmousedown=o.mousedown;q.onmousemove=o.mousemove;e=true};o.UnGrabMouseInput=function(){if(e==false){return}var q=o.canvas.canvas;q.onmousemove=null;q.onmouseup=null;q.onmousedown=null;e=false};o.GrabKeyInput=function(){if(d==true){return}document.onkeyup=o.handleKeyUp;document.onkeydown=o.handleKeyDown;document.onkeypress=o.handleKeys;d=true};o.UnGrabKeyInput=function(){if(d==false){return}document.onkeyup=null;document.onkeydown=null;document.onkeypress=null;d=false};o.handleKeys=function(q){return o.haltEvent(q)};o.handleKeyUp=function(q){return c(0,q)};o.handleKeyDown=function(q){return c(1,q)};o.haltEvent=function(q){if(q.preventDefault){q.preventDefault()}if(q.stopPropagation){q.stopPropagation()}return false};o.mousedblclick=function(q){};o.mousedown=function(q){o.buttonmask|=(1<<q.button);return o.mousemove(q)};o.mouseup=function(q){o.buttonmask&=(65535-(1<<q.button));return o.mousemove(q)};o.mousemove=function(q){if(o.state!=4){return true}var r=o.getPositionOfControl(Q(o.canvasid));o.mx=(q.pageX-r[0])*(o.canvas.canvas.height/Q(o.canvasid).offsetHeight);o.my=((q.pageY-r[1]+(p?p.scrollTop:0))*(o.canvas.canvas.width/Q(o.canvasid).offsetWidth));o.send(String.fromCharCode(5,o.buttonmask)+ShortToStr(o.mx)+ShortToStr(o.my));return o.haltEvent(q)};o.getPositionOfControl=function(q){var r=Array(2);r[0]=r[1]=0;while(q){r[0]+=q.offsetLeft;r[1]+=q.offsetTop;q=q.offsetParent}return r};return o};var CreateAmtRemoteTerminal=function(B){var C={};C.DivId=B;C.DivElement=document.getElementById(B);C.protocol=1;C.fxEmulation=0;C.lineFeed="\r\n";C.debugmode=0;C.width=80;C.height=25;var r=21;var s=13;var m=["000000","BB0000","00BB00","BBBB00","0000BB","BB00BB","00BBBB","BBBBBB","555555","FF5555","55FF55","FFFF55","5555FF","FF55FF","55FFFF","FFFFFF"];var p=0;var o=7;var n=0;var t=true;var w=0;var x=0;var v=0;var d=[];var e=0;var l=[];var y=[];var A=1;var z=2;C.Start=function(){};C.Init=function(E,D){C.width=E?E:80;C.height=D?D:25;for(var G=0;G<C.height;G++){y[G]=[];l[G]=[];for(var F=0;F<C.width;F++){y[G][F]=" ";l[G][F]=(7<<6)}}C.TermInit();C.TermDraw()};C.xxStateChange=function(D){};C.ProcessData=function(D){if(C.debugmode==2){console.log("TRecv("+D.length+"): "+rstr2hex(D))}if(C.capture!=null){C.capture+=D}k(D);C.TermDraw()};function k(E){for(var D=0;D<E.length;D++){j(String.fromCharCode(E.charCodeAt(D)),E.charCodeAt(D))}}function j(D,E){switch(v){case 0:switch(E){case 27:v=1;break;default:h(D);break}break;case 1:switch(D){case"[":e=0;d=[];v=2;break;case"(":v=4;break;case")":v=5;break;default:v=0;break}break;case 2:if(D>="0"&&D<="9"){if(!d[e]){d[e]=(D-"0")}else{d[e]=((d[e]*10)+(D-"0"))}break}else{if(D==";"){e++;break}else{if(!d[0]){d[0]=0}g(D,d,e+1);v=0}}break;case 4:v=0;break;case 5:v=0;break}}function g(G,D,E){var H;switch(G){case"c":C.TermResetScreen();break;case"A":if(E==1){x-=D[0];if(x<0){x=0}}break;case"B":if(E==1){x+=D[0];if(x>C.height){x=C.height}}break;case"C":if(E==1){w+=D[0];if(w>C.width){w=C.width}}break;case"D":if(E==1){w-=D[0];if(w<0){w=0}}break;case"d":if(E==1){x=D[0]-1;if(x>C.height){x=C.height}if(x<0){x=0}}break;case"G":if(E==1){w=D[0]-1;if(w<0){w=0}if(w>79){w=79}}break;case"J":if(E==1&&D[0]==2){C.TermClear((n<<12)+(o<<6));w=0;x=0}else{if(E==0||E==1&&D[0]==0){b();for(H=x+1;H<C.height;H++){c(H)}}else{if(E==1&&D[0]==1){b();for(H=0;H<x-1;H++){c(H)}}}}break;case"H":if(E==2){if(D[0]<1){D[0]=1}if(D[1]<1){D[1]=1}if(D[0]>C.height){D[0]=C.height}if(D[1]>C.width){D[1]=C.width}x=D[0]-1;w=D[1]-1}else{x=0;w=0}break;case"m":for(H=0;H<E;H++){if(!D[H]||D[H]==0){n=0;o=7;p=0}else{if(D[H]==1){if(o<8){o+=8}}else{if(D[H]==2||D[H]==22){if(o>=8){o-=8}}else{if(D[H]==7){p=2}else{if(D[H]==27){p=0}else{if(D[H]>=30&&D[H]<=37){var F=(o>=8);o=(D[H]-30);if(F&&o<=8){o+=8}}else{if(D[H]>=40&&D[H]<=47){n=(D[H]-40)}else{if(D[H]>=90&&D[H]<=99){o=(D[H]-82)}else{if(D[H]>=100&&D[H]<=109){n=(D[H]-92)}}}}}}}}}}break;case"K":if(E==0||(E==1&&(!D[0]||D[0]==0))){b()}else{if(E==1){if(D[0]==1){a()}else{if(D[0]==2){c(x)}}}}break;case"h":t=true;break;case"l":t=false;break;default:break}}C.ProcessVt100String=function(E){for(var D=0;D<E.length;D++){h(String.fromCharCode(E.charCodeAt(D)))}};function h(D){if(D=="\0"||D.charCodeAt()==7){return}var E=D.charCodeAt();switch(E){case 16:D=" ";break;case 24:D="?";break;case 25:D="?";break}if(w>C.width){w=C.width}if(x>(C.height-1)){x=(C.height-1)}switch(D){case"\b":if(w>0){w=w-1;q(" ")}break;case"\t":var F=8-(w%8);for(var G=0;G<F;G++){h(" ")}break;case"\n":x++;if(x>(C.height-1)){u(1);x=(C.height-1)}if(C.lineFeed="\n"){w=0}break;case"\r":w=0;break;default:if(w>=C.width){w=0;if(t){x++}if(x>=(C.height-1)){u(1);x=(C.height-1)}}q(D);w++;break}}function q(D){y[x][w]=D;l[x][w]=(o<<6)+(n<<12)+p}C.TermClear=function(D){for(var F=0;F<C.height;F++){for(var E=0;E<C.width;E++){y[F][E]=" ";l[F][E]=D}}};C.TermResetScreen=function(){p=0;o=7;n=0;t=true;w=0;x=0;C.TermClear(7<<6)};function b(){var D=(n<<12);for(var E=w;E<C.width;E++){y[x][E]=" ";l[x][E]=D}}function a(){var D=(n<<12);for(var E=0;E<w;E++){y[x][E]=" ";l[x][E]=D}}function c(D){var E=(n<<12);for(var F=0;F<C.width;F++){y[D][F]=" ";l[D][F]=E}}C.TermSendKeys=function(D){if(C.debugmode==2){if(C.debugmode==2){console.log("TSend("+D.length+"): "+rstr2hex(D))}}C.parent.send(D)};C.TermSendKey=function(D){if(C.debugmode==2){if(C.debugmode==2){console.log("TSend(1): "+rstr2hex(String.fromCharCode(D)))}}C.parent.send(String.fromCharCode(D))};function u(D){var E,F;for(F=0;F<C.height-D;F++){y[F]=y[F+D];l[F]=l[F+D]}for(F=C.height-D;F<C.height;F++){y[F]=[];l[F]=[];for(E=0;E<C.width;E++){y[F][E]=" ";l[F][E]=(7<<6)}}}C.TermHandleKeys=function(D){if(!D.ctrlKey){if(D.which==127){C.TermSendKey(8)}else{if(D.which==13){C.TermSendKeys(C.lineFeed)}else{if(D.which!=0){C.TermSendKey(D.which)}}}return false}if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}};C.TermHandleKeyUp=function(D){if((D.which!=8)&&(D.which!=32)&&(D.which!=9)){return true}if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return false};C.TermHandleKeyDown=function(D){if((D.which>=65)&&(D.which<=90)&&(D.ctrlKey==true)){C.TermSendKey(D.which-64);if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return}if(D.which==27){C.TermSendKeys(String.fromCharCode(27));return true}if(D.which==37){C.TermSendKeys(String.fromCharCode(27,91,68));return true}if(D.which==38){C.TermSendKeys(String.fromCharCode(27,91,65));return true}if(D.which==39){C.TermSendKeys(String.fromCharCode(27,91,67));return true}if(D.which==40){C.TermSendKeys(String.fromCharCode(27,91,66));return true}if(D.which==9){C.TermSendKeys("\t");if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return true}if(D.which!=8&&D.which!=32&&D.which!=9){return true}C.TermSendKey(D.which);if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return false};C.TermDraw=function(){var E,D="",F="",G,H=1,J,K;for(var L=0;L<C.height;++L){for(var I=0;I<C.width;++I){G=l[L][I];if(w==I&&x==L){G|=z}if(G!=H){D+=F;F="";J=6;K=12;if(G&z){J=12;K=6}D+='<span style="color:#'+m[(G>>J)&63]+";background-color:#"+m[(G>>K)&63];if(G&A){D+=";text-decoration:underline"}D+=';">';F="</span>"+F;H=G}E=y[L][I];switch(E){case"&":D+="&amp;";break;case"<":D+="&lt;";break;case">":D+="&gt;";break;case" ":D+="&nbsp;";break;default:D+=E;break}}if(L!=(C.height-1)){D+="<br>"}}C.DivElement.innerHTML="<font size='4'><b>"+D+F+"</b></font>"};C.TermInit=function(){C.TermResetScreen()};C.Init();return C};var ZLIB=(ZLIB||{});if(typeof ZLIB.common_initialized==="undefined"){ZLIB.Z_NO_FLUSH=0;ZLIB.Z_PARTIAL_FLUSH=1;ZLIB.Z_SYNC_FLUSH=2;ZLIB.Z_FULL_FLUSH=3;ZLIB.Z_FINISH=4;ZLIB.Z_BLOCK=5;ZLIB.Z_TREES=6;ZLIB.Z_OK=0;ZLIB.Z_STREAM_END=1;ZLIB.Z_NEED_DICT=2;ZLIB.Z_ERRNO=(-1);ZLIB.Z_STREAM_ERROR=(-2);ZLIB.Z_DATA_ERROR=(-3);ZLIB.Z_MEM_ERROR=(-4);ZLIB.Z_BUF_ERROR=(-5);ZLIB.Z_VERSION_ERROR=(-6);ZLIB.Z_DEFLATED=8;ZLIB.z_stream=function(){this.next_in=0;this.avail_in=0;this.total_in=0;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg=null;this.state=null;this.data_type=0;this.adler=0;this.input_data="";this.output_data="";this.error=0;this.checksum_function=null};ZLIB.gz_header=function(){this.text=0;this.time=0;this.xflags=0;this.os=255;this.extra=null;this.extra_len=0;this.extra_max=0;this.name=null;this.name_max=0;this.comment=null;this.comm_max=0;this.hcrc=0;this.done=0};ZLIB.common_initialized=true}if(typeof ZLIB==="undefined"){alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js")}(function(){var o=15;var G=0;var D=1;var am=2;var af=3;var A=4;var B=5;var ac=6;var j=7;var F=8;var q=9;var p=10;var an=11;var ao=12;var aj=13;var l=14;var k=15;var al=16;var W=17;var g=18;var S=19;var R=20;var T=21;var r=22;var s=23;var aa=24;var Y=25;var d=26;var V=27;var v=28;var a=29;var ab=30;var ak=31;var z=852;var y=592;var x=(z+y);var h=0;var X=1;var u=2;var N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var O=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69];var L=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var M=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";function K(aR,aV){var aM=15;var aU=aR.next;var at=(aV==u?aR.distbits:aR.lenbits);var aX=aR.work;var aH=aR.lens;var aI=(aV==u?aR.nlen:0);var aS=aR.codes;var au;if(aV==X){au=aR.nlen}else{if(aV==u){au=aR.ndist}else{au=19}}var aG;var aT;var aN,aL;var aQ;var aw;var ax;var aF;var aW;var aD;var aE;var aB;var aJ;var aK;var aC;var aO;var aq;var ar;var az;var aA;var ay;var av=new Array(aM+1);var aP=new Array(aM+1);for(aG=0;aG<=aM;aG++){av[aG]=0}for(aT=0;aT<au;aT++){av[aH[aI+aT]]++}aQ=at;for(aL=aM;aL>=1;aL--){if(av[aL]!=0){break}}if(aQ>aL){aQ=aL}if(aL==0){aC={op:64,bits:1,val:0};aS[aU++]=aC;aS[aU++]=aC;if(aV==u){aR.distbits=1}else{aR.lenbits=1}aR.next=aU;return 0}for(aN=1;aN<aL;aN++){if(av[aN]!=0){break}}if(aQ<aN){aQ=aN}aF=1;for(aG=1;aG<=aM;aG++){aF<<=1;aF-=av[aG];if(aF<0){return -1}}if(aF>0&&(aV==h||aL!=1)){aR.next=aU;return -1}aP[1]=0;for(aG=1;aG<aM;aG++){aP[aG+1]=aP[aG]+av[aG]}for(aT=0;aT<au;aT++){if(aH[aI+aT]!=0){aX[aP[aH[aI+aT]]++]=aT}}switch(aV){case h:aq=az=aX;ar=0;aA=0;ay=19;break;case X:aq=N;ar=-257;az=O;aA=-257;ay=256;break;default:aq=L;az=M;ar=0;aA=0;ay=-1}aD=0;aT=0;aG=aN;aO=aU;aw=aQ;ax=0;aJ=-1;aW=1<<aQ;aK=aW-1;if((aV==X&&aW>=z)||(aV==u&&aW>=y)){aR.next=aU;return 1}for(;;){aC={op:0,bits:aG-ax,val:0};if(aX[aT]<ay){aC.val=aX[aT]}else{if(aX[aT]>ay){aC.op=az[aA+aX[aT]];aC.val=aq[ar+aX[aT]]}else{aC.op=32+64}}aE=1<<(aG-ax);aB=1<<aw;aN=aB;do{aB-=aE;aS[aO+(aD>>>ax)+aB]=aC}while(aB!=0);aE=1<<(aG-1);while(aD&aE){aE>>>=1}if(aE!=0){aD&=aE-1;aD+=aE}else{aD=0}aT++;if(--(av[aG])==0){if(aG==aL){break}aG=aH[aI+aX[aT]]}if(aG>aQ&&(aD&aK)!=aJ){if(ax==0){ax=aQ}aO+=aN;aw=aG-ax;aF=(1<<aw);while(aw+ax<aL){aF-=av[aw+ax];if(aF<=0){break}aw++;aF<<=1}aW+=1<<aw;if((aV==X&&aW>=z)||(aV==u&&aW>=y)){aR.next=aU;return 1}aJ=aD&aK;aS[aU+aJ]={op:aw,bits:aQ,val:aO-aU}}}if(aD!=0){aS[aO+aD]={op:64,bits:aG-ax,val:0}}aR.next=aU+aW;if(aV==u){aR.distbits=aQ}else{aR.lenbits=aQ}return 0}function H(aN,aL){var aM;var aC;var aI;var aD;var aK;var aq;var ax;var aR;var aO;var aQ;var aP;var aB;var ar;var at;var aE;var au;var aH;var aw;var aA;var aJ;var aF;var av;var az=-1;var ay=-1;aM=aN.state;aC=aN.input_data;aI=aN.next_in;aD=aI+aN.avail_in-5;aK=aN.next_out;aq=aK-(aL-aN.avail_out);ax=aK+(aN.avail_out-257);aR=aM.wsize;aO=aM.whave;aQ=aM.wnext;aP=aM.window;aB=aM.hold;ar=aM.bits;at=aM.codes;aE=aM.lencode;au=aM.distcode;aH=(1<<aM.lenbits)-1;aw=(1<<aM.distbits)-1;loop:do{if(ar<15){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8;aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}aA=at[aE+(aB&aH)];dolen:while(true){aJ=aA.bits;aB>>>=aJ;ar-=aJ;aJ=aA.op;if(aJ==0){aN.output_data+=String.fromCharCode(aA.val);aK++}else{if(aJ&16){aF=aA.val;aJ&=15;if(aJ){if(ar<aJ){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}aF+=aB&((1<<aJ)-1);aB>>>=aJ;ar-=aJ}if(ar<15){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8;aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}aA=at[au+(aB&aw)];dodist:while(true){aJ=aA.bits;aB>>>=aJ;ar-=aJ;aJ=aA.op;if(aJ&16){av=aA.val;aJ&=15;if(ar<aJ){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8;if(ar<aJ){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}}av+=aB&((1<<aJ)-1);aB>>>=aJ;ar-=aJ;aJ=aK-aq;if(av>aJ){aJ=av-aJ;if(aJ>aO){if(aM.sane){aN.msg="invalid distance too far back";aM.mode=a;break loop}}az=0;ay=-1;if(aQ==0){az+=aR-aJ;if(aJ<aF){aF-=aJ;aN.output_data+=aP.substring(az,az+aJ);aK+=aJ;aJ=0;az=-1;ay=aK-av}}else{az+=aQ-aJ;if(aJ<aF){aF-=aJ;aN.output_data+=aP.substring(az,az+aJ);aK+=aJ;az=-1;ay=aK-av}}}else{az=-1;ay=aK-av}if(az>=0){aN.output_data+=aP.substring(az,az+aF);aK+=aF;az+=aF}else{var aG=aF;if(aG>aK-ay){aG=aK-ay}aN.output_data+=aN.output_data.substring(ay,ay+aG);aK+=aG;aF-=aG;ay+=aG;aK+=aF;while(aF>2){aN.output_data+=aN.output_data.charAt(ay++);aN.output_data+=aN.output_data.charAt(ay++);aN.output_data+=aN.output_data.charAt(ay++);aF-=3}if(aF){aN.output_data+=aN.output_data.charAt(ay++);if(aF>1){aN.output_data+=aN.output_data.charAt(ay++)}}}}else{if((aJ&64)==0){aA=at[au+(aA.val+(aB&((1<<aJ)-1)))];continue dodist}else{aN.msg="invalid distance code";aM.mode=a;break loop}}break dodist}}else{if((aJ&64)==0){aA=at[aE+(aA.val+(aB&((1<<aJ)-1)))];continue dolen}else{if(aJ&32){aM.mode=an;break loop}else{aN.msg="invalid literal/length code";aM.mode=a;break loop}}}}break dolen}}while(aI<aD&&aK<ax);aF=ar>>>3;aI-=aF;ar-=aF<<3;aB&=(1<<ar)-1;aN.next_in=aI;aN.next_out=aK;aN.avail_in=(aI<aD?5+(aD-aI):5-(aI-aD));aN.avail_out=(aK<ax?257+(ax-aK):257-(aK-ax));aM.hold=aB;aM.bits=ar}function ae(at){var ar;var aq=new Array(at);for(ar=0;ar<at;ar++){aq[ar]=0}return aq}function E(at,ar,aq){return(at&&(ar in at))?at[ar]:aq}function e(){return 0}function J(){var ar;this.mode=0;this.last=0;this.wrap=0;this.havedict=0;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=0;this.distcode=0;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=0;this.lens=ae(320);this.work=ae(288);this.codes=new Array(x);var aq={op:0,bits:0,val:0};for(ar=0;ar<x;ar++){this.codes[ar]=aq}this.sane=0;this.back=0;this.was=0}ZLIB.inflateResetKeep=function(ar){var aq;if(!ar||!ar.state){return ZLIB.Z_STREAM_ERROR}aq=ar.state;ar.total_in=ar.total_out=aq.total=0;ar.msg=null;if(aq.wrap){ar.adler=aq.wrap&1}aq.mode=G;aq.last=0;aq.havedict=0;aq.dmax=32768;aq.head=null;aq.hold=0;aq.bits=0;aq.lencode=0;aq.distcode=0;aq.next=0;aq.sane=1;aq.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(ar,at){var au;var aq;if(!ar||!ar.state){return ZLIB.Z_STREAM_ERROR}aq=ar.state;if(typeof at==="undefined"){at=o}if(at<0){au=0;at=-at}else{au=(at>>>4)+1;if(at<48){at&=15}}if(au==1&&(typeof ZLIB.adler32==="function")){ar.checksum_function=ZLIB.adler32}else{if(au==2&&(typeof ZLIB.crc32==="function")){ar.checksum_function=ZLIB.crc32}else{ar.checksum_function=e}}if(at&&(at<8||at>15)){return ZLIB.Z_STREAM_ERROR}if(aq.window&&aq.wbits!=at){aq.window=null}aq.wrap=au;aq.wbits=at;aq.wsize=0;aq.whave=0;aq.wnext=0;return ZLIB.inflateResetKeep(ar)};ZLIB.inflateInit=function(ar){var aq=new ZLIB.z_stream();aq.state=new J();ZLIB.inflateReset(aq,ar);return aq};ZLIB.inflatePrime=function(at,aq,au){var ar;if(!at||!at.state){return ZLIB.Z_STREAM_ERROR}ar=at.state;if(aq<0){ar.hold=0;ar.bits=0;return ZLIB.Z_OK}if(aq>16||ar.bits+aq>32){return ZLIB.Z_STREAM_ERROR}au&=(1<<aq)-1;ar.hold+=au<<ar.bits;ar.bits+=aq;return ZLIB.Z_OK};var U=null;var t=null;function C(ar){var aq;if(!U){U=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:212},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:180},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:244},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:204},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:172},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:236},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:156},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:220},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:188},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:252},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:194},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:162},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:226},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:146},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:210},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:178},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:242},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:202},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:170},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:234},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:154},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:218},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:186},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:250},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:198},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:166},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:230},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:150},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:214},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:182},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:246},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:206},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:174},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:238},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:158},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:222},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:190},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:254},{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:193},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:161},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:225},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:145},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:209},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:177},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:241},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:201},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:169},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:233},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:153},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:217},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:185},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:249},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:197},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:165},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:229},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:149},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:213},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:181},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:245},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:205},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:173},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:237},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:157},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:221},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:189},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:253},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:195},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:163},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:227},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:147},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:211},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:243},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:203},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:171},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:235},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]}if(!t){t=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]}ar.lencode=0;ar.distcode=512;for(aq=0;aq<512;aq++){ar.codes[aq]=U[aq]}for(aq=0;aq<32;aq++){ar.codes[aq+512]=t[aq]}ar.lenbits=9;ar.distbits=5}function ap(at){var ar=at.state;var aq=at.output_data.length;if(ar.window===null){ar.window=""}if(ar.wsize==0){ar.wsize=1<<ar.wbits}if(aq>=ar.wsize){ar.window=at.output_data.substring(aq-ar.wsize)}else{if(ar.whave+aq<ar.wsize){ar.window+=at.output_data}else{ar.window=ar.window.substring(ar.whave-(ar.wsize-aq))+at.output_data}}ar.whave=ar.window.length;if(ar.whave<ar.wsize){ar.wnext=ar.whave}else{ar.wnext=0}return 0}function m(ar,at){var aq=[at&255,(at>>>8)&255];ar.state.check=ar.checksum_function(ar.state.check,aq,0,2)}function n(ar,at){var aq=[at&255,(at>>>8)&255,(at>>>16)&255,(at>>>24)&255];ar.state.check=ar.checksum_function(ar.state.check,aq,0,4)}function Z(ar,aq){aq.strm=ar;aq.left=ar.avail_out;aq.next=ar.next_in;aq.have=ar.avail_in;aq.hold=ar.state.hold;aq.bits=ar.state.bits;return aq}function ah(aq){var ar=aq.strm;ar.next_in=aq.next;ar.avail_out=aq.left;ar.avail_in=aq.have;ar.state.hold=aq.hold;ar.state.bits=aq.bits}function P(aq){aq.hold=0;aq.bits=0}function ag(aq){if(aq.have==0){return false}aq.have--;aq.hold+=(aq.strm.input_data.charCodeAt(aq.next++)&255)<<aq.bits;aq.bits+=8;return true}function ad(ar,aq){while(ar.bits<aq){if(!ag(ar)){return false}}return true}function b(ar,aq){return ar.hold&((1<<aq)-1)}function w(ar,aq){ar.hold>>>=aq;ar.bits-=aq}function c(aq){aq.hold>>>=aq.bits&7;aq.bits-=aq.bits&7}function ai(aq){return((aq>>>24)&255)+((aq>>>8)&65280)+((aq&65280)<<8)+((aq&255)<<24)}var I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(aD,at){var aC;var aB;var aq,az;var ar;var av=-1;var au=-1;var aw;var ax;var ay;var aA;if(!aD||!aD.state||(!aD.input_data&&aD.avail_in!=0)){return ZLIB.Z_STREAM_ERROR}aC=aD.state;if(aC.mode==an){aC.mode=ao}aB={};Z(aD,aB);aq=aB.have;az=aB.left;aA=ZLIB.Z_OK;inf_leave:for(;;){switch(aC.mode){case G:if(aC.wrap==0){aC.mode=ao;break}if(!ad(aB,16)){break inf_leave}if((aC.wrap&2)&&aB.hold==35615){aC.check=aD.checksum_function(0,null,0,0);m(aD,aB.hold);P(aB);aC.mode=D;break}aC.flags=0;if(aC.head!==null){aC.head.done=-1}if(!(aC.wrap&1)||((b(aB,8)<<8)+(aB.hold>>>8))%31){aD.msg="incorrect header check";aC.mode=a;break}if(b(aB,4)!=ZLIB.Z_DEFLATED){aD.msg="unknown compression method";aC.mode=a;break}w(aB,4);ay=b(aB,4)+8;if(aC.wbits==0){aC.wbits=ay}else{if(ay>aC.wbits){aD.msg="invalid window size";aC.mode=a;break}}aC.dmax=1<<ay;aD.adler=aC.check=aD.checksum_function(0,null,0,0);aC.mode=aB.hold&512?q:an;P(aB);break;case D:if(!ad(aB,16)){break inf_leave}aC.flags=aB.hold;if((aC.flags&255)!=ZLIB.Z_DEFLATED){aD.msg="unknown compression method";aC.mode=a;break}if(aC.flags&57344){aD.msg="unknown header flags set";aC.mode=a;break}if(aC.head!==null){aC.head.text=(aB.hold>>>8)&1}if(aC.flags&512){m(aD,aB.hold)}P(aB);aC.mode=am;case am:if(!ad(aB,32)){break inf_leave}if(aC.head!==null){aC.head.time=aB.hold}if(aC.flags&512){n(aD,aB.hold)}P(aB);aC.mode=af;case af:if(!ad(aB,16)){break inf_leave}if(aC.head!==null){aC.head.xflags=aB.hold&255;aC.head.os=aB.hold>>>8}if(aC.flags&512){m(aD,aB.hold)}P(aB);aC.mode=A;case A:if(aC.flags&1024){if(!ad(aB,16)){break inf_leave}aC.length=aB.hold;if(aC.head!==null){aC.head.extra_len=aB.hold}if(aC.flags&512){m(aD,aB.hold)}P(aB);aC.head.extra=""}else{if(aC.head!==null){aC.head.extra=null}}aC.mode=B;case B:if(aC.flags&1024){ar=aC.length;if(ar>aB.have){ar=aB.have}if(ar){if(aC.head!==null&&aC.head.extra!==null){ay=aC.head.extra_len-aC.length;aC.head.extra+=aD.input_data.substring(aB.next,aB.next+(ay+ar>aC.head.extra_max?aC.head.extra_max-ay:ar))}if(aC.flags&512){aC.check=aD.checksum_function(aC.check,aD.input_data,aB.next,ar)}aB.have-=ar;aB.next+=ar;aC.length-=ar}if(aC.length){break inf_leave}}aC.length=0;aC.mode=ac;case ac:if(aC.flags&2048){if(aB.have==0){break inf_leave}if(aC.head!==null&&aC.head.name===null){aC.head.name=""}ar=0;do{ay=aD.input_data.charAt(aB.next+ar);ar++;if(ay==="\0"){break}if(aC.head!==null&&aC.length<aC.head.name_max){aC.head.name+=ay;aC.length++}}while(ar<aB.have);if(aC.flags&512){aC.check=aD.checksum_function(aC.check,aD.input_data,aB.next,ar)}aB.have-=ar;aB.next+=ar;if(ay!=="\0"){break inf_leave}}else{if(aC.head!==null){aC.head.name=null}}aC.length=0;aC.mode=j;case j:if(aC.flags&4096){if(aB.have==0){break inf_leave}ar=0;if(aC.head!==null&&aC.head.comment===null){aC.head.comment=""}do{ay=aD.input_data.charAt(aB.next+ar);ar++;if(ay==="\0"){break}if(aC.head!==null&&aC.length<aC.head.comm_max){aC.head.comment+=ay;aC.length++}}while(ar<aB.have);if(aC.flags&512){aC.check=aD.checksum_function(aC.check,aD.input_data,aB.next,ar)}aB.have-=ar;aB.next+=ar;if(ay!=="\0"){break inf_leave}}else{if(aC.head!==null){aC.head.comment=null}}aC.mode=F;case F:if(aC.flags&512){if(!ad(aB,16)){break inf_leave}if(aB.hold!=(aC.check&65535)){aD.msg="header crc mismatch";aC.mode=a;break}P(aB)}if(aC.head!==null){aC.head.hcrc=(aC.flags>>>9)&1;aC.head.done=1}aD.adler=aC.check=aD.checksum_function(0,null,0,0);aC.mode=an;break;case q:if(!ad(aB,32)){break inf_leave}aD.adler=aC.check=ai(aB.hold);P(aB);aC.mode=p;case p:if(aC.havedict==0){ah(aB);return ZLIB.Z_NEED_DICT}aD.adler=aC.check=aD.checksum_function(0,null,0,0);aC.mode=an;case an:if(at==ZLIB.Z_BLOCK||at==ZLIB.Z_TREES){break inf_leave}case ao:if(aC.last){c(aB);aC.mode=d;break}if(!ad(aB,3)){break inf_leave}aC.last=b(aB,1);w(aB,1);switch(b(aB,2)){case 0:aC.mode=aj;break;case 1:C(aC);aC.mode=S;if(at==ZLIB.Z_TREES){w(aB,2);break inf_leave}break;case 2:aC.mode=al;break;case 3:aD.msg="invalid block type";aC.mode=a}w(aB,2);break;case aj:c(aB);if(!ad(aB,32)){break inf_leave}if((aB.hold&65535)!=(((aB.hold>>>16)&65535)^65535)){aD.msg="invalid stored block lengths";aC.mode=a;break}aC.length=aB.hold&65535;P(aB);aC.mode=l;if(at==ZLIB.Z_TREES){break inf_leave}case l:aC.mode=k;case k:ar=aC.length;if(ar){if(ar>aB.have){ar=aB.have}if(ar>aB.left){ar=aB.left}if(ar==0){break inf_leave}aD.output_data+=aD.input_data.substring(aB.next,aB.next+ar);aD.next_out+=ar;aB.have-=ar;aB.next+=ar;aB.left-=ar;aC.length-=ar;break}aC.mode=an;break;case al:if(!ad(aB,14)){break inf_leave}aC.nlen=b(aB,5)+257;w(aB,5);aC.ndist=b(aB,5)+1;w(aB,5);aC.ncode=b(aB,4)+4;w(aB,4);if(aC.nlen>286||aC.ndist>30){aD.msg="too many length or distance symbols";aC.mode=a;break}aC.have=0;aC.mode=W;case W:while(aC.have<aC.ncode){if(!ad(aB,3)){break inf_leave}var aE=b(aB,3);aC.lens[I[aC.have++]]=aE;w(aB,3)}while(aC.have<19){aC.lens[I[aC.have++]]=0}aC.next=0;aC.lencode=0;aC.lenbits=7;aA=K(aC,h);if(aA){aD.msg="invalid code lengths set";aC.mode=a;break}aC.have=0;aC.mode=g;case g:while(aC.have<aC.nlen+aC.ndist){for(;;){aw=aC.codes[aC.lencode+b(aB,aC.lenbits)];if(aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}if(aw.val<16){w(aB,aw.bits);aC.lens[aC.have++]=aw.val}else{if(aw.val==16){if(!ad(aB,aw.bits+2)){break inf_leave}w(aB,aw.bits);if(aC.have==0){aD.msg="invalid bit length repeat";aC.mode=a;break}ay=aC.lens[aC.have-1];ar=3+b(aB,2);w(aB,2)}else{if(aw.val==17){if(!ad(aB,aw.bits+3)){break inf_leave}w(aB,aw.bits);ay=0;ar=3+b(aB,3);w(aB,3)}else{if(!ad(aB,aw.bits+7)){break inf_leave}w(aB,aw.bits);ay=0;ar=11+b(aB,7);w(aB,7)}}if(aC.have+ar>aC.nlen+aC.ndist){aD.msg="invalid bit length repeat";aC.mode=a;break}while(ar--){aC.lens[aC.have++]=ay}}}if(aC.mode==a){break}if(aC.lens[256]==0){aD.msg="invalid code -- missing end-of-block";aC.mode=a;break}aC.next=0;aC.lencode=aC.next;aC.lenbits=9;aA=K(aC,X);if(aA){aD.msg="invalid literal/lengths set";aC.mode=a;break}aC.distcode=aC.next;aC.distbits=6;aA=K(aC,u);if(aA){aD.msg="invalid distances set";aC.mode=a;break}aC.mode=S;if(at==ZLIB.Z_TREES){break inf_leave}case S:aC.mode=R;case R:if(aB.have>=6&&aB.left>=258){ah(aB);H(aD,az);Z(aD,aB);if(aC.mode==an){aC.back=-1}break}aC.back=0;for(;;){aw=aC.codes[aC.lencode+b(aB,aC.lenbits)];if(aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}if(aw.op&&(aw.op&240)==0){ax=aw;for(;;){aw=aC.codes[aC.lencode+ax.val+(b(aB,ax.bits+ax.op)>>>ax.bits)];if(ax.bits+aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}w(aB,ax.bits);aC.back+=ax.bits}w(aB,aw.bits);aC.back+=aw.bits;aC.length=aw.val;if(aw.op==0){aC.mode=Y;break}if(aw.op&32){aC.back=-1;aC.mode=an;break}if(aw.op&64){aD.msg="invalid literal/length code";aC.mode=a;break}aC.extra=aw.op&15;aC.mode=T;case T:if(aC.extra){if(!ad(aB,aC.extra)){break inf_leave}aC.length+=b(aB,aC.extra);w(aB,aC.extra);aC.back+=aC.extra}aC.was=aC.length;aC.mode=r;case r:for(;;){aw=aC.codes[aC.distcode+b(aB,aC.distbits)];if(aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}if((aw.op&240)==0){ax=aw;for(;;){aw=aC.codes[aC.distcode+ax.val+(b(aB,ax.bits+ax.op)>>>ax.bits)];if((ax.bits+aw.bits)<=aB.bits){break}if(!ag(aB)){break inf_leave}}w(aB,ax.bits);aC.back+=ax.bits}w(aB,aw.bits);aC.back+=aw.bits;if(aw.op&64){aD.msg="invalid distance code";aC.mode=a;break}aC.offset=aw.val;aC.extra=aw.op&15;aC.mode=s;case s:if(aC.extra){if(!ad(aB,aC.extra)){break inf_leave}aC.offset+=b(aB,aC.extra);w(aB,aC.extra);aC.back+=aC.extra}aC.mode=aa;case aa:if(aB.left==0){break inf_leave}ar=az-aB.left;if(aC.offset>ar){ar=aC.offset-ar;if(ar>aC.whave){if(aC.sane){aD.msg="invalid distance too far back";aC.mode=a;break}}if(ar>aC.wnext){ar-=aC.wnext;av=aC.wsize-ar;au=-1}else{av=aC.wnext-ar;au=-1}if(ar>aC.length){ar=aC.length}}else{av=-1;au=aD.next_out-aC.offset;ar=aC.length}if(ar>aB.left){ar=aB.left}aB.left-=ar;aC.length-=ar;if(av>=0){aD.output_data+=aC.window.substring(av,av+ar);aD.next_out+=ar;ar=0}else{aD.next_out+=ar;do{aD.output_data+=aD.output_data.charAt(au++)}while(--ar)}if(aC.length==0){aC.mode=R}break;case Y:if(aB.left==0){break inf_leave}aD.output_data+=String.fromCharCode(aC.length);aD.next_out++;aB.left--;aC.mode=R;break;case d:if(aC.wrap){if(!ad(aB,32)){break inf_leave}az-=aB.left;aD.total_out+=az;aC.total+=az;if(az){aD.adler=aC.check=aD.checksum_function(aC.check,aD.output_data,aD.output_data.length-az,az)}az=aB.left;if((aC.flags?aB.hold:ai(aB.hold))!=aC.check){aD.msg="incorrect data check";aC.mode=a;break}P(aB)}aC.mode=V;case V:if(aC.wrap&&aC.flags){if(!ad(aB,32)){break inf_leave}if(aB.hold!=(aC.total&4294967295)){aD.msg="incorrect length check";aC.mode=a;break}P(aB)}aC.mode=v;case v:aA=ZLIB.Z_STREAM_END;break inf_leave;case a:aA=ZLIB.Z_DATA_ERROR;break inf_leave;case ab:return ZLIB.Z_MEM_ERROR;case ak:default:return ZLIB.Z_STREAM_ERROR}}inf_leave:ah(aB);if(aC.wsize||(az!=aD.avail_out&&aC.mode<a&&(aC.mode<d||at!=ZLIB.Z_FINISH))){if(ap(aD)){aC.mode=ab;return ZLIB.Z_MEM_ERROR}}aq-=aD.avail_in;az-=aD.avail_out;aD.total_in+=aq;aD.total_out+=az;aC.total+=az;if(aC.wrap&&az){aD.adler=aC.check=aD.checksum_function(aC.check,aD.output_data,0,aD.output_data.length)}aD.data_type=aC.bits+(aC.last?64:0)+(aC.mode==an?128:0)+(aC.mode==S||aC.mode==l?256:0);if(((aq==0&&az==0)||at==ZLIB.Z_FINISH)&&aA==ZLIB.Z_OK){aA=ZLIB.Z_BUF_ERROR}return aA};ZLIB.inflateEnd=function(ar){var aq;if(!ar||!ar.state){return ZLIB.Z_STREAM_ERROR}aq=ar.state;aq.window=null;ar.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=function(au,av){var at;var aq;var ar=16384;this.input_data=au;this.next_in=E(av,"next_in",0);this.avail_in=E(av,"avail_in",au.length-this.next_in);at=E(av,"flush",ZLIB.Z_SYNC_FLUSH);aq=E(av,"avail_out",-1);var aw="";do{this.avail_out=(aq>=0?aq:ar);this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,at);if(aq>=0){return this.output_data}aw+=this.output_data;if(this.avail_out>0){break}}while(this.error==ZLIB.Z_OK);return aw};ZLIB.z_stream.prototype.inflateReset=function(aq){return ZLIB.inflateReset(this,aq)}}());if(typeof ZLIB==="undefined"){alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js")}(function(){var c=65521;var d=5552;function b(e,g,k,h){var l;var j;l=(e>>>16)&65535;e&=65535;if(h==1){e+=g.charCodeAt(k)&255;if(e>=c){e-=c}l+=e;if(l>=c){l-=c}return e|(l<<16)}if(g===null){return 1}if(h<16){while(h--){e+=g.charCodeAt(k++)&255;l+=e}if(e>=c){e-=c}l%=c;return e|(l<<16)}while(h>=d){h-=d;j=d>>4;do{e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e}while(--j);e%=c;l%=c}if(h){while(h>=16){h-=16;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e}while(h--){e+=g.charCodeAt(k++)&255;l+=e}e%=c;l%=c}return e|(l<<16)}function a(e,g,k,h){var l;var j;l=(e>>>16)&65535;e&=65535;if(h==1){e+=g[k];if(e>=c){e-=c}l+=e;if(l>=c){l-=c}return e|(l<<16)}if(g===null){return 1}if(h<16){while(h--){e+=g[k++];l+=e}if(e>=c){e-=c}l%=c;return e|(l<<16)}while(h>=d){h-=d;j=d>>4;do{e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e}while(--j);e%=c;l%=c}if(h){while(h>=16){h-=16;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e}while(h--){e+=g[k++];l+=e}e%=c;l%=c}return e|(l<<16)}ZLIB.adler32=function(e,g,j,h){if(typeof g==="string"){return b(e,g,j,h)}else{return a(e,g,j,h)}};ZLIB.adler32_combine=function(e,g,h){var k;var l;var j;if(h<0){return 4294967295}h%=c;j=h;k=e&65535;l=j*k;l%=c;k+=(g&65535)+c-1;l+=((e>>16)&65535)+((g>>16)&65535)+c-j;if(k>=c){k-=c}if(k>=c){k-=c}if(l>=(c<<1)){l-=(c<<1)}if(l>=c){l-=c}return k|(l<<16)}}());if(typeof ZLIB==="undefined"){alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js")}(function(){var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function c(j,h,l,k){if(h==null){return 0}j=j^4294967295;while(k>=8){j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);k-=8}if(k){do{j=a[(j^h.charCodeAt(l++))&255]^(j>>>8)}while(--k)}return j^4294967295}function b(j,h,l,k){if(h==null){return 0}j=j^4294967295;while(k>=8){j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);k-=8}if(k){do{j=a[(j^h[l++])&255]^(j>>>8)}while(--k)}return j^4294967295}ZLIB.crc32=function(j,h,l,k){if(typeof h==="string"){return c(j,h,l,k)}else{return b(j,h,l,k)}};var d=32;function g(h,l){var k;var j=0;k=0;while(l){if(l&1){k^=h[j]}l>>=1;j++}return k}function e(k,h){var j;for(j=0;j<d;j++){k[j]=g(h,h[j])}}ZLIB.crc32_combine=function(h,j,l){var m;var p;var k;var o;if(l<=0){return h}k=new Array(d);o=new Array(d);o[0]=3988292384;p=1;for(m=1;m<d;m++){o[m]=p;p<<=1}e(k,o);e(o,k);do{e(k,o);if(l&1){h=g(k,h)}l>>=1;if(l==0){break}e(o,k);if(l&1){h=g(o,h)}l>>=1}while(l!=0);h^=j;return h}}());var CreateAmtRedirect=function(e,a){var g={};g.m=e;e.parent=g;g.authCookie=a;g.State=0;g.socket=null;g.host=null;g.port=0;g.user=null;g.pass=null;g.authuri="/RedirectionService";g.tlsv1only=0;g.inDataCount=0;g.connectstate=0;g.protocol=e.protocol;g.debugmode=0;g.amtaccumulator="";g.amtsequence=1;g.amtkeepalivetimer=null;g.onStateChanged=null;g.Start=function(h,k,n,j,l){g.host=h;g.port=k;g.user=n;g.pass=j;g.connectstate=0;g.inDataCount=0;var m=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+h+"&port="+k+"&tls="+l+((n=="*")?"&serverauth=1":"")+((typeof j==="undefined")?("&serverauth=1&user="+n):"");if((a!=null)&&(a!="")){m+="&auth="+a}g.socket=new WebSocket(m);g.socket.onopen=g.xxOnSocketConnected;g.socket.onmessage=g.xxOnMessage;g.socket.onclose=g.xxOnSocketClosed;g.xxStateChange(1)};g.xxOnSocketConnected=function(){if(g.debugmode==1){console.log("onSocketConnected")}g.xxStateChange(2);if(g.protocol==1){g.xxSend(g.RedirectStartSol)}if(g.protocol==2){g.xxSend(g.RedirectStartKvm)}if(g.protocol==3){g.xxSend(g.RedirectStartIder)}};var b=new FileReader();var d=false,c=[];if(b.readAsBinaryString){b.onload=function(h){g.xxOnSocketData(h.target.result);if(c.length==0){d=false}else{b.readAsBinaryString(new Blob([c.shift()]))}}}else{if(b.readAsArrayBuffer){b.onloadend=function(h){g.xxOnSocketData(h.target.result);if(c.length==0){d=false}else{b.readAsArrayBuffer(c.shift())}}}}g.xxOnMessage=function(k){g.inDataCount++;if(typeof k.data=="object"){if(d==true){c.push(k.data);return}if(b.readAsBinaryString){d=true;b.readAsBinaryString(new Blob([k.data]))}else{if(f.readAsArrayBuffer){d=true;b.readAsArrayBuffer(k.data)}else{var h="",j=new Uint8Array(k.data),m=j.byteLength;for(var l=0;l<m;l++){h+=String.fromCharCode(j[l])}g.xxOnSocketData(h)}}}else{g.xxOnSocketData(k.data)}};g.xxOnSocketData=function(t){if(!t||g.connectstate==-1){return}if(typeof t==="object"){var m="";var o=new Uint8Array(t);var y=o.byteLength;for(var x=0;x<y;x++){m+=String.fromCharCode(o[x])}t=m}else{if(typeof t!=="string"){return}}if((g.protocol==2||g.protocol==3)&&g.connectstate==1){return g.m.ProcessData(t)}g.amtaccumulator+=t;while(g.amtaccumulator.length>=1){var p=0;switch(g.amtaccumulator.charCodeAt(0)){case 17:if(g.amtaccumulator.length<4){return}var L=g.amtaccumulator.charCodeAt(1);switch(L){case 0:if(g.amtaccumulator.length<13){return}var C=g.amtaccumulator.charCodeAt(12);if(g.amtaccumulator.length<13+C){return}g.xxSend(String.fromCharCode(19,0,0,0,0,0,0,0,0));p=(13+C);break;default:g.Stop(1);break}break;case 20:if(g.amtaccumulator.length<9){return}var k=ReadIntX(g.amtaccumulator,5);if(g.amtaccumulator.length<9+k){return}var K=g.amtaccumulator.charCodeAt(1);var l=g.amtaccumulator.charCodeAt(4);var h=[];for(x=0;x<k;x++){h.push(g.amtaccumulator.charCodeAt(9+x))}var j=g.amtaccumulator.substring(9,9+k);p=9+k;if(l==0){if(h.indexOf(4)>=0){g.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(g.user.length+g.authuri.length+8)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(0,0)+String.fromCharCode(g.authuri.length)+g.authuri+String.fromCharCode(0,0,0,0))}else{if(h.indexOf(3)>=0){g.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(g.user.length+g.authuri.length+7)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(0,0)+String.fromCharCode(g.authuri.length)+g.authuri+String.fromCharCode(0,0,0))}else{if(h.indexOf(1)>=0){g.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(g.user.length+g.pass.length+2)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(g.pass.length)+g.pass)}else{g.Stop(2)}}}}else{if((l==3||l==4)&&K==1){var s=0;var G=j.charCodeAt(s);var F=j.substring(s+1,s+1+G);s+=(G+1);var B=j.charCodeAt(s);var A=j.substring(s+1,s+1+B);s+=(B+1);var E=0;var D=null;var q=g.xxRandomNonce(32);var J="00000002";var v="";if(l==4){E=j.charCodeAt(s);D=j.substring(s+1,s+1+E);s+=(E+1);v=J+":"+q+":"+D+":"}var u=hex_md5(hex_md5(g.user+":"+F+":"+g.pass)+":"+A+":"+v+hex_md5("POST:"+g.authuri));var M=g.user.length+F.length+A.length+g.authuri.length+q.length+J.length+u.length+7;if(l==4){M+=(D.length+1)}var n=String.fromCharCode(19,0,0,0,l)+IntToStrX(M)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(F.length)+F+String.fromCharCode(A.length)+A+String.fromCharCode(g.authuri.length)+g.authuri+String.fromCharCode(q.length)+q+String.fromCharCode(J.length)+J+String.fromCharCode(u.length)+u;if(l==4){n+=(String.fromCharCode(D.length)+D)}g.xxSend(n)}else{if(K==0){if(g.protocol==1){var z=10000;var O=100;var N=0;var I=10000;var H=100;var w=0;g.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(g.amtsequence++)+ShortToStrX(z)+ShortToStrX(O)+ShortToStrX(N)+ShortToStrX(I)+ShortToStrX(H)+ShortToStrX(w)+IntToStrX(0))}if(g.protocol==2){g.xxSend(String.fromCharCode(64,0,0,0,0,0,0,0))}if(g.protocol==3){g.connectstate=1;g.xxStateChange(3)}}else{g.Stop(3)}}}break;case 33:if(g.amtaccumulator.length<23){break}p=23;g.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(g.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));if(g.protocol==1){g.amtkeepalivetimer=setInterval(g.xxSendAmtKeepAlive,2000)}g.connectstate=1;g.xxStateChange(3);break;case 41:if(g.amtaccumulator.length<10){break}p=10;break;case 42:if(g.amtaccumulator.length<10){break}var r=(10+((g.amtaccumulator.charCodeAt(9)&255)<<8)+(g.amtaccumulator.charCodeAt(8)&255));if(g.amtaccumulator.length<r){break}g.m.ProcessData(g.amtaccumulator.substring(10,r));p=r;break;case 43:if(g.amtaccumulator.length<8){break}p=8;break;case 65:if(g.amtaccumulator.length<8){break}g.connectstate=1;g.m.Start();if(g.amtaccumulator.length>8){g.m.ProcessData(g.amtaccumulator.substring(8))}p=g.amtaccumulator.length;break;default:console.log("Unknown Intel AMT command: "+g.amtaccumulator.charCodeAt(0)+" acclen="+g.amtaccumulator.length);g.Stop(4);return}if(p==0){return}g.amtaccumulator=g.amtaccumulator.substring(p)}};g.xxSend=function(k){if(g.socket!=null&&g.socket.readyState==WebSocket.OPEN){if(g.debugmode==1){console.log("Send",k)}var h=new Uint8Array(k.length);for(var j=0;j<k.length;++j){h[j]=k.charCodeAt(j)}g.socket.send(h.buffer)}};g.send=function(h){if(g.socket==null||g.connectstate!=1){return}if(g.protocol==1){g.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(g.amtsequence++)+ShortToStrX(h.length)+h)}else{g.xxSend(h)}};g.xxSendAmtKeepAlive=function(){if(g.socket==null){return}g.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(g.amtsequence++))};g.xxRandomNonceX="abcdef0123456789";g.xxRandomNonce=function(j){var k="";for(var h=0;h<j;h++){k+=g.xxRandomNonceX.charAt(Math.floor(Math.random()*g.xxRandomNonceX.length))}return k};g.xxOnSocketClosed=function(){if(g.debugmode==1){console.log("onSocketClosed")}if((g.inDataCount==0)&&(g.tlsv1only==0)){g.tlsv1only=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only=1"+((g.user=="*")?"&serverauth=1":"")+((typeof pass==="undefined")?("&serverauth=1&user="+g.user):""));g.socket.onopen=g.xxOnSocketConnected;g.socket.onmessage=g.xxOnMessage;g.socket.onclose=g.xxOnSocketClosed}else{g.Stop(5)}};g.xxStateChange=function(h){if(g.State==h){return}g.State=h;g.m.xxStateChange(g.State);if(g.onStateChanged!=null){g.onStateChanged(g,g.State)}};g.Stop=function(h){if(g.debugmode==1){console.log("onSocketStop",h)}g.xxStateChange(0);g.connectstate=-1;g.amtaccumulator="";if(g.socket!=null){g.socket.close();g.socket=null}if(g.amtkeepalivetimer!=null){clearInterval(g.amtkeepalivetimer);g.amtkeepalivetimer=null}};g.RedirectStartSol=String.fromCharCode(16,0,0,0,83,79,76,32);g.RedirectStartKvm=String.fromCharCode(16,1,0,0,75,86,77,82);g.RedirectStartIder=String.fromCharCode(16,0,0,0,73,68,69,82);return g};var CreateWsmanComm=function(l,o,q,n,p){var m={};m.PendingAjax=[];m.ActiveAjaxCount=0;m.MaxActiveAjaxCount=1;m.FailAllError=0;m.challengeParams=null;m.noncecounter=1;m.authcounter=0;m.socket=null;m.socketState=0;m.host=l;m.port=o;m.user=q;m.pass=n;m.tls=p;m.tlsv1only=1;m.cnonce=Math.random().toString(36).substring(7);m.PerformAjax=function(t,s,v,u,w,r){if(m.ActiveAjaxCount<m.MaxActiveAjaxCount&&m.PendingAjax.length==0){m.PerformAjaxEx(t,s,v,w,r)}else{if(u==1){m.PendingAjax.unshift([t,s,v,w,r])}else{m.PendingAjax.push([t,s,v,w,r])}}};m.PerformNextAjax=function(){if(m.ActiveAjaxCount>=m.MaxActiveAjaxCount||m.PendingAjax.length==0){return}var r=m.PendingAjax.shift();m.PerformAjaxEx(r[0],r[1],r[2],r[3],r[4]);m.PerformNextAjax()};m.PerformAjaxEx=function(t,s,u,v,r){if(m.FailAllError!=0){m.gotNextMessagesError({status:m.FailAllError},"error",null,[t,s,u,v,r]);return}if(!t){t=""}m.ActiveAjaxCount++;return m.PerformAjaxExNodeJS(t,s,u,v,r)};m.pendingAjaxCall=[];m.PerformAjaxExNodeJS=function(t,s,u,v,r){m.PerformAjaxExNodeJS2(t,s,u,v,r,3)};m.PerformAjaxExNodeJS2=function(t,s,v,w,r,u){if(u<=0||m.FailAllError!=0){m.ActiveAjaxCount--;if(m.FailAllError!=999){m.gotNextMessages(null,"error",{status:((m.FailAllError==0)?408:m.FailAllError)},[t,s,v,w,r])}m.PerformNextAjax();return}m.pendingAjaxCall.push([t,s,v,w,r,u]);if(m.socketState==0){m.xxConnectHttpSocket()}else{if(m.socketState==2){m.sendRequest(t,w,r)}}};m.sendRequest=function(t,v,r){v=v?v:"/wsman";r=r?r:"POST";var s=r+" "+v+" HTTP/1.1\r\n";if(m.challengeParams!=null){var u=hex_md5(hex_md5(m.user+":"+m.challengeParams.realm+":"+m.pass)+":"+m.challengeParams.nonce+":"+m.noncecounter+":"+m.cnonce+":"+m.challengeParams.qop+":"+hex_md5(r+":"+v));s+="Authorization: "+m.renderDigest({username:m.user,realm:m.challengeParams.realm,nonce:m.challengeParams.nonce,uri:v,qop:m.challengeParams.qop,response:u,nc:m.noncecounter++,cnonce:m.cnonce})+"\r\n"}s+="Host: "+m.host+":"+m.port+"\r\nTransfer-Encoding: chunked\r\n\r\n"+t.length.toString(16).toUpperCase()+"\r\n"+t+"\r\n0\r\n\r\n";g(s)};m.parseDigest=function(r){var s=r.substring(7).split(",");for(i in s){s[i]=s[i].trim()}return s.reduce(function(t,v){var u=v.split("=");t[u[0]]=u[1].replace(/"/g,"");return t},{})};m.renderDigest=function(r){var s=[];for(i in r){s.push(i)}return"Digest "+s.reduce(function(u,t){return u+","+t+'="'+r[t]+'"'},"").substring(1)};m.xxConnectHttpSocket=function(){m.socketParseState=0;m.socketAccumulator="";m.socketHeader=null;m.socketData="";m.socketState=1;console.log(m.tlsv1only);m.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+m.host+"&port="+m.port+"&tls="+m.tls+"&tlsv1only="+m.tlsv1only+((q=="*")?"&serverauth=1":"")+((typeof n==="undefined")?("&serverauth=1&user="+q):""));m.socket.onopen=c;m.socket.onmessage=a;m.socket.onclose=b};function c(){m.socketState=2;for(i in m.pendingAjaxCall){m.sendRequest(m.pendingAjaxCall[i][0],m.pendingAjaxCall[i][3],m.pendingAjaxCall[i][4])}}var h=new FileReader();var k=false,j=[];if(h.readAsBinaryString){h.onload=function(r){d(r.target.result);if(j.length==0){k=false}else{h.readAsBinaryString(new Blob([j.shift()]))}}}else{if(h.readAsArrayBuffer){h.onloadend=function(r){d(r.target.result);if(j.length==0){k=false}else{h.readAsArrayBuffer(j.shift())}}}}function a(t){if(typeof t.data=="object"){if(k==true){j.push(t.data);return}if(h.readAsBinaryString){k=true;h.readAsBinaryString(new Blob([t.data]))}else{if(h.readAsArrayBuffer){k=true;h.readAsArrayBuffer(t.data)}else{var r="",s=new Uint8Array(t.data),v=s.byteLength;for(var u=0;u<v;u++){r+=String.fromCharCode(s[u])}d(r)}}}else{d(t.data)}}function d(v){if(typeof v==="object"){var r="",s=new Uint8Array(v),y=s.byteLength;for(var x=0;x<y;x++){r+=String.fromCharCode(s[x])}v=r}else{if(typeof v!=="string"){return}}m.socketAccumulator+=v;while(true){if(m.socketParseState==0){var w=m.socketAccumulator.indexOf("\r\n\r\n");if(w<0){return}m.socketHeader=m.socketAccumulator.substring(0,w).split("\r\n");m.socketAccumulator=m.socketAccumulator.substring(w+4);m.socketParseState=1;m.socketData="";m.socketXHeader={Directive:m.socketHeader[0].split(" ")};for(x in m.socketHeader){if(x!=0){var z=m.socketHeader[x].indexOf(":");m.socketXHeader[m.socketHeader[x].substring(0,z).toLowerCase()]=m.socketHeader[x].substring(z+2)}}}if(m.socketParseState==1){var u=-1;if((m.socketXHeader.connection!=undefined)&&(m.socketXHeader.connection.toLowerCase()=="close")&&((m.socketXHeader["transfer-encoding"]==undefined)||(m.socketXHeader["transfer-encoding"].toLowerCase()!="chunked"))){u=0}else{if(m.socketXHeader["content-length"]!=undefined){u=parseInt(m.socketXHeader["content-length"]);if(m.socketAccumulator.length<u){return}var v=m.socketAccumulator.substring(0,u);m.socketAccumulator=m.socketAccumulator.substring(u);m.socketData=v;u=0}else{var t=m.socketAccumulator.indexOf("\r\n");if(t<0){return}u=parseInt(m.socketAccumulator.substring(0,t),16);if(isNaN(u)){if(m.websocket){m.websocket.close()}return}if(m.socketAccumulator.length<t+2+u+2){return}var v=m.socketAccumulator.substring(t+2,t+2+u);m.socketAccumulator=m.socketAccumulator.substring(t+2+u+2);m.socketData+=v}}if(u==0){e(m.socketXHeader,m.socketData);m.socketParseState=0;m.socketHeader=null}}}}function e(u,t){var w=parseInt(u.Directive[1]);if(isNaN(w)){w=602}if(w==401&&++(m.authcounter)<3){m.challengeParams=m.parseDigest(u["www-authenticate"])}else{var v=m.pendingAjaxCall.shift();m.authcounter=0;m.ActiveAjaxCount--;m.gotNextMessages(t,"success",{status:w},v);m.PerformNextAjax()}}function b(s){m.socketState=0;if(m.socket!=null){m.socket.close();m.socket=null}if(m.pendingAjaxCall.length>0){var t=m.pendingAjaxCall.shift();var u=t[5];m.PerformAjaxExNodeJS2(t[0],t[1],t[2],t[3],t[4],--u)}}function g(u){if(m.socketState==2&&m.socket!=null&&m.socket.readyState==WebSocket.OPEN){var r=new Uint8Array(u.length);for(var t=0;t<u.length;++t){r[t]=u.charCodeAt(t)}try{m.socket.send(r.buffer)}catch(s){}}}m.gotNextMessages=function(s,u,t,r){if(m.FailAllError==999){return}if(m.FailAllError!=0){r[1](null,m.FailAllError,r[2]);return}if(t.status!=200){r[1](null,t.status,r[2]);return}r[1](s,200,r[2])};m.gotNextMessagesError=function(t,u,s,r){if(m.FailAllError==999){return}if(m.FailAllError!=0){r[1](null,m.FailAllError,r[2]);return}r[1](m,null,{Header:{HttpError:t.status}},t.status,r[2])};m.CancelAllQueries=function(r){while(m.PendingAjax.length>0){var t=m.PendingAjax.shift();t[1](null,r,t[2])}if(m.websocket!=null){m.websocket.close();m.websocket=null;m.socketState=0}};return m};var CreateAgentRedirect=function(e,g,k,a){var h={};h.m=g;g.parent=h;h.meshserver=e;h.authCookie=a;h.State=0;h.nodeid=null;h.socket=null;h.connectstate=-1;h.tunnelid=Math.random().toString(36).substring(2);h.protocol=g.protocol;h.onStateChanged=null;h.ctrlMsgAllowed=true;h.attemptWebRTC=false;h.webRtcActive=false;h.webSwitchOk=false;h.webchannel=null;h.webrtc=null;h.debugmode=0;h.Start=function(l){var n,m=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/meshrelay.ashx?id="+h.tunnelid;if((a!=null)&&(a!="")){m+="&auth="+a}h.nodeid=l;h.connectstate=0;h.socket=new WebSocket(m);h.socket.onopen=h.xxOnSocketConnected;h.socket.onmessage=h.xxOnMessage;h.socket.onerror=function(o){};h.socket.onclose=h.xxOnSocketClosed;h.xxStateChange(1);h.meshserver.send({action:"msg",type:"tunnel",nodeid:h.nodeid,value:"*/meshrelay.ashx?id="+h.tunnelid})};h.xxOnSocketConnected=function(){if(h.debugmode==1){console.log("onSocketConnected")}h.xxStateChange(2)};h.xxOnControlCommand=function(n){var l;try{l=JSON.parse(n)}catch(m){return}if(l.ctrlChannel!="102938"){h.xxOnSocketData(n);return}if(h.webrtc!=null){if(l.type=="answer"){h.webrtc.setRemoteDescription(new RTCSessionDescription(l),function(){},h.xxCloseWebRTC)}else{if(l.type=="webrtc0"){h.webSwitchOk=true;j()}else{if(l.type=="webrtc1"){h.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc2"}')}else{if(l.type=="webrtc2"){}}}}}};h.sendCtrlMsg=function(m){if(h.ctrlMsgAllowed==true){if((typeof args!="undefined")&&args.redirtrace){console.log("RedirSend",typeof m,m)}try{h.socket.send(m)}catch(l){}}};function j(){if((h.webSwitchOk==true)&&(h.webRtcActive==true)){h.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc0"}');h.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc1"}');if(h.onStateChanged!=null){h.onStateChanged(h,h.State)}}}h.xxOnMessage=function(o){if(h.State<3){if(o.data=="c"){try{h.socket.send(h.protocol)}catch(p){}h.xxStateChange(3);if(h.attemptWebRTC==true){var n=null;if(typeof RTCPeerConnection!=="undefined"){h.webrtc=new RTCPeerConnection(n)}else{if(typeof webkitRTCPeerConnection!=="undefined"){h.webrtc=new webkitRTCPeerConnection(n)}}if(h.webrtc!=null){h.webchannel=h.webrtc.createDataChannel("DataChannel",{});h.webchannel.onmessage=h.xxOnMessage;h.webchannel.onopen=function(){h.webRtcActive=true;j()};h.webchannel.onclose=function(s){if(h.webRtcActive){h.Stop()}};h.webrtc.onicecandidate=function(s){if(s.candidate==null){try{h.socket.send(JSON.stringify(h.webrtcoffer))}catch(t){}}else{h.webrtcoffer.sdp+=("a="+s.candidate.candidate+"\r\n")}};h.webrtc.oniceconnectionstatechange=function(){if(h.webrtc!=null){if(h.webrtc.iceConnectionState=="disconnected"){if(h.webRtcActive==true){h.Stop()}else{h.xxCloseWebRTC()}}else{if(h.webrtc.iceConnectionState=="failed"){h.xxCloseWebRTC()}}}};h.webrtc.createOffer(function(s){h.webrtcoffer=s;h.webrtc.setLocalDescription(s,function(){},h.xxCloseWebRTC)},h.xxCloseWebRTC,{mandatory:{OfferToReceiveAudio:false,OfferToReceiveVideo:false}})}}return}}if(typeof o.data=="string"){h.xxOnControlCommand(o.data);return}if(typeof o.data=="object"){if(d==true){c.push(o.data);return}if(b.readAsBinaryString){d=true;b.readAsBinaryString(new Blob([o.data]))}else{if(b.readAsArrayBuffer){d=true;b.readAsArrayBuffer(o.data)}else{var l="",m=new Uint8Array(o.data),r=m.byteLength;for(var q=0;q<r;q++){l+=String.fromCharCode(m[q])}h.xxOnSocketData(l)}}}else{h.xxOnSocketData(o.data)}};var b=new FileReader();var d=false,c=[];if(b.readAsBinaryString){b.onload=function(l){h.xxOnSocketData(l.target.result);if(c.length==0){d=false}else{b.readAsBinaryString(new Blob([c.shift()]))}}}else{if(b.readAsArrayBuffer){b.onloadend=function(l){h.xxOnSocketData(l.target.result);if(c.length==0){d=false}else{b.readAsArrayBuffer(c.shift())}}}}h.xxOnSocketData=function(n){if(!n||h.connectstate==-1){return}if(typeof n==="object"){var l="",m=new Uint8Array(n),p=m.byteLength;for(var o=0;o<p;o++){l+=String.fromCharCode(m[o])}n=l}else{if(typeof n!=="string"){return}}if((typeof args!="undefined")&&args.redirtrace){console.log("RedirRecv",typeof n,n.length,n)}return h.m.ProcessData(n)};h.sendText=function(l){if(typeof l!="string"){l=JSON.stringify(l)}h.send(encode_utf8(l))};h.send=function(p){if((typeof args!="undefined")&&args.redirtrace){console.log("RedirSend",typeof p,p.length,p)}try{if(h.socket!=null&&h.socket.readyState==WebSocket.OPEN){if(typeof p=="string"){if(h.debugmode==1){var l=new Uint8Array(p.length),m=[];for(var o=0;o<p.length;++o){l[o]=p.charCodeAt(o);m.push(p.charCodeAt(o))}if(h.webRtcActive==true){h.webchannel.send(l.buffer)}else{h.socket.send(l.buffer)}}else{var l=new Uint8Array(p.length);for(var o=0;o<p.length;++o){l[o]=p.charCodeAt(o)}if(h.webRtcActive==true){h.webchannel.send(l.buffer)}else{h.socket.send(l.buffer)}}}else{if(h.webRtcActive==true){h.webchannel.send(p)}else{h.socket.send(p)}}}}catch(n){}};h.xxOnSocketClosed=function(){h.Stop(1)};h.xxStateChange=function(l){if(h.State==l){return}h.State=l;h.m.xxStateChange(h.State);if(h.onStateChanged!=null){h.onStateChanged(h,h.State)}};h.xxCloseWebRTC=function(){if(h.webchannel!=null){try{h.webchannel.close()}catch(l){}h.webchannel=null}if(h.webrtc!=null){try{h.webrtc.close()}catch(l){}h.webrtc=null}h.webRtcActive=false};h.Stop=function(m){if(h.debugmode==1){console.log("stop",m)}h.xxCloseWebRTC();h.connectstate=-1;if(h.socket!=null){try{if(h.socket.readyState==1){h.sendCtrlMsg('{"ctrlChannel":"102938","type":"close"}');h.socket.close()}}catch(l){}h.socket=null}h.xxStateChange(0)};return h};var CreateKvmDataChannel=function(h,e,d){var g={};g.m=e;e.parent=g;g.webchannel=h;g.State=0;g.protocol=e.protocol;g.onStateChanged=null;g.onControlMsg=null;g.debugmode=0;g.keepalive=d;g.rtcKeepAlive=null;g.Start=function(){if(g.debugmode==1){console.log("start")}g.xxStateChange(3);g.webchannel.onmessage=g.xxOnMessage;g.rtcKeepAlive=setInterval(g.xxSendRtcKeepAlive,30000)};var a=new FileReader();var c=false,b=[];if(a.readAsBinaryString){a.onload=function(j){g.xxOnSocketData(j.target.result);if(b.length==0){c=false}else{a.readAsBinaryString(new Blob([b.shift()]))}}}else{if(a.readAsArrayBuffer){a.onloadend=function(j){g.xxOnSocketData(j.target.result);if(b.length==0){c=false}else{a.readAsArrayBuffer(b.shift())}}}}g.xxOnMessage=function(l){if(typeof l.data=="string"){if(g.onControlMsg!=null){g.onControlMsg(l.data)}return}if(typeof l.data=="object"){if(c==true){b.push(l.data);return}if(a.readAsBinaryString){c=true;a.readAsBinaryString(new Blob([l.data]))}else{if(f.readAsArrayBuffer){c=true;a.readAsArrayBuffer(l.data)}else{var j="",k=new Uint8Array(l.data),n=k.byteLength;for(var m=0;m<n;m++){j+=String.fromCharCode(k[m])}g.xxOnSocketData(j)}}}else{g.xxOnSocketData(l.data)}};g.xxOnSocketData=function(l){if(!l){return}if(typeof l==="object"){var j="",k=new Uint8Array(l),n=k.byteLength;for(var m=0;m<n;m++){j+=String.fromCharCode(k[m])}l=j}else{if(typeof l!=="string"){return}}return g.m.ProcessData(l)};g.sendCtrlMsg=function(j){if(typeof j=="string"){g.webchannel.send(j);if(g.keepalive!=null){g.keepalive.sendKeepAlive()}}};g.send=function(l){if(typeof l=="string"){var j=new Uint8Array(l.length);for(var k=0;k<l.length;++k){j[k]=l.charCodeAt(k)}l=j}g.webchannel.send(l)};g.xxStateChange=function(j){if(g.State==j){return}g.State=j;g.m.xxStateChange(g.State);if(g.onStateChanged!=null){g.onStateChanged(g,g.State)}};g.Stop=function(){if(g.debugmode==1){console.log("stop")}if(g.rtcKeepAlive!=null){clearInterval(g.rtcKeepAlive);g.rtcKeepAlive=null}g.xxStateChange(0)};g.xxSendRtcKeepAlive=function(){g.sendCtrlMsg(JSON.stringify({action:"ping"}))};return g};var CreateAgentRemoteDesktop=function(a,e){var d={};d.CanvasId=a;if(typeof a==="string"){d.CanvasId=Q(a)}d.Canvas=d.CanvasId.getContext("2d");d.scrolldiv=e;d.State=0;d.PendingOperations=[];d.tilesReceived=0;d.TilesDrawn=0;d.KillDraw=0;d.ipad=false;d.tabletKeyboardVisible=false;d.LastX=0;d.LastY=0;d.touchenabled=0;d.submenuoffset=0;d.touchtimer=null;d.TouchArray={};d.connectmode=0;d.connectioncount=0;d.rotation=0;d.protocol=2;d.debugmode=0;d.firstUpKeys=[];d.stopInput=false;d.sessionid=0;d.username;d.oldie=false;d.CompressionLevel=50;d.ScalingLevel=1024;d.FrameRateTimer=50;d.FirstDraw=false;d.ScreenWidth=960;d.ScreenHeight=700;d.width=960;d.height=960;d.onScreenSizeChange=null;d.onMessage=null;d.onConnectCountChanged=null;d.onDebugMessage=null;d.onTouchEnabledChanged=null;d.onDisplayinfo=null;d.accumulator=null;d.Start=function(){d.State=0;d.accumulator=null};d.Stop=function(){d.setRotation(0);d.UnGrabKeyInput();d.UnGrabMouseInput();d.touchenabled=0;if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}d.Canvas.clearRect(0,0,d.CanvasId.width,d.CanvasId.height)};d.xxStateChange=function(g){if(d.State==g){return}d.State=g;d.CanvasId.style.cursor="default";switch(g){case 0:d.Stop();break;case 3:break}};d.send=function(g){if(d.debugmode>1){console.log("KSend("+g.length+"): "+rstr2hex(g))}d.parent.send(g)};d.ProcessPictureMsg=function(h,k,l){var j=new Image();j.xcount=d.tilesReceived++;var g=d.tilesReceived;j.src="data:image/jpeg;base64,"+btoa(h.substring(4,h.length));j.onload=function(){if(d.Canvas!=null&&d.KillDraw<g&&d.State!=0){d.PendingOperations.push([g,2,j,k,l]);while(d.DoPendingOperations()){}}};j.error=function(){console.log("DecodeTileError")}};d.DoPendingOperations=function(){if(d.PendingOperations.length==0){return false}for(var g=0;g<d.PendingOperations.length;g++){var h=d.PendingOperations[g];if(h[0]==(d.TilesDrawn+1)){if(h[1]==1){d.ProcessCopyRectMsg(h[2])}else{if(h[1]==2){d.Canvas.drawImage(h[2],d.rotX(h[3],h[4]),d.rotY(h[3],h[4]));delete h[2]}}d.PendingOperations.splice(g,1);delete h;d.TilesDrawn++;if(d.TilesDrawn==d.tilesReceived&&d.KillDraw<d.TilesDrawn){d.KillDraw=d.TilesDrawn=d.tilesReceived=0}return true}}if(d.oldie&&d.PendingOperations.length>0){d.TilesDrawn++}return false};d.ProcessCopyRectMsg=function(k){var l=((k.charCodeAt(0)&255)<<8)+(k.charCodeAt(1)&255);var m=((k.charCodeAt(2)&255)<<8)+(k.charCodeAt(3)&255);var g=((k.charCodeAt(4)&255)<<8)+(k.charCodeAt(5)&255);var h=((k.charCodeAt(6)&255)<<8)+(k.charCodeAt(7)&255);var n=((k.charCodeAt(8)&255)<<8)+(k.charCodeAt(9)&255);var j=((k.charCodeAt(10)&255)<<8)+(k.charCodeAt(11)&255);d.Canvas.drawImage(Canvas.canvas,l,m,n,j,g,h,n,j)};d.SendUnPause=function(){d.send(String.fromCharCode(0,8,0,5,0))};d.SendPause=function(){d.send(String.fromCharCode(0,8,0,5,1))};d.SendCompressionLevel=function(k,h,j,g){if(h){d.CompressionLevel=h}if(j){d.ScalingLevel=j}if(g){d.FrameRateTimer=g}d.send(String.fromCharCode(0,5,0,10,k,d.CompressionLevel)+d.shortToStr(d.ScalingLevel)+d.shortToStr(d.FrameRateTimer))};d.SendRefresh=function(){d.send(String.fromCharCode(0,6,0,4))};d.ProcessScreenMsg=function(h,g){if(d.debugmode>0){console.log("ScreenSize: "+h+" x "+g)}d.Canvas.setTransform(1,0,0,1,0,0);d.rotation=0;d.FirstDraw=true;d.ScreenWidth=d.width=h;d.ScreenHeight=d.height=g;d.KillDraw=d.tilesReceived;while(d.PendingOperations.length>0){d.PendingOperations.shift()}d.SendCompressionLevel(1);d.SendUnPause();if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}};d.ProcessData=function(h){var g=0;while(g<h.length){g+=d.ProcessDataEx(h.substring(g))}};d.ProcessDataEx=function(r){if(d.accumulator!=null){r=d.accumulator+r;console.log("KVM using accumulated data, total size is now "+r.length+" bytes.");d.accumulator=null}if(d.debugmode>1){console.log("KRecv("+r.length+"): "+rstr2hex(r.substring(0,Math.min(r.length,40))))}if(r.length<4){return}var g=null,s=0,t=0,j=ReadShort(r,0),h=ReadShort(r,2),n=0;if((j==27)&&(h==8)){if(r.length<12){return}j=ReadShort(r,8);h=ReadInt(r,4);if((h+8)>r.length){console.log("KVM accumulator set to "+r.length+" bytes, need "+h+" bytes.");d.accumulator=r;return}r=r.substring(8);n=8}if((h!=r.length)&&(d.debugmode>0)){console.log(h,r.length,h==r.length)}if((j>=18)&&(j!=65)){console.error("Invalid KVM command "+j+" of size "+h);console.log("Invalid KVM data",r.length,rstr2hex(r.substring(0,40))+"...");return}if(h>r.length){console.log("KVM accumulator set to "+r.length+" bytes, need "+h+" bytes.");d.accumulator=r;return}if(j==3||j==4||j==7){g=r.substring(4,h);s=((g.charCodeAt(0)&255)<<8)+(g.charCodeAt(1)&255);t=((g.charCodeAt(2)&255)<<8)+(g.charCodeAt(3)&255);if(d.debugmode>0){console.log("CMD"+j+" at X="+s+" Y="+t)}}switch(j){case 3:if(d.FirstDraw){d.onResize()}d.ProcessPictureMsg(g,s,t);break;case 4:if(d.FirstDraw){d.onResize()}if(d.TilesDrawn==d.tilesReceived){d.ProcessCopyRectMsg(g)}else{d.PendingOperations.push([++tilesReceived,1,g])}break;case 7:d.ProcessScreenMsg(s,t);d.SendKeyMsgKC(d.KeyAction.UP,16);d.SendKeyMsgKC(d.KeyAction.UP,17);d.SendKeyMsgKC(d.KeyAction.UP,18);d.SendKeyMsgKC(d.KeyAction.UP,91);d.SendKeyMsgKC(d.KeyAction.UP,92);d.SendKeyMsgKC(d.KeyAction.UP,16);d.send(String.fromCharCode(0,14,0,4));break;case 11:var o=[],k=((r.charCodeAt(4)&255)<<8)+(r.charCodeAt(5)&255);if(k>0){var q=0,p=((r.charCodeAt(6+(k*2))&255)<<8)+(r.charCodeAt(7+(k*2))&255);for(var m=0;m<k;m++){var l=((r.charCodeAt(6+(m*2))&255)<<8)+(r.charCodeAt(7+(m*2))&255);if(l==65535){o.push("All Displays")}else{o.push("Display "+l)}if(l==p){q=m}}}if(d.onDisplayinfo!=null){d.onDisplayinfo(d,o,q)}break;case 12:break;case 14:d.touchenabled=1;d.TouchArray={};if(d.onTouchEnabledChanged!=null){d.onTouchEnabledChanged(d.touchenabled)}break;case 15:d.TouchArray={};break;case 16:d.connectioncount=ReadInt(r,4);if(d.onConnectCountChanged!=null){d.onConnectCountChanged(d.connectioncount,d)}break;case 17:if(d.onMessage!=null){d.onMessage(r.substring(4,h),d)}break;case 65:r=r.substring(4);if(r[0]!="."){console.log(r);alert("KVM: "+r)}else{console.log("KVM: "+r.substring(1))}break}return h+n};d.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};d.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};d.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};d.Alternate=0;var c={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};function b(g){if(g.code.startsWith("Key")&&g.code.length==4){return g.code.charCodeAt(3)}if(g.code.startsWith("Digit")&&g.code.length==6){return g.code.charCodeAt(5)}if(g.code.startsWith("Numpad")&&g.code.length==7){return g.code.charCodeAt(6)+48}return c[g.code]}d.SendKeyMsg=function(g,h){if(g==null){return}if(!h){h=window.event}if(h.code){var j=b(h);if(j!=null){d.SendKeyMsgKC(g,j)}}else{var j=h.keyCode;if(j==59){j=186}d.SendKeyMsgKC(g,j)}};d.SendMessage=function(g){if(d.State==3){d.send(String.fromCharCode(0,17)+d.shortToStr(4+g.length)+g)}};d.SendKeyMsgKC=function(g,j){if(d.State!=3){return}if(typeof g=="object"){for(var h in g){d.SendKeyMsgKC(g[h][0],g[h][1])}}else{d.send(String.fromCharCode(0,d.InputType.KEY,0,6,(g-1),j))}};d.sendcad=function(){d.SendCtrlAltDelMsg()};d.SendCtrlAltDelMsg=function(){if(d.State==3){d.send(String.fromCharCode(0,d.InputType.CTRLALTDEL,0,4))}};d.SendEscKey=function(){if(d.State==3){d.send(String.fromCharCode(0,d.InputType.KEY,0,6,0,27,0,d.InputType.KEY,0,6,1,27))}};d.SendStartMsg=function(){d.SendKeyMsgKC(d.KeyAction.EXDOWN,91);d.SendKeyMsgKC(d.KeyAction.EXUP,91)};d.SendCharmsMsg=function(){d.SendKeyMsgKC(d.KeyAction.EXDOWN,91);d.SendKeyMsgKC(d.KeyAction.DOWN,67);d.SendKeyMsgKC(d.KeyAction.UP,67);d.SendKeyMsgKC(d.KeyAction.EXUP,91)};d.SendTouchMsg1=function(h,g,j,k){if(d.State==3){d.send(String.fromCharCode(0,d.InputType.TOUCH)+d.shortToStr(14)+String.fromCharCode(1,h)+d.intToStr(g)+d.shortToStr(j)+d.shortToStr(k))}};d.SendTouchMsg2=function(j,g){var m="";var h;var n="TOUCHSEND: ";for(var l in d.TouchArray){if(l==j){h=g}else{if(d.TouchArray[l].f==1){h=65536|2|4;d.TouchArray[l].f=3;n+="START"+l}else{if(d.TouchArray[l].f==2){h=262144;n+="STOP"+l}else{h=2|4|131072}}}m+=String.fromCharCode(l)+d.intToStr(h)+d.shortToStr(d.TouchArray[l].x)+d.shortToStr(d.TouchArray[l].y);if(d.TouchArray[l].f==2){delete d.TouchArray[l]}}if(d.State==3){d.send(String.fromCharCode(0,d.InputType.TOUCH)+d.shortToStr(5+m.length)+String.fromCharCode(2)+m)}if(Object.keys(d.TouchArray).length==0&&d.touchtimer!=null){clearInterval(d.touchtimer);d.touchtimer=null}};d.SendMouseMsg=function(g,k){if(d.State!=3){return}if(g!=null&&d.Canvas!=null){if(!k){var k=window.event}var n=(d.Canvas.canvas.height/d.CanvasId.clientHeight);var o=(d.Canvas.canvas.width/d.CanvasId.clientWidth);var m=d.GetPositionOfControl(d.Canvas.canvas);var p=((k.pageX-m[0])*o);var q=((k.pageY-m[1])*n);if(p>=0&&p<=d.Canvas.canvas.width&&q>=0&&q<=d.Canvas.canvas.height){var h=0;var j=0;if(g==d.KeyAction.UP||g==d.KeyAction.DOWN){if(k.which){((k.which==1)?(h=d.MouseButton.LEFT):((k.which==2)?(h=d.MouseButton.MIDDLE):(h=d.MouseButton.RIGHT)))}else{if(k.button){((k.button==0)?(h=d.MouseButton.LEFT):((k.button==1)?(h=d.MouseButton.MIDDLE):(h=d.MouseButton.RIGHT)))}}}else{if(g==d.KeyAction.SCROLL){if(k.detail){j=(-1*(k.detail*120))}else{if(k.wheelDelta){j=(k.wheelDelta*3)}}}}var l="";if(g==d.KeyAction.DBLCLICK){l=String.fromCharCode(0,d.InputType.MOUSE,0,10,0,136,((p/256)&255),(p&255),((q/256)&255),(q&255))}else{if(g==d.KeyAction.SCROLL){l=String.fromCharCode(0,d.InputType.MOUSE,0,12,0,0,((p/256)&255),(p&255),((q/256)&255),(q&255),((j/256)&255),(j&255))}else{l=String.fromCharCode(0,d.InputType.MOUSE,0,10,0,((g==d.KeyAction.DOWN)?h:((h*2)&255)),((p/256)&255),(p&255),((q/256)&255),(q&255))}}if(d.Action==d.KeyAction.NONE){if(d.Alternate==0||d.ipad){d.send(l);d.Alternate=1}else{d.Alternate=0}}else{d.send(l)}}}};d.GetDisplayNumbers=function(){d.send(String.fromCharCode(0,11,0,4))};d.SetDisplay=function(g){d.send(String.fromCharCode(0,12,0,6,g>>8,g&255))};d.intToStr=function(g){return String.fromCharCode((g>>24)&255,(g>>16)&255,(g>>8)&255,g&255)};d.shortToStr=function(g){return String.fromCharCode((g>>8)&255,g&255)};d.onResize=function(){if(d.ScreenWidth==0||d.ScreenHeight==0){return}if(d.Canvas.canvas.width==d.ScreenWidth&&d.Canvas.canvas.height==d.ScreenHeight){return}if(d.FirstDraw){d.Canvas.canvas.width=d.ScreenWidth;d.Canvas.canvas.height=d.ScreenHeight;d.Canvas.fillRect(0,0,d.ScreenWidth,d.ScreenHeight);if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}}d.FirstDraw=false};d.xxMouseInputGrab=false;d.xxKeyInputGrab=false;d.xxMouseMove=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.NONE,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxMouseUp=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.UP,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxMouseDown=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.DOWN,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxMouseDblClick=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.DBLCLICK,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxDOMMouseScroll=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.SCROLL,g);return false}return true};d.xxMouseWheel=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.SCROLL,g);return false}return true};d.xxKeyUp=function(g){if(d.State==3){d.SendKeyMsg(d.KeyAction.UP,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxKeyDown=function(g){if(d.State==3){d.SendKeyMsg(d.KeyAction.DOWN,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxKeyPress=function(g){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.handleKeys=function(g){if(d.stopInput==true||desktop.State!=3){return false}return d.xxKeyPress(g)};d.handleKeyUp=function(g){if(d.stopInput==true||desktop.State!=3){return false}if(d.firstUpKeys.length<5){d.firstUpKeys.push(g.keyCode);if((d.firstUpKeys.length==5)){var h=d.firstUpKeys.join(",");if((h=="16,17,91,91,16")||(h=="16,17,18,91,92")){d.stopInput=true}}}return d.xxKeyUp(g)};d.handleKeyDown=function(g){if(d.stopInput==true||desktop.State!=3){return false}return d.xxKeyDown(g)};d.mousedblclick=function(g){if(d.stopInput==true){return false}return d.xxMouseDblClick(g)};d.mousedown=function(g){if(d.stopInput==true){return false}return d.xxMouseDown(g)};d.mouseup=function(g){if(d.stopInput==true){return false}return d.xxMouseUp(g)};d.mousemove=function(g){if(d.stopInput==true){return false}return d.xxMouseMove(g)};d.mousewheel=function(g){if(d.stopInput==true){return false}return d.xxMouseWheel(g)};d.xxMsTouchEvent=function(g){if(g.originalEvent.pointerType==4){return}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}if(g.type=="MSPointerDown"||g.type=="MSPointerMove"||g.type=="MSPointerUp"){var h=0;var j=g.originalEvent.pointerId%256;var k=g.offsetX*(Canvas.canvas.width/d.CanvasId.clientWidth);var l=g.offsetY*(Canvas.canvas.height/d.CanvasId.clientHeight);if(g.type=="MSPointerDown"){h=65536|2|4}else{if(g.type=="MSPointerMove"){h=131072|2|4}else{if(g.type=="MSPointerUp"){h=262144}}}if(!d.TouchArray[j]){d.TouchArray[j]={x:k,y:l}}d.SendTouchMsg2(j,h);if(g.type=="MSPointerUp"){delete d.TouchArray[j]}}else{alert(g.type)}return true};d.xxTouchStart=function(g){if(d.State!=3){return}if(g.preventDefault){g.preventDefault()}if(d.touchenabled==0||d.touchenabled==1){if(g.originalEvent.touches.length>1){return}var l=g.originalEvent.touches[0];g.which=1;d.LastX=g.pageX=l.pageX;d.LastY=g.pageY=l.pageY;d.SendMouseMsg(KeyAction.DOWN,g)}else{var k=d.GetPositionOfControl(Canvas.canvas);for(var h in g.originalEvent.changedTouches){if(!g.originalEvent.changedTouches[h].identifier){continue}var j=g.originalEvent.changedTouches[h].identifier%256;if(!d.TouchArray[j]){d.TouchArray[j]={x:(g.originalEvent.touches[h].pageX-k[0])*(Canvas.canvas.width/d.CanvasId.clientWidth),y:(g.originalEvent.touches[h].pageY-k[1])*(Canvas.canvas.height/d.CanvasId.clientHeight),f:1}}}if(Object.keys(d.TouchArray).length>0&&touchtimer==null){d.touchtimer=setInterval(function(){d.SendTouchMsg2(256,0)},50)}}};d.xxTouchMove=function(g){if(d.State!=3){return}if(g.preventDefault){g.preventDefault()}if(d.touchenabled==0||d.touchenabled==1){if(g.originalEvent.touches.length>1){return}var l=g.originalEvent.touches[0];g.which=1;d.LastX=g.pageX=l.pageX;d.LastY=g.pageY=l.pageY;d.SendMouseMsg(d.KeyAction.NONE,g)}else{var k=d.GetPositionOfControl(Canvas.canvas);for(var h in g.originalEvent.changedTouches){if(!g.originalEvent.changedTouches[h].identifier){continue}var j=g.originalEvent.changedTouches[h].identifier%256;if(d.TouchArray[j]){d.TouchArray[j].x=(g.originalEvent.touches[h].pageX-k[0])*(d.Canvas.canvas.width/d.CanvasId.clientWidth);d.TouchArray[j].y=(g.originalEvent.touches[h].pageY-k[1])*(d.Canvas.canvas.height/d.CanvasId.clientHeight)}}}};d.xxTouchEnd=function(g){if(d.State!=3){return}if(g.preventDefault){g.preventDefault()}if(d.touchenabled==0||d.touchenabled==1){if(g.originalEvent.touches.length>1){return}g.which=1;g.pageX=LastX;g.pageY=LastY;d.SendMouseMsg(KeyAction.UP,g)}else{for(var h in g.originalEvent.changedTouches){if(!g.originalEvent.changedTouches[h].identifier){continue}var j=g.originalEvent.changedTouches[h].identifier%256;if(d.TouchArray[j]){d.TouchArray[j].f=2}}}};d.GrabMouseInput=function(){if(d.xxMouseInputGrab==true){return}var g=d.CanvasId;g.onmousemove=d.xxMouseMove;g.onmouseup=d.xxMouseUp;g.onmousedown=d.xxMouseDown;g.touchstart=d.xxTouchStart;g.touchmove=d.xxTouchMove;g.touchend=d.xxTouchEnd;g.MSPointerDown=d.xxMsTouchEvent;g.MSPointerMove=d.xxMsTouchEvent;g.MSPointerUp=d.xxMsTouchEvent;if(navigator.userAgent.match(/mozilla/i)){g.DOMMouseScroll=d.xxDOMMouseScroll}else{g.onmousewheel=d.xxMouseWheel}d.xxMouseInputGrab=true};d.UnGrabMouseInput=function(){if(d.xxMouseInputGrab==false){return}var g=d.CanvasId;g.onmousemove=null;g.onmouseup=null;g.onmousedown=null;g.touchstart=null;g.touchmove=null;g.touchend=null;g.MSPointerDown=null;g.MSPointerMove=null;g.MSPointerUp=null;if(navigator.userAgent.match(/mozilla/i)){g.DOMMouseScroll=null}else{g.onmousewheel=null}d.xxMouseInputGrab=false};d.GrabKeyInput=function(){if(d.xxKeyInputGrab==true){return}document.onkeyup=d.xxKeyUp;document.onkeydown=d.xxKeyDown;document.onkeypress=d.xxKeyPress;d.xxKeyInputGrab=true};d.UnGrabKeyInput=function(){if(d.xxKeyInputGrab==false){return}document.onkeyup=null;document.onkeydown=null;document.onkeypress=null;d.xxKeyInputGrab=false};d.GetPositionOfControl=function(g){var h=Array(2);h[0]=h[1]=0;while(g){h[0]+=g.offsetLeft;h[1]+=g.offsetTop;g=g.offsetParent}return h};d.crotX=function(g,h){if(d.rotation==0){return g}if(d.rotation==1){return h}if(d.rotation==2){return d.Canvas.canvas.width-g}if(d.rotation==3){return d.Canvas.canvas.height-h}};d.crotY=function(g,h){if(d.rotation==0){return h}if(d.rotation==1){return d.Canvas.canvas.width-g}if(d.rotation==2){return d.Canvas.canvas.height-h}if(d.rotation==3){return g}};d.rotX=function(g,h){if(d.rotation==0||d.rotation==1){return g}if(d.rotation==2){return g-d.Canvas.canvas.width}if(d.rotation==3){return g-d.Canvas.canvas.height}};d.rotY=function(g,h){if(d.rotation==0||d.rotation==3){return h}if(d.rotation==1){return h-d.Canvas.canvas.width}if(d.rotation==2){return h-d.Canvas.canvas.height}};d.tcanvas=null;d.setRotation=function(l){while(l<0){l+=4}var g=l%4;if(g==d.rotation){return true}var j=d.Canvas.canvas.width;var h=d.Canvas.canvas.height;if(d.rotation==1||d.rotation==3){j=d.Canvas.canvas.height;h=d.Canvas.canvas.width}if(d.tcanvas==null){d.tcanvas=document.createElement("canvas")}var k=d.tcanvas.getContext("2d");k.setTransform(1,0,0,1,0,0);k.canvas.width=j;k.canvas.height=h;k.rotate((d.rotation*-90)*Math.PI/180);if(d.rotation==0){k.drawImage(d.Canvas.canvas,0,0)}if(d.rotation==1){k.drawImage(d.Canvas.canvas,-d.Canvas.canvas.width,0)}if(d.rotation==2){k.drawImage(d.Canvas.canvas,-d.Canvas.canvas.width,-d.Canvas.canvas.height)}if(d.rotation==3){k.drawImage(d.Canvas.canvas,0,-d.Canvas.canvas.height)}if(d.rotation==0||d.rotation==2){d.Canvas.canvas.height=j;d.Canvas.canvas.width=h}if(d.rotation==1||d.rotation==3){d.Canvas.canvas.height=h;d.Canvas.canvas.width=j}d.Canvas.setTransform(1,0,0,1,0,0);d.Canvas.rotate((g*90)*Math.PI/180);d.rotation=g;d.Canvas.drawImage(d.tcanvas,d.rotX(0,0),d.rotY(0,0));d.ScreenWidth=d.Canvas.canvas.width;d.ScreenHeight=d.Canvas.canvas.height;if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}return true};d.MuchTheSame=function(g,h){return(Math.abs(g-h)<4)};d.Debug=function(g){console.log(g)};d.getIEVersion=function(){var g=-1;if(navigator.appName=="Microsoft Internet Explorer"){var j=navigator.userAgent;var h=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(h.exec(j)!=null){g=parseFloat(RegExp.$1)}}return g};d.haltEvent=function(g){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};return d};var QRCode;!function(){function t(c){this.mode=v.MODE_8BIT_BYTE,this.data=c,this.parsedData=[];for(var g=[],h=0,j=this.data.length;j>h;h++){var k=this.data.charCodeAt(h);k>65536?(g[0]=240|(1835008&k)>>>18,g[1]=128|(258048&k)>>>12,g[2]=128|(4032&k)>>>6,g[3]=128|63&k):k>2048?(g[0]=224|(61440&k)>>>12,g[1]=128|(4032&k)>>>6,g[2]=128|63&k):k>128?(g[0]=192|(1984&k)>>>6,g[1]=128|63&k):g[0]=k,this.parsedData=this.parsedData.concat(g)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function u(c,d){this.typeNumber=c,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function B(e,g){if(void 0==e.length){throw new Error(e.length+"/"+g)}for(var h=0;h<e.length&&0==e[h];){h++}this.num=new Array(e.length-h+g);for(var j=0;j<e.length-h;j++){this.num[j]=e[j+h]}}function C(c,d){this.totalCount=c,this.dataCount=d}function D(){this.buffer=[],this.length=0}function F(){return"undefined"!=typeof CanvasRenderingContext2D}function G(){var c=!1,d=navigator.userAgent;return/android/i.test(d)&&(c=!0,aMat=d.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(c=parseFloat(aMat[1]))),c}function K(d,j){for(var k=1,l=L(d),m=0,n=E.length;n>=m;m++){var o=0;switch(j){case w.L:o=E[m][0];break;case w.M:o=E[m][1];break;case w.Q:o=E[m][2];break;case w.H:o=E[m][3]}if(o>=l){break}k++}if(k>E.length){throw new Error("Too long data")}return k}function L(c){var d=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return d.length+(d.length!=c?3:0)}t.prototype={getLength:function(){return this.parsedData.length},write:function(d){for(var e=0,g=this.parsedData.length;g>e;e++){d.put(this.parsedData[e],8)}}},u.prototype={addData:function(a){var d=new t(a);this.dataList.push(d),this.dataCache=null},isDark:function(c,d){if(0>c||this.moduleCount<=c||0>d||this.moduleCount<=d){throw new Error(c+","+d)}return this.modules[c][d]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(b,g){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var j=0;j<this.moduleCount;j++){this.modules[h][j]=null}}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(b,g),this.typeNumber>=7&&this.setupTypeNumber(b),null==this.dataCache&&(this.dataCache=u.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,g)},setupPositionProbePattern:function(e,g){for(var h=-1;7>=h;h++){if(!(-1>=e+h||this.moduleCount<=e+h)){for(var j=-1;7>=j;j++){-1>=g+j||this.moduleCount<=g+j||(this.modules[e+h][g+j]=h>=0&&6>=h&&(0==j||6==j)||j>=0&&6>=j&&(0==h||6==h)||h>=2&&4>=h&&j>=2&&4>=j?!0:!1)}}}},getBestMaskPattern:function(){for(var e=0,g=0,h=0;8>h;h++){this.makeImpl(!0,h);var j=y.getLostPoint(this);(0==h||e>j)&&(e=j,g=h)}return g},createMovieClip:function(k,l,m){var n=k.createEmptyMovieClip(l,m),o=1;this.make();for(var p=0;p<this.modules.length;p++){for(var q=p*o,r=0;r<this.modules[p].length;r++){var s=r*o,M=this.modules[p][r];M&&(n.beginFill(0,100),n.moveTo(s,q),n.lineTo(s+o,q),n.lineTo(s+o,q+o),n.lineTo(s,q+o),n.endFill())}}return n},setupTimingPattern:function(){for(var c=8;c<this.moduleCount-8;c++){null==this.modules[c][6]&&(this.modules[c][6]=0==c%2)}for(var d=8;d<this.moduleCount-8;d++){null==this.modules[6][d]&&(this.modules[6][d]=0==d%2)}},setupPositionAdjustPattern:function(){for(var j=y.getPatternPosition(this.typeNumber),k=0;k<j.length;k++){for(var l=0;l<j.length;l++){var m=j[k],n=j[l];if(null==this.modules[m][n]){for(var o=-2;2>=o;o++){for(var p=-2;2>=p;p++){this.modules[m+o][n+p]=-2==o||2==o||-2==p||2==p||0==o&&0==p?!0:!1}}}}}},setupTypeNumber:function(e){for(var g=y.getBCHTypeNumber(this.typeNumber),h=0;18>h;h++){var j=!e&&1==(1&g>>h);this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=j}for(var h=0;18>h;h++){var j=!e&&1==(1&g>>h);this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=j}},setupTypeInfo:function(h,j){for(var k=this.errorCorrectLevel<<3|j,l=y.getBCHTypeInfo(k),m=0;15>m;m++){var n=!h&&1==(1&l>>m);6>m?this.modules[m][8]=n:8>m?this.modules[m+1][8]=n:this.modules[this.moduleCount-15+m][8]=n}for(var m=0;15>m;m++){var n=!h&&1==(1&l>>m);8>m?this.modules[8][this.moduleCount-m-1]=n:9>m?this.modules[8][15-m-1+1]=n:this.modules[8][15-m-1]=n}this.modules[this.moduleCount-8][8]=!h},mapData:function(l,m){for(var n=-1,o=this.moduleCount-1,p=7,q=0,r=this.moduleCount-1;r>0;r-=2){for(6==r&&r--;;){for(var s=0;2>s;s++){if(null==this.modules[o][r-s]){var M=!1;q<l.length&&(M=1==(1&l[q]>>>p));var N=y.getMask(m,o,r-s);N&&(M=!M),this.modules[o][r-s]=M,p--,-1==p&&(q++,p=7)}}if(o+=n,0>o||this.moduleCount<=o){o-=n,n=-n;break}}}}},u.PAD0=236,u.PAD1=17,u.createData=function(b,j,k){for(var m=C.getRSBlocks(b,j),n=new D,o=0;o<k.length;o++){var p=k[o];n.put(p.mode,4),n.put(p.getLength(),y.getLengthInBits(p.mode,b)),p.write(n)}for(var q=0,o=0;o<m.length;o++){q+=m[o].dataCount}if(n.getLengthInBits()>8*q){throw new Error("code length overflow. ("+n.getLengthInBits()+">"+8*q+")")}for(n.getLengthInBits()+4<=8*q&&n.put(0,4);0!=n.getLengthInBits()%8;){n.putBit(!1)}for(;;){if(n.getLengthInBits()>=8*q){break}if(n.put(u.PAD0,8),n.getLengthInBits()>=8*q){break}n.put(u.PAD1,8)}return u.createBytes(n,m)},u.createBytes=function(M,N){for(var O=0,P=0,R=0,S=new Array(N.length),T=new Array(N.length),U=0;U<N.length;U++){var V=N[U].dataCount,W=N[U].totalCount-V;P=Math.max(P,V),R=Math.max(R,W),S[U]=new Array(V);for(var X=0;X<S[U].length;X++){S[U][X]=255&M.buffer[X+O]}O+=V;var Y=y.getErrorCorrectPolynomial(W),Z=new B(S[U],Y.getLength()-1),aa=Z.mod(Y);T[U]=new Array(Y.getLength()-1);for(var X=0;X<T[U].length;X++){var ab=X+aa.getLength()-T[U].length;T[U][X]=ab>=0?aa.get(ab):0}}for(var ac=0,X=0;X<N.length;X++){ac+=N[X].totalCount}for(var ad=new Array(ac),ae=0,X=0;P>X;X++){for(var U=0;U<N.length;U++){X<S[U].length&&(ad[ae++]=S[U][X])}}for(var X=0;R>X;X++){for(var U=0;U<N.length;U++){X<T[U].length&&(ad[ae++]=T[U][X])}}return ad};for(var v={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},w={L:1,M:0,Q:3,H:2},x={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},y={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(c){for(var d=c<<10;y.getBCHDigit(d)-y.getBCHDigit(y.G15)>=0;){d^=y.G15<<y.getBCHDigit(d)-y.getBCHDigit(y.G15)}return(c<<10|d)^y.G15_MASK},getBCHTypeNumber:function(c){for(var d=c<<12;y.getBCHDigit(d)-y.getBCHDigit(y.G18)>=0;){d^=y.G18<<y.getBCHDigit(d)-y.getBCHDigit(y.G18)}return c<<12|d},getBCHDigit:function(c){for(var d=0;0!=c;){d++,c>>>=1}return d},getPatternPosition:function(b){return y.PATTERN_POSITION_TABLE[b-1]},getMask:function(d,e,g){switch(d){case x.PATTERN000:return 0==(e+g)%2;case x.PATTERN001:return 0==e%2;case x.PATTERN010:return 0==g%3;case x.PATTERN011:return 0==(e+g)%3;case x.PATTERN100:return 0==(Math.floor(e/2)+Math.floor(g/3))%2;case x.PATTERN101:return 0==e*g%2+e*g%3;case x.PATTERN110:return 0==(e*g%2+e*g%3)%2;case x.PATTERN111:return 0==(e*g%3+(e+g)%2)%2;default:throw new Error("bad maskPattern:"+d)}},getErrorCorrectPolynomial:function(d){for(var e=new B([1],0),g=0;d>g;g++){e=e.multiply(new B([1,z.gexp(g)],0))}return e},getLengthInBits:function(c,d){if(d>=1&&10>d){switch(c){case v.MODE_NUMBER:return 10;case v.MODE_ALPHA_NUM:return 9;case v.MODE_8BIT_BYTE:return 8;case v.MODE_KANJI:return 8;default:throw new Error("mode:"+c)}}else{if(27>d){switch(c){case v.MODE_NUMBER:return 12;case v.MODE_ALPHA_NUM:return 11;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 10;default:throw new Error("mode:"+c)}}else{if(!(41>d)){throw new Error("type:"+d)}switch(c){case v.MODE_NUMBER:return 14;case v.MODE_ALPHA_NUM:return 13;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 12;default:throw new Error("mode:"+c)}}}},getLostPoint:function(m){for(var n=m.getModuleCount(),o=0,p=0;n>p;p++){for(var q=0;n>q;q++){for(var r=0,s=m.isDark(p,q),M=-1;1>=M;M++){if(!(0>p+M||p+M>=n)){for(var N=-1;1>=N;N++){0>q+N||q+N>=n||(0!=M||0!=N)&&s==m.isDark(p+M,q+N)&&r++}}}r>5&&(o+=3+r-5)}}for(var p=0;n-1>p;p++){for(var q=0;n-1>q;q++){var O=0;m.isDark(p,q)&&O++,m.isDark(p+1,q)&&O++,m.isDark(p,q+1)&&O++,m.isDark(p+1,q+1)&&O++,(0==O||4==O)&&(o+=3)}}for(var p=0;n>p;p++){for(var q=0;n-6>q;q++){m.isDark(p,q)&&!m.isDark(p,q+1)&&m.isDark(p,q+2)&&m.isDark(p,q+3)&&m.isDark(p,q+4)&&!m.isDark(p,q+5)&&m.isDark(p,q+6)&&(o+=40)}}for(var q=0;n>q;q++){for(var p=0;n-6>p;p++){m.isDark(p,q)&&!m.isDark(p+1,q)&&m.isDark(p+2,q)&&m.isDark(p+3,q)&&m.isDark(p+4,q)&&!m.isDark(p+5,q)&&m.isDark(p+6,q)&&(o+=40)}}for(var P=0,q=0;n>q;q++){for(var p=0;n>p;p++){m.isDark(p,q)&&P++}}var R=Math.abs(100*P/n/n-50)/5;return o+=10*R}},z={glog:function(b){if(1>b){throw new Error("glog("+b+")")}return z.LOG_TABLE[b]},gexp:function(b){for(;0>b;){b+=255}for(;b>=256;){b-=255}return z.EXP_TABLE[b]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},A=0;8>A;A++){z.EXP_TABLE[A]=1<<A}for(var A=8;256>A;A++){z.EXP_TABLE[A]=z.EXP_TABLE[A-4]^z.EXP_TABLE[A-5]^z.EXP_TABLE[A-6]^z.EXP_TABLE[A-8]}for(var A=0;255>A;A++){z.LOG_TABLE[z.EXP_TABLE[A]]=A}B.prototype={get:function(b){return this.num[b]},getLength:function(){return this.num.length},multiply:function(e){for(var g=new Array(this.getLength()+e.getLength()-1),h=0;h<this.getLength();h++){for(var j=0;j<e.getLength();j++){g[h+j]^=z.gexp(z.glog(this.get(h))+z.glog(e.get(j)))}}return new B(g,0)},mod:function(e){if(this.getLength()-e.getLength()<0){return this}for(var g=z.glog(this.get(0))-z.glog(e.get(0)),h=new Array(this.getLength()),j=0;j<this.getLength();j++){h[j]=this.get(j)}for(var j=0;j<e.getLength();j++){h[j]^=z.gexp(z.glog(e.get(j))+g)}return new B(h,0).mod(e)}},C.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],C.getRSBlocks=function(j,l){var m=C.getRsBlockTable(j,l);if(void 0==m){throw new Error("bad rs block @ typeNumber:"+j+"/errorCorrectLevel:"+l)}for(var n=m.length/3,o=[],p=0;n>p;p++){for(var q=m[3*p+0],r=m[3*p+1],s=m[3*p+2],M=0;q>M;M++){o.push(new C(r,s))}}return o},C.getRsBlockTable=function(c,d){switch(d){case w.L:return C.RS_BLOCK_TABLE[4*(c-1)+0];case w.M:return C.RS_BLOCK_TABLE[4*(c-1)+1];case w.Q:return C.RS_BLOCK_TABLE[4*(c-1)+2];case w.H:return C.RS_BLOCK_TABLE[4*(c-1)+3];default:return void 0}},D.prototype={get:function(c){var d=Math.floor(c/8);return 1==(1&this.buffer[d]>>>7-c%8)},put:function(d,e){for(var g=0;e>g;g++){this.putBit(1==(1&d>>>e-g-1))}},getLengthInBits:function(){return this.length},putBit:function(c){var d=Math.floor(this.length/8);this.buffer.length<=d&&this.buffer.push(0),c&&(this.buffer[d]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],H=function(){var b=function(c,d){this._el=c,this._htOption=d};return b.prototype.draw=function(e){function o(g,h){var j=document.createElementNS("http://www.w3.org/2000/svg",g);for(var k in h){h.hasOwnProperty(k)&&j.setAttribute(k,h[k])}return j}var l=this._htOption,m=this._el,n=e.getModuleCount();Math.floor(l.width/n),Math.floor(l.height/n),this.clear();var p=o("svg",{viewBox:"0 0 "+String(n)+" "+String(n),width:"100%",height:"100%",fill:l.colorLight});p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),m.appendChild(p),p.appendChild(o("rect",{fill:l.colorDark,width:"1",height:"1",id:"template"}));for(var q=0;n>q;q++){for(var r=0;n>r;r++){if(e.isDark(q,r)){var s=o("use",{x:String(q),y:String(r)});s.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),p.appendChild(s)}}}},b.prototype.clear=function(){for(;this._el.hasChildNodes();){this._el.removeChild(this._el.lastChild)}},b}(),I="svg"===document.documentElement.tagName.toLowerCase(),J=I?H:F()?function(){function g(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function k(m,n){var o=this;if(o._fFail=n,o._fSuccess=m,null===o._bSupportDataURI){var p=document.createElement("img"),q=function(){o._bSupportDataURI=!1,o._fFail&&_fFail.call(o)},r=function(){o._bSupportDataURI=!0,o._fSuccess&&o._fSuccess.call(o)};return p.onabort=q,p.onerror=q,p.onload=r,p.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}o._bSupportDataURI===!0&&o._fSuccess?o._fSuccess.call(o):o._bSupportDataURI===!1&&o._fFail&&o._fFail.call(o)}if(this._android&&this._android<=2.1){var h=1/window.devicePixelRatio,j=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(b,c,m,n,o,p,q,r){if("nodeName" in b&&/img/i.test(b.nodeName)){for(var s=arguments.length-1;s>=1;s--){arguments[s]=arguments[s]*h}}else{"undefined"==typeof r&&(arguments[1]*=h,arguments[2]*=h,arguments[3]*=h,arguments[4]*=h)}j.apply(this,arguments)}}var l=function(c,d){this._bIsPainted=!1,this._android=G(),this._htOption=d,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=d.width,this._elCanvas.height=d.height,c.appendChild(this._elCanvas),this._el=c,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return l.prototype.draw=function(o){var p=this._elImage,q=this._oContext,r=this._htOption,s=o.getModuleCount(),M=r.width/s,N=r.height/s,O=Math.round(M),P=Math.round(N);p.style.display="none",this.clear();for(var R=0;s>R;R++){for(var S=0;s>S;S++){var T=o.isDark(R,S),U=S*M,V=R*N;q.strokeStyle=T?r.colorDark:r.colorLight,q.lineWidth=1,q.fillStyle=T?r.colorDark:r.colorLight,q.fillRect(U,V,M,N),q.strokeRect(Math.floor(U)+0.5,Math.floor(V)+0.5,O,P),q.strokeRect(Math.ceil(U)-0.5,Math.ceil(V)-0.5,O,P)}}this._bIsPainted=!0},l.prototype.makeImage=function(){this._bIsPainted&&k.call(this,g)},l.prototype.isPainted=function(){return this._bIsPainted},l.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},l.prototype.round=function(b){return b?Math.floor(1000*b)/1000:b},l}():function(){var b=function(c,d){this._el=c,this._htOption=d};return b.prototype.draw=function(m){for(var n=this._htOption,o=this._el,p=m.getModuleCount(),q=Math.floor(n.width/p),r=Math.floor(n.height/p),s=['<table style="border:0;border-collapse:collapse;">'],M=0;p>M;M++){s.push("<tr>");for(var N=0;p>N;N++){s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+q+"px;height:"+r+"px;background-color:"+(m.isDark(M,N)?n.colorDark:n.colorLight)+';"></td>')}s.push("</tr>")}s.push("</table>"),o.innerHTML=s.join("");var O=o.childNodes[0],P=(n.width-O.offsetWidth)/2,R=(n.height-O.offsetHeight)/2;P>0&&R>0&&(O.style.margin=R+"px "+P+"px")},b.prototype.clear=function(){this._el.innerHTML=""},b}();QRCode=function(d,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:w.H},"string"==typeof e&&(e={text:e}),e){for(var g in e){this._htOption[g]=e[g]}}"string"==typeof d&&(d=document.getElementById(d)),this._android=G(),this._el=d,this._oQRCode=null,this._oDrawing=new J(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(b){this._oQRCode=new u(K(b,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(b),this._oQRCode.make(),this._el.title=b,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=w}();"use strict";if(!window.u2f){var u2f=u2f||{};var js_api_version;u2f.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd";u2f.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_SIGN_RESPONSE:"u2f_sign_response",U2F_GET_API_VERSION_REQUEST:"u2f_get_api_version_request",U2F_GET_API_VERSION_RESPONSE:"u2f_get_api_version_response"};u2f.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5};u2f.U2fRequest;u2f.U2fResponse;u2f.Error;u2f.Transport;u2f.Transports;u2f.SignRequest;u2f.SignResponse;u2f.RegisterRequest;u2f.RegisterResponse;u2f.RegisteredKey;u2f.GetJsApiVersionResponse;u2f.getMessagePort=function(a){if(typeof chrome!="undefined"&&chrome.runtime){var b={type:u2f.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(u2f.EXTENSION_ID,b,function(){if(!chrome.runtime.lastError){u2f.getChromeRuntimePort_(a)}else{u2f.getIframePort_(a)}})}else{if(u2f.isAndroidChrome_()){u2f.getAuthenticatorPort_(a)}else{if(u2f.isIosChrome_()){u2f.getIosPort_(a)}else{u2f.getIframePort_(a)}}}};u2f.isAndroidChrome_=function(){var a=navigator.userAgent;return a.indexOf("Chrome")!=-1&&a.indexOf("Android")!=-1};u2f.isIosChrome_=function(){var b=["iPhone","iPad","iPod"];for(var a in b){if(navigator.platform==b[a]){return true}}return false};u2f.getChromeRuntimePort_=function(a){var b=chrome.runtime.connect(u2f.EXTENSION_ID,{includeTlsChannelId:true});setTimeout(function(){a(new u2f.WrappedChromeRuntimePort_(b))},0)};u2f.getAuthenticatorPort_=function(a){setTimeout(function(){a(new u2f.WrappedAuthenticatorPort_())},0)};u2f.getIosPort_=function(a){setTimeout(function(){a(new u2f.WrappedIosPort_())},0)};u2f.WrappedChromeRuntimePort_=function(a){this.port_=a};u2f.formatSignRequest_=function(a,b,d,h,e){if(js_api_version===undefined||js_api_version<1.1){var g=[];for(var c=0;c<d.length;c++){g[c]={version:d[c].version,challenge:b,keyHandle:d[c].keyHandle,appId:a}}return{type:u2f.MessageTypes.U2F_SIGN_REQUEST,signRequests:g,timeoutSeconds:h,requestId:e}}return{type:u2f.MessageTypes.U2F_SIGN_REQUEST,appId:a,challenge:b,registeredKeys:d,timeoutSeconds:h,requestId:e}};u2f.formatRegisterRequest_=function(a,c,d,h,e){if(js_api_version===undefined||js_api_version<1.1){for(var b=0;b<d.length;b++){d[b].appId=a}var g=[];for(var b=0;b<c.length;b++){g[b]={version:c[b].version,challenge:d[0],keyHandle:c[b].keyHandle,appId:a}}return{type:u2f.MessageTypes.U2F_REGISTER_REQUEST,signRequests:g,registerRequests:d,timeoutSeconds:h,requestId:e}}return{type:u2f.MessageTypes.U2F_REGISTER_REQUEST,appId:a,registerRequests:d,registeredKeys:c,timeoutSeconds:h,requestId:e}};u2f.WrappedChromeRuntimePort_.prototype.postMessage=function(a){this.port_.postMessage(a)};u2f.WrappedChromeRuntimePort_.prototype.addEventListener=function(a,b){var c=a.toLowerCase();if(c=="message"||c=="onmessage"){this.port_.onMessage.addListener(function(d){b({data:d})})}else{console.error("WrappedChromeRuntimePort only supports onMessage")}};u2f.WrappedAuthenticatorPort_=function(){this.requestId_=-1;this.requestObject_=null};u2f.WrappedAuthenticatorPort_.prototype.postMessage=function(b){var a=u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_+";S.request="+encodeURIComponent(JSON.stringify(b))+";end";document.location=a};u2f.WrappedAuthenticatorPort_.prototype.getPortType=function(){return"WrappedAuthenticatorPort_"};u2f.WrappedAuthenticatorPort_.prototype.addEventListener=function(a,b){var c=a.toLowerCase();if(c=="message"){var d=this;window.addEventListener("message",d.onRequestUpdate_.bind(d,b),false)}else{console.error("WrappedAuthenticatorPort only supports message")}};u2f.WrappedAuthenticatorPort_.prototype.onRequestUpdate_=function(a,d){var e=JSON.parse(d.data);var c=e.intentURL;var b=e.errorCode;var g=null;if(e.hasOwnProperty("data")){g=(JSON.parse(e.data))}a({data:g})};u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_="intent:#Intent;action=com.google.android.apps.authenticator.AUTHENTICATE";u2f.WrappedIosPort_=function(){};u2f.WrappedIosPort_.prototype.postMessage=function(a){var b=JSON.stringify(a);var c="u2f://auth?"+encodeURI(b);location.replace(c)};u2f.WrappedIosPort_.prototype.getPortType=function(){return"WrappedIosPort_"};u2f.WrappedIosPort_.prototype.addEventListener=function(a,b){var c=a.toLowerCase();if(c!=="message"){console.error("WrappedIosPort only supports message")}};u2f.getIframePort_=function(a){var d="chrome-extension://"+u2f.EXTENSION_ID;var c=document.createElement("iframe");c.src=d+"/u2f-comms.html";c.setAttribute("style","display:none");document.body.appendChild(c);var b=new MessageChannel();var e=function(g){if(g.data=="ready"){b.port1.removeEventListener("message",e);a(b.port1)}else{console.error('First event on iframe port was not "ready"')}};b.port1.addEventListener("message",e);b.port1.start();c.addEventListener("load",function(){c.contentWindow.postMessage("init",d,[b.port2])})};u2f.EXTENSION_TIMEOUT_SEC=30;u2f.port_=null;u2f.waitingForPort_=[];u2f.reqCounter_=0;u2f.callbackMap_={};u2f.getPortSingleton_=function(a){if(u2f.port_){a(u2f.port_)}else{if(u2f.waitingForPort_.length==0){u2f.getMessagePort(function(b){u2f.port_=b;u2f.port_.addEventListener("message",(u2f.responseHandler_));while(u2f.waitingForPort_.length){u2f.waitingForPort_.shift()(u2f.port_)}})}u2f.waitingForPort_.push(a)}};u2f.responseHandler_=function(b){var d=b.data;var c=d.requestId;if(!c||!u2f.callbackMap_[c]){console.error("Unknown or missing requestId in response.");return}var a=u2f.callbackMap_[c];delete u2f.callbackMap_[c];a(d.responseData)};u2f.sign=function(a,c,e,b,d){if(js_api_version===undefined){u2f.getApiVersion(function(g){js_api_version=g.js_api_version===undefined?0:g.js_api_version;u2f.sendSignRequest(a,c,e,b,d)})}else{u2f.sendSignRequest(a,c,e,b,d)}};u2f.sendSignRequest=function(a,c,e,b,d){u2f.getPortSingleton_(function(g){var j=++u2f.reqCounter_;u2f.callbackMap_[j]=b;var k=(typeof d!=="undefined"?d:u2f.EXTENSION_TIMEOUT_SEC);var h=u2f.formatSignRequest_(a,c,e,k,j);g.postMessage(h)})};u2f.register=function(a,e,d,b,c){if(js_api_version===undefined){u2f.getApiVersion(function(g){js_api_version=g.js_api_version===undefined?0:g.js_api_version;u2f.sendRegisterRequest(a,e,d,b,c)})}else{u2f.sendRegisterRequest(a,e,d,b,c)}};u2f.sendRegisterRequest=function(a,e,d,b,c){u2f.getPortSingleton_(function(g){var j=++u2f.reqCounter_;u2f.callbackMap_[j]=b;var k=(typeof c!=="undefined"?c:u2f.EXTENSION_TIMEOUT_SEC);var h=u2f.formatRegisterRequest_(a,d,e,k,j);g.postMessage(h)})};u2f.getApiVersion=function(a,b){u2f.getPortSingleton_(function(d){if(d.getPortType){var c;switch(d.getPortType()){case"WrappedIosPort_":case"WrappedAuthenticatorPort_":c=1.1;break;default:c=0;break}a({js_api_version:c});return}var g=++u2f.reqCounter_;u2f.callbackMap_[g]=a;var e={type:u2f.MessageTypes.U2F_GET_API_VERSION_REQUEST,timeoutSeconds:(typeof b!=="undefined"?b:u2f.EXTENSION_TIMEOUT_SEC),requestId:g};d.postMessage(e)})}}"use strict";var args;var autoReconnect=true;var powerStatetable=["","Powered","Sleep","Sleep","Sleep","Hibernating","Power off","Present"];var StatusStrs=["Disconnected","Connecting...","Setup...","Connected","Intel&reg; AMT Connected"];var sort=0;var searchFocus=0;var mapSearchFocus=0;var userSearchFocus=0;var consoleFocus=0;var showRealNames=false;var meshserver=null;var meshes={};var meshcount=0;var nodes=null;var filetree={};var userinfo=null;var serverinfo=null;var events=[];var users=null;var wssessions=null;var nodeShortIdent=0;var desktop;var desktopsettings={encoding:2,showfocus:false,showmouse:true,showcad:true,quality:40,scaling:1024,framerate:50};var multidesktopsettings={quality:20,scaling:128,framerate:1000};var terminal;var files;var debugLevel=parseInt("{{{debuglevel}}}");var features=parseInt("{{{features}}}");var sessionTime=parseInt("{{{sessiontime}}}");var domain="{{{domain}}}";var domainUrl="{{{domainurl}}}";var authCookie="{{{authCookie}}}";var authCookieRenewTimer=null;var multiDesktop={};var multiDesktopFilter=null;var serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}";var amtScanResults=null;var debugmode=0;var clickOnce=(((features&256)!=0)&&detectClickOnce());var attemptWebRTC=((features&128)!=0);var webPageFullScreen=getstore("webPageFullScreen",true);if(webPageFullScreen=="false"){webPageFullScreen=false}if(webPageFullScreen=="true"){webPageFullScreen=true}var passRequirements="{{{passRequirements}}}";if(passRequirements!=""){passRequirements=JSON.parse(decodeURIComponent(passRequirements))}function startup(){if((features&32)==0){var h=null;try{h=top.location.toString().toLowerCase()}catch(b){}if(top!=self&&(h==null||top.active==false)){top.location=self.location;return}}args=parseUriArgs();debugmode=args.debug;if(args.webrtc!=null){attemptWebRTC=(args.webrtc==1)}QV("p13AutoConnect",debugmode);QV("autoconnectbutton2",debugmode);QV("autoconnectbutton1",debugmode);QV("DeskClip",debugmode);toggleFullScreen();if(args.hide){var d=parseInt(args.hide);QV("masthead",!(d&1));QV("topbarmaster",!(d&2));QV("footer",!(d&4));QV("p10title",!(d&8));QV("p11title",!(d&8));QV("p12title",!(d&8));QV("p13title",!(d&8));QV("p14title",!(d&8));QV("p15title",!(d&8));QV("p16title",!(d&8));if(d&16){QV("page_leftbar",false);QS("page_content").left="0px"}}if("{{currentNode}}"!=""){QV("p10BackButton",false);QV("p11BackButton",false);QV("p12BackButton",false);QV("p13BackButton",false);QV("p14BackButton",false);QV("p15BackButton",false);QV("p16BackButton",false)}p1updateInfo();document.onclick=function(c){hideContextMenu()};document.onkeypress=ondockeypress;document.onkeydown=ondockeydown;document.onkeyup=ondockeyup;window.onresize=function(){masterUpdate(512)};masterUpdate(512);meshserver=MeshServerCreateControl(domainUrl,authCookie);meshserver.onStateChanged=onStateChanged;meshserver.onMessage=onMessage;meshserver.Start();Q("sortselect").selectedIndex=sort=getstore("sort",0);Q("sizeselect").selectedIndex=getstore("viewsize",1);Q("SearchInput").value=getstore("search","");showRealNames=(getstore("showRealNames",0)==1);Q("RealNameCheckBox").checked=showRealNames;Q("viewselect").value=getstore("deviceView",1);Q("DeskControl").checked=(getstore("DeskControl",1)==1);masterUpdate(3);for(var g=1;g<5;g++){Q("devViewButton"+g).classList.remove("viewSelectorSel")}Q("devViewButton"+Q("viewselect").value).classList.add("viewSelectorSel");Q("p5filetable").addEventListener("drop",p5fileDragDrop,false);Q("p5filetable").addEventListener("dragover",p5fileDragOver,false);Q("p5filetable").addEventListener("dragleave",p5fileDragLeave,false);Q("p13filetable").addEventListener("drop",p13fileDragDrop,false);Q("p13filetable").addEventListener("dragover",p13fileDragOver,false);Q("p13filetable").addEventListener("dragleave",p13fileDragLeave,false);setInterval(updateDeviceTimeline,120000);var k=localStorage.getItem("desktopsettings");if(k!=null){desktopsettings=JSON.parse(k)}k=localStorage.getItem("multidesktopsettings");if(k!=null){multidesktopsettings=JSON.parse(k)}applyDesktopSettings();var l="";for(var a=1;a<27;a++){l+="<option value='"+a+"'>Ctrl-"+String.fromCharCode(64+a)+" ("+a+")</option>"}QH("specialkeylist",l);setupServerStats()}function toggleFullScreen(b){if(b===1){webPageFullScreen=!webPageFullScreen;putstore("webPageFullScreen",webPageFullScreen)}var a=0;if(args.hide){a=parseInt(args.hide)}if(webPageFullScreen==false){QS("container").width="960px";QS("container")["border-right"]="1px solid #b7b7b7";QS("container")["border-left"]="1px solid #b7b7b7";QS("container")["min-width"]="960px";QS("container")["overflow"]="";QS("column_l").width="930px";QS("column_l").height="";QS("column_l")["margin-left"]="";QS("column_l")["overflow-y"]="";QS("column_l")["max-height"]=(xxcurrentView>=10)?"calc(100vh - 159px)":"calc(100vh - 135px)";QS("container").position="";QS("page_content").position="";QV("MainMenuSpan",true);QV("UserDummyMenuSpan",false);QV("page_leftbar",false)}else{QS("container").position="absolute";QS("container").width="100%";QS("container").top="0px";QS("container").bottom="0px";QS("container")["border-right"]="0";QS("container")["border-left"]="0";QS("container")["min-width"]="700px";QS("container")["overflow"]="hidden";QS("page_content").position="absolute";QS("page_content").top="66px";QS("page_content").left=(a&16)?"0px":"90px";QS("page_content").right="0px";QS("page_content").bottom="0px";QS("column_l").height="calc(100vh - 135px)";QS("column_l").width="calc(100% - 30px)";QS("column_l")["overflow-y"]="auto";QS("column_l")["max-height"]="calc(100vh - 135px)";QV("MainMenuSpan",false);QV("UserDummyMenuSpan",(xxcurrentView<10)&&webPageFullScreen);QV("page_leftbar",!(a&16))}masterUpdate(512);QV("body",true)}function getNodeFromId(b){if(nodes!=null){for(var a in nodes){if(nodes[a]._id==b){return nodes[a]}}}return null}function reload(){window.location.href=window.location.href}function onStateChanged(c,d,b,a){if(d==0){setDialogMode(0);go(0);powerTimeline=null;powerTimelineReq=null;powerTimelineNode=null;powerTimelineUpdate=null;deleteAllNotifications();hideContextMenu();QV("verifyEmailId2",false);QV("logoutControl",false);if(a=="noauth"){QH("p0span","Unable to perform authentication");return}if(b==2){if(autoReconnect){setTimeout(serverPoll,5000)}}else{QH("p0span","Unable to connect web socket")}if(authCookieRenewTimer!=null){clearInterval(authCookieRenewTimer);authCookieRenewTimer=null}}else{if(d==2){meshserver.send({action:"meshes"});meshserver.send({action:"nodes",id:"{{currentNode}}"});if("{{currentNode}}"==""){meshserver.send({action:"files"})}go(1);authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},1800000)}}}function serverPoll(){var b=null;try{b=new XDomainRequest()}catch(a){}if(!b){b=new XMLHttpRequest()}b.open("HEAD",window.location.href);b.timeout=15000;b.onload=function(){reload()};b.onerror=b.ontimeout=function(){setTimeout(serverPoll,10000)};b.send()}function detectClickOnce(){for(var a in window.navigator.mimeTypes){if(window.navigator.mimeTypes[a].type=="application/x-ms-application"){return true}}var b=window.navigator.userAgent.toUpperCase();return(b.indexOf(".NET CLR 3.5")>=0)||(b.indexOf("(WINDOWS NT ")>=0)}function updateSiteAdmin(){var a="{{{noServerBackup}}}";var b=userinfo.siteadmin;if(a==1){b&=4294967290}QV("p2AccountSecurity",((features&4)==0)&&(serverinfo.domainauth==false)&&((features&4096)!=0));QV("p2AccountActions",((features&4)==0)&&(serverinfo.domainauth==false));QV("p2AccountImage",((features&4)==0)&&(serverinfo.domainauth==false));QV("p2ServerActions",b&21);QV("LeftMenuMyServer",b&21);QV("MainMenuMyServer",b&21);QV("p2ServerActionsBackup",b&1);QV("p2ServerActionsRestore",b&4);QV("p2ServerActionsVersion",b&16);QV("MainMenuMyFiles",b&8);QV("LeftMenuMyFiles",b&8);if(((b&8)==0)&&(xxcurrentView==5)){setDialogMode(0);go(1)}if(currentNode!=null){gotoDevice(currentNode._id,xxcurrentView,true)}if((userinfo.siteadmin&2)!=0){if(users==null){meshserver.send({action:"users"})}if(wssessions==null){meshserver.send({action:"wssessioncount"})}}else{users=null;wssessions=null;updateUsers();if(xxcurrentView==4||((xxcurrentView>=30)&&(xxcurrentView<40))){setDialogMode(0);go(1);currentUser=null}}meshserver.send({action:"events",limit:parseInt(p3limitdropdown.value)});QV("p2deleteall",userinfo.siteadmin==4294967295);QV("ServerConsole",userinfo.siteadmin===4294967295);if((xxcurrentView==115)&&(userinfo.siteadmin!=4294967295)){go(6)}if((xxcurrentView==6)&&((userinfo.siteadmin&21)==0)){go(1)}if((b&21)!=0){meshserver.send({action:"serverstats",interval:10000})}}var updateNaggleTimer=null;var updateNaggleFlags=0;function masterUpdate(a){updateNaggleFlags|=a;if(updateNaggleTimer==null){updateNaggleTimer=setTimeout(function(){if(updateNaggleFlags&512){center()}if(updateNaggleFlags&1){onSearchInputChanged()}if(updateNaggleFlags&2){onSortSelectChange(true)}if(updateNaggleFlags&128){updateMeshes()}if(updateNaggleFlags&4){updateDevices()}if(updateNaggleFlags&8){drawNotifications()}if(updateNaggleFlags&16){updateMapMarkers()}if(updateNaggleFlags&32){eventsUpdate()}if(updateNaggleFlags&64){refreshMap(false,true)}if(updateNaggleFlags&256){drawDeviceTimeline()}if(updateNaggleFlags&1024){deviceEventsUpdate()}if(updateNaggleFlags&2048){userEventsUpdate()}updateNaggleTimer=null;updateNaggleFlags=0},150)}}function updateSelf(){QV("verifyEmailId",(userinfo.emailVerified!==true)&&(userinfo.email!=null)&&(serverinfo.emailcheck==true));QV("verifyEmailId2",(userinfo.emailVerified!==true)&&(userinfo.email!=null)&&(serverinfo.emailcheck==true));QV("manageOtp",(userinfo.otpsecret==1)||(userinfo.otphkeys>0));QV("authAppSetupCheck",userinfo.otpsecret==1);QV("authKeySetupCheck",userinfo.otphkeys>0);QV("authCodesSetupCheck",userinfo.otpkeys>0);if(typeof userinfo.passchange=="number"){if(userinfo.passchange==-1){QH("p2nextPasswordUpdateTime"," - Reset on next login.")}else{if((passRequirements!=null)&&(typeof passRequirements.reset=="number")){var a=(userinfo.passchange)+(passRequirements.reset*86400)-Math.floor(Date.now()/1000);if(a<0){QH("p2nextPasswordUpdateTime"," - Reset on next login.")}else{if(a<3600){QH("p2nextPasswordUpdateTime"," - Reset in "+Math.floor(a/60)+" minute"+addLetterS(Math.floor(a/60))+".")}else{if(a<86400){QH("p2nextPasswordUpdateTime"," - Reset in "+Math.floor(a/3600)+" hour"+addLetterS(Math.floor(a/3600))+".")}else{QH("p2nextPasswordUpdateTime"," - Reset in "+Math.floor(a/86400)+" day"+addLetterS(Math.floor(a/86400))+".")}}}}}}}function addLetterS(a){return(a>1)?"s":""}function onMessage(D,l){switch(l.action){case"serverstats":updateServerStats(l);break;case"authcookie":authCookie=l.cookie;break;case"serverinfo":serverinfo=l.serverinfo;break;case"userinfo":userinfo=l.userinfo;updateSiteAdmin();updateSelf();break;case"users":users={};for(var k in l.users){users[l.users[k]._id]=l.users[k]}updateUsers();break;case"wssessioncount":wssessions=l.wssessions;updateUsers();break;case"meshes":meshes={};for(var k in l.meshes){meshes[l.meshes[k]._id]=l.meshes[k]}masterUpdate(4+128);break;case"files":filetree=setupBackPointers(l.filetree);updateFiles();d3updatefiles();break;case"nodes":nodes=[];for(var k in l.nodes){if(!meshes[k]){console.log("Invalid mesh (1): "+k);continue}for(var o in l.nodes[k]){if(l.nodes[k][o]._id==null){console.log("Invalid node ("+o+"): "+JSON.stringify(l.nodes));continue}l.nodes[k][o].namel=l.nodes[k][o].name.toLowerCase();if(l.nodes[k][o].rname){l.nodes[k][o].rnamel=l.nodes[k][o].rname.toLowerCase()}else{l.nodes[k][o].rnamel=l.nodes[k][o].namel}l.nodes[k][o].meshnamel=meshes[k].name.toLowerCase();l.nodes[k][o].meshid=k;l.nodes[k][o].state=(l.nodes[k][o].state)?(l.nodes[k][o].state):0;l.nodes[k][o].desc=l.nodes[k][o].desc;if(!l.nodes[k][o].icon){l.nodes[k][o].icon=1}l.nodes[k][o].ident=++nodeShortIdent;nodes.push(l.nodes[k][o])}}masterUpdate(1|2|4|64);if(xxcurrentView==0){if("{{viewmode}}"!=""){go(parseInt("{{viewmode}}"))}else{setDialogMode(0);go(1)}}if("{{currentNode}}"!=""){gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"))}break;case"powertimeline":if(l.nodeid!=powerTimelineReq){break}powerTimelineNode=l.nodeid;powerTimeline=l.timeline;powerTimelineUpdate=Date.now()+300000;if(currentNode._id==l.nodeid){masterUpdate(256)}break;case"lastconnect":var v=getNodeFromId(l.nodeid);if(v!=null){v.lastconnect=l.time;v.lastaddr=l.addr;if((currentNode._id==v._id)&&(Q("MainComputerState").innerHTML=="")){QH("MainComputerState","<span style=font-size:12px>Last seen:<br />"+new Date(v.lastconnect).toLocaleDateString()+", "+new Date(v.lastconnect).toLocaleTimeString()+"</span>")}}break;case"msg":if(l.nodeid!=null){var e=-1;if(nodes!=null){for(var d in nodes){if(nodes[d]._id==l.nodeid){e=d;break}}}if(e!=-1){if(l.type=="console"){p15consoleReceive(nodes[e],l.value)}else{if(l.type=="notify"){var o={text:l.value};if(l.nodeid!=null){o.nodeid=l.nodeid}if(l.tag!=null){o.tag=l.tag}if(l.username!=null){o.username=l.username}addNotification(o)}else{if(l.type=="ps"){showDeskToolsProcesses(l)}else{if((l.type=="getclip")&&(xxdialogTag=="clipboard")&&(currentNode!=null)&&(currentNode._id==l.nodeid)){Q("d2clipText").value=l.data}else{if((l.type=="setclip")&&(xxdialogTag=="clipboard")&&(currentNode!=null)&&(currentNode._id==l.nodeid)){QH("dlgClipStatus",l.success?"<span style=color:green>Success</span>":"<span style=color:red>Failed</span>");setTimeout(function(){try{QH("dlgClipStatus","")}catch(j){}},2000)}}}}}}}else{if(l.type=="notify"){var o={text:l.value};if(l.tag!=null){o.tag=l.tag}if(l.username!=null){o.username=l.username}addNotification(o)}}break;case"getnetworkinfo":if((currentNode._id==l.nodeid)&&(xxdialogMode==2)&&(xxdialogTag=="if"+l.nodeid)){if(l.netif==null){QH("d2netinfo","No network interface information available for this device.")}else{var I="<div style=width:100%;max-height:260px;overflow-x:hidden;overflow-y:auto;line-height:160%>";if(currentNode.lastconnect){I+=addHtmlValue2("Last agent connection",new Date(currentNode.lastconnect).toLocaleString())}if(currentNode.lastaddr){if(isPrivateIP(currentNode.lastaddr)){I+=addHtmlValue2("Last agent address",currentNode.lastaddr.split(":")[0])}else{I+=addHtmlValue2("Last agent address",'<a href="https://iplocation.com/?ip='+currentNode.lastaddr.split(":")[0]+'" rel="noreferrer noopener" target="MeshIPLoopup">'+currentNode.lastaddr.split(":")[0]+"</a>")}}I+=addHtmlValue2("Last interfaces update",new Date(l.updateTime).toLocaleString());for(var d in l.netif){var q=l.netif[d];I+="<hr />";if(q.name){I+=addHtmlValue2("Name","<b>"+EscapeHtml(q.name)+"</b>")}if(q.desc){I+=addHtmlValue2("Description",EscapeHtml(q.desc).replace("(R)","&reg;").replace("(r)","&reg;"))}if(q.dnssuffix){I+=addHtmlValue2("DNS suffix",EscapeHtml(q.dnssuffix))}if(q.mac){I+=addHtmlValue2("MAC address",'<a href="https://dnslytics.com/mac-address-lookup/'+q.mac.substring(0,6)+'" rel="noreferrer noopener" target="MeshMACLoopup">'+EscapeHtml(q.mac.toLowerCase())+"</a>")}if(q.v4addr){I+=addHtmlValue2("IPv4 address",EscapeHtml(q.v4addr))}if(q.v4mask){I+=addHtmlValue2("IPv4 mask",EscapeHtml(q.v4mask))}if(q.v4gateway){I+=addHtmlValue2("IPv4 gateway",EscapeHtml(q.v4gateway))}if(q.gatewaymac){I+=addHtmlValue2("Gateway MAC",'<a href="https://dnslytics.com/mac-address-lookup/'+q.gatewaymac.substring(0,6)+'" rel="noreferrer noopener" target="MeshMACLoopup">'+EscapeHtml(q.gatewaymac.toLowerCase())+"</a>")}}I+="</div>";QH("d2netinfo",I)}}break;case"serverversion":if((xxdialogMode==2)&&(xxdialogTag=="MeshCentralServerUpdate")){var I="<div style=width:100%;max-height:260px;overflow-x:hidden;overflow-y:auto;line-height:160%>";if(!l.current){l.current="Unknown"}if(!l.latest){l.latest="Unknown"}I+=addHtmlValue2("Current Version","<b>"+EscapeHtml(l.current)+"</b>");I+=addHtmlValue2("Latest Version","<b>"+EscapeHtml(l.latest)+"</b>");I+="</div>";if((l.latest.indexOf(".")==-1)||(l.current==l.latest)||((features&2048)==0)){setDialogMode(2,"MeshCentral Version",1,null,I)}else{setDialogMode(2,"MeshCentral Version",3,server_showVersionDlgEx,I+"<br /><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> Check and click OK to start server self-update.</label>");server_showVersionDlgUpdate()}}break;case"servererrors":if((xxdialogMode==2)&&(xxdialogTag=="MeshCentralServerErrors")){if(l.data==null){setDialogMode(2,"MeshCentral Server Errors",1,null,"Server has no error log.")}else{var I="<div style=width:100%;max-height:260px;overflow-x:hidden;overflow:auto;line-height:160%;font-size:10px><pre>"+l.data+"<pre></div>";setDialogMode(2,"MeshCentral Server Errors",3,server_showErrorsDlgEx,I+"<br /><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> Check and click OK to clear error log.</label>");server_showVersionDlgUpdate()}}break;case"serverconsole":p15consoleReceive("serverconsole",l.value);break;case"events":if((l.nodeid!=null)&&(l.nodeid==currentNode._id)){currentDeviceEvents=l.events;masterUpdate(1024)}else{if((l.user!=null)&&(l.user==currentUser.name)){currentUserEvents=l.events;masterUpdate(2048)}else{events=l.events;masterUpdate(32)}}break;case"getcookie":if(l.tag=="clickonce"){var a="{{{serverRedirPort}}}"==""?"{{{serverPublicPort}}}":"{{{serverRedirPort}}}";var A="http://"+window.location.hostname+":"+a+"/clickonce/minirouter/MeshMiniRouter.application?WS=wss%3A%2F%2F"+window.location.hostname+"%2Fmeshrelay.ashx%3Fauth="+l.cookie+"&CH={{{webcerthash}}}&AP="+l.protocol+((debugmode==1)?"":"&HOL=1");var u=window.open(A,"_blank");u.opener=null}break;case"getNotes":var o=Q("d2devNotes");if(o&&(l.id==decodeURIComponent(o.attributes.noteid.value))){if(l.notes){QH("d2devNotes",decodeURIComponent(l.notes))}else{QH("d2devNotes","")}var B=o.attributes.ro.value=="true";if(B==false){o.removeAttribute("readonly");QE("idx_dlgOkButton",true);QV("idx_dlgOkButton",true);focusTextBox("d2devNotes")}}break;case"otpauth-request":if((xxdialogMode==2)&&(xxdialogTag=="otpauth-request")){var C=l.secret;if(C.length==52){C=C.split(/(.............)/).filter(Boolean).join(" ")}else{if(C.length==32){C=C.split(/(....)/).filter(Boolean).join(" ");C=C.substring(0,20)+"<br/>"+C.substring(20)}}QH("d2optinfo",'<table style=width:380px><tr><td style=vertical-align:top>Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application and scan the barcode, use <a href="'+l.url+'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret. Then, enter the current 6 digit token below to activate 2-Step login.<br /><br />Secret<br /><tt id=d2optsecret secret="'+l.secret+'" style=font-size:12px>'+C+'</tt><br /><br /></td><td style=width:1px;vertical-align:top><a href="'+l.url+'" rel="noreferrer noopener" target=_blank><div id="qrcode"></div></a></td><tr><td colspan=2 style="text-align:center;border-top:1px solid black"><br />Enter the token here for 2-step login: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></td></table>');new QRCode(Q("qrcode"),{text:l.url,width:128,height:128,colorDark:"#000000",colorLight:"#EEE",correctLevel:QRCode.CorrectLevel.H});QV("idx_dlgOkButton",true);QE("idx_dlgOkButton",false);Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode){return}setDialogMode(2,"Authenticator App",1,null,l.success?"<b style=color:green>Authenticator app activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode){return}setDialogMode(2,"Authenticator App",1,null,l.success?"<b>Authenticator application removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode){return}var I="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";I+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>";if(l.passwords){var g=0;for(var d in l.passwords){if(++g%2){I+="<tr>"}var y=""+l.passwords[d].p;while(y.length<8){y="0"+y}if(l.passwords[d].u===true){I+="<td>"+y.substring(0,4)+"&nbsp;"+y.substring(4)}else{I+="<td><strike style=color:#BBB>"+y.substring(0,4)+"&nbsp;"+y.substring(4);+"</strike>"}}}else{I+="<tr><td>No Active Tokens"}I+="</table></div></div><br />";I+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>";I+="<input type=button value='Generate New Tokens' onclick='account_manageOtp(1);'></input>";if(l.passwords!=null){I+="<input type=button value='Clear Tokens' onclick='account_manageOtp(2);'></input>"}I+="</div><br />";setDialogMode(2,"Manage Backup Codes",8,null,I,"otpauth-manage");break;case"otp-hkey-get":if(xxdialogMode&&(xxdialogTag!="otpauth-hardware-manage")){return}var F="<div style='border-radius:6px;border:2px solid #CCC;background-color:#BBB;width:100%;box-sizing:border-box;margin-bottom:6px'><div style='margin:3px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold'><table style=width:100%;text-align:left>";var b="</table></div></div>";var I="<a href='https://www.yubico.com/' rel='noreferrer noopener' target='_blank'>Hardware keys</a> are used as secondary login authentication.";I+="<div style='max-height:150px;overflow-y:auto;overflow-x:hidden;margin-top:6px;margin-bottom:6px'>";if(l.keys&&l.keys.length>0){for(var d in l.keys){var h=l.keys[d],H=(h.type==1)?"U2F":"OTP";I+=F+'<tr style=margin:5px><td style=width:30px><img width=24 height=18 src="images/hardware-key-'+H+'-24.png" style=margin-top:4px><td style=width:250px>'+h.name+"<td><input type=button value='Remove' onclick=account_removehkey("+h.i+")></input>"+b}}else{I+=F+"<tr style=text-align:center><td>No Keys Configured"+b}I+="</div>";I+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>";I+="<input id=d2addkey1 type=button value='Add U2F Key' onclick='account_addhkey(1);'></input>";if((features&16384)!=0){I+="<input id=d2addkey2 type=button value='Add OTP Key' onclick='account_addhkey(2);'></input>"}I+="</div><br />";setDialogMode(2,"Manage Security Keys",8,null,I,"otpauth-hardware-manage");if(u2fSupported()==false){QE("d2addkey1",false)}break;case"otp-hkey-yubikey-add":if(l.result){meshserver.send({action:"otp-hkey-get"})}else{setDialogMode(2,"Add Security Key",1,null,"<br />Error, Unable to add key.<br /><br />")}break;case"otp-hkey-setup-request":if(xxdialogMode&&(xxdialogTag!="otpauth-hardware-manage")){return}var I="Press the key button now.<br /><br /><div style=width:100%;text-align:center><img width=120 height=117 src='images/hardware-keypress-120.png' /></div><input id=dp1keyname style=display:none value="+l.name+" />";setDialogMode(2,"Add Security Key",2,null,I);window.u2f.register(l.request.appId,l.request.registerRequests,l.request.registeredKeys,function(m){if(m.registrationData){meshserver.send({action:"otp-hkey-setup-response",response:m,name:Q("dp1keyname").value});setDialogMode(2,"Add Security Key",0,null,"<br />Checking...<br /><br /><br />","otpauth-hardware-manage")}else{var j=["","Unknown error","Bad request","Unsupported configuration","This key was already registered","Timeout"];setDialogMode(2,"Add Security Key",1,null,"<br />"+j[m.errorCode]+".<br /><br />")}},l.request.timeoutSeconds);break;case"otp-hkey-setup-response":if(xxdialogMode&&(xxdialogTag!="otpauth-hardware-manage")){return}if(l.result==true){meshserver.send({action:"otp-hkey-get"})}else{setDialogMode(2,"Add Security Key",1,null,"<br />ERROR: Unable to add key.<br /><br />","otpauth-hardware-manage")}break;case"event":if(!l.event.nolog){events.unshift(l.event);var c=parseInt(p3limitdropdown.value);while(events.length>c){events.pop()}masterUpdate(32)}switch(l.event.action){case"accountcreate":case"accountchange":if(userinfo.name==l.event.account.name){var t=l.event.account.siteadmin?l.event.account.siteadmin:0;var w=userinfo.siteadmin?userinfo.siteadmin:0;if((l.event.account.quota!=userinfo.quota)||(((userinfo.siteadmin&8)==0)&&((l.event.account.siteadmin&8)!=0))){meshserver.send({action:"files"})}userinfo=l.event.account;if(w!=t){updateSiteAdmin()}updateSelf()}if(users==null){break}users[l.event.account._id]=l.event.account;updateUsers();break;case"accountremove":if(users==null){break}delete users["user/"+domain+"/"+l.event.username.toLowerCase()];updateUsers();break;case"createmesh":if(l.event.links["user/"+domain+"/"+userinfo.name.toLowerCase()]!=null){meshes[l.event.meshid]={_id:l.event.meshid,name:l.event.name,mtype:l.event.mtype,desc:l.event.desc,links:l.event.links};masterUpdate(4+128);meshserver.send({action:"files"})}break;case"meshchange":if(meshes[l.event.meshid]==null){meshes[l.event.meshid]={_id:l.event.meshid,name:l.event.name,mtype:l.event.mtype,desc:l.event.desc,links:l.event.links};meshserver.send({action:"nodes"})}else{if(l.event.name){meshes[l.event.meshid].name=l.event.name}if(l.event.desc){meshes[l.event.meshid].desc=l.event.desc}if(l.event.flags!=null){meshes[l.event.meshid].flags=l.event.flags}if(l.event.links){meshes[l.event.meshid].links=l.event.links}if(l.event.amt){meshes[l.event.meshid].amt=l.event.amt}if(meshes[l.event.meshid].links["user/"+domain+"/"+userinfo.name.toLowerCase()]==null){if((xxcurrentView==20)&&(currentMesh==meshes[l.event.meshid])){go(2)}delete meshes[l.event.meshid];var s=[];for(var d in nodes){if(nodes[d].meshid!=l.event.meshid){s.push(nodes[d])}}nodes=s;if(xxcurrentView>=10&&xxcurrentView<20&&currentNode&&currentNode.meshid==l.event.meshid){setDialogMode(0);go(1)}}}masterUpdate(4+128);if(xxcurrentView==20&&currentMesh._id==l.event.meshid){p20updateMesh()}break;case"deletemesh":if(meshes[l.event.meshid]){delete meshes[l.event.meshid];masterUpdate(128);meshserver.send({action:"files"})}var s=[];if(nodes!=null){for(var d in nodes){if(nodes[d].meshid!=l.event.meshid){s.push(nodes[d])}}}nodes=s;masterUpdate(4);if(xxcurrentView>=20&&xxcurrentView<30&&currentMesh._id==l.event.meshid){setDialogMode(0);go(2)}if(xxcurrentView>=10&&xxcurrentView<20&&currentNode&&currentNode.meshid==l.event.meshid){setDialogMode(0);go(1)}break;case"addnode":var v=l.event.node;if(!meshes[v.meshid]){break}v.namel=v.name.toLowerCase();if(v.rname){v.rnamel=v.rname.toLowerCase()}else{v.rnamel=v.namel}v.meshnamel=meshes[v.meshid].name.toLowerCase();v.state=0;if(!v.icon){v.icon=1}v.ident=++nodeShortIdent;if(nodes==null){}nodes.push(v);masterUpdate(1|2|4|16);break;case"removenode":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];if(currentNode==v){if(xxcurrentView>=10&&xxcurrentView<20){setDialogMode(0);go(1)}currentNode=null}nodes.splice(e,1);masterUpdate(4|16)}break;case"changenode":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];v.name=l.event.node.name;v.rname=l.event.node.rname;v.users=l.event.node.users;v.host=l.event.node.host;v.desc=l.event.node.desc;v.osdesc=l.event.node.osdesc;v.publicip=l.event.node.publicip;v.iploc=l.event.node.iploc;v.wifiloc=l.event.node.wifiloc;v.gpsloc=l.event.node.gpsloc;v.tags=l.event.node.tags;v.userloc=l.event.node.userloc;if(l.event.node.agent!=null){if(v.agent==null){v.agent={}}if(l.event.node.agent.ver!=null){v.agent.ver=l.event.node.agent.ver}if(l.event.node.agent.id!=null){v.agent.id=l.event.node.agent.id}if(l.event.node.agent.caps!=null){v.agent.caps=l.event.node.agent.caps}if(l.event.node.agent.core!=null){v.agent.core=l.event.node.agent.core}else{if(v.agent.core){delete v.agent.core}}v.agent.tag=l.event.node.agent.tag}if(l.event.node.intelamt!=null){if(v.intelamt==null){v.intelamt={}}if(l.event.node.intelamt.host!=null){v.intelamt.user=l.event.node.intelamt.host}if(l.event.node.intelamt.user!=null){v.intelamt.user=l.event.node.intelamt.user}if(l.event.node.intelamt.tls!=null){v.intelamt.tls=l.event.node.intelamt.tls}if(l.event.node.intelamt.ver!=null){v.intelamt.ver=l.event.node.intelamt.ver}if(l.event.node.intelamt.state!=null){v.intelamt.state=l.event.node.intelamt.state}}v.namel=v.name.toLowerCase();if(v.rname){v.rnamel=v.rname.toLowerCase()}else{v.rnamel=v.namel}if(l.event.node.icon){v.icon=l.event.node.icon}masterUpdate(2|4|8|16);refreshDevice(v._id);if((currentNode==v)&&(xxdialogMode!=null)&&(xxdialogTag=="@xxmap")){p10showNodeLocationDialog()}}break;case"nodemeshchange":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];if(meshes[l.event.newMeshId]==null){if(currentNode==v){if(xxcurrentView>=10&&xxcurrentView<20){setDialogMode(0);go(1)}currentNode=null}nodes.splice(e,1);masterUpdate(4|16)}else{v.meshid=l.event.newMeshId;v.meshnamel=meshes[l.event.newMeshId].name.toLowerCase();masterUpdate(1|2|4)}refreshDevice(l.event.nodeid)}else{var v=l.event.node;if(!meshes[v.meshid]){break}v.namel=v.name.toLowerCase();if(v.rname){v.rnamel=v.rname.toLowerCase()}else{v.rnamel=v.namel}v.meshnamel=meshes[v.meshid].name.toLowerCase();v.state=0;if(!v.icon){v.icon=1}v.ident=++nodeShortIdent;if(nodes==null){}nodes.push(v);masterUpdate(1|2|4|16)}break;case"nodeconnect":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];v.conn=l.event.conn;v.pwr=l.event.pwr;masterUpdate(4|16);refreshDevice(v._id)}break;case"wssessioncount":if(wssessions!=null){if(l.event.count==0&&wssessions["user/"+domain+"/"+l.event.username.toLowerCase()]){delete wssessions["user/"+domain+"/"+l.event.username.toLowerCase()]}else{wssessions["user/"+domain+"/"+l.event.username.toLowerCase()]=l.event.count}updateUsers()}break;case"clearevents":events=[];masterUpdate(32);break;case"login":if(users!=null&&users["user/"+domain+"/"+l.event.username.toLowerCase()]){users["user/"+domain+"/"+l.event.username.toLowerCase()].login=Math.floor(new Date(l.event.time).getTime()/1000)}break;case"scanamtdevice":if((xxdialogMode==null)||(!Q("dp1range"))||(Q("dp1range").value!=l.event.range)){return}var I="";if(l.event.results==null){I="<div style=width:100%;text-align:center;margin-top:12px>Unable to scan this address range.</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>"}else{amtScanResults=l.event.results;for(var d in l.event.results){var z=l.event.results[d],E=z.hostname;if(E.length>20){E=E.substring(0,20)+"..."}var G='<b title="'+EscapeHtml(z.hostname)+'">'+EscapeHtml(E)+"</b> - v"+z.ver;if(z.state==2){if(z.tls==1){G+=" with TLS."}else{G+=" without TLS."}}else{G+=" not activated."}I+='<div style=width:100%;margin-bottom:2px;background-color:lightgray><div style=padding:4px><div style=display:inline-block;margin-right:5px><input class=DevScanCheckbox name=dp1checkbox tag="'+EscapeHtml(d)+'" type=checkbox onclick=addAmtScanToMeshCheckbox() /></div><div class=j1 style=display:inline-block></div><div style=display:inline-block;margin-left:5px;overflow-x:auto;white-space:nowrap>'+G+"</div></div></div>"}if(I==""){I="<div style=width:100%;text-align:center;margin-top:12px>Scan returned no results.</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>"}}QH("dp1results",I);QE("dp1range",true);QE("dp1rangebutton",true);break;case"notify":var o={text:l.event.value};if(l.event.tag!=null){o.tag=l.event.tag}addNotification(o);break;case"stopped":break;default:break}break;case"stopped":autoReconnect=false;QH("p0span",l.msg);break;default:console.log("Unknown message.action",l.action);break}}function onRealNameCheckBox(){showRealNames=Q("RealNameCheckBox").checked;putstore("showRealNames",showRealNames?1:0);masterUpdate(6);return}function onDeviceViewChange(a){if(a!=null){Q("viewselect").value=a}for(var b=1;b<5;b++){Q("devViewButton"+b).classList.remove("viewSelectorSel")}Q("devViewButton"+Q("viewselect").value).classList.add("viewSelectorSel");putstore("deviceView",Q("viewselect").value);putstore("viewsize",Q("sizeselect").value);masterUpdate(4)}function ondockeypress(a){if(!xxdialogMode&&xxcurrentView==11&&desktop&&Q("DeskControl").checked){return desktop.m.handleKeys(a)}if(!xxdialogMode&&xxcurrentView==12&&terminal&&terminal.State==3){return terminal.m.TermHandleKeys(a)}if(!xxdialogMode&&((xxcurrentView==15)||(xxcurrentView==115))){return agentConsoleHandleKeys(a)}if(!xxdialogMode&&xxcurrentView==4){if(a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}var b=0;if(a.key){if(a.key.length===1&&userSearchFocus==0){Q("UserSearchInput").value=((Q("UserSearchInput").value+a.key));b=1}if(a.keyCode==8&&userSearchFocus==0){var c=Q("UserSearchInput").value;Q("UserSearchInput").value=c.substring(0,c.length-1);b=1}if(a.keyCode==27){Q("UserSearchInput").value="";b=1}}else{if(a.charCode!=0&&userSearchFocus==0){Q("UserSearchInput").value=((Q("UserSearchInput").value+String.fromCharCode(a.charCode)));b=1}}if(b>0){if(b==1){onUserSearchInputChanged()}return haltEvent(a)}}if(xxdialogMode||xxcurrentView!=1){return}if(a.ctrlKey==true&&a.charCode==96){showRealNames=!showRealNames;Q("RealNameCheckBox").value=showRealNames;putstore("showRealNames",showRealNames?1:0);masterUpdate(6);return}if(a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}if(Q("viewselect").value<3){var b=0;if(a.key){if(a.key.length===1&&searchFocus==0){Q("SearchInput").value=((Q("SearchInput").value+a.key));b=1}if(a.keyCode==8&&searchFocus==0){var c=Q("SearchInput").value;Q("SearchInput").value=c.substring(0,c.length-1);b=1}if(a.keyCode==27){Q("SearchInput").value="";b=1}}else{if(a.charCode!=0&&searchFocus==0){Q("SearchInput").value=((Q("SearchInput").value+String.fromCharCode(a.charCode)));b=1}}if(b>0){if(b==1){masterUpdate(5)}return haltEvent(a)}}if(Q("viewselect").value==3){if(a.key){if(a.key.length===1&&mapSearchFocus==0){Q("mapSearchLocation").value=((Q("mapSearchLocation").value+a.key));b=1}if(a.keyCode==27){Q("mapSearchLocation").value="";mapCloseSearchWindow();b=1}if(a.keyCode==13){getSearchLocation()}}else{if(a.charCode!=0&&mapSearchFocus==0){Q("mapSearchLocation").value=((Q("mapSearchLocation").value+String.fromCharCode(a.charCode)));b=1}}}}function ondockeydown(a){if(!xxdialogMode&&xxcurrentView==11&&desktop&&Q("DeskControl").checked){return desktop.m.handleKeyDown(a)}if(!xxdialogMode&&xxcurrentView==12&&terminal&&terminal.State==3){return terminal.m.TermHandleKeyDown(a)}if(!xxdialogMode&&xxcurrentView==13&&a.keyCode==116&&p13filetree!=null){haltEvent(a);return false}if(!xxdialogMode&&((xxcurrentView==15)||(xxcurrentView==115))){return agentConsoleHandleKeys(a)}if(!xxdialogMode&&xxcurrentView==4){if(a.keyCode===8&&userSearchFocus==0){var c=Q("UserSearchInput").value;Q("UserSearchInput").value=(c.substring(0,c.length-1));b=1}if(a.keyCode===27){Q("UserSearchInput").value="";b=1}if(b>0){if(b==1){masterUpdate(5)}return haltEvent(a)}}if(xxdialogMode||xxcurrentView!=1||a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}var b=0;if(Q("viewselect").value<3){if(a.keyCode===8&&searchFocus==0){var c=Q("SearchInput").value;Q("SearchInput").value=(c.substring(0,c.length-1));b=1}if(a.keyCode===27){Q("SearchInput").value="";b=1}if(b>0){if(b==1){masterUpdate(5)}return haltEvent(a)}}if(Q("viewselect").value==3){if(a.keyCode===8&&mapSearchFocus==0){var c=Q("mapSearchLocation").value;Q("mapSearchLocation").value=(c.substring(0,c.length-1));b=1}if(a.keyCode===27){Q("mapSearchLocation").value="";mapCloseSearchWindow();b=1}}}function ondockeyup(a){if(!xxdialogMode&&xxcurrentView==11&&desktop&&Q("DeskControl").checked){return desktop.m.handleKeyUp(a)}if(!xxdialogMode&&xxcurrentView==12&&terminal&&terminal.State==3){return terminal.m.TermHandleKeyUp(a)}if(!xxdialogMode&&xxcurrentView==13&&a.keyCode==116&&p13filetree!=null){p13folderup(9999);haltEvent(a);return false}if(!xxdialogMode&&xxcurrentView==4){if((a.keyCode===8&&searchFocus==0)||a.keyCode===27){return haltEvent(a)}}if(xxdialogMode&&a.keyCode==27){dialogclose(0)}if(xxdialogMode||xxcurrentView!=0||a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}if(Q("viewselect").value<3){if((a.keyCode===8&&searchFocus==0)||a.keyCode===27){return haltEvent(a)}}if(Q("viewselect").value==3){if((a.keyCode===8&&mapSearchFocus==0)||a.keyCode===27){return haltEvent(a)}}}function devMouseHover(b,c){var d=Q("viewselect").value;if(d==1){var a=b.children[1].children[1];a.children[0].classList.remove("g1s");a.children[1].classList.remove("e2s");a.children[2].classList.remove("g2s");if(c==1){a.children[0].classList.add("g1s");a.children[1].classList.add("e2s");a.children[2].classList.add("g2s")}}else{if(d==2){var a=b;a.children[2].classList.remove("g1s");a.children[4].classList.remove("e2s");a.children[3].classList.remove("g2s");if(c==1){a.children[2].classList.add("g1s");a.children[4].classList.add("e2s");a.children[3].classList.add("g2s")}}}}var deviceHeaderId=0;var deviceHeaderTotal=0;var deviceHeadersTitles={};var deviceHeaderCount;var deviceHeaders={};var oldviewmode=0;function updateDevices(){if(nodes==null){return}var H="",a=0,g=null,e=0,l={},O=Q("viewselect").value,s={},p={};QV("xdevices",O<4);QV("xdevicesmap",O==4);QV("devListToolbar",O<3);QV("kvmListToolbar",O==3);QV("devMapToolbar",O==4);QV("devListToolbarSize",O==3);QV("NoMeshesPanel",meshcount==0);QV("devListToolbarViewIcons",(meshcount!=0)&&(nodes.length>0));QV("devListToolbarSort",(meshcount!=0)&&(nodes.length>0)&&(O<4));if((meshcount==0)||(nodes.length==0)){O=1;sort=0}if(O==4){setTimeout(function(){if(xxmap.map!=null){xxmap.map.updateSize()}},200)}else{deviceHeaderId=0;deviceHeaderCount={};deviceHeaderTotal=0;deviceHeaders={};deviceHeadersTitles={};var x=[];if(sort==0){nodes.sort(meshSort)}else{if(sort==1){nodes.sort(powerSort)}else{if(sort==2){if(showRealNames==true){nodes.sort(deviceHostSort)}else{nodes.sort(deviceSort)}}}}var d=[],m=document.getElementsByClassName("DeviceCheckbox"),b=0;for(var t=0;t<m.length;t++){if(m[t].checked){d.push(m[t].value)}}if((oldviewmode<3)&&(O==3)){multiDesktopFilter=d}else{if((oldviewmode==3)&&(O<3)){d=multiDesktopFilter}}var M=Q("column_l").clientWidth-60;var k=Math.floor(M/301);k=301+Math.floor((M-(k*301))/k);for(var t in nodes){if(nodes[t].v==false){continue}var z=meshes[nodes[t].meshid],B=z.links["user/"+domain+"/"+userinfo.name.toLowerCase()];if(B==null){continue}var C=B.rights;if((O==3)&&(z.mtype==1)){continue}if(sort==0){if(nodes[t].meshid!=g){deviceHeaderSet();var o="";if(meshes[nodes[t].meshid].mtype==1){o="<span class=devHeaderx>, Intel&reg; AMT only</span>"}if((O==1)&&(g!=null)){if(a==2){H+="<td><div style=width:301px></div></td>"}if(H!=""){H+="</tr></table>"}}H+="<div class=DevSt style=width:100%;padding-top:4px><span style=float:right>";H+=getMeshActions(z,C);H+='</span><span id=MxMESH style=cursor:pointer onclick=gotoMesh("'+nodes[t].meshid+'")>'+EscapeHtml(meshes[nodes[t].meshid].name)+"</span>"+o+"<span id=DevxHeader"+deviceHeaderId+" class=devHeaderx></span></div>";g=nodes[t].meshid;l[g]=1;a=0}}else{if(sort==1){var G=nodes[t].pwr?nodes[t].pwr:0;if(G!==g){deviceHeaderSet();if((O==1)&&(g!==null)){if(a==2){H+="<td><div style=width:301px></div></td>"}if(H!=""){H+="</tr></table>"}}H+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[t].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+' class="devHeaderx"></span></div>';g=G;a=0}}else{if(sort==2){if(g==null){g="1"}}}}e++;var L=EscapeHtml(nodes[t].name);if(L.length==0){L="<i>None</i>"}if((nodes[t].rname!=null)&&(nodes[t].rname.length>0)){L+=" / "+EscapeHtml(nodes[t].rname)}var D=EscapeHtml(nodes[t].name);if(showRealNames==true&&nodes[t].rname!=null){D=EscapeHtml(nodes[t].rname)}if(D.length==0){D="<i>None</i>"}var u=nodes[t].icon;var F=NodeStateStr(nodes[t]);if((!nodes[t].conn)||(nodes[t].conn==0)){u+=" gray"}if(O==1){H+="<div id=devs onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:"+k+'px;height:50px;padding-top:1px;padding-bottom:1px><div style=width:22px;height:50%;float:left;padding-top:12px><input class="'+nodes[t].meshid+' DeviceCheckbox" onclick=p1updateInfo() value=devid_'+nodes[t]._id+" type=checkbox></div><div style=height:100%;cursor:pointer onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)><div class=\"i"+u+'" style=width:50px;float:left></div><div style=height:100%><div class=g1></div><div class=e2><div class=e1 style=width:'+(k-100)+'px title="'+L+'">'+D+"</div><div>"+F+"</div></div><div class=g2></div></div></div></div>"}else{if(O==2){H+="<tr><td><div id=devs class=bar18 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium>";H+='<div style=width:22px;float:left;background-color:white><input class="'+nodes[t].meshid+' DeviceCheckbox" onclick=p1updateInfo() value=devid_'+nodes[t]._id+" type=checkbox></div>";H+="<div style=float:left;height:18px;width:18px;background-color:white onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)><div class=j"+u+" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>";H+="<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>";H+='<div style=cursor:pointer;font-size:14px title="'+L+"\" onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)><span style=float:right>"+F+"</span><span style=width:300px>"+D+"</span></div></div></td></tr>"}else{if((O==3)&&(nodes[t].conn&1)&&(((C&8)||(C&256))!=0)&&((nodes[t].agent.caps&1)!=0)){if((multiDesktopFilter.length==0)||(multiDesktopFilter.indexOf("devid_"+nodes[t]._id)>=0)){H+="<div id=devs style=display:inline-block;margin:1px;background-color:lightgray;border-radius:5px;position:relative><div style=padding:3px;cursor:pointer onclick=gotoDevice('"+nodes[t]._id+"',11,null,event)>";H+='<div class="j'+u+'" style=width:16px;float:left></div>&nbsp;'+D+"</div>";H+="<span onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)></span><div id=xkvmid_"+nodes[t]._id.split("/")[2]+"><div id=skvmid_"+nodes[t]._id.split("/")[2]+' style="position:absolute;color:white;left:5px;top:27px;text-shadow:0px 0px 5px #000;z-index:1000;cursor:default" onclick=toggleKvmDevice(\''+nodes[t]._id+"')>Disconnected</div></div>";H+="</div>";x.push(nodes[t]._id)}}}}if((sort==3)&&(H!="")){if(nodes[t].tags){for(var w in nodes[t].tags){var K=nodes[t].tags[w];if(s[K]==null){s[K]=H;p[K]=1}else{s[K]+=H;p[K]+=1}if(O==3){break}}}H=""}deviceHeaderTotal++;if(typeof deviceHeaderCount[nodes[t].state]=="undefined"){deviceHeaderCount[nodes[t].state]=1}else{deviceHeaderCount[nodes[t].state]++}}if(sort==3){var q=[];for(var t in s){q.push(t)}q.sort(function(c,j){return c.toLowerCase().localeCompare(j.toLowerCase())});for(var w in q){var t=q[w];H+="<div class=DevSt style=width:100%;padding-top:4px><span>"+t+'</span><span class="devHeaderx">, '+p[t]+" device"+((p[t]>1)?"s":"")+"</span></div>"+s[t]}}if((H=="")&&(meshcount>0)&&(Q("SearchInput").value!="")){if(sort==3){H='<div style="margin:30px">No devices are included in any groups, click on a device\'s "Groups" to add to a group.</div>'}else{H='<div style="margin:30px">No devices matching this search.</div>'}}if((O==1)&&(a==2)){H+="<td><div style=width:301px></div></td>"}if((sort==0)&&(Q("SearchInput").value=="")&&(O<3)){for(var t in meshes){var y=meshes[t],A=y.links["user/"+domain+"/"+userinfo.name.toLowerCase()];if(A!=null){var C=A.rights;if(l[y._id]==null){if((g!="")&&(H!="")){H+="</tr></table>"}H+="<table style=width:100%;padding-top:4px cellpadding=0 cellspacing=0><tr><td colspan=3 class=DevSt><span style=float:right>";H+=getMeshActions(y,C);H+='</span><span id=MxMESH style=cursor:pointer onclick=gotoMesh("'+y._id+'")>'+EscapeHtml(y.name)+"</span></td></tr><tr>";if(y.mtype==1){H+="<td><div style=padding:10px><i>No Intel&reg; AMT devices in this mesh";if((C&4)!=0){H+=', <a style=cursor:pointer onclick=addDeviceToMesh("'+y._id+'")>add one</a>'}}if(y.mtype==2){H+="<td><div style=padding:10px><i>No devices in this mesh";if((C&4)!=0){H+=', <a style=cursor:pointer onclick=addAgentToMesh("'+y._id+'")>add one</a>'}}H+=".</i></div></td>";g=y._id;e++}}}}H+="</tr></table><div style=height:1px></div>";H+="<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>";if((O<3)&&(sort==0)&&(meshcount>0)){H+='<a onclick=account_createMesh() title="Create a new group of devices." style=cursor:pointer>Add Device Group</a>&nbsp'}H+='<a onclick=p10showMeshCmdDialog(0) style=cursor:pointer title="Download MeshCmd, a command line tool that performs many functions.">MeshCmd</a></div>';H+="</div><br/>";QH("xdevices",H);deviceHeaderSet();var m=document.getElementsByClassName("DeviceCheckbox"),b=0;for(var t=0;t<m.length;t++){m[t].checked=(d.indexOf(m[t].value)>=0)}for(var t in deviceHeaders){QH(t,deviceHeaders[t])}for(var t in deviceHeadersTitles){Q(t).title=deviceHeadersTitles[t]}p1updateInfo();if(O==3){var P=[{x:180,y:101},{x:302,y:169},{x:454,y:255}][Q("sizeselect").selectedIndex];var I=P.x+2,N=M-5,R=Math.floor(N/I);R=I+Math.floor((N-(R*I))/R);P.y=P.y*(R/P.x);P.x=R;for(var t in multiDesktop){multiDesktop[t].xxdelete=true}for(var t in x){var v=x[t],J=v.split("/")[2],h=multiDesktop[v];if(h!=null){h.m.CanvasId.setAttribute("style","background-color:black;width:"+P.x+"px;height:"+P.y+"px");Q("xkvmid_"+J).appendChild(h.m.CanvasId);delete h.xxdelete;QH("skvmid_"+J,["Disconnected","Connecting...","Setup...","",""][((h.m.State==null)?h.m.state:h.m.State)])}else{var E=getNodeFromId(v);if((desktopNode==E)&&(desktop!=null)){var a=desktop.m.CanvasId;a.setAttribute("id","kvmid_"+J);a.setAttribute("style","background-color:black;width:"+P.x+"px;height:"+P.y+"px");a.setAttribute("onclick","toggleKvmDevice('"+v+"')");a.removeAttribute("onmousedown");a.removeAttribute("onmouseup");a.removeAttribute("onmousemove");Q("xkvmid_"+J).appendChild(a);QH("skvmid_"+J,["Disconnected","Connecting...","Setup...","",""][((desktop.m.State==null)?desktop.m.state:desktop.m.State)]);if(desktop.m.SendCompressionLevel){desktop.m.SendCompressionLevel(1,multidesktopsettings.quality,multidesktopsettings.scaling,multidesktopsettings.framerate)}desktop.shortid=J;desktop.onStateChanged=onMultiDesktopStateChange;multiDesktop[v]=desktop;desktop=desktopNode=currentNode=null;QH("DeskParent",'<canvas id="Desk" width="640" height="480" style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>')}else{var a=document.createElement("canvas");a.setAttribute("id","kvmid_"+J);a.setAttribute("width",640);a.setAttribute("height",480);a.setAttribute("oncontextmenu","return false");a.setAttribute("style","background-color:black;width:"+P.x+"px;height:"+P.y+"px");a.setAttribute("onclick","toggleKvmDevice('"+v+"')");try{Q("xkvmid_"+J).appendChild(a)}catch(n){}if(Q("autoConnectDesktopCheckbox").checked==true){setTimeout(function(){connectMultiDesktop(E,1)},100)}}}}for(var t in multiDesktop){if(multiDesktop[t].xxdelete==true){multiDesktop[t].Stop();delete multiDesktop[t]}else{if(debugmode&&multiDesktop[t].m&&multiDesktop[t].m.onScreenSizeChange){mdeskAdjust(multiDesktop[t].m,multiDesktop[t].m.ScreenWidth,multiDesktop[t].m.ScreenHeight,multiDesktop[t].m.CanvasId)}}}deskAdjust()}else{disconnectAllKvmFunction();Q("autoConnectDesktopCheckbox").checked=false}}oldviewmode=O}function toggleKvmDevice(d){var c=getNodeFromId(d),a=meshes[c.meshid],b=a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((b&8)||(b&256)){if(c.conn&1){connectMultiDesktop(c,1)}}}function autoConnectDesktops(){if(Q("autoConnectDesktopCheckbox").checked==true){connectAllKvmFunction()}}function connectAllKvmFunction(){for(var a in nodes){if(multiDesktop[nodes[a]._id]==null){toggleKvmDevice(nodes[a]._id)}}}function disconnectAllKvmFunction(){for(var a in multiDesktop){multiDesktop[a].Stop()}multiDesktop={}}function onMultiDesktopStateChange(a,c){try{QH("skvmid_"+a.shortid,["Disconnected","Connecting...","Setup...","",""][c])}catch(b){}}function showMultiDesktopSettings(){QV("d7amtkvm",false);QV("d7meshkvm",true);d7bitmapquality.value=multidesktopsettings.quality;d7bitmapscaling.value=multidesktopsettings.scaling;if(multidesktopsettings.framerate){d7framelimiter.value=multidesktopsettings.framerate}else{d7framelimiter.value=1000}setDialogMode(7,"Remote Desktop Settings",3,showMultiDesktopSettingsChanged)}function showMultiDesktopSettingsChanged(){multidesktopsettings.quality=d7bitmapquality.value;multidesktopsettings.scaling=d7bitmapscaling.value;multidesktopsettings.framerate=d7framelimiter.value;localStorage.setItem("multidesktopsettings",JSON.stringify(multidesktopsettings));for(var a in multiDesktop){multiDesktop[a].m.SendCompressionLevel(1,multidesktopsettings.quality,multidesktopsettings.scaling,multidesktopsettings.framerate)}}function connectMultiDesktop(c,a){var d=c._id,e=d.split("/")[2];var b=multiDesktop[d];if(b==null){if(Q("kvmid_"+e)==null){return}if(a==2){if((c.intelamt.user==null)||(c.intelamt.user=="")){return}b=CreateAmtRedirect(CreateAmtRemoteDesktop("kvmid_"+e),authCookie);b.shortid=e;b.onStateChanged=onMultiDesktopStateChange;b.m.bpp=1;b.m.useZRLE=true;b.m.showmouse=true;b.m.onKvmData=function(g){console.log("KVM Data received in multi-desktop mode, this is not supported.")};if(debugmode>0){b.m.onScreenSizeChange=mdeskAdjust}b.Start(d,16994,"*","*",0);b.contype=2;multiDesktop[d]=b}else{if(a==1){b=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("kvmid_"+e),serverPublicNamePort,authCookie);b.shortid=e;b.attemptWebRTC=attemptWebRTC;b.onStateChanged=onMultiDesktopStateChange;b.m.CompressionLevel=multidesktopsettings.quality;b.m.ScalingLevel=multidesktopsettings.scaling;b.m.FrameRateTimer=multidesktopsettings.framerate;if(debugmode>0){b.m.onScreenSizeChange=mdeskAdjust}b.Start(d);b.contype=1;multiDesktop[d]=b}}}else{b.Stop();delete multiDesktop[d]}}function getMeshActions(a,b){if((b&4)==0){return""}var c="";if((features&1024)==0){c+=' <a style=cursor:pointer;font-size:10px title="Add a new Intel&reg; AMT computer that is located on the internet." onclick=addCiraDeviceToMesh("'+a._id+'")>Add CIRA</a>'}if(a.mtype==1){if((features&1)==0){c+=' <a style=cursor:pointer;font-size:10px title="Add a new Intel&reg; AMT computer that is located on the local network." onclick=addDeviceToMesh("'+a._id+'")>Add Local</a>';c+=' <a style=cursor:pointer;font-size:10px title="Add a new Intel&reg; AMT computer by scanning the local network." onclick=addAmtScanToMesh("'+a._id+'")>Scan Network</a>'}}if(a.mtype==2){c+=' <a style=cursor:pointer;font-size:10px title="Add a new computer to this mesh by installing the mesh agent." onclick=addAgentToMesh("'+a._id+'")>Add Agent</a>';if(features&64){c+=' <a style=cursor:pointer;font-size:10px title="Invite someone to install the mesh agent on this mesh." onclick=inviteAgentToMesh("'+a._id+'")>Invite</a>'}}return c}function addDeviceToMesh(b){if(xxdialogMode){return}var a=meshes[b];var c='Add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+'".<br /><br />';c+=addHtmlValue("Device Name","<input id=dp1devicename style=width:230px maxlength=32 autocomplete=off onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />");c+=addHtmlValue("Hostname",'<input id=dp1hostname style=width:230px maxlength=32 autocomplete=off placeholder="Same as device name" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');c+=addHtmlValue("Username",'<input id=dp1username style=width:230px maxlength=32 autocomplete=off placeholder="admin" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');c+=addHtmlValue("Password","<input id=dp1password type=password style=width:230px autocomplete=off maxlength=32 onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />");c+=addHtmlValue("Security","<select id=dp1tls style=width:236px><option value=0>No TLS security</option><option value=1>TLS security required</option></select>");setDialogMode(2,"Add Intel&reg; AMT device",3,addDeviceToMeshEx,c,b);validateDeviceToMesh();Q("dp1devicename").focus()}function addAmtScanToMesh(a){if(xxdialogMode){return}var b="Enter a range of IP addresses to scan for Intel AMT devices.<br /><br />";b+=addHtmlValue("IP Range",'<input id=dp1range style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value=Scan onclick=addAmtScanToMeshButton()></input>');b+='<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';setDialogMode(2,"Scan for Intel&reg; AMT devices",3,addAmtScanToMeshEx,b,a);QE("idx_dlgOkButton",false);QH("dp1results","<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>");focusTextBox("dp1range")}function addAmtScanToMeshKeyUp(a){if(a.keyCode==13){haltEvent(a);addAmtScanToMeshButton()}}function addAmtScanToMeshEx(b,h){var d=document.getElementsByClassName("DevScanCheckbox"),c=0;for(var e=0;e<d.length;e++){if(d[e].checked){var g=d[e].getAttribute("tag");var a=amtScanResults[g];meshserver.send({action:"addamtdevice",meshid:h,devicename:g,hostname:a.hostname,amtusername:"",amtpassword:"",amttls:a.tls})}}}function addAmtScanToMeshButton(){QE("dp1range",false);QE("dp1rangebutton",false);QH("dp1results","<div style=width:100%;text-align:center;margin-top:12px>Scanning...</div>");meshserver.send({action:"scanamtdevice",range:Q("dp1range").value})}function addAmtScanToMeshCheckbox(){var b=document.getElementsByClassName("DevScanCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked){a++}}QE("idx_dlgOkButton",a>0)}function addCiraDeviceToMesh(b){if(xxdialogMode){return}var a=meshes[b];var c=b.split("/")[2].replace(/\@/g,"X").replace(/\$/g,"X");var e="<select id=dlgAddCiraSel onclick=dlgAddCiraSelClick() style=width:230px><option value=0>MeshCommander Script</option><option value=1>Manual Username/Password</option>";if((features&16)==0){e+="<option value=2>Manual Certificate</option></select>"}var d="";d+=addHtmlValue("Setup Method",e);d+="<hr>";d+='<div id=dlgAddCira0>To add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+"\" with CIRA, download the following script files and use <a href='http://meshcommander.com' rel='noreferrer noopener' target='_blank'>MeshCommander</a> to run the script to configure computers.<br /><br />";d+=addHtmlValue("Setup CIRA",'<a style=cursor:pointer onclick=fileDownload("mescript.ashx?type=1&meshid='+c.substring(0,16)+'","cira_setup.mescript")>cira_setup.mescript</a>');d+=addHtmlValue("Cleanup CIRA",'<a style=cursor:pointer onclick=fileDownload("mescript.ashx?type=2","cira_clean.mescript")>cira_clean.mescript</a>');d+="</div>";d+='<div id=dlgAddCira1 style=display:none>To add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+'" with CIRA, load the following certificate as trusted root within Intel AMT';if(serverinfo.mpspass){d+=" and authenticate to the server using this username and password.<br /><br />"}else{d+=" and authenticate to the server using this username and any password.<br /><br />"}d+=addHtmlValue("Root Certificate",'<a style=cursor:pointer onclick=fileDownload("MeshServerRootCert.cer","MeshServerRootCert.cer")>Root Certificate File</a>');d+=addHtmlValue("Username",'<input style=width:230px readonly value="'+c.substring(0,16)+'" />');if(serverinfo.mpspass){d+=addHtmlValue("Password",'<input style=width:230px readonly value="'+EscapeHtml(serverinfo.mpspass)+'" />')}if(serverinfo!=null){d+=addHtmlValue("MPS Server",'<input style=width:230px readonly value="'+EscapeHtml(serverinfo.mpsname)+":"+serverinfo.mpsport+'" />')}d+="</div>";if((features&16)==0){d+='<div id=dlgAddCira2 style=display:none>To add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+'" with CIRA, load the following certificate as trusted root within Intel AMT, authenticate using a client certificate with the following common name and connect to the following server.<br /><br />';d+=addHtmlValue("Root Certificate",'<a style=cursor:pointer onclick=fileDownload("MeshServerRootCert.cer","MeshServerRootCert.cer")>Root Certificate File</a>');d+=addHtmlValue("Organization",'<input style=width:230px readonly value="'+c+'" />');if(serverinfo!=null){d+=addHtmlValue("MPS Server",'<input style=width:230px readonly value="'+EscapeHtml(serverinfo.mpsname)+":"+serverinfo.mpsport+'" />')}d+="</div>"}setDialogMode(2,"Add Intel&reg; AMT CIRA device",2,null,d,"fileDownload")}function dlgAddCiraSelClick(){var a=Q("dlgAddCiraSel").value;QV("dlgAddCira0",a==0);QV("dlgAddCira1",a==1);QV("dlgAddCira2",a==2)}function checkEmail(c){var d=c.split("@");var b=((d.length==2)&&(d[0].length>0)&&(d[1].split(".").length>1)&&(d[1].length>2));if(b==true){var e=d[1].split(".");for(var a in e){if(e[a].length==0){b=false}}}return b}function inviteAgentToMesh(b){if(xxdialogMode){return}var a=meshes[b];var c="Invite someone to install the mesh agent. An email with be sent with the link to the mesh agent installation for "+EscapeHtml(a.name)+".<br /><br />";c+=addHtmlValue("Name (optional)",'<input id=agentInviteName value="" style=width:230px maxlength=64 />');c+=addHtmlValue("Email",'<input id=agentInviteEmail style=width:230px placeholder="example@email.com" onkeyup=validateAgentInvite()></input>');c+=addHtmlValue("Operating System","<select id=agentInviteNameOs style=width:236px><option value=0>Any supported</option><option value=1>Windows only</option><option value=3>Apple OSX only</option><option value=2>Linux only</option></select>");c+=addHtmlValue("Installation Type","<select id=agentInviteType style=width:236px><option value=0>Background and interactive</option><option value=2>Background only</option><option value=1>Interactive only</option></select>");c+=addHtmlValue("Message<br />(optional)",'<textarea id=agentInviteMessage value="" style=width:230px;height:100px;resize:none maxlength=1024 /></textarea>');setDialogMode(2,"Invite",3,performAgentInvite,c,b);validateAgentInvite()}function validateAgentInvite(){QE("idx_dlgOkButton",checkEmail(Q("agentInviteEmail").value))}function performAgentInvite(a,b){meshserver.send({action:"inviteAgent",meshid:b,email:Q("agentInviteEmail").value,name:Q("agentInviteName").value,os:Q("agentInviteNameOs").value,flags:Q("agentInviteType").value,msg:Q("agentInviteMessage").value})}function addAgentToMesh(d){if(xxdialogMode){return}var b=meshes[d],j="",a=0;j+=addHtmlValue("Operating System","<select id=aginsSelect onchange=addAgentToMeshClick() style=width:236px><option value=0>Windows</option><option value=1>Linux</option><option value=2>Apple OSX</option><option value=3>Windows (UnInstall)</option><option value=4>Linux (UnInstall)</option></select>");j+="<div id=aginsTypeDiv>";j+=addHtmlValue("Installation Type","<select id=aginsType onchange=addAgentToMeshClick() style=width:236px><option value=0>Background & interactive</option><option value=2>Background only</option><option value=1>Interactive only</option></select>");j+="</div><hr>";var c=b.name;c=c.split("\\").join("").split("/").join("").split(":").join("").split("*").join("").split("?").join("").split('"').join("").split("<").join("").split(">").join("").split("|").join("").split(" ").join("").split("'").join("");j+='<div id=agins_windows>To add a new computer to device group "'+EscapeHtml(b.name)+'", download the mesh agent and install it the computer to manage. This agent has server and mesh information embedded within it.<br /><br />';j+=addHtmlValue("Mesh Agent",'<a id=aginsw32lnk style=cursor:pointer onclick=fileDownload("meshagents?id=3&meshid='+d.split("/")[2]+'&installflags=","MeshAgent-'+c+'.exe",1) title="32bit version of the MeshAgent">Windows (.exe)</a>');j+=addHtmlValue("Mesh Agent",'<a id=aginsw64lnk style=cursor:pointer onclick=fileDownload("meshagents?id=4&meshid='+d.split("/")[2]+'&installflags=","MeshAgent-'+c+'.exe",1) title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');if(debugmode>0){j+=addHtmlValue("Settings File",'<a id=aginswmshlnk href="meshsettings?id='+d.split("/")[2]+'&installflags=0" rel="noreferrer noopener" target="_blank">'+EscapeHtml(b.name)+" settings (.msh)</a>")}j+="</div>";j+="<div id=agins_linux style=display:none>To add a computer to "+EscapeHtml(b.name)+" run the following command. Root credentials will be needed.<br />";j+="<textarea id=agins_linux_area rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>";j+="</div>";j+='<div id=agins_osx style=display:none>To add a new computer to device group "'+EscapeHtml(b.name)+'", download the mesh agent and install it the computer to manage. This agent installer has server and mesh information embedded within it.<br /><br />';j+=addHtmlValue("Mesh Agent",'<a href="meshosxagent?id=16&meshid='+d.split("/")[2]+'" rel="noreferrer noopener" target="_blank" title="64bit version of OSX Mesh Agent">OSX Agent (64bit)</a>');j+="</div>";j+='<div id=agins_windows_un style=display:none>To remove a mesh agent, download the file below, run it and click "uninstall".<br /><br />';j+=addHtmlValue("Mesh Agent",'<a style=cursor:pointer onclick=fileDownload("meshagents?id=3","MeshAgent.exe") title="32bit version of the MeshAgent">Windows (.exe)</a>');j+=addHtmlValue("Mesh Agent",'<a style=cursor:pointer onclick=fileDownload("meshagents?id=4","MeshAgent.exe") title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');j+="</div>";j+="<div id=agins_linux_un style=display:none>To remove a mesh agent, run the following command. Root credentials will be needed.<br />";j+="<textarea id=agins_linux_area_un rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>";j+="</div>";setDialogMode(2,"Add Mesh Agent",2,null,j,"fileDownload");var h=serverinfo.name;if((h.indexOf(".")==-1)||((features&2)!=0)){h=window.location.hostname}var e=((features&8192)!=0)?"--no-proxy ":"";if(serverinfo.https==true){var g=(serverinfo.port==443)?"":(":"+serverinfo.port);Q("agins_linux_area").value="wget https://"+h+g+"/meshagents?script=1 "+e+"--no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+h+g+" '"+d.split("/")[2]+"'\r\n";Q("agins_linux_area_un").value="wget https://"+h+g+"/meshagents?script=1 "+e+"--no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"}else{var g=(serverinfo.port==80)?"":(":"+serverinfo.port);Q("agins_linux_area").value="wget http://"+h+g+"/meshagents?script=1 "+e+"-O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+h+g+" '"+d.split("/")[2]+"'\r\n";Q("agins_linux_area_un").value="wget http://"+h+g+"/meshagents?script=1 "+e+"-O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"}Q("aginsSelect").focus();addAgentToMeshClick()}function fileDownload(g,d,a){var h=null,c="";if(a==1){c=Q("aginsType").value}else{if(a==2){c=Q("aginsSelect").value;if(parseInt(c)>=5){d=d.toLowerCase()}else{d+=".exe"}}}try{h=new XDomainRequest()}catch(b){}if(!h){h=new XMLHttpRequest()}h.open("GET",window.location.href+g+c);h.timeout=15000;h.responseType="blob";h.onprogress=function(e){};h.onload=function(j){saveAs(new Blob([j.target.response],{type:"application/octet-stream"}),d);if(xxdialogTag=="fileDownload"){setDialogMode(0)}};h.onerror=function(){if(xxdialogTag=="fileDownload"){setDialogMode(0)}alert("Agent downloads timeout.")};h.ontimeout=function(){if(xxdialogTag=="fileDownload"){setDialogMode(0)}alert("Unable to download agent.")};h.send()}function addAgentToMeshClick(){var a=Q("aginsSelect").value;QV("agins_windows",a==0);QV("agins_linux",a==1);QV("agins_osx",a==2);QV("agins_windows_un",a==3);QV("agins_linux_un",a==4);QV("aginsTypeDiv",a==0);if(debugmode>0){Q("aginswmshlnk").href=(Q("aginswmshlnk").href.split("installflags=")[0])+"installflags="+Q("aginsType").value}}function validateDeviceToMesh(){QE("idx_dlgOkButton",(Q("dp1devicename").value.length>0)&&(passwordcheck(Q("dp1password").value)))}function addDeviceToMeshEx(b,d){var a=Q("dp1username").value;if(a==""){a="admin"}var c=Q("dp1hostname").value;if(c==""){c=Q("dp1devicename").value}meshserver.send({action:"addamtdevice",meshid:d,devicename:Q("dp1devicename").value,hostname:c,amtusername:a,amtpassword:Q("dp1password").value,amttls:Q("dp1tls").value})}function deviceHeaderSet(){if(deviceHeaderId==0){deviceHeaderId=1;return}deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+((deviceHeaderTotal==1)?" node":" nodes");deviceHeaderId++;deviceHeaderCount={};deviceHeaderTotal=0}var powerStateStrings=["",'<span title="Device is powered on.">Powered</span>','<span title="Device is in sleep state (S1).">Sleeping</span>','<span title="Device is in sleep state (S2).">Sleeping</span>','<span title="Device is in deep sleep state (S3).">Deep Sleep</span>','<span title="Device is in hibernating state (S4).">Hibernating</span>','<span title="Device is in powered off state (S5).">Soft-Off</span>','<span title="Device is detected but power state could not be obtained.">Present</span>'];var powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"];var powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(a){var b=[];if(a.state>0&&a.state<powerStatetable.length){state.push(powerStatetable[a.state])}if(a.conn){if((a.conn&1)!=0){b.push('<span title="Mesh agent is connected and ready for use.">Agent</span>')}if((a.conn&2)!=0){b.push('<span title="Intel&reg; AMT CIRA is connected and ready for use.">CIRA</span>')}if((a.conn&4)!=0){b.push('<span title="Intel&reg; AMT is routable.">Intel&reg; AMT</span>')}if((a.conn&8)!=0){b.push('<span title="Mesh agent is reachable using another agent as relay.">Relay</span>')}}if((a.pwr!=null)&&(a.pwr!=0)){b.push(powerStateStrings[a.pwr])}return b.join(", ")}function PowerStateStr(a){if(a<powerStatetable.length){return powerStatetable[a]}return""}function PowerStateStr2(a){if((a!=0)&&(a<powerStatetable.length)){return powerStatetable[a]}return"Unknown"}function selectallButtonFunction(){var b=document.getElementsByClassName("DeviceCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked===true){a++}}for(var c=0;c<b.length;c++){b[c].checked=(a==0)}p1updateInfo()}function p1updateInfo(){var b=document.getElementsByClassName("DeviceCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked===true){a++}}if(a>0){QE("GroupActionButton",true);Q("SelectAllButton").value="Select None";QV("cxmgroupsplit",true);QV("cxmdesktop",true)}else{QE("GroupActionButton",false);Q("SelectAllButton").value="Select All";QV("cxmgroupsplit",false);QV("cxmdesktop",false)}}function groupActionFunction(){var a="Select an operation to perform on all selected devices. Actions will be performed only with proper rights.<br /><br />";a+=addHtmlValue("Operation","<select id=d2groupop style=float:right;width:250px><option value=100>Wake-up devices</option><option value=4>Sleep devices</option><option value=3>Reset devices</option><option value=2>Power off devices</option><option value=102>Move to device group</option><option value=101>Delete devices</option></select>");setDialogMode(2,"Group Action",3,groupActionFunctionEx,a)}function getCheckedDevices(){var e=[],b=document.getElementsByClassName("DeviceCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked){if(b[c].value){var d=b[c].value.substring(6);if(e.indexOf(d)==-1){e.push(d)}}}}return e}function groupActionFunctionEx(){var a=Q("d2groupop").value;if(a==100){meshserver.send({action:"wakedevices",nodeids:getCheckedDevices()})}else{if(a==101){var b="Confirm delete selected devices(s)?<br /><br />";b+="<label><input id=d2check type=checkbox onchange=d2groupActionFunctionDelEx() />Confirm</label>";setDialogMode(2,"Delete Nodes",3,groupActionFunctionDelEx,b);QE("idx_dlgOkButton",false)}else{if(a==102){p10showChangeGroupDialog(getCheckedDevices())}else{meshserver.send({action:"poweraction",nodeids:getCheckedDevices(),actiontype:a})}}}}function d2groupActionFunctionDelEx(){QE("idx_dlgOkButton",Q("d2check").checked)}function groupActionFunctionDelEx(){meshserver.send({action:"removedevices",nodeids:getCheckedDevices()})}function onSortSelectChange(a){sort=document.getElementById("sortselect").selectedIndex;if(!a){putstore("sort",sort)}}function meshSort(c,d){if(c.meshnamel>d.meshnamel){return 1}if(c.meshnamel<d.meshnamel){return -1}if(c.meshid==d.meshid){if(showRealNames==true){if(c.rnamel>d.rnamel){return 1}if(c.rnamel<d.rnamel){return -1}return 0}else{if(c.namel>d.namel){return 1}if(c.namel<d.namel){return -1}return 0}}return 0}function powerSort(c,e){var d=c.pwr?c.pwr:0;var g=e.pwr?e.pwr:0;if(d>g){return -1}if(d<g){return 1}if(d==g){if(showRealNames==true){if(c.rnamel>e.rnamel){return 1}if(c.rnamel<e.rnamel){return -1}return 0}else{if(c.namel>e.namel){return 1}if(c.namel<e.namel){return -1}return 0}}return 0}function deviceSort(c,d){if(c.namel>d.namel){return 1}if(c.namel<d.namel){return -1}return 0}function deviceHostSort(c,d){if(c.rnamel>d.rnamel){return 1}if(c.rnamel<d.rnamel){return -1}return 0}function onSearchFocus(a){searchFocus=a}function onMapSearchFocus(a){mapSearchFocus=a}function onUserSearchFocus(a){userSearchFocus=a}function onConsoleFocus(a){consoleFocus=a}function onSearchInputChanged(){var h=Q("SearchInput").value.toLowerCase().trim();putstore("search",h);if(h==""){for(var a in nodes){nodes[a].v=true}}else{try{var c=h.split(/\s+/).join("|"),e=new RegExp(c);for(var a in nodes){nodes[a].v=(e.test(nodes[a].name.toLowerCase()))||(nodes[a].rnamel!=null&&e.test(nodes[a].rnamel.toLowerCase()));if((nodes[a].v==false)&&nodes[a].tags){for(var g in nodes[a].tags){if(e.test(nodes[a].tags[g].toLowerCase())){nodes[a].v=true;break}else{nodes[a].v=false}}}}}catch(b){for(var a in nodes){nodes[a].v=true}}}}var contextelement=null;function handleContextMenu(d){hideContextMenu();var m=(window.pageXOffset!==null)?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft;var n=(window.pageYOffset!==null)?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;var c=document.elementFromPoint(d.pageX-m,d.pageY-n);if(c&&c!=null&&c.id=="MxMESH"){contextelement=c;var b=document.getElementById("meshContextMenu");b.style.left=d.pageX+"px";b.style.top=d.pageY+"px";b.style.display="block"}else{while(c&&c!=null&&c.id!="devs"){c=c.parentElement}if(!c||c==null){return true}contextelement=c;var b=document.getElementById("contextMenu");b.style.left=d.pageX+"px";b.style.top=d.pageY+"px";b.style.display="block"}var l=contextelement.children[1].attributes.onclick.value;var k=getNodeFromId(l.substring(12,l.length-18));var g=meshes[k.meshid];var h=g.links["user/"+domain+"/"+userinfo.name.toLowerCase()];var j=h.rights;var a=((j&16)!=0);var o=((j==4294967295)||((j&512)==0));var e=((j==4294967295)||((j&1024)==0));QV("cxdesktop",((g.mtype==1)||(k.agent==null)||(k.agent.caps==null)||((k.agent.caps&1)!=0)||(k.intelamt&&(k.intelamt.state==2)))&&((j&8)||(j&256)));QV("cxterminal",((g.mtype==1)||(k.agent==null)||(k.agent.caps==null)||((k.agent.caps&2)!=0)||(k.intelamt&&(k.intelamt.state==2)))&&(j&8)&&o);QV("cxfiles",((g.mtype==2)&&((k.agent==null)||(k.agent.caps==null)||((k.agent.caps&4)!=0)))&&(j&8)&&e);QV("cxevents",(k.intelamt!=null)&&((k.intelamt.state==2)||(k.conn&2))&&(j&8));QV("cxconsole",(a&&(g.mtype==2)&&((k.agent==null)||(k.agent.caps==null)||((k.agent.caps&8)!=0)))&&(j&8));return haltEvent(d)}function cmaction(a,b){var c=contextelement.children[1].attributes.onclick.value;c=c.substring(12,c.length-18);if(a==7){Q("viewselect").value=3;Q("viewselect").onchange();Q("autoConnectDesktopCheckbox").checked=true;Q("autoConnectDesktopCheckbox").onclick()}if((a>0)&&(a<7)){var d=[0,10,12,11,13,16,15][a];if(b&&(b.shiftKey==true)){window.open(window.location.origin+"?node="+c.split("/")[2]+"&viewmode="+d+"&hide=16","meshcentral:"+c)}else{gotoDevice(c,d)}}}function cmmeshaction(a){var d=contextelement.attributes.onclick.value.substring(32,(32+69));var b=document.getElementsByClassName("DeviceCheckbox");if(a==1){for(var c=0;c<b.length;c++){if((b[c].attributes)&&(b[c].attributes["class"]["value"].substring(0,69)==d)){b[c].checked=true}}}if(a==2){for(var c=0;c<b.length;c++){if((b[c].attributes)&&(b[c].attributes["class"]["value"].substring(0,69)==d)){b[c].checked=false}}}p1updateInfo()}function hideContextMenu(){QV("contextMenu",false);QV("meshContextMenu",false);contextelement=null}var xxmap={map:null,contextmenu:null,activeInteractions:[],showindex:0,markersSource:null,markersLayer:null,mapLayer:null,mapView:null,};function updateMapMarkers(j){if((xxmap!=null)&&(xxmap.map==null)){try{loadmap()}catch(b){console.error("loadmap() exception",b)}}if(xxmap==null){return}var a=null;for(var d in nodes){try{var g=map_parseNodeLoc(nodes[d]),c=xxmap.markersSource.getFeatureById(nodes[d]._id);if((g!=null)&&((nodes[d].meshid==j)||(j==null))){var e=g[0],h=g[1],k=g[2];if(a==null){a=[e,h,e,h,0]}else{if(e<a[0]){a[0]=e}if(h<a[1]){a[1]=h}if(e>a[2]){a[2]=e}if(h>a[3]){a[3]=h}}if(c==null){addFeature(nodes[d]);a[4]=1}else{updateFeature(nodes[d],c);c.setStyle(markerStyle(nodes[d],g[2]))}}else{if(c){xxmap.markersSource.removeFeature(c)}}}catch(b){console.error("updateMapMarkers() exception",b,JSON.stringify(nodes[d]))}}return a}var map_cm_popup=new ol.Overlay({element:Q("xmap-info-window"),positioning:"bottom-center",stopEvent:false});var map_cm_editMarker={text:"Modify node location",callback:function(a){modifyMarkerloc(a.data)}};var map_cm_clearMarker={text:"Remove node location",callback:function(a){meshserver.send({action:"changedevice",nodeid:a.data.a,userloc:[]})}};var map_cm_saveMarker={text:"Save node location",callback:function(a){saveMarkerloc(a.data)}};var map_cm_nodemenu_items=[{text:"General information",callback:function(a){if(a.data!=null){gotoDevice(a.data,10)}}},{text:"Desktop",callback:function(a){if(a.data!=null){gotoDevice(a.data,11)}}},{text:"Terminal",callback:function(a){if(a.data!=null){gotoDevice(a.data,12)}}},{text:"Intel&reg; AMT",callback:function(a){if(a.data!=null){gotoDevice(a.data,14)}}},"-",{text:"Zoom-in to extent",callback:function(b){var a=b.data.getGeometry().getCoordinates();zoomToLocation(a,19)}},{text:"Zoom-out to extent",callback:function(b){var a=b.data.getGeometry().getCoordinates();zoomToLocation(a,2)}}];var contextmenu_items=[{text:"Refresh",callback:function(){refreshMap(true,true)}},{text:"Zoom to fit extent",callback:function(){zoomToFitExtent()}},{text:"Center map here",callback:function(a){xxmap.mapView.animate({center:a.coordinate})}},{text:"Place node here",callback:function(a){placeNode(a.coordinate)}}];function stringToIntHash(c){var a=0,b;for(b=0;b<c.length;b++){a=((a<<5)-a)+c.charCodeAt(b);a|=0}return a}function map_parseNodeLoc(b){var a=null,c=0;if(b.iploc){a=b.iploc;c=1}if(b.wifiloc){a=b.wifiloc;c=2}if(b.gpsloc){a=b.gpsloc;c=3}if(b.userloc){a=b.userloc;c=4}if((a==null)||(typeof a!="string")){return null}a=a.split(",");if(c==1){return[parseFloat(a[0])+(stringToIntHash(b._id.substring(0,20))/100000000000),parseFloat(a[1])+(stringToIntHash(b._id.substring(20))/100000000000),c]}else{return[parseFloat(a[0]),parseFloat(a[1]),c]}}function loadmap(){if(xxmap==null){return}if((features&32768)==0){QV("viewselectmapoption",false);QV("devViewButton4",false);xxmap=null;return}try{xxmap.markersSource=new ol.source.Vector();xxmap.markersLayer=new ol.layer.Vector({source:xxmap.markersSource});xxmap.mapLayer=new ol.layer.Tile({source:new ol.source.OSM()});xxmap.mapView=new ol.View({center:ol.proj.transform([0,0],"EPSG:4326","EPSG:3857"),zoom:2,minZoom:2,maxZoom:20,extent:ol.proj.transformExtent([-100000,-69.55,100000,69.55],"EPSG:4326","EPSG:3857")});xxmap.map=new ol.Map({target:"xdevicesmap",layers:[xxmap.mapLayer,xxmap.markersLayer],view:xxmap.mapView});xxmap.map.addOverlay(map_cm_popup);xxmap.map.on("click",function(c){var d=xxmap.map.forEachFeatureAtPixel(c.pixel,function(h,j){return h});if(d){var g=d.getId();if(g!=null){gotoDevice(g,10)}else{var e=getCorrespondingFeature(d);gotoDevice(e.getId(),10)}}});xxmap.map.on("pointermove",function(d){var g=xxmap.map.forEachFeatureAtPixel(d.pixel,function(j,k){return j});if(g){xxmap.map.getTargetElement().style.cursor="pointer";var c=g.getGeometry().getCoordinates();map_cm_popup.setPosition(c);var e=g.getId();if(e){QH("xmap-info-window",g.get("name"))}else{var h=getCorrespondingFeature(g);QH("xmap-info-window",h.get("name"))}}else{xxmap.map.getTargetElement().style.cursor="";QH("xmap-info-window","")}});var a=new ContextMenu({width:160,defaultItems:false,items:contextmenu_items});a.on("open",function(c){var e=xxmap.map.forEachFeatureAtPixel(c.pixel,function(h,j){return h});xxmap.contextmenu.clear();if(e){var d=e.getId();if(d){addContextMenuItems(e)}else{var g=getCorrespondingFeature(e);if(g){addContextMenuItems(g)}else{xxmap.contextmenu.extend(contextmenu_items)}}}else{xxmap.contextmenu.extend(contextmenu_items)}});if(xxmap.contextmenu==null){xxmap.contextmenu=a}xxmap.map.addControl(xxmap.contextmenu)}catch(b){console.log(b);QV("viewselectmapoption",false);QV("devViewButton4",false);xxmap=null}}function addFeature(g,c,e){var a=getModifiedFeature(g._id);if(a){xxmap.markersSource.addFeature(a)}else{if(!c&&!e){var d=map_parseNodeLoc(g);c=d[0];e=d[1]}if(e>180){e=180-e;meshserver.send({action:"changedevice",nodeid:g._id,userloc:[c,e]})}if((c<90)&&(c>-90)&&(e<180)&&(e>-180)){var b=new ol.Feature({geometry:new ol.geom.Point(ol.proj.transform([e,c],"EPSG:4326","EPSG:3857")),name:g.name,status:g.conn,lat:c,lon:e});b.setId(g._id);b.setStyle(markerStyle(g));xxmap.markersSource.addFeature(b)}}}function removeFeature(b){var a=xxmap.markersSource.getFeatureById(b._id);if(a){xxmap.markersSource.removeFeature(a)}}function updateFeature(g,a){if(g.conn!=a.get("status")){a.set("status",g.conn);a.setStyle(markerStyle(g))}var c=map_parseNodeLoc(g);if(c!=null){var b=c[0],d=c[1];if((b!=a.get("lat"))||(d!=a.get("lon"))){a.set("lat",b);a.set("lon",d);var e=ol.proj.transform([parseFloat(d),parseFloat(b)],"EPSG:4326","EPSG:3857");a.getGeometry().setCoordinates(e)}}if(g.name!=a.get("name")){a.set("name",g.name)}}function modifyMarkerloc(c){var b=c.getId();if(b){c.setStyle(markerStyle(getNodeFromId(c.a),4));if(!getActiveInteractions(c)){var a=new ol.interaction.Modify({features:new ol.Collection([c]),pixelTolerance:10});xxmap.activeInteractions.push({featureid:b,feature:c,interaction:a});xxmap.map.addInteraction(a)}}}function saveMarkerloc(d){var c=d.getId();if(c){var a=getActiveInteractions(d);if(a){xxmap.map.removeInteraction(a);removeInteraction(c);var b=d.getGeometry().getCoordinates();var e=ol.proj.transform(b,"EPSG:3857","EPSG:4326");if(e[0]>180){e[0]=180-e[0]}var g=[e[1],e[0]];meshserver.send({action:"changedevice",nodeid:c,userloc:g})}}}function markerStyle(b,d){if(d==null){d=0;if(b.iploc){d=1}if(b.wifiloc){d=2}if(b.gpsloc){d=3}if(b.userloc){d=4}}var e=["","-ip","-wifi","-gps","-user"];var a=connStateColor(b);var c=new ol.style.Style({image:new ol.style.Icon({color:a,anchor:[0.5,1],src:"images/mapmarker"+e[d]+".png"})});return[c]}function connStateColor(a){if(a.conn==1||a.conn==3||a.conn==5){return"#00ffdd"}return"#C70039"}function addContextMenuItems(a){if(getActiveInteractions(a)){map_cm_saveMarker.data=a;xxmap.contextmenu.push(map_cm_saveMarker)}else{map_cm_editMarker.data=a;xxmap.contextmenu.push(map_cm_editMarker);var b=getNodeFromId(a.a);if(b.userloc){map_cm_clearMarker.data=a;xxmap.contextmenu.push(map_cm_clearMarker)}}map_cm_nodemenu_items.forEach(function(c){if(c.text=="Zoom-in to extent"||c.text=="Zoom-out to extent"){c.data=a}else{if(c!="-"){c.data=a.getId()}}});xxmap.contextmenu.extend(map_cm_nodemenu_items)}function getActiveInteractions(b){var a=b.getId();for(var c=0;c<xxmap.activeInteractions.length;c++){if(xxmap.activeInteractions[c].featureid==a){return xxmap.activeInteractions[c].interaction}}return false}function getModifiedFeature(a){if(a){for(var b=0;b<xxmap.activeInteractions.length;b++){if(xxmap.activeInteractions[b].featureid==a){return xxmap.activeInteractions[b].feature}}}return null}function removeInteraction(a){var c=-1;for(var b=0;b<xxmap.activeInteractions.length;b++){if(xxmap.activeInteractions[b].featureid===a){c=b;break}}if(c>=0){xxmap.activeInteractions.splice(c,1)}}function getCorrespondingFeature(e){var d=e.getGeometry().getCoordinates();for(var b=0;b<xxmap.activeInteractions.length;b++){var c=xxmap.activeInteractions[b].feature;var a=c.getGeometry().getCoordinates();if(a[0].toFixed(5)==d[0].toFixed(5)&&a[1].toFixed(5)==d[1].toFixed(5)){return c}}return null}function refreshMap(k,h){if(k){xxmap.map.setTarget(null);xxmap.map=null;xxmap.markersSource=null;xxmap.mapView=null;xxmap.mapLayer=null;xxmap.activeInteractions=[]}var a=updateMapMarkers();if((a!=null)&&(h||(a[4]==1))){var b=(a[0]+a[2])/2;var c=(a[1]+a[3])/2;var d=Math.max(Math.abs(a[0]-a[2]),Math.abs(a[1]-a[3]));var l=xxmap.map.getView();l.setCenter(ol.proj.transform([c,b],"EPSG:4326","EPSG:3857"));var e=360,g=-2;while(e>d){g++;e=e/2}l.setZoom(g)}}function placeNode(a){if(xxdialogMode){return}var c='<div style=margin-bottom:6px><label for=selectnode-search>Search</label>&nbsp&nbsp<input type=text placeholder="Device name" id="selectnode-search" onchange=onPlaceNodeInputChange() onkeyup=onPlaceNodeInputChange() autocomplete=off style=width:120px></div><div id=placenode style="height:254px;overflow-y:auto;width:100%;margin:12px 1px 4px 1px;"><div id=noNodesMapPlace style=text-align:center;width:100%;display:none>No devices found.</div>';for(var b in nodes){c+="<div class=noselect id="+nodes[b]._id+"-rowid onclick=selectNodeToPlace(event,'"+nodes[b]._id+"') style=background-color:lightgray;margin-bottom:4px;border-radius:2px><input name=PlaceMapDeviceCheckbox id="+nodes[b]._id+"-checkid type=checkbox style=width:16px;display:inline />";c+="<div class=j"+nodes[b].icon+" style=width:16px;height:16px;margin-top:2px;margin-right:4px;display:inline-block></div><div style=width:16px;display:inline>"+nodes[b].name+"</div></div>"}setDialogMode(2,"Select a node to place",3,placeNodeEx,c+"</div>",a);onPlaceNodeInputChange()}function placeNodeEx(b,c){var d=document.getElementsByName("PlaceMapDeviceCheckbox");for(var g in d){if(d[g].checked){var h=getNodeFromId(d[g].id.substring(0,d[g].id.length-8));if(h){var e=xxmap.markersSource.getFeatureById(g);var j=ol.proj.transform(c,"EPSG:3857","EPSG:4326");var k=[j[1],j[0]];if(e){e.getGeometry().setCoordinates(c);var a=getActiveInteractions(e);if(a){saveMarkerloc(e)}else{meshserver.send({action:"changedevice",nodeid:h._id,userloc:k})}}else{meshserver.send({action:"changedevice",nodeid:h._id,userloc:k})}}}}}function onPlaceNodeInputChange(){updatePlaceNodeTable(Q("selectnode-search").value.trim().toLowerCase())}function updatePlaceNodeTable(d){var b=document.getElementsByName("PlaceMapDeviceCheckbox"),a=0;for(var c in nodes){var e=((nodes[c].namel.indexOf(d)>=0||d=="")||(nodes[c].rnamel!=null&&nodes[c].rnamel.indexOf(d)>=0));if(e){a++}QV(nodes[c]._id+"-rowid",e)}QV("noNodesMapPlace",a==0)}function selectNodeToPlace(b,g){if(b.target.name!="PlaceMapDeviceCheckbox"){var h=Q(g+"-checkid");h.checked=!h.checked}var c=document.getElementsByName("PlaceMapDeviceCheckbox"),a=0;for(var d in c){if(c[d].checked){a++}}QE("idx_dlgOkButton",a>0)}function addMeshOptions(a,b){}function meshOptionRmvMod(a,b){}function meshExists(){for(var a in meshes){if(meshes[a]){return true}}return false}function setMeshView(a){var c=Q("select-mesh");var b=c.selectedIndex;if(c[b].value==a){c[0].selected=true;onSelectMeshChange()}}function clearMeshOptions(){}function getSearchLocation(){try{var b=Q("mapSearchLocation").value.trim();if(b.length>0){var c=new XMLHttpRequest();c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){formatSearchData(c.responseText)}};c.open("GET","https://nominatim.openstreetmap.org/search?q="+b+"&format=json",true);c.send()}}catch(a){}}function formatSearchData(c){try{QH("xmapSearchResults","");var d=JSON.parse(c),b=0,k='<div style="overflow-y:auto;width:100%;max-height:240px">';for(var j=0;j<d.length;j++){if(d[j].display_name&&d[j].boundingbox[0]&&d[j].boundingbox[1]&&d[j].boundingbox[2]&&d[j].boundingbox[3]){b++;var a=(j%2==0)?"F5F5F5":"EBEBEB";k+="<div style=cursor:pointer;padding:5px;background-color:#"+a+" onclick=mapGotoSelectedLocation(this)><div>"+d[j].display_name+"</div><div style=display:none>"+d[j].boundingbox[0]+"!#!"+d[j].boundingbox[1]+"!#!"+d[j].boundingbox[2]+"!#!"+d[j].boundingbox[3]+"</div></div>"}}k+="</div>";if(b==1){var h=[parseFloat(d[0].boundingbox[2]),parseFloat(d[0].boundingbox[0]),parseFloat(d[0].boundingbox[3]),parseFloat(d[0].boundingbox[1])];zoomToExtent(h)}else{if(b==0){k="<div style=width:200px>No location found.<div>"}QV("xmapSearchResultsDlg",true)}QH("xmapSearchResults",k)}catch(g){}}function mapGotoSelectedLocation(c){var d=c.children;var a=d[1].innerHTML.split("!#!");var b=[parseFloat(a[2]),parseFloat(a[0]),parseFloat(a[3]),parseFloat(a[1])];zoomToExtent(b);mapCloseSearchWindow()}function mapCloseSearchWindow(){QH("xmapSearchResults","");QV("xmapSearchResultsDlg",false)}function zoomToLocation(a,c){var b=xxmap.map.getView();b.setCenter(a);b.setZoom(c)}function zoomToFitExtent(){var b=xxmap.markersSource.getFeatures();if(b.length>0){var a=xxmap.markersSource.getExtent();xxmap.map.getView().fit(a,xxmap.map.getSize())}}function zoomToExtent(b){var a=ol.proj.transformExtent(b,ol.proj.get("EPSG:4326"),ol.proj.get("EPSG:3857"));xxmap.map.getView().fit(a,xxmap.map.getSize())}function refreshDevice(a){if(!currentNode||currentNode._id!=a){return}gotoDevice(a,xxcurrentView,true)}function getNodeRights(c){var b=getNodeFromId(c),a=meshes[b.meshid];return a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights}var currentNode;var powerTimelineNode=null;var powerTimelineReq=null;var powerTimelineUpdate=null;var powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(r,t,w,j){if((userinfo.emailVerified!==true)&&(serverinfo.emailcheck==true)&&(userinfo.siteadmin!=4294967295)){setDialogMode(2,"New Device Group",1,null,'Unable to create a new device group until a email address is verified. This is required for password recovery. Go to the "My Account" tab to change and verify an email address.');return}if(j&&(j.shiftKey==true)){window.open(window.location.origin+"?node="+r.split("/")[2]+"&viewmode=10&hide=16","meshcentral:"+r);return}var q=getNodeFromId(r);var n=meshes[q.meshid];var o=n.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if(!currentNode||currentNode._id!=q._id||w==true){currentNode=q;var p=EscapeHtml(q.name);if(p.length==0){p="<i>None</i>"}if((o&4)!=0){p='<span title="Click here to edit the server-side device name" onclick=showEditNodeValueDialog(0) style=cursor:pointer>'+p+' <img class=hoverButton width=10 height=10 src="images/link5.png" /></span>'}QH("p10deviceName",p);QH("p11deviceName",p);QH("p12deviceName",p);QH("p13deviceName",p);QH("p14deviceName",p);QH("p15deviceName","Console - "+p);QH("p16deviceName",p);var B="<table style=width:100%>";B+=addDeviceAttribute('<span title="The name of the device group this computer belong to.">Group</span>','<a title="The name of the device group this computer belong to" onclick=gotoMesh("'+q.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[q.meshid].name)+"</a>");if((q.rname!=null)&&(q.name!=q.rname)){B+=addDeviceAttribute('<span title="The name of this computer as set in the operating system">Name</span>','<span title="The name of this computer as set in the operating system">'+EscapeHtml(q.rname)+"</span>")}if((features&1)==0){if((o&4)!=0){if(q.host){B+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(q.host)+"</span>")}else{B+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>")}}else{B+=addDeviceAttribute("Hostname",EscapeHtml(q.host))}}var h=q.desc?EscapeHtml(q.desc):"<i>None</i>";if((o&4)!=0){B+=addDeviceAttribute("Description","<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+h+' <img class=hoverButton width=10 height=10 src="images/link5.png" /></span>')}else{B+=addDeviceAttribute("Description",h)}var a=["Unknown","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","OSX 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","OSX 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l"];if((q.agent!=null)&&(q.agent.id!=null)&&(q.agent.ver!=null)){var y="";if(q.agent.id<=a.length){y=a[q.agent.id]}else{y=a[0]}if(q.agent.ver!=0){y+=" v"+q.agent.ver}B+=addDeviceAttribute("Mesh Agent",y)}if(q.intelamt!=null){var y="";var v={0:"Not Activated (Pre)",1:"Not Activated (In)",2:"Activated"};if(q.intelamt.ver!=null&&q.intelamt.state==null){y+="<i>Unknown State</i>, v"+q.intelamt.ver}else{if((q.intelamt.ver==null)&&(q.intelamt.state==2)){y+="<i>Activated</i>"}else{if((q.intelamt.ver==null)||(q.intelamt.state==null)){y+="<i>Unknown Version & State</i>"}else{y+=v[q.intelamt.state];if((q.intelamt.state==2)&&q.intelamt.flags){if(q.intelamt.flags&2){y+=' <span title="Intel AMT is activated in Client Control Mode">CCM</span>'}else{if(q.intelamt.flags&4){y+=' <span title="Intel AMT is activated in Admin Control Mode">ACM</span>'}}}y+=(", v"+q.intelamt.ver)}}}if(q.intelamt.tls==1){y+=', <span title="Intel AMT is setup with TLS network security">TLS</span>'}if(q.intelamt.state==2){if(q.intelamt.user==null||q.intelamt.user==""){if((o&4)!=0){y+=', <i style=color:#FF0000;cursor:pointer title="Edit Intel&reg; AMT credentials" onclick=editDeviceAmtSettings("'+q._id+'")>No Credentials</i>'}else{y+=", <i style=color:#FF0000>No Credentials</i>"}}y+=" ";if((o&4)!=0){y+='<img src=images/link4.png height=10 width=10 title="Edit Intel&reg; AMT credentials" style=cursor:pointer onclick=editDeviceAmtSettings("'+q._id+'")>'}}B+=addDeviceAttribute("Intel&reg; AMT",y)}if((q.agent!=null)&&(q.agent.tag!=null)&&(q.agent.tag!="mailto:")){var z=EscapeHtml(q.agent.tag);if(z.startsWith("mailto:")){z='<a href="'+z+'">'+z.substring(7)+"</a>"}B+=addDeviceAttribute("Agent Tag",z)}if(q.osdesc){B+=addDeviceAttribute("Operating System",q.osdesc)}if(q.users&&q.conn&&(q.users.length>0)&&(q.conn&1)){B+=addDeviceAttribute("Active User"+((q.users.length>1)?"s":""),q.users.join(", "))}var d=q.conn;if(d&&d>1){var g=[];if((q.conn&1)!=0){g.push('<span title="Mesh agent is connected and ready for use.">Mesh Agent</span>')}if((q.conn&2)!=0){g.push('<span title="Intel&reg; AMT CIRA is connected and ready for use.">Intel&reg; AMT CIRA</span>')}if((q.conn&4)!=0){g.push('<span title="Intel&reg; AMT is routable and ready for use.">Intel&reg; AMT</span>')}if((q.conn&8)!=0){g.push('<span title="Mesh agent is reachable using another agent as relay.">Mesh Relay</span>')}B+=addDeviceAttribute("Connectivity",g.join(", "))}var l="<i>None</i>";if(q.tags!=null){l="";for(var m in q.tags){l+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+q.tags[m]+"</span>"}}B+=addDeviceAttribute("Tags","<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+l+' <img class=hoverButton width=10 height=10 src="images/link5.png" /></span>');B+="</table><br />";if((o&76)!=0){B+='<input type=button value=Actions title="Perform power actions on the device" onclick=deviceActionFunction() />'}B+='<input type=button value=Notes title="View notes about this device" onclick=showNotes('+((o&128)==0)+',"'+encodeURIComponent(q._id)+'") />';QH("p10html",B);masterUpdate(256);B="<div style=float:right;font-size:x-small>";if((o&4)!=0){B+='&nbsp;<a style=cursor:pointer onclick=p10showChangeGroupDialog(["'+q._id+'"]) title="Move this device to a different device group">Change Group</a>';B+='&nbsp;<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+q._id+'") title="Remove this device">Delete Device</a>'}B+="</div><div style=font-size:x-small>";if(n.mtype==2){B+='<a style=cursor:pointer onclick=p10showNodeNetInfoDialog("'+q._id+'") title="Show device network interface information">Interfaces</a>&nbsp;'}if(xxmap!=null){B+='<a style=cursor:pointer onclick=p10showNodeLocationDialog("'+q._id+'") title="Show device locations information">Location</a>&nbsp;'}if(((o&8)!=0)&&(n.mtype==2)){B+='<a style=cursor:pointer onclick=p10showMeshCmdDialog(1,"'+q._id+'") title="Traffic router used to connect to a device thru this server.">Router</a>&nbsp;'}if(((d&1)!=0)&&(clickOnce==true)&&(n.mtype==2)&&((o&8)!=0)){if((q.agent.id>0)&&(q.agent.id<5)){B+='<a style=cursor:pointer onclick=p10clickOnce("'+q._id+'","RDP2",3389) title="Requires Microsoft ClickOnce support in your browser.">RDP</a>&nbsp;'}if(q.agent.id>4){B+='<a style=cursor:pointer onclick=p10clickOnce("'+q._id+'","PSSH",22) title="Requires Microsoft ClickOnce support in your browser.">Putty</a>&nbsp;';B+='<a style=cursor:pointer onclick=p10clickOnce("'+q._id+'","WSCP",22) title="Requires Microsoft ClickOnce support in your browser.">WinSCP</a>&nbsp;'}}B+="</div><br>";QH("p10html3",B);var u=PowerStateStr(q.state);if((d&1)!=0){if(u.length>0){u+="<br/>"}u+='<span style=font-size:12px title="Agent connected">Agent connected</span>'}if((d&2)!=0){if(u.length>0){u+="<br/>"}u+='<span style=font-size:12px title="Intel&reg; AMT connected">Intel&reg; AMT connected</span>'}if((d&4)!=0){if(u.length>0){u+="<br/>"}u+='<span style=font-size:12px title="Intel&reg; AMT detected">Intel&reg; AMT detected</span>'}if((u=="")&&q.lastconnect){u="<span style=font-size:12px>Last seen:<br />"+new Date(q.lastconnect).toLocaleDateString()+", "+new Date(q.lastconnect).toLocaleTimeString()+"</span>"}QH("MainComputerState",u);Q("MainComputerImage").setAttribute("src","images/icons200-"+q.icon+"-1.jpg");Q("MainComputerImage").className=((!q.conn)||(q.conn==0)?"gray":"");var A=((o==4294967295)||((o&512)==0));var k=((o==4294967295)||((o&1024)==0));var b=((o==4294967295)||((o&2048)==0));if(A){setupTerminal()}if(k){setupFiles()}var e=((o&16)!=0);if(e){setupConsole()}else{if(t==15){t=10}}QV("MainDevDesktop",((n.mtype==1)||(q.agent==null)||(q.agent.caps==null)||((q.agent.caps&1)!=0)||(q.intelamt&&(q.intelamt.state==2)))&&((o&8)||(o&256)));QV("MainDevTerminal",((n.mtype==1)||(q.agent==null)||(q.agent.caps==null)||((q.agent.caps&2)!=0)||(q.intelamt&&(q.intelamt.state==2)))&&(o&8)&&A);QV("MainDevFiles",((n.mtype==2)&&((q.agent==null)||(q.agent.caps==null)||((q.agent.caps&4)!=0)))&&(o&8)&&k);QV("MainDevAmt",(q.intelamt!=null)&&((q.intelamt.state==2)||(q.conn&2))&&(o&8)&&b);QV("MainDevConsole",(e&&(n.mtype==2)&&((q.agent==null)||(q.agent.caps==null)||((q.agent.caps&8)!=0)))&&(o&8));QV("p15uploadCore",(q.agent!=null)&&(q.agent.caps!=null)&&((q.agent.caps&16)!=0));QH("p15coreName",((q.agent!=null)&&(q.agent.core!=null))?q.agent.core:"");var c=Q("p14iframe").contentWindow.getCurrentMeshNode();if((c!=null)&&(c._id!=currentNode._id)){Q("p14iframe").contentWindow.disconnect()}var s=((q.conn&6)!=0)?true:false;Q("p14iframe").contentWindow.setConnectionState(s);Q("p14iframe").contentWindow.setFrameHeight("650px");Q("p14iframe").contentWindow.setAuthCallback(updateAmtCredentials);QV("deskActionsBtn",(o&72)!=0);QV("termActionsBtn",(o&72)!=0);QV("filesActionsBtn",(o&72)!=0);if((powerTimelineNode!=currentNode._id)&&(powerTimelineReq!=currentNode._id)){QH("p10html2","");powerTimelineReq=currentNode._id;meshserver.send({action:"powertimeline",nodeid:currentNode._id});meshserver.send({action:"lastconnect",nodeid:currentNode._id})}QV("DeskTools",false);showDeskToolsProcesses();refreshDeviceEvents();if((currentNode)&&(xxcurrentView>=10)&&(xxcurrentView<20)){document.title="MeshCentral - "+currentNode.name}else{document.title="MeshCentral"}}setupDesktop();if(!t){t=10}go(t)}function showNotes(b,a){if(xxdialogMode){return}setDialogMode(2,"Notes",2,showNotesEx,"<textarea id=d2devNotes ro="+b+" noteid="+a+" readonly style=background-color:#fcf3cf;width:100%;height:200px;resize:none;overflow-y:scroll></textarea><span style=font-size:10px>Notes can be viewed and changed by other administrators.<span>",a);meshserver.send({action:"getNotes",id:decodeURIComponent(a)})}function showNotesEx(a,b){meshserver.send({action:"setNotes",id:decodeURIComponent(b),notes:encodeURIComponent(Q("d2devNotes").value)})}function deviceChat(){if(xxdialogMode){return}var a="/messenger?id=meshmessenger/"+encodeURIComponent(currentNode._id)+"/"+encodeURIComponent(userinfo._id)+"&title="+currentNode.name;if((authCookie!=null)&&(authCookie!="")){a+="&auth="+authCookie}window.open(a,"meshmessenger:"+currentNode._id);meshserver.send({action:"meshmessenger",nodeid:decodeURIComponent(currentNode._id)})}function deviceUrlFunction(){if(xxdialogMode){return}setDialogMode(2,"Open Page on Device",3,deviceUrlFunctionEx,'<input id=d2devurl placeholder="http://server.com" style=width:100%;overflow-y:scroll></input>')}function deviceUrlFunctionEx(){meshserver.send({action:"msg",type:"openUrl",nodeid:currentNode._id,url:Q("d2devurl").value})}function deviceToastFunction(){if(xxdialogMode){return}setDialogMode(2,"Device Notification",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function deviceActionFunction(){if(xxdialogMode){return}var a=meshes[currentNode.meshid].links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;var b="Select an operation to perform on this device.<br /><br />";var c="<select id=d2deviceop style=float:right;width:250px>";if((a&64)!=0){c+="<option value=100>Wake-up</option>"}if((a&8)!=0){c+="<option value=4>Sleep</option><option value=3>Reset</option><option value=2>Power off</option>"}c+="</select>";b+=addHtmlValue("Operation",c);setDialogMode(2,"Device Action",3,deviceActionFunctionEx,b)}function deviceActionFunctionEx(){var a=Q("d2deviceop").value;if(a==100){meshserver.send({action:"wakedevices",nodeids:[currentNode._id]})}else{meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:a})}}function updateAmtCredentials(a){var b=getNodeFromId(currentNode._id);if((a==true)||(b.intelamt.user==null)||(b.intelamt.user=="")){editDeviceAmtSettings(currentNode._id,updateAmtCredentialsEx)}else{Q("p14iframe").contentWindow.connectButtonfunctionEx()}}function updateAmtCredentialsEx(a,b){Q("p14iframe").contentWindow.connectButtonfunctionEx()}function updateDeviceTimeline(){if((meshserver.State!=2)||(powerTimelineNode==null)||(powerTimelineUpdate==null)||(currentNode==null)){return}if((powerTimelineNode==powerTimelineReq)&&(currentNode._id==powerTimelineNode)&&(powerTimelineUpdate<Date.now())){powerTimelineUpdate=null;meshserver.send({action:"powertimeline",nodeid:currentNode._id});meshserver.send({action:"lastconnect",nodeid:currentNode._id})}}function drawDeviceTimeline(){if((currentNode==null)||(xxcurrentView<10)||(xxcurrentView>19)){return}var s=null,o=Date.now();if(currentNode._id==powerTimelineNode){s=powerTimeline}var e=new Date();e.setHours(0,0,0,0);e=new Date(e.getTime()-(1000*60*60*24*6));var u=e.getTime();var t=[];if(s!=null&&s.length>1){t.push([0,s[1],s[0]]);var c=s[1];for(var m=2;m<s.length;m+=2){var p=s[m],k=o;if(s.length>(m+1)){k=s[m+1]}t.push([c,c+k,p]);c=c+k}}var A="",b=1,h=new Date();var w=Q("masthead").offsetWidth-(160+9+9+14);h.setHours(0,0,0,0);for(var m=0;m<7;m++){var g="",q=h.getTime(),l=q+(1000*60*60*24);for(var n in t){var a=t[n];if(isTimeBlockInside(q,l,a[0],a[1])==true){var y=Math.max(q,a[0]);var r=Math.min(Math.min(l,a[1]),o);var z=Math.round(((r-y)*w)/86400000);if(z>0){var v=powerStateStrings2[a[2]]+" from "+new Date(y).toLocaleTimeString()+" to "+new Date(r).toLocaleTimeString()+".";g+='<div title="'+v+'" style=display:table-cell;width:'+z+"px;background-color:"+powerColor(a[2])+";height:16px></div>"}}}A+="<tr style="+(((b%2)==0)?"background-color:#DDD":"")+"><td><div>&nbsp;"+h.toLocaleDateString()+"<div></div></div></td><td><div>"+g+"</div></td></tr>";++b;h=new Date(h.getTime()-(1000*60*60*24))}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:150px>Day</th><th scope=col style=text-align:center>7 Day Power State</th></tr>'+A+"</tbody></table>")}function powerColor(a){if(a<powerColorTable.length){return powerColorTable[a]}return"yellow"}function isTimeBlockInside(d,c,b,a){if((b<d)&&(a>c)){return true}if((b>d)&&(b<c)){return true}if((a>d)&&(a<c)){return true}return false}function addDeviceAttribute(a,b){return"<tr><td class=style7 style=width:180px>"+a+"</td><td class=style9 style=max-width:400px;overflow:hidden>"+b+"</td></tr>"}function editDeviceAmtSettings(e,b){if(xxdialogMode){return}var g="",d=getNodeFromId(e),a=3,c=getNodeRights(e);if((c&4)==0){return}g+=addHtmlValue("Username",'<input id=dp10username style=width:230px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');g+=addHtmlValue("Password","<input id=dp10password type=password style=width:230px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />");g+=addHtmlValue("Security","<select id=dp10tls style=width:236px><option value=0>No TLS security</option><option value=1>TLS security required</option></select>");if((d.intelamt.user!=null)&&(d.intelamt.user!="")){a=7}setDialogMode(2,"Edit Intel&reg; AMT credentials",a,editDeviceAmtSettingsEx,g,{node:d,func:b});if((d.intelamt.user!=null)&&(d.intelamt.user!="")){Q("dp10username").value=d.intelamt.user}else{Q("dp10username").value="admin"}Q("dp10tls").value=d.intelamt.tls;validateDeviceAmtSettings()}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(c,d){if(c==2){meshserver.send({action:"changedevice",nodeid:d.node._id,intelamt:{user:"",pass:""}})}else{var b=Q("dp10username").value;if(b==""){b="admin"}var a=Q("dp10password").value;if(a==""){b=""}meshserver.send({action:"changedevice",nodeid:d.node._id,intelamt:{user:b,pass:a,tls:Q("dp10tls").value}});d.node.intelamt.user=b;d.node.intelamt.tls=Q("dp10tls").value;if(d.func){setTimeout(d.func,300)}}}function p10showChangeGroupDialog(e){if(xxdialogMode){return}var g=null;if(e.length==1){try{g=meshes[getNodeFromId(e[0])]._id}catch(b){}}var j="<select id=p10newGroup style=width:236px>",a=0;for(var c in meshes){var d=meshes[c].links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((meshes[c]._id!=g)&&(d&4)){a++;j+="<option value='"+meshes[c]._id+"'>"+meshes[c].name+"</option>"}}j+="</select>";if(a>0){var h=(e.length==1)?"Select a new group for this device<br /><br />":"Select a new group for selected devices<br /><br />";h+=addHtmlValue("New Device Group",j);setDialogMode(2,"Change Group",3,p10showChangeGroupDialogEx,h,e)}else{setDialogMode(2,"Change Group",1,null,"No other device group of same type exists.")}}function p10showChangeGroupDialogEx(a,c){meshserver.send({action:"changeDeviceMesh",nodeids:c,meshid:Q("p10newGroup").value})}function p10showDeleteNodeDialog(a){if(xxdialogMode){return}var b='Are you sure you want to delete node "'+EscapeHtml(currentNode.name)+'"?<br /><br />';b+="<label><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm</label>";setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,b,a);p10validateDeleteNodeDialog()}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(a,b){meshserver.send({action:"removedevices",nodeids:[b]})}function p10clickOnce(a,c,b){meshserver.send({action:"getcookie",nodeid:a,tcpport:b,tag:"clickonce",protocol:c})}var d2map=null;function p10showNodeLocationDialog(){if((xxdialogMode!=null)&&(xxdialogTag=="@xxmap")){setDialogMode(0)}else{if(xxdialogMode){return}}var m=[],n=["iploc","wifiloc","gpsloc","userloc"],a=null;for(var k in n){if(currentNode[n[k]]!=null){var j=currentNode[n[k]].split(","),h=parseFloat(j[0]),l=parseFloat(j[1]);if((h<90)&&(h>-90)&&(l<180)&&(l>-180)){var e=new ol.Feature({geometry:new ol.geom.Point(ol.proj.fromLonLat([l,h]))});e.setStyle(markerStyle(currentNode,parseInt(k)+1));m.push(e);if(a==null){a=[h,l,h,l,0]}else{if(h<a[0]){a[0]=h}if(l<a[1]){a[1]=l}if(h>a[2]){a[2]=h}if(l>a[3]){a[3]=l}}}}}var p=new ol.source.Vector({features:m});var o=new ol.layer.Vector({source:p});var q="<div id=d2map style=width:100%;height:300px></div>";setDialogMode(2,"Device Location",1,null,q,"@xxmap");var c=0,b=0,r=8;if(a!=null){var b=(a[0]+a[2])/2;var c=(a[1]+a[3])/2;var d=Math.max(Math.abs(a[0]-a[2]),Math.abs(a[1]-a[3]));var g=360,r=-2;while(g>d){r++;g=g/2}}if(m.length==1){r=8}d2map=new ol.Map({target:"d2map",interactions:ol.interaction.defaults({dragPan:false,mouseWheelZoom:false}),layers:[new ol.layer.Tile({source:new ol.source.OSM()}),o],view:new ol.View({center:ol.proj.fromLonLat([c,b]),zoom:r})})}function p10showNodeNetInfoDialog(){if(xxdialogMode){return}setDialogMode(2,"Network Interfaces",1,null,"<div id=d2netinfo>Loading...</div>","if"+currentNode._id);meshserver.send({action:"getnetworkinfo",nodeid:currentNode._id})}function p10showMeshCmdDialog(a,b){if(xxdialogMode){return}var d="<select id=aginsSelect onclick=meshCmdOsClick() style=width:236px>";d+="<option value=3>Windows (32bit)</option>";d+="<option value=4>Windows (64bit)</option>";d+="<option value=5>Linux x86 (32bit)</option>";d+="<option value=6>Linux x86 (64bit)</option>";d+="<option value=25>Linux ARM, Raspberry Pi (32bit)</option>";d+="</select>";var c="";if(a==0){c+="<div>MeshCmd is a command line tool that performs lots of different operations. The action file can optionally be downloaded and edited to provide server information and credentials.<br /><br />"}if(a==1){c+='<div>Download "meshcmd" with an action file to route traffic thru this server to this device. Make sure to edit meshaction.txt and add your account password or make any changes needed.<br /><br />'}c+=addHtmlValue("Operating System",d);c+=addHtmlValue("MeshCmd",'<a id=meshcmddownloadid style=cursor:pointer onclick=fileDownload("meshagents?meshcmd=","MeshCmd",2)></a>');if(a==0){c+=addHtmlValue("Action File",'<a style=cursor:pointer onclick=fileDownload("meshagents?meshaction=generic","MeshAction.txt")>MeshAction (.txt)</a>')}if(a==1){c+=addHtmlValue("Action File",'<a style=cursor:pointer onclick=fileDownload("meshagents?meshaction=route&nodeid='+b+'","MeshAction.txt")>MeshAction (.txt)</a>')}c+="</div>";setDialogMode(2,["Download MeshCmd","Network Router"][a],9,null,c,"fileDownload");meshCmdOsClick()}function meshCmdOsClick(){var a=Q("aginsSelect").value,b="";if(a==3){b="MeshCmd (Win32 executable)"}if(a==4){b="MeshCmd (Win64 executable)"}if(a==5){b="MeshCmd (Linux x86, 32bit)"}if(a==6){b="MeshCmd (Linux x86, 64bit)"}if(a==25){b="MeshCmd (Linux ARM, 32bit)"}QH("meshcmddownloadid",b)}function p10showiconselector(){if(xxdialogMode){return}var a=meshes[currentNode.meshid];var b=a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((b&4)==0){return}var c="<br><div style=display:inline-block;width:40px></div>";c+="<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>";c+="<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>";c+="<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div>";c+="<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>";c+="<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>";c+="<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div><br><br>";setDialogMode(2,"Icon Selection",0,null,c);QV("id_dialogclose",true)}function p10setIcon(a){setDialogMode(0);meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:a})}var showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"];var showEditNodeValueDialog_modes2=["name","host","desc","tags"];var showEditNodeValueDialog_modes3=["","","","Tag1, Tag2, Tag3"];function showEditNodeValueDialog(a){if(xxdialogMode){return}var c=addHtmlValue(showEditNodeValueDialog_modes[a],'<input id=dp10devicevalue style=width:230px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[a]+'" onchange=p10editdevicevalueValidate('+a+",event) onkeyup=p10editdevicevalueValidate("+a+",event) />");setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,c,a);var b=currentNode[showEditNodeValueDialog_modes2[a]];if(b==null){b=""}if(Array.isArray(b)){b=b.join(", ")}Q("dp10devicevalue").value=b;p10editdevicevalueValidate();Q("dp10devicevalue").focus()}function showEditNodeValueDialogEx(a,b){var c={action:"changedevice",nodeid:currentNode._id};c[showEditNodeValueDialog_modes2[b]]=Q("dp10devicevalue").value;meshserver.send(c)}function p10editdevicevalueValidate(b,a){var c=((b>1)||(Q("dp10devicevalue").value.length>0));QE("idx_dlgOkButton",c);if((a!=null)&&(c==true)&&(a.keyCode==13)){dialogclose(1)}}var desktopNode;function setupDesktop(){if((desktopNode!=currentNode)&&(desktop!=null)){desktop.Stop();desktopNode=null;desktop=null}if((desktopNode!=currentNode)||(desktop==null)){var b=multiDesktop[currentNode._id];if(b!=null){QH("DeskParent","");var a=b.m.CanvasId;a.setAttribute("id","Desk");a.setAttribute("style","width:100%;-ms-touch-action:none;margin-left:0px");a.setAttribute("onmousedown","dmousedown(event)");a.setAttribute("onmouseup","dmouseup(event)");a.setAttribute("onmousemove","dmousemove(event)");a.removeAttribute("onclick");Q("DeskParent").appendChild(a);desktop=b;if(desktop.m.SendCompressionLevel){desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate)}desktop.onStateChanged=onDesktopStateChange;desktopNode=currentNode;onDesktopStateChange(desktop,desktop.State);delete multiDesktop[currentNode._id]}else{QH("DeskParent",'<canvas id=Desk width=640 height=480 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');desktopNode=currentNode}Q("Desk").addEventListener("DOMMouseScroll",function(c){return dmousewheel(c)});Q("Desk").addEventListener("mousewheel",function(c){return dmousewheel(c)})}desktopNode=currentNode;updateDesktopButtons();deskAdjust();if(!Q("Desk")["toBlob"]){QV("deskSaveBtn",false)}}function updateDesktopButtons(){var c=meshes[currentNode.meshid];var a=0;if(desktop!=null){a=desktop.State}var d=c.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;QV("disconnectbutton1span",(a!=0));QV("connectbutton1span",(a==0)&&((d&8)||(d&256))&&(c.mtype==2)&&(currentNode.agent.caps&1));QV("connectbutton1hspan",(a==0)&&(d&8)&&((currentNode.intelamt!=null)&&(c.mtype==1||currentNode.intelamt.state==2)&&((currentNode.intelamt.ver!=null)||(c.mtype==1))));QV("d7amtkvm",(currentNode.intelamt!=null&&((currentNode.intelamt.ver!=null)||(c.mtype==1)))&&((a==0)||(desktop.contype==2)));QV("d7meshkvm",(webRtcDesktop)||((c.mtype==2)&&(currentNode.agent.caps&1)&&((a==false)||(desktop.contype==1))));var e=((currentNode.conn&1)!=0);QE("connectbutton1",e);var b=((currentNode.conn&6)!=0);QE("connectbutton1h",b);QE("deskSaveBtn",a==3);QV("deskFocusBtn",(desktop!=null)&&(desktop.contype==2)&&(a!=0)&&(desktopsettings.showfocus));QV("DeskCAD",d&8);QE("DeskCAD",a==3);QE("DeskClip",a==3);QV("DeskWD",(currentNode.agent)&&(currentNode.agent.id<5)&&(d&8));QE("DeskWD",a==3);QV("deskkeys",(currentNode.agent)&&(currentNode.agent.id<5)&&(d&8));QE("deskkeys",a==3);QV("DeskToolsButton",(d&8)&&(c.mtype==2)&&e);QV("DeskChatButton",(browserfullscreen==false)&&(d&8)&&(c.mtype==2)&&e);QV("DeskNotifyButton",(browserfullscreen==false)&&(currentNode.agent)&&(currentNode.agent.id<5)&&(d&8)&&(c.mtype==2)&&e);QV("DeskOpenWebButton",(browserfullscreen==false)&&(d&8)&&(c.mtype==2)&&e);QV("DeskControlSpan",d&8);QV("deskActionsBtn",(browserfullscreen==false));QV("deskActionsSettings",(browserfullscreen==false));if(d&8){Q("DeskControl").checked=(getstore("DeskControl",1)==1)}else{Q("DeskControl").checked=false}if(e==false){QV("DeskTools",false)}}var autoConnectDesktopTimer=null;function autoConnectDesktop(a){if(autoConnectDesktopTimer==null){autoConnectDesktopTimer=setInterval(connectDesktop,100)}else{clearInterval(autoConnectDesktopTimer);autoConnectDesktopTimer=null}}function connectDesktop(b,a){if(desktop==null){desktopNode=currentNode;if(a==2){if((desktopNode.intelamt.user==null)||(desktopNode.intelamt.user=="")){editDeviceAmtSettings(desktopNode._id,connectDesktop);return}desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie);desktop.debugmode=debugmode;desktop.onStateChanged=onDesktopStateChange;desktop.m.bpp=(desktopsettings.encoding==1||desktopsettings.encoding==3)?1:2;desktop.m.useZRLE=(desktopsettings.encoding<3);desktop.m.showmouse=desktopsettings.showmouse;desktop.m.onScreenSizeChange=deskAdjust;desktop.m.onKvmData=function(h){if(h.length==0){if(!desktop.m._sentPresence){desktop.m._sentPresence=true;desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))}return}var d=null;try{d=JSON.parse(h)}catch(g){}if((d!=null)&&(d.action!=null)){if(d.action=="restart"){webRtcDesktopReset();desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))}else{if((d.action=="present")&&(webRtcDesktop==null)){webRtcDesktop={platform:d.platform};var c=null;if(typeof RTCPeerConnection!=="undefined"){webRtcDesktop.webrtc=new RTCPeerConnection(c)}else{if(typeof webkitRTCPeerConnection!=="undefined"){webRtcDesktop.webrtc=new webkitRTCPeerConnection(c)}}webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{});webRtcDesktop.webchannel.onopen=function(){console.log("WebRTC Data Channel Open");Q("deskstatus").textContent=StatusStrs[desktop.State]+", Soft-KVM";desktop.m.hold(true);webRtcDesktop.webRtcActive=true;webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q("id_mainarea")),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);webRtcDesktop.softdesktop.m.onScreenSizeChange=deskAdjust;if(desktopsettings.quality){webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality}if(desktopsettings.scaling){webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling}webRtcDesktop.softdesktop.Start()};webRtcDesktop.webchannel.onclose=function(e){console.log("WebRTC Data Channel Closed");webRtcDesktopReset()};webRtcDesktop.webrtc.onicecandidate=function(j){if(j.candidate==null){desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp}))}else{webRtcDesktop.webrtcoffer.sdp+=("a="+j.candidate.candidate+"\r\n")}};webRtcDesktop.webrtc.oniceconnectionstatechange=function(){if((webRtcDesktop!=null)&&(webRtcDesktop.webrtc!=null)&&((webRtcDesktop.webrtc.iceConnectionState=="disconnected")||(webRtcDesktop.webrtc.iceConnectionState=="failed"))){webRtcDesktopReset()}};webRtcDesktop.webrtc.createOffer(function(e){webRtcDesktop.webrtcoffer=e;webRtcDesktop.webrtc.setLocalDescription(e,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:false,OfferToReceiveVideo:false}})}else{if((d.action=="answer")&&(webRtcDesktop!=null)){webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:d.sdp}),function(){},webRtcDesktopReset)}}}}};desktop.Start(desktopNode._id,16994,"*","*",0);desktop.contype=2}else{desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie);desktop.debugmode=debugmode;desktop.m.debugmode=debugmode;desktop.attemptWebRTC=attemptWebRTC;desktop.onStateChanged=onDesktopStateChange;desktop.m.CompressionLevel=desktopsettings.quality;desktop.m.ScalingLevel=desktopsettings.scaling;desktop.m.FrameRateTimer=desktopsettings.framerate;desktop.m.onDisplayinfo=deskDisplayInfo;desktop.m.onScreenSizeChange=deskAdjust;desktop.Start(desktopNode._id);desktop.contype=1}}else{desktop.Stop();webRtcDesktopReset();desktopNode=desktop=null}}var webRtcDesktop=null;function webRtcDesktopReset(){if(webRtcDesktop==null){return}if(webRtcDesktop.softdesktop!=null){webRtcDesktop.softdesktop.Stop();webRtcDesktop.softdesktop=null}if(webRtcDesktop.webchannel!=null){try{webRtcDesktop.webchannel.close()}catch(a){}webRtcDesktop.webchannel=null}if(webRtcDesktop.webrtc!=null){try{webRtcDesktop.webrtc.close()}catch(a){}webRtcDesktop.webrtc=null}webRtcDesktop=null;if(desktop&&desktop.m){desktop.m.hold(false);Q("deskstatus").textContent=StatusStrs[desktop.State]}}function onDesktopStateChange(c,a){var d=a;if((d==3)&&(c.contype==2)){d++}var b=StatusStrs[d];if((desktop!=null)&&(desktop.webRtcActive==true)){b+=", WebRTC"}QH("deskstatus",b);switch(a){case 0:desktop.Stop();desktopNode=desktop=null;QV("DeskFocus",false);QV("termdisplays",false);deskFocusBtn.value="All Focus";if(fullscreen==true){deskToggleFull()}webRtcDesktopReset();break;case 2:break;default:break}updateDesktopButtons();deskAdjust();setTimeout(deskAdjust,50)}function showDesktopSettings(){if(xxdialogMode){return}applyDesktopSettings();updateDesktopButtons();setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged)}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value;desktopsettings.showfocus=d7showfocus.checked;desktopsettings.showmouse=d7showcursor.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;desktopsettings.framerate=d7framelimiter.value;localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings));applyDesktopSettings();if(desktop){if(desktop.contype==1){if(desktop.State!=0){desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate)}}if(desktop.contype==2){if(desktopsettings.showfocus==false){desktop.m.focusmode=0;deskFocusBtn.value="All Focus"}if(desktop.State!=0){desktop.Stop();setTimeout(function(){connectDesktop(null,2)},50)}}}}function applyDesktopSettings(){var c="",b=(features&512)?[90,80,70,60,50,40,30,20,10,5,1]:[60,50,40,30,20,10,5,1];for(var a in b){c+="<option value="+b[a]+">"+b[a]+"%</option>"}QH("d7bitmapquality",c);d7desktopmode.value=desktopsettings.encoding;d7showfocus.checked=desktopsettings.showfocus;d7showcursor.checked=desktopsettings.showmouse;d7bitmapquality.value=40;if(b.indexOf(parseInt(desktopsettings.quality))>=0){d7bitmapquality.value=desktopsettings.quality}d7bitmapscaling.value=desktopsettings.scaling;if(desktopsettings.framerate){d7framelimiter.value=desktopsettings.framerate}QV("deskFocusBtn",(desktop!=null)&&(desktop.contype==2)&&(desktop.state!=0)&&(desktopsettings.showfocus))}function enterBrowserFullscreen(a){if(a.requestFullscreen){a.requestFullscreen()}else{if(a.msRequestFullscreen){a.msRequestFullscreen()}else{if(a.mozRequestFullScreen){a.mozRequestFullScreen()}else{if(a.webkitRequestFullscreen){a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}}}}}function exitBrowserFullscreen(){if(document.exitFullscreen){document.exitFullscreen()}else{if(document.msExitFullscreen){document.msExitFullscreen()}else{if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else{if(document.webkitExitFullscreen){document.webkitExitFullscreen()}}}}}function isBrowserFullscreen(){if(!document.fullscreenElement&&!document.mozFullScreenElement&&!document.webkitFullscreenElement&&!document.msFullscreenElement){return false}else{return true}}var fullscreen=false;var browserfullscreen=false;function deskToggleFull(a){fullscreen=!fullscreen;QV("mastheadx",!fullscreen);QV("masthead",!fullscreen);QV("topbar",!fullscreen);QV("p11deviceNameHeader",!fullscreen);QV("footer",!fullscreen);QV("column_l_bottomgap",!fullscreen);QV("idx_deskFullBtn2",fullscreen);QV("deskFullBtn",!fullscreen);QV("page_leftbar",!fullscreen);if(fullscreen){if(a.shiftKey==true){enterBrowserFullscreen(Q("deskarea0"));browserfullscreen=true}QS("column_l").width="930px";QS("column_l").height="";QS("column_l")["margin-left"]="";QS("column_l")["overflow-y"]="";QS("container").position="";QS("page_content").position="";QV("MainMenuSpan",true);QS("container").width="100%";QS("container")["border-right"]="0";QS("container")["border-left"]="0";QS("column_l").padding="0";QS("column_l").width="100%";QS("column_l")["max-height"]=""}else{exitBrowserFullscreen();browserfullscreen=false;QS("container").width="960px";QS("container")["border-right"]="1px solid #b7b7b7";QS("container")["border-left"]="1px solid #b7b7b7";QS("column_l").padding="0 15px";QS("column_l").width="930px";toggleFullScreen()}deskAdjust();deskAdjust();updateDesktopButtons()}function deskToggleFocus(){desktop.m.focusmode=(desktop.m.focusmode+64)%192;Q("deskFocusBtn").value=["All Focus","Small Focus","Large Focus"][desktop.m.focusmode/64]}function deskAdjust(){var c=(Math.max(document.documentElement.clientHeight,window.innerHeight||0)-(Q("deskarea1").clientHeight+Q("deskarea2").clientHeight+Q("Desk").clientHeight+Q("deskarea4").clientHeight+2))/2;if(fullscreen){document.documentElement.style.overflow="hidden";QS("deskarea3x").height=null;if(c<0){var a=(Math.max(document.documentElement.clientHeight,window.innerHeight||0)-(Q("deskarea1").clientHeight+Q("deskarea2").clientHeight+Q("deskarea4").clientHeight));var b=9999;if(desktop){b=(desktop.m.width/desktop.m.height)*a}if(webRtcDesktop&&webRtcDesktop.softdesktop){b=(webRtcDesktop.softdesktop.m.width/webRtcDesktop.softdesktop.m.height)*a}QS("Desk")["max-height"]=a+"px";QS("Desk")["max-width"]=b+"px";c=0}else{QS("Desk")["max-height"]=null;QS("Desk")["max-width"]=null}QS("Desk")["margin-top"]=c+"px";QS("Desk")["margin-bottom"]=c+"px"}else{var b=9999,a=(Math.max(document.documentElement.clientHeight,window.innerHeight||0)-(webPageFullScreen?276:290));if(desktop){b=(desktop.m.width/desktop.m.height)*a}if(webRtcDesktop&&webRtcDesktop.softdesktop){b=(webRtcDesktop.softdesktop.m.width/webRtcDesktop.softdesktop.m.height)*a}document.documentElement.style.overflow="auto";QS("Desk")["max-height"]=a+"px";QS("Desk")["max-width"]=b+"px";QS("Desk")["margin-top"]="0";QS("Desk")["margin-bottom"]="0"}}function mdeskAdjust(c,h,g,a){if(!c||!h||!g||!a){return}if(a.id=="Desk"){deskAdjust();return}var k=[{x:180,y:101},{x:302,y:169},{x:454,y:255}][Q("sizeselect").selectedIndex];var e=k.x+2,j=Q("xdevices").clientWidth-30,l=Math.floor(j/e);l=e+Math.floor((j-(l*e))/l);k.y=k.y*(l/k.x);k.x=l;var b=k.y,d=k.x;if(c.State!=0){b=k.y;d=(h/g)*k.y}QS(a.id)["max-height"]=b+"px";QS(a.id)["max-width"]=d+"px";QS(a.id)["margin-top"]="0";QS(a.id)["margin-bottom"]="0"}function deskSendKeys(){if(xxdialogMode||desktop==null||desktop.State!=3){return}var a=Q("deskkeys").value;if(a==0){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==1){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==2){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]])}else{desktop.sendCtrlMsg('{"action":"lock"}')}}else{if(a==3){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==4){if(desktop.contype==2){desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]])}}else{if(a==5){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==6){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]])}}}}}}}}}function showDeskClip(){if(xxdialogMode||desktop==null||desktop.State!=3){return}Q("DeskClip").blur();var a='<input id=dlgClipGet type=button value="Get Clipboard" style=width:120px onclick=showDeskClipGet()>';a+='<input id=dlgClipSet type=button value="Set Clipboard" style=width:120px onclick=showDeskClipSet()>';a+='<div id=dlgClipStatus style="display:inline-block;margin-left:8px" ></div>';a+='<textarea id=d2clipText style="width:100%;height:184px;resize:none" maxlength=65535></textarea>';a+='<input type=button value="Close" style=width:80px;float:right onclick=dialogclose(0)><div style=height:26px>&nbsp;</div>';setDialogMode(2,"Remote Clipboard",8,null,a,"clipboard");Q("d2clipText").focus()}function showDeskClipGet(){if(desktop==null||desktop.State!=3){return}meshserver.send({action:"msg",type:"getclip",nodeid:currentNode._id})}function showDeskClipSet(){if(desktop==null||desktop.State!=3){return}meshserver.send({action:"msg",type:"setclip",nodeid:currentNode._id,data:Q("d2clipText").value})}function sendCAD(){if(xxdialogMode||desktop==null||desktop.State!=3){return}desktop.m.sendcad()}function toggleDeskTools(){if(xxdialogMode){return}if(QS("DeskTools").display=="none"){QV("DeskTools",true);Q("DeskTools").nodeid=currentNode._id;refreshDeskTools()}else{QV("DeskTools",false)}}function refreshDeskTools(){QV("DeskToolsRefreshButton",false);setTimeout(refreshDeskToolsEx,500);meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",true)}var deskTools={sort:1,msg:null};function sortProcess(a){deskTools.sort=a;showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(c,d){if(c.p>d.p){return 1}if(c.p<d.p){return(-1)}return 0}function sortProcessName(c,d){if(c.d>d.d){return 1}if(c.d<d.d){return(-1)}return 0}function showDeskToolsProcesses(c){deskTools.msg=c;if(c==null){QH("DeskToolsProcesses","");return}if(Q("DeskTools").nodeid!=c.nodeid){return}var d=[],h=null;try{h=JSON.parse(c.value)}catch(a){}if(h!=null){for(var g in h){d.push({p:parseInt(g),c:h[g].cmd,d:h[g].cmd.toLowerCase(),u:h[g].user})}if(deskTools.sort==0){d.sort(sortProcessPid)}else{if(deskTools.sort==1){d.sort(sortProcessName)}}var j="";for(var b in d){if(d[b].p!=0){j+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+d[b].p+'</div><a style=float:right;padding-right:5px;cursor:pointer title="Stop process" onclick=stopProcess('+d[b].p+',"'+d[b].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(d[b].u?d[b].u:"")+"</div><div>"+d[b].c+"</div></div>"}}QH("DeskToolsProcesses",j)}}function toggleKvmControl(){putstore("DeskControl",(Q("DeskControl").checked?1:0))}function deskSaveImage(){if(xxdialogMode||desktop==null||desktop.State!=3){return}var a=new Date(),b="Desktop-"+currentNode.name+"-"+a.getFullYear()+"-"+("0"+(a.getMonth()+1)).slice(-2)+"-"+("0"+a.getDate()).slice(-2)+"-"+("0"+a.getHours()).slice(-2)+"-"+("0"+a.getMinutes()).slice(-2);Q("Desk")["toBlob"](function(c){saveAs(c,b+".jpg")})}function deskDisplayInfo(e,a,c,d){var g=Q("termdisplays").value;if(a.length>0){var b="";for(var h in a){b+="<option"+((g==a[h])?" selected":"")+">"+a[h]+"</option>"}QH("termdisplays",b)}QV("termdisplays",a.length>0)}function deskGetDisplayNumbers(a){desktop.m.GetDisplayNumbers()}function deskSetDisplay(b){var a=0,c=Q("termdisplays").value;if(c=="All Displays"){a=65535}else{a=parseInt(c.substring(8))}desktop.m.SetDisplay(a)}var dblClickDetectArgs={t:0,x:0,y:0};function dblClickDetect(a){if(a.buttons!=1){return}var b=Date.now();if(((b-dblClickDetectArgs.t)<250)&&(Math.abs(a.clientX-dblClickDetectArgs.x)<2)&&(Math.abs(a.clientY-dblClickDetectArgs.y)<2)){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousedblclick(a);desktop.m.sendKeepAlive()}else{desktop.m.mousedblclick(a)}}}dblClickDetectArgs.t=b;dblClickDetectArgs.x=a.clientX;dblClickDetectArgs.y=a.clientY}function dmousedown(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousedown(a);desktop.m.sendKeepAlive()}else{desktop.m.mousedown(a)}}dblClickDetect(a)}function dmouseup(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mouseup(a);desktop.m.sendKeepAlive()}else{desktop.m.mouseup(a)}}}function dmousemove(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousemove(a);desktop.m.sendKeepAlive()}else{desktop.m.mousemove(a)}}}function dmousewheel(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousewheel(a);desktop.m.sendKeepAlive()}else{if(desktop.m.mousewheel){desktop.m.mousewheel(a)}}haltEvent(a);return true}return false}function drotate(a){if(!xxdialogMode&&desktop!=null){desktop.m.setRotation(desktop.m.rotation+a);deskAdjust();deskAdjust()}}function stopProcess(a,b){setDialogMode(2,"Process Control",3,stopProcessEx,"Stop process #"+a+' "'+b+'"?',a)}function stopProcessEx(a,b){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:b});setTimeout(refreshDeskTools,300)}var terminalNode;function setupTerminal(){if((terminalNode!=currentNode)&&(terminal!=null)){terminal.Stop();terminal=null}terminalNode=currentNode;updateTerminalButtons()}function updateTerminalButtons(){var b=meshes[terminalNode.meshid];var d=((terminal!=null)&&(terminal.state!=0));QV("disconnectbutton2span",(d==true));QV("connectbutton2span",(d==false)&&(b.mtype==2)&&(currentNode.agent.caps&2));QV("connectbutton2hspan",(d==false)&&((terminalNode.intelamt!=null)&&(b.mtype==1||terminalNode.intelamt.state==2)&&((terminalNode.intelamt.ver!=null)||(b.mtype==1))));var c=((terminalNode.conn&1)!=0);QE("connectbutton2",c);var a=((terminalNode.conn&6)!=0);QE("connectbutton2h",a);QE("ctrlcbutton",d);QE("ctrlxbutton",d);QE("escbutton",d);QE("bsbutton",d);QE("pastebutton",d);QE("specialkeylist",d);QE("specialkeylistinput",d);QV("terminalSettingsButtons",(terminal)&&(terminal.contype==2));if(terminal){Q("id_ttypebutton").value=terminalEmulations[terminal.m.terminalEmulation];Q("id_tfxkeysbutton").value=fxEmulations[terminal.m.fxEmulation];Q("id_tcrbutton").value=(terminal.m.lineFeed=="\r\n")?"CR+LF":"LF"}}function onTerminalStateChange(d,a){var c=a;if((c==3)&&(d.contype==2)){c++}var b=StatusStrs[c];if(terminal.webRtcActive==true){b+=", WebRTC"}QH("termstatus",b);switch(a){case 0:d.m.TermResetScreen();d.m.TermDraw();if(terminal!=null){terminal.Stop();terminal=null}break;case 3:break;default:break}updateTerminalButtons()}var autoConnectTerminalTimer=null;function autoConnectTerminal(a){if(autoConnectTerminalTimer==null){autoConnectTerminalTimer=setInterval(connectTerminal,100)}else{clearInterval(autoConnectTerminalTimer);autoConnectTerminalTimer=null}}function connectTerminal(b,a){if(!terminal){if(a==2){if((terminalNode.intelamt.user==null)||(terminalNode.intelamt.user=="")){editDeviceAmtSettings(terminalNode._id,connectTerminal);return}terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"),authCookie);terminal.debugmode=debugmode;terminal.m.debugmode=debugmode;terminal.onStateChanged=onTerminalStateChange;terminal.Start(terminalNode._id,16994,"*","*",0);terminal.contype=2;Q("id_ttypebutton").value=terminalEmulations[terminal.m.terminalEmulation]}else{terminal=CreateAgentRedirect(meshserver,CreateAmtRemoteTerminal("Term"),serverPublicNamePort,authCookie);terminal.debugmode=debugmode;terminal.m.debugmode=debugmode;terminal.m.lineFeed=([1,2,3,4,21,22].indexOf(currentNode.agent.id)>=0)?"\r\n":"\n";terminal.attemptWebRTC=attemptWebRTC;terminal.onStateChanged=onTerminalStateChange;terminal.Start(terminalNode._id);terminal.contype=1;terminal.m.terminalEmulation=0;terminal.m.fxEmulation=0;Q("id_ttypebutton").value=terminalEmulations[0]}}else{terminal.Stop();terminal=null}Q("connectbutton2").blur()}var terminalEmulations=["UTF8 Terminal","Extended ASCII","Intel ASCII"];function termToggleType(){if(!terminal||xxdialogMode){return}terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q("id_ttypebutton").value=terminalEmulations[terminal.m.terminalEmulation];Q("id_ttypebutton").blur()}var fxEmulations=["Intel (F10 = ESC+[OM)","Alternate (F10 = ESC+0)","VT100+ (F10 = ESC+[OY)"];function termToggleFx(){if(!terminal||xxdialogMode){return}terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3;Q("id_tfxkeysbutton").value=fxEmulations[terminal.m.fxEmulation];Q("id_tfxkeysbutton").blur()}function termToggleCr(){if(!terminal||xxdialogMode){return}if(terminal.m.lineFeed=="\n"){terminal.m.lineFeed="\r\n"}else{terminal.m.lineFeed="\n"}Q("id_tcrbutton").value=(terminal.m.lineFeed=="\r\n")?"CR+LF":"LF"}function termSendKey(b,a){if(!terminal||xxdialogMode){return}terminal.m.TermSendKey(b);Q(a).blur()}function showTermPasteDialog(){if(!terminal||xxdialogMode){return}Q("pastebutton").blur();setDialogMode(2,"Paste",3,showTermPasteDialogEx,'<textarea id=d2pasteText style="width:100%;height:184px;resize:none"></textarea>');Q("d2pasteText").focus()}function showTermPasteDialogEx(){if(!terminal){return}terminal.m.TermSendKeys(Q("d2pasteText").value)}function sendSpecialKey(){terminal.m.TermSendKey(Q("specialkeylist").value);Q("specialkeylist").blur();Q("specialkeylistinput").blur()}var filesNode;function setupFiles(){var b=(filesNode==currentNode);filesNode=currentNode;var a=((filesNode.conn&1)!=0)?true:false;QE("p13Connect",a);if(((b==false)||(a==false))&&files){files.Stop();files=null}}function onFilesStateChange(c,a){p13Connect.value=(a==0)?"Connect":"Disconnect";var b=StatusStrs[a];if(files.webRtcActive==true){b+=", WebRTC"}Q("p13Status").textContent=b;switch(a){case 0:QH("p13files","");p13filetree=null;p13filetreelocation=[];QH("p13currentpath","");QE("p13FolderUp",false);p13setActions();if(files!=null){files.Stop();files=null}break;case 3:p13targetpath="";files.sendText({action:"ls",reqid:1,path:""});break;default:break}}function CreateRemoteFiles(b){var a={protocol:5};a.onFileUpdate=b;a.xxStateChange=function(c){};a.ProcessData=function(c){a.onFileUpdate(c)};return a}var autoConnectFilesTimer=null;function autoConnectFiles(a){if(autoConnectFilesTimer==null){autoConnectFilesTimer=setInterval(connectFiles,100)}else{clearInterval(autoConnectFilesTimer);autoConnectFilesTimer=null}}function connectFiles(a){if(!files){files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie);files.attemptWebRTC=attemptWebRTC;files.onStateChanged=onFilesStateChange;files.Start(filesNode._id)}else{files.Stop();files=null}p13clipboard=p13clipboardFolder=null;p13clipboardCut=0;p13updateClipview()}var p13filetree=null;var p13targetpath=null;var p13filetreelocation=[];function p13gotFiles(b){if((b.length>0)&&(b.charCodeAt(0)!=123)){p13gotDownloadBinaryData(b);return}b=JSON.parse(decode_utf8(b));if(b.action=="download"){p13gotDownloadCommand(b);return}b.path=b.path.replace(/\//g,"\\");if((p13filetree!=null)&&(b.path==p13filetree.path)){var a=p13getCheckedNames();p13filetree=b;p13updateFiles(a)}else{var c=b.path.replace(/\//g,"\\"),d=p13targetpath.replace(/\//g,"\\");while((c.length>0)&&(c[0]=="\\")){c=c.substring(1)}while((d.length>0)&&(d[0]=="\\")){d=d.substring(1)}if((c==d)||((b.path=="\\")&&(p13targetpath==""))){p13filetree=b;p13updateFiles()}}}function p13getCheckedNames(){var b=[],a=document.getElementsByName("fd");for(var c=0;c<a.length;c++){if(a[c].checked){b.push(p13filetree.dir[a[c].value].n)}}return b}function p13updateFiles(b){var n="",o="",c="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",l="Root";var w=p13filetree.path.split("\\");p13filetreelocation=[];for(var p in w){if(w[p]!=""){p13filetreelocation.push(w[p])}}for(var p in p13filetreelocation){c+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(p)+1)+")>"+p13filetreelocation[p]+"</a>"}var s=p13filetreelocation.join("/");var j=p13sort_files(p13filetree.dir);for(var p in j){var d=j[p],r=d.n,u;u=r;if(r.length>70){u='<span title="'+EscapeHtml(r)+'">'+EscapeHtml(r.substring(0,70))+"...</span>"}else{u=EscapeHtml(r)}r=EscapeHtml(r);var g="";if(d.d!=null){var e=new Date(d.d),g=(e.getMonth()+1)+"/"+(e.getDate())+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;"}var k="";if(d.s!=null){k=getFileSizeStr(d.s)}var m="";if(d.t<3){var t="",v="";m="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right title=\""+v+'">'+t+"</span><span><div class=fileIcon"+d.t+' onclick=p13folderset("'+encodeURIComponent(d.nx)+'")></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+u+"</a></span></div>"}else{var q=u;if(d.s>0){q='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+r)+"','"+encodeURIComponent(r)+"',"+d.s+')">'+u+"</a>"}m="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span class=fsize>"+g+"</span><span style=float:right>"+k+"</span><span><div class=fileIcon"+d.t+"></div>"+q+"</span></div>"}if(d.t<3){n+=m}else{o+=m}}QH("p13files",n+o);QH("p13currentpath",c);QE("p13FolderUp",p13filetreelocation.length!=0);if(b!=null){var a=document.getElementsByName("fd");for(var p=0;p<a.length;p++){if(b.indexOf(p13filetree.dir[a[p].value].n)>=0){a[p].checked=true}}}p13setActions()}function p13folderset(a){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[a].n).split("\\").join("/");files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(a){if(a==null){p13filetreelocation.pop()}else{while(p13filetreelocation.length>a){p13filetreelocation.pop()}}p13targetpath=p13filetreelocation.join("/");files.sendText({action:"ls",reqid:1,path:p13targetpath})}var p13sortorder;function p13sort_filename(c,d){if(c.ln>d.ln){return(1*p13sortorder)}if(c.ln<d.ln){return(-1*p13sortorder)}return 0}function p13sort_timestamp(c,d){if(c.d>d.d){return(1*p13sortorder)}if(c.d<d.d){return(-1*p13sortorder)}return 0}function p13sort_bysize(c,d){if(c.s==d.s){return p13sort_filename(c,d)}return(((c.s-d.s))*p13sortorder)}function p13sort_files(a){var c=[],d=Q("p13sortdropdown").value;for(var b in a){a[b].nx=b;if(a[b].s==null){a[b].s=0}if(a[b].n==null){a[b].n=b}a[b].ln=a[b].n.toLowerCase();c.push(a[b])}p13sortorder=1;if(d>3){p13sortorder=-1;d-=3}if(d==1){c.sort(p13sort_filename)}else{if(d==2){c.sort(p13sort_bysize)}else{if(d==3){c.sort(p13sort_timestamp)}}}return c}function p13setActions(){if(p13filetree==null){QE("p13DeleteFileButton",false);QE("p13NewFolderButton",false);QE("p13UploadButton",false);QE("p13RenameFileButton",false);QE("p13SelectAllButton",false);Q("p13SelectAllButton").value="Select All";QE("p13RefreshButton",false);QE("p13CutButton",false);QE("p13CopyButton",false);QE("p13PasteButton",false)}else{var a=p13getFileSelCount(),c=p13getFileCount(),b=p13getFileSelCount(false);var d=((currentNode.agent.id>0)&&(currentNode.agent.id<5));QE("p13DeleteFileButton",(a>0)&&((p13filetreelocation.length>0)||(d==false)));QE("p13NewFolderButton",((p13filetreelocation.length>0)||(d==false)));QE("p13UploadButton",((p13filetreelocation.length>0)||(d==false)));QE("p13RenameFileButton",(a==1)&&((p13filetreelocation.length>0)||(d==false)));QE("p13SelectAllButton",c>0);Q("p13SelectAllButton").value=(a>0?"Select None":"Select All");QE("p13RefreshButton",true);QE("p13CutButton",(a>0)&&(a==b)&&((p13filetreelocation.length>0)||(d==false)));QE("p13CopyButton",(a>0)&&(a==b)&&((p13filetreelocation.length>0)||(d==false)));QE("p13PasteButton",((p13filetreelocation.length>0)||(d==false))&&((p13clipboard!=null)&&(p13clipboard.length>0)))}}function p13getFileSelCount(d){var a=0;var b=document.getElementsByName("fd");for(var c=0;c<b.length;c++){if((b[c].checked)&&((d!=false)||(b[c].attributes.file.value=="3"))){a++}}return a}function p13getFileSelDirCount(){var a=0,b=document.getElementsByName("fd");for(var c=0;c<b.length;c++){if((b[c].checked)&&(b[c].attributes.file.value=="999")){a++}}return a}function p13getFileCount(){var a=0;var b=document.getElementsByName("fd");return b.length}function p13selectallfile(){var c=(p13getFileSelCount()==0),a=document.getElementsByName("fd");for(var b=0;b<a.length;b++){a[b].checked=c}p13setActions()}function p13createfolder(){setDialogMode(2,"New Folder",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />");focusTextBox("p13renameinput");p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value});p13folderup(999)}function p13deletefile(){var a=p13getFileSelCount(),b=(p13getFileSelDirCount()>0)?"<br /><br /><input type=checkbox id=p13recdeleteinput>Recursive delete<br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,(a>1)?("Delete "+a+" selected items?"+b):("Delete selected item?"+b))}function p13deletefileEx(){var b=[],a=document.getElementsByName("fd");for(var c=0;c<a.length;c++){if(a[c].checked){b.push(p13filetree.dir[a[c].value].n)}}files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:b,rec:Q("p13recdeleteinput").checked});p13folderup(999)}function p13renamefile(){var c,a=document.getElementsByName("fd");for(var b=0;b<a.length;b++){if(a[b].checked){c=p13filetree.dir[a[b].value].n}}setDialogMode(2,"Rename",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+c+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:c});focusTextBox("p13renameinput");p13fileNameCheck()}function p13renamefileEx(a,c){c.newname=Q("p13renameinput").value;files.sendText(c);p13folderup(999)}function p13fileNameCheck(a){var b=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",b);if((b==true)&&(a!=null)&&(a.keyCode==13)){dialogclose(1)}}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />");updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}var p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(b){var a=document.getElementsByName("fd");p13clipboard=[];p13clipboardCut=b,p13clipboardFolder=p13targetpath;for(var c=0;c<a.length;c++){if((a[c].checked)&&(a[c].attributes.file.value=="3")){p13clipboard.push(p13filetree.dir[a[c].value].n)}}p13updateClipview()}function p13pasteFile(){var a="";if((p13clipboard!=null)&&(p13clipboard.length>0)){a="Confim "+(p13clipboardCut==0?"copy":"move")+" of "+p13clipboard.length+" entrie"+((p13clipboard.length>1)?"s":"")+" to this location?"}setDialogMode(2,"Paste",3,p13pasteFileEx,a)}function p13pasteFileEx(){files.sendText({action:(p13clipboardCut==0?"copy":"move"),reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard});p13folderup(999);if(p13clipboardCut==1){p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;p13updateClipview()}}function p13updateClipview(){var a="";if((p13clipboard!=null)&&(p13clipboard.length>0)){a="Holding "+p13clipboard.length+" entrie"+((p13clipboard.length>1)?"s":"")+" for "+(p13clipboardCut==0?"copy":"move")+", <a onclick=p13clearClip() style=cursor:pointer>Clear</a>."}QH("p13bottomstatus",a);p13setActions()}function p13clearClip(){p13clipboard=null;p13clipboardFolder=null;p13clipboardCut=0;p13updateClipview()}function p13fileDragDrop(a){haltEvent(a);QV("p13bigfail",false);QV("p13bigok",false);if(a.dataTransfer==null||a.dataTransfer.files.length==0||p13filetree==null){return}p13doUploadFiles(a.dataTransfer.files)}var p13dragtimer=null;function p13fileDragOver(b){haltEvent(b);if(p13dragtimer!=null){clearTimeout(p13dragtimer);p13dragtimer=null}var a=(p13filetree!=null);QV("p13bigok",a);QV("p13bigfail",!a)}function p13fileDragLeave(a){haltEvent(a);if(a.target.id!="p13filetable"){QV("p13bigfail",false);QV("p13bigok",false)}else{p13dragtimer=setTimeout(function(){QV("p13bigfail",false);QV("p13bigok",false);p13dragtimer=null},10)}}var downloadFile;function p13downloadfile(a,b,c){if(xxdialogMode||downloadFile||!files){return}downloadFile={path:decodeURIComponent(a),file:decodeURIComponent(b),size:c,tsize:0,data:"",state:0,id:Math.random()};files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path});setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+c+" />")}function p13downloadFileCancel(){setDialogMode(0);files.sendText({action:"download",sub:"cancel",id:downloadFile.id});downloadFile=null}function p13gotDownloadCommand(a){if((downloadFile==null)||(a.id!=downloadFile.id)){return}if(a.sub=="start"){downloadFile.state=1;files.sendText({action:"download",sub:"startack",id:downloadFile.id})}else{if(a.sub=="cancel"){downloadFile=null;setDialogMode(0)}}}function p13gotDownloadBinaryData(a){if(!downloadFile||downloadFile.state==0){return}if(a.length>4){downloadFile.tsize+=(a.length-4);downloadFile.data+=a.substring(4);Q("d2progressBar").value=downloadFile.tsize}if((ReadInt(a,0)&1)!=0){saveAs(data2blob(downloadFile.data),downloadFile.file);downloadFile=null;setDialogMode(0)}else{files.sendText({action:"download",sub:"ack",id:downloadFile.id})}}var uploadFile;function p13doUploadFiles(a){if(xxdialogMode){return}uploadFile={};uploadFile.xpath=p13filetreelocation.join("/");uploadFile.xfiles=a;uploadFile.xfilePtr=-1;setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />");p13uploadReconnect()}function onFileUploadStateChange(b,a){switch(a){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",a);break}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie);uploadFile.ws.attemptWebRTC=false;uploadFile.ws.ctrlMsgAllowed=false;uploadFile.ws.onStateChanged=onFileUploadStateChange;uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){uploadFile.xfilePtr++;if(uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var a=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",a.name);Q("d2progressBar").max=a.size;Q("d2progressBar").value=0;uploadFile.xreader=new FileReader();uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result;uploadFile.ws.sendText(JSON.stringify({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:a.name,size:uploadFile.xdata.byteLength}))};uploadFile.xreader.readAsArrayBuffer(a)}else{p13uploadFileCancel()}}function p13uploadFileCancel(a,b){if(uploadFile!=null){if(uploadFile.ws!=null){uploadFile.ws.Stop();uploadFile.ws=null}uploadFile=null}setDialogMode(0)}function p13gotUploadData(b){var a=JSON.parse(b);if((uploadFile==null)||(parseInt(uploadFile.xfilePtr)!=parseInt(a.reqid))){return}if(a.action=="uploadstart"){p13uploadNextPart(false);for(var c=0;c<8;c++){p13uploadNextPart(true)}}else{if(a.action=="uploadack"){p13uploadNextPart(false)}else{if(a.action=="uploaderror"){p13uploadFileCancel()}}}}function p13uploadNextPart(c){var a=uploadFile.xdata;var e=uploadFile.xptr;var d=uploadFile.xptr+4096;if(d>a.byteLength){if(c==true){return}d=a.byteLength}if(e==a.byteLength){if(uploadFile.ws!=null){uploadFile.ws.Stop();uploadFile.ws=null}if(uploadFile.xfiles.length>uploadFile.xfilePtr+1){p13uploadReconnect()}else{p13uploadFileCancel()}}else{var b=a.slice(e,d);uploadFile.ws.send(b);uploadFile.xptr=d;Q("d2progressBar").value=d}}var currentDeviceEvents=null;function deviceEventsUpdate(){var h="",a=null;for(var c in currentDeviceEvents){var b=currentDeviceEvents[c];var g=new Date(b.time);if(g.toLocaleDateString()!=a){if(a!=null){h+="</table>"}h+="<table style=width:100% cellpadding=0 cellspacing=0><tr><td class=DevSt colspan=4>"+g.toLocaleDateString()+"</td></tr>";a=g.toLocaleDateString()}var d="si3";if(b.etype=="user"){d="m2"}if(b.etype=="server"){d="si3"}var e=b.msg.split("(R)").join("&reg;");h+="<tr><td style=width:18px><div class="+d+"></div></td><td class=g1 style=float:none>&nbsp;</td><td style=background-color:#C9C9C9>"+g.toLocaleTimeString()+" - "+e+"</td><td class=g2 style=float:none>&nbsp;</td></tr><tr style=height:2px></tr>"}if(a!=null){h+="</table>"}if(h==""){h="<br><i>No Events Found</i><br><br>"}QH("p16events",h)}function refreshDeviceEvents(){meshserver.send({action:"events",nodeid:currentNode._id,limit:parseInt(p16limitdropdown.value)})}function agentConsoleHandleKeys(b){if((b.ctrlKey)||(b.altKey)){return true}var d=0,a=Q("p15consoleText");if(b.key){if(b.keyCode==13&&consoleFocus==0){p15consoleSend(b);d=1}else{if(b.keyCode==8&&consoleFocus==0){var g=a.value;a.value=g.substring(0,g.length-1);d=1}else{if(b.keyCode==27){a.value="";d=1}else{if((b.keyCode==38)||(b.keyCode==40)){var c=consoleHistory.indexOf(a.value);if((b.keyCode==38)&&((consoleHistory.length-1)>c)){a.value=consoleHistory[c+1]}else{if((b.keyCode==40)&&(c>0)){a.value=consoleHistory[c-1]}else{if((b.keyCode==40)&&(c==0)){a.value=""}}}d=1}else{if(b.key.length===1){insertTextAtCursor(a,b.key);d=1}}}}}}else{if(b.charCode!=0&&consoleFocus==0){a.value=((a.value+String.fromCharCode(b.charCode)));d=1}}if(d>0){return haltEvent(b)}}function insertTextAtCursor(a,d){if(document.selection){a.focus();sel=document.selection.createRange();sel.text=d}else{if(a.selectionStart||a.selectionStart=="0"){var c=a.selectionStart,b=a.selectionEnd;a.value=a.value.substring(0,c)+d+a.value.substring(b,a.value.length);a.setSelectionRange(b+1,b+1)}else{a.value+=myValue}}}var consoleNode;var consoleServerText="";function setupConsole(){if(xxcurrentView==115){var d=(consoleNode=="server");consoleNode="server";QH("p15deviceName","My Server Console");QE("p15consoleText",true);QH("p15statetext","");QH("p15coreName","");if(d==false){QH("p15agentConsoleText",consoleServerText);Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}}else{var d=(consoleNode==currentNode);consoleNode=currentNode;var a=meshes[consoleNode.meshid];var b=a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((b&16)!=0){if(consoleNode.consoleText==null){consoleNode.consoleText=""}if(d==false){QH("p15agentConsoleText",consoleNode.consoleText);Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}var c=((consoleNode.conn&1)!=0)?true:false;QH("p15statetext",c?"Agent is online":"Agent is offline");QE("p15consoleText",c);QE("p15uploadCore",c)}else{QH("p15statetext","Access Denied");QE("p15consoleText",false);QE("p15uploadCore",false)}}}function p15consoleClear(){QH("p15agentConsoleText","");Q("id_p15consoleClear").blur();if(xxcurrentView==115){consoleServerText=""}else{consoleNode.consoleText=""}}var consoleHistory=[];function p15consoleSend(a){if(a&&a.keyCode!=13){return}var d=Q("p15consoleText").value,c="<div style=color:green>&gt; "+EscapeHtml(Q("p15consoleText").value)+"<br/></div>";Q("p15agentConsoleText").innerHTML+=c;Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight;Q("p15consoleText").value="";if(xxcurrentView==115){consoleServerText+=c;meshserver.send({action:"serverconsole",value:d})}else{consoleNode.consoleText+=c;meshserver.send({action:"msg",type:"console",nodeid:consoleNode._id,value:d})}if(d.length>0){var b=consoleHistory.indexOf(d);if(b>=0){consoleHistory.splice(b,1)}consoleHistory.unshift(d);consoleHistory.splice(10)}}function p15consoleReceive(b,a){a="<div>"+a+"</div>";if(b==="serverconsole"){consoleServerText+=a;if(consoleNode=="server"){Q("p15agentConsoleText").innerHTML+=a;Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}}else{if(b.consoleText==null){b.consoleText=a}else{b.consoleText+=a}if(consoleNode==b){Q("p15agentConsoleText").innerHTML+=a;Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}}}function p15uploadCore(a){if(xxdialogMode){return}if(a.shiftKey==true){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"default"})}else{if(a.altKey==true){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"clear"})}else{if(a.ctrlKey==true){p15uploadCore2()}else{setDialogMode(2,"Change Mesh Agent Core",3,p15uploadCoreEx,"<select id=d3coreMode style=float:right;width:260px><option value=1>Upload default server core</option><option value=2>Clear the core</option><option value=6>Upload recovery core</option><option value=3>Upload a core file</option><option value=4>Soft disconnect agent</option><option value=5>Hard disconnect agent</option></select><div>Change Core</div>")}}}}function p15uploadCoreEx(){if(Q("d3coreMode").value==1){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"default"})}else{if(Q("d3coreMode").value==2){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"clear"})}else{if(Q("d3coreMode").value==3){p15uploadCore2()}else{if(Q("d3coreMode").value==4){meshserver.send({action:"agentdisconnect",nodeid:consoleNode._id,disconnectMode:1})}else{if(Q("d3coreMode").value==5){meshserver.send({action:"agentdisconnect",nodeid:consoleNode._id,disconnectMode:2})}else{if(Q("d3coreMode").value==6){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"recovery"})}}}}}}}function p15uploadCore2(){if(xxdialogMode){return}Q("d3localmodeform").action="uploadmeshcorefile.ashx";Q("d3attrib").value=currentNode._id;setDialogMode(3,"Upload Mesh Agent Core",3,p15uploadCoreEx2);d3init()}function p15uploadCoreEx2(){var b=Q("d3uploadMode").value;if(b==1){Q("d3submit").click()}else{var a=d3getFileSel();if(a.length==1){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"custom",path:d3filetreelocation.join("/")+"/"+a[0]})}}}function account_manageAuthApp(){if(xxdialogMode||((features&4096)==0)){return}if(userinfo.otpsecret==1){account_removeOtp()}else{account_addOtp()}}function account_addOtp(){if(xxdialogMode||(userinfo.otpsecret==1)||((features&4096)==0)){return}setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Loading...</div>","otpauth-request");meshserver.send({action:"otpauth-request"})}function account_addOtpCheck(a){var b=(Q("d2otpauthinput").value.length==6);QE("idx_dlgOkButton",b);if(a&&(a.keyCode==13)&&b){dialogclose(1)}}function account_removeOtp(){if(xxdialogMode||(userinfo.otpsecret!=1)||((features&4096)==0)){return}setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(a){if((xxdialogMode==2)&&(xxdialogTag=="otpauth-manage")){dialogclose(0)}if(xxdialogMode||((features&4096)==0)){return}if((userinfo.otpsecret==1)||(userinfo.otphkeys>0)){meshserver.send({action:"otpauth-getpasswords",subaction:a})}}function account_manageHardwareOtp(){if((xxdialogMode==2)&&(xxdialogTag=="otpauth-hardware-manage")){dialogclose(0)}if(xxdialogMode||((features&4096)==0)){return}meshserver.send({action:"otp-hkey-get"})}function account_addhkey(a){if(a==1){var b="Type in the name of the key to add.<br /><br />";b+=addHtmlValue("Key Name",'<input id=dp1keyname style=width:230px maxlength=20 autocomplete=off placeholder="MyKey" onkeyup=account_addhkeyValidate(event,2) />')}else{if(a==2){var b="Type in a key name, select the OTP box and press the button on the YubiKey&trade;.<br /><br />";b+=addHtmlValue("Key Name",'<input id=dp1keyname style=width:230px maxlength=20 autocomplete=off placeholder="MyKey" onkeyup=account_addhkeyValidate(event,1) />');b+=addHtmlValue("YubiKey&trade; OTP","<input id=dp1key style=width:230px autocomplete=off onkeyup=account_addhkeyValidate(event,2) />")}}setDialogMode(2,"Add Security Key",3,account_addhkeyEx,b,a);Q("dp1keyname").focus()}function account_addhkeyValidate(b,a){if((b!=null)&&(b.keyCode==13)){if(a==2){dialogclose(1)}else{Q("dp1key").focus()}}}function account_addhkeyEx(a,c){var b=Q("dp1keyname").value;if(b==""){b="MyKey"}if(c==1){meshserver.send({action:"otp-hkey-setup-request",name:b})}else{if(c==2){meshserver.send({action:"otp-hkey-yubikey-add",name:b,otp:Q("dp1key").value});setDialogMode(2,"Add Security Key",0,null,"<br />Checking...<br /><br /><br />","otpauth-hardware-manage")}}}function account_removehkey(a){meshserver.send({action:"otp-hkey-remove",index:a});meshserver.send({action:"otp-hkey-get"})}function account_showVerifyEmail(){if(xxdialogMode||(userinfo.emailVerified==true)||(serverinfo.emailcheck!=true)){return}var a="Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.";setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,a)}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){if(xxdialogMode){return}var a="Change your account email address here.<br /><br />";a+=addHtmlValue("Email","<input id=dp2email style=width:230px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />");setDialogMode(2,"Email Address Change",3,account_changeEmail,a);if(userinfo.email!=null){Q("dp2email").value=userinfo.email}account_validateEmail();Q("dp2email").focus()}function account_validateEmail(a,b){QE("idx_dlgOkButton",validateEmail(Q("dp2email").value)&&(Q("dp2email").value!=userinfo.email));if((a!=null)&&(a.keyCode==13)){dialogclose(1)}}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp2email").value})}function account_showDeleteAccount(){if(xxdialogMode){return}var a="To delete this account, type in the account password in both boxes below and hit ok.<br /><br />";a+="<form action='"+domainUrl+"deleteaccount' method=post><table style=margin-left:80px><tr>";a+="<td align=right>Password:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>";a+="</tr><tr><td align=right>Password:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>";a+="</tr></table><br /><div style=padding:10px;margin-bottom:4px>";a+="<input id=account_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>";a+='<input id=account_dlgOkButton type=submit value=OK style="float:right;width:80px" onclick=dialogclose(1)>';a+="</div><br /></form>";setDialogMode(2,"Delete Account",0,null,a);account_validateDeleteAccount();Q("apassword1").focus()}function account_showChangePassword(){if(xxdialogMode){return}var d="Change your account password by entering the old password and new password twice in the boxes below. Password hint can be used but is not recommanded.<br /><br />";d+="<table style=margin-left:60px>";d+="<tr><td align=right>Old password:</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>";d+="<tr><td align=right>New password:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>";d+="<tr><td align=right>New password:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>";if(features&65536){d+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"}d+="</table>";if(passRequirements){var b=[],c=0;for(var a in passRequirements){if((a!="reset")&&(a!="hint")){b.push(a+":"+passRequirements[a]);c++}}if(c>0){d+="<br /><span style=font-size:x-small>Requirements: "+b.join(", ")+".</span>"}}d+="<br />";setDialogMode(2,"Change Password",3,account_showChangePasswordEx,d);Q("apassword0").focus();account_validateNewPassword()}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var a={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};if(features&65536){a.hint=Q("apasswordhint").value}meshserver.send(a)}}function account_createMesh(){if(xxdialogMode){return}if((userinfo.emailVerified!==true)&&(serverinfo.emailcheck==true)&&(userinfo.siteadmin!=4294967295)){setDialogMode(2,"New Device Group",1,null,'Unable to create a new device group until a email address is verified. This is required for password recovery. Go to the "My Account" tab to change and verify an email address.');return}var a="Create a new device group using the options below.<br /><br />";a+=addHtmlValue("Name","<input id=dp2meshname style=width:230px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");a+=addHtmlValue("Type","<div style=width:230px;margin:0;padding:0><select id=dp2meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Manage using a software agent</option><option value=1>Intel&reg; AMT only, no agent</option></select></div>");a+=addHtmlValue("Description","<div style=width:230px;margin:0;padding:0><textarea id=dp2meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>");setDialogMode(2,"New Device Group",3,account_createMeshEx,a);account_validateMeshCreate();Q("dp2meshname").focus()}function account_validateMeshCreate(){QE("idx_dlgOkButton",Q("dp2meshname").value.length>0)}function account_createMeshEx(a,b){meshserver.send({action:"createmesh",meshname:Q("dp2meshname").value,meshtype:Q("dp2meshtype").value,desc:Q("dp2meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",(Q("apassword1").value.length>0)&&(Q("apassword1").value==Q("apassword2").value))}function account_validateNewPassword(){var d="",a=(Q("apassword0").value.length>0)&&(Q("apassword1").value.length>0)&&(Q("apassword1").value==Q("apassword2").value)&&(Q("apassword0").value!=Q("apassword1").value)&&(Q("apasswordhint").value!=Q("apassword1").value);if(Q("apassword1").value!=""){if(passRequirements==null||passRequirements==""){var c=checkPasswordStrength(Q("apassword1").value);if(c>=80){d="<span style=color:green>Strong<span>"}else{if(c>=60){d="<span style=color:blue>Good<span>"}else{d="<span style=color:red>Weak<span>"}}}else{var b=checkPasswordRequirements(Q("apassword1").value,passRequirements);if(b==false){a=false;d="<span style=color:red>Policy<span>"}}}QH("dxPassWarn",d);QE("idx_dlgOkButton",a)}function checkPasswordStrength(e){var g=0,d={},h=0,j={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e){return 0}for(var b=0;b<e.length;b++){d[e[b]]=(d[e[b]]||0)+1;g+=5/d[e[b]]}for(var a in j){h+=(j[a]==true)?1:0}return parseInt(g+(h-1)*10)}function checkPasswordRequirements(e,g){if((g==null)||(g=="")||(typeof g!="object")){return true}if(g.min){if(e.length<g.min){return false}}if(g.max){if(e.length>g.max){return false}}var d=0,b=0,h=0,c=0;for(var a=0;a<e.length;a++){if(/\d/.test(e[a])){d++}if(/[a-z]/.test(e[a])){b++}if(/[A-Z]/.test(e[a])){h++}if(/\W/.test(e[a])){c++}}if(g.num&&(d<g.num)){return false}if(g.lower&&(b<g.lower)){return false}if(g.upper&&(h<g.upper)){return false}if(g.nonalpha&&(c<g.nonalpha)){return false}return true}function updateMeshes(){var e="";var a=0,b=0;for(i in meshes){if(a>1){e+="</tr><tr>";a=0}a++;b++;var d=0;if(meshes[i].links["user/"+domain+"/"+userinfo.name.toLowerCase()]){d=meshes[i].links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights}var g="Partial Rights";if(d==4294967295){g="Full Administrator"}else{if(d==0){g="No Rights"}}e+="<div onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:431px;height:50px;padding-top:1px;padding-bottom:1px;float:left><div style=float:left;width:30px;height:100%></div><div style=height:100%;cursor:pointer onclick=gotoMesh('"+i+"')><div class=mi style=float:left;width:50px;height:50px></div><div style=height:100%><div class=g1></div><div class=e2 style=width:300px><div class=e1>"+EscapeHtml(meshes[i].name)+"</div><div>"+g+"</div></div><div class=g2 style=float:left></div></div></div></div>"}meshcount=b;QH("p2meshes",e);QV("p2noMeshFound",b==0)}function gotoMesh(a){currentMesh=meshes[a];p20updateMesh();go(20)}function server_showRestoreDlg(){if(xxdialogMode){return}var a="Restore the server using a backup, <span style=color:red>this will delete the existing server data</span>. Only do this if you know what you are doing.<br /><br />";a+='<form action="/restoreserver.ashx" enctype="multipart/form-data" method="post"><div>';a+='<input id=account_dlgFileInput type=file name=datafile style=width:100% accept=".zip,application/octet-stream,application/zip,application/x-zip,application/x-zip-compressed" onchange=account_validateServerRestore()>';a+="<input id=account_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>";a+="<input id=account_dlgOkButton type=submit value=OK style=float:right;width:80px onclick=dialogclose(1)>";a+="</div><br /><br /></form>";setDialogMode(2,"Restore Server",0,null,a);account_validateServerRestore()}function account_validateServerRestore(){QE("account_dlgOkButton",Q("account_dlgFileInput").files.length==1)}function server_showVersionDlg(){if(xxdialogMode){return}setDialogMode(2,"MeshCentral Version",1,null,"Loading...","MeshCentralServerUpdate");meshserver.send({action:"serverversion"})}function server_showVersionDlgUpdate(){QE("idx_dlgOkButton",Q("d2updateCheck").checked)}function server_showVersionDlgEx(){meshserver.send({action:"serverupdate"})}function server_showErrorsDlg(){if(xxdialogMode){return}setDialogMode(2,"MeshCentral Errors",1,null,"Loading...","MeshCentralServerErrors");meshserver.send({action:"servererrors"})}function server_showErrorsDlgUpdate(){QE("idx_dlgOkButton",Q("d2updateCheck").checked)}function server_showErrorsDlgEx(){meshserver.send({action:"serverclearerrorlog"})}var currentMesh;function p20updateMesh(){if(currentMesh==null){return}QH("p20meshName",EscapeHtml(currentMesh.name));var j="Unknown #"+currentMesh.mtype;var h=0;try{h=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights}catch(c){}if(currentMesh.mtype==1){j="Intel&reg; AMT only, no agent"}if(currentMesh.mtype==2){j="Managed using a software agent"}var o="";o+=addHtmlValue("Name",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",(h&1)!=0));o+=addHtmlValue("Description",addLinkConditional(((currentMesh.desc&&currentMesh.desc!="")?EscapeHtml(currentMesh.desc):"<i>None</i>"),"p20editmesh(2)",(h&1)!=0));var g=[];if(currentMesh.flags){if(currentMesh.flags&1){g.push("Auto-Remove")}}g=g.join(", ");if(g==""){g="<i>None</i>"}o+=addHtmlValue("Features",addLinkConditional(g,"p20editmeshfeatures()",(h&1)!=0));o+=addHtmlValue("Type",j);if(currentMesh.mtype==2){var e="No Policy";if(currentMesh.amt){if(currentMesh.amt.type==1){e="Deactivate Client Control Mode (CCM)"}else{if(currentMesh.amt.type==2){e="Simple Client Control Mode (CCM)";if(currentMesh.amt.cirasetup==2){e+=" + CIRA"}}}}o+=addHtmlValue("Intel&reg; AMT",addLinkConditional(e,"p20editMeshAmt()",(h&4294967295)!=0))}if(h&1){o+='<br><input type=button value=Notes title="View notes about this device group" onclick=showNotes(false,"'+encodeURIComponent(currentMesh._id)+'") />'}o+="<br style=clear:both><br>";var b=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()];if(b&&((b.rights&2)!=0)){o+="<a onclick=p20showAddMeshUserDialog() style=cursor:pointer;margin-right:10px><img src=images/icon-addnew.png border=0 height=12 width=12> Add User</a>"}if((h&4)!=0){if(currentMesh.mtype==1){o+='<a onclick=addCiraDeviceToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Add a new Intel&reg; AMT computer that is located on the internet."><img src=images/icon-installmesh.png border=0 height=12 width=12> Install CIRA</a>';o+='<a onclick=addDeviceToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Add a new Intel&reg; AMT computer that is located on the local network."><img src=images/icon-installmesh.png border=0 height=12 width=12> Install local</a>'}if(currentMesh.mtype==2){o+='<a onclick=addAgentToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Add a new computer to this mesh by installing the mesh agent."><img src=images/icon-addnew.png border=0 height=12 width=12> Install</a>';if(features&64){o+='<a onclick=inviteAgentToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Invite someone to install the mesh agent on this mesh."><img src=images/icon-addnew.png border=0 height=12 width=12> Invite</a>'}}}o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th><th scope=col style=text-align:left></th></tr>';var a=1,m=[];for(var d in currentMesh.links){m.push({id:d,name:d.split("/")[2],rights:currentMesh.links[d].rights})}m.sort(function(p,q){if(p.name>q.name){return 1}if(p.name<q.name){return -1}return 0});for(var d in m){var n="",l="Partial Rights",k=m[d].rights;if(k==4294967295){l="Full Administrator"}else{if(k==0){l="No Rights"}}if((d!=userinfo._id)&&(h==4294967295||(((h&2)!=0)))){n='<a onclick=p20deleteUser(event,"'+encodeURIComponent(m[d].id)+'") title="Remote user rights to this mesh" style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'}o+='<tr onclick=p20viewuser("'+encodeURIComponent(m[d].id)+'") style=cursor:pointer'+(((a%2)==0)?";background-color:#DDD":"")+'><td><div title="User" class=m2></div><div>&nbsp;'+EscapeHtml(decodeURIComponent(m[d].name))+"<div></div></div></td><td><div style=float:right>"+n+"</div><div>"+l+"</div></td></tr>";++a}o+="</tbody></table>";if(h==4294967295){o+="<div style=font-size:x-small;text-align:right><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"}QH("p20info",o)}function p20editMeshAmt(){if(xxdialogMode){return}var a="";a+=addHtmlValue("Type","<select id=dp20amtpolicy style=width:230px onchange=p20editMeshAmtChange()><option value=0>No Policy</option><option value=1>Deactivate Client Control Mode (CCM)</option><option value=2>Simple Client Control Mode (CCM)</option></select>");a+="<div id=dp20amtpolicydiv></div>";setDialogMode(2,"Intel&reg; AMT Policy",3,p20editMeshAmtEx,a);if(currentMesh.amt){Q("dp20amtpolicy").value=currentMesh.amt.type}p20editMeshAmtChange();if(currentMesh.amt&&currentMesh.amt.type==2){Q("dp20amtpolicypass").value=currentMesh.amt.password;Q("dp20amtbadpass").value=currentMesh.amt.badpass;Q("dp20amtcira").value=currentMesh.amt.cirasetup}dp20amtValidatePolicy()}function p20editMeshAmtChange(){var a=Q("dp20amtpolicy").value,b="";if(a==2){b=addHtmlValue("Password*","<input id=dp20amtpolicypass style=width:230px maxlength=32 onchange=dp20amtValidatePolicy() onkeyup=dp20amtValidatePolicy() />");b+=addHtmlValue("Password mismatch","<select id=dp20amtbadpass style=width:230px><option value=0>Do nothing</option><option value=1>Reactivate Intel&reg; AMT</option></select>");b+=addHtmlValue('<span title="Client Initiated Remote Access">CIRA</span>',"<select id=dp20amtcira style=width:230px><option value=0>Don't configure</option><option value=1>Don't connect to server</option><option value=2>Connect to server</option></select>");b+='<br/><span style="font-size:10px">* Recommanded, leave blank to assign a random password to each device.</span><br/>';b+='<span style="font-size:10px">This policy will not impact devices with Intel&reg; AMT in ACM mode.</span><br/>';b+='<span style="font-size:10px">This is not a secure policy as agents will be performing activation.</span>'}QH("dp20amtpolicydiv",b)}function dp20amtValidatePolicy(){var a=true,c=Q("dp20amtpolicy").value;if(c==2){var b=Q("dp20amtpolicypass").value;a=(b=="")?true:passwordcheck(b)}QE("idx_dlgOkButton",a)}function p20editMeshAmtEx(){var b=parseInt(Q("dp20amtpolicy").value),a={type:b};if(b==2){a={type:b,password:Q("dp20amtpolicypass").value,badpass:parseInt(Q("dp20amtbadpass").value),cirasetup:parseInt(Q("dp20amtcira").value)}}meshserver.send({action:"meshamtpolicy",meshid:currentMesh._id,amtpolicy:a})}function p20showDeleteMeshDialog(){if(xxdialogMode){return}var a='Are you sure you want to delete group "'+EscapeHtml(currentMesh.name)+'"? Deleting the device group will also delete all information about devices within this group.<br /><br />';a+="<input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm";setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,a);p20validateDeleteMeshDialog()}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(a,b){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(a){if(xxdialogMode){return}var b=addHtmlValue("Name","<input id=dp20meshname style=width:230px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");b+=addHtmlValue("Description","<div style=width:230px;margin:0;padding:0><textarea id=dp20meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,b);Q("dp20meshname").value=currentMesh.name;if(currentMesh.desc){Q("dp20meshdesc").value=currentMesh.desc}p20editmeshValidate();if(a==2){Q("dp20meshdesc").focus()}else{Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",Q("dp20meshname").value.length>0)}function p20editmeshfeatures(){if(xxdialogMode){return}var a=(currentMesh.flags)?currentMesh.flags:0;var b="<div><input type=checkbox id=d20flag1 "+((a&1)?"checked":"")+">Remove device on disconnect<br></div>";setDialogMode(2,"Edit Device Group Features",3,p20editmeshfeaturesEx,b)}function p20editmeshfeaturesEx(){var a=0;if(Q("d20flag1").checked){a+=1}meshserver.send({action:"editmesh",meshid:currentMesh._id,flags:a})}function p20showAddMeshUserDialog(){if(xxdialogMode){return}var a="Allow a user to manage this device group and devices in this group<br /><br />";a+=addHtmlValue("User Name","<input id=dp20username style=width:230px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");a+='<br><div style="height:120px;overflow-y:scroll;border:1px solid gray">';a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Full Administrator<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Remote Control<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>No File Access<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes<br>";a+="</div>";setDialogMode(2,"Add User to Device Group",3,p20showAddMeshUserDialogEx,a);p20validateAddMeshUserDialog();Q("dp20username").focus()}function p20validateAddMeshUserDialog(){var a=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;QE("idx_dlgOkButton",(Q("dp20username").value.length>0));QE("p20fulladmin",a==4294967295);QE("p20editmesh",(!Q("p20fulladmin").checked)&&(a==4294967295));QE("p20manageusers",!Q("p20fulladmin").checked);QE("p20managecomputers",!Q("p20fulladmin").checked);QE("p20remotecontrol",!Q("p20fulladmin").checked);QE("p20meshagentconsole",!Q("p20fulladmin").checked);QE("p20meshserverfiles",!Q("p20fulladmin").checked);QE("p20wakedevices",!Q("p20fulladmin").checked);QE("p20editnotes",!Q("p20fulladmin").checked);QE("p20remoteview",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked);QE("p20noterminal",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked);QE("p20nofiles",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked);QE("p20noamt",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked)}function p20showAddMeshUserDialogEx(){var a=0;if(Q("p20fulladmin").checked==true){a=4294967295}else{if(Q("p20editmesh").checked==true){a+=1}if(Q("p20manageusers").checked==true){a+=2}if(Q("p20managecomputers").checked==true){a+=4}if(Q("p20remotecontrol").checked==true){a+=8}if(Q("p20meshagentconsole").checked==true){a+=16}if(Q("p20meshserverfiles").checked==true){a+=32}if(Q("p20wakedevices").checked==true){a+=64}if(Q("p20editnotes").checked==true){a+=128}if(Q("p20remoteview").checked==true){a+=256}if(Q("p20noterminal").checked==true){a+=512}if(Q("p20nofiles").checked==true){a+=1024}if(Q("p20noamt").checked==true){a+=2048}}meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,username:Q("dp20username").value,meshadmin:a})}function p20viewuser(e){if(xxdialogMode){return}e=decodeURIComponent(e);var d="",b=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights,c=currentMesh.links[e].rights;if(c==4294967295){d=", Full Administrator (all rights)"}else{if((c&1)!=0){d+=", Edit Device Group"}if((c&2)!=0){d+=", Manage Device Group Users"}if((c&4)!=0){d+=", Manage Device Group Computers"}if((c&8)!=0){d+=", Remote Control"}if((c&16)!=0){d+=", Agent Console"}if((c&32)!=0){d+=", Server Files"}if((c&64)!=0){d+=", Wake Devices"}if((c&128)!=0){d+=", Edit Notes"}if((c&256)!=0){d+=", Remote View Only"}if((c&512)!=0){d+=", No Terminal"}if((c&1024)!=0){d+=", No Files"}if((c&2048)!=0){d+=", No Intel&reg; AMT"}}d=d.substring(2);if(d==""){d="No Rights"}var a=1,g=addHtmlValue("User Name",EscapeHtml(decodeURIComponent(e.split("/")[2])));g+=addHtmlValue("Permissions",d);if((("user/"+domain+"/"+userinfo.name.toLowerCase())!=e)&&(b==4294967295||(((b&2)!=0)&&(c!=4294967295)))){a+=4}setDialogMode(2,"Device Group User",a,p20viewuserEx,g,e)}function p20viewuserEx(a,b){if(a!=2){return}setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,"Confirm removal of user "+b.split("/")[2]+"?",b)}function p20deleteUser(a,b){haltEvent(a);p20viewuserEx(2,decodeURIComponent(b))}function p20viewuserEx2(a,b){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:b})}var filetreelinkpath;var filetreelocation=[];function updateFiles(){QV("MainMenuMyFiles",((features&8)==0));if((features&8)!=0){return}var q="",r="",c="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",o="Root",y,k=filetree,m=1;var j=[],v=filetreelinkpath,b=[],a=document.getElementsByName("fc");for(var s=0;s<a.length;s++){if(a[s].checked){b.push(a[s].value)}}filetreelinkpath="";for(var s in filetreelocation){if((k.f!=null)&&(k.f[filetreelocation[s]]!=null)){j.push(filetreelocation[s]);o+=" / "+filetreelocation[s];if((m==1)){var B=filetreelocation[s].split("/");y=window.location+B[0]+"files/"+B[2];filetreelinkpath+=filetreelocation[s]}else{if(filetreelinkpath!=""){filetreelinkpath+="/"+filetreelocation[s];if(m>2){y+="/"+filetreelocation[s]}}}k=k.f[filetreelocation[s]];c+=" / <a style=cursor:pointer onclick=p5folderup("+m+")>"+(k.n!=null?k.n:filetreelocation[s])+"</a>";m++}else{break}}filetreelocation=j;var w=o.toLowerCase().startsWith("root / "+userinfo._id+" / public");var l=p5sort_files(k.f);for(var s in l){var d=l[s],u=d.n,A;A=u;if(u.length>70){A='<span title="'+EscapeHtml(u)+'">'+EscapeHtml(u.substring(0,70))+"...</span>"}else{A=EscapeHtml(u)}u=EscapeHtml(u);var g="";if(d.d!=null){var e=new Date(d.d),g=(e.getMonth()+1)+"/"+(e.getDate())+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;"}var n="";if(d.s!=null){n=getFileSizeStr(d.s)}var p="";if(d.t<3||d.t==4){var z=(d.t==1||d.t==4)?p5getQuotabar(d):"",C="";p="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+u+"'>&nbsp;<span style=float:right title=\""+C+'">'+z+"</span><span><div class=fileIcon"+d.t+' onclick=p5folderset("'+encodeURIComponent(d.nx)+'")></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(d.nx)+'")>'+A+"</a></span></div>"}else{var t=A;var x="";if(w){x=' (<a style=cursor:pointer title="Display public link" onclick=\'p5showPublicLink("'+y+"/"+d.nx+"\")'>Link</a>)"}if(d.s>0){t='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+d.nx)+'">'+A+"</a>"+x}p="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+d.nx+"'>&nbsp;<span class=fsize>"+g+"</span><span style=float:right>"+n+"</span><span><div class=fileIcon"+d.t+"></div>"+t+"</span></div>"}if(d.t<3){q+=p}else{r+=p}}QH("p5rightOfButtons",p5getQuotabar(k));QH("p5files",q+r);QH("p5currentpath",c);QE("p5FolderUp",filetreelocation.length!=0);QV("p5PublicShare",w);if(v==filetreelinkpath){a=document.getElementsByName("fc");for(var s=0;s<a.length;s++){a[s].checked=(b.indexOf(a[s].value)>=0)}}p5setActions()}function getNiceSize(a){if(a<=0){return"Storage limit exceed"}if(a<2048){return a+" bytes remaining"}if(a<2097152){return Math.round(a/1024)+" kilobytes remaining"}if(a<2147483648){return Math.round(a/1024/1024)+" megabytes remaining"}return Math.round(a/1024/1024/1024)+" gigabytes remaining"}function getNiceSize2(a){if(a<=0){return"None"}if(a<2048){return a+" b"}if(a<2097152){return Math.round(a/1024)+" Kb"}if(a<2147483648){return Math.round(a/1024/1024)+" Mb"}return Math.round(a/1024/1024/1024)+" Gb"}function p5getQuotabar(a){while(a.t>1&&a.t!=4){a=a.parent}if((a.t!=1&&a.t!=4)||(a.maxbytes==null)){return""}var b=Math.floor(a.s/1024),c=(a.maxbytes-a.s);return'<span title="'+b+"k in "+a.c+" file"+(a.c>1?"s":"")+". "+(Math.floor(a.maxbytes/1024/1024))+'k maxinum">'+getNiceSize(c)+" <progress style=height:10px;width:100px value="+a.s+" max="+a.maxbytes+" /></span>"}function p5showPublicLink(a){setDialogMode(2,"Public Link",1,null,'<input type=text style=width:100% value="'+a+'" readonly />')}var sortorder;function p5sort_filename(c,d){if(c.ln>d.ln){return(1*sortorder)}if(c.ln<d.ln){return(-1*sortorder)}return 0}function p5sort_timestamp(c,d){if(c.d>d.d){return(1*sortorder)}if(c.d<d.d){return(-1*sortorder)}return 0}function p5sort_bysize(c,d){if(c.s==d.s){return p5sort_filename(c,d)}return(((c.s-d.s))*sortorder)}function p5sort_files(a){var c=[],d=Q("p5sortdropdown").value;for(var b in a){a[b].nx=b;if(a[b].n==null){a[b].n=b}a[b].ln=a[b].n.toLowerCase();c.push(a[b])}sortorder=1;if(d>3){sortorder=-1;d-=3}if(d==1){c.sort(p5sort_filename)}else{if(d==2){c.sort(p5sort_bysize)}else{if(d==3){c.sort(p5sort_timestamp)}}}return c}function p5setActions(){var a=getFileSelCount(),c=getFileCount(),b=getFileSelCount(false);QE("p5DeleteFileButton",(a>0)&&(filetreelocation.length>0));QE("p5NewFolderButton",filetreelocation.length>0);QE("p5UploadButton",filetreelocation.length>0);QE("p5RenameFileButton",(a==1)&&(filetreelocation.length>0));QE("p5SelectAllButton",c>0);Q("p5SelectAllButton").value=(a>0?"Select None":"Select All");QE("p5CutButton",(b>0)&&(a==b));QE("p5CopyButton",(b>0)&&(a==b));QE("p5PasteButton",(p5clipboard!=null)&&(p5clipboard.length>0)&&(filetreelocation.length>0))}function getFileSelCount(d){var a=0,b=document.getElementsByName("fc");for(var c=0;c<b.length;c++){if((b[c].checked)&&((d!=false)||(b[c].attributes.file.value=="3"))){a++}}return a}function getFileSelDirCount(){var a=0,b=document.getElementsByName("fc");for(var c=0;c<b.length;c++){if((b[c].checked)&&(b[c].attributes.file.value=="999")){a++}}return a}function getFileCount(){var a=0;var b=document.getElementsByName("fc");return b.length}function p5selectallfile(){var c=(getFileSelCount()==0),a=document.getElementsByName("fc");for(var b=0;b<a.length;b++){a[b].checked=c}p5setActions()}function setupBackPointers(d){if(d.f!=null){var b=0,a=0;for(var c in d.f){setupBackPointers(d.f[c]);d.f[c].parent=d;if(d.f[c].s){b+=d.f[c].s}if(d.f[c].c){a+=d.f[c].c}if(d.f[c].t==3){a++}}d.s=b;d.c=a}return d}function getFileSizeStr(a){if(a==1){return"1 byte"}return""+a+" bytes"}function p5folderup(a){if(a==null){filetreelocation.pop()}else{while(filetreelocation.length>a){filetreelocation.pop()}}updateFiles()}function p5folderset(a){filetreelocation.push(decodeURIComponent(a));updateFiles()}function p5createfolder(){setDialogMode(2,"New Folder",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />");focusTextBox("p5renameinput");p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var a=getFileSelCount(),b=(getFileSelDirCount()>0)?"<br /><br /><input type=checkbox id=p5recdeleteinput>Recursive delete<br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,(a>1)?("Delete "+a+" selected items?"+b):("Delete selected item?"+b))}function p5deletefileEx(){var b=[],a=document.getElementsByName("fc");for(var c=0;c<a.length;c++){if(a[c].checked){b.push(a[c].value)}}meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:b,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){var c,a=document.getElementsByName("fc");for(var b=0;b<a.length;b++){if(a[b].checked){c=a[b].value}}setDialogMode(2,"Rename",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+c+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:c});focusTextBox("p5renameinput");p5fileNameCheck()}function p5renamefileEx(a,c){c.newname=Q("p5renameinput").value;meshserver.send(c)}function p5fileNameCheck(a){var b=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",b);if((b==true)&&(a&&a.keyCode==13)){dialogclose(1)}}var isFilenameValid=(function(){var b=/^[^\\/:\*\?"<>\|]+$/,c=/^\./,d=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function a(e){return b.test(e)&&!c.test(e)&&!d.test(e)&&(e[0]!=".")}})();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=submit id=p5loginSubmit style=display:none /></form>');updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(a){QE("idx_dlgOkButton",Q(a).value!="")}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(b){var a=document.getElementsByName("fc");p5clipboard=[];p5clipboardCut=b,p5clipboardFolder=Clone(filetreelocation);for(var c=0;c<a.length;c++){if((a[c].checked)&&(a[c].attributes.file.value=="3")){p5clipboard.push(a[c].value)}}p5updateClipview()}function p5pasteFile(){var a="";if((p5clipboard!=null)&&(p5clipboard.length>0)){a="Confim "+(p5clipboardCut==0?"copy":"move")+" of "+p5clipboard.length+" entrie"+((p5clipboard.length>1)?"s":"")+" to this location?"}setDialogMode(2,"Paste",3,p5pasteFileEx,a)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:(p5clipboardCut==0?"copy":"move"),scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard});p5folderup(999);if(p5clipboardCut==1){p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;p5updateClipview()}}function p5updateClipview(){var a="";if((p5clipboard!=null)&&(p5clipboard.length>0)){a="Holding "+p5clipboard.length+" entrie"+((p5clipboard.length>1)?"s":"")+" for "+(p5clipboardCut==0?"copy":"move")+", <a onclick=p5clearClip() style=cursor:pointer>Clear</a>."}QH("p5bottomstatus",a);p5setActions()}function p5clearClip(){p5clipboard=null;p5clipboardFolder=null;p5clipboardCut=0;p5updateClipview()}function p5fileDragDrop(b){if(xxdialogMode){return}haltEvent(b);QV("bigfail",false);QV("bigok",false);var c=0;p5uploadFile();try{Q("p5uploadinput").files=b.dataTransfer.files}catch(d){c=1}if(c==0){p5uploadFileEx()}setDialogMode(0);if(c==1){if(b.dataTransfer==null||b.dataTransfer.files.length==0||filetreelocation.length==0){return}var j=[],m=[],o=[],a=[],l=b.dataTransfer.files.length,n=0;for(var h=0;h<b.dataTransfer.files.length;h++){n+=b.dataTransfer.files[h].size}if(n>1300000){p5uploadFile();return}for(var h=0;h<b.dataTransfer.files.length;h++){var k=new FileReader(),g=b.dataTransfer.files[h];j.push(g.name);m.push(g.size);o.push(g.type);k.onload=function(e){a.push(e.target.result);if(--l==0){Q("p5fileDragName").value=j.join("*");Q("p5fileDragSize").value=m.join("*");Q("p5fileDragType").value=o.join("*");Q("p5fileDragData").value=a.join("*");Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath);Q("p5loginSubmit2").click()}};k.readAsDataURL(g)}}}var p5dragtimer=null;function p5fileDragOver(b){if(xxdialogMode){return}haltEvent(b);if(p5dragtimer!=null){clearTimeout(p5dragtimer);p5dragtimer=null}var a=true;if(filetreelocation.length==0){a=false}QV("bigok",a);QV("bigfail",!a)}function p5fileDragLeave(a){if(xxdialogMode){return}haltEvent(a);if(a.target.id!="p5filetable"){QV("bigfail",false);QV("bigok",false)}else{p5dragtimer=setTimeout(function(){QV("bigfail",false);QV("bigok",false);p5dragtimer=null},10)}}function eventMouseHover(a,b){a.children[1].classList.remove("g1s");a.children[2].style["background-color"]=((b==0)?"#c9c9c9":"#b9b9b9");a.children[3].classList.remove("g2s");if(b==1){a.children[1].classList.add("g1s");a.children[3].classList.add("g2s")}}function eventsUpdate(){var h="",a=null;for(var c in events){var b=events[c],g=new Date(b.time);if(g.toLocaleDateString()!=a){if(a!=null){h+="</table>"}h+="<table style=width:100% cellpadding=0 cellspacing=0><tr><td colspan=4 class=DevSt>"+g.toLocaleDateString()+"</td></tr>";a=g.toLocaleDateString()}var d="si3";if(b.etype=="user"){d="m2"}if(b.etype=="server"){d="si3"}var e=b.msg.split("(R)").join("&reg;");if(b.username&&b.username!=userinfo.name){e+=": "+b.username}h+="<tr onmouseover=eventMouseHover(this,1) onmouseout=eventMouseHover(this,0) style=cursor:pointer><td style=width:18px><div class="+d+"></div></td><td class=g1 style=float:none>&nbsp;</td><td style=background-color:#C9C9C9>"+g.toLocaleTimeString()+" - "+e+"</td><td class=g2 style=float:none>&nbsp;</td></tr><tr style=height:2px></tr>"}if(a!=null){h+="</table>"}if(h==""){h="<br><i>No Events Found</i><br><br>"}QH("p3events",h)}function showDeleteAllEventsDialog(){if(xxdialogMode){return}var a="Delete all events in the server event log?<br /><br />";a+="<input id=p3check type=checkbox onchange=validateDeleteAllEventsDialog() />Confirm";setDialogMode(2,"Delete All Events",3,showDeleteAllEventsDialogEx,a);validateDeleteAllEventsDialog()}function validateDeleteAllEventsDialog(){QE("idx_dlgOkButton",Q("p3check").checked)}function showDeleteAllEventsDialogEx(a,b){meshserver.send({action:"clearevents"})}function refreshEvents(){meshserver.send({action:"events",limit:parseInt(p3limitdropdown.value)})}function updateUsers(){QV("MainMenuMyUsers",(users!=null)&&((features&4)==0));QV("LeftMenuMyUsers",(users!=null)&&((features&4)==0));QV("UserNewAccountButton",((features&4)==0)&&(serverinfo.domainauth==false));if((users==null)||((features&4)!=0)){QH("p3users","");return}var g=[],d=100,b=0;for(var c in users){g.push(c)}g.sort();var j=Q("UserSearchInput").value.toLowerCase();var k="<table style=width:100% cellpadding=0 cellspacing=0>",a=true;k+="<th style=color:gray>Name<th style=color:gray>Groups<th style=color:gray>Last Access<th style=color:gray>Permissions";for(var c in g){var h=users[g[c]],e=null;if(wssessions!=null){e=wssessions[h._id]}if((e!=null)&&(h.name.toLowerCase().indexOf(j)>=0)){if(d>0){if(a){k+="<tr><td class=userTableHeader colspan=4>Online Users";a=false}k+=addUserHtml(h,e);d--}else{b++}}}a=true;for(var c in g){var h=users[g[c]],e=null;if(wssessions!=null){e=wssessions[h._id]}if((e==null)&&(h.name.toLowerCase().indexOf(j)>=0)){if(d>0){if(a){k+="<tr><td class=userTableHeader colspan=4>Offline Users";a=false}k+=addUserHtml(h,e);d--}else{b++}}}k+="</table>";if(b==1){k+="<br />1 more user not shown, use search box to look for users...<br />"}else{if(b>1){k+="<br />"+b+" more users not shown, use search box to look for users...<br />"}}if(d==100){k+="<br />No users found.<br />"}QH("p3users",k);if((currentUser!=null)&&(xxcurrentView==30)){gotoUser(encodeURIComponent(currentUser._id),true)}}function addUserHtml(m,l){var o="",b=" gray",e="m2",h="",k=(m.name!=userinfo.name),g="",j="";if(l!=null){b="";if(k){h='<span style=float:right;margin-top:1px;margin-right:4px title=Chat><a onclick=userChat(event,"'+encodeURIComponent(m._id)+'","'+encodeURIComponent(m.name)+"\")><img src='images/icon-chat.png' height=16 width=16 style=padding-top:2px /></a></span>";h+='<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a onclick=showUserAlertDialog(event,"'+encodeURIComponent(m._id)+"\")><img src='images/icon-notify.png' height=16 width=16 style=padding-top:2px /></a></span>"}if(l==1){g+="1 session"}else{g+=l+" sessions"}}else{if(m.login){g+='<span title="Last login: '+new Date(m.login*1000).toLocaleString()+'">'+new Date(m.login*1000).toLocaleDateString()+"</span>"}}if(k){j+='<a style=cursor:pointer onclick=showUserAdminDialog(event,"'+encodeURIComponent(m._id)+'")>'}if((m.siteadmin!=null)&&((m.siteadmin&32)!=0)&&(m.siteadmin!=4294967295)){j+="Locked, "}j+="<span title='Server Permissions'>";if((m.siteadmin==null)||(m.siteadmin==0)||(m.siteadmin==32)){j+="User"}else{if(m.siteadmin==8){j+="User + Files"}else{if(m.siteadmin==4294967295){j+="Administrator"}else{j+="Partial"}}}j+="</span>";if(k){j+="</a>"}var c=0;if(m.links){for(var d in m.links){c++}}var n=EscapeHtml(m.name),a="";if(serverinfo.emailcheck==true){a=((m.emailVerified!=true)?' <b style=color:red title="Email is not verified">&#x1F5F4</b>':' <b style=color:green title="Email is verified">&#x1F5F8</b>')}if(m.email!=null){n+=', <a onclick=doemail(event,"'+m.email+'")>'+m.email+"</a>"+a}if((m.otpsecret>0)||(m.otphkeys>0)){n+=' <img src="images/key12.png" height=12 width=11 title="2nd factor authentication enabled" style="margin-top:2px" />'}if((m.siteadmin!=null)&&((m.siteadmin&32)!=0)&&(m.siteadmin!=4294967295)){n+=' <img src="images/padlock12.png" height=12 width=8 title="Account is locked" style="margin-top:2px" />'}o+='<tr onmouseover=userMouseHover(this,1) onmouseout=userMouseHover(this,0)><td style=cursor:pointer onclick=gotoUser("'+encodeURIComponent(m._id)+'")>';o+="<div class=bar style=height:24px;width:100%;font-size:medium>";o+='<div style=float:left;height:24px;width:24px;background-color:white><div class="'+e+b+'" style=width:16px;margin-top:4px;margin-left:2px;height:16px></div></div>';o+="<div class=g1 style=height:24px;float:left></div><div class=g2 style=height:24px;float:right></div>";o+="<div><span>"+n+"</span>"+h+"</div></div><td style=text-align:center>"+c+"<td style=text-align:center>"+g+"<td style=text-align:center>"+j;return o}function userMouseHover(b,c){var a=b.children[0].children[0];a.children[1].classList.remove("g1s");a.children[2].classList.remove("g2s");if(c==1){a.children[1].classList.add("g1s");a.children[2].classList.add("g2s")}b.children[0].children[0].style["background-color"]=((c==0)?"#c9c9c9":"#b9b9b9")}function userChat(a,d,b){haltEvent(a);var c="/messenger?id=meshmessenger/"+d+"/"+encodeURIComponent(userinfo._id)+"&title="+b;if((authCookie!=null)&&(authCookie!="")){c+="&auth="+authCookie}window.open(c,"meshmessenger:"+d);meshserver.send({action:"meshmessenger",userid:decodeURIComponent(d)});return false}function showUserAlertDialog(a,b){if(xxdialogMode){return}haltEvent(a);setDialogMode(2,"Notify "+EscapeHtml(users[decodeURIComponent(b)].name),3,showUserAlertDialogEx,'Send a text notification to this user.<textarea id=d2notifyText maxlength=2048 style="width:100%;height:184px;resize:none"></textarea>',b);Q("d2notifyText").focus();return false}function showUserAlertDialogEx(a,b){meshserver.send({action:"notifyuser",userid:decodeURIComponent(b),msg:Q("d2notifyText").value})}function doemail(b,a){if(xxdialogMode){return}haltEvent(b);window.open("mailto:"+a);return false}function showUserBroadcastDialog(){if(xxdialogMode){return}var a='Broadcast a message to all connected users.<textarea id=broadcastMessage value="" style=width:370px;height:100px;resize:none maxlength=256 /></textarea>';setDialogMode(2,"Broadcast Message",3,showUserBroadcastDialogEx,a);Q("broadcastMessage").focus()}function showUserBroadcastDialogEx(){meshserver.send({action:"userbroadcast",msg:Q("broadcastMessage").value})}function showCreateNewAccountDialog(){if(xxdialogMode){return}var d="";d+=addHtmlValue("Name","<input id=p4name style=width:230px maxlength=64 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+=addHtmlValue("Email","<input id=p4email style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+=addHtmlValue("Password","<input id=p4pass1 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+=addHtmlValue("Password","<input id=p4pass2 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+="<div><input id=p4resetNextLogin type=checkbox />Force password reset on next login.</div>";if(passRequirements){var b=[],c=0;for(var a in passRequirements){if((a!="reset")&&(a!="hint")){b.push(a+":"+passRequirements[a]);c++}}if(c>0){d+="<div style=font-size:x-small;padding:6px>Requirements: "+b.join(", ")+".</div>"}}setDialogMode(2,"Create Account",3,showCreateNewAccountDialogEx,d);showCreateNewAccountDialogValidate();Q("p4name").focus()}function showCreateNewAccountDialogValidate(b){if((b==null)&&(Q("p4email").value.length>0)&&(validateEmail(Q("p4email").value))==false){QE("idx_dlgOkButton",false);return}var a=(!Q("p4name")||((Q("p4name").value.length>0)&&(Q("p4name").value.indexOf(" ")==-1)))&&Q("p4pass1").value.length>0&&Q("p4pass1").value==Q("p4pass2").value&&checkPasswordRequirements(Q("p4pass1").value,passRequirements);if(a&&passRequirements){if(checkPasswordRequirements(Q("p4pass1").value,passRequirements)==false){a=false}}QE("idx_dlgOkButton",a)}function showCreateNewAccountDialogEx(){meshserver.send({action:"adduser",username:Q("p4name").value,email:Q("p4email").value,pass:Q("p4pass1").value,resetNextLogin:Q("p4resetNextLogin").checked})}function showUserAdminDialog(a,c){if(xxdialogMode){return}haltEvent(a);c=decodeURIComponent(c);var d="<div>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_fileaccess>Server Files, <input type=number onchange=showUserAdminDialogValidate() maxlength=10 style=width:80px;text-align:right id=ua_fileaccessquota>k max, blank for default<br><hr/>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_fulladmin>Full Administrator<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_serverbackup>Server Backup<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_serverrestore>Server Restore<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_serverupdate>Server Updates<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_manageusers>Manage Users<br>";d+="<hr/><input type=checkbox onchange=showUserAdminDialogValidate() id=ua_lockedaccount>Lock Account<br>";d+="</div>";var b=users[c.toLowerCase()];setDialogMode(2,"Server Permissions",3,showUserAdminDialogEx,d,b);if(b.siteadmin&&b.siteadmin!=0){Q("ua_fulladmin").checked=(b.siteadmin==4294967295);Q("ua_serverbackup").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&1)!=0));Q("ua_manageusers").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&2)!=0));Q("ua_serverrestore").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&4)!=0));Q("ua_fileaccess").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&8)!=0));Q("ua_serverupdate").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&16)!=0));Q("ua_lockedaccount").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&32)!=0))}QE("ua_fulladmin",userinfo.siteadmin==4294967295);QE("ua_serverbackup",userinfo.siteadmin==4294967295);QE("ua_manageusers",userinfo.siteadmin==4294967295);QE("ua_serverrestore",userinfo.siteadmin==4294967295);QE("ua_fileaccess",userinfo.siteadmin==4294967295);QE("ua_serverupdate",userinfo.siteadmin==4294967295);Q("ua_fileaccessquota").value=(b.quota!=null)?(b.quota/1024):"";showUserAdminDialogValidate();return false}function showUserAdminDialogValidate(){if(userinfo.siteadmin==4294967295){QE("ua_serverbackup",!Q("ua_fulladmin").checked);QE("ua_manageusers",!Q("ua_fulladmin").checked);QE("ua_serverrestore",!Q("ua_fulladmin").checked);QE("ua_fileaccess",!Q("ua_fulladmin").checked);QE("ua_serverupdate",!Q("ua_fulladmin").checked);QE("ua_fileaccessquota",Q("ua_fileaccess").checked&&!Q("ua_fulladmin").checked)}}function showUserAdminDialogEx(a,d){var c=0,b=parseInt(Q("ua_fileaccessquota").value);if(Q("ua_fulladmin").checked==true){c=4294967295}else{if(Q("ua_serverbackup").checked==true){c+=1}if(Q("ua_manageusers").checked==true){c+=2}if(Q("ua_serverrestore").checked==true){c+=4}if(Q("ua_fileaccess").checked==true){c+=8}if(Q("ua_serverupdate").checked==true){c+=16}if(Q("ua_lockedaccount").checked==true){c+=32}}var e={action:"edituser",name:d.name,siteadmin:c};if(isNaN(b)==false){e.quota=(b*1024)}meshserver.send(e)}function onUserSearchInputChanged(){updateUsers()}var currentUser=null;function gotoUser(q,g){if(xxdialogMode&&!g){return}var p=currentUser=users[decodeURIComponent(q)];if(p==null){setDialogMode(0);go(4);return}QH("p30userName",p.name);QH("p31userName",p.name);var o=(p.name==userinfo.name),a=0;if(wssessions!=null&&wssessions[p._id]){a=wssessions[p._id]}Q("MainUserImage").classList.remove("gray");if(a==0){Q("MainUserImage").classList.add("gray")}var l="",n="";if((p.siteadmin!=null)&&((p.siteadmin&32)!=0)&&(p.siteadmin!=4294967295)){n='<img src="images/padlock12.png" height=12 width=8 title="Account is locked" style="margin-top:2px" /> ';l+="Locked account, "}if((p.siteadmin==null)||(p.siteadmin==0)||(p.siteadmin==32)){l+="No server rights"}else{if(p.siteadmin==8){l+="Access to server files"}else{if(p.siteadmin==4294967295){l+="Full administrator"}else{l+="Partial rights"}}}var r="<div style=min-height:80px><table style=width:100%>";var c=p.email?EscapeHtml(p.email):"<i>Not set</i>",d="";if(serverinfo.emailcheck){d=((p.emailVerified==true)?'<b style=color:green;cursor:pointer title="Email is verified">&#x1F5F8</b> ':'<b style=color:red;cursor:pointer title="Email not verified">&#x1F5F4</b> ')}r+=addDeviceAttribute("Email",d+'<a style=cursor:pointer onclick=p30showUserEmailChangeDialog(event,"'+q+'")>'+c+'</a> <a style=cursor:pointer onclick=doemail(event,"'+p.email+'")><img class=hoverButton width=10 height=10 src="images/link1.png" /></a>');r+=addDeviceAttribute("Server Rights",n+'<a style=cursor:pointer onclick=showUserAdminDialog(event,"'+q+'")>'+l+"</a>");if(p.quota){r+=addDeviceAttribute("Server Quota",EscapeHtml(parseInt(p.quota)/1024)+" k")}r+=addDeviceAttribute("Creation",new Date(p.creation*1000).toLocaleString());if(p.login){r+=addDeviceAttribute("Last Login",new Date(p.login*1000).toLocaleString())}if(p.passchange==-1){r+=addDeviceAttribute("Password","Will be changed on next login.")}else{if(p.passchange){r+=addDeviceAttribute("Password","Last changed: "+new Date(p.passchange*1000).toLocaleString())}}var j=0,k="<i>None<i>";if(p.links){for(var h in p.links){j++}if(j==1){k="1 group"}else{if(j>1){k=j+" groups"}}}r+=addDeviceAttribute("Device Groups",k);var m=0;if((p.otpsecret>0)||(p.otphkeys>0)){m=1;var e=[];if(p.otpsecret>0){e.push("Authentication App")}if(p.otphkeys>0){e.push("Security Key")}if(p.otpkeys>0){e.push("Backup Codes")}r+=addDeviceAttribute("Security",'<img src="images/key12.png" height=12 width=11 title="2nd factor authentication enabled" style="margin-top:2px" /> '+e.join(", "))}r+="</table></div><br />";r+='<input type=button value=Notes title="View notes about this user" onclick=showNotes(false,"'+q+'") />';if(!o&&(a>0)){r+='<input type=button value=Notify title="Send user notification" onclick=showUserAlertDialog(event,"'+q+'") />'}QH("p30html",r);drawUserTimeline();var b=true;if(p._id==userinfo._id){b=false}if(p.siteadmin&&p.siteadmin>0&&userinfo.siteadmin!=4294967295){b=false}r="<div style=float:right;font-size:x-small>";if(b){r+='<a style=cursor:pointer onclick=p30showDeleteUserDialog() title="Remove this user">Delete User</a>'}r+="</div><div style=font-size:x-small>";if(userinfo.siteadmin==4294967295){r+="<a style=cursor:pointer onclick=p30showUserChangePassDialog("+m+') title="Change the password for this user">Change Password</a>'}r+="</div><br>";QH("p30html3",r);r="";if(a==1){r="1 active session"}else{if(a>1){r=a+" active sessions"}}QH("MainUserState",r);go(30);QH("p31events","");refreshUsersEvents()}function p30showUserEmailChangeDialog(a){if(xxdialogMode){return}var b="";b+=addHtmlValue("Email","<input id=dp30email style=width:230px maxlength=32 onchange=p30validateEmail() onkeyup=p30validateEmail() />");if(serverinfo.emailcheck){b+=addHtmlValue("Status","<select id=dp30verified style=width:230px onchange=p30validateEmail()><option value=0>Not verified</option><option value=1>Verified</option></select>")}setDialogMode(2,"Change Email for "+EscapeHtml(currentUser.name),3,p30showUserEmailChangeDialogEx,b);Q("dp30email").focus();Q("dp30email").value=currentUser.email;if(serverinfo.emailcheck){Q("dp30verified").value=currentUser.emailVerified?1:0}p30validateEmail()}function p30validateEmail(){var a=Q("dp30email").value,b=a.split("@");b=(b.length==2)&&(b[0].length>0)&&(b[1].split(".").length>1)&&(b[1].length>2)&&(a.length<1024)&&((a!=userinfo.email)||((serverinfo.emailcheck==true)&&(Q("dp30verified").value!=(userinfo.emailVerified?1:0))));QE("idx_dlgOkButton",b)}function p30showUserEmailChangeDialogEx(){var a={action:"edituser",name:currentUser.name,email:Q("dp30email").value};if(serverinfo.emailcheck){a.emailVerified=(Q("dp30verified").value==1)}meshserver.send(a)}function p30showUserChangePassDialog(b){if(xxdialogMode){return}var e="";e+=addHtmlValue("Password","<input id=p4pass1 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate(1) onkeyup=showCreateNewAccountDialogValidate(1)></input>");e+=addHtmlValue("Password","<input id=p4pass2 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate(1) onkeyup=showCreateNewAccountDialogValidate(1)></input>");if(features&65536){e+=addHtmlValue("Password hint","<input id=p4hint type=text style=width:230px maxlength=256></input>")}if(passRequirements){var c=[],d=0;for(var a in passRequirements){if((a!="reset")&&(a!="hint")){c.push(a+":"+passRequirements[a]);d++}}if(d>0){e+="<div style=font-size:x-small;padding:6px>Requirements: "+c.join(", ")+".</div>"}}e+="<div><input id=p4resetNextLogin type=checkbox />Force password reset on next login.</div>";if(b==1){e+="<div><input id=p4twoFactorRemove type=checkbox />Remove all 2nd factor authentication.</div>"}setDialogMode(2,"Change Password for "+EscapeHtml(currentUser.name),3,p30showUserChangePassDialogEx,e,b);showCreateNewAccountDialogValidate(1);Q("p4pass1").focus()}function p30showUserChangePassDialogEx(a,e){var d=false;if((e==1)&&(Q("p4twoFactorRemove").checked==true)){d=true}if(Q("p4pass1").value==Q("p4pass2").value){var c={action:"changeuserpass",user:currentUser.name,pass:Q("p4pass1").value,removeMultiFactor:d,resetNextLogin:Q("p4resetNextLogin").checked};if(features&65536){c.hint=Q("p4hint").value}meshserver.send(c)}}function p30showDeleteUserDialog(){if(xxdialogMode){return}setDialogMode(2,"Delete User "+EscapeHtml(currentUser.name),3,p30showDeleteUserDialogEx,"Confirm deletion of user "+EscapeHtml(currentUser.name)+"?")}function p30showDeleteUserDialogEx(){meshserver.send({action:"deleteuser",userid:currentUser._id,username:currentUser.name})}function drawUserTimeline(){var s=null,o=Date.now();s=[];var e=new Date();e.setHours(0,0,0,0);e=new Date(e.getTime()-(1000*60*60*24*6));var u=e.getTime();var t=[];if(s!=null&&s.length>1){t.push([0,s[1],s[0]]);var c=s[1];for(var m=2;m<s.length;m+=2){var p=s[m],k=o;if(s.length>(m+1)){k=s[m+1]}t.push([c,c+k,p]);c=c+k}}var z="",b=1,h=new Date();h.setHours(0,0,0,0);for(var m=0;m<7;m++){var g="",q=h.getTime(),l=q+(1000*60*60*24);for(var n in t){var a=t[n];if(isTimeBlockInside(q,l,a[0],a[1])==true){var w=Math.max(q,a[0]);var r=Math.min(Math.min(l,a[1]),o);var y=Math.round((r-w)/112794);if(y>0){var v=powerStateStrings2[a[2]]+" from "+new Date(w).toLocaleTimeString()+" to "+new Date(r).toLocaleTimeString()+".";g+='<div title="'+v+'" style=display:table-cell;width:'+y+"px;background-color:"+powerColor(a[2])+";height:16px></div>"}}}z+="<tr style="+(((b%2)==0)?"background-color:#DDD":"")+"><td><div>&nbsp;"+h.toLocaleDateString()+"<div></div></div></td><td><div>"+g+"</div></td></tr>";++b;h=new Date(h.getTime()-(1000*60*60*24))}QH("p30html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:150px>Day</th><th scope=col style=text-align:center>7 Day Login State</th></tr>'+z+"</tbody></table>")}var currentUserEvents=null;function userEventsUpdate(){var h="",a=null;for(var c in currentUserEvents){var b=currentUserEvents[c];var g=new Date(b.time);if(g.toLocaleDateString()!=a){if(a!=null){h+="</table>"}h+="<table style=width:100% cellpadding=0 cellspacing=0><tr><td class=DevSt>"+g.toLocaleDateString()+"</td></tr>";a=g.toLocaleDateString()}var d="si3";if(b.etype=="user"){d="m2"}if(b.etype=="server"){d="si3"}var e=b.msg.split("(R)").join("&reg;");if(b.username&&b.username!=userinfo.name){e+=": "+b.username}h+="<tr><td><div class=bar18 style=height:18px;width:100%;font-size:medium>";h+="<div style=float:left;height:18px;width:18px;background-color:white><div class="+d+" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>";h+="<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>";h+="<div style=font-size:14px><span style=width:300px>"+g.toLocaleTimeString()+" - "+e+"</span></div></div></td></tr>"}if(a!=null){h+="</table>"}if(h==""){h="<br><i>No Events Found</i><br><br>"}QH("p31events",h)}function refreshUsersEvents(){meshserver.send({action:"events",limit:parseInt(p31limitdropdown.value),user:currentUser.name})}function d3init(){Q("d3localFile").value="";d3modechange()}function d3modechange(){var a=Q("d3uploadMode").value;QV("d3localmode",a==1);QV("d3servermode",a==2);if(a==1){d3setActions()}else{d3updatefiles()}}var d3filetreelinkpath;var d3filetreelocation=[];function d3updatefiles(){if(Q("d3uploadMode").value==1){return}var m="",n="",e=filetree,j=1;var c=[],r=d3filetreelinkpath,b=[],a=document.getElementsByName("fc");for(var o=0;o<a.length;o++){if(a[o].checked){b.push(a[o].value)}}d3filetreelinkpath="";for(var o in d3filetreelocation){if((e.f!=null)&&(e.f[d3filetreelocation[o]]!=null)){c.push(d3filetreelocation[o]);if((j==1)){var t=d3filetreelocation[o].split("/");publicPath=window.location+t[0]+"files/"+t[2];if(d3filetreelocation[o]===userinfo._id){d3filetreelinkpath+="self"}else{d3filetreelinkpath+=(t[0]+"/"+t[2])}}else{if(d3filetreelinkpath!=""){d3filetreelinkpath+="/"+d3filetreelocation[o];if(j>2){publicPath+="/"+d3filetreelocation[o]}}}e=e.f[d3filetreelocation[o]];j++}else{break}}d3filetreelocation=c;var g=p5sort_files(e.f);for(var o in g){var d=g[o],q=d.n,s;s=q;if(q.length>70){s='<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,70))+"...</span>"}else{s=EscapeHtml(q)}q=EscapeHtml(q);var k="";if(d.s!=null){k=getFileSizeStr(d.s)}var l="";if(d.t<3){var u="";l='<div class=filelist file=999><span style=float:right title="'+u+'"></span><span><div class=fileIcon'+d.t+' onclick=d3folderset("'+encodeURIComponent(d.nx)+'")></div>&nbsp;<a style=cursor:pointer onclick=d3folderset("'+encodeURIComponent(d.nx)+'")>'+s+"</a></span></div>"}else{var p=s;l="<div class=filelist file=3><input style=float:left name=fcx class=fcb type=checkbox onchange=d3setActions() value='"+d.nx+"'>&nbsp;<span style=float:right>"+k+"</span><span><div class=fileIcon"+d.t+"></div>"+p+"</span></div>"}if(d.t<3){m+=l}else{n+=l}}QH("d3serverfiles",m+n);QE("p3FolderUp",d3filetreelocation.length>0);d3setActions()}function d3folderset(a){d3filetreelocation.push(decodeURIComponent(a));d3updatefiles()}function d3folderup(a){if(a==null){d3filetreelocation.pop()}else{while(d3filetreelocation.length>a){d3filetreelocation.pop()}}d3updatefiles()}function d3getFileSel(){var a=[];var b=document.getElementsByName("fcx");for(var c=0;c<b.length;c++){if(b[c].checked){a.push(b[c].value)}}return a}function d3setActions(){var a=Q("d3uploadMode").value;if(a==1){QE("idx_dlgOkButton",Q("d3localFile").value.length>0)}else{QE("idx_dlgOkButton",d3getFileSel().length==1)}}var notifications=[];function clickNotificationIcon(a){if(a==true){QV("notifiyBox",true)}else{if(a==false){QV("notifiyBox",false)}else{QV("notifiyBox",QS("notifiyBox")["display"]=="none")}}drawNotifications()}function setNotificationCount(a){if(parseInt(Q("notificationCount").innerHTML)==a){return}QH("notificationCount",a);QS("notificationCount")["background-color"]=(a==0)?"lightblue":"orange";QV("notificationCount",a>0)}function drawNotifications(){var j="";if(notifications.length==0){j="<div style=margin:5px>There are currently no notifications</div>"}else{for(var c in notifications){var g=notifications[c];var k="";var a=new Date(g.time);var e=0;if(g.nodeid!=null){var h=getNodeFromId(g.nodeid);if(h!=null){e=h.icon;k="<b>"+h.name+"</b>: "}}j+='<div title="Occured at '+a.toLocaleString()+'" id="notifyx'+g.id+'" class=notification style="cursor:pointer;border-top:1px solid '+((j=="")?"transparent":"orange")+'"><div class=j'+e+' onclick="notificationSelected('+g.id+')" style=margin:5px;float:left></div><div onclick="notificationDelete('+g.id+')" class=unselectable title="Clear this notification" style=margin:5px;float:right;color:orange><b>X</b></div><div onclick="notificationSelected('+g.id+')" style=margin:5px>'+k+g.text+"</div></div>"}}var b="";if(notifications.length>1){b='<div id="notifyRemoveAll" onclick="deleteAllNotifications()" style="cursor:pointer;border-top:1px solid orange;margin:5px;color:orange;text-align:right;padding-right:3px">Clear all</div>'}QH("notifiyBox",'<div class=customScroll style="max-height:170px;overflow-y:auto;margin:5px">'+j+"</div>"+b)}function notificationSelected(b){var c=-1;for(var a in notifications){if(notifications[a].id==b){c=a}}if(c!=-1){var d=notifications[c];if(d.nodeid!=null){if(d.tag=="desktop"){gotoDevice(d.nodeid,12)}else{if(d.tag=="terminal"){gotoDevice(d.nodeid,11)}else{if(d.tag=="files"){gotoDevice(d.nodeid,13)}else{if(d.tag=="intelamt"){gotoDevice(d.nodeid,14)}else{if(d.tag=="console"){gotoDevice(d.nodeid,15)}else{gotoDevice(d.nodeid,10)}}}}}}else{if(d.tag.startsWith("meshmessenger/")){window.open("/messenger?id="+d.tag+"&title="+encodeURIComponent(d.username),d.tag.split("/")[2]);notificationDelete(b)}}}}function notificationDelete(c){var d=-1,a=Q("notifyx"+c);if(a!=null){for(var b in notifications){if(notifications[b].id==c){d=b}}if(d!=-1){notifications.splice(d,1);a.parentNode.removeChild(a);setNotificationCount(notifications.length);if(notifications.length==0){QV("notifiyBox",false)}if(notifications.length==1){QV("notifyRemoveAll",false)}if((notifications.length>0)&&(d==0)){var g=notifications[0];QS("notifyx"+g.id)["border-top"]="1px solid transparent"}}}}function addNotification(a){if(a.time==null){a.time=Date.now()}if(a.id==null){a.id=Math.random()}notifications.unshift(a);setNotificationCount(notifications.length);Q("chimes").play();clickNotificationIcon(true)}function deleteAllNotifications(){notifications=[];setNotificationCount(0);drawNotifications();QV("notifiyBox",false)}function setupServerStats(){window.serverStatCpu=new Chart(document.getElementById("serverCpuChart").getContext("2d"),{type:"doughnut",data:{datasets:[{data:[0,0],backgroundColor:["#AAAAAA","#00AA00"]}],labels:["Used","Free"]},options:{responsive:true,legend:{position:"none",},animation:{animateScale:true,animateRotate:true},width:"60px"}});window.serverStatMemory=new Chart(document.getElementById("serverMemoryChart").getContext("2d"),{type:"doughnut",data:{datasets:[{data:[0,0],backgroundColor:["#AAAAAA","#00AA00"]}],labels:["Used","Free"]},options:{responsive:true,legend:{position:"none",},animation:{animateScale:true,animateRotate:true},width:"60px"}})}var lastServerStats=null;function updateServerStats(d){if(d!=null){lastServerStats=d}else{d=lastServerStats}if(d==null){return}if(typeof d.cpuavg=="object"){var c=Math.min(d.cpuavg[0],1);window.serverStatCpu.config.data.datasets[0].data=[c,1-c];QH("serverCpuChartText",'<div style=margin-bottom:5px>CPU Load</div><div><b title="CPU load in the last minute">'+(Math.round(d.cpuavg[0]*100)/100)+'</b>, <b title="CPU load in the last 5 minutes">'+(Math.round(d.cpuavg[1]*100)/100)+'</b>, <b title="CPU load in the 15 minutes">'+(Math.round(d.cpuavg[2]*100)/100)+"</b></div>");QS("serverCpuChartView")["display"]="inline-block";window.serverStatCpu.update()}if((typeof d.totalmem=="number")&&(typeof d.freemem=="number")){window.serverStatMemory.config.data.datasets[0].data=[d.totalmem-d.freemem,d.freemem];QH("serverMemoryChartText","<div style=margin-bottom:5px>Memory</div><div><b>"+getNiceSize2(d.freemem)+"</b> free, <b>"+getNiceSize2(d.totalmem)+"</b> total</div>");QS("serverMemoryChartView")["display"]="inline-block";window.serverStatMemory.update()}var e="<div style=width:100% cellpadding=0 cellspacing=0>";if(typeof d.values=="object"){for(var a in d.values){e+="<div class=userTableHeader style=margin-bottom:4px;width:200px>"+a+"</div>";for(var b in d.values[a]){e+="<div style=display:inline-block><table style=width:300px;height:24px;background-color:#d3d9d6;margin-bottom:4px;vertical-align:middle;border-spacing:0><tr><td class=h1></td><td><span>"+b+"</span><span style=float:right>"+d.values[a][b]+"</span></td><td class=h2></td></tr></table></div>"}}}e+="</div>";QH("serverStatsTable",e)}var xxdialogMode;var xxdialogFunc;var xxdialogButtons;var xxdialogTag;var xxcurrentView=-1;function setDialogMode(j,k,a,e,d,h){xxdialogMode=j;xxdialogFunc=e;xxdialogButtons=a;xxdialogTag=h;QE("idx_dlgOkButton",true);QV("idx_dlgOkButton",a&1);QV("idx_dlgCancelButton",a&2);QV("id_dialogclose",(a&2)||(a&8));QV("idx_dlgDeleteButton",a&4);QV("idx_dlgButtonBar",a&7);if(k){QH("id_dialogtitle",k)}for(var g=1;g<24;g++){QV("dialog"+g,g==j)}QV("dialog",j);if(d){if(j==2){QH("id_dialogOptions",d)}else{QH("id_dialogMessage",d)}}}function dialogclose(e){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();if(((a&8)||e)&&c){c(e,d)}}function center(){if(xxcurrentView==11){deskAdjust()}else{if(xxcurrentView==10){masterUpdate(256)}else{if(xxcurrentView==1){masterUpdate(4)}}}}function messagebox(b,a){QH("id_dialogMessage",a);setDialogMode(1,b,1)}function statusbox(b,a){QH("id_dialogMessage",a);setDialogMode(1,b)}function goBack(){if(xxdialogMode){return}if((xxcurrentView>=10)&&(xxcurrentView<20)){go(1)}if((xxcurrentView>=20)&&(xxcurrentView<30)){go(2)}if((xxcurrentView>=30)&&(xxcurrentView<40)){go(4)}}function go(d){if(xxdialogMode||xxcurrentView==d){return}for(var a=0;a<32;a++){QV("p"+a,a==d)}xxcurrentView=d;var b=["LeftMenuMyDevices","LeftMenuMyAccount","LeftMenuMyEvents","LeftMenuMyFiles","LeftMenuMyUsers","LeftMenuMyServer"];for(var a in b){Q(b[a]).classList.remove("lbbuttonsel");Q(b[a]).classList.remove("lbbuttonsel2")}QV("topbar",d!=0);if(d>=10&&d<20){QS("MainMenuMyDevices").backgroundColor="#606060"}else{QS("MainMenuMyDevices").backgroundColor=((d==1)?"#003366":"#808080")}if(d==1||(d>=10&&d<20)){Q("LeftMenuMyDevices").classList.add("lbbuttonsel")}if(d==1){Q("LeftMenuMyDevices").classList.add("lbbuttonsel2")}if(d>=20&&d<30){QS("MainMenuMyAccount").backgroundColor="#606060"}else{QS("MainMenuMyAccount").backgroundColor=((d==2)?"#003366":"#808080")}if(d==2||(d>=20&&d<30)){Q("LeftMenuMyAccount").classList.add("lbbuttonsel")}if(d==2){Q("LeftMenuMyAccount").classList.add("lbbuttonsel2")}QS("MainMenuMyEvents").backgroundColor=((d==3)?"#003366":"#808080");if(d==3){Q("LeftMenuMyEvents").classList.add("lbbuttonsel","lbbuttonsel2")}if(d>=30&&d<40){QS("MainMenuMyUsers").backgroundColor="#606060"}else{QS("MainMenuMyUsers").backgroundColor=((d==4)?"#003366":"#808080")}if(d==4||(d>=30&&d<40)){Q("LeftMenuMyUsers").classList.add("lbbuttonsel")}if(d==4){Q("LeftMenuMyUsers").classList.add("lbbuttonsel2")}QS("MainMenuMyFiles").backgroundColor=((d==5)?"#003366":"#808080");if(d==5){Q("LeftMenuMyFiles").classList.add("lbbuttonsel","lbbuttonsel2")}QS("MainMenuMyServer").backgroundColor=(((d==6)||(d==115))?"#003366":"#808080");if(((d==6)||(d==115))){Q("LeftMenuMyServer").classList.add("lbbuttonsel","lbbuttonsel2")}if(webPageFullScreen){QS("column_l")["max-height"]="calc(100vh - 135px)"}else{QS("column_l")["max-height"]=(d>=10)?"calc(100vh - 159px)":"calc(100vh - 135px)"}if((d==0)&&(webPageFullScreen)){QS("page_content").position="";QV("page_leftbar",false);QS("column_l").height="calc(100vh - 110px)";QS("column_l")["max-height"]=""}QV("MainSubMenuSpan",d>=10&&d<20);QV("UserDummyMenuSpan",(d<10)&&(d!=6)&&webPageFullScreen);QV("MeshSubMenuSpan",d>=20&&d<30);QV("UserSubMenuSpan",d>=30&&d<40);QV("ServerSubMenuSpan",d==6||d==115);var c={10:"MainDev",11:"MainDevDesktop",12:"MainDevTerminal",13:"MainDevFiles",14:"MainDevAmt",15:"MainDevConsole",20:"MeshGeneral",30:"UserGeneral",31:"UserEvents",6:"ServerGeneral",115:"ServerConsole"};for(var a in c){Q(c[a]).classList.remove("style3x");Q(c[a]).classList.remove("style3sel");Q(c[a]).classList.add((d==a)?"style3sel":"style3x")}if(d==115){QV("p15",true)}QV("p15uploadCore",d!=115);QV("p15BackButton",d!=115);if((d==15)||(d==115)){setupConsole()}if(d==1){masterUpdate(4)}if((currentNode)&&(d>=10)&&(d<20)){document.title="MeshCentral - "+currentNode.name}else{document.title="MeshCentral"}}function joinPaths(){var c=[];for(var a in arguments){var b=arguments[a];if((b!=null)&&(b!="")){while(b.endsWith("/")||b.endsWith("\\")){b=b.substring(0,b.length-1)}while(b.startsWith("/")||b.startsWith("\\")){b=b.substring(1)}c.push(b)}}return c.join("/")}function putstore(b,c){try{if(typeof(localStorage)==="undefined"){return}localStorage.setItem(b,c)}catch(a){}}function getstore(b,d){try{if(typeof(localStorage)==="undefined"){return d}var c=localStorage.getItem(b);if((c==null)||(c==null)){return d}return c}catch(a){return d}}function addLink(b,a){return"<span style=cursor:pointer;text-decoration:none onclick='"+a+"'>"+b+" <img class=hoverButton width=10 height=10 src=images/link5.png></span>"}function addLinkConditional(d,b,a){if(a){return addLink(d,b)}return d}function haltEvent(a){if(a.preventDefault){a.preventDefault()}if(a.stopPropagation){a.stopPropagation()}return false}function addOption(c,d,a){var b=document.createElement("option");b.text=d;b.value=a;Q(c).add(b)}function passwordcheck(a){return(a.length>7)&&(/\d/.test(a))&&(/[a-z]/.test(a))&&(/[A-Z]/.test(a))&&(/\W/.test(a))}function methodcheck(a){if(a&&a!=null&&a.Body&&a.Body.ReturnValueStr!="SUCCESS"){messagebox("Call Error",a.Header.Method+": "+a.Body.ReturnValueStr.replace("_"," "));return true}return false}function TableStart(){return"<table cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}function TableStart2(){return"<table cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(a,b){return"<tr><td><p>"+a+"<td>"+b}function FullTable(c,a){var b=TableStart();for(i in c){if(i&&c[i]){b+=TableEntry(i,c[i])}}return b+TableEnd(a)}function TableEnd(a){return"<tr><td colspan=2><p>"+(a?a:"")+"</table>"}function AddButton(b,a){return"<input type=button value='"+b+"' onclick='"+a+"' style=margin:4px>"}function AddButton2(b,a){return"<input type=button value='"+b+"' onclick='"+a+"'>"}function AddRefreshButton(a){return"<input type=button name=refreshbtn value=Refresh onclick='refreshButtons(false);"+a+"' style=margin:4px "+(refreshButtonsState==false?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(e){var d=[],c;for(var a=0,b=e.options.length;a<b;a++){c=e.options[a];if(c.selected){d.push(c.value)}}return d}function getInstance(b,c){for(var a in b){if(b[a]["InstanceID"]==c){return b[a]}}return null}function getItem(b,c,d){for(var a in b){if(b[a][c]==d){return b[a]}}return null}function guidToStr(a){return a.substring(6,8)+a.substring(4,6)+a.substring(2,4)+a.substring(0,2)+"-"+a.substring(10,12)+a.substring(8,10)+"-"+a.substring(14,16)+a.substring(12,14)+"-"+a.substring(16,20)+"-"+a.substring(20)}function getUrlVars(){var d,a,e=[],b=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var c=0;c<b.length;c++){d=b[c].indexOf("=");if(d>0){e[b[c].substring(0,d)]=b[c].substring(d+1,b[c].length)}}return e}function addHtmlValue(a,b){return"<table><td style=width:120px>"+a+"<td><b>"+b+"</b></table>"}function addHtmlValue2(a,b){return"<div><div style=display:inline-block;float:right>"+b+"</div><div style=display:inline-block>"+a+"</div></div>"}function parseUriArgs(){var a,c={},b=window.document.location.href.split(/[\?&|\=]/);b.splice(0,1);for(d in b){switch(d%2){case 0:a=decodeURIComponent(b[d]);break;case 1:c[a]=decodeURIComponent(b[d]);var d=parseInt(c[a]);if(d==c[a]){c[a]=d}break;default:break}}return c}function focusTextBox(a){setTimeout(function(){Q(a).selectionStart=Q(a).selectionEnd=65535;Q(a).focus()},0)}function validateEmail(b){var a=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return a.test(b)}function isPrivateIP(b){return(b.startsWith("10.")||b.startsWith("172.16.")||b.startsWith("192.168."))}function u2fSupported(){return(window.u2f&&((navigator.userAgent.indexOf("Chrome/")>0)||(navigator.userAgent.indexOf("Firefox/")>0)||(navigator.userAgent.indexOf("Opera/")>0)||(navigator.userAgent.indexOf("Safari/")>0)))};</script></body></html>
\ No newline at end of file
1 +<!DOCTYPE html> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="format-detection" content="telephone=no"> <style>body{margin:0;padding:0;border:0;color:black;font-size:13px;font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;background-color:#d3d9d6;}#container{background-color:#fff;width:960px;min-width:960px;margin:0 auto;border-top:0;border-right:1px solid #b7b7b7;border-bottom:0;border-left:1px solid #b7b7b7;padding:0;}#masthead{width:auto;margin:0;padding:0;overflow:auto;text-align:right;background-color:#036;width:960px;}#column_l{position:relative;float:left;width:930px;margin:0;padding:0 15px;background-color:#fff;}#footer{clear:both;overflow:auto;width:100%;text-align:center;background-color:#113962;padding-top:5px;padding-bottom:5px;}#masthead img{float:left;}#masthead p{font-size:11px;color:#fff;margin:10px 10px 0;}#footer a{color:#fff;text-decoration:underline;}#footer a:hover{color:#fff;text-decoration:none;}a{color:#036;text-decoration:underline;}.i1{background:url(../images/icons50.png) 0px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i2{background:url(../images/icons50.png) -50px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i3{background:url(../images/icons50.png) -100px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i4{background:url(../images/icons50.png) -150px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i5{background:url(../images/icons50.png) -200px 0px;height:50px;width:50px;cursor:pointer;border:none;}.i6{background:url(../images/icons50.png) -250px 0px;height:50px;width:50px;cursor:pointer;border:none;}.j1{background:url(../images/icons16.png) 0px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j2{background:url(../images/icons16.png) -16px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j3{background:url(../images/icons16.png) -32px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j4{background:url(../images/icons16.png) -48px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j5{background:url(../images/icons16.png) -64px 0px;height:16px;width:16px;cursor:pointer;border:none;}.j6{background:url(../images/icons16.png) -80px 0px;height:16px;width:16px;cursor:pointer;border:none;}.lbbutton{width:74px;height:74px;border-radius:5px;background-color:white;margin-left:8px;margin-top:8px;position:relative;cursor:pointer;opacity:0.5;}.lbbutton:hover{opacity:1;}.lbbuttonsel{opacity:0.9;}.lbbuttonsel2{width:82px;border-radius:5px 0px 0px 5px;opacity:1;}.lb1{background:url(../images/leftbar-62.jpg) -0px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb2{background:url(../images/leftbar-62.jpg) -75px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb3{background:url(../images/leftbar-62.jpg) -150px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb4{background:url(../images/leftbar-62.jpg) -225px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb5{background:url(../images/leftbar-62.jpg) -294px 0px;height:62px;width:62px;cursor:pointer;border:none;}.lb6{background:url(../images/leftbar-62.jpg) -360px 0px;height:62px;width:62px;cursor:pointer;border:none;}.m0{background :url(../images/images16.png) -32px 0px;height :16px;width :16px;border:none;float:left }.m1{background :url(../images/images16.png) -16px 0px;height :16px;width :16px;border:none;float:left }.m2{background :url(../images/images16.png) -96px 0px;height :16px;width :16px;border:none;float:left }.m3{background :url(../images/images16.png) -112px 0px;height :16px;width :16px;border:none;float:left }.si0{background :url(../images/icons16.png) 0px 0px;height :16px;width :16px;border:none;float:left }.si1{background :url(../images/icons16.png) -16px 0px;height :16px;width :16px;border:none;float:left }.si2{background :url(../images/icons16.png) -32px 0px;height :16px;width :16px;border:none;float:left }.si3{background :url(../images/icons16.png) -48px 0px;height :16px;width :16px;border:none;float:left }.si4{background :url(../images/icons16.png) -64px 0px;height :16px;width :16px;border:none;float:left }.mi{background :url(../images/meshicon50.png) 0px 0px;height:50px;width:50px;cursor:pointer;border:none }#floatframe{position:fixed;top:200px;height:300px;z-index:200;display:none;}.style1{text-align:center;}.style2{text-align:center;background-color:#808080;font-weight:bold;}.style3{text-align:center;color:white;background-color:#808080;font-weight:bold;}.style3x{text-align:center;color:white;background-color:#808080;font-weight:bold;}.style3x:hover{background-color:#606060;}.style3sel{text-align:center;color:white;background-color:#003366;font-weight:bold;}.style4{color:white;text-decoration:none;}.style5{text-align:center;background-color:#808080;font-weight:normal;}.style6{text-align:center;background-color:#D3D9D6;}.style7{font-size:large;background-color:#FFFFFF;}.style10{background-color:#C9C9C9;}.style11{font-size:large;background-color:#C9C9C9;}.style14{text-align:left;background-color:#D3D9D6;}.auto-style1{text-align:right;background-color:#D3D9D6;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.fsize{float:right;text-align:right;width:180px;}.g1{background-position:0% 0%;width:14px;height:100%;float:left; background-image:linear-gradient(to right, #ffffff 0%, #c9c9c9 100%);background-color:#c9c9c9;background-repeat:repeat;background-attachment:scroll;}.g1s{background-image:linear-gradient(to right, #ffffff 0%, #b9b9b9 100%);}.g2{background-position:0% 0%;width:14px;height:100%;float:right; background-image:linear-gradient(to right, #c9c9c9 0%, #ffffff 100%);background-color:#c9c9c9;background-repeat:repeat;background-attachment:scroll;}.g2s{background-image:linear-gradient(to right, #b9b9b9 0%, #ffffff 100%);}.h1{background-position:0% 0%;width:14px;height:100%; background-image:linear-gradient(to right, #ffffff 0%, #d3d9d6 100%);background-color:#d3d9d6;background-repeat:repeat;background-attachment:scroll;}.h2{background-position:0% 0%;width:14px;height:100%; background-image:linear-gradient(to right, #d3d9d6 0%, #ffffff 100%);background-color:#d3d9d6;background-repeat:repeat;background-attachment:scroll;}.e1{font-size:large;margin-top:4px;margin-bottom:3px;overflow:hidden;word-wrap:hyphenate;white-space:nowrap;text-overflow:ellipsis;}.e2{float:left;height:100%;background-color:#c9c9c9;}.e2s{background-color:#b9b9b9;}.bar{font-size:large;background-color:#C9C9C9;height:24px;float:left;margin-bottom:2px;}.bar2{font-size:large;height:24px;float:left;margin-bottom:2px;}.bar18{font-size:large;background-color:#C9C9C9;height:18px;float:left;margin-bottom:2px;}.bar182{font-size:large;height:18px;float:left;margin-bottom:2px;}.devHeaderx{color:lightgray;}.DevSt{border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#DDDDDD;}.contextMenu{background:#F9F9F9;box-shadow:0 0 12px rgba( 0, 0, 0, .3 );border:1px solid #ccc; display:none;position:absolute;top:0;left:0;list-style:none;margin:0;padding:5px;min-width:100px;max-width:150px;z-index:500;}.cmtext{color:#444;display:inline-block;padding-left:8px;padding-right:8px;padding-top:5px;padding-bottom:5px;text-decoration:none;width:85%;cursor:default;overflow:hidden;position:relative;}.cmtext:hover{color:#f9f9f9;background:#444;}.gray{ filter:gray; -webkit-filter:grayscale(100%) opacity(60%); }.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.notifiyBox{position:absolute;z-index:1000;top:50px;right:26px;width:300px;text-align:left;background-color:#F0ECCD;border:4px solid #666;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-box-shadow:2px 2px 4px #888;-moz-box-shadow:2px 2px 4px #888;box-shadow:2px 2px 4px #888;max-height:200px;}.notifiyBox:before{content:' ';position:absolute;width:0;height:0;right:5px;top:-30px;border:15px solid;border-color:transparent #666 #666 transparent;}.notifiyBox:after{content:' ';position:absolute;width:0;height:0;right:7px;top:-24px;border:12px solid;border-color:transparent #F0ECCD #F0ECCD transparent;}.notification{width:100%;min-height:30px;}.notification:hover{background-color:#EFE8B6;}.deskToolsBar{padding:3px;}.deskToolsBar:hover{background-color:#EFE8B6;}.userTableHeader{border-bottom:1pt solid lightgray;padding-top:4px;padding-bottom:4px;}.viewSelector{width:32px;height:32px;background-color:#DDD;border-radius:3px;float:left;margin-left:5px;cursor:pointer;opacity:0.3;}.viewSelectorSel{background-color:#BBB;opacity:0.8;}.viewSelector:hover{opacity:0.5;background-color:#AAA;}.viewSelector1{margin-left:2px;margin-top:2px;background:url(../images/views.png) -0px 0px;height:28px;width:28px;}.viewSelector2{margin-left:2px;margin-top:2px;background:url(../images/views.png) -28px 0px;height:28px;width:28px;}.viewSelector3{margin-left:2px;margin-top:2px;background:url(../images/views.png) -56px 0px;height:28px;width:28px;}.viewSelector4{margin-left:2px;margin-top:2px;background:url(../images/views.png) -84px 0px;height:28px;width:28px;}.viewSelector5{margin-left:2px;margin-top:2px;background:url(../images/views.png) -112px 0px;height:28px;width:28px;}.backButtonEx{margin-left:2px;margin-top:2px;background:url(../images/views.png) -140px 0px;height:28px;width:28px;}.backButton{width:32px;height:32px;background-color:#DDD;border-radius:3px;float:left;margin-right:5px;cursor:pointer;opacity:0.3;}.backButton:hover{opacity:0.5;background-color:#AAA;}.hoverButton{opacity:0.5;}.hoverButton:hover{opacity:1;}</style> <style>.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f;}.ol-mouse-position{top:8px;right:8px;position:absolute;}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute;}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;}.ol-overlay-container{will-change:left,right,top,bottom;}.ol-unsupported{display:none;}.ol-unselectable, .ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing;}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab;}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px;}.ol-control:hover{background-color:rgba(255,255,255,.6);}.ol-zoom{top:.5em;right:.5em;}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear;}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s;}.ol-zoom-extent{top:4.643em;left:.5em;}.ol-full-screen{right:.5em;top:.5em;}@media print{.ol-control{display:none;}}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px;}.ol-control button::-moz-focus-inner{border:none;padding:0;}.ol-zoom-extent button{line-height:1.4em;}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform;}.ol-touch .ol-control button{font-size:1.5em;}.ol-touch .ol-zoom-extent{top:5.5em;}.ol-control button:focus, .ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7);}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0;}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px;}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);}.ol-attribution ul{margin:0;padding:0 .5em;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff;}.ol-attribution li{display:inline;list-style:none;line-height:inherit;}.ol-attribution li:not(:last-child):after{content:" ";}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle;}.ol-attribution button, .ol-attribution ul{display:inline-block;}.ol-attribution.ol-collapsed ul{display:none;}.ol-attribution.ol-logo-only ul{display:block;}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8);}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em;}.ol-attribution.ol-logo-only{background:0 0;bottom:.4em;height:1.1em;line-height:1em;}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em;}.ol-attribution.ol-logo-only button, .ol-attribution.ol-uncollapsible button{display:none;}.ol-zoomslider{top:4.5em;left:.5em;height:200px;}.ol-zoomslider button{position:relative;height:10px;}.ol-touch .ol-zoomslider{top:5.5em;}.ol-overviewmap{left:.5em;bottom:.5em;}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0;}.ol-overviewmap .ol-overviewmap-map, .ol-overviewmap button{display:inline-block;}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px;}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute;}.ol-overviewmap.ol-collapsed .ol-overviewmap-map, .ol-overviewmap.ol-uncollapsible button{display:none;}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8);}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7);}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move;}</style> <style> .ol-ctx-menu-container{position:absolute;padding:8px;background:#fff;color:#222;font-size:13px;border-radius:5px;box-shadow:3px 3px 5px rgba(0,0,0,.2);box-sizing:border-box}.ol-ctx-menu-container a,.ol-ctx-menu-container div,.ol-ctx-menu-container img,.ol-ctx-menu-container li,.ol-ctx-menu-container span,.ol-ctx-menu-container ul{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.ol-ctx-menu-container a img{border:none}.ol-ctx-menu-container *,.ol-ctx-menu-container :after,.ol-ctx-menu-container :before{box-sizing:inherit}.ol-ctx-menu-container.ol-ctx-menu-hidden{opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .3s,opacity .3s;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container ul{list-style:none}.ol-ctx-menu-container li{position:relative;line-height:20px;padding:2px 5px}.ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover{cursor:pointer;background-color:#333;color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-submenu .ol-ctx-menu-container{border:1px solid #eee;padding:8px;top:0;opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .3s,opacity .3s;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover .ol-ctx-menu-container{opacity:1;visibility:visible;-webkit-transition-delay:0s;transition-delay:0s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:after{position:absolute;top:7px;right:10px;content:"";display:inline-block;width:.6em;height:.6em;border-right:.3em solid #222;border-top:.3em solid #222;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover:after{border-color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-separator{padding:0}.ol-ctx-menu-container li.ol-ctx-menu-separator hr{border:0;height:1px;background-image:-webkit-linear-gradient(right,transparent,rgba(0,0,0,.75),transparent);background-image:linear-gradient(270deg,transparent,rgba(0,0,0,.75),transparent)}.ol-ctx-menu-icon{text-indent:20px;background-size:20px auto;background-repeat:no-repeat;background-position:0}.ol-ctx-menu-zoom-in{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaUlEQVQ4T72U7VHCQBCGn90GtAMuNGCswFiBWIFQgWMFxg6wArECsQKhArEBiB1Qwa1zgQn5IAYcxv13k71n3919L8KJQ07M47+BzgG9TRfZ/JBuWhS6BJFHRJICYrZGZIz3z5Ct2+B7gG6I6kt+wewdkQVwjtkAkR5mC8yu26A1oItR/cTsOweQBdgutD8G7jGm2PJ2n8oqUKIpIjd4HxTM8gvaT/F+AlmWnyWaIXKF95eNguFzTYFhNsdWu9kFgFlaFMANUH3D8wDLoLgSTSD2il8NCe2ZXQBxWDGwxmyUzzOMBZ7wy7Qb2K0wQfXjMOBuhlFpZtNty5sFaTQBuTusZdymeqs1SpYKcO9HkE3KbTd9WFijMHJQ5hBNEAYNq5Qd0dhyke0GiE4QzjqfW23mHT8Hl4DG4Lce3FPE7AtbBSdsbNqpoJLgYkRnNeUV+xwJDHTnUEkxHGbhBXUs5TjJjew/KPy94g+NRaIVRYmMXwAAAABJRU5ErkJggg==")}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-in{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABc0lEQVQ4T71U21ECQRDsJgGdvQDECMQIxAjECMQILCPwzAAjECIQI0AiEDPQAPaWCBhrcKHuCUcV5f7dY3v6tUscefHIePhfwBBCF8CZqRCReRs1tQxDCH1VfQLQz4EsSY4AvIjIsgm8AhhCGKrqa9zwrqoLAKckB5HtguR1E2gBMITQU9VPAD8GICIGtl3e+xHJBwBT59xtHcsCYJZlUwA3kcGHbfDep51OZywi3/acZZm9vyJ5WR5o38uACmDunNt6ZwAkUxFZDwghDFT1jeSjiJinhVUBVNVJkiTDKO8CQA+AsbNQ7s1Ps0VVn5MkSfcCtmBoDZi1Bdx4eJ7zbBolrwPy3o9J3rWSHPs3A1BbjVKlYBaIyDgvu9LDXDU2RTZmXVW1oKyLxRD+OrkOrJLy5mVM0iaftDhuhVbsvBzMglzKUNW6IV/OOWtCM8MmVvEkmbwt83LaB19fdgOtVquUZJeknaDdobTwbOcvBzPcN/AXH1DFFWP7u9oAAAAASUVORK5CYII=")}.ol-ctx-menu-zoom-out{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABU0lEQVQ4T72U7VECMRRFz3sNaAdkacC1AtcKxApcKnCsQOwAK3CtQKxAqEBsANYOqCDPyTIC+8WCw5jfybn33dxEOPGSE/P4b6BzQG89RT47ZJoWhy5B5BGRZAMxWyEyxvtnyFdt8AagS1F9KQ6YvSMyB84xGyDSw2yO2XUbtAJ0MaqfmH0XAPIA2y7tj4F7jAm2uG1yWQZKNEHkBu+Dg2njWBJNEbnC+8uaIFRuWfuG2QxbbrOrUd0A1Tc8D7AIjkur7DAAsVf8MiWMZ3ZR2m02LPIMscATfjHqBnY7TFD9OAy4zTCCPG/MUKMM5O6wkXFr9dZq7FQqqHk/hDzbFa73cFONTZFDdRyiCcKg5rrSiLaXkiI6RjjrfG6VzDs+B5eAxuDXeYpmNRGzL2wZ/wof+du4GNFpBVqqz5HA4MM5VEYYDrOs+1I6Q9u/4Q8O9wN/AGgWjBVqQjjgAAAAAElFTkSuQmCC")}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-out{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABYklEQVQ4T72U4VHCQBCF36tA91KAWIFYgViBWIFYgWMFYgdYgVCBWAFSgdiBFpAsFWSdxcDkQoBkhnF/ZjbfvX377ogjF4/Mw/8CVbUD4MynEJF5k2lqFapqz8yeAPRKkCXJEYAXEVnugm8BVXVgZq/FD+9mtgBwSrJfqF2QvN4FjYCq2jWzTwA/DhARh20qTdMRyQcA0xDCbZ3KCJhl2RTATaHgo+6HLMv8+xXJy+qB3l8FGoB5CKHsXcRV1b6ZvZF8FBH3NKotoJlNkiQZFONdlLtJ3rufbouZPSdJMjwIbKDQEzBrClx7eC4i33Uepmk6JnnXaOQifzMAtdGoRApugYiMI1uqKkrRWAfZo9MxM1+UZzFewl8mN4nYdVM83L7BkwbXLUrF3sfBLQDQBbDy08x8vOohXyEE71lVq9emuEk+3gZa3XYroCvwFyjP8yHJDsnxwaU08GxvS2uFhw78BbzWrxXgMbsHAAAAAElFTkSuQmCC")}</style> <script type="text/javascript" src="scripts/charts.js"></script> <script type="text/javascript" src="scripts/filesaver.1.1.20151003.js"></script> <script type="text/javascript" src="scripts/ol.js"></script> <script type="text/javascript" src="scripts/ol3-contextmenu.js"></script> <title>MeshCentral</title> </head> <body id="body" onload="if (typeof(startup) !== 'undefined') startup();" oncontextmenu="handleContextMenu(event)" style="display:none"> <div id="contextMenu" class="contextMenu noselect" style="display:none"> <div id="cxinfo" class="cmtext" onclick="cmaction(1,event)"><b>Information</b></div> <div id="cxdesktop" class="cmtext" onclick="cmaction(3,event)">Desktop</div> <div id="cxterminal" class="cmtext" onclick="cmaction(2,event)">Terminal</div> <div id="cxfiles" class="cmtext" onclick="cmaction(4,event)">Files</div> <div id="cxevents" class="cmtext" onclick="cmaction(5,event)">Events</div> <div id="cxconsole" class="cmtext" onclick="cmaction(6,event)">Console</div> <hr id="cxmgroupsplit"> <div id="cxmdesktop" class="cmtext" onclick="cmaction(7,event)" style="display:none">Multi-Desktop</div> </div> <div id="meshContextMenu" class="contextMenu,noselect" style="display:none;min-width:0px"> <div id="cxselectall" class="cmtext" onclick="cmmeshaction(1,event)">Select All</div> <div id="cxselectnone" class="cmtext" onclick="cmmeshaction(2,event)">Select None</div> <hr id="cxmgroupsplit2" style="display:none"> <div id="cxmmdesktop" class="cmtext" style="display:none" onclick="cmmeshaction(3,event)">Multi-Desktop</div> </div> <div id="container" style="max-height:100vh;position:relative"> <div id="notifiyBox" class="notifiyBox" style="display:none"></div> <div id="mastheadx"></div> <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"> <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px"> <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title}}}</font></strong> </div> <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px"> <strong><font style="font-size:14px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong> </div> <div style="float:right"> <div id="notificationCount" onclick="clickNotificationIcon()" class="unselectable" style="display:none;min-width:28px;font-size:20px;border-radius:5px;background-color:lightblue;text-align:center;margin:8px;cursor:pointer;padding:4px" title="Click to view current notifications">0</div> </div> <p id="logoutControl">{{{logoutControl}}}</p> </div> <div id="page_leftbar" style="height:calc(100vh - 66px);width:90px;position:absolute;z-index:1000;background:#113962;background:linear-gradient(to bottom, #104893 0%,#113962 100%);color:white;display:none"> <div style="height:16px"></div> <div id="LeftMenuMyDevices" class="lbbutton lbbuttonsel" title="My Devices" onclick="go(1)"> <div class="lb2" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyAccount" class="lbbutton" title="My Account" onclick="go(2)"> <div class="lb1" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyEvents" class="lbbutton" title="My Events" onclick="go(3)"> <div class="lb3" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyFiles" class="lbbutton" title="My Files" onclick="go(5)"> <div class="lb4" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyUsers" class="lbbutton" title="My Users" onclick="go(4)"> <div class="lb5" style="position:absolute;top:6px;left:6px"></div> </div> <div id="LeftMenuMyServer" class="lbbutton" title="My Server" onclick="go(6)" style="display:none"> <div class="lb6" style="position:absolute;top:6px;left:6px"></div> </div> </div> <div id="page_content" style="max-height:calc(100vh - 130px)"> <div id="topbarmaster"> <div id="topbar" class="noselect"> <div> <div style="position:relative"> <div style="position:absolute;top:3px;right:6px"> <span title="Toggle full width" style="cursor:pointer;color:white" onclick="toggleFullScreen(1)">&harr;</span> </div> <table id="MainMenuSpan" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="MainMenuMyDevices" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(1)">My Devices</td> <td id="MainMenuMyAccount" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(2)">My Account</td> <td id="MainMenuMyEvents" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(3)">My Events</td> <td id="MainMenuMyFiles" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(5)">My Files</td> <td id="MainMenuMyUsers" style="width:100px;height:24px;cursor:pointer;display:none" class="style3x" onclick="go(4)">My Users</td> <td id="MainMenuMyServer" style="width:100px;height:24px;cursor:pointer;display:none" class="style3x" onclick="go(6)">My Server</td> <td class="style3" style="text-align:right;height:24px">&nbsp;</td> </tr> </table> <div id="MainSubMenuSpan" style="display:none"> <table id="MainSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="MainDev" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(10)">General</td> <td id="MainDevDesktop" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(11)">Desktop</td> <td id="MainDevTerminal" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(12)">Terminal</td> <td id="MainDevFiles" style="width:100px;height:24px;cursor:pointer;display:none" class="style3x" onclick="go(13)">Files</td> <td id="MainDevEvents" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(16)">Events</td> <td id="MainDevAmt" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(14)">Intel&reg; AMT</td> <td id="MainDevConsole" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(15)">Console</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="MeshSubMenuSpan" style="display:none"> <table id="MeshSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="MeshGeneral" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(20)">General</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="UserSubMenuSpan" style="display:none"> <table id="UserSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="UserGeneral" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(30)">General</td> <td id="UserEvents" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(31)">Events</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="ServerSubMenuSpan" style="display:none"> <table id="ServerSubMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr> <td id="ServerGeneral" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(6)">General</td> <td id="ServerConsole" style="width:100px;height:24px;cursor:pointer" class="style3x" onclick="go(115)">Console</td> <td class="style3" style="height:24px">&nbsp;</td> </tr> </table> </div> <div id="UserDummyMenuSpan"> <table id="UserDummyMenu" style="width:100%;height:22px" cellpadding="0" cellspacing="0" class="style1"> <tr><td class="style3" style="text-align:right;height:24px">&nbsp;</td></tr> </table> </div> </div> </div> </div> </div> <div id="column_l"> <div id="p0" style="display:none"> <div id="p0message" style="margin:50px;text-align:center"><span id="p0span">Server disconnected</span>, <href onclick="reload()" style="cursor:pointer"><u>click to reconnect</u></href>.</div> </div> <div id="p1" style="display:none"> <div style="float:right;display:none" id="devListToolbarViewIcons"> <div id="devViewButton1" class="viewSelector" onclick="onDeviceViewChange(1)" title="Columns"><div class="viewSelector2"></div></div> <div id="devViewButton2" class="viewSelector" onclick="onDeviceViewChange(2)" title="List"><div class="viewSelector1"></div></div> <div id="devViewButton3" class="viewSelector" onclick="onDeviceViewChange(3)" title="Desktops"><div class="viewSelector3"></div></div> <div id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" title="Map"><div class="viewSelector4"></div></div> </div><div><h1>My Devices</h1></div> <table class="noselect" style="width:100%;height:24px;background-color:#d3d9d6;vertical-align:middle;border-spacing:0"> <tr> <td class="h1"></td> <td id="devListToolbar" class="style14" style="display:none"> &nbsp;&nbsp;<input type="button" id="SelectAllButton" onclick="selectallButtonFunction();" value="Select All">&nbsp; <input type="button" id="GroupActionButton" disabled="disabled" value="Group Action" onclick="groupActionFunction()">&nbsp; <input id="SearchInput" type="text" style="width:120px" placeholder="Filter" onchange="masterUpdate(5)" onkeyup="masterUpdate(5)" autocomplete="off" onfocus="onSearchFocus(1)" onblur="onSearchFocus(0)">&nbsp; <label><input type="checkbox" id="RealNameCheckBox" onclick="onRealNameCheckBox()"><span title="Show devices operating system name">OS Name</span></label> </td> <td id="kvmListToolbar" class="style14" style="height:100%;display:none"> &nbsp;&nbsp;<input type="button" onclick="connectAllKvmFunction()" value="Connect All">&nbsp; <input type="button" onclick="disconnectAllKvmFunction()" value="Disconnect All">&nbsp; <label><input type="checkbox" id="autoConnectDesktopCheckbox" onclick="autoConnectDesktops(event)" title="Automatic connect">Auto&nbsp;</label> <input type="button" onclick="showMultiDesktopSettings()" value="Settings">&nbsp; </td> <td id="devMapToolbar" class="style14" style="height:100%;display:none"> &nbsp;&nbsp;<input type="text" id="mapSearchLocation" placeholder="Search Location" onfocus="onMapSearchFocus(1)" onblur="onMapSearchFocus(0)"> <input type="button" value="Search" title="Search for location" onclick="getSearchLocation()"> <input type="button" id="refreshmap" title="Reset map view" value="Reset" style="margin-left:5px" onclick="refreshMap(false,true)"> </td> <td class="auto-style1" style="height:100%"> <div style="float:right;display:none" id="devListToolbarView"> View <select id="viewselect" onchange="onDeviceViewChange()"> <option value="1">Columns <option value="2">List <option value="3">Desktops <option id="viewselectmapoption" value="4">Map </select> </div> <div style="float:right;display:none" id="devListToolbarSort"> Sort <select id="sortselect" onchange="masterUpdate(6)"> <option>Group <option>Power <option>Device <option>Tags </select> &nbsp; </div> <div style="float:right;display:none" id="devListToolbarSize"> Size <select id="sizeselect" onchange="onDeviceViewChange()"> <option value="0">Small <option value="1">Medium <option value="2">Large </select> &nbsp; </div> </td> <td class="h2"></td> </tr> </table> <div id="NoMeshesPanel" style="display:none"> <table style="width:100%;padding:20px"> <tr> <td valign="top" style="width:50px"> <img src="images/info.png" height="48" width="47"> </td> <td> To get started, <a onclick="account_createMesh()" style="cursor:pointer"><strong>click here to create a device group</strong></a>. </td> </tr> </table> </div> <div id="xdevices" class="noselect" style="max-height:calc(100vh - 239px);overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;display:none"></div> <div id="xdevicesmap" style="height:calc(100vh - 239px);width:100%;overflow:hidden;position:relative;display:none"> <div id="xmapSearchResultsDlg" style="position:absolute;display:none;max-height:280px;left:5px;top:5px;max-width:250px;z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666"> <div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"> <div id="xmapSearchClose" style="float:right;padding:5px;cursor:pointer" onclick="mapCloseSearchWindow()"><b>X</b></div> <div style="padding:5px">Location Results</div> <div style="width:100%;margin:6px"></div> </div> <div id="xmapSearchResults" style="margin:6px"></div> </div> </div> <div id="xmap-info-window" style="text-shadow:0px 0px 15px #FFF"></div> </div> <div id="p2" style="display:none"> <h1>My Account</h1> <img id="p2AccountImage" alt="" width="150" height="103" src="images/mainaccount.jpg" style="margin-bottom:10px;margin-right:20px;float:right"> <div id="p2AccountSecurity" style="display:none"> <p><strong>Account security</strong></p> <div style="margin-left:25px"> <div id="manageAuthApp"><div style="width:15px;display:inline-block"><span id="authAppSetupCheck" style="color:green;font-size:10px"><strong>&#x2713;</strong></span></div><span><a onclick="account_manageAuthApp()" style="cursor:pointer">Manage authenticator app</a><br></span></div> <div id="manageHardwareOtp"><div style="width:15px;display:inline-block"><span id="authKeySetupCheck" style="color:green;font-size:10px"><strong>&#x2713;</strong></span></div><span><a onclick="account_manageHardwareOtp(0)" style="cursor:pointer">Manage security keys</a><br></span></div> <div id="manageOtp"><div style="width:15px;display:inline-block"><span id="authCodesSetupCheck" style="color:green;font-size:10px"><strong>&#x2713;</strong></span></div><span><a onclick="account_manageOtp(0)" style="cursor:pointer">Manage backup codes</a><br></span></div> </div> </div> <div id="p2AccountActions"> <p><strong>Account actions</strong></p> <p style="margin-left:40px"> <span id="verifyEmailId" style="display:none"><a onclick="account_showVerifyEmail()" style="cursor:pointer">Verify email</a><br></span> <a onclick="account_showChangeEmail()" style="cursor:pointer">Change email address</a><br> <a onclick="account_showChangePassword()" style="cursor:pointer">Change password</a><span id="p2nextPasswordUpdateTime"></span><br> <a onclick="account_showDeleteAccount()" style="cursor:pointer">Delete account</a><br> </p> <br style="clear:both"> </div> <strong>Device Groups</strong> ( <a onclick="account_createMesh()" style="cursor:pointer"><img height="12" src="images/icon-addnew.png" width="12" border="0"> New</a> ) <br><br> <div id="p2meshes"></div> <div id="p2noMeshFound" style="margin-left:40px;display:none">No device groups. <a onclick="account_createMesh()" style="cursor:pointer"><strong>Get started here!</strong></a></div> <br style="clear:both"> </div> <div id="p3" style="display:none"> <h1>My Events</h1> <table style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px;vertical-align:middle;border-spacing:0"> <tr> <td class="h1"></td> <td>&nbsp;<input id="p2deleteall" type="button" onclick="showDeleteAllEventsDialog()" style="display:none" value="Delete All..."></td> <td class="auto-style1"> Show <select id="p3limitdropdown" onchange="refreshEvents()"> <option value="60">Last 60 <option value="120">Last 120 <option value="250">Last 250 <option value="500">Last 500 <option value="1000">Last 1000 </select> </td> <td class="h2"></td> </tr> </table> <div id="p3events" style="height:calc(100vh - 243px);overflow-y:scroll"></div> </div> <div id="p4" style="display:none"> <h1>My Users</h1> <table style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px;vertical-align:middle;border-spacing:0"> <tr> <td class="h1"></td> <td class="style14"> <div style="float:right"> <input type="button" onclick="showUserBroadcastDialog()" style="margin-right:6px" value="Broadcast"> </div> <div> <input id="UserNewAccountButton" type="button" style="margin-left:6px" onclick="showCreateNewAccountDialog()" value="New Account..."> <input id="UserSearchInput" type="text" style="width:120px;margin-left:6px" placeholder="Filter" onchange="onUserSearchInputChanged()" onkeyup="onUserSearchInputChanged()" autocomplete="off" onfocus="onUserSearchFocus(1)" onblur="onUserSearchFocus(0)"> </div> </td> <td class="h2"></td> </tr> </table> <div id="p3users" style="max-height:calc(100vh - 243px);overflow-y:auto"></div> </div> <div id="p5" style="display:none"> <h1>My Files</h1> <table id="p5toolbar" style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign="bottom"> <div id="p5rightOfButtons" style="float:right;margin-top:3px"></div> <div> <input type="button" id="p5FolderUp" disabled="disabled" onclick="p5folderup();" value="Up">&nbsp; <input type="button" id="p5SelectAllButton" disabled="disabled" onclick="p5selectallfile();" value="Select All" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5RenameFileButton" disabled="disabled" value="Rename" onclick="p5renamefile();" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5DeleteFileButton" disabled="disabled" value="Delete" onclick="p5deletefile();" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5NewFolderButton" disabled="disabled" value="New Folder" onclick="p5createfolder();" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5UploadButton" disabled="disabled" value="Upload" onclick="p5uploadFile()" onkeypress="return false;" onkeydown="return false;">&nbsp; <input type="button" id="p5CutButton" disabled="disabled" value="Cut" onclick="p5copyFile(1)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p5CopyButton" disabled="disabled" value="Copy" onclick="p5copyFile(0)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p5PasteButton" disabled="disabled" value="Paste" onclick="p5pasteFile()" onkeypress="return false" onkeydown="return false">&nbsp; </div> </td> </tr> <tr> <td style="background-color:#E4E9E7;height:28px"> <div style="float:right"> <select id="p5sortdropdown" onchange="updateFiles()"> <option value="1" selected="selected">Sort by name <option value="2">Sort by size <option value="3">Sort by date <option value="4">Descend by name <option value="5">Descend by size <option value="6">Descend by date </select> </div> <div>&nbsp;&nbsp;<span id="p5currentpath"></span></div> </td> </tr> </table> <div id="p5filetable" style="width:100%;height:calc(100vh - 294px);overflow:auto;-webkit-user-select:none;position:relative"> <div id="p5PublicShare" style="display:none;width:100%;overflow:auto;-webkit-user-select:none;background-color:lightsteelblue"><div style="padding:4px">These files are shared publicly, click "link" to get public url.</div></div> <div id="bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:20px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&checkmark;</b></div> <div id="bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:20px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&#10007;</b></div> <span id="p5files"></span> </div> <table id="p5toolbarBottom" style="width:100%" cellpadding="0" cellspacing="0"> <tr><td class="style6" style="text-align:left;padding:3px">&nbsp;<span id="p5bottomstatus"></span></td></tr> </table> </div> <div id="p6" style="display:none"> <img id="MainMeshImage" src="serverpic.ashx" style="border-width:0px;height:200px;width:200px;float:right"> <h1>My Server</h1> <p id="p2ServerActions"><strong>Server actions</strong></p> <p style="margin-left:40px"> <div id="p2ServerActionsBackup" style="margin-left:40px"><a href="/backup.zip" rel="noreferrer noopener" target="_blank" style="cursor:pointer">Download server backup</a></div> <div id="p2ServerActionsRestore" style="margin-left:40px"><a onclick="server_showRestoreDlg()" style="cursor:pointer">Restore server with backup</a></div> <div id="p2ServerActionsVersion" style="margin-left:40px"><a onclick="server_showVersionDlg()" style="cursor:pointer">Check server version</a></div> <div id="p2ServerActionsErrors" style="margin-left:40px"><a onclick="server_showErrorsDlg()" style="cursor:pointer">Show server error log</a></div> </p> <br><strong>Server Statistics</strong><br><br> <div id="serverStats" style="margin-left:40px"> <div id="serverCpuChartView" style="display:none"> <div style="width:60px;display:inline-block"><canvas id="serverCpuChart" style="width:60px;height:60px"></canvas></div> <div style="width:160px;display:inline-block" id="serverCpuChartText"></div> </div> <div id="serverMemoryChartView" style="display:none"> <div style="width:60px;display:inline-block"><canvas id="serverMemoryChart" style="width:60px;height:60px"></canvas></div> <div style="width:160px;display:inline-block" id="serverMemoryChartText"></div> </div><br><br> <div id="serverStatsTable"></div> </div> </div> <div id="p10" style="display:none"> <table style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="width:auto" valign="top"> <div id="p10title"> <div id="p10BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>General - <span id="p10deviceName"></span></h1> </div> <div id="p10html"></div> </td> <td style="width:20px"></td> <td style="width:200px"> <a style="cursor:pointer" onclick="p10showiconselector()"><img id="MainComputerImage" style="border-width:0px;height:200px;width:200px"></a> <div style="width:100%;text-align:center"><strong><span id="MainComputerState"></span></strong></div> </td> </tr> </table><br> <div id="p10html2"></div> <div id="p10html3"></div> </div> <div id="p11" class="noselect" style="display:none"> <div id="p11title"> <div id="p11deviceNameHeader"> <div id="p11BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <div style="float:right" id="devListToolbarViewIcons"><div class="viewSelector" onclick="deskToggleFull(event)" title="Full Screen. Hold shift to browser full screen."><div class="viewSelector5"></div></div></div> <h1>Desktop - <span id="p11deviceName"></span></h1> </div> </div> <div id="p14warning" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showFeaturesDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Intel&reg; AMT Redirection port or KVM feature is disabled<span id="p14warninga">, click here to enable it.</span></div> </div> <div id="p14warning2" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showPowerActionDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Remote computer is not powered on, click here to issue a power command.</div> </div> <table id="deskarea0" cellpadding="0" cellspacing="0" style="width:100%;padding:0px;padding:0px;margin-top:0px"> <tr id="deskarea1"> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <span id="p14power"></span>&nbsp; <div style='cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px' title="Rotate Left" onclick="drotate(-1)">&olarr;</div> <div style='cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px' title="Rotate Right" onclick="drotate(1)">&orarr;</div> <input id="deskFocusBtn" type="button" title="Toggle focus mode, when active only the region around the mouse is updated" onkeypress="return false" onkeydown="return false" value="Focus All" onclick="deskToggleFocus()" style="margin-right:3px;display:none"> <input id="deskSaveBtn" type="button" title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value="Save..." onclick="deskSaveImage()" style="margin-right:3px"> <input id="deskActionsBtn" type="button" title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value="Actions" onclick="deviceActionFunction()" style="margin-right:3px"> <input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" style="margin-right:3px"> <input type="button" title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="margin-right:3px;display:none"> </div> <div> <div id="idx_deskFullBtn2" onclick="deskToggleFull(event)" style="float:left;font-size:large;cursor:pointer;display:none">&nbsp;&#x2716;</div> <input type="button" id="autoconnectbutton1" value="AutoConnect" onclick="autoConnectDesktop(event)" onkeypress="return false" onkeydown="return false" style="display:none"> <span id="connectbutton1span">&nbsp;<input type="button" id="connectbutton1" value="Connect" onclick="connectDesktop(event,1)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="connectbutton1hspan">&nbsp;<input type="button" id="connectbutton1h" value="HW Connect" onclick="connectDesktop(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="disconnectbutton1span">&nbsp;<input type="button" id="disconnectbutton1" value="Disconnect" onclick="connectDesktop(event,0)" onkeypress="return false" onkeydown="return false"></span> &nbsp;<span id="deskstatus">Disconnected</span> </div> </td> </tr> <tr id="deskarea2"> <td> <div style="background-color:gray"><div id="progressbar" style="height:2px;width:0%;background-color:red"></div></div> </td> </tr> <tr id="deskarea3"> <td id="deskarea3x" style="background:black;text-align:center;position:relative;overflow:hidden"> <div id="DeskFocus" style="overflow:hidden;color:transparent;border:3px dotted rgba(255,0,0,.2);position:absolute;border-radius:5px" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)"></div> <div id="DeskParent" style="overflow:hidden"> <canvas id="Desk" width="640" height="480" style="overflow:hidden;width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)" onmousewheel="dmousewheel(event)"></canvas> </div> <div id="DeskTools" style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid lightgray;display:none"> <a id="DeskToolsRefreshButton" style="float:right;padding:3px;cursor:pointer" onclick="refreshDeskTools()">Refresh</a> <div id="DeskToolsBar" style="position:absolute;padding:3px;border-radius:3px 3px 0px 0px;top:5px;left:4px;bottom:26px;background-color:lightgray;cursor:pointer">Processes</div> <div style="position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:lightgray;text-align:left"> <div style="border-bottom:1px solid darkgray;padding:3px"><a style="width:50px;padding-right:5px;float:left;cursor:pointer" title="Sort by process id" onclick="sortProcess(0)">PID</a><a style="cursor:pointer" title="Sort by name" onclick="sortProcess(1)">Name</a></div> <div id="DeskToolsProcesses" style="overflow-y:scroll;position:absolute;top:24px;bottom:0px;width:100%"></div> </div> </div> </td> </tr> <tr id="deskarea4"> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <select id="termdisplays" style="display:none" onchange="deskSetDisplay(event)" onclick="deskGetDisplayNumbers(event)"></select>&nbsp; <input id="DeskToolsButton" type="button" value="Tools" title="Toggle tools view" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">&nbsp; <span id="DeskChatButton" style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Open chat window to this computer"><img src='images/icon-chat.png' onclick="deviceChat()" height="16" width="16" style="padding-top:2px"></span> <span id="DeskNotifyButton" style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Display a notification on the remote computer"><img src='images/icon-notify.png' onclick="deviceToastFunction()" height="16" width="16" style="padding-top:2px"></span> <span id="DeskOpenWebButton" style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Open a web address on remote computer"><img src='images/icon-url2.png' onclick="deviceUrlFunction()" height="16" width="16" style="padding-top:2px"></span> </div> <div> <select style="margin-left:6px" id="deskkeys"> <option value="5">Win <option value="0">Win+Down <option value="1">Win+Up <option value="2">Win+L <option value="3">Win+M <option value="4">Shift+Win+M <option value="6">Win+R </select> <input id="DeskWD" type="button" value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()"> <input id="DeskClip" style="margin-left:6px;display:none" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()"> <input id="DeskCAD" type="button" value="Ctrl-Alt-Del" onkeypress="return false" onkeydown="return false" onclick="sendCAD()"> <label><span id="DeskControlSpan" style="margin-left:6px" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()">Input</span></label>&nbsp; </div> </td> </tr> </table> </div> <div id="p12" style="display:none"> <div id="p12title"> <div id="p12BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Terminal - <span id="p12deviceName"></span></h1> </div> <div id="p12warning" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showFeaturesDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Intel&reg; AMT Redirection port or KVM feature is disabled<span id="p14warninga">, click here to enable it.</span></div> </div> <div id="p12warning2" style='max-width:100%;display:none;cursor:pointer;margin-bottom:5px' onclick="showPowerActionDlg()"> <div class="icon2" style="float:left;margin:7px"></div> <div style='width:auto;border-radius:8px;padding:8px;background-color:lightsalmon'>Remote computer is not powered on, click here to issue a power command.</div> </div> <table cellpadding="0" cellspacing="0" style="width:100%;padding:0px;padding:0px;margin-top:0px"> <tr> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <input id="termActionsBtn" type="button" title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value="Actions" onclick="deviceActionFunction()" style="margin-right:3px"> </div> <div> <input type="button" id="autoconnectbutton2" value="AutoConnect" onclick="autoConnectTerminal(event)" onkeypress="return false" onkeydown="return false" style="display:none"> <span id="connectbutton2span">&nbsp;<input type="button" id="connectbutton2" value="Connect" onclick="connectTerminal(event,1)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="connectbutton2hspan">&nbsp;<input type="button" id="connectbutton2h" value="HW Connect" onclick="connectTerminal(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span> <span id="disconnectbutton2span">&nbsp;<input type="button" id="disconnectbutton2" value="Disconnect" onclick="connectTerminal(event,0)" onkeypress="return false" onkeydown="return false"></span> &nbsp;<span id="termstatus">Disconnected</span> </div> </td> </tr> <tr> <td> <div style="background-color:gray"><div id="termprogressbar" style="height:2px;width:0%;background-color:red"></div></div> </td> </tr> <tr> <td style="background:black;text-align:center;height:500px;position:relative"> <pre id="Term" style="background:black;margin:0;padding:0"></pre> </td> </tr> <tr> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <div style="float:right;text-align:right"> <span id="terminalSettingsButtons" style="display:none"> <input id="id_tcrbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="CR+LF" title="Toggle what the return key will send" onclick="termToggleCr()"> <input id="id_tfxkeysbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx()"> <input id="id_ttypebutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType()"> </span> <select id="specialkeylist" onkeypress="return false" style="margin-left:5px"></select> <input id="specialkeylistinput" type="button" onkeypress="return false" class="bottombutton" value="Send" title="Send the selected special key" onclick="sendSpecialKey()"> </div> <div> &nbsp; <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="ctrlcbutton" value="Ctl-C" onclick="termSendKey(3,'ctrlcbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="ctrlxbutton" value="Ctl-X" onclick="termSendKey(24,'ctrlxbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="escbutton" value="ESC" onclick="termSendKey(27,'escbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="bsbutton" value="Backspace" onclick="termSendKey(8,'bsbutton')"> <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="pastebutton" value="Paste" title="Paste text into the terminal" onclick="showTermPasteDialog()"> </div> </td> </tr> </table> </div> <div id="p13" style="display:none"> <div id="p13title"> <div id="p13BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Files - <span id="p13deviceName"></span></h1> </div> <table id="p13toolbar" style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="background-color:#C0C0C0;border-bottom:2px solid black;padding:2px"> <div style="float:right;text-align:right"> <input id="filesActionsBtn" type="button" title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value="Actions" onclick="deviceActionFunction()" style="margin-right:3px"> </div> <div> <input id="p13AutoConnect" value="AutoConnect" onclick="autoConnectFiles(event)" onkeypress="return false" onkeydown="return false" type="button" style="display:none"> <input id="p13Connect" value="Connect" onclick="connectFiles(event)" onkeypress="return false" onkeydown="return false" type="button"> <span id="p13Status">Disconnected</span> </div> </td> </tr> <tr> <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign="bottom"> <div id="p13rightOfButtons" style="float:right;margin-top:3px"></div> <div> <input type="button" id="p13FolderUp" disabled="disabled" onclick="p13folderup()" value="Up">&nbsp; <input type="button" id="p13SelectAllButton" disabled="disabled" onclick="p13selectallfile()" value="Select All" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13RenameFileButton" disabled="disabled" value="Rename" onclick="p13renamefile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13DeleteFileButton" disabled="disabled" value="Delete" onclick="p13deletefile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13NewFolderButton" disabled="disabled" value="New Folder" onclick="p13createfolder()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13UploadButton" disabled="disabled" value="Upload" onclick="p13uploadFile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13CutButton" disabled="disabled" value="Cut" onclick="p13copyFile(1)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13CopyButton" disabled="disabled" value="Copy" onclick="p13copyFile(0)" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13PasteButton" disabled="disabled" value="Paste" onclick="p13pasteFile()" onkeypress="return false" onkeydown="return false">&nbsp; <input type="button" id="p13RefreshButton" disabled="disabled" value="Refresh" onclick="p13folderup(9999)" onkeypress="return false" onkeydown="return false">&nbsp; </div> </td> </tr> <tr> <td style="background-color:#E4E9E7;height:28px"> <div style="float:right"> <select id="p13sortdropdown" onchange="p13updateFiles()"> <option value="1" selected="selected">Sort by name <option value="2">Sort by size <option value="3">Sort by date <option value="4">Descend by name <option value="5">Descend by size <option value="6">Descend by date </select> </div> <div>&nbsp;&nbsp;<span id="p13currentpath"></span></div> </td> </tr> </table> <div id="p13filetable" style="width:100%;height:calc(100vh - 346px);overflow:auto;-webkit-user-select:none"> <div id="p13bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&checkmark;</b></div> <div id="p13bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&#10007;</b></div> <span id="p13files"></span> </div> <table id="p13toolbarBottom" style="width:100%" cellpadding="0" cellspacing="0"> <tr><td class="style6" style="text-align:left;padding:3px">&nbsp;<span id="p13bottomstatus"></span></td></tr> </table> </div> <div id="p14" style="display:none"> <div id="p14title"> <div id="p14BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Intel&reg; AMT - <span id="p14deviceName"></span></h1> </div> <iframe id="p14iframe" style="width:100%;height:calc(100vh - 242px);border:0;overflow:hidden" src="/commander.htm"></iframe> </div> <div id="p15" style="display:none"> <div id="p15title"> <div id="p15BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1><span id="p15deviceName"></span></h1> </div> <table cellpadding="0" cellspacing="0" style="width:100%;padding:0px;padding:0px;margin-top:0px"> <tr> <td style="background:#C0C0C0"> <div style="float:right;padding-right:4px"> <div style="padding:4px;display:inline-block" id="p15coreName" title="Information about current core running on this agent"></div> <input type="button" id="p15uploadCore" value="Agent Action" onclick="p15uploadCore(event)" title="Change the agent Java Script code module"> </div> <div id="p15statetext" style="padding:4px"></div> </td> </tr> <tr> <td> <div style="background-color:gray"><div id="consoleprogressbar" style="height:2px;width:0%;background-color:red"></div></div> </td> </tr> <tr> <td id="p15agentConsole" style="background:black;margin:0;padding:0;color:lightgray;width:100%;height:calc(100vh - 296px);max-height:500px;position:relative"> <pre id="p15agentConsoleText" style="position:absolute;margin:0;padding:0;top:0;bottom:0;left:0;right:0;overflow-y:scroll;overflow-x:auto"></pre> </td> </tr> <tr> <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0"> <table style="width:100%"> <tr> <td style="width:99%"> <input id="p15consoleText" style="width:100%" onkeyup="p15consoleSend(event)" onfocus="onConsoleFocus(1)" onblur="onConsoleFocus(0)"> </td> <td>&nbsp;</td> <td style="width:1%"><input id="id_p15consoleClear" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Clear" onclick="p15consoleClear()"></td> </tr> </table> </td> </tr> </table> </div> <div id="p16" style="display:none"> <div id="p16title"> <div id="p16BackButton" style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Events - <span id="p16deviceName"></span></h1> </div> <div style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px"> <div class="style7" style="width:16px;height:100%;float:left">&nbsp;</div> <div class="h1" style="height:100%;float:left">&nbsp;</div> <div class="style14" style="height:100%;float:left">&nbsp;&nbsp;<input type="button" value="Refresh" onclick="refreshDeviceEvents()">&nbsp;</div> <div class="auto-style1" style="height:100%;float:right"> Show <select id="p16limitdropdown" onchange="refreshDeviceEvents()"> <option value="60">Last 60 <option value="120">Last 120 <option value="250">Last 250 <option value="500">Last 500 <option value="1000">Last 1000 </select> <div style="height:100%;width:20px;float:right;background-color:#ffffff"></div> <div class="h2" style="height:100%;float:right">&nbsp;</div> </div> </div> <div id="p16events" style="max-height:calc(100vh - 267px);overflow-y:auto"></div> </div> <div id="p20" style="display:none"> <picture id="MainMeshImage" style="border-width:0px;height:200px;width:200px;float:right"> <source type="image/webp" width="200" height="200" srcset="images/webp/mesh-200.webp"> <img alt="" width="200" height="200" src="images/mesh-200.jpg"> </source></picture> <div style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>General - <span id="p20meshName"></span></h1> <p id="p20info"> </div> <div id="p30" style="display:none"> <table style="width:100%" cellpadding="0" cellspacing="0"> <tr> <td style="width:auto" valign="top"> <div id="p30title"> <div style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>General - <span id="p30userName"></span></h1> </div> <div id="p30html"></div> </td> <td style="width:20px"></td> <td style="width:200px"> <picture id="MainUserImage" style="border-width:0px;height:200px;width:200px;float:right"> <source type="image/webp" width="200" height="200" srcset="images/webp/user-200.webp"> <img alt="" width="200" height="200" src="images/user-200.jpg"> </source></picture> <div style="width:100%;text-align:center"><strong><span id="MainUserState"></span></strong></div> </td> </tr> </table><br> <div id="p30html2"></div> <div id="p30html3"></div> </div> <div id="p31" style="display:none"> <div style="float:left"><div class="backButton" onclick="goBack()" title="Back"><div class="backButtonEx"></div></div></div> <h1>Events - <span id="p31userName"></span></h1> <div style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px"> <div class="style7" style="width:16px;height:100%;float:left">&nbsp;</div> <div class="h1" style="height:100%;float:left">&nbsp;</div> <div class="style14" style="height:100%;float:left">&nbsp;&nbsp;<input type="button" value="Refresh" onclick="refreshUsersEvents()">&nbsp;</div> <div class="auto-style1" style="height:100%;float:right"> Show <select id="p31limitdropdown" onchange="refreshUsersEvents()"> <option value="60">Last 60 <option value="120">Last 120 <option value="250">Last 250 <option value="500">Last 500 <option value="1000">Last 1000 </select> <div style="height:100%;width:20px;float:right;background-color:#ffffff"></div> <div class="h2" style="height:100%;float:right;">&nbsp;</div> </div> </div> <div id="p31events" style="max-height:calc(100vh - 267px);overflow-y:scroll"></div> </div> <br id="column_l_bottomgap"> </div> <div id="footer" class="noselect"> <table cellpadding="0" cellspacing="10" style="width:100%"> <tr> <td style="text-align:left;color:white"> {{{footer}}} </td> <td style="text-align:right"> <a id="verifyEmailId2" style="color:yellow;margin-left:3px;cursor:pointer;display:none" onclick="account_showVerifyEmail()">Verify Email</a> <a style="margin-left:3px" href="terms">Terms &amp; Privacy</a> </td> </tr> </table> </div> <div id="dialog" style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:160px;width:400px;left:calc((100% / 2) - 200px);display:none"> <div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"> <div id="id_dialogclose" style="float:right;padding:3px;margin-right:3px;cursor:pointer" onclick="setDialogMode()">&#x2716;</div> <div id="id_dialogtitle" style="padding:5px"></div> <div style="width:100%;margin:6px"></div> </div> <div style="margin-right:16px;margin-left:8px"> <div id="dialog1" style="margin:auto;text-align:center;margin:3px"> <div id="id_dialogMessage" style="padding:10px"></div> </div> <div id="dialog2" style="margin:auto;margin:3px"> <div id="id_dialogOptions"></div> </div> <div id="dialog3" style="margin:auto;margin:3px"> <div style="height:26px"> <select id="d3uploadMode" style="float:right;width:260px" onchange="d3modechange()"> <option value="1">Local file upload <option value="2">Server file selection </select> <div>File Selection</div> </div> <div id="d3localmode" style="height:26px;display:none"> <form id="d3localmodeform" method="post" enctype="multipart/form-data" action="uploadfile.ashx" target="fileUploadFrame"> <input type="text" id="d3attrib" name="attrib" style="display:none"> <input type="file" id="d3localFile" name="files" style="float:right;width:260px" onchange="d3setActions()"> <input type="submit" id="d3submit" style="display:none"> </form> <div>Upload File</div> </div> <div id="d3servermode"> <div style="width:100%;background-color:#d3d9d6;text-align:left;padding:3px" valign="bottom"> <input type="button" id="p3FolderUp" disabled="disabled" onclick="d3folderup()" value="Up">&nbsp; </div> <div id="d3serverfiles" style="width:100%;height:150px;background-color:white;padding:2px;border:1px solid gray;overflow-y:scroll"></div> </div> </div> <div id="dialog7" style="margin:auto;margin:3px"> <div id="d7meshkvm"> <h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4> <div style="margin:3px 0 3px 0"> <select id="d7bitmapquality" style="float:right;width:200px;height:20px" dir="rtl"></select> <div style="height:20px">Quality</div> </div> <div style="margin:3px 0 3px 0"> <select id="d7bitmapscaling" style="float:right;width:200px;height:20px" dir="rtl"> <option selected="selected" value="1024">100% <option value="896">87.5% <option value="768">75% <option value="640">62.5% <option value="512">50% <option value="384">37.5% <option value="256">25% <option value="128">12.5% </select> <div style="height:20px">Scaling</div> </div> <div style="margin:3px 0 3px 0"> <select id="d7framelimiter" style="float:right;width:200px;height:20px" dir="rtl"> <option selected="selected" value="50">Fast <option value="100">Medium <option value="400">Slow <option value="1000">Very slow </select> <div style="height:20px">Frame rate</div> </div> </div> <div id="d7amtkvm"> <h4 style="width:100%;border-bottom:1px solid gray">Intel&reg; AMT Hardware KVM</h4> <div style='height:26px'> <select id="d7desktopmode" style="float:right;width:200px"> <option value="1">RLE8, Fastest <option value="2">RLE16, Recommended <option value="3">RAW8, Slow <option value="4">RAW16, Very Slow </select> <div>Image Encoding</div> </div> <div style="height:60px"> <div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:white"> <label><input type="checkbox" id='d7showfocus'>Show Focus Tool<br></label> <label><input type="checkbox" id='d7showcursor'>Show Local Mouse Cursor<br></label> </div> <div>Other Settings</div> </div> </div> </div> </div> <div id="idx_dlgButtonBar" style="padding:10px;margin-bottom:4px"> <input id="idx_dlgCancelButton" type="button" value="Cancel" style="float:right;width:80px;margin-left:5px" onclick="dialogclose(0)"> <input id="idx_dlgOkButton" type="button" value="OK" style="float:right;width:80px" onclick="dialogclose(1)"> <div style="height:25px"><input id="idx_dlgDeleteButton" type="button" value="Delete" style="width:80px;display:none" onclick="dialogclose(2)"></div> </div> </div> <iframe name="fileUploadFrame" style="display:none"></iframe> <form style="display:none" method="post" action="uploadfile.ashx" enctype="multipart/form-data" target="fileUploadFrame"><input id="p5fileDragName" name="name"><input id="p5fileDragSize" name="size"><input id="p5fileDragType" name="type"><input id="p5fileDragData" name="data"><input id="p5fileDragLink" name="link"><input type="submit" id="p5loginSubmit2" style="display:none"></form> <form style="display:none" method="post" action="uploadnodefile.ashx" enctype="multipart/form-data" target="fileUploadFrame"><input id="p13fileDragName" name="name"><input id="p13fileDragSize" name="size"><input id="p13fileDragType" name="type"><input id="p13fileDragData" name="data"><input id="p13fileDragLink" name="link"><input type="submit" id="p13loginSubmit2" style="display:none"></form> <audio id="chimes"><source src="sounds/chimes.mp3" type="audio/mp3"></source></audio> </div> </div> <script>if(!String.prototype.startsWith){String.prototype.startsWith=function(a){return this.lastIndexOf(a,0)===0}}if(!String.prototype.endsWith){String.prototype.endsWith=function(a){return this.indexOf(a,this.length-a.length)!==-1}}function Q(a){return document.getElementById(a)}function QS(a){try{return Q(a).style}catch(a){}}function QE(a,b){try{Q(a).disabled=!b}catch(a){}}function QV(a,b){try{QS(a).display=(b?"":"none")}catch(a){}}function QA(a,b){Q(a).innerHTML+=b}function QH(a,b){Q(a).innerHTML=b}function inputBoxFocus(b){Q(b).focus();var a=Q(b).value;Q(b).value="";Q(b).value=a}function ReadShort(b,a){return(b.charCodeAt(a)<<8)+b.charCodeAt(a+1)}function ReadShortX(b,a){return(b.charCodeAt(a+1)<<8)+b.charCodeAt(a)}function ReadInt(b,a){return(b.charCodeAt(a)*16777216)+(b.charCodeAt(a+1)<<16)+(b.charCodeAt(a+2)<<8)+b.charCodeAt(a+3)}function ReadSInt(b,a){return(b.charCodeAt(a)<<24)+(b.charCodeAt(a+1)<<16)+(b.charCodeAt(a+2)<<8)+b.charCodeAt(a+3)}function ReadIntX(b,a){return(b.charCodeAt(a+3)*16777216)+(b.charCodeAt(a+2)<<16)+(b.charCodeAt(a+1)<<8)+b.charCodeAt(a)}function ShortToStr(a){return String.fromCharCode((a>>8)&255,a&255)}function ShortToStrX(a){return String.fromCharCode(a&255,(a>>8)&255)}function IntToStr(a){return String.fromCharCode((a>>24)&255,(a>>16)&255,(a>>8)&255,a&255)}function IntToStrX(a){return String.fromCharCode(a&255,(a>>8)&255,(a>>16)&255,(a>>24)&255)}function MakeToArray(a){if(!a||a==null||typeof a=="object"){return a}return[a]}function SplitArray(a){return a.split(",")}function Clone(a){return JSON.parse(JSON.stringify(a))}function EscapeHtml(a){if(typeof a=="string"){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}if(typeof a=="boolean"){return a}if(typeof a=="number"){return a}}function EscapeHtmlBreaks(a){if(typeof a=="string"){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\r/g,"<br />").replace(/\n/g,"").replace(/\t/g,"&nbsp;&nbsp;")}if(typeof a=="boolean"){return a}if(typeof a=="number"){return a}}function ArrayElementMove(a,b,c){a.splice(c,0,a.splice(b,1)[0])}function ObjectToStringEx(e,a){var d="";if(e!=0&&(!e||e==null)){return"(Null)"}if(e instanceof Array){for(var b in e){d+="<br />"+gap(a)+"Item #"+b+": "+ObjectToStringEx(e[b],a+1)}}else{if(e instanceof Object){for(var b in e){d+="<br />"+gap(a)+b+" = "+ObjectToStringEx(e[b],a+1)}}else{d+=EscapeHtml(e)}}return d}function ObjectToStringEx2(e,a){var d="";if(e!=0&&(!e||e==null)){return"(Null)"}if(e instanceof Array){for(var b in e){d+="\r\n"+gap2(a)+"Item #"+b+": "+ObjectToStringEx2(e[b],a+1)}}else{if(e instanceof Object){for(var b in e){d+="\r\n"+gap2(a)+b+" = "+ObjectToStringEx2(e[b],a+1)}}else{d+=EscapeHtml(e)}}return d}function gap(a){var d="";for(var b=0;b<(a*4);b++){d+="&nbsp;"}return d}function gap2(a){var d="";for(var b=0;b<(a*4);b++){d+=" "}return d}function ObjectToString(a){return ObjectToStringEx(a,0)}function ObjectToString2(a){return ObjectToStringEx2(a,0)}function hex2rstr(a){if(typeof a!="string"||a.length==0){return""}var c="",b=(""+a).match(/../g),e;while(e=b.shift()){c+=String.fromCharCode("0x"+e)}return c}function char2hex(a){return(a+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++){c+=char2hex(b.charCodeAt(a))}return c}function encode_utf8(a){return unescape(encodeURIComponent(a))}function decode_utf8(a){return decodeURIComponent(escape(a))}function data2blob(c){var b=new Array(c.length);for(var d=0;d<c.length;d++){b[d]=c.charCodeAt(d)}var a=new Blob([new Uint8Array(b)]);return a}function random(a){return Math.floor(Math.random()*a)}function trademarks(a){return a.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}var MeshServerCreateControl=function(b,a){var c={};c.State=0;c.connectstate=0;c.pingTimer=null;c.authCookie=a;c.xxStateChange=function(e,d){if(c.State==e){return}var g=c.State;c.State=e;if(c.onStateChanged){c.onStateChanged(c,c.State,g,d)}};c.Start=function(){if(c.connectstate!=0){return}c.connectstate=0;var d=window.location.protocol.replace("http","ws")+"//"+window.location.host+b+"control.ashx";if(c.authCookie&&(c.authCookie!="")){d+="?auth="+c.authCookie}c.socket=new WebSocket(d);c.socket.onopen=function(g){c.connectstate=1};c.socket.onmessage=c.xxOnMessage;c.socket.onclose=function(g){c.Stop(g.code)};c.xxStateChange(1,0);if(c.pingTimer!=null){clearInterval(c.pingTimer)}c.pingTimer=setInterval(function(){c.send({action:"ping"})},29000)};c.Stop=function(d){c.connectstate=0;if(c.socket){c.socket.close();delete c.socket}if(c.pingTimer!=null){clearInterval(c.pingTimer);c.pingTimer=null}c.xxStateChange(0,d)};c.xxOnMessage=function(d){if(c.State==1){c.xxStateChange(2)}var g;try{g=JSON.parse(d.data)}catch(d){return}if((typeof g!="object")||(g.action=="pong")){return}if(g.action=="close"){if(g.msg){console.log(g.msg)}c.Stop(g.cause);return}if(c.onMessage){c.onMessage(c,g)}};c.send=function(d){if(c.socket!=null&&c.connectstate==1){c.socket.send(JSON.stringify(d))}};return c};function AmtStackCreateService(t){var s=new Object();s.wsman=t;s.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];s.PendingEnums=[];s.PendingBatchOperations=0;s.ActiveEnumsCount=0;s.MaxActiveEnumsCount=1;s.onProcessChanged=null;var n=0;var m=0;s.GetPendingActions=function(){return(s.PendingEnums.length*2)+(s.ActiveEnumsCount)+s.wsman.comm.PendingAjax.length+s.wsman.comm.ActiveAjaxCount+s.PendingBatchOperations};function r(){var u=s.GetPendingActions();if(n<u){n=u}if(s.onProcessChanged!=null&&m!=u){m=u;s.onProcessChanged(u,n)}if(u==0){n=0}}s.Subscribe=function(w,v,C,u,B,z,A,x,D,y){s.wsman.ExecSubscribe(s.CompleteName(w),v,C,function(G,F,E,H){r();u(s,w,E,H,B)},0,z,A,x,D,y);r()};s.UnSubscribe=function(v,u,y,w,x){s.wsman.ExecUnSubscribe(s.CompleteName(v),function(B,A,z,C){r();u(s,v,z,C,y)},0,w,x);r()};s.Get=function(v,u,x,w){s.wsman.ExecGet(s.CompleteName(v),function(A,z,y,B){r();u(s,v,y,B,x)},0,w);r()};s.Put=function(v,x,u,z,w,y){s.wsman.ExecPut(s.CompleteName(v),x,function(C,B,A,D){r();u(s,v,A,D,z)},0,w,y);r()};s.Create=function(v,x,u,y,w){s.wsman.ExecCreate(s.CompleteName(v),x,function(B,A,z,C){r();u(s,v,z,C,y)},0,w);r()};s.Delete=function(v,x,u,y,w){s.wsman.ExecDelete(s.CompleteName(v),x,function(B,A,z,C){r();u(s,v,z,C,y)},0,w);r()};s.Exec=function(x,w,u,v,A,y,z){s.wsman.ExecMethod(s.CompleteName(x),w,u,function(D,C,B,E){r();v(s,x,s.CompleteExecResponse(B),E,A)},0,y,z);r()};s.ExecWithXml=function(x,w,u,v,A,y,z){s.wsman.ExecMethodXml(s.CompleteName(x),w,execArgumentsToXml(u),function(D,C,B,E){r();v(s,x,s.CompleteExecResponse(B),E,A)},0,y,z);r()};s.Enum=function(v,u,x,w){if(s.ActiveEnumsCount<s.MaxActiveEnumsCount){s.ActiveEnumsCount++;s.wsman.ExecEnum(s.CompleteName(v),function(B,z,y,C,A){r();d(v,y,u,z,C,A)},x,w)}else{s.PendingEnums.push([v,u,x,w])}r()};function d(w,y,u,z,A,B,x){if(A!=200){u(s,w,null,A,B);c(1);return}if(y==null||y.Header.Method!="EnumerateResponse"||!y.Body.EnumerationContext){u(s,w,null,603,B);c(1);return}var v=y.Body.EnumerationContext;s.wsman.ExecPull(z,v,function(E,D,C,F){b(w,C,u,D,[],F,B,x)})}function b(z,B,u,C,x,D,E,A){if(D!=200){u(s,z,null,D,E);c(1);return}if(B==null||B.Header.Method!="PullResponse"){u(s,z,null,604,E);c(1);return}for(var w in B.Body.Items){if(B.Body.Items[w] instanceof Array){for(var y in B.Body.Items[w]){x.push(B.Body.Items[w][y])}}else{x.push(B.Body.Items[w])}}if(B.Body.EnumerationContext){var v=B.Body.EnumerationContext;s.wsman.ExecPull(C,v,function(H,G,F,I){b(z,F,u,G,x,I,E,1)})}else{c(1);u(s,z,x,D,E);r()}}function c(u){s.ActiveEnumsCount-=u;if(s.ActiveEnumsCount>=s.MaxActiveEnumsCount||s.PendingEnums.length==0){return}var v=s.PendingEnums.shift();s.Enum(v[0],v[1],v[2]);c(0)}s.BatchEnum=function(u,x,v,z,w,y){s.PendingBatchOperations+=(x.length*2);a(u,Clone(x),v,z,{},w,y);r()};function a(u,z,v,C,B,w,A){s.PendingBatchOperations-=2;var y=z.shift(),x=s.Enum;if(y[0]=="*"){x=s.Get;y=y.substring(1)}x(y,function(F,D,E,G,H){H[2][D]={response:(E==null?null:E.Body),responses:E,status:G};if(H[1].length==0||G==401||(w!=true&&G!=200&&G!=400)){s.PendingBatchOperations-=(z.length*2);r();v(s,u,H[2],G,C)}else{r();a(u,z,v,C,H[2],A)}},[u,z,B],A);r()}s.BatchGet=function(u,w,v,y,x){h({name:u,names:w,callback:v,current:0,responses:{},tag:y,pri:x});r()};function h(u){if(u.names.length<=u.current){u.callback(s,u.name,u.responses,200,u.tag)}else{s.wsman.ExecGet(s.CompleteName(u.names[u.current]),function(x,w,v,y){g(u,v,y)},u.pri);u.current++}r()}function g(u,v,w){if(v==null||w!=200){u.callback(s,u.name,null,w,u.tag)}else{u.responses[v.Header.Method]=v;h(u)}}s.CompleteName=function(u){if(u.indexOf("AMT_")==0){return s.pfx[0]+u}if(u.indexOf("CIM_")==0){return s.pfx[1]+u}if(u.indexOf("IPS_")==0){return s.pfx[2]+u}};s.CompleteExecResponse=function(u){if(u&&u!=null&&u.Body&&u.Body.ReturnValue){u.Body.ReturnValueStr=s.AmtStatusToStr(u.Body.ReturnValue)}return u};s.RequestPowerStateChange=function(v,u){s.CIM_PowerManagementService_RequestPowerStateChange(v,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',null,null,u)};s.SetBootConfigRole=function(v,u){s.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',v,u)};s.CancelAllQueries=function(u){s.wsman.CancelAllQueries(u)};s.AMT_AgentPresenceWatchdog_RegisterAgent=function(u){s.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},u)};s.AMT_AgentPresenceWatchdog_AssertPresence=function(v,u){s.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdog_AssertShutdown=function(v,u){s.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdog_AddAction=function(z,y,x,v,u,w,C,A,B){s.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:z,NewState:y,EventOnTransition:x,ActionSd:v,ActionEac:u},w,C,A,B)};s.AMT_AgentPresenceWatchdog_DeleteAllActions=function(u,x,v,w){s.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},u,x,v,w)};s.AMT_AgentPresenceWatchdogAction_GetActionEac=function(u){s.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},u)};s.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(u){s.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},u)};s.AMT_AgentPresenceWatchdogVA_AssertPresence=function(v,u){s.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(v,u){s.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:v},u)};s.AMT_AgentPresenceWatchdogVA_AddAction=function(z,y,x,v,u,w){s.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:z,NewState:y,EventOnTransition:x,ActionSd:v,ActionEac:u},w)};s.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(u,v){s.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:u},v)};s.AMT_AuditLog_ClearLog=function(u){s.Exec("AMT_AuditLog","ClearLog",{},u)};s.AMT_AuditLog_RequestStateChange=function(v,w,u){s.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_AuditLog_ReadRecords=function(v,u,w){s.Exec("AMT_AuditLog","ReadRecords",{StartIndex:v},u,w)};s.AMT_AuditLog_SetAuditLock=function(x,v,w,u){s.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:x,Flag:v,Handle:w},u)};s.AMT_AuditLog_ExportAuditLogSignature=function(v,u){s.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:v},u)};s.AMT_AuditLog_SetSigningKeyMaterial=function(y,x,w,v,u){s.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:y,SigningKey:x,LengthOfCertificates:w,Certificates:v},u)};s.AMT_AuditPolicyRule_SetAuditPolicy=function(w,u,x,y,v){s.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:w,AuditedAppID:u,EventID:x,PolicyType:y},v)};s.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(w,u,x,y,v){s.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:w,AuditedAppID:u,EventID:x,PolicyType:y},v)};s.AMT_AuthorizationService_AddUserAclEntryEx=function(x,w,y,u,z,v){s.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:x,DigestPassword:w,KerberosUserSid:y,AccessPermission:u,Realms:z},v)};s.AMT_AuthorizationService_EnumerateUserAclEntries=function(v,u){s.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:v},u)};s.AMT_AuthorizationService_GetUserAclEntryEx=function(v,u,w){s.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:v},u,w)};s.AMT_AuthorizationService_UpdateUserAclEntryEx=function(y,x,w,z,u,A,v){s.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:y,DigestUsername:x,DigestPassword:w,KerberosUserSid:z,AccessPermission:u,Realms:A},v)};s.AMT_AuthorizationService_RemoveUserAclEntry=function(v,u){s.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:v},u)};s.AMT_AuthorizationService_SetAdminAclEntryEx=function(w,v,u){s.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:w,DigestPassword:v},u)};s.AMT_AuthorizationService_GetAdminAclEntry=function(u){s.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},u)};s.AMT_AuthorizationService_GetAdminAclEntryStatus=function(u){s.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},u)};s.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(u){s.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},u)};s.AMT_AuthorizationService_SetAclEnabledState=function(w,v,u,x){s.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:w,Enabled:v},u,x)};s.AMT_AuthorizationService_GetAclEnabledState=function(v,u,w){s.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:v},u,w)};s.AMT_EndpointAccessControlService_RequestStateChange=function(v,w,u){s.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_EndpointAccessControlService_GetPosture=function(v,u){s.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:v},u)};s.AMT_EndpointAccessControlService_GetPostureHash=function(v,u){s.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:v},u)};s.AMT_EndpointAccessControlService_UpdatePostureState=function(v,u){s.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:v},u)};s.AMT_EndpointAccessControlService_GetEacOptions=function(u){s.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},u)};s.AMT_EndpointAccessControlService_SetEacOptions=function(v,w,u){s.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:v,PostureHashAlgorithm:w},u)};s.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(v,u){s.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:v},u)};s.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(v,u){s.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:v},u)};s.AMT_EthernetPortSettings_SetLinkPreference=function(v,w,u){s.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:v,Timeout:w},u)};s.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(v,u){s.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:v},u)};s.AMT_KerberosSettingData_GetCredentialCacheState=function(u){s.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},u)};s.AMT_KerberosSettingData_SetCredentialCacheState=function(v,u){s.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:v},u)};s.AMT_MessageLog_CancelIteration=function(v,u){s.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:v},u)};s.AMT_MessageLog_RequestStateChange=function(v,w,u){s.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_MessageLog_ClearLog=function(u){s.Exec("AMT_MessageLog","ClearLog",{},u)};s.AMT_MessageLog_GetRecords=function(v,w,u,x){s.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:v,MaxReadRecords:w},u,x)};s.AMT_MessageLog_GetRecord=function(v,w,u){s.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:v,PositionToNext:w},u)};s.AMT_MessageLog_PositionAtRecord=function(v,w,x,u){s.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:v,MoveAbsolute:w,RecordNumber:x},u)};s.AMT_MessageLog_PositionToFirstRecord=function(u,v){s.Exec("AMT_MessageLog","PositionToFirstRecord",{},u,v)};s.AMT_MessageLog_FreezeLog=function(v,u){s.Exec("AMT_MessageLog","FreezeLog",{Freeze:v},u)};s.AMT_PublicKeyManagementService_AddCRL=function(w,v,u){s.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:w,SerialNumbers:v},u)};s.AMT_PublicKeyManagementService_ResetCRLList=function(u,v){s.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:u},v)};s.AMT_PublicKeyManagementService_AddCertificate=function(v,u){s.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:v},u)};s.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(v,u){s.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:v},u)};s.AMT_PublicKeyManagementService_AddKey=function(v,u){s.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:v},u)};s.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(w,v,x,u){s.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:w,DNName:v,Usage:x},u)};s.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(v,x,w,u){s.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:v,SigningAlgorithm:x,NullSignedCertificateRequest:w},u)};s.AMT_PublicKeyManagementService_GenerateKeyPair=function(v,w,u){s.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:v,KeyLength:w},u)};s.AMT_RedirectionService_RequestStateChange=function(v,u){s.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:v},u)};s.AMT_RedirectionService_TerminateSession=function(v,u){s.Exec("AMT_RedirectionService","TerminateSession",{SessionType:v},u)};s.AMT_RemoteAccessService_AddMpServer=function(u,z,B,v,x,C,A,y,w){s.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:u,InfoFormat:z,Port:B,AuthMethod:v,Certificate:x,Username:C,Password:A,CN:y},w)};s.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(x,y,v,w,u){s.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:x,TunnelLifeTime:y,ExtendedData:v,MpServer:w},u)};s.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(u,v){s.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_CommitChanges=function(u,v){s.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_Unprovision=function(v,u){s.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:v},u)};s.AMT_SetupAndConfigurationService_PartialUnprovision=function(u,v){s.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(u,v){s.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:u},v)};s.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(v,u){s.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:v},u)};s.AMT_SetupAndConfigurationService_SetMEBxPassword=function(v,u){s.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:v},u)};s.AMT_SetupAndConfigurationService_SetTLSPSK=function(v,w,u){s.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:v,PPS:w},u)};s.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(u){s.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},u)};s.AMT_SetupAndConfigurationService_GetUuid=function(u){s.Exec("AMT_SetupAndConfigurationService","GetUuid",{},u)};s.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(u){s.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},u)};s.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(u){s.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},u)};s.AMT_SystemDefensePolicy_GetTimeout=function(u){s.Exec("AMT_SystemDefensePolicy","GetTimeout",{},u)};s.AMT_SystemDefensePolicy_SetTimeout=function(v,u){s.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:v},u)};s.AMT_SystemDefensePolicy_UpdateStatistics=function(v,x,u,z,w,y){s.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:v,ResetOnRead:x},u,z,w,y)};s.AMT_SystemPowerScheme_SetPowerScheme=function(u,v,w){s.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},u,w,0,{InstanceID:v})};s.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(u,v){s.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},u,v)};s.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(v,x,y,u,w){s.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:v,Tm1:x,Tm2:y},u,w)};s.AMT_UserInitiatedConnectionService_RequestStateChange=function(v,w,u){s.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_WebUIService_RequestStateChange=function(v,w,u){s.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(y,z,x,w,u,v){s.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:y,WiFiEndpointSettingsInput:z,IEEE8021xSettingsInput:x,ClientCredential:w,CACredential:u},v)};s.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(y,z,x,w,u,v){s.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:y,WiFiEndpointSettingsInput:z,IEEE8021xSettingsInput:x,ClientCredential:w,CACredential:u},v)};s.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(u,v){s.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:u},v)};s.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(u,v){s.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:u},v)};s.CIM_Account_RequestStateChange=function(v,w,u){s.Exec("CIM_Account","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_AccountManagementService_CreateAccount=function(w,u,v){s.Exec("CIM_AccountManagementService","CreateAccount",{System:w,AccountTemplate:u},v)};s.CIM_BootConfigSetting_ChangeBootOrder=function(v,u){s.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:v},u)};s.CIM_BootService_SetBootConfigRole=function(u,w,v){s.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:u,Role:w},v,0,1)};s.CIM_Card_ConnectorPower=function(v,w,u){s.Exec("CIM_Card","ConnectorPower",{Connector:v,PoweredOn:w},u)};s.CIM_Card_IsCompatible=function(v,u){s.Exec("CIM_Card","IsCompatible",{ElementToCheck:v},u)};s.CIM_Chassis_IsCompatible=function(v,u){s.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:v},u)};s.CIM_Fan_SetSpeed=function(v,u){s.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:v},u)};s.CIM_KVMRedirectionSAP_RequestStateChange=function(v,w,u){s.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:v},u)};s.CIM_MediaAccessDevice_LockMedia=function(v,u){s.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:v},u)};s.CIM_MediaAccessDevice_SetPowerState=function(v,w,u){s.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_MediaAccessDevice_Reset=function(u){s.Exec("CIM_MediaAccessDevice","Reset",{},u)};s.CIM_MediaAccessDevice_EnableDevice=function(v,u){s.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:v},u)};s.CIM_MediaAccessDevice_OnlineDevice=function(v,u){s.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:v},u)};s.CIM_MediaAccessDevice_QuiesceDevice=function(v,u){s.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:v},u)};s.CIM_MediaAccessDevice_SaveProperties=function(u){s.Exec("CIM_MediaAccessDevice","SaveProperties",{},u)};s.CIM_MediaAccessDevice_RestoreProperties=function(u){s.Exec("CIM_MediaAccessDevice","RestoreProperties",{},u)};s.CIM_MediaAccessDevice_RequestStateChange=function(v,w,u){s.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_PhysicalFrame_IsCompatible=function(v,u){s.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:v},u)};s.CIM_PhysicalPackage_IsCompatible=function(v,u){s.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:v},u)};s.CIM_PowerManagementService_RequestPowerStateChange=function(w,v,x,y,u){s.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:w,ManagedElement:v,Time:x,TimeoutPeriod:y},u,0,1)};s.CIM_PowerSupply_SetPowerState=function(v,w,u){s.Exec("CIM_PowerSupply","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_PowerSupply_Reset=function(u){s.Exec("CIM_PowerSupply","Reset",{},u)};s.CIM_PowerSupply_EnableDevice=function(v,u){s.Exec("CIM_PowerSupply","EnableDevice",{Enabled:v},u)};s.CIM_PowerSupply_OnlineDevice=function(v,u){s.Exec("CIM_PowerSupply","OnlineDevice",{Online:v},u)};s.CIM_PowerSupply_QuiesceDevice=function(v,u){s.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:v},u)};s.CIM_PowerSupply_SaveProperties=function(u){s.Exec("CIM_PowerSupply","SaveProperties",{},u)};s.CIM_PowerSupply_RestoreProperties=function(u){s.Exec("CIM_PowerSupply","RestoreProperties",{},u)};s.CIM_PowerSupply_RequestStateChange=function(v,w,u){s.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_Processor_SetPowerState=function(v,w,u){s.Exec("CIM_Processor","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_Processor_Reset=function(u){s.Exec("CIM_Processor","Reset",{},u)};s.CIM_Processor_EnableDevice=function(v,u){s.Exec("CIM_Processor","EnableDevice",{Enabled:v},u)};s.CIM_Processor_OnlineDevice=function(v,u){s.Exec("CIM_Processor","OnlineDevice",{Online:v},u)};s.CIM_Processor_QuiesceDevice=function(v,u){s.Exec("CIM_Processor","QuiesceDevice",{Quiesce:v},u)};s.CIM_Processor_SaveProperties=function(u){s.Exec("CIM_Processor","SaveProperties",{},u)};s.CIM_Processor_RestoreProperties=function(u){s.Exec("CIM_Processor","RestoreProperties",{},u)};s.CIM_Processor_RequestStateChange=function(v,w,u){s.Exec("CIM_Processor","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_RecordLog_ClearLog=function(u){s.Exec("CIM_RecordLog","ClearLog",{},u)};s.CIM_RecordLog_RequestStateChange=function(v,w,u){s.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_RedirectionService_RequestStateChange=function(v,w,u){s.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_Sensor_SetPowerState=function(v,w,u){s.Exec("CIM_Sensor","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_Sensor_Reset=function(u){s.Exec("CIM_Sensor","Reset",{},u)};s.CIM_Sensor_EnableDevice=function(v,u){s.Exec("CIM_Sensor","EnableDevice",{Enabled:v},u)};s.CIM_Sensor_OnlineDevice=function(v,u){s.Exec("CIM_Sensor","OnlineDevice",{Online:v},u)};s.CIM_Sensor_QuiesceDevice=function(v,u){s.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:v},u)};s.CIM_Sensor_SaveProperties=function(u){s.Exec("CIM_Sensor","SaveProperties",{},u)};s.CIM_Sensor_RestoreProperties=function(u){s.Exec("CIM_Sensor","RestoreProperties",{},u)};s.CIM_Sensor_RequestStateChange=function(v,w,u){s.Exec("CIM_Sensor","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_StatisticalData_ResetSelectedStats=function(v,u){s.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:v},u)};s.CIM_Watchdog_KeepAlive=function(u){s.Exec("CIM_Watchdog","KeepAlive",{},u)};s.CIM_Watchdog_SetPowerState=function(v,w,u){s.Exec("CIM_Watchdog","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_Watchdog_Reset=function(u){s.Exec("CIM_Watchdog","Reset",{},u)};s.CIM_Watchdog_EnableDevice=function(v,u){s.Exec("CIM_Watchdog","EnableDevice",{Enabled:v},u)};s.CIM_Watchdog_OnlineDevice=function(v,u){s.Exec("CIM_Watchdog","OnlineDevice",{Online:v},u)};s.CIM_Watchdog_QuiesceDevice=function(v,u){s.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:v},u)};s.CIM_Watchdog_SaveProperties=function(u){s.Exec("CIM_Watchdog","SaveProperties",{},u)};s.CIM_Watchdog_RestoreProperties=function(u){s.Exec("CIM_Watchdog","RestoreProperties",{},u)};s.CIM_Watchdog_RequestStateChange=function(v,w,u){s.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.CIM_WiFiPort_SetPowerState=function(v,w,u){s.Exec("CIM_WiFiPort","SetPowerState",{PowerState:v,Time:w},u)};s.CIM_WiFiPort_Reset=function(u){s.Exec("CIM_WiFiPort","Reset",{},u)};s.CIM_WiFiPort_EnableDevice=function(v,u){s.Exec("CIM_WiFiPort","EnableDevice",{Enabled:v},u)};s.CIM_WiFiPort_OnlineDevice=function(v,u){s.Exec("CIM_WiFiPort","OnlineDevice",{Online:v},u)};s.CIM_WiFiPort_QuiesceDevice=function(v,u){s.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:v},u)};s.CIM_WiFiPort_SaveProperties=function(u){s.Exec("CIM_WiFiPort","SaveProperties",{},u)};s.CIM_WiFiPort_RestoreProperties=function(u){s.Exec("CIM_WiFiPort","RestoreProperties",{},u)};s.CIM_WiFiPort_RequestStateChange=function(v,w,u){s.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.IPS_HostBasedSetupService_Setup=function(y,z,x,v,A,w,u){s.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:y,NetworkAdminPassword:z,McNonce:x,Certificate:v,SigningAlgorithm:A,DigitalSignature:w},u)};s.IPS_HostBasedSetupService_AddNextCertInChain=function(x,v,w,u){s.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:x,IsLeafCertificate:v,IsRootCertificate:w},u)};s.IPS_HostBasedSetupService_AdminSetup=function(x,y,w,z,v,u){s.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:x,NetworkAdminPassword:y,McNonce:w,SigningAlgorithm:z,DigitalSignature:v},u)};s.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(w,x,v,u){s.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:w,SigningAlgorithm:x,DigitalSignature:v},u)};s.IPS_HostBasedSetupService_DisableClientControlMode=function(u,v){s.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:u},v)};s.IPS_KVMRedirectionSettingData_TerminateSession=function(u){s.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},u)};s.IPS_OptInService_StartOptIn=function(u){s.Exec("IPS_OptInService","StartOptIn",{},u)};s.IPS_OptInService_CancelOptIn=function(u){s.Exec("IPS_OptInService","CancelOptIn",{},u)};s.IPS_OptInService_SendOptInCode=function(v,u){s.Exec("IPS_OptInService","SendOptInCode",{OptInCode:v},u)};s.IPS_OptInService_StartService=function(u){s.Exec("IPS_OptInService","StartService",{},u)};s.IPS_OptInService_StopService=function(u){s.Exec("IPS_OptInService","StopService",{},u)};s.IPS_OptInService_RequestStateChange=function(v,w,u){s.Exec("IPS_OptInService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.IPS_ProvisioningRecordLog_RequestStateChange=function(v,w,u){s.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.IPS_ProvisioningRecordLog_ClearLog=function(u,v){s.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:u},v)};s.IPS_SecIOService_RequestStateChange=function(v,w,u){s.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:v,TimeoutPeriod:w},u)};s.AmtStatusToStr=function(u){if(s.AmtStatusCodes[u]){return s.AmtStatusCodes[u]}else{return"UNKNOWN_ERROR"}};s.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};s.GetMessageLog=function(u,v){s.AMT_MessageLog_PositionToFirstRecord(k,[u,v,[]])};function k(w,u,v,x,y){if(x!=200||v.Body.ReturnValue!="0"){y[0](s,null,y[2]);return}s.AMT_MessageLog_GetRecords(v.Body.IterationIdentifier,390,l,y)}function l(D,A,C,E,G){if(E!=200||C.Body.ReturnValue!="0"){G[0](s,null,G[2]);return}var y,z,I,v,u=G[2],F=new Date(),H,B=C.Body.RecordArray;if(typeof B==="string"){C.Body.RecordArray=[C.Body.RecordArray]}for(y in B){v=null;try{v=window.atob(B[y])}catch(w){}if(v!=null){H=ReadIntX(v,0);if((H>0)&&(H<4294967295)){I={DeviceAddress:v.charCodeAt(4),EventSensorType:v.charCodeAt(5),EventType:v.charCodeAt(6),EventOffset:v.charCodeAt(7),EventSourceType:v.charCodeAt(8),EventSeverity:v.charCodeAt(9),SensorNumber:v.charCodeAt(10),Entity:v.charCodeAt(11),EntityInstance:v.charCodeAt(12),EventData:[],Time:new Date((H+(F.getTimezoneOffset()*60))*1000)};for(z=13;z<21;z++){I.EventData.push(v.charCodeAt(z))}I.EntityStr=o[I.Entity];I.Desc=j(I.EventSensorType,I.EventOffset,I.EventData,I.Entity);if(!I.EntityStr){I.EntityStr="Unknown"}u.push(I)}}}if(C.Body.NoMoreRecords!=true){s.AMT_MessageLog_GetRecords(C.Body.IterationIdentifier,390,l,[G[0],u,G[2]])}else{G[0](s,u,G[2])}}var e="Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var p="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|");var q="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|");var o="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");s.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|");s.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};function j(x,w,v,u){if(x==15){if(v[0]==235){return"Invalid Data"}if(w==0){return p[v[1]]}return q[v[1]]}if(x==18&&v[0]==170){return"Agent watchdog "+char2hex(v[4])+char2hex(v[3])+char2hex(v[2])+char2hex(v[1])+"-"+char2hex(v[6])+char2hex(v[5])+"-... changed to "+s.WatchdogCurrentStates[v[7]]}if(x==6){return"Authentication failed "+(v[1]+(v[2]<<8))+" times. The system may be under attack."}if(x==30){return"No bootable media"}if(x==32){return"Operating system lockup or power interrupt"}if(x==35){return"System boot failure"}if(x==37){return"System firmware started (at least one CPU is properly executing)."}return"Unknown Sensor Type #"+x}return s}var md5_k=[];for(var i=0;i<64;){md5_k[i]=0|(Math.abs(Math.sin(++i))*4294967296)}function hex_md5(p){var g,k,l,o,r=[],q=unescape(encodeURI(p)),e=q.length,m=[g=1732584193,k=-271733879,~g,~k],n=0;for(;n<=e;){r[n>>2]|=(q.charCodeAt(n)||128)<<8*(n++%4)}r[p=(e+8>>6)*16+14]=e*8;n=0;for(;n<p;n+=16){e=m;o=0;for(;o<64;){e=[l=e[3],((g=e[1]|0)+((l=((e[0]+[g&(k=e[2])|~g&l,l&g|~l&k,g^k^l,k^(g|~l)][e=o>>4])+(md5_k[o]+(r[[o,5*o+1,3*o+5,7*o][e]%16+n]|0))))<<(e=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*e+o++%4])|l>>>32-e)),g,k]}for(o=4;o;){m[--o]=m[o]+e[o]}}p="";for(;o<32;){p+=((m[o>>3]>>((1^o++&7)*4))&15).toString(16)}return p}function rstr_md5(a){return hex2rstr(hex_md5(a))}function execArgumentsToXml(c){if(c===undefined||c===null){return null}var d="";for(var b in c){var a=c[b];if(!a){continue}if(a.__parameterType==="reference"){d+=referenceToXml(b,a)}else{d+=instanceToXml(b,a)}}return d}function instanceToXml(d,c){if(c===undefined||c===null){return null}var b=!!c.__namespace;var j=b?"<q:":"<";var a=b?"</q:":"</";var e=b?(' xmlns:q="'+c.__namespace+'"'):"";var h="<r:"+d+e+">";for(var g in c){if(!c.hasOwnProperty(g)||g.indexOf("__")===0){continue}if(typeof c[g]==="function"||Array.isArray(c[g])){continue}if(typeof c[g]==="object"){console.error("only convert one level down...")}else{h+=j+g+">"+c[g].toString()+a+g+">"}}h+="</r:"+d+">";return h}function referenceToXml(b,a){if(a===undefined||a===null){return null}var c="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+a.__resourceUri+"</w:ResourceURI><w:SelectorSet>";for(var d in a){if(!a.hasOwnProperty(d)||d.indexOf("__")===0){continue}if(typeof a[d]==="function"||typeof a[d]==="object"||Array.isArray(a[d])){continue}c+='<w:Selector Name="'+d+'">'+a[d].toString()+"</w:Selector>"}c+="</w:SelectorSet></a:ReferenceParameters></r:"+b+">";return c}function GetSidString(c){var b="S-"+c.charCodeAt(0)+"-"+c.charCodeAt(7);for(var a=2;a<(c.length/4);a++){b+="-"+ReadIntX(c,a*4)}return b}function GetSidByteArray(d){if(!d||d==null){return null}var c=d.split("-");if(c.length<4||(c[0]!="s"&&c[0]!="S")){return null}for(var a=1;a<c.length;a++){var e=parseInt(c[a]);if(e!=c[a]){return null}c[a]=e}var b=String.fromCharCode(c[1])+String.fromCharCode(c.length-3)+ShortToStr(Math.floor(c[2]/Math.pow(2,32)))+IntToStr((c[2])&65535);for(var a=3;a<c.length;a++){b+=IntToStrX(c[a])}return b}var WsmanStackCreateService=function(h,l,n,k,m,g){var j={};j.NextMessageId=1;j.Address="/wsman";j.comm=CreateWsmanComm(h,l,n,k,m,g);j.PerformAjax=function(q,o,s,r,p){if(p==undefined){p=""}j.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+p+"><Header><a:Action>"+q,function(t,u,v){if(u!=200){o(j,null,{Header:{HttpError:u}},u,v);return}var w=j.ParseWsman(t);if(!w||w==null){o(j,null,{Header:{HttpError:u}},601,v)}else{o(j,w.Header.ResourceURI,w,200,v)}},s,r)};j.CancelAllQueries=function(o){j.comm.CancelAllQueries(o)};j.GetNameFromUrl=function(o){var p=o.lastIndexOf("/");return(p==-1)?o:o.substring(p+1)};j.ExecSubscribe=function(w,q,z,o,y,v,x,t,A,u){var r="",s="";if(A!=undefined&&u!=undefined){r="<t:IssuedTokens><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>"+A+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+u+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>";s='<Auth Profile="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/secprofile/http/digest"/>'}if(t!=undefined&&t!=null){t="<a:ReferenceParameters>"+t+"</a:ReferenceParameters>"}else{t=""}var p="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+w+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+d(x)+r+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.dmtf.org/wbem/wsman/1/wsman/'+q+'"><e:NotifyTo><a:Address>'+z+"</a:Address></e:NotifyTo>"+s+"</e:Delivery><e:Expires>PT0.000000S</e:Expires></e:Subscribe>";j.PerformAjax(p+"</Body></Envelope>",o,y,v,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')};j.ExecUnSubscribe=function(r,o,t,q,s){var p="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+r+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+d(s)+"</Header><Body><e:Unsubscribe/>";j.PerformAjax(p+"</Body></Envelope>",o,t,q,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};j.ExecPut=function(s,r,o,u,q,t){var p="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+d(t)+"</Header><Body>"+c(s,r);j.PerformAjax(p+"</Body></Envelope>",o,u,q)};j.ExecCreate=function(u,t,o,w,s,v){var r=j.GetNameFromUrl(u);var p="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+u+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+d(v)+"</Header><Body><g:"+r+' xmlns:g="'+u+'">';for(var q in t){p+="<g:"+q+">"+t[q]+"</g:"+q+">"}j.PerformAjax(p+"</g:"+r+"></Body></Envelope>",o,w,s)};j.ExecCreateXml=function(s,o,p,u,r){var q=j.GetNameFromUrl(s),t="";j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout></Header><Body><r:"+q+' xmlns:r="'+s+'">'+o+"</r:"+q+"></Body></Envelope>",p,u,r)};j.ExecDelete=function(s,r,o,t,q){var p="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+d(r)+"</Header><Body /></Envelope>";j.PerformAjax(p,o,t,q)};j.ExecGet=function(q,o,r,p){j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+q+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",o,r,p)};j.ExecMethod=function(u,s,o,q,w,t,v){var p="";for(var r in o){if(o[r]!=null){if(Array.isArray(o[r])){for(var y in o[r]){p+="<r:"+r+">"+o[r][y]+"</r:"+r+">"}}else{p+="<r:"+r+">"+o[r]+"</r:"+r+">"}}}j.ExecMethodXml(u,s,p,q,w,t,v)};j.ExecMethodXml=function(s,q,o,p,u,r,t){j.PerformAjax(s+"/"+q+"</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+s+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+d(t)+"</Header><Body><r:"+q+'_INPUT xmlns:r="'+s+'">'+o+"</r:"+q+"_INPUT></Body></Envelope>",p,u,r)};j.ExecEnum=function(q,o,r,p){j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+q+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',o,r,p)};j.ExecPull=function(r,p,o,s,q){j.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+j.Address+"</a:To><w:ResourceURI>"+r+"</w:ResourceURI><a:MessageID>"+(j.NextMessageId++)+'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+p+"</EnumerationContext><MaxElements>999</MaxElements><MaxCharacters>99999</MaxCharacters></Pull></Body></Envelope>",o,s,q)};j.ParseWsman=function(x){try{if(!x.childNodes){x=e(x)}var v={Header:{}},s=x.getElementsByTagName("Header")[0],w;if(!s){s=x.getElementsByTagName("a:Header")[0]}if(!s){return null}for(var u=0;u<s.childNodes.length;u++){var p=s.childNodes[u];v.Header[p.localName]=p.textContent}var o=x.getElementsByTagName("Body")[0];if(!o){o=x.getElementsByTagName("a:Body")[0]}if(!o){return null}if(o.childNodes.length>0){w=o.childNodes[0].localName;if(w.indexOf("_OUTPUT")==w.length-7){w=w.substring(0,w.length-7)}v.Header.Method=w;v.Body=b(o.childNodes[0])}return v}catch(q){console.log("Unable to parse XML: "+x);return null}};function b(u){var q,v={};for(var s=0;s<u.childNodes.length;s++){var o=u.childNodes[s];if(o.childElementCount==0){q=o.textContent}else{q=b(o)}if(q=="true"){q=true}if(q=="false"){q=false}var p=q;if(o.attributes.length>0){p={Value:q};for(var t=0;t<o.attributes.length;t++){p["@"+o.attributes[t].name]=o.attributes[t].value}}if(v[o.localName] instanceof Array){v[o.localName].push(p)}else{if(v[o.localName]==undefined){v[o.localName]=p}else{v[o.localName]=[v[o.localName],p]}}}return v}function c(t,r){if(!t||r===undefined||r===null){return""}var p=j.GetNameFromUrl(t);var s="<r:"+p+' xmlns:r="'+t+'">';for(var q in r){if(!r.hasOwnProperty(q)||q.indexOf("__")===0||q.indexOf("@")===0){continue}if(r[q]===undefined||r[q]===null||typeof r[q]==="function"){continue}if(typeof r[q]==="object"&&r[q]["ReferenceParameters"]){s+="<r:"+q+"><a:Address>"+r[q].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+r[q]["ReferenceParameters"]["ResourceURI"]+"</w:ResourceURI><w:SelectorSet>";var u=r[q]["ReferenceParameters"]["SelectorSet"]["Selector"];if(Array.isArray(u)){for(var o=0;o<u.length;o++){s+="<w:Selector"+a(u[o])+">"+u[o]["Value"]+"</w:Selector>"}}else{s+="<w:Selector"+a(u)+">"+u.Value+"</w:Selector>"}s+="</w:SelectorSet></a:ReferenceParameters></r:"+q+">"}else{if(Array.isArray(r[q])){for(var o=0;o<r[q].length;o++){s+="<r:"+q+">"+r[q][o].toString()+"</r:"+q+">"}}else{s+="<r:"+q+">"+r[q].toString()+"</r:"+q+">"}}}s+="</r:"+p+">";return s}function a(o){if(!o){return""}var q=" ";for(var p in o){if(!o.hasOwnProperty(p)||p.indexOf("@")!==0){continue}q+=p.substring(1)+'="'+o[p]+'" '}return q}function d(s){if(!s){return""}if(typeof s=="string"){return s}if(s.InstanceID){return'<w:SelectorSet><w:Selector Name="InstanceID">'+s.InstanceID+"</w:Selector></w:SelectorSet>"}var q="<w:SelectorSet>";for(var p in s){if(!s.hasOwnProperty(p)){continue}q+='<w:Selector Name="'+p+'">';if(s[p]["ReferenceParameters"]){q+="<a:EndpointReference>";q+="<a:Address>"+s[p]["Address"]+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+s[p]["ReferenceParameters"]["ResourceURI"]+"</w:ResourceURI><w:SelectorSet>";var r=s[p]["ReferenceParameters"]["SelectorSet"]["Selector"];if(Array.isArray(r)){for(var o=0;o<r.length;o++){q+="<w:Selector"+a(r[o])+">"+r[o]["Value"]+"</w:Selector>"}}else{q+="<w:Selector"+a(r)+">"+r.Value+"</w:Selector>"}q+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else{q+=s[p]}q+="</w:Selector>"}q+="</w:SelectorSet>";return q}function e(o){if(window.DOMParser){return new DOMParser().parseFromString(o,"text/xml")}else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=false;p.loadXML(o);return p}}return j};var CreateAmtRemoteDesktop=function(m,p){var o={};o.canvasid=m;o.CanvasId=Q(m);o.scrolldiv=p;o.canvas=Q(m).getContext("2d");o.protocol=2;o.state=0;o.acc="";o.ScreenWidth=960;o.ScreenHeight=700;o.width=0;o.height=0;o.rwidth=0;o.rheight=0;o.bpp=2;o.useZRLE=true;o.showmouse=true;o.buttonmask=0;o.spare=null;o.sparew=0;o.spareh=0;o.sparew2=0;o.spareh2=0;o.sparecache={};o.ZRLEfirst=1;o.onScreenSizeChange=null;o.frameRateDelay=0;o.kvmDataSupported=false;o.onKvmData=null;o.onKvmDataPending=[];o.onKvmDataAck=-1;o.holding=false;o.lastKeepAlive=Date.now();o.Debug=function(q){console.log(q)};o.xxStateChange=function(q){if(q==0){o.canvas.fillStyle="#000000";o.canvas.fillRect(0,0,o.width,o.height);o.canvas.canvas.width=o.rwidth=o.width=640;o.canvas.canvas.height=o.rheight=o.height=400;QS(o.canvasid).cursor="default"}else{QS(o.canvasid).cursor=o.showmouse?"default":"none"}};o.ProcessData=function(t){if(!t){return}o.acc+=t;while(o.acc.length>0){var q=0;if(o.state==0&&o.acc.length>=12){q=12;o.state=1;o.send("RFB 003.008\n")}else{if(o.state==1&&o.acc.length>=1){q=o.acc.charCodeAt(0)+1;o.send(String.fromCharCode(1));o.state=2}else{if(o.state==2&&o.acc.length>=4){q=4;if(ReadInt(o.acc,0)!=0){return o.Stop()}o.send(String.fromCharCode(1));o.state=3}else{if(o.state==3&&o.acc.length>=24){var D=ReadInt(o.acc,20);if(o.acc.length<24+D){return}q=24+D;o.canvas.canvas.width=o.rwidth=o.width=o.ScreenWidth=ReadShort(o.acc,0);o.canvas.canvas.height=o.rheight=o.height=o.ScreenHeight=ReadShort(o.acc,2);var G="";if(o.useZRLE){G+=IntToStr(16)}G+=IntToStr(0);G+=IntToStr(1092);o.send(String.fromCharCode(2,0)+ShortToStr((G.length/4)+1)+G+IntToStr(-223));if(o.bpp==1){o.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0))}o.state=4;o.parent.xxStateChange(3);h();if(o.onScreenSizeChange!=null){o.onScreenSizeChange(o,o.ScreenWidth,o.ScreenHeight)}}else{if(o.state==4){switch(o.acc.charCodeAt(0)){case 0:if(o.acc.length<4){return}o.state=100+ReadShort(o.acc,2);q=4;break;case 2:q=1;break;case 3:if(o.acc.length<8){return}var C=ReadInt(o.acc,4)+8;if(o.acc.length<C){return}q=n(o.acc);break}}else{if(o.state>100&&o.acc.length>=12){var I=ReadShort(o.acc,0),K=ReadShort(o.acc,2),H=ReadShort(o.acc,4),A=ReadShort(o.acc,6),F=H*A,z=ReadInt(o.acc,8);if(z<17){if(H<1||H>64||A<1||A>64){console.log("Invalid tile size ("+H+","+A+"), disconnecting.");return o.Stop()}if(o.sparew!=H||o.spareh!=A){o.sparew=o.sparew2=H;o.spareh=o.spareh2=A;var J=o.sparew2+"x"+o.spareh2;o.spare=o.sparecache[J];if(!o.spare){o.sparecache[J]=o.spare=o.canvas.createImageData(o.sparew2,o.spareh2)}}}if(z==4294967073){o.canvas.canvas.width=o.rwidth=o.width=H;o.canvas.canvas.height=o.rheight=o.height=A;o.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(o.width)+ShortToStr(o.height));q=12;if(o.onScreenSizeChange!=null){o.onScreenSizeChange(o,o.ScreenWidth,o.ScreenHeight)}}else{if(z==0){var E=12,r=12+(F*o.bpp);if(o.acc.length<r){return}q=r;for(var B=0;B<F;B++){j(o.acc.charCodeAt(E++)+((o.bpp==2)?(o.acc.charCodeAt(E++)<<8):0),B)}g(o.spare,I,K)}else{if(z==16){if(o.acc.length<16){return}var u=ReadInt(o.acc,12);if(o.acc.length<(16+u)){return}var E=16,v=5,w=0;if(u>5&&o.acc.charCodeAt(E)==0&&ReadShortX(o.acc,E+1)==(u-v)){a(o.acc,E+5,I,K,H,A,F,u)}q=16+u}else{o.Debug("Unknown Encoding: "+z);return o.Stop()}}}if(--o.state==100){o.state=4;if(o.frameRateDelay==0){h()}else{setTimeout(h,o.frameRateDelay)}}}}}}}}if(q==0){return}o.acc=o.acc.substring(q)}};function a(t,C,K,L,J,w,G,u){var H=t.charCodeAt(C++),A,I,F,B={},D=0,E=0,z;if(H==0){for(z=0;z<G;z++){j(t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0),z)}g(o.spare,K,L)}else{if(H==1){I=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0);o.canvas.fillStyle="rgb("+((o.bpp==1)?((I&224)+","+((I&28)<<3)+","+b((I&3)<<6)):(((I>>8)&248)+","+((I>>3)&252)+","+((I&31)<<3)))+")";o.canvas.fillRect(K,L,J,w)}else{if(H>1&&H<17){var r=4,q=15;for(z=0;z<H;z++){B[z]=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0)}if(H==2){r=1;q=1}else{if(H<=4){r=2;q=3}}while(D<G&&C<t.length){I=t.charCodeAt(C++);for(z=(8-r);z>=0;z-=r){j(B[(I>>z)&q],D++)}}g(o.spare,K,L)}else{if(H==128){while(D<G&&C<t.length){I=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0);E=1;do{E+=(F=t.charCodeAt(C++))}while(F==255);while(--E>=0){j(I,D++)}}g(o.spare,K,L)}else{if(H>129){for(z=0;z<(H-128);z++){B[z]=t.charCodeAt(C++)+((o.bpp==2)?(t.charCodeAt(C++)<<8):0)}while(D<G&&C<t.length){E=1;A=t.charCodeAt(C++);I=B[A%128];if(A>127){do{E+=(F=t.charCodeAt(C++))}while(F==255)}while(--E>=0){j(I,D++)}}g(o.spare,K,L)}}}}}}o.hold=function(q){if(o.holding==q){return}o.holding=q;o.canvas.fillStyle="#000000";o.canvas.fillRect(0,0,o.width,o.height);if(o.holding==false){if((o.canvas.canvas.width!=o.width)||(o.canvas.canvas.height!=o.height)){o.canvas.canvas.width=o.width;o.canvas.canvas.height=o.height;if(o.onScreenSizeChange!=null){o.onScreenSizeChange(o,o.ScreenWidth,o.ScreenHeight)}}o.Send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(o.width)+ShortToStr(o.height))}else{o.UnGrabMouseInput();o.UnGrabKeyInput()}};function g(q,r,s){if(o.holding==true){return}o.canvas.putImageData(q,r,s)}function j(s,q){var r=q*4;if(o.bpp==1){o.spare.data[r++]=s&224;o.spare.data[r++]=(s&28)<<3;o.spare.data[r++]=b((s&3)<<6)}else{o.spare.data[r++]=(s>>8)&248;o.spare.data[r++]=(s>>3)&252;o.spare.data[r++]=(s&31)<<3}o.spare.data[r]=255}function b(q){return(q>127)?(q+32):q}function h(){if(o.holding==true){return}o.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(o.rwidth)+ShortToStr(o.rheight))}o.Start=function(){o.state=0;o.acc="";o.ZRLEfirst=1;o.onKvmDataPending=[];o.onKvmDataAck=-1;o.kvmDataSupported=false;for(var q in o.sparecache){delete o.sparecache[q]}};o.Stop=function(){o.UnGrabMouseInput();o.UnGrabKeyInput();o.parent.Stop()};o.send=function(q){o.parent.send(q)};var l={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};function k(q){if(q.code.startsWith("Key")&&q.code.length==4){return q.code.charCodeAt(3)+((q.shiftKey==false)?32:0)}if(q.code.startsWith("Digit")&&q.code.length==6){return q.code.charCodeAt(5)}if(q.code.startsWith("Numpad")&&q.code.length==7){return q.code.charCodeAt(6)}return l[q.code]}function c(q,r){if(!r){r=window.event}if(r.code){var s=k(r);if(s!=null){o.sendkey(s,q)}}else{var s=r.keyCode,t=s;if(r.shiftKey==false&&s>=65&&s<=90){t=s+32}if(s>=112&&s<=124){t=s+65358}if(s==8){t=65288}if(s==9){t=65289}if(s==13){t=65293}if(s==16){t=65505}if(s==17){t=65507}if(s==18){t=65513}if(s==27){t=65307}if(s==33){t=65365}if(s==34){t=65366}if(s==35){t=65367}if(s==36){t=65360}if(s==37){t=65361}if(s==38){t=65362}if(s==39){t=65363}if(s==40){t=65364}if(s==45){t=65379}if(s==46){t=65535}if(s>=96&&s<=105){t=s-48}if(s==106){t=42}if(s==107){t=43}if(s==109){t=45}if(s==110){t=46}if(s==111){t=47}if(s==186){t=59}if(s==187){t=61}if(s==188){t=44}if(s==189){t=45}if(s==190){t=46}if(s==191){t=47}if(s==192){t=96}if(s==219){t=91}if(s==220){t=92}if(s==221){t=93}if(s==222){t=39}o.sendkey(t,q)}return o.haltEvent(r)}o.sendkey=function(s,q){if(typeof s=="object"){for(var r in s){o.sendkey(s[r][0],s[r][1])}}else{o.send(String.fromCharCode(4,q,0,0)+IntToStr(s))}};function n(q){if(q.length<8){return 0}var s=ReadInt(o.acc,4)+8;if(q.length<s){return 0}if(o.onKvmData!=null){var r=q.substring(8,s);if((r.length>=16)&&(r.substring(0,15)=="\0KvmDataChannel")){if(o.kvmDataSupported==false){o.kvmDataSupported=true;console.log("KVM Data Channel Supported.")}if(((o.onKvmDataAck==-1)&&(r.length==16))||(r.charCodeAt(15)!=0)){o.onKvmDataAck=true}if(r.length>=16){o.onKvmData(r.substring(16))}if((o.onKvmDataAck==true)&&(o.onKvmDataPending.length>0)){o.sendKvmData(o.onKvmDataPending.shift())}}}return s}o.sendKvmData=function(q){if(o.onKvmDataAck!==true){o.onKvmDataPending.push(q)}else{q="\0KvmDataChannel\0"+q;o.send(String.fromCharCode(6,0,0,0)+IntToStr(q.length)+q);o.onKvmDataAck=false}};o.sendKeepAlive=function(){if(o.lastKeepAlive<Date.now()-5000){o.lastKeepAlive=Date.now();o.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\0KvmDataChannel\0")}};o.SendCtrlAltDelMsg=function(){o.sendcad()};o.sendcad=function(){o.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var e=false;var d=false;o.GrabMouseInput=function(){if(e==true){return}var q=o.canvas.canvas;q.onmouseup=o.mouseup;q.onmousedown=o.mousedown;q.onmousemove=o.mousemove;e=true};o.UnGrabMouseInput=function(){if(e==false){return}var q=o.canvas.canvas;q.onmousemove=null;q.onmouseup=null;q.onmousedown=null;e=false};o.GrabKeyInput=function(){if(d==true){return}document.onkeyup=o.handleKeyUp;document.onkeydown=o.handleKeyDown;document.onkeypress=o.handleKeys;d=true};o.UnGrabKeyInput=function(){if(d==false){return}document.onkeyup=null;document.onkeydown=null;document.onkeypress=null;d=false};o.handleKeys=function(q){return o.haltEvent(q)};o.handleKeyUp=function(q){return c(0,q)};o.handleKeyDown=function(q){return c(1,q)};o.haltEvent=function(q){if(q.preventDefault){q.preventDefault()}if(q.stopPropagation){q.stopPropagation()}return false};o.mousedblclick=function(q){};o.mousedown=function(q){o.buttonmask|=(1<<q.button);return o.mousemove(q)};o.mouseup=function(q){o.buttonmask&=(65535-(1<<q.button));return o.mousemove(q)};o.mousemove=function(q){if(o.state!=4){return true}var r=o.getPositionOfControl(Q(o.canvasid));o.mx=(q.pageX-r[0])*(o.canvas.canvas.height/Q(o.canvasid).offsetHeight);o.my=((q.pageY-r[1]+(p?p.scrollTop:0))*(o.canvas.canvas.width/Q(o.canvasid).offsetWidth));o.send(String.fromCharCode(5,o.buttonmask)+ShortToStr(o.mx)+ShortToStr(o.my));return o.haltEvent(q)};o.getPositionOfControl=function(q){var r=Array(2);r[0]=r[1]=0;while(q){r[0]+=q.offsetLeft;r[1]+=q.offsetTop;q=q.offsetParent}return r};return o};var CreateAmtRemoteTerminal=function(B){var C={};C.DivId=B;C.DivElement=document.getElementById(B);C.protocol=1;C.fxEmulation=0;C.lineFeed="\r\n";C.debugmode=0;C.width=80;C.height=25;var r=21;var s=13;var m=["000000","BB0000","00BB00","BBBB00","0000BB","BB00BB","00BBBB","BBBBBB","555555","FF5555","55FF55","FFFF55","5555FF","FF55FF","55FFFF","FFFFFF"];var p=0;var o=7;var n=0;var t=true;var w=0;var x=0;var v=0;var d=[];var e=0;var l=[];var y=[];var A=1;var z=2;C.Start=function(){};C.Init=function(E,D){C.width=E?E:80;C.height=D?D:25;for(var G=0;G<C.height;G++){y[G]=[];l[G]=[];for(var F=0;F<C.width;F++){y[G][F]=" ";l[G][F]=(7<<6)}}C.TermInit();C.TermDraw()};C.xxStateChange=function(D){};C.ProcessData=function(D){if(C.debugmode==2){console.log("TRecv("+D.length+"): "+rstr2hex(D))}if(C.capture!=null){C.capture+=D}k(D);C.TermDraw()};function k(E){for(var D=0;D<E.length;D++){j(String.fromCharCode(E.charCodeAt(D)),E.charCodeAt(D))}}function j(D,E){switch(v){case 0:switch(E){case 27:v=1;break;default:h(D);break}break;case 1:switch(D){case"[":e=0;d=[];v=2;break;case"(":v=4;break;case")":v=5;break;default:v=0;break}break;case 2:if(D>="0"&&D<="9"){if(!d[e]){d[e]=(D-"0")}else{d[e]=((d[e]*10)+(D-"0"))}break}else{if(D==";"){e++;break}else{if(!d[0]){d[0]=0}g(D,d,e+1);v=0}}break;case 4:v=0;break;case 5:v=0;break}}function g(G,D,E){var H;switch(G){case"c":C.TermResetScreen();break;case"A":if(E==1){x-=D[0];if(x<0){x=0}}break;case"B":if(E==1){x+=D[0];if(x>C.height){x=C.height}}break;case"C":if(E==1){w+=D[0];if(w>C.width){w=C.width}}break;case"D":if(E==1){w-=D[0];if(w<0){w=0}}break;case"d":if(E==1){x=D[0]-1;if(x>C.height){x=C.height}if(x<0){x=0}}break;case"G":if(E==1){w=D[0]-1;if(w<0){w=0}if(w>79){w=79}}break;case"J":if(E==1&&D[0]==2){C.TermClear((n<<12)+(o<<6));w=0;x=0}else{if(E==0||E==1&&D[0]==0){b();for(H=x+1;H<C.height;H++){c(H)}}else{if(E==1&&D[0]==1){b();for(H=0;H<x-1;H++){c(H)}}}}break;case"H":if(E==2){if(D[0]<1){D[0]=1}if(D[1]<1){D[1]=1}if(D[0]>C.height){D[0]=C.height}if(D[1]>C.width){D[1]=C.width}x=D[0]-1;w=D[1]-1}else{x=0;w=0}break;case"m":for(H=0;H<E;H++){if(!D[H]||D[H]==0){n=0;o=7;p=0}else{if(D[H]==1){if(o<8){o+=8}}else{if(D[H]==2||D[H]==22){if(o>=8){o-=8}}else{if(D[H]==7){p=2}else{if(D[H]==27){p=0}else{if(D[H]>=30&&D[H]<=37){var F=(o>=8);o=(D[H]-30);if(F&&o<=8){o+=8}}else{if(D[H]>=40&&D[H]<=47){n=(D[H]-40)}else{if(D[H]>=90&&D[H]<=99){o=(D[H]-82)}else{if(D[H]>=100&&D[H]<=109){n=(D[H]-92)}}}}}}}}}}break;case"K":if(E==0||(E==1&&(!D[0]||D[0]==0))){b()}else{if(E==1){if(D[0]==1){a()}else{if(D[0]==2){c(x)}}}}break;case"h":t=true;break;case"l":t=false;break;default:break}}C.ProcessVt100String=function(E){for(var D=0;D<E.length;D++){h(String.fromCharCode(E.charCodeAt(D)))}};function h(D){if(D=="\0"||D.charCodeAt()==7){return}var E=D.charCodeAt();switch(E){case 16:D=" ";break;case 24:D="?";break;case 25:D="?";break}if(w>C.width){w=C.width}if(x>(C.height-1)){x=(C.height-1)}switch(D){case"\b":if(w>0){w=w-1;q(" ")}break;case"\t":var F=8-(w%8);for(var G=0;G<F;G++){h(" ")}break;case"\n":x++;if(x>(C.height-1)){u(1);x=(C.height-1)}if(C.lineFeed="\n"){w=0}break;case"\r":w=0;break;default:if(w>=C.width){w=0;if(t){x++}if(x>=(C.height-1)){u(1);x=(C.height-1)}}q(D);w++;break}}function q(D){y[x][w]=D;l[x][w]=(o<<6)+(n<<12)+p}C.TermClear=function(D){for(var F=0;F<C.height;F++){for(var E=0;E<C.width;E++){y[F][E]=" ";l[F][E]=D}}};C.TermResetScreen=function(){p=0;o=7;n=0;t=true;w=0;x=0;C.TermClear(7<<6)};function b(){var D=(n<<12);for(var E=w;E<C.width;E++){y[x][E]=" ";l[x][E]=D}}function a(){var D=(n<<12);for(var E=0;E<w;E++){y[x][E]=" ";l[x][E]=D}}function c(D){var E=(n<<12);for(var F=0;F<C.width;F++){y[D][F]=" ";l[D][F]=E}}C.TermSendKeys=function(D){if(C.debugmode==2){if(C.debugmode==2){console.log("TSend("+D.length+"): "+rstr2hex(D))}}C.parent.send(D)};C.TermSendKey=function(D){if(C.debugmode==2){if(C.debugmode==2){console.log("TSend(1): "+rstr2hex(String.fromCharCode(D)))}}C.parent.send(String.fromCharCode(D))};function u(D){var E,F;for(F=0;F<C.height-D;F++){y[F]=y[F+D];l[F]=l[F+D]}for(F=C.height-D;F<C.height;F++){y[F]=[];l[F]=[];for(E=0;E<C.width;E++){y[F][E]=" ";l[F][E]=(7<<6)}}}C.TermHandleKeys=function(D){if(!D.ctrlKey){if(D.which==127){C.TermSendKey(8)}else{if(D.which==13){C.TermSendKeys(C.lineFeed)}else{if(D.which!=0){C.TermSendKey(D.which)}}}return false}if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}};C.TermHandleKeyUp=function(D){if((D.which!=8)&&(D.which!=32)&&(D.which!=9)){return true}if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return false};C.TermHandleKeyDown=function(D){if((D.which>=65)&&(D.which<=90)&&(D.ctrlKey==true)){C.TermSendKey(D.which-64);if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return}if(D.which==27){C.TermSendKeys(String.fromCharCode(27));return true}if(D.which==37){C.TermSendKeys(String.fromCharCode(27,91,68));return true}if(D.which==38){C.TermSendKeys(String.fromCharCode(27,91,65));return true}if(D.which==39){C.TermSendKeys(String.fromCharCode(27,91,67));return true}if(D.which==40){C.TermSendKeys(String.fromCharCode(27,91,66));return true}if(D.which==9){C.TermSendKeys("\t");if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return true}if(D.which!=8&&D.which!=32&&D.which!=9){return true}C.TermSendKey(D.which);if(D.preventDefault){D.preventDefault()}if(D.stopPropagation){D.stopPropagation()}return false};C.TermDraw=function(){var E,D="",F="",G,H=1,J,K;for(var L=0;L<C.height;++L){for(var I=0;I<C.width;++I){G=l[L][I];if(w==I&&x==L){G|=z}if(G!=H){D+=F;F="";J=6;K=12;if(G&z){J=12;K=6}D+='<span style="color:#'+m[(G>>J)&63]+";background-color:#"+m[(G>>K)&63];if(G&A){D+=";text-decoration:underline"}D+=';">';F="</span>"+F;H=G}E=y[L][I];switch(E){case"&":D+="&amp;";break;case"<":D+="&lt;";break;case">":D+="&gt;";break;case" ":D+="&nbsp;";break;default:D+=E;break}}if(L!=(C.height-1)){D+="<br>"}}C.DivElement.innerHTML="<font size='4'><b>"+D+F+"</b></font>"};C.TermInit=function(){C.TermResetScreen()};C.Init();return C};var ZLIB=(ZLIB||{});if(typeof ZLIB.common_initialized==="undefined"){ZLIB.Z_NO_FLUSH=0;ZLIB.Z_PARTIAL_FLUSH=1;ZLIB.Z_SYNC_FLUSH=2;ZLIB.Z_FULL_FLUSH=3;ZLIB.Z_FINISH=4;ZLIB.Z_BLOCK=5;ZLIB.Z_TREES=6;ZLIB.Z_OK=0;ZLIB.Z_STREAM_END=1;ZLIB.Z_NEED_DICT=2;ZLIB.Z_ERRNO=(-1);ZLIB.Z_STREAM_ERROR=(-2);ZLIB.Z_DATA_ERROR=(-3);ZLIB.Z_MEM_ERROR=(-4);ZLIB.Z_BUF_ERROR=(-5);ZLIB.Z_VERSION_ERROR=(-6);ZLIB.Z_DEFLATED=8;ZLIB.z_stream=function(){this.next_in=0;this.avail_in=0;this.total_in=0;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg=null;this.state=null;this.data_type=0;this.adler=0;this.input_data="";this.output_data="";this.error=0;this.checksum_function=null};ZLIB.gz_header=function(){this.text=0;this.time=0;this.xflags=0;this.os=255;this.extra=null;this.extra_len=0;this.extra_max=0;this.name=null;this.name_max=0;this.comment=null;this.comm_max=0;this.hcrc=0;this.done=0};ZLIB.common_initialized=true}if(typeof ZLIB==="undefined"){alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js")}(function(){var o=15;var G=0;var D=1;var am=2;var af=3;var A=4;var B=5;var ac=6;var j=7;var F=8;var q=9;var p=10;var an=11;var ao=12;var aj=13;var l=14;var k=15;var al=16;var W=17;var g=18;var S=19;var R=20;var T=21;var r=22;var s=23;var aa=24;var Y=25;var d=26;var V=27;var v=28;var a=29;var ab=30;var ak=31;var z=852;var y=592;var x=(z+y);var h=0;var X=1;var u=2;var N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var O=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69];var L=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var M=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";function K(aR,aV){var aM=15;var aU=aR.next;var at=(aV==u?aR.distbits:aR.lenbits);var aX=aR.work;var aH=aR.lens;var aI=(aV==u?aR.nlen:0);var aS=aR.codes;var au;if(aV==X){au=aR.nlen}else{if(aV==u){au=aR.ndist}else{au=19}}var aG;var aT;var aN,aL;var aQ;var aw;var ax;var aF;var aW;var aD;var aE;var aB;var aJ;var aK;var aC;var aO;var aq;var ar;var az;var aA;var ay;var av=new Array(aM+1);var aP=new Array(aM+1);for(aG=0;aG<=aM;aG++){av[aG]=0}for(aT=0;aT<au;aT++){av[aH[aI+aT]]++}aQ=at;for(aL=aM;aL>=1;aL--){if(av[aL]!=0){break}}if(aQ>aL){aQ=aL}if(aL==0){aC={op:64,bits:1,val:0};aS[aU++]=aC;aS[aU++]=aC;if(aV==u){aR.distbits=1}else{aR.lenbits=1}aR.next=aU;return 0}for(aN=1;aN<aL;aN++){if(av[aN]!=0){break}}if(aQ<aN){aQ=aN}aF=1;for(aG=1;aG<=aM;aG++){aF<<=1;aF-=av[aG];if(aF<0){return -1}}if(aF>0&&(aV==h||aL!=1)){aR.next=aU;return -1}aP[1]=0;for(aG=1;aG<aM;aG++){aP[aG+1]=aP[aG]+av[aG]}for(aT=0;aT<au;aT++){if(aH[aI+aT]!=0){aX[aP[aH[aI+aT]]++]=aT}}switch(aV){case h:aq=az=aX;ar=0;aA=0;ay=19;break;case X:aq=N;ar=-257;az=O;aA=-257;ay=256;break;default:aq=L;az=M;ar=0;aA=0;ay=-1}aD=0;aT=0;aG=aN;aO=aU;aw=aQ;ax=0;aJ=-1;aW=1<<aQ;aK=aW-1;if((aV==X&&aW>=z)||(aV==u&&aW>=y)){aR.next=aU;return 1}for(;;){aC={op:0,bits:aG-ax,val:0};if(aX[aT]<ay){aC.val=aX[aT]}else{if(aX[aT]>ay){aC.op=az[aA+aX[aT]];aC.val=aq[ar+aX[aT]]}else{aC.op=32+64}}aE=1<<(aG-ax);aB=1<<aw;aN=aB;do{aB-=aE;aS[aO+(aD>>>ax)+aB]=aC}while(aB!=0);aE=1<<(aG-1);while(aD&aE){aE>>>=1}if(aE!=0){aD&=aE-1;aD+=aE}else{aD=0}aT++;if(--(av[aG])==0){if(aG==aL){break}aG=aH[aI+aX[aT]]}if(aG>aQ&&(aD&aK)!=aJ){if(ax==0){ax=aQ}aO+=aN;aw=aG-ax;aF=(1<<aw);while(aw+ax<aL){aF-=av[aw+ax];if(aF<=0){break}aw++;aF<<=1}aW+=1<<aw;if((aV==X&&aW>=z)||(aV==u&&aW>=y)){aR.next=aU;return 1}aJ=aD&aK;aS[aU+aJ]={op:aw,bits:aQ,val:aO-aU}}}if(aD!=0){aS[aO+aD]={op:64,bits:aG-ax,val:0}}aR.next=aU+aW;if(aV==u){aR.distbits=aQ}else{aR.lenbits=aQ}return 0}function H(aN,aL){var aM;var aC;var aI;var aD;var aK;var aq;var ax;var aR;var aO;var aQ;var aP;var aB;var ar;var at;var aE;var au;var aH;var aw;var aA;var aJ;var aF;var av;var az=-1;var ay=-1;aM=aN.state;aC=aN.input_data;aI=aN.next_in;aD=aI+aN.avail_in-5;aK=aN.next_out;aq=aK-(aL-aN.avail_out);ax=aK+(aN.avail_out-257);aR=aM.wsize;aO=aM.whave;aQ=aM.wnext;aP=aM.window;aB=aM.hold;ar=aM.bits;at=aM.codes;aE=aM.lencode;au=aM.distcode;aH=(1<<aM.lenbits)-1;aw=(1<<aM.distbits)-1;loop:do{if(ar<15){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8;aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}aA=at[aE+(aB&aH)];dolen:while(true){aJ=aA.bits;aB>>>=aJ;ar-=aJ;aJ=aA.op;if(aJ==0){aN.output_data+=String.fromCharCode(aA.val);aK++}else{if(aJ&16){aF=aA.val;aJ&=15;if(aJ){if(ar<aJ){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}aF+=aB&((1<<aJ)-1);aB>>>=aJ;ar-=aJ}if(ar<15){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8;aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}aA=at[au+(aB&aw)];dodist:while(true){aJ=aA.bits;aB>>>=aJ;ar-=aJ;aJ=aA.op;if(aJ&16){av=aA.val;aJ&=15;if(ar<aJ){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8;if(ar<aJ){aB+=(aC.charCodeAt(aI++)&255)<<ar;ar+=8}}av+=aB&((1<<aJ)-1);aB>>>=aJ;ar-=aJ;aJ=aK-aq;if(av>aJ){aJ=av-aJ;if(aJ>aO){if(aM.sane){aN.msg="invalid distance too far back";aM.mode=a;break loop}}az=0;ay=-1;if(aQ==0){az+=aR-aJ;if(aJ<aF){aF-=aJ;aN.output_data+=aP.substring(az,az+aJ);aK+=aJ;aJ=0;az=-1;ay=aK-av}}else{az+=aQ-aJ;if(aJ<aF){aF-=aJ;aN.output_data+=aP.substring(az,az+aJ);aK+=aJ;az=-1;ay=aK-av}}}else{az=-1;ay=aK-av}if(az>=0){aN.output_data+=aP.substring(az,az+aF);aK+=aF;az+=aF}else{var aG=aF;if(aG>aK-ay){aG=aK-ay}aN.output_data+=aN.output_data.substring(ay,ay+aG);aK+=aG;aF-=aG;ay+=aG;aK+=aF;while(aF>2){aN.output_data+=aN.output_data.charAt(ay++);aN.output_data+=aN.output_data.charAt(ay++);aN.output_data+=aN.output_data.charAt(ay++);aF-=3}if(aF){aN.output_data+=aN.output_data.charAt(ay++);if(aF>1){aN.output_data+=aN.output_data.charAt(ay++)}}}}else{if((aJ&64)==0){aA=at[au+(aA.val+(aB&((1<<aJ)-1)))];continue dodist}else{aN.msg="invalid distance code";aM.mode=a;break loop}}break dodist}}else{if((aJ&64)==0){aA=at[aE+(aA.val+(aB&((1<<aJ)-1)))];continue dolen}else{if(aJ&32){aM.mode=an;break loop}else{aN.msg="invalid literal/length code";aM.mode=a;break loop}}}}break dolen}}while(aI<aD&&aK<ax);aF=ar>>>3;aI-=aF;ar-=aF<<3;aB&=(1<<ar)-1;aN.next_in=aI;aN.next_out=aK;aN.avail_in=(aI<aD?5+(aD-aI):5-(aI-aD));aN.avail_out=(aK<ax?257+(ax-aK):257-(aK-ax));aM.hold=aB;aM.bits=ar}function ae(at){var ar;var aq=new Array(at);for(ar=0;ar<at;ar++){aq[ar]=0}return aq}function E(at,ar,aq){return(at&&(ar in at))?at[ar]:aq}function e(){return 0}function J(){var ar;this.mode=0;this.last=0;this.wrap=0;this.havedict=0;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=0;this.distcode=0;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=0;this.lens=ae(320);this.work=ae(288);this.codes=new Array(x);var aq={op:0,bits:0,val:0};for(ar=0;ar<x;ar++){this.codes[ar]=aq}this.sane=0;this.back=0;this.was=0}ZLIB.inflateResetKeep=function(ar){var aq;if(!ar||!ar.state){return ZLIB.Z_STREAM_ERROR}aq=ar.state;ar.total_in=ar.total_out=aq.total=0;ar.msg=null;if(aq.wrap){ar.adler=aq.wrap&1}aq.mode=G;aq.last=0;aq.havedict=0;aq.dmax=32768;aq.head=null;aq.hold=0;aq.bits=0;aq.lencode=0;aq.distcode=0;aq.next=0;aq.sane=1;aq.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(ar,at){var au;var aq;if(!ar||!ar.state){return ZLIB.Z_STREAM_ERROR}aq=ar.state;if(typeof at==="undefined"){at=o}if(at<0){au=0;at=-at}else{au=(at>>>4)+1;if(at<48){at&=15}}if(au==1&&(typeof ZLIB.adler32==="function")){ar.checksum_function=ZLIB.adler32}else{if(au==2&&(typeof ZLIB.crc32==="function")){ar.checksum_function=ZLIB.crc32}else{ar.checksum_function=e}}if(at&&(at<8||at>15)){return ZLIB.Z_STREAM_ERROR}if(aq.window&&aq.wbits!=at){aq.window=null}aq.wrap=au;aq.wbits=at;aq.wsize=0;aq.whave=0;aq.wnext=0;return ZLIB.inflateResetKeep(ar)};ZLIB.inflateInit=function(ar){var aq=new ZLIB.z_stream();aq.state=new J();ZLIB.inflateReset(aq,ar);return aq};ZLIB.inflatePrime=function(at,aq,au){var ar;if(!at||!at.state){return ZLIB.Z_STREAM_ERROR}ar=at.state;if(aq<0){ar.hold=0;ar.bits=0;return ZLIB.Z_OK}if(aq>16||ar.bits+aq>32){return ZLIB.Z_STREAM_ERROR}au&=(1<<aq)-1;ar.hold+=au<<ar.bits;ar.bits+=aq;return ZLIB.Z_OK};var U=null;var t=null;function C(ar){var aq;if(!U){U=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:212},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:180},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:244},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:204},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:172},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:236},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:156},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:220},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:188},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:252},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:194},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:162},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:226},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:146},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:210},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:178},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:242},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:202},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:170},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:234},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:154},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:218},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:186},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:250},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:198},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:166},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:230},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:150},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:214},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:182},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:246},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:206},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:174},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:238},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:158},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:222},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:190},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:254},{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:193},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:161},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:225},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:145},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:209},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:177},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:241},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:201},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:169},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:233},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:153},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:217},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:185},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:249},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:197},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:165},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:229},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:149},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:213},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:181},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:245},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:205},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:173},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:237},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:157},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:221},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:189},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:253},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:195},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:163},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:227},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:147},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:211},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:243},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:203},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:171},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:235},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]}if(!t){t=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]}ar.lencode=0;ar.distcode=512;for(aq=0;aq<512;aq++){ar.codes[aq]=U[aq]}for(aq=0;aq<32;aq++){ar.codes[aq+512]=t[aq]}ar.lenbits=9;ar.distbits=5}function ap(at){var ar=at.state;var aq=at.output_data.length;if(ar.window===null){ar.window=""}if(ar.wsize==0){ar.wsize=1<<ar.wbits}if(aq>=ar.wsize){ar.window=at.output_data.substring(aq-ar.wsize)}else{if(ar.whave+aq<ar.wsize){ar.window+=at.output_data}else{ar.window=ar.window.substring(ar.whave-(ar.wsize-aq))+at.output_data}}ar.whave=ar.window.length;if(ar.whave<ar.wsize){ar.wnext=ar.whave}else{ar.wnext=0}return 0}function m(ar,at){var aq=[at&255,(at>>>8)&255];ar.state.check=ar.checksum_function(ar.state.check,aq,0,2)}function n(ar,at){var aq=[at&255,(at>>>8)&255,(at>>>16)&255,(at>>>24)&255];ar.state.check=ar.checksum_function(ar.state.check,aq,0,4)}function Z(ar,aq){aq.strm=ar;aq.left=ar.avail_out;aq.next=ar.next_in;aq.have=ar.avail_in;aq.hold=ar.state.hold;aq.bits=ar.state.bits;return aq}function ah(aq){var ar=aq.strm;ar.next_in=aq.next;ar.avail_out=aq.left;ar.avail_in=aq.have;ar.state.hold=aq.hold;ar.state.bits=aq.bits}function P(aq){aq.hold=0;aq.bits=0}function ag(aq){if(aq.have==0){return false}aq.have--;aq.hold+=(aq.strm.input_data.charCodeAt(aq.next++)&255)<<aq.bits;aq.bits+=8;return true}function ad(ar,aq){while(ar.bits<aq){if(!ag(ar)){return false}}return true}function b(ar,aq){return ar.hold&((1<<aq)-1)}function w(ar,aq){ar.hold>>>=aq;ar.bits-=aq}function c(aq){aq.hold>>>=aq.bits&7;aq.bits-=aq.bits&7}function ai(aq){return((aq>>>24)&255)+((aq>>>8)&65280)+((aq&65280)<<8)+((aq&255)<<24)}var I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(aD,at){var aC;var aB;var aq,az;var ar;var av=-1;var au=-1;var aw;var ax;var ay;var aA;if(!aD||!aD.state||(!aD.input_data&&aD.avail_in!=0)){return ZLIB.Z_STREAM_ERROR}aC=aD.state;if(aC.mode==an){aC.mode=ao}aB={};Z(aD,aB);aq=aB.have;az=aB.left;aA=ZLIB.Z_OK;inf_leave:for(;;){switch(aC.mode){case G:if(aC.wrap==0){aC.mode=ao;break}if(!ad(aB,16)){break inf_leave}if((aC.wrap&2)&&aB.hold==35615){aC.check=aD.checksum_function(0,null,0,0);m(aD,aB.hold);P(aB);aC.mode=D;break}aC.flags=0;if(aC.head!==null){aC.head.done=-1}if(!(aC.wrap&1)||((b(aB,8)<<8)+(aB.hold>>>8))%31){aD.msg="incorrect header check";aC.mode=a;break}if(b(aB,4)!=ZLIB.Z_DEFLATED){aD.msg="unknown compression method";aC.mode=a;break}w(aB,4);ay=b(aB,4)+8;if(aC.wbits==0){aC.wbits=ay}else{if(ay>aC.wbits){aD.msg="invalid window size";aC.mode=a;break}}aC.dmax=1<<ay;aD.adler=aC.check=aD.checksum_function(0,null,0,0);aC.mode=aB.hold&512?q:an;P(aB);break;case D:if(!ad(aB,16)){break inf_leave}aC.flags=aB.hold;if((aC.flags&255)!=ZLIB.Z_DEFLATED){aD.msg="unknown compression method";aC.mode=a;break}if(aC.flags&57344){aD.msg="unknown header flags set";aC.mode=a;break}if(aC.head!==null){aC.head.text=(aB.hold>>>8)&1}if(aC.flags&512){m(aD,aB.hold)}P(aB);aC.mode=am;case am:if(!ad(aB,32)){break inf_leave}if(aC.head!==null){aC.head.time=aB.hold}if(aC.flags&512){n(aD,aB.hold)}P(aB);aC.mode=af;case af:if(!ad(aB,16)){break inf_leave}if(aC.head!==null){aC.head.xflags=aB.hold&255;aC.head.os=aB.hold>>>8}if(aC.flags&512){m(aD,aB.hold)}P(aB);aC.mode=A;case A:if(aC.flags&1024){if(!ad(aB,16)){break inf_leave}aC.length=aB.hold;if(aC.head!==null){aC.head.extra_len=aB.hold}if(aC.flags&512){m(aD,aB.hold)}P(aB);aC.head.extra=""}else{if(aC.head!==null){aC.head.extra=null}}aC.mode=B;case B:if(aC.flags&1024){ar=aC.length;if(ar>aB.have){ar=aB.have}if(ar){if(aC.head!==null&&aC.head.extra!==null){ay=aC.head.extra_len-aC.length;aC.head.extra+=aD.input_data.substring(aB.next,aB.next+(ay+ar>aC.head.extra_max?aC.head.extra_max-ay:ar))}if(aC.flags&512){aC.check=aD.checksum_function(aC.check,aD.input_data,aB.next,ar)}aB.have-=ar;aB.next+=ar;aC.length-=ar}if(aC.length){break inf_leave}}aC.length=0;aC.mode=ac;case ac:if(aC.flags&2048){if(aB.have==0){break inf_leave}if(aC.head!==null&&aC.head.name===null){aC.head.name=""}ar=0;do{ay=aD.input_data.charAt(aB.next+ar);ar++;if(ay==="\0"){break}if(aC.head!==null&&aC.length<aC.head.name_max){aC.head.name+=ay;aC.length++}}while(ar<aB.have);if(aC.flags&512){aC.check=aD.checksum_function(aC.check,aD.input_data,aB.next,ar)}aB.have-=ar;aB.next+=ar;if(ay!=="\0"){break inf_leave}}else{if(aC.head!==null){aC.head.name=null}}aC.length=0;aC.mode=j;case j:if(aC.flags&4096){if(aB.have==0){break inf_leave}ar=0;if(aC.head!==null&&aC.head.comment===null){aC.head.comment=""}do{ay=aD.input_data.charAt(aB.next+ar);ar++;if(ay==="\0"){break}if(aC.head!==null&&aC.length<aC.head.comm_max){aC.head.comment+=ay;aC.length++}}while(ar<aB.have);if(aC.flags&512){aC.check=aD.checksum_function(aC.check,aD.input_data,aB.next,ar)}aB.have-=ar;aB.next+=ar;if(ay!=="\0"){break inf_leave}}else{if(aC.head!==null){aC.head.comment=null}}aC.mode=F;case F:if(aC.flags&512){if(!ad(aB,16)){break inf_leave}if(aB.hold!=(aC.check&65535)){aD.msg="header crc mismatch";aC.mode=a;break}P(aB)}if(aC.head!==null){aC.head.hcrc=(aC.flags>>>9)&1;aC.head.done=1}aD.adler=aC.check=aD.checksum_function(0,null,0,0);aC.mode=an;break;case q:if(!ad(aB,32)){break inf_leave}aD.adler=aC.check=ai(aB.hold);P(aB);aC.mode=p;case p:if(aC.havedict==0){ah(aB);return ZLIB.Z_NEED_DICT}aD.adler=aC.check=aD.checksum_function(0,null,0,0);aC.mode=an;case an:if(at==ZLIB.Z_BLOCK||at==ZLIB.Z_TREES){break inf_leave}case ao:if(aC.last){c(aB);aC.mode=d;break}if(!ad(aB,3)){break inf_leave}aC.last=b(aB,1);w(aB,1);switch(b(aB,2)){case 0:aC.mode=aj;break;case 1:C(aC);aC.mode=S;if(at==ZLIB.Z_TREES){w(aB,2);break inf_leave}break;case 2:aC.mode=al;break;case 3:aD.msg="invalid block type";aC.mode=a}w(aB,2);break;case aj:c(aB);if(!ad(aB,32)){break inf_leave}if((aB.hold&65535)!=(((aB.hold>>>16)&65535)^65535)){aD.msg="invalid stored block lengths";aC.mode=a;break}aC.length=aB.hold&65535;P(aB);aC.mode=l;if(at==ZLIB.Z_TREES){break inf_leave}case l:aC.mode=k;case k:ar=aC.length;if(ar){if(ar>aB.have){ar=aB.have}if(ar>aB.left){ar=aB.left}if(ar==0){break inf_leave}aD.output_data+=aD.input_data.substring(aB.next,aB.next+ar);aD.next_out+=ar;aB.have-=ar;aB.next+=ar;aB.left-=ar;aC.length-=ar;break}aC.mode=an;break;case al:if(!ad(aB,14)){break inf_leave}aC.nlen=b(aB,5)+257;w(aB,5);aC.ndist=b(aB,5)+1;w(aB,5);aC.ncode=b(aB,4)+4;w(aB,4);if(aC.nlen>286||aC.ndist>30){aD.msg="too many length or distance symbols";aC.mode=a;break}aC.have=0;aC.mode=W;case W:while(aC.have<aC.ncode){if(!ad(aB,3)){break inf_leave}var aE=b(aB,3);aC.lens[I[aC.have++]]=aE;w(aB,3)}while(aC.have<19){aC.lens[I[aC.have++]]=0}aC.next=0;aC.lencode=0;aC.lenbits=7;aA=K(aC,h);if(aA){aD.msg="invalid code lengths set";aC.mode=a;break}aC.have=0;aC.mode=g;case g:while(aC.have<aC.nlen+aC.ndist){for(;;){aw=aC.codes[aC.lencode+b(aB,aC.lenbits)];if(aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}if(aw.val<16){w(aB,aw.bits);aC.lens[aC.have++]=aw.val}else{if(aw.val==16){if(!ad(aB,aw.bits+2)){break inf_leave}w(aB,aw.bits);if(aC.have==0){aD.msg="invalid bit length repeat";aC.mode=a;break}ay=aC.lens[aC.have-1];ar=3+b(aB,2);w(aB,2)}else{if(aw.val==17){if(!ad(aB,aw.bits+3)){break inf_leave}w(aB,aw.bits);ay=0;ar=3+b(aB,3);w(aB,3)}else{if(!ad(aB,aw.bits+7)){break inf_leave}w(aB,aw.bits);ay=0;ar=11+b(aB,7);w(aB,7)}}if(aC.have+ar>aC.nlen+aC.ndist){aD.msg="invalid bit length repeat";aC.mode=a;break}while(ar--){aC.lens[aC.have++]=ay}}}if(aC.mode==a){break}if(aC.lens[256]==0){aD.msg="invalid code -- missing end-of-block";aC.mode=a;break}aC.next=0;aC.lencode=aC.next;aC.lenbits=9;aA=K(aC,X);if(aA){aD.msg="invalid literal/lengths set";aC.mode=a;break}aC.distcode=aC.next;aC.distbits=6;aA=K(aC,u);if(aA){aD.msg="invalid distances set";aC.mode=a;break}aC.mode=S;if(at==ZLIB.Z_TREES){break inf_leave}case S:aC.mode=R;case R:if(aB.have>=6&&aB.left>=258){ah(aB);H(aD,az);Z(aD,aB);if(aC.mode==an){aC.back=-1}break}aC.back=0;for(;;){aw=aC.codes[aC.lencode+b(aB,aC.lenbits)];if(aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}if(aw.op&&(aw.op&240)==0){ax=aw;for(;;){aw=aC.codes[aC.lencode+ax.val+(b(aB,ax.bits+ax.op)>>>ax.bits)];if(ax.bits+aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}w(aB,ax.bits);aC.back+=ax.bits}w(aB,aw.bits);aC.back+=aw.bits;aC.length=aw.val;if(aw.op==0){aC.mode=Y;break}if(aw.op&32){aC.back=-1;aC.mode=an;break}if(aw.op&64){aD.msg="invalid literal/length code";aC.mode=a;break}aC.extra=aw.op&15;aC.mode=T;case T:if(aC.extra){if(!ad(aB,aC.extra)){break inf_leave}aC.length+=b(aB,aC.extra);w(aB,aC.extra);aC.back+=aC.extra}aC.was=aC.length;aC.mode=r;case r:for(;;){aw=aC.codes[aC.distcode+b(aB,aC.distbits)];if(aw.bits<=aB.bits){break}if(!ag(aB)){break inf_leave}}if((aw.op&240)==0){ax=aw;for(;;){aw=aC.codes[aC.distcode+ax.val+(b(aB,ax.bits+ax.op)>>>ax.bits)];if((ax.bits+aw.bits)<=aB.bits){break}if(!ag(aB)){break inf_leave}}w(aB,ax.bits);aC.back+=ax.bits}w(aB,aw.bits);aC.back+=aw.bits;if(aw.op&64){aD.msg="invalid distance code";aC.mode=a;break}aC.offset=aw.val;aC.extra=aw.op&15;aC.mode=s;case s:if(aC.extra){if(!ad(aB,aC.extra)){break inf_leave}aC.offset+=b(aB,aC.extra);w(aB,aC.extra);aC.back+=aC.extra}aC.mode=aa;case aa:if(aB.left==0){break inf_leave}ar=az-aB.left;if(aC.offset>ar){ar=aC.offset-ar;if(ar>aC.whave){if(aC.sane){aD.msg="invalid distance too far back";aC.mode=a;break}}if(ar>aC.wnext){ar-=aC.wnext;av=aC.wsize-ar;au=-1}else{av=aC.wnext-ar;au=-1}if(ar>aC.length){ar=aC.length}}else{av=-1;au=aD.next_out-aC.offset;ar=aC.length}if(ar>aB.left){ar=aB.left}aB.left-=ar;aC.length-=ar;if(av>=0){aD.output_data+=aC.window.substring(av,av+ar);aD.next_out+=ar;ar=0}else{aD.next_out+=ar;do{aD.output_data+=aD.output_data.charAt(au++)}while(--ar)}if(aC.length==0){aC.mode=R}break;case Y:if(aB.left==0){break inf_leave}aD.output_data+=String.fromCharCode(aC.length);aD.next_out++;aB.left--;aC.mode=R;break;case d:if(aC.wrap){if(!ad(aB,32)){break inf_leave}az-=aB.left;aD.total_out+=az;aC.total+=az;if(az){aD.adler=aC.check=aD.checksum_function(aC.check,aD.output_data,aD.output_data.length-az,az)}az=aB.left;if((aC.flags?aB.hold:ai(aB.hold))!=aC.check){aD.msg="incorrect data check";aC.mode=a;break}P(aB)}aC.mode=V;case V:if(aC.wrap&&aC.flags){if(!ad(aB,32)){break inf_leave}if(aB.hold!=(aC.total&4294967295)){aD.msg="incorrect length check";aC.mode=a;break}P(aB)}aC.mode=v;case v:aA=ZLIB.Z_STREAM_END;break inf_leave;case a:aA=ZLIB.Z_DATA_ERROR;break inf_leave;case ab:return ZLIB.Z_MEM_ERROR;case ak:default:return ZLIB.Z_STREAM_ERROR}}inf_leave:ah(aB);if(aC.wsize||(az!=aD.avail_out&&aC.mode<a&&(aC.mode<d||at!=ZLIB.Z_FINISH))){if(ap(aD)){aC.mode=ab;return ZLIB.Z_MEM_ERROR}}aq-=aD.avail_in;az-=aD.avail_out;aD.total_in+=aq;aD.total_out+=az;aC.total+=az;if(aC.wrap&&az){aD.adler=aC.check=aD.checksum_function(aC.check,aD.output_data,0,aD.output_data.length)}aD.data_type=aC.bits+(aC.last?64:0)+(aC.mode==an?128:0)+(aC.mode==S||aC.mode==l?256:0);if(((aq==0&&az==0)||at==ZLIB.Z_FINISH)&&aA==ZLIB.Z_OK){aA=ZLIB.Z_BUF_ERROR}return aA};ZLIB.inflateEnd=function(ar){var aq;if(!ar||!ar.state){return ZLIB.Z_STREAM_ERROR}aq=ar.state;aq.window=null;ar.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=function(au,av){var at;var aq;var ar=16384;this.input_data=au;this.next_in=E(av,"next_in",0);this.avail_in=E(av,"avail_in",au.length-this.next_in);at=E(av,"flush",ZLIB.Z_SYNC_FLUSH);aq=E(av,"avail_out",-1);var aw="";do{this.avail_out=(aq>=0?aq:ar);this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,at);if(aq>=0){return this.output_data}aw+=this.output_data;if(this.avail_out>0){break}}while(this.error==ZLIB.Z_OK);return aw};ZLIB.z_stream.prototype.inflateReset=function(aq){return ZLIB.inflateReset(this,aq)}}());if(typeof ZLIB==="undefined"){alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js")}(function(){var c=65521;var d=5552;function b(e,g,k,h){var l;var j;l=(e>>>16)&65535;e&=65535;if(h==1){e+=g.charCodeAt(k)&255;if(e>=c){e-=c}l+=e;if(l>=c){l-=c}return e|(l<<16)}if(g===null){return 1}if(h<16){while(h--){e+=g.charCodeAt(k++)&255;l+=e}if(e>=c){e-=c}l%=c;return e|(l<<16)}while(h>=d){h-=d;j=d>>4;do{e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e}while(--j);e%=c;l%=c}if(h){while(h>=16){h-=16;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e;e+=g.charCodeAt(k++)&255;l+=e}while(h--){e+=g.charCodeAt(k++)&255;l+=e}e%=c;l%=c}return e|(l<<16)}function a(e,g,k,h){var l;var j;l=(e>>>16)&65535;e&=65535;if(h==1){e+=g[k];if(e>=c){e-=c}l+=e;if(l>=c){l-=c}return e|(l<<16)}if(g===null){return 1}if(h<16){while(h--){e+=g[k++];l+=e}if(e>=c){e-=c}l%=c;return e|(l<<16)}while(h>=d){h-=d;j=d>>4;do{e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e}while(--j);e%=c;l%=c}if(h){while(h>=16){h-=16;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e;e+=g[k++];l+=e}while(h--){e+=g[k++];l+=e}e%=c;l%=c}return e|(l<<16)}ZLIB.adler32=function(e,g,j,h){if(typeof g==="string"){return b(e,g,j,h)}else{return a(e,g,j,h)}};ZLIB.adler32_combine=function(e,g,h){var k;var l;var j;if(h<0){return 4294967295}h%=c;j=h;k=e&65535;l=j*k;l%=c;k+=(g&65535)+c-1;l+=((e>>16)&65535)+((g>>16)&65535)+c-j;if(k>=c){k-=c}if(k>=c){k-=c}if(l>=(c<<1)){l-=(c<<1)}if(l>=c){l-=c}return k|(l<<16)}}());if(typeof ZLIB==="undefined"){alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js")}(function(){var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function c(j,h,l,k){if(h==null){return 0}j=j^4294967295;while(k>=8){j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);j=a[(j^h.charCodeAt(l++))&255]^(j>>>8);k-=8}if(k){do{j=a[(j^h.charCodeAt(l++))&255]^(j>>>8)}while(--k)}return j^4294967295}function b(j,h,l,k){if(h==null){return 0}j=j^4294967295;while(k>=8){j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);j=a[(j^h[l++])&255]^(j>>>8);k-=8}if(k){do{j=a[(j^h[l++])&255]^(j>>>8)}while(--k)}return j^4294967295}ZLIB.crc32=function(j,h,l,k){if(typeof h==="string"){return c(j,h,l,k)}else{return b(j,h,l,k)}};var d=32;function g(h,l){var k;var j=0;k=0;while(l){if(l&1){k^=h[j]}l>>=1;j++}return k}function e(k,h){var j;for(j=0;j<d;j++){k[j]=g(h,h[j])}}ZLIB.crc32_combine=function(h,j,l){var m;var p;var k;var o;if(l<=0){return h}k=new Array(d);o=new Array(d);o[0]=3988292384;p=1;for(m=1;m<d;m++){o[m]=p;p<<=1}e(k,o);e(o,k);do{e(k,o);if(l&1){h=g(k,h)}l>>=1;if(l==0){break}e(o,k);if(l&1){h=g(o,h)}l>>=1}while(l!=0);h^=j;return h}}());var CreateAmtRedirect=function(e,a){var g={};g.m=e;e.parent=g;g.authCookie=a;g.State=0;g.socket=null;g.host=null;g.port=0;g.user=null;g.pass=null;g.authuri="/RedirectionService";g.tlsv1only=0;g.inDataCount=0;g.connectstate=0;g.protocol=e.protocol;g.debugmode=0;g.amtaccumulator="";g.amtsequence=1;g.amtkeepalivetimer=null;g.onStateChanged=null;g.Start=function(h,k,n,j,l){g.host=h;g.port=k;g.user=n;g.pass=j;g.connectstate=0;g.inDataCount=0;var m=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+h+"&port="+k+"&tls="+l+((n=="*")?"&serverauth=1":"")+((typeof j==="undefined")?("&serverauth=1&user="+n):"");if((a!=null)&&(a!="")){m+="&auth="+a}g.socket=new WebSocket(m);g.socket.onopen=g.xxOnSocketConnected;g.socket.onmessage=g.xxOnMessage;g.socket.onclose=g.xxOnSocketClosed;g.xxStateChange(1)};g.xxOnSocketConnected=function(){if(g.debugmode==1){console.log("onSocketConnected")}g.xxStateChange(2);if(g.protocol==1){g.xxSend(g.RedirectStartSol)}if(g.protocol==2){g.xxSend(g.RedirectStartKvm)}if(g.protocol==3){g.xxSend(g.RedirectStartIder)}};var b=new FileReader();var d=false,c=[];if(b.readAsBinaryString){b.onload=function(h){g.xxOnSocketData(h.target.result);if(c.length==0){d=false}else{b.readAsBinaryString(new Blob([c.shift()]))}}}else{if(b.readAsArrayBuffer){b.onloadend=function(h){g.xxOnSocketData(h.target.result);if(c.length==0){d=false}else{b.readAsArrayBuffer(c.shift())}}}}g.xxOnMessage=function(k){g.inDataCount++;if(typeof k.data=="object"){if(d==true){c.push(k.data);return}if(b.readAsBinaryString){d=true;b.readAsBinaryString(new Blob([k.data]))}else{if(f.readAsArrayBuffer){d=true;b.readAsArrayBuffer(k.data)}else{var h="",j=new Uint8Array(k.data),m=j.byteLength;for(var l=0;l<m;l++){h+=String.fromCharCode(j[l])}g.xxOnSocketData(h)}}}else{g.xxOnSocketData(k.data)}};g.xxOnSocketData=function(t){if(!t||g.connectstate==-1){return}if(typeof t==="object"){var m="";var o=new Uint8Array(t);var y=o.byteLength;for(var x=0;x<y;x++){m+=String.fromCharCode(o[x])}t=m}else{if(typeof t!=="string"){return}}if((g.protocol==2||g.protocol==3)&&g.connectstate==1){return g.m.ProcessData(t)}g.amtaccumulator+=t;while(g.amtaccumulator.length>=1){var p=0;switch(g.amtaccumulator.charCodeAt(0)){case 17:if(g.amtaccumulator.length<4){return}var L=g.amtaccumulator.charCodeAt(1);switch(L){case 0:if(g.amtaccumulator.length<13){return}var C=g.amtaccumulator.charCodeAt(12);if(g.amtaccumulator.length<13+C){return}g.xxSend(String.fromCharCode(19,0,0,0,0,0,0,0,0));p=(13+C);break;default:g.Stop(1);break}break;case 20:if(g.amtaccumulator.length<9){return}var k=ReadIntX(g.amtaccumulator,5);if(g.amtaccumulator.length<9+k){return}var K=g.amtaccumulator.charCodeAt(1);var l=g.amtaccumulator.charCodeAt(4);var h=[];for(x=0;x<k;x++){h.push(g.amtaccumulator.charCodeAt(9+x))}var j=g.amtaccumulator.substring(9,9+k);p=9+k;if(l==0){if(h.indexOf(4)>=0){g.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(g.user.length+g.authuri.length+8)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(0,0)+String.fromCharCode(g.authuri.length)+g.authuri+String.fromCharCode(0,0,0,0))}else{if(h.indexOf(3)>=0){g.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(g.user.length+g.authuri.length+7)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(0,0)+String.fromCharCode(g.authuri.length)+g.authuri+String.fromCharCode(0,0,0))}else{if(h.indexOf(1)>=0){g.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(g.user.length+g.pass.length+2)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(g.pass.length)+g.pass)}else{g.Stop(2)}}}}else{if((l==3||l==4)&&K==1){var s=0;var G=j.charCodeAt(s);var F=j.substring(s+1,s+1+G);s+=(G+1);var B=j.charCodeAt(s);var A=j.substring(s+1,s+1+B);s+=(B+1);var E=0;var D=null;var q=g.xxRandomNonce(32);var J="00000002";var v="";if(l==4){E=j.charCodeAt(s);D=j.substring(s+1,s+1+E);s+=(E+1);v=J+":"+q+":"+D+":"}var u=hex_md5(hex_md5(g.user+":"+F+":"+g.pass)+":"+A+":"+v+hex_md5("POST:"+g.authuri));var M=g.user.length+F.length+A.length+g.authuri.length+q.length+J.length+u.length+7;if(l==4){M+=(D.length+1)}var n=String.fromCharCode(19,0,0,0,l)+IntToStrX(M)+String.fromCharCode(g.user.length)+g.user+String.fromCharCode(F.length)+F+String.fromCharCode(A.length)+A+String.fromCharCode(g.authuri.length)+g.authuri+String.fromCharCode(q.length)+q+String.fromCharCode(J.length)+J+String.fromCharCode(u.length)+u;if(l==4){n+=(String.fromCharCode(D.length)+D)}g.xxSend(n)}else{if(K==0){if(g.protocol==1){var z=10000;var O=100;var N=0;var I=10000;var H=100;var w=0;g.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(g.amtsequence++)+ShortToStrX(z)+ShortToStrX(O)+ShortToStrX(N)+ShortToStrX(I)+ShortToStrX(H)+ShortToStrX(w)+IntToStrX(0))}if(g.protocol==2){g.xxSend(String.fromCharCode(64,0,0,0,0,0,0,0))}if(g.protocol==3){g.connectstate=1;g.xxStateChange(3)}}else{g.Stop(3)}}}break;case 33:if(g.amtaccumulator.length<23){break}p=23;g.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(g.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));if(g.protocol==1){g.amtkeepalivetimer=setInterval(g.xxSendAmtKeepAlive,2000)}g.connectstate=1;g.xxStateChange(3);break;case 41:if(g.amtaccumulator.length<10){break}p=10;break;case 42:if(g.amtaccumulator.length<10){break}var r=(10+((g.amtaccumulator.charCodeAt(9)&255)<<8)+(g.amtaccumulator.charCodeAt(8)&255));if(g.amtaccumulator.length<r){break}g.m.ProcessData(g.amtaccumulator.substring(10,r));p=r;break;case 43:if(g.amtaccumulator.length<8){break}p=8;break;case 65:if(g.amtaccumulator.length<8){break}g.connectstate=1;g.m.Start();if(g.amtaccumulator.length>8){g.m.ProcessData(g.amtaccumulator.substring(8))}p=g.amtaccumulator.length;break;default:console.log("Unknown Intel AMT command: "+g.amtaccumulator.charCodeAt(0)+" acclen="+g.amtaccumulator.length);g.Stop(4);return}if(p==0){return}g.amtaccumulator=g.amtaccumulator.substring(p)}};g.xxSend=function(k){if(g.socket!=null&&g.socket.readyState==WebSocket.OPEN){if(g.debugmode==1){console.log("Send",k)}var h=new Uint8Array(k.length);for(var j=0;j<k.length;++j){h[j]=k.charCodeAt(j)}g.socket.send(h.buffer)}};g.send=function(h){if(g.socket==null||g.connectstate!=1){return}if(g.protocol==1){g.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(g.amtsequence++)+ShortToStrX(h.length)+h)}else{g.xxSend(h)}};g.xxSendAmtKeepAlive=function(){if(g.socket==null){return}g.xxSend(String.fromCharCode(43,0,0,0)+IntToStrX(g.amtsequence++))};g.xxRandomNonceX="abcdef0123456789";g.xxRandomNonce=function(j){var k="";for(var h=0;h<j;h++){k+=g.xxRandomNonceX.charAt(Math.floor(Math.random()*g.xxRandomNonceX.length))}return k};g.xxOnSocketClosed=function(){if(g.debugmode==1){console.log("onSocketClosed")}if((g.inDataCount==0)&&(g.tlsv1only==0)){g.tlsv1only=1;g.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+g.host+"&port="+g.port+"&tls="+g.tls+"&tls1only=1"+((g.user=="*")?"&serverauth=1":"")+((typeof pass==="undefined")?("&serverauth=1&user="+g.user):""));g.socket.onopen=g.xxOnSocketConnected;g.socket.onmessage=g.xxOnMessage;g.socket.onclose=g.xxOnSocketClosed}else{g.Stop(5)}};g.xxStateChange=function(h){if(g.State==h){return}g.State=h;g.m.xxStateChange(g.State);if(g.onStateChanged!=null){g.onStateChanged(g,g.State)}};g.Stop=function(h){if(g.debugmode==1){console.log("onSocketStop",h)}g.xxStateChange(0);g.connectstate=-1;g.amtaccumulator="";if(g.socket!=null){g.socket.close();g.socket=null}if(g.amtkeepalivetimer!=null){clearInterval(g.amtkeepalivetimer);g.amtkeepalivetimer=null}};g.RedirectStartSol=String.fromCharCode(16,0,0,0,83,79,76,32);g.RedirectStartKvm=String.fromCharCode(16,1,0,0,75,86,77,82);g.RedirectStartIder=String.fromCharCode(16,0,0,0,73,68,69,82);return g};var CreateWsmanComm=function(l,o,q,n,p){var m={};m.PendingAjax=[];m.ActiveAjaxCount=0;m.MaxActiveAjaxCount=1;m.FailAllError=0;m.challengeParams=null;m.noncecounter=1;m.authcounter=0;m.socket=null;m.socketState=0;m.host=l;m.port=o;m.user=q;m.pass=n;m.tls=p;m.tlsv1only=1;m.cnonce=Math.random().toString(36).substring(7);m.PerformAjax=function(t,s,v,u,w,r){if(m.ActiveAjaxCount<m.MaxActiveAjaxCount&&m.PendingAjax.length==0){m.PerformAjaxEx(t,s,v,w,r)}else{if(u==1){m.PendingAjax.unshift([t,s,v,w,r])}else{m.PendingAjax.push([t,s,v,w,r])}}};m.PerformNextAjax=function(){if(m.ActiveAjaxCount>=m.MaxActiveAjaxCount||m.PendingAjax.length==0){return}var r=m.PendingAjax.shift();m.PerformAjaxEx(r[0],r[1],r[2],r[3],r[4]);m.PerformNextAjax()};m.PerformAjaxEx=function(t,s,u,v,r){if(m.FailAllError!=0){m.gotNextMessagesError({status:m.FailAllError},"error",null,[t,s,u,v,r]);return}if(!t){t=""}m.ActiveAjaxCount++;return m.PerformAjaxExNodeJS(t,s,u,v,r)};m.pendingAjaxCall=[];m.PerformAjaxExNodeJS=function(t,s,u,v,r){m.PerformAjaxExNodeJS2(t,s,u,v,r,3)};m.PerformAjaxExNodeJS2=function(t,s,v,w,r,u){if(u<=0||m.FailAllError!=0){m.ActiveAjaxCount--;if(m.FailAllError!=999){m.gotNextMessages(null,"error",{status:((m.FailAllError==0)?408:m.FailAllError)},[t,s,v,w,r])}m.PerformNextAjax();return}m.pendingAjaxCall.push([t,s,v,w,r,u]);if(m.socketState==0){m.xxConnectHttpSocket()}else{if(m.socketState==2){m.sendRequest(t,w,r)}}};m.sendRequest=function(t,v,r){v=v?v:"/wsman";r=r?r:"POST";var s=r+" "+v+" HTTP/1.1\r\n";if(m.challengeParams!=null){var u=hex_md5(hex_md5(m.user+":"+m.challengeParams.realm+":"+m.pass)+":"+m.challengeParams.nonce+":"+m.noncecounter+":"+m.cnonce+":"+m.challengeParams.qop+":"+hex_md5(r+":"+v));s+="Authorization: "+m.renderDigest({username:m.user,realm:m.challengeParams.realm,nonce:m.challengeParams.nonce,uri:v,qop:m.challengeParams.qop,response:u,nc:m.noncecounter++,cnonce:m.cnonce})+"\r\n"}s+="Host: "+m.host+":"+m.port+"\r\nTransfer-Encoding: chunked\r\n\r\n"+t.length.toString(16).toUpperCase()+"\r\n"+t+"\r\n0\r\n\r\n";g(s)};m.parseDigest=function(r){var s=r.substring(7).split(",");for(i in s){s[i]=s[i].trim()}return s.reduce(function(t,v){var u=v.split("=");t[u[0]]=u[1].replace(/"/g,"");return t},{})};m.renderDigest=function(r){var s=[];for(i in r){s.push(i)}return"Digest "+s.reduce(function(u,t){return u+","+t+'="'+r[t]+'"'},"").substring(1)};m.xxConnectHttpSocket=function(){m.socketParseState=0;m.socketAccumulator="";m.socketHeader=null;m.socketData="";m.socketState=1;console.log(m.tlsv1only);m.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+m.host+"&port="+m.port+"&tls="+m.tls+"&tlsv1only="+m.tlsv1only+((q=="*")?"&serverauth=1":"")+((typeof n==="undefined")?("&serverauth=1&user="+q):""));m.socket.onopen=c;m.socket.onmessage=a;m.socket.onclose=b};function c(){m.socketState=2;for(i in m.pendingAjaxCall){m.sendRequest(m.pendingAjaxCall[i][0],m.pendingAjaxCall[i][3],m.pendingAjaxCall[i][4])}}var h=new FileReader();var k=false,j=[];if(h.readAsBinaryString){h.onload=function(r){d(r.target.result);if(j.length==0){k=false}else{h.readAsBinaryString(new Blob([j.shift()]))}}}else{if(h.readAsArrayBuffer){h.onloadend=function(r){d(r.target.result);if(j.length==0){k=false}else{h.readAsArrayBuffer(j.shift())}}}}function a(t){if(typeof t.data=="object"){if(k==true){j.push(t.data);return}if(h.readAsBinaryString){k=true;h.readAsBinaryString(new Blob([t.data]))}else{if(h.readAsArrayBuffer){k=true;h.readAsArrayBuffer(t.data)}else{var r="",s=new Uint8Array(t.data),v=s.byteLength;for(var u=0;u<v;u++){r+=String.fromCharCode(s[u])}d(r)}}}else{d(t.data)}}function d(v){if(typeof v==="object"){var r="",s=new Uint8Array(v),y=s.byteLength;for(var x=0;x<y;x++){r+=String.fromCharCode(s[x])}v=r}else{if(typeof v!=="string"){return}}m.socketAccumulator+=v;while(true){if(m.socketParseState==0){var w=m.socketAccumulator.indexOf("\r\n\r\n");if(w<0){return}m.socketHeader=m.socketAccumulator.substring(0,w).split("\r\n");m.socketAccumulator=m.socketAccumulator.substring(w+4);m.socketParseState=1;m.socketData="";m.socketXHeader={Directive:m.socketHeader[0].split(" ")};for(x in m.socketHeader){if(x!=0){var z=m.socketHeader[x].indexOf(":");m.socketXHeader[m.socketHeader[x].substring(0,z).toLowerCase()]=m.socketHeader[x].substring(z+2)}}}if(m.socketParseState==1){var u=-1;if((m.socketXHeader.connection!=undefined)&&(m.socketXHeader.connection.toLowerCase()=="close")&&((m.socketXHeader["transfer-encoding"]==undefined)||(m.socketXHeader["transfer-encoding"].toLowerCase()!="chunked"))){u=0}else{if(m.socketXHeader["content-length"]!=undefined){u=parseInt(m.socketXHeader["content-length"]);if(m.socketAccumulator.length<u){return}var v=m.socketAccumulator.substring(0,u);m.socketAccumulator=m.socketAccumulator.substring(u);m.socketData=v;u=0}else{var t=m.socketAccumulator.indexOf("\r\n");if(t<0){return}u=parseInt(m.socketAccumulator.substring(0,t),16);if(isNaN(u)){if(m.websocket){m.websocket.close()}return}if(m.socketAccumulator.length<t+2+u+2){return}var v=m.socketAccumulator.substring(t+2,t+2+u);m.socketAccumulator=m.socketAccumulator.substring(t+2+u+2);m.socketData+=v}}if(u==0){e(m.socketXHeader,m.socketData);m.socketParseState=0;m.socketHeader=null}}}}function e(u,t){var w=parseInt(u.Directive[1]);if(isNaN(w)){w=602}if(w==401&&++(m.authcounter)<3){m.challengeParams=m.parseDigest(u["www-authenticate"])}else{var v=m.pendingAjaxCall.shift();m.authcounter=0;m.ActiveAjaxCount--;m.gotNextMessages(t,"success",{status:w},v);m.PerformNextAjax()}}function b(s){m.socketState=0;if(m.socket!=null){m.socket.close();m.socket=null}if(m.pendingAjaxCall.length>0){var t=m.pendingAjaxCall.shift();var u=t[5];m.PerformAjaxExNodeJS2(t[0],t[1],t[2],t[3],t[4],--u)}}function g(u){if(m.socketState==2&&m.socket!=null&&m.socket.readyState==WebSocket.OPEN){var r=new Uint8Array(u.length);for(var t=0;t<u.length;++t){r[t]=u.charCodeAt(t)}try{m.socket.send(r.buffer)}catch(s){}}}m.gotNextMessages=function(s,u,t,r){if(m.FailAllError==999){return}if(m.FailAllError!=0){r[1](null,m.FailAllError,r[2]);return}if(t.status!=200){r[1](null,t.status,r[2]);return}r[1](s,200,r[2])};m.gotNextMessagesError=function(t,u,s,r){if(m.FailAllError==999){return}if(m.FailAllError!=0){r[1](null,m.FailAllError,r[2]);return}r[1](m,null,{Header:{HttpError:t.status}},t.status,r[2])};m.CancelAllQueries=function(r){while(m.PendingAjax.length>0){var t=m.PendingAjax.shift();t[1](null,r,t[2])}if(m.websocket!=null){m.websocket.close();m.websocket=null;m.socketState=0}};return m};var CreateAgentRedirect=function(e,g,k,a){var h={};h.m=g;g.parent=h;h.meshserver=e;h.authCookie=a;h.State=0;h.nodeid=null;h.socket=null;h.connectstate=-1;h.tunnelid=Math.random().toString(36).substring(2);h.protocol=g.protocol;h.onStateChanged=null;h.ctrlMsgAllowed=true;h.attemptWebRTC=false;h.webRtcActive=false;h.webSwitchOk=false;h.webchannel=null;h.webrtc=null;h.debugmode=0;h.Start=function(l){var n,m=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/meshrelay.ashx?id="+h.tunnelid;if((a!=null)&&(a!="")){m+="&auth="+a}h.nodeid=l;h.connectstate=0;h.socket=new WebSocket(m);h.socket.onopen=h.xxOnSocketConnected;h.socket.onmessage=h.xxOnMessage;h.socket.onerror=function(o){};h.socket.onclose=h.xxOnSocketClosed;h.xxStateChange(1);h.meshserver.send({action:"msg",type:"tunnel",nodeid:h.nodeid,value:"*/meshrelay.ashx?id="+h.tunnelid})};h.xxOnSocketConnected=function(){if(h.debugmode==1){console.log("onSocketConnected")}h.xxStateChange(2)};h.xxOnControlCommand=function(n){var l;try{l=JSON.parse(n)}catch(m){return}if(l.ctrlChannel!="102938"){h.xxOnSocketData(n);return}if(h.webrtc!=null){if(l.type=="answer"){h.webrtc.setRemoteDescription(new RTCSessionDescription(l),function(){},h.xxCloseWebRTC)}else{if(l.type=="webrtc0"){h.webSwitchOk=true;j()}else{if(l.type=="webrtc1"){h.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc2"}')}else{if(l.type=="webrtc2"){}}}}}};h.sendCtrlMsg=function(m){if(h.ctrlMsgAllowed==true){if((typeof args!="undefined")&&args.redirtrace){console.log("RedirSend",typeof m,m)}try{h.socket.send(m)}catch(l){}}};function j(){if((h.webSwitchOk==true)&&(h.webRtcActive==true)){h.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc0"}');h.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc1"}');if(h.onStateChanged!=null){h.onStateChanged(h,h.State)}}}h.xxOnMessage=function(o){if(h.State<3){if(o.data=="c"){try{h.socket.send(h.protocol)}catch(p){}h.xxStateChange(3);if(h.attemptWebRTC==true){var n=null;if(typeof RTCPeerConnection!=="undefined"){h.webrtc=new RTCPeerConnection(n)}else{if(typeof webkitRTCPeerConnection!=="undefined"){h.webrtc=new webkitRTCPeerConnection(n)}}if(h.webrtc!=null){h.webchannel=h.webrtc.createDataChannel("DataChannel",{});h.webchannel.onmessage=h.xxOnMessage;h.webchannel.onopen=function(){h.webRtcActive=true;j()};h.webchannel.onclose=function(s){if(h.webRtcActive){h.Stop()}};h.webrtc.onicecandidate=function(s){if(s.candidate==null){try{h.socket.send(JSON.stringify(h.webrtcoffer))}catch(t){}}else{h.webrtcoffer.sdp+=("a="+s.candidate.candidate+"\r\n")}};h.webrtc.oniceconnectionstatechange=function(){if(h.webrtc!=null){if(h.webrtc.iceConnectionState=="disconnected"){if(h.webRtcActive==true){h.Stop()}else{h.xxCloseWebRTC()}}else{if(h.webrtc.iceConnectionState=="failed"){h.xxCloseWebRTC()}}}};h.webrtc.createOffer(function(s){h.webrtcoffer=s;h.webrtc.setLocalDescription(s,function(){},h.xxCloseWebRTC)},h.xxCloseWebRTC,{mandatory:{OfferToReceiveAudio:false,OfferToReceiveVideo:false}})}}return}}if(typeof o.data=="string"){h.xxOnControlCommand(o.data);return}if(typeof o.data=="object"){if(d==true){c.push(o.data);return}if(b.readAsBinaryString){d=true;b.readAsBinaryString(new Blob([o.data]))}else{if(b.readAsArrayBuffer){d=true;b.readAsArrayBuffer(o.data)}else{var l="",m=new Uint8Array(o.data),r=m.byteLength;for(var q=0;q<r;q++){l+=String.fromCharCode(m[q])}h.xxOnSocketData(l)}}}else{h.xxOnSocketData(o.data)}};var b=new FileReader();var d=false,c=[];if(b.readAsBinaryString){b.onload=function(l){h.xxOnSocketData(l.target.result);if(c.length==0){d=false}else{b.readAsBinaryString(new Blob([c.shift()]))}}}else{if(b.readAsArrayBuffer){b.onloadend=function(l){h.xxOnSocketData(l.target.result);if(c.length==0){d=false}else{b.readAsArrayBuffer(c.shift())}}}}h.xxOnSocketData=function(n){if(!n||h.connectstate==-1){return}if(typeof n==="object"){var l="",m=new Uint8Array(n),p=m.byteLength;for(var o=0;o<p;o++){l+=String.fromCharCode(m[o])}n=l}else{if(typeof n!=="string"){return}}if((typeof args!="undefined")&&args.redirtrace){console.log("RedirRecv",typeof n,n.length,n)}return h.m.ProcessData(n)};h.sendText=function(l){if(typeof l!="string"){l=JSON.stringify(l)}h.send(encode_utf8(l))};h.send=function(p){if((typeof args!="undefined")&&args.redirtrace){console.log("RedirSend",typeof p,p.length,p)}try{if(h.socket!=null&&h.socket.readyState==WebSocket.OPEN){if(typeof p=="string"){if(h.debugmode==1){var l=new Uint8Array(p.length),m=[];for(var o=0;o<p.length;++o){l[o]=p.charCodeAt(o);m.push(p.charCodeAt(o))}if(h.webRtcActive==true){h.webchannel.send(l.buffer)}else{h.socket.send(l.buffer)}}else{var l=new Uint8Array(p.length);for(var o=0;o<p.length;++o){l[o]=p.charCodeAt(o)}if(h.webRtcActive==true){h.webchannel.send(l.buffer)}else{h.socket.send(l.buffer)}}}else{if(h.webRtcActive==true){h.webchannel.send(p)}else{h.socket.send(p)}}}}catch(n){}};h.xxOnSocketClosed=function(){h.Stop(1)};h.xxStateChange=function(l){if(h.State==l){return}h.State=l;h.m.xxStateChange(h.State);if(h.onStateChanged!=null){h.onStateChanged(h,h.State)}};h.xxCloseWebRTC=function(){if(h.webchannel!=null){try{h.webchannel.close()}catch(l){}h.webchannel=null}if(h.webrtc!=null){try{h.webrtc.close()}catch(l){}h.webrtc=null}h.webRtcActive=false};h.Stop=function(m){if(h.debugmode==1){console.log("stop",m)}h.xxCloseWebRTC();h.connectstate=-1;if(h.socket!=null){try{if(h.socket.readyState==1){h.sendCtrlMsg('{"ctrlChannel":"102938","type":"close"}');h.socket.close()}}catch(l){}h.socket=null}h.xxStateChange(0)};return h};var CreateKvmDataChannel=function(h,e,d){var g={};g.m=e;e.parent=g;g.webchannel=h;g.State=0;g.protocol=e.protocol;g.onStateChanged=null;g.onControlMsg=null;g.debugmode=0;g.keepalive=d;g.rtcKeepAlive=null;g.Start=function(){if(g.debugmode==1){console.log("start")}g.xxStateChange(3);g.webchannel.onmessage=g.xxOnMessage;g.rtcKeepAlive=setInterval(g.xxSendRtcKeepAlive,30000)};var a=new FileReader();var c=false,b=[];if(a.readAsBinaryString){a.onload=function(j){g.xxOnSocketData(j.target.result);if(b.length==0){c=false}else{a.readAsBinaryString(new Blob([b.shift()]))}}}else{if(a.readAsArrayBuffer){a.onloadend=function(j){g.xxOnSocketData(j.target.result);if(b.length==0){c=false}else{a.readAsArrayBuffer(b.shift())}}}}g.xxOnMessage=function(l){if(typeof l.data=="string"){if(g.onControlMsg!=null){g.onControlMsg(l.data)}return}if(typeof l.data=="object"){if(c==true){b.push(l.data);return}if(a.readAsBinaryString){c=true;a.readAsBinaryString(new Blob([l.data]))}else{if(f.readAsArrayBuffer){c=true;a.readAsArrayBuffer(l.data)}else{var j="",k=new Uint8Array(l.data),n=k.byteLength;for(var m=0;m<n;m++){j+=String.fromCharCode(k[m])}g.xxOnSocketData(j)}}}else{g.xxOnSocketData(l.data)}};g.xxOnSocketData=function(l){if(!l){return}if(typeof l==="object"){var j="",k=new Uint8Array(l),n=k.byteLength;for(var m=0;m<n;m++){j+=String.fromCharCode(k[m])}l=j}else{if(typeof l!=="string"){return}}return g.m.ProcessData(l)};g.sendCtrlMsg=function(j){if(typeof j=="string"){g.webchannel.send(j);if(g.keepalive!=null){g.keepalive.sendKeepAlive()}}};g.send=function(l){if(typeof l=="string"){var j=new Uint8Array(l.length);for(var k=0;k<l.length;++k){j[k]=l.charCodeAt(k)}l=j}g.webchannel.send(l)};g.xxStateChange=function(j){if(g.State==j){return}g.State=j;g.m.xxStateChange(g.State);if(g.onStateChanged!=null){g.onStateChanged(g,g.State)}};g.Stop=function(){if(g.debugmode==1){console.log("stop")}if(g.rtcKeepAlive!=null){clearInterval(g.rtcKeepAlive);g.rtcKeepAlive=null}g.xxStateChange(0)};g.xxSendRtcKeepAlive=function(){g.sendCtrlMsg(JSON.stringify({action:"ping"}))};return g};var CreateAgentRemoteDesktop=function(a,e){var d={};d.CanvasId=a;if(typeof a==="string"){d.CanvasId=Q(a)}d.Canvas=d.CanvasId.getContext("2d");d.scrolldiv=e;d.State=0;d.PendingOperations=[];d.tilesReceived=0;d.TilesDrawn=0;d.KillDraw=0;d.ipad=false;d.tabletKeyboardVisible=false;d.LastX=0;d.LastY=0;d.touchenabled=0;d.submenuoffset=0;d.touchtimer=null;d.TouchArray={};d.connectmode=0;d.connectioncount=0;d.rotation=0;d.protocol=2;d.debugmode=0;d.firstUpKeys=[];d.stopInput=false;d.sessionid=0;d.username;d.oldie=false;d.CompressionLevel=50;d.ScalingLevel=1024;d.FrameRateTimer=50;d.FirstDraw=false;d.ScreenWidth=960;d.ScreenHeight=700;d.width=960;d.height=960;d.onScreenSizeChange=null;d.onMessage=null;d.onConnectCountChanged=null;d.onDebugMessage=null;d.onTouchEnabledChanged=null;d.onDisplayinfo=null;d.accumulator=null;d.Start=function(){d.State=0;d.accumulator=null};d.Stop=function(){d.setRotation(0);d.UnGrabKeyInput();d.UnGrabMouseInput();d.touchenabled=0;if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}d.Canvas.clearRect(0,0,d.CanvasId.width,d.CanvasId.height)};d.xxStateChange=function(g){if(d.State==g){return}d.State=g;d.CanvasId.style.cursor="default";switch(g){case 0:d.Stop();break;case 3:break}};d.send=function(g){if(d.debugmode>1){console.log("KSend("+g.length+"): "+rstr2hex(g))}d.parent.send(g)};d.ProcessPictureMsg=function(h,k,l){var j=new Image();j.xcount=d.tilesReceived++;var g=d.tilesReceived;j.src="data:image/jpeg;base64,"+btoa(h.substring(4,h.length));j.onload=function(){if(d.Canvas!=null&&d.KillDraw<g&&d.State!=0){d.PendingOperations.push([g,2,j,k,l]);while(d.DoPendingOperations()){}}};j.error=function(){console.log("DecodeTileError")}};d.DoPendingOperations=function(){if(d.PendingOperations.length==0){return false}for(var g=0;g<d.PendingOperations.length;g++){var h=d.PendingOperations[g];if(h[0]==(d.TilesDrawn+1)){if(h[1]==1){d.ProcessCopyRectMsg(h[2])}else{if(h[1]==2){d.Canvas.drawImage(h[2],d.rotX(h[3],h[4]),d.rotY(h[3],h[4]));delete h[2]}}d.PendingOperations.splice(g,1);delete h;d.TilesDrawn++;if(d.TilesDrawn==d.tilesReceived&&d.KillDraw<d.TilesDrawn){d.KillDraw=d.TilesDrawn=d.tilesReceived=0}return true}}if(d.oldie&&d.PendingOperations.length>0){d.TilesDrawn++}return false};d.ProcessCopyRectMsg=function(k){var l=((k.charCodeAt(0)&255)<<8)+(k.charCodeAt(1)&255);var m=((k.charCodeAt(2)&255)<<8)+(k.charCodeAt(3)&255);var g=((k.charCodeAt(4)&255)<<8)+(k.charCodeAt(5)&255);var h=((k.charCodeAt(6)&255)<<8)+(k.charCodeAt(7)&255);var n=((k.charCodeAt(8)&255)<<8)+(k.charCodeAt(9)&255);var j=((k.charCodeAt(10)&255)<<8)+(k.charCodeAt(11)&255);d.Canvas.drawImage(Canvas.canvas,l,m,n,j,g,h,n,j)};d.SendUnPause=function(){d.send(String.fromCharCode(0,8,0,5,0))};d.SendPause=function(){d.send(String.fromCharCode(0,8,0,5,1))};d.SendCompressionLevel=function(k,h,j,g){if(h){d.CompressionLevel=h}if(j){d.ScalingLevel=j}if(g){d.FrameRateTimer=g}d.send(String.fromCharCode(0,5,0,10,k,d.CompressionLevel)+d.shortToStr(d.ScalingLevel)+d.shortToStr(d.FrameRateTimer))};d.SendRefresh=function(){d.send(String.fromCharCode(0,6,0,4))};d.ProcessScreenMsg=function(h,g){if(d.debugmode>0){console.log("ScreenSize: "+h+" x "+g)}d.Canvas.setTransform(1,0,0,1,0,0);d.rotation=0;d.FirstDraw=true;d.ScreenWidth=d.width=h;d.ScreenHeight=d.height=g;d.KillDraw=d.tilesReceived;while(d.PendingOperations.length>0){d.PendingOperations.shift()}d.SendCompressionLevel(1);d.SendUnPause();if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}};d.ProcessData=function(h){var g=0;while(g<h.length){g+=d.ProcessDataEx(h.substring(g))}};d.ProcessDataEx=function(r){if(d.accumulator!=null){r=d.accumulator+r;console.log("KVM using accumulated data, total size is now "+r.length+" bytes.");d.accumulator=null}if(d.debugmode>1){console.log("KRecv("+r.length+"): "+rstr2hex(r.substring(0,Math.min(r.length,40))))}if(r.length<4){return}var g=null,s=0,t=0,j=ReadShort(r,0),h=ReadShort(r,2),n=0;if((j==27)&&(h==8)){if(r.length<12){return}j=ReadShort(r,8);h=ReadInt(r,4);if((h+8)>r.length){console.log("KVM accumulator set to "+r.length+" bytes, need "+h+" bytes.");d.accumulator=r;return}r=r.substring(8);n=8}if((h!=r.length)&&(d.debugmode>0)){console.log(h,r.length,h==r.length)}if((j>=18)&&(j!=65)){console.error("Invalid KVM command "+j+" of size "+h);console.log("Invalid KVM data",r.length,rstr2hex(r.substring(0,40))+"...");return}if(h>r.length){console.log("KVM accumulator set to "+r.length+" bytes, need "+h+" bytes.");d.accumulator=r;return}if(j==3||j==4||j==7){g=r.substring(4,h);s=((g.charCodeAt(0)&255)<<8)+(g.charCodeAt(1)&255);t=((g.charCodeAt(2)&255)<<8)+(g.charCodeAt(3)&255);if(d.debugmode>0){console.log("CMD"+j+" at X="+s+" Y="+t)}}switch(j){case 3:if(d.FirstDraw){d.onResize()}d.ProcessPictureMsg(g,s,t);break;case 4:if(d.FirstDraw){d.onResize()}if(d.TilesDrawn==d.tilesReceived){d.ProcessCopyRectMsg(g)}else{d.PendingOperations.push([++tilesReceived,1,g])}break;case 7:d.ProcessScreenMsg(s,t);d.SendKeyMsgKC(d.KeyAction.UP,16);d.SendKeyMsgKC(d.KeyAction.UP,17);d.SendKeyMsgKC(d.KeyAction.UP,18);d.SendKeyMsgKC(d.KeyAction.UP,91);d.SendKeyMsgKC(d.KeyAction.UP,92);d.SendKeyMsgKC(d.KeyAction.UP,16);d.send(String.fromCharCode(0,14,0,4));break;case 11:var o=[],k=((r.charCodeAt(4)&255)<<8)+(r.charCodeAt(5)&255);if(k>0){var q=0,p=((r.charCodeAt(6+(k*2))&255)<<8)+(r.charCodeAt(7+(k*2))&255);for(var m=0;m<k;m++){var l=((r.charCodeAt(6+(m*2))&255)<<8)+(r.charCodeAt(7+(m*2))&255);if(l==65535){o.push("All Displays")}else{o.push("Display "+l)}if(l==p){q=m}}}if(d.onDisplayinfo!=null){d.onDisplayinfo(d,o,q)}break;case 12:break;case 14:d.touchenabled=1;d.TouchArray={};if(d.onTouchEnabledChanged!=null){d.onTouchEnabledChanged(d.touchenabled)}break;case 15:d.TouchArray={};break;case 16:d.connectioncount=ReadInt(r,4);if(d.onConnectCountChanged!=null){d.onConnectCountChanged(d.connectioncount,d)}break;case 17:if(d.onMessage!=null){d.onMessage(r.substring(4,h),d)}break;case 65:r=r.substring(4);if(r[0]!="."){console.log(r);alert("KVM: "+r)}else{console.log("KVM: "+r.substring(1))}break}return h+n};d.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};d.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};d.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};d.Alternate=0;var c={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};function b(g){if(g.code.startsWith("Key")&&g.code.length==4){return g.code.charCodeAt(3)}if(g.code.startsWith("Digit")&&g.code.length==6){return g.code.charCodeAt(5)}if(g.code.startsWith("Numpad")&&g.code.length==7){return g.code.charCodeAt(6)+48}return c[g.code]}d.SendKeyMsg=function(g,h){if(g==null){return}if(!h){h=window.event}if(h.code){var j=b(h);if(j!=null){d.SendKeyMsgKC(g,j)}}else{var j=h.keyCode;if(j==59){j=186}d.SendKeyMsgKC(g,j)}};d.SendMessage=function(g){if(d.State==3){d.send(String.fromCharCode(0,17)+d.shortToStr(4+g.length)+g)}};d.SendKeyMsgKC=function(g,j){if(d.State!=3){return}if(typeof g=="object"){for(var h in g){d.SendKeyMsgKC(g[h][0],g[h][1])}}else{d.send(String.fromCharCode(0,d.InputType.KEY,0,6,(g-1),j))}};d.sendcad=function(){d.SendCtrlAltDelMsg()};d.SendCtrlAltDelMsg=function(){if(d.State==3){d.send(String.fromCharCode(0,d.InputType.CTRLALTDEL,0,4))}};d.SendEscKey=function(){if(d.State==3){d.send(String.fromCharCode(0,d.InputType.KEY,0,6,0,27,0,d.InputType.KEY,0,6,1,27))}};d.SendStartMsg=function(){d.SendKeyMsgKC(d.KeyAction.EXDOWN,91);d.SendKeyMsgKC(d.KeyAction.EXUP,91)};d.SendCharmsMsg=function(){d.SendKeyMsgKC(d.KeyAction.EXDOWN,91);d.SendKeyMsgKC(d.KeyAction.DOWN,67);d.SendKeyMsgKC(d.KeyAction.UP,67);d.SendKeyMsgKC(d.KeyAction.EXUP,91)};d.SendTouchMsg1=function(h,g,j,k){if(d.State==3){d.send(String.fromCharCode(0,d.InputType.TOUCH)+d.shortToStr(14)+String.fromCharCode(1,h)+d.intToStr(g)+d.shortToStr(j)+d.shortToStr(k))}};d.SendTouchMsg2=function(j,g){var m="";var h;var n="TOUCHSEND: ";for(var l in d.TouchArray){if(l==j){h=g}else{if(d.TouchArray[l].f==1){h=65536|2|4;d.TouchArray[l].f=3;n+="START"+l}else{if(d.TouchArray[l].f==2){h=262144;n+="STOP"+l}else{h=2|4|131072}}}m+=String.fromCharCode(l)+d.intToStr(h)+d.shortToStr(d.TouchArray[l].x)+d.shortToStr(d.TouchArray[l].y);if(d.TouchArray[l].f==2){delete d.TouchArray[l]}}if(d.State==3){d.send(String.fromCharCode(0,d.InputType.TOUCH)+d.shortToStr(5+m.length)+String.fromCharCode(2)+m)}if(Object.keys(d.TouchArray).length==0&&d.touchtimer!=null){clearInterval(d.touchtimer);d.touchtimer=null}};d.SendMouseMsg=function(g,k){if(d.State!=3){return}if(g!=null&&d.Canvas!=null){if(!k){var k=window.event}var n=(d.Canvas.canvas.height/d.CanvasId.clientHeight);var o=(d.Canvas.canvas.width/d.CanvasId.clientWidth);var m=d.GetPositionOfControl(d.Canvas.canvas);var p=((k.pageX-m[0])*o);var q=((k.pageY-m[1])*n);if(p>=0&&p<=d.Canvas.canvas.width&&q>=0&&q<=d.Canvas.canvas.height){var h=0;var j=0;if(g==d.KeyAction.UP||g==d.KeyAction.DOWN){if(k.which){((k.which==1)?(h=d.MouseButton.LEFT):((k.which==2)?(h=d.MouseButton.MIDDLE):(h=d.MouseButton.RIGHT)))}else{if(k.button){((k.button==0)?(h=d.MouseButton.LEFT):((k.button==1)?(h=d.MouseButton.MIDDLE):(h=d.MouseButton.RIGHT)))}}}else{if(g==d.KeyAction.SCROLL){if(k.detail){j=(-1*(k.detail*120))}else{if(k.wheelDelta){j=(k.wheelDelta*3)}}}}var l="";if(g==d.KeyAction.DBLCLICK){l=String.fromCharCode(0,d.InputType.MOUSE,0,10,0,136,((p/256)&255),(p&255),((q/256)&255),(q&255))}else{if(g==d.KeyAction.SCROLL){l=String.fromCharCode(0,d.InputType.MOUSE,0,12,0,0,((p/256)&255),(p&255),((q/256)&255),(q&255),((j/256)&255),(j&255))}else{l=String.fromCharCode(0,d.InputType.MOUSE,0,10,0,((g==d.KeyAction.DOWN)?h:((h*2)&255)),((p/256)&255),(p&255),((q/256)&255),(q&255))}}if(d.Action==d.KeyAction.NONE){if(d.Alternate==0||d.ipad){d.send(l);d.Alternate=1}else{d.Alternate=0}}else{d.send(l)}}}};d.GetDisplayNumbers=function(){d.send(String.fromCharCode(0,11,0,4))};d.SetDisplay=function(g){d.send(String.fromCharCode(0,12,0,6,g>>8,g&255))};d.intToStr=function(g){return String.fromCharCode((g>>24)&255,(g>>16)&255,(g>>8)&255,g&255)};d.shortToStr=function(g){return String.fromCharCode((g>>8)&255,g&255)};d.onResize=function(){if(d.ScreenWidth==0||d.ScreenHeight==0){return}if(d.Canvas.canvas.width==d.ScreenWidth&&d.Canvas.canvas.height==d.ScreenHeight){return}if(d.FirstDraw){d.Canvas.canvas.width=d.ScreenWidth;d.Canvas.canvas.height=d.ScreenHeight;d.Canvas.fillRect(0,0,d.ScreenWidth,d.ScreenHeight);if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}}d.FirstDraw=false};d.xxMouseInputGrab=false;d.xxKeyInputGrab=false;d.xxMouseMove=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.NONE,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxMouseUp=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.UP,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxMouseDown=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.DOWN,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxMouseDblClick=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.DBLCLICK,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxDOMMouseScroll=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.SCROLL,g);return false}return true};d.xxMouseWheel=function(g){if(d.State==3){d.SendMouseMsg(d.KeyAction.SCROLL,g);return false}return true};d.xxKeyUp=function(g){if(d.State==3){d.SendKeyMsg(d.KeyAction.UP,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxKeyDown=function(g){if(d.State==3){d.SendKeyMsg(d.KeyAction.DOWN,g)}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.xxKeyPress=function(g){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};d.handleKeys=function(g){if(d.stopInput==true||desktop.State!=3){return false}return d.xxKeyPress(g)};d.handleKeyUp=function(g){if(d.stopInput==true||desktop.State!=3){return false}if(d.firstUpKeys.length<5){d.firstUpKeys.push(g.keyCode);if((d.firstUpKeys.length==5)){var h=d.firstUpKeys.join(",");if((h=="16,17,91,91,16")||(h=="16,17,18,91,92")){d.stopInput=true}}}return d.xxKeyUp(g)};d.handleKeyDown=function(g){if(d.stopInput==true||desktop.State!=3){return false}return d.xxKeyDown(g)};d.mousedblclick=function(g){if(d.stopInput==true){return false}return d.xxMouseDblClick(g)};d.mousedown=function(g){if(d.stopInput==true){return false}return d.xxMouseDown(g)};d.mouseup=function(g){if(d.stopInput==true){return false}return d.xxMouseUp(g)};d.mousemove=function(g){if(d.stopInput==true){return false}return d.xxMouseMove(g)};d.mousewheel=function(g){if(d.stopInput==true){return false}return d.xxMouseWheel(g)};d.xxMsTouchEvent=function(g){if(g.originalEvent.pointerType==4){return}if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}if(g.type=="MSPointerDown"||g.type=="MSPointerMove"||g.type=="MSPointerUp"){var h=0;var j=g.originalEvent.pointerId%256;var k=g.offsetX*(Canvas.canvas.width/d.CanvasId.clientWidth);var l=g.offsetY*(Canvas.canvas.height/d.CanvasId.clientHeight);if(g.type=="MSPointerDown"){h=65536|2|4}else{if(g.type=="MSPointerMove"){h=131072|2|4}else{if(g.type=="MSPointerUp"){h=262144}}}if(!d.TouchArray[j]){d.TouchArray[j]={x:k,y:l}}d.SendTouchMsg2(j,h);if(g.type=="MSPointerUp"){delete d.TouchArray[j]}}else{alert(g.type)}return true};d.xxTouchStart=function(g){if(d.State!=3){return}if(g.preventDefault){g.preventDefault()}if(d.touchenabled==0||d.touchenabled==1){if(g.originalEvent.touches.length>1){return}var l=g.originalEvent.touches[0];g.which=1;d.LastX=g.pageX=l.pageX;d.LastY=g.pageY=l.pageY;d.SendMouseMsg(KeyAction.DOWN,g)}else{var k=d.GetPositionOfControl(Canvas.canvas);for(var h in g.originalEvent.changedTouches){if(!g.originalEvent.changedTouches[h].identifier){continue}var j=g.originalEvent.changedTouches[h].identifier%256;if(!d.TouchArray[j]){d.TouchArray[j]={x:(g.originalEvent.touches[h].pageX-k[0])*(Canvas.canvas.width/d.CanvasId.clientWidth),y:(g.originalEvent.touches[h].pageY-k[1])*(Canvas.canvas.height/d.CanvasId.clientHeight),f:1}}}if(Object.keys(d.TouchArray).length>0&&touchtimer==null){d.touchtimer=setInterval(function(){d.SendTouchMsg2(256,0)},50)}}};d.xxTouchMove=function(g){if(d.State!=3){return}if(g.preventDefault){g.preventDefault()}if(d.touchenabled==0||d.touchenabled==1){if(g.originalEvent.touches.length>1){return}var l=g.originalEvent.touches[0];g.which=1;d.LastX=g.pageX=l.pageX;d.LastY=g.pageY=l.pageY;d.SendMouseMsg(d.KeyAction.NONE,g)}else{var k=d.GetPositionOfControl(Canvas.canvas);for(var h in g.originalEvent.changedTouches){if(!g.originalEvent.changedTouches[h].identifier){continue}var j=g.originalEvent.changedTouches[h].identifier%256;if(d.TouchArray[j]){d.TouchArray[j].x=(g.originalEvent.touches[h].pageX-k[0])*(d.Canvas.canvas.width/d.CanvasId.clientWidth);d.TouchArray[j].y=(g.originalEvent.touches[h].pageY-k[1])*(d.Canvas.canvas.height/d.CanvasId.clientHeight)}}}};d.xxTouchEnd=function(g){if(d.State!=3){return}if(g.preventDefault){g.preventDefault()}if(d.touchenabled==0||d.touchenabled==1){if(g.originalEvent.touches.length>1){return}g.which=1;g.pageX=LastX;g.pageY=LastY;d.SendMouseMsg(KeyAction.UP,g)}else{for(var h in g.originalEvent.changedTouches){if(!g.originalEvent.changedTouches[h].identifier){continue}var j=g.originalEvent.changedTouches[h].identifier%256;if(d.TouchArray[j]){d.TouchArray[j].f=2}}}};d.GrabMouseInput=function(){if(d.xxMouseInputGrab==true){return}var g=d.CanvasId;g.onmousemove=d.xxMouseMove;g.onmouseup=d.xxMouseUp;g.onmousedown=d.xxMouseDown;g.touchstart=d.xxTouchStart;g.touchmove=d.xxTouchMove;g.touchend=d.xxTouchEnd;g.MSPointerDown=d.xxMsTouchEvent;g.MSPointerMove=d.xxMsTouchEvent;g.MSPointerUp=d.xxMsTouchEvent;if(navigator.userAgent.match(/mozilla/i)){g.DOMMouseScroll=d.xxDOMMouseScroll}else{g.onmousewheel=d.xxMouseWheel}d.xxMouseInputGrab=true};d.UnGrabMouseInput=function(){if(d.xxMouseInputGrab==false){return}var g=d.CanvasId;g.onmousemove=null;g.onmouseup=null;g.onmousedown=null;g.touchstart=null;g.touchmove=null;g.touchend=null;g.MSPointerDown=null;g.MSPointerMove=null;g.MSPointerUp=null;if(navigator.userAgent.match(/mozilla/i)){g.DOMMouseScroll=null}else{g.onmousewheel=null}d.xxMouseInputGrab=false};d.GrabKeyInput=function(){if(d.xxKeyInputGrab==true){return}document.onkeyup=d.xxKeyUp;document.onkeydown=d.xxKeyDown;document.onkeypress=d.xxKeyPress;d.xxKeyInputGrab=true};d.UnGrabKeyInput=function(){if(d.xxKeyInputGrab==false){return}document.onkeyup=null;document.onkeydown=null;document.onkeypress=null;d.xxKeyInputGrab=false};d.GetPositionOfControl=function(g){var h=Array(2);h[0]=h[1]=0;while(g){h[0]+=g.offsetLeft;h[1]+=g.offsetTop;g=g.offsetParent}return h};d.crotX=function(g,h){if(d.rotation==0){return g}if(d.rotation==1){return h}if(d.rotation==2){return d.Canvas.canvas.width-g}if(d.rotation==3){return d.Canvas.canvas.height-h}};d.crotY=function(g,h){if(d.rotation==0){return h}if(d.rotation==1){return d.Canvas.canvas.width-g}if(d.rotation==2){return d.Canvas.canvas.height-h}if(d.rotation==3){return g}};d.rotX=function(g,h){if(d.rotation==0||d.rotation==1){return g}if(d.rotation==2){return g-d.Canvas.canvas.width}if(d.rotation==3){return g-d.Canvas.canvas.height}};d.rotY=function(g,h){if(d.rotation==0||d.rotation==3){return h}if(d.rotation==1){return h-d.Canvas.canvas.width}if(d.rotation==2){return h-d.Canvas.canvas.height}};d.tcanvas=null;d.setRotation=function(l){while(l<0){l+=4}var g=l%4;if(g==d.rotation){return true}var j=d.Canvas.canvas.width;var h=d.Canvas.canvas.height;if(d.rotation==1||d.rotation==3){j=d.Canvas.canvas.height;h=d.Canvas.canvas.width}if(d.tcanvas==null){d.tcanvas=document.createElement("canvas")}var k=d.tcanvas.getContext("2d");k.setTransform(1,0,0,1,0,0);k.canvas.width=j;k.canvas.height=h;k.rotate((d.rotation*-90)*Math.PI/180);if(d.rotation==0){k.drawImage(d.Canvas.canvas,0,0)}if(d.rotation==1){k.drawImage(d.Canvas.canvas,-d.Canvas.canvas.width,0)}if(d.rotation==2){k.drawImage(d.Canvas.canvas,-d.Canvas.canvas.width,-d.Canvas.canvas.height)}if(d.rotation==3){k.drawImage(d.Canvas.canvas,0,-d.Canvas.canvas.height)}if(d.rotation==0||d.rotation==2){d.Canvas.canvas.height=j;d.Canvas.canvas.width=h}if(d.rotation==1||d.rotation==3){d.Canvas.canvas.height=h;d.Canvas.canvas.width=j}d.Canvas.setTransform(1,0,0,1,0,0);d.Canvas.rotate((g*90)*Math.PI/180);d.rotation=g;d.Canvas.drawImage(d.tcanvas,d.rotX(0,0),d.rotY(0,0));d.ScreenWidth=d.Canvas.canvas.width;d.ScreenHeight=d.Canvas.canvas.height;if(d.onScreenSizeChange!=null){d.onScreenSizeChange(d,d.ScreenWidth,d.ScreenHeight,d.CanvasId)}return true};d.MuchTheSame=function(g,h){return(Math.abs(g-h)<4)};d.Debug=function(g){console.log(g)};d.getIEVersion=function(){var g=-1;if(navigator.appName=="Microsoft Internet Explorer"){var j=navigator.userAgent;var h=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(h.exec(j)!=null){g=parseFloat(RegExp.$1)}}return g};d.haltEvent=function(g){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false};return d};var QRCode;!function(){function t(c){this.mode=v.MODE_8BIT_BYTE,this.data=c,this.parsedData=[];for(var g=[],h=0,j=this.data.length;j>h;h++){var k=this.data.charCodeAt(h);k>65536?(g[0]=240|(1835008&k)>>>18,g[1]=128|(258048&k)>>>12,g[2]=128|(4032&k)>>>6,g[3]=128|63&k):k>2048?(g[0]=224|(61440&k)>>>12,g[1]=128|(4032&k)>>>6,g[2]=128|63&k):k>128?(g[0]=192|(1984&k)>>>6,g[1]=128|63&k):g[0]=k,this.parsedData=this.parsedData.concat(g)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function u(c,d){this.typeNumber=c,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function B(e,g){if(void 0==e.length){throw new Error(e.length+"/"+g)}for(var h=0;h<e.length&&0==e[h];){h++}this.num=new Array(e.length-h+g);for(var j=0;j<e.length-h;j++){this.num[j]=e[j+h]}}function C(c,d){this.totalCount=c,this.dataCount=d}function D(){this.buffer=[],this.length=0}function F(){return"undefined"!=typeof CanvasRenderingContext2D}function G(){var c=!1,d=navigator.userAgent;return/android/i.test(d)&&(c=!0,aMat=d.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(c=parseFloat(aMat[1]))),c}function K(d,j){for(var k=1,l=L(d),m=0,n=E.length;n>=m;m++){var o=0;switch(j){case w.L:o=E[m][0];break;case w.M:o=E[m][1];break;case w.Q:o=E[m][2];break;case w.H:o=E[m][3]}if(o>=l){break}k++}if(k>E.length){throw new Error("Too long data")}return k}function L(c){var d=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return d.length+(d.length!=c?3:0)}t.prototype={getLength:function(){return this.parsedData.length},write:function(d){for(var e=0,g=this.parsedData.length;g>e;e++){d.put(this.parsedData[e],8)}}},u.prototype={addData:function(a){var d=new t(a);this.dataList.push(d),this.dataCache=null},isDark:function(c,d){if(0>c||this.moduleCount<=c||0>d||this.moduleCount<=d){throw new Error(c+","+d)}return this.modules[c][d]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(b,g){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++){this.modules[h]=new Array(this.moduleCount);for(var j=0;j<this.moduleCount;j++){this.modules[h][j]=null}}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(b,g),this.typeNumber>=7&&this.setupTypeNumber(b),null==this.dataCache&&(this.dataCache=u.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,g)},setupPositionProbePattern:function(e,g){for(var h=-1;7>=h;h++){if(!(-1>=e+h||this.moduleCount<=e+h)){for(var j=-1;7>=j;j++){-1>=g+j||this.moduleCount<=g+j||(this.modules[e+h][g+j]=h>=0&&6>=h&&(0==j||6==j)||j>=0&&6>=j&&(0==h||6==h)||h>=2&&4>=h&&j>=2&&4>=j?!0:!1)}}}},getBestMaskPattern:function(){for(var e=0,g=0,h=0;8>h;h++){this.makeImpl(!0,h);var j=y.getLostPoint(this);(0==h||e>j)&&(e=j,g=h)}return g},createMovieClip:function(k,l,m){var n=k.createEmptyMovieClip(l,m),o=1;this.make();for(var p=0;p<this.modules.length;p++){for(var q=p*o,r=0;r<this.modules[p].length;r++){var s=r*o,M=this.modules[p][r];M&&(n.beginFill(0,100),n.moveTo(s,q),n.lineTo(s+o,q),n.lineTo(s+o,q+o),n.lineTo(s,q+o),n.endFill())}}return n},setupTimingPattern:function(){for(var c=8;c<this.moduleCount-8;c++){null==this.modules[c][6]&&(this.modules[c][6]=0==c%2)}for(var d=8;d<this.moduleCount-8;d++){null==this.modules[6][d]&&(this.modules[6][d]=0==d%2)}},setupPositionAdjustPattern:function(){for(var j=y.getPatternPosition(this.typeNumber),k=0;k<j.length;k++){for(var l=0;l<j.length;l++){var m=j[k],n=j[l];if(null==this.modules[m][n]){for(var o=-2;2>=o;o++){for(var p=-2;2>=p;p++){this.modules[m+o][n+p]=-2==o||2==o||-2==p||2==p||0==o&&0==p?!0:!1}}}}}},setupTypeNumber:function(e){for(var g=y.getBCHTypeNumber(this.typeNumber),h=0;18>h;h++){var j=!e&&1==(1&g>>h);this.modules[Math.floor(h/3)][h%3+this.moduleCount-8-3]=j}for(var h=0;18>h;h++){var j=!e&&1==(1&g>>h);this.modules[h%3+this.moduleCount-8-3][Math.floor(h/3)]=j}},setupTypeInfo:function(h,j){for(var k=this.errorCorrectLevel<<3|j,l=y.getBCHTypeInfo(k),m=0;15>m;m++){var n=!h&&1==(1&l>>m);6>m?this.modules[m][8]=n:8>m?this.modules[m+1][8]=n:this.modules[this.moduleCount-15+m][8]=n}for(var m=0;15>m;m++){var n=!h&&1==(1&l>>m);8>m?this.modules[8][this.moduleCount-m-1]=n:9>m?this.modules[8][15-m-1+1]=n:this.modules[8][15-m-1]=n}this.modules[this.moduleCount-8][8]=!h},mapData:function(l,m){for(var n=-1,o=this.moduleCount-1,p=7,q=0,r=this.moduleCount-1;r>0;r-=2){for(6==r&&r--;;){for(var s=0;2>s;s++){if(null==this.modules[o][r-s]){var M=!1;q<l.length&&(M=1==(1&l[q]>>>p));var N=y.getMask(m,o,r-s);N&&(M=!M),this.modules[o][r-s]=M,p--,-1==p&&(q++,p=7)}}if(o+=n,0>o||this.moduleCount<=o){o-=n,n=-n;break}}}}},u.PAD0=236,u.PAD1=17,u.createData=function(b,j,k){for(var m=C.getRSBlocks(b,j),n=new D,o=0;o<k.length;o++){var p=k[o];n.put(p.mode,4),n.put(p.getLength(),y.getLengthInBits(p.mode,b)),p.write(n)}for(var q=0,o=0;o<m.length;o++){q+=m[o].dataCount}if(n.getLengthInBits()>8*q){throw new Error("code length overflow. ("+n.getLengthInBits()+">"+8*q+")")}for(n.getLengthInBits()+4<=8*q&&n.put(0,4);0!=n.getLengthInBits()%8;){n.putBit(!1)}for(;;){if(n.getLengthInBits()>=8*q){break}if(n.put(u.PAD0,8),n.getLengthInBits()>=8*q){break}n.put(u.PAD1,8)}return u.createBytes(n,m)},u.createBytes=function(M,N){for(var O=0,P=0,R=0,S=new Array(N.length),T=new Array(N.length),U=0;U<N.length;U++){var V=N[U].dataCount,W=N[U].totalCount-V;P=Math.max(P,V),R=Math.max(R,W),S[U]=new Array(V);for(var X=0;X<S[U].length;X++){S[U][X]=255&M.buffer[X+O]}O+=V;var Y=y.getErrorCorrectPolynomial(W),Z=new B(S[U],Y.getLength()-1),aa=Z.mod(Y);T[U]=new Array(Y.getLength()-1);for(var X=0;X<T[U].length;X++){var ab=X+aa.getLength()-T[U].length;T[U][X]=ab>=0?aa.get(ab):0}}for(var ac=0,X=0;X<N.length;X++){ac+=N[X].totalCount}for(var ad=new Array(ac),ae=0,X=0;P>X;X++){for(var U=0;U<N.length;U++){X<S[U].length&&(ad[ae++]=S[U][X])}}for(var X=0;R>X;X++){for(var U=0;U<N.length;U++){X<T[U].length&&(ad[ae++]=T[U][X])}}return ad};for(var v={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},w={L:1,M:0,Q:3,H:2},x={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},y={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(c){for(var d=c<<10;y.getBCHDigit(d)-y.getBCHDigit(y.G15)>=0;){d^=y.G15<<y.getBCHDigit(d)-y.getBCHDigit(y.G15)}return(c<<10|d)^y.G15_MASK},getBCHTypeNumber:function(c){for(var d=c<<12;y.getBCHDigit(d)-y.getBCHDigit(y.G18)>=0;){d^=y.G18<<y.getBCHDigit(d)-y.getBCHDigit(y.G18)}return c<<12|d},getBCHDigit:function(c){for(var d=0;0!=c;){d++,c>>>=1}return d},getPatternPosition:function(b){return y.PATTERN_POSITION_TABLE[b-1]},getMask:function(d,e,g){switch(d){case x.PATTERN000:return 0==(e+g)%2;case x.PATTERN001:return 0==e%2;case x.PATTERN010:return 0==g%3;case x.PATTERN011:return 0==(e+g)%3;case x.PATTERN100:return 0==(Math.floor(e/2)+Math.floor(g/3))%2;case x.PATTERN101:return 0==e*g%2+e*g%3;case x.PATTERN110:return 0==(e*g%2+e*g%3)%2;case x.PATTERN111:return 0==(e*g%3+(e+g)%2)%2;default:throw new Error("bad maskPattern:"+d)}},getErrorCorrectPolynomial:function(d){for(var e=new B([1],0),g=0;d>g;g++){e=e.multiply(new B([1,z.gexp(g)],0))}return e},getLengthInBits:function(c,d){if(d>=1&&10>d){switch(c){case v.MODE_NUMBER:return 10;case v.MODE_ALPHA_NUM:return 9;case v.MODE_8BIT_BYTE:return 8;case v.MODE_KANJI:return 8;default:throw new Error("mode:"+c)}}else{if(27>d){switch(c){case v.MODE_NUMBER:return 12;case v.MODE_ALPHA_NUM:return 11;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 10;default:throw new Error("mode:"+c)}}else{if(!(41>d)){throw new Error("type:"+d)}switch(c){case v.MODE_NUMBER:return 14;case v.MODE_ALPHA_NUM:return 13;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 12;default:throw new Error("mode:"+c)}}}},getLostPoint:function(m){for(var n=m.getModuleCount(),o=0,p=0;n>p;p++){for(var q=0;n>q;q++){for(var r=0,s=m.isDark(p,q),M=-1;1>=M;M++){if(!(0>p+M||p+M>=n)){for(var N=-1;1>=N;N++){0>q+N||q+N>=n||(0!=M||0!=N)&&s==m.isDark(p+M,q+N)&&r++}}}r>5&&(o+=3+r-5)}}for(var p=0;n-1>p;p++){for(var q=0;n-1>q;q++){var O=0;m.isDark(p,q)&&O++,m.isDark(p+1,q)&&O++,m.isDark(p,q+1)&&O++,m.isDark(p+1,q+1)&&O++,(0==O||4==O)&&(o+=3)}}for(var p=0;n>p;p++){for(var q=0;n-6>q;q++){m.isDark(p,q)&&!m.isDark(p,q+1)&&m.isDark(p,q+2)&&m.isDark(p,q+3)&&m.isDark(p,q+4)&&!m.isDark(p,q+5)&&m.isDark(p,q+6)&&(o+=40)}}for(var q=0;n>q;q++){for(var p=0;n-6>p;p++){m.isDark(p,q)&&!m.isDark(p+1,q)&&m.isDark(p+2,q)&&m.isDark(p+3,q)&&m.isDark(p+4,q)&&!m.isDark(p+5,q)&&m.isDark(p+6,q)&&(o+=40)}}for(var P=0,q=0;n>q;q++){for(var p=0;n>p;p++){m.isDark(p,q)&&P++}}var R=Math.abs(100*P/n/n-50)/5;return o+=10*R}},z={glog:function(b){if(1>b){throw new Error("glog("+b+")")}return z.LOG_TABLE[b]},gexp:function(b){for(;0>b;){b+=255}for(;b>=256;){b-=255}return z.EXP_TABLE[b]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},A=0;8>A;A++){z.EXP_TABLE[A]=1<<A}for(var A=8;256>A;A++){z.EXP_TABLE[A]=z.EXP_TABLE[A-4]^z.EXP_TABLE[A-5]^z.EXP_TABLE[A-6]^z.EXP_TABLE[A-8]}for(var A=0;255>A;A++){z.LOG_TABLE[z.EXP_TABLE[A]]=A}B.prototype={get:function(b){return this.num[b]},getLength:function(){return this.num.length},multiply:function(e){for(var g=new Array(this.getLength()+e.getLength()-1),h=0;h<this.getLength();h++){for(var j=0;j<e.getLength();j++){g[h+j]^=z.gexp(z.glog(this.get(h))+z.glog(e.get(j)))}}return new B(g,0)},mod:function(e){if(this.getLength()-e.getLength()<0){return this}for(var g=z.glog(this.get(0))-z.glog(e.get(0)),h=new Array(this.getLength()),j=0;j<this.getLength();j++){h[j]=this.get(j)}for(var j=0;j<e.getLength();j++){h[j]^=z.gexp(z.glog(e.get(j))+g)}return new B(h,0).mod(e)}},C.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],C.getRSBlocks=function(j,l){var m=C.getRsBlockTable(j,l);if(void 0==m){throw new Error("bad rs block @ typeNumber:"+j+"/errorCorrectLevel:"+l)}for(var n=m.length/3,o=[],p=0;n>p;p++){for(var q=m[3*p+0],r=m[3*p+1],s=m[3*p+2],M=0;q>M;M++){o.push(new C(r,s))}}return o},C.getRsBlockTable=function(c,d){switch(d){case w.L:return C.RS_BLOCK_TABLE[4*(c-1)+0];case w.M:return C.RS_BLOCK_TABLE[4*(c-1)+1];case w.Q:return C.RS_BLOCK_TABLE[4*(c-1)+2];case w.H:return C.RS_BLOCK_TABLE[4*(c-1)+3];default:return void 0}},D.prototype={get:function(c){var d=Math.floor(c/8);return 1==(1&this.buffer[d]>>>7-c%8)},put:function(d,e){for(var g=0;e>g;g++){this.putBit(1==(1&d>>>e-g-1))}},getLengthInBits:function(){return this.length},putBit:function(c){var d=Math.floor(this.length/8);this.buffer.length<=d&&this.buffer.push(0),c&&(this.buffer[d]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],H=function(){var b=function(c,d){this._el=c,this._htOption=d};return b.prototype.draw=function(e){function o(g,h){var j=document.createElementNS("http://www.w3.org/2000/svg",g);for(var k in h){h.hasOwnProperty(k)&&j.setAttribute(k,h[k])}return j}var l=this._htOption,m=this._el,n=e.getModuleCount();Math.floor(l.width/n),Math.floor(l.height/n),this.clear();var p=o("svg",{viewBox:"0 0 "+String(n)+" "+String(n),width:"100%",height:"100%",fill:l.colorLight});p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),m.appendChild(p),p.appendChild(o("rect",{fill:l.colorDark,width:"1",height:"1",id:"template"}));for(var q=0;n>q;q++){for(var r=0;n>r;r++){if(e.isDark(q,r)){var s=o("use",{x:String(q),y:String(r)});s.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),p.appendChild(s)}}}},b.prototype.clear=function(){for(;this._el.hasChildNodes();){this._el.removeChild(this._el.lastChild)}},b}(),I="svg"===document.documentElement.tagName.toLowerCase(),J=I?H:F()?function(){function g(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function k(m,n){var o=this;if(o._fFail=n,o._fSuccess=m,null===o._bSupportDataURI){var p=document.createElement("img"),q=function(){o._bSupportDataURI=!1,o._fFail&&_fFail.call(o)},r=function(){o._bSupportDataURI=!0,o._fSuccess&&o._fSuccess.call(o)};return p.onabort=q,p.onerror=q,p.onload=r,p.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}o._bSupportDataURI===!0&&o._fSuccess?o._fSuccess.call(o):o._bSupportDataURI===!1&&o._fFail&&o._fFail.call(o)}if(this._android&&this._android<=2.1){var h=1/window.devicePixelRatio,j=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(b,c,m,n,o,p,q,r){if("nodeName" in b&&/img/i.test(b.nodeName)){for(var s=arguments.length-1;s>=1;s--){arguments[s]=arguments[s]*h}}else{"undefined"==typeof r&&(arguments[1]*=h,arguments[2]*=h,arguments[3]*=h,arguments[4]*=h)}j.apply(this,arguments)}}var l=function(c,d){this._bIsPainted=!1,this._android=G(),this._htOption=d,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=d.width,this._elCanvas.height=d.height,c.appendChild(this._elCanvas),this._el=c,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return l.prototype.draw=function(o){var p=this._elImage,q=this._oContext,r=this._htOption,s=o.getModuleCount(),M=r.width/s,N=r.height/s,O=Math.round(M),P=Math.round(N);p.style.display="none",this.clear();for(var R=0;s>R;R++){for(var S=0;s>S;S++){var T=o.isDark(R,S),U=S*M,V=R*N;q.strokeStyle=T?r.colorDark:r.colorLight,q.lineWidth=1,q.fillStyle=T?r.colorDark:r.colorLight,q.fillRect(U,V,M,N),q.strokeRect(Math.floor(U)+0.5,Math.floor(V)+0.5,O,P),q.strokeRect(Math.ceil(U)-0.5,Math.ceil(V)-0.5,O,P)}}this._bIsPainted=!0},l.prototype.makeImage=function(){this._bIsPainted&&k.call(this,g)},l.prototype.isPainted=function(){return this._bIsPainted},l.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},l.prototype.round=function(b){return b?Math.floor(1000*b)/1000:b},l}():function(){var b=function(c,d){this._el=c,this._htOption=d};return b.prototype.draw=function(m){for(var n=this._htOption,o=this._el,p=m.getModuleCount(),q=Math.floor(n.width/p),r=Math.floor(n.height/p),s=['<table style="border:0;border-collapse:collapse;">'],M=0;p>M;M++){s.push("<tr>");for(var N=0;p>N;N++){s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+q+"px;height:"+r+"px;background-color:"+(m.isDark(M,N)?n.colorDark:n.colorLight)+';"></td>')}s.push("</tr>")}s.push("</table>"),o.innerHTML=s.join("");var O=o.childNodes[0],P=(n.width-O.offsetWidth)/2,R=(n.height-O.offsetHeight)/2;P>0&&R>0&&(O.style.margin=R+"px "+P+"px")},b.prototype.clear=function(){this._el.innerHTML=""},b}();QRCode=function(d,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:w.H},"string"==typeof e&&(e={text:e}),e){for(var g in e){this._htOption[g]=e[g]}}"string"==typeof d&&(d=document.getElementById(d)),this._android=G(),this._el=d,this._oQRCode=null,this._oDrawing=new J(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(b){this._oQRCode=new u(K(b,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(b),this._oQRCode.make(),this._el.title=b,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=w}();"use strict";if(!window.u2f){var u2f=u2f||{};var js_api_version;u2f.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd";u2f.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_SIGN_RESPONSE:"u2f_sign_response",U2F_GET_API_VERSION_REQUEST:"u2f_get_api_version_request",U2F_GET_API_VERSION_RESPONSE:"u2f_get_api_version_response"};u2f.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5};u2f.U2fRequest;u2f.U2fResponse;u2f.Error;u2f.Transport;u2f.Transports;u2f.SignRequest;u2f.SignResponse;u2f.RegisterRequest;u2f.RegisterResponse;u2f.RegisteredKey;u2f.GetJsApiVersionResponse;u2f.getMessagePort=function(a){if(typeof chrome!="undefined"&&chrome.runtime){var b={type:u2f.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(u2f.EXTENSION_ID,b,function(){if(!chrome.runtime.lastError){u2f.getChromeRuntimePort_(a)}else{u2f.getIframePort_(a)}})}else{if(u2f.isAndroidChrome_()){u2f.getAuthenticatorPort_(a)}else{if(u2f.isIosChrome_()){u2f.getIosPort_(a)}else{u2f.getIframePort_(a)}}}};u2f.isAndroidChrome_=function(){var a=navigator.userAgent;return a.indexOf("Chrome")!=-1&&a.indexOf("Android")!=-1};u2f.isIosChrome_=function(){var b=["iPhone","iPad","iPod"];for(var a in b){if(navigator.platform==b[a]){return true}}return false};u2f.getChromeRuntimePort_=function(a){var b=chrome.runtime.connect(u2f.EXTENSION_ID,{includeTlsChannelId:true});setTimeout(function(){a(new u2f.WrappedChromeRuntimePort_(b))},0)};u2f.getAuthenticatorPort_=function(a){setTimeout(function(){a(new u2f.WrappedAuthenticatorPort_())},0)};u2f.getIosPort_=function(a){setTimeout(function(){a(new u2f.WrappedIosPort_())},0)};u2f.WrappedChromeRuntimePort_=function(a){this.port_=a};u2f.formatSignRequest_=function(a,b,d,h,e){if(js_api_version===undefined||js_api_version<1.1){var g=[];for(var c=0;c<d.length;c++){g[c]={version:d[c].version,challenge:b,keyHandle:d[c].keyHandle,appId:a}}return{type:u2f.MessageTypes.U2F_SIGN_REQUEST,signRequests:g,timeoutSeconds:h,requestId:e}}return{type:u2f.MessageTypes.U2F_SIGN_REQUEST,appId:a,challenge:b,registeredKeys:d,timeoutSeconds:h,requestId:e}};u2f.formatRegisterRequest_=function(a,c,d,h,e){if(js_api_version===undefined||js_api_version<1.1){for(var b=0;b<d.length;b++){d[b].appId=a}var g=[];for(var b=0;b<c.length;b++){g[b]={version:c[b].version,challenge:d[0],keyHandle:c[b].keyHandle,appId:a}}return{type:u2f.MessageTypes.U2F_REGISTER_REQUEST,signRequests:g,registerRequests:d,timeoutSeconds:h,requestId:e}}return{type:u2f.MessageTypes.U2F_REGISTER_REQUEST,appId:a,registerRequests:d,registeredKeys:c,timeoutSeconds:h,requestId:e}};u2f.WrappedChromeRuntimePort_.prototype.postMessage=function(a){this.port_.postMessage(a)};u2f.WrappedChromeRuntimePort_.prototype.addEventListener=function(a,b){var c=a.toLowerCase();if(c=="message"||c=="onmessage"){this.port_.onMessage.addListener(function(d){b({data:d})})}else{console.error("WrappedChromeRuntimePort only supports onMessage")}};u2f.WrappedAuthenticatorPort_=function(){this.requestId_=-1;this.requestObject_=null};u2f.WrappedAuthenticatorPort_.prototype.postMessage=function(b){var a=u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_+";S.request="+encodeURIComponent(JSON.stringify(b))+";end";document.location=a};u2f.WrappedAuthenticatorPort_.prototype.getPortType=function(){return"WrappedAuthenticatorPort_"};u2f.WrappedAuthenticatorPort_.prototype.addEventListener=function(a,b){var c=a.toLowerCase();if(c=="message"){var d=this;window.addEventListener("message",d.onRequestUpdate_.bind(d,b),false)}else{console.error("WrappedAuthenticatorPort only supports message")}};u2f.WrappedAuthenticatorPort_.prototype.onRequestUpdate_=function(a,d){var e=JSON.parse(d.data);var c=e.intentURL;var b=e.errorCode;var g=null;if(e.hasOwnProperty("data")){g=(JSON.parse(e.data))}a({data:g})};u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_="intent:#Intent;action=com.google.android.apps.authenticator.AUTHENTICATE";u2f.WrappedIosPort_=function(){};u2f.WrappedIosPort_.prototype.postMessage=function(a){var b=JSON.stringify(a);var c="u2f://auth?"+encodeURI(b);location.replace(c)};u2f.WrappedIosPort_.prototype.getPortType=function(){return"WrappedIosPort_"};u2f.WrappedIosPort_.prototype.addEventListener=function(a,b){var c=a.toLowerCase();if(c!=="message"){console.error("WrappedIosPort only supports message")}};u2f.getIframePort_=function(a){var d="chrome-extension://"+u2f.EXTENSION_ID;var c=document.createElement("iframe");c.src=d+"/u2f-comms.html";c.setAttribute("style","display:none");document.body.appendChild(c);var b=new MessageChannel();var e=function(g){if(g.data=="ready"){b.port1.removeEventListener("message",e);a(b.port1)}else{console.error('First event on iframe port was not "ready"')}};b.port1.addEventListener("message",e);b.port1.start();c.addEventListener("load",function(){c.contentWindow.postMessage("init",d,[b.port2])})};u2f.EXTENSION_TIMEOUT_SEC=30;u2f.port_=null;u2f.waitingForPort_=[];u2f.reqCounter_=0;u2f.callbackMap_={};u2f.getPortSingleton_=function(a){if(u2f.port_){a(u2f.port_)}else{if(u2f.waitingForPort_.length==0){u2f.getMessagePort(function(b){u2f.port_=b;u2f.port_.addEventListener("message",(u2f.responseHandler_));while(u2f.waitingForPort_.length){u2f.waitingForPort_.shift()(u2f.port_)}})}u2f.waitingForPort_.push(a)}};u2f.responseHandler_=function(b){var d=b.data;var c=d.requestId;if(!c||!u2f.callbackMap_[c]){console.error("Unknown or missing requestId in response.");return}var a=u2f.callbackMap_[c];delete u2f.callbackMap_[c];a(d.responseData)};u2f.sign=function(a,c,e,b,d){if(js_api_version===undefined){u2f.getApiVersion(function(g){js_api_version=g.js_api_version===undefined?0:g.js_api_version;u2f.sendSignRequest(a,c,e,b,d)})}else{u2f.sendSignRequest(a,c,e,b,d)}};u2f.sendSignRequest=function(a,c,e,b,d){u2f.getPortSingleton_(function(g){var j=++u2f.reqCounter_;u2f.callbackMap_[j]=b;var k=(typeof d!=="undefined"?d:u2f.EXTENSION_TIMEOUT_SEC);var h=u2f.formatSignRequest_(a,c,e,k,j);g.postMessage(h)})};u2f.register=function(a,e,d,b,c){if(js_api_version===undefined){u2f.getApiVersion(function(g){js_api_version=g.js_api_version===undefined?0:g.js_api_version;u2f.sendRegisterRequest(a,e,d,b,c)})}else{u2f.sendRegisterRequest(a,e,d,b,c)}};u2f.sendRegisterRequest=function(a,e,d,b,c){u2f.getPortSingleton_(function(g){var j=++u2f.reqCounter_;u2f.callbackMap_[j]=b;var k=(typeof c!=="undefined"?c:u2f.EXTENSION_TIMEOUT_SEC);var h=u2f.formatRegisterRequest_(a,d,e,k,j);g.postMessage(h)})};u2f.getApiVersion=function(a,b){u2f.getPortSingleton_(function(d){if(d.getPortType){var c;switch(d.getPortType()){case"WrappedIosPort_":case"WrappedAuthenticatorPort_":c=1.1;break;default:c=0;break}a({js_api_version:c});return}var g=++u2f.reqCounter_;u2f.callbackMap_[g]=a;var e={type:u2f.MessageTypes.U2F_GET_API_VERSION_REQUEST,timeoutSeconds:(typeof b!=="undefined"?b:u2f.EXTENSION_TIMEOUT_SEC),requestId:g};d.postMessage(e)})}}"use strict";var args;var autoReconnect=true;var powerStatetable=["","Powered","Sleep","Sleep","Sleep","Hibernating","Power off","Present"];var StatusStrs=["Disconnected","Connecting...","Setup...","Connected","Intel&reg; AMT Connected"];var sort=0;var searchFocus=0;var mapSearchFocus=0;var userSearchFocus=0;var consoleFocus=0;var showRealNames=false;var meshserver=null;var meshes={};var meshcount=0;var nodes=null;var filetree={};var userinfo=null;var serverinfo=null;var events=[];var users=null;var wssessions=null;var nodeShortIdent=0;var desktop;var desktopsettings={encoding:2,showfocus:false,showmouse:true,showcad:true,quality:40,scaling:1024,framerate:50};var multidesktopsettings={quality:20,scaling:128,framerate:1000};var terminal;var files;var debugLevel=parseInt("{{{debuglevel}}}");var features=parseInt("{{{features}}}");var sessionTime=parseInt("{{{sessiontime}}}");var domain="{{{domain}}}";var domainUrl="{{{domainurl}}}";var authCookie="{{{authCookie}}}";var authCookieRenewTimer=null;var multiDesktop={};var multiDesktopFilter=null;var serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}";var amtScanResults=null;var debugmode=0;var clickOnce=(((features&256)!=0)&&detectClickOnce());var attemptWebRTC=((features&128)!=0);var webPageFullScreen=getstore("webPageFullScreen",true);if(webPageFullScreen=="false"){webPageFullScreen=false}if(webPageFullScreen=="true"){webPageFullScreen=true}var passRequirements="{{{passRequirements}}}";if(passRequirements!=""){passRequirements=JSON.parse(decodeURIComponent(passRequirements))}function startup(){if((features&32)==0){var h=null;try{h=top.location.toString().toLowerCase()}catch(b){}if(top!=self&&(h==null||top.active==false)){top.location=self.location;return}}args=parseUriArgs();debugmode=args.debug;if(args.webrtc!=null){attemptWebRTC=(args.webrtc==1)}QV("p13AutoConnect",debugmode);QV("autoconnectbutton2",debugmode);QV("autoconnectbutton1",debugmode);QV("DeskClip",debugmode);toggleFullScreen();if(args.hide){var d=parseInt(args.hide);QV("masthead",!(d&1));QV("topbarmaster",!(d&2));QV("footer",!(d&4));QV("p10title",!(d&8));QV("p11title",!(d&8));QV("p12title",!(d&8));QV("p13title",!(d&8));QV("p14title",!(d&8));QV("p15title",!(d&8));QV("p16title",!(d&8));if(d&16){QV("page_leftbar",false);QS("page_content").left="0px"}}if("{{currentNode}}"!=""){QV("p10BackButton",false);QV("p11BackButton",false);QV("p12BackButton",false);QV("p13BackButton",false);QV("p14BackButton",false);QV("p15BackButton",false);QV("p16BackButton",false)}p1updateInfo();document.onclick=function(c){hideContextMenu()};document.onkeypress=ondockeypress;document.onkeydown=ondockeydown;document.onkeyup=ondockeyup;window.onresize=function(){masterUpdate(512)};masterUpdate(512);meshserver=MeshServerCreateControl(domainUrl,authCookie);meshserver.onStateChanged=onStateChanged;meshserver.onMessage=onMessage;meshserver.Start();Q("sortselect").selectedIndex=sort=getstore("sort",0);Q("sizeselect").selectedIndex=getstore("viewsize",1);Q("SearchInput").value=getstore("search","");showRealNames=(getstore("showRealNames",0)==1);Q("RealNameCheckBox").checked=showRealNames;Q("viewselect").value=getstore("deviceView",1);Q("DeskControl").checked=(getstore("DeskControl",1)==1);masterUpdate(3);for(var g=1;g<5;g++){Q("devViewButton"+g).classList.remove("viewSelectorSel")}Q("devViewButton"+Q("viewselect").value).classList.add("viewSelectorSel");Q("p5filetable").addEventListener("drop",p5fileDragDrop,false);Q("p5filetable").addEventListener("dragover",p5fileDragOver,false);Q("p5filetable").addEventListener("dragleave",p5fileDragLeave,false);Q("p13filetable").addEventListener("drop",p13fileDragDrop,false);Q("p13filetable").addEventListener("dragover",p13fileDragOver,false);Q("p13filetable").addEventListener("dragleave",p13fileDragLeave,false);setInterval(updateDeviceTimeline,120000);var k=localStorage.getItem("desktopsettings");if(k!=null){desktopsettings=JSON.parse(k)}k=localStorage.getItem("multidesktopsettings");if(k!=null){multidesktopsettings=JSON.parse(k)}applyDesktopSettings();var l="";for(var a=1;a<27;a++){l+="<option value='"+a+"'>Ctrl-"+String.fromCharCode(64+a)+" ("+a+")</option>"}QH("specialkeylist",l);setupServerStats()}function toggleFullScreen(b){if(b===1){webPageFullScreen=!webPageFullScreen;putstore("webPageFullScreen",webPageFullScreen)}var a=0;if(args.hide){a=parseInt(args.hide)}if(webPageFullScreen==false){QS("container").width="960px";QS("container")["border-right"]="1px solid #b7b7b7";QS("container")["border-left"]="1px solid #b7b7b7";QS("container")["min-width"]="960px";QS("container")["overflow"]="";QS("column_l").width="930px";QS("column_l").height="";QS("column_l")["margin-left"]="";QS("column_l")["overflow-y"]="";QS("column_l")["max-height"]=(xxcurrentView>=10)?"calc(100vh - 159px)":"calc(100vh - 135px)";QS("container").position="";QS("page_content").position="";QV("MainMenuSpan",true);QV("UserDummyMenuSpan",false);QV("page_leftbar",false)}else{QS("container").position="absolute";QS("container").width="100%";QS("container").top="0px";QS("container").bottom="0px";QS("container")["border-right"]="0";QS("container")["border-left"]="0";QS("container")["min-width"]="700px";QS("container")["overflow"]="hidden";QS("page_content").position="absolute";QS("page_content").top="66px";QS("page_content").left=(a&16)?"0px":"90px";QS("page_content").right="0px";QS("page_content").bottom="0px";QS("column_l").height="calc(100vh - 135px)";QS("column_l").width="calc(100% - 30px)";QS("column_l")["overflow-y"]="auto";QS("column_l")["max-height"]="calc(100vh - 135px)";QV("MainMenuSpan",false);QV("UserDummyMenuSpan",(xxcurrentView<10)&&webPageFullScreen);QV("page_leftbar",!(a&16))}masterUpdate(512);QV("body",true)}function getNodeFromId(b){if(nodes!=null){for(var a in nodes){if(nodes[a]._id==b){return nodes[a]}}}return null}function reload(){window.location.href=window.location.href}function onStateChanged(c,d,b,a){if(d==0){setDialogMode(0);go(0);powerTimeline=null;powerTimelineReq=null;powerTimelineNode=null;powerTimelineUpdate=null;deleteAllNotifications();hideContextMenu();QV("verifyEmailId2",false);QV("logoutControl",false);if(a=="noauth"){QH("p0span","Unable to perform authentication");return}if(b==2){if(autoReconnect){setTimeout(serverPoll,5000)}}else{QH("p0span","Unable to connect web socket")}if(authCookieRenewTimer!=null){clearInterval(authCookieRenewTimer);authCookieRenewTimer=null}}else{if(d==2){meshserver.send({action:"meshes"});meshserver.send({action:"nodes",id:"{{currentNode}}"});if("{{currentNode}}"==""){meshserver.send({action:"files"})}go(1);authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},1800000)}}}function serverPoll(){var b=null;try{b=new XDomainRequest()}catch(a){}if(!b){b=new XMLHttpRequest()}b.open("HEAD",window.location.href);b.timeout=15000;b.onload=function(){reload()};b.onerror=b.ontimeout=function(){setTimeout(serverPoll,10000)};b.send()}function detectClickOnce(){for(var a in window.navigator.mimeTypes){if(window.navigator.mimeTypes[a].type=="application/x-ms-application"){return true}}var b=window.navigator.userAgent.toUpperCase();return(b.indexOf(".NET CLR 3.5")>=0)||(b.indexOf("(WINDOWS NT ")>=0)}function updateSiteAdmin(){var a="{{{noServerBackup}}}";var b=userinfo.siteadmin;if(a==1){b&=4294967290}QV("p2AccountSecurity",((features&4)==0)&&(serverinfo.domainauth==false)&&((features&4096)!=0));QV("p2AccountActions",((features&4)==0)&&(serverinfo.domainauth==false));QV("p2AccountImage",((features&4)==0)&&(serverinfo.domainauth==false));QV("p2ServerActions",b&21);QV("LeftMenuMyServer",b&21);QV("MainMenuMyServer",b&21);QV("p2ServerActionsBackup",b&1);QV("p2ServerActionsRestore",b&4);QV("p2ServerActionsVersion",b&16);QV("MainMenuMyFiles",b&8);QV("LeftMenuMyFiles",b&8);if(((b&8)==0)&&(xxcurrentView==5)){setDialogMode(0);go(1)}if(currentNode!=null){gotoDevice(currentNode._id,xxcurrentView,true)}if((userinfo.siteadmin&2)!=0){if(users==null){meshserver.send({action:"users"})}if(wssessions==null){meshserver.send({action:"wssessioncount"})}}else{users=null;wssessions=null;updateUsers();if(xxcurrentView==4||((xxcurrentView>=30)&&(xxcurrentView<40))){setDialogMode(0);go(1);currentUser=null}}meshserver.send({action:"events",limit:parseInt(p3limitdropdown.value)});QV("p2deleteall",userinfo.siteadmin==4294967295);QV("ServerConsole",userinfo.siteadmin===4294967295);if((xxcurrentView==115)&&(userinfo.siteadmin!=4294967295)){go(6)}if((xxcurrentView==6)&&((userinfo.siteadmin&21)==0)){go(1)}if((b&21)!=0){meshserver.send({action:"serverstats",interval:10000})}}var updateNaggleTimer=null;var updateNaggleFlags=0;function masterUpdate(a){updateNaggleFlags|=a;if(updateNaggleTimer==null){updateNaggleTimer=setTimeout(function(){if(updateNaggleFlags&512){center()}if(updateNaggleFlags&1){onSearchInputChanged()}if(updateNaggleFlags&2){onSortSelectChange(true)}if(updateNaggleFlags&128){updateMeshes()}if(updateNaggleFlags&4){updateDevices()}if(updateNaggleFlags&8){drawNotifications()}if(updateNaggleFlags&16){updateMapMarkers()}if(updateNaggleFlags&32){eventsUpdate()}if(updateNaggleFlags&64){refreshMap(false,true)}if(updateNaggleFlags&256){drawDeviceTimeline()}if(updateNaggleFlags&1024){deviceEventsUpdate()}if(updateNaggleFlags&2048){userEventsUpdate()}updateNaggleTimer=null;updateNaggleFlags=0},150)}}function updateSelf(){QV("verifyEmailId",(userinfo.emailVerified!==true)&&(userinfo.email!=null)&&(serverinfo.emailcheck==true));QV("verifyEmailId2",(userinfo.emailVerified!==true)&&(userinfo.email!=null)&&(serverinfo.emailcheck==true));QV("manageOtp",(userinfo.otpsecret==1)||(userinfo.otphkeys>0));QV("authAppSetupCheck",userinfo.otpsecret==1);QV("authKeySetupCheck",userinfo.otphkeys>0);QV("authCodesSetupCheck",userinfo.otpkeys>0);if(typeof userinfo.passchange=="number"){if(userinfo.passchange==-1){QH("p2nextPasswordUpdateTime"," - Reset on next login.")}else{if((passRequirements!=null)&&(typeof passRequirements.reset=="number")){var a=(userinfo.passchange)+(passRequirements.reset*86400)-Math.floor(Date.now()/1000);if(a<0){QH("p2nextPasswordUpdateTime"," - Reset on next login.")}else{if(a<3600){QH("p2nextPasswordUpdateTime"," - Reset in "+Math.floor(a/60)+" minute"+addLetterS(Math.floor(a/60))+".")}else{if(a<86400){QH("p2nextPasswordUpdateTime"," - Reset in "+Math.floor(a/3600)+" hour"+addLetterS(Math.floor(a/3600))+".")}else{QH("p2nextPasswordUpdateTime"," - Reset in "+Math.floor(a/86400)+" day"+addLetterS(Math.floor(a/86400))+".")}}}}}}}function addLetterS(a){return(a>1)?"s":""}function onMessage(D,l){switch(l.action){case"serverstats":updateServerStats(l);break;case"authcookie":authCookie=l.cookie;break;case"serverinfo":serverinfo=l.serverinfo;break;case"userinfo":userinfo=l.userinfo;updateSiteAdmin();updateSelf();break;case"users":users={};for(var k in l.users){users[l.users[k]._id]=l.users[k]}updateUsers();break;case"wssessioncount":wssessions=l.wssessions;updateUsers();break;case"meshes":meshes={};for(var k in l.meshes){meshes[l.meshes[k]._id]=l.meshes[k]}masterUpdate(4+128);break;case"files":filetree=setupBackPointers(l.filetree);updateFiles();d3updatefiles();break;case"nodes":nodes=[];for(var k in l.nodes){if(!meshes[k]){console.log("Invalid mesh (1): "+k);continue}for(var o in l.nodes[k]){if(l.nodes[k][o]._id==null){console.log("Invalid node ("+o+"): "+JSON.stringify(l.nodes));continue}l.nodes[k][o].namel=l.nodes[k][o].name.toLowerCase();if(l.nodes[k][o].rname){l.nodes[k][o].rnamel=l.nodes[k][o].rname.toLowerCase()}else{l.nodes[k][o].rnamel=l.nodes[k][o].namel}l.nodes[k][o].meshnamel=meshes[k].name.toLowerCase();l.nodes[k][o].meshid=k;l.nodes[k][o].state=(l.nodes[k][o].state)?(l.nodes[k][o].state):0;l.nodes[k][o].desc=l.nodes[k][o].desc;if(!l.nodes[k][o].icon){l.nodes[k][o].icon=1}l.nodes[k][o].ident=++nodeShortIdent;nodes.push(l.nodes[k][o])}}masterUpdate(1|2|4|64);if(xxcurrentView==0){if("{{viewmode}}"!=""){go(parseInt("{{viewmode}}"))}else{setDialogMode(0);go(1)}}if("{{currentNode}}"!=""){gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"))}break;case"powertimeline":if(l.nodeid!=powerTimelineReq){break}powerTimelineNode=l.nodeid;powerTimeline=l.timeline;powerTimelineUpdate=Date.now()+300000;if(currentNode._id==l.nodeid){masterUpdate(256)}break;case"lastconnect":var v=getNodeFromId(l.nodeid);if(v!=null){v.lastconnect=l.time;v.lastaddr=l.addr;if((currentNode._id==v._id)&&(Q("MainComputerState").innerHTML=="")){QH("MainComputerState","<span style=font-size:12px>Last seen:<br />"+new Date(v.lastconnect).toLocaleDateString()+", "+new Date(v.lastconnect).toLocaleTimeString()+"</span>")}}break;case"msg":if(l.nodeid!=null){var e=-1;if(nodes!=null){for(var d in nodes){if(nodes[d]._id==l.nodeid){e=d;break}}}if(e!=-1){if(l.type=="console"){p15consoleReceive(nodes[e],l.value)}else{if(l.type=="notify"){var o={text:l.value};if(l.nodeid!=null){o.nodeid=l.nodeid}if(l.tag!=null){o.tag=l.tag}if(l.username!=null){o.username=l.username}addNotification(o)}else{if(l.type=="ps"){showDeskToolsProcesses(l)}else{if((l.type=="getclip")&&(xxdialogTag=="clipboard")&&(currentNode!=null)&&(currentNode._id==l.nodeid)){Q("d2clipText").value=l.data}else{if((l.type=="setclip")&&(xxdialogTag=="clipboard")&&(currentNode!=null)&&(currentNode._id==l.nodeid)){QH("dlgClipStatus",l.success?"<span style=color:green>Success</span>":"<span style=color:red>Failed</span>");setTimeout(function(){try{QH("dlgClipStatus","")}catch(j){}},2000)}}}}}}}else{if(l.type=="notify"){var o={text:l.value};if(l.tag!=null){o.tag=l.tag}if(l.username!=null){o.username=l.username}addNotification(o)}}break;case"getnetworkinfo":if((currentNode._id==l.nodeid)&&(xxdialogMode==2)&&(xxdialogTag=="if"+l.nodeid)){if(l.netif==null){QH("d2netinfo","No network interface information available for this device.")}else{var I="<div style=width:100%;max-height:260px;overflow-x:hidden;overflow-y:auto;line-height:160%>";if(currentNode.lastconnect){I+=addHtmlValue2("Last agent connection",new Date(currentNode.lastconnect).toLocaleString())}if(currentNode.lastaddr){if(isPrivateIP(currentNode.lastaddr)){I+=addHtmlValue2("Last agent address",currentNode.lastaddr.split(":")[0])}else{I+=addHtmlValue2("Last agent address",'<a href="https://iplocation.com/?ip='+currentNode.lastaddr.split(":")[0]+'" rel="noreferrer noopener" target="MeshIPLoopup">'+currentNode.lastaddr.split(":")[0]+"</a>")}}I+=addHtmlValue2("Last interfaces update",new Date(l.updateTime).toLocaleString());for(var d in l.netif){var q=l.netif[d];I+="<hr />";if(q.name){I+=addHtmlValue2("Name","<b>"+EscapeHtml(q.name)+"</b>")}if(q.desc){I+=addHtmlValue2("Description",EscapeHtml(q.desc).replace("(R)","&reg;").replace("(r)","&reg;"))}if(q.dnssuffix){I+=addHtmlValue2("DNS suffix",EscapeHtml(q.dnssuffix))}if(q.mac){I+=addHtmlValue2("MAC address",'<a href="https://dnslytics.com/mac-address-lookup/'+q.mac.substring(0,6)+'" rel="noreferrer noopener" target="MeshMACLoopup">'+EscapeHtml(q.mac.toLowerCase())+"</a>")}if(q.v4addr){I+=addHtmlValue2("IPv4 address",EscapeHtml(q.v4addr))}if(q.v4mask){I+=addHtmlValue2("IPv4 mask",EscapeHtml(q.v4mask))}if(q.v4gateway){I+=addHtmlValue2("IPv4 gateway",EscapeHtml(q.v4gateway))}if(q.gatewaymac){I+=addHtmlValue2("Gateway MAC",'<a href="https://dnslytics.com/mac-address-lookup/'+q.gatewaymac.substring(0,6)+'" rel="noreferrer noopener" target="MeshMACLoopup">'+EscapeHtml(q.gatewaymac.toLowerCase())+"</a>")}}I+="</div>";QH("d2netinfo",I)}}break;case"serverversion":if((xxdialogMode==2)&&(xxdialogTag=="MeshCentralServerUpdate")){var I="<div style=width:100%;max-height:260px;overflow-x:hidden;overflow-y:auto;line-height:160%>";if(!l.current){l.current="Unknown"}if(!l.latest){l.latest="Unknown"}I+=addHtmlValue2("Current Version","<b>"+EscapeHtml(l.current)+"</b>");I+=addHtmlValue2("Latest Version","<b>"+EscapeHtml(l.latest)+"</b>");I+="</div>";if((l.latest.indexOf(".")==-1)||(l.current==l.latest)||((features&2048)==0)){setDialogMode(2,"MeshCentral Version",1,null,I)}else{setDialogMode(2,"MeshCentral Version",3,server_showVersionDlgEx,I+"<br /><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> Check and click OK to start server self-update.</label>");server_showVersionDlgUpdate()}}break;case"servererrors":if((xxdialogMode==2)&&(xxdialogTag=="MeshCentralServerErrors")){if(l.data==null){setDialogMode(2,"MeshCentral Server Errors",1,null,"Server has no error log.")}else{var I="<div style=width:100%;max-height:260px;overflow-x:hidden;overflow:auto;line-height:160%;font-size:10px><pre>"+l.data+"<pre></div>";setDialogMode(2,"MeshCentral Server Errors",3,server_showErrorsDlgEx,I+"<br /><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> Check and click OK to clear error log.</label>");server_showVersionDlgUpdate()}}break;case"serverconsole":p15consoleReceive("serverconsole",l.value);break;case"events":if((l.nodeid!=null)&&(l.nodeid==currentNode._id)){currentDeviceEvents=l.events;masterUpdate(1024)}else{if((l.user!=null)&&(l.user==currentUser.name)){currentUserEvents=l.events;masterUpdate(2048)}else{events=l.events;masterUpdate(32)}}break;case"getcookie":if(l.tag=="clickonce"){var a="{{{serverRedirPort}}}"==""?"{{{serverPublicPort}}}":"{{{serverRedirPort}}}";var A="http://"+window.location.hostname+":"+a+"/clickonce/minirouter/MeshMiniRouter.application?WS=wss%3A%2F%2F"+window.location.hostname+"%2Fmeshrelay.ashx%3Fauth="+l.cookie+"&CH={{{webcerthash}}}&AP="+l.protocol+((debugmode==1)?"":"&HOL=1");var u=window.open(A,"_blank");u.opener=null}break;case"getNotes":var o=Q("d2devNotes");if(o&&(l.id==decodeURIComponent(o.attributes.noteid.value))){if(l.notes){QH("d2devNotes",decodeURIComponent(l.notes))}else{QH("d2devNotes","")}var B=o.attributes.ro.value=="true";if(B==false){o.removeAttribute("readonly");QE("idx_dlgOkButton",true);QV("idx_dlgOkButton",true);focusTextBox("d2devNotes")}}break;case"otpauth-request":if((xxdialogMode==2)&&(xxdialogTag=="otpauth-request")){var C=l.secret;if(C.length==52){C=C.split(/(.............)/).filter(Boolean).join(" ")}else{if(C.length==32){C=C.split(/(....)/).filter(Boolean).join(" ");C=C.substring(0,20)+"<br/>"+C.substring(20)}}QH("d2optinfo",'<table style=width:380px><tr><td style=vertical-align:top>Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application and scan the barcode, use <a href="'+l.url+'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret. Then, enter the current 6 digit token below to activate 2-Step login.<br /><br />Secret<br /><tt id=d2optsecret secret="'+l.secret+'" style=font-size:12px>'+C+'</tt><br /><br /></td><td style=width:1px;vertical-align:top><a href="'+l.url+'" rel="noreferrer noopener" target=_blank><div id="qrcode"></div></a></td><tr><td colspan=2 style="text-align:center;border-top:1px solid black"><br />Enter the token here for 2-step login: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></td></table>');new QRCode(Q("qrcode"),{text:l.url,width:128,height:128,colorDark:"#000000",colorLight:"#EEE",correctLevel:QRCode.CorrectLevel.H});QV("idx_dlgOkButton",true);QE("idx_dlgOkButton",false);Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode){return}setDialogMode(2,"Authenticator App",1,null,l.success?"<b style=color:green>Authenticator app activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode){return}setDialogMode(2,"Authenticator App",1,null,l.success?"<b>Authenticator application removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode){return}var I="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";I+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>";if(l.passwords){var g=0;for(var d in l.passwords){if(++g%2){I+="<tr>"}var y=""+l.passwords[d].p;while(y.length<8){y="0"+y}if(l.passwords[d].u===true){I+="<td>"+y.substring(0,4)+"&nbsp;"+y.substring(4)}else{I+="<td><strike style=color:#BBB>"+y.substring(0,4)+"&nbsp;"+y.substring(4);+"</strike>"}}}else{I+="<tr><td>No Active Tokens"}I+="</table></div></div><br />";I+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>";I+="<input type=button value='Generate New Tokens' onclick='account_manageOtp(1);'></input>";if(l.passwords!=null){I+="<input type=button value='Clear Tokens' onclick='account_manageOtp(2);'></input>"}I+="</div><br />";setDialogMode(2,"Manage Backup Codes",8,null,I,"otpauth-manage");break;case"otp-hkey-get":if(xxdialogMode&&(xxdialogTag!="otpauth-hardware-manage")){return}var F="<div style='border-radius:6px;border:2px solid #CCC;background-color:#BBB;width:100%;box-sizing:border-box;margin-bottom:6px'><div style='margin:3px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold'><table style=width:100%;text-align:left>";var b="</table></div></div>";var I="<a href='https://www.yubico.com/' rel='noreferrer noopener' target='_blank'>Hardware keys</a> are used as secondary login authentication.";I+="<div style='max-height:150px;overflow-y:auto;overflow-x:hidden;margin-top:6px;margin-bottom:6px'>";if(l.keys&&l.keys.length>0){for(var d in l.keys){var h=l.keys[d],H=(h.type==1)?"U2F":"OTP";I+=F+'<tr style=margin:5px><td style=width:30px><img width=24 height=18 src="images/hardware-key-'+H+'-24.png" style=margin-top:4px><td style=width:250px>'+h.name+"<td><input type=button value='Remove' onclick=account_removehkey("+h.i+")></input>"+b}}else{I+=F+"<tr style=text-align:center><td>No Keys Configured"+b}I+="</div>";I+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>";I+="<input id=d2addkey1 type=button value='Add U2F Key' onclick='account_addhkey(1);'></input>";if((features&16384)!=0){I+="<input id=d2addkey2 type=button value='Add OTP Key' onclick='account_addhkey(2);'></input>"}I+="</div><br />";setDialogMode(2,"Manage Security Keys",8,null,I,"otpauth-hardware-manage");if(u2fSupported()==false){QE("d2addkey1",false)}break;case"otp-hkey-yubikey-add":if(l.result){meshserver.send({action:"otp-hkey-get"})}else{setDialogMode(2,"Add Security Key",1,null,"<br />Error, Unable to add key.<br /><br />")}break;case"otp-hkey-setup-request":if(xxdialogMode&&(xxdialogTag!="otpauth-hardware-manage")){return}var I="Press the key button now.<br /><br /><div style=width:100%;text-align:center><img width=120 height=117 src='images/hardware-keypress-120.png' /></div><input id=dp1keyname style=display:none value="+l.name+" />";setDialogMode(2,"Add Security Key",2,null,I);window.u2f.register(l.request.appId,l.request.registerRequests,l.request.registeredKeys,function(m){if(m.registrationData){meshserver.send({action:"otp-hkey-setup-response",response:m,name:Q("dp1keyname").value});setDialogMode(2,"Add Security Key",0,null,"<br />Checking...<br /><br /><br />","otpauth-hardware-manage")}else{var j=["","Unknown error","Bad request","Unsupported configuration","This key was already registered","Timeout"];setDialogMode(2,"Add Security Key",1,null,"<br />"+j[m.errorCode]+".<br /><br />")}},l.request.timeoutSeconds);break;case"otp-hkey-setup-response":if(xxdialogMode&&(xxdialogTag!="otpauth-hardware-manage")){return}if(l.result==true){meshserver.send({action:"otp-hkey-get"})}else{setDialogMode(2,"Add Security Key",1,null,"<br />ERROR: Unable to add key.<br /><br />","otpauth-hardware-manage")}break;case"event":if(!l.event.nolog){events.unshift(l.event);var c=parseInt(p3limitdropdown.value);while(events.length>c){events.pop()}masterUpdate(32)}switch(l.event.action){case"accountcreate":case"accountchange":if(userinfo.name==l.event.account.name){var t=l.event.account.siteadmin?l.event.account.siteadmin:0;var w=userinfo.siteadmin?userinfo.siteadmin:0;if((l.event.account.quota!=userinfo.quota)||(((userinfo.siteadmin&8)==0)&&((l.event.account.siteadmin&8)!=0))){meshserver.send({action:"files"})}userinfo=l.event.account;if(w!=t){updateSiteAdmin()}updateSelf()}if(users==null){break}users[l.event.account._id]=l.event.account;updateUsers();break;case"accountremove":if(users==null){break}delete users["user/"+domain+"/"+l.event.username.toLowerCase()];updateUsers();break;case"createmesh":if(l.event.links["user/"+domain+"/"+userinfo.name.toLowerCase()]!=null){meshes[l.event.meshid]={_id:l.event.meshid,name:l.event.name,mtype:l.event.mtype,desc:l.event.desc,links:l.event.links};masterUpdate(4+128);meshserver.send({action:"files"})}break;case"meshchange":if(meshes[l.event.meshid]==null){meshes[l.event.meshid]={_id:l.event.meshid,name:l.event.name,mtype:l.event.mtype,desc:l.event.desc,links:l.event.links};meshserver.send({action:"nodes"})}else{if(l.event.name){meshes[l.event.meshid].name=l.event.name}if(l.event.desc){meshes[l.event.meshid].desc=l.event.desc}if(l.event.flags!=null){meshes[l.event.meshid].flags=l.event.flags}if(l.event.links){meshes[l.event.meshid].links=l.event.links}if(l.event.amt){meshes[l.event.meshid].amt=l.event.amt}if(meshes[l.event.meshid].links["user/"+domain+"/"+userinfo.name.toLowerCase()]==null){if((xxcurrentView==20)&&(currentMesh==meshes[l.event.meshid])){go(2)}delete meshes[l.event.meshid];var s=[];for(var d in nodes){if(nodes[d].meshid!=l.event.meshid){s.push(nodes[d])}}nodes=s;if(xxcurrentView>=10&&xxcurrentView<20&&currentNode&&currentNode.meshid==l.event.meshid){setDialogMode(0);go(1)}}}masterUpdate(4+128);if(xxcurrentView==20&&currentMesh._id==l.event.meshid){p20updateMesh()}break;case"deletemesh":if(meshes[l.event.meshid]){delete meshes[l.event.meshid];masterUpdate(128);meshserver.send({action:"files"})}var s=[];if(nodes!=null){for(var d in nodes){if(nodes[d].meshid!=l.event.meshid){s.push(nodes[d])}}}nodes=s;masterUpdate(4);if(xxcurrentView>=20&&xxcurrentView<30&&currentMesh._id==l.event.meshid){setDialogMode(0);go(2)}if(xxcurrentView>=10&&xxcurrentView<20&&currentNode&&currentNode.meshid==l.event.meshid){setDialogMode(0);go(1)}break;case"addnode":var v=l.event.node;if(!meshes[v.meshid]){break}v.namel=v.name.toLowerCase();if(v.rname){v.rnamel=v.rname.toLowerCase()}else{v.rnamel=v.namel}v.meshnamel=meshes[v.meshid].name.toLowerCase();v.state=0;if(!v.icon){v.icon=1}v.ident=++nodeShortIdent;if(nodes==null){}nodes.push(v);masterUpdate(1|2|4|16);break;case"removenode":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];if(currentNode==v){if(xxcurrentView>=10&&xxcurrentView<20){setDialogMode(0);go(1)}currentNode=null}nodes.splice(e,1);masterUpdate(4|16)}break;case"changenode":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];v.name=l.event.node.name;v.rname=l.event.node.rname;v.users=l.event.node.users;v.host=l.event.node.host;v.desc=l.event.node.desc;v.osdesc=l.event.node.osdesc;v.publicip=l.event.node.publicip;v.iploc=l.event.node.iploc;v.wifiloc=l.event.node.wifiloc;v.gpsloc=l.event.node.gpsloc;v.tags=l.event.node.tags;v.userloc=l.event.node.userloc;if(l.event.node.agent!=null){if(v.agent==null){v.agent={}}if(l.event.node.agent.ver!=null){v.agent.ver=l.event.node.agent.ver}if(l.event.node.agent.id!=null){v.agent.id=l.event.node.agent.id}if(l.event.node.agent.caps!=null){v.agent.caps=l.event.node.agent.caps}if(l.event.node.agent.core!=null){v.agent.core=l.event.node.agent.core}else{if(v.agent.core){delete v.agent.core}}v.agent.tag=l.event.node.agent.tag}if(l.event.node.intelamt!=null){if(v.intelamt==null){v.intelamt={}}if(l.event.node.intelamt.host!=null){v.intelamt.user=l.event.node.intelamt.host}if(l.event.node.intelamt.user!=null){v.intelamt.user=l.event.node.intelamt.user}if(l.event.node.intelamt.tls!=null){v.intelamt.tls=l.event.node.intelamt.tls}if(l.event.node.intelamt.ver!=null){v.intelamt.ver=l.event.node.intelamt.ver}if(l.event.node.intelamt.state!=null){v.intelamt.state=l.event.node.intelamt.state}}v.namel=v.name.toLowerCase();if(v.rname){v.rnamel=v.rname.toLowerCase()}else{v.rnamel=v.namel}if(l.event.node.icon){v.icon=l.event.node.icon}masterUpdate(2|4|8|16);refreshDevice(v._id);if((currentNode==v)&&(xxdialogMode!=null)&&(xxdialogTag=="@xxmap")){p10showNodeLocationDialog()}}break;case"nodemeshchange":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];if(meshes[l.event.newMeshId]==null){if(currentNode==v){if(xxcurrentView>=10&&xxcurrentView<20){setDialogMode(0);go(1)}currentNode=null}nodes.splice(e,1);masterUpdate(4|16)}else{v.meshid=l.event.newMeshId;v.meshnamel=meshes[l.event.newMeshId].name.toLowerCase();masterUpdate(1|2|4)}refreshDevice(l.event.nodeid)}else{var v=l.event.node;if(!meshes[v.meshid]){break}v.namel=v.name.toLowerCase();if(v.rname){v.rnamel=v.rname.toLowerCase()}else{v.rnamel=v.namel}v.meshnamel=meshes[v.meshid].name.toLowerCase();v.state=0;if(!v.icon){v.icon=1}v.ident=++nodeShortIdent;if(nodes==null){}nodes.push(v);masterUpdate(1|2|4|16)}break;case"nodeconnect":var e=-1;for(var d in nodes){if(nodes[d]._id==l.event.nodeid){e=d;break}}if(e!=-1){var v=nodes[e];v.conn=l.event.conn;v.pwr=l.event.pwr;masterUpdate(4|16);refreshDevice(v._id)}break;case"wssessioncount":if(wssessions!=null){if(l.event.count==0&&wssessions["user/"+domain+"/"+l.event.username.toLowerCase()]){delete wssessions["user/"+domain+"/"+l.event.username.toLowerCase()]}else{wssessions["user/"+domain+"/"+l.event.username.toLowerCase()]=l.event.count}updateUsers()}break;case"clearevents":events=[];masterUpdate(32);break;case"login":if(users!=null&&users["user/"+domain+"/"+l.event.username.toLowerCase()]){users["user/"+domain+"/"+l.event.username.toLowerCase()].login=Math.floor(new Date(l.event.time).getTime()/1000)}break;case"scanamtdevice":if((xxdialogMode==null)||(!Q("dp1range"))||(Q("dp1range").value!=l.event.range)){return}var I="";if(l.event.results==null){I="<div style=width:100%;text-align:center;margin-top:12px>Unable to scan this address range.</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>"}else{amtScanResults=l.event.results;for(var d in l.event.results){var z=l.event.results[d],E=z.hostname;if(E.length>20){E=E.substring(0,20)+"..."}var G='<b title="'+EscapeHtml(z.hostname)+'">'+EscapeHtml(E)+"</b> - v"+z.ver;if(z.state==2){if(z.tls==1){G+=" with TLS."}else{G+=" without TLS."}}else{G+=" not activated."}I+='<div style=width:100%;margin-bottom:2px;background-color:lightgray><div style=padding:4px><div style=display:inline-block;margin-right:5px><input class=DevScanCheckbox name=dp1checkbox tag="'+EscapeHtml(d)+'" type=checkbox onclick=addAmtScanToMeshCheckbox() /></div><div class=j1 style=display:inline-block></div><div style=display:inline-block;margin-left:5px;overflow-x:auto;white-space:nowrap>'+G+"</div></div></div>"}if(I==""){I="<div style=width:100%;text-align:center;margin-top:12px>Scan returned no results.</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>"}}QH("dp1results",I);QE("dp1range",true);QE("dp1rangebutton",true);break;case"notify":var o={text:l.event.value};if(l.event.tag!=null){o.tag=l.event.tag}addNotification(o);break;case"stopped":break;default:break}break;case"stopped":autoReconnect=false;QH("p0span",l.msg);break;default:console.log("Unknown message.action",l.action);break}}function onRealNameCheckBox(){showRealNames=Q("RealNameCheckBox").checked;putstore("showRealNames",showRealNames?1:0);masterUpdate(6);return}function onDeviceViewChange(a){if(a!=null){Q("viewselect").value=a}for(var b=1;b<5;b++){Q("devViewButton"+b).classList.remove("viewSelectorSel")}Q("devViewButton"+Q("viewselect").value).classList.add("viewSelectorSel");putstore("deviceView",Q("viewselect").value);putstore("viewsize",Q("sizeselect").value);masterUpdate(4)}function ondockeypress(a){if(!xxdialogMode&&xxcurrentView==11&&desktop&&Q("DeskControl").checked){return desktop.m.handleKeys(a)}if(!xxdialogMode&&xxcurrentView==12&&terminal&&terminal.State==3){return terminal.m.TermHandleKeys(a)}if(!xxdialogMode&&((xxcurrentView==15)||(xxcurrentView==115))){return agentConsoleHandleKeys(a)}if(!xxdialogMode&&xxcurrentView==4){if(a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}var b=0;if(a.key){if(a.key.length===1&&userSearchFocus==0){Q("UserSearchInput").value=((Q("UserSearchInput").value+a.key));b=1}if(a.keyCode==8&&userSearchFocus==0){var c=Q("UserSearchInput").value;Q("UserSearchInput").value=c.substring(0,c.length-1);b=1}if(a.keyCode==27){Q("UserSearchInput").value="";b=1}}else{if(a.charCode!=0&&userSearchFocus==0){Q("UserSearchInput").value=((Q("UserSearchInput").value+String.fromCharCode(a.charCode)));b=1}}if(b>0){if(b==1){onUserSearchInputChanged()}return haltEvent(a)}}if(xxdialogMode||xxcurrentView!=1){return}if(a.ctrlKey==true&&a.charCode==96){showRealNames=!showRealNames;Q("RealNameCheckBox").value=showRealNames;putstore("showRealNames",showRealNames?1:0);masterUpdate(6);return}if(a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}if(Q("viewselect").value<3){var b=0;if(a.key){if(a.key.length===1&&searchFocus==0){Q("SearchInput").value=((Q("SearchInput").value+a.key));b=1}if(a.keyCode==8&&searchFocus==0){var c=Q("SearchInput").value;Q("SearchInput").value=c.substring(0,c.length-1);b=1}if(a.keyCode==27){Q("SearchInput").value="";b=1}}else{if(a.charCode!=0&&searchFocus==0){Q("SearchInput").value=((Q("SearchInput").value+String.fromCharCode(a.charCode)));b=1}}if(b>0){if(b==1){masterUpdate(5)}return haltEvent(a)}}if(Q("viewselect").value==3){if(a.key){if(a.key.length===1&&mapSearchFocus==0){Q("mapSearchLocation").value=((Q("mapSearchLocation").value+a.key));b=1}if(a.keyCode==27){Q("mapSearchLocation").value="";mapCloseSearchWindow();b=1}if(a.keyCode==13){getSearchLocation()}}else{if(a.charCode!=0&&mapSearchFocus==0){Q("mapSearchLocation").value=((Q("mapSearchLocation").value+String.fromCharCode(a.charCode)));b=1}}}}function ondockeydown(a){if(!xxdialogMode&&xxcurrentView==11&&desktop&&Q("DeskControl").checked){return desktop.m.handleKeyDown(a)}if(!xxdialogMode&&xxcurrentView==12&&terminal&&terminal.State==3){return terminal.m.TermHandleKeyDown(a)}if(!xxdialogMode&&xxcurrentView==13&&a.keyCode==116&&p13filetree!=null){haltEvent(a);return false}if(!xxdialogMode&&((xxcurrentView==15)||(xxcurrentView==115))){return agentConsoleHandleKeys(a)}if(!xxdialogMode&&xxcurrentView==4){if(a.keyCode===8&&userSearchFocus==0){var c=Q("UserSearchInput").value;Q("UserSearchInput").value=(c.substring(0,c.length-1));b=1}if(a.keyCode===27){Q("UserSearchInput").value="";b=1}if(b>0){if(b==1){masterUpdate(5)}return haltEvent(a)}}if(xxdialogMode||xxcurrentView!=1||a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}var b=0;if(Q("viewselect").value<3){if(a.keyCode===8&&searchFocus==0){var c=Q("SearchInput").value;Q("SearchInput").value=(c.substring(0,c.length-1));b=1}if(a.keyCode===27){Q("SearchInput").value="";b=1}if(b>0){if(b==1){masterUpdate(5)}return haltEvent(a)}}if(Q("viewselect").value==3){if(a.keyCode===8&&mapSearchFocus==0){var c=Q("mapSearchLocation").value;Q("mapSearchLocation").value=(c.substring(0,c.length-1));b=1}if(a.keyCode===27){Q("mapSearchLocation").value="";mapCloseSearchWindow();b=1}}}function ondockeyup(a){if(!xxdialogMode&&xxcurrentView==11&&desktop&&Q("DeskControl").checked){return desktop.m.handleKeyUp(a)}if(!xxdialogMode&&xxcurrentView==12&&terminal&&terminal.State==3){return terminal.m.TermHandleKeyUp(a)}if(!xxdialogMode&&xxcurrentView==13&&a.keyCode==116&&p13filetree!=null){p13folderup(9999);haltEvent(a);return false}if(!xxdialogMode&&xxcurrentView==4){if((a.keyCode===8&&searchFocus==0)||a.keyCode===27){return haltEvent(a)}}if(xxdialogMode&&a.keyCode==27){dialogclose(0)}if(xxdialogMode||xxcurrentView!=0||a.ctrlKey==true||a.altKey==true||a.metaKey==true){return}if(Q("viewselect").value<3){if((a.keyCode===8&&searchFocus==0)||a.keyCode===27){return haltEvent(a)}}if(Q("viewselect").value==3){if((a.keyCode===8&&mapSearchFocus==0)||a.keyCode===27){return haltEvent(a)}}}function devMouseHover(b,c){var d=Q("viewselect").value;if(d==1){var a=b.children[1].children[1];a.children[0].classList.remove("g1s");a.children[1].classList.remove("e2s");a.children[2].classList.remove("g2s");if(c==1){a.children[0].classList.add("g1s");a.children[1].classList.add("e2s");a.children[2].classList.add("g2s")}}else{if(d==2){var a=b;a.children[2].classList.remove("g1s");a.children[4].classList.remove("e2s");a.children[3].classList.remove("g2s");if(c==1){a.children[2].classList.add("g1s");a.children[4].classList.add("e2s");a.children[3].classList.add("g2s")}}}}var deviceHeaderId=0;var deviceHeaderTotal=0;var deviceHeadersTitles={};var deviceHeaderCount;var deviceHeaders={};var oldviewmode=0;function updateDevices(){if(nodes==null){return}var H="",a=0,g=null,e=0,l={},O=Q("viewselect").value,s={},p={};QV("xdevices",O<4);QV("xdevicesmap",O==4);QV("devListToolbar",O<3);QV("kvmListToolbar",O==3);QV("devMapToolbar",O==4);QV("devListToolbarSize",O==3);QV("NoMeshesPanel",meshcount==0);QV("devListToolbarViewIcons",(meshcount!=0)&&(nodes.length>0));QV("devListToolbarSort",(meshcount!=0)&&(nodes.length>0)&&(O<4));if((meshcount==0)||(nodes.length==0)){O=1;sort=0}if(O==4){setTimeout(function(){if(xxmap.map!=null){xxmap.map.updateSize()}},200)}else{deviceHeaderId=0;deviceHeaderCount={};deviceHeaderTotal=0;deviceHeaders={};deviceHeadersTitles={};var x=[];if(sort==0){nodes.sort(meshSort)}else{if(sort==1){nodes.sort(powerSort)}else{if(sort==2){if(showRealNames==true){nodes.sort(deviceHostSort)}else{nodes.sort(deviceSort)}}}}var d=[],m=document.getElementsByClassName("DeviceCheckbox"),b=0;for(var t=0;t<m.length;t++){if(m[t].checked){d.push(m[t].value)}}if((oldviewmode<3)&&(O==3)){multiDesktopFilter=d}else{if((oldviewmode==3)&&(O<3)){d=multiDesktopFilter}}var M=Q("column_l").clientWidth-60;var k=Math.floor(M/301);k=301+Math.floor((M-(k*301))/k);for(var t in nodes){if(nodes[t].v==false){continue}var z=meshes[nodes[t].meshid],B=z.links["user/"+domain+"/"+userinfo.name.toLowerCase()];if(B==null){continue}var C=B.rights;if((O==3)&&(z.mtype==1)){continue}if(sort==0){if(nodes[t].meshid!=g){deviceHeaderSet();var o="";if(meshes[nodes[t].meshid].mtype==1){o="<span class=devHeaderx>, Intel&reg; AMT only</span>"}if((O==1)&&(g!=null)){if(a==2){H+="<td><div style=width:301px></div></td>"}if(H!=""){H+="</tr></table>"}}H+="<div class=DevSt style=width:100%;padding-top:4px><span style=float:right>";H+=getMeshActions(z,C);H+='</span><span id=MxMESH style=cursor:pointer onclick=gotoMesh("'+nodes[t].meshid+'")>'+EscapeHtml(meshes[nodes[t].meshid].name)+"</span>"+o+"<span id=DevxHeader"+deviceHeaderId+" class=devHeaderx></span></div>";g=nodes[t].meshid;l[g]=1;a=0}}else{if(sort==1){var G=nodes[t].pwr?nodes[t].pwr:0;if(G!==g){deviceHeaderSet();if((O==1)&&(g!==null)){if(a==2){H+="<td><div style=width:301px></div></td>"}if(H!=""){H+="</tr></table>"}}H+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[t].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+' class="devHeaderx"></span></div>';g=G;a=0}}else{if(sort==2){if(g==null){g="1"}}}}e++;var L=EscapeHtml(nodes[t].name);if(L.length==0){L="<i>None</i>"}if((nodes[t].rname!=null)&&(nodes[t].rname.length>0)){L+=" / "+EscapeHtml(nodes[t].rname)}var D=EscapeHtml(nodes[t].name);if(showRealNames==true&&nodes[t].rname!=null){D=EscapeHtml(nodes[t].rname)}if(D.length==0){D="<i>None</i>"}var u=nodes[t].icon;var F=NodeStateStr(nodes[t]);if((!nodes[t].conn)||(nodes[t].conn==0)){u+=" gray"}if(O==1){H+="<div id=devs onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:"+k+'px;height:50px;padding-top:1px;padding-bottom:1px><div style=width:22px;height:50%;float:left;padding-top:12px><input class="'+nodes[t].meshid+' DeviceCheckbox" onclick=p1updateInfo() value=devid_'+nodes[t]._id+" type=checkbox></div><div style=height:100%;cursor:pointer onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)><div class=\"i"+u+'" style=width:50px;float:left></div><div style=height:100%><div class=g1></div><div class=e2><div class=e1 style=width:'+(k-100)+'px title="'+L+'">'+D+"</div><div>"+F+"</div></div><div class=g2></div></div></div></div>"}else{if(O==2){H+="<tr><td><div id=devs class=bar18 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium>";H+='<div style=width:22px;float:left;background-color:white><input class="'+nodes[t].meshid+' DeviceCheckbox" onclick=p1updateInfo() value=devid_'+nodes[t]._id+" type=checkbox></div>";H+="<div style=float:left;height:18px;width:18px;background-color:white onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)><div class=j"+u+" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>";H+="<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>";H+='<div style=cursor:pointer;font-size:14px title="'+L+"\" onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)><span style=float:right>"+F+"</span><span style=width:300px>"+D+"</span></div></div></td></tr>"}else{if((O==3)&&(nodes[t].conn&1)&&(((C&8)||(C&256))!=0)&&((nodes[t].agent.caps&1)!=0)){if((multiDesktopFilter.length==0)||(multiDesktopFilter.indexOf("devid_"+nodes[t]._id)>=0)){H+="<div id=devs style=display:inline-block;margin:1px;background-color:lightgray;border-radius:5px;position:relative><div style=padding:3px;cursor:pointer onclick=gotoDevice('"+nodes[t]._id+"',11,null,event)>";H+='<div class="j'+u+'" style=width:16px;float:left></div>&nbsp;'+D+"</div>";H+="<span onclick=gotoDevice('"+nodes[t]._id+"',null,null,event)></span><div id=xkvmid_"+nodes[t]._id.split("/")[2]+"><div id=skvmid_"+nodes[t]._id.split("/")[2]+' style="position:absolute;color:white;left:5px;top:27px;text-shadow:0px 0px 5px #000;z-index:1000;cursor:default" onclick=toggleKvmDevice(\''+nodes[t]._id+"')>Disconnected</div></div>";H+="</div>";x.push(nodes[t]._id)}}}}if((sort==3)&&(H!="")){if(nodes[t].tags){for(var w in nodes[t].tags){var K=nodes[t].tags[w];if(s[K]==null){s[K]=H;p[K]=1}else{s[K]+=H;p[K]+=1}if(O==3){break}}}H=""}deviceHeaderTotal++;if(typeof deviceHeaderCount[nodes[t].state]=="undefined"){deviceHeaderCount[nodes[t].state]=1}else{deviceHeaderCount[nodes[t].state]++}}if(sort==3){var q=[];for(var t in s){q.push(t)}q.sort(function(c,j){return c.toLowerCase().localeCompare(j.toLowerCase())});for(var w in q){var t=q[w];H+="<div class=DevSt style=width:100%;padding-top:4px><span>"+t+'</span><span class="devHeaderx">, '+p[t]+" device"+((p[t]>1)?"s":"")+"</span></div>"+s[t]}}if((H=="")&&(meshcount>0)&&(Q("SearchInput").value!="")){if(sort==3){H='<div style="margin:30px">No devices are included in any groups, click on a device\'s "Groups" to add to a group.</div>'}else{H='<div style="margin:30px">No devices matching this search.</div>'}}if((O==1)&&(a==2)){H+="<td><div style=width:301px></div></td>"}if((sort==0)&&(Q("SearchInput").value=="")&&(O<3)){for(var t in meshes){var y=meshes[t],A=y.links["user/"+domain+"/"+userinfo.name.toLowerCase()];if(A!=null){var C=A.rights;if(l[y._id]==null){if((g!="")&&(H!="")){H+="</tr></table>"}H+="<table style=width:100%;padding-top:4px cellpadding=0 cellspacing=0><tr><td colspan=3 class=DevSt><span style=float:right>";H+=getMeshActions(y,C);H+='</span><span id=MxMESH style=cursor:pointer onclick=gotoMesh("'+y._id+'")>'+EscapeHtml(y.name)+"</span></td></tr><tr>";if(y.mtype==1){H+="<td><div style=padding:10px><i>No Intel&reg; AMT devices in this mesh";if((C&4)!=0){H+=', <a style=cursor:pointer onclick=addDeviceToMesh("'+y._id+'")>add one</a>'}}if(y.mtype==2){H+="<td><div style=padding:10px><i>No devices in this mesh";if((C&4)!=0){H+=', <a style=cursor:pointer onclick=addAgentToMesh("'+y._id+'")>add one</a>'}}H+=".</i></div></td>";g=y._id;e++}}}}H+="</tr></table><div style=height:1px></div>";H+="<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>";if((O<3)&&(sort==0)&&(meshcount>0)){H+='<a onclick=account_createMesh() title="Create a new group of devices." style=cursor:pointer>Add Device Group</a>&nbsp'}H+='<a onclick=p10showMeshCmdDialog(0) style=cursor:pointer title="Download MeshCmd, a command line tool that performs many functions.">MeshCmd</a></div>';H+="</div><br/>";QH("xdevices",H);deviceHeaderSet();var m=document.getElementsByClassName("DeviceCheckbox"),b=0;for(var t=0;t<m.length;t++){m[t].checked=(d.indexOf(m[t].value)>=0)}for(var t in deviceHeaders){QH(t,deviceHeaders[t])}for(var t in deviceHeadersTitles){Q(t).title=deviceHeadersTitles[t]}p1updateInfo();if(O==3){var P=[{x:180,y:101},{x:302,y:169},{x:454,y:255}][Q("sizeselect").selectedIndex];var I=P.x+2,N=M-5,R=Math.floor(N/I);R=I+Math.floor((N-(R*I))/R);P.y=P.y*(R/P.x);P.x=R;for(var t in multiDesktop){multiDesktop[t].xxdelete=true}for(var t in x){var v=x[t],J=v.split("/")[2],h=multiDesktop[v];if(h!=null){h.m.CanvasId.setAttribute("style","background-color:black;width:"+P.x+"px;height:"+P.y+"px");Q("xkvmid_"+J).appendChild(h.m.CanvasId);delete h.xxdelete;QH("skvmid_"+J,["Disconnected","Connecting...","Setup...","",""][((h.m.State==null)?h.m.state:h.m.State)])}else{var E=getNodeFromId(v);if((desktopNode==E)&&(desktop!=null)){var a=desktop.m.CanvasId;a.setAttribute("id","kvmid_"+J);a.setAttribute("style","background-color:black;width:"+P.x+"px;height:"+P.y+"px");a.setAttribute("onclick","toggleKvmDevice('"+v+"')");a.removeAttribute("onmousedown");a.removeAttribute("onmouseup");a.removeAttribute("onmousemove");Q("xkvmid_"+J).appendChild(a);QH("skvmid_"+J,["Disconnected","Connecting...","Setup...","",""][((desktop.m.State==null)?desktop.m.state:desktop.m.State)]);if(desktop.m.SendCompressionLevel){desktop.m.SendCompressionLevel(1,multidesktopsettings.quality,multidesktopsettings.scaling,multidesktopsettings.framerate)}desktop.shortid=J;desktop.onStateChanged=onMultiDesktopStateChange;multiDesktop[v]=desktop;desktop=desktopNode=currentNode=null;QH("DeskParent",'<canvas id="Desk" width="640" height="480" style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>')}else{var a=document.createElement("canvas");a.setAttribute("id","kvmid_"+J);a.setAttribute("width",640);a.setAttribute("height",480);a.setAttribute("oncontextmenu","return false");a.setAttribute("style","background-color:black;width:"+P.x+"px;height:"+P.y+"px");a.setAttribute("onclick","toggleKvmDevice('"+v+"')");try{Q("xkvmid_"+J).appendChild(a)}catch(n){}if(Q("autoConnectDesktopCheckbox").checked==true){setTimeout(function(){connectMultiDesktop(E,1)},100)}}}}for(var t in multiDesktop){if(multiDesktop[t].xxdelete==true){multiDesktop[t].Stop();delete multiDesktop[t]}else{if(debugmode&&multiDesktop[t].m&&multiDesktop[t].m.onScreenSizeChange){mdeskAdjust(multiDesktop[t].m,multiDesktop[t].m.ScreenWidth,multiDesktop[t].m.ScreenHeight,multiDesktop[t].m.CanvasId)}}}deskAdjust()}else{disconnectAllKvmFunction();Q("autoConnectDesktopCheckbox").checked=false}}oldviewmode=O}function toggleKvmDevice(d){var c=getNodeFromId(d),a=meshes[c.meshid],b=a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((b&8)||(b&256)){if(c.conn&1){connectMultiDesktop(c,1)}}}function autoConnectDesktops(){if(Q("autoConnectDesktopCheckbox").checked==true){connectAllKvmFunction()}}function connectAllKvmFunction(){for(var a in nodes){if(multiDesktop[nodes[a]._id]==null){toggleKvmDevice(nodes[a]._id)}}}function disconnectAllKvmFunction(){for(var a in multiDesktop){multiDesktop[a].Stop()}multiDesktop={}}function onMultiDesktopStateChange(a,c){try{QH("skvmid_"+a.shortid,["Disconnected","Connecting...","Setup...","",""][c])}catch(b){}}function showMultiDesktopSettings(){QV("d7amtkvm",false);QV("d7meshkvm",true);d7bitmapquality.value=multidesktopsettings.quality;d7bitmapscaling.value=multidesktopsettings.scaling;if(multidesktopsettings.framerate){d7framelimiter.value=multidesktopsettings.framerate}else{d7framelimiter.value=1000}setDialogMode(7,"Remote Desktop Settings",3,showMultiDesktopSettingsChanged)}function showMultiDesktopSettingsChanged(){multidesktopsettings.quality=d7bitmapquality.value;multidesktopsettings.scaling=d7bitmapscaling.value;multidesktopsettings.framerate=d7framelimiter.value;localStorage.setItem("multidesktopsettings",JSON.stringify(multidesktopsettings));for(var a in multiDesktop){multiDesktop[a].m.SendCompressionLevel(1,multidesktopsettings.quality,multidesktopsettings.scaling,multidesktopsettings.framerate)}}function connectMultiDesktop(c,a){var d=c._id,e=d.split("/")[2];var b=multiDesktop[d];if(b==null){if(Q("kvmid_"+e)==null){return}if(a==2){if((c.intelamt.user==null)||(c.intelamt.user=="")){return}b=CreateAmtRedirect(CreateAmtRemoteDesktop("kvmid_"+e),authCookie);b.shortid=e;b.onStateChanged=onMultiDesktopStateChange;b.m.bpp=1;b.m.useZRLE=true;b.m.showmouse=true;b.m.onKvmData=function(g){console.log("KVM Data received in multi-desktop mode, this is not supported.")};if(debugmode>0){b.m.onScreenSizeChange=mdeskAdjust}b.Start(d,16994,"*","*",0);b.contype=2;multiDesktop[d]=b}else{if(a==1){b=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("kvmid_"+e),serverPublicNamePort,authCookie);b.shortid=e;b.attemptWebRTC=attemptWebRTC;b.onStateChanged=onMultiDesktopStateChange;b.m.CompressionLevel=multidesktopsettings.quality;b.m.ScalingLevel=multidesktopsettings.scaling;b.m.FrameRateTimer=multidesktopsettings.framerate;if(debugmode>0){b.m.onScreenSizeChange=mdeskAdjust}b.Start(d);b.contype=1;multiDesktop[d]=b}}}else{b.Stop();delete multiDesktop[d]}}function getMeshActions(a,b){if((b&4)==0){return""}var c="";if((features&1024)==0){c+=' <a style=cursor:pointer;font-size:10px title="Add a new Intel&reg; AMT computer that is located on the internet." onclick=addCiraDeviceToMesh("'+a._id+'")>Add CIRA</a>'}if(a.mtype==1){if((features&1)==0){c+=' <a style=cursor:pointer;font-size:10px title="Add a new Intel&reg; AMT computer that is located on the local network." onclick=addDeviceToMesh("'+a._id+'")>Add Local</a>';c+=' <a style=cursor:pointer;font-size:10px title="Add a new Intel&reg; AMT computer by scanning the local network." onclick=addAmtScanToMesh("'+a._id+'")>Scan Network</a>'}}if(a.mtype==2){c+=' <a style=cursor:pointer;font-size:10px title="Add a new computer to this mesh by installing the mesh agent." onclick=addAgentToMesh("'+a._id+'")>Add Agent</a>';if(features&64){c+=' <a style=cursor:pointer;font-size:10px title="Invite someone to install the mesh agent on this mesh." onclick=inviteAgentToMesh("'+a._id+'")>Invite</a>'}}return c}function addDeviceToMesh(b){if(xxdialogMode){return}var a=meshes[b];var c='Add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+'".<br /><br />';c+=addHtmlValue("Device Name","<input id=dp1devicename style=width:230px maxlength=32 autocomplete=off onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />");c+=addHtmlValue("Hostname",'<input id=dp1hostname style=width:230px maxlength=32 autocomplete=off placeholder="Same as device name" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');c+=addHtmlValue("Username",'<input id=dp1username style=width:230px maxlength=32 autocomplete=off placeholder="admin" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');c+=addHtmlValue("Password","<input id=dp1password type=password style=width:230px autocomplete=off maxlength=32 onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />");c+=addHtmlValue("Security","<select id=dp1tls style=width:236px><option value=0>No TLS security</option><option value=1>TLS security required</option></select>");setDialogMode(2,"Add Intel&reg; AMT device",3,addDeviceToMeshEx,c,b);validateDeviceToMesh();Q("dp1devicename").focus()}function addAmtScanToMesh(a){if(xxdialogMode){return}var b="Enter a range of IP addresses to scan for Intel AMT devices.<br /><br />";b+=addHtmlValue("IP Range",'<input id=dp1range style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value=Scan onclick=addAmtScanToMeshButton()></input>');b+='<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';setDialogMode(2,"Scan for Intel&reg; AMT devices",3,addAmtScanToMeshEx,b,a);QE("idx_dlgOkButton",false);QH("dp1results","<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>");focusTextBox("dp1range")}function addAmtScanToMeshKeyUp(a){if(a.keyCode==13){haltEvent(a);addAmtScanToMeshButton()}}function addAmtScanToMeshEx(b,h){var d=document.getElementsByClassName("DevScanCheckbox"),c=0;for(var e=0;e<d.length;e++){if(d[e].checked){var g=d[e].getAttribute("tag");var a=amtScanResults[g];meshserver.send({action:"addamtdevice",meshid:h,devicename:g,hostname:a.hostname,amtusername:"",amtpassword:"",amttls:a.tls})}}}function addAmtScanToMeshButton(){QE("dp1range",false);QE("dp1rangebutton",false);QH("dp1results","<div style=width:100%;text-align:center;margin-top:12px>Scanning...</div>");meshserver.send({action:"scanamtdevice",range:Q("dp1range").value})}function addAmtScanToMeshCheckbox(){var b=document.getElementsByClassName("DevScanCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked){a++}}QE("idx_dlgOkButton",a>0)}function addCiraDeviceToMesh(b){if(xxdialogMode){return}var a=meshes[b];var c=b.split("/")[2].replace(/\@/g,"X").replace(/\$/g,"X");var e="<select id=dlgAddCiraSel onclick=dlgAddCiraSelClick() style=width:230px><option value=0>MeshCommander Script</option><option value=1>Manual Username/Password</option>";if((features&16)==0){e+="<option value=2>Manual Certificate</option></select>"}var d="";d+=addHtmlValue("Setup Method",e);d+="<hr>";d+='<div id=dlgAddCira0>To add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+"\" with CIRA, download the following script files and use <a href='http://meshcommander.com' rel='noreferrer noopener' target='_blank'>MeshCommander</a> to run the script to configure computers.<br /><br />";d+=addHtmlValue("Setup CIRA",'<a style=cursor:pointer onclick=fileDownload("mescript.ashx?type=1&meshid='+c.substring(0,16)+'","cira_setup.mescript")>cira_setup.mescript</a>');d+=addHtmlValue("Cleanup CIRA",'<a style=cursor:pointer onclick=fileDownload("mescript.ashx?type=2","cira_clean.mescript")>cira_clean.mescript</a>');d+="</div>";d+='<div id=dlgAddCira1 style=display:none>To add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+'" with CIRA, load the following certificate as trusted root within Intel AMT';if(serverinfo.mpspass){d+=" and authenticate to the server using this username and password.<br /><br />"}else{d+=" and authenticate to the server using this username and any password.<br /><br />"}d+=addHtmlValue("Root Certificate",'<a style=cursor:pointer onclick=fileDownload("MeshServerRootCert.cer","MeshServerRootCert.cer")>Root Certificate File</a>');d+=addHtmlValue("Username",'<input style=width:230px readonly value="'+c.substring(0,16)+'" />');if(serverinfo.mpspass){d+=addHtmlValue("Password",'<input style=width:230px readonly value="'+EscapeHtml(serverinfo.mpspass)+'" />')}if(serverinfo!=null){d+=addHtmlValue("MPS Server",'<input style=width:230px readonly value="'+EscapeHtml(serverinfo.mpsname)+":"+serverinfo.mpsport+'" />')}d+="</div>";if((features&16)==0){d+='<div id=dlgAddCira2 style=display:none>To add a new Intel&reg; AMT device to device group "'+EscapeHtml(a.name)+'" with CIRA, load the following certificate as trusted root within Intel AMT, authenticate using a client certificate with the following common name and connect to the following server.<br /><br />';d+=addHtmlValue("Root Certificate",'<a style=cursor:pointer onclick=fileDownload("MeshServerRootCert.cer","MeshServerRootCert.cer")>Root Certificate File</a>');d+=addHtmlValue("Organization",'<input style=width:230px readonly value="'+c+'" />');if(serverinfo!=null){d+=addHtmlValue("MPS Server",'<input style=width:230px readonly value="'+EscapeHtml(serverinfo.mpsname)+":"+serverinfo.mpsport+'" />')}d+="</div>"}setDialogMode(2,"Add Intel&reg; AMT CIRA device",2,null,d,"fileDownload")}function dlgAddCiraSelClick(){var a=Q("dlgAddCiraSel").value;QV("dlgAddCira0",a==0);QV("dlgAddCira1",a==1);QV("dlgAddCira2",a==2)}function checkEmail(c){var d=c.split("@");var b=((d.length==2)&&(d[0].length>0)&&(d[1].split(".").length>1)&&(d[1].length>2));if(b==true){var e=d[1].split(".");for(var a in e){if(e[a].length==0){b=false}}}return b}function inviteAgentToMesh(b){if(xxdialogMode){return}var a=meshes[b];var c="Invite someone to install the mesh agent. An email with be sent with the link to the mesh agent installation for "+EscapeHtml(a.name)+".<br /><br />";c+=addHtmlValue("Name (optional)",'<input id=agentInviteName value="" style=width:230px maxlength=64 />');c+=addHtmlValue("Email",'<input id=agentInviteEmail style=width:230px placeholder="example@email.com" onkeyup=validateAgentInvite()></input>');c+=addHtmlValue("Operating System","<select id=agentInviteNameOs style=width:236px><option value=0>Any supported</option><option value=1>Windows only</option><option value=3>Apple OSX only</option><option value=2>Linux only</option></select>");c+=addHtmlValue("Installation Type","<select id=agentInviteType style=width:236px><option value=0>Background and interactive</option><option value=2>Background only</option><option value=1>Interactive only</option></select>");c+=addHtmlValue("Message<br />(optional)",'<textarea id=agentInviteMessage value="" style=width:230px;height:100px;resize:none maxlength=1024 /></textarea>');setDialogMode(2,"Invite",3,performAgentInvite,c,b);validateAgentInvite()}function validateAgentInvite(){QE("idx_dlgOkButton",checkEmail(Q("agentInviteEmail").value))}function performAgentInvite(a,b){meshserver.send({action:"inviteAgent",meshid:b,email:Q("agentInviteEmail").value,name:Q("agentInviteName").value,os:Q("agentInviteNameOs").value,flags:Q("agentInviteType").value,msg:Q("agentInviteMessage").value})}function addAgentToMesh(d){if(xxdialogMode){return}var b=meshes[d],j="",a=0;j+=addHtmlValue("Operating System","<select id=aginsSelect onchange=addAgentToMeshClick() style=width:236px><option value=0>Windows</option><option value=1>Linux</option><option value=2>Apple OSX</option><option value=3>Windows (UnInstall)</option><option value=4>Linux (UnInstall)</option></select>");j+="<div id=aginsTypeDiv>";j+=addHtmlValue("Installation Type","<select id=aginsType onchange=addAgentToMeshClick() style=width:236px><option value=0>Background & interactive</option><option value=2>Background only</option><option value=1>Interactive only</option></select>");j+="</div><hr>";var c=b.name;c=c.split("\\").join("").split("/").join("").split(":").join("").split("*").join("").split("?").join("").split('"').join("").split("<").join("").split(">").join("").split("|").join("").split(" ").join("").split("'").join("");j+='<div id=agins_windows>To add a new computer to device group "'+EscapeHtml(b.name)+'", download the mesh agent and install it the computer to manage. This agent has server and mesh information embedded within it.<br /><br />';j+=addHtmlValue("Mesh Agent",'<a id=aginsw32lnk style=cursor:pointer onclick=fileDownload("meshagents?id=3&meshid='+d.split("/")[2]+'&installflags=","MeshAgent-'+c+'.exe",1) title="32bit version of the MeshAgent">Windows (.exe)</a>');j+=addHtmlValue("Mesh Agent",'<a id=aginsw64lnk style=cursor:pointer onclick=fileDownload("meshagents?id=4&meshid='+d.split("/")[2]+'&installflags=","MeshAgent-'+c+'.exe",1) title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');if(debugmode>0){j+=addHtmlValue("Settings File",'<a id=aginswmshlnk href="meshsettings?id='+d.split("/")[2]+'&installflags=0" rel="noreferrer noopener" target="_blank">'+EscapeHtml(b.name)+" settings (.msh)</a>")}j+="</div>";j+="<div id=agins_linux style=display:none>To add a computer to "+EscapeHtml(b.name)+" run the following command. Root credentials will be needed.<br />";j+="<textarea id=agins_linux_area rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>";j+="</div>";j+='<div id=agins_osx style=display:none>To add a new computer to device group "'+EscapeHtml(b.name)+'", download the mesh agent and install it the computer to manage. This agent installer has server and mesh information embedded within it.<br /><br />';j+=addHtmlValue("Mesh Agent",'<a href="meshosxagent?id=16&meshid='+d.split("/")[2]+'" rel="noreferrer noopener" target="_blank" title="64bit version of OSX Mesh Agent">OSX Agent (64bit)</a>');j+="</div>";j+='<div id=agins_windows_un style=display:none>To remove a mesh agent, download the file below, run it and click "uninstall".<br /><br />';j+=addHtmlValue("Mesh Agent",'<a style=cursor:pointer onclick=fileDownload("meshagents?id=3","MeshAgent.exe") title="32bit version of the MeshAgent">Windows (.exe)</a>');j+=addHtmlValue("Mesh Agent",'<a style=cursor:pointer onclick=fileDownload("meshagents?id=4","MeshAgent.exe") title="64bit version of the MeshAgent">Windows x64 (.exe)</a>');j+="</div>";j+="<div id=agins_linux_un style=display:none>To remove a mesh agent, run the following command. Root credentials will be needed.<br />";j+="<textarea id=agins_linux_area_un rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>";j+="</div>";setDialogMode(2,"Add Mesh Agent",2,null,j,"fileDownload");var h=serverinfo.name;if((h.indexOf(".")==-1)||((features&2)!=0)){h=window.location.hostname}var e=((features&8192)!=0)?"--no-proxy ":"";if(serverinfo.https==true){var g=(serverinfo.port==443)?"":(":"+serverinfo.port);Q("agins_linux_area").value="wget https://"+h+g+"/meshagents?script=1 "+e+"--no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+h+g+" '"+d.split("/")[2]+"'\r\n";Q("agins_linux_area_un").value="wget https://"+h+g+"/meshagents?script=1 "+e+"--no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"}else{var g=(serverinfo.port==80)?"":(":"+serverinfo.port);Q("agins_linux_area").value="wget http://"+h+g+"/meshagents?script=1 "+e+"-O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+h+g+" '"+d.split("/")[2]+"'\r\n";Q("agins_linux_area_un").value="wget http://"+h+g+"/meshagents?script=1 "+e+"-O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n"}Q("aginsSelect").focus();addAgentToMeshClick()}function fileDownload(g,d,a){var h=null,c="";if(a==1){c=Q("aginsType").value}else{if(a==2){c=Q("aginsSelect").value;if(parseInt(c)>=5){d=d.toLowerCase()}else{d+=".exe"}}}try{h=new XDomainRequest()}catch(b){}if(!h){h=new XMLHttpRequest()}h.open("GET",window.location.href+g+c);h.timeout=15000;h.responseType="blob";h.onprogress=function(e){};h.onload=function(j){saveAs(new Blob([j.target.response],{type:"application/octet-stream"}),d);if(xxdialogTag=="fileDownload"){setDialogMode(0)}};h.onerror=function(){if(xxdialogTag=="fileDownload"){setDialogMode(0)}alert("Agent downloads timeout.")};h.ontimeout=function(){if(xxdialogTag=="fileDownload"){setDialogMode(0)}alert("Unable to download agent.")};h.send()}function addAgentToMeshClick(){var a=Q("aginsSelect").value;QV("agins_windows",a==0);QV("agins_linux",a==1);QV("agins_osx",a==2);QV("agins_windows_un",a==3);QV("agins_linux_un",a==4);QV("aginsTypeDiv",a==0);if(debugmode>0){Q("aginswmshlnk").href=(Q("aginswmshlnk").href.split("installflags=")[0])+"installflags="+Q("aginsType").value}}function validateDeviceToMesh(){QE("idx_dlgOkButton",(Q("dp1devicename").value.length>0)&&(passwordcheck(Q("dp1password").value)))}function addDeviceToMeshEx(b,d){var a=Q("dp1username").value;if(a==""){a="admin"}var c=Q("dp1hostname").value;if(c==""){c=Q("dp1devicename").value}meshserver.send({action:"addamtdevice",meshid:d,devicename:Q("dp1devicename").value,hostname:c,amtusername:a,amtpassword:Q("dp1password").value,amttls:Q("dp1tls").value})}function deviceHeaderSet(){if(deviceHeaderId==0){deviceHeaderId=1;return}deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+((deviceHeaderTotal==1)?" node":" nodes");deviceHeaderId++;deviceHeaderCount={};deviceHeaderTotal=0}var powerStateStrings=["",'<span title="Device is powered on.">Powered</span>','<span title="Device is in sleep state (S1).">Sleeping</span>','<span title="Device is in sleep state (S2).">Sleeping</span>','<span title="Device is in deep sleep state (S3).">Deep Sleep</span>','<span title="Device is in hibernating state (S4).">Hibernating</span>','<span title="Device is in powered off state (S5).">Soft-Off</span>','<span title="Device is detected but power state could not be obtained.">Present</span>'];var powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"];var powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(a){var b=[];if(a.state>0&&a.state<powerStatetable.length){state.push(powerStatetable[a.state])}if(a.conn){if((a.conn&1)!=0){b.push('<span title="Mesh agent is connected and ready for use.">Agent</span>')}if((a.conn&2)!=0){b.push('<span title="Intel&reg; AMT CIRA is connected and ready for use.">CIRA</span>')}if((a.conn&4)!=0){b.push('<span title="Intel&reg; AMT is routable.">Intel&reg; AMT</span>')}if((a.conn&8)!=0){b.push('<span title="Mesh agent is reachable using another agent as relay.">Relay</span>')}}if((a.pwr!=null)&&(a.pwr!=0)){b.push(powerStateStrings[a.pwr])}return b.join(", ")}function PowerStateStr(a){if(a<powerStatetable.length){return powerStatetable[a]}return""}function PowerStateStr2(a){if((a!=0)&&(a<powerStatetable.length)){return powerStatetable[a]}return"Unknown"}function selectallButtonFunction(){var b=document.getElementsByClassName("DeviceCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked===true){a++}}for(var c=0;c<b.length;c++){b[c].checked=(a==0)}p1updateInfo()}function p1updateInfo(){var b=document.getElementsByClassName("DeviceCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked===true){a++}}if(a>0){QE("GroupActionButton",true);Q("SelectAllButton").value="Select None";QV("cxmgroupsplit",true);QV("cxmdesktop",true)}else{QE("GroupActionButton",false);Q("SelectAllButton").value="Select All";QV("cxmgroupsplit",false);QV("cxmdesktop",false)}}function groupActionFunction(){var a="Select an operation to perform on all selected devices. Actions will be performed only with proper rights.<br /><br />";a+=addHtmlValue("Operation","<select id=d2groupop style=float:right;width:250px><option value=100>Wake-up devices</option><option value=4>Sleep devices</option><option value=3>Reset devices</option><option value=2>Power off devices</option><option value=102>Move to device group</option><option value=101>Delete devices</option></select>");setDialogMode(2,"Group Action",3,groupActionFunctionEx,a)}function getCheckedDevices(){var e=[],b=document.getElementsByClassName("DeviceCheckbox"),a=0;for(var c=0;c<b.length;c++){if(b[c].checked){if(b[c].value){var d=b[c].value.substring(6);if(e.indexOf(d)==-1){e.push(d)}}}}return e}function groupActionFunctionEx(){var a=Q("d2groupop").value;if(a==100){meshserver.send({action:"wakedevices",nodeids:getCheckedDevices()})}else{if(a==101){var b="Confirm delete selected devices(s)?<br /><br />";b+="<label><input id=d2check type=checkbox onchange=d2groupActionFunctionDelEx() />Confirm</label>";setDialogMode(2,"Delete Nodes",3,groupActionFunctionDelEx,b);QE("idx_dlgOkButton",false)}else{if(a==102){p10showChangeGroupDialog(getCheckedDevices())}else{meshserver.send({action:"poweraction",nodeids:getCheckedDevices(),actiontype:a})}}}}function d2groupActionFunctionDelEx(){QE("idx_dlgOkButton",Q("d2check").checked)}function groupActionFunctionDelEx(){meshserver.send({action:"removedevices",nodeids:getCheckedDevices()})}function onSortSelectChange(a){sort=document.getElementById("sortselect").selectedIndex;if(!a){putstore("sort",sort)}}function meshSort(c,d){if(c.meshnamel>d.meshnamel){return 1}if(c.meshnamel<d.meshnamel){return -1}if(c.meshid==d.meshid){if(showRealNames==true){if(c.rnamel>d.rnamel){return 1}if(c.rnamel<d.rnamel){return -1}return 0}else{if(c.namel>d.namel){return 1}if(c.namel<d.namel){return -1}return 0}}return 0}function powerSort(c,e){var d=c.pwr?c.pwr:0;var g=e.pwr?e.pwr:0;if(d>g){return -1}if(d<g){return 1}if(d==g){if(showRealNames==true){if(c.rnamel>e.rnamel){return 1}if(c.rnamel<e.rnamel){return -1}return 0}else{if(c.namel>e.namel){return 1}if(c.namel<e.namel){return -1}return 0}}return 0}function deviceSort(c,d){if(c.namel>d.namel){return 1}if(c.namel<d.namel){return -1}return 0}function deviceHostSort(c,d){if(c.rnamel>d.rnamel){return 1}if(c.rnamel<d.rnamel){return -1}return 0}function onSearchFocus(a){searchFocus=a}function onMapSearchFocus(a){mapSearchFocus=a}function onUserSearchFocus(a){userSearchFocus=a}function onConsoleFocus(a){consoleFocus=a}function onSearchInputChanged(){var h=Q("SearchInput").value.toLowerCase().trim();putstore("search",h);if(h==""){for(var a in nodes){nodes[a].v=true}}else{try{var c=h.split(/\s+/).join("|"),e=new RegExp(c);for(var a in nodes){nodes[a].v=(e.test(nodes[a].name.toLowerCase()))||(nodes[a].rnamel!=null&&e.test(nodes[a].rnamel.toLowerCase()));if((nodes[a].v==false)&&nodes[a].tags){for(var g in nodes[a].tags){if(e.test(nodes[a].tags[g].toLowerCase())){nodes[a].v=true;break}else{nodes[a].v=false}}}}}catch(b){for(var a in nodes){nodes[a].v=true}}}}var contextelement=null;function handleContextMenu(d){hideContextMenu();var m=(window.pageXOffset!==null)?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft;var n=(window.pageYOffset!==null)?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;var c=document.elementFromPoint(d.pageX-m,d.pageY-n);if(c&&c!=null&&c.id=="MxMESH"){contextelement=c;var b=document.getElementById("meshContextMenu");b.style.left=d.pageX+"px";b.style.top=d.pageY+"px";b.style.display="block"}else{while(c&&c!=null&&c.id!="devs"){c=c.parentElement}if(!c||c==null){return true}contextelement=c;var b=document.getElementById("contextMenu");b.style.left=d.pageX+"px";b.style.top=d.pageY+"px";b.style.display="block"}var l=contextelement.children[1].attributes.onclick.value;var k=getNodeFromId(l.substring(12,l.length-18));var g=meshes[k.meshid];var h=g.links["user/"+domain+"/"+userinfo.name.toLowerCase()];var j=h.rights;var a=((j&16)!=0);var o=((j==4294967295)||((j&512)==0));var e=((j==4294967295)||((j&1024)==0));QV("cxdesktop",((g.mtype==1)||(k.agent==null)||(k.agent.caps==null)||((k.agent.caps&1)!=0)||(k.intelamt&&(k.intelamt.state==2)))&&((j&8)||(j&256)));QV("cxterminal",((g.mtype==1)||(k.agent==null)||(k.agent.caps==null)||((k.agent.caps&2)!=0)||(k.intelamt&&(k.intelamt.state==2)))&&(j&8)&&o);QV("cxfiles",((g.mtype==2)&&((k.agent==null)||(k.agent.caps==null)||((k.agent.caps&4)!=0)))&&(j&8)&&e);QV("cxevents",(k.intelamt!=null)&&((k.intelamt.state==2)||(k.conn&2))&&(j&8));QV("cxconsole",(a&&(g.mtype==2)&&((k.agent==null)||(k.agent.caps==null)||((k.agent.caps&8)!=0)))&&(j&8));return haltEvent(d)}function cmaction(a,b){var c=contextelement.children[1].attributes.onclick.value;c=c.substring(12,c.length-18);if(a==7){Q("viewselect").value=3;Q("viewselect").onchange();Q("autoConnectDesktopCheckbox").checked=true;Q("autoConnectDesktopCheckbox").onclick()}if((a>0)&&(a<7)){var d=[0,10,12,11,13,16,15][a];if(b&&(b.shiftKey==true)){window.open(window.location.origin+"?node="+c.split("/")[2]+"&viewmode="+d+"&hide=16","meshcentral:"+c)}else{gotoDevice(c,d)}}}function cmmeshaction(a){var d=contextelement.attributes.onclick.value.substring(32,(32+69));var b=document.getElementsByClassName("DeviceCheckbox");if(a==1){for(var c=0;c<b.length;c++){if((b[c].attributes)&&(b[c].attributes["class"]["value"].substring(0,69)==d)){b[c].checked=true}}}if(a==2){for(var c=0;c<b.length;c++){if((b[c].attributes)&&(b[c].attributes["class"]["value"].substring(0,69)==d)){b[c].checked=false}}}p1updateInfo()}function hideContextMenu(){QV("contextMenu",false);QV("meshContextMenu",false);contextelement=null}var xxmap={map:null,contextmenu:null,activeInteractions:[],showindex:0,markersSource:null,markersLayer:null,mapLayer:null,mapView:null,};function updateMapMarkers(j){if((xxmap!=null)&&(xxmap.map==null)){try{loadmap()}catch(b){console.error("loadmap() exception",b)}}if(xxmap==null){return}var a=null;for(var d in nodes){try{var g=map_parseNodeLoc(nodes[d]),c=xxmap.markersSource.getFeatureById(nodes[d]._id);if((g!=null)&&((nodes[d].meshid==j)||(j==null))){var e=g[0],h=g[1],k=g[2];if(a==null){a=[e,h,e,h,0]}else{if(e<a[0]){a[0]=e}if(h<a[1]){a[1]=h}if(e>a[2]){a[2]=e}if(h>a[3]){a[3]=h}}if(c==null){addFeature(nodes[d]);a[4]=1}else{updateFeature(nodes[d],c);c.setStyle(markerStyle(nodes[d],g[2]))}}else{if(c){xxmap.markersSource.removeFeature(c)}}}catch(b){console.error("updateMapMarkers() exception",b,JSON.stringify(nodes[d]))}}return a}var map_cm_popup=new ol.Overlay({element:Q("xmap-info-window"),positioning:"bottom-center",stopEvent:false});var map_cm_editMarker={text:"Modify node location",callback:function(a){modifyMarkerloc(a.data)}};var map_cm_clearMarker={text:"Remove node location",callback:function(a){meshserver.send({action:"changedevice",nodeid:a.data.a,userloc:[]})}};var map_cm_saveMarker={text:"Save node location",callback:function(a){saveMarkerloc(a.data)}};var map_cm_nodemenu_items=[{text:"General information",callback:function(a){if(a.data!=null){gotoDevice(a.data,10)}}},{text:"Desktop",callback:function(a){if(a.data!=null){gotoDevice(a.data,11)}}},{text:"Terminal",callback:function(a){if(a.data!=null){gotoDevice(a.data,12)}}},{text:"Intel&reg; AMT",callback:function(a){if(a.data!=null){gotoDevice(a.data,14)}}},"-",{text:"Zoom-in to extent",callback:function(b){var a=b.data.getGeometry().getCoordinates();zoomToLocation(a,19)}},{text:"Zoom-out to extent",callback:function(b){var a=b.data.getGeometry().getCoordinates();zoomToLocation(a,2)}}];var contextmenu_items=[{text:"Refresh",callback:function(){refreshMap(true,true)}},{text:"Zoom to fit extent",callback:function(){zoomToFitExtent()}},{text:"Center map here",callback:function(a){xxmap.mapView.animate({center:a.coordinate})}},{text:"Place node here",callback:function(a){placeNode(a.coordinate)}}];function stringToIntHash(c){var a=0,b;for(b=0;b<c.length;b++){a=((a<<5)-a)+c.charCodeAt(b);a|=0}return a}function map_parseNodeLoc(b){var a=null,c=0;if(b.iploc){a=b.iploc;c=1}if(b.wifiloc){a=b.wifiloc;c=2}if(b.gpsloc){a=b.gpsloc;c=3}if(b.userloc){a=b.userloc;c=4}if((a==null)||(typeof a!="string")){return null}a=a.split(",");if(c==1){return[parseFloat(a[0])+(stringToIntHash(b._id.substring(0,20))/100000000000),parseFloat(a[1])+(stringToIntHash(b._id.substring(20))/100000000000),c]}else{return[parseFloat(a[0]),parseFloat(a[1]),c]}}function loadmap(){if(xxmap==null){return}if((features&32768)==0){QV("viewselectmapoption",false);QV("devViewButton4",false);xxmap=null;return}try{xxmap.markersSource=new ol.source.Vector();xxmap.markersLayer=new ol.layer.Vector({source:xxmap.markersSource});xxmap.mapLayer=new ol.layer.Tile({source:new ol.source.OSM()});xxmap.mapView=new ol.View({center:ol.proj.transform([0,0],"EPSG:4326","EPSG:3857"),zoom:2,minZoom:2,maxZoom:20,extent:ol.proj.transformExtent([-100000,-69.55,100000,69.55],"EPSG:4326","EPSG:3857")});xxmap.map=new ol.Map({target:"xdevicesmap",layers:[xxmap.mapLayer,xxmap.markersLayer],view:xxmap.mapView});xxmap.map.addOverlay(map_cm_popup);xxmap.map.on("click",function(c){var d=xxmap.map.forEachFeatureAtPixel(c.pixel,function(h,j){return h});if(d){var g=d.getId();if(g!=null){gotoDevice(g,10)}else{var e=getCorrespondingFeature(d);gotoDevice(e.getId(),10)}}});xxmap.map.on("pointermove",function(d){var g=xxmap.map.forEachFeatureAtPixel(d.pixel,function(j,k){return j});if(g){xxmap.map.getTargetElement().style.cursor="pointer";var c=g.getGeometry().getCoordinates();map_cm_popup.setPosition(c);var e=g.getId();if(e){QH("xmap-info-window",g.get("name"))}else{var h=getCorrespondingFeature(g);QH("xmap-info-window",h.get("name"))}}else{xxmap.map.getTargetElement().style.cursor="";QH("xmap-info-window","")}});var a=new ContextMenu({width:160,defaultItems:false,items:contextmenu_items});a.on("open",function(c){var e=xxmap.map.forEachFeatureAtPixel(c.pixel,function(h,j){return h});xxmap.contextmenu.clear();if(e){var d=e.getId();if(d){addContextMenuItems(e)}else{var g=getCorrespondingFeature(e);if(g){addContextMenuItems(g)}else{xxmap.contextmenu.extend(contextmenu_items)}}}else{xxmap.contextmenu.extend(contextmenu_items)}});if(xxmap.contextmenu==null){xxmap.contextmenu=a}xxmap.map.addControl(xxmap.contextmenu)}catch(b){console.log(b);QV("viewselectmapoption",false);QV("devViewButton4",false);xxmap=null}}function addFeature(g,c,e){var a=getModifiedFeature(g._id);if(a){xxmap.markersSource.addFeature(a)}else{if(!c&&!e){var d=map_parseNodeLoc(g);c=d[0];e=d[1]}if(e>180){e=180-e;meshserver.send({action:"changedevice",nodeid:g._id,userloc:[c,e]})}if((c<90)&&(c>-90)&&(e<180)&&(e>-180)){var b=new ol.Feature({geometry:new ol.geom.Point(ol.proj.transform([e,c],"EPSG:4326","EPSG:3857")),name:g.name,status:g.conn,lat:c,lon:e});b.setId(g._id);b.setStyle(markerStyle(g));xxmap.markersSource.addFeature(b)}}}function removeFeature(b){var a=xxmap.markersSource.getFeatureById(b._id);if(a){xxmap.markersSource.removeFeature(a)}}function updateFeature(g,a){if(g.conn!=a.get("status")){a.set("status",g.conn);a.setStyle(markerStyle(g))}var c=map_parseNodeLoc(g);if(c!=null){var b=c[0],d=c[1];if((b!=a.get("lat"))||(d!=a.get("lon"))){a.set("lat",b);a.set("lon",d);var e=ol.proj.transform([parseFloat(d),parseFloat(b)],"EPSG:4326","EPSG:3857");a.getGeometry().setCoordinates(e)}}if(g.name!=a.get("name")){a.set("name",g.name)}}function modifyMarkerloc(c){var b=c.getId();if(b){c.setStyle(markerStyle(getNodeFromId(c.a),4));if(!getActiveInteractions(c)){var a=new ol.interaction.Modify({features:new ol.Collection([c]),pixelTolerance:10});xxmap.activeInteractions.push({featureid:b,feature:c,interaction:a});xxmap.map.addInteraction(a)}}}function saveMarkerloc(d){var c=d.getId();if(c){var a=getActiveInteractions(d);if(a){xxmap.map.removeInteraction(a);removeInteraction(c);var b=d.getGeometry().getCoordinates();var e=ol.proj.transform(b,"EPSG:3857","EPSG:4326");if(e[0]>180){e[0]=180-e[0]}var g=[e[1],e[0]];meshserver.send({action:"changedevice",nodeid:c,userloc:g})}}}function markerStyle(b,d){if(d==null){d=0;if(b.iploc){d=1}if(b.wifiloc){d=2}if(b.gpsloc){d=3}if(b.userloc){d=4}}var e=["","-ip","-wifi","-gps","-user"];var a=connStateColor(b);var c=new ol.style.Style({image:new ol.style.Icon({color:a,anchor:[0.5,1],src:"images/mapmarker"+e[d]+".png"})});return[c]}function connStateColor(a){if(a.conn==1||a.conn==3||a.conn==5){return"#00ffdd"}return"#C70039"}function addContextMenuItems(a){if(getActiveInteractions(a)){map_cm_saveMarker.data=a;xxmap.contextmenu.push(map_cm_saveMarker)}else{map_cm_editMarker.data=a;xxmap.contextmenu.push(map_cm_editMarker);var b=getNodeFromId(a.a);if(b.userloc){map_cm_clearMarker.data=a;xxmap.contextmenu.push(map_cm_clearMarker)}}map_cm_nodemenu_items.forEach(function(c){if(c.text=="Zoom-in to extent"||c.text=="Zoom-out to extent"){c.data=a}else{if(c!="-"){c.data=a.getId()}}});xxmap.contextmenu.extend(map_cm_nodemenu_items)}function getActiveInteractions(b){var a=b.getId();for(var c=0;c<xxmap.activeInteractions.length;c++){if(xxmap.activeInteractions[c].featureid==a){return xxmap.activeInteractions[c].interaction}}return false}function getModifiedFeature(a){if(a){for(var b=0;b<xxmap.activeInteractions.length;b++){if(xxmap.activeInteractions[b].featureid==a){return xxmap.activeInteractions[b].feature}}}return null}function removeInteraction(a){var c=-1;for(var b=0;b<xxmap.activeInteractions.length;b++){if(xxmap.activeInteractions[b].featureid===a){c=b;break}}if(c>=0){xxmap.activeInteractions.splice(c,1)}}function getCorrespondingFeature(e){var d=e.getGeometry().getCoordinates();for(var b=0;b<xxmap.activeInteractions.length;b++){var c=xxmap.activeInteractions[b].feature;var a=c.getGeometry().getCoordinates();if(a[0].toFixed(5)==d[0].toFixed(5)&&a[1].toFixed(5)==d[1].toFixed(5)){return c}}return null}function refreshMap(k,h){if(k){xxmap.map.setTarget(null);xxmap.map=null;xxmap.markersSource=null;xxmap.mapView=null;xxmap.mapLayer=null;xxmap.activeInteractions=[]}var a=updateMapMarkers();if((a!=null)&&(h||(a[4]==1))){var b=(a[0]+a[2])/2;var c=(a[1]+a[3])/2;var d=Math.max(Math.abs(a[0]-a[2]),Math.abs(a[1]-a[3]));var l=xxmap.map.getView();l.setCenter(ol.proj.transform([c,b],"EPSG:4326","EPSG:3857"));var e=360,g=-2;while(e>d){g++;e=e/2}l.setZoom(g)}}function placeNode(a){if(xxdialogMode){return}var c='<div style=margin-bottom:6px><label for=selectnode-search>Search</label>&nbsp&nbsp<input type=text placeholder="Device name" id="selectnode-search" onchange=onPlaceNodeInputChange() onkeyup=onPlaceNodeInputChange() autocomplete=off style=width:120px></div><div id=placenode style="height:254px;overflow-y:auto;width:100%;margin:12px 1px 4px 1px;"><div id=noNodesMapPlace style=text-align:center;width:100%;display:none>No devices found.</div>';for(var b in nodes){c+="<div class=noselect id="+nodes[b]._id+"-rowid onclick=selectNodeToPlace(event,'"+nodes[b]._id+"') style=background-color:lightgray;margin-bottom:4px;border-radius:2px><input name=PlaceMapDeviceCheckbox id="+nodes[b]._id+"-checkid type=checkbox style=width:16px;display:inline />";c+="<div class=j"+nodes[b].icon+" style=width:16px;height:16px;margin-top:2px;margin-right:4px;display:inline-block></div><div style=width:16px;display:inline>"+nodes[b].name+"</div></div>"}setDialogMode(2,"Select a node to place",3,placeNodeEx,c+"</div>",a);onPlaceNodeInputChange()}function placeNodeEx(b,c){var d=document.getElementsByName("PlaceMapDeviceCheckbox");for(var g in d){if(d[g].checked){var h=getNodeFromId(d[g].id.substring(0,d[g].id.length-8));if(h){var e=xxmap.markersSource.getFeatureById(g);var j=ol.proj.transform(c,"EPSG:3857","EPSG:4326");var k=[j[1],j[0]];if(e){e.getGeometry().setCoordinates(c);var a=getActiveInteractions(e);if(a){saveMarkerloc(e)}else{meshserver.send({action:"changedevice",nodeid:h._id,userloc:k})}}else{meshserver.send({action:"changedevice",nodeid:h._id,userloc:k})}}}}}function onPlaceNodeInputChange(){updatePlaceNodeTable(Q("selectnode-search").value.trim().toLowerCase())}function updatePlaceNodeTable(d){var b=document.getElementsByName("PlaceMapDeviceCheckbox"),a=0;for(var c in nodes){var e=((nodes[c].namel.indexOf(d)>=0||d=="")||(nodes[c].rnamel!=null&&nodes[c].rnamel.indexOf(d)>=0));if(e){a++}QV(nodes[c]._id+"-rowid",e)}QV("noNodesMapPlace",a==0)}function selectNodeToPlace(b,g){if(b.target.name!="PlaceMapDeviceCheckbox"){var h=Q(g+"-checkid");h.checked=!h.checked}var c=document.getElementsByName("PlaceMapDeviceCheckbox"),a=0;for(var d in c){if(c[d].checked){a++}}QE("idx_dlgOkButton",a>0)}function addMeshOptions(a,b){}function meshOptionRmvMod(a,b){}function meshExists(){for(var a in meshes){if(meshes[a]){return true}}return false}function setMeshView(a){var c=Q("select-mesh");var b=c.selectedIndex;if(c[b].value==a){c[0].selected=true;onSelectMeshChange()}}function clearMeshOptions(){}function getSearchLocation(){try{var b=Q("mapSearchLocation").value.trim();if(b.length>0){var c=new XMLHttpRequest();c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){formatSearchData(c.responseText)}};c.open("GET","https://nominatim.openstreetmap.org/search?q="+b+"&format=json",true);c.send()}}catch(a){}}function formatSearchData(c){try{QH("xmapSearchResults","");var d=JSON.parse(c),b=0,k='<div style="overflow-y:auto;width:100%;max-height:240px">';for(var j=0;j<d.length;j++){if(d[j].display_name&&d[j].boundingbox[0]&&d[j].boundingbox[1]&&d[j].boundingbox[2]&&d[j].boundingbox[3]){b++;var a=(j%2==0)?"F5F5F5":"EBEBEB";k+="<div style=cursor:pointer;padding:5px;background-color:#"+a+" onclick=mapGotoSelectedLocation(this)><div>"+d[j].display_name+"</div><div style=display:none>"+d[j].boundingbox[0]+"!#!"+d[j].boundingbox[1]+"!#!"+d[j].boundingbox[2]+"!#!"+d[j].boundingbox[3]+"</div></div>"}}k+="</div>";if(b==1){var h=[parseFloat(d[0].boundingbox[2]),parseFloat(d[0].boundingbox[0]),parseFloat(d[0].boundingbox[3]),parseFloat(d[0].boundingbox[1])];zoomToExtent(h)}else{if(b==0){k="<div style=width:200px>No location found.<div>"}QV("xmapSearchResultsDlg",true)}QH("xmapSearchResults",k)}catch(g){}}function mapGotoSelectedLocation(c){var d=c.children;var a=d[1].innerHTML.split("!#!");var b=[parseFloat(a[2]),parseFloat(a[0]),parseFloat(a[3]),parseFloat(a[1])];zoomToExtent(b);mapCloseSearchWindow()}function mapCloseSearchWindow(){QH("xmapSearchResults","");QV("xmapSearchResultsDlg",false)}function zoomToLocation(a,c){var b=xxmap.map.getView();b.setCenter(a);b.setZoom(c)}function zoomToFitExtent(){var b=xxmap.markersSource.getFeatures();if(b.length>0){var a=xxmap.markersSource.getExtent();xxmap.map.getView().fit(a,xxmap.map.getSize())}}function zoomToExtent(b){var a=ol.proj.transformExtent(b,ol.proj.get("EPSG:4326"),ol.proj.get("EPSG:3857"));xxmap.map.getView().fit(a,xxmap.map.getSize())}function refreshDevice(a){if(!currentNode||currentNode._id!=a){return}gotoDevice(a,xxcurrentView,true)}function getNodeRights(c){var b=getNodeFromId(c),a=meshes[b.meshid];return a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights}var currentNode;var powerTimelineNode=null;var powerTimelineReq=null;var powerTimelineUpdate=null;var powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(r,t,w,j){if((userinfo.emailVerified!==true)&&(serverinfo.emailcheck==true)&&(userinfo.siteadmin!=4294967295)){setDialogMode(2,"New Device Group",1,null,'Unable to create a new device group until a email address is verified. This is required for password recovery. Go to the "My Account" tab to change and verify an email address.');return}if(j&&(j.shiftKey==true)){window.open(window.location.origin+"?node="+r.split("/")[2]+"&viewmode=10&hide=16","meshcentral:"+r);return}var q=getNodeFromId(r);var n=meshes[q.meshid];var o=n.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if(!currentNode||currentNode._id!=q._id||w==true){currentNode=q;var p=EscapeHtml(q.name);if(p.length==0){p="<i>None</i>"}if((o&4)!=0){p='<span title="Click here to edit the server-side device name" onclick=showEditNodeValueDialog(0) style=cursor:pointer>'+p+' <img class=hoverButton width=10 height=10 src="images/link5.png" /></span>'}QH("p10deviceName",p);QH("p11deviceName",p);QH("p12deviceName",p);QH("p13deviceName",p);QH("p14deviceName",p);QH("p15deviceName","Console - "+p);QH("p16deviceName",p);var B="<table style=width:100%>";B+=addDeviceAttribute('<span title="The name of the device group this computer belong to.">Group</span>','<a title="The name of the device group this computer belong to" onclick=gotoMesh("'+q.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[q.meshid].name)+"</a>");if((q.rname!=null)&&(q.name!=q.rname)){B+=addDeviceAttribute('<span title="The name of this computer as set in the operating system">Name</span>','<span title="The name of this computer as set in the operating system">'+EscapeHtml(q.rname)+"</span>")}if((features&1)==0){if((o&4)!=0){if(q.host){B+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(q.host)+"</span>")}else{B+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>None</i></span>")}}else{B+=addDeviceAttribute("Hostname",EscapeHtml(q.host))}}var h=q.desc?EscapeHtml(q.desc):"<i>None</i>";if((o&4)!=0){B+=addDeviceAttribute("Description","<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+h+' <img class=hoverButton width=10 height=10 src="images/link5.png" /></span>')}else{B+=addDeviceAttribute("Description",h)}var a=["Unknown","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","OSX 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","OSX 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l"];if((q.agent!=null)&&(q.agent.id!=null)&&(q.agent.ver!=null)){var y="";if(q.agent.id<=a.length){y=a[q.agent.id]}else{y=a[0]}if(q.agent.ver!=0){y+=" v"+q.agent.ver}B+=addDeviceAttribute("Mesh Agent",y)}if(q.intelamt!=null){var y="";var v={0:"Not Activated (Pre)",1:"Not Activated (In)",2:"Activated"};if(q.intelamt.ver!=null&&q.intelamt.state==null){y+="<i>Unknown State</i>, v"+q.intelamt.ver}else{if((q.intelamt.ver==null)&&(q.intelamt.state==2)){y+="<i>Activated</i>"}else{if((q.intelamt.ver==null)||(q.intelamt.state==null)){y+="<i>Unknown Version & State</i>"}else{y+=v[q.intelamt.state];if((q.intelamt.state==2)&&q.intelamt.flags){if(q.intelamt.flags&2){y+=' <span title="Intel AMT is activated in Client Control Mode">CCM</span>'}else{if(q.intelamt.flags&4){y+=' <span title="Intel AMT is activated in Admin Control Mode">ACM</span>'}}}y+=(", v"+q.intelamt.ver)}}}if(q.intelamt.tls==1){y+=', <span title="Intel AMT is setup with TLS network security">TLS</span>'}if(q.intelamt.state==2){if(q.intelamt.user==null||q.intelamt.user==""){if((o&4)!=0){y+=', <i style=color:#FF0000;cursor:pointer title="Edit Intel&reg; AMT credentials" onclick=editDeviceAmtSettings("'+q._id+'")>No Credentials</i>'}else{y+=", <i style=color:#FF0000>No Credentials</i>"}}y+=" ";if((o&4)!=0){y+='<img src=images/link4.png height=10 width=10 title="Edit Intel&reg; AMT credentials" style=cursor:pointer onclick=editDeviceAmtSettings("'+q._id+'")>'}}B+=addDeviceAttribute("Intel&reg; AMT",y)}if((q.agent!=null)&&(q.agent.tag!=null)&&(q.agent.tag!="mailto:")){var z=EscapeHtml(q.agent.tag);if(z.startsWith("mailto:")){z='<a href="'+z+'">'+z.substring(7)+"</a>"}B+=addDeviceAttribute("Agent Tag",z)}if(q.osdesc){B+=addDeviceAttribute("Operating System",q.osdesc)}if(q.users&&q.conn&&(q.users.length>0)&&(q.conn&1)){B+=addDeviceAttribute("Active User"+((q.users.length>1)?"s":""),q.users.join(", "))}var d=q.conn;if(d&&d>1){var g=[];if((q.conn&1)!=0){g.push('<span title="Mesh agent is connected and ready for use.">Mesh Agent</span>')}if((q.conn&2)!=0){g.push('<span title="Intel&reg; AMT CIRA is connected and ready for use.">Intel&reg; AMT CIRA</span>')}if((q.conn&4)!=0){g.push('<span title="Intel&reg; AMT is routable and ready for use.">Intel&reg; AMT</span>')}if((q.conn&8)!=0){g.push('<span title="Mesh agent is reachable using another agent as relay.">Mesh Relay</span>')}B+=addDeviceAttribute("Connectivity",g.join(", "))}var l="<i>None</i>";if(q.tags!=null){l="";for(var m in q.tags){l+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+q.tags[m]+"</span>"}}B+=addDeviceAttribute("Tags","<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+l+' <img class=hoverButton width=10 height=10 src="images/link5.png" /></span>');B+="</table><br />";if((o&76)!=0){B+='<input type=button value=Actions title="Perform power actions on the device" onclick=deviceActionFunction() />'}B+='<input type=button value=Notes title="View notes about this device" onclick=showNotes('+((o&128)==0)+',"'+encodeURIComponent(q._id)+'") />';QH("p10html",B);masterUpdate(256);B="<div style=float:right;font-size:x-small>";if((o&4)!=0){B+='&nbsp;<a style=cursor:pointer onclick=p10showChangeGroupDialog(["'+q._id+'"]) title="Move this device to a different device group">Change Group</a>';B+='&nbsp;<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+q._id+'") title="Remove this device">Delete Device</a>'}B+="</div><div style=font-size:x-small>";if(n.mtype==2){B+='<a style=cursor:pointer onclick=p10showNodeNetInfoDialog("'+q._id+'") title="Show device network interface information">Interfaces</a>&nbsp;'}if(xxmap!=null){B+='<a style=cursor:pointer onclick=p10showNodeLocationDialog("'+q._id+'") title="Show device locations information">Location</a>&nbsp;'}if(((o&8)!=0)&&(n.mtype==2)){B+='<a style=cursor:pointer onclick=p10showMeshCmdDialog(1,"'+q._id+'") title="Traffic router used to connect to a device thru this server.">Router</a>&nbsp;'}if(((d&1)!=0)&&(clickOnce==true)&&(n.mtype==2)&&((o&8)!=0)){if((q.agent.id>0)&&(q.agent.id<5)){B+='<a style=cursor:pointer onclick=p10clickOnce("'+q._id+'","RDP2",3389) title="Requires Microsoft ClickOnce support in your browser.">RDP</a>&nbsp;'}if(q.agent.id>4){B+='<a style=cursor:pointer onclick=p10clickOnce("'+q._id+'","PSSH",22) title="Requires Microsoft ClickOnce support in your browser.">Putty</a>&nbsp;';B+='<a style=cursor:pointer onclick=p10clickOnce("'+q._id+'","WSCP",22) title="Requires Microsoft ClickOnce support in your browser.">WinSCP</a>&nbsp;'}}B+="</div><br>";QH("p10html3",B);var u=PowerStateStr(q.state);if((d&1)!=0){if(u.length>0){u+="<br/>"}u+='<span style=font-size:12px title="Agent connected">Agent connected</span>'}if((d&2)!=0){if(u.length>0){u+="<br/>"}u+='<span style=font-size:12px title="Intel&reg; AMT connected">Intel&reg; AMT connected</span>'}if((d&4)!=0){if(u.length>0){u+="<br/>"}u+='<span style=font-size:12px title="Intel&reg; AMT detected">Intel&reg; AMT detected</span>'}if((u=="")&&q.lastconnect){u="<span style=font-size:12px>Last seen:<br />"+new Date(q.lastconnect).toLocaleDateString()+", "+new Date(q.lastconnect).toLocaleTimeString()+"</span>"}QH("MainComputerState",u);Q("MainComputerImage").setAttribute("src","images/icons200-"+q.icon+"-1.jpg");Q("MainComputerImage").className=((!q.conn)||(q.conn==0)?"gray":"");var A=((o==4294967295)||((o&512)==0));var k=((o==4294967295)||((o&1024)==0));var b=((o==4294967295)||((o&2048)==0));if(A){setupTerminal()}if(k){setupFiles()}var e=((o&16)!=0);if(e){setupConsole()}else{if(t==15){t=10}}QV("MainDevDesktop",((n.mtype==1)||(q.agent==null)||(q.agent.caps==null)||((q.agent.caps&1)!=0)||(q.intelamt&&(q.intelamt.state==2)))&&((o&8)||(o&256)));QV("MainDevTerminal",((n.mtype==1)||(q.agent==null)||(q.agent.caps==null)||((q.agent.caps&2)!=0)||(q.intelamt&&(q.intelamt.state==2)))&&(o&8)&&A);QV("MainDevFiles",((n.mtype==2)&&((q.agent==null)||(q.agent.caps==null)||((q.agent.caps&4)!=0)))&&(o&8)&&k);QV("MainDevAmt",(q.intelamt!=null)&&((q.intelamt.state==2)||(q.conn&2))&&(o&8)&&b);QV("MainDevConsole",(e&&(n.mtype==2)&&((q.agent==null)||(q.agent.caps==null)||((q.agent.caps&8)!=0)))&&(o&8));QV("p15uploadCore",(q.agent!=null)&&(q.agent.caps!=null)&&((q.agent.caps&16)!=0));QH("p15coreName",((q.agent!=null)&&(q.agent.core!=null))?q.agent.core:"");var c=Q("p14iframe").contentWindow.getCurrentMeshNode();if((c!=null)&&(c._id!=currentNode._id)){Q("p14iframe").contentWindow.disconnect()}var s=((q.conn&6)!=0)?true:false;Q("p14iframe").contentWindow.setConnectionState(s);Q("p14iframe").contentWindow.setFrameHeight("650px");Q("p14iframe").contentWindow.setAuthCallback(updateAmtCredentials);QV("deskActionsBtn",(o&72)!=0);QV("termActionsBtn",(o&72)!=0);QV("filesActionsBtn",(o&72)!=0);if((powerTimelineNode!=currentNode._id)&&(powerTimelineReq!=currentNode._id)){QH("p10html2","");powerTimelineReq=currentNode._id;meshserver.send({action:"powertimeline",nodeid:currentNode._id});meshserver.send({action:"lastconnect",nodeid:currentNode._id})}QV("DeskTools",false);showDeskToolsProcesses();refreshDeviceEvents();if((currentNode)&&(xxcurrentView>=10)&&(xxcurrentView<20)){document.title="MeshCentral - "+currentNode.name}else{document.title="MeshCentral"}}setupDesktop();if(!t){t=10}go(t)}function showNotes(b,a){if(xxdialogMode){return}setDialogMode(2,"Notes",2,showNotesEx,"<textarea id=d2devNotes ro="+b+" noteid="+a+" readonly style=background-color:#fcf3cf;width:100%;height:200px;resize:none;overflow-y:scroll></textarea><span style=font-size:10px>Notes can be viewed and changed by other administrators.<span>",a);meshserver.send({action:"getNotes",id:decodeURIComponent(a)})}function showNotesEx(a,b){meshserver.send({action:"setNotes",id:decodeURIComponent(b),notes:encodeURIComponent(Q("d2devNotes").value)})}function deviceChat(){if(xxdialogMode){return}var a="/messenger?id=meshmessenger/"+encodeURIComponent(currentNode._id)+"/"+encodeURIComponent(userinfo._id)+"&title="+currentNode.name;if((authCookie!=null)&&(authCookie!="")){a+="&auth="+authCookie}window.open(a,"meshmessenger:"+currentNode._id);meshserver.send({action:"meshmessenger",nodeid:decodeURIComponent(currentNode._id)})}function deviceUrlFunction(){if(xxdialogMode){return}setDialogMode(2,"Open Page on Device",3,deviceUrlFunctionEx,'<input id=d2devurl placeholder="http://server.com" style=width:100%;overflow-y:scroll></input>')}function deviceUrlFunctionEx(){meshserver.send({action:"msg",type:"openUrl",nodeid:currentNode._id,url:Q("d2devurl").value})}function deviceToastFunction(){if(xxdialogMode){return}setDialogMode(2,"Device Notification",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function deviceActionFunction(){if(xxdialogMode){return}var a=meshes[currentNode.meshid].links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;var b="Select an operation to perform on this device.<br /><br />";var c="<select id=d2deviceop style=float:right;width:250px>";if((a&64)!=0){c+="<option value=100>Wake-up</option>"}if((a&8)!=0){c+="<option value=4>Sleep</option><option value=3>Reset</option><option value=2>Power off</option>"}c+="</select>";b+=addHtmlValue("Operation",c);setDialogMode(2,"Device Action",3,deviceActionFunctionEx,b)}function deviceActionFunctionEx(){var a=Q("d2deviceop").value;if(a==100){meshserver.send({action:"wakedevices",nodeids:[currentNode._id]})}else{meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:a})}}function updateAmtCredentials(a){var b=getNodeFromId(currentNode._id);if((a==true)||(b.intelamt.user==null)||(b.intelamt.user=="")){editDeviceAmtSettings(currentNode._id,updateAmtCredentialsEx)}else{Q("p14iframe").contentWindow.connectButtonfunctionEx()}}function updateAmtCredentialsEx(a,b){Q("p14iframe").contentWindow.connectButtonfunctionEx()}function updateDeviceTimeline(){if((meshserver.State!=2)||(powerTimelineNode==null)||(powerTimelineUpdate==null)||(currentNode==null)){return}if((powerTimelineNode==powerTimelineReq)&&(currentNode._id==powerTimelineNode)&&(powerTimelineUpdate<Date.now())){powerTimelineUpdate=null;meshserver.send({action:"powertimeline",nodeid:currentNode._id});meshserver.send({action:"lastconnect",nodeid:currentNode._id})}}function drawDeviceTimeline(){if((currentNode==null)||(xxcurrentView<10)||(xxcurrentView>19)){return}var s=null,o=Date.now();if(currentNode._id==powerTimelineNode){s=powerTimeline}var e=new Date();e.setHours(0,0,0,0);e=new Date(e.getTime()-(1000*60*60*24*6));var u=e.getTime();var t=[];if(s!=null&&s.length>1){t.push([0,s[1],s[0]]);var c=s[1];for(var m=2;m<s.length;m+=2){var p=s[m],k=o;if(s.length>(m+1)){k=s[m+1]}t.push([c,c+k,p]);c=c+k}}var A="",b=1,h=new Date();var w=Q("masthead").offsetWidth-(160+9+9+14);h.setHours(0,0,0,0);for(var m=0;m<7;m++){var g="",q=h.getTime(),l=q+(1000*60*60*24);for(var n in t){var a=t[n];if(isTimeBlockInside(q,l,a[0],a[1])==true){var y=Math.max(q,a[0]);var r=Math.min(Math.min(l,a[1]),o);var z=Math.round(((r-y)*w)/86400000);if(z>0){var v=powerStateStrings2[a[2]]+" from "+new Date(y).toLocaleTimeString()+" to "+new Date(r).toLocaleTimeString()+".";g+='<div title="'+v+'" style=display:table-cell;width:'+z+"px;background-color:"+powerColor(a[2])+";height:16px></div>"}}}A+="<tr style="+(((b%2)==0)?"background-color:#DDD":"")+"><td><div>&nbsp;"+h.toLocaleDateString()+"<div></div></div></td><td><div>"+g+"</div></td></tr>";++b;h=new Date(h.getTime()-(1000*60*60*24))}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:150px>Day</th><th scope=col style=text-align:center>7 Day Power State</th></tr>'+A+"</tbody></table>")}function powerColor(a){if(a<powerColorTable.length){return powerColorTable[a]}return"yellow"}function isTimeBlockInside(d,c,b,a){if((b<d)&&(a>c)){return true}if((b>d)&&(b<c)){return true}if((a>d)&&(a<c)){return true}return false}function addDeviceAttribute(a,b){return"<tr><td class=style7 style=width:180px>"+a+"</td><td class=style9 style=max-width:400px;overflow:hidden>"+b+"</td></tr>"}function editDeviceAmtSettings(e,b){if(xxdialogMode){return}var g="",d=getNodeFromId(e),a=3,c=getNodeRights(e);if((c&4)==0){return}g+=addHtmlValue("Username",'<input id=dp10username style=width:230px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');g+=addHtmlValue("Password","<input id=dp10password type=password style=width:230px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />");g+=addHtmlValue("Security","<select id=dp10tls style=width:236px><option value=0>No TLS security</option><option value=1>TLS security required</option></select>");if((d.intelamt.user!=null)&&(d.intelamt.user!="")){a=7}setDialogMode(2,"Edit Intel&reg; AMT credentials",a,editDeviceAmtSettingsEx,g,{node:d,func:b});if((d.intelamt.user!=null)&&(d.intelamt.user!="")){Q("dp10username").value=d.intelamt.user}else{Q("dp10username").value="admin"}Q("dp10tls").value=d.intelamt.tls;validateDeviceAmtSettings()}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(c,d){if(c==2){meshserver.send({action:"changedevice",nodeid:d.node._id,intelamt:{user:"",pass:""}})}else{var b=Q("dp10username").value;if(b==""){b="admin"}var a=Q("dp10password").value;if(a==""){b=""}meshserver.send({action:"changedevice",nodeid:d.node._id,intelamt:{user:b,pass:a,tls:Q("dp10tls").value}});d.node.intelamt.user=b;d.node.intelamt.tls=Q("dp10tls").value;if(d.func){setTimeout(d.func,300)}}}function p10showChangeGroupDialog(e){if(xxdialogMode){return}var g=null;if(e.length==1){try{g=meshes[getNodeFromId(e[0])]._id}catch(b){}}var j="<select id=p10newGroup style=width:236px>",a=0;for(var c in meshes){var d=meshes[c].links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((meshes[c]._id!=g)&&(d&4)){a++;j+="<option value='"+meshes[c]._id+"'>"+meshes[c].name+"</option>"}}j+="</select>";if(a>0){var h=(e.length==1)?"Select a new group for this device<br /><br />":"Select a new group for selected devices<br /><br />";h+=addHtmlValue("New Device Group",j);setDialogMode(2,"Change Group",3,p10showChangeGroupDialogEx,h,e)}else{setDialogMode(2,"Change Group",1,null,"No other device group of same type exists.")}}function p10showChangeGroupDialogEx(a,c){meshserver.send({action:"changeDeviceMesh",nodeids:c,meshid:Q("p10newGroup").value})}function p10showDeleteNodeDialog(a){if(xxdialogMode){return}var b='Are you sure you want to delete node "'+EscapeHtml(currentNode.name)+'"?<br /><br />';b+="<label><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm</label>";setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,b,a);p10validateDeleteNodeDialog()}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(a,b){meshserver.send({action:"removedevices",nodeids:[b]})}function p10clickOnce(a,c,b){meshserver.send({action:"getcookie",nodeid:a,tcpport:b,tag:"clickonce",protocol:c})}var d2map=null;function p10showNodeLocationDialog(){if((xxdialogMode!=null)&&(xxdialogTag=="@xxmap")){setDialogMode(0)}else{if(xxdialogMode){return}}var m=[],n=["iploc","wifiloc","gpsloc","userloc"],a=null;for(var k in n){if(currentNode[n[k]]!=null){var j=currentNode[n[k]].split(","),h=parseFloat(j[0]),l=parseFloat(j[1]);if((h<90)&&(h>-90)&&(l<180)&&(l>-180)){var e=new ol.Feature({geometry:new ol.geom.Point(ol.proj.fromLonLat([l,h]))});e.setStyle(markerStyle(currentNode,parseInt(k)+1));m.push(e);if(a==null){a=[h,l,h,l,0]}else{if(h<a[0]){a[0]=h}if(l<a[1]){a[1]=l}if(h>a[2]){a[2]=h}if(l>a[3]){a[3]=l}}}}}var p=new ol.source.Vector({features:m});var o=new ol.layer.Vector({source:p});var q="<div id=d2map style=width:100%;height:300px></div>";setDialogMode(2,"Device Location",1,null,q,"@xxmap");var c=0,b=0,r=8;if(a!=null){var b=(a[0]+a[2])/2;var c=(a[1]+a[3])/2;var d=Math.max(Math.abs(a[0]-a[2]),Math.abs(a[1]-a[3]));var g=360,r=-2;while(g>d){r++;g=g/2}}if(m.length==1){r=8}d2map=new ol.Map({target:"d2map",interactions:ol.interaction.defaults({dragPan:false,mouseWheelZoom:false}),layers:[new ol.layer.Tile({source:new ol.source.OSM()}),o],view:new ol.View({center:ol.proj.fromLonLat([c,b]),zoom:r})})}function p10showNodeNetInfoDialog(){if(xxdialogMode){return}setDialogMode(2,"Network Interfaces",1,null,"<div id=d2netinfo>Loading...</div>","if"+currentNode._id);meshserver.send({action:"getnetworkinfo",nodeid:currentNode._id})}function p10showMeshCmdDialog(a,b){if(xxdialogMode){return}var d="<select id=aginsSelect onclick=meshCmdOsClick() style=width:236px>";d+="<option value=3>Windows (32bit)</option>";d+="<option value=4>Windows (64bit)</option>";d+="<option value=5>Linux x86 (32bit)</option>";d+="<option value=6>Linux x86 (64bit)</option>";d+="<option value=25>Linux ARM, Raspberry Pi (32bit)</option>";d+="</select>";var c="";if(a==0){c+="<div>MeshCmd is a command line tool that performs lots of different operations. The action file can optionally be downloaded and edited to provide server information and credentials.<br /><br />"}if(a==1){c+='<div>Download "meshcmd" with an action file to route traffic thru this server to this device. Make sure to edit meshaction.txt and add your account password or make any changes needed.<br /><br />'}c+=addHtmlValue("Operating System",d);c+=addHtmlValue("MeshCmd",'<a id=meshcmddownloadid style=cursor:pointer onclick=fileDownload("meshagents?meshcmd=","MeshCmd",2)></a>');if(a==0){c+=addHtmlValue("Action File",'<a style=cursor:pointer onclick=fileDownload("meshagents?meshaction=generic","MeshAction.txt")>MeshAction (.txt)</a>')}if(a==1){c+=addHtmlValue("Action File",'<a style=cursor:pointer onclick=fileDownload("meshagents?meshaction=route&nodeid='+b+'","MeshAction.txt")>MeshAction (.txt)</a>')}c+="</div>";setDialogMode(2,["Download MeshCmd","Network Router"][a],9,null,c,"fileDownload");meshCmdOsClick()}function meshCmdOsClick(){var a=Q("aginsSelect").value,b="";if(a==3){b="MeshCmd (Win32 executable)"}if(a==4){b="MeshCmd (Win64 executable)"}if(a==5){b="MeshCmd (Linux x86, 32bit)"}if(a==6){b="MeshCmd (Linux x86, 64bit)"}if(a==25){b="MeshCmd (Linux ARM, 32bit)"}QH("meshcmddownloadid",b)}function p10showiconselector(){if(xxdialogMode){return}var a=meshes[currentNode.meshid];var b=a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((b&4)==0){return}var c="<br><div style=display:inline-block;width:40px></div>";c+="<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>";c+="<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>";c+="<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div>";c+="<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>";c+="<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>";c+="<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div><br><br>";setDialogMode(2,"Icon Selection",0,null,c);QV("id_dialogclose",true)}function p10setIcon(a){setDialogMode(0);meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:a})}var showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"];var showEditNodeValueDialog_modes2=["name","host","desc","tags"];var showEditNodeValueDialog_modes3=["","","","Tag1, Tag2, Tag3"];function showEditNodeValueDialog(a){if(xxdialogMode){return}var c=addHtmlValue(showEditNodeValueDialog_modes[a],'<input id=dp10devicevalue style=width:230px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[a]+'" onchange=p10editdevicevalueValidate('+a+",event) onkeyup=p10editdevicevalueValidate("+a+",event) />");setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,c,a);var b=currentNode[showEditNodeValueDialog_modes2[a]];if(b==null){b=""}if(Array.isArray(b)){b=b.join(", ")}Q("dp10devicevalue").value=b;p10editdevicevalueValidate();Q("dp10devicevalue").focus()}function showEditNodeValueDialogEx(a,b){var c={action:"changedevice",nodeid:currentNode._id};c[showEditNodeValueDialog_modes2[b]]=Q("dp10devicevalue").value;meshserver.send(c)}function p10editdevicevalueValidate(b,a){var c=((b>1)||(Q("dp10devicevalue").value.length>0));QE("idx_dlgOkButton",c);if((a!=null)&&(c==true)&&(a.keyCode==13)){dialogclose(1)}}var desktopNode;function setupDesktop(){if((desktopNode!=currentNode)&&(desktop!=null)){desktop.Stop();desktopNode=null;desktop=null}if((desktopNode!=currentNode)||(desktop==null)){var b=multiDesktop[currentNode._id];if(b!=null){QH("DeskParent","");var a=b.m.CanvasId;a.setAttribute("id","Desk");a.setAttribute("style","width:100%;-ms-touch-action:none;margin-left:0px");a.setAttribute("onmousedown","dmousedown(event)");a.setAttribute("onmouseup","dmouseup(event)");a.setAttribute("onmousemove","dmousemove(event)");a.removeAttribute("onclick");Q("DeskParent").appendChild(a);desktop=b;if(desktop.m.SendCompressionLevel){desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate)}desktop.onStateChanged=onDesktopStateChange;desktopNode=currentNode;onDesktopStateChange(desktop,desktop.State);delete multiDesktop[currentNode._id]}else{QH("DeskParent",'<canvas id=Desk width=640 height=480 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');desktopNode=currentNode}Q("Desk").addEventListener("DOMMouseScroll",function(c){return dmousewheel(c)});Q("Desk").addEventListener("mousewheel",function(c){return dmousewheel(c)})}desktopNode=currentNode;updateDesktopButtons();deskAdjust();if(!Q("Desk")["toBlob"]){QV("deskSaveBtn",false)}}function updateDesktopButtons(){var c=meshes[currentNode.meshid];var a=0;if(desktop!=null){a=desktop.State}var d=c.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;QV("disconnectbutton1span",(a!=0));QV("connectbutton1span",(a==0)&&((d&8)||(d&256))&&(c.mtype==2)&&(currentNode.agent.caps&1));QV("connectbutton1hspan",(a==0)&&(d&8)&&((currentNode.intelamt!=null)&&(c.mtype==1||currentNode.intelamt.state==2)&&((currentNode.intelamt.ver!=null)||(c.mtype==1))));QV("d7amtkvm",(currentNode.intelamt!=null&&((currentNode.intelamt.ver!=null)||(c.mtype==1)))&&((a==0)||(desktop.contype==2)));QV("d7meshkvm",(webRtcDesktop)||((c.mtype==2)&&(currentNode.agent.caps&1)&&((a==false)||(desktop.contype==1))));var e=((currentNode.conn&1)!=0);QE("connectbutton1",e);var b=((currentNode.conn&6)!=0);QE("connectbutton1h",b);QE("deskSaveBtn",a==3);QV("deskFocusBtn",(desktop!=null)&&(desktop.contype==2)&&(a!=0)&&(desktopsettings.showfocus));QV("DeskCAD",d&8);QE("DeskCAD",a==3);QE("DeskClip",a==3);QV("DeskWD",(currentNode.agent)&&(currentNode.agent.id<5)&&(d&8));QE("DeskWD",a==3);QV("deskkeys",(currentNode.agent)&&(currentNode.agent.id<5)&&(d&8));QE("deskkeys",a==3);QV("DeskToolsButton",(d&8)&&(c.mtype==2)&&e);QV("DeskChatButton",(browserfullscreen==false)&&(d&8)&&(c.mtype==2)&&e);QV("DeskNotifyButton",(browserfullscreen==false)&&(currentNode.agent)&&(currentNode.agent.id<5)&&(d&8)&&(c.mtype==2)&&e);QV("DeskOpenWebButton",(browserfullscreen==false)&&(d&8)&&(c.mtype==2)&&e);QV("DeskControlSpan",d&8);QV("deskActionsBtn",(browserfullscreen==false));QV("deskActionsSettings",(browserfullscreen==false));if(d&8){Q("DeskControl").checked=(getstore("DeskControl",1)==1)}else{Q("DeskControl").checked=false}if(e==false){QV("DeskTools",false)}}var autoConnectDesktopTimer=null;function autoConnectDesktop(a){if(autoConnectDesktopTimer==null){autoConnectDesktopTimer=setInterval(connectDesktop,100)}else{clearInterval(autoConnectDesktopTimer);autoConnectDesktopTimer=null}}function connectDesktop(b,a){if(desktop==null){desktopNode=currentNode;if(a==2){if((desktopNode.intelamt.user==null)||(desktopNode.intelamt.user=="")){editDeviceAmtSettings(desktopNode._id,connectDesktop);return}desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie);desktop.debugmode=debugmode;desktop.onStateChanged=onDesktopStateChange;desktop.m.bpp=(desktopsettings.encoding==1||desktopsettings.encoding==3)?1:2;desktop.m.useZRLE=(desktopsettings.encoding<3);desktop.m.showmouse=desktopsettings.showmouse;desktop.m.onScreenSizeChange=deskAdjust;desktop.m.onKvmData=function(h){if(h.length==0){if(!desktop.m._sentPresence){desktop.m._sentPresence=true;desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))}return}var d=null;try{d=JSON.parse(h)}catch(g){}if((d!=null)&&(d.action!=null)){if(d.action=="restart"){webRtcDesktopReset();desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))}else{if((d.action=="present")&&(webRtcDesktop==null)){webRtcDesktop={platform:d.platform};var c=null;if(typeof RTCPeerConnection!=="undefined"){webRtcDesktop.webrtc=new RTCPeerConnection(c)}else{if(typeof webkitRTCPeerConnection!=="undefined"){webRtcDesktop.webrtc=new webkitRTCPeerConnection(c)}}webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{});webRtcDesktop.webchannel.onopen=function(){console.log("WebRTC Data Channel Open");Q("deskstatus").textContent=StatusStrs[desktop.State]+", Soft-KVM";desktop.m.hold(true);webRtcDesktop.webRtcActive=true;webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q("id_mainarea")),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);webRtcDesktop.softdesktop.m.onScreenSizeChange=deskAdjust;if(desktopsettings.quality){webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality}if(desktopsettings.scaling){webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling}webRtcDesktop.softdesktop.Start()};webRtcDesktop.webchannel.onclose=function(e){console.log("WebRTC Data Channel Closed");webRtcDesktopReset()};webRtcDesktop.webrtc.onicecandidate=function(j){if(j.candidate==null){desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp}))}else{webRtcDesktop.webrtcoffer.sdp+=("a="+j.candidate.candidate+"\r\n")}};webRtcDesktop.webrtc.oniceconnectionstatechange=function(){if((webRtcDesktop!=null)&&(webRtcDesktop.webrtc!=null)&&((webRtcDesktop.webrtc.iceConnectionState=="disconnected")||(webRtcDesktop.webrtc.iceConnectionState=="failed"))){webRtcDesktopReset()}};webRtcDesktop.webrtc.createOffer(function(e){webRtcDesktop.webrtcoffer=e;webRtcDesktop.webrtc.setLocalDescription(e,function(){},webRtcDesktopReset)},webRtcDesktopReset,{mandatory:{OfferToReceiveAudio:false,OfferToReceiveVideo:false}})}else{if((d.action=="answer")&&(webRtcDesktop!=null)){webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:d.sdp}),function(){},webRtcDesktopReset)}}}}};desktop.Start(desktopNode._id,16994,"*","*",0);desktop.contype=2}else{desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie);desktop.debugmode=debugmode;desktop.m.debugmode=debugmode;desktop.attemptWebRTC=attemptWebRTC;desktop.onStateChanged=onDesktopStateChange;desktop.m.CompressionLevel=desktopsettings.quality;desktop.m.ScalingLevel=desktopsettings.scaling;desktop.m.FrameRateTimer=desktopsettings.framerate;desktop.m.onDisplayinfo=deskDisplayInfo;desktop.m.onScreenSizeChange=deskAdjust;desktop.Start(desktopNode._id);desktop.contype=1}}else{desktop.Stop();webRtcDesktopReset();desktopNode=desktop=null}}var webRtcDesktop=null;function webRtcDesktopReset(){if(webRtcDesktop==null){return}if(webRtcDesktop.softdesktop!=null){webRtcDesktop.softdesktop.Stop();webRtcDesktop.softdesktop=null}if(webRtcDesktop.webchannel!=null){try{webRtcDesktop.webchannel.close()}catch(a){}webRtcDesktop.webchannel=null}if(webRtcDesktop.webrtc!=null){try{webRtcDesktop.webrtc.close()}catch(a){}webRtcDesktop.webrtc=null}webRtcDesktop=null;if(desktop&&desktop.m){desktop.m.hold(false);Q("deskstatus").textContent=StatusStrs[desktop.State]}}function onDesktopStateChange(c,a){var d=a;if((d==3)&&(c.contype==2)){d++}var b=StatusStrs[d];if((desktop!=null)&&(desktop.webRtcActive==true)){b+=", WebRTC"}QH("deskstatus",b);switch(a){case 0:desktop.Stop();desktopNode=desktop=null;QV("DeskFocus",false);QV("termdisplays",false);deskFocusBtn.value="All Focus";if(fullscreen==true){deskToggleFull()}webRtcDesktopReset();break;case 2:break;default:break}updateDesktopButtons();deskAdjust();setTimeout(deskAdjust,50)}function showDesktopSettings(){if(xxdialogMode){return}applyDesktopSettings();updateDesktopButtons();setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged)}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value;desktopsettings.showfocus=d7showfocus.checked;desktopsettings.showmouse=d7showcursor.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;desktopsettings.framerate=d7framelimiter.value;localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings));applyDesktopSettings();if(desktop){if(desktop.contype==1){if(desktop.State!=0){desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate)}}if(desktop.contype==2){if(desktopsettings.showfocus==false){desktop.m.focusmode=0;deskFocusBtn.value="All Focus"}if(desktop.State!=0){desktop.Stop();setTimeout(function(){connectDesktop(null,2)},50)}}}}function applyDesktopSettings(){var c="",b=(features&512)?[90,80,70,60,50,40,30,20,10,5,1]:[60,50,40,30,20,10,5,1];for(var a in b){c+="<option value="+b[a]+">"+b[a]+"%</option>"}QH("d7bitmapquality",c);d7desktopmode.value=desktopsettings.encoding;d7showfocus.checked=desktopsettings.showfocus;d7showcursor.checked=desktopsettings.showmouse;d7bitmapquality.value=40;if(b.indexOf(parseInt(desktopsettings.quality))>=0){d7bitmapquality.value=desktopsettings.quality}d7bitmapscaling.value=desktopsettings.scaling;if(desktopsettings.framerate){d7framelimiter.value=desktopsettings.framerate}QV("deskFocusBtn",(desktop!=null)&&(desktop.contype==2)&&(desktop.state!=0)&&(desktopsettings.showfocus))}function enterBrowserFullscreen(a){if(a.requestFullscreen){a.requestFullscreen()}else{if(a.msRequestFullscreen){a.msRequestFullscreen()}else{if(a.mozRequestFullScreen){a.mozRequestFullScreen()}else{if(a.webkitRequestFullscreen){a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}}}}}function exitBrowserFullscreen(){if(document.exitFullscreen){document.exitFullscreen()}else{if(document.msExitFullscreen){document.msExitFullscreen()}else{if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else{if(document.webkitExitFullscreen){document.webkitExitFullscreen()}}}}}function isBrowserFullscreen(){if(!document.fullscreenElement&&!document.mozFullScreenElement&&!document.webkitFullscreenElement&&!document.msFullscreenElement){return false}else{return true}}var fullscreen=false;var browserfullscreen=false;function deskToggleFull(a){fullscreen=!fullscreen;QV("mastheadx",!fullscreen);QV("masthead",!fullscreen);QV("topbar",!fullscreen);QV("p11deviceNameHeader",!fullscreen);QV("footer",!fullscreen);QV("column_l_bottomgap",!fullscreen);QV("idx_deskFullBtn2",fullscreen);QV("deskFullBtn",!fullscreen);QV("page_leftbar",!fullscreen);if(fullscreen){if(a.shiftKey==true){enterBrowserFullscreen(Q("deskarea0"));browserfullscreen=true}QS("column_l").width="930px";QS("column_l").height="";QS("column_l")["margin-left"]="";QS("column_l")["overflow-y"]="";QS("container").position="";QS("page_content").position="";QV("MainMenuSpan",true);QS("container").width="100%";QS("container")["border-right"]="0";QS("container")["border-left"]="0";QS("column_l").padding="0";QS("column_l").width="100%";QS("column_l")["max-height"]=""}else{exitBrowserFullscreen();browserfullscreen=false;QS("container").width="960px";QS("container")["border-right"]="1px solid #b7b7b7";QS("container")["border-left"]="1px solid #b7b7b7";QS("column_l").padding="0 15px";QS("column_l").width="930px";toggleFullScreen()}deskAdjust();deskAdjust();updateDesktopButtons()}function deskToggleFocus(){desktop.m.focusmode=(desktop.m.focusmode+64)%192;Q("deskFocusBtn").value=["All Focus","Small Focus","Large Focus"][desktop.m.focusmode/64]}function deskAdjust(){var c=(Math.max(document.documentElement.clientHeight,window.innerHeight||0)-(Q("deskarea1").clientHeight+Q("deskarea2").clientHeight+Q("Desk").clientHeight+Q("deskarea4").clientHeight+2))/2;if(fullscreen){document.documentElement.style.overflow="hidden";QS("deskarea3x").height=null;if(c<0){var a=(Math.max(document.documentElement.clientHeight,window.innerHeight||0)-(Q("deskarea1").clientHeight+Q("deskarea2").clientHeight+Q("deskarea4").clientHeight));var b=9999;if(desktop){b=(desktop.m.width/desktop.m.height)*a}if(webRtcDesktop&&webRtcDesktop.softdesktop){b=(webRtcDesktop.softdesktop.m.width/webRtcDesktop.softdesktop.m.height)*a}QS("Desk")["max-height"]=a+"px";QS("Desk")["max-width"]=b+"px";c=0}else{QS("Desk")["max-height"]=null;QS("Desk")["max-width"]=null}QS("Desk")["margin-top"]=c+"px";QS("Desk")["margin-bottom"]=c+"px"}else{var b=9999,a=(Math.max(document.documentElement.clientHeight,window.innerHeight||0)-(webPageFullScreen?276:290));if(desktop){b=(desktop.m.width/desktop.m.height)*a}if(webRtcDesktop&&webRtcDesktop.softdesktop){b=(webRtcDesktop.softdesktop.m.width/webRtcDesktop.softdesktop.m.height)*a}document.documentElement.style.overflow="auto";QS("Desk")["max-height"]=a+"px";QS("Desk")["max-width"]=b+"px";QS("Desk")["margin-top"]="0";QS("Desk")["margin-bottom"]="0"}}function mdeskAdjust(c,h,g,a){if(!c||!h||!g||!a){return}if(a.id=="Desk"){deskAdjust();return}var k=[{x:180,y:101},{x:302,y:169},{x:454,y:255}][Q("sizeselect").selectedIndex];var e=k.x+2,j=Q("xdevices").clientWidth-30,l=Math.floor(j/e);l=e+Math.floor((j-(l*e))/l);k.y=k.y*(l/k.x);k.x=l;var b=k.y,d=k.x;if(c.State!=0){b=k.y;d=(h/g)*k.y}QS(a.id)["max-height"]=b+"px";QS(a.id)["max-width"]=d+"px";QS(a.id)["margin-top"]="0";QS(a.id)["margin-bottom"]="0"}function deskSendKeys(){if(xxdialogMode||desktop==null||desktop.State!=3){return}var a=Q("deskkeys").value;if(a==0){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==1){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==2){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]])}else{desktop.sendCtrlMsg('{"action":"lock"}')}}else{if(a==3){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==4){if(desktop.contype==2){desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]])}}else{if(a==5){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]])}}else{if(a==6){if(desktop.contype==2){desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]])}else{desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]])}}}}}}}}}function showDeskClip(){if(xxdialogMode||desktop==null||desktop.State!=3){return}Q("DeskClip").blur();var a='<input id=dlgClipGet type=button value="Get Clipboard" style=width:120px onclick=showDeskClipGet()>';a+='<input id=dlgClipSet type=button value="Set Clipboard" style=width:120px onclick=showDeskClipSet()>';a+='<div id=dlgClipStatus style="display:inline-block;margin-left:8px" ></div>';a+='<textarea id=d2clipText style="width:100%;height:184px;resize:none" maxlength=65535></textarea>';a+='<input type=button value="Close" style=width:80px;float:right onclick=dialogclose(0)><div style=height:26px>&nbsp;</div>';setDialogMode(2,"Remote Clipboard",8,null,a,"clipboard");Q("d2clipText").focus()}function showDeskClipGet(){if(desktop==null||desktop.State!=3){return}meshserver.send({action:"msg",type:"getclip",nodeid:currentNode._id})}function showDeskClipSet(){if(desktop==null||desktop.State!=3){return}meshserver.send({action:"msg",type:"setclip",nodeid:currentNode._id,data:Q("d2clipText").value})}function sendCAD(){if(xxdialogMode||desktop==null||desktop.State!=3){return}desktop.m.sendcad()}function toggleDeskTools(){if(xxdialogMode){return}if(QS("DeskTools").display=="none"){QV("DeskTools",true);Q("DeskTools").nodeid=currentNode._id;refreshDeskTools()}else{QV("DeskTools",false)}}function refreshDeskTools(){QV("DeskToolsRefreshButton",false);setTimeout(refreshDeskToolsEx,500);meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",true)}var deskTools={sort:1,msg:null};function sortProcess(a){deskTools.sort=a;showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(c,d){if(c.p>d.p){return 1}if(c.p<d.p){return(-1)}return 0}function sortProcessName(c,d){if(c.d>d.d){return 1}if(c.d<d.d){return(-1)}return 0}function showDeskToolsProcesses(c){deskTools.msg=c;if(c==null){QH("DeskToolsProcesses","");return}if(Q("DeskTools").nodeid!=c.nodeid){return}var d=[],h=null;try{h=JSON.parse(c.value)}catch(a){}if(h!=null){for(var g in h){d.push({p:parseInt(g),c:h[g].cmd,d:h[g].cmd.toLowerCase(),u:h[g].user})}if(deskTools.sort==0){d.sort(sortProcessPid)}else{if(deskTools.sort==1){d.sort(sortProcessName)}}var j="";for(var b in d){if(d[b].p!=0){j+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+d[b].p+'</div><a style=float:right;padding-right:5px;cursor:pointer title="Stop process" onclick=stopProcess('+d[b].p+',"'+d[b].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(d[b].u?d[b].u:"")+"</div><div>"+d[b].c+"</div></div>"}}QH("DeskToolsProcesses",j)}}function toggleKvmControl(){putstore("DeskControl",(Q("DeskControl").checked?1:0))}function deskSaveImage(){if(xxdialogMode||desktop==null||desktop.State!=3){return}var a=new Date(),b="Desktop-"+currentNode.name+"-"+a.getFullYear()+"-"+("0"+(a.getMonth()+1)).slice(-2)+"-"+("0"+a.getDate()).slice(-2)+"-"+("0"+a.getHours()).slice(-2)+"-"+("0"+a.getMinutes()).slice(-2);Q("Desk")["toBlob"](function(c){saveAs(c,b+".jpg")})}function deskDisplayInfo(e,a,c,d){var g=Q("termdisplays").value;if(a.length>0){var b="";for(var h in a){b+="<option"+((g==a[h])?" selected":"")+">"+a[h]+"</option>"}QH("termdisplays",b)}QV("termdisplays",a.length>0)}function deskGetDisplayNumbers(a){desktop.m.GetDisplayNumbers()}function deskSetDisplay(b){var a=0,c=Q("termdisplays").value;if(c=="All Displays"){a=65535}else{a=parseInt(c.substring(8))}desktop.m.SetDisplay(a)}var dblClickDetectArgs={t:0,x:0,y:0};function dblClickDetect(a){if(a.buttons!=1){return}var b=Date.now();if(((b-dblClickDetectArgs.t)<250)&&(Math.abs(a.clientX-dblClickDetectArgs.x)<2)&&(Math.abs(a.clientY-dblClickDetectArgs.y)<2)){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousedblclick(a);desktop.m.sendKeepAlive()}else{desktop.m.mousedblclick(a)}}}dblClickDetectArgs.t=b;dblClickDetectArgs.x=a.clientX;dblClickDetectArgs.y=a.clientY}function dmousedown(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousedown(a);desktop.m.sendKeepAlive()}else{desktop.m.mousedown(a)}}dblClickDetect(a)}function dmouseup(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mouseup(a);desktop.m.sendKeepAlive()}else{desktop.m.mouseup(a)}}}function dmousemove(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousemove(a);desktop.m.sendKeepAlive()}else{desktop.m.mousemove(a)}}}function dmousewheel(a){if(!xxdialogMode&&desktop!=null&&Q("DeskControl").checked){if((webRtcDesktop!=null)&&(webRtcDesktop.softdesktop!=null)){webRtcDesktop.softdesktop.m.mousewheel(a);desktop.m.sendKeepAlive()}else{if(desktop.m.mousewheel){desktop.m.mousewheel(a)}}haltEvent(a);return true}return false}function drotate(a){if(!xxdialogMode&&desktop!=null){desktop.m.setRotation(desktop.m.rotation+a);deskAdjust();deskAdjust()}}function stopProcess(a,b){setDialogMode(2,"Process Control",3,stopProcessEx,"Stop process #"+a+' "'+b+'"?',a)}function stopProcessEx(a,b){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:b});setTimeout(refreshDeskTools,300)}var terminalNode;function setupTerminal(){if((terminalNode!=currentNode)&&(terminal!=null)){terminal.Stop();terminal=null}terminalNode=currentNode;updateTerminalButtons()}function updateTerminalButtons(){var b=meshes[terminalNode.meshid];var d=((terminal!=null)&&(terminal.state!=0));QV("disconnectbutton2span",(d==true));QV("connectbutton2span",(d==false)&&(b.mtype==2)&&(currentNode.agent.caps&2));QV("connectbutton2hspan",(d==false)&&((terminalNode.intelamt!=null)&&(b.mtype==1||terminalNode.intelamt.state==2)&&((terminalNode.intelamt.ver!=null)||(b.mtype==1))));var c=((terminalNode.conn&1)!=0);QE("connectbutton2",c);var a=((terminalNode.conn&6)!=0);QE("connectbutton2h",a);QE("ctrlcbutton",d);QE("ctrlxbutton",d);QE("escbutton",d);QE("bsbutton",d);QE("pastebutton",d);QE("specialkeylist",d);QE("specialkeylistinput",d);QV("terminalSettingsButtons",(terminal)&&(terminal.contype==2));if(terminal){Q("id_ttypebutton").value=terminalEmulations[terminal.m.terminalEmulation];Q("id_tfxkeysbutton").value=fxEmulations[terminal.m.fxEmulation];Q("id_tcrbutton").value=(terminal.m.lineFeed=="\r\n")?"CR+LF":"LF"}}function onTerminalStateChange(d,a){var c=a;if((c==3)&&(d.contype==2)){c++}var b=StatusStrs[c];if(terminal.webRtcActive==true){b+=", WebRTC"}QH("termstatus",b);switch(a){case 0:d.m.TermResetScreen();d.m.TermDraw();if(terminal!=null){terminal.Stop();terminal=null}break;case 3:break;default:break}updateTerminalButtons()}var autoConnectTerminalTimer=null;function autoConnectTerminal(a){if(autoConnectTerminalTimer==null){autoConnectTerminalTimer=setInterval(connectTerminal,100)}else{clearInterval(autoConnectTerminalTimer);autoConnectTerminalTimer=null}}function connectTerminal(b,a){if(!terminal){if(a==2){if((terminalNode.intelamt.user==null)||(terminalNode.intelamt.user=="")){editDeviceAmtSettings(terminalNode._id,connectTerminal);return}terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"),authCookie);terminal.debugmode=debugmode;terminal.m.debugmode=debugmode;terminal.onStateChanged=onTerminalStateChange;terminal.Start(terminalNode._id,16994,"*","*",0);terminal.contype=2;Q("id_ttypebutton").value=terminalEmulations[terminal.m.terminalEmulation]}else{terminal=CreateAgentRedirect(meshserver,CreateAmtRemoteTerminal("Term"),serverPublicNamePort,authCookie);terminal.debugmode=debugmode;terminal.m.debugmode=debugmode;terminal.m.lineFeed=([1,2,3,4,21,22].indexOf(currentNode.agent.id)>=0)?"\r\n":"\n";terminal.attemptWebRTC=attemptWebRTC;terminal.onStateChanged=onTerminalStateChange;terminal.Start(terminalNode._id);terminal.contype=1;terminal.m.terminalEmulation=0;terminal.m.fxEmulation=0;Q("id_ttypebutton").value=terminalEmulations[0]}}else{terminal.Stop();terminal=null}Q("connectbutton2").blur()}var terminalEmulations=["UTF8 Terminal","Extended ASCII","Intel ASCII"];function termToggleType(){if(!terminal||xxdialogMode){return}terminal.m.terminalEmulation=(terminal.m.terminalEmulation+1)%3;Q("id_ttypebutton").value=terminalEmulations[terminal.m.terminalEmulation];Q("id_ttypebutton").blur()}var fxEmulations=["Intel (F10 = ESC+[OM)","Alternate (F10 = ESC+0)","VT100+ (F10 = ESC+[OY)"];function termToggleFx(){if(!terminal||xxdialogMode){return}terminal.m.fxEmulation=(terminal.m.fxEmulation+1)%3;Q("id_tfxkeysbutton").value=fxEmulations[terminal.m.fxEmulation];Q("id_tfxkeysbutton").blur()}function termToggleCr(){if(!terminal||xxdialogMode){return}if(terminal.m.lineFeed=="\n"){terminal.m.lineFeed="\r\n"}else{terminal.m.lineFeed="\n"}Q("id_tcrbutton").value=(terminal.m.lineFeed=="\r\n")?"CR+LF":"LF"}function termSendKey(b,a){if(!terminal||xxdialogMode){return}terminal.m.TermSendKey(b);Q(a).blur()}function showTermPasteDialog(){if(!terminal||xxdialogMode){return}Q("pastebutton").blur();setDialogMode(2,"Paste",3,showTermPasteDialogEx,'<textarea id=d2pasteText style="width:100%;height:184px;resize:none"></textarea>');Q("d2pasteText").focus()}function showTermPasteDialogEx(){if(!terminal){return}terminal.m.TermSendKeys(Q("d2pasteText").value)}function sendSpecialKey(){terminal.m.TermSendKey(Q("specialkeylist").value);Q("specialkeylist").blur();Q("specialkeylistinput").blur()}var filesNode;function setupFiles(){var b=(filesNode==currentNode);filesNode=currentNode;var a=((filesNode.conn&1)!=0)?true:false;QE("p13Connect",a);if(((b==false)||(a==false))&&files){files.Stop();files=null}}function onFilesStateChange(c,a){p13Connect.value=(a==0)?"Connect":"Disconnect";var b=StatusStrs[a];if(files.webRtcActive==true){b+=", WebRTC"}Q("p13Status").textContent=b;switch(a){case 0:QH("p13files","");p13filetree=null;p13filetreelocation=[];QH("p13currentpath","");QE("p13FolderUp",false);p13setActions();if(files!=null){files.Stop();files=null}break;case 3:p13targetpath="";files.sendText({action:"ls",reqid:1,path:""});break;default:break}}function CreateRemoteFiles(b){var a={protocol:5};a.onFileUpdate=b;a.xxStateChange=function(c){};a.ProcessData=function(c){a.onFileUpdate(c)};return a}var autoConnectFilesTimer=null;function autoConnectFiles(a){if(autoConnectFilesTimer==null){autoConnectFilesTimer=setInterval(connectFiles,100)}else{clearInterval(autoConnectFilesTimer);autoConnectFilesTimer=null}}function connectFiles(a){if(!files){files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie);files.attemptWebRTC=attemptWebRTC;files.onStateChanged=onFilesStateChange;files.Start(filesNode._id)}else{files.Stop();files=null}p13clipboard=p13clipboardFolder=null;p13clipboardCut=0;p13updateClipview()}var p13filetree=null;var p13targetpath=null;var p13filetreelocation=[];function p13gotFiles(b){if((b.length>0)&&(b.charCodeAt(0)!=123)){p13gotDownloadBinaryData(b);return}b=JSON.parse(decode_utf8(b));if(b.action=="download"){p13gotDownloadCommand(b);return}b.path=b.path.replace(/\//g,"\\");if((p13filetree!=null)&&(b.path==p13filetree.path)){var a=p13getCheckedNames();p13filetree=b;p13updateFiles(a)}else{var c=b.path.replace(/\//g,"\\"),d=p13targetpath.replace(/\//g,"\\");while((c.length>0)&&(c[0]=="\\")){c=c.substring(1)}while((d.length>0)&&(d[0]=="\\")){d=d.substring(1)}if((c==d)||((b.path=="\\")&&(p13targetpath==""))){p13filetree=b;p13updateFiles()}}}function p13getCheckedNames(){var b=[],a=document.getElementsByName("fd");for(var c=0;c<a.length;c++){if(a[c].checked){b.push(p13filetree.dir[a[c].value].n)}}return b}function p13updateFiles(b){var n="",o="",c="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",l="Root";var w=p13filetree.path.split("\\");p13filetreelocation=[];for(var p in w){if(w[p]!=""){p13filetreelocation.push(w[p])}}for(var p in p13filetreelocation){c+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(p)+1)+")>"+p13filetreelocation[p]+"</a>"}var s=p13filetreelocation.join("/");var j=p13sort_files(p13filetree.dir);for(var p in j){var d=j[p],r=d.n,u;u=r;if(r.length>70){u='<span title="'+EscapeHtml(r)+'">'+EscapeHtml(r.substring(0,70))+"...</span>"}else{u=EscapeHtml(r)}r=EscapeHtml(r);var g="";if(d.d!=null){var e=new Date(d.d),g=(e.getMonth()+1)+"/"+(e.getDate())+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;"}var k="";if(d.s!=null){k=getFileSizeStr(d.s)}var m="";if(d.t<3){var t="",v="";m="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right title=\""+v+'">'+t+"</span><span><div class=fileIcon"+d.t+' onclick=p13folderset("'+encodeURIComponent(d.nx)+'")></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+u+"</a></span></div>"}else{var q=u;if(d.s>0){q='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+r)+"','"+encodeURIComponent(r)+"',"+d.s+')">'+u+"</a>"}m="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span class=fsize>"+g+"</span><span style=float:right>"+k+"</span><span><div class=fileIcon"+d.t+"></div>"+q+"</span></div>"}if(d.t<3){n+=m}else{o+=m}}QH("p13files",n+o);QH("p13currentpath",c);QE("p13FolderUp",p13filetreelocation.length!=0);if(b!=null){var a=document.getElementsByName("fd");for(var p=0;p<a.length;p++){if(b.indexOf(p13filetree.dir[a[p].value].n)>=0){a[p].checked=true}}}p13setActions()}function p13folderset(a){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[a].n).split("\\").join("/");files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(a){if(a==null){p13filetreelocation.pop()}else{while(p13filetreelocation.length>a){p13filetreelocation.pop()}}p13targetpath=p13filetreelocation.join("/");files.sendText({action:"ls",reqid:1,path:p13targetpath})}var p13sortorder;function p13sort_filename(c,d){if(c.ln>d.ln){return(1*p13sortorder)}if(c.ln<d.ln){return(-1*p13sortorder)}return 0}function p13sort_timestamp(c,d){if(c.d>d.d){return(1*p13sortorder)}if(c.d<d.d){return(-1*p13sortorder)}return 0}function p13sort_bysize(c,d){if(c.s==d.s){return p13sort_filename(c,d)}return(((c.s-d.s))*p13sortorder)}function p13sort_files(a){var c=[],d=Q("p13sortdropdown").value;for(var b in a){a[b].nx=b;if(a[b].s==null){a[b].s=0}if(a[b].n==null){a[b].n=b}a[b].ln=a[b].n.toLowerCase();c.push(a[b])}p13sortorder=1;if(d>3){p13sortorder=-1;d-=3}if(d==1){c.sort(p13sort_filename)}else{if(d==2){c.sort(p13sort_bysize)}else{if(d==3){c.sort(p13sort_timestamp)}}}return c}function p13setActions(){if(p13filetree==null){QE("p13DeleteFileButton",false);QE("p13NewFolderButton",false);QE("p13UploadButton",false);QE("p13RenameFileButton",false);QE("p13SelectAllButton",false);Q("p13SelectAllButton").value="Select All";QE("p13RefreshButton",false);QE("p13CutButton",false);QE("p13CopyButton",false);QE("p13PasteButton",false)}else{var a=p13getFileSelCount(),c=p13getFileCount(),b=p13getFileSelCount(false);var d=((currentNode.agent.id>0)&&(currentNode.agent.id<5));QE("p13DeleteFileButton",(a>0)&&((p13filetreelocation.length>0)||(d==false)));QE("p13NewFolderButton",((p13filetreelocation.length>0)||(d==false)));QE("p13UploadButton",((p13filetreelocation.length>0)||(d==false)));QE("p13RenameFileButton",(a==1)&&((p13filetreelocation.length>0)||(d==false)));QE("p13SelectAllButton",c>0);Q("p13SelectAllButton").value=(a>0?"Select None":"Select All");QE("p13RefreshButton",true);QE("p13CutButton",(a>0)&&(a==b)&&((p13filetreelocation.length>0)||(d==false)));QE("p13CopyButton",(a>0)&&(a==b)&&((p13filetreelocation.length>0)||(d==false)));QE("p13PasteButton",((p13filetreelocation.length>0)||(d==false))&&((p13clipboard!=null)&&(p13clipboard.length>0)))}}function p13getFileSelCount(d){var a=0;var b=document.getElementsByName("fd");for(var c=0;c<b.length;c++){if((b[c].checked)&&((d!=false)||(b[c].attributes.file.value=="3"))){a++}}return a}function p13getFileSelDirCount(){var a=0,b=document.getElementsByName("fd");for(var c=0;c<b.length;c++){if((b[c].checked)&&(b[c].attributes.file.value=="999")){a++}}return a}function p13getFileCount(){var a=0;var b=document.getElementsByName("fd");return b.length}function p13selectallfile(){var c=(p13getFileSelCount()==0),a=document.getElementsByName("fd");for(var b=0;b<a.length;b++){a[b].checked=c}p13setActions()}function p13createfolder(){setDialogMode(2,"New Folder",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />");focusTextBox("p13renameinput");p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value});p13folderup(999)}function p13deletefile(){var a=p13getFileSelCount(),b=(p13getFileSelDirCount()>0)?"<br /><br /><input type=checkbox id=p13recdeleteinput>Recursive delete<br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,(a>1)?("Delete "+a+" selected items?"+b):("Delete selected item?"+b))}function p13deletefileEx(){var b=[],a=document.getElementsByName("fd");for(var c=0;c<a.length;c++){if(a[c].checked){b.push(p13filetree.dir[a[c].value].n)}}files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:b,rec:Q("p13recdeleteinput").checked});p13folderup(999)}function p13renamefile(){var c,a=document.getElementsByName("fd");for(var b=0;b<a.length;b++){if(a[b].checked){c=p13filetree.dir[a[b].value].n}}setDialogMode(2,"Rename",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+c+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:c});focusTextBox("p13renameinput");p13fileNameCheck()}function p13renamefileEx(a,c){c.newname=Q("p13renameinput").value;files.sendText(c);p13folderup(999)}function p13fileNameCheck(a){var b=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",b);if((b==true)&&(a!=null)&&(a.keyCode==13)){dialogclose(1)}}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />");updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}var p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(b){var a=document.getElementsByName("fd");p13clipboard=[];p13clipboardCut=b,p13clipboardFolder=p13targetpath;for(var c=0;c<a.length;c++){if((a[c].checked)&&(a[c].attributes.file.value=="3")){p13clipboard.push(p13filetree.dir[a[c].value].n)}}p13updateClipview()}function p13pasteFile(){var a="";if((p13clipboard!=null)&&(p13clipboard.length>0)){a="Confim "+(p13clipboardCut==0?"copy":"move")+" of "+p13clipboard.length+" entrie"+((p13clipboard.length>1)?"s":"")+" to this location?"}setDialogMode(2,"Paste",3,p13pasteFileEx,a)}function p13pasteFileEx(){files.sendText({action:(p13clipboardCut==0?"copy":"move"),reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard});p13folderup(999);if(p13clipboardCut==1){p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;p13updateClipview()}}function p13updateClipview(){var a="";if((p13clipboard!=null)&&(p13clipboard.length>0)){a="Holding "+p13clipboard.length+" entrie"+((p13clipboard.length>1)?"s":"")+" for "+(p13clipboardCut==0?"copy":"move")+", <a onclick=p13clearClip() style=cursor:pointer>Clear</a>."}QH("p13bottomstatus",a);p13setActions()}function p13clearClip(){p13clipboard=null;p13clipboardFolder=null;p13clipboardCut=0;p13updateClipview()}function p13fileDragDrop(a){haltEvent(a);QV("p13bigfail",false);QV("p13bigok",false);if(a.dataTransfer==null||a.dataTransfer.files.length==0||p13filetree==null){return}p13doUploadFiles(a.dataTransfer.files)}var p13dragtimer=null;function p13fileDragOver(b){haltEvent(b);if(p13dragtimer!=null){clearTimeout(p13dragtimer);p13dragtimer=null}var a=(p13filetree!=null);QV("p13bigok",a);QV("p13bigfail",!a)}function p13fileDragLeave(a){haltEvent(a);if(a.target.id!="p13filetable"){QV("p13bigfail",false);QV("p13bigok",false)}else{p13dragtimer=setTimeout(function(){QV("p13bigfail",false);QV("p13bigok",false);p13dragtimer=null},10)}}var downloadFile;function p13downloadfile(a,b,c){if(xxdialogMode||downloadFile||!files){return}downloadFile={path:decodeURIComponent(a),file:decodeURIComponent(b),size:c,tsize:0,data:"",state:0,id:Math.random()};files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path});setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+c+" />")}function p13downloadFileCancel(){setDialogMode(0);files.sendText({action:"download",sub:"cancel",id:downloadFile.id});downloadFile=null}function p13gotDownloadCommand(a){if((downloadFile==null)||(a.id!=downloadFile.id)){return}if(a.sub=="start"){downloadFile.state=1;files.sendText({action:"download",sub:"startack",id:downloadFile.id})}else{if(a.sub=="cancel"){downloadFile=null;setDialogMode(0)}}}function p13gotDownloadBinaryData(a){if(!downloadFile||downloadFile.state==0){return}if(a.length>4){downloadFile.tsize+=(a.length-4);downloadFile.data+=a.substring(4);Q("d2progressBar").value=downloadFile.tsize}if((ReadInt(a,0)&1)!=0){saveAs(data2blob(downloadFile.data),downloadFile.file);downloadFile=null;setDialogMode(0)}else{files.sendText({action:"download",sub:"ack",id:downloadFile.id})}}var uploadFile;function p13doUploadFiles(a){if(xxdialogMode){return}uploadFile={};uploadFile.xpath=p13filetreelocation.join("/");uploadFile.xfiles=a;uploadFile.xfilePtr=-1;setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />");p13uploadReconnect()}function onFileUploadStateChange(b,a){switch(a){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",a);break}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie);uploadFile.ws.attemptWebRTC=false;uploadFile.ws.ctrlMsgAllowed=false;uploadFile.ws.onStateChanged=onFileUploadStateChange;uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){uploadFile.xfilePtr++;if(uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var a=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",a.name);Q("d2progressBar").max=a.size;Q("d2progressBar").value=0;uploadFile.xreader=new FileReader();uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result;uploadFile.ws.sendText(JSON.stringify({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:a.name,size:uploadFile.xdata.byteLength}))};uploadFile.xreader.readAsArrayBuffer(a)}else{p13uploadFileCancel()}}function p13uploadFileCancel(a,b){if(uploadFile!=null){if(uploadFile.ws!=null){uploadFile.ws.Stop();uploadFile.ws=null}uploadFile=null}setDialogMode(0)}function p13gotUploadData(b){var a=JSON.parse(b);if((uploadFile==null)||(parseInt(uploadFile.xfilePtr)!=parseInt(a.reqid))){return}if(a.action=="uploadstart"){p13uploadNextPart(false);for(var c=0;c<8;c++){p13uploadNextPart(true)}}else{if(a.action=="uploadack"){p13uploadNextPart(false)}else{if(a.action=="uploaderror"){p13uploadFileCancel()}}}}function p13uploadNextPart(c){var a=uploadFile.xdata;var e=uploadFile.xptr;var d=uploadFile.xptr+4096;if(d>a.byteLength){if(c==true){return}d=a.byteLength}if(e==a.byteLength){if(uploadFile.ws!=null){uploadFile.ws.Stop();uploadFile.ws=null}if(uploadFile.xfiles.length>uploadFile.xfilePtr+1){p13uploadReconnect()}else{p13uploadFileCancel()}}else{var b=a.slice(e,d);uploadFile.ws.send(b);uploadFile.xptr=d;Q("d2progressBar").value=d}}var currentDeviceEvents=null;function deviceEventsUpdate(){var h="",a=null;for(var c in currentDeviceEvents){var b=currentDeviceEvents[c];var g=new Date(b.time);if(g.toLocaleDateString()!=a){if(a!=null){h+="</table>"}h+="<table style=width:100% cellpadding=0 cellspacing=0><tr><td class=DevSt colspan=4>"+g.toLocaleDateString()+"</td></tr>";a=g.toLocaleDateString()}var d="si3";if(b.etype=="user"){d="m2"}if(b.etype=="server"){d="si3"}var e=b.msg.split("(R)").join("&reg;");h+="<tr><td style=width:18px><div class="+d+"></div></td><td class=g1 style=float:none>&nbsp;</td><td style=background-color:#C9C9C9>"+g.toLocaleTimeString()+" - "+e+"</td><td class=g2 style=float:none>&nbsp;</td></tr><tr style=height:2px></tr>"}if(a!=null){h+="</table>"}if(h==""){h="<br><i>No Events Found</i><br><br>"}QH("p16events",h)}function refreshDeviceEvents(){meshserver.send({action:"events",nodeid:currentNode._id,limit:parseInt(p16limitdropdown.value)})}function agentConsoleHandleKeys(b){if((b.ctrlKey)||(b.altKey)){return true}var d=0,a=Q("p15consoleText");if(b.key){if(b.keyCode==13&&consoleFocus==0){p15consoleSend(b);d=1}else{if(b.keyCode==8&&consoleFocus==0){var g=a.value;a.value=g.substring(0,g.length-1);d=1}else{if(b.keyCode==27){a.value="";d=1}else{if((b.keyCode==38)||(b.keyCode==40)){var c=consoleHistory.indexOf(a.value);if((b.keyCode==38)&&((consoleHistory.length-1)>c)){a.value=consoleHistory[c+1]}else{if((b.keyCode==40)&&(c>0)){a.value=consoleHistory[c-1]}else{if((b.keyCode==40)&&(c==0)){a.value=""}}}d=1}else{if(b.key.length===1){insertTextAtCursor(a,b.key);d=1}}}}}}else{if(b.charCode!=0&&consoleFocus==0){a.value=((a.value+String.fromCharCode(b.charCode)));d=1}}if(d>0){return haltEvent(b)}}function insertTextAtCursor(a,d){if(document.selection){a.focus();sel=document.selection.createRange();sel.text=d}else{if(a.selectionStart||a.selectionStart=="0"){var c=a.selectionStart,b=a.selectionEnd;a.value=a.value.substring(0,c)+d+a.value.substring(b,a.value.length);a.setSelectionRange(b+1,b+1)}else{a.value+=myValue}}}var consoleNode;var consoleServerText="";function setupConsole(){if(xxcurrentView==115){var d=(consoleNode=="server");consoleNode="server";QH("p15deviceName","My Server Console");QE("p15consoleText",true);QH("p15statetext","");QH("p15coreName","");if(d==false){QH("p15agentConsoleText",consoleServerText);Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}}else{var d=(consoleNode==currentNode);consoleNode=currentNode;var a=meshes[consoleNode.meshid];var b=a.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;if((b&16)!=0){if(consoleNode.consoleText==null){consoleNode.consoleText=""}if(d==false){QH("p15agentConsoleText",consoleNode.consoleText);Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}var c=((consoleNode.conn&1)!=0)?true:false;QH("p15statetext",c?"Agent is online":"Agent is offline");QE("p15consoleText",c);QE("p15uploadCore",c)}else{QH("p15statetext","Access Denied");QE("p15consoleText",false);QE("p15uploadCore",false)}}}function p15consoleClear(){QH("p15agentConsoleText","");Q("id_p15consoleClear").blur();if(xxcurrentView==115){consoleServerText=""}else{consoleNode.consoleText=""}}var consoleHistory=[];function p15consoleSend(a){if(a&&a.keyCode!=13){return}var d=Q("p15consoleText").value,c="<div style=color:green>&gt; "+EscapeHtml(Q("p15consoleText").value)+"<br/></div>";Q("p15agentConsoleText").innerHTML+=c;Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight;Q("p15consoleText").value="";if(xxcurrentView==115){consoleServerText+=c;meshserver.send({action:"serverconsole",value:d})}else{consoleNode.consoleText+=c;meshserver.send({action:"msg",type:"console",nodeid:consoleNode._id,value:d})}if(d.length>0){var b=consoleHistory.indexOf(d);if(b>=0){consoleHistory.splice(b,1)}consoleHistory.unshift(d);consoleHistory.splice(10)}}function p15consoleReceive(b,a){a="<div>"+a+"</div>";if(b==="serverconsole"){consoleServerText+=a;if(consoleNode=="server"){Q("p15agentConsoleText").innerHTML+=a;Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}}else{if(b.consoleText==null){b.consoleText=a}else{b.consoleText+=a}if(consoleNode==b){Q("p15agentConsoleText").innerHTML+=a;Q("p15agentConsoleText").scrollTop=Q("p15agentConsoleText").scrollHeight}}}function p15uploadCore(a){if(xxdialogMode){return}if(a.shiftKey==true){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"default"})}else{if(a.altKey==true){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"clear"})}else{if(a.ctrlKey==true){p15uploadCore2()}else{setDialogMode(2,"Change Mesh Agent Core",3,p15uploadCoreEx,"<select id=d3coreMode style=float:right;width:260px><option value=1>Upload default server core</option><option value=2>Clear the core</option><option value=6>Upload recovery core</option><option value=3>Upload a core file</option><option value=4>Soft disconnect agent</option><option value=5>Hard disconnect agent</option></select><div>Change Core</div>")}}}}function p15uploadCoreEx(){if(Q("d3coreMode").value==1){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"default"})}else{if(Q("d3coreMode").value==2){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"clear"})}else{if(Q("d3coreMode").value==3){p15uploadCore2()}else{if(Q("d3coreMode").value==4){meshserver.send({action:"agentdisconnect",nodeid:consoleNode._id,disconnectMode:1})}else{if(Q("d3coreMode").value==5){meshserver.send({action:"agentdisconnect",nodeid:consoleNode._id,disconnectMode:2})}else{if(Q("d3coreMode").value==6){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"recovery"})}}}}}}}function p15uploadCore2(){if(xxdialogMode){return}Q("d3localmodeform").action="uploadmeshcorefile.ashx";Q("d3attrib").value=currentNode._id;setDialogMode(3,"Upload Mesh Agent Core",3,p15uploadCoreEx2);d3init()}function p15uploadCoreEx2(){var b=Q("d3uploadMode").value;if(b==1){Q("d3submit").click()}else{var a=d3getFileSel();if(a.length==1){meshserver.send({action:"uploadagentcore",nodeid:consoleNode._id,type:"custom",path:d3filetreelocation.join("/")+"/"+a[0]})}}}function account_manageAuthApp(){if(xxdialogMode||((features&4096)==0)){return}if(userinfo.otpsecret==1){account_removeOtp()}else{account_addOtp()}}function account_addOtp(){if(xxdialogMode||(userinfo.otpsecret==1)||((features&4096)==0)){return}setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Loading...</div>","otpauth-request");meshserver.send({action:"otpauth-request"})}function account_addOtpCheck(a){var b=(Q("d2otpauthinput").value.length==6);QE("idx_dlgOkButton",b);if(a&&(a.keyCode==13)&&b){dialogclose(1)}}function account_removeOtp(){if(xxdialogMode||(userinfo.otpsecret!=1)||((features&4096)==0)){return}setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(a){if((xxdialogMode==2)&&(xxdialogTag=="otpauth-manage")){dialogclose(0)}if(xxdialogMode||((features&4096)==0)){return}if((userinfo.otpsecret==1)||(userinfo.otphkeys>0)){meshserver.send({action:"otpauth-getpasswords",subaction:a})}}function account_manageHardwareOtp(){if((xxdialogMode==2)&&(xxdialogTag=="otpauth-hardware-manage")){dialogclose(0)}if(xxdialogMode||((features&4096)==0)){return}meshserver.send({action:"otp-hkey-get"})}function account_addhkey(a){if(a==1){var b="Type in the name of the key to add.<br /><br />";b+=addHtmlValue("Key Name",'<input id=dp1keyname style=width:230px maxlength=20 autocomplete=off placeholder="MyKey" onkeyup=account_addhkeyValidate(event,2) />')}else{if(a==2){var b="Type in a key name, select the OTP box and press the button on the YubiKey&trade;.<br /><br />";b+=addHtmlValue("Key Name",'<input id=dp1keyname style=width:230px maxlength=20 autocomplete=off placeholder="MyKey" onkeyup=account_addhkeyValidate(event,1) />');b+=addHtmlValue("YubiKey&trade; OTP","<input id=dp1key style=width:230px autocomplete=off onkeyup=account_addhkeyValidate(event,2) />")}}setDialogMode(2,"Add Security Key",3,account_addhkeyEx,b,a);Q("dp1keyname").focus()}function account_addhkeyValidate(b,a){if((b!=null)&&(b.keyCode==13)){if(a==2){dialogclose(1)}else{Q("dp1key").focus()}}}function account_addhkeyEx(a,c){var b=Q("dp1keyname").value;if(b==""){b="MyKey"}if(c==1){meshserver.send({action:"otp-hkey-setup-request",name:b})}else{if(c==2){meshserver.send({action:"otp-hkey-yubikey-add",name:b,otp:Q("dp1key").value});setDialogMode(2,"Add Security Key",0,null,"<br />Checking...<br /><br /><br />","otpauth-hardware-manage")}}}function account_removehkey(a){meshserver.send({action:"otp-hkey-remove",index:a});meshserver.send({action:"otp-hkey-get"})}function account_showVerifyEmail(){if(xxdialogMode||(userinfo.emailVerified==true)||(serverinfo.emailcheck!=true)){return}var a="Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.";setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,a)}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){if(xxdialogMode){return}var a="Change your account email address here.<br /><br />";a+=addHtmlValue("Email","<input id=dp2email style=width:230px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />");setDialogMode(2,"Email Address Change",3,account_changeEmail,a);if(userinfo.email!=null){Q("dp2email").value=userinfo.email}account_validateEmail();Q("dp2email").focus()}function account_validateEmail(a,b){QE("idx_dlgOkButton",validateEmail(Q("dp2email").value)&&(Q("dp2email").value!=userinfo.email));if((a!=null)&&(a.keyCode==13)){dialogclose(1)}}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp2email").value})}function account_showDeleteAccount(){if(xxdialogMode){return}var a="To delete this account, type in the account password in both boxes below and hit ok.<br /><br />";a+="<form action='"+domainUrl+"deleteaccount' method=post><table style=margin-left:80px><tr>";a+="<td align=right>Password:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>";a+="</tr><tr><td align=right>Password:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>";a+="</tr></table><br /><div style=padding:10px;margin-bottom:4px>";a+="<input id=account_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>";a+='<input id=account_dlgOkButton type=submit value=OK style="float:right;width:80px" onclick=dialogclose(1)>';a+="</div><br /></form>";setDialogMode(2,"Delete Account",0,null,a);account_validateDeleteAccount();Q("apassword1").focus()}function account_showChangePassword(){if(xxdialogMode){return}var d="Change your account password by entering the old password and new password twice in the boxes below. Password hint can be used but is not recommanded.<br /><br />";d+="<table style=margin-left:60px>";d+="<tr><td align=right>Old password:</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>";d+="<tr><td align=right>New password:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>";d+="<tr><td align=right>New password:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>";if(features&65536){d+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"}d+="</table>";if(passRequirements){var b=[],c=0;for(var a in passRequirements){if((a!="reset")&&(a!="hint")){b.push(a+":"+passRequirements[a]);c++}}if(c>0){d+="<br /><span style=font-size:x-small>Requirements: "+b.join(", ")+".</span>"}}d+="<br />";setDialogMode(2,"Change Password",3,account_showChangePasswordEx,d);Q("apassword0").focus();account_validateNewPassword()}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var a={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};if(features&65536){a.hint=Q("apasswordhint").value}meshserver.send(a)}}function account_createMesh(){if(xxdialogMode){return}if((userinfo.emailVerified!==true)&&(serverinfo.emailcheck==true)&&(userinfo.siteadmin!=4294967295)){setDialogMode(2,"New Device Group",1,null,'Unable to create a new device group until a email address is verified. This is required for password recovery. Go to the "My Account" tab to change and verify an email address.');return}var a="Create a new device group using the options below.<br /><br />";a+=addHtmlValue("Name","<input id=dp2meshname style=width:230px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");a+=addHtmlValue("Type","<div style=width:230px;margin:0;padding:0><select id=dp2meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Manage using a software agent</option><option value=1>Intel&reg; AMT only, no agent</option></select></div>");a+=addHtmlValue("Description","<div style=width:230px;margin:0;padding:0><textarea id=dp2meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>");setDialogMode(2,"New Device Group",3,account_createMeshEx,a);account_validateMeshCreate();Q("dp2meshname").focus()}function account_validateMeshCreate(){QE("idx_dlgOkButton",Q("dp2meshname").value.length>0)}function account_createMeshEx(a,b){meshserver.send({action:"createmesh",meshname:Q("dp2meshname").value,meshtype:Q("dp2meshtype").value,desc:Q("dp2meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",(Q("apassword1").value.length>0)&&(Q("apassword1").value==Q("apassword2").value))}function account_validateNewPassword(){var d="",a=(Q("apassword0").value.length>0)&&(Q("apassword1").value.length>0)&&(Q("apassword1").value==Q("apassword2").value)&&(Q("apassword0").value!=Q("apassword1").value)&&(Q("apasswordhint").value!=Q("apassword1").value);if(Q("apassword1").value!=""){if(passRequirements==null||passRequirements==""){var c=checkPasswordStrength(Q("apassword1").value);if(c>=80){d="<span style=color:green>Strong<span>"}else{if(c>=60){d="<span style=color:blue>Good<span>"}else{d="<span style=color:red>Weak<span>"}}}else{var b=checkPasswordRequirements(Q("apassword1").value,passRequirements);if(b==false){a=false;d="<span style=color:red>Policy<span>"}}}QH("dxPassWarn",d);QE("idx_dlgOkButton",a)}function checkPasswordStrength(e){var g=0,d={},h=0,j={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e){return 0}for(var b=0;b<e.length;b++){d[e[b]]=(d[e[b]]||0)+1;g+=5/d[e[b]]}for(var a in j){h+=(j[a]==true)?1:0}return parseInt(g+(h-1)*10)}function checkPasswordRequirements(e,g){if((g==null)||(g=="")||(typeof g!="object")){return true}if(g.min){if(e.length<g.min){return false}}if(g.max){if(e.length>g.max){return false}}var d=0,b=0,h=0,c=0;for(var a=0;a<e.length;a++){if(/\d/.test(e[a])){d++}if(/[a-z]/.test(e[a])){b++}if(/[A-Z]/.test(e[a])){h++}if(/\W/.test(e[a])){c++}}if(g.num&&(d<g.num)){return false}if(g.lower&&(b<g.lower)){return false}if(g.upper&&(h<g.upper)){return false}if(g.nonalpha&&(c<g.nonalpha)){return false}return true}function updateMeshes(){var e="";var a=0,b=0;for(i in meshes){if(a>1){e+="</tr><tr>";a=0}a++;b++;var d=0;if(meshes[i].links["user/"+domain+"/"+userinfo.name.toLowerCase()]){d=meshes[i].links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights}var g="Partial Rights";if(d==4294967295){g="Full Administrator"}else{if(d==0){g="No Rights"}}e+="<div onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:431px;height:50px;padding-top:1px;padding-bottom:1px;float:left><div style=float:left;width:30px;height:100%></div><div style=height:100%;cursor:pointer onclick=gotoMesh('"+i+"')><div class=mi style=float:left;width:50px;height:50px></div><div style=height:100%><div class=g1></div><div class=e2 style=width:300px><div class=e1>"+EscapeHtml(meshes[i].name)+"</div><div>"+g+"</div></div><div class=g2 style=float:left></div></div></div></div>"}meshcount=b;QH("p2meshes",e);QV("p2noMeshFound",b==0)}function gotoMesh(a){currentMesh=meshes[a];p20updateMesh();go(20)}function server_showRestoreDlg(){if(xxdialogMode){return}var a="Restore the server using a backup, <span style=color:red>this will delete the existing server data</span>. Only do this if you know what you are doing.<br /><br />";a+='<form action="/restoreserver.ashx" enctype="multipart/form-data" method="post"><div>';a+='<input id=account_dlgFileInput type=file name=datafile style=width:100% accept=".zip,application/octet-stream,application/zip,application/x-zip,application/x-zip-compressed" onchange=account_validateServerRestore()>';a+="<input id=account_dlgCancelButton type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>";a+="<input id=account_dlgOkButton type=submit value=OK style=float:right;width:80px onclick=dialogclose(1)>";a+="</div><br /><br /></form>";setDialogMode(2,"Restore Server",0,null,a);account_validateServerRestore()}function account_validateServerRestore(){QE("account_dlgOkButton",Q("account_dlgFileInput").files.length==1)}function server_showVersionDlg(){if(xxdialogMode){return}setDialogMode(2,"MeshCentral Version",1,null,"Loading...","MeshCentralServerUpdate");meshserver.send({action:"serverversion"})}function server_showVersionDlgUpdate(){QE("idx_dlgOkButton",Q("d2updateCheck").checked)}function server_showVersionDlgEx(){meshserver.send({action:"serverupdate"})}function server_showErrorsDlg(){if(xxdialogMode){return}setDialogMode(2,"MeshCentral Errors",1,null,"Loading...","MeshCentralServerErrors");meshserver.send({action:"servererrors"})}function server_showErrorsDlgUpdate(){QE("idx_dlgOkButton",Q("d2updateCheck").checked)}function server_showErrorsDlgEx(){meshserver.send({action:"serverclearerrorlog"})}var currentMesh;function p20updateMesh(){if(currentMesh==null){return}QH("p20meshName",EscapeHtml(currentMesh.name));var j="Unknown #"+currentMesh.mtype;var h=0;try{h=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights}catch(c){}if(currentMesh.mtype==1){j="Intel&reg; AMT only, no agent"}if(currentMesh.mtype==2){j="Managed using a software agent"}var o="";o+=addHtmlValue("Name",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",(h&1)!=0));o+=addHtmlValue("Description",addLinkConditional(((currentMesh.desc&&currentMesh.desc!="")?EscapeHtml(currentMesh.desc):"<i>None</i>"),"p20editmesh(2)",(h&1)!=0));var g=[];if(currentMesh.flags){if(currentMesh.flags&1){g.push("Auto-Remove")}}g=g.join(", ");if(g==""){g="<i>None</i>"}o+=addHtmlValue("Features",addLinkConditional(g,"p20editmeshfeatures()",(h&1)!=0));o+=addHtmlValue("Type",j);if(currentMesh.mtype==2){var e="No Policy";if(currentMesh.amt){if(currentMesh.amt.type==1){e="Deactivate Client Control Mode (CCM)"}else{if(currentMesh.amt.type==2){e="Simple Client Control Mode (CCM)";if(currentMesh.amt.cirasetup==2){e+=" + CIRA"}}}}o+=addHtmlValue("Intel&reg; AMT",addLinkConditional(e,"p20editMeshAmt()",(h&4294967295)!=0))}if(h&1){o+='<br><input type=button value=Notes title="View notes about this device group" onclick=showNotes(false,"'+encodeURIComponent(currentMesh._id)+'") />'}o+="<br style=clear:both><br>";var b=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()];if(b&&((b.rights&2)!=0)){o+="<a onclick=p20showAddMeshUserDialog() style=cursor:pointer;margin-right:10px><img src=images/icon-addnew.png border=0 height=12 width=12> Add User</a>"}if((h&4)!=0){if(currentMesh.mtype==1){o+='<a onclick=addCiraDeviceToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Add a new Intel&reg; AMT computer that is located on the internet."><img src=images/icon-installmesh.png border=0 height=12 width=12> Install CIRA</a>';o+='<a onclick=addDeviceToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Add a new Intel&reg; AMT computer that is located on the local network."><img src=images/icon-installmesh.png border=0 height=12 width=12> Install local</a>'}if(currentMesh.mtype==2){o+='<a onclick=addAgentToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Add a new computer to this mesh by installing the mesh agent."><img src=images/icon-addnew.png border=0 height=12 width=12> Install</a>';if(features&64){o+='<a onclick=inviteAgentToMesh("'+currentMesh._id+'") style=cursor:pointer;margin-right:10px title="Invite someone to install the mesh agent on this mesh."><img src=images/icon-addnew.png border=0 height=12 width=12> Invite</a>'}}}o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th><th scope=col style=text-align:left></th></tr>';var a=1,m=[];for(var d in currentMesh.links){m.push({id:d,name:d.split("/")[2],rights:currentMesh.links[d].rights})}m.sort(function(p,q){if(p.name>q.name){return 1}if(p.name<q.name){return -1}return 0});for(var d in m){var n="",l="Partial Rights",k=m[d].rights;if(k==4294967295){l="Full Administrator"}else{if(k==0){l="No Rights"}}if((d!=userinfo._id)&&(h==4294967295||(((h&2)!=0)))){n='<a onclick=p20deleteUser(event,"'+encodeURIComponent(m[d].id)+'") title="Remote user rights to this mesh" style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'}o+='<tr onclick=p20viewuser("'+encodeURIComponent(m[d].id)+'") style=cursor:pointer'+(((a%2)==0)?";background-color:#DDD":"")+'><td><div title="User" class=m2></div><div>&nbsp;'+EscapeHtml(decodeURIComponent(m[d].name))+"<div></div></div></td><td><div style=float:right>"+n+"</div><div>"+l+"</div></td></tr>";++a}o+="</tbody></table>";if(h==4294967295){o+="<div style=font-size:x-small;text-align:right><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"}QH("p20info",o)}function p20editMeshAmt(){if(xxdialogMode){return}var a="";a+=addHtmlValue("Type","<select id=dp20amtpolicy style=width:230px onchange=p20editMeshAmtChange()><option value=0>No Policy</option><option value=1>Deactivate Client Control Mode (CCM)</option><option value=2>Simple Client Control Mode (CCM)</option></select>");a+="<div id=dp20amtpolicydiv></div>";setDialogMode(2,"Intel&reg; AMT Policy",3,p20editMeshAmtEx,a);if(currentMesh.amt){Q("dp20amtpolicy").value=currentMesh.amt.type}p20editMeshAmtChange();if(currentMesh.amt&&currentMesh.amt.type==2){Q("dp20amtpolicypass").value=currentMesh.amt.password;Q("dp20amtbadpass").value=currentMesh.amt.badpass;Q("dp20amtcira").value=currentMesh.amt.cirasetup}dp20amtValidatePolicy()}function p20editMeshAmtChange(){var a=Q("dp20amtpolicy").value,b="";if(a==2){b=addHtmlValue("Password*","<input id=dp20amtpolicypass style=width:230px maxlength=32 onchange=dp20amtValidatePolicy() onkeyup=dp20amtValidatePolicy() />");b+=addHtmlValue("Password mismatch","<select id=dp20amtbadpass style=width:230px><option value=0>Do nothing</option><option value=1>Reactivate Intel&reg; AMT</option></select>");b+=addHtmlValue('<span title="Client Initiated Remote Access">CIRA</span>',"<select id=dp20amtcira style=width:230px><option value=0>Don't configure</option><option value=1>Don't connect to server</option><option value=2>Connect to server</option></select>");b+='<br/><span style="font-size:10px">* Recommanded, leave blank to assign a random password to each device.</span><br/>';b+='<span style="font-size:10px">This policy will not impact devices with Intel&reg; AMT in ACM mode.</span><br/>';b+='<span style="font-size:10px">This is not a secure policy as agents will be performing activation.</span>'}QH("dp20amtpolicydiv",b)}function dp20amtValidatePolicy(){var a=true,c=Q("dp20amtpolicy").value;if(c==2){var b=Q("dp20amtpolicypass").value;a=(b=="")?true:passwordcheck(b)}QE("idx_dlgOkButton",a)}function p20editMeshAmtEx(){var b=parseInt(Q("dp20amtpolicy").value),a={type:b};if(b==2){a={type:b,password:Q("dp20amtpolicypass").value,badpass:parseInt(Q("dp20amtbadpass").value),cirasetup:parseInt(Q("dp20amtcira").value)}}meshserver.send({action:"meshamtpolicy",meshid:currentMesh._id,amtpolicy:a})}function p20showDeleteMeshDialog(){if(xxdialogMode){return}var a='Are you sure you want to delete group "'+EscapeHtml(currentMesh.name)+'"? Deleting the device group will also delete all information about devices within this group.<br /><br />';a+="<input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm";setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,a);p20validateDeleteMeshDialog()}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(a,b){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(a){if(xxdialogMode){return}var b=addHtmlValue("Name","<input id=dp20meshname style=width:230px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");b+=addHtmlValue("Description","<div style=width:230px;margin:0;padding:0><textarea id=dp20meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,b);Q("dp20meshname").value=currentMesh.name;if(currentMesh.desc){Q("dp20meshdesc").value=currentMesh.desc}p20editmeshValidate();if(a==2){Q("dp20meshdesc").focus()}else{Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",Q("dp20meshname").value.length>0)}function p20editmeshfeatures(){if(xxdialogMode){return}var a=(currentMesh.flags)?currentMesh.flags:0;var b="<div><input type=checkbox id=d20flag1 "+((a&1)?"checked":"")+">Remove device on disconnect<br></div>";setDialogMode(2,"Edit Device Group Features",3,p20editmeshfeaturesEx,b)}function p20editmeshfeaturesEx(){var a=0;if(Q("d20flag1").checked){a+=1}meshserver.send({action:"editmesh",meshid:currentMesh._id,flags:a})}function p20showAddMeshUserDialog(){if(xxdialogMode){return}var a="Allow a user to manage this device group and devices in this group<br /><br />";a+=addHtmlValue("User Name","<input id=dp20username style=width:230px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");a+='<br><div style="height:120px;overflow-y:scroll;border:1px solid gray">';a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Full Administrator<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Remote Control<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>No File Access<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices<br>";a+="<input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes<br>";a+="</div>";setDialogMode(2,"Add User to Device Group",3,p20showAddMeshUserDialogEx,a);p20validateAddMeshUserDialog();Q("dp20username").focus()}function p20validateAddMeshUserDialog(){var a=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights;QE("idx_dlgOkButton",(Q("dp20username").value.length>0));QE("p20fulladmin",a==4294967295);QE("p20editmesh",(!Q("p20fulladmin").checked)&&(a==4294967295));QE("p20manageusers",!Q("p20fulladmin").checked);QE("p20managecomputers",!Q("p20fulladmin").checked);QE("p20remotecontrol",!Q("p20fulladmin").checked);QE("p20meshagentconsole",!Q("p20fulladmin").checked);QE("p20meshserverfiles",!Q("p20fulladmin").checked);QE("p20wakedevices",!Q("p20fulladmin").checked);QE("p20editnotes",!Q("p20fulladmin").checked);QE("p20remoteview",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked);QE("p20noterminal",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked);QE("p20nofiles",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked);QE("p20noamt",!Q("p20fulladmin").checked&&Q("p20remotecontrol").checked)}function p20showAddMeshUserDialogEx(){var a=0;if(Q("p20fulladmin").checked==true){a=4294967295}else{if(Q("p20editmesh").checked==true){a+=1}if(Q("p20manageusers").checked==true){a+=2}if(Q("p20managecomputers").checked==true){a+=4}if(Q("p20remotecontrol").checked==true){a+=8}if(Q("p20meshagentconsole").checked==true){a+=16}if(Q("p20meshserverfiles").checked==true){a+=32}if(Q("p20wakedevices").checked==true){a+=64}if(Q("p20editnotes").checked==true){a+=128}if(Q("p20remoteview").checked==true){a+=256}if(Q("p20noterminal").checked==true){a+=512}if(Q("p20nofiles").checked==true){a+=1024}if(Q("p20noamt").checked==true){a+=2048}}meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,username:Q("dp20username").value,meshadmin:a})}function p20viewuser(e){if(xxdialogMode){return}e=decodeURIComponent(e);var d="",b=currentMesh.links["user/"+domain+"/"+userinfo.name.toLowerCase()].rights,c=currentMesh.links[e].rights;if(c==4294967295){d=", Full Administrator (all rights)"}else{if((c&1)!=0){d+=", Edit Device Group"}if((c&2)!=0){d+=", Manage Device Group Users"}if((c&4)!=0){d+=", Manage Device Group Computers"}if((c&8)!=0){d+=", Remote Control"}if((c&16)!=0){d+=", Agent Console"}if((c&32)!=0){d+=", Server Files"}if((c&64)!=0){d+=", Wake Devices"}if((c&128)!=0){d+=", Edit Notes"}if((c&256)!=0){d+=", Remote View Only"}if((c&512)!=0){d+=", No Terminal"}if((c&1024)!=0){d+=", No Files"}if((c&2048)!=0){d+=", No Intel&reg; AMT"}}d=d.substring(2);if(d==""){d="No Rights"}var a=1,g=addHtmlValue("User Name",EscapeHtml(decodeURIComponent(e.split("/")[2])));g+=addHtmlValue("Permissions",d);if((("user/"+domain+"/"+userinfo.name.toLowerCase())!=e)&&(b==4294967295||(((b&2)!=0)&&(c!=4294967295)))){a+=4}setDialogMode(2,"Device Group User",a,p20viewuserEx,g,e)}function p20viewuserEx(a,b){if(a!=2){return}setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,"Confirm removal of user "+b.split("/")[2]+"?",b)}function p20deleteUser(a,b){haltEvent(a);p20viewuserEx(2,decodeURIComponent(b))}function p20viewuserEx2(a,b){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:b})}var filetreelinkpath;var filetreelocation=[];function updateFiles(){QV("MainMenuMyFiles",((features&8)==0));if((features&8)!=0){return}var q="",r="",c="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",o="Root",y,k=filetree,m=1;var j=[],v=filetreelinkpath,b=[],a=document.getElementsByName("fc");for(var s=0;s<a.length;s++){if(a[s].checked){b.push(a[s].value)}}filetreelinkpath="";for(var s in filetreelocation){if((k.f!=null)&&(k.f[filetreelocation[s]]!=null)){j.push(filetreelocation[s]);o+=" / "+filetreelocation[s];if((m==1)){var B=filetreelocation[s].split("/");y=window.location+B[0]+"files/"+B[2];filetreelinkpath+=filetreelocation[s]}else{if(filetreelinkpath!=""){filetreelinkpath+="/"+filetreelocation[s];if(m>2){y+="/"+filetreelocation[s]}}}k=k.f[filetreelocation[s]];c+=" / <a style=cursor:pointer onclick=p5folderup("+m+")>"+(k.n!=null?k.n:filetreelocation[s])+"</a>";m++}else{break}}filetreelocation=j;var w=o.toLowerCase().startsWith("root / "+userinfo._id+" / public");var l=p5sort_files(k.f);for(var s in l){var d=l[s],u=d.n,A;A=u;if(u.length>70){A='<span title="'+EscapeHtml(u)+'">'+EscapeHtml(u.substring(0,70))+"...</span>"}else{A=EscapeHtml(u)}u=EscapeHtml(u);var g="";if(d.d!=null){var e=new Date(d.d),g=(e.getMonth()+1)+"/"+(e.getDate())+"/"+e.getFullYear()+" "+e.toLocaleTimeString()+"&nbsp;"}var n="";if(d.s!=null){n=getFileSizeStr(d.s)}var p="";if(d.t<3||d.t==4){var z=(d.t==1||d.t==4)?p5getQuotabar(d):"",C="";p="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+u+"'>&nbsp;<span style=float:right title=\""+C+'">'+z+"</span><span><div class=fileIcon"+d.t+' onclick=p5folderset("'+encodeURIComponent(d.nx)+'")></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(d.nx)+'")>'+A+"</a></span></div>"}else{var t=A;var x="";if(w){x=' (<a style=cursor:pointer title="Display public link" onclick=\'p5showPublicLink("'+y+"/"+d.nx+"\")'>Link</a>)"}if(d.s>0){t='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+d.nx)+'">'+A+"</a>"+x}p="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+d.nx+"'>&nbsp;<span class=fsize>"+g+"</span><span style=float:right>"+n+"</span><span><div class=fileIcon"+d.t+"></div>"+t+"</span></div>"}if(d.t<3){q+=p}else{r+=p}}QH("p5rightOfButtons",p5getQuotabar(k));QH("p5files",q+r);QH("p5currentpath",c);QE("p5FolderUp",filetreelocation.length!=0);QV("p5PublicShare",w);if(v==filetreelinkpath){a=document.getElementsByName("fc");for(var s=0;s<a.length;s++){a[s].checked=(b.indexOf(a[s].value)>=0)}}p5setActions()}function getNiceSize(a){if(a<=0){return"Storage limit exceed"}if(a<2048){return a+" bytes remaining"}if(a<2097152){return Math.round(a/1024)+" kilobytes remaining"}if(a<2147483648){return Math.round(a/1024/1024)+" megabytes remaining"}return Math.round(a/1024/1024/1024)+" gigabytes remaining"}function getNiceSize2(a){if(a<=0){return"None"}if(a<2048){return a+" b"}if(a<2097152){return Math.round(a/1024)+" Kb"}if(a<2147483648){return Math.round(a/1024/1024)+" Mb"}return Math.round(a/1024/1024/1024)+" Gb"}function p5getQuotabar(a){while(a.t>1&&a.t!=4){a=a.parent}if((a.t!=1&&a.t!=4)||(a.maxbytes==null)){return""}var b=Math.floor(a.s/1024),c=(a.maxbytes-a.s);return'<span title="'+b+"k in "+a.c+" file"+(a.c>1?"s":"")+". "+(Math.floor(a.maxbytes/1024/1024))+'k maxinum">'+getNiceSize(c)+" <progress style=height:10px;width:100px value="+a.s+" max="+a.maxbytes+" /></span>"}function p5showPublicLink(a){setDialogMode(2,"Public Link",1,null,'<input type=text style=width:100% value="'+a+'" readonly />')}var sortorder;function p5sort_filename(c,d){if(c.ln>d.ln){return(1*sortorder)}if(c.ln<d.ln){return(-1*sortorder)}return 0}function p5sort_timestamp(c,d){if(c.d>d.d){return(1*sortorder)}if(c.d<d.d){return(-1*sortorder)}return 0}function p5sort_bysize(c,d){if(c.s==d.s){return p5sort_filename(c,d)}return(((c.s-d.s))*sortorder)}function p5sort_files(a){var c=[],d=Q("p5sortdropdown").value;for(var b in a){a[b].nx=b;if(a[b].n==null){a[b].n=b}a[b].ln=a[b].n.toLowerCase();c.push(a[b])}sortorder=1;if(d>3){sortorder=-1;d-=3}if(d==1){c.sort(p5sort_filename)}else{if(d==2){c.sort(p5sort_bysize)}else{if(d==3){c.sort(p5sort_timestamp)}}}return c}function p5setActions(){var a=getFileSelCount(),c=getFileCount(),b=getFileSelCount(false);QE("p5DeleteFileButton",(a>0)&&(filetreelocation.length>0));QE("p5NewFolderButton",filetreelocation.length>0);QE("p5UploadButton",filetreelocation.length>0);QE("p5RenameFileButton",(a==1)&&(filetreelocation.length>0));QE("p5SelectAllButton",c>0);Q("p5SelectAllButton").value=(a>0?"Select None":"Select All");QE("p5CutButton",(b>0)&&(a==b));QE("p5CopyButton",(b>0)&&(a==b));QE("p5PasteButton",(p5clipboard!=null)&&(p5clipboard.length>0)&&(filetreelocation.length>0))}function getFileSelCount(d){var a=0,b=document.getElementsByName("fc");for(var c=0;c<b.length;c++){if((b[c].checked)&&((d!=false)||(b[c].attributes.file.value=="3"))){a++}}return a}function getFileSelDirCount(){var a=0,b=document.getElementsByName("fc");for(var c=0;c<b.length;c++){if((b[c].checked)&&(b[c].attributes.file.value=="999")){a++}}return a}function getFileCount(){var a=0;var b=document.getElementsByName("fc");return b.length}function p5selectallfile(){var c=(getFileSelCount()==0),a=document.getElementsByName("fc");for(var b=0;b<a.length;b++){a[b].checked=c}p5setActions()}function setupBackPointers(d){if(d.f!=null){var b=0,a=0;for(var c in d.f){setupBackPointers(d.f[c]);d.f[c].parent=d;if(d.f[c].s){b+=d.f[c].s}if(d.f[c].c){a+=d.f[c].c}if(d.f[c].t==3){a++}}d.s=b;d.c=a}return d}function getFileSizeStr(a){if(a==1){return"1 byte"}return""+a+" bytes"}function p5folderup(a){if(a==null){filetreelocation.pop()}else{while(filetreelocation.length>a){filetreelocation.pop()}}updateFiles()}function p5folderset(a){filetreelocation.push(decodeURIComponent(a));updateFiles()}function p5createfolder(){setDialogMode(2,"New Folder",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />");focusTextBox("p5renameinput");p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var a=getFileSelCount(),b=(getFileSelDirCount()>0)?"<br /><br /><input type=checkbox id=p5recdeleteinput>Recursive delete<br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,(a>1)?("Delete "+a+" selected items?"+b):("Delete selected item?"+b))}function p5deletefileEx(){var b=[],a=document.getElementsByName("fc");for(var c=0;c<a.length;c++){if(a[c].checked){b.push(a[c].value)}}meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:b,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){var c,a=document.getElementsByName("fc");for(var b=0;b<a.length;b++){if(a[b].checked){c=a[b].value}}setDialogMode(2,"Rename",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+c+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:c});focusTextBox("p5renameinput");p5fileNameCheck()}function p5renamefileEx(a,c){c.newname=Q("p5renameinput").value;meshserver.send(c)}function p5fileNameCheck(a){var b=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",b);if((b==true)&&(a&&a.keyCode==13)){dialogclose(1)}}var isFilenameValid=(function(){var b=/^[^\\/:\*\?"<>\|]+$/,c=/^\./,d=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function a(e){return b.test(e)&&!c.test(e)&&!d.test(e)&&(e[0]!=".")}})();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=submit id=p5loginSubmit style=display:none /></form>');updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(a){QE("idx_dlgOkButton",Q(a).value!="")}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(b){var a=document.getElementsByName("fc");p5clipboard=[];p5clipboardCut=b,p5clipboardFolder=Clone(filetreelocation);for(var c=0;c<a.length;c++){if((a[c].checked)&&(a[c].attributes.file.value=="3")){p5clipboard.push(a[c].value)}}p5updateClipview()}function p5pasteFile(){var a="";if((p5clipboard!=null)&&(p5clipboard.length>0)){a="Confim "+(p5clipboardCut==0?"copy":"move")+" of "+p5clipboard.length+" entrie"+((p5clipboard.length>1)?"s":"")+" to this location?"}setDialogMode(2,"Paste",3,p5pasteFileEx,a)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:(p5clipboardCut==0?"copy":"move"),scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard});p5folderup(999);if(p5clipboardCut==1){p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;p5updateClipview()}}function p5updateClipview(){var a="";if((p5clipboard!=null)&&(p5clipboard.length>0)){a="Holding "+p5clipboard.length+" entrie"+((p5clipboard.length>1)?"s":"")+" for "+(p5clipboardCut==0?"copy":"move")+", <a onclick=p5clearClip() style=cursor:pointer>Clear</a>."}QH("p5bottomstatus",a);p5setActions()}function p5clearClip(){p5clipboard=null;p5clipboardFolder=null;p5clipboardCut=0;p5updateClipview()}function p5fileDragDrop(b){if(xxdialogMode){return}haltEvent(b);QV("bigfail",false);QV("bigok",false);var c=0;p5uploadFile();try{Q("p5uploadinput").files=b.dataTransfer.files}catch(d){c=1}if(c==0){p5uploadFileEx()}setDialogMode(0);if(c==1){if(b.dataTransfer==null||b.dataTransfer.files.length==0||filetreelocation.length==0){return}var j=[],m=[],o=[],a=[],l=b.dataTransfer.files.length,n=0;for(var h=0;h<b.dataTransfer.files.length;h++){n+=b.dataTransfer.files[h].size}if(n>1300000){p5uploadFile();return}for(var h=0;h<b.dataTransfer.files.length;h++){var k=new FileReader(),g=b.dataTransfer.files[h];j.push(g.name);m.push(g.size);o.push(g.type);k.onload=function(e){a.push(e.target.result);if(--l==0){Q("p5fileDragName").value=j.join("*");Q("p5fileDragSize").value=m.join("*");Q("p5fileDragType").value=o.join("*");Q("p5fileDragData").value=a.join("*");Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath);Q("p5loginSubmit2").click()}};k.readAsDataURL(g)}}}var p5dragtimer=null;function p5fileDragOver(b){if(xxdialogMode){return}haltEvent(b);if(p5dragtimer!=null){clearTimeout(p5dragtimer);p5dragtimer=null}var a=true;if(filetreelocation.length==0){a=false}QV("bigok",a);QV("bigfail",!a)}function p5fileDragLeave(a){if(xxdialogMode){return}haltEvent(a);if(a.target.id!="p5filetable"){QV("bigfail",false);QV("bigok",false)}else{p5dragtimer=setTimeout(function(){QV("bigfail",false);QV("bigok",false);p5dragtimer=null},10)}}function eventMouseHover(a,b){a.children[1].classList.remove("g1s");a.children[2].style["background-color"]=((b==0)?"#c9c9c9":"#b9b9b9");a.children[3].classList.remove("g2s");if(b==1){a.children[1].classList.add("g1s");a.children[3].classList.add("g2s")}}function eventsUpdate(){var h="",a=null;for(var c in events){var b=events[c],g=new Date(b.time);if(g.toLocaleDateString()!=a){if(a!=null){h+="</table>"}h+="<table style=width:100% cellpadding=0 cellspacing=0><tr><td colspan=4 class=DevSt>"+g.toLocaleDateString()+"</td></tr>";a=g.toLocaleDateString()}var d="si3";if(b.etype=="user"){d="m2"}if(b.etype=="server"){d="si3"}var e=b.msg.split("(R)").join("&reg;");if(b.username&&b.username!=userinfo.name){e+=": "+b.username}h+="<tr onmouseover=eventMouseHover(this,1) onmouseout=eventMouseHover(this,0) style=cursor:pointer><td style=width:18px><div class="+d+"></div></td><td class=g1 style=float:none>&nbsp;</td><td style=background-color:#C9C9C9>"+g.toLocaleTimeString()+" - "+e+"</td><td class=g2 style=float:none>&nbsp;</td></tr><tr style=height:2px></tr>"}if(a!=null){h+="</table>"}if(h==""){h="<br><i>No Events Found</i><br><br>"}QH("p3events",h)}function showDeleteAllEventsDialog(){if(xxdialogMode){return}var a="Delete all events in the server event log?<br /><br />";a+="<input id=p3check type=checkbox onchange=validateDeleteAllEventsDialog() />Confirm";setDialogMode(2,"Delete All Events",3,showDeleteAllEventsDialogEx,a);validateDeleteAllEventsDialog()}function validateDeleteAllEventsDialog(){QE("idx_dlgOkButton",Q("p3check").checked)}function showDeleteAllEventsDialogEx(a,b){meshserver.send({action:"clearevents"})}function refreshEvents(){meshserver.send({action:"events",limit:parseInt(p3limitdropdown.value)})}function updateUsers(){QV("MainMenuMyUsers",(users!=null)&&((features&4)==0));QV("LeftMenuMyUsers",(users!=null)&&((features&4)==0));QV("UserNewAccountButton",((features&4)==0)&&(serverinfo.domainauth==false));if((users==null)||((features&4)!=0)){QH("p3users","");return}var g=[],d=100,b=0;for(var c in users){g.push(c)}g.sort();var j=Q("UserSearchInput").value.toLowerCase();var k="<table style=width:100% cellpadding=0 cellspacing=0>",a=true;k+="<th style=color:gray>Name<th style=color:gray;width:80px>Groups<th style=color:gray;width:120px>Last&nbsp;Access<th style=color:gray;width:120px>Permissions";for(var c in g){var h=users[g[c]],e=null;if(wssessions!=null){e=wssessions[h._id]}if((e!=null)&&(h.name.toLowerCase().indexOf(j)>=0)){if(d>0){if(a){k+="<tr><td class=userTableHeader colspan=4>Online Users";a=false}k+=addUserHtml(h,e);d--}else{b++}}}a=true;for(var c in g){var h=users[g[c]],e=null;if(wssessions!=null){e=wssessions[h._id]}if((e==null)&&(h.name.toLowerCase().indexOf(j)>=0)){if(d>0){if(a){k+="<tr><td class=userTableHeader colspan=4>Offline Users";a=false}k+=addUserHtml(h,e);d--}else{b++}}}k+="</table>";if(b==1){k+="<br />1 more user not shown, use search box to look for users...<br />"}else{if(b>1){k+="<br />"+b+" more users not shown, use search box to look for users...<br />"}}if(d==100){k+="<br />No users found.<br />"}QH("p3users",k);if((currentUser!=null)&&(xxcurrentView==30)){gotoUser(encodeURIComponent(currentUser._id),true)}}function addUserHtml(m,l){var o="",b=" gray",e="m2",h="",k=(m.name!=userinfo.name),g="",j="";if(l!=null){b="";if(k){h='<span style=float:right;margin-top:1px;margin-right:4px title=Chat><a onclick=userChat(event,"'+encodeURIComponent(m._id)+'","'+encodeURIComponent(m.name)+"\")><img src='images/icon-chat.png' height=16 width=16 style=padding-top:2px /></a></span>";h+='<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a onclick=showUserAlertDialog(event,"'+encodeURIComponent(m._id)+"\")><img src='images/icon-notify.png' height=16 width=16 style=padding-top:2px /></a></span>"}if(l==1){g+="1&nbsp;session"}else{g+=l+"&nbsp;sessions"}}else{if(m.login){g+='<span title="Last login: '+new Date(m.login*1000).toLocaleString()+'">'+new Date(m.login*1000).toLocaleDateString()+"</span>"}}if(k){j+='<a style=cursor:pointer onclick=showUserAdminDialog(event,"'+encodeURIComponent(m._id)+'")>'}if((m.siteadmin!=null)&&((m.siteadmin&32)!=0)&&(m.siteadmin!=4294967295)){j+="Locked,&nbsp;"}j+="<span title='Server Permissions'>";if((m.siteadmin==null)||(m.siteadmin==0)||(m.siteadmin==32)){j+="User"}else{if(m.siteadmin==8){j+="User + Files"}else{if(m.siteadmin==4294967295){j+="Administrator"}else{j+="Partial"}}}j+="</span>";if(k){j+="</a>"}var c=0;if(m.links){for(var d in m.links){c++}}var n=EscapeHtml(m.name),a="";if(serverinfo.emailcheck==true){a=((m.emailVerified!=true)?' <b style=color:red title="Email is not verified">&#x1F5F4</b>':' <b style=color:green title="Email is verified">&#x1F5F8</b>')}if(m.email!=null){n+=', <a onclick=doemail(event,"'+m.email+'")>'+m.email+"</a>"+a}if((m.otpsecret>0)||(m.otphkeys>0)){n+=' <img src="images/key12.png" height=12 width=11 title="2nd factor authentication enabled" style="margin-top:2px" />'}if((m.siteadmin!=null)&&((m.siteadmin&32)!=0)&&(m.siteadmin!=4294967295)){n+=' <img src="images/padlock12.png" height=12 width=8 title="Account is locked" style="margin-top:2px" />'}o+='<tr onmouseover=userMouseHover(this,1) onmouseout=userMouseHover(this,0)><td style=cursor:pointer onclick=gotoUser("'+encodeURIComponent(m._id)+'")>';o+="<div class=bar style=height:24px;width:100%;font-size:medium>";o+='<div style=float:left;height:24px;width:24px;background-color:white><div class="'+e+b+'" style=width:16px;margin-top:4px;margin-left:2px;height:16px></div></div>';o+="<div class=g1 style=height:24px;float:left></div><div class=g2 style=height:24px;float:right></div>";o+="<div><span>"+n+"</span>"+h+"</div></div><td style=text-align:center>"+c+"<td style=text-align:center>"+g+"<td style=text-align:center>"+j;return o}function userMouseHover(b,c){var a=b.children[0].children[0];a.children[1].classList.remove("g1s");a.children[2].classList.remove("g2s");if(c==1){a.children[1].classList.add("g1s");a.children[2].classList.add("g2s")}b.children[0].children[0].style["background-color"]=((c==0)?"#c9c9c9":"#b9b9b9")}function userChat(a,d,b){haltEvent(a);var c="/messenger?id=meshmessenger/"+d+"/"+encodeURIComponent(userinfo._id)+"&title="+b;if((authCookie!=null)&&(authCookie!="")){c+="&auth="+authCookie}window.open(c,"meshmessenger:"+d);meshserver.send({action:"meshmessenger",userid:decodeURIComponent(d)});return false}function showUserAlertDialog(a,b){if(xxdialogMode){return}haltEvent(a);setDialogMode(2,"Notify "+EscapeHtml(users[decodeURIComponent(b)].name),3,showUserAlertDialogEx,'Send a text notification to this user.<textarea id=d2notifyText maxlength=2048 style="width:100%;height:184px;resize:none"></textarea>',b);Q("d2notifyText").focus();return false}function showUserAlertDialogEx(a,b){meshserver.send({action:"notifyuser",userid:decodeURIComponent(b),msg:Q("d2notifyText").value})}function doemail(b,a){if(xxdialogMode){return}haltEvent(b);window.open("mailto:"+a);return false}function showUserBroadcastDialog(){if(xxdialogMode){return}var a='Broadcast a message to all connected users.<textarea id=broadcastMessage value="" style=width:370px;height:100px;resize:none maxlength=256 /></textarea>';setDialogMode(2,"Broadcast Message",3,showUserBroadcastDialogEx,a);Q("broadcastMessage").focus()}function showUserBroadcastDialogEx(){meshserver.send({action:"userbroadcast",msg:Q("broadcastMessage").value})}function showCreateNewAccountDialog(){if(xxdialogMode){return}var d="";d+=addHtmlValue("Name","<input id=p4name style=width:230px maxlength=64 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+=addHtmlValue("Email","<input id=p4email style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+=addHtmlValue("Password","<input id=p4pass1 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+=addHtmlValue("Password","<input id=p4pass2 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate() onkeyup=showCreateNewAccountDialogValidate() />");d+="<div><input id=p4resetNextLogin type=checkbox />Force password reset on next login.</div>";if(passRequirements){var b=[],c=0;for(var a in passRequirements){if((a!="reset")&&(a!="hint")){b.push(a+":"+passRequirements[a]);c++}}if(c>0){d+="<div style=font-size:x-small;padding:6px>Requirements: "+b.join(", ")+".</div>"}}setDialogMode(2,"Create Account",3,showCreateNewAccountDialogEx,d);showCreateNewAccountDialogValidate();Q("p4name").focus()}function showCreateNewAccountDialogValidate(b){if((b==null)&&(Q("p4email").value.length>0)&&(validateEmail(Q("p4email").value))==false){QE("idx_dlgOkButton",false);return}var a=(!Q("p4name")||((Q("p4name").value.length>0)&&(Q("p4name").value.indexOf(" ")==-1)))&&Q("p4pass1").value.length>0&&Q("p4pass1").value==Q("p4pass2").value&&checkPasswordRequirements(Q("p4pass1").value,passRequirements);if(a&&passRequirements){if(checkPasswordRequirements(Q("p4pass1").value,passRequirements)==false){a=false}}QE("idx_dlgOkButton",a)}function showCreateNewAccountDialogEx(){meshserver.send({action:"adduser",username:Q("p4name").value,email:Q("p4email").value,pass:Q("p4pass1").value,resetNextLogin:Q("p4resetNextLogin").checked})}function showUserAdminDialog(a,c){if(xxdialogMode){return}haltEvent(a);c=decodeURIComponent(c);var d="<div>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_fileaccess>Server Files, <input type=number onchange=showUserAdminDialogValidate() maxlength=10 style=width:80px;text-align:right id=ua_fileaccessquota>k max, blank for default<br><hr/>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_fulladmin>Full Administrator<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_serverbackup>Server Backup<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_serverrestore>Server Restore<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_serverupdate>Server Updates<br>";d+="<input type=checkbox onchange=showUserAdminDialogValidate() id=ua_manageusers>Manage Users<br>";d+="<hr/><input type=checkbox onchange=showUserAdminDialogValidate() id=ua_lockedaccount>Lock Account<br>";d+="</div>";var b=users[c.toLowerCase()];setDialogMode(2,"Server Permissions",3,showUserAdminDialogEx,d,b);if(b.siteadmin&&b.siteadmin!=0){Q("ua_fulladmin").checked=(b.siteadmin==4294967295);Q("ua_serverbackup").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&1)!=0));Q("ua_manageusers").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&2)!=0));Q("ua_serverrestore").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&4)!=0));Q("ua_fileaccess").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&8)!=0));Q("ua_serverupdate").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&16)!=0));Q("ua_lockedaccount").checked=((b.siteadmin!=4294967295)&&((b.siteadmin&32)!=0))}QE("ua_fulladmin",userinfo.siteadmin==4294967295);QE("ua_serverbackup",userinfo.siteadmin==4294967295);QE("ua_manageusers",userinfo.siteadmin==4294967295);QE("ua_serverrestore",userinfo.siteadmin==4294967295);QE("ua_fileaccess",userinfo.siteadmin==4294967295);QE("ua_serverupdate",userinfo.siteadmin==4294967295);Q("ua_fileaccessquota").value=(b.quota!=null)?(b.quota/1024):"";showUserAdminDialogValidate();return false}function showUserAdminDialogValidate(){if(userinfo.siteadmin==4294967295){QE("ua_serverbackup",!Q("ua_fulladmin").checked);QE("ua_manageusers",!Q("ua_fulladmin").checked);QE("ua_serverrestore",!Q("ua_fulladmin").checked);QE("ua_fileaccess",!Q("ua_fulladmin").checked);QE("ua_serverupdate",!Q("ua_fulladmin").checked);QE("ua_fileaccessquota",Q("ua_fileaccess").checked&&!Q("ua_fulladmin").checked)}}function showUserAdminDialogEx(a,d){var c=0,b=parseInt(Q("ua_fileaccessquota").value);if(Q("ua_fulladmin").checked==true){c=4294967295}else{if(Q("ua_serverbackup").checked==true){c+=1}if(Q("ua_manageusers").checked==true){c+=2}if(Q("ua_serverrestore").checked==true){c+=4}if(Q("ua_fileaccess").checked==true){c+=8}if(Q("ua_serverupdate").checked==true){c+=16}if(Q("ua_lockedaccount").checked==true){c+=32}}var e={action:"edituser",name:d.name,siteadmin:c};if(isNaN(b)==false){e.quota=(b*1024)}meshserver.send(e)}function onUserSearchInputChanged(){updateUsers()}var currentUser=null;function gotoUser(q,g){if(xxdialogMode&&!g){return}var p=currentUser=users[decodeURIComponent(q)];if(p==null){setDialogMode(0);go(4);return}QH("p30userName",p.name);QH("p31userName",p.name);var o=(p.name==userinfo.name),a=0;if(wssessions!=null&&wssessions[p._id]){a=wssessions[p._id]}Q("MainUserImage").classList.remove("gray");if(a==0){Q("MainUserImage").classList.add("gray")}var l="",n="";if((p.siteadmin!=null)&&((p.siteadmin&32)!=0)&&(p.siteadmin!=4294967295)){n='<img src="images/padlock12.png" height=12 width=8 title="Account is locked" style="margin-top:2px" /> ';l+="Locked account, "}if((p.siteadmin==null)||(p.siteadmin==0)||(p.siteadmin==32)){l+="No server rights"}else{if(p.siteadmin==8){l+="Access to server files"}else{if(p.siteadmin==4294967295){l+="Full administrator"}else{l+="Partial rights"}}}var r="<div style=min-height:80px><table style=width:100%>";var c=p.email?EscapeHtml(p.email):"<i>Not set</i>",d="";if(serverinfo.emailcheck){d=((p.emailVerified==true)?'<b style=color:green;cursor:pointer title="Email is verified">&#x1F5F8</b> ':'<b style=color:red;cursor:pointer title="Email not verified">&#x1F5F4</b> ')}r+=addDeviceAttribute("Email",d+'<a style=cursor:pointer onclick=p30showUserEmailChangeDialog(event,"'+q+'")>'+c+'</a> <a style=cursor:pointer onclick=doemail(event,"'+p.email+'")><img class=hoverButton width=10 height=10 src="images/link1.png" /></a>');r+=addDeviceAttribute("Server Rights",n+'<a style=cursor:pointer onclick=showUserAdminDialog(event,"'+q+'")>'+l+"</a>");if(p.quota){r+=addDeviceAttribute("Server Quota",EscapeHtml(parseInt(p.quota)/1024)+" k")}r+=addDeviceAttribute("Creation",new Date(p.creation*1000).toLocaleString());if(p.login){r+=addDeviceAttribute("Last Login",new Date(p.login*1000).toLocaleString())}if(p.passchange==-1){r+=addDeviceAttribute("Password","Will be changed on next login.")}else{if(p.passchange){r+=addDeviceAttribute("Password","Last changed: "+new Date(p.passchange*1000).toLocaleString())}}var j=0,k="<i>None<i>";if(p.links){for(var h in p.links){j++}if(j==1){k="1 group"}else{if(j>1){k=j+" groups"}}}r+=addDeviceAttribute("Device Groups",k);var m=0;if((p.otpsecret>0)||(p.otphkeys>0)){m=1;var e=[];if(p.otpsecret>0){e.push("Authentication App")}if(p.otphkeys>0){e.push("Security Key")}if(p.otpkeys>0){e.push("Backup Codes")}r+=addDeviceAttribute("Security",'<img src="images/key12.png" height=12 width=11 title="2nd factor authentication enabled" style="margin-top:2px" /> '+e.join(", "))}r+="</table></div><br />";r+='<input type=button value=Notes title="View notes about this user" onclick=showNotes(false,"'+q+'") />';if(!o&&(a>0)){r+='<input type=button value=Notify title="Send user notification" onclick=showUserAlertDialog(event,"'+q+'") />'}QH("p30html",r);drawUserTimeline();var b=true;if(p._id==userinfo._id){b=false}if(p.siteadmin&&p.siteadmin>0&&userinfo.siteadmin!=4294967295){b=false}r="<div style=float:right;font-size:x-small>";if(b){r+='<a style=cursor:pointer onclick=p30showDeleteUserDialog() title="Remove this user">Delete User</a>'}r+="</div><div style=font-size:x-small>";if(userinfo.siteadmin==4294967295){r+="<a style=cursor:pointer onclick=p30showUserChangePassDialog("+m+') title="Change the password for this user">Change Password</a>'}r+="</div><br>";QH("p30html3",r);r="";if(a==1){r="1 active session"}else{if(a>1){r=a+" active sessions"}}QH("MainUserState",r);go(30);QH("p31events","");refreshUsersEvents()}function p30showUserEmailChangeDialog(a){if(xxdialogMode){return}var b="";b+=addHtmlValue("Email","<input id=dp30email style=width:230px maxlength=32 onchange=p30validateEmail() onkeyup=p30validateEmail() />");if(serverinfo.emailcheck){b+=addHtmlValue("Status","<select id=dp30verified style=width:230px onchange=p30validateEmail()><option value=0>Not verified</option><option value=1>Verified</option></select>")}setDialogMode(2,"Change Email for "+EscapeHtml(currentUser.name),3,p30showUserEmailChangeDialogEx,b);Q("dp30email").focus();Q("dp30email").value=currentUser.email;if(serverinfo.emailcheck){Q("dp30verified").value=currentUser.emailVerified?1:0}p30validateEmail()}function p30validateEmail(){var a=Q("dp30email").value,b=a.split("@");b=(b.length==2)&&(b[0].length>0)&&(b[1].split(".").length>1)&&(b[1].length>2)&&(a.length<1024)&&((a!=userinfo.email)||((serverinfo.emailcheck==true)&&(Q("dp30verified").value!=(userinfo.emailVerified?1:0))));QE("idx_dlgOkButton",b)}function p30showUserEmailChangeDialogEx(){var a={action:"edituser",name:currentUser.name,email:Q("dp30email").value};if(serverinfo.emailcheck){a.emailVerified=(Q("dp30verified").value==1)}meshserver.send(a)}function p30showUserChangePassDialog(b){if(xxdialogMode){return}var e="";e+=addHtmlValue("Password","<input id=p4pass1 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate(1) onkeyup=showCreateNewAccountDialogValidate(1)></input>");e+=addHtmlValue("Password","<input id=p4pass2 type=password style=width:230px maxlength=256 onchange=showCreateNewAccountDialogValidate(1) onkeyup=showCreateNewAccountDialogValidate(1)></input>");if(features&65536){e+=addHtmlValue("Password hint","<input id=p4hint type=text style=width:230px maxlength=256></input>")}if(passRequirements){var c=[],d=0;for(var a in passRequirements){if((a!="reset")&&(a!="hint")){c.push(a+":"+passRequirements[a]);d++}}if(d>0){e+="<div style=font-size:x-small;padding:6px>Requirements: "+c.join(", ")+".</div>"}}e+="<div><input id=p4resetNextLogin type=checkbox />Force password reset on next login.</div>";if(b==1){e+="<div><input id=p4twoFactorRemove type=checkbox />Remove all 2nd factor authentication.</div>"}setDialogMode(2,"Change Password for "+EscapeHtml(currentUser.name),3,p30showUserChangePassDialogEx,e,b);showCreateNewAccountDialogValidate(1);Q("p4pass1").focus()}function p30showUserChangePassDialogEx(a,e){var d=false;if((e==1)&&(Q("p4twoFactorRemove").checked==true)){d=true}if(Q("p4pass1").value==Q("p4pass2").value){var c={action:"changeuserpass",user:currentUser.name,pass:Q("p4pass1").value,removeMultiFactor:d,resetNextLogin:Q("p4resetNextLogin").checked};if(features&65536){c.hint=Q("p4hint").value}meshserver.send(c)}}function p30showDeleteUserDialog(){if(xxdialogMode){return}setDialogMode(2,"Delete User "+EscapeHtml(currentUser.name),3,p30showDeleteUserDialogEx,"Confirm deletion of user "+EscapeHtml(currentUser.name)+"?")}function p30showDeleteUserDialogEx(){meshserver.send({action:"deleteuser",userid:currentUser._id,username:currentUser.name})}function drawUserTimeline(){var s=null,o=Date.now();s=[];var e=new Date();e.setHours(0,0,0,0);e=new Date(e.getTime()-(1000*60*60*24*6));var u=e.getTime();var t=[];if(s!=null&&s.length>1){t.push([0,s[1],s[0]]);var c=s[1];for(var m=2;m<s.length;m+=2){var p=s[m],k=o;if(s.length>(m+1)){k=s[m+1]}t.push([c,c+k,p]);c=c+k}}var z="",b=1,h=new Date();h.setHours(0,0,0,0);for(var m=0;m<7;m++){var g="",q=h.getTime(),l=q+(1000*60*60*24);for(var n in t){var a=t[n];if(isTimeBlockInside(q,l,a[0],a[1])==true){var w=Math.max(q,a[0]);var r=Math.min(Math.min(l,a[1]),o);var y=Math.round((r-w)/112794);if(y>0){var v=powerStateStrings2[a[2]]+" from "+new Date(w).toLocaleTimeString()+" to "+new Date(r).toLocaleTimeString()+".";g+='<div title="'+v+'" style=display:table-cell;width:'+y+"px;background-color:"+powerColor(a[2])+";height:16px></div>"}}}z+="<tr style="+(((b%2)==0)?"background-color:#DDD":"")+"><td><div>&nbsp;"+h.toLocaleDateString()+"<div></div></div></td><td><div>"+g+"</div></td></tr>";++b;h=new Date(h.getTime()-(1000*60*60*24))}QH("p30html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:150px>Day</th><th scope=col style=text-align:center>7 Day Login State</th></tr>'+z+"</tbody></table>")}var currentUserEvents=null;function userEventsUpdate(){var h="",a=null;for(var c in currentUserEvents){var b=currentUserEvents[c];var g=new Date(b.time);if(g.toLocaleDateString()!=a){if(a!=null){h+="</table>"}h+="<table style=width:100% cellpadding=0 cellspacing=0><tr><td class=DevSt>"+g.toLocaleDateString()+"</td></tr>";a=g.toLocaleDateString()}var d="si3";if(b.etype=="user"){d="m2"}if(b.etype=="server"){d="si3"}var e=b.msg.split("(R)").join("&reg;");if(b.username&&b.username!=userinfo.name){e+=": "+b.username}h+="<tr><td><div class=bar18 style=height:18px;width:100%;font-size:medium>";h+="<div style=float:left;height:18px;width:18px;background-color:white><div class="+d+" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>";h+="<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>";h+="<div style=font-size:14px><span style=width:300px>"+g.toLocaleTimeString()+" - "+e+"</span></div></div></td></tr>"}if(a!=null){h+="</table>"}if(h==""){h="<br><i>No Events Found</i><br><br>"}QH("p31events",h)}function refreshUsersEvents(){meshserver.send({action:"events",limit:parseInt(p31limitdropdown.value),user:currentUser.name})}function d3init(){Q("d3localFile").value="";d3modechange()}function d3modechange(){var a=Q("d3uploadMode").value;QV("d3localmode",a==1);QV("d3servermode",a==2);if(a==1){d3setActions()}else{d3updatefiles()}}var d3filetreelinkpath;var d3filetreelocation=[];function d3updatefiles(){if(Q("d3uploadMode").value==1){return}var m="",n="",e=filetree,j=1;var c=[],r=d3filetreelinkpath,b=[],a=document.getElementsByName("fc");for(var o=0;o<a.length;o++){if(a[o].checked){b.push(a[o].value)}}d3filetreelinkpath="";for(var o in d3filetreelocation){if((e.f!=null)&&(e.f[d3filetreelocation[o]]!=null)){c.push(d3filetreelocation[o]);if((j==1)){var t=d3filetreelocation[o].split("/");publicPath=window.location+t[0]+"files/"+t[2];if(d3filetreelocation[o]===userinfo._id){d3filetreelinkpath+="self"}else{d3filetreelinkpath+=(t[0]+"/"+t[2])}}else{if(d3filetreelinkpath!=""){d3filetreelinkpath+="/"+d3filetreelocation[o];if(j>2){publicPath+="/"+d3filetreelocation[o]}}}e=e.f[d3filetreelocation[o]];j++}else{break}}d3filetreelocation=c;var g=p5sort_files(e.f);for(var o in g){var d=g[o],q=d.n,s;s=q;if(q.length>70){s='<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,70))+"...</span>"}else{s=EscapeHtml(q)}q=EscapeHtml(q);var k="";if(d.s!=null){k=getFileSizeStr(d.s)}var l="";if(d.t<3){var u="";l='<div class=filelist file=999><span style=float:right title="'+u+'"></span><span><div class=fileIcon'+d.t+' onclick=d3folderset("'+encodeURIComponent(d.nx)+'")></div>&nbsp;<a style=cursor:pointer onclick=d3folderset("'+encodeURIComponent(d.nx)+'")>'+s+"</a></span></div>"}else{var p=s;l="<div class=filelist file=3><input style=float:left name=fcx class=fcb type=checkbox onchange=d3setActions() value='"+d.nx+"'>&nbsp;<span style=float:right>"+k+"</span><span><div class=fileIcon"+d.t+"></div>"+p+"</span></div>"}if(d.t<3){m+=l}else{n+=l}}QH("d3serverfiles",m+n);QE("p3FolderUp",d3filetreelocation.length>0);d3setActions()}function d3folderset(a){d3filetreelocation.push(decodeURIComponent(a));d3updatefiles()}function d3folderup(a){if(a==null){d3filetreelocation.pop()}else{while(d3filetreelocation.length>a){d3filetreelocation.pop()}}d3updatefiles()}function d3getFileSel(){var a=[];var b=document.getElementsByName("fcx");for(var c=0;c<b.length;c++){if(b[c].checked){a.push(b[c].value)}}return a}function d3setActions(){var a=Q("d3uploadMode").value;if(a==1){QE("idx_dlgOkButton",Q("d3localFile").value.length>0)}else{QE("idx_dlgOkButton",d3getFileSel().length==1)}}var notifications=[];function clickNotificationIcon(a){if(a==true){QV("notifiyBox",true)}else{if(a==false){QV("notifiyBox",false)}else{QV("notifiyBox",QS("notifiyBox")["display"]=="none")}}drawNotifications()}function setNotificationCount(a){if(parseInt(Q("notificationCount").innerHTML)==a){return}QH("notificationCount",a);QS("notificationCount")["background-color"]=(a==0)?"lightblue":"orange";QV("notificationCount",a>0)}function drawNotifications(){var j="";if(notifications.length==0){j="<div style=margin:5px>There are currently no notifications</div>"}else{for(var c in notifications){var g=notifications[c];var k="";var a=new Date(g.time);var e=0;if(g.nodeid!=null){var h=getNodeFromId(g.nodeid);if(h!=null){e=h.icon;k="<b>"+h.name+"</b>: "}}j+='<div title="Occured at '+a.toLocaleString()+'" id="notifyx'+g.id+'" class=notification style="cursor:pointer;border-top:1px solid '+((j=="")?"transparent":"orange")+'"><div class=j'+e+' onclick="notificationSelected('+g.id+')" style=margin:5px;float:left></div><div onclick="notificationDelete('+g.id+')" class=unselectable title="Clear this notification" style=margin:5px;float:right;color:orange><b>X</b></div><div onclick="notificationSelected('+g.id+')" style=margin:5px>'+k+g.text+"</div></div>"}}var b="";if(notifications.length>1){b='<div id="notifyRemoveAll" onclick="deleteAllNotifications()" style="cursor:pointer;border-top:1px solid orange;margin:5px;color:orange;text-align:right;padding-right:3px">Clear all</div>'}QH("notifiyBox",'<div class=customScroll style="max-height:170px;overflow-y:auto;margin:5px">'+j+"</div>"+b)}function notificationSelected(b){var c=-1;for(var a in notifications){if(notifications[a].id==b){c=a}}if(c!=-1){var d=notifications[c];if(d.nodeid!=null){if(d.tag=="desktop"){gotoDevice(d.nodeid,12)}else{if(d.tag=="terminal"){gotoDevice(d.nodeid,11)}else{if(d.tag=="files"){gotoDevice(d.nodeid,13)}else{if(d.tag=="intelamt"){gotoDevice(d.nodeid,14)}else{if(d.tag=="console"){gotoDevice(d.nodeid,15)}else{gotoDevice(d.nodeid,10)}}}}}}else{if(d.tag.startsWith("meshmessenger/")){window.open("/messenger?id="+d.tag+"&title="+encodeURIComponent(d.username),d.tag.split("/")[2]);notificationDelete(b)}}}}function notificationDelete(c){var d=-1,a=Q("notifyx"+c);if(a!=null){for(var b in notifications){if(notifications[b].id==c){d=b}}if(d!=-1){notifications.splice(d,1);a.parentNode.removeChild(a);setNotificationCount(notifications.length);if(notifications.length==0){QV("notifiyBox",false)}if(notifications.length==1){QV("notifyRemoveAll",false)}if((notifications.length>0)&&(d==0)){var g=notifications[0];QS("notifyx"+g.id)["border-top"]="1px solid transparent"}}}}function addNotification(a){if(a.time==null){a.time=Date.now()}if(a.id==null){a.id=Math.random()}notifications.unshift(a);setNotificationCount(notifications.length);Q("chimes").play();clickNotificationIcon(true)}function deleteAllNotifications(){notifications=[];setNotificationCount(0);drawNotifications();QV("notifiyBox",false)}function setupServerStats(){window.serverStatCpu=new Chart(document.getElementById("serverCpuChart").getContext("2d"),{type:"doughnut",data:{datasets:[{data:[0,0],backgroundColor:["#AAAAAA","#00AA00"]}],labels:["Used","Free"]},options:{responsive:true,legend:{position:"none",},animation:{animateScale:true,animateRotate:true},width:"60px"}});window.serverStatMemory=new Chart(document.getElementById("serverMemoryChart").getContext("2d"),{type:"doughnut",data:{datasets:[{data:[0,0],backgroundColor:["#AAAAAA","#00AA00"]}],labels:["Used","Free"]},options:{responsive:true,legend:{position:"none",},animation:{animateScale:true,animateRotate:true},width:"60px"}})}var lastServerStats=null;function updateServerStats(d){if(d!=null){lastServerStats=d}else{d=lastServerStats}if(d==null){return}if(typeof d.cpuavg=="object"){var c=Math.min(d.cpuavg[0],1);window.serverStatCpu.config.data.datasets[0].data=[c,1-c];QH("serverCpuChartText",'<div style=margin-bottom:5px>CPU Load</div><div><b title="CPU load in the last minute">'+(Math.round(d.cpuavg[0]*100)/100)+'</b>, <b title="CPU load in the last 5 minutes">'+(Math.round(d.cpuavg[1]*100)/100)+'</b>, <b title="CPU load in the 15 minutes">'+(Math.round(d.cpuavg[2]*100)/100)+"</b></div>");QS("serverCpuChartView")["display"]="inline-block";window.serverStatCpu.update()}if((typeof d.totalmem=="number")&&(typeof d.freemem=="number")){window.serverStatMemory.config.data.datasets[0].data=[d.totalmem-d.freemem,d.freemem];QH("serverMemoryChartText","<div style=margin-bottom:5px>Memory</div><div><b>"+getNiceSize2(d.freemem)+"</b> free, <b>"+getNiceSize2(d.totalmem)+"</b> total</div>");QS("serverMemoryChartView")["display"]="inline-block";window.serverStatMemory.update()}var e="<div style=width:100% cellpadding=0 cellspacing=0>";if(typeof d.values=="object"){for(var a in d.values){e+="<div class=userTableHeader style=margin-bottom:4px;width:200px>"+a+"</div>";for(var b in d.values[a]){e+="<div style=display:inline-block><table style=width:300px;height:24px;background-color:#d3d9d6;margin-bottom:4px;vertical-align:middle;border-spacing:0><tr><td class=h1></td><td><span>"+b+"</span><span style=float:right>"+d.values[a][b]+"</span></td><td class=h2></td></tr></table></div>"}}}e+="</div>";QH("serverStatsTable",e)}var xxdialogMode;var xxdialogFunc;var xxdialogButtons;var xxdialogTag;var xxcurrentView=-1;function setDialogMode(j,k,a,e,d,h){xxdialogMode=j;xxdialogFunc=e;xxdialogButtons=a;xxdialogTag=h;QE("idx_dlgOkButton",true);QV("idx_dlgOkButton",a&1);QV("idx_dlgCancelButton",a&2);QV("id_dialogclose",(a&2)||(a&8));QV("idx_dlgDeleteButton",a&4);QV("idx_dlgButtonBar",a&7);if(k){QH("id_dialogtitle",k)}for(var g=1;g<24;g++){QV("dialog"+g,g==j)}QV("dialog",j);if(d){if(j==2){QH("id_dialogOptions",d)}else{QH("id_dialogMessage",d)}}}function dialogclose(e){var c=xxdialogFunc,a=xxdialogButtons,d=xxdialogTag;setDialogMode();if(((a&8)||e)&&c){c(e,d)}}function center(){if(xxcurrentView==11){deskAdjust()}else{if(xxcurrentView==10){masterUpdate(256)}else{if(xxcurrentView==1){masterUpdate(4)}}}}function messagebox(b,a){QH("id_dialogMessage",a);setDialogMode(1,b,1)}function statusbox(b,a){QH("id_dialogMessage",a);setDialogMode(1,b)}function goBack(){if(xxdialogMode){return}if((xxcurrentView>=10)&&(xxcurrentView<20)){go(1)}if((xxcurrentView>=20)&&(xxcurrentView<30)){go(2)}if((xxcurrentView>=30)&&(xxcurrentView<40)){go(4)}}function go(d){if(xxdialogMode||xxcurrentView==d){return}for(var a=0;a<32;a++){QV("p"+a,a==d)}xxcurrentView=d;var b=["LeftMenuMyDevices","LeftMenuMyAccount","LeftMenuMyEvents","LeftMenuMyFiles","LeftMenuMyUsers","LeftMenuMyServer"];for(var a in b){Q(b[a]).classList.remove("lbbuttonsel");Q(b[a]).classList.remove("lbbuttonsel2")}QV("topbar",d!=0);if(d>=10&&d<20){QS("MainMenuMyDevices").backgroundColor="#606060"}else{QS("MainMenuMyDevices").backgroundColor=((d==1)?"#003366":"#808080")}if(d==1||(d>=10&&d<20)){Q("LeftMenuMyDevices").classList.add("lbbuttonsel")}if(d==1){Q("LeftMenuMyDevices").classList.add("lbbuttonsel2")}if(d>=20&&d<30){QS("MainMenuMyAccount").backgroundColor="#606060"}else{QS("MainMenuMyAccount").backgroundColor=((d==2)?"#003366":"#808080")}if(d==2||(d>=20&&d<30)){Q("LeftMenuMyAccount").classList.add("lbbuttonsel")}if(d==2){Q("LeftMenuMyAccount").classList.add("lbbuttonsel2")}QS("MainMenuMyEvents").backgroundColor=((d==3)?"#003366":"#808080");if(d==3){Q("LeftMenuMyEvents").classList.add("lbbuttonsel","lbbuttonsel2")}if(d>=30&&d<40){QS("MainMenuMyUsers").backgroundColor="#606060"}else{QS("MainMenuMyUsers").backgroundColor=((d==4)?"#003366":"#808080")}if(d==4||(d>=30&&d<40)){Q("LeftMenuMyUsers").classList.add("lbbuttonsel")}if(d==4){Q("LeftMenuMyUsers").classList.add("lbbuttonsel2")}QS("MainMenuMyFiles").backgroundColor=((d==5)?"#003366":"#808080");if(d==5){Q("LeftMenuMyFiles").classList.add("lbbuttonsel","lbbuttonsel2")}QS("MainMenuMyServer").backgroundColor=(((d==6)||(d==115))?"#003366":"#808080");if(((d==6)||(d==115))){Q("LeftMenuMyServer").classList.add("lbbuttonsel","lbbuttonsel2")}if(webPageFullScreen){QS("column_l")["max-height"]="calc(100vh - 135px)"}else{QS("column_l")["max-height"]=(d>=10)?"calc(100vh - 159px)":"calc(100vh - 135px)"}if((d==0)&&(webPageFullScreen)){QS("page_content").position="";QV("page_leftbar",false);QS("column_l").height="calc(100vh - 110px)";QS("column_l")["max-height"]=""}QV("MainSubMenuSpan",d>=10&&d<20);QV("UserDummyMenuSpan",(d<10)&&(d!=6)&&webPageFullScreen);QV("MeshSubMenuSpan",d>=20&&d<30);QV("UserSubMenuSpan",d>=30&&d<40);QV("ServerSubMenuSpan",d==6||d==115);var c={10:"MainDev",11:"MainDevDesktop",12:"MainDevTerminal",13:"MainDevFiles",14:"MainDevAmt",15:"MainDevConsole",20:"MeshGeneral",30:"UserGeneral",31:"UserEvents",6:"ServerGeneral",115:"ServerConsole"};for(var a in c){Q(c[a]).classList.remove("style3x");Q(c[a]).classList.remove("style3sel");Q(c[a]).classList.add((d==a)?"style3sel":"style3x")}if(d==115){QV("p15",true)}QV("p15uploadCore",d!=115);QV("p15BackButton",d!=115);if((d==15)||(d==115)){setupConsole()}if(d==1){masterUpdate(4)}if((currentNode)&&(d>=10)&&(d<20)){document.title="MeshCentral - "+currentNode.name}else{document.title="MeshCentral"}}function joinPaths(){var c=[];for(var a in arguments){var b=arguments[a];if((b!=null)&&(b!="")){while(b.endsWith("/")||b.endsWith("\\")){b=b.substring(0,b.length-1)}while(b.startsWith("/")||b.startsWith("\\")){b=b.substring(1)}c.push(b)}}return c.join("/")}function putstore(b,c){try{if(typeof(localStorage)==="undefined"){return}localStorage.setItem(b,c)}catch(a){}}function getstore(b,d){try{if(typeof(localStorage)==="undefined"){return d}var c=localStorage.getItem(b);if((c==null)||(c==null)){return d}return c}catch(a){return d}}function addLink(b,a){return"<span style=cursor:pointer;text-decoration:none onclick='"+a+"'>"+b+" <img class=hoverButton width=10 height=10 src=images/link5.png></span>"}function addLinkConditional(d,b,a){if(a){return addLink(d,b)}return d}function haltEvent(a){if(a.preventDefault){a.preventDefault()}if(a.stopPropagation){a.stopPropagation()}return false}function addOption(c,d,a){var b=document.createElement("option");b.text=d;b.value=a;Q(c).add(b)}function passwordcheck(a){return(a.length>7)&&(/\d/.test(a))&&(/[a-z]/.test(a))&&(/[A-Z]/.test(a))&&(/\W/.test(a))}function methodcheck(a){if(a&&a!=null&&a.Body&&a.Body.ReturnValueStr!="SUCCESS"){messagebox("Call Error",a.Header.Method+": "+a.Body.ReturnValueStr.replace("_"," "));return true}return false}function TableStart(){return"<table cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=200px><p><td>"}function TableStart2(){return"<table cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(a,b){return"<tr><td><p>"+a+"<td>"+b}function FullTable(c,a){var b=TableStart();for(i in c){if(i&&c[i]){b+=TableEntry(i,c[i])}}return b+TableEnd(a)}function TableEnd(a){return"<tr><td colspan=2><p>"+(a?a:"")+"</table>"}function AddButton(b,a){return"<input type=button value='"+b+"' onclick='"+a+"' style=margin:4px>"}function AddButton2(b,a){return"<input type=button value='"+b+"' onclick='"+a+"'>"}function AddRefreshButton(a){return"<input type=button name=refreshbtn value=Refresh onclick='refreshButtons(false);"+a+"' style=margin:4px "+(refreshButtonsState==false?"disabled":"")+">"}function MoreStart(){return'<a style=cursor:pointer;color:blue id=morexxx1 onclick=QV("morexxx1",false);QV("morexxx2",true)>&#x25BC; More</a><div id=morexxx2 style=display:none><br><hr>'}function MoreEnd(){return'<a style=cursor:pointer;color:blue onclick=QV("morexxx2",false);QV("morexxx1",true)>&#x25B2; Less</a></div>'}function getSelectedOptions(e){var d=[],c;for(var a=0,b=e.options.length;a<b;a++){c=e.options[a];if(c.selected){d.push(c.value)}}return d}function getInstance(b,c){for(var a in b){if(b[a]["InstanceID"]==c){return b[a]}}return null}function getItem(b,c,d){for(var a in b){if(b[a][c]==d){return b[a]}}return null}function guidToStr(a){return a.substring(6,8)+a.substring(4,6)+a.substring(2,4)+a.substring(0,2)+"-"+a.substring(10,12)+a.substring(8,10)+"-"+a.substring(14,16)+a.substring(12,14)+"-"+a.substring(16,20)+"-"+a.substring(20)}function getUrlVars(){var d,a,e=[],b=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var c=0;c<b.length;c++){d=b[c].indexOf("=");if(d>0){e[b[c].substring(0,d)]=b[c].substring(d+1,b[c].length)}}return e}function addHtmlValue(a,b){return"<table><td style=width:120px>"+a+"<td><b>"+b+"</b></table>"}function addHtmlValue2(a,b){return"<div><div style=display:inline-block;float:right>"+b+"</div><div style=display:inline-block>"+a+"</div></div>"}function parseUriArgs(){var a,c={},b=window.document.location.href.split(/[\?&|\=]/);b.splice(0,1);for(d in b){switch(d%2){case 0:a=decodeURIComponent(b[d]);break;case 1:c[a]=decodeURIComponent(b[d]);var d=parseInt(c[a]);if(d==c[a]){c[a]=d}break;default:break}}return c}function focusTextBox(a){setTimeout(function(){Q(a).selectionStart=Q(a).selectionEnd=65535;Q(a).focus()},0)}function validateEmail(b){var a=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return a.test(b)}function isPrivateIP(b){return(b.startsWith("10.")||b.startsWith("172.16.")||b.startsWith("192.168."))}function u2fSupported(){return(window.u2f&&((navigator.userAgent.indexOf("Chrome/")>0)||(navigator.userAgent.indexOf("Firefox/")>0)||(navigator.userAgent.indexOf("Opera/")>0)||(navigator.userAgent.indexOf("Safari/")>0)))};</script></body></html>
\ No newline at end of file
views/default.handlebars
+3 -3
@@ -6359,7 +6359,7 @@
6359 // Display the users using the sorted list
6360 var x = '<table style=width:100% cellpadding=0 cellspacing=0>', addHeader = true;
6361
6362 - x += '<th style=color:gray>Name<th style=color:gray>Groups<th style=color:gray>Last Access<th style=color:gray>Permissions';
6362 + x += '<th style=color:gray>Name<th style=color:gray;width:80px>Groups<th style=color:gray;width:120px>Last&nbsp;Access<th style=color:gray;width:120px>Permissions';
6363
6364 // Online users
6365 for (var i in sortedUserIds) {
@@ -6408,12 +6408,12 @@
6408 msg = "<span style=float:right;margin-top:1px;margin-right:4px title=Chat><a onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src='images/icon-chat.png' height=16 width=16 style=padding-top:2px /></a></span>";
6409 msg += "<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a onclick=showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")><img src='images/icon-notify.png' height=16 width=16 style=padding-top:2px /></a></span>";
6410 }
6411 - if (sessions == 1) { lastAccess += '1 session'; } else { lastAccess += sessions + ' sessions'; }
6411 + if (sessions == 1) { lastAccess += '1&nbsp;session'; } else { lastAccess += sessions + '&nbsp;sessions'; }
6412 } else {
6413 if (user.login) { lastAccess += '<span title="Last login: ' + new Date(user.login * 1000).toLocaleString() + '">' + new Date(user.login * 1000).toLocaleDateString() + '</span>'; }
6414 }
6415 if (self) { permissions += "<a style=cursor:pointer onclick=showUserAdminDialog(event,\"" + encodeURIComponent(user._id) + "\")>"; }
6416 - if ((user.siteadmin != null) && ((user.siteadmin & 32) != 0) && (user.siteadmin != 0xFFFFFFFF)) { permissions += "Locked, "; }
6416 + if ((user.siteadmin != null) && ((user.siteadmin & 32) != 0) && (user.siteadmin != 0xFFFFFFFF)) { permissions += "Locked,&nbsp;"; }
6417 permissions += "<span title='Server Permissions'>";
6418 if ((user.siteadmin == null) || (user.siteadmin == 0) || (user.siteadmin == 32)) {
6419 permissions += "User";