· 10 years ago · Aug 20, 2016, 07:52 PM
1function Arcfour() {
2 this.i = 0;
3 this.j = 0;
4 this.S = []
5}
6
7function ARC4init(n) {
8 for (var i, r, t = 0; t < 256; ++t) this.S[t] = t;
9 for (i = 0, t = 0; t < 256; ++t) i = i + this.S[t] + n[t % n.length] & 255, r = this.S[t], this.S[t] = this.S[i], this.S[i] = r;
10 this.i = 0;
11 this.j = 0
12}
13
14function ARC4next() {
15 var n;
16 return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, n = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = n, this.S[n + this.S[this.i] & 255]
17}
18
19function prng_newstate() {
20 return new Arcfour
21}
22
23function rng_get_byte() {
24 var r, t, n, i;
25 if (rng_state == null) {
26 for (rng_state = prng_newstate(); rng_pptr < rng_psize;) r = Math.floor(65536 * Math.random()), rng_pool[rng_pptr++] = r & 255;
27 if (!secure_browser)
28 for (t = Crypto.util.hexToBytes($("#server-seed").text()), n = 0; n < t.length; ++n) rng_pool[n] ^= t[n];
29 for (rng_state.init(rng_pool), rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) rng_pool[rng_pptr] = 0;
30 for (rng_pptr = 0, i = 0; i < 256; i++) rng_state.next()
31 }
32 return rng_state.next()
33}
34
35function rng_get_bytes(n) {
36 for (var t = 0; t < n.length; ++t) n[t] = rng_get_byte()
37}
38
39function SecureRandom() {}
40
41function BigInteger(n, t, i) {
42 n != null && ("number" == typeof n ? this.fromNumber(n, t, i) : t == null && "string" != typeof n ? this.fromString(n, 256) : this.fromString(n, t))
43}
44
45function nbi() {
46 return new BigInteger(null)
47}
48
49function am1(n, t, i, r, u, f) {
50 while (--f >= 0) {
51 var e = t * this[n++] + i[r] + u;
52 u = Math.floor(e / 67108864);
53 i[r++] = e & 67108863
54 }
55 return u
56}
57
58function am2(n, t, i, r, u, f) {
59 for (var o = t & 32767, s = t >> 15; --f >= 0;) {
60 var e = this[n] & 32767,
61 h = this[n++] >> 15,
62 c = s * e + h * o;
63 e = o * e + ((c & 32767) << 15) + i[r] + (u & 1073741823);
64 u = (e >>> 30) + (c >>> 15) + s * h + (u >>> 30);
65 i[r++] = e & 1073741823
66 }
67 return u
68}
69
70function am3(n, t, i, r, u, f) {
71 for (var o = t & 16383, s = t >> 14; --f >= 0;) {
72 var e = this[n] & 16383,
73 h = this[n++] >> 14,
74 c = s * e + h * o;
75 e = o * e + ((c & 16383) << 14) + i[r] + u;
76 u = (e >> 28) + (c >> 14) + s * h;
77 i[r++] = e & 268435455
78 }
79 return u
80}
81
82function int2char(n) {
83 return BI_RM.charAt(n)
84}
85
86function intAt(n, t) {
87 var i = BI_RC[n.charCodeAt(t)];
88 return i == null ? -1 : i
89}
90
91function bnpCopyTo(n) {
92 for (var t = this.t - 1; t >= 0; --t) n[t] = this[t];
93 n.t = this.t;
94 n.s = this.s
95}
96
97function bnpFromInt(n) {
98 this.t = 1;
99 this.s = n < 0 ? -1 : 0;
100 n > 0 ? this[0] = n : n < -1 ? this[0] = n + DV : this.t = 0
101}
102
103function nbv(n) {
104 var t = nbi();
105 return t.fromInt(n), t
106}
107
108function bnpFromString(n, t) {
109 var r, u;
110 if (t == 16) r = 4;
111 else if (t == 8) r = 3;
112 else if (t == 256) r = 8;
113 else if (t == 2) r = 1;
114 else if (t == 32) r = 5;
115 else if (t == 4) r = 2;
116 else {
117 this.fromRadix(n, t);
118 return
119 }
120 this.t = 0;
121 this.s = 0;
122 for (var f = n.length, e = !1, i = 0; --f >= 0;) {
123 if (u = r == 8 ? n[f] & 255 : intAt(n, f), u < 0) {
124 n.charAt(f) == "-" && (e = !0);
125 continue
126 }
127 e = !1;
128 i == 0 ? this[this.t++] = u : i + r > this.DB ? (this[this.t - 1] |= (u & (1 << this.DB - i) - 1) << i, this[this.t++] = u >> this.DB - i) : this[this.t - 1] |= u << i;
129 i += r;
130 i >= this.DB && (i -= this.DB)
131 }
132 r == 8 && (n[0] & 128) != 0 && (this.s = -1, i > 0 && (this[this.t - 1] |= (1 << this.DB - i) - 1 << i));
133 this.clamp();
134 e && BigInteger.ZERO.subTo(this, this)
135}
136
137function bnpClamp() {
138 for (var n = this.s & this.DM; this.t > 0 && this[this.t - 1] == n;) --this.t
139}
140
141function bnToString(n) {
142 var t;
143 if (this.s < 0) return "-" + this.negate().toString(n);
144 if (n == 16) t = 4;
145 else if (n == 8) t = 3;
146 else if (n == 2) t = 1;
147 else if (n == 32) t = 5;
148 else if (n == 4) t = 2;
149 else return this.toRadix(n);
150 var o = (1 << t) - 1,
151 u, f = !1,
152 e = "",
153 r = this.t,
154 i = this.DB - r * this.DB % t;
155 if (r-- > 0)
156 for (i < this.DB && (u = this[r] >> i) > 0 && (f = !0, e = int2char(u)); r >= 0;) i < t ? u = (this[r] & (1 << i) - 1) << t - i | this[--r] >> (i += this.DB - t) : (u = this[r] >> (i -= t) & o, i <= 0 && (i += this.DB, --r)), u > 0 && (f = !0), f && (e += int2char(u));
157 return f ? e : "0"
158}
159
160function bnNegate() {
161 var n = nbi();
162 return BigInteger.ZERO.subTo(this, n), n
163}
164
165function bnAbs() {
166 return this.s < 0 ? this.negate() : this
167}
168
169function bnCompareTo(n) {
170 var t = this.s - n.s,
171 i;
172 if (t != 0) return t;
173 if (i = this.t, t = i - n.t, t != 0) return this.s < 0 ? -t : t;
174 while (--i >= 0)
175 if ((t = this[i] - n[i]) != 0) return t;
176 return 0
177}
178
179function nbits(n) {
180 var i = 1,
181 t;
182 return (t = n >>> 16) != 0 && (n = t, i += 16), (t = n >> 8) != 0 && (n = t, i += 8), (t = n >> 4) != 0 && (n = t, i += 4), (t = n >> 2) != 0 && (n = t, i += 2), (t = n >> 1) != 0 && (n = t, i += 1), i
183}
184
185function bnBitLength() {
186 return this.t <= 0 ? 0 : this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM)
187}
188
189function bnpDLShiftTo(n, t) {
190 for (var i = this.t - 1; i >= 0; --i) t[i + n] = this[i];
191 for (i = n - 1; i >= 0; --i) t[i] = 0;
192 t.t = this.t + n;
193 t.s = this.s
194}
195
196function bnpDRShiftTo(n, t) {
197 for (var i = n; i < this.t; ++i) t[i - n] = this[i];
198 t.t = Math.max(this.t - n, 0);
199 t.s = this.s
200}
201
202function bnpLShiftTo(n, t) {
203 for (var u = n % this.DB, e = this.DB - u, o = (1 << e) - 1, r = Math.floor(n / this.DB), f = this.s << u & this.DM, i = this.t - 1; i >= 0; --i) t[i + r + 1] = this[i] >> e | f, f = (this[i] & o) << u;
204 for (i = r - 1; i >= 0; --i) t[i] = 0;
205 t[r] = f;
206 t.t = this.t + r + 1;
207 t.s = this.s;
208 t.clamp()
209}
210
211function bnpRShiftTo(n, t) {
212 var i, r;
213 if (t.s = this.s, i = Math.floor(n / this.DB), i >= this.t) {
214 t.t = 0;
215 return
216 }
217 var u = n % this.DB,
218 f = this.DB - u,
219 e = (1 << u) - 1;
220 for (t[0] = this[i] >> u, r = i + 1; r < this.t; ++r) t[r - i - 1] |= (this[r] & e) << f, t[r - i] = this[r] >> u;
221 u > 0 && (t[this.t - i - 1] |= (this.s & e) << f);
222 t.t = this.t - i;
223 t.clamp()
224}
225
226function bnpSubTo(n, t) {
227 for (var r = 0, i = 0, u = Math.min(n.t, this.t); r < u;) i += this[r] - n[r], t[r++] = i & this.DM, i >>= this.DB;
228 if (n.t < this.t) {
229 for (i -= n.s; r < this.t;) i += this[r], t[r++] = i & this.DM, i >>= this.DB;
230 i += this.s
231 } else {
232 for (i += this.s; r < n.t;) i -= n[r], t[r++] = i & this.DM, i >>= this.DB;
233 i -= n.s
234 }
235 t.s = i < 0 ? -1 : 0;
236 i < -1 ? t[r++] = this.DV + i : i > 0 && (t[r++] = i);
237 t.t = r;
238 t.clamp()
239}
240
241function bnpMultiplyTo(n, t) {
242 var r = this.abs(),
243 u = n.abs(),
244 i = r.t;
245 for (t.t = i + u.t; --i >= 0;) t[i] = 0;
246 for (i = 0; i < u.t; ++i) t[i + r.t] = r.am(0, u[i], t, i, 0, r.t);
247 t.s = 0;
248 t.clamp();
249 this.s != n.s && BigInteger.ZERO.subTo(t, t)
250}
251
252function bnpSquareTo(n) {
253 for (var i = this.abs(), t = n.t = 2 * i.t, r; --t >= 0;) n[t] = 0;
254 for (t = 0; t < i.t - 1; ++t) r = i.am(t, i[t], n, 2 * t, 0, 1), (n[t + i.t] += i.am(t + 1, 2 * i[t], n, 2 * t + 1, r, i.t - t - 1)) >= i.DV && (n[t + i.t] -= i.DV, n[t + i.t + 1] = 1);
255 n.t > 0 && (n[n.t - 1] += i.am(t, i[t], n, 2 * t, 0, 1));
256 n.s = 0;
257 n.clamp()
258}
259
260function bnpDivRemTo(n, t, i) {
261 var e = n.abs(),
262 h, u, c, a;
263 if (!(e.t <= 0)) {
264 if (h = this.abs(), h.t < e.t) {
265 t != null && t.fromInt(0);
266 i != null && this.copyTo(i);
267 return
268 }
269 i == null && (i = nbi());
270 var r = nbi(),
271 v = this.s,
272 p = n.s,
273 s = this.DB - nbits(e[e.t - 1]);
274 if (s > 0 ? (e.lShiftTo(s, r), h.lShiftTo(s, i)) : (e.copyTo(r), h.copyTo(i)), u = r.t, c = r[u - 1], c != 0) {
275 var y = c * (1 << this.F1) + (u > 1 ? r[u - 2] >> this.F2 : 0),
276 w = this.FV / y,
277 b = (1 << this.F1) / y,
278 k = 1 << this.F2,
279 o = i.t,
280 l = o - u,
281 f = t == null ? nbi() : t;
282 for (r.dlShiftTo(l, f), i.compareTo(f) >= 0 && (i[i.t++] = 1, i.subTo(f, i)), BigInteger.ONE.dlShiftTo(u, f), f.subTo(r, r); r.t < u;) r[r.t++] = 0;
283 while (--l >= 0)
284 if (a = i[--o] == c ? this.DM : Math.floor(i[o] * w + (i[o - 1] + k) * b), (i[o] += r.am(0, a, i, l, 0, u)) < a)
285 for (r.dlShiftTo(l, f), i.subTo(f, i); i[o] < --a;) i.subTo(f, i);
286 t != null && (i.drShiftTo(u, t), v != p && BigInteger.ZERO.subTo(t, t));
287 i.t = u;
288 i.clamp();
289 s > 0 && i.rShiftTo(s, i);
290 v < 0 && BigInteger.ZERO.subTo(i, i)
291 }
292 }
293}
294
295function bnMod(n) {
296 var t = nbi();
297 return this.abs().divRemTo(n, null, t), this.s < 0 && t.compareTo(BigInteger.ZERO) > 0 && n.subTo(t, t), t
298}
299
300function Classic(n) {
301 this.m = n
302}
303
304function cConvert(n) {
305 return n.s < 0 || n.compareTo(this.m) >= 0 ? n.mod(this.m) : n
306}
307
308function cRevert(n) {
309 return n
310}
311
312function cReduce(n) {
313 n.divRemTo(this.m, null, n)
314}
315
316function cMulTo(n, t, i) {
317 n.multiplyTo(t, i);
318 this.reduce(i)
319}
320
321function cSqrTo(n, t) {
322 n.squareTo(t);
323 this.reduce(t)
324}
325
326function bnpInvDigit() {
327 var t, n;
328 return this.t < 1 ? 0 : (t = this[0], (t & 1) == 0) ? 0 : (n = t & 3, n = n * (2 - (t & 15) * n) & 15, n = n * (2 - (t & 255) * n) & 255, n = n * (2 - ((t & 65535) * n & 65535)) & 65535, n = n * (2 - t * n % this.DV) % this.DV, n > 0 ? this.DV - n : -n)
329}
330
331function Montgomery(n) {
332 this.m = n;
333 this.mp = n.invDigit();
334 this.mpl = this.mp & 32767;
335 this.mph = this.mp >> 15;
336 this.um = (1 << n.DB - 15) - 1;
337 this.mt2 = 2 * n.t
338}
339
340function montConvert(n) {
341 var t = nbi();
342 return n.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), n.s < 0 && t.compareTo(BigInteger.ZERO) > 0 && this.m.subTo(t, t), t
343}
344
345function montRevert(n) {
346 var t = nbi();
347 return n.copyTo(t), this.reduce(t), t
348}
349
350function montReduce(n) {
351 for (var i, t, r; n.t <= this.mt2;) n[n.t++] = 0;
352 for (i = 0; i < this.m.t; ++i)
353 for (t = n[i] & 32767, r = t * this.mpl + ((t * this.mph + (n[i] >> 15) * this.mpl & this.um) << 15) & n.DM, t = i + this.m.t, n[t] += this.m.am(0, r, n, i, 0, this.m.t); n[t] >= n.DV;) n[t] -= n.DV, n[++t] ++;
354 n.clamp();
355 n.drShiftTo(this.m.t, n);
356 n.compareTo(this.m) >= 0 && n.subTo(this.m, n)
357}
358
359function montSqrTo(n, t) {
360 n.squareTo(t);
361 this.reduce(t)
362}
363
364function montMulTo(n, t, i) {
365 n.multiplyTo(t, i);
366 this.reduce(i)
367}
368
369function bnpIsEven() {
370 return (this.t > 0 ? this[0] & 1 : this.s) == 0
371}
372
373function bnpExp(n, t) {
374 var e;
375 if (n > 4294967295 || n < 1) return BigInteger.ONE;
376 var i = nbi(),
377 r = nbi(),
378 u = t.convert(this),
379 f = nbits(n) - 1;
380 for (u.copyTo(i); --f >= 0;) t.sqrTo(i, r), (n & 1 << f) > 0 ? t.mulTo(r, u, i) : (e = i, i = r, r = e);
381 return t.revert(i)
382}
383
384function bnModPowInt(n, t) {
385 var i;
386 return i = n < 256 || t.isEven() ? new Classic(t) : new Montgomery(t), this.exp(n, i)
387}
388
389function bnClone() {
390 var n = nbi();
391 return this.copyTo(n), n
392}
393
394function bnIntValue() {
395 if (this.s < 0) {
396 if (this.t == 1) return this[0] - this.DV;
397 if (this.t == 0) return -1
398 } else {
399 if (this.t == 1) return this[0];
400 if (this.t == 0) return 0
401 }
402 return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
403}
404
405function bnByteValue() {
406 return this.t == 0 ? this.s : this[0] << 24 >> 24
407}
408
409function bnShortValue() {
410 return this.t == 0 ? this.s : this[0] << 16 >> 16
411}
412
413function bnpChunkSize(n) {
414 return Math.floor(Math.LN2 * this.DB / Math.log(n))
415}
416
417function bnSigNum() {
418 return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1
419}
420
421function bnpToRadix(n) {
422 if (n == null && (n = 10), this.signum() == 0 || n < 2 || n > 36) return "0";
423 var e = this.chunkSize(n),
424 u = Math.pow(n, e),
425 f = nbv(u),
426 t = nbi(),
427 i = nbi(),
428 r = "";
429 for (this.divRemTo(f, t, i); t.signum() > 0;) r = (u + i.intValue()).toString(n).substr(1) + r, t.divRemTo(f, t, i);
430 return i.intValue().toString(n) + r
431}
432
433function bnpFromRadix(n, t) {
434 var r, f;
435 this.fromInt(0);
436 t == null && (t = 10);
437 var e = this.chunkSize(t),
438 s = Math.pow(t, e),
439 o = !1,
440 u = 0,
441 i = 0;
442 for (r = 0; r < n.length; ++r) {
443 if (f = intAt(n, r), f < 0) {
444 n.charAt(r) == "-" && this.signum() == 0 && (o = !0);
445 continue
446 }
447 i = t * i + f;
448 ++u >= e && (this.dMultiply(s), this.dAddOffset(i, 0), u = 0, i = 0)
449 }
450 u > 0 && (this.dMultiply(Math.pow(t, u)), this.dAddOffset(i, 0));
451 o && BigInteger.ZERO.subTo(this, this)
452}
453
454function bnpFromNumber(n, t, i) {
455 if ("number" == typeof t)
456 if (n < 2) this.fromInt(1);
457 else
458 for (this.fromNumber(n, i), this.testBit(n - 1) || this.bitwiseTo(BigInteger.ONE.shiftLeft(n - 1), op_or, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > n && this.subTo(BigInteger.ONE.shiftLeft(n - 1), this);
459 else {
460 var r = [],
461 u = n & 7;
462 r.length = (n >> 3) + 1;
463 t.nextBytes(r);
464 u > 0 ? r[0] &= (1 << u) - 1 : r[0] = 0;
465 this.fromString(r, 256)
466 }
467}
468
469function bnToByteArray() {
470 var i = this.t,
471 u = [],
472 n, t, r;
473 if (u[0] = this.s, n = this.DB - i * this.DB % 8, r = 0, i-- > 0)
474 for (n < this.DB && (t = this[i] >> n) != (this.s & this.DM) >> n && (u[r++] = t | this.s << this.DB - n); i >= 0;) n < 8 ? t = (this[i] & (1 << n) - 1) << 8 - n | this[--i] >> (n += this.DB - 8) : (t = this[i] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --i)), (t & 128) != 0 && (t |= -256), r == 0 && (this.s & 128) != (t & 128) && ++r, (r > 0 || t != this.s) && (u[r++] = t);
475 return u
476}
477
478function bnEquals(n) {
479 return this.compareTo(n) == 0
480}
481
482function bnMin(n) {
483 return this.compareTo(n) < 0 ? this : n
484}
485
486function bnMax(n) {
487 return this.compareTo(n) > 0 ? this : n
488}
489
490function bnpBitwiseTo(n, t, i) {
491 for (var u, f = Math.min(n.t, this.t), r = 0; r < f; ++r) i[r] = t(this[r], n[r]);
492 if (n.t < this.t) {
493 for (u = n.s & this.DM, r = f; r < this.t; ++r) i[r] = t(this[r], u);
494 i.t = this.t
495 } else {
496 for (u = this.s & this.DM, r = f; r < n.t; ++r) i[r] = t(u, n[r]);
497 i.t = n.t
498 }
499 i.s = t(this.s, n.s);
500 i.clamp()
501}
502
503function op_and(n, t) {
504 return n & t
505}
506
507function bnAnd(n) {
508 var t = nbi();
509 return this.bitwiseTo(n, op_and, t), t
510}
511
512function op_or(n, t) {
513 return n | t
514}
515
516function bnOr(n) {
517 var t = nbi();
518 return this.bitwiseTo(n, op_or, t), t
519}
520
521function op_xor(n, t) {
522 return n ^ t
523}
524
525function bnXor(n) {
526 var t = nbi();
527 return this.bitwiseTo(n, op_xor, t), t
528}
529
530function op_andnot(n, t) {
531 return n & ~t
532}
533
534function bnAndNot(n) {
535 var t = nbi();
536 return this.bitwiseTo(n, op_andnot, t), t
537}
538
539function bnNot() {
540 for (var n = nbi(), t = 0; t < this.t; ++t) n[t] = this.DM & ~this[t];
541 return n.t = this.t, n.s = ~this.s, n
542}
543
544function bnShiftLeft(n) {
545 var t = nbi();
546 return n < 0 ? this.rShiftTo(-n, t) : this.lShiftTo(n, t), t
547}
548
549function bnShiftRight(n) {
550 var t = nbi();
551 return n < 0 ? this.lShiftTo(-n, t) : this.rShiftTo(n, t), t
552}
553
554function lbit(n) {
555 if (n == 0) return -1;
556 var t = 0;
557 return (n & 65535) == 0 && (n >>= 16, t += 16), (n & 255) == 0 && (n >>= 8, t += 8), (n & 15) == 0 && (n >>= 4, t += 4), (n & 3) == 0 && (n >>= 2, t += 2), (n & 1) == 0 && ++t, t
558}
559
560function bnGetLowestSetBit() {
561 for (var n = 0; n < this.t; ++n)
562 if (this[n] != 0) return n * this.DB + lbit(this[n]);
563 return this.s < 0 ? this.t * this.DB : -1
564}
565
566function cbit(n) {
567 for (var t = 0; n != 0;) n &= n - 1, ++t;
568 return t
569}
570
571function bnBitCount() {
572 for (var t = 0, i = this.s & this.DM, n = 0; n < this.t; ++n) t += cbit(this[n] ^ i);
573 return t
574}
575
576function bnTestBit(n) {
577 var t = Math.floor(n / this.DB);
578 return t >= this.t ? this.s != 0 : (this[t] & 1 << n % this.DB) != 0
579}
580
581function bnpChangeBit(n, t) {
582 var i = BigInteger.ONE.shiftLeft(n);
583 return this.bitwiseTo(i, t, i), i
584}
585
586function bnSetBit(n) {
587 return this.changeBit(n, op_or)
588}
589
590function bnClearBit(n) {
591 return this.changeBit(n, op_andnot)
592}
593
594function bnFlipBit(n) {
595 return this.changeBit(n, op_xor)
596}
597
598function bnpAddTo(n, t) {
599 for (var r = 0, i = 0, u = Math.min(n.t, this.t); r < u;) i += this[r] + n[r], t[r++] = i & this.DM, i >>= this.DB;
600 if (n.t < this.t) {
601 for (i += n.s; r < this.t;) i += this[r], t[r++] = i & this.DM, i >>= this.DB;
602 i += this.s
603 } else {
604 for (i += this.s; r < n.t;) i += n[r], t[r++] = i & this.DM, i >>= this.DB;
605 i += n.s
606 }
607 t.s = i < 0 ? -1 : 0;
608 i > 0 ? t[r++] = i : i < -1 && (t[r++] = this.DV + i);
609 t.t = r;
610 t.clamp()
611}
612
613function bnAdd(n) {
614 var t = nbi();
615 return this.addTo(n, t), t
616}
617
618function bnSubtract(n) {
619 var t = nbi();
620 return this.subTo(n, t), t
621}
622
623function bnMultiply(n) {
624 var t = nbi();
625 return this.multiplyTo(n, t), t
626}
627
628function bnSquare() {
629 var n = nbi();
630 return this.squareTo(n), n
631}
632
633function bnDivide(n) {
634 var t = nbi();
635 return this.divRemTo(n, t, null), t
636}
637
638function bnRemainder(n) {
639 var t = nbi();
640 return this.divRemTo(n, null, t), t
641}
642
643function bnDivideAndRemainder(n) {
644 var t = nbi(),
645 i = nbi();
646 return this.divRemTo(n, t, i), [t, i]
647}
648
649function bnpDMultiply(n) {
650 this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);
651 ++this.t;
652 this.clamp()
653}
654
655function bnpDAddOffset(n, t) {
656 if (n != 0) {
657 while (this.t <= t) this[this.t++] = 0;
658 for (this[t] += n; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t]
659 }
660}
661
662function NullExp() {}
663
664function nNop(n) {
665 return n
666}
667
668function nMulTo(n, t, i) {
669 n.multiplyTo(t, i)
670}
671
672function nSqrTo(n, t) {
673 n.squareTo(t)
674}
675
676function bnPow(n) {
677 return this.exp(n, new NullExp)
678}
679
680function bnpMultiplyLowerTo(n, t, i) {
681 var r = Math.min(this.t + n.t, t),
682 u;
683 for (i.s = 0, i.t = r; r > 0;) i[--r] = 0;
684 for (u = i.t - this.t; r < u; ++r) i[r + this.t] = this.am(0, n[r], i, r, 0, this.t);
685 for (u = Math.min(n.t, t); r < u; ++r) this.am(0, n[r], i, r, 0, t - r);
686 i.clamp()
687}
688
689function bnpMultiplyUpperTo(n, t, i) {
690 --t;
691 var r = i.t = this.t + n.t - t;
692 for (i.s = 0; --r >= 0;) i[r] = 0;
693 for (r = Math.max(t - this.t, 0); r < n.t; ++r) i[this.t + r - t] = this.am(t - r, n[r], i, 0, 0, this.t + r - t);
694 i.clamp();
695 i.drShiftTo(1, i)
696}
697
698function Barrett(n) {
699 this.r2 = nbi();
700 this.q3 = nbi();
701 BigInteger.ONE.dlShiftTo(2 * n.t, this.r2);
702 this.mu = this.r2.divide(n);
703 this.m = n
704}
705
706function barrettConvert(n) {
707 if (n.s < 0 || n.t > 2 * this.m.t) return n.mod(this.m);
708 if (n.compareTo(this.m) < 0) return n;
709 var t = nbi();
710 return n.copyTo(t), this.reduce(t), t
711}
712
713function barrettRevert(n) {
714 return n
715}
716
717function barrettReduce(n) {
718 for (n.drShiftTo(this.m.t - 1, this.r2), n.t > this.m.t + 1 && (n.t = this.m.t + 1, n.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); n.compareTo(this.r2) < 0;) n.dAddOffset(1, this.m.t + 1);
719 for (n.subTo(this.r2, n); n.compareTo(this.m) >= 0;) n.subTo(this.m, n)
720}
721
722function barrettSqrTo(n, t) {
723 n.squareTo(t);
724 this.reduce(t)
725}
726
727function barrettMulTo(n, t, i) {
728 n.multiplyTo(t, i);
729 this.reduce(i)
730}
731
732function bnModPow(n, t) {
733 var i = n.bitLength(),
734 c, r = nbv(1),
735 f, v;
736 if (i <= 0) return r;
737 c = i < 18 ? 1 : i < 48 ? 3 : i < 144 ? 4 : i < 768 ? 5 : 6;
738 f = i < 8 ? new Classic(t) : t.isEven() ? new Barrett(t) : new Montgomery(t);
739 var s = [],
740 u = 3,
741 l = c - 1,
742 y = (1 << c) - 1;
743 if (s[1] = f.convert(this), c > 1)
744 for (v = nbi(), f.sqrTo(s[1], v); u <= y;) s[u] = nbi(), f.mulTo(v, s[u - 2], s[u]), u += 2;
745 var e = n.t - 1,
746 h, p = !0,
747 o = nbi(),
748 a;
749 for (i = nbits(n[e]) - 1; e >= 0;) {
750 for (i >= l ? h = n[e] >> i - l & y : (h = (n[e] & (1 << i + 1) - 1) << l - i, e > 0 && (h |= n[e - 1] >> this.DB + i - l)), u = c;
751 (h & 1) == 0;) h >>= 1, --u;
752 if ((i -= u) < 0 && (i += this.DB, --e), p) s[h].copyTo(r), p = !1;
753 else {
754 while (u > 1) f.sqrTo(r, o), f.sqrTo(o, r), u -= 2;
755 u > 0 ? f.sqrTo(r, o) : (a = r, r = o, o = a);
756 f.mulTo(o, s[h], r)
757 }
758 while (e >= 0 && (n[e] & 1 << i) == 0) f.sqrTo(r, o), a = r, r = o, o = a, --i < 0 && (i = this.DB - 1, --e)
759 }
760 return f.revert(r)
761}
762
763function bnGCD(n) {
764 var i = this.s < 0 ? this.negate() : this.clone(),
765 t = n.s < 0 ? n.negate() : n.clone(),
766 f, u, r;
767 if (i.compareTo(t) < 0 && (f = i, i = t, t = f), u = i.getLowestSetBit(), r = t.getLowestSetBit(), r < 0) return i;
768 for (u < r && (r = u), r > 0 && (i.rShiftTo(r, i), t.rShiftTo(r, t)); i.signum() > 0;)(u = i.getLowestSetBit()) > 0 && i.rShiftTo(u, i), (u = t.getLowestSetBit()) > 0 && t.rShiftTo(u, t), i.compareTo(t) >= 0 ? (i.subTo(t, i), i.rShiftTo(1, i)) : (t.subTo(i, t), t.rShiftTo(1, t));
769 return r > 0 && t.lShiftTo(r, t), t
770}
771
772function bnpModInt(n) {
773 var r, t, i;
774 if (n <= 0) return 0;
775 if (r = this.DV % n, t = this.s < 0 ? n - 1 : 0, this.t > 0)
776 if (r == 0) t = this[0] % n;
777 else
778 for (i = this.t - 1; i >= 0; --i) t = (r * t + this[i]) % n;
779 return t
780}
781
782function bnModInverse(n) {
783 var o = n.isEven();
784 if (this.isEven() && o || n.signum() == 0) return BigInteger.ZERO;
785 for (var r = n.clone(), u = this.clone(), f = nbv(1), i = nbv(0), e = nbv(0), t = nbv(1); r.signum() != 0;) {
786 while (r.isEven()) r.rShiftTo(1, r), o ? (f.isEven() && i.isEven() || (f.addTo(this, f), i.subTo(n, i)), f.rShiftTo(1, f)) : i.isEven() || i.subTo(n, i), i.rShiftTo(1, i);
787 while (u.isEven()) u.rShiftTo(1, u), o ? (e.isEven() && t.isEven() || (e.addTo(this, e), t.subTo(n, t)), e.rShiftTo(1, e)) : t.isEven() || t.subTo(n, t), t.rShiftTo(1, t);
788 r.compareTo(u) >= 0 ? (r.subTo(u, r), o && f.subTo(e, f), i.subTo(t, i)) : (u.subTo(r, u), o && e.subTo(f, e), t.subTo(i, t))
789 }
790 if (u.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
791 if (t.compareTo(n) >= 0) return t.subtract(n);
792 if (t.signum() < 0) t.addTo(n, t);
793 else return t;
794 return t.signum() < 0 ? t.add(n) : t
795}
796
797function bnIsProbablePrime(n) {
798 var t, i = this.abs(),
799 r, u;
800 if (i.t == 1 && i[0] <= lowprimes[lowprimes.length - 1]) {
801 for (t = 0; t < lowprimes.length; ++t)
802 if (i[0] == lowprimes[t]) return !0;
803 return !1
804 }
805 if (i.isEven()) return !1;
806 for (t = 1; t < lowprimes.length;) {
807 for (r = lowprimes[t], u = t + 1; u < lowprimes.length && r < lplim;) r *= lowprimes[u++];
808 for (r = i.modInt(r); t < u;)
809 if (r % lowprimes[t++] == 0) return !1
810 }
811 return i.millerRabin(n)
812}
813
814function bnpMillerRabin(n) {
815 var i = this.subtract(BigInteger.ONE),
816 r = i.getLowestSetBit(),
817 e, u, f, t, o;
818 if (r <= 0) return !1;
819 for (e = i.shiftRight(r), n = n + 1 >> 1, n > lowprimes.length && (n = lowprimes.length), u = nbi(), f = 0; f < n; ++f)
820 if (u.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]), t = u.modPow(e, this), t.compareTo(BigInteger.ONE) != 0 && t.compareTo(i) != 0) {
821 for (o = 1; o++ < r && t.compareTo(i) != 0;)
822 if (t = t.modPowInt(2, this), t.compareTo(BigInteger.ONE) == 0) return !1;
823 if (t.compareTo(i) != 0) return !1
824 }
825 return !0
826}
827
828function ECFieldElementFp(n, t) {
829 this.x = t;
830 this.q = n
831}
832
833function feFpEquals(n) {
834 return n == this ? !0 : this.q.equals(n.q) && this.x.equals(n.x)
835}
836
837function feFpToBigInteger() {
838 return this.x
839}
840
841function feFpNegate() {
842 return new ECFieldElementFp(this.q, this.x.negate().mod(this.q))
843}
844
845function feFpAdd(n) {
846 return new ECFieldElementFp(this.q, this.x.add(n.toBigInteger()).mod(this.q))
847}
848
849function feFpSubtract(n) {
850 return new ECFieldElementFp(this.q, this.x.subtract(n.toBigInteger()).mod(this.q))
851}
852
853function feFpMultiply(n) {
854 return new ECFieldElementFp(this.q, this.x.multiply(n.toBigInteger()).mod(this.q))
855}
856
857function feFpSquare() {
858 return new ECFieldElementFp(this.q, this.x.square().mod(this.q))
859}
860
861function feFpDivide(n) {
862 return new ECFieldElementFp(this.q, this.x.multiply(n.toBigInteger().modInverse(this.q)).mod(this.q))
863}
864
865function ECPointFp(n, t, i, r) {
866 this.curve = n;
867 this.x = t;
868 this.y = i;
869 this.z = r == null ? BigInteger.ONE : r;
870 this.zinv = null
871}
872
873function pointFpGetX() {
874 return this.zinv == null && (this.zinv = this.z.modInverse(this.curve.q)), this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))
875}
876
877function pointFpGetY() {
878 return this.zinv == null && (this.zinv = this.z.modInverse(this.curve.q)), this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))
879}
880
881function pointFpEquals(n) {
882 if (n == this) return !0;
883 if (this.isInfinity()) return n.isInfinity();
884 if (n.isInfinity()) return this.isInfinity();
885 var t, i;
886 return (t = n.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(n.z)).mod(this.curve.q), !t.equals(BigInteger.ZERO)) ? !1 : (i = n.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(n.z)).mod(this.curve.q), i.equals(BigInteger.ZERO))
887}
888
889function pointFpIsInfinity() {
890 return this.x == null && this.y == null ? !0 : this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO)
891}
892
893function pointFpNegate() {
894 return new ECPointFp(this.curve, this.x, this.y.negate(), this.z)
895}
896
897function pointFpAdd(n) {
898 var t, i;
899 if (this.isInfinity()) return n;
900 if (n.isInfinity()) return this;
901 if (t = n.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(n.z)).mod(this.curve.q), i = n.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(n.z)).mod(this.curve.q), BigInteger.ZERO.equals(i)) return BigInteger.ZERO.equals(t) ? this.twice() : this.curve.getInfinity();
902 var o = new BigInteger("3"),
903 s = this.x.toBigInteger(),
904 h = this.y.toBigInteger(),
905 v = n.x.toBigInteger(),
906 y = n.y.toBigInteger(),
907 u = i.square(),
908 r = u.multiply(i),
909 f = s.multiply(u),
910 e = t.square().multiply(this.z),
911 c = e.subtract(f.shiftLeft(1)).multiply(n.z).subtract(r).multiply(i).mod(this.curve.q),
912 l = f.multiply(o).multiply(t).subtract(h.multiply(r)).subtract(e.multiply(t)).multiply(n.z).add(t.multiply(r)).mod(this.curve.q),
913 a = r.multiply(this.z).multiply(n.z).mod(this.curve.q);
914 return new ECPointFp(this.curve, this.curve.fromBigInteger(c), this.curve.fromBigInteger(l), a)
915}
916
917function pointFpTwice() {
918 if (this.isInfinity()) return this;
919 if (this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();
920 var u = new BigInteger("3"),
921 i = this.x.toBigInteger(),
922 f = this.y.toBigInteger(),
923 t = f.multiply(this.z),
924 r = t.multiply(f).mod(this.curve.q),
925 e = this.curve.a.toBigInteger(),
926 n = i.square().multiply(u);
927 BigInteger.ZERO.equals(e) || (n = n.add(this.z.square().multiply(e)));
928 n = n.mod(this.curve.q);
929 var o = n.square().subtract(i.shiftLeft(3).multiply(r)).shiftLeft(1).multiply(t).mod(this.curve.q),
930 s = n.multiply(u).multiply(i).subtract(r.shiftLeft(1)).shiftLeft(2).multiply(r).subtract(n.square().multiply(n)).mod(this.curve.q),
931 h = t.square().multiply(t).shiftLeft(3).mod(this.curve.q);
932 return new ECPointFp(this.curve, this.curve.fromBigInteger(o), this.curve.fromBigInteger(s), h)
933}
934
935function pointFpMultiply(n) {
936 var r, e;
937 if (this.isInfinity()) return this;
938 if (n.signum() == 0) return this.curve.getInfinity();
939 for (var u = n, f = u.multiply(new BigInteger("3")), o = this.negate(), t = this, i = f.bitLength() - 2; i > 0; --i) t = t.twice(), r = f.testBit(i), e = u.testBit(i), r != e && (t = t.add(r ? this : o));
940 return t
941}
942
943function pointFpMultiplyTwo(n, t, i) {
944 var u, r, f;
945 for (u = n.bitLength() > i.bitLength() ? n.bitLength() - 1 : i.bitLength() - 1, r = this.curve.getInfinity(), f = this.add(t); u >= 0;) r = r.twice(), n.testBit(u) ? r = i.testBit(u) ? r.add(f) : r.add(this) : i.testBit(u) && (r = r.add(t)), --u;
946 return r
947}
948
949function ECCurveFp(n, t, i) {
950 this.q = n;
951 this.a = this.fromBigInteger(t);
952 this.b = this.fromBigInteger(i);
953 this.infinity = new ECPointFp(this, null, null)
954}
955
956function curveFpGetQ() {
957 return this.q
958}
959
960function curveFpGetA() {
961 return this.a
962}
963
964function curveFpGetB() {
965 return this.b
966}
967
968function curveFpEquals(n) {
969 return n == this ? !0 : this.q.equals(n.q) && this.a.equals(n.a) && this.b.equals(n.b)
970}
971
972function curveFpGetInfinity() {
973 return this.infinity
974}
975
976function curveFpFromBigInteger(n) {
977 return new ECFieldElementFp(this.q, n)
978}
979
980function curveFpDecodePointHex(n) {
981 switch (parseInt(n.substr(0, 2), 16)) {
982 case 0:
983 return this.infinity;
984 case 2:
985 case 3:
986 return null;
987 case 4:
988 case 6:
989 case 7:
990 var t = (n.length - 2) / 2,
991 i = n.substr(2, t),
992 r = n.substr(t + 2, t);
993 return new ECPointFp(this, this.fromBigInteger(new BigInteger(i, 16)), this.fromBigInteger(new BigInteger(r, 16)));
994 default:
995 return null
996 }
997}
998
999function X9ECParameters(n, t, i, r) {
1000 this.curve = n;
1001 this.g = t;
1002 this.n = i;
1003 this.h = r
1004}
1005
1006function x9getCurve() {
1007 return this.curve
1008}
1009
1010function x9getG() {
1011 return this.g
1012}
1013
1014function x9getN() {
1015 return this.n
1016}
1017
1018function x9getH() {
1019 return this.h
1020}
1021
1022function fromHex(n) {
1023 return new BigInteger(n, 16)
1024}
1025
1026function secp128r1() {
1027 var t = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"),
1028 i = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"),
1029 r = fromHex("E87579C11079F43DD824993C2CEE5ED3"),
1030 u = fromHex("FFFFFFFE0000000075A30D1B9038A115"),
1031 f = BigInteger.ONE,
1032 n = new ECCurveFp(t, i, r),
1033 e = n.decodePointHex("04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83");
1034 return new X9ECParameters(n, e, u, f)
1035}
1036
1037function secp160k1() {
1038 var t = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"),
1039 i = BigInteger.ZERO,
1040 r = fromHex("7"),
1041 u = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3"),
1042 f = BigInteger.ONE,
1043 n = new ECCurveFp(t, i, r),
1044 e = n.decodePointHex("043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE");
1045 return new X9ECParameters(n, e, u, f)
1046}
1047
1048function secp160r1() {
1049 var t = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"),
1050 i = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"),
1051 r = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"),
1052 u = fromHex("0100000000000000000001F4C8F927AED3CA752257"),
1053 f = BigInteger.ONE,
1054 n = new ECCurveFp(t, i, r),
1055 e = n.decodePointHex("044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32");
1056 return new X9ECParameters(n, e, u, f)
1057}
1058
1059function secp192k1() {
1060 var t = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"),
1061 i = BigInteger.ZERO,
1062 r = fromHex("3"),
1063 u = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"),
1064 f = BigInteger.ONE,
1065 n = new ECCurveFp(t, i, r),
1066 e = n.decodePointHex("04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
1067 return new X9ECParameters(n, e, u, f)
1068}
1069
1070function secp192r1() {
1071 var t = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),
1072 i = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"),
1073 r = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"),
1074 u = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"),
1075 f = BigInteger.ONE,
1076 n = new ECCurveFp(t, i, r),
1077 e = n.decodePointHex("04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
1078 return new X9ECParameters(n, e, u, f)
1079}
1080
1081function secp224r1() {
1082 var t = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"),
1083 i = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"),
1084 r = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"),
1085 u = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"),
1086 f = BigInteger.ONE,
1087 n = new ECCurveFp(t, i, r),
1088 e = n.decodePointHex("04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
1089 return new X9ECParameters(n, e, u, f)
1090}
1091
1092function secp256k1() {
1093 var t = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F"),
1094 i = BigInteger.ZERO,
1095 r = fromHex("7"),
1096 u = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"),
1097 f = BigInteger.ONE,
1098 n = new ECCurveFp(t, i, r),
1099 e = n.decodePointHex("0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8");
1100 return new X9ECParameters(n, e, u, f)
1101}
1102
1103function secp256r1() {
1104 var t = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),
1105 i = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),
1106 r = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),
1107 u = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),
1108 f = BigInteger.ONE,
1109 n = new ECCurveFp(t, i, r),
1110 e = n.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
1111 return new X9ECParameters(n, e, u, f)
1112}
1113
1114function getSECCurveByName(n) {
1115 return n == "secp128r1" ? secp128r1() : n == "secp160k1" ? secp160k1() : n == "secp160r1" ? secp160r1() : n == "secp192k1" ? secp192k1() : n == "secp192r1" ? secp192r1() : n == "secp224r1" ? secp224r1() : n == "secp256k1" ? secp256k1() : n == "secp256r1" ? secp256r1() : null
1116}
1117
1118function integerToBytes(n, t) {
1119 var i = n.toByteArrayUnsigned();
1120 if (t < i.length) i = i.slice(i.length - t);
1121 else
1122 while (t > i.length) i.unshift(0);
1123 return i
1124}
1125
1126function dmp(n) {
1127 return n instanceof BigInteger || (n = n.toBigInteger()), Crypto.util.bytesToHex(n.toByteArrayUnsigned())
1128}
1129
1130function setupAssetPopup(n) {
1131 $(".color-popover", n).popover({
1132 content: function() {
1133 return $($(this).attr("contents")).html()
1134 }
1135 }).on("click", function(n) {
1136 return $(this).focus(), n.preventDefault(), !0
1137 })
1138}
1139
1140function refreshQuote() {
1141 function n(n) {
1142 $(".bid-price").text(n.usdbtc_bid);
1143 $(".ask-price").text(n.usdbtc_ask)
1144 }
1145 $.ajax({
1146 type: "POST",
1147 url: "/quote",
1148 data: {},
1149 success: n,
1150 dataType: "json"
1151 })
1152}
1153var rng_psize, rng_state, rng_pool, rng_pptr, secure_browser, t, windowCrypto, z, onMouseMoveListener, dbits, canary, j_lm, BI_FP, BI_RM, BI_RC, rr, vv, lowprimes, lplim, EventEmitter, names, i, TransactionDatabase, saveAs, startup, _gaq;
1154if (function(n, t) {
1155 typeof module == "object" && typeof module.exports == "object" ? module.exports = n.document ? t(n, !0) : function(n) {
1156 if (!n.document) throw new Error("jQuery requires a window with a document");
1157 return t(n)
1158 } : t(n)
1159 }(typeof window != "undefined" ? window : this, function(n, t) {
1160 function ri(n) {
1161 var t = n.length,
1162 r = i.type(n);
1163 return r === "function" || i.isWindow(n) ? !1 : n.nodeType === 1 && t ? !0 : r === "array" || t === 0 || typeof t == "number" && t > 0 && t - 1 in n
1164 }
1165
1166 function ui(n, t, r) {
1167 if (i.isFunction(t)) return i.grep(n, function(n, i) {
1168 return !!t.call(n, i, n) !== r
1169 });
1170 if (t.nodeType) return i.grep(n, function(n) {
1171 return n === t !== r
1172 });
1173 if (typeof t == "string") {
1174 if (ue.test(t)) return i.filter(t, n, r);
1175 t = i.filter(t, n)
1176 }
1177 return i.grep(n, function(n) {
1178 return i.inArray(n, t) >= 0 !== r
1179 })
1180 }
1181
1182 function hr(n, t) {
1183 do n = n[t]; while (n && n.nodeType !== 1);
1184 return n
1185 }
1186
1187 function oe(n) {
1188 var t = fi[n] = {};
1189 return i.each(n.match(h) || [], function(n, i) {
1190 t[i] = !0
1191 }), t
1192 }
1193
1194 function cr() {
1195 u.addEventListener ? (u.removeEventListener("DOMContentLoaded", a, !1), n.removeEventListener("load", a, !1)) : (u.detachEvent("onreadystatechange", a), n.detachEvent("onload", a))
1196 }
1197
1198 function a() {
1199 (u.addEventListener || event.type === "load" || u.readyState === "complete") && (cr(), i.ready())
1200 }
1201
1202 function yr(n, t, r) {
1203 if (r === undefined && n.nodeType === 1) {
1204 var u = "data-" + t.replace(vr, "-$1").toLowerCase();
1205 if (r = n.getAttribute(u), typeof r == "string") {
1206 try {
1207 r = r === "true" ? !0 : r === "false" ? !1 : r === "null" ? null : +r + "" === r ? +r : ar.test(r) ? i.parseJSON(r) : r
1208 } catch (f) {}
1209 i.data(n, t, r)
1210 } else r = undefined
1211 }
1212 return r
1213 }
1214
1215 function ei(n) {
1216 for (var t in n)
1217 if ((t !== "data" || !i.isEmptyObject(n[t])) && t !== "toJSON") return !1;
1218 return !0
1219 }
1220
1221 function pr(n, t, r, u) {
1222 if (i.acceptData(n)) {
1223 var s, e, h = i.expando,
1224 l = n.nodeType,
1225 o = l ? i.cache : n,
1226 f = l ? n[h] : n[h] && h;
1227 if (f && o[f] && (u || o[f].data) || r !== undefined || typeof t != "string") return f || (f = l ? n[h] = c.pop() || i.guid++ : h), o[f] || (o[f] = l ? {} : {
1228 toJSON: i.noop
1229 }), (typeof t == "object" || typeof t == "function") && (u ? o[f] = i.extend(o[f], t) : o[f].data = i.extend(o[f].data, t)), e = o[f], u || (e.data || (e.data = {}), e = e.data), r !== undefined && (e[i.camelCase(t)] = r), typeof t == "string" ? (s = e[t], s == null && (s = e[i.camelCase(t)])) : s = e, s
1230 }
1231 }
1232
1233 function wr(n, t, u) {
1234 if (i.acceptData(n)) {
1235 var e, s, h = n.nodeType,
1236 f = h ? i.cache : n,
1237 o = h ? n[i.expando] : i.expando;
1238 if (f[o]) {
1239 if (t && (e = u ? f[o] : f[o].data, e)) {
1240 for (i.isArray(t) ? t = t.concat(i.map(t, i.camelCase)) : (t in e) ? t = [t] : (t = i.camelCase(t), t = t in e ? [t] : t.split(" ")), s = t.length; s--;) delete e[t[s]];
1241 if (u ? !ei(e) : !i.isEmptyObject(e)) return
1242 }(u || (delete f[o].data, ei(f[o]))) && (h ? i.cleanData([n], !0) : r.deleteExpando || f != f.window ? delete f[o] : f[o] = null)
1243 }
1244 }
1245 }
1246
1247 function vt() {
1248 return !0
1249 }
1250
1251 function it() {
1252 return !1
1253 }
1254
1255 function dr() {
1256 try {
1257 return u.activeElement
1258 } catch (n) {}
1259 }
1260
1261 function gr(n) {
1262 var i = nu.split("|"),
1263 t = n.createDocumentFragment();
1264 if (t.createElement)
1265 while (i.length) t.createElement(i.pop());
1266 return t
1267 }
1268
1269 function f(n, t) {
1270 var e, u, s = 0,
1271 r = typeof n.getElementsByTagName !== o ? n.getElementsByTagName(t || "*") : typeof n.querySelectorAll !== o ? n.querySelectorAll(t || "*") : undefined;
1272 if (!r)
1273 for (r = [], e = n.childNodes || n;
1274 (u = e[s]) != null; s++) !t || i.nodeName(u, t) ? r.push(u) : i.merge(r, f(u, t));
1275 return t === undefined || t && i.nodeName(n, t) ? i.merge([n], r) : r
1276 }
1277
1278 function be(n) {
1279 oi.test(n.type) && (n.defaultChecked = n.checked)
1280 }
1281
1282 function eu(n, t) {
1283 return i.nodeName(n, "table") && i.nodeName(t.nodeType !== 11 ? t : t.firstChild, "tr") ? n.getElementsByTagName("tbody")[0] || n.appendChild(n.ownerDocument.createElement("tbody")) : n
1284 }
1285
1286 function ou(n) {
1287 return n.type = (i.find.attr(n, "type") !== null) + "/" + n.type, n
1288 }
1289
1290 function su(n) {
1291 var t = ye.exec(n.type);
1292 return t ? n.type = t[1] : n.removeAttribute("type"), n
1293 }
1294
1295 function li(n, t) {
1296 for (var u, r = 0;
1297 (u = n[r]) != null; r++) i._data(u, "globalEval", !t || i._data(t[r], "globalEval"))
1298 }
1299
1300 function hu(n, t) {
1301 if (t.nodeType === 1 && i.hasData(n)) {
1302 var u, f, o, s = i._data(n),
1303 r = i._data(t, s),
1304 e = s.events;
1305 if (e) {
1306 delete r.handle;
1307 r.events = {};
1308 for (u in e)
1309 for (f = 0, o = e[u].length; f < o; f++) i.event.add(t, u, e[u][f])
1310 }
1311 r.data && (r.data = i.extend({}, r.data))
1312 }
1313 }
1314
1315 function ke(n, t) {
1316 var u, e, f;
1317 if (t.nodeType === 1) {
1318 if (u = t.nodeName.toLowerCase(), !r.noCloneEvent && t[i.expando]) {
1319 f = i._data(t);
1320 for (e in f.events) i.removeEvent(t, e, f.handle);
1321 t.removeAttribute(i.expando)
1322 }
1323 u === "script" && t.text !== n.text ? (ou(t).text = n.text, su(t)) : u === "object" ? (t.parentNode && (t.outerHTML = n.outerHTML), r.html5Clone && n.innerHTML && !i.trim(t.innerHTML) && (t.innerHTML = n.innerHTML)) : u === "input" && oi.test(n.type) ? (t.defaultChecked = t.checked = n.checked, t.value !== n.value && (t.value = n.value)) : u === "option" ? t.defaultSelected = t.selected = n.defaultSelected : (u === "input" || u === "textarea") && (t.defaultValue = n.defaultValue)
1324 }
1325 }
1326
1327 function cu(t, r) {
1328 var u = i(r.createElement(t)).appendTo(r.body),
1329 f = n.getDefaultComputedStyle ? n.getDefaultComputedStyle(u[0]).display : i.css(u[0], "display");
1330 return u.detach(), f
1331 }
1332
1333 function lu(n) {
1334 var r = u,
1335 t = ai[n];
1336 return t || (t = cu(n, r), t !== "none" && t || (ot = (ot || i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement), r = (ot[0].contentWindow || ot[0].contentDocument).document, r.write(), r.close(), t = cu(n, r), ot.detach()), ai[n] = t), t
1337 }
1338
1339 function vu(n, t) {
1340 return {
1341 get: function() {
1342 var i = n();
1343 if (i != null) {
1344 if (i) {
1345 delete this.get;
1346 return
1347 }
1348 return (this.get = t).apply(this, arguments)
1349 }
1350 }
1351 }
1352 }
1353
1354 function wu(n, t) {
1355 if (t in n) return t;
1356 for (var r = t.charAt(0).toUpperCase() + t.slice(1), u = t, i = pu.length; i--;)
1357 if (t = pu[i] + r, t in n) return t;
1358 return u
1359 }
1360
1361 function bu(n, t) {
1362 for (var f, r, o, e = [], u = 0, s = n.length; u < s; u++)(r = n[u], r.style) && (e[u] = i._data(r, "olddisplay"), f = r.style.display, t ? (e[u] || f !== "none" || (r.style.display = ""), r.style.display === "" && et(r) && (e[u] = i._data(r, "olddisplay", lu(r.nodeName)))) : e[u] || (o = et(r), (f && f !== "none" || !o) && i._data(r, "olddisplay", o ? f : i.css(r, "display"))));
1363 for (u = 0; u < s; u++)(r = n[u], r.style) && (t && r.style.display !== "none" && r.style.display !== "" || (r.style.display = t ? e[u] || "" : "none"));
1364 return n
1365 }
1366
1367 function ku(n, t, i) {
1368 var r = to.exec(t);
1369 return r ? Math.max(0, r[1] - (i || 0)) + (r[2] || "px") : t
1370 }
1371
1372 function du(n, t, r, u, f) {
1373 for (var e = r === (u ? "border" : "content") ? 4 : t === "width" ? 1 : 0, o = 0; e < 4; e += 2) r === "margin" && (o += i.css(n, r + w[e], !0, f)), u ? (r === "content" && (o -= i.css(n, "padding" + w[e], !0, f)), r !== "margin" && (o -= i.css(n, "border" + w[e] + "Width", !0, f))) : (o += i.css(n, "padding" + w[e], !0, f), r !== "padding" && (o += i.css(n, "border" + w[e] + "Width", !0, f)));
1374 return o
1375 }
1376
1377 function gu(n, t, u) {
1378 var o = !0,
1379 f = t === "width" ? n.offsetWidth : n.offsetHeight,
1380 e = k(n),
1381 s = r.boxSizing() && i.css(n, "boxSizing", !1, e) === "border-box";
1382 if (f <= 0 || f == null) {
1383 if (f = d(n, t, e), (f < 0 || f == null) && (f = n.style[t]), yt.test(f)) return f;
1384 o = s && (r.boxSizingReliable() || f === n.style[t]);
1385 f = parseFloat(f) || 0
1386 }
1387 return f + du(n, t, u || (s ? "border" : "content"), o, e) + "px"
1388 }
1389
1390 function e(n, t, i, r, u) {
1391 return new e.prototype.init(n, t, i, r, u)
1392 }
1393
1394 function tf() {
1395 return setTimeout(function() {
1396 rt = undefined
1397 }), rt = i.now()
1398 }
1399
1400 function bt(n, t) {
1401 var r, i = {
1402 height: n
1403 },
1404 u = 0;
1405 for (t = t ? 1 : 0; u < 4; u += 2 - t) r = w[u], i["margin" + r] = i["padding" + r] = n;
1406 return t && (i.opacity = i.width = n), i
1407 }
1408
1409 function rf(n, t, i) {
1410 for (var u, f = (st[t] || []).concat(st["*"]), r = 0, e = f.length; r < e; r++)
1411 if (u = f[r].call(i, t, n)) return u
1412 }
1413
1414 function eo(n, t, u) {
1415 var f, l, p, a, o, b, y, w, c = this,
1416 v = {},
1417 s = n.style,
1418 h = n.nodeType && et(n),
1419 e = i._data(n, "fxshow");
1420 u.queue || (o = i._queueHooks(n, "fx"), o.unqueued == null && (o.unqueued = 0, b = o.empty.fire, o.empty.fire = function() {
1421 o.unqueued || b()
1422 }), o.unqueued++, c.always(function() {
1423 c.always(function() {
1424 o.unqueued--;
1425 i.queue(n, "fx").length || o.empty.fire()
1426 })
1427 }));
1428 n.nodeType === 1 && ("height" in t || "width" in t) && (u.overflow = [s.overflow, s.overflowX, s.overflowY], y = i.css(n, "display"), w = lu(n.nodeName), y === "none" && (y = w), y === "inline" && i.css(n, "float") === "none" && (r.inlineBlockNeedsLayout && w !== "inline" ? s.zoom = 1 : s.display = "inline-block"));
1429 u.overflow && (s.overflow = "hidden", r.shrinkWrapBlocks() || c.always(function() {
1430 s.overflow = u.overflow[0];
1431 s.overflowX = u.overflow[1];
1432 s.overflowY = u.overflow[2]
1433 }));
1434 for (f in t)
1435 if (l = t[f], uo.exec(l)) {
1436 if (delete t[f], p = p || l === "toggle", l === (h ? "hide" : "show"))
1437 if (l === "show" && e && e[f] !== undefined) h = !0;
1438 else continue;
1439 v[f] = e && e[f] || i.style(n, f)
1440 }
1441 if (!i.isEmptyObject(v)) {
1442 e ? "hidden" in e && (h = e.hidden) : e = i._data(n, "fxshow", {});
1443 p && (e.hidden = !h);
1444 h ? i(n).show() : c.done(function() {
1445 i(n).hide()
1446 });
1447 c.done(function() {
1448 var t;
1449 i._removeData(n, "fxshow");
1450 for (t in v) i.style(n, t, v[t])
1451 });
1452 for (f in v) a = rf(h ? e[f] : 0, f, c), f in e || (e[f] = a.start, h && (a.end = a.start, a.start = f === "width" || f === "height" ? 1 : 0))
1453 }
1454 }
1455
1456 function oo(n, t) {
1457 var r, f, e, u, o;
1458 for (r in n)
1459 if (f = i.camelCase(r), e = t[f], u = n[r], i.isArray(u) && (e = u[1], u = n[r] = u[0]), r !== f && (n[f] = u, delete n[r]), o = i.cssHooks[f], o && "expand" in o) {
1460 u = o.expand(u);
1461 delete n[f];
1462 for (r in u) r in n || (n[r] = u[r], t[r] = e)
1463 } else t[f] = e
1464 }
1465
1466 function uf(n, t, r) {
1467 var e, o, s = 0,
1468 l = wt.length,
1469 f = i.Deferred().always(function() {
1470 delete c.elem
1471 }),
1472 c = function() {
1473 if (o) return !1;
1474 for (var s = rt || tf(), t = Math.max(0, u.startTime + u.duration - s), h = t / u.duration || 0, i = 1 - h, r = 0, e = u.tweens.length; r < e; r++) u.tweens[r].run(i);
1475 return f.notifyWith(n, [u, i, t]), i < 1 && e ? t : (f.resolveWith(n, [u]), !1)
1476 },
1477 u = f.promise({
1478 elem: n,
1479 props: i.extend({}, t),
1480 opts: i.extend(!0, {
1481 specialEasing: {}
1482 }, r),
1483 originalProperties: t,
1484 originalOptions: r,
1485 startTime: rt || tf(),
1486 duration: r.duration,
1487 tweens: [],
1488 createTween: function(t, r) {
1489 var f = i.Tween(n, u.opts, t, r, u.opts.specialEasing[t] || u.opts.easing);
1490 return u.tweens.push(f), f
1491 },
1492 stop: function(t) {
1493 var i = 0,
1494 r = t ? u.tweens.length : 0;
1495 if (o) return this;
1496 for (o = !0; i < r; i++) u.tweens[i].run(1);
1497 return t ? f.resolveWith(n, [u, t]) : f.rejectWith(n, [u, t]), this
1498 }
1499 }),
1500 h = u.props;
1501 for (oo(h, u.opts.specialEasing); s < l; s++)
1502 if (e = wt[s].call(u, n, h, u.opts), e) return e;
1503 return i.map(h, rf, u), i.isFunction(u.opts.start) && u.opts.start.call(n, u), i.fx.timer(i.extend(c, {
1504 elem: n,
1505 anim: u,
1506 queue: u.opts.queue
1507 })), u.progress(u.opts.progress).done(u.opts.done, u.opts.complete).fail(u.opts.fail).always(u.opts.always)
1508 }
1509
1510 function vf(n) {
1511 return function(t, r) {
1512 typeof t != "string" && (r = t, t = "*");
1513 var u, f = 0,
1514 e = t.toLowerCase().match(h) || [];
1515 if (i.isFunction(r))
1516 while (u = e[f++]) u.charAt(0) === "+" ? (u = u.slice(1) || "*", (n[u] = n[u] || []).unshift(r)) : (n[u] = n[u] || []).push(r)
1517 }
1518 }
1519
1520 function yf(n, t, r, u) {
1521 function e(s) {
1522 var h;
1523 return f[s] = !0, i.each(n[s] || [], function(n, i) {
1524 var s = i(t, r, u);
1525 if (typeof s != "string" || o || f[s]) {
1526 if (o) return !(h = s)
1527 } else return t.dataTypes.unshift(s), e(s), !1
1528 }), h
1529 }
1530 var f = {},
1531 o = n === bi;
1532 return e(t.dataTypes[0]) || !f["*"] && e("*")
1533 }
1534
1535 function ki(n, t) {
1536 var u, r, f = i.ajaxSettings.flatOptions || {};
1537 for (r in t) t[r] !== undefined && ((f[r] ? n : u || (u = {}))[r] = t[r]);
1538 return u && i.extend(!0, n, u), n
1539 }
1540
1541 function vo(n, t, i) {
1542 for (var o, e, u, f, s = n.contents, r = n.dataTypes; r[0] === "*";) r.shift(), e === undefined && (e = n.mimeType || t.getResponseHeader("Content-Type"));
1543 if (e)
1544 for (f in s)
1545 if (s[f] && s[f].test(e)) {
1546 r.unshift(f);
1547 break
1548 }
1549 if (r[0] in i) u = r[0];
1550 else {
1551 for (f in i) {
1552 if (!r[0] || n.converters[f + " " + r[0]]) {
1553 u = f;
1554 break
1555 }
1556 o || (o = f)
1557 }
1558 u = u || o
1559 }
1560 if (u) return u !== r[0] && r.unshift(u), i[u]
1561 }
1562
1563 function yo(n, t, i, r) {
1564 var h, u, f, s, e, o = {},
1565 c = n.dataTypes.slice();
1566 if (c[1])
1567 for (f in n.converters) o[f.toLowerCase()] = n.converters[f];
1568 for (u = c.shift(); u;)
1569 if (n.responseFields[u] && (i[n.responseFields[u]] = t), !e && r && n.dataFilter && (t = n.dataFilter(t, n.dataType)), e = u, u = c.shift(), u)
1570 if (u === "*") u = e;
1571 else if (e !== "*" && e !== u) {
1572 if (f = o[e + " " + u] || o["* " + u], !f)
1573 for (h in o)
1574 if (s = h.split(" "), s[1] === u && (f = o[e + " " + s[0]] || o["* " + s[0]], f)) {
1575 f === !0 ? f = o[h] : o[h] !== !0 && (u = s[0], c.unshift(s[1]));
1576 break
1577 }
1578 if (f !== !0)
1579 if (f && n.throws) t = f(t);
1580 else try {
1581 t = f(t)
1582 } catch (l) {
1583 return {
1584 state: "parsererror",
1585 error: f ? l : "No conversion from " + e + " to " + u
1586 }
1587 }
1588 }
1589 return {
1590 state: "success",
1591 data: t
1592 }
1593 }
1594
1595 function di(n, t, r, u) {
1596 var f;
1597 if (i.isArray(t)) i.each(t, function(t, i) {
1598 r || wo.test(n) ? u(n, i) : di(n + "[" + (typeof i == "object" ? t : "") + "]", i, r, u)
1599 });
1600 else if (r || i.type(t) !== "object") u(n, t);
1601 else
1602 for (f in t) di(n + "[" + f + "]", t[f], r, u)
1603 }
1604
1605 function wf() {
1606 try {
1607 return new n.XMLHttpRequest
1608 } catch (t) {}
1609 }
1610
1611 function ns() {
1612 try {
1613 return new n.ActiveXObject("Microsoft.XMLHTTP")
1614 } catch (t) {}
1615 }
1616
1617 function bf(n) {
1618 return i.isWindow(n) ? n : n.nodeType === 9 ? n.defaultView || n.parentWindow : !1
1619 }
1620 var c = [],
1621 l = c.slice,
1622 ir = c.concat,
1623 ti = c.push,
1624 rr = c.indexOf,
1625 ct = {},
1626 gf = ct.toString,
1627 tt = ct.hasOwnProperty,
1628 ii = "".trim,
1629 r = {},
1630 ur = "1.11.0",
1631 i = function(n, t) {
1632 return new i.fn.init(n, t)
1633 },
1634 ne = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
1635 te = /^-ms-/,
1636 ie = /-([\da-z])/gi,
1637 re = function(n, t) {
1638 return t.toUpperCase()
1639 },
1640 p, or, sr, h, fi, lt, o, lr, ar, vr, ot, ai, ff, of, sf, dt, gi, ni, nr, tr, kf, df;
1641 i.fn = i.prototype = {
1642 jquery: ur,
1643 constructor: i,
1644 selector: "",
1645 length: 0,
1646 toArray: function() {
1647 return l.call(this)
1648 },
1649 get: function(n) {
1650 return n != null ? n < 0 ? this[n + this.length] : this[n] : l.call(this)
1651 },
1652 pushStack: function(n) {
1653 var t = i.merge(this.constructor(), n);
1654 return t.prevObject = this, t.context = this.context, t
1655 },
1656 each: function(n, t) {
1657 return i.each(this, n, t)
1658 },
1659 map: function(n) {
1660 return this.pushStack(i.map(this, function(t, i) {
1661 return n.call(t, i, t)
1662 }))
1663 },
1664 slice: function() {
1665 return this.pushStack(l.apply(this, arguments))
1666 },
1667 first: function() {
1668 return this.eq(0)
1669 },
1670 last: function() {
1671 return this.eq(-1)
1672 },
1673 eq: function(n) {
1674 var i = this.length,
1675 t = +n + (n < 0 ? i : 0);
1676 return this.pushStack(t >= 0 && t < i ? [this[t]] : [])
1677 },
1678 end: function() {
1679 return this.prevObject || this.constructor(null)
1680 },
1681 push: ti,
1682 sort: c.sort,
1683 splice: c.splice
1684 };
1685 i.extend = i.fn.extend = function() {
1686 var r, e, t, f, o, s, n = arguments[0] || {},
1687 u = 1,
1688 c = arguments.length,
1689 h = !1;
1690 for (typeof n == "boolean" && (h = n, n = arguments[u] || {}, u++), typeof n == "object" || i.isFunction(n) || (n = {}), u === c && (n = this, u--); u < c; u++)
1691 if ((o = arguments[u]) != null)
1692 for (f in o)(r = n[f], t = o[f], n !== t) && (h && t && (i.isPlainObject(t) || (e = i.isArray(t))) ? (e ? (e = !1, s = r && i.isArray(r) ? r : []) : s = r && i.isPlainObject(r) ? r : {}, n[f] = i.extend(h, s, t)) : t !== undefined && (n[f] = t));
1693 return n
1694 };
1695 i.extend({
1696 expando: "jQuery" + (ur + Math.random()).replace(/\D/g, ""),
1697 isReady: !0,
1698 error: function(n) {
1699 throw new Error(n);
1700 },
1701 noop: function() {},
1702 isFunction: function(n) {
1703 return i.type(n) === "function"
1704 },
1705 isArray: Array.isArray || function(n) {
1706 return i.type(n) === "array"
1707 },
1708 isWindow: function(n) {
1709 return n != null && n == n.window
1710 },
1711 isNumeric: function(n) {
1712 return n - parseFloat(n) >= 0
1713 },
1714 isEmptyObject: function(n) {
1715 for (var t in n) return !1;
1716 return !0
1717 },
1718 isPlainObject: function(n) {
1719 var t;
1720 if (!n || i.type(n) !== "object" || n.nodeType || i.isWindow(n)) return !1;
1721 try {
1722 if (n.constructor && !tt.call(n, "constructor") && !tt.call(n.constructor.prototype, "isPrototypeOf")) return !1
1723 } catch (u) {
1724 return !1
1725 }
1726 if (r.ownLast)
1727 for (t in n) return tt.call(n, t);
1728 for (t in n);
1729 return t === undefined || tt.call(n, t)
1730 },
1731 type: function(n) {
1732 return n == null ? n + "" : typeof n == "object" || typeof n == "function" ? ct[gf.call(n)] || "object" : typeof n
1733 },
1734 globalEval: function(t) {
1735 t && i.trim(t) && (n.execScript || function(t) {
1736 n.eval.call(n, t)
1737 })(t)
1738 },
1739 camelCase: function(n) {
1740 return n.replace(te, "ms-").replace(ie, re)
1741 },
1742 nodeName: function(n, t) {
1743 return n.nodeName && n.nodeName.toLowerCase() === t.toLowerCase()
1744 },
1745 each: function(n, t, i) {
1746 var u, r = 0,
1747 f = n.length,
1748 e = ri(n);
1749 if (i) {
1750 if (e) {
1751 for (; r < f; r++)
1752 if (u = t.apply(n[r], i), u === !1) break
1753 } else
1754 for (r in n)
1755 if (u = t.apply(n[r], i), u === !1) break
1756 } else if (e) {
1757 for (; r < f; r++)
1758 if (u = t.call(n[r], r, n[r]), u === !1) break
1759 } else
1760 for (r in n)
1761 if (u = t.call(n[r], r, n[r]), u === !1) break; return n
1762 },
1763 trim: ii && !ii.call(" ") ? function(n) {
1764 return n == null ? "" : ii.call(n)
1765 } : function(n) {
1766 return n == null ? "" : (n + "").replace(ne, "")
1767 },
1768 makeArray: function(n, t) {
1769 var r = t || [];
1770 return n != null && (ri(Object(n)) ? i.merge(r, typeof n == "string" ? [n] : n) : ti.call(r, n)), r
1771 },
1772 inArray: function(n, t, i) {
1773 var r;
1774 if (t) {
1775 if (rr) return rr.call(t, n, i);
1776 for (r = t.length, i = i ? i < 0 ? Math.max(0, r + i) : i : 0; i < r; i++)
1777 if (i in t && t[i] === n) return i
1778 }
1779 return -1
1780 },
1781 merge: function(n, t) {
1782 for (var r = +t.length, i = 0, u = n.length; i < r;) n[u++] = t[i++];
1783 if (r !== r)
1784 while (t[i] !== undefined) n[u++] = t[i++];
1785 return n.length = u, n
1786 },
1787 grep: function(n, t, i) {
1788 for (var u, f = [], r = 0, e = n.length, o = !i; r < e; r++) u = !t(n[r], r), u !== o && f.push(n[r]);
1789 return f
1790 },
1791 map: function(n, t, i) {
1792 var u, r = 0,
1793 e = n.length,
1794 o = ri(n),
1795 f = [];
1796 if (o)
1797 for (; r < e; r++) u = t(n[r], r, i), u != null && f.push(u);
1798 else
1799 for (r in n) u = t(n[r], r, i), u != null && f.push(u);
1800 return ir.apply([], f)
1801 },
1802 guid: 1,
1803 proxy: function(n, t) {
1804 var u, r, f;
1805 return (typeof t == "string" && (f = n[t], t = n, n = f), !i.isFunction(n)) ? undefined : (u = l.call(arguments, 2), r = function() {
1806 return n.apply(t || this, u.concat(l.call(arguments)))
1807 }, r.guid = n.guid = n.guid || i.guid++, r)
1808 },
1809 now: function() {
1810 return +new Date
1811 },
1812 support: r
1813 });
1814 i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(n, t) {
1815 ct["[object " + t + "]"] = t.toLowerCase()
1816 });
1817 p = function(n) {
1818 function u(n, t, i, u) {
1819 var w, h, c, v, k, y, d, a, nt, g;
1820 if ((t ? t.ownerDocument || t : s) !== e && p(t), t = t || e, i = i || [], !n || typeof n != "string") return i;
1821 if ((v = t.nodeType) !== 1 && v !== 9) return [];
1822 if (l && !u) {
1823 if (w = or.exec(n))
1824 if (c = w[1]) {
1825 if (v === 9)
1826 if (h = t.getElementById(c), h && h.parentNode) {
1827 if (h.id === c) return i.push(h), i
1828 } else return i;
1829 else if (t.ownerDocument && (h = t.ownerDocument.getElementById(c)) && et(t, h) && h.id === c) return i.push(h), i
1830 } else {
1831 if (w[2]) return b.apply(i, t.getElementsByTagName(n)), i;
1832 if ((c = w[3]) && r.getElementsByClassName && t.getElementsByClassName) return b.apply(i, t.getElementsByClassName(c)), i
1833 }
1834 if (r.qsa && (!o || !o.test(n))) {
1835 if (a = d = f, nt = t, g = v === 9 && n, v === 1 && t.nodeName.toLowerCase() !== "object") {
1836 for (y = vt(n), (d = t.getAttribute("id")) ? a = d.replace(sr, "\\$&") : t.setAttribute("id", a), a = "[id='" + a + "'] ", k = y.length; k--;) y[k] = a + yt(y[k]);
1837 nt = gt.test(n) && ii(t.parentNode) || t;
1838 g = y.join(",")
1839 }
1840 if (g) try {
1841 return b.apply(i, nt.querySelectorAll(g)), i
1842 } catch (tt) {} finally {
1843 d || t.removeAttribute("id")
1844 }
1845 }
1846 }
1847 return vr(n.replace(lt, "$1"), t, i, u)
1848 }
1849
1850 function ni() {
1851 function n(r, u) {
1852 return i.push(r + " ") > t.cacheLength && delete n[i.shift()], n[r + " "] = u
1853 }
1854 var i = [];
1855 return n
1856 }
1857
1858 function h(n) {
1859 return n[f] = !0, n
1860 }
1861
1862 function c(n) {
1863 var t = e.createElement("div");
1864 try {
1865 return !!n(t)
1866 } catch (i) {
1867 return !1
1868 } finally {
1869 t.parentNode && t.parentNode.removeChild(t);
1870 t = null
1871 }
1872 }
1873
1874 function ti(n, i) {
1875 for (var u = n.split("|"), r = n.length; r--;) t.attrHandle[u[r]] = i
1876 }
1877
1878 function pi(n, t) {
1879 var i = t && n,
1880 r = i && n.nodeType === 1 && t.nodeType === 1 && (~t.sourceIndex || li) - (~n.sourceIndex || li);
1881 if (r) return r;
1882 if (i)
1883 while (i = i.nextSibling)
1884 if (i === t) return -1;
1885 return n ? 1 : -1
1886 }
1887
1888 function hr(n) {
1889 return function(t) {
1890 var i = t.nodeName.toLowerCase();
1891 return i === "input" && t.type === n
1892 }
1893 }
1894
1895 function cr(n) {
1896 return function(t) {
1897 var i = t.nodeName.toLowerCase();
1898 return (i === "input" || i === "button") && t.type === n
1899 }
1900 }
1901
1902 function tt(n) {
1903 return h(function(t) {
1904 return t = +t, h(function(i, r) {
1905 for (var u, f = n([], i.length, t), e = f.length; e--;) i[u = f[e]] && (i[u] = !(r[u] = i[u]))
1906 })
1907 })
1908 }
1909
1910 function ii(n) {
1911 return n && typeof n.getElementsByTagName !== ut && n
1912 }
1913
1914 function wi() {}
1915
1916 function vt(n, i) {
1917 var e, f, s, o, r, h, c, l = hi[n + " "];
1918 if (l) return i ? 0 : l.slice(0);
1919 for (r = n, h = [], c = t.preFilter; r;) {
1920 (!e || (f = nr.exec(r))) && (f && (r = r.slice(f[0].length) || r), h.push(s = []));
1921 e = !1;
1922 (f = tr.exec(r)) && (e = f.shift(), s.push({
1923 value: e,
1924 type: f[0].replace(lt, " ")
1925 }), r = r.slice(e.length));
1926 for (o in t.filter)(f = at[o].exec(r)) && (!c[o] || (f = c[o](f))) && (e = f.shift(), s.push({
1927 value: e,
1928 type: o,
1929 matches: f
1930 }), r = r.slice(e.length));
1931 if (!e) break
1932 }
1933 return i ? r.length : r ? u.error(n) : hi(n, h).slice(0)
1934 }
1935
1936 function yt(n) {
1937 for (var t = 0, r = n.length, i = ""; t < r; t++) i += n[t].value;
1938 return i
1939 }
1940
1941 function ri(n, t, i) {
1942 var r = t.dir,
1943 u = i && r === "parentNode",
1944 e = bi++;
1945 return t.first ? function(t, i, f) {
1946 while (t = t[r])
1947 if (t.nodeType === 1 || u) return n(t, i, f)
1948 } : function(t, i, o) {
1949 var s, h, c = [a, e];
1950 if (o) {
1951 while (t = t[r])
1952 if ((t.nodeType === 1 || u) && n(t, i, o)) return !0
1953 } else
1954 while (t = t[r])
1955 if (t.nodeType === 1 || u) {
1956 if (h = t[f] || (t[f] = {}), (s = h[r]) && s[0] === a && s[1] === e) return c[2] = s[2];
1957 if (h[r] = c, c[2] = n(t, i, o)) return !0
1958 }
1959 }
1960 }
1961
1962 function ui(n) {
1963 return n.length > 1 ? function(t, i, r) {
1964 for (var u = n.length; u--;)
1965 if (!n[u](t, i, r)) return !1;
1966 return !0
1967 } : n[0]
1968 }
1969
1970 function pt(n, t, i, r, u) {
1971 for (var e, o = [], f = 0, s = n.length, h = t != null; f < s; f++)(e = n[f]) && (!i || i(e, r, u)) && (o.push(e), h && t.push(f));
1972 return o
1973 }
1974
1975 function fi(n, t, i, r, u, e) {
1976 return r && !r[f] && (r = fi(r)), u && !u[f] && (u = fi(u, e)), h(function(f, e, o, s) {
1977 var l, c, a, p = [],
1978 y = [],
1979 w = e.length,
1980 k = f || ar(t || "*", o.nodeType ? [o] : o, []),
1981 v = n && (f || !t) ? pt(k, p, n, o, s) : k,
1982 h = i ? u || (f ? n : w || r) ? [] : e : v;
1983 if (i && i(v, h, o, s), r)
1984 for (l = pt(h, y), r(l, [], o, s), c = l.length; c--;)(a = l[c]) && (h[y[c]] = !(v[y[c]] = a));
1985 if (f) {
1986 if (u || n) {
1987 if (u) {
1988 for (l = [], c = h.length; c--;)(a = h[c]) && l.push(v[c] = a);
1989 u(null, h = [], l, s)
1990 }
1991 for (c = h.length; c--;)(a = h[c]) && (l = u ? nt.call(f, a) : p[c]) > -1 && (f[l] = !(e[l] = a))
1992 }
1993 } else h = pt(h === e ? h.splice(w, h.length) : h), u ? u(null, e, h, s) : b.apply(e, h)
1994 })
1995 }
1996
1997 function ei(n) {
1998 for (var s, u, r, o = n.length, h = t.relative[n[0].type], c = h || t.relative[" "], i = h ? 1 : 0, l = ri(function(n) {
1999 return n === s
2000 }, c, !0), a = ri(function(n) {
2001 return nt.call(s, n) > -1
2002 }, c, !0), e = [function(n, t, i) {
2003 return !h && (i || t !== ht) || ((s = t).nodeType ? l(n, t, i) : a(n, t, i))
2004 }]; i < o; i++)
2005 if (u = t.relative[n[i].type]) e = [ri(ui(e), u)];
2006 else {
2007 if (u = t.filter[n[i].type].apply(null, n[i].matches), u[f]) {
2008 for (r = ++i; r < o; r++)
2009 if (t.relative[n[r].type]) break;
2010 return fi(i > 1 && ui(e), i > 1 && yt(n.slice(0, i - 1).concat({
2011 value: n[i - 2].type === " " ? "*" : ""
2012 })).replace(lt, "$1"), u, i < r && ei(n.slice(i, r)), r < o && ei(n = n.slice(r)), r < o && yt(n))
2013 }
2014 e.push(u)
2015 }
2016 return ui(e)
2017 }
2018
2019 function lr(n, i) {
2020 var r = i.length > 0,
2021 f = n.length > 0,
2022 o = function(o, s, h, c, l) {
2023 var y, d, w, k = 0,
2024 v = "0",
2025 g = o && [],
2026 p = [],
2027 nt = ht,
2028 tt = o || f && t.find.TAG("*", l),
2029 it = a += nt == null ? 1 : Math.random() || .1,
2030 rt = tt.length;
2031 for (l && (ht = s !== e && s); v !== rt && (y = tt[v]) != null; v++) {
2032 if (f && y) {
2033 for (d = 0; w = n[d++];)
2034 if (w(y, s, h)) {
2035 c.push(y);
2036 break
2037 }
2038 l && (a = it)
2039 }
2040 r && ((y = !w && y) && k--, o && g.push(y))
2041 }
2042 if (k += v, r && v !== k) {
2043 for (d = 0; w = i[d++];) w(g, p, s, h);
2044 if (o) {
2045 if (k > 0)
2046 while (v--) g[v] || p[v] || (p[v] = di.call(c));
2047 p = pt(p)
2048 }
2049 b.apply(c, p);
2050 l && !o && p.length > 0 && k + i.length > 1 && u.uniqueSort(c)
2051 }
2052 return l && (a = it, ht = nt), g
2053 };
2054 return r ? h(o) : o
2055 }
2056
2057 function ar(n, t, i) {
2058 for (var r = 0, f = t.length; r < f; r++) u(n, t[r], i);
2059 return i
2060 }
2061
2062 function vr(n, i, u, f) {
2063 var s, e, o, c, a, h = vt(n);
2064 if (!f && h.length === 1) {
2065 if (e = h[0] = h[0].slice(0), e.length > 2 && (o = e[0]).type === "ID" && r.getById && i.nodeType === 9 && l && t.relative[e[1].type]) {
2066 if (i = (t.find.ID(o.matches[0].replace(k, d), i) || [])[0], !i) return u;
2067 n = n.slice(e.shift().value.length)
2068 }
2069 for (s = at.needsContext.test(n) ? 0 : e.length; s--;) {
2070 if (o = e[s], t.relative[c = o.type]) break;
2071 if ((a = t.find[c]) && (f = a(o.matches[0].replace(k, d), gt.test(e[0].type) && ii(i.parentNode) || i))) {
2072 if (e.splice(s, 1), n = f.length && yt(e), !n) return b.apply(u, f), u;
2073 break
2074 }
2075 }
2076 }
2077 return wt(n, h)(f, i, !l, u, gt.test(n) && ii(i.parentNode) || i), u
2078 }
2079 var it, r, t, st, oi, wt, ht, y, rt, p, e, v, l, o, g, ct, et, f = "sizzle" + -new Date,
2080 s = n.document,
2081 a = 0,
2082 bi = 0,
2083 si = ni(),
2084 hi = ni(),
2085 ci = ni(),
2086 bt = function(n, t) {
2087 return n === t && (rt = !0), 0
2088 },
2089 ut = typeof undefined,
2090 li = -2147483648,
2091 ki = {}.hasOwnProperty,
2092 w = [],
2093 di = w.pop,
2094 gi = w.push,
2095 b = w.push,
2096 ai = w.slice,
2097 nt = w.indexOf || function(n) {
2098 for (var t = 0, i = this.length; t < i; t++)
2099 if (this[t] === n) return t;
2100 return -1
2101 },
2102 kt = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
2103 i = "[\\x20\\t\\r\\n\\f]",
2104 ft = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
2105 vi = ft.replace("w", "w#"),
2106 yi = "\\[" + i + "*(" + ft + ")" + i + "*(?:([*^$|!~]?=)" + i + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + vi + ")|)|)" + i + "*\\]",
2107 dt = ":(" + ft + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + yi.replace(3, 8) + ")*)|.*)\\)|)",
2108 lt = new RegExp("^" + i + "+|((?:^|[^\\\\])(?:\\\\.)*)" + i + "+$", "g"),
2109 nr = new RegExp("^" + i + "*," + i + "*"),
2110 tr = new RegExp("^" + i + "*([>+~]|" + i + ")" + i + "*"),
2111 ir = new RegExp("=" + i + "*([^\\]'\"]*?)" + i + "*\\]", "g"),
2112 rr = new RegExp(dt),
2113 ur = new RegExp("^" + vi + "$"),
2114 at = {
2115 ID: new RegExp("^#(" + ft + ")"),
2116 CLASS: new RegExp("^\\.(" + ft + ")"),
2117 TAG: new RegExp("^(" + ft.replace("w", "w*") + ")"),
2118 ATTR: new RegExp("^" + yi),
2119 PSEUDO: new RegExp("^" + dt),
2120 CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + i + "*(even|odd|(([+-]|)(\\d*)n|)" + i + "*(?:([+-]|)" + i + "*(\\d+)|))" + i + "*\\)|)", "i"),
2121 bool: new RegExp("^(?:" + kt + ")$", "i"),
2122 needsContext: new RegExp("^" + i + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + i + "*((?:-\\d)?\\d*)" + i + "*\\)|)(?=[^-]|$)", "i")
2123 },
2124 fr = /^(?:input|select|textarea|button)$/i,
2125 er = /^h\d$/i,
2126 ot = /^[^{]+\{\s*\[native \w/,
2127 or = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
2128 gt = /[+~]/,
2129 sr = /'|\\/g,
2130 k = new RegExp("\\\\([\\da-f]{1,6}" + i + "?|(" + i + ")|.)", "ig"),
2131 d = function(n, t, i) {
2132 var r = "0x" + t - 65536;
2133 return r !== r || i ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, r & 1023 | 56320)
2134 };
2135 try {
2136 b.apply(w = ai.call(s.childNodes), s.childNodes);
2137 w[s.childNodes.length].nodeType
2138 } catch (yr) {
2139 b = {
2140 apply: w.length ? function(n, t) {
2141 gi.apply(n, ai.call(t))
2142 } : function(n, t) {
2143 for (var i = n.length, r = 0; n[i++] = t[r++];);
2144 n.length = i - 1
2145 }
2146 }
2147 }
2148 r = u.support = {};
2149 oi = u.isXML = function(n) {
2150 var t = n && (n.ownerDocument || n).documentElement;
2151 return t ? t.nodeName !== "HTML" : !1
2152 };
2153 p = u.setDocument = function(n) {
2154 var a, u = n ? n.ownerDocument || n : s,
2155 h = u.defaultView;
2156 return u === e || u.nodeType !== 9 || !u.documentElement ? e : (e = u, v = u.documentElement, l = !oi(u), h && h !== h.top && (h.addEventListener ? h.addEventListener("unload", function() {
2157 p()
2158 }, !1) : h.attachEvent && h.attachEvent("onunload", function() {
2159 p()
2160 })), r.attributes = c(function(n) {
2161 return n.className = "i", !n.getAttribute("className")
2162 }), r.getElementsByTagName = c(function(n) {
2163 return n.appendChild(u.createComment("")), !n.getElementsByTagName("*").length
2164 }), r.getElementsByClassName = ot.test(u.getElementsByClassName) && c(function(n) {
2165 return n.innerHTML = "<div class='a'><\/div><div class='a i'><\/div>", n.firstChild.className = "i", n.getElementsByClassName("i").length === 2
2166 }), r.getById = c(function(n) {
2167 return v.appendChild(n).id = f, !u.getElementsByName || !u.getElementsByName(f).length
2168 }), r.getById ? (t.find.ID = function(n, t) {
2169 if (typeof t.getElementById !== ut && l) {
2170 var i = t.getElementById(n);
2171 return i && i.parentNode ? [i] : []
2172 }
2173 }, t.filter.ID = function(n) {
2174 var t = n.replace(k, d);
2175 return function(n) {
2176 return n.getAttribute("id") === t
2177 }
2178 }) : (delete t.find.ID, t.filter.ID = function(n) {
2179 var t = n.replace(k, d);
2180 return function(n) {
2181 var i = typeof n.getAttributeNode !== ut && n.getAttributeNode("id");
2182 return i && i.value === t
2183 }
2184 }), t.find.TAG = r.getElementsByTagName ? function(n, t) {
2185 if (typeof t.getElementsByTagName !== ut) return t.getElementsByTagName(n)
2186 } : function(n, t) {
2187 var i, r = [],
2188 f = 0,
2189 u = t.getElementsByTagName(n);
2190 if (n === "*") {
2191 while (i = u[f++]) i.nodeType === 1 && r.push(i);
2192 return r
2193 }
2194 return u
2195 }, t.find.CLASS = r.getElementsByClassName && function(n, t) {
2196 if (typeof t.getElementsByClassName !== ut && l) return t.getElementsByClassName(n)
2197 }, g = [], o = [], (r.qsa = ot.test(u.querySelectorAll)) && (c(function(n) {
2198 n.innerHTML = "<select t=''><option selected=''><\/option><\/select>";
2199 n.querySelectorAll("[t^='']").length && o.push("[*^$]=" + i + "*(?:''|\"\")");
2200 n.querySelectorAll("[selected]").length || o.push("\\[" + i + "*(?:value|" + kt + ")");
2201 n.querySelectorAll(":checked").length || o.push(":checked")
2202 }), c(function(n) {
2203 var t = u.createElement("input");
2204 t.setAttribute("type", "hidden");
2205 n.appendChild(t).setAttribute("name", "D");
2206 n.querySelectorAll("[name=d]").length && o.push("name" + i + "*[*^$|!~]?=");
2207 n.querySelectorAll(":enabled").length || o.push(":enabled", ":disabled");
2208 n.querySelectorAll("*,:x");
2209 o.push(",.*:")
2210 })), (r.matchesSelector = ot.test(ct = v.webkitMatchesSelector || v.mozMatchesSelector || v.oMatchesSelector || v.msMatchesSelector)) && c(function(n) {
2211 r.disconnectedMatch = ct.call(n, "div");
2212 ct.call(n, "[s!='']:x");
2213 g.push("!=", dt)
2214 }), o = o.length && new RegExp(o.join("|")), g = g.length && new RegExp(g.join("|")), a = ot.test(v.compareDocumentPosition), et = a || ot.test(v.contains) ? function(n, t) {
2215 var r = n.nodeType === 9 ? n.documentElement : n,
2216 i = t && t.parentNode;
2217 return n === i || !!(i && i.nodeType === 1 && (r.contains ? r.contains(i) : n.compareDocumentPosition && n.compareDocumentPosition(i) & 16))
2218 } : function(n, t) {
2219 if (t)
2220 while (t = t.parentNode)
2221 if (t === n) return !0;
2222 return !1
2223 }, bt = a ? function(n, t) {
2224 if (n === t) return rt = !0, 0;
2225 var i = !n.compareDocumentPosition - !t.compareDocumentPosition;
2226 return i ? i : (i = (n.ownerDocument || n) === (t.ownerDocument || t) ? n.compareDocumentPosition(t) : 1, i & 1 || !r.sortDetached && t.compareDocumentPosition(n) === i) ? n === u || n.ownerDocument === s && et(s, n) ? -1 : t === u || t.ownerDocument === s && et(s, t) ? 1 : y ? nt.call(y, n) - nt.call(y, t) : 0 : i & 4 ? -1 : 1
2227 } : function(n, t) {
2228 if (n === t) return rt = !0, 0;
2229 var i, r = 0,
2230 o = n.parentNode,
2231 h = t.parentNode,
2232 f = [n],
2233 e = [t];
2234 if (o && h) {
2235 if (o === h) return pi(n, t)
2236 } else return n === u ? -1 : t === u ? 1 : o ? -1 : h ? 1 : y ? nt.call(y, n) - nt.call(y, t) : 0;
2237 for (i = n; i = i.parentNode;) f.unshift(i);
2238 for (i = t; i = i.parentNode;) e.unshift(i);
2239 while (f[r] === e[r]) r++;
2240 return r ? pi(f[r], e[r]) : f[r] === s ? -1 : e[r] === s ? 1 : 0
2241 }, u)
2242 };
2243 u.matches = function(n, t) {
2244 return u(n, null, null, t)
2245 };
2246 u.matchesSelector = function(n, t) {
2247 if ((n.ownerDocument || n) !== e && p(n), t = t.replace(ir, "='$1']"), r.matchesSelector && l && (!g || !g.test(t)) && (!o || !o.test(t))) try {
2248 var i = ct.call(n, t);
2249 if (i || r.disconnectedMatch || n.document && n.document.nodeType !== 11) return i
2250 } catch (f) {}
2251 return u(t, e, null, [n]).length > 0
2252 };
2253 u.contains = function(n, t) {
2254 return (n.ownerDocument || n) !== e && p(n), et(n, t)
2255 };
2256 u.attr = function(n, i) {
2257 (n.ownerDocument || n) !== e && p(n);
2258 var f = t.attrHandle[i.toLowerCase()],
2259 u = f && ki.call(t.attrHandle, i.toLowerCase()) ? f(n, i, !l) : undefined;
2260 return u !== undefined ? u : r.attributes || !l ? n.getAttribute(i) : (u = n.getAttributeNode(i)) && u.specified ? u.value : null
2261 };
2262 u.error = function(n) {
2263 throw new Error("Syntax error, unrecognized expression: " + n);
2264 };
2265 u.uniqueSort = function(n) {
2266 var u, f = [],
2267 t = 0,
2268 i = 0;
2269 if (rt = !r.detectDuplicates, y = !r.sortStable && n.slice(0), n.sort(bt), rt) {
2270 while (u = n[i++]) u === n[i] && (t = f.push(i));
2271 while (t--) n.splice(f[t], 1)
2272 }
2273 return y = null, n
2274 };
2275 st = u.getText = function(n) {
2276 var r, i = "",
2277 u = 0,
2278 t = n.nodeType;
2279 if (t) {
2280 if (t === 1 || t === 9 || t === 11) {
2281 if (typeof n.textContent == "string") return n.textContent;
2282 for (n = n.firstChild; n; n = n.nextSibling) i += st(n)
2283 } else if (t === 3 || t === 4) return n.nodeValue
2284 } else
2285 while (r = n[u++]) i += st(r);
2286 return i
2287 };
2288 t = u.selectors = {
2289 cacheLength: 50,
2290 createPseudo: h,
2291 match: at,
2292 attrHandle: {},
2293 find: {},
2294 relative: {
2295 ">": {
2296 dir: "parentNode",
2297 first: !0
2298 },
2299 " ": {
2300 dir: "parentNode"
2301 },
2302 "+": {
2303 dir: "previousSibling",
2304 first: !0
2305 },
2306 "~": {
2307 dir: "previousSibling"
2308 }
2309 },
2310 preFilter: {
2311 ATTR: function(n) {
2312 return n[1] = n[1].replace(k, d), n[3] = (n[4] || n[5] || "").replace(k, d), n[2] === "~=" && (n[3] = " " + n[3] + " "), n.slice(0, 4)
2313 },
2314 CHILD: function(n) {
2315 return n[1] = n[1].toLowerCase(), n[1].slice(0, 3) === "nth" ? (n[3] || u.error(n[0]), n[4] = +(n[4] ? n[5] + (n[6] || 1) : 2 * (n[3] === "even" || n[3] === "odd")), n[5] = +(n[7] + n[8] || n[3] === "odd")) : n[3] && u.error(n[0]), n
2316 },
2317 PSEUDO: function(n) {
2318 var i, t = !n[5] && n[2];
2319 return at.CHILD.test(n[0]) ? null : (n[3] && n[4] !== undefined ? n[2] = n[4] : t && rr.test(t) && (i = vt(t, !0)) && (i = t.indexOf(")", t.length - i) - t.length) && (n[0] = n[0].slice(0, i), n[2] = t.slice(0, i)), n.slice(0, 3))
2320 }
2321 },
2322 filter: {
2323 TAG: function(n) {
2324 var t = n.replace(k, d).toLowerCase();
2325 return n === "*" ? function() {
2326 return !0
2327 } : function(n) {
2328 return n.nodeName && n.nodeName.toLowerCase() === t
2329 }
2330 },
2331 CLASS: function(n) {
2332 var t = si[n + " "];
2333 return t || (t = new RegExp("(^|" + i + ")" + n + "(" + i + "|$)")) && si(n, function(n) {
2334 return t.test(typeof n.className == "string" && n.className || typeof n.getAttribute !== ut && n.getAttribute("class") || "")
2335 })
2336 },
2337 ATTR: function(n, t, i) {
2338 return function(r) {
2339 var f = u.attr(r, n);
2340 return f == null ? t === "!=" : t ? (f += "", t === "=" ? f === i : t === "!=" ? f !== i : t === "^=" ? i && f.indexOf(i) === 0 : t === "*=" ? i && f.indexOf(i) > -1 : t === "$=" ? i && f.slice(-i.length) === i : t === "~=" ? (" " + f + " ").indexOf(i) > -1 : t === "|=" ? f === i || f.slice(0, i.length + 1) === i + "-" : !1) : !0
2341 }
2342 },
2343 CHILD: function(n, t, i, r, u) {
2344 var s = n.slice(0, 3) !== "nth",
2345 o = n.slice(-4) !== "last",
2346 e = t === "of-type";
2347 return r === 1 && u === 0 ? function(n) {
2348 return !!n.parentNode
2349 } : function(t, i, h) {
2350 var v, k, c, l, y, w, b = s !== o ? "nextSibling" : "previousSibling",
2351 p = t.parentNode,
2352 g = e && t.nodeName.toLowerCase(),
2353 d = !h && !e;
2354 if (p) {
2355 if (s) {
2356 while (b) {
2357 for (c = t; c = c[b];)
2358 if (e ? c.nodeName.toLowerCase() === g : c.nodeType === 1) return !1;
2359 w = b = n === "only" && !w && "nextSibling"
2360 }
2361 return !0
2362 }
2363 if (w = [o ? p.firstChild : p.lastChild], o && d) {
2364 for (k = p[f] || (p[f] = {}), v = k[n] || [], y = v[0] === a && v[1], l = v[0] === a && v[2], c = y && p.childNodes[y]; c = ++y && c && c[b] || (l = y = 0) || w.pop();)
2365 if (c.nodeType === 1 && ++l && c === t) {
2366 k[n] = [a, y, l];
2367 break
2368 }
2369 } else if (d && (v = (t[f] || (t[f] = {}))[n]) && v[0] === a) l = v[1];
2370 else
2371 while (c = ++y && c && c[b] || (l = y = 0) || w.pop())
2372 if ((e ? c.nodeName.toLowerCase() === g : c.nodeType === 1) && ++l && (d && ((c[f] || (c[f] = {}))[n] = [a, l]), c === t)) break; return l -= u, l === r || l % r == 0 && l / r >= 0
2373 }
2374 }
2375 },
2376 PSEUDO: function(n, i) {
2377 var e, r = t.pseudos[n] || t.setFilters[n.toLowerCase()] || u.error("unsupported pseudo: " + n);
2378 return r[f] ? r(i) : r.length > 1 ? (e = [n, n, "", i], t.setFilters.hasOwnProperty(n.toLowerCase()) ? h(function(n, t) {
2379 for (var u, f = r(n, i), e = f.length; e--;) u = nt.call(n, f[e]), n[u] = !(t[u] = f[e])
2380 }) : function(n) {
2381 return r(n, 0, e)
2382 }) : r
2383 }
2384 },
2385 pseudos: {
2386 not: h(function(n) {
2387 var i = [],
2388 r = [],
2389 t = wt(n.replace(lt, "$1"));
2390 return t[f] ? h(function(n, i, r, u) {
2391 for (var e, o = t(n, null, u, []), f = n.length; f--;)(e = o[f]) && (n[f] = !(i[f] = e))
2392 }) : function(n, u, f) {
2393 return i[0] = n, t(i, null, f, r), !r.pop()
2394 }
2395 }),
2396 has: h(function(n) {
2397 return function(t) {
2398 return u(n, t).length > 0
2399 }
2400 }),
2401 contains: h(function(n) {
2402 return function(t) {
2403 return (t.textContent || t.innerText || st(t)).indexOf(n) > -1
2404 }
2405 }),
2406 lang: h(function(n) {
2407 return ur.test(n || "") || u.error("unsupported lang: " + n), n = n.replace(k, d).toLowerCase(),
2408 function(t) {
2409 var i;
2410 do
2411 if (i = l ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return i = i.toLowerCase(), i === n || i.indexOf(n + "-") === 0;
2412 while ((t = t.parentNode) && t.nodeType === 1);
2413 return !1
2414 }
2415 }),
2416 target: function(t) {
2417 var i = n.location && n.location.hash;
2418 return i && i.slice(1) === t.id
2419 },
2420 root: function(n) {
2421 return n === v
2422 },
2423 focus: function(n) {
2424 return n === e.activeElement && (!e.hasFocus || e.hasFocus()) && !!(n.type || n.href || ~n.tabIndex)
2425 },
2426 enabled: function(n) {
2427 return n.disabled === !1
2428 },
2429 disabled: function(n) {
2430 return n.disabled === !0
2431 },
2432 checked: function(n) {
2433 var t = n.nodeName.toLowerCase();
2434 return t === "input" && !!n.checked || t === "option" && !!n.selected
2435 },
2436 selected: function(n) {
2437 return n.parentNode && n.parentNode.selectedIndex, n.selected === !0
2438 },
2439 empty: function(n) {
2440 for (n = n.firstChild; n; n = n.nextSibling)
2441 if (n.nodeType < 6) return !1;
2442 return !0
2443 },
2444 parent: function(n) {
2445 return !t.pseudos.empty(n)
2446 },
2447 header: function(n) {
2448 return er.test(n.nodeName)
2449 },
2450 input: function(n) {
2451 return fr.test(n.nodeName)
2452 },
2453 button: function(n) {
2454 var t = n.nodeName.toLowerCase();
2455 return t === "input" && n.type === "button" || t === "button"
2456 },
2457 text: function(n) {
2458 var t;
2459 return n.nodeName.toLowerCase() === "input" && n.type === "text" && ((t = n.getAttribute("type")) == null || t.toLowerCase() === "text")
2460 },
2461 first: tt(function() {
2462 return [0]
2463 }),
2464 last: tt(function(n, t) {
2465 return [t - 1]
2466 }),
2467 eq: tt(function(n, t, i) {
2468 return [i < 0 ? i + t : i]
2469 }),
2470 even: tt(function(n, t) {
2471 for (var i = 0; i < t; i += 2) n.push(i);
2472 return n
2473 }),
2474 odd: tt(function(n, t) {
2475 for (var i = 1; i < t; i += 2) n.push(i);
2476 return n
2477 }),
2478 lt: tt(function(n, t, i) {
2479 for (var r = i < 0 ? i + t : i; --r >= 0;) n.push(r);
2480 return n
2481 }),
2482 gt: tt(function(n, t, i) {
2483 for (var r = i < 0 ? i + t : i; ++r < t;) n.push(r);
2484 return n
2485 })
2486 }
2487 };
2488 t.pseudos.nth = t.pseudos.eq;
2489 for (it in {
2490 radio: !0,
2491 checkbox: !0,
2492 file: !0,
2493 password: !0,
2494 image: !0
2495 }) t.pseudos[it] = hr(it);
2496 for (it in {
2497 submit: !0,
2498 reset: !0
2499 }) t.pseudos[it] = cr(it);
2500 return wi.prototype = t.filters = t.pseudos, t.setFilters = new wi, wt = u.compile = function(n, t) {
2501 var r, u = [],
2502 e = [],
2503 i = ci[n + " "];
2504 if (!i) {
2505 for (t || (t = vt(n)), r = t.length; r--;) i = ei(t[r]), i[f] ? u.push(i) : e.push(i);
2506 i = ci(n, lr(e, u))
2507 }
2508 return i
2509 }, r.sortStable = f.split("").sort(bt).join("") === f, r.detectDuplicates = !!rt, p(), r.sortDetached = c(function(n) {
2510 return n.compareDocumentPosition(e.createElement("div")) & 1
2511 }), c(function(n) {
2512 return n.innerHTML = "<a href='#'><\/a>", n.firstChild.getAttribute("href") === "#"
2513 }) || ti("type|href|height|width", function(n, t, i) {
2514 if (!i) return n.getAttribute(t, t.toLowerCase() === "type" ? 1 : 2)
2515 }), r.attributes && c(function(n) {
2516 return n.innerHTML = "<input/>", n.firstChild.setAttribute("value", ""), n.firstChild.getAttribute("value") === ""
2517 }) || ti("value", function(n, t, i) {
2518 if (!i && n.nodeName.toLowerCase() === "input") return n.defaultValue
2519 }), c(function(n) {
2520 return n.getAttribute("disabled") == null
2521 }) || ti(kt, function(n, t, i) {
2522 var r;
2523 if (!i) return n[t] === !0 ? t.toLowerCase() : (r = n.getAttributeNode(t)) && r.specified ? r.value : null
2524 }), u
2525 }(n);
2526 i.find = p;
2527 i.expr = p.selectors;
2528 i.expr[":"] = i.expr.pseudos;
2529 i.unique = p.uniqueSort;
2530 i.text = p.getText;
2531 i.isXMLDoc = p.isXML;
2532 i.contains = p.contains;
2533 var fr = i.expr.match.needsContext,
2534 er = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
2535 ue = /^.[^:#\[\.,]*$/;
2536 i.filter = function(n, t, r) {
2537 var u = t[0];
2538 return r && (n = ":not(" + n + ")"), t.length === 1 && u.nodeType === 1 ? i.find.matchesSelector(u, n) ? [u] : [] : i.find.matches(n, i.grep(t, function(n) {
2539 return n.nodeType === 1
2540 }))
2541 };
2542 i.fn.extend({
2543 find: function(n) {
2544 var t, r = [],
2545 u = this,
2546 f = u.length;
2547 if (typeof n != "string") return this.pushStack(i(n).filter(function() {
2548 for (t = 0; t < f; t++)
2549 if (i.contains(u[t], this)) return !0
2550 }));
2551 for (t = 0; t < f; t++) i.find(n, u[t], r);
2552 return r = this.pushStack(f > 1 ? i.unique(r) : r), r.selector = this.selector ? this.selector + " " + n : n, r
2553 },
2554 filter: function(n) {
2555 return this.pushStack(ui(this, n || [], !1))
2556 },
2557 not: function(n) {
2558 return this.pushStack(ui(this, n || [], !0))
2559 },
2560 is: function(n) {
2561 return !!ui(this, typeof n == "string" && fr.test(n) ? i(n) : n || [], !1).length
2562 }
2563 });
2564 var ft, u = n.document,
2565 fe = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
2566 ee = i.fn.init = function(n, t) {
2567 var r, f;
2568 if (!n) return this;
2569 if (typeof n == "string") {
2570 if (r = n.charAt(0) === "<" && n.charAt(n.length - 1) === ">" && n.length >= 3 ? [null, n, null] : fe.exec(n), r && (r[1] || !t)) {
2571 if (r[1]) {
2572 if (t = t instanceof i ? t[0] : t, i.merge(this, i.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : u, !0)), er.test(r[1]) && i.isPlainObject(t))
2573 for (r in t) i.isFunction(this[r]) ? this[r](t[r]) : this.attr(r, t[r]);
2574 return this
2575 }
2576 if (f = u.getElementById(r[2]), f && f.parentNode) {
2577 if (f.id !== r[2]) return ft.find(n);
2578 this.length = 1;
2579 this[0] = f
2580 }
2581 return this.context = u, this.selector = n, this
2582 }
2583 return !t || t.jquery ? (t || ft).find(n) : this.constructor(t).find(n)
2584 }
2585 return n.nodeType ? (this.context = this[0] = n, this.length = 1, this) : i.isFunction(n) ? typeof ft.ready != "undefined" ? ft.ready(n) : n(i) : (n.selector !== undefined && (this.selector = n.selector, this.context = n.context), i.makeArray(n, this))
2586 };
2587 ee.prototype = i.fn;
2588 ft = i(u);
2589 or = /^(?:parents|prev(?:Until|All))/;
2590 sr = {
2591 children: !0,
2592 contents: !0,
2593 next: !0,
2594 prev: !0
2595 };
2596 i.extend({
2597 dir: function(n, t, r) {
2598 for (var f = [], u = n[t]; u && u.nodeType !== 9 && (r === undefined || u.nodeType !== 1 || !i(u).is(r));) u.nodeType === 1 && f.push(u), u = u[t];
2599 return f
2600 },
2601 sibling: function(n, t) {
2602 for (var i = []; n; n = n.nextSibling) n.nodeType === 1 && n !== t && i.push(n);
2603 return i
2604 }
2605 });
2606 i.fn.extend({
2607 has: function(n) {
2608 var t, r = i(n, this),
2609 u = r.length;
2610 return this.filter(function() {
2611 for (t = 0; t < u; t++)
2612 if (i.contains(this, r[t])) return !0
2613 })
2614 },
2615 closest: function(n, t) {
2616 for (var r, f = 0, o = this.length, u = [], e = fr.test(n) || typeof n != "string" ? i(n, t || this.context) : 0; f < o; f++)
2617 for (r = this[f]; r && r !== t; r = r.parentNode)
2618 if (r.nodeType < 11 && (e ? e.index(r) > -1 : r.nodeType === 1 && i.find.matchesSelector(r, n))) {
2619 u.push(r);
2620 break
2621 }
2622 return this.pushStack(u.length > 1 ? i.unique(u) : u)
2623 },
2624 index: function(n) {
2625 return n ? typeof n == "string" ? i.inArray(this[0], i(n)) : i.inArray(n.jquery ? n[0] : n, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
2626 },
2627 add: function(n, t) {
2628 return this.pushStack(i.unique(i.merge(this.get(), i(n, t))))
2629 },
2630 addBack: function(n) {
2631 return this.add(n == null ? this.prevObject : this.prevObject.filter(n))
2632 }
2633 });
2634 i.each({
2635 parent: function(n) {
2636 var t = n.parentNode;
2637 return t && t.nodeType !== 11 ? t : null
2638 },
2639 parents: function(n) {
2640 return i.dir(n, "parentNode")
2641 },
2642 parentsUntil: function(n, t, r) {
2643 return i.dir(n, "parentNode", r)
2644 },
2645 next: function(n) {
2646 return hr(n, "nextSibling")
2647 },
2648 prev: function(n) {
2649 return hr(n, "previousSibling")
2650 },
2651 nextAll: function(n) {
2652 return i.dir(n, "nextSibling")
2653 },
2654 prevAll: function(n) {
2655 return i.dir(n, "previousSibling")
2656 },
2657 nextUntil: function(n, t, r) {
2658 return i.dir(n, "nextSibling", r)
2659 },
2660 prevUntil: function(n, t, r) {
2661 return i.dir(n, "previousSibling", r)
2662 },
2663 siblings: function(n) {
2664 return i.sibling((n.parentNode || {}).firstChild, n)
2665 },
2666 children: function(n) {
2667 return i.sibling(n.firstChild)
2668 },
2669 contents: function(n) {
2670 return i.nodeName(n, "iframe") ? n.contentDocument || n.contentWindow.document : i.merge([], n.childNodes)
2671 }
2672 }, function(n, t) {
2673 i.fn[n] = function(r, u) {
2674 var f = i.map(this, t, r);
2675 return n.slice(-5) !== "Until" && (u = r), u && typeof u == "string" && (f = i.filter(u, f)), this.length > 1 && (sr[n] || (f = i.unique(f)), or.test(n) && (f = f.reverse())), this.pushStack(f)
2676 }
2677 });
2678 h = /\S+/g;
2679 fi = {};
2680 i.Callbacks = function(n) {
2681 n = typeof n == "string" ? fi[n] || oe(n) : i.extend({}, n);
2682 var o, u, h, f, e, c, t = [],
2683 r = !n.once && [],
2684 l = function(i) {
2685 for (u = n.memory && i, h = !0, e = c || 0, c = 0, f = t.length, o = !0; t && e < f; e++)
2686 if (t[e].apply(i[0], i[1]) === !1 && n.stopOnFalse) {
2687 u = !1;
2688 break
2689 }
2690 o = !1;
2691 t && (r ? r.length && l(r.shift()) : u ? t = [] : s.disable())
2692 },
2693 s = {
2694 add: function() {
2695 if (t) {
2696 var r = t.length;
2697 (function e(r) {
2698 i.each(r, function(r, u) {
2699 var f = i.type(u);
2700 f === "function" ? n.unique && s.has(u) || t.push(u) : u && u.length && f !== "string" && e(u)
2701 })
2702 })(arguments);
2703 o ? f = t.length : u && (c = r, l(u))
2704 }
2705 return this
2706 },
2707 remove: function() {
2708 return t && i.each(arguments, function(n, r) {
2709 for (var u;
2710 (u = i.inArray(r, t, u)) > -1;) t.splice(u, 1), o && (u <= f && f--, u <= e && e--)
2711 }), this
2712 },
2713 has: function(n) {
2714 return n ? i.inArray(n, t) > -1 : !!(t && t.length)
2715 },
2716 empty: function() {
2717 return t = [], f = 0, this
2718 },
2719 disable: function() {
2720 return t = r = u = undefined, this
2721 },
2722 disabled: function() {
2723 return !t
2724 },
2725 lock: function() {
2726 return r = undefined, u || s.disable(), this
2727 },
2728 locked: function() {
2729 return !r
2730 },
2731 fireWith: function(n, i) {
2732 return t && (!h || r) && (i = i || [], i = [n, i.slice ? i.slice() : i], o ? r.push(i) : l(i)), this
2733 },
2734 fire: function() {
2735 return s.fireWith(this, arguments), this
2736 },
2737 fired: function() {
2738 return !!h
2739 }
2740 };
2741 return s
2742 };
2743 i.extend({
2744 Deferred: function(n) {
2745 var u = [
2746 ["resolve", "done", i.Callbacks("once memory"), "resolved"],
2747 ["reject", "fail", i.Callbacks("once memory"), "rejected"],
2748 ["notify", "progress", i.Callbacks("memory")]
2749 ],
2750 f = "pending",
2751 r = {
2752 state: function() {
2753 return f
2754 },
2755 always: function() {
2756 return t.done(arguments).fail(arguments), this
2757 },
2758 then: function() {
2759 var n = arguments;
2760 return i.Deferred(function(f) {
2761 i.each(u, function(u, e) {
2762 var o = i.isFunction(n[u]) && n[u];
2763 t[e[1]](function() {
2764 var n = o && o.apply(this, arguments);
2765 n && i.isFunction(n.promise) ? n.promise().done(f.resolve).fail(f.reject).progress(f.notify) : f[e[0] + "With"](this === r ? f.promise() : this, o ? [n] : arguments)
2766 })
2767 });
2768 n = null
2769 }).promise()
2770 },
2771 promise: function(n) {
2772 return n != null ? i.extend(n, r) : r
2773 }
2774 },
2775 t = {};
2776 return r.pipe = r.then, i.each(u, function(n, i) {
2777 var e = i[2],
2778 o = i[3];
2779 r[i[1]] = e.add;
2780 o && e.add(function() {
2781 f = o
2782 }, u[n ^ 1][2].disable, u[2][2].lock);
2783 t[i[0]] = function() {
2784 return t[i[0] + "With"](this === t ? r : this, arguments), this
2785 };
2786 t[i[0] + "With"] = e.fireWith
2787 }), r.promise(t), n && n.call(t, t), t
2788 },
2789 when: function(n) {
2790 var t = 0,
2791 u = l.call(arguments),
2792 r = u.length,
2793 e = r !== 1 || n && i.isFunction(n.promise) ? r : 0,
2794 f = e === 1 ? n : i.Deferred(),
2795 h = function(n, t, i) {
2796 return function(r) {
2797 t[n] = this;
2798 i[n] = arguments.length > 1 ? l.call(arguments) : r;
2799 i === o ? f.notifyWith(t, i) : --e || f.resolveWith(t, i)
2800 }
2801 },
2802 o, c, s;
2803 if (r > 1)
2804 for (o = new Array(r), c = new Array(r), s = new Array(r); t < r; t++) u[t] && i.isFunction(u[t].promise) ? u[t].promise().done(h(t, s, u)).fail(f.reject).progress(h(t, c, o)) : --e;
2805 return e || f.resolveWith(s, u), f.promise()
2806 }
2807 });
2808 i.fn.ready = function(n) {
2809 return i.ready.promise().done(n), this
2810 };
2811 i.extend({
2812 isReady: !1,
2813 readyWait: 1,
2814 holdReady: function(n) {
2815 n ? i.readyWait++ : i.ready(!0)
2816 },
2817 ready: function(n) {
2818 if (n === !0 ? !--i.readyWait : !i.isReady) {
2819 if (!u.body) return setTimeout(i.ready);
2820 (i.isReady = !0, n !== !0 && --i.readyWait > 0) || (lt.resolveWith(u, [i]), i.fn.trigger && i(u).trigger("ready").off("ready"))
2821 }
2822 }
2823 });
2824 i.ready.promise = function(t) {
2825 if (!lt)
2826 if (lt = i.Deferred(), u.readyState === "complete") setTimeout(i.ready);
2827 else if (u.addEventListener) u.addEventListener("DOMContentLoaded", a, !1), n.addEventListener("load", a, !1);
2828 else {
2829 u.attachEvent("onreadystatechange", a);
2830 n.attachEvent("onload", a);
2831 var r = !1;
2832 try {
2833 r = n.frameElement == null && u.documentElement
2834 } catch (e) {}
2835 r && r.doScroll && function f() {
2836 if (!i.isReady) {
2837 try {
2838 r.doScroll("left")
2839 } catch (n) {
2840 return setTimeout(f, 50)
2841 }
2842 cr();
2843 i.ready()
2844 }
2845 }()
2846 }
2847 return lt.promise(t)
2848 };
2849 o = typeof undefined;
2850 for (lr in i(r)) break;
2851 r.ownLast = lr !== "0";
2852 r.inlineBlockNeedsLayout = !1;
2853 i(function() {
2854 var t, n, i = u.getElementsByTagName("body")[0];
2855 i && (t = u.createElement("div"), t.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", n = u.createElement("div"), i.appendChild(t).appendChild(n), typeof n.style.zoom !== o && (n.style.cssText = "border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1", (r.inlineBlockNeedsLayout = n.offsetWidth === 3) && (i.style.zoom = 1)), i.removeChild(t), t = n = null)
2856 }),
2857 function() {
2858 var n = u.createElement("div");
2859 if (r.deleteExpando == null) {
2860 r.deleteExpando = !0;
2861 try {
2862 delete n.test
2863 } catch (t) {
2864 r.deleteExpando = !1
2865 }
2866 }
2867 n = null
2868 }();
2869 i.acceptData = function(n) {
2870 var t = i.noData[(n.nodeName + " ").toLowerCase()],
2871 r = +n.nodeType || 1;
2872 return r !== 1 && r !== 9 ? !1 : !t || t !== !0 && n.getAttribute("classid") === t
2873 };
2874 ar = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;
2875 vr = /([A-Z])/g;
2876 i.extend({
2877 cache: {},
2878 noData: {
2879 "applet ": !0,
2880 "embed ": !0,
2881 "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
2882 },
2883 hasData: function(n) {
2884 return n = n.nodeType ? i.cache[n[i.expando]] : n[i.expando], !!n && !ei(n)
2885 },
2886 data: function(n, t, i) {
2887 return pr(n, t, i)
2888 },
2889 removeData: function(n, t) {
2890 return wr(n, t)
2891 },
2892 _data: function(n, t, i) {
2893 return pr(n, t, i, !0)
2894 },
2895 _removeData: function(n, t) {
2896 return wr(n, t, !0)
2897 }
2898 });
2899 i.fn.extend({
2900 data: function(n, t) {
2901 var f, u, e, r = this[0],
2902 o = r && r.attributes;
2903 if (n === undefined) {
2904 if (this.length && (e = i.data(r), r.nodeType === 1 && !i._data(r, "parsedAttrs"))) {
2905 for (f = o.length; f--;) u = o[f].name, u.indexOf("data-") === 0 && (u = i.camelCase(u.slice(5)), yr(r, u, e[u]));
2906 i._data(r, "parsedAttrs", !0)
2907 }
2908 return e
2909 }
2910 return typeof n == "object" ? this.each(function() {
2911 i.data(this, n)
2912 }) : arguments.length > 1 ? this.each(function() {
2913 i.data(this, n, t)
2914 }) : r ? yr(r, n, i.data(r, n)) : undefined
2915 },
2916 removeData: function(n) {
2917 return this.each(function() {
2918 i.removeData(this, n)
2919 })
2920 }
2921 });
2922 i.extend({
2923 queue: function(n, t, r) {
2924 var u;
2925 if (n) return t = (t || "fx") + "queue", u = i._data(n, t), r && (!u || i.isArray(r) ? u = i._data(n, t, i.makeArray(r)) : u.push(r)), u || []
2926 },
2927 dequeue: function(n, t) {
2928 t = t || "fx";
2929 var r = i.queue(n, t),
2930 e = r.length,
2931 u = r.shift(),
2932 f = i._queueHooks(n, t),
2933 o = function() {
2934 i.dequeue(n, t)
2935 };
2936 u === "inprogress" && (u = r.shift(), e--);
2937 u && (t === "fx" && r.unshift("inprogress"), delete f.stop, u.call(n, o, f));
2938 !e && f && f.empty.fire()
2939 },
2940 _queueHooks: function(n, t) {
2941 var r = t + "queueHooks";
2942 return i._data(n, r) || i._data(n, r, {
2943 empty: i.Callbacks("once memory").add(function() {
2944 i._removeData(n, t + "queue");
2945 i._removeData(n, r)
2946 })
2947 })
2948 }
2949 });
2950 i.fn.extend({
2951 queue: function(n, t) {
2952 var r = 2;
2953 return (typeof n != "string" && (t = n, n = "fx", r--), arguments.length < r) ? i.queue(this[0], n) : t === undefined ? this : this.each(function() {
2954 var r = i.queue(this, n, t);
2955 i._queueHooks(this, n);
2956 n === "fx" && r[0] !== "inprogress" && i.dequeue(this, n)
2957 })
2958 },
2959 dequeue: function(n) {
2960 return this.each(function() {
2961 i.dequeue(this, n)
2962 })
2963 },
2964 clearQueue: function(n) {
2965 return this.queue(n || "fx", [])
2966 },
2967 promise: function(n, t) {
2968 var r, f = 1,
2969 e = i.Deferred(),
2970 u = this,
2971 o = this.length,
2972 s = function() {
2973 --f || e.resolveWith(u, [u])
2974 };
2975 for (typeof n != "string" && (t = n, n = undefined), n = n || "fx"; o--;) r = i._data(u[o], n + "queueHooks"), r && r.empty && (f++, r.empty.add(s));
2976 return s(), e.promise(t)
2977 }
2978 });
2979 var at = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
2980 w = ["Top", "Right", "Bottom", "Left"],
2981 et = function(n, t) {
2982 return n = t || n, i.css(n, "display") === "none" || !i.contains(n.ownerDocument, n)
2983 },
2984 b = i.access = function(n, t, r, u, f, e, o) {
2985 var s = 0,
2986 c = n.length,
2987 h = r == null;
2988 if (i.type(r) === "object") {
2989 f = !0;
2990 for (s in r) i.access(n, t, s, r[s], !0, e, o)
2991 } else if (u !== undefined && (f = !0, i.isFunction(u) || (o = !0), h && (o ? (t.call(n, u), t = null) : (h = t, t = function(n, t, r) {
2992 return h.call(i(n), r)
2993 })), t))
2994 for (; s < c; s++) t(n[s], r, o ? u : u.call(n[s], s, t(n[s], r)));
2995 return f ? n : h ? t.call(n) : c ? t(n[0], r) : e
2996 },
2997 oi = /^(?:checkbox|radio)$/i;
2998 (function() {
2999 var i = u.createDocumentFragment(),
3000 n = u.createElement("div"),
3001 t = u.createElement("input");
3002 if (n.setAttribute("className", "t"), n.innerHTML = " <link/><table><\/table><a href='/a'>a<\/a>", r.leadingWhitespace = n.firstChild.nodeType === 3, r.tbody = !n.getElementsByTagName("tbody").length, r.htmlSerialize = !!n.getElementsByTagName("link").length, r.html5Clone = u.createElement("nav").cloneNode(!0).outerHTML !== "<:nav><\/:nav>", t.type = "checkbox", t.checked = !0, i.appendChild(t), r.appendChecked = t.checked, n.innerHTML = "<textarea>x<\/textarea>", r.noCloneChecked = !!n.cloneNode(!0).lastChild.defaultValue, i.appendChild(n), n.innerHTML = "<input type='radio' checked='checked' name='t'/>", r.checkClone = n.cloneNode(!0).cloneNode(!0).lastChild.checked, r.noCloneEvent = !0, n.attachEvent && (n.attachEvent("onclick", function() {
3003 r.noCloneEvent = !1
3004 }), n.cloneNode(!0).click()), r.deleteExpando == null) {
3005 r.deleteExpando = !0;
3006 try {
3007 delete n.test
3008 } catch (f) {
3009 r.deleteExpando = !1
3010 }
3011 }
3012 i = n = t = null
3013 })(),
3014 function() {
3015 var t, i, f = u.createElement("div");
3016 for (t in {
3017 submit: !0,
3018 change: !0,
3019 focusin: !0
3020 }) i = "on" + t, (r[t + "Bubbles"] = i in n) || (f.setAttribute(i, "t"), r[t + "Bubbles"] = f.attributes[i].expando === !1);
3021 f = null
3022 }();
3023 var si = /^(?:input|select|textarea)$/i,
3024 se = /^key/,
3025 he = /^(?:mouse|contextmenu)|click/,
3026 br = /^(?:focusinfocus|focusoutblur)$/,
3027 kr = /^([^.]*)(?:\.(.+)|)$/;
3028 i.event = {
3029 global: {},
3030 add: function(n, t, r, u, f) {
3031 var w, y, b, p, s, c, l, a, e, k, d, v = i._data(n);
3032 if (v) {
3033 for (r.handler && (p = r, r = p.handler, f = p.selector), r.guid || (r.guid = i.guid++), (y = v.events) || (y = v.events = {}), (c = v.handle) || (c = v.handle = function(n) {
3034 return typeof i !== o && (!n || i.event.triggered !== n.type) ? i.event.dispatch.apply(c.elem, arguments) : undefined
3035 }, c.elem = n), t = (t || "").match(h) || [""], b = t.length; b--;)(w = kr.exec(t[b]) || [], e = d = w[1], k = (w[2] || "").split(".").sort(), e) && (s = i.event.special[e] || {}, e = (f ? s.delegateType : s.bindType) || e, s = i.event.special[e] || {}, l = i.extend({
3036 type: e,
3037 origType: d,
3038 data: u,
3039 handler: r,
3040 guid: r.guid,
3041 selector: f,
3042 needsContext: f && i.expr.match.needsContext.test(f),
3043 namespace: k.join(".")
3044 }, p), (a = y[e]) || (a = y[e] = [], a.delegateCount = 0, s.setup && s.setup.call(n, u, k, c) !== !1 || (n.addEventListener ? n.addEventListener(e, c, !1) : n.attachEvent && n.attachEvent("on" + e, c))), s.add && (s.add.call(n, l), l.handler.guid || (l.handler.guid = r.guid)), f ? a.splice(a.delegateCount++, 0, l) : a.push(l), i.event.global[e] = !0);
3045 n = null
3046 }
3047 },
3048 remove: function(n, t, r, u, f) {
3049 var y, o, s, b, p, a, c, l, e, w, k, v = i.hasData(n) && i._data(n);
3050 if (v && (a = v.events)) {
3051 for (t = (t || "").match(h) || [""], p = t.length; p--;) {
3052 if (s = kr.exec(t[p]) || [], e = k = s[1], w = (s[2] || "").split(".").sort(), !e) {
3053 for (e in a) i.event.remove(n, e + t[p], r, u, !0);
3054 continue
3055 }
3056 for (c = i.event.special[e] || {}, e = (u ? c.delegateType : c.bindType) || e, l = a[e] || [], s = s[2] && new RegExp("(^|\\.)" + w.join("\\.(?:.*\\.|)") + "(\\.|$)"), b = y = l.length; y--;) o = l[y], (f || k === o.origType) && (!r || r.guid === o.guid) && (!s || s.test(o.namespace)) && (!u || u === o.selector || u === "**" && o.selector) && (l.splice(y, 1), o.selector && l.delegateCount--, c.remove && c.remove.call(n, o));
3057 b && !l.length && (c.teardown && c.teardown.call(n, w, v.handle) !== !1 || i.removeEvent(n, e, v.handle), delete a[e])
3058 }
3059 i.isEmptyObject(a) && (delete v.handle, i._removeData(n, "events"))
3060 }
3061 },
3062 trigger: function(t, r, f, e) {
3063 var l, a, o, p, c, h, w, y = [f || u],
3064 s = tt.call(t, "type") ? t.type : t,
3065 v = tt.call(t, "namespace") ? t.namespace.split(".") : [];
3066 if ((o = h = f = f || u, f.nodeType !== 3 && f.nodeType !== 8) && !br.test(s + i.event.triggered) && (s.indexOf(".") >= 0 && (v = s.split("."), s = v.shift(), v.sort()), a = s.indexOf(":") < 0 && "on" + s, t = t[i.expando] ? t : new i.Event(s, typeof t == "object" && t), t.isTrigger = e ? 2 : 3, t.namespace = v.join("."), t.namespace_re = t.namespace ? new RegExp("(^|\\.)" + v.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = undefined, t.target || (t.target = f), r = r == null ? [t] : i.makeArray(r, [t]), c = i.event.special[s] || {}, e || !c.trigger || c.trigger.apply(f, r) !== !1)) {
3067 if (!e && !c.noBubble && !i.isWindow(f)) {
3068 for (p = c.delegateType || s, br.test(p + s) || (o = o.parentNode); o; o = o.parentNode) y.push(o), h = o;
3069 h === (f.ownerDocument || u) && y.push(h.defaultView || h.parentWindow || n)
3070 }
3071 for (w = 0;
3072 (o = y[w++]) && !t.isPropagationStopped();) t.type = w > 1 ? p : c.bindType || s, l = (i._data(o, "events") || {})[t.type] && i._data(o, "handle"), l && l.apply(o, r), l = a && o[a], l && l.apply && i.acceptData(o) && (t.result = l.apply(o, r), t.result === !1 && t.preventDefault());
3073 if (t.type = s, !e && !t.isDefaultPrevented() && (!c._default || c._default.apply(y.pop(), r) === !1) && i.acceptData(f) && a && f[s] && !i.isWindow(f)) {
3074 h = f[a];
3075 h && (f[a] = null);
3076 i.event.triggered = s;
3077 try {
3078 f[s]()
3079 } catch (b) {}
3080 i.event.triggered = undefined;
3081 h && (f[a] = h)
3082 }
3083 return t.result
3084 }
3085 },
3086 dispatch: function(n) {
3087 n = i.event.fix(n);
3088 var e, f, t, r, o, s = [],
3089 h = l.call(arguments),
3090 c = (i._data(this, "events") || {})[n.type] || [],
3091 u = i.event.special[n.type] || {};
3092 if (h[0] = n, n.delegateTarget = this, !u.preDispatch || u.preDispatch.call(this, n) !== !1) {
3093 for (s = i.event.handlers.call(this, n, c), e = 0;
3094 (r = s[e++]) && !n.isPropagationStopped();)
3095 for (n.currentTarget = r.elem, o = 0;
3096 (t = r.handlers[o++]) && !n.isImmediatePropagationStopped();)(!n.namespace_re || n.namespace_re.test(t.namespace)) && (n.handleObj = t, n.data = t.data, f = ((i.event.special[t.origType] || {}).handle || t.handler).apply(r.elem, h), f !== undefined && (n.result = f) === !1 && (n.preventDefault(), n.stopPropagation()));
3097 return u.postDispatch && u.postDispatch.call(this, n), n.result
3098 }
3099 },
3100 handlers: function(n, t) {
3101 var f, e, u, o, h = [],
3102 s = t.delegateCount,
3103 r = n.target;
3104 if (s && r.nodeType && (!n.button || n.type !== "click"))
3105 for (; r != this; r = r.parentNode || this)
3106 if (r.nodeType === 1 && (r.disabled !== !0 || n.type !== "click")) {
3107 for (u = [], o = 0; o < s; o++) e = t[o], f = e.selector + " ", u[f] === undefined && (u[f] = e.needsContext ? i(f, this).index(r) >= 0 : i.find(f, this, null, [r]).length), u[f] && u.push(e);
3108 u.length && h.push({
3109 elem: r,
3110 handlers: u
3111 })
3112 }
3113 return s < t.length && h.push({
3114 elem: this,
3115 handlers: t.slice(s)
3116 }), h
3117 },
3118 fix: function(n) {
3119 if (n[i.expando]) return n;
3120 var e, o, s, r = n.type,
3121 f = n,
3122 t = this.fixHooks[r];
3123 for (t || (this.fixHooks[r] = t = he.test(r) ? this.mouseHooks : se.test(r) ? this.keyHooks : {}), s = t.props ? this.props.concat(t.props) : this.props, n = new i.Event(f), e = s.length; e--;) o = s[e], n[o] = f[o];
3124 return n.target || (n.target = f.srcElement || u), n.target.nodeType === 3 && (n.target = n.target.parentNode), n.metaKey = !!n.metaKey, t.filter ? t.filter(n, f) : n
3125 },
3126 props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
3127 fixHooks: {},
3128 keyHooks: {
3129 props: "char charCode key keyCode".split(" "),
3130 filter: function(n, t) {
3131 return n.which == null && (n.which = t.charCode != null ? t.charCode : t.keyCode), n
3132 }
3133 },
3134 mouseHooks: {
3135 props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
3136 filter: function(n, t) {
3137 var i, e, r, f = t.button,
3138 o = t.fromElement;
3139 return n.pageX == null && t.clientX != null && (e = n.target.ownerDocument || u, r = e.documentElement, i = e.body, n.pageX = t.clientX + (r && r.scrollLeft || i && i.scrollLeft || 0) - (r && r.clientLeft || i && i.clientLeft || 0), n.pageY = t.clientY + (r && r.scrollTop || i && i.scrollTop || 0) - (r && r.clientTop || i && i.clientTop || 0)), !n.relatedTarget && o && (n.relatedTarget = o === n.target ? t.toElement : o), n.which || f === undefined || (n.which = f & 1 ? 1 : f & 2 ? 3 : f & 4 ? 2 : 0), n
3140 }
3141 },
3142 special: {
3143 load: {
3144 noBubble: !0
3145 },
3146 focus: {
3147 trigger: function() {
3148 if (this !== dr() && this.focus) try {
3149 return this.focus(), !1
3150 } catch (n) {}
3151 },
3152 delegateType: "focusin"
3153 },
3154 blur: {
3155 trigger: function() {
3156 if (this === dr() && this.blur) return this.blur(), !1
3157 },
3158 delegateType: "focusout"
3159 },
3160 click: {
3161 trigger: function() {
3162 if (i.nodeName(this, "input") && this.type === "checkbox" && this.click) return this.click(), !1
3163 },
3164 _default: function(n) {
3165 return i.nodeName(n.target, "a")
3166 }
3167 },
3168 beforeunload: {
3169 postDispatch: function(n) {
3170 n.result !== undefined && (n.originalEvent.returnValue = n.result)
3171 }
3172 }
3173 },
3174 simulate: function(n, t, r, u) {
3175 var f = i.extend(new i.Event, r, {
3176 type: n,
3177 isSimulated: !0,
3178 originalEvent: {}
3179 });
3180 u ? i.event.trigger(f, null, t) : i.event.dispatch.call(t, f);
3181 f.isDefaultPrevented() && r.preventDefault()
3182 }
3183 };
3184 i.removeEvent = u.removeEventListener ? function(n, t, i) {
3185 n.removeEventListener && n.removeEventListener(t, i, !1)
3186 } : function(n, t, i) {
3187 var r = "on" + t;
3188 n.detachEvent && (typeof n[r] === o && (n[r] = null), n.detachEvent(r, i))
3189 };
3190 i.Event = function(n, t) {
3191 if (!(this instanceof i.Event)) return new i.Event(n, t);
3192 n && n.type ? (this.originalEvent = n, this.type = n.type, this.isDefaultPrevented = n.defaultPrevented || n.defaultPrevented === undefined && (n.returnValue === !1 || n.getPreventDefault && n.getPreventDefault()) ? vt : it) : this.type = n;
3193 t && i.extend(this, t);
3194 this.timeStamp = n && n.timeStamp || i.now();
3195 this[i.expando] = !0
3196 };
3197 i.Event.prototype = {
3198 isDefaultPrevented: it,
3199 isPropagationStopped: it,
3200 isImmediatePropagationStopped: it,
3201 preventDefault: function() {
3202 var n = this.originalEvent;
3203 (this.isDefaultPrevented = vt, n) && (n.preventDefault ? n.preventDefault() : n.returnValue = !1)
3204 },
3205 stopPropagation: function() {
3206 var n = this.originalEvent;
3207 (this.isPropagationStopped = vt, n) && (n.stopPropagation && n.stopPropagation(), n.cancelBubble = !0)
3208 },
3209 stopImmediatePropagation: function() {
3210 this.isImmediatePropagationStopped = vt;
3211 this.stopPropagation()
3212 }
3213 };
3214 i.each({
3215 mouseenter: "mouseover",
3216 mouseleave: "mouseout"
3217 }, function(n, t) {
3218 i.event.special[n] = {
3219 delegateType: t,
3220 bindType: t,
3221 handle: function(n) {
3222 var u, f = this,
3223 r = n.relatedTarget,
3224 e = n.handleObj;
3225 return r && (r === f || i.contains(f, r)) || (n.type = e.origType, u = e.handler.apply(this, arguments), n.type = t), u
3226 }
3227 }
3228 });
3229 r.submitBubbles || (i.event.special.submit = {
3230 setup: function() {
3231 if (i.nodeName(this, "form")) return !1;
3232 i.event.add(this, "click._submit keypress._submit", function(n) {
3233 var r = n.target,
3234 t = i.nodeName(r, "input") || i.nodeName(r, "button") ? r.form : undefined;
3235 t && !i._data(t, "submitBubbles") && (i.event.add(t, "submit._submit", function(n) {
3236 n._submit_bubble = !0
3237 }), i._data(t, "submitBubbles", !0))
3238 })
3239 },
3240 postDispatch: function(n) {
3241 n._submit_bubble && (delete n._submit_bubble, this.parentNode && !n.isTrigger && i.event.simulate("submit", this.parentNode, n, !0))
3242 },
3243 teardown: function() {
3244 if (i.nodeName(this, "form")) return !1;
3245 i.event.remove(this, "._submit")
3246 }
3247 });
3248 r.changeBubbles || (i.event.special.change = {
3249 setup: function() {
3250 if (si.test(this.nodeName)) return (this.type === "checkbox" || this.type === "radio") && (i.event.add(this, "propertychange._change", function(n) {
3251 n.originalEvent.propertyName === "checked" && (this._just_changed = !0)
3252 }), i.event.add(this, "click._change", function(n) {
3253 this._just_changed && !n.isTrigger && (this._just_changed = !1);
3254 i.event.simulate("change", this, n, !0)
3255 })), !1;
3256 i.event.add(this, "beforeactivate._change", function(n) {
3257 var t = n.target;
3258 si.test(t.nodeName) && !i._data(t, "changeBubbles") && (i.event.add(t, "change._change", function(n) {
3259 !this.parentNode || n.isSimulated || n.isTrigger || i.event.simulate("change", this.parentNode, n, !0)
3260 }), i._data(t, "changeBubbles", !0))
3261 })
3262 },
3263 handle: function(n) {
3264 var t = n.target;
3265 if (this !== t || n.isSimulated || n.isTrigger || t.type !== "radio" && t.type !== "checkbox") return n.handleObj.handler.apply(this, arguments)
3266 },
3267 teardown: function() {
3268 return i.event.remove(this, "._change"), !si.test(this.nodeName)
3269 }
3270 });
3271 r.focusinBubbles || i.each({
3272 focus: "focusin",
3273 blur: "focusout"
3274 }, function(n, t) {
3275 var r = function(n) {
3276 i.event.simulate(t, n.target, i.event.fix(n), !0)
3277 };
3278 i.event.special[t] = {
3279 setup: function() {
3280 var u = this.ownerDocument || this,
3281 f = i._data(u, t);
3282 f || u.addEventListener(n, r, !0);
3283 i._data(u, t, (f || 0) + 1)
3284 },
3285 teardown: function() {
3286 var u = this.ownerDocument || this,
3287 f = i._data(u, t) - 1;
3288 f ? i._data(u, t, f) : (u.removeEventListener(n, r, !0), i._removeData(u, t))
3289 }
3290 }
3291 });
3292 i.fn.extend({
3293 on: function(n, t, r, u, f) {
3294 var o, e;
3295 if (typeof n == "object") {
3296 typeof t != "string" && (r = r || t, t = undefined);
3297 for (o in n) this.on(o, t, r, n[o], f);
3298 return this
3299 }
3300 if (r == null && u == null ? (u = t, r = t = undefined) : u == null && (typeof t == "string" ? (u = r, r = undefined) : (u = r, r = t, t = undefined)), u === !1) u = it;
3301 else if (!u) return this;
3302 return f === 1 && (e = u, u = function(n) {
3303 return i().off(n), e.apply(this, arguments)
3304 }, u.guid = e.guid || (e.guid = i.guid++)), this.each(function() {
3305 i.event.add(this, n, u, r, t)
3306 })
3307 },
3308 one: function(n, t, i, r) {
3309 return this.on(n, t, i, r, 1)
3310 },
3311 off: function(n, t, r) {
3312 var u, f;
3313 if (n && n.preventDefault && n.handleObj) return u = n.handleObj, i(n.delegateTarget).off(u.namespace ? u.origType + "." + u.namespace : u.origType, u.selector, u.handler), this;
3314 if (typeof n == "object") {
3315 for (f in n) this.off(f, t, n[f]);
3316 return this
3317 }
3318 return (t === !1 || typeof t == "function") && (r = t, t = undefined), r === !1 && (r = it), this.each(function() {
3319 i.event.remove(this, n, r, t)
3320 })
3321 },
3322 trigger: function(n, t) {
3323 return this.each(function() {
3324 i.event.trigger(n, t, this)
3325 })
3326 },
3327 triggerHandler: function(n, t) {
3328 var r = this[0];
3329 if (r) return i.event.trigger(n, t, r, !0)
3330 }
3331 });
3332 var nu = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
3333 ce = / jQuery\d+="(?:null|\d+)"/g,
3334 tu = new RegExp("<(?:" + nu + ")[\\s/>]", "i"),
3335 hi = /^\s+/,
3336 iu = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
3337 ru = /<([\w:]+)/,
3338 uu = /<tbody/i,
3339 le = /<|&#?\w+;/,
3340 ae = /<(?:script|style|link)/i,
3341 ve = /checked\s*(?:[^=]|=\s*.checked.)/i,
3342 fu = /^$|\/(?:java|ecma)script/i,
3343 ye = /^true\/(.*)/,
3344 pe = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
3345 s = {
3346 option: [1, "<select multiple='multiple'>", "<\/select>"],
3347 legend: [1, "<fieldset>", "<\/fieldset>"],
3348 area: [1, "<map>", "<\/map>"],
3349 param: [1, "<object>", "<\/object>"],
3350 thead: [1, "<table>", "<\/table>"],
3351 tr: [2, "<table><tbody>", "<\/tbody><\/table>"],
3352 col: [2, "<table><tbody><\/tbody><colgroup>", "<\/colgroup><\/table>"],
3353 td: [3, "<table><tbody><tr>", "<\/tr><\/tbody><\/table>"],
3354 _default: r.htmlSerialize ? [0, "", ""] : [1, "X<div>", "<\/div>"]
3355 },
3356 we = gr(u),
3357 ci = we.appendChild(u.createElement("div"));
3358 s.optgroup = s.option;
3359 s.tbody = s.tfoot = s.colgroup = s.caption = s.thead;
3360 s.th = s.td;
3361 i.extend({
3362 clone: function(n, t, u) {
3363 var e, c, s, o, h, l = i.contains(n.ownerDocument, n);
3364 if (r.html5Clone || i.isXMLDoc(n) || !tu.test("<" + n.nodeName + ">") ? s = n.cloneNode(!0) : (ci.innerHTML = n.outerHTML, ci.removeChild(s = ci.firstChild)), (!r.noCloneEvent || !r.noCloneChecked) && (n.nodeType === 1 || n.nodeType === 11) && !i.isXMLDoc(n))
3365 for (e = f(s), h = f(n), o = 0;
3366 (c = h[o]) != null; ++o) e[o] && ke(c, e[o]);
3367 if (t)
3368 if (u)
3369 for (h = h || f(n), e = e || f(s), o = 0;
3370 (c = h[o]) != null; o++) hu(c, e[o]);
3371 else hu(n, s);
3372 return e = f(s, "script"), e.length > 0 && li(e, !l && f(n, "script")), e = h = c = null, s
3373 },
3374 buildFragment: function(n, t, u, e) {
3375 for (var c, o, b, h, p, w, a, k = n.length, v = gr(t), l = [], y = 0; y < k; y++)
3376 if (o = n[y], o || o === 0)
3377 if (i.type(o) === "object") i.merge(l, o.nodeType ? [o] : o);
3378 else if (le.test(o)) {
3379 for (h = h || v.appendChild(t.createElement("div")), p = (ru.exec(o) || ["", ""])[1].toLowerCase(), a = s[p] || s._default, h.innerHTML = a[1] + o.replace(iu, "<$1><\/$2>") + a[2], c = a[0]; c--;) h = h.lastChild;
3380 if (!r.leadingWhitespace && hi.test(o) && l.push(t.createTextNode(hi.exec(o)[0])), !r.tbody)
3381 for (o = p === "table" && !uu.test(o) ? h.firstChild : a[1] === "<table>" && !uu.test(o) ? h : 0, c = o && o.childNodes.length; c--;) i.nodeName(w = o.childNodes[c], "tbody") && !w.childNodes.length && o.removeChild(w);
3382 for (i.merge(l, h.childNodes), h.textContent = ""; h.firstChild;) h.removeChild(h.firstChild);
3383 h = v.lastChild
3384 } else l.push(t.createTextNode(o));
3385 for (h && v.removeChild(h), r.appendChecked || i.grep(f(l, "input"), be), y = 0; o = l[y++];)
3386 if ((!e || i.inArray(o, e) === -1) && (b = i.contains(o.ownerDocument, o), h = f(v.appendChild(o), "script"), b && li(h), u))
3387 for (c = 0; o = h[c++];) fu.test(o.type || "") && u.push(o);
3388 return h = null, v
3389 },
3390 cleanData: function(n, t) {
3391 for (var u, s, f, e, a = 0, h = i.expando, l = i.cache, v = r.deleteExpando, y = i.event.special;
3392 (u = n[a]) != null; a++)
3393 if ((t || i.acceptData(u)) && (f = u[h], e = f && l[f], e)) {
3394 if (e.events)
3395 for (s in e.events) y[s] ? i.event.remove(u, s) : i.removeEvent(u, s, e.handle);
3396 l[f] && (delete l[f], v ? delete u[h] : typeof u.removeAttribute !== o ? u.removeAttribute(h) : u[h] = null, c.push(f))
3397 }
3398 }
3399 });
3400 i.fn.extend({
3401 text: function(n) {
3402 return b(this, function(n) {
3403 return n === undefined ? i.text(this) : this.empty().append((this[0] && this[0].ownerDocument || u).createTextNode(n))
3404 }, null, n, arguments.length)
3405 },
3406 append: function() {
3407 return this.domManip(arguments, function(n) {
3408 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
3409 var t = eu(this, n);
3410 t.appendChild(n)
3411 }
3412 })
3413 },
3414 prepend: function() {
3415 return this.domManip(arguments, function(n) {
3416 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
3417 var t = eu(this, n);
3418 t.insertBefore(n, t.firstChild)
3419 }
3420 })
3421 },
3422 before: function() {
3423 return this.domManip(arguments, function(n) {
3424 this.parentNode && this.parentNode.insertBefore(n, this)
3425 })
3426 },
3427 after: function() {
3428 return this.domManip(arguments, function(n) {
3429 this.parentNode && this.parentNode.insertBefore(n, this.nextSibling)
3430 })
3431 },
3432 remove: function(n, t) {
3433 for (var r, e = n ? i.filter(n, this) : this, u = 0;
3434 (r = e[u]) != null; u++) t || r.nodeType !== 1 || i.cleanData(f(r)), r.parentNode && (t && i.contains(r.ownerDocument, r) && li(f(r, "script")), r.parentNode.removeChild(r));
3435 return this
3436 },
3437 empty: function() {
3438 for (var n, t = 0;
3439 (n = this[t]) != null; t++) {
3440 for (n.nodeType === 1 && i.cleanData(f(n, !1)); n.firstChild;) n.removeChild(n.firstChild);
3441 n.options && i.nodeName(n, "select") && (n.options.length = 0)
3442 }
3443 return this
3444 },
3445 clone: function(n, t) {
3446 return n = n == null ? !1 : n, t = t == null ? n : t, this.map(function() {
3447 return i.clone(this, n, t)
3448 })
3449 },
3450 html: function(n) {
3451 return b(this, function(n) {
3452 var t = this[0] || {},
3453 u = 0,
3454 e = this.length;
3455 if (n === undefined) return t.nodeType === 1 ? t.innerHTML.replace(ce, "") : undefined;
3456 if (typeof n == "string" && !ae.test(n) && (r.htmlSerialize || !tu.test(n)) && (r.leadingWhitespace || !hi.test(n)) && !s[(ru.exec(n) || ["", ""])[1].toLowerCase()]) {
3457 n = n.replace(iu, "<$1><\/$2>");
3458 try {
3459 for (; u < e; u++) t = this[u] || {}, t.nodeType === 1 && (i.cleanData(f(t, !1)), t.innerHTML = n);
3460 t = 0
3461 } catch (o) {}
3462 }
3463 t && this.empty().append(n)
3464 }, null, n, arguments.length)
3465 },
3466 replaceWith: function() {
3467 var n = arguments[0];
3468 return this.domManip(arguments, function(t) {
3469 n = this.parentNode;
3470 i.cleanData(f(this));
3471 n && n.replaceChild(t, this)
3472 }), n && (n.length || n.nodeType) ? this : this.remove()
3473 },
3474 detach: function(n) {
3475 return this.remove(n, !0)
3476 },
3477 domManip: function(n, t) {
3478 n = ir.apply([], n);
3479 var h, u, c, o, v, s, e = 0,
3480 l = this.length,
3481 p = this,
3482 w = l - 1,
3483 a = n[0],
3484 y = i.isFunction(a);
3485 if (y || l > 1 && typeof a == "string" && !r.checkClone && ve.test(a)) return this.each(function(i) {
3486 var r = p.eq(i);
3487 y && (n[0] = a.call(this, i, r.html()));
3488 r.domManip(n, t)
3489 });
3490 if (l && (s = i.buildFragment(n, this[0].ownerDocument, !1, this), h = s.firstChild, s.childNodes.length === 1 && (s = h), h)) {
3491 for (o = i.map(f(s, "script"), ou), c = o.length; e < l; e++) u = s, e !== w && (u = i.clone(u, !0, !0), c && i.merge(o, f(u, "script"))), t.call(this[e], u, e);
3492 if (c)
3493 for (v = o[o.length - 1].ownerDocument, i.map(o, su), e = 0; e < c; e++) u = o[e], fu.test(u.type || "") && !i._data(u, "globalEval") && i.contains(v, u) && (u.src ? i._evalUrl && i._evalUrl(u.src) : i.globalEval((u.text || u.textContent || u.innerHTML || "").replace(pe, "")));
3494 s = h = null
3495 }
3496 return this
3497 }
3498 });
3499 i.each({
3500 appendTo: "append",
3501 prependTo: "prepend",
3502 insertBefore: "before",
3503 insertAfter: "after",
3504 replaceAll: "replaceWith"
3505 }, function(n, t) {
3506 i.fn[n] = function(n) {
3507 for (var u, r = 0, f = [], e = i(n), o = e.length - 1; r <= o; r++) u = r === o ? this : this.clone(!0), i(e[r])[t](u), ti.apply(f, u.get());
3508 return this.pushStack(f)
3509 }
3510 });
3511 ai = {},
3512 function() {
3513 var t, i, n = u.createElement("div"),
3514 f = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";
3515 n.innerHTML = " <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";
3516 t = n.getElementsByTagName("a")[0];
3517 t.style.cssText = "float:left;opacity:.5";
3518 r.opacity = /^0.5/.test(t.style.opacity);
3519 r.cssFloat = !!t.style.cssFloat;
3520 n.style.backgroundClip = "content-box";
3521 n.cloneNode(!0).style.backgroundClip = "";
3522 r.clearCloneStyle = n.style.backgroundClip === "content-box";
3523 t = n = null;
3524 r.shrinkWrapBlocks = function() {
3525 var t, r, n, e;
3526 if (i == null) {
3527 if (t = u.getElementsByTagName("body")[0], !t) return;
3528 e = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px";
3529 r = u.createElement("div");
3530 n = u.createElement("div");
3531 t.appendChild(r).appendChild(n);
3532 i = !1;
3533 typeof n.style.zoom !== o && (n.style.cssText = f + ";width:1px;padding:1px;zoom:1", n.innerHTML = "<div><\/div>", n.firstChild.style.width = "5px", i = n.offsetWidth !== 3);
3534 t.removeChild(r);
3535 t = r = n = null
3536 }
3537 return i
3538 }
3539 }();
3540 var au = /^margin/,
3541 yt = new RegExp("^(" + at + ")(?!px)[a-z%]+$", "i"),
3542 k, d, de = /^(top|right|bottom|left)$/;
3543 n.getComputedStyle ? (k = function(n) {
3544 return n.ownerDocument.defaultView.getComputedStyle(n, null)
3545 }, d = function(n, t, r) {
3546 var e, o, s, u, f = n.style;
3547 return r = r || k(n), u = r ? r.getPropertyValue(t) || r[t] : undefined, r && (u !== "" || i.contains(n.ownerDocument, n) || (u = i.style(n, t)), yt.test(u) && au.test(t) && (e = f.width, o = f.minWidth, s = f.maxWidth, f.minWidth = f.maxWidth = f.width = u, u = r.width, f.width = e, f.minWidth = o, f.maxWidth = s)), u === undefined ? u : u + ""
3548 }) : u.documentElement.currentStyle && (k = function(n) {
3549 return n.currentStyle
3550 }, d = function(n, t, i) {
3551 var o, f, e, r, u = n.style;
3552 return i = i || k(n), r = i ? i[t] : undefined, r == null && u && u[t] && (r = u[t]), yt.test(r) && !de.test(t) && (o = u.left, f = n.runtimeStyle, e = f && f.left, e && (f.left = n.currentStyle.left), u.left = t === "fontSize" ? "1em" : r, r = u.pixelLeft + "px", u.left = o, e && (f.left = e)), r === undefined ? r : r + "" || "auto"
3553 }),
3554 function() {
3555 function a() {
3556 var f, t, r = u.getElementsByTagName("body")[0];
3557 r && (f = u.createElement("div"), t = u.createElement("div"), f.style.cssText = l, r.appendChild(f).appendChild(t), t.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%", i.swap(r, r.style.zoom != null ? {
3558 zoom: 1
3559 } : {}, function() {
3560 c = t.offsetWidth === 4
3561 }), o = !0, s = !1, h = !0, n.getComputedStyle && (s = (n.getComputedStyle(t, null) || {}).top !== "1%", o = (n.getComputedStyle(t, null) || {
3562 width: "4px"
3563 }).width === "4px"), r.removeChild(f), t = r = null)
3564 }
3565 var f, e, c, o, s, h, t = u.createElement("div"),
3566 l = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px",
3567 v = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";
3568 t.innerHTML = " <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";
3569 f = t.getElementsByTagName("a")[0];
3570 f.style.cssText = "float:left;opacity:.5";
3571 r.opacity = /^0.5/.test(f.style.opacity);
3572 r.cssFloat = !!f.style.cssFloat;
3573 t.style.backgroundClip = "content-box";
3574 t.cloneNode(!0).style.backgroundClip = "";
3575 r.clearCloneStyle = t.style.backgroundClip === "content-box";
3576 f = t = null;
3577 i.extend(r, {
3578 reliableHiddenOffsets: function() {
3579 if (e != null) return e;
3580 var i, n, f, t = u.createElement("div"),
3581 r = u.getElementsByTagName("body")[0];
3582 if (r) return t.setAttribute("className", "t"), t.innerHTML = " <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>", i = u.createElement("div"), i.style.cssText = l, r.appendChild(i).appendChild(t), t.innerHTML = "<table><tr><td><\/td><td>t<\/td><\/tr><\/table>", n = t.getElementsByTagName("td"), n[0].style.cssText = "padding:0;margin:0;border:0;display:none", f = n[0].offsetHeight === 0, n[0].style.display = "", n[1].style.display = "none", e = f && n[0].offsetHeight === 0, r.removeChild(i), t = r = null, e
3583 },
3584 boxSizing: function() {
3585 return c == null && a(), c
3586 },
3587 boxSizingReliable: function() {
3588 return o == null && a(), o
3589 },
3590 pixelPosition: function() {
3591 return s == null && a(), s
3592 },
3593 reliableMarginRight: function() {
3594 var r, f, t, i;
3595 if (h == null && n.getComputedStyle) {
3596 if (r = u.getElementsByTagName("body")[0], !r) return;
3597 f = u.createElement("div");
3598 t = u.createElement("div");
3599 f.style.cssText = l;
3600 r.appendChild(f).appendChild(t);
3601 i = t.appendChild(u.createElement("div"));
3602 i.style.cssText = t.style.cssText = v;
3603 i.style.marginRight = i.style.width = "0";
3604 t.style.width = "1px";
3605 h = !parseFloat((n.getComputedStyle(i, null) || {}).marginRight);
3606 r.removeChild(f)
3607 }
3608 return h
3609 }
3610 })
3611 }();
3612 i.swap = function(n, t, i, r) {
3613 var f, u, e = {};
3614 for (u in t) e[u] = n.style[u], n.style[u] = t[u];
3615 f = i.apply(n, r || []);
3616 for (u in t) n.style[u] = e[u];
3617 return f
3618 };
3619 var vi = /alpha\([^)]*\)/i,
3620 ge = /opacity\s*=\s*([^)]*)/,
3621 no = /^(none|table(?!-c[ea]).+)/,
3622 to = new RegExp("^(" + at + ")(.*)$", "i"),
3623 io = new RegExp("^([+-])=(" + at + ")", "i"),
3624 ro = {
3625 position: "absolute",
3626 visibility: "hidden",
3627 display: "block"
3628 },
3629 yu = {
3630 letterSpacing: 0,
3631 fontWeight: 400
3632 },
3633 pu = ["Webkit", "O", "Moz", "ms"];
3634 i.extend({
3635 cssHooks: {
3636 opacity: {
3637 get: function(n, t) {
3638 if (t) {
3639 var i = d(n, "opacity");
3640 return i === "" ? "1" : i
3641 }
3642 }
3643 }
3644 },
3645 cssNumber: {
3646 columnCount: !0,
3647 fillOpacity: !0,
3648 fontWeight: !0,
3649 lineHeight: !0,
3650 opacity: !0,
3651 order: !0,
3652 orphans: !0,
3653 widows: !0,
3654 zIndex: !0,
3655 zoom: !0
3656 },
3657 cssProps: {
3658 float: r.cssFloat ? "cssFloat" : "styleFloat"
3659 },
3660 style: function(n, t, u, f) {
3661 if (n && n.nodeType !== 3 && n.nodeType !== 8 && n.style) {
3662 var o, c, e, s = i.camelCase(t),
3663 h = n.style;
3664 if (t = i.cssProps[s] || (i.cssProps[s] = wu(h, s)), e = i.cssHooks[t] || i.cssHooks[s], u !== undefined) {
3665 if (c = typeof u, c === "string" && (o = io.exec(u)) && (u = (o[1] + 1) * o[2] + parseFloat(i.css(n, t)), c = "number"), u == null || u !== u) return;
3666 if (c !== "number" || i.cssNumber[s] || (u += "px"), r.clearCloneStyle || u !== "" || t.indexOf("background") !== 0 || (h[t] = "inherit"), !e || !("set" in e) || (u = e.set(n, u, f)) !== undefined) try {
3667 h[t] = "";
3668 h[t] = u
3669 } catch (l) {}
3670 } else return e && "get" in e && (o = e.get(n, !1, f)) !== undefined ? o : h[t]
3671 }
3672 },
3673 css: function(n, t, r, u) {
3674 var s, f, e, o = i.camelCase(t);
3675 return (t = i.cssProps[o] || (i.cssProps[o] = wu(n.style, o)), e = i.cssHooks[t] || i.cssHooks[o], e && "get" in e && (f = e.get(n, !0, r)), f === undefined && (f = d(n, t, u)), f === "normal" && t in yu && (f = yu[t]), r === "" || r) ? (s = parseFloat(f), r === !0 || i.isNumeric(s) ? s || 0 : f) : f
3676 }
3677 });
3678 i.each(["height", "width"], function(n, t) {
3679 i.cssHooks[t] = {
3680 get: function(n, r, u) {
3681 if (r) return n.offsetWidth === 0 && no.test(i.css(n, "display")) ? i.swap(n, ro, function() {
3682 return gu(n, t, u)
3683 }) : gu(n, t, u)
3684 },
3685 set: function(n, u, f) {
3686 var e = f && k(n);
3687 return ku(n, u, f ? du(n, t, f, r.boxSizing() && i.css(n, "boxSizing", !1, e) === "border-box", e) : 0)
3688 }
3689 }
3690 });
3691 r.opacity || (i.cssHooks.opacity = {
3692 get: function(n, t) {
3693 return ge.test((t && n.currentStyle ? n.currentStyle.filter : n.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : ""
3694 },
3695 set: function(n, t) {
3696 var r = n.style,
3697 u = n.currentStyle,
3698 e = i.isNumeric(t) ? "alpha(opacity=" + t * 100 + ")" : "",
3699 f = u && u.filter || r.filter || "";
3700 (r.zoom = 1, (t >= 1 || t === "") && i.trim(f.replace(vi, "")) === "" && r.removeAttribute && (r.removeAttribute("filter"), t === "" || u && !u.filter)) || (r.filter = vi.test(f) ? f.replace(vi, e) : f + " " + e)
3701 }
3702 });
3703 i.cssHooks.marginRight = vu(r.reliableMarginRight, function(n, t) {
3704 if (t) return i.swap(n, {
3705 display: "inline-block"
3706 }, d, [n, "marginRight"])
3707 });
3708 i.each({
3709 margin: "",
3710 padding: "",
3711 border: "Width"
3712 }, function(n, t) {
3713 i.cssHooks[n + t] = {
3714 expand: function(i) {
3715 for (var r = 0, f = {}, u = typeof i == "string" ? i.split(" ") : [i]; r < 4; r++) f[n + w[r] + t] = u[r] || u[r - 2] || u[0];
3716 return f
3717 }
3718 };
3719 au.test(n) || (i.cssHooks[n + t].set = ku)
3720 });
3721 i.fn.extend({
3722 css: function(n, t) {
3723 return b(this, function(n, t, r) {
3724 var f, e, o = {},
3725 u = 0;
3726 if (i.isArray(t)) {
3727 for (f = k(n), e = t.length; u < e; u++) o[t[u]] = i.css(n, t[u], !1, f);
3728 return o
3729 }
3730 return r !== undefined ? i.style(n, t, r) : i.css(n, t)
3731 }, n, t, arguments.length > 1)
3732 },
3733 show: function() {
3734 return bu(this, !0)
3735 },
3736 hide: function() {
3737 return bu(this)
3738 },
3739 toggle: function(n) {
3740 return typeof n == "boolean" ? n ? this.show() : this.hide() : this.each(function() {
3741 et(this) ? i(this).show() : i(this).hide()
3742 })
3743 }
3744 });
3745 i.Tween = e;
3746 e.prototype = {
3747 constructor: e,
3748 init: function(n, t, r, u, f, e) {
3749 this.elem = n;
3750 this.prop = r;
3751 this.easing = f || "swing";
3752 this.options = t;
3753 this.start = this.now = this.cur();
3754 this.end = u;
3755 this.unit = e || (i.cssNumber[r] ? "" : "px")
3756 },
3757 cur: function() {
3758 var n = e.propHooks[this.prop];
3759 return n && n.get ? n.get(this) : e.propHooks._default.get(this)
3760 },
3761 run: function(n) {
3762 var t, r = e.propHooks[this.prop];
3763 return this.pos = this.options.duration ? t = i.easing[this.easing](n, this.options.duration * n, 0, 1, this.options.duration) : t = n, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), r && r.set ? r.set(this) : e.propHooks._default.set(this), this
3764 }
3765 };
3766 e.prototype.init.prototype = e.prototype;
3767 e.propHooks = {
3768 _default: {
3769 get: function(n) {
3770 var t;
3771 return n.elem[n.prop] != null && (!n.elem.style || n.elem.style[n.prop] == null) ? n.elem[n.prop] : (t = i.css(n.elem, n.prop, ""), !t || t === "auto" ? 0 : t)
3772 },
3773 set: function(n) {
3774 i.fx.step[n.prop] ? i.fx.step[n.prop](n) : n.elem.style && (n.elem.style[i.cssProps[n.prop]] != null || i.cssHooks[n.prop]) ? i.style(n.elem, n.prop, n.now + n.unit) : n.elem[n.prop] = n.now
3775 }
3776 }
3777 };
3778 e.propHooks.scrollTop = e.propHooks.scrollLeft = {
3779 set: function(n) {
3780 n.elem.nodeType && n.elem.parentNode && (n.elem[n.prop] = n.now)
3781 }
3782 };
3783 i.easing = {
3784 linear: function(n) {
3785 return n
3786 },
3787 swing: function(n) {
3788 return .5 - Math.cos(n * Math.PI) / 2
3789 }
3790 };
3791 i.fx = e.prototype.init;
3792 i.fx.step = {};
3793 var rt, pt, uo = /^(?:toggle|show|hide)$/,
3794 nf = new RegExp("^(?:([+-])=|)(" + at + ")([a-z%]*)$", "i"),
3795 fo = /queueHooks$/,
3796 wt = [eo],
3797 st = {
3798 "*": [function(n, t) {
3799 var f = this.createTween(n, t),
3800 s = f.cur(),
3801 u = nf.exec(t),
3802 e = u && u[3] || (i.cssNumber[n] ? "" : "px"),
3803 r = (i.cssNumber[n] || e !== "px" && +s) && nf.exec(i.css(f.elem, n)),
3804 o = 1,
3805 h = 20;
3806 if (r && r[3] !== e) {
3807 e = e || r[3];
3808 u = u || [];
3809 r = +s || 1;
3810 do o = o || ".5", r = r / o, i.style(f.elem, n, r + e); while (o !== (o = f.cur() / s) && o !== 1 && --h)
3811 }
3812 return u && (r = f.start = +r || +s || 0, f.unit = e, f.end = u[1] ? r + (u[1] + 1) * u[2] : +u[2]), f
3813 }]
3814 };
3815 i.Animation = i.extend(uf, {
3816 tweener: function(n, t) {
3817 i.isFunction(n) ? (t = n, n = ["*"]) : n = n.split(" ");
3818 for (var r, u = 0, f = n.length; u < f; u++) r = n[u], st[r] = st[r] || [], st[r].unshift(t)
3819 },
3820 prefilter: function(n, t) {
3821 t ? wt.unshift(n) : wt.push(n)
3822 }
3823 });
3824 i.speed = function(n, t, r) {
3825 var u = n && typeof n == "object" ? i.extend({}, n) : {
3826 complete: r || !r && t || i.isFunction(n) && n,
3827 duration: n,
3828 easing: r && t || t && !i.isFunction(t) && t
3829 };
3830 return u.duration = i.fx.off ? 0 : typeof u.duration == "number" ? u.duration : u.duration in i.fx.speeds ? i.fx.speeds[u.duration] : i.fx.speeds._default, (u.queue == null || u.queue === !0) && (u.queue = "fx"), u.old = u.complete, u.complete = function() {
3831 i.isFunction(u.old) && u.old.call(this);
3832 u.queue && i.dequeue(this, u.queue)
3833 }, u
3834 };
3835 i.fn.extend({
3836 fadeTo: function(n, t, i, r) {
3837 return this.filter(et).css("opacity", 0).show().end().animate({
3838 opacity: t
3839 }, n, i, r)
3840 },
3841 animate: function(n, t, r, u) {
3842 var o = i.isEmptyObject(n),
3843 e = i.speed(t, r, u),
3844 f = function() {
3845 var t = uf(this, i.extend({}, n), e);
3846 (o || i._data(this, "finish")) && t.stop(!0)
3847 };
3848 return f.finish = f, o || e.queue === !1 ? this.each(f) : this.queue(e.queue, f)
3849 },
3850 stop: function(n, t, r) {
3851 var u = function(n) {
3852 var t = n.stop;
3853 delete n.stop;
3854 t(r)
3855 };
3856 return typeof n != "string" && (r = t, t = n, n = undefined), t && n !== !1 && this.queue(n || "fx", []), this.each(function() {
3857 var o = !0,
3858 t = n != null && n + "queueHooks",
3859 e = i.timers,
3860 f = i._data(this);
3861 if (t) f[t] && f[t].stop && u(f[t]);
3862 else
3863 for (t in f) f[t] && f[t].stop && fo.test(t) && u(f[t]);
3864 for (t = e.length; t--;) e[t].elem === this && (n == null || e[t].queue === n) && (e[t].anim.stop(r), o = !1, e.splice(t, 1));
3865 (o || !r) && i.dequeue(this, n)
3866 })
3867 },
3868 finish: function(n) {
3869 return n !== !1 && (n = n || "fx"), this.each(function() {
3870 var t, f = i._data(this),
3871 r = f[n + "queue"],
3872 e = f[n + "queueHooks"],
3873 u = i.timers,
3874 o = r ? r.length : 0;
3875 for (f.finish = !0, i.queue(this, n, []), e && e.stop && e.stop.call(this, !0), t = u.length; t--;) u[t].elem === this && u[t].queue === n && (u[t].anim.stop(!0), u.splice(t, 1));
3876 for (t = 0; t < o; t++) r[t] && r[t].finish && r[t].finish.call(this);
3877 delete f.finish
3878 })
3879 }
3880 });
3881 i.each(["toggle", "show", "hide"], function(n, t) {
3882 var r = i.fn[t];
3883 i.fn[t] = function(n, i, u) {
3884 return n == null || typeof n == "boolean" ? r.apply(this, arguments) : this.animate(bt(t, !0), n, i, u)
3885 }
3886 });
3887 i.each({
3888 slideDown: bt("show"),
3889 slideUp: bt("hide"),
3890 slideToggle: bt("toggle"),
3891 fadeIn: {
3892 opacity: "show"
3893 },
3894 fadeOut: {
3895 opacity: "hide"
3896 },
3897 fadeToggle: {
3898 opacity: "toggle"
3899 }
3900 }, function(n, t) {
3901 i.fn[n] = function(n, i, r) {
3902 return this.animate(t, n, i, r)
3903 }
3904 });
3905 i.timers = [];
3906 i.fx.tick = function() {
3907 var r, n = i.timers,
3908 t = 0;
3909 for (rt = i.now(); t < n.length; t++) r = n[t], r() || n[t] !== r || n.splice(t--, 1);
3910 n.length || i.fx.stop();
3911 rt = undefined
3912 };
3913 i.fx.timer = function(n) {
3914 i.timers.push(n);
3915 n() ? i.fx.start() : i.timers.pop()
3916 };
3917 i.fx.interval = 13;
3918 i.fx.start = function() {
3919 pt || (pt = setInterval(i.fx.tick, i.fx.interval))
3920 };
3921 i.fx.stop = function() {
3922 clearInterval(pt);
3923 pt = null
3924 };
3925 i.fx.speeds = {
3926 slow: 600,
3927 fast: 200,
3928 _default: 400
3929 };
3930 i.fn.delay = function(n, t) {
3931 return n = i.fx ? i.fx.speeds[n] || n : n, t = t || "fx", this.queue(t, function(t, i) {
3932 var r = setTimeout(t, n);
3933 i.stop = function() {
3934 clearTimeout(r)
3935 }
3936 })
3937 },
3938 function() {
3939 var i, n, f, e, t = u.createElement("div");
3940 t.setAttribute("className", "t");
3941 t.innerHTML = " <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";
3942 i = t.getElementsByTagName("a")[0];
3943 f = u.createElement("select");
3944 e = f.appendChild(u.createElement("option"));
3945 n = t.getElementsByTagName("input")[0];
3946 i.style.cssText = "top:1px";
3947 r.getSetAttribute = t.className !== "t";
3948 r.style = /top/.test(i.getAttribute("style"));
3949 r.hrefNormalized = i.getAttribute("href") === "/a";
3950 r.checkOn = !!n.value;
3951 r.optSelected = e.selected;
3952 r.enctype = !!u.createElement("form").enctype;
3953 f.disabled = !0;
3954 r.optDisabled = !e.disabled;
3955 n = u.createElement("input");
3956 n.setAttribute("value", "");
3957 r.input = n.getAttribute("value") === "";
3958 n.value = "t";
3959 n.setAttribute("type", "radio");
3960 r.radioValue = n.value === "t";
3961 i = n = f = e = t = null
3962 }();
3963 ff = /\r/g;
3964 i.fn.extend({
3965 val: function(n) {
3966 var t, r, f, u = this[0];
3967 return arguments.length ? (f = i.isFunction(n), this.each(function(r) {
3968 var u;
3969 this.nodeType === 1 && (u = f ? n.call(this, r, i(this).val()) : n, u == null ? u = "" : typeof u == "number" ? u += "" : i.isArray(u) && (u = i.map(u, function(n) {
3970 return n == null ? "" : n + ""
3971 })), t = i.valHooks[this.type] || i.valHooks[this.nodeName.toLowerCase()], t && "set" in t && t.set(this, u, "value") !== undefined || (this.value = u))
3972 })) : u ? (t = i.valHooks[u.type] || i.valHooks[u.nodeName.toLowerCase()], t && "get" in t && (r = t.get(u, "value")) !== undefined) ? r : (r = u.value, typeof r == "string" ? r.replace(ff, "") : r == null ? "" : r) : void 0
3973 }
3974 });
3975 i.extend({
3976 valHooks: {
3977 option: {
3978 get: function(n) {
3979 var t = i.find.attr(n, "value");
3980 return t != null ? t : i.text(n)
3981 }
3982 },
3983 select: {
3984 get: function(n) {
3985 for (var o, t, s = n.options, u = n.selectedIndex, f = n.type === "select-one" || u < 0, h = f ? null : [], c = f ? u + 1 : s.length, e = u < 0 ? c : f ? u : 0; e < c; e++)
3986 if (t = s[e], (t.selected || e === u) && (r.optDisabled ? !t.disabled : t.getAttribute("disabled") === null) && (!t.parentNode.disabled || !i.nodeName(t.parentNode, "optgroup"))) {
3987 if (o = i(t).val(), f) return o;
3988 h.push(o)
3989 }
3990 return h
3991 },
3992 set: function(n, t) {
3993 for (var f, r, u = n.options, o = i.makeArray(t), e = u.length; e--;)
3994 if (r = u[e], i.inArray(i.valHooks.option.get(r), o) >= 0) try {
3995 r.selected = f = !0
3996 } catch (s) {
3997 r.scrollHeight
3998 } else r.selected = !1;
3999 return f || (n.selectedIndex = -1), u
4000 }
4001 }
4002 }
4003 });
4004 i.each(["radio", "checkbox"], function() {
4005 i.valHooks[this] = {
4006 set: function(n, t) {
4007 if (i.isArray(t)) return n.checked = i.inArray(i(n).val(), t) >= 0
4008 }
4009 };
4010 r.checkOn || (i.valHooks[this].get = function(n) {
4011 return n.getAttribute("value") === null ? "on" : n.value
4012 })
4013 });
4014 var ut, ef, v = i.expr.attrHandle,
4015 yi = /^(?:checked|selected)$/i,
4016 g = r.getSetAttribute,
4017 kt = r.input;
4018 i.fn.extend({
4019 attr: function(n, t) {
4020 return b(this, i.attr, n, t, arguments.length > 1)
4021 },
4022 removeAttr: function(n) {
4023 return this.each(function() {
4024 i.removeAttr(this, n)
4025 })
4026 }
4027 });
4028 i.extend({
4029 attr: function(n, t, r) {
4030 var u, f, e = n.nodeType;
4031 if (n && e !== 3 && e !== 8 && e !== 2) {
4032 if (typeof n.getAttribute === o) return i.prop(n, t, r);
4033 if (e === 1 && i.isXMLDoc(n) || (t = t.toLowerCase(), u = i.attrHooks[t] || (i.expr.match.bool.test(t) ? ef : ut)), r !== undefined)
4034 if (r === null) i.removeAttr(n, t);
4035 else return u && "set" in u && (f = u.set(n, r, t)) !== undefined ? f : (n.setAttribute(t, r + ""), r);
4036 else return u && "get" in u && (f = u.get(n, t)) !== null ? f : (f = i.find.attr(n, t), f == null ? undefined : f)
4037 }
4038 },
4039 removeAttr: function(n, t) {
4040 var r, u, e = 0,
4041 f = t && t.match(h);
4042 if (f && n.nodeType === 1)
4043 while (r = f[e++]) u = i.propFix[r] || r, i.expr.match.bool.test(r) ? kt && g || !yi.test(r) ? n[u] = !1 : n[i.camelCase("default-" + r)] = n[u] = !1 : i.attr(n, r, ""), n.removeAttribute(g ? r : u)
4044 },
4045 attrHooks: {
4046 type: {
4047 set: function(n, t) {
4048 if (!r.radioValue && t === "radio" && i.nodeName(n, "input")) {
4049 var u = n.value;
4050 return n.setAttribute("type", t), u && (n.value = u), t
4051 }
4052 }
4053 }
4054 }
4055 });
4056 ef = {
4057 set: function(n, t, r) {
4058 return t === !1 ? i.removeAttr(n, r) : kt && g || !yi.test(r) ? n.setAttribute(!g && i.propFix[r] || r, r) : n[i.camelCase("default-" + r)] = n[r] = !0, r
4059 }
4060 };
4061 i.each(i.expr.match.bool.source.match(/\w+/g), function(n, t) {
4062 var r = v[t] || i.find.attr;
4063 v[t] = kt && g || !yi.test(t) ? function(n, t, i) {
4064 var u, f;
4065 return i || (f = v[t], v[t] = u, u = r(n, t, i) != null ? t.toLowerCase() : null, v[t] = f), u
4066 } : function(n, t, r) {
4067 if (!r) return n[i.camelCase("default-" + t)] ? t.toLowerCase() : null
4068 }
4069 });
4070 kt && g || (i.attrHooks.value = {
4071 set: function(n, t, r) {
4072 if (i.nodeName(n, "input")) n.defaultValue = t;
4073 else return ut && ut.set(n, t, r)
4074 }
4075 });
4076 g || (ut = {
4077 set: function(n, t, i) {
4078 var r = n.getAttributeNode(i);
4079 return r || n.setAttributeNode(r = n.ownerDocument.createAttribute(i)), r.value = t += "", i === "value" || t === n.getAttribute(i) ? t : void 0
4080 }
4081 }, v.id = v.name = v.coords = function(n, t, i) {
4082 var r;
4083 if (!i) return (r = n.getAttributeNode(t)) && r.value !== "" ? r.value : null
4084 }, i.valHooks.button = {
4085 get: function(n, t) {
4086 var i = n.getAttributeNode(t);
4087 if (i && i.specified) return i.value
4088 },
4089 set: ut.set
4090 }, i.attrHooks.contenteditable = {
4091 set: function(n, t, i) {
4092 ut.set(n, t === "" ? !1 : t, i)
4093 }
4094 }, i.each(["width", "height"], function(n, t) {
4095 i.attrHooks[t] = {
4096 set: function(n, i) {
4097 if (i === "") return n.setAttribute(t, "auto"), i
4098 }
4099 }
4100 }));
4101 r.style || (i.attrHooks.style = {
4102 get: function(n) {
4103 return n.style.cssText || undefined
4104 },
4105 set: function(n, t) {
4106 return n.style.cssText = t + ""
4107 }
4108 });
4109 of = /^(?:input|select|textarea|button|object)$/i;
4110 sf = /^(?:a|area)$/i;
4111 i.fn.extend({
4112 prop: function(n, t) {
4113 return b(this, i.prop, n, t, arguments.length > 1)
4114 },
4115 removeProp: function(n) {
4116 return n = i.propFix[n] || n, this.each(function() {
4117 try {
4118 this[n] = undefined;
4119 delete this[n]
4120 } catch (t) {}
4121 })
4122 }
4123 });
4124 i.extend({
4125 propFix: {
4126 "for": "htmlFor",
4127 "class": "className"
4128 },
4129 prop: function(n, t, r) {
4130 var f, u, o, e = n.nodeType;
4131 if (n && e !== 3 && e !== 8 && e !== 2) return o = e !== 1 || !i.isXMLDoc(n), o && (t = i.propFix[t] || t, u = i.propHooks[t]), r !== undefined ? u && "set" in u && (f = u.set(n, r, t)) !== undefined ? f : n[t] = r : u && "get" in u && (f = u.get(n, t)) !== null ? f : n[t]
4132 },
4133 propHooks: {
4134 tabIndex: {
4135 get: function(n) {
4136 var t = i.find.attr(n, "tabindex");
4137 return t ? parseInt(t, 10) : of.test(n.nodeName) || sf.test(n.nodeName) && n.href ? 0 : -1
4138 }
4139 }
4140 }
4141 });
4142 r.hrefNormalized || i.each(["href", "src"], function(n, t) {
4143 i.propHooks[t] = {
4144 get: function(n) {
4145 return n.getAttribute(t, 4)
4146 }
4147 }
4148 });
4149 r.optSelected || (i.propHooks.selected = {
4150 get: function(n) {
4151 var t = n.parentNode;
4152 return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null
4153 }
4154 });
4155 i.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
4156 i.propFix[this.toLowerCase()] = this
4157 });
4158 r.enctype || (i.propFix.enctype = "encoding");
4159 dt = /[\t\r\n\f]/g;
4160 i.fn.extend({
4161 addClass: function(n) {
4162 var o, t, r, u, s, f, e = 0,
4163 c = this.length,
4164 l = typeof n == "string" && n;
4165 if (i.isFunction(n)) return this.each(function(t) {
4166 i(this).addClass(n.call(this, t, this.className))
4167 });
4168 if (l)
4169 for (o = (n || "").match(h) || []; e < c; e++)
4170 if (t = this[e], r = t.nodeType === 1 && (t.className ? (" " + t.className + " ").replace(dt, " ") : " "), r) {
4171 for (s = 0; u = o[s++];) r.indexOf(" " + u + " ") < 0 && (r += u + " ");
4172 f = i.trim(r);
4173 t.className !== f && (t.className = f)
4174 }
4175 return this
4176 },
4177 removeClass: function(n) {
4178 var o, t, r, u, s, f, e = 0,
4179 c = this.length,
4180 l = arguments.length === 0 || typeof n == "string" && n;
4181 if (i.isFunction(n)) return this.each(function(t) {
4182 i(this).removeClass(n.call(this, t, this.className))
4183 });
4184 if (l)
4185 for (o = (n || "").match(h) || []; e < c; e++)
4186 if (t = this[e], r = t.nodeType === 1 && (t.className ? (" " + t.className + " ").replace(dt, " ") : ""), r) {
4187 for (s = 0; u = o[s++];)
4188 while (r.indexOf(" " + u + " ") >= 0) r = r.replace(" " + u + " ", " ");
4189 f = n ? i.trim(r) : "";
4190 t.className !== f && (t.className = f)
4191 }
4192 return this
4193 },
4194 toggleClass: function(n, t) {
4195 var r = typeof n;
4196 return typeof t == "boolean" && r === "string" ? t ? this.addClass(n) : this.removeClass(n) : i.isFunction(n) ? this.each(function(r) {
4197 i(this).toggleClass(n.call(this, r, this.className, t), t)
4198 }) : this.each(function() {
4199 if (r === "string")
4200 for (var t, f = 0, u = i(this), e = n.match(h) || []; t = e[f++];) u.hasClass(t) ? u.removeClass(t) : u.addClass(t);
4201 else(r === o || r === "boolean") && (this.className && i._data(this, "__className__", this.className), this.className = this.className || n === !1 ? "" : i._data(this, "__className__") || "")
4202 })
4203 },
4204 hasClass: function(n) {
4205 for (var i = " " + n + " ", t = 0, r = this.length; t < r; t++)
4206 if (this[t].nodeType === 1 && (" " + this[t].className + " ").replace(dt, " ").indexOf(i) >= 0) return !0;
4207 return !1
4208 }
4209 });
4210 i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(n, t) {
4211 i.fn[t] = function(n, i) {
4212 return arguments.length > 0 ? this.on(t, null, n, i) : this.trigger(t)
4213 }
4214 });
4215 i.fn.extend({
4216 hover: function(n, t) {
4217 return this.mouseenter(n).mouseleave(t || n)
4218 },
4219 bind: function(n, t, i) {
4220 return this.on(n, null, t, i)
4221 },
4222 unbind: function(n, t) {
4223 return this.off(n, null, t)
4224 },
4225 delegate: function(n, t, i, r) {
4226 return this.on(t, n, i, r)
4227 },
4228 undelegate: function(n, t, i) {
4229 return arguments.length === 1 ? this.off(n, "**") : this.off(t, n || "**", i)
4230 }
4231 });
4232 var pi = i.now(),
4233 wi = /\?/,
4234 so = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
4235 i.parseJSON = function(t) {
4236 if (n.JSON && n.JSON.parse) return n.JSON.parse(t + "");
4237 var f, r = null,
4238 u = i.trim(t + "");
4239 return u && !i.trim(u.replace(so, function(n, t, i, u) {
4240 return (f && t && (r = 0), r === 0) ? n : (f = i || t, r += !u - !i, "")
4241 })) ? Function("return " + u)() : i.error("Invalid JSON: " + t)
4242 };
4243 i.parseXML = function(t) {
4244 var r, u;
4245 if (!t || typeof t != "string") return null;
4246 try {
4247 n.DOMParser ? (u = new DOMParser, r = u.parseFromString(t, "text/xml")) : (r = new ActiveXObject("Microsoft.XMLDOM"), r.async = "false", r.loadXML(t))
4248 } catch (f) {
4249 r = undefined
4250 }
4251 return r && r.documentElement && !r.getElementsByTagName("parsererror").length || i.error("Invalid XML: " + t), r
4252 };
4253 var nt, y, ho = /#.*$/,
4254 hf = /([?&])_=[^&]*/,
4255 co = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
4256 lo = /^(?:GET|HEAD)$/,
4257 ao = /^\/\//,
4258 cf = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
4259 lf = {},
4260 bi = {},
4261 af = "*/".concat("*");
4262 try {
4263 y = location.href
4264 } catch (ts) {
4265 y = u.createElement("a");
4266 y.href = "";
4267 y = y.href
4268 }
4269 nt = cf.exec(y.toLowerCase()) || [];
4270 i.extend({
4271 active: 0,
4272 lastModified: {},
4273 etag: {},
4274 ajaxSettings: {
4275 url: y,
4276 type: "GET",
4277 isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(nt[1]),
4278 global: !0,
4279 processData: !0,
4280 async: !0,
4281 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
4282 accepts: {
4283 "*": af,
4284 text: "text/plain",
4285 html: "text/html",
4286 xml: "application/xml, text/xml",
4287 json: "application/json, text/javascript"
4288 },
4289 contents: {
4290 xml: /xml/,
4291 html: /html/,
4292 json: /json/
4293 },
4294 responseFields: {
4295 xml: "responseXML",
4296 text: "responseText",
4297 json: "responseJSON"
4298 },
4299 converters: {
4300 "* text": String,
4301 "text html": !0,
4302 "text json": i.parseJSON,
4303 "text xml": i.parseXML
4304 },
4305 flatOptions: {
4306 url: !0,
4307 context: !0
4308 }
4309 },
4310 ajaxSetup: function(n, t) {
4311 return t ? ki(ki(n, i.ajaxSettings), t) : ki(i.ajaxSettings, n)
4312 },
4313 ajaxPrefilter: vf(lf),
4314 ajaxTransport: vf(bi),
4315 ajax: function(n, t) {
4316 function w(n, t, s, h) {
4317 var v, it, nt, y, w, c = t;
4318 e !== 2 && (e = 2, k && clearTimeout(k), l = undefined, b = h || "", u.readyState = n > 0 ? 4 : 0, v = n >= 200 && n < 300 || n === 304, s && (y = vo(r, u, s)), y = yo(r, y, u, v), v ? (r.ifModified && (w = u.getResponseHeader("Last-Modified"), w && (i.lastModified[f] = w), w = u.getResponseHeader("etag"), w && (i.etag[f] = w)), n === 204 || r.type === "HEAD" ? c = "nocontent" : n === 304 ? c = "notmodified" : (c = y.state, it = y.data, nt = y.error, v = !nt)) : (nt = c, (n || !c) && (c = "error", n < 0 && (n = 0))), u.status = n, u.statusText = (t || c) + "", v ? g.resolveWith(o, [it, c, u]) : g.rejectWith(o, [u, c, nt]), u.statusCode(p), p = undefined, a && d.trigger(v ? "ajaxSuccess" : "ajaxError", [u, r, v ? it : nt]), tt.fireWith(o, [u, c]), a && (d.trigger("ajaxComplete", [u, r]), --i.active || i.event.trigger("ajaxStop")))
4319 }
4320 typeof n == "object" && (t = n, n = undefined);
4321 t = t || {};
4322 var s, c, f, b, k, a, l, v, r = i.ajaxSetup({}, t),
4323 o = r.context || r,
4324 d = r.context && (o.nodeType || o.jquery) ? i(o) : i.event,
4325 g = i.Deferred(),
4326 tt = i.Callbacks("once memory"),
4327 p = r.statusCode || {},
4328 it = {},
4329 rt = {},
4330 e = 0,
4331 ut = "canceled",
4332 u = {
4333 readyState: 0,
4334 getResponseHeader: function(n) {
4335 var t;
4336 if (e === 2) {
4337 if (!v)
4338 for (v = {}; t = co.exec(b);) v[t[1].toLowerCase()] = t[2];
4339 t = v[n.toLowerCase()]
4340 }
4341 return t == null ? null : t
4342 },
4343 getAllResponseHeaders: function() {
4344 return e === 2 ? b : null
4345 },
4346 setRequestHeader: function(n, t) {
4347 var i = n.toLowerCase();
4348 return e || (n = rt[i] = rt[i] || n, it[n] = t), this
4349 },
4350 overrideMimeType: function(n) {
4351 return e || (r.mimeType = n), this
4352 },
4353 statusCode: function(n) {
4354 var t;
4355 if (n)
4356 if (e < 2)
4357 for (t in n) p[t] = [p[t], n[t]];
4358 else u.always(n[u.status]);
4359 return this
4360 },
4361 abort: function(n) {
4362 var t = n || ut;
4363 return l && l.abort(t), w(0, t), this
4364 }
4365 };
4366 if (g.promise(u).complete = tt.add, u.success = u.done, u.error = u.fail, r.url = ((n || r.url || y) + "").replace(ho, "").replace(ao, nt[1] + "//"), r.type = t.method || t.type || r.method || r.type, r.dataTypes = i.trim(r.dataType || "*").toLowerCase().match(h) || [""], r.crossDomain == null && (s = cf.exec(r.url.toLowerCase()), r.crossDomain = !!(s && (s[1] !== nt[1] || s[2] !== nt[2] || (s[3] || (s[1] === "http:" ? "80" : "443")) !== (nt[3] || (nt[1] === "http:" ? "80" : "443"))))), r.data && r.processData && typeof r.data != "string" && (r.data = i.param(r.data, r.traditional)), yf(lf, r, t, u), e === 2) return u;
4367 a = r.global;
4368 a && i.active++ == 0 && i.event.trigger("ajaxStart");
4369 r.type = r.type.toUpperCase();
4370 r.hasContent = !lo.test(r.type);
4371 f = r.url;
4372 r.hasContent || (r.data && (f = r.url += (wi.test(f) ? "&" : "?") + r.data, delete r.data), r.cache === !1 && (r.url = hf.test(f) ? f.replace(hf, "$1_=" + pi++) : f + (wi.test(f) ? "&" : "?") + "_=" + pi++));
4373 r.ifModified && (i.lastModified[f] && u.setRequestHeader("If-Modified-Since", i.lastModified[f]), i.etag[f] && u.setRequestHeader("If-None-Match", i.etag[f]));
4374 (r.data && r.hasContent && r.contentType !== !1 || t.contentType) && u.setRequestHeader("Content-Type", r.contentType);
4375 u.setRequestHeader("Accept", r.dataTypes[0] && r.accepts[r.dataTypes[0]] ? r.accepts[r.dataTypes[0]] + (r.dataTypes[0] !== "*" ? ", " + af + "; q=0.01" : "") : r.accepts["*"]);
4376 for (c in r.headers) u.setRequestHeader(c, r.headers[c]);
4377 if (r.beforeSend && (r.beforeSend.call(o, u, r) === !1 || e === 2)) return u.abort();
4378 ut = "abort";
4379 for (c in {
4380 success: 1,
4381 error: 1,
4382 complete: 1
4383 }) u[c](r[c]);
4384 if (l = yf(bi, r, t, u), l) {
4385 u.readyState = 1;
4386 a && d.trigger("ajaxSend", [u, r]);
4387 r.async && r.timeout > 0 && (k = setTimeout(function() {
4388 u.abort("timeout")
4389 }, r.timeout));
4390 try {
4391 e = 1;
4392 l.send(it, w)
4393 } catch (ft) {
4394 if (e < 2) w(-1, ft);
4395 else throw ft;
4396 }
4397 } else w(-1, "No Transport");
4398 return u
4399 },
4400 getJSON: function(n, t, r) {
4401 return i.get(n, t, r, "json")
4402 },
4403 getScript: function(n, t) {
4404 return i.get(n, undefined, t, "script")
4405 }
4406 });
4407 i.each(["get", "post"], function(n, t) {
4408 i[t] = function(n, r, u, f) {
4409 return i.isFunction(r) && (f = f || u, u = r, r = undefined), i.ajax({
4410 url: n,
4411 type: t,
4412 dataType: f,
4413 data: r,
4414 success: u
4415 })
4416 }
4417 });
4418 i.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(n, t) {
4419 i.fn[t] = function(n) {
4420 return this.on(t, n)
4421 }
4422 });
4423 i._evalUrl = function(n) {
4424 return i.ajax({
4425 url: n,
4426 type: "GET",
4427 dataType: "script",
4428 async: !1,
4429 global: !1,
4430 throws: !0
4431 })
4432 };
4433 i.fn.extend({
4434 wrapAll: function(n) {
4435 if (i.isFunction(n)) return this.each(function(t) {
4436 i(this).wrapAll(n.call(this, t))
4437 });
4438 if (this[0]) {
4439 var t = i(n, this[0].ownerDocument).eq(0).clone(!0);
4440 this[0].parentNode && t.insertBefore(this[0]);
4441 t.map(function() {
4442 for (var n = this; n.firstChild && n.firstChild.nodeType === 1;) n = n.firstChild;
4443 return n
4444 }).append(this)
4445 }
4446 return this
4447 },
4448 wrapInner: function(n) {
4449 return i.isFunction(n) ? this.each(function(t) {
4450 i(this).wrapInner(n.call(this, t))
4451 }) : this.each(function() {
4452 var t = i(this),
4453 r = t.contents();
4454 r.length ? r.wrapAll(n) : t.append(n)
4455 })
4456 },
4457 wrap: function(n) {
4458 var t = i.isFunction(n);
4459 return this.each(function(r) {
4460 i(this).wrapAll(t ? n.call(this, r) : n)
4461 })
4462 },
4463 unwrap: function() {
4464 return this.parent().each(function() {
4465 i.nodeName(this, "body") || i(this).replaceWith(this.childNodes)
4466 }).end()
4467 }
4468 });
4469 i.expr.filters.hidden = function(n) {
4470 return n.offsetWidth <= 0 && n.offsetHeight <= 0 || !r.reliableHiddenOffsets() && (n.style && n.style.display || i.css(n, "display")) === "none"
4471 };
4472 i.expr.filters.visible = function(n) {
4473 return !i.expr.filters.hidden(n)
4474 };
4475 var po = /%20/g,
4476 wo = /\[\]$/,
4477 pf = /\r?\n/g,
4478 bo = /^(?:submit|button|image|reset|file)$/i,
4479 ko = /^(?:input|select|textarea|keygen)/i;
4480 i.param = function(n, t) {
4481 var r, u = [],
4482 f = function(n, t) {
4483 t = i.isFunction(t) ? t() : t == null ? "" : t;
4484 u[u.length] = encodeURIComponent(n) + "=" + encodeURIComponent(t)
4485 };
4486 if (t === undefined && (t = i.ajaxSettings && i.ajaxSettings.traditional), i.isArray(n) || n.jquery && !i.isPlainObject(n)) i.each(n, function() {
4487 f(this.name, this.value)
4488 });
4489 else
4490 for (r in n) di(r, n[r], t, f);
4491 return u.join("&").replace(po, "+")
4492 };
4493 i.fn.extend({
4494 serialize: function() {
4495 return i.param(this.serializeArray())
4496 },
4497 serializeArray: function() {
4498 return this.map(function() {
4499 var n = i.prop(this, "elements");
4500 return n ? i.makeArray(n) : this
4501 }).filter(function() {
4502 var n = this.type;
4503 return this.name && !i(this).is(":disabled") && ko.test(this.nodeName) && !bo.test(n) && (this.checked || !oi.test(n))
4504 }).map(function(n, t) {
4505 var r = i(this).val();
4506 return r == null ? null : i.isArray(r) ? i.map(r, function(n) {
4507 return {
4508 name: t.name,
4509 value: n.replace(pf, "\r\n")
4510 }
4511 }) : {
4512 name: t.name,
4513 value: r.replace(pf, "\r\n")
4514 }
4515 }).get()
4516 }
4517 });
4518 i.ajaxSettings.xhr = n.ActiveXObject !== undefined ? function() {
4519 return !this.isLocal && /^(get|post|head|put|delete|options)$/i.test(this.type) && wf() || ns()
4520 } : wf;
4521 var go = 0,
4522 gt = {},
4523 ht = i.ajaxSettings.xhr();
4524 if (n.ActiveXObject) i(n).on("unload", function() {
4525 for (var n in gt) gt[n](undefined, !0)
4526 });
4527 return r.cors = !!ht && "withCredentials" in ht, ht = r.ajax = !!ht, ht && i.ajaxTransport(function(n) {
4528 if (!n.crossDomain || r.cors) {
4529 var t;
4530 return {
4531 send: function(r, u) {
4532 var e, f = n.xhr(),
4533 o = ++go;
4534 if (f.open(n.type, n.url, n.async, n.username, n.password), n.xhrFields)
4535 for (e in n.xhrFields) f[e] = n.xhrFields[e];
4536 n.mimeType && f.overrideMimeType && f.overrideMimeType(n.mimeType);
4537 n.crossDomain || r["X-Requested-With"] || (r["X-Requested-With"] = "XMLHttpRequest");
4538 for (e in r) r[e] !== undefined && f.setRequestHeader(e, r[e] + "");
4539 f.send(n.hasContent && n.data || null);
4540 t = function(r, e) {
4541 var s, c, h;
4542 if (t && (e || f.readyState === 4))
4543 if (delete gt[o], t = undefined, f.onreadystatechange = i.noop, e) f.readyState !== 4 && f.abort();
4544 else {
4545 h = {};
4546 s = f.status;
4547 typeof f.responseText == "string" && (h.text = f.responseText);
4548 try {
4549 c = f.statusText
4550 } catch (l) {
4551 c = ""
4552 }
4553 s || !n.isLocal || n.crossDomain ? s === 1223 && (s = 204) : s = h.text ? 200 : 404
4554 }
4555 h && u(s, c, h, f.getAllResponseHeaders())
4556 };
4557 n.async ? f.readyState === 4 ? setTimeout(t) : f.onreadystatechange = gt[o] = t : t()
4558 },
4559 abort: function() {
4560 t && t(undefined, !0)
4561 }
4562 }
4563 }
4564 }), i.ajaxSetup({
4565 accepts: {
4566 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
4567 },
4568 contents: {
4569 script: /(?:java|ecma)script/
4570 },
4571 converters: {
4572 "text script": function(n) {
4573 return i.globalEval(n), n
4574 }
4575 }
4576 }), i.ajaxPrefilter("script", function(n) {
4577 n.cache === undefined && (n.cache = !1);
4578 n.crossDomain && (n.type = "GET", n.global = !1)
4579 }), i.ajaxTransport("script", function(n) {
4580 if (n.crossDomain) {
4581 var t, r = u.head || i("head")[0] || u.documentElement;
4582 return {
4583 send: function(i, f) {
4584 t = u.createElement("script");
4585 t.async = !0;
4586 n.scriptCharset && (t.charset = n.scriptCharset);
4587 t.src = n.url;
4588 t.onload = t.onreadystatechange = function(n, i) {
4589 (i || !t.readyState || /loaded|complete/.test(t.readyState)) && (t.onload = t.onreadystatechange = null, t.parentNode && t.parentNode.removeChild(t), t = null, i || f(200, "success"))
4590 };
4591 r.insertBefore(t, r.firstChild)
4592 },
4593 abort: function() {
4594 if (t) t.onload(undefined, !0)
4595 }
4596 }
4597 }
4598 }), gi = [], ni = /(=)\?(?=&|$)|\?\?/, i.ajaxSetup({
4599 jsonp: "callback",
4600 jsonpCallback: function() {
4601 var n = gi.pop() || i.expando + "_" + pi++;
4602 return this[n] = !0, n
4603 }
4604 }), i.ajaxPrefilter("json jsonp", function(t, r, u) {
4605 var f, o, e, s = t.jsonp !== !1 && (ni.test(t.url) ? "url" : typeof t.data == "string" && !(t.contentType || "").indexOf("application/x-www-form-urlencoded") && ni.test(t.data) && "data");
4606 if (s || t.dataTypes[0] === "jsonp") return f = t.jsonpCallback = i.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, s ? t[s] = t[s].replace(ni, "$1" + f) : t.jsonp !== !1 && (t.url += (wi.test(t.url) ? "&" : "?") + t.jsonp + "=" + f), t.converters["script json"] = function() {
4607 return e || i.error(f + " was not called"), e[0]
4608 }, t.dataTypes[0] = "json", o = n[f], n[f] = function() {
4609 e = arguments
4610 }, u.always(function() {
4611 n[f] = o;
4612 t[f] && (t.jsonpCallback = r.jsonpCallback, gi.push(f));
4613 e && i.isFunction(o) && o(e[0]);
4614 e = o = undefined
4615 }), "script"
4616 }), i.parseHTML = function(n, t, r) {
4617 if (!n || typeof n != "string") return null;
4618 typeof t == "boolean" && (r = t, t = !1);
4619 t = t || u;
4620 var f = er.exec(n),
4621 e = !r && [];
4622 return f ? [t.createElement(f[1])] : (f = i.buildFragment([n], t, e), e && e.length && i(e).remove(), i.merge([], f.childNodes))
4623 }, nr = i.fn.load, i.fn.load = function(n, t, r) {
4624 if (typeof n != "string" && nr) return nr.apply(this, arguments);
4625 var u, o, s, f = this,
4626 e = n.indexOf(" ");
4627 return e >= 0 && (u = n.slice(e, n.length), n = n.slice(0, e)), i.isFunction(t) ? (r = t, t = undefined) : t && typeof t == "object" && (s = "POST"), f.length > 0 && i.ajax({
4628 url: n,
4629 type: s,
4630 dataType: "html",
4631 data: t
4632 }).done(function(n) {
4633 o = arguments;
4634 f.html(u ? i("<div>").append(i.parseHTML(n)).find(u) : n)
4635 }).complete(r && function(n, t) {
4636 f.each(r, o || [n.responseText, t, n])
4637 }), this
4638 }, i.expr.filters.animated = function(n) {
4639 return i.grep(i.timers, function(t) {
4640 return n === t.elem
4641 }).length
4642 }, tr = n.document.documentElement, i.offset = {
4643 setOffset: function(n, t, r) {
4644 var e, o, s, h, u, c, v, l = i.css(n, "position"),
4645 a = i(n),
4646 f = {};
4647 l === "static" && (n.style.position = "relative");
4648 u = a.offset();
4649 s = i.css(n, "top");
4650 c = i.css(n, "left");
4651 v = (l === "absolute" || l === "fixed") && i.inArray("auto", [s, c]) > -1;
4652 v ? (e = a.position(), h = e.top, o = e.left) : (h = parseFloat(s) || 0, o = parseFloat(c) || 0);
4653 i.isFunction(t) && (t = t.call(n, r, u));
4654 t.top != null && (f.top = t.top - u.top + h);
4655 t.left != null && (f.left = t.left - u.left + o);
4656 "using" in t ? t.using.call(n, f) : a.css(f)
4657 }
4658 }, i.fn.extend({
4659 offset: function(n) {
4660 if (arguments.length) return n === undefined ? this : this.each(function(t) {
4661 i.offset.setOffset(this, n, t)
4662 });
4663 var t, f, u = {
4664 top: 0,
4665 left: 0
4666 },
4667 r = this[0],
4668 e = r && r.ownerDocument;
4669 if (e) return (t = e.documentElement, !i.contains(t, r)) ? u : (typeof r.getBoundingClientRect !== o && (u = r.getBoundingClientRect()), f = bf(e), {
4670 top: u.top + (f.pageYOffset || t.scrollTop) - (t.clientTop || 0),
4671 left: u.left + (f.pageXOffset || t.scrollLeft) - (t.clientLeft || 0)
4672 })
4673 },
4674 position: function() {
4675 if (this[0]) {
4676 var n, r, t = {
4677 top: 0,
4678 left: 0
4679 },
4680 u = this[0];
4681 return i.css(u, "position") === "fixed" ? r = u.getBoundingClientRect() : (n = this.offsetParent(), r = this.offset(), i.nodeName(n[0], "html") || (t = n.offset()), t.top += i.css(n[0], "borderTopWidth", !0), t.left += i.css(n[0], "borderLeftWidth", !0)), {
4682 top: r.top - t.top - i.css(u, "marginTop", !0),
4683 left: r.left - t.left - i.css(u, "marginLeft", !0)
4684 }
4685 }
4686 },
4687 offsetParent: function() {
4688 return this.map(function() {
4689 for (var n = this.offsetParent || tr; n && !i.nodeName(n, "html") && i.css(n, "position") === "static";) n = n.offsetParent;
4690 return n || tr
4691 })
4692 }
4693 }), i.each({
4694 scrollLeft: "pageXOffset",
4695 scrollTop: "pageYOffset"
4696 }, function(n, t) {
4697 var r = /Y/.test(t);
4698 i.fn[n] = function(u) {
4699 return b(this, function(n, u, f) {
4700 var e = bf(n);
4701 if (f === undefined) return e ? t in e ? e[t] : e.document.documentElement[u] : n[u];
4702 e ? e.scrollTo(r ? i(e).scrollLeft() : f, r ? f : i(e).scrollTop()) : n[u] = f
4703 }, n, u, arguments.length, null)
4704 }
4705 }), i.each(["top", "left"], function(n, t) {
4706 i.cssHooks[t] = vu(r.pixelPosition, function(n, r) {
4707 if (r) return r = d(n, t), yt.test(r) ? i(n).position()[t] + "px" : r
4708 })
4709 }), i.each({
4710 Height: "height",
4711 Width: "width"
4712 }, function(n, t) {
4713 i.each({
4714 padding: "inner" + n,
4715 content: t,
4716 "": "outer" + n
4717 }, function(r, u) {
4718 i.fn[u] = function(u, f) {
4719 var e = arguments.length && (r || typeof u != "boolean"),
4720 o = r || (u === !0 || f === !0 ? "margin" : "border");
4721 return b(this, function(t, r, u) {
4722 var f;
4723 return i.isWindow(t) ? t.document.documentElement["client" + n] : t.nodeType === 9 ? (f = t.documentElement, Math.max(t.body["scroll" + n], f["scroll" + n], t.body["offset" + n], f["offset" + n], f["client" + n])) : u === undefined ? i.css(t, r, o) : i.style(t, r, u, o)
4724 }, t, e ? u : undefined, e, null)
4725 }
4726 })
4727 }), i.fn.size = function() {
4728 return this.length
4729 }, i.fn.andSelf = i.fn.addBack, typeof define == "function" && define.amd && define("jquery", [], function() {
4730 return i
4731 }), kf = n.jQuery, df = n.$, i.noConflict = function(t) {
4732 return n.$ === i && (n.$ = df), t && n.jQuery === i && (n.jQuery = kf), i
4733 }, typeof t === o && (n.jQuery = n.$ = i), i
4734 }), function() {
4735 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
4736 i = window.Crypto = {},
4737 r = i.util = {
4738 rotl: function(n, t) {
4739 return n << t | n >>> 32 - t
4740 },
4741 rotr: function(n, t) {
4742 return n << 32 - t | n >>> t
4743 },
4744 endian: function(n) {
4745 if (n.constructor == Number) return r.rotl(n, 8) & 16711935 | r.rotl(n, 24) & 4278255360;
4746 for (var t = 0; t < n.length; t++) n[t] = r.endian(n[t]);
4747 return n
4748 },
4749 randomBytes: function(n) {
4750 for (var t = []; n > 0; n--) t.push(Math.floor(Math.random() * 256));
4751 return t
4752 },
4753 bytesToWords: function(n) {
4754 for (var r = [], t = 0, i = 0; t < n.length; t++, i += 8) r[i >>> 5] |= n[t] << 24 - i % 32;
4755 return r
4756 },
4757 wordsToBytes: function(n) {
4758 for (var i = [], t = 0; t < n.length * 32; t += 8) i.push(n[t >>> 5] >>> 24 - t % 32 & 255);
4759 return i
4760 },
4761 bytesToHex: function(n) {
4762 for (var i = [], t = 0; t < n.length; t++) i.push((n[t] >>> 4).toString(16)), i.push((n[t] & 15).toString(16));
4763 return i.join("")
4764 },
4765 hexToBytes: function(n) {
4766 for (var i = [], t = 0; t < n.length; t += 2) i.push(parseInt(n.substr(t, 2), 16));
4767 return i
4768 },
4769 bytesToBase64: function(i) {
4770 var f, r, e, u;
4771 if (typeof btoa == "function") return btoa(n.bytesToString(i));
4772 for (f = [], r = 0; r < i.length; r += 3)
4773 for (e = i[r] << 16 | i[r + 1] << 8 | i[r + 2], u = 0; u < 4; u++) r * 8 + u * 6 <= i.length * 8 ? f.push(t.charAt(e >>> 6 * (3 - u) & 63)) : f.push("=");
4774 return f.join("")
4775 },
4776 base64ToBytes: function(i) {
4777 if (typeof atob == "function") return n.stringToBytes(atob(i));
4778 i = i.replace(/[^A-Z0-9+\/]/ig, "");
4779 for (var f = [], u = 0, r = 0; u < i.length; r = ++u % 4) r != 0 && f.push((t.indexOf(i.charAt(u - 1)) & Math.pow(2, -2 * r + 8) - 1) << r * 2 | t.indexOf(i.charAt(u)) >>> 6 - r * 2);
4780 return f
4781 }
4782 };
4783 i.mode = {};
4784 var u = i.charenc = {},
4785 f = u.UTF8 = {
4786 stringToBytes: function(t) {
4787 return n.stringToBytes(unescape(encodeURIComponent(t)))
4788 },
4789 bytesToString: function(t) {
4790 return decodeURIComponent(escape(n.bytesToString(t)))
4791 }
4792 },
4793 n = u.Binary = {
4794 stringToBytes: function(n) {
4795 for (var i = [], t = 0; t < n.length; t++) i.push(n.charCodeAt(t));
4796 return i
4797 },
4798 bytesToString: function(n) {
4799 for (var i = [], t = 0; t < n.length; t++) i.push(String.fromCharCode(n[t]));
4800 return i.join("")
4801 }
4802 }
4803 }(), function() {
4804 var t = Crypto,
4805 i = t.util,
4806 r = t.charenc,
4807 u = r.UTF8,
4808 f = r.Binary,
4809 e = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298],
4810 n = t.SHA256 = function(t, r) {
4811 var u = i.wordsToBytes(n._sha256(t));
4812 return r && r.asBytes ? u : r && r.asString ? f.bytesToString(u) : i.bytesToHex(u)
4813 };
4814 n._sha256 = function(n) {
4815 var d, r;
4816 n.constructor == String && (n = u.stringToBytes(n));
4817 var p = i.bytesToWords(n),
4818 w = n.length * 8,
4819 t = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225],
4820 s = [],
4821 f, h, c, b, o, l, a, k, d, r, g, nt;
4822 for (p[w >> 5] |= 128 << 24 - w % 32, p[(w + 64 >> 9 << 4) + 15] = w, d = 0; d < p.length; d += 16) {
4823 for (f = t[0], h = t[1], c = t[2], b = t[3], o = t[4], l = t[5], a = t[6], k = t[7], r = 0; r < 64; r++) {
4824 if (r < 16) s[r] = p[r + d];
4825 else {
4826 var v = s[r - 15],
4827 y = s[r - 2],
4828 tt = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3,
4829 it = (y << 15 | y >>> 17) ^ (y << 13 | y >>> 19) ^ y >>> 10;
4830 s[r] = tt + (s[r - 7] >>> 0) + it + (s[r - 16] >>> 0)
4831 }
4832 var rt = o & l ^ ~o & a,
4833 ut = f & h ^ f & c ^ h & c,
4834 ft = (f << 30 | f >>> 2) ^ (f << 19 | f >>> 13) ^ (f << 10 | f >>> 22),
4835 et = (o << 26 | o >>> 6) ^ (o << 21 | o >>> 11) ^ (o << 7 | o >>> 25);
4836 g = (k >>> 0) + et + rt + e[r] + (s[r] >>> 0);
4837 nt = ft + ut;
4838 k = a;
4839 a = l;
4840 l = o;
4841 o = b + g >>> 0;
4842 b = c;
4843 c = h;
4844 h = f;
4845 f = g + nt >>> 0
4846 }
4847 t[0] += f;
4848 t[1] += h;
4849 t[2] += c;
4850 t[3] += b;
4851 t[4] += o;
4852 t[5] += l;
4853 t[6] += a;
4854 t[7] += k
4855 }
4856 return t
4857 };
4858 n._blocksize = 16;
4859 n._digestsize = 32
4860 }(), function() {
4861 function e(n, t, i, r) {
4862 return 0 <= n && n <= 15 ? t ^ i ^ r : 16 <= n && n <= 31 ? t & i | ~t & r : 32 <= n && n <= 47 ? (t | ~i) ^ r : 48 <= n && n <= 63 ? t & r | i & ~r : 64 <= n && n <= 79 ? t ^ (i | ~r) : "rmd160_f: j out of range"
4863 }
4864
4865 function h(n) {
4866 return 0 <= n && n <= 15 ? 0 : 16 <= n && n <= 31 ? 1518500249 : 32 <= n && n <= 47 ? 1859775393 : 48 <= n && n <= 63 ? 2400959708 : 64 <= n && n <= 79 ? 2840853838 : "rmd160_K1: j out of range"
4867 }
4868
4869 function c(n) {
4870 return 0 <= n && n <= 15 ? 1352829926 : 16 <= n && n <= 31 ? 1548603684 : 32 <= n && n <= 47 ? 1836072691 : 48 <= n && n <= 63 ? 2053994217 : 64 <= n && n <= 79 ? 0 : "rmd160_K2: j out of range"
4871 }
4872
4873 function n(n, t) {
4874 var i = (n & 65535) + (t & 65535),
4875 r = (n >> 16) + (t >> 16) + (i >> 16);
4876 return r << 16 | i & 65535
4877 }
4878
4879 function i(n, t) {
4880 return n << t | n >>> 32 - t
4881 }
4882 var r = Crypto,
4883 t = r.util,
4884 f = r.charenc,
4885 o = f.UTF8,
4886 s = f.Binary,
4887 u;
4888 t.bytesToLWords = function(n) {
4889 for (var i = Array(n.length >> 2), t = 0; t < i.length; t++) i[t] = 0;
4890 for (t = 0; t < n.length * 8; t += 8) i[t >> 5] |= (n[t / 8] & 255) << t % 32;
4891 return i
4892 };
4893 t.lWordsToBytes = function(n) {
4894 for (var i = [], t = 0; t < n.length * 32; t += 8) i.push(n[t >> 5] >>> t % 32 & 255);
4895 return i
4896 };
4897 u = r.RIPEMD160 = function(n, i) {
4898 var r = t.lWordsToBytes(u._rmd160(n));
4899 return i && i.asBytes ? r : i && i.asString ? s.bytesToString(r) : t.bytesToHex(r)
4900 };
4901 u._rmd160 = function(r) {
4902 var s, p, nt, f;
4903 r.constructor == String && (r = o.stringToBytes(r));
4904 s = t.bytesToLWords(r);
4905 p = r.length * 8;
4906 s[p >> 5] |= 128 << p % 32;
4907 s[(p + 64 >>> 9 << 4) + 14] = p;
4908 var w = 1732584193,
4909 b = 4023233417,
4910 k = 2562383102,
4911 d = 271733878,
4912 g = 3285377520;
4913 for (nt = 0; nt < s.length; nt += 16) {
4914 var u, ht = w,
4915 tt = b,
4916 it = k,
4917 rt = d,
4918 ut = g,
4919 ct = w,
4920 ft = b,
4921 et = k,
4922 ot = d,
4923 st = g;
4924 for (f = 0; f <= 79; ++f) u = n(ht, e(f, tt, it, rt)), u = n(u, s[nt + l[f]]), u = n(u, h(f)), u = n(i(u, v[f]), ut), ht = ut, ut = rt, rt = i(it, 10), it = tt, tt = u, u = n(ct, e(79 - f, ft, et, ot)), u = n(u, s[nt + a[f]]), u = n(u, c(f)), u = n(i(u, y[f]), st), ct = st, st = ot, ot = i(et, 10), et = ft, ft = u;
4925 u = n(b, n(it, ot));
4926 b = n(k, n(rt, st));
4927 k = n(d, n(ut, ct));
4928 d = n(g, n(ht, ft));
4929 g = n(w, n(tt, et));
4930 w = u
4931 }
4932 return [w, b, k, d, g]
4933 };
4934 var l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13],
4935 a = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11],
4936 v = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6],
4937 y = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]
4938 }(), function() {
4939 var n = Crypto,
4940 r = n.util,
4941 t = n.charenc,
4942 i = t.UTF8,
4943 u = t.Binary;
4944 n.HMAC = function(n, t, f, e) {
4945 var h, c, o, s;
4946 for (t.constructor == String && (t = i.stringToBytes(t)), f.constructor == String && (f = i.stringToBytes(f)), f.length > n._blocksize * 4 && (f = n(f, {
4947 asBytes: !0
4948 })), h = f.slice(0), c = f.slice(0), o = 0; o < n._blocksize * 4; o++) h[o] ^= 92, c[o] ^= 54;
4949 return s = n(h.concat(n(c.concat(t), {
4950 asBytes: !0
4951 })), {
4952 asBytes: !0
4953 }), e && e.asBytes ? s : e && e.asString ? u.bytesToString(s) : r.bytesToHex(s)
4954 }
4955 }(), function() {
4956 var n = Crypto,
4957 t = n.util,
4958 i = n.charenc,
4959 r = i.UTF8,
4960 u = i.Binary;
4961 n.nextTick || (typeof process != "undefined" && typeof process.nextTick != "undefined" ? n.nextTick = process.nextTick : typeof setTimeout != "undefined" && (n.nextTick = function(n) {
4962 setTimeout(n, 0)
4963 }));
4964 n.PBKDF2Async = function(i, f, e, o, s) {
4965 function y(n) {
4966 if (v) {
4967 var t = h.length / a._digestsize * c + n;
4968 setTimeout(function() {
4969 v(Math.round(t / d * 100))
4970 }, 0)
4971 }
4972 }
4973
4974 function p(t, i) {
4975 return n.HMAC(a, i, t, {
4976 asBytes: !0
4977 })
4978 }
4979 i.constructor == String && (i = r.stringToBytes(i));
4980 f.constructor == String && (f = r.stringToBytes(f));
4981 var a = s && s.hasher || n.SHA1,
4982 c = s && s.iterations || 1,
4983 v = s && s.onProgressChange,
4984 d = Math.ceil(e / a._digestsize) * c;
4985 var l = n.nextTick,
4986 h = [],
4987 w = 1,
4988 b, k;
4989 l(b = function() {
4990 var n, a, r;
4991 h.length < e ? (n = p(i, f.concat(t.wordsToBytes([w]))), y(1), a = n, r = 1, l(k = function() {
4992 var u = 0,
4993 t;
4994 if (r < c) {
4995 while (r < c && u < 10) {
4996 for (a = p(i, a), t = 0; t < n.length; t++) n[t] ^= a[t];
4997 r++;
4998 u++
4999 }
5000 y(r);
5001 l(k)
5002 } else h = h.concat(n), w++, l(b)
5003 })) : (h.length = e, o(s && s.asBytes ? h : s && s.asString ? u.bytesToString(h) : t.bytesToHex(h)))
5004 })
5005 }
5006 }(), function(n) {
5007 function e(n, t) {
5008 var i = n._blocksize * 4;
5009 return i - t.length % i
5010 }
5011 var i = n.pad = {},
5012 h = function(n, t, i, r) {
5013 var u = t.pop(),
5014 o, f, e;
5015 if (u == 0) throw new Error("Invalid zero-length padding specified for " + i + ". Wrong cipher specification or key used?");
5016 if (o = n._blocksize * 4, u > o) throw new Error("Invalid padding length of " + u + " specified for " + i + ". Wrong cipher specification or key used?");
5017 for (f = 1; f < u; f++)
5018 if (e = t.pop(), r != undefined && r != e) throw new Error("Invalid padding byte of 0x" + e.toString(16) + " specified for " + i + ". Wrong cipher specification or key used?");
5019 },
5020 r, t, l, o, a, c, v, s, y, u, p, f;
5021 i.NoPadding = {
5022 pad: function() {},
5023 unpad: function() {}
5024 };
5025 i.ZeroPadding = {
5026 pad: function(n, t) {
5027 var r = n._blocksize * 4,
5028 i = t.length % r;
5029 if (i != 0)
5030 for (i = r - i; i > 0; i--) t.push(0)
5031 },
5032 unpad: function(n, t) {
5033 while (t[t.length - 1] == 0) t.pop()
5034 }
5035 };
5036 i.iso7816 = {
5037 pad: function(n, t) {
5038 var i = e(n, t);
5039 for (t.push(128); i > 1; i--) t.push(0)
5040 },
5041 unpad: function(n, t) {
5042 for (var i, r = n._blocksize * 4; r > 0; r--) {
5043 if (i = t.pop(), i == 128) return;
5044 if (i != 0) throw new Error("ISO-7816 padding byte must be 0, not 0x" + i.toString(16) + ". Wrong cipher specification or key used?");
5045 }
5046 throw new Error("ISO-7816 padded beyond cipher block size. Wrong cipher specification or key used?");
5047 }
5048 };
5049 i.ansix923 = {
5050 pad: function(n, t) {
5051 for (var i = e(n, t), r = 1; r < i; r++) t.push(0);
5052 t.push(i)
5053 },
5054 unpad: function(n, t) {
5055 h(n, t, "ANSI X.923", 0)
5056 }
5057 };
5058 i.iso10126 = {
5059 pad: function(n, t) {
5060 for (var i = e(n, t), r = 1; r < i; r++) t.push(Math.floor(Math.random() * 256));
5061 t.push(i)
5062 },
5063 unpad: function(n, t) {
5064 h(n, t, "ISO 10126", undefined)
5065 }
5066 };
5067 i.pkcs7 = {
5068 pad: function(n, t) {
5069 for (var i = e(n, t), r = 0; r < i; r++) t.push(i)
5070 },
5071 unpad: function(n, t) {
5072 h(n, t, "PKCS 7", t[t.length - 1])
5073 }
5074 };
5075 r = n.mode = {};
5076 t = r.Mode = function(n) {
5077 n && (this._padding = n)
5078 };
5079 t.prototype = {
5080 encrypt: function(n, t, i) {
5081 this._padding.pad(n, t);
5082 this._doEncrypt(n, t, i)
5083 },
5084 decrypt: function(n, t, i) {
5085 this._doDecrypt(n, t, i);
5086 this._padding.unpad(n, t)
5087 },
5088 _padding: i.iso7816
5089 };
5090 l = r.ECB = function() {
5091 t.apply(this, arguments)
5092 };
5093 o = l.prototype = new t;
5094 o._doEncrypt = function(n, t) {
5095 for (var r = n._blocksize * 4, i = 0; i < t.length; i += r) n._encryptblock(t, i)
5096 };
5097 o._doDecrypt = function(n, t) {
5098 for (var r = n._blocksize * 4, i = 0; i < t.length; i += r) n._decryptblock(t, i)
5099 };
5100 o.fixOptions = function(n) {
5101 n.iv = []
5102 };
5103 a = r.CBC = function() {
5104 t.apply(this, arguments)
5105 };
5106 c = a.prototype = new t;
5107 c._doEncrypt = function(n, t, i) {
5108 for (var r, f = n._blocksize * 4, u = 0; u < t.length; u += f) {
5109 if (u == 0)
5110 for (r = 0; r < f; r++) t[r] ^= i[r];
5111 else
5112 for (r = 0; r < f; r++) t[u + r] ^= t[u + r - f];
5113 n._encryptblock(t, u)
5114 }
5115 };
5116 c._doDecrypt = function(n, t, i) {
5117 for (var o, u, f = n._blocksize * 4, e = i, r = 0; r < t.length; r += f) {
5118 for (o = t.slice(r, r + f), n._decryptblock(t, r), u = 0; u < f; u++) t[r + u] ^= e[u];
5119 e = o
5120 }
5121 };
5122 v = r.CFB = function() {
5123 t.apply(this, arguments)
5124 };
5125 s = v.prototype = new t;
5126 s._padding = i.NoPadding;
5127 s._doEncrypt = function(n, t, i) {
5128 for (var u, e = n._blocksize * 4, f = i.slice(0), r = 0; r < t.length; r++) u = r % e, u == 0 && n._encryptblock(f, 0), t[r] ^= f[u], f[u] = t[r]
5129 };
5130 s._doDecrypt = function(n, t, i) {
5131 for (var u, e, o = n._blocksize * 4, f = i.slice(0), r = 0; r < t.length; r++) u = r % o, u == 0 && n._encryptblock(f, 0), e = t[r], t[r] ^= f[u], f[u] = e
5132 };
5133 y = r.OFB = function() {
5134 t.apply(this, arguments)
5135 };
5136 u = y.prototype = new t;
5137 u._padding = i.NoPadding;
5138 u._doEncrypt = function(n, t, i) {
5139 for (var u = n._blocksize * 4, f = i.slice(0), r = 0; r < t.length; r++) r % u == 0 && n._encryptblock(f, 0), t[r] ^= f[r % u]
5140 };
5141 u._doDecrypt = u._doEncrypt;
5142 p = r.CTR = function() {
5143 t.apply(this, arguments)
5144 };
5145 f = p.prototype = new t;
5146 f._padding = i.NoPadding;
5147 f._doEncrypt = function(n, t, i) {
5148 for (var o, e, r = n._blocksize * 4, u = i.slice(0), f = 0; f < t.length;) {
5149 for (o = u.slice(0), n._encryptblock(o, 0), e = 0; f < t.length && e < r; e++, f++) t[f] ^= o[e];
5150 ++u[r - 1] == 256 && (u[r - 1] = 0, ++u[r - 2] == 256 && (u[r - 2] = 0, ++u[r - 3] == 256 && (u[r - 3] = 0, ++u[r - 4])))
5151 }
5152 };
5153 f._doDecrypt = f._doEncrypt
5154 }(Crypto), function() {
5155 function s(n, t) {
5156 for (var u, i = 0, r = 0; r < 8; r++) t & 1 && (i ^= n), u = n & 128, n = n << 1 & 255, u && (n ^= 27), t >>>= 1;
5157 return i
5158 }
5159 for (var e = Crypto, p = e.util, k = e.charenc, b = k.UTF8, f = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22], w = [], t = 0; t < 256; t++) w[f[t]] = t;
5160 var h = [],
5161 c = [],
5162 l = [],
5163 a = [],
5164 v = [],
5165 y = [];
5166 for (t = 0; t < 256; t++) h[t] = s(t, 2), c[t] = s(t, 3), l[t] = s(t, 9), a[t] = s(t, 11), v[t] = s(t, 13), y[t] = s(t, 14);
5167 var d = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],
5168 n = [
5169 [],
5170 [],
5171 [],
5172 []
5173 ],
5174 r, o, i, u = e.AES = {
5175 encrypt: function(n, t, i) {
5176 var f;
5177 i = i || {};
5178 f = i.mode || new e.mode.OFB;
5179 f.fixOptions && f.fixOptions(i);
5180 var r = n.constructor == String ? b.stringToBytes(n) : n,
5181 o = i.iv || p.randomBytes(u._blocksize * 4),
5182 s = t.constructor == String ? e.PBKDF2(t, o, 32, {
5183 asBytes: !0
5184 }) : t;
5185 return u._init(s), f.encrypt(u, r, o), r = i.iv ? r : o.concat(r), i && i.asBytes ? r : p.bytesToBase64(r)
5186 },
5187 decrypt: function(n, t, i) {
5188 var r;
5189 i = i || {};
5190 r = i.mode || new e.mode.OFB;
5191 r.fixOptions && r.fixOptions(i);
5192 var f = n.constructor == String ? p.base64ToBytes(n) : n,
5193 o = i.iv || f.splice(0, u._blocksize * 4),
5194 s = t.constructor == String ? e.PBKDF2(t, o, 32, {
5195 asBytes: !0
5196 }) : t;
5197 return u._init(s), r.decrypt(u, f, o), i && i.asBytes ? f : b.bytesToString(f)
5198 },
5199 _blocksize: 4,
5200 _encryptblock: function(t, r) {
5201 for (var l, e, s = 0; s < u._blocksize; s++)
5202 for (e = 0; e < 4; e++) n[s][e] = t[r + e * 4 + s];
5203 for (s = 0; s < 4; s++)
5204 for (e = 0; e < 4; e++) n[s][e] ^= i[e][s];
5205 for (l = 1; l < o; l++) {
5206 for (s = 0; s < 4; s++)
5207 for (e = 0; e < 4; e++) n[s][e] = f[n[s][e]];
5208 for (n[1].push(n[1].shift()), n[2].push(n[2].shift()), n[2].push(n[2].shift()), n[3].unshift(n[3].pop()), e = 0; e < 4; e++) {
5209 var a = n[0][e],
5210 v = n[1][e],
5211 y = n[2][e],
5212 p = n[3][e];
5213 n[0][e] = h[a] ^ c[v] ^ y ^ p;
5214 n[1][e] = a ^ h[v] ^ c[y] ^ p;
5215 n[2][e] = a ^ v ^ h[y] ^ c[p];
5216 n[3][e] = c[a] ^ v ^ y ^ h[p]
5217 }
5218 for (s = 0; s < 4; s++)
5219 for (e = 0; e < 4; e++) n[s][e] ^= i[l * 4 + e][s]
5220 }
5221 for (s = 0; s < 4; s++)
5222 for (e = 0; e < 4; e++) n[s][e] = f[n[s][e]];
5223 for (n[1].push(n[1].shift()), n[2].push(n[2].shift()), n[2].push(n[2].shift()), n[3].unshift(n[3].pop()), s = 0; s < 4; s++)
5224 for (e = 0; e < 4; e++) n[s][e] ^= i[o * 4 + e][s];
5225 for (s = 0; s < u._blocksize; s++)
5226 for (e = 0; e < 4; e++) t[r + e * 4 + s] = n[s][e]
5227 },
5228 _decryptblock: function(t, r) {
5229 for (var s, f, e = 0; e < u._blocksize; e++)
5230 for (f = 0; f < 4; f++) n[e][f] = t[r + f * 4 + e];
5231 for (e = 0; e < 4; e++)
5232 for (f = 0; f < 4; f++) n[e][f] ^= i[o * 4 + f][e];
5233 for (s = 1; s < o; s++) {
5234 for (n[1].unshift(n[1].pop()), n[2].push(n[2].shift()), n[2].push(n[2].shift()), n[3].push(n[3].shift()), e = 0; e < 4; e++)
5235 for (f = 0; f < 4; f++) n[e][f] = w[n[e][f]];
5236 for (e = 0; e < 4; e++)
5237 for (f = 0; f < 4; f++) n[e][f] ^= i[(o - s) * 4 + f][e];
5238 for (f = 0; f < 4; f++) {
5239 var h = n[0][f],
5240 c = n[1][f],
5241 p = n[2][f],
5242 b = n[3][f];
5243 n[0][f] = y[h] ^ a[c] ^ v[p] ^ l[b];
5244 n[1][f] = l[h] ^ y[c] ^ a[p] ^ v[b];
5245 n[2][f] = v[h] ^ l[c] ^ y[p] ^ a[b];
5246 n[3][f] = a[h] ^ v[c] ^ l[p] ^ y[b]
5247 }
5248 }
5249 for (n[1].unshift(n[1].pop()), n[2].push(n[2].shift()), n[2].push(n[2].shift()), n[3].push(n[3].shift()), e = 0; e < 4; e++)
5250 for (f = 0; f < 4; f++) n[e][f] = w[n[e][f]];
5251 for (e = 0; e < 4; e++)
5252 for (f = 0; f < 4; f++) n[e][f] ^= i[f][e];
5253 for (e = 0; e < u._blocksize; e++)
5254 for (f = 0; f < 4; f++) t[r + f * 4 + e] = n[e][f]
5255 },
5256 _init: function(n) {
5257 r = n.length / 4;
5258 o = r + 6;
5259 u._keyexpansion(n)
5260 },
5261 _keyexpansion: function(n) {
5262 var e, t;
5263 for (i = [], e = 0; e < r; e++) i[e] = [n[e * 4], n[e * 4 + 1], n[e * 4 + 2], n[e * 4 + 3]];
5264 for (e = r; e < u._blocksize * (o + 1); e++) t = [i[e - 1][0], i[e - 1][1], i[e - 1][2], i[e - 1][3]], e % r == 0 ? (t.push(t.shift()), t[0] = f[t[0]], t[1] = f[t[1]], t[2] = f[t[2]], t[3] = f[t[3]], t[0] ^= d[e / r]) : r > 6 && e % r == 4 && (t[0] = f[t[0]], t[1] = f[t[1]], t[2] = f[t[2]], t[3] = f[t[3]]), i[e] = [i[e - r][0] ^ t[0], i[e - r][1] ^ t[1], i[e - r][2] ^ t[2], i[e - r][3] ^ t[3]]
5265 }
5266 }
5267 }(), Arcfour.prototype.init = ARC4init, Arcfour.prototype.next = ARC4next, rng_psize = 256, secure_browser = !1, rng_pool == null) {
5268 if (rng_pool = [], rng_pptr = 0, windowCrypto = window.crypto || window.msCrypto, windowCrypto && windowCrypto.getRandomValues) {
5269 for (z = new Uint32Array(256), windowCrypto.getRandomValues(z), t = 0; t < z.length; ++t) rng_pool[rng_pptr++] = z[t] & 255;
5270 secure_browser = !0
5271 }
5272 onMouseMoveListener = function(n) {
5273 if (this.count = this.count || 0, this.count >= 256 || rng_pptr >= rng_psize) {
5274 window.removeEventListener("mousemove", onMouseMoveListener);
5275 return
5276 }
5277 this.count += 1;
5278 var t = n.x + n.y;
5279 rng_pool[rng_pptr++] = t & 255
5280 };
5281 window.addEventListener("mousemove", onMouseMoveListener)
5282}
5283for (SecureRandom.prototype.nextBytes = rng_get_bytes, canary = 0xdeadbeefcafe, j_lm = (canary & 16777215) == 15715070, j_lm && navigator.appName == "Microsoft Internet Explorer" ? (BigInteger.prototype.am = am2, dbits = 30) : j_lm && navigator.appName != "Netscape" ? (BigInteger.prototype.am = am1, dbits = 26) : (BigInteger.prototype.am = am3, dbits = 28), BigInteger.prototype.DB = dbits, BigInteger.prototype.DM = (1 << dbits) - 1, BigInteger.prototype.DV = 1 << dbits, BI_FP = 52, BigInteger.prototype.FV = Math.pow(2, BI_FP), BigInteger.prototype.F1 = BI_FP - dbits, BigInteger.prototype.F2 = 2 * dbits - BI_FP, BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz", BI_RC = [], rr = "0".charCodeAt(0), vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
5284for (rr = "a".charCodeAt(0), vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
5285for (rr = "A".charCodeAt(0), vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
5286for (Classic.prototype.convert = cConvert, Classic.prototype.revert = cRevert, Classic.prototype.reduce = cReduce, Classic.prototype.mulTo = cMulTo, Classic.prototype.sqrTo = cSqrTo, Montgomery.prototype.convert = montConvert, Montgomery.prototype.revert = montRevert, Montgomery.prototype.reduce = montReduce, Montgomery.prototype.mulTo = montMulTo, Montgomery.prototype.sqrTo = montSqrTo, BigInteger.prototype.copyTo = bnpCopyTo, BigInteger.prototype.fromInt = bnpFromInt, BigInteger.prototype.fromString = bnpFromString, BigInteger.prototype.clamp = bnpClamp, BigInteger.prototype.dlShiftTo = bnpDLShiftTo, BigInteger.prototype.drShiftTo = bnpDRShiftTo, BigInteger.prototype.lShiftTo = bnpLShiftTo, BigInteger.prototype.rShiftTo = bnpRShiftTo, BigInteger.prototype.subTo = bnpSubTo, BigInteger.prototype.multiplyTo = bnpMultiplyTo, BigInteger.prototype.squareTo = bnpSquareTo, BigInteger.prototype.divRemTo = bnpDivRemTo, BigInteger.prototype.invDigit = bnpInvDigit, BigInteger.prototype.isEven = bnpIsEven, BigInteger.prototype.exp = bnpExp, BigInteger.prototype.toString = bnToString, BigInteger.prototype.negate = bnNegate, BigInteger.prototype.abs = bnAbs, BigInteger.prototype.compareTo = bnCompareTo, BigInteger.prototype.bitLength = bnBitLength, BigInteger.prototype.mod = bnMod, BigInteger.prototype.modPowInt = bnModPowInt, BigInteger.ZERO = nbv(0), BigInteger.ONE = nbv(1), NullExp.prototype.convert = nNop, NullExp.prototype.revert = nNop, NullExp.prototype.mulTo = nMulTo, NullExp.prototype.sqrTo = nSqrTo, Barrett.prototype.convert = barrettConvert, Barrett.prototype.revert = barrettRevert, Barrett.prototype.reduce = barrettReduce, Barrett.prototype.mulTo = barrettMulTo, Barrett.prototype.sqrTo = barrettSqrTo, lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], lplim = 67108864 / lowprimes[lowprimes.length - 1], BigInteger.prototype.chunkSize = bnpChunkSize, BigInteger.prototype.toRadix = bnpToRadix, BigInteger.prototype.fromRadix = bnpFromRadix, BigInteger.prototype.fromNumber = bnpFromNumber, BigInteger.prototype.bitwiseTo = bnpBitwiseTo, BigInteger.prototype.changeBit = bnpChangeBit, BigInteger.prototype.addTo = bnpAddTo, BigInteger.prototype.dMultiply = bnpDMultiply, BigInteger.prototype.dAddOffset = bnpDAddOffset, BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo, BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo, BigInteger.prototype.modInt = bnpModInt, BigInteger.prototype.millerRabin = bnpMillerRabin, BigInteger.prototype.clone = bnClone, BigInteger.prototype.intValue = bnIntValue, BigInteger.prototype.byteValue = bnByteValue, BigInteger.prototype.shortValue = bnShortValue, BigInteger.prototype.signum = bnSigNum, BigInteger.prototype.toByteArray = bnToByteArray, BigInteger.prototype.equals = bnEquals, BigInteger.prototype.min = bnMin, BigInteger.prototype.max = bnMax, BigInteger.prototype.and = bnAnd, BigInteger.prototype.or = bnOr, BigInteger.prototype.xor = bnXor, BigInteger.prototype.andNot = bnAndNot, BigInteger.prototype.not = bnNot, BigInteger.prototype.shiftLeft = bnShiftLeft, BigInteger.prototype.shiftRight = bnShiftRight, BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit, BigInteger.prototype.bitCount = bnBitCount, BigInteger.prototype.testBit = bnTestBit, BigInteger.prototype.setBit = bnSetBit, BigInteger.prototype.clearBit = bnClearBit, BigInteger.prototype.flipBit = bnFlipBit, BigInteger.prototype.add = bnAdd, BigInteger.prototype.subtract = bnSubtract, BigInteger.prototype.multiply = bnMultiply, BigInteger.prototype.divide = bnDivide, BigInteger.prototype.remainder = bnRemainder, BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder, BigInteger.prototype.modPow = bnModPow, BigInteger.prototype.modInverse = bnModInverse, BigInteger.prototype.pow = bnPow, BigInteger.prototype.gcd = bnGCD, BigInteger.prototype.isProbablePrime = bnIsProbablePrime, BigInteger.prototype.square = bnSquare, ECFieldElementFp.prototype.equals = feFpEquals, ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger, ECFieldElementFp.prototype.negate = feFpNegate, ECFieldElementFp.prototype.add = feFpAdd, ECFieldElementFp.prototype.subtract = feFpSubtract, ECFieldElementFp.prototype.multiply = feFpMultiply, ECFieldElementFp.prototype.square = feFpSquare, ECFieldElementFp.prototype.divide = feFpDivide, ECPointFp.prototype.getX = pointFpGetX, ECPointFp.prototype.getY = pointFpGetY, ECPointFp.prototype.equals = pointFpEquals, ECPointFp.prototype.isInfinity = pointFpIsInfinity, ECPointFp.prototype.negate = pointFpNegate, ECPointFp.prototype.add = pointFpAdd, ECPointFp.prototype.twice = pointFpTwice, ECPointFp.prototype.multiply = pointFpMultiply, ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo, ECCurveFp.prototype.getQ = curveFpGetQ, ECCurveFp.prototype.getA = curveFpGetA, ECCurveFp.prototype.getB = curveFpGetB, ECCurveFp.prototype.equals = curveFpEquals, ECCurveFp.prototype.getInfinity = curveFpGetInfinity, ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger, ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex, X9ECParameters.prototype.getCurve = x9getCurve, X9ECParameters.prototype.getG = x9getG, X9ECParameters.prototype.getN = x9getN, X9ECParameters.prototype.getH = x9getH, EventEmitter = function() {}, EventEmitter.prototype.on = function(n, t, i) {
5287 i || (i = this);
5288 this._listeners || (this._listeners = {});
5289 this._listeners[n] || (this._listeners[n] = []);
5290 this._unbinders || (this._unbinders = {});
5291 this._unbinders[n] || (this._unbinders[n] = []);
5292 var r = function(n) {
5293 t.apply(i, [n])
5294 };
5295 this._unbinders[n].push(t);
5296 this._listeners[n].push(r)
5297 }, EventEmitter.prototype.trigger = function(n, t) {
5298 if (t === undefined && (t = {}), this._listeners || (this._listeners = {}), this._listeners[n])
5299 for (var i = this._listeners[n].length; i--;) this._listeners[n][i](t)
5300 }, EventEmitter.prototype.removeListener = function(n, t) {
5301 if (this._unbinders || (this._unbinders = {}), this._unbinders[n])
5302 for (var i = this._unbinders[n].length; i--;) this._unbinders[n][i] === t && (this._unbinders[n].splice(i, 1), this._listeners[n].splice(i, 1))
5303 }, EventEmitter.augment = function(n) {
5304 for (var t in EventEmitter.prototype) n[t] || (n[t] = EventEmitter.prototype[t])
5305 }, function(n) {
5306 var t = n;
5307 "object" != typeof module && (t.EventEmitter = EventEmitter)
5308 }("object" == typeof module ? module.exports : window.Bitcoin = {}), BigInteger.valueOf = nbv, BigInteger.prototype.toByteArrayUnsigned = function() {
5309 var n = this.abs().toByteArray();
5310 return n.length ? (n[0] == 0 && (n = n.slice(1)), n.map(function(n) {
5311 return n < 0 ? n + 256 : n
5312 })) : n
5313 }, BigInteger.fromByteArrayUnsigned = function(n) {
5314 return n.length ? n[0] & 128 ? new BigInteger([0].concat(n)) : new BigInteger(n) : n.valueOf(0)
5315 }, BigInteger.prototype.toByteArraySigned = function() {
5316 var n = this.abs().toByteArrayUnsigned(),
5317 t = this.compareTo(BigInteger.ZERO) < 0;
5318 return t ? n[0] & 128 ? n.unshift(128) : n[0] |= 128 : n[0] & 128 && n.unshift(0), n
5319 }, BigInteger.fromByteArraySigned = function(n) {
5320 return n[0] & 128 ? (n[0] &= 127, BigInteger.fromByteArrayUnsigned(n).negate()) : BigInteger.fromByteArrayUnsigned(n)
5321 }, names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"], "undefined" == typeof console && (window.console = {}), i = 0; i < names.length; ++i) "undefined" == typeof window.console[names[i]] && (window.console[names[i]] = function() {});
5322Bitcoin.Util = {
5323 isArray: Array.isArray || function(n) {
5324 return Object.prototype.toString.call(n) === "[object Array]"
5325 },
5326 makeFilledArray: function(n, t) {
5327 for (var i = [], r = 0; r < n;) i[r++] = t;
5328 return i
5329 },
5330 numToVarInt: function(n) {
5331 return n < 253 ? [n] : n <= 65536 ? [253, n >>> 8, n & 255] : n <= 1 ? [254].concat(Crypto.util.wordsToBytes([n])) : [255].concat(Crypto.util.wordsToBytes([n >>> 32, n]))
5332 },
5333 valueToBigInt: function(n) {
5334 return n instanceof BigInteger ? n : BigInteger.fromByteArrayUnsigned(n)
5335 },
5336 formatValue: function(n) {
5337 for (var i = this.valueToBigInt(n).toString(), r = i.length > 8 ? i.substr(0, i.length - 8) : "0", t = i.length > 8 ? i.substr(i.length - 8) : i; t.length < 8;) t = "0" + t;
5338 for (t = t.replace(/0*$/, ""); t.length < 2;) t += "0";
5339 return r + "." + t
5340 },
5341 parseValue: function(n) {
5342 for (var r = n.split("."), u = r[0], t = r[1] || "0", i; t.length < 8;) t += "0";
5343 return t = t.replace(/^0+/g, ""), i = BigInteger.valueOf(parseInt(u)), i = i.multiply(BigInteger.valueOf(1e8)), i.add(BigInteger.valueOf(parseInt(t)))
5344 },
5345 sha256ripe160: function(n) {
5346 return Crypto.RIPEMD160(Crypto.SHA256(n, {
5347 asBytes: !0
5348 }), {
5349 asBytes: !0
5350 })
5351 }
5352};
5353for (i in Crypto.util) Crypto.util.hasOwnProperty(i) && (Bitcoin.Util[i] = Crypto.util[i]);
5354if (function(n) {
5355 n.Base58 = {
5356 alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
5357 validRegex: /^[1-9A-HJ-NP-Za-km-z]+$/,
5358 base: BigInteger.valueOf(58),
5359 encode: function(n) {
5360 for (var i = BigInteger.fromByteArrayUnsigned(n), r = [], f, u; i.compareTo(t.base) >= 0;) f = i.mod(t.base), r.unshift(t.alphabet[f.intValue()]), i = i.subtract(f).divide(t.base);
5361 for (r.unshift(t.alphabet[i.intValue()]), u = 0; u < n.length; u++)
5362 if (n[u] == 0) r.unshift(t.alphabet[0]);
5363 else break;
5364 return r.join("")
5365 },
5366 decode: function(n) {
5367 for (var f, e, r = BigInteger.valueOf(0), u = 0, i = n.length - 1; i >= 0; i--) {
5368 if (f = t.alphabet.indexOf(n[i]), f < 0) throw "Invalid character";
5369 r = r.add(BigInteger.valueOf(f).multiply(t.base.pow(n.length - 1 - i)));
5370 n[i] == "1" ? u++ : u = 0
5371 }
5372 for (e = r.toByteArrayUnsigned(); u-- > 0;) e.unshift(0);
5373 return e
5374 }
5375 };
5376 var t = n.Base58
5377 }("undefined" != typeof Bitcoin ? Bitcoin : module.exports), Bitcoin.Address = function(n) {
5378 "string" == typeof n && (n = Bitcoin.Address.decodeString(n));
5379 this.hash = n;
5380 this.version = 0
5381 }, Bitcoin.Address.prototype.toString = function() {
5382 var n = this.hash.slice(0),
5383 t, i;
5384 return n.unshift(this.version), t = Crypto.SHA256(Crypto.SHA256(n, {
5385 asBytes: !0
5386 }), {
5387 asBytes: !0
5388 }), i = n.concat(t.slice(0, 4)), Bitcoin.Base58.encode(i)
5389 }, Bitcoin.Address.prototype.getHashBase64 = function() {
5390 return Crypto.util.bytesToBase64(this.hash)
5391 }, Bitcoin.Address.decodeString = function(n) {
5392 var t = Bitcoin.Base58.decode(n),
5393 r = t.slice(0, 21),
5394 i = Crypto.SHA256(Crypto.SHA256(r, {
5395 asBytes: !0
5396 }), {
5397 asBytes: !0
5398 }),
5399 u;
5400 if (i[0] != t[21] || i[1] != t[22] || i[2] != t[23] || i[3] != t[24]) throw "Checksum validation failed!";
5401 if (u = r.shift(), u != 0) throw "Version " + u + " not supported!";
5402 return r
5403 }, ECFieldElementFp.prototype.getByteLength = function() {
5404 return Math.floor((this.toBigInteger().bitLength() + 7) / 8)
5405 }, ECPointFp.prototype.getEncoded = function(n) {
5406 var r = this.getX().toBigInteger(),
5407 i = this.getY().toBigInteger(),
5408 t = integerToBytes(r, 32);
5409 return n ? i.isEven() ? t.unshift(2) : t.unshift(3) : (t.unshift(4), t = t.concat(integerToBytes(i, 32))), t
5410 }, ECPointFp.decodeFrom = function(n, t) {
5411 var o = t[0],
5412 i = t.length - 1,
5413 r = t.slice(1, 1 + i / 2),
5414 u = t.slice(1 + i / 2, 1 + i),
5415 f, e;
5416 return r.unshift(0), u.unshift(0), f = new BigInteger(r), e = new BigInteger(u), new ECPointFp(n, n.fromBigInteger(f), n.fromBigInteger(e))
5417 }, ECPointFp.prototype.add2D = function(n) {
5418 if (this.isInfinity()) return n;
5419 if (n.isInfinity()) return this;
5420 if (this.x.equals(n.x)) return this.y.equals(n.y) ? this.twice() : this.curve.getInfinity();
5421 var r = n.x.subtract(this.x),
5422 u = n.y.subtract(this.y),
5423 t = u.divide(r),
5424 i = t.square().subtract(this.x).subtract(n.x),
5425 f = t.multiply(this.x.subtract(i)).subtract(this.y);
5426 return new ECPointFp(this.curve, i, f)
5427 }, ECPointFp.prototype.twice2D = function() {
5428 if (this.isInfinity()) return this;
5429 if (this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();
5430 var n = this.curve.fromBigInteger(BigInteger.valueOf(2)),
5431 r = this.curve.fromBigInteger(BigInteger.valueOf(3)),
5432 t = this.x.square().multiply(r).add(this.curve.a).divide(this.y.multiply(n)),
5433 i = t.square().subtract(this.x.multiply(n)),
5434 u = t.multiply(this.x.subtract(i)).subtract(this.y);
5435 return new ECPointFp(this.curve, i, u)
5436 }, ECPointFp.prototype.multiply2D = function(n) {
5437 var r, e;
5438 if (this.isInfinity()) return this;
5439 if (n.signum() == 0) return this.curve.getInfinity();
5440 for (var u = n, f = u.multiply(new BigInteger("3")), o = this.negate(), t = this, i = f.bitLength() - 2; i > 0; --i) t = t.twice(), r = f.testBit(i), e = u.testBit(i), r != e && (t = t.add2D(r ? this : o));
5441 return t
5442 }, ECPointFp.prototype.isOnCurve = function() {
5443 var n = this.getX().toBigInteger(),
5444 t = this.getY().toBigInteger(),
5445 r = this.curve.getA().toBigInteger(),
5446 u = this.curve.getB().toBigInteger(),
5447 i = this.curve.getQ(),
5448 f = t.multiply(t).mod(i),
5449 e = n.multiply(n).multiply(n).add(r.multiply(n)).add(u).mod(i);
5450 return f.equals(e)
5451 }, ECPointFp.prototype.toString = function() {
5452 return "(" + this.getX().toBigInteger().toString() + "," + this.getY().toBigInteger().toString() + ")"
5453 }, ECPointFp.prototype.validate = function() {
5454 var n = this.curve.getQ(),
5455 t, i;
5456 if (this.isInfinity()) throw new Error("Point is at infinity.");
5457 if (t = this.getX().toBigInteger(), i = this.getY().toBigInteger(), t.compareTo(BigInteger.ONE) < 0 || t.compareTo(n.subtract(BigInteger.ONE)) > 0) throw new Error("x coordinate out of bounds");
5458 if (i.compareTo(BigInteger.ONE) < 0 || i.compareTo(n.subtract(BigInteger.ONE)) > 0) throw new Error("y coordinate out of bounds");
5459 if (!this.isOnCurve()) throw new Error("Point is not on the curve.");
5460 if (this.multiply(n).isInfinity()) throw new Error("Point is not a scalar multiple of G.");
5461 return !0
5462 }, Bitcoin.ECDSA = function() {
5463 function u(n, t, i, r) {
5464 for (var e = Math.max(t.bitLength(), r.bitLength()), o = n.add2D(i), u = n.curve.getInfinity(), f = e - 1; f >= 0; --f) u = u.twice2D(), u.z = BigInteger.ONE, t.testBit(f) ? u = r.testBit(f) ? u.add2D(o) : u.add2D(n) : r.testBit(f) && (u = u.add2D(i));
5465 return u
5466 }
5467 var n = getSECCurveByName("secp256k1"),
5468 r = new SecureRandom,
5469 i = null,
5470 t = {
5471 getBigRandom: function(n) {
5472 return new BigInteger(n.bitLength(), r).mod(n.subtract(BigInteger.ONE)).add(BigInteger.ONE)
5473 },
5474 sign: function(i, r) {
5475 var s = r,
5476 u = n.getN(),
5477 h = BigInteger.fromByteArrayUnsigned(i),
5478 o;
5479 do var e = t.getBigRandom(u),
5480 c = n.getG(),
5481 l = c.multiply(e),
5482 f = l.getX().toBigInteger().mod(u); while (f.compareTo(BigInteger.ZERO) <= 0);
5483 return o = e.modInverse(u).multiply(h.add(s.multiply(f))).mod(u), t.serializeSig(f, o)
5484 },
5485 verify: function(i, r, u) {
5486 var f, e, o, s, h;
5487 if (Bitcoin.Util.isArray(r)) o = t.parseSig(r), f = o.r, e = o.s;
5488 else if ("object" == typeof r && r.r && r.s) f = r.r, e = r.s;
5489 else throw "Invalid value for signature";
5490 if (u instanceof ECPointFp) s = u;
5491 else if (Bitcoin.Util.isArray(u)) s = ECPointFp.decodeFrom(n.getCurve(), u);
5492 else throw "Invalid format for pubkey value, must be byte array or ECPointFp";
5493 return h = BigInteger.fromByteArrayUnsigned(i), t.verifyRaw(h, f, e, s)
5494 },
5495 verifyRaw: function(t, i, r, u) {
5496 var f = n.getN(),
5497 o = n.getG();
5498 if (i.compareTo(BigInteger.ONE) < 0 || i.compareTo(f) >= 0 || r.compareTo(BigInteger.ONE) < 0 || r.compareTo(f) >= 0) return !1;
5499 var e = r.modInverse(f),
5500 s = t.multiply(e).mod(f),
5501 h = i.multiply(e).mod(f),
5502 c = o.multiply(s).add(u.multiply(h)),
5503 l = c.getX().toBigInteger().mod(f);
5504 return l.equals(i)
5505 },
5506 serializeSig: function(n, t) {
5507 var r = n.toByteArraySigned(),
5508 u = t.toByteArraySigned(),
5509 i = [];
5510 return i.push(2), i.push(r.length), i = i.concat(r), i.push(2), i.push(u.length), i = i.concat(u), i.unshift(i.length), i.unshift(48), i
5511 },
5512 parseSig: function(n) {
5513 var t, i, r, u, f;
5514 if (n[0] != 48) throw new Error("Signature not a valid DERSequence");
5515 if (t = 2, n[t] != 2) throw new Error("First element in signature must be a DERInteger");
5516 if (i = n.slice(t + 2, t + 2 + n[t + 1]), t += 2 + n[t + 1], n[t] != 2) throw new Error("Second element in signature must be a DERInteger");
5517 return r = n.slice(t + 2, t + 2 + n[t + 1]), t += 2 + n[t + 1], u = BigInteger.fromByteArrayUnsigned(i), f = BigInteger.fromByteArrayUnsigned(r), {
5518 r: u,
5519 s: f
5520 }
5521 },
5522 parseSigCompact: function(t) {
5523 var i;
5524 if (t.length !== 65) throw "Signature has the wrong length";
5525 if (i = t[0] - 27, i < 0 || i > 7) throw "Invalid signature type";
5526 var r = n.getN(),
5527 u = BigInteger.fromByteArrayUnsigned(t.slice(1, 33)).mod(r),
5528 f = BigInteger.fromByteArrayUnsigned(t.slice(33, 65)).mod(r);
5529 return {
5530 r: u,
5531 s: f,
5532 i: i
5533 }
5534 },
5535 recoverPubKey: function(r, f, e, o) {
5536 var y;
5537 o = o & 3;
5538 var p = o & 1,
5539 k = o >> 1,
5540 a = n.getN(),
5541 d = n.getG(),
5542 s = n.getCurve(),
5543 c = s.getQ(),
5544 g = s.getA().toBigInteger(),
5545 nt = s.getB().toBigInteger();
5546 i || (i = c.add(BigInteger.ONE).divide(BigInteger.valueOf(4)));
5547 var h = k ? r.add(a) : r,
5548 tt = h.multiply(h).multiply(h).add(g.multiply(h)).add(nt).mod(c),
5549 l = tt.modPow(i, c),
5550 ft = l.isEven() ? o % 2 : (o + 1) % 2,
5551 it = (l.isEven() ? !p : p) ? l : c.subtract(l),
5552 w = new ECPointFp(s, s.fromBigInteger(h), s.fromBigInteger(it));
5553 w.validate();
5554 var b = BigInteger.fromByteArrayUnsigned(e),
5555 rt = BigInteger.ZERO.subtract(b).mod(a),
5556 ut = r.modInverse(a),
5557 v = u(w, f, d, rt).multiply(ut);
5558 if (v.validate(), !t.verifyRaw(b, r, f, v)) throw "Pubkey recovery unsuccessful";
5559 return y = new Bitcoin.ECKey, y.pub = v, y
5560 },
5561 calcPubkeyRecoveryParam: function(n, t, i, r) {
5562 for (var f, u = 0; u < 4; u++) try {
5563 if (f = Bitcoin.ECDSA.recoverPubKey(t, i, r, u), f.getBitcoinAddress().toString() == n) return u
5564 } catch (e) {}
5565 throw "Unable to find valid recovery factor";
5566 }
5567 };
5568 return t
5569 }(), Bitcoin.ECKey = function() {
5570 var t = Bitcoin.ECDSA,
5571 i = getSECCurveByName("secp256k1"),
5572 r = new SecureRandom,
5573 n = function(r) {
5574 if (r) r instanceof BigInteger ? this.priv = r : Bitcoin.Util.isArray(r) ? this.priv = BigInteger.fromByteArrayUnsigned(r) : "string" == typeof r && (this.priv = r.length == 51 && r[0] == "5" ? BigInteger.fromByteArrayUnsigned(n.decodeString(r)) : BigInteger.fromByteArrayUnsigned(Crypto.util.base64ToBytes(r)));
5575 else {
5576 var u = i.getN();
5577 this.priv = t.getBigRandom(u)
5578 }
5579 this.compressed = !!n.compressByDefault
5580 };
5581 return n.compressByDefault = !1, n.prototype.setCompressed = function(n) {
5582 this.compressed = !!n
5583 }, n.prototype.getPub = function() {
5584 return this.getPubPoint().getEncoded(this.compressed)
5585 }, n.prototype.getPubPoint = function() {
5586 return this.pub || (this.pub = i.getG().multiply(this.priv)), this.pub
5587 }, n.prototype.getPubKeyHash = function() {
5588 return this.pubKeyHash ? this.pubKeyHash : this.pubKeyHash = Bitcoin.Util.sha256ripe160(this.getPub())
5589 }, n.prototype.getBitcoinAddress = function() {
5590 var n = this.getPubKeyHash();
5591 return new Bitcoin.Address(n)
5592 }, n.prototype.getExportedPrivateKey = function() {
5593 for (var n = this.priv.toByteArrayUnsigned(), t, i; n.length < 32;) n.unshift(0);
5594 return n.unshift(128), t = Crypto.SHA256(Crypto.SHA256(n, {
5595 asBytes: !0
5596 }), {
5597 asBytes: !0
5598 }), i = n.concat(t.slice(0, 4)), Bitcoin.Base58.encode(i)
5599 }, n.prototype.setPub = function(n) {
5600 this.pub = ECPointFp.decodeFrom(i.getCurve(), n)
5601 }, n.prototype.toString = function(n) {
5602 return n === "base64" ? Crypto.util.bytesToBase64(this.priv.toByteArrayUnsigned()) : Crypto.util.bytesToHex(this.priv.toByteArrayUnsigned())
5603 }, n.prototype.sign = function(n) {
5604 return t.sign(n, this.priv)
5605 }, n.prototype.verify = function(n, i) {
5606 return t.verify(n, i, this.getPub())
5607 }, n.decodeString = function(n) {
5608 var t = Bitcoin.Base58.decode(n),
5609 r = t.slice(0, 33),
5610 i = Crypto.SHA256(Crypto.SHA256(r, {
5611 asBytes: !0
5612 }), {
5613 asBytes: !0
5614 }),
5615 u;
5616 if (i[0] != t[33] || i[1] != t[34] || i[2] != t[35] || i[3] != t[36]) throw "Checksum validation failed!";
5617 if (u = r.shift(), u != 128) throw "Version " + u + " not supported!";
5618 return r
5619 }, n
5620 }(), function() {
5621 var n = Bitcoin.Opcode = function(n) {
5622 this.code = n
5623 },
5624 t;
5625 n.prototype.toString = function() {
5626 return n.reverseMap[this.code]
5627 };
5628 n.map = {
5629 OP_0: 0,
5630 OP_FALSE: 0,
5631 OP_PUSHDATA1: 76,
5632 OP_PUSHDATA2: 77,
5633 OP_PUSHDATA4: 78,
5634 OP_1NEGATE: 79,
5635 OP_RESERVED: 80,
5636 OP_1: 81,
5637 OP_TRUE: 81,
5638 OP_2: 82,
5639 OP_3: 83,
5640 OP_4: 84,
5641 OP_5: 85,
5642 OP_6: 86,
5643 OP_7: 87,
5644 OP_8: 88,
5645 OP_9: 89,
5646 OP_10: 90,
5647 OP_11: 91,
5648 OP_12: 92,
5649 OP_13: 93,
5650 OP_14: 94,
5651 OP_15: 95,
5652 OP_16: 96,
5653 OP_NOP: 97,
5654 OP_VER: 98,
5655 OP_IF: 99,
5656 OP_NOTIF: 100,
5657 OP_VERIF: 101,
5658 OP_VERNOTIF: 102,
5659 OP_ELSE: 103,
5660 OP_ENDIF: 104,
5661 OP_VERIFY: 105,
5662 OP_RETURN: 106,
5663 OP_TOALTSTACK: 107,
5664 OP_FROMALTSTACK: 108,
5665 OP_2DROP: 109,
5666 OP_2DUP: 110,
5667 OP_3DUP: 111,
5668 OP_2OVER: 112,
5669 OP_2ROT: 113,
5670 OP_2SWAP: 114,
5671 OP_IFDUP: 115,
5672 OP_DEPTH: 116,
5673 OP_DROP: 117,
5674 OP_DUP: 118,
5675 OP_NIP: 119,
5676 OP_OVER: 120,
5677 OP_PICK: 121,
5678 OP_ROLL: 122,
5679 OP_ROT: 123,
5680 OP_SWAP: 124,
5681 OP_TUCK: 125,
5682 OP_CAT: 126,
5683 OP_SUBSTR: 127,
5684 OP_LEFT: 128,
5685 OP_RIGHT: 129,
5686 OP_SIZE: 130,
5687 OP_INVERT: 131,
5688 OP_AND: 132,
5689 OP_OR: 133,
5690 OP_XOR: 134,
5691 OP_EQUAL: 135,
5692 OP_EQUALVERIFY: 136,
5693 OP_RESERVED1: 137,
5694 OP_RESERVED2: 138,
5695 OP_1ADD: 139,
5696 OP_1SUB: 140,
5697 OP_2MUL: 141,
5698 OP_2DIV: 142,
5699 OP_NEGATE: 143,
5700 OP_ABS: 144,
5701 OP_NOT: 145,
5702 OP_0NOTEQUAL: 146,
5703 OP_ADD: 147,
5704 OP_SUB: 148,
5705 OP_MUL: 149,
5706 OP_DIV: 150,
5707 OP_MOD: 151,
5708 OP_LSHIFT: 152,
5709 OP_RSHIFT: 153,
5710 OP_BOOLAND: 154,
5711 OP_BOOLOR: 155,
5712 OP_NUMEQUAL: 156,
5713 OP_NUMEQUALVERIFY: 157,
5714 OP_NUMNOTEQUAL: 158,
5715 OP_LESSTHAN: 159,
5716 OP_GREATERTHAN: 160,
5717 OP_LESSTHANOREQUAL: 161,
5718 OP_GREATERTHANOREQUAL: 162,
5719 OP_MIN: 163,
5720 OP_MAX: 164,
5721 OP_WITHIN: 165,
5722 OP_RIPEMD160: 166,
5723 OP_SHA1: 167,
5724 OP_SHA256: 168,
5725 OP_HASH160: 169,
5726 OP_HASH256: 170,
5727 OP_CODESEPARATOR: 171,
5728 OP_CHECKSIG: 172,
5729 OP_CHECKSIGVERIFY: 173,
5730 OP_CHECKMULTISIG: 174,
5731 OP_CHECKMULTISIGVERIFY: 175,
5732 OP_NOP1: 176,
5733 OP_NOP2: 177,
5734 OP_NOP3: 178,
5735 OP_NOP4: 179,
5736 OP_NOP5: 180,
5737 OP_NOP6: 181,
5738 OP_NOP7: 182,
5739 OP_NOP8: 183,
5740 OP_NOP9: 184,
5741 OP_NOP10: 185,
5742 OP_PUBKEYHASH: 253,
5743 OP_PUBKEY: 254,
5744 OP_INVALIDOPCODE: 255
5745 };
5746 n.reverseMap = [];
5747 for (t in n.map) n.reverseMap[n.map[t]] = t
5748 }(), function() {
5749 var n = Bitcoin.Opcode,
5750 t = Bitcoin.Script = function(n) {
5751 if (n)
5752 if ("string" == typeof n) this.buffer = Crypto.util.base64ToBytes(n);
5753 else if (Bitcoin.Util.isArray(n)) this.buffer = n;
5754 else if (n instanceof t) this.buffer = n.buffer;
5755 else throw new Error("Invalid script");
5756 else this.buffer = [];
5757 this.parse()
5758 };
5759 t.prototype.parse = function() {
5760 function u(n) {
5761 f.chunks.push(f.buffer.slice(t, t + n));
5762 t += n
5763 }
5764 var f = this,
5765 t, i, r;
5766 for (this.chunks = [], t = 0; t < this.buffer.length;) i = this.buffer[t++], i >= 240 && (i = i << 8 | this.buffer[t++]), i > 0 && i < n.map.OP_PUSHDATA1 ? u(i) : i == n.map.OP_PUSHDATA1 ? (r = this.buffer[t++], u(r)) : i == n.map.OP_PUSHDATA2 ? (r = this.buffer[t++] << 8 | this.buffer[t++], u(r)) : i == n.map.OP_PUSHDATA4 ? (r = this.buffer[t++] << 24 | this.buffer[t++] << 16 | this.buffer[t++] << 8 | this.buffer[t++], u(r)) : this.chunks.push(i)
5767 };
5768 t.prototype.getOutType = function() {
5769 return this.chunks[this.chunks.length - 1] == n.map.OP_CHECKMULTISIG && this.chunks[this.chunks.length - 2] <= 3 ? "Multisig" : this.chunks.length == 5 && this.chunks[0] == n.map.OP_DUP && this.chunks[1] == n.map.OP_HASH160 && this.chunks[3] == n.map.OP_EQUALVERIFY && this.chunks[4] == n.map.OP_CHECKSIG ? "Address" : this.chunks.length == 2 && this.chunks[1] == n.map.OP_CHECKSIG ? "Pubkey" : "Strange"
5770 };
5771 t.prototype.simpleOutHash = function() {
5772 switch (this.getOutType()) {
5773 case "Address":
5774 return this.chunks[2];
5775 case "Pubkey":
5776 return Bitcoin.Util.sha256ripe160(this.chunks[0]);
5777 default:
5778 throw new Error("Encountered non-standard scriptPubKey");
5779 }
5780 };
5781 t.prototype.simpleOutPubKeyHash = t.prototype.simpleOutHash;
5782 t.prototype.getInType = function() {
5783 return this.chunks.length == 1 && Bitcoin.Util.isArray(this.chunks[0]) ? "Pubkey" : this.chunks.length == 2 && Bitcoin.Util.isArray(this.chunks[0]) && Bitcoin.Util.isArray(this.chunks[1]) ? "Address" : "Strange"
5784 };
5785 t.prototype.simpleInPubKey = function() {
5786 switch (this.getInType()) {
5787 case "Address":
5788 return this.chunks[1];
5789 case "Pubkey":
5790 throw new Error("Script does not contain pubkey.");
5791 default:
5792 throw new Error("Encountered non-standard scriptSig");
5793 }
5794 };
5795 t.prototype.simpleInHash = function() {
5796 return Bitcoin.Util.sha256ripe160(this.simpleInPubKey())
5797 };
5798 t.prototype.simpleInPubKeyHash = t.prototype.simpleInHash;
5799 t.prototype.writeOp = function(n) {
5800 this.buffer.push(n);
5801 this.chunks.push(n)
5802 };
5803 t.prototype.writeBytes = function(t) {
5804 t.length < n.map.OP_PUSHDATA1 ? this.buffer.push(t.length) : t.length <= 255 ? (this.buffer.push(n.map.OP_PUSHDATA1), this.buffer.push(t.length)) : t.length <= 65535 ? (this.buffer.push(n.map.OP_PUSHDATA2), this.buffer.push(t.length & 255), this.buffer.push(t.length >>> 8 & 255)) : (this.buffer.push(n.map.OP_PUSHDATA4), this.buffer.push(t.length & 255), this.buffer.push(t.length >>> 8 & 255), this.buffer.push(t.length >>> 16 & 255), this.buffer.push(t.length >>> 24 & 255));
5805 this.buffer = this.buffer.concat(t);
5806 this.chunks.push(t)
5807 };
5808 t.createOutputScript = function(i) {
5809 var r = new t;
5810 return r.writeOp(n.map.OP_DUP), r.writeOp(n.map.OP_HASH160), r.writeBytes(i.hash), r.writeOp(n.map.OP_EQUALVERIFY), r.writeOp(n.map.OP_CHECKSIG), r
5811 };
5812 t.prototype.extractAddresses = function(t) {
5813 switch (this.getOutType()) {
5814 case "Address":
5815 return t.push(new Address(this.chunks[2])), 1;
5816 case "Pubkey":
5817 return t.push(new Address(Util.sha256ripe160(this.chunks[0]))), 1;
5818 case "Multisig":
5819 for (var i = 1; i < this.chunks.length - 2; ++i) t.push(new Address(Util.sha256ripe160(this.chunks[i])));
5820 return this.chunks[0] - n.map.OP_1 + 1;
5821 default:
5822 throw new Error("Encountered non-standard scriptPubKey");
5823 }
5824 };
5825 t.createMultiSigOutputScript = function(t, i) {
5826 var r = new Bitcoin.Script,
5827 u;
5828 for (r.writeOp(n.map.OP_1 + t - 1), u = 0; u < i.length; ++u) r.writeBytes(i[u]);
5829 return r.writeOp(n.map.OP_1 + i.length - 1), r.writeOp(n.map.OP_CHECKMULTISIG), r
5830 };
5831 t.createInputScript = function(n, i) {
5832 var r = new t;
5833 return r.writeBytes(n), r.writeBytes(i), r
5834 };
5835 t.prototype.clone = function() {
5836 return new t(this.buffer)
5837 }
5838 }(), function() {
5839 var t = Bitcoin.Script,
5840 n = Bitcoin.Transaction = function(n) {
5841 var t;
5842 if (this.version = 1, this.lock_time = 0, this.ins = [], this.outs = [], this.timestamp = null, this.block = null, n) {
5843 if (n.hash && (this.hash = n.hash), n.version && (this.version = n.version), n.lock_time && (this.lock_time = n.lock_time), n.ins && n.ins.length)
5844 for (t = 0; t < n.ins.length; t++) this.addInput(new i(n.ins[t]));
5845 if (n.outs && n.outs.length)
5846 for (t = 0; t < n.outs.length; t++) this.addOutput(new r(n.outs[t]));
5847 n.timestamp && (this.timestamp = n.timestamp);
5848 n.block && (this.block = n.block)
5849 }
5850 },
5851 i, r;
5852 n.objectify = function(t) {
5853 for (var r = [], i = 0; i < t.length; i++) r.push(new n(t[i]));
5854 return r
5855 };
5856 n.prototype.addInput = function(n, t) {
5857 arguments[0] instanceof i ? this.ins.push(arguments[0]) : this.ins.push(new i({
5858 outpoint: {
5859 hash: n.hash,
5860 index: t
5861 },
5862 script: new Bitcoin.Script,
5863 sequence: 4294967295
5864 }))
5865 };
5866 n.prototype.addOutput = function(n, i) {
5867 if (arguments[0] instanceof r) this.outs.push(arguments[0]);
5868 else {
5869 if (i instanceof BigInteger)
5870 for (i = i.toByteArrayUnsigned().reverse(); i.length < 8;) i.push(0);
5871 else Bitcoin.Util.isArray(i);
5872 this.outs.push(new r({
5873 value: i,
5874 script: t.createOutputScript(n)
5875 }))
5876 }
5877 };
5878 n.prototype.serialize = function() {
5879 var n = [],
5880 r, t, u, i;
5881 for (n = n.concat(Crypto.util.wordsToBytes([parseInt(this.version)]).reverse()), n = n.concat(Bitcoin.Util.numToVarInt(this.ins.length)), t = 0; t < this.ins.length; t++) r = this.ins[t], n = n.concat(Crypto.util.base64ToBytes(r.outpoint.hash)), n = n.concat(Crypto.util.wordsToBytes([parseInt(r.outpoint.index)]).reverse()), i = r.script.buffer, n = n.concat(Bitcoin.Util.numToVarInt(i.length)), n = n.concat(i), n = n.concat(Crypto.util.wordsToBytes([parseInt(r.sequence)]).reverse());
5882 for (n = n.concat(Bitcoin.Util.numToVarInt(this.outs.length)), t = 0; t < this.outs.length; t++) u = this.outs[t], n = n.concat(u.value), i = u.script.buffer, n = n.concat(Bitcoin.Util.numToVarInt(i.length)), n = n.concat(i);
5883 return n.concat(Crypto.util.wordsToBytes([parseInt(this.lock_time)]).reverse())
5884 };
5885 var u = 2,
5886 f = 3,
5887 e = 80;
5888 n.prototype.hashTransactionForSignature = function(n, i, r) {
5889 for (var h, c, o = this.clone(), s = 0; s < o.ins.length; s++) o.ins[s].script = new t;
5890 if (o.ins[i].script = n, (r & 31) == u)
5891 for (o.outs = [], s = 0; s < o.ins.length; s++) s != i && (o.ins[s].sequence = 0);
5892 else(r & 31) == f;
5893 return r & e && (o.ins = [o.ins[i]]), h = o.serialize(), h = h.concat(Crypto.util.wordsToBytes([parseInt(r)]).reverse()), c = Crypto.SHA256(h, {
5894 asBytes: !0
5895 }), Crypto.SHA256(c, {
5896 asBytes: !0
5897 })
5898 };
5899 n.prototype.getHash = function() {
5900 var n = this.serialize();
5901 return Crypto.SHA256(Crypto.SHA256(n, {
5902 asBytes: !0
5903 }), {
5904 asBytes: !0
5905 })
5906 };
5907 n.prototype.clone = function() {
5908 var i = new n,
5909 r, t, u;
5910 for (i.version = this.version, i.lock_time = this.lock_time, t = 0; t < this.ins.length; t++) r = this.ins[t].clone(), i.addInput(r);
5911 for (t = 0; t < this.outs.length; t++) u = this.outs[t].clone(), i.addOutput(u);
5912 return i
5913 };
5914 n.prototype.analyze = function(n) {
5915 var c, r, i, l, u, t;
5916 if (!(n instanceof Bitcoin.Wallet)) return null;
5917 var f = !0,
5918 e = !0,
5919 o = null,
5920 s = null,
5921 h = null;
5922 for (i = this.outs.length - 1; i >= 0; i--) c = this.outs[i], r = c.script.simpleOutPubKeyHash(), n.hasHash(r) ? s = r : e = !1, o = r;
5923 for (i = this.ins.length - 1; i >= 0; i--)
5924 if (l = this.ins[i], h = l.script.simpleInPubKeyHash(), !n.hasHash(h)) {
5925 f = !1;
5926 break
5927 }
5928 return u = this.calcImpact(n), t = {}, t.impact = u, u.sign > 0 && u.value.compareTo(BigInteger.ZERO) > 0 ? (t.type = "recv", t.addr = new Bitcoin.Address(s)) : f && e ? t.type = "self" : f ? (t.type = "sent", t.addr = new Bitcoin.Address(o)) : t.type = "other", t
5929 };
5930 n.prototype.getDescription = function(n) {
5931 var t = this.analyze(n);
5932 if (!t) return "";
5933 switch (t.type) {
5934 case "recv":
5935 return "Received with " + t.addr;
5936 case "sent":
5937 return "Payment to " + t.addr;
5938 case "self":
5939 return "Payment to yourself";
5940 case "other":
5941 default:
5942 return ""
5943 }
5944 };
5945 n.prototype.getTotalOutValue = function() {
5946 for (var i, n = BigInteger.ZERO, t = 0; t < this.outs.length; t++) i = this.outs[t], n = n.add(Bitcoin.Util.valueToBigInt(i.value));
5947 return n
5948 };
5949 n.prototype.getTotalValue = n.prototype.getTotalOutValue;
5950 n.prototype.calcImpact = function(n) {
5951 var i, e, r, t, f, u, o;
5952 if (!(n instanceof Bitcoin.Wallet)) return BigInteger.ZERO;
5953 for (i = BigInteger.ZERO, t = 0; t < this.outs.length; t++) e = this.outs[t], u = Crypto.util.bytesToBase64(e.script.simpleOutPubKeyHash()), n.hasHash(u) && (i = i.add(Bitcoin.Util.valueToBigInt(e.value)));
5954 for (r = BigInteger.ZERO, t = 0; t < this.ins.length; t++) f = this.ins[t], u = Crypto.util.bytesToBase64(f.script.simpleInPubKeyHash()), n.hasHash(u) && (o = n.txIndex[f.outpoint.hash], o && (r = r.add(Bitcoin.Util.valueToBigInt(o.outs[f.outpoint.index].value))));
5955 return i.compareTo(r) >= 0 ? {
5956 sign: 1,
5957 value: i.subtract(r)
5958 } : {
5959 sign: -1,
5960 value: r.subtract(i)
5961 }
5962 };
5963 i = Bitcoin.TransactionIn = function(n) {
5964 this.outpoint = n.outpoint;
5965 this.script = n.script instanceof t ? n.script : new t(n.script);
5966 this.sequence = n.sequence
5967 };
5968 i.prototype.clone = function() {
5969 return new i({
5970 outpoint: {
5971 hash: this.outpoint.hash,
5972 index: this.outpoint.index
5973 },
5974 script: this.script.clone(),
5975 sequence: this.sequence
5976 })
5977 };
5978 r = Bitcoin.TransactionOut = function(n) {
5979 if (this.script = n.script instanceof t ? n.script : new t(n.script), Bitcoin.Util.isArray(n.value)) this.value = n.value;
5980 else if ("string" == typeof n.value) {
5981 for (var i = new BigInteger(n.value, 10).toString(16); i.length < 16;) i = "0" + i;
5982 this.value = Crypto.util.hexToBytes(i)
5983 }
5984 };
5985 r.prototype.clone = function() {
5986 return new r({
5987 script: this.script.clone(),
5988 value: this.value.slice(0)
5989 })
5990 }
5991 }(), Bitcoin.Wallet = function() {
5992 var t = Bitcoin.Script,
5993 i = Bitcoin.TransactionIn,
5994 r = Bitcoin.TransactionOut,
5995 n = function() {
5996 var n = [];
5997 this.addressHashes = [];
5998 this.txIndex = {};
5999 this.unspentOuts = [];
6000 this.addressPointer = 0;
6001 this.addKey = function(t, i) {
6002 t instanceof Bitcoin.ECKey || (t = new Bitcoin.ECKey(t));
6003 n.push(t);
6004 i && ("string" == typeof i && (i = Crypto.util.base64ToBytes(i)), t.setPub(i));
6005 this.addressHashes.push(t.getBitcoinAddress().getHashBase64())
6006 };
6007 this.addKeys = function(n, t) {
6008 "string" == typeof n && (n = n.split(","));
6009 "string" == typeof t && (t = t.split(","));
6010 var i;
6011 if (Array.isArray(t) && n.length == t.length)
6012 for (i = 0; i < n.length; i++) this.addKey(n[i], t[i]);
6013 else
6014 for (i = 0; i < n.length; i++) this.addKey(n[i])
6015 };
6016 this.getKeys = function() {
6017 for (var i = [], t = 0; t < n.length; t++) i.push(n[t].toString("base64"));
6018 return i
6019 };
6020 this.getPubKeys = function() {
6021 for (var i = [], t = 0; t < n.length; t++) i.push(Crypto.util.bytesToBase64(n[t].getPub()));
6022 return i
6023 };
6024 this.clear = function() {
6025 n = []
6026 };
6027 this.getLength = function() {
6028 return n.length
6029 };
6030 this.getAllAddresses = function() {
6031 for (var i = [], t = 0; t < n.length; t++) i.push(n[t].getBitcoinAddress());
6032 return i
6033 };
6034 this.getCurAddress = function() {
6035 return n[this.addressPointer] ? n[this.addressPointer].getBitcoinAddress() : null
6036 };
6037 this.getNextAddress = function() {
6038 return this.addressPointer++, n[this.addressPointer] || this.generateAddress(), n[this.addressPointer].getBitcoinAddress()
6039 };
6040 this.signWithKey = function(t, i) {
6041 t = Crypto.util.bytesToBase64(t);
6042 for (var r = 0; r < this.addressHashes.length; r++)
6043 if (this.addressHashes[r] == t) return n[r].sign(i);
6044 throw new Error("Missing key for signature");
6045 };
6046 this.getPubKeyFromHash = function(t) {
6047 t = Crypto.util.bytesToBase64(t);
6048 for (var i = 0; i < this.addressHashes.length; i++)
6049 if (this.addressHashes[i] == t) return n[i].getPub();
6050 throw new Error("Hash unknown");
6051 }
6052 };
6053 return n.prototype.generateAddress = function() {
6054 this.addKey(new Bitcoin.ECKey)
6055 }, n.prototype.process = function(n) {
6056 var t, u, e, s, o, h, f;
6057 if (!this.txIndex[n.hash]) {
6058 for (t = 0; t < n.outs.length; t++)
6059 for (s = new r(n.outs[t]), e = Crypto.util.bytesToBase64(s.script.simpleOutPubKeyHash()), u = 0; u < this.addressHashes.length; u++)
6060 if (this.addressHashes[u] === e) {
6061 this.unspentOuts.push({
6062 tx: n,
6063 index: t,
6064 out: s
6065 });
6066 break
6067 }
6068 for (t = 0; t < n.ins.length; t++)
6069 for (o = new i(n.ins[t]), h = o.script.simpleInPubKey(), e = Crypto.util.bytesToBase64(Bitcoin.Util.sha256ripe160(h)), u = 0; u < this.addressHashes.length; u++)
6070 if (this.addressHashes[u] === e) {
6071 for (f = 0; f < this.unspentOuts.length; f++) o.outpoint.hash == this.unspentOuts[f].tx.hash && o.outpoint.index == this.unspentOuts[f].index && this.unspentOuts.splice(f, 1);
6072 break
6073 }
6074 this.txIndex[n.hash] = n
6075 }
6076 }, n.prototype.getBalance = function() {
6077 for (var i, n = BigInteger.valueOf(0), t = 0; t < this.unspentOuts.length; t++) i = this.unspentOuts[t].out, n = n.add(Bitcoin.Util.valueToBigInt(i.value));
6078 return n
6079 }, n.prototype.createSend = function(n, i, r) {
6080 for (var e = [], s = i.add(r), o = BigInteger.ZERO, h, f, c, u = 0; u < this.unspentOuts.length; u++)
6081 if (e.push(this.unspentOuts[u]), o = o.add(Bitcoin.Util.valueToBigInt(this.unspentOuts[u].out.value)), o.compareTo(s) >= 0) break;
6082 if (o.compareTo(s) < 0) throw new Error("Insufficient funds.");
6083 for (h = o.subtract(s), f = new Bitcoin.Transaction, u = 0; u < e.length; u++) f.addInput(e[u].tx, e[u].index);
6084 for (f.addOutput(n, i), h.compareTo(BigInteger.ZERO) > 0 && f.addOutput(this.getNextAddress(), h), c = 1, u = 0; u < f.ins.length; u++) {
6085 var v = f.hashTransactionForSignature(e[u].out.script, u, c),
6086 l = e[u].out.script.simpleOutPubKeyHash(),
6087 a = this.signWithKey(l, v);
6088 a.push(parseInt(c, 10));
6089 f.ins[u].script = t.createInputScript(a, this.getPubKeyFromHash(l))
6090 }
6091 return f
6092 }, n.prototype.clearTransactions = function() {
6093 this.txIndex = {};
6094 this.unspentOuts = []
6095 }, n.prototype.hasHash = function(n) {
6096 Bitcoin.Util.isArray(n) && (n = Crypto.util.bytesToBase64(n));
6097 for (var t = 0; t < this.addressHashes.length; t++)
6098 if (this.addressHashes[t] === n) return !0;
6099 return !1
6100 }, n
6101 }(), TransactionDatabase = function() {
6102 this.txs = [];
6103 this.txIndex = {}
6104 }, EventEmitter.augment(TransactionDatabase.prototype), TransactionDatabase.prototype.addTransaction = function(n) {
6105 this.addTransactionNoUpdate(n);
6106 $(this).trigger("update")
6107 }, TransactionDatabase.prototype.addTransactionNoUpdate = function(n) {
6108 this.txIndex[n.hash] || (this.txs.push(new Bitcoin.Transaction(n)), this.txIndex[n.hash] = n)
6109 }, TransactionDatabase.prototype.removeTransaction = function(n) {
6110 this.removeTransactionNoUpdate(n);
6111 $(this).trigger("update")
6112 }, TransactionDatabase.prototype.removeTransactionNoUpdate = function(n) {
6113 var r = this.txIndex[n],
6114 t, i;
6115 if (r) {
6116 for (t = 0, i = this.txs.length; t < i; t++)
6117 if (this.txs[t].hash == n) {
6118 this.txs.splice(t, 1);
6119 break
6120 }
6121 delete this.txIndex[n]
6122 }
6123 }, TransactionDatabase.prototype.loadTransactions = function(n) {
6124 for (var t = 0; t < n.length; t++) this.addTransactionNoUpdate(n[t]);
6125 $(this).trigger("update")
6126 }, TransactionDatabase.prototype.getTransactions = function() {
6127 return this.txs
6128 }, TransactionDatabase.prototype.clear = function() {
6129 this.txs = [];
6130 this.txIndex = {};
6131 $(this).trigger("update")
6132 }, function() {
6133 var n = function() {
6134 function n() {
6135 var i;
6136 this.digits = 0;
6137 this.form = 0;
6138 this.lostDigits = !1;
6139 this.roundingMode = 0;
6140 var t = this.DEFAULT_FORM,
6141 u = this.DEFAULT_LOSTDIGITS,
6142 r = this.DEFAULT_ROUNDINGMODE;
6143 if (n.arguments.length == 4) t = n.arguments[1], u = n.arguments[2], r = n.arguments[3];
6144 else if (n.arguments.length == 3) t = n.arguments[1], u = n.arguments[2];
6145 else if (n.arguments.length == 2) t = n.arguments[1];
6146 else if (n.arguments.length != 1) throw "MathContext(): " + n.arguments.length + " arguments given; expected 1 to 4";
6147 if (i = n.arguments[0], i != this.DEFAULT_DIGITS) {
6148 if (i < this.MIN_DIGITS) throw "MathContext(): Digits too small: " + i;
6149 if (i > this.MAX_DIGITS) throw "MathContext(): Digits too large: " + i;
6150 }
6151 if (t != this.SCIENTIFIC && t != this.ENGINEERING && t != this.PLAIN) throw "MathContext() Bad form value: " + t;
6152 if (!this.isValidRound(r)) throw "MathContext(): Bad roundingMode value: " + r;
6153 this.digits = i;
6154 this.form = t;
6155 this.lostDigits = u;
6156 this.roundingMode = r;
6157 return
6158 }
6159
6160 function t() {
6161 return this.digits
6162 }
6163
6164 function i() {
6165 return this.form
6166 }
6167
6168 function r() {
6169 return this.lostDigits
6170 }
6171
6172 function u() {
6173 return this.roundingMode
6174 }
6175
6176 function f() {
6177 var i = null,
6178 n = 0,
6179 r = null,
6180 t;
6181 i = this.form == this.SCIENTIFIC ? "SCIENTIFIC" : this.form == this.ENGINEERING ? "ENGINEERING" : "PLAIN";
6182 t = this.ROUNDS.length;
6183 n = 0;
6184 n: for (; t > 0; t--, n++)
6185 if (this.roundingMode == this.ROUNDS[n]) {
6186 r = this.ROUNDWORDS[n];
6187 break n
6188 }
6189 return "digits=" + this.digits + " form=" + i + " lostDigits=" + (this.lostDigits ? "1" : "0") + " roundingMode=" + r
6190 }
6191
6192 function e(n) {
6193 for (var t = 0, i = this.ROUNDS.length, t = 0; i > 0; i--, t++)
6194 if (n == this.ROUNDS[t]) return !0;
6195 return !1
6196 }
6197 return n.prototype.getDigits = t, n.prototype.getForm = i, n.prototype.getLostDigits = r, n.prototype.getRoundingMode = u, n.prototype.toString = f, n.prototype.isValidRound = e, n.PLAIN = n.prototype.PLAIN = 0, n.SCIENTIFIC = n.prototype.SCIENTIFIC = 1, n.ENGINEERING = n.prototype.ENGINEERING = 2, n.ROUND_CEILING = n.prototype.ROUND_CEILING = 2, n.ROUND_DOWN = n.prototype.ROUND_DOWN = 1, n.ROUND_FLOOR = n.prototype.ROUND_FLOOR = 3, n.ROUND_HALF_DOWN = n.prototype.ROUND_HALF_DOWN = 5, n.ROUND_HALF_EVEN = n.prototype.ROUND_HALF_EVEN = 6, n.ROUND_HALF_UP = n.prototype.ROUND_HALF_UP = 4, n.ROUND_UNNECESSARY = n.prototype.ROUND_UNNECESSARY = 7, n.ROUND_UP = n.prototype.ROUND_UP = 0, n.prototype.DEFAULT_FORM = n.prototype.SCIENTIFIC, n.prototype.DEFAULT_DIGITS = 9, n.prototype.DEFAULT_LOSTDIGITS = !1, n.prototype.DEFAULT_ROUNDINGMODE = n.prototype.ROUND_HALF_UP, n.prototype.MIN_DIGITS = 0, n.prototype.MAX_DIGITS = 999999999, n.prototype.ROUNDS = [n.prototype.ROUND_HALF_UP, n.prototype.ROUND_UNNECESSARY, n.prototype.ROUND_CEILING, n.prototype.ROUND_DOWN, n.prototype.ROUND_FLOOR, n.prototype.ROUND_HALF_DOWN, n.prototype.ROUND_HALF_EVEN, n.prototype.ROUND_UP], n.prototype.ROUNDWORDS = ["ROUND_HALF_UP", "ROUND_UNNECESSARY", "ROUND_CEILING", "ROUND_DOWN", "ROUND_FLOOR", "ROUND_HALF_DOWN", "ROUND_HALF_EVEN", "ROUND_UP"], n.prototype.DEFAULT = new n(n.prototype.DEFAULT_DIGITS, n.prototype.DEFAULT_FORM, n.prototype.DEFAULT_LOSTDIGITS, n.prototype.DEFAULT_ROUNDINGMODE), n
6198 }(),
6199 t = function(n) {
6200 function p(n, t) {
6201 return (n - n % t) / t
6202 }
6203
6204 function nt(n, t, i, r, u) {
6205 var f;
6206 if (r > t)
6207 for (f = u - 1; f >= 0; --f) i[f + r] = n[f + t];
6208 else
6209 for (f = 0; f < u; ++f) i[f + r] = n[f + t]
6210 }
6211
6212 function d(n) {
6213 for (var i = new Array(n), t = 0; t < n; ++t) i[t] = 0;
6214 return i
6215 }
6216
6217 function t() {
6218 var i, u, e, k, d, it, g, nt;
6219 if (this.ind = 0, this.form = n.prototype.PLAIN, this.mant = null, this.exp = 0, t.arguments.length != 0) {
6220 t.arguments.length == 1 ? (i = t.arguments[0], u = 0, e = i.length) : (i = t.arguments[0], u = t.arguments[1], e = t.arguments[2]);
6221 typeof i == "string" && (i = i.split(""));
6222 var p, l, s, h, a, r = 0,
6223 f = 0,
6224 w = !1,
6225 v = 0,
6226 y = 0,
6227 o = 0,
6228 c = 0,
6229 tt = 0,
6230 b = 0;
6231 e <= 0 && this.bad("BigDecimal(): ", i);
6232 this.ind = this.ispos;
6233 i[0] == "-" ? (e--, e == 0 && this.bad("BigDecimal(): ", i), this.ind = this.isneg, u++) : i[0] == "+" && (e--, e == 0 && this.bad("BigDecimal(): ", i), u++);
6234 p = !1;
6235 l = !1;
6236 s = 0;
6237 h = -1;
6238 a = -1;
6239 k = e;
6240 r = u;
6241 n: for (; k > 0; k--, r++) {
6242 if (f = i[r], f >= "0" && f <= "9") {
6243 a = r;
6244 s++;
6245 continue n
6246 }
6247 if (f == ".") {
6248 h >= 0 && this.bad("BigDecimal(): ", i);
6249 h = r - u;
6250 continue n
6251 }
6252 if (f != "e" && f != "E") {
6253 (f < "0" || f > "9") && this.bad("BigDecimal(): ", i);
6254 p = !0;
6255 a = r;
6256 s++;
6257 continue n
6258 }
6259 for (r - u > e - 2 && this.bad("BigDecimal(): ", i), w = !1, i[r + 1] == "-" ? (w = !0, v = r + 2) : v = i[r + 1] == "+" ? r + 2 : r + 1, y = e - (v - u), (y == 0 || y > 9) && this.bad("BigDecimal(): ", i), d = y, o = v; d > 0; d--, o++) c = i[o], c < "0" && this.bad("BigDecimal(): ", i), c > "9" ? this.bad("BigDecimal(): ", i) : tt = c - "0", this.exp = this.exp * 10 + tt;
6260 w && (this.exp = -this.exp);
6261 l = !0;
6262 break n
6263 }
6264 s == 0 && this.bad("BigDecimal(): ", i);
6265 h >= 0 && (this.exp = this.exp + h - s);
6266 it = a - 1;
6267 r = u;
6268 n: for (; r <= it; r++)
6269 if (f = i[r], f == "0") u++, h--, s--;
6270 else
6271 if (f == ".") u++, h--;
6272 else if (f <= "9") break n;
6273 else break n;
6274 if (this.mant = new Array(s), o = u, p) {
6275 do
6276 for (g = s, r = 0; g > 0; g--, r++) r == h && o++, c = i[o], c <= "9" ? this.mant[r] = c - "0" : this.bad("BigDecimal(): ", i), o++; while (0)
6277 } else
6278 do
6279 for (nt = s, r = 0; nt > 0; nt--, r++) r == h && o++, this.mant[r] = i[o] - "0", o++; while (0);
6280 this.mant[0] == 0 ? (this.ind = this.iszero, this.exp > 0 && (this.exp = 0), l && (this.mant = this.ZERO.mant, this.exp = 0)) : l && (this.form = n.prototype.SCIENTIFIC, b = this.exp + this.mant.length - 1, (b < this.MinExp || b > this.MaxExp) && this.bad("BigDecimal(): ", i));
6281 return
6282 }
6283 }
6284
6285 function w() {
6286 var n;
6287 if (w.arguments.length == 1) n = w.arguments[0];
6288 else if (w.arguments.length == 0) n = this.plainMC;
6289 else throw "abs(): " + w.arguments.length + " arguments given; expected 0 or 1";
6290 return this.ind == this.isneg ? this.negate(n) : this.plus(n)
6291 }
6292
6293 function f() {
6294 var h;
6295 if (f.arguments.length == 2) h = f.arguments[1];
6296 else if (f.arguments.length == 1) h = this.plainMC;
6297 else throw "add(): " + f.arguments.length + " arguments given; expected 1 or 2";
6298 var e = f.arguments[0],
6299 u, r, i, a, o, v, s, c = 0,
6300 l = 0,
6301 k = 0,
6302 p = null,
6303 w = 0,
6304 y = 0,
6305 nt = 0,
6306 d = 0,
6307 b = 0,
6308 g = 0;
6309 if (h.lostDigits && this.checkdigits(e, h.digits), u = this, u.ind == 0 && h.form != n.prototype.PLAIN) return e.plus(h);
6310 if (e.ind == 0 && h.form != n.prototype.PLAIN) return u.plus(h);
6311 r = h.digits;
6312 r > 0 && (u.mant.length > r && (u = this.clone(u).round(h)), e.mant.length > r && (e = this.clone(e).round(h)));
6313 i = new t;
6314 a = u.mant;
6315 o = u.mant.length;
6316 v = e.mant;
6317 s = e.mant.length;
6318 do
6319 if (u.exp == e.exp) i.exp = u.exp;
6320 else if (u.exp > e.exp) {
6321 if (c = o + u.exp - e.exp, c >= s + r + 1 && r > 0) return i.mant = a, i.exp = u.exp, i.ind = u.ind, o < r && (i.mant = this.extend(u.mant, r), i.exp = i.exp - (r - o)), i.finish(h, !1);
6322 i.exp = e.exp;
6323 c > r + 1 && r > 0 && (l = c - r - 1, s = s - l, i.exp = i.exp + l, c = r + 1);
6324 c > o && (o = c)
6325 } else {
6326 if (c = s + e.exp - u.exp, c >= o + r + 1 && r > 0) return i.mant = v, i.exp = e.exp, i.ind = e.ind, s < r && (i.mant = this.extend(e.mant, r), i.exp = i.exp - (r - s)), i.finish(h, !1);
6327 i.exp = u.exp;
6328 c > r + 1 && r > 0 && (l = c - r - 1, o = o - l, i.exp = i.exp + l, c = r + 1);
6329 c > s && (s = c)
6330 }
6331 while (0);
6332 if (i.ind = u.ind == this.iszero ? this.ispos : u.ind, (u.ind == this.isneg ? 1 : 0) == (e.ind == this.isneg ? 1 : 0)) k = 1;
6333 else
6334 do {
6335 k = -1;
6336 do
6337 if (e.ind != this.iszero)
6338 if (o < s || u.ind == this.iszero) p = a, a = v, v = p, l = o, o = s, s = l, i.ind = -i.ind;
6339 else if (!(o > s)) {
6340 w = 0;
6341 y = 0;
6342 nt = a.length - 1;
6343 d = v.length - 1;
6344 i: for (;;) {
6345 if (w <= nt) b = a[w];
6346 else {
6347 if (y > d) {
6348 if (h.form != n.prototype.PLAIN) return this.ZERO;
6349 break i
6350 }
6351 b = 0
6352 }
6353 if (g = y <= d ? v[y] : 0, b != g) {
6354 b < g && (p = a, a = v, v = p, l = o, o = s, s = l, i.ind = -i.ind);
6355 break i
6356 }
6357 w++;
6358 y++
6359 }
6360 } while (0)
6361 } while (0);
6362 return i.mant = this.byteaddsub(a, o, v, s, k, !1), i.finish(h, !1)
6363 }
6364
6365 function e() {
6366 var t, f;
6367 if (e.arguments.length == 2) t = e.arguments[1];
6368 else if (e.arguments.length == 1) t = this.plainMC;
6369 else throw "compareTo(): " + e.arguments.length + " arguments given; expected 1 or 2";
6370 var n = e.arguments[0],
6371 r = 0,
6372 i = 0,
6373 u;
6374 if (t.lostDigits && this.checkdigits(n, t.digits), this.ind == n.ind && this.exp == n.exp) {
6375 if (r = this.mant.length, r < n.mant.length) return -this.ind;
6376 if (r > n.mant.length) return this.ind;
6377 if (r <= t.digits || t.digits == 0) {
6378 for (f = r, i = 0; f > 0; f--, i++) {
6379 if (this.mant[i] < n.mant[i]) return -this.ind;
6380 if (this.mant[i] > n.mant[i]) return this.ind
6381 }
6382 return 0
6383 }
6384 } else {
6385 if (this.ind < n.ind) return -1;
6386 if (this.ind > n.ind) return 1
6387 }
6388 return u = this.clone(n), u.ind = -u.ind, this.add(u, t).ind
6389 }
6390
6391 function i() {
6392 var t, r = -1,
6393 u;
6394 if (i.arguments.length == 2) t = typeof i.arguments[1] == "number" ? new n(0, n.prototype.PLAIN, !1, i.arguments[1]) : i.arguments[1];
6395 else if (i.arguments.length == 3) {
6396 if (r = i.arguments[1], r < 0) throw "divide(): Negative scale: " + r;
6397 t = new n(0, n.prototype.PLAIN, !1, i.arguments[2])
6398 } else if (i.arguments.length == 1) t = this.plainMC;
6399 else throw "divide(): " + i.arguments.length + " arguments given; expected between 1 and 3";
6400 return u = i.arguments[0], this.dodivide("D", u, t, r)
6401 }
6402
6403 function o() {
6404 var n, t;
6405 if (o.arguments.length == 2) n = o.arguments[1];
6406 else if (o.arguments.length == 1) n = this.plainMC;
6407 else throw "divideInteger(): " + o.arguments.length + " arguments given; expected 1 or 2";
6408 return t = o.arguments[0], this.dodivide("I", t, n, 0)
6409 }
6410
6411 function s() {
6412 var n, t;
6413 if (s.arguments.length == 2) n = s.arguments[1];
6414 else if (s.arguments.length == 1) n = this.plainMC;
6415 else throw "max(): " + s.arguments.length + " arguments given; expected 1 or 2";
6416 return t = s.arguments[0], this.compareTo(t, n) >= 0 ? this.plus(n) : t.plus(n)
6417 }
6418
6419 function h() {
6420 var n, t;
6421 if (h.arguments.length == 2) n = h.arguments[1];
6422 else if (h.arguments.length == 1) n = this.plainMC;
6423 else throw "min(): " + h.arguments.length + " arguments given; expected 1 or 2";
6424 return t = h.arguments[0], this.compareTo(t, n) <= 0 ? this.plus(n) : t.plus(n)
6425 }
6426
6427 function c() {
6428 var r, y;
6429 if (c.arguments.length == 2) r = c.arguments[1];
6430 else if (c.arguments.length == 1) r = this.plainMC;
6431 else throw "multiply(): " + c.arguments.length + " arguments given; expected 1 or 2";
6432 var n = c.arguments[0],
6433 i, u, l, e = null,
6434 o = null,
6435 s, p = 0,
6436 h, f, a = 0,
6437 v = 0;
6438 for (r.lostDigits && this.checkdigits(n, r.digits), i = this, u = 0, l = r.digits, l > 0 ? (i.mant.length > l && (i = this.clone(i).round(r)), n.mant.length > l && (n = this.clone(n).round(r))) : (i.exp > 0 && (u = u + i.exp), n.exp > 0 && (u = u + n.exp)), i.mant.length < n.mant.length ? (e = i.mant, o = n.mant) : (e = n.mant, o = i.mant), s = e.length + o.length - 1, p = e[0] * o[0] > 9 ? s + 1 : s, h = new t, f = this.createArrayWithZeros(p), y = e.length, a = 0; y > 0; y--, a++) v = e[a], v != 0 && (f = this.byteaddsub(f, f.length, o, s, v, !0)), s--;
6439 return h.ind = i.ind * n.ind, h.exp = i.exp + n.exp - u, h.mant = u == 0 ? f : this.extend(f, f.length + u), h.finish(r, !1)
6440 }
6441
6442 function b() {
6443 var n, t;
6444 if (b.arguments.length == 1) n = b.arguments[0];
6445 else if (b.arguments.length == 0) n = this.plainMC;
6446 else throw "negate(): " + b.arguments.length + " arguments given; expected 0 or 1";
6447 return n.lostDigits && this.checkdigits(null, n.digits), t = this.clone(this), t.ind = -t.ind, t.finish(n, !1)
6448 }
6449
6450 function k() {
6451 var t;
6452 if (k.arguments.length == 1) t = k.arguments[0];
6453 else if (k.arguments.length == 0) t = this.plainMC;
6454 else throw "plus(): " + k.arguments.length + " arguments given; expected 0 or 1";
6455 return (t.lostDigits && this.checkdigits(null, t.digits), t.form == n.prototype.PLAIN && this.form == n.prototype.PLAIN && (this.mant.length <= t.digits || t.digits == 0)) ? this : this.clone(this).finish(t, !1)
6456 }
6457
6458 function l() {
6459 var r;
6460 if (l.arguments.length == 2) r = l.arguments[1];
6461 else if (l.arguments.length == 1) r = this.plainMC;
6462 else throw "pow(): " + l.arguments.length + " arguments given; expected 1 or 2";
6463 var t = l.arguments[0],
6464 u, f, e, s = 0,
6465 a = 0,
6466 o, i, h, c = 0;
6467 if (r.lostDigits && this.checkdigits(t, r.digits), u = t.intcheck(this.MinArg, this.MaxArg), f = this, e = r.digits, e == 0) {
6468 if (t.ind == this.isneg) throw "pow(): Negative power: " + t.toString();
6469 s = 0
6470 } else {
6471 if (t.mant.length + t.exp > e) throw "pow(): Too many digits: " + t.toString();
6472 f.mant.length > e && (f = this.clone(f).round(r));
6473 a = t.mant.length + t.exp;
6474 s = e + a + 1
6475 }
6476 if (o = new n(s, r.form, !1, r.roundingMode), i = this.ONE, u == 0) return i;
6477 u < 0 && (u = -u);
6478 h = !1;
6479 c = 1;
6480 n: for (;; c++) {
6481 if (u <<= 1, u < 0 && (h = !0, i = i.multiply(f, o)), c == 31) break n;
6482 h && (i = i.multiply(i, o))
6483 }
6484 return t.ind < 0 && (i = this.ONE.divide(i, o)), i.finish(r, !0)
6485 }
6486
6487 function a() {
6488 var n, t;
6489 if (a.arguments.length == 2) n = a.arguments[1];
6490 else if (a.arguments.length == 1) n = this.plainMC;
6491 else throw "remainder(): " + a.arguments.length + " arguments given; expected 1 or 2";
6492 return t = a.arguments[0], this.dodivide("R", t, n, -1)
6493 }
6494
6495 function v() {
6496 var n, i, t;
6497 if (v.arguments.length == 2) n = v.arguments[1];
6498 else if (v.arguments.length == 1) n = this.plainMC;
6499 else throw "subtract(): " + v.arguments.length + " arguments given; expected 1 or 2";
6500 return i = v.arguments[0], n.lostDigits && this.checkdigits(i, n.digits), t = this.clone(i), t.ind = -t.ind, this.add(t, n)
6501 }
6502
6503 function tt(n) {
6504 var r, i = 0,
6505 u = null,
6506 f = null,
6507 e, o;
6508 if (n == null || !(n instanceof t) || (r = n, this.ind != r.ind)) return !1;
6509 if (this.mant.length == r.mant.length && this.exp == r.exp && this.form == r.form) {
6510 for (e = this.mant.length, i = 0; e > 0; e--, i++)
6511 if (this.mant[i] != r.mant[i]) return !1
6512 } else {
6513 if (u = this.layout(), f = r.layout(), u.length != f.length) return !1;
6514 for (o = u.length, i = 0; o > 0; o--, i++)
6515 if (u[i] != f[i]) return !1
6516 }
6517 return !0
6518 }
6519
6520 function r() {
6521 var f, y, s, c, k, d, g, nt, tt;
6522 if (r.arguments.length == 6) f = r.arguments[2], y = r.arguments[3], s = r.arguments[4], c = r.arguments[5];
6523 else if (r.arguments.length == 2) f = -1, y = -1, s = n.prototype.SCIENTIFIC, c = this.ROUND_HALF_UP;
6524 else throw "format(): " + r.arguments.length + " arguments given; expected 2 or 6";
6525 var h = r.arguments[0],
6526 l = r.arguments[1],
6527 t, b = 0,
6528 a = 0,
6529 v = 0,
6530 it = null,
6531 w = 0,
6532 rt = 0,
6533 ut = 0,
6534 i, u = 0,
6535 e = null,
6536 o = 0,
6537 p = 0;
6538 if ((h < -1 || h == 0) && this.badarg("format", 1, h), l < -1 && this.badarg("format", 2, l), (f < -1 || f == 0) && this.badarg("format", 3, f), y < -1 && this.badarg("format", 4, y), s == n.prototype.SCIENTIFIC || s == n.prototype.ENGINEERING || (s == -1 ? s = n.prototype.SCIENTIFIC : this.badarg("format", 5, s)), c != this.ROUND_HALF_UP) try {
6539 c == -1 ? c = this.ROUND_HALF_UP : new n(9, n.prototype.SCIENTIFIC, !1, c)
6540 } catch (ft) {
6541 this.badarg("format", 6, c)
6542 }
6543 t = this.clone(this);
6544 do y == -1 ? t.form = n.prototype.PLAIN : t.ind == this.iszero ? t.form = n.prototype.PLAIN : (b = t.exp + t.mant.length, t.form = b > y ? s : b < -5 ? s : n.prototype.PLAIN); while (0);
6545 if (l >= 0) n: for (;;) {
6546 if (t.form == n.prototype.PLAIN ? a = -t.exp : t.form == n.prototype.SCIENTIFIC ? a = t.mant.length - 1 : (v = (t.exp + t.mant.length - 1) % 3, v < 0 && (v = 3 + v), v++, a = v >= t.mant.length ? 0 : t.mant.length - v), a == l) break n;
6547 if (a < l) {
6548 if (it = this.extend(t.mant, t.mant.length + l - a), t.mant = it, t.exp = t.exp - (l - a), t.exp < this.MinExp) throw "format(): Exponent Overflow: " + t.exp;
6549 break n
6550 }
6551 if (w = a - l, w > t.mant.length) {
6552 t.mant = this.ZERO.mant;
6553 t.ind = this.iszero;
6554 t.exp = 0;
6555 continue n
6556 }
6557 if (rt = t.mant.length - w, ut = t.exp, t.round(rt, c), t.exp - ut == w) break n
6558 }
6559 if (i = t.layout(), h > 0) {
6560 k = i.length;
6561 u = 0;
6562 n: for (; k > 0; k--, u++) {
6563 if (i[u] == ".") break n;
6564 if (i[u] == "E") break n
6565 }
6566 if (u > h && this.badarg("format", 1, h), u < h) {
6567 for (e = new Array(i.length + h - u), d = h - u, o = 0; d > 0; d--, o++) e[o] = " ";
6568 this.arraycopy(i, 0, e, o, i.length);
6569 i = e
6570 }
6571 }
6572 if (f > 0) {
6573 g = i.length - 1;
6574 u = i.length - 1;
6575 n: for (; g > 0; g--, u--)
6576 if (i[u] == "E") break n;
6577 if (u == 0) {
6578 for (e = new Array(i.length + f + 2), this.arraycopy(i, 0, e, 0, i.length), nt = f + 2, o = i.length; nt > 0; nt--, o++) e[o] = " ";
6579 i = e
6580 } else if (p = i.length - u - 2, p > f && this.badarg("format", 3, f), p < f) {
6581 for (e = new Array(i.length + f - p), this.arraycopy(i, 0, e, 0, u + 2), tt = f - p, o = u + 2; tt > 0; tt--, o++) e[o] = "0";
6582 this.arraycopy(i, u + 2, e, o, p);
6583 i = e
6584 }
6585 }
6586 return i.join("")
6587 }
6588
6589 function it() {
6590 var t, r = 0,
6591 n, i = 0,
6592 u = 0,
6593 f;
6594 if (this.ind == this.iszero) return 0;
6595 if (t = this.mant.length - 1, this.exp < 0) {
6596 if (t = t + this.exp, !this.allzero(this.mant, t + 1)) throw "intValueExact(): Decimal part non-zero: " + this.toString();
6597 if (t < 0) return 0;
6598 r = 0
6599 } else {
6600 if (this.exp + t > 9) throw "intValueExact(): Conversion overflow: " + this.toString();
6601 r = this.exp
6602 }
6603 for (n = 0, f = t + r, i = 0; i <= f; i++) n = n * 10, i <= t && (n = n + this.mant[i]);
6604 if (t + r == 9 && (u = p(n, 1e9), u != this.mant[0])) {
6605 if (n == -2147483648 && this.ind == this.isneg && this.mant[0] == 2) return n;
6606 throw "intValueExact(): Conversion overflow: " + this.toString();
6607 }
6608 return this.ind == this.ispos ? n : -n
6609 }
6610
6611 function rt(n) {
6612 var t;
6613 return t = this.clone(this), t.exp = t.exp - n, t.finish(this.plainMC, !1)
6614 }
6615
6616 function ut(n) {
6617 var t;
6618 return t = this.clone(this), t.exp = t.exp + n, t.finish(this.plainMC, !1)
6619 }
6620
6621 function ft() {
6622 return this.exp >= 0 ? 0 : -this.exp
6623 }
6624
6625 function y() {
6626 var u;
6627 if (y.arguments.length == 2) u = y.arguments[1];
6628 else if (y.arguments.length == 1) u = this.ROUND_UNNECESSARY;
6629 else throw "setScale(): " + y.arguments.length + " given; expected 1 or 2";
6630 var i = y.arguments[0],
6631 r, t, f = 0,
6632 e = 0;
6633 if (r = this.scale(), r == i && this.form == n.prototype.PLAIN) return this;
6634 if (t = this.clone(this), r <= i) f = r == 0 ? t.exp + i : i - r, t.mant = this.extend(t.mant, t.mant.length + f), t.exp = -i;
6635 else {
6636 if (i < 0) throw "setScale(): Negative scale: " + i;
6637 e = t.mant.length - (r - i);
6638 t = t.round(e, u);
6639 t.exp != -i && (t.mant = this.extend(t.mant, t.mant.length + 1), t.exp = t.exp - 1)
6640 }
6641 return t.form = n.prototype.PLAIN, t
6642 }
6643
6644 function et() {
6645 return this.ind
6646 }
6647
6648 function ot() {
6649 return this.layout().join("")
6650 }
6651
6652 function st() {
6653 var t, e = 0,
6654 u = null,
6655 s = 0,
6656 o = 0,
6657 c = 0,
6658 i = null,
6659 r, f, h = 0,
6660 l, a, v, y;
6661 for (t = new Array(this.mant.length), l = this.mant.length, e = 0; l > 0; l--, e++) t[e] = this.mant[e] + "";
6662 if (this.form != n.prototype.PLAIN) {
6663 if (u = "", this.ind == this.isneg && (u += "-"), s = this.exp + t.length - 1, this.form == n.prototype.SCIENTIFIC) u += t[0], t.length > 1 && (u += "."), u += t.slice(1).join("");
6664 else
6665 do
6666 if (o = s % 3, o < 0 && (o = 3 + o), s = s - o, o++, o >= t.length)
6667 for (u += t.join(""), a = o - t.length; a > 0; a--) u += "0";
6668 else u += t.slice(0, o).join(""), u += ".", u += t.slice(o).join(""); while (0);
6669 return s != 0 && (s < 0 ? (c = "-", s = -s) : c = "+", u += "E", u += c, u += s), u.split("")
6670 }
6671 if (this.exp == 0) return this.ind >= 0 ? t : (i = new Array(t.length + 1), i[0] = "-", this.arraycopy(t, 0, i, 1, t.length), i);
6672 if (r = this.ind == this.isneg ? 1 : 0, f = this.exp + t.length, f < 1) {
6673 for (h = r + 2 - this.exp, i = new Array(h), r != 0 && (i[0] = "-"), i[r] = "0", i[r + 1] = ".", v = -f, e = r + 2; v > 0; v--, e++) i[e] = "0";
6674 return this.arraycopy(t, 0, i, r + 2 - f, t.length), i
6675 }
6676 if (f > t.length) {
6677 for (h = r + f, i = new Array(h), r != 0 && (i[0] = "-"), this.arraycopy(t, 0, i, r, t.length), y = f - t.length, e = r + t.length; y > 0; y--, e++) i[e] = "0";
6678 return i
6679 }
6680 return h = r + 1 + t.length, i = new Array(h), r != 0 && (i[0] = "-"), this.arraycopy(t, 0, i, r, f), i[r + f] = ".", this.arraycopy(t, f, i, r + f + 1, t.length - f), i
6681 }
6682
6683 function ht(n, t) {
6684 var i;
6685 if (i = this.intValueExact(), i < n || i > t) throw "intcheck(): Conversion overflow: " + i;
6686 return i
6687 }
6688
6689 function ct(i, r, u, f) {
6690 var o, s, it, e, nt, h, l, v, k, tt, c, y = 0,
6691 a = 0,
6692 rt = 0,
6693 d = 0,
6694 g = 0,
6695 w = 0,
6696 st = 0,
6697 b = 0,
6698 ut = null,
6699 ft = 0,
6700 ht = 0,
6701 et = null,
6702 ot, ct;
6703 if (u.lostDigits && this.checkdigits(r, u.digits), o = this, r.ind == 0) throw "dodivide(): Divide by 0";
6704 if (o.ind == 0) return u.form != n.prototype.PLAIN ? this.ZERO : f == -1 ? o : o.setScale(f);
6705 if (s = u.digits, s > 0 ? (o.mant.length > s && (o = this.clone(o).round(u)), r.mant.length > s && (r = this.clone(r).round(u))) : (f == -1 && (f = o.scale()), s = o.mant.length, f != -o.exp && (s = s + f + o.exp), s = s - (r.mant.length - 1) - r.exp, s < o.mant.length && (s = o.mant.length), s < r.mant.length && (s = r.mant.length)), it = o.exp - r.exp + o.mant.length - r.mant.length, it < 0 && i != "D") return i == "I" ? this.ZERO : this.clone(o).finish(u, !1);
6706 e = new t;
6707 e.ind = o.ind * r.ind;
6708 e.exp = it;
6709 e.mant = this.createArrayWithZeros(s + 1);
6710 nt = s + s + 1;
6711 h = this.extend(o.mant, nt);
6712 l = nt;
6713 v = r.mant;
6714 k = nt;
6715 tt = v[0] * 10 + 1;
6716 v.length > 1 && (tt = tt + v[1]);
6717 c = 0;
6718 n: for (;;) {
6719 y = 0;
6720 t: for (;;) {
6721 if (l < k) break t;
6722 if (l == k) {
6723 i: do {
6724 for (ot = l, a = 0; ot > 0; ot--, a++) {
6725 if (rt = a < v.length ? v[a] : 0, h[a] < rt) break t;
6726 if (h[a] > rt) break i
6727 }
6728 y++;
6729 e.mant[c] = y;
6730 c++;
6731 h[0] = 0;
6732 break n
6733 } while (0);d = h[0]
6734 } else d = h[0] * 10, l > 1 && (d = d + h[1]);
6735 if (g = p(d * 10, tt), g == 0 && (g = 1), y = y + g, h = this.byteaddsub(h, l, v, k, -g, !0), h[0] == 0) {
6736 ct = l - 2;
6737 w = 0;
6738 i: for (; w <= ct; w++) {
6739 if (h[w] != 0) break i;
6740 l--
6741 }
6742 w != 0 && this.arraycopy(h, w, h, 0, l)
6743 }
6744 }
6745 if (c != 0 || y != 0) {
6746 if (e.mant[c] = y, c++, c == s + 1) break n;
6747 if (h[0] == 0) break n
6748 }
6749 if (f >= 0 && -e.exp > f) break n;
6750 if (i != "D" && e.exp <= 0) break n;
6751 e.exp = e.exp - 1;
6752 k--
6753 }
6754 if (c == 0 && (c = 1), i == "I" || i == "R") {
6755 if (c + e.exp > s) throw "dodivide(): Integer overflow";
6756 if (i == "R")
6757 do {
6758 if (e.mant[0] == 0) return this.clone(o).finish(u, !1);
6759 if (h[0] == 0) return this.ZERO;
6760 e.ind = o.ind;
6761 st = s + s + 1 - o.mant.length;
6762 e.exp = e.exp - st + o.exp;
6763 b = l;
6764 a = b - 1;
6765 t: for (; a >= 1; a--) {
6766 if (!(e.exp < o.exp && e.exp < r.exp)) break;
6767 if (h[a] != 0) break t;
6768 b--;
6769 e.exp = e.exp + 1
6770 }
6771 return b < h.length && (ut = new Array(b), this.arraycopy(h, 0, ut, 0, b), h = ut), e.mant = h, e.finish(u, !1)
6772 } while (0)
6773 } else h[0] != 0 && (ft = e.mant[c - 1], ft % 5 == 0 && (e.mant[c - 1] = ft + 1));
6774 if (f >= 0)
6775 do return c != e.mant.length && (e.exp = e.exp - (e.mant.length - c)), ht = e.mant.length - (-e.exp - f), e.round(ht, u.roundingMode), e.exp != -f && (e.mant = this.extend(e.mant, e.mant.length + 1), e.exp = e.exp - 1), e.finish(u, !0); while (0);
6776 if (c == e.mant.length) e.round(u), c = s;
6777 else {
6778 if (e.mant[0] == 0) return this.ZERO;
6779 et = new Array(c);
6780 this.arraycopy(e.mant, 0, et, 0, c);
6781 e.mant = et
6782 }
6783 return e.finish(u, !0)
6784 }
6785
6786 function lt(n, t) {
6787 throw n + "Not a number: " + t;
6788 }
6789
6790 function at(n, t, i) {
6791 throw "Bad argument " + t + " to " + n + ": " + i;
6792 }
6793
6794 function vt(n, t) {
6795 var i;
6796 return n.length == t ? n : (i = d(t), this.arraycopy(n, 0, i, 0, n.length), i)
6797 }
6798
6799 function yt(n, t, i, r, u, f) {
6800 var p, k, c, s, o, h, v, e, a = 0,
6801 w = 0,
6802 l, y = 0,
6803 b;
6804 p = n.length;
6805 k = i.length;
6806 c = t - 1;
6807 s = r - 1;
6808 o = s;
6809 o < c && (o = c);
6810 h = null;
6811 f && o + 1 == p && (h = n);
6812 h == null && (h = this.createArrayWithZeros(o + 1));
6813 v = !1;
6814 u == 1 ? v = !0 : u == -1 && (v = !0);
6815 e = 0;
6816 a = o;
6817 n: for (; a >= 0; a--) {
6818 if (c >= 0 && (c < p && (e = e + n[c]), c--), s >= 0 && (s < k && (e = v ? u > 0 ? e + i[s] : e - i[s] : e + i[s] * u), s--), e < 10 && e >= 0)
6819 do {
6820 h[a] = e;
6821 e = 0;
6822 continue n
6823 } while (0);
6824 w = e + 90;
6825 h[a] = this.bytedig[w];
6826 e = this.bytecar[w]
6827 }
6828 if (e == 0) return h;
6829 for (l = null, f && o + 2 == n.length && (l = n), l == null && (l = new Array(o + 2)), l[0] = e, b = o + 1, y = 0; b > 0; b--, y++) l[y + 1] = h[y];
6830 return l
6831 }
6832
6833 function g() {
6834 var r, n = 0,
6835 i = 0;
6836 r = new Array(190);
6837 n = 0;
6838 n: for (; n <= 189; n++) {
6839 if (i = n - 90, i >= 0) {
6840 r[n] = i % 10;
6841 t.prototype.bytecar[n] = p(i, 10);
6842 continue n
6843 }
6844 i = i + 100;
6845 r[n] = i % 10;
6846 t.prototype.bytecar[n] = p(i, 10) - 10
6847 }
6848 return r
6849 }
6850
6851 function pt(n) {
6852 var i;
6853 return i = new t, i.ind = n.ind, i.exp = n.exp, i.form = n.form, i.mant = n.mant, i
6854 }
6855
6856 function wt(n, t) {
6857 if (t != 0) {
6858 if (this.mant.length > t && !this.allzero(this.mant, t)) throw "Too many digits: " + this.toString();
6859 if (n != null) {
6860 if (n.mant.length > t && !this.allzero(n.mant, t)) throw "Too many digits: " + n.toString();
6861 return
6862 }
6863 }
6864 }
6865
6866 function u() {
6867 var t, r, s;
6868 if (u.arguments.length == 2) t = u.arguments[0], r = u.arguments[1];
6869 else if (u.arguments.length == 1) s = u.arguments[0], t = s.digits, r = s.roundingMode;
6870 else throw "round(): " + u.arguments.length + " arguments given; expected 1 or 2";
6871 var h, i, f, c = !1,
6872 e = 0,
6873 n, o = null;
6874 if (h = this.mant.length - t, h <= 0) return this;
6875 this.exp = this.exp + h;
6876 i = this.ind;
6877 f = this.mant;
6878 t > 0 ? (this.mant = new Array(t), this.arraycopy(f, 0, this.mant, 0, t), c = !0, e = f[t]) : (this.mant = this.ZERO.mant, this.ind = this.iszero, c = !1, e = t == 0 ? f[0] : 0);
6879 n = 0;
6880 do
6881 if (r == this.ROUND_HALF_UP) e >= 5 && (n = i);
6882 else if (r == this.ROUND_UNNECESSARY) {
6883 if (!this.allzero(f, t)) throw "round(): Rounding necessary";
6884 } else if (r == this.ROUND_HALF_DOWN) e > 5 ? n = i : e == 5 && (this.allzero(f, t + 1) || (n = i));
6885 else if (r == this.ROUND_HALF_EVEN) e > 5 ? n = i : e == 5 && (this.allzero(f, t + 1) ? this.mant[this.mant.length - 1] % 2 == 1 && (n = i) : n = i);
6886 else if (r != this.ROUND_DOWN)
6887 if (r == this.ROUND_UP) this.allzero(f, t) || (n = i);
6888 else if (r == this.ROUND_CEILING) i > 0 && (this.allzero(f, t) || (n = i));
6889 else if (r == this.ROUND_FLOOR) i < 0 && (this.allzero(f, t) || (n = i));
6890 else throw "round(): Bad round value: " + r;
6891 while (0);
6892 if (n != 0)
6893 do this.ind == this.iszero ? (this.mant = this.ONE.mant, this.ind = n) : (this.ind == this.isneg && (n = -n), o = this.byteaddsub(this.mant, this.mant.length, this.ONE.mant, 1, n, c), o.length > this.mant.length ? (this.exp++, this.arraycopy(o, 0, this.mant, 0, this.mant.length)) : this.mant = o); while (0);
6894 if (this.exp > this.MaxExp) throw "round(): Exponent Overflow: " + this.exp;
6895 return this
6896 }
6897
6898 function bt(n, t) {
6899 var i = 0,
6900 r;
6901 for (t < 0 && (t = 0), r = n.length - 1, i = t; i <= r; i++)
6902 if (n[i] != 0) return !1;
6903 return !0
6904 }
6905
6906 function kt(t, i) {
6907 var f = 0,
6908 u = 0,
6909 e = null,
6910 r = 0,
6911 o = 0,
6912 s;
6913 if (t.digits != 0 && this.mant.length > t.digits && this.round(t), i && t.form != n.prototype.PLAIN) {
6914 f = this.mant.length;
6915 u = f - 1;
6916 n: for (; u >= 1; u--) {
6917 if (this.mant[u] != 0) break n;
6918 f--;
6919 this.exp++
6920 }
6921 f < this.mant.length && (e = new Array(f), this.arraycopy(this.mant, 0, e, 0, f), this.mant = e)
6922 }
6923 for (this.form = n.prototype.PLAIN, s = this.mant.length, u = 0; s > 0; s--, u++)
6924 if (this.mant[u] != 0) {
6925 if (u > 0)
6926 do e = new Array(this.mant.length - u), this.arraycopy(this.mant, u, e, 0, this.mant.length - u), this.mant = e; while (0);
6927 if (r = this.exp + this.mant.length, r > 0) {
6928 if (r > t.digits && t.digits != 0 && (this.form = t.form), r - 1 <= this.MaxExp) return this
6929 } else r < -5 && (this.form = t.form);
6930 if (r--, r < this.MinExp || r > this.MaxExp) t: do {
6931 if (this.form == n.prototype.ENGINEERING && (o = r % 3, o < 0 && (o = 3 + o), r = r - o, r >= this.MinExp && r <= this.MaxExp)) break t;
6932 throw "finish(): Exponent Overflow: " + r;
6933 } while (0);
6934 return this
6935 }
6936 if (this.ind = this.iszero, t.form != n.prototype.PLAIN) this.exp = 0;
6937 else if (this.exp > 0) this.exp = 0;
6938 else if (this.exp < this.MinExp) throw "finish(): Exponent Overflow: " + this.exp;
6939 return this.mant = this.ZERO.mant, this
6940 }
6941
6942 function dt(n) {
6943 return this.compareTo(n) > 0
6944 }
6945
6946 function gt(n) {
6947 return this.compareTo(n) < 0
6948 }
6949
6950 function ni(n) {
6951 return this.compareTo(n) >= 0
6952 }
6953
6954 function ti(n) {
6955 return this.compareTo(n) <= 0
6956 }
6957
6958 function ii() {
6959 return this.compareTo(t.prototype.ZERO) > 0
6960 }
6961
6962 function ri() {
6963 return this.compareTo(t.prototype.ZERO) < 0
6964 }
6965
6966 function ui() {
6967 return this.equals(t.prototype.ZERO)
6968 }
6969 return t.prototype.div = p, t.prototype.arraycopy = nt, t.prototype.createArrayWithZeros = d, t.prototype.abs = w, t.prototype.add = f, t.prototype.compareTo = e, t.prototype.divide = i, t.prototype.divideInteger = o, t.prototype.max = s, t.prototype.min = h, t.prototype.multiply = c, t.prototype.negate = b, t.prototype.plus = k, t.prototype.pow = l, t.prototype.remainder = a, t.prototype.subtract = v, t.prototype.equals = tt, t.prototype.format = r, t.prototype.intValueExact = it, t.prototype.movePointLeft = rt, t.prototype.movePointRight = ut, t.prototype.scale = ft, t.prototype.setScale = y, t.prototype.signum = et, t.prototype.toString = ot, t.prototype.layout = st, t.prototype.intcheck = ht, t.prototype.dodivide = ct, t.prototype.bad = lt, t.prototype.badarg = at, t.prototype.extend = vt, t.prototype.byteaddsub = yt, t.prototype.diginit = g, t.prototype.clone = pt, t.prototype.checkdigits = wt, t.prototype.round = u, t.prototype.allzero = bt, t.prototype.finish = kt, t.prototype.isGreaterThan = dt, t.prototype.isLessThan = gt, t.prototype.isGreaterThanOrEqualTo = ni, t.prototype.isLessThanOrEqualTo = ti, t.prototype.isPositive = ii, t.prototype.isNegative = ri, t.prototype.isZero = ui, t.ROUND_CEILING = t.prototype.ROUND_CEILING = n.prototype.ROUND_CEILING, t.ROUND_DOWN = t.prototype.ROUND_DOWN = n.prototype.ROUND_DOWN, t.ROUND_FLOOR = t.prototype.ROUND_FLOOR = n.prototype.ROUND_FLOOR, t.ROUND_HALF_DOWN = t.prototype.ROUND_HALF_DOWN = n.prototype.ROUND_HALF_DOWN, t.ROUND_HALF_EVEN = t.prototype.ROUND_HALF_EVEN = n.prototype.ROUND_HALF_EVEN, t.ROUND_HALF_UP = t.prototype.ROUND_HALF_UP = n.prototype.ROUND_HALF_UP, t.ROUND_UNNECESSARY = t.prototype.ROUND_UNNECESSARY = n.prototype.ROUND_UNNECESSARY, t.ROUND_UP = t.prototype.ROUND_UP = n.prototype.ROUND_UP, t.prototype.ispos = 1, t.prototype.iszero = 0, t.prototype.isneg = -1, t.prototype.MinExp = -999999999, t.prototype.MaxExp = 999999999, t.prototype.MinArg = -999999999, t.prototype.MaxArg = 999999999, t.prototype.plainMC = new n(0, n.prototype.PLAIN), t.prototype.bytecar = new Array(190), t.prototype.bytedig = g(), t.ZERO = t.prototype.ZERO = new t("0"), t.ONE = t.prototype.ONE = new t("1"), t.TEN = t.prototype.TEN = new t("10"), t
6970 }(n);
6971 typeof define == "function" && define.amd != null ? define({
6972 BigDecimal: t,
6973 MathContext: n
6974 }) : typeof this == "object" && (this.BigDecimal = t, this.MathContext = n)
6975 }.call(this), ! function(n) {
6976 "use strict";
6977 n.matchMedia = n.matchMedia || function(n) {
6978 var u, i = n.documentElement,
6979 f = i.firstElementChild || i.firstChild,
6980 r = n.createElement("body"),
6981 t = n.createElement("div");
6982 return t.id = "mq-test-1", t.style.cssText = "position:absolute;top:-100em", r.style.background = "none", r.appendChild(t),
6983 function(n) {
6984 return t.innerHTML = '­<style media="' + n + '"> #mq-test-1 { width: 42px; }<\/style>', i.insertBefore(r, f), u = 42 === t.offsetWidth, i.removeChild(r), {
6985 matches: u,
6986 media: n
6987 }
6988 }
6989 }(n.document)
6990 }(this), function(n) {
6991 "use strict";
6992
6993 function p() {
6994 y(!0)
6995 }
6996 var t = {};
6997 n.respond = t;
6998 t.update = function() {};
6999 var f = [],
7000 tt = function() {
7001 var t = !1;
7002 try {
7003 t = new n.XMLHttpRequest
7004 } catch (i) {
7005 t = new n.ActiveXObject("Microsoft.XMLHTTP")
7006 }
7007 return function() {
7008 return t
7009 }
7010 }(),
7011 w = function(n, t) {
7012 var i = tt();
7013 i && (i.open("GET", n, !0), i.onreadystatechange = function() {
7014 4 !== i.readyState || 200 !== i.status && 304 !== i.status || t(i.responseText)
7015 }, 4 !== i.readyState && i.send(null))
7016 };
7017 if (t.ajax = w, t.queue = f, t.regex = {
7018 media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
7019 keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
7020 urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
7021 findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
7022 only: /(only\s+)?([a-zA-Z]+)\s?/,
7023 minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
7024 maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
7025 }, t.mediaQueriesSupported = n.matchMedia && null !== n.matchMedia("only all") && n.matchMedia("only all").matches, !t.mediaQueriesSupported) {
7026 var c, b, l, i = n.document,
7027 r = i.documentElement,
7028 e = [],
7029 o = [],
7030 u = [],
7031 a = {},
7032 k = 30,
7033 s = i.getElementsByTagName("head")[0] || r,
7034 it = i.getElementsByTagName("base")[0],
7035 h = s.getElementsByTagName("link"),
7036 v = function() {
7037 var u, t = i.createElement("div"),
7038 n = i.body,
7039 o = r.style.fontSize,
7040 e = n && n.style.fontSize,
7041 f = !1;
7042 return t.style.cssText = "position:absolute;font-size:1em;width:1em", n || (n = f = i.createElement("body"), n.style.background = "none"), r.style.fontSize = "100%", n.style.fontSize = "100%", n.appendChild(t), f && r.insertBefore(n, r.firstChild), u = t.offsetWidth, f ? r.removeChild(n) : n.removeChild(t), r.style.fontSize = o, e && (n.style.fontSize = e), u = l = parseFloat(u)
7043 },
7044 y = function(t) {
7045 var rt = "clientWidth",
7046 ut = r[rt],
7047 ft = "CSS1Compat" === i.compatMode && ut || i.body[rt] || ut,
7048 p = {},
7049 ct = h[h.length - 1],
7050 et = (new Date).getTime(),
7051 tt, g, nt, f, it;
7052 if (t && c && k > et - c) return n.clearTimeout(b), b = n.setTimeout(y, k), void 0;
7053 c = et;
7054 for (tt in e)
7055 if (e.hasOwnProperty(tt)) {
7056 var a = e[tt],
7057 w = a.minw,
7058 d = a.maxw,
7059 ot = null === w,
7060 st = null === d,
7061 ht = "em";
7062 w && (w = parseFloat(w) * (w.indexOf(ht) > -1 ? l || v() : 1));
7063 d && (d = parseFloat(d) * (d.indexOf(ht) > -1 ? l || v() : 1));
7064 a.hasquery && (ot && st || !(ot || ft >= w) || !(st || d >= ft)) || (p[a.media] || (p[a.media] = []), p[a.media].push(o[a.rules]))
7065 }
7066 for (g in u) u.hasOwnProperty(g) && u[g] && u[g].parentNode === s && s.removeChild(u[g]);
7067 u.length = 0;
7068 for (nt in p) p.hasOwnProperty(nt) && (f = i.createElement("style"), it = p[nt].join("\n"), f.type = "text/css", f.media = nt, s.insertBefore(f, ct.nextSibling), f.styleSheet ? f.styleSheet.cssText = it : f.appendChild(i.createTextNode(it)), u.push(f))
7069 },
7070 d = function(n, i, r) {
7071 var h = n.replace(t.regex.keyframes, "").match(t.regex.media),
7072 c = h && h.length || 0,
7073 l, a, f, v, u, p, w, s;
7074 for (i = i.substring(0, i.lastIndexOf("/")), l = function(n) {
7075 return n.replace(t.regex.urls, "$1" + i + "$2$3")
7076 }, a = !c && r, i.length && (i += "/"), a && (c = 1), f = 0; c > f; f++)
7077 for (a ? (v = r, o.push(l(n))) : (v = h[f].match(t.regex.findStyles) && RegExp.$1, o.push(RegExp.$2 && l(RegExp.$2))), p = v.split(","), w = p.length, s = 0; w > s; s++) u = p[s], e.push({
7078 media: u.split("(")[0].match(t.regex.only) && RegExp.$2 || "all",
7079 rules: o.length - 1,
7080 hasquery: u.indexOf("(") > -1,
7081 minw: u.match(t.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
7082 maxw: u.match(t.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
7083 });
7084 y()
7085 },
7086 g = function() {
7087 if (f.length) {
7088 var t = f.shift();
7089 w(t.href, function(i) {
7090 d(i, t.href, t.media);
7091 a[t.href] = !0;
7092 n.setTimeout(function() {
7093 g()
7094 }, 0)
7095 })
7096 }
7097 },
7098 nt = function() {
7099 for (var r = 0; r < h.length; r++) {
7100 var i = h[r],
7101 t = i.href,
7102 u = i.media,
7103 e = i.rel && "stylesheet" === i.rel.toLowerCase();
7104 t && e && !a[t] && (i.styleSheet && i.styleSheet.rawCssText ? (d(i.styleSheet.rawCssText, t, u), a[t] = !0) : (!/^([a-zA-Z:]*\/\/)/.test(t) && !it || t.replace(RegExp.$1, "").split("/")[0] === n.location.host) && ("//" === t.substring(0, 2) && (t = n.location.protocol + t), f.push({
7105 href: t,
7106 media: u
7107 })))
7108 }
7109 g()
7110 };
7111 nt();
7112 t.update = nt;
7113 t.getEmValue = v;
7114 n.addEventListener ? n.addEventListener("resize", p, !1) : n.attachEvent && n.attachEvent("onresize", p)
7115 }
7116 }(this), + function(n) {
7117 "use strict";
7118 var i = '[data-dismiss="alert"]',
7119 t = function(t) {
7120 n(t).on("click", i, this.close)
7121 },
7122 r;
7123 t.prototype.close = function(t) {
7124 function f() {
7125 i.trigger("closed.bs.alert").remove()
7126 }
7127 var u = n(this),
7128 r = u.attr("data-target"),
7129 i;
7130 (r || (r = u.attr("href"), r = r && r.replace(/.*(?=#[^\s]*$)/, "")), i = n(r), t && t.preventDefault(), i.length || (i = u.hasClass("alert") ? u : u.parent()), i.trigger(t = n.Event("close.bs.alert")), t.isDefaultPrevented()) || (i.removeClass("in"), n.support.transition && i.hasClass("fade") ? i.one(n.support.transition.end, f).emulateTransitionEnd(150) : f())
7131 };
7132 r = n.fn.alert;
7133 n.fn.alert = function(i) {
7134 return this.each(function() {
7135 var r = n(this),
7136 u = r.data("bs.alert");
7137 u || r.data("bs.alert", u = new t(this));
7138 typeof i == "string" && u[i].call(r)
7139 })
7140 };
7141 n.fn.alert.Constructor = t;
7142 n.fn.alert.noConflict = function() {
7143 return n.fn.alert = r, this
7144 };
7145 n(document).on("click.bs.alert.data-api", i, t.prototype.close)
7146 }(jQuery), + function(n) {
7147 "use strict";
7148 var t = function(i, r) {
7149 this.$element = n(i);
7150 this.options = n.extend({}, t.DEFAULTS, r)
7151 },
7152 i;
7153 t.DEFAULTS = {
7154 loadingText: "loading..."
7155 };
7156 t.prototype.setState = function(n) {
7157 var i = "disabled",
7158 t = this.$element,
7159 r = t.is("input") ? "val" : "html",
7160 u = t.data();
7161 n = n + "Text";
7162 u.resetText || t.data("resetText", t[r]());
7163 t[r](u[n] || this.options[n]);
7164 setTimeout(function() {
7165 n == "loadingText" ? t.addClass(i).attr(i, i) : t.removeClass(i).removeAttr(i)
7166 }, 0)
7167 };
7168 t.prototype.toggle = function() {
7169 var i = this.$element.closest('[data-toggle="buttons"]'),
7170 t = !0,
7171 n;
7172 i.length && (n = this.$element.find("input"), n.prop("type") === "radio" && (n.prop("checked") && this.$element.hasClass("active") ? t = !1 : i.find(".active").removeClass("active")), t && n.prop("checked", !this.$element.hasClass("active")).trigger("change"));
7173 t && this.$element.toggleClass("active")
7174 };
7175 i = n.fn.button;
7176 n.fn.button = function(i) {
7177 return this.each(function() {
7178 var u = n(this),
7179 r = u.data("bs.button"),
7180 f = typeof i == "object" && i;
7181 r || u.data("bs.button", r = new t(this, f));
7182 i == "toggle" ? r.toggle() : i && r.setState(i)
7183 })
7184 };
7185 n.fn.button.Constructor = t;
7186 n.fn.button.noConflict = function() {
7187 return n.fn.button = i, this
7188 };
7189 n(document).on("click.bs.button.data-api", "[data-toggle^=button]", function(t) {
7190 var i = n(t.target);
7191 i.hasClass("btn") || (i = i.closest(".btn"));
7192 i.button("toggle");
7193 t.preventDefault()
7194 })
7195 }(jQuery), + function(n) {
7196 "use strict";
7197
7198 function r() {
7199 n(e).remove();
7200 n(i).each(function(t) {
7201 var i = u(n(this));
7202 i.hasClass("open") && ((i.trigger(t = n.Event("hide.bs.dropdown")), t.isDefaultPrevented()) || i.removeClass("open").trigger("hidden.bs.dropdown"))
7203 })
7204 }
7205
7206 function u(t) {
7207 var i = t.attr("data-target"),
7208 r;
7209 return i || (i = t.attr("href"), i = i && /#/.test(i) && i.replace(/.*(?=#[^\s]*$)/, "")), r = i && n(i), r && r.length ? r : t.parent()
7210 }
7211 var e = ".dropdown-backdrop",
7212 i = "[data-toggle=dropdown]",
7213 t = function(t) {
7214 n(t).on("click.bs.dropdown", this.toggle)
7215 },
7216 f;
7217 t.prototype.toggle = function(t) {
7218 var f = n(this),
7219 i, e;
7220 if (!f.is(".disabled, :disabled")) {
7221 if (i = u(f), e = i.hasClass("open"), r(), !e) {
7222 if ("ontouchstart" in document.documentElement && !i.closest(".navbar-nav").length) n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click", r);
7223 if (i.trigger(t = n.Event("show.bs.dropdown")), t.isDefaultPrevented()) return;
7224 i.toggleClass("open").trigger("shown.bs.dropdown");
7225 f.focus()
7226 }
7227 return !1
7228 }
7229 };
7230 t.prototype.keydown = function(t) {
7231 var e, o, s, f, r;
7232 if (/(38|40|27)/.test(t.keyCode) && (e = n(this), t.preventDefault(), t.stopPropagation(), !e.is(".disabled, :disabled"))) {
7233 if (o = u(e), s = o.hasClass("open"), !s || s && t.keyCode == 27) return t.which == 27 && o.find(i).focus(), e.click();
7234 (f = n("[role=menu] li:not(.divider):visible a", o), f.length) && (r = f.index(f.filter(":focus")), t.keyCode == 38 && r > 0 && r--, t.keyCode == 40 && r < f.length - 1 && r++, ~r || (r = 0), f.eq(r).focus())
7235 }
7236 };
7237 f = n.fn.dropdown;
7238 n.fn.dropdown = function(i) {
7239 return this.each(function() {
7240 var r = n(this),
7241 u = r.data("bs.dropdown");
7242 u || r.data("bs.dropdown", u = new t(this));
7243 typeof i == "string" && u[i].call(r)
7244 })
7245 };
7246 n.fn.dropdown.Constructor = t;
7247 n.fn.dropdown.noConflict = function() {
7248 return n.fn.dropdown = f, this
7249 };
7250 n(document).on("click.bs.dropdown.data-api", r).on("click.bs.dropdown.data-api", ".dropdown form", function(n) {
7251 n.stopPropagation()
7252 }).on("click.bs.dropdown.data-api", i, t.prototype.toggle).on("keydown.bs.dropdown.data-api", i + ", [role=menu]", t.prototype.keydown)
7253 }(jQuery), + function(n) {
7254 "use strict";
7255 var t = function(t, i) {
7256 this.options = i;
7257 this.$element = n(t);
7258 this.$backdrop = this.isShown = null;
7259 this.options.remote && this.$element.load(this.options.remote)
7260 },
7261 i;
7262 t.DEFAULTS = {
7263 backdrop: !0,
7264 keyboard: !0,
7265 show: !0
7266 };
7267 t.prototype.toggle = function(n) {
7268 return this[this.isShown ? "hide" : "show"](n)
7269 };
7270 t.prototype.show = function(t) {
7271 var i = this,
7272 r = n.Event("show.bs.modal", {
7273 relatedTarget: t
7274 });
7275 if (this.$element.trigger(r), !this.isShown && !r.isDefaultPrevented()) {
7276 this.isShown = !0;
7277 this.escape();
7278 this.$element.on("click.dismiss.modal", '[data-dismiss="modal"]', n.proxy(this.hide, this));
7279 this.backdrop(function() {
7280 var u = n.support.transition && i.$element.hasClass("fade"),
7281 r;
7282 i.$element.parent().length || i.$element.appendTo(document.body);
7283 i.$element.show();
7284 u && i.$element[0].offsetWidth;
7285 i.$element.addClass("in").attr("aria-hidden", !1);
7286 i.enforceFocus();
7287 r = n.Event("shown.bs.modal", {
7288 relatedTarget: t
7289 });
7290 u ? i.$element.find(".modal-dialog").one(n.support.transition.end, function() {
7291 i.$element.focus().trigger(r)
7292 }).emulateTransitionEnd(300) : i.$element.focus().trigger(r)
7293 })
7294 }
7295 };
7296 t.prototype.hide = function(t) {
7297 (t && t.preventDefault(), t = n.Event("hide.bs.modal"), this.$element.trigger(t), this.isShown && !t.isDefaultPrevented()) && (this.isShown = !1, this.escape(), n(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.modal"), n.support.transition && this.$element.hasClass("fade") ? this.$element.one(n.support.transition.end, n.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal())
7298 };
7299 t.prototype.enforceFocus = function() {
7300 n(document).off("focusin.bs.modal").on("focusin.bs.modal", n.proxy(function(n) {
7301 this.$element[0] === n.target || this.$element.has(n.target).length || this.$element.focus()
7302 }, this))
7303 };
7304 t.prototype.escape = function() {
7305 if (this.isShown && this.options.keyboard) this.$element.on("keyup.dismiss.bs.modal", n.proxy(function(n) {
7306 n.which == 27 && this.hide()
7307 }, this));
7308 else this.isShown || this.$element.off("keyup.dismiss.bs.modal")
7309 };
7310 t.prototype.hideModal = function() {
7311 var n = this;
7312 this.$element.hide();
7313 this.backdrop(function() {
7314 n.removeBackdrop();
7315 n.$element.trigger("hidden.bs.modal")
7316 })
7317 };
7318 t.prototype.removeBackdrop = function() {
7319 this.$backdrop && this.$backdrop.remove();
7320 this.$backdrop = null
7321 };
7322 t.prototype.backdrop = function(t) {
7323 var u = this,
7324 r = this.$element.hasClass("fade") ? "fade" : "",
7325 i;
7326 if (this.isShown && this.options.backdrop) {
7327 i = n.support.transition && r;
7328 this.$backdrop = n('<div class="modal-backdrop ' + r + '" />').appendTo(document.body);
7329 this.$element.on("click.dismiss.modal", n.proxy(function(n) {
7330 n.target === n.currentTarget && (this.options.backdrop == "static" ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
7331 }, this));
7332 if (i && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !t) return;
7333 i ? this.$backdrop.one(n.support.transition.end, t).emulateTransitionEnd(150) : t()
7334 } else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), n.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(n.support.transition.end, t).emulateTransitionEnd(150) : t()) : t && t()
7335 };
7336 i = n.fn.modal;
7337 n.fn.modal = function(i, r) {
7338 return this.each(function() {
7339 var f = n(this),
7340 u = f.data("bs.modal"),
7341 e = n.extend({}, t.DEFAULTS, f.data(), typeof i == "object" && i);
7342 u || f.data("bs.modal", u = new t(this, e));
7343 typeof i == "string" ? u[i](r) : e.show && u.show(r)
7344 })
7345 };
7346 n.fn.modal.Constructor = t;
7347 n.fn.modal.noConflict = function() {
7348 return n.fn.modal = i, this
7349 };
7350 n(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(t) {
7351 var i = n(this),
7352 r = i.attr("href"),
7353 u = n(i.attr("data-target") || r && r.replace(/.*(?=#[^\s]+$)/, "")),
7354 f = u.data("modal") ? "toggle" : n.extend({
7355 remote: !/#/.test(r) && r
7356 }, u.data(), i.data());
7357 t.preventDefault();
7358 u.modal(f, this).one("hide", function() {
7359 i.is(":visible") && i.focus()
7360 })
7361 });
7362 n(document).on("show.bs.modal", ".modal", function() {
7363 n(document.body).addClass("modal-open")
7364 }).on("hidden.bs.modal", ".modal", function() {
7365 n(document.body).removeClass("modal-open")
7366 })
7367 }(jQuery), + function(n) {
7368 "use strict";
7369 var t = function(n, t) {
7370 this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null;
7371 this.init("tooltip", n, t)
7372 },
7373 i;
7374 t.DEFAULTS = {
7375 animation: !0,
7376 placement: "top",
7377 selector: !1,
7378 template: '<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',
7379 trigger: "hover focus",
7380 title: "",
7381 delay: 0,
7382 html: !1,
7383 container: !1
7384 };
7385 t.prototype.init = function(t, i, r) {
7386 var f, e, u, o, s;
7387 for (this.enabled = !0, this.type = t, this.$element = n(i), this.options = this.getOptions(r), f = this.options.trigger.split(" "), e = f.length; e--;)
7388 if (u = f[e], u == "click") this.$element.on("click." + this.type, this.options.selector, n.proxy(this.toggle, this));
7389 else if (u != "manual") {
7390 o = u == "hover" ? "mouseenter" : "focus";
7391 s = u == "hover" ? "mouseleave" : "blur";
7392 this.$element.on(o + "." + this.type, this.options.selector, n.proxy(this.enter, this));
7393 this.$element.on(s + "." + this.type, this.options.selector, n.proxy(this.leave, this))
7394 }
7395 this.options.selector ? this._options = n.extend({}, this.options, {
7396 trigger: "manual",
7397 selector: ""
7398 }) : this.fixTitle()
7399 };
7400 t.prototype.getDefaults = function() {
7401 return t.DEFAULTS
7402 };
7403 t.prototype.getOptions = function(t) {
7404 return t = n.extend({}, this.getDefaults(), this.$element.data(), t), t.delay && typeof t.delay == "number" && (t.delay = {
7405 show: t.delay,
7406 hide: t.delay
7407 }), t
7408 };
7409 t.prototype.getDelegateOptions = function() {
7410 var t = {},
7411 i = this.getDefaults();
7412 return this._options && n.each(this._options, function(n, r) {
7413 i[n] != r && (t[n] = r)
7414 }), t
7415 };
7416 t.prototype.enter = function(t) {
7417 var i = t instanceof this.constructor ? t : n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
7418 if (clearTimeout(i.timeout), i.hoverState = "in", !i.options.delay || !i.options.delay.show) return i.show();
7419 i.timeout = setTimeout(function() {
7420 i.hoverState == "in" && i.show()
7421 }, i.options.delay.show)
7422 };
7423 t.prototype.leave = function(t) {
7424 var i = t instanceof this.constructor ? t : n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
7425 if (clearTimeout(i.timeout), i.hoverState = "out", !i.options.delay || !i.options.delay.hide) return i.hide();
7426 i.timeout = setTimeout(function() {
7427 i.hoverState == "out" && i.hide()
7428 }, i.options.delay.hide)
7429 };
7430 t.prototype.show = function() {
7431 var o = n.Event("show.bs." + this.type),
7432 i, l;
7433 if (this.hasContent() && this.enabled) {
7434 if (this.$element.trigger(o), o.isDefaultPrevented()) return;
7435 i = this.tip();
7436 this.setContent();
7437 this.options.animation && i.addClass("fade");
7438 var t = typeof this.options.placement == "function" ? this.options.placement.call(this, i[0], this.$element[0]) : this.options.placement,
7439 s = /\s?auto?\s?/i,
7440 h = s.test(t);
7441 h && (t = t.replace(s, "") || "top");
7442 i.detach().css({
7443 top: 0,
7444 left: 0,
7445 display: "block"
7446 }).addClass(t);
7447 this.options.container ? i.appendTo(this.options.container) : i.insertAfter(this.$element);
7448 var r = this.getPosition(),
7449 u = i[0].offsetWidth,
7450 f = i[0].offsetHeight;
7451 if (h) {
7452 var e = this.$element.parent(),
7453 a = t,
7454 c = document.documentElement.scrollTop || document.body.scrollTop,
7455 v = this.options.container == "body" ? window.innerWidth : e.outerWidth(),
7456 y = this.options.container == "body" ? window.innerHeight : e.outerHeight(),
7457 p = this.options.container == "body" ? 0 : e.offset().left;
7458 t = t == "bottom" && r.top + r.height + f - c > y ? "top" : t == "top" && r.top - c - f < 0 ? "bottom" : t == "right" && r.right + u > v ? "left" : t == "left" && r.left - u < p ? "right" : t;
7459 i.removeClass(a).addClass(t)
7460 }
7461 l = this.getCalculatedOffset(t, r, u, f);
7462 this.applyPlacement(l, t);
7463 this.$element.trigger("shown.bs." + this.type)
7464 }
7465 };
7466 t.prototype.applyPlacement = function(n, t) {
7467 var h, i = this.tip(),
7468 c = i[0].offsetWidth,
7469 f = i[0].offsetHeight,
7470 e = parseInt(i.css("margin-top"), 10),
7471 o = parseInt(i.css("margin-left"), 10),
7472 u, r, s;
7473 isNaN(e) && (e = 0);
7474 isNaN(o) && (o = 0);
7475 n.top = n.top + e;
7476 n.left = n.left + o;
7477 i.offset(n).addClass("in");
7478 u = i[0].offsetWidth;
7479 r = i[0].offsetHeight;
7480 t == "top" && r != f && (h = !0, n.top = n.top + f - r);
7481 /bottom|top/.test(t) ? (s = 0, n.left < 0 && (s = n.left * -2, n.left = 0, i.offset(n), u = i[0].offsetWidth, r = i[0].offsetHeight), this.replaceArrow(s - c + u, u, "left")) : this.replaceArrow(r - f, r, "top");
7482 h && i.offset(n)
7483 };
7484 t.prototype.replaceArrow = function(n, t, i) {
7485 this.arrow().css(i, n ? 50 * (1 - n / t) + "%" : "")
7486 };
7487 t.prototype.setContent = function() {
7488 var n = this.tip(),
7489 t = this.getTitle();
7490 n.find(".tooltip-inner")[this.options.html ? "html" : "text"](t);
7491 n.removeClass("fade in top bottom left right")
7492 };
7493 t.prototype.hide = function() {
7494 function r() {
7495 u.hoverState != "in" && t.detach()
7496 }
7497 var u = this,
7498 t = this.tip(),
7499 i = n.Event("hide.bs." + this.type);
7500 if (this.$element.trigger(i), !i.isDefaultPrevented()) return t.removeClass("in"), n.support.transition && this.$tip.hasClass("fade") ? t.one(n.support.transition.end, r).emulateTransitionEnd(150) : r(), this.$element.trigger("hidden.bs." + this.type), this
7501 };
7502 t.prototype.fixTitle = function() {
7503 var n = this.$element;
7504 (n.attr("title") || typeof n.attr("data-original-title") != "string") && n.attr("data-original-title", n.attr("title") || "").attr("title", "")
7505 };
7506 t.prototype.hasContent = function() {
7507 return this.getTitle()
7508 };
7509 t.prototype.getPosition = function() {
7510 var t = this.$element[0];
7511 return n.extend({}, typeof t.getBoundingClientRect == "function" ? t.getBoundingClientRect() : {
7512 width: t.offsetWidth,
7513 height: t.offsetHeight
7514 }, this.$element.offset())
7515 };
7516 t.prototype.getCalculatedOffset = function(n, t, i, r) {
7517 return n == "bottom" ? {
7518 top: t.top + t.height,
7519 left: t.left + t.width / 2 - i / 2
7520 } : n == "top" ? {
7521 top: t.top - r,
7522 left: t.left + t.width / 2 - i / 2
7523 } : n == "left" ? {
7524 top: t.top + t.height / 2 - r / 2,
7525 left: t.left - i
7526 } : {
7527 top: t.top + t.height / 2 - r / 2,
7528 left: t.left + t.width
7529 }
7530 };
7531 t.prototype.getTitle = function() {
7532 var t = this.$element,
7533 n = this.options;
7534 return t.attr("data-original-title") || (typeof n.title == "function" ? n.title.call(t[0]) : n.title)
7535 };
7536 t.prototype.tip = function() {
7537 return this.$tip = this.$tip || n(this.options.template)
7538 };
7539 t.prototype.arrow = function() {
7540 return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
7541 };
7542 t.prototype.validate = function() {
7543 this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null)
7544 };
7545 t.prototype.enable = function() {
7546 this.enabled = !0
7547 };
7548 t.prototype.disable = function() {
7549 this.enabled = !1
7550 };
7551 t.prototype.toggleEnabled = function() {
7552 this.enabled = !this.enabled
7553 };
7554 t.prototype.toggle = function(t) {
7555 var i = t ? n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
7556 i.tip().hasClass("in") ? i.leave(i) : i.enter(i)
7557 };
7558 t.prototype.destroy = function() {
7559 this.hide().$element.off("." + this.type).removeData("bs." + this.type)
7560 };
7561 i = n.fn.tooltip;
7562 n.fn.tooltip = function(i) {
7563 return this.each(function() {
7564 var u = n(this),
7565 r = u.data("bs.tooltip"),
7566 f = typeof i == "object" && i;
7567 r || u.data("bs.tooltip", r = new t(this, f));
7568 typeof i == "string" && r[i]()
7569 })
7570 };
7571 n.fn.tooltip.Constructor = t;
7572 n.fn.tooltip.noConflict = function() {
7573 return n.fn.tooltip = i, this
7574 }
7575 }(jQuery), + function(n) {
7576 "use strict";
7577 var t = function(n, t) {
7578 this.init("popover", n, t)
7579 },
7580 i;
7581 if (!n.fn.tooltip) throw new Error("Popover requires tooltip.js");
7582 t.DEFAULTS = n.extend({}, n.fn.tooltip.Constructor.DEFAULTS, {
7583 placement: "right",
7584 trigger: "click",
7585 content: "",
7586 template: '<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'
7587 });
7588 t.prototype = n.extend({}, n.fn.tooltip.Constructor.prototype);
7589 t.prototype.constructor = t;
7590 t.prototype.getDefaults = function() {
7591 return t.DEFAULTS
7592 };
7593 t.prototype.setContent = function() {
7594 var n = this.tip(),
7595 t = this.getTitle(),
7596 i = this.getContent();
7597 n.find(".popover-title")[this.options.html ? "html" : "text"](t);
7598 n.find(".popover-content")[this.options.html ? "html" : "text"](i);
7599 n.removeClass("fade top bottom left right in");
7600 n.find(".popover-title").html() || n.find(".popover-title").hide()
7601 };
7602 t.prototype.hasContent = function() {
7603 return this.getTitle() || this.getContent()
7604 };
7605 t.prototype.getContent = function() {
7606 var t = this.$element,
7607 n = this.options;
7608 return t.attr("data-content") || (typeof n.content == "function" ? n.content.call(t[0]) : n.content)
7609 };
7610 t.prototype.arrow = function() {
7611 return this.$arrow = this.$arrow || this.tip().find(".arrow")
7612 };
7613 t.prototype.tip = function() {
7614 return this.$tip || (this.$tip = n(this.options.template)), this.$tip
7615 };
7616 i = n.fn.popover;
7617 n.fn.popover = function(i) {
7618 return this.each(function() {
7619 var u = n(this),
7620 r = u.data("bs.popover"),
7621 f = typeof i == "object" && i;
7622 r || u.data("bs.popover", r = new t(this, f));
7623 typeof i == "string" && r[i]()
7624 })
7625 };
7626 n.fn.popover.Constructor = t;
7627 n.fn.popover.noConflict = function() {
7628 return n.fn.popover = i, this
7629 }
7630 }(jQuery), + function(n) {
7631 "use strict";
7632 var t = function(i, r) {
7633 this.$element = n(i);
7634 this.options = n.extend({}, t.DEFAULTS, r);
7635 this.transitioning = null;
7636 this.options.parent && (this.$parent = n(this.options.parent));
7637 this.options.toggle && this.toggle()
7638 },
7639 i;
7640 t.DEFAULTS = {
7641 toggle: !0
7642 };
7643 t.prototype.dimension = function() {
7644 var n = this.$element.hasClass("width");
7645 return n ? "width" : "height"
7646 };
7647 t.prototype.show = function() {
7648 var u, t, r, i, f, e;
7649 if (!this.transitioning && !this.$element.hasClass("in") && (u = n.Event("show.bs.collapse"), this.$element.trigger(u), !u.isDefaultPrevented())) {
7650 if (t = this.$parent && this.$parent.find("> .panel > .in"), t && t.length) {
7651 if (r = t.data("bs.collapse"), r && r.transitioning) return;
7652 t.collapse("hide");
7653 r || t.data("bs.collapse", null)
7654 }
7655 if (i = this.dimension(), this.$element.removeClass("collapse").addClass("collapsing")[i](0), this.transitioning = 1, f = function() {
7656 this.$element.removeClass("collapsing").addClass("in")[i]("auto");
7657 this.transitioning = 0;
7658 this.$element.trigger("shown.bs.collapse")
7659 }, !n.support.transition) return f.call(this);
7660 e = n.camelCase(["scroll", i].join("-"));
7661 this.$element.one(n.support.transition.end, n.proxy(f, this)).emulateTransitionEnd(350)[i](this.$element[0][e])
7662 }
7663 };
7664 t.prototype.hide = function() {
7665 var i, t, r;
7666 if (!this.transitioning && this.$element.hasClass("in") && (i = n.Event("hide.bs.collapse"), this.$element.trigger(i), !i.isDefaultPrevented())) {
7667 if (t = this.dimension(), this.$element[t](this.$element[t]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"), this.transitioning = 1, r = function() {
7668 this.transitioning = 0;
7669 this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")
7670 }, !n.support.transition) return r.call(this);
7671 this.$element[t](0).one(n.support.transition.end, n.proxy(r, this)).emulateTransitionEnd(350)
7672 }
7673 };
7674 t.prototype.toggle = function() {
7675 this[this.$element.hasClass("in") ? "hide" : "show"]()
7676 };
7677 i = n.fn.collapse;
7678 n.fn.collapse = function(i) {
7679 return this.each(function() {
7680 var r = n(this),
7681 u = r.data("bs.collapse"),
7682 f = n.extend({}, t.DEFAULTS, r.data(), typeof i == "object" && i);
7683 u || r.data("bs.collapse", u = new t(this, f));
7684 typeof i == "string" && u[i]()
7685 })
7686 };
7687 n.fn.collapse.Constructor = t;
7688 n.fn.collapse.noConflict = function() {
7689 return n.fn.collapse = i, this
7690 };
7691 n(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function(t) {
7692 var i = n(this),
7693 e, s = i.attr("data-target") || t.preventDefault() || (e = i.attr("href")) && e.replace(/.*(?=#[^\s]+$)/, ""),
7694 r = n(s),
7695 u = r.data("bs.collapse"),
7696 h = u ? "toggle" : i.data(),
7697 f = i.attr("data-parent"),
7698 o = f && n(f);
7699 u && u.transitioning || (o && o.find('[data-toggle=collapse][data-parent="' + f + '"]').not(i).addClass("collapsed"), i[r.hasClass("in") ? "addClass" : "removeClass"]("collapsed"));
7700 r.collapse(h)
7701 })
7702 }(jQuery), + function(n) {
7703 "use strict";
7704
7705 function t() {
7706 var i = document.createElement("bootstrap"),
7707 n = {
7708 WebkitTransition: "webkitTransitionEnd",
7709 MozTransition: "transitionend",
7710 OTransition: "oTransitionEnd otransitionend",
7711 transition: "transitionend"
7712 };
7713 for (var t in n)
7714 if (i.style[t] !== undefined) return {
7715 end: n[t]
7716 }
7717 }
7718 n.fn.emulateTransitionEnd = function(t) {
7719 var i = !1,
7720 u = this,
7721 r;
7722 n(this).one(n.support.transition.end, function() {
7723 i = !0
7724 });
7725 return r = function() {
7726 i || n(u).trigger(n.support.transition.end)
7727 }, setTimeout(r, t), this
7728 };
7729 n(function() {
7730 n.support.transition = t()
7731 })
7732 }(jQuery), typeof jQuery == "undefined") throw new Error("Bootstrap requires jQuery"); + function(n) {
7733 "use strict";
7734 var t = function(i, r) {
7735 var u, f;
7736 if (this.$element = n(i), this.$canvas = r.canvas ? n(r.canvas) : this.$element, this.options = n.extend({}, t.DEFAULTS, r), this.transitioning = null, this.calcTransform(), this.transform || (this.$canvas = this.$element), this.options.placement === "auto" && (this.options.placement = this.calcPlacement()), this.options.recalc) {
7737 this.calcClone();
7738 n(window).on("resize.bs.offcanvas", n.proxy(this.recalc, this))
7739 }
7740 if (this.options.autohide) n(document).on("click.bs.offcanvas", n.proxy(this.autohide, this));
7741 u = window.navigator.appName == "Microsoft Internet Explorer";
7742 u && this.$canvas !== this.$element && (f = this.$canvas.find("*").filter(function() {
7743 return n(this).css("position") === "fixed"
7744 }), this.$canvas = this.$canvas.add(f));
7745 this.options.toggle && this.toggle()
7746 },
7747 i;
7748 t.DEFAULTS = {
7749 toggle: !0,
7750 placement: "auto",
7751 autohide: !0,
7752 recalc: !0
7753 };
7754 t.prototype.calcTransform = function() {
7755 var t, r, i, u;
7756 if (this.transform = !1, n.support.transition || this.$canvas !== this.$element) {
7757 t = n('<div style="visibility: hidden"><\/div>');
7758 r = {
7759 transform: "transform",
7760 webkitTransform: "-webkit-transform",
7761 OTransform: "-o-transform",
7762 msTransform: "-ms-transform",
7763 MozTransform: "-moz-transform"
7764 };
7765 t.appendTo(n("body"));
7766 for (i in r)
7767 if (t[0].style[i] !== undefined) {
7768 t[0].style[i] = "translate3d(1px,1px,1px)";
7769 u = window.getComputedStyle(t[0]).getPropertyValue(r[i]);
7770 this.transform = r[i];
7771 this.translate = u.match(/^matrix3d/) ? "translate3d" : "translate";
7772 break
7773 }
7774 t.remove()
7775 }
7776 };
7777 t.prototype.calcPlacement = function() {
7778 function i(n, i) {
7779 if (t.css(i) === "auto") return n;
7780 if (t.css(n) === "auto") return i;
7781 var r = parseInt(t.css(n), 10),
7782 u = parseInt(t.css(i), 10);
7783 return r > u ? i : n
7784 }
7785 var r = n(window).width() / this.$element.width(),
7786 u = n(window).height() / this.$element.height(),
7787 t = this.$element;
7788 return r > u ? i("left", "right") : i("top", "bottom")
7789 };
7790 t.prototype.offset = function() {
7791 switch (this.options.placement) {
7792 case "left":
7793 case "right":
7794 return this.$element.outerWidth();
7795 case "top":
7796 case "bottom":
7797 return this.$element.outerHeight()
7798 }
7799 };
7800 t.prototype.slideTransform = function(t, i) {
7801 var u = this.options.placement,
7802 f = this.transform,
7803 r;
7804 if (t *= u === "right" || u === "bottom" ? -1 : 1, r = u === "left" || u === "right" ? "{}px, 0" : "0, {}px", this.translate === "translate3d" && (r += ", 0"), r = this.translate + "(" + r + ")", !n.support.transition) return this.$canvas.animate({
7805 borderSpacing: t
7806 }, {
7807 step: function(t) {
7808 n(this).css(f, r.replace("{}", t))
7809 },
7810 complete: i,
7811 duration: 350
7812 });
7813 this.$canvas.css(f, r.replace("{}", t));
7814 this.$element.one(n.support.transition.end, i).emulateTransitionEnd(350)
7815 };
7816 t.prototype.slidePosition = function(t, i) {
7817 if (!n.support.transition) {
7818 var r = {};
7819 return r[this.options.placement] = t, this.$canvas.animate(r, 350, i)
7820 }
7821 this.$canvas.css(this.options.placement, t);
7822 this.$element.one(n.support.transition.end, i).emulateTransitionEnd(350)
7823 };
7824 t.prototype.show = function() {
7825 var t, i;
7826 this.transitioning || this.$canvas.hasClass("canvas-slid") || (t = n.Event("show.bs.offcanvas"), this.$element.trigger(t), t.isDefaultPrevented()) || (i = function() {
7827 this.$canvas.addClass("canvas-slid").removeClass("canvas-sliding");
7828 this.transitioning = 0;
7829 this.$element.trigger("shown.bs.offcanvas")
7830 }, this.$element.is(":visible") && this.transform || this.$element.css(this.options.placement, -1 * this.offset() + "px"), this.$element.addClass("in"), this.$canvas.addClass("canvas-sliding"), this.$canvas != this.$element && n("body").css("overflow-x", "hidden"), this.transitioning = 1, this.transform ? this.slideTransform(this.offset(), n.proxy(i, this)) : this.slidePosition(0, n.proxy(i, this)))
7831 };
7832 t.prototype.hide = function(t) {
7833 var r, i;
7834 if (!this.transitioning && this.$canvas.hasClass("canvas-slid") && (r = n.Event("hide.bs.offcanvas"), this.$element.trigger(r), !r.isDefaultPrevented())) {
7835 if (i = function() {
7836 this.transitioning = 0;
7837 this.$element.removeClass("in").css("left", "").css("right", "").css("top", "").css("bottom", "");
7838 this.$canvas.removeClass("canvas-sliding canvas-slid").css("transform", "");
7839 n("body").css("overflow-x", "");
7840 this.$element.trigger("hidden.bs.offcanvas")
7841 }, t) return i.call(this);
7842 this.$canvas.removeClass("canvas-slid").addClass("canvas-sliding");
7843 this.transitioning = 1;
7844 this.transform ? this.slideTransform(0, n.proxy(i, this)) : this.slidePosition(-1 * this.offset(), n.proxy(i, this))
7845 }
7846 };
7847 t.prototype.toggle = function() {
7848 this[this.$canvas.hasClass("canvas-slid") ? "hide" : "show"]()
7849 };
7850 t.prototype.calcClone = function() {
7851 this.$calcClone = this.$element.clone().html("").addClass("offcanvas-clone").removeClass("in").appendTo(n("body"))
7852 };
7853 t.prototype.recalc = function() {
7854 this.$calcClone.css("display") !== "none" && this.hide(!0)
7855 };
7856 t.prototype.autohide = function(t) {
7857 n(t.target).closest(this.$element).length === 0 && this.hide()
7858 };
7859 i = n.fn.offcanvas;
7860 n.fn.offcanvas = function(i) {
7861 return this.each(function() {
7862 var r = n(this),
7863 u = r.data("bs.offcanvas"),
7864 f = n.extend({}, t.DEFAULTS, r.data(), typeof i == "object" && i);
7865 u || r.data("bs.offcanvas", u = new t(this, f));
7866 typeof i == "string" && u[i]()
7867 })
7868 };
7869 n.fn.offcanvas.Constructor = t;
7870 n.fn.offcanvas.noConflict = function() {
7871 return n.fn.offcanvas = i, this
7872 };
7873 n(document).on("click.bs.offcanvas.data-api", "[data-toggle=offcanvas]", function(t) {
7874 var i = n(this),
7875 u, e = i.attr("data-target") || t.preventDefault() || (u = i.attr("href")) && u.replace(/.*(?=#[^\s]+$)/, ""),
7876 f = n(e),
7877 r = f.data("bs.offcanvas"),
7878 o = r ? "toggle" : i.data();
7879 t.stopPropagation();
7880 r ? r.toggle() : f.offcanvas(o)
7881 })
7882}(window.jQuery); + function(n) {
7883 "use strict";
7884 var t = function(i, r) {
7885 this.$element = n(i);
7886 this.options = n.extend({}, t.DEFAULTS, r);
7887 this.$element.on("click.bs.rowlink", "td:not(.rowlink-skip)", n.proxy(this.click, this))
7888 };
7889 t.DEFAULTS = {
7890 target: "a"
7891 };
7892 t.prototype.click = function(t) {
7893 var i = n(t.currentTarget).closest("tr").find(this.options.target)[0],
7894 r;
7895 n(t.target)[0] !== i && (t.preventDefault(), i.click ? i.click() : document.createEvent && (r = document.createEvent("MouseEvents"), r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), i.dispatchEvent(r)))
7896 };
7897 n.fn.rowlink = function(i) {
7898 return this.each(function() {
7899 var r = n(this),
7900 u = r.data("rowlink");
7901 u || r.data("rowlink", u = new t(this, i))
7902 })
7903 };
7904 n.fn.rowlink.Constructor = t;
7905 n.fn.rowlink.noConflict = function() {
7906 return n.fn.inputmask = old, this
7907 };
7908 n(document).on("click.bs.rowlink.data-api", '[data-link="row"]', function(t) {
7909 var i = n(this);
7910 i.data("rowlink") || (i.rowlink(i.data()), n(t.target).trigger("click.bs.rowlink"))
7911 })
7912}(window.jQuery); + function(n) {
7913 "use strict";
7914 var r = window.orientation !== undefined,
7915 u = navigator.userAgent.toLowerCase().indexOf("android") > -1,
7916 f = window.navigator.appName == "Microsoft Internet Explorer",
7917 t = function(i, r) {
7918 u || (this.$element = n(i), this.options = n.extend({}, t.DEFAULS, r), this.mask = String(this.options.mask), this.init(), this.listen(), this.checkVal())
7919 },
7920 i;
7921 t.DEFAULS = {
7922 mask: "",
7923 placeholder: "_",
7924 definitions: {
7925 "9": "[0-9]",
7926 a: "[A-Za-z]",
7927 "?": "[A-Za-z0-9]",
7928 "*": "."
7929 }
7930 };
7931 t.prototype.init = function() {
7932 var t = this.options.definitions,
7933 i = this.mask.length;
7934 this.tests = [];
7935 this.partialPosition = this.mask.length;
7936 this.firstNonMaskPos = null;
7937 n.each(this.mask.split(""), n.proxy(function(n, r) {
7938 r == "?" ? (i--, this.partialPosition = n) : t[r] ? (this.tests.push(new RegExp(t[r])), this.firstNonMaskPos === null && (this.firstNonMaskPos = this.tests.length - 1)) : this.tests.push(null)
7939 }, this));
7940 this.buffer = n.map(this.mask.split(""), n.proxy(function(n) {
7941 if (n != "?") return t[n] ? this.options.placeholder : n
7942 }, this));
7943 this.focusText = this.$element.val();
7944 this.$element.data("rawMaskFn", n.proxy(function() {
7945 return n.map(this.buffer, function(n, t) {
7946 return this.tests[t] && n != this.options.placeholder ? n : null
7947 }).join("")
7948 }, this))
7949 };
7950 t.prototype.listen = function() {
7951 if (!this.$element.attr("readonly")) {
7952 var t = (f ? "paste" : "input") + ".mask";
7953 this.$element.on("unmask.bs.inputmask", n.proxy(this.unmask, this)).on("focus.bs.inputmask", n.proxy(this.focusEvent, this)).on("blur.bs.inputmask", n.proxy(this.blurEvent, this)).on("keydown.bs.inputmask", n.proxy(this.keydownEvent, this)).on("keypress.bs.inputmask", n.proxy(this.keypressEvent, this)).on(t, n.proxy(this.pasteEvent, this))
7954 }
7955 };
7956 t.prototype.caret = function(n, t) {
7957 if (this.$element.length !== 0) {
7958 if (typeof n == "number") return t = typeof t == "number" ? t : n, this.$element.each(function() {
7959 if (this.setSelectionRange) this.setSelectionRange(n, t);
7960 else if (this.createTextRange) {
7961 var i = this.createTextRange();
7962 i.collapse(!0);
7963 i.moveEnd("character", t);
7964 i.moveStart("character", n);
7965 i.select()
7966 }
7967 });
7968 if (this.$element[0].setSelectionRange) n = this.$element[0].selectionStart, t = this.$element[0].selectionEnd;
7969 else if (document.selection && document.selection.createRange) {
7970 var i = document.selection.createRange();
7971 n = 0 - i.duplicate().moveStart("character", -1e5);
7972 t = n + i.text.length
7973 }
7974 return {
7975 begin: n,
7976 end: t
7977 }
7978 }
7979 };
7980 t.prototype.seekNext = function(n) {
7981 for (var t = this.mask.length; ++n <= t && !this.tests[n];);
7982 return n
7983 };
7984 t.prototype.seekPrev = function(n) {
7985 while (--n >= 0 && !this.tests[n]);
7986 return n
7987 };
7988 t.prototype.shiftL = function(n, t) {
7989 var u = this.mask.length,
7990 r, i;
7991 if (!(n < 0)) {
7992 for (r = n, i = this.seekNext(t); r < u; r++)
7993 if (this.tests[r]) {
7994 if (i < u && this.tests[r].test(this.buffer[i])) this.buffer[r] = this.buffer[i], this.buffer[i] = this.options.placeholder;
7995 else break;
7996 i = this.seekNext(i)
7997 }
7998 this.writeBuffer();
7999 this.caret(Math.max(this.firstNonMaskPos, n))
8000 }
8001 };
8002 t.prototype.shiftR = function(n) {
8003 for (var i, r, u = this.mask.length, t = n, f = this.options.placeholder; t < u; t++)
8004 if (this.tests[t])
8005 if (i = this.seekNext(t), r = this.buffer[t], this.buffer[t] = f, i < u && this.tests[i].test(r)) f = r;
8006 else break
8007 };
8008 t.prototype.unmask = function() {
8009 this.$element.unbind(".mask").removeData("inputmask")
8010 };
8011 t.prototype.focusEvent = function() {
8012 var r, n, t, i;
8013 this.focusText = this.$element.val();
8014 r = this.mask.length;
8015 n = this.checkVal();
8016 this.writeBuffer();
8017 t = this;
8018 i = function() {
8019 n == r ? t.caret(0, n) : t.caret(n)
8020 };
8021 i();
8022 setTimeout(i, 50)
8023 };
8024 t.prototype.blurEvent = function() {
8025 this.checkVal();
8026 this.$element.val() !== this.focusText && this.$element.trigger("change")
8027 };
8028 t.prototype.keydownEvent = function(n) {
8029 var i = n.which;
8030 if (i == 8 || i == 46 || r && i == 127) {
8031 var f = this.caret(),
8032 u = f.begin,
8033 t = f.end;
8034 return t - u == 0 && (u = i != 46 ? this.seekPrev(u) : t = this.seekNext(u - 1), t = i == 46 ? this.seekNext(t) : t), this.clearBuffer(u, t), this.shiftL(u, t - 1), !1
8035 }
8036 if (i == 27) return this.$element.val(this.focusText), this.caret(0, this.checkVal()), !1
8037 };
8038 t.prototype.keypressEvent = function(n) {
8039 var e = this.mask.length,
8040 r = n.which,
8041 t = this.caret(),
8042 i, u, f;
8043 return n.ctrlKey || n.altKey || n.metaKey || r < 32 ? !0 : r ? (t.end - t.begin != 0 && (this.clearBuffer(t.begin, t.end), this.shiftL(t.begin, t.end - 1)), i = this.seekNext(t.begin - 1), i < e && (u = String.fromCharCode(r), this.tests[i].test(u) && (this.shiftR(i), this.buffer[i] = u, this.writeBuffer(), f = this.seekNext(i), this.caret(f))), !1) : void 0
8044 };
8045 t.prototype.pasteEvent = function() {
8046 var n = this;
8047 setTimeout(function() {
8048 n.caret(n.checkVal(!0))
8049 }, 0)
8050 };
8051 t.prototype.clearBuffer = function(n, t) {
8052 for (var r = this.mask.length, i = n; i < t && i < r; i++) this.tests[i] && (this.buffer[i] = this.options.placeholder)
8053 };
8054 t.prototype.writeBuffer = function() {
8055 return this.$element.val(this.buffer.join("")).val()
8056 };
8057 t.prototype.checkVal = function(n) {
8058 for (var f, e = this.mask.length, u = this.$element.val(), i = -1, t = 0, r = 0; t < e; t++)
8059 if (this.tests[t]) {
8060 for (this.buffer[t] = this.options.placeholder; r++ < u.length;)
8061 if (f = u.charAt(r - 1), this.tests[t].test(f)) {
8062 this.buffer[t] = f;
8063 i = t;
8064 break
8065 }
8066 if (r > u.length) break
8067 } else this.buffer[t] == u.charAt(r) && t != this.partialPosition && (r++, i = t);
8068 return !n && i + 1 < this.partialPosition ? (this.$element.val(""), this.clearBuffer(0, e)) : (n || i + 1 >= this.partialPosition) && (this.writeBuffer(), n || this.$element.val(this.$element.val().substring(0, i + 1))), this.partialPosition ? t : this.firstNonMaskPos
8069 };
8070 i = n.fn.inputmask;
8071 n.fn.inputmask = function(i) {
8072 return this.each(function() {
8073 var r = n(this),
8074 u = r.data("inputmask");
8075 u || r.data("inputmask", u = new t(this, i))
8076 })
8077 };
8078 n.fn.inputmask.Constructor = t;
8079 n.fn.inputmask.noConflict = function() {
8080 return n.fn.inputmask = i, this
8081 };
8082 n(document).on("focus.bs.inputmask.data-api", "[data-mask]", function() {
8083 var t = n(this);
8084 t.data("inputmask") || t.inputmask(t.data())
8085 })
8086}(window.jQuery); + function(n) {
8087 "use strict";
8088 var i = window.navigator.appName == "Microsoft Internet Explorer",
8089 t = function(t, i) {
8090 if (this.$element = n(t), this.$input = this.$element.find(":file"), this.$input.length !== 0) {
8091 this.name = this.$input.attr("name") || i.name;
8092 this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]');
8093 this.$hidden.length === 0 && (this.$hidden = n('<input type="hidden" />'), this.$element.prepend(this.$hidden));
8094 this.$preview = this.$element.find(".fileinput-preview");
8095 var r = this.$preview.css("height");
8096 this.$preview.css("display") != "inline" && r != "0px" && r != "none" && this.$preview.css("line-height", r);
8097 this.original = {
8098 exists: this.$element.hasClass("fileinput-exists"),
8099 preview: this.$preview.html(),
8100 hiddenVal: this.$hidden.val()
8101 };
8102 this.listen()
8103 }
8104 };
8105 t.prototype.listen = function() {
8106 this.$input.on("change.bs.fileinput", n.proxy(this.change, this));
8107 n(this.$input[0].form).on("reset.bs.fileinput", n.proxy(this.reset, this));
8108 this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput", n.proxy(this.trigger, this));
8109 this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput", n.proxy(this.clear, this))
8110 };
8111 t.prototype.change = function(t) {
8112 var i;
8113 if (t.target.files === undefined && (t.target.files = t.target && t.target.value ? [{
8114 name: t.target.value.replace(/^.+\\/, "")
8115 }] : []), t.target.files.length !== 0)
8116 if (this.$hidden.val(""), this.$hidden.attr("name", ""), this.$input.attr("name", this.name), i = t.target.files[0], this.$preview.length > 0 && (typeof i.type != "undefined" ? i.type.match("image.*") : i.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader != "undefined") {
8117 var f = new FileReader,
8118 r = this.$preview,
8119 u = this.$element;
8120 f.onload = function(f) {
8121 var e = n("<img>").attr("src", f.target.result);
8122 t.target.files[0].result = f.target.result;
8123 u.find(".fileinput-filename").text(i.name);
8124 r.css("max-height") != "none" && e.css("max-height", parseInt(r.css("max-height"), 10) - parseInt(r.css("padding-top"), 10) - parseInt(r.css("padding-bottom"), 10) - parseInt(r.css("border-top"), 10) - parseInt(r.css("border-bottom"), 10));
8125 r.html(e);
8126 u.addClass("fileinput-exists").removeClass("fileinput-new");
8127 u.trigger("change.bs.fileinput", t.target.files)
8128 };
8129 f.readAsDataURL(i)
8130 } else this.$element.find(".fileinput-filename").text(i.name), this.$preview.text(i.name), this.$element.addClass("fileinput-exists").removeClass("fileinput-new"), this.$element.trigger("change.bs.fileinput")
8131 };
8132 t.prototype.clear = function(n) {
8133 if (n && n.preventDefault(), this.$hidden.val(""), this.$hidden.attr("name", this.name), this.$input.attr("name", ""), i) {
8134 var t = this.$input.clone(!0);
8135 this.$input.after(t);
8136 this.$input.remove();
8137 this.$input = t
8138 } else this.$input.val("");
8139 this.$preview.html("");
8140 this.$element.find(".fileinput-filename").text("");
8141 this.$element.addClass("fileinput-new").removeClass("fileinput-exists");
8142 n !== !1 && (this.$input.trigger("change"), this.$element.trigger("clear.bs.fileinput"))
8143 };
8144 t.prototype.reset = function() {
8145 this.clear(!1);
8146 this.$hidden.val(this.original.hiddenVal);
8147 this.$preview.html(this.original.preview);
8148 this.$element.find(".fileinput-filename").text("");
8149 this.original.exists ? this.$element.addClass("fileinput-exists").removeClass("fileinput-new") : this.$element.addClass("fileinput-new").removeClass("fileinput-exists");
8150 this.$element.trigger("reset.bs.fileinput")
8151 };
8152 t.prototype.trigger = function(n) {
8153 this.$input.trigger("click");
8154 n.preventDefault()
8155 };
8156 n.fn.fileinput = function(i) {
8157 return this.each(function() {
8158 var u = n(this),
8159 r = u.data("fileinput");
8160 r || u.data("fileinput", r = new t(this, i));
8161 typeof i == "string" && r[i]()
8162 })
8163 };
8164 n.fn.fileinput.Constructor = t;
8165 n(document).on("click.fileinput.data-api", '[data-provides="fileinput"]', function(t) {
8166 var i = n(this),
8167 r;
8168 i.data("fileinput") || (i.fileinput(i.data()), r = n(t.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]'), r.length > 0 && (t.preventDefault(), r.trigger("click.bs.fileinput")))
8169 })
8170}(window.jQuery);
8171saveAs = saveAs || navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator) || function(n) {
8172 "use strict";
8173 if (!/MSIE [1-9]\./.test(navigator.userAgent)) {
8174 var i = n.document,
8175 l = function() {
8176 return n.URL || n.webkitURL || n
8177 },
8178 a = n.URL || n.webkitURL || n,
8179 r = i.createElementNS("http://www.w3.org/1999/xhtml", "a"),
8180 v = !n.externalHost && "download" in r,
8181 b = function(t) {
8182 var r = i.createEvent("MouseEvents");
8183 r.initMouseEvent("click", !0, !1, n, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null);
8184 t.dispatchEvent(r)
8185 },
8186 f = n.webkitRequestFileSystem,
8187 s = n.requestFileSystem || f || n.mozRequestFileSystem,
8188 y = function(t) {
8189 (n.setImmediate || n.setTimeout)(function() {
8190 throw t;
8191 }, 0)
8192 },
8193 e = "application/octet-stream",
8194 h = 0,
8195 u = [],
8196 p = function() {
8197 for (var t = u.length, n; t--;) n = u[t], typeof n == "string" ? a.revokeObjectURL(n) : n.remove();
8198 u.length = 0
8199 },
8200 o = function(n, t, i) {
8201 var r, u;
8202 for (t = [].concat(t), r = t.length; r--;)
8203 if (u = n["on" + t[r]], typeof u == "function") try {
8204 u.call(n, i || n)
8205 } catch (f) {
8206 y(f)
8207 }
8208 },
8209 c = function(t, c) {
8210 var a = this,
8211 k = t.type,
8212 g = !1,
8213 p, b, nt = function() {
8214 var n = l().createObjectURL(t);
8215 return u.push(n), n
8216 },
8217 tt = function() {
8218 o(a, "writestart progress write writeend".split(" "))
8219 },
8220 y = function() {
8221 (g || !p) && (p = nt(t));
8222 b ? b.location.href = p : window.open(p, "_blank");
8223 a.readyState = a.DONE;
8224 tt()
8225 },
8226 w = function(n) {
8227 return function() {
8228 if (a.readyState !== a.DONE) return n.apply(this, arguments)
8229 }
8230 },
8231 it = {
8232 create: !0,
8233 exclusive: !1
8234 },
8235 rt, d;
8236 if (a.readyState = a.INIT, c || (c = "download"), v) {
8237 p = nt(t);
8238 i = n.document;
8239 r = i.createElementNS("http://www.w3.org/1999/xhtml", "a");
8240 r.href = p;
8241 r.download = c;
8242 d = i.createEvent("MouseEvents");
8243 d.initMouseEvent("click", !0, !1, n, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null);
8244 r.dispatchEvent(d);
8245 a.readyState = a.DONE;
8246 tt();
8247 return
8248 }
8249 if (n.chrome && k && k !== e && (rt = t.slice || t.webkitSlice, t = rt.call(t, 0, t.size, e), g = !0), f && c !== "download" && (c += ".download"), (k === e || f) && (b = n), !s) {
8250 y();
8251 return
8252 }
8253 h += t.size;
8254 s(n.TEMPORARY, h, w(function(n) {
8255 n.root.getDirectory("saved", it, w(function(n) {
8256 var i = function() {
8257 n.getFile(c, it, w(function(n) {
8258 n.createWriter(w(function(i) {
8259 i.onwriteend = function(t) {
8260 b.location.href = n.toURL();
8261 u.push(n);
8262 a.readyState = a.DONE;
8263 o(a, "writeend", t)
8264 };
8265 i.onerror = function() {
8266 var n = i.error;
8267 n.code !== n.ABORT_ERR && y()
8268 };
8269 "writestart progress write abort".split(" ").forEach(function(n) {
8270 i["on" + n] = a["on" + n]
8271 });
8272 i.write(t);
8273 a.abort = function() {
8274 i.abort();
8275 a.readyState = a.DONE
8276 };
8277 a.readyState = a.WRITING
8278 }), y)
8279 }), y)
8280 };
8281 n.getFile(c, {
8282 create: !1
8283 }, w(function(n) {
8284 n.remove();
8285 i()
8286 }), w(function(n) {
8287 n.code === n.NOT_FOUND_ERR ? i() : y()
8288 }))
8289 }), y)
8290 }), y)
8291 },
8292 t = c.prototype,
8293 w = function(n, t) {
8294 return new c(n, t)
8295 };
8296 return t.abort = function() {
8297 var n = this;
8298 n.readyState = n.DONE;
8299 o(n, "abort")
8300 }, t.readyState = t.INIT = 0, t.WRITING = 1, t.DONE = 2, t.error = t.onwritestart = t.onprogress = t.onwrite = t.onabort = t.onerror = t.onwriteend = null, n.addEventListener("unload", p, !1), w
8301 }
8302}(typeof self != "undefined" && self || typeof window != "undefined" && window || this.content);
8303typeof module != "undefined" && (module.exports = saveAs);
8304ColorWallet = {
8305 buildTransaction: function(n) {
8306 var i = new Bitcoin.Transaction,
8307 r, u, t, f;
8308 for (i.version = n.version, i.lock_time = n.locktime, t = 0; t < n.inputs.length; t++) r = new Bitcoin.Script(Crypto.util.hexToBytes(n.inputs[t].script)), u = new Bitcoin.TransactionIn({
8309 script: r,
8310 sequence: n.inputs[t].sequence_number,
8311 outpoint: {
8312 hash: Crypto.util.bytesToBase64(Crypto.util.hexToBytes(n.inputs[t].previous_hash).reverse()),
8313 index: n.inputs[t].previous_index
8314 }
8315 }), i.addInput(u);
8316 for (t = 0; t < n.outputs.length; t++) f = new Bitcoin.TransactionOut({
8317 script: new Bitcoin.Script(Crypto.util.hexToBytes(n.outputs[t].script)),
8318 value: Crypto.util.hexToBytes(n.outputs[t].value).reverse()
8319 }), i.addOutput(f);
8320 return i
8321 },
8322 signTransaction: function(n, t) {
8323 for (var u, f = 1, i = 0; i < n.ins.length; i++) {
8324 var e = n.ins[i].script,
8325 s = Crypto.util.bytesToHex(e.buffer),
8326 h = t[s].decryptedKey,
8327 r = new Bitcoin.ECKey(h);
8328 r.setCompressed(!0);
8329 var c = r.getPub(),
8330 l = n.hashTransactionForSignature(e, i, f),
8331 o = r.sign(l);
8332 if (o.push(f), u = Bitcoin.Script.createInputScript(o, c), u == null) throw "Error creating input script";
8333 n.ins[i].script = u
8334 }
8335 return n.getHash()
8336 },
8337 hashPassword: function(n, t) {
8338 return Crypto.HMAC(Crypto.SHA256, Crypto.util.hexToBytes(t), n)
8339 },
8340 hashPasswordToForm: function(n, t, i) {
8341 var u = ColorWallet.hashPassword(t, i),
8342 r = $("input[name='passwordHash']", n);
8343 r.size() == 0 && (r = $("<input type='hidden' name='passwordHash' />"), n.append(r));
8344 r.val(u)
8345 },
8346 encryptPrivateKeys: function(n, t, i, r, u) {
8347 function f(n) {
8348 var u, i;
8349 for (u in t) i = t[u], i.privateKey = Crypto.AES.encrypt(i.decryptedKey, n, {
8350 asBytes: !1
8351 });
8352 r(t)
8353 }
8354 Crypto.PBKDF2Async(n, Crypto.util.hexToBytes(i), 32, f, {
8355 iterations: ColorWallet.walletEncryptionMode.iterations,
8356 hasher: Crypto.SHA256,
8357 onProgressChange: u,
8358 asBytes: !0
8359 })
8360 },
8361 encryptPrivateKey: function(n, t, i, r, u) {
8362 function o() {
8363 r(f[""].privateKey)
8364 }
8365 var e = t.priv.toByteArrayUnsigned(),
8366 f = {
8367 "": {
8368 decryptedKey: e
8369 }
8370 };
8371 this.encryptPrivateKeys(n, f, i, o, u)
8372 },
8373 decryptPrivateKey: function(n, t, i, r, u) {
8374 function f(n) {
8375 var u, t;
8376 for (u in i) t = i[u], t.decryptedKey = Crypto.AES.decrypt(Crypto.util.hexToBytes(t.privateKey), n, {
8377 asBytes: !0
8378 });
8379 r(i)
8380 }
8381 Crypto.PBKDF2Async(n, Crypto.util.hexToBytes(t), 32, f, {
8382 iterations: ColorWallet.walletEncryptionMode.iterations,
8383 hasher: Crypto.SHA256,
8384 onProgressChange: u,
8385 asBytes: !0
8386 })
8387 },
8388 walletEncryptionMode: {
8389 mode: "PKBDF2-SHA256",
8390 iterations: 2e3
8391 }
8392};
8393startup = function() {
8394 global = {};
8395 $("[js-var]").each(function() {
8396 global[$(this).attr("js-var")] = JSON.parse($(this).text())
8397 });
8398 setupAssetPopup($(document));
8399 $(".address-card h4").click(function() {
8400 var i = $(this)[0],
8401 t, n;
8402 document.selection ? (n = document.body.createTextRange(), n.moveToElementText(i), n.select()) : window.getSelection && (t = window.getSelection(), n = document.createRange(), n.selectNodeContents(i), t.removeAllRanges(), t.addRange(n))
8403 });
8404 $(".address-card .dropdown-menu a").click(function(n) {
8405 var t = $(this).attr("switch"),
8406 i = $(this).closest(".address-card");
8407 $("[address-type]").addClass("hide");
8408 $("[address-type='" + t + "']").removeClass("hide");
8409 $(".drop-down-text", i).text($(this).text());
8410 n.preventDefault()
8411 });
8412 $(".save-as").click(function() {
8413 var n = $(this).attr("save-as-field"),
8414 t = new Blob([$(n).val()], {
8415 type: "text/plain;charset=utf-8"
8416 });
8417 return saveAs(t, $(this).attr("save-as-filename")), !1
8418 })
8419};
8420$(document).ready(startup);
8421startup = function() {
8422 var n = !1;
8423 $(".generate-address").submit(function() {
8424 var r = $(this),
8425 t, u, i, f, e;
8426 if (!n && ($("select#addressType").size() == 0 || $("select#addressType option:selected").val() == "online")) return $("button[type='submit']", r).prop("disabled", !0), $(".hashing-progress-container").removeClass("hide"), t = new Bitcoin.ECKey, t.setCompressed(!0), u = new SecureRandom, i = [], i[31] = 0, u.nextBytes(i), f = t.priv.toByteArrayUnsigned(), e = {
8427 key: {
8428 decryptedKey: f
8429 },
8430 seed: {
8431 decryptedKey: i
8432 }
8433 }, ColorWallet.hashPasswordToForm(r, $("#password").val(), $("#loginSalt").val()), ColorWallet.encryptPrivateKeys($("#password").val(), e, $("#salt").val(), function(i) {
8434 var u = Crypto.util.bytesToHex(t.getPub());
8435 $("input[name='publicKey']").val(u);
8436 $("input[name='encryptionMode']").val(ColorWallet.walletEncryptionMode.mode);
8437 $("input[name='encryptionIterations']").val(ColorWallet.walletEncryptionMode.iterations);
8438 $("input[name='privateKey']").val(i.key.privateKey);
8439 $("input[name='seed']").val(i.seed.privateKey);
8440 n = !0;
8441 r.submit()
8442 }, function(n) {
8443 $(".hash-progress").css("width", n + "%");
8444 $(".hash-progress-text").text(n + "%")
8445 }), !1
8446 });
8447 $("select#addressType").on("change", function() {
8448 var t = $("option:selected", this),
8449 n = this.value;
8450 $(".storage-type").addClass("hide");
8451 $(".show-" + n + "-address").removeClass("hide")
8452 });
8453 $(".show-trezor-address .load-address").click(function() {
8454 var t = trezorWallet.getTransport().then(trezorWallet.getSession),
8455 n = Number($("select#trezor-path option:selected").val());
8456 t.then(function(t) {
8457 return t.getPublicKey(trezorWallet.getAddressPath(0, n))
8458 }).then(function(t) {
8459 $("#trezor-pubkey").val(t.message.xpub);
8460 $("#trezorPath").val(n);
8461 $(".trezor-error").addClass("hide")
8462 }).catch(function(n) {
8463 $(".trezor-error").removeClass("hide");
8464 console.log(n)
8465 })
8466 })
8467};
8468$(document).ready(startup);
8469startup = function() {
8470 $(".check-password").on("input", function() {
8471 $("#password").val() != $("#passwordConfirm").val() ? $("#passwordConfirm").val() != "" && $(".confirm-group").addClass("has-error") : $(".confirm-group").removeClass("has-error");
8472 $("#password").val().length >= 10 && $(".password-group").removeClass("has-error");
8473 $("#password").val() == $("#passwordConfirm").val() && $("#password").val().length >= 10 ? $("button[type='submit']").prop("disabled", !1) : $("button[type='submit']").prop("disabled", !0)
8474 });
8475 $(".password-group #password").change(function() {
8476 $("#password").val().length < 10 && $(".password-group").addClass("has-error")
8477 });
8478 $("form.sign-in-form").submit(function() {
8479 var n = $(this),
8480 i = $("input.hash-password", n),
8481 t = $("input[name='loginSalt']", n),
8482 r = i.val(),
8483 u = t.val();
8484 if (!$("input[name='passwordHash']", n).val()) return $.post(global.logininfo, {
8485 username: $("#username").val(),
8486 __RequestVerificationToken: $("input[name='__RequestVerificationToken']").val()
8487 }, function(i) {
8488 i.error ? window.location.href = window.location.href : (t.val(i.salt), ColorWallet.hashPasswordToForm(n, r, i.salt), n.submit())
8489 }), $("button[type='submit']").prop("disabled", !0), !1
8490 })
8491};
8492$(document).ready(startup);
8493startup = function() {
8494 function n() {
8495 $("#send-coins-form .units-helper").text(global.color.helper);
8496 $("#send-coins-form .ticker-text").text(global.color.ticker);
8497 $(".color-balance").addClass("hide");
8498 $(".available-balance" + global.color.id).removeClass("hide");
8499 $("#send-coins-form input[name='color']").val(global.color.id)
8500 }
8501 $("#send-coins-form #from-select").change(function() {
8502 var n = $("#from-select option:selected").attr("value");
8503 window.location.replace(n)
8504 });
8505 $("#send-coins-form").submit(function() {
8506 var r = $("#amount-unit").val(),
8507 t = $("input[name='amount']");
8508 try {
8509 var u = new BigDecimal(r),
8510 n = u.multiply(new BigDecimal(global.color.rate)).toString(),
8511 i = n.indexOf(".");
8512 i >= 0 && (n = n.substr(0, i));
8513 t.val(n)
8514 } catch (f) {
8515 t.val("")
8516 }
8517 });
8518 $("#send-coins-form .color-option").click(function() {
8519 var t = $(this).attr("colorid");
8520 return global.color = global.colors[t], n(), $("#send-coins-form .selected-color-dropdown").dropdown("toggle"), !1
8521 });
8522 $(".metadata-selector").change(function() {
8523 var n = $("option:selected", $(this)).val();
8524 n == "profile" ? $(".metadata-profile").removeClass("hide") : $(".metadata-profile").addClass("hide");
8525 n == "url" ? $(".metadata-url").removeClass("hide") : $(".metadata-url").addClass("hide")
8526 });
8527 $("[set-address-to]").click(function(n) {
8528 $("#addressTo").val($(this).attr("set-address-to"));
8529 $("#addressTo").trigger("input");
8530 n.preventDefault()
8531 });
8532 $("#addressTo").on("input", function() {
8533 var n = $(this).val();
8534 $("ul.dropdown-menu li a[set-address-to]").each(function() {
8535 var t = $(this).attr("set-address-to"),
8536 i = $(this).attr("other-address");
8537 if (t === n || i === n) return $(".address-selector-label").text($(this).text()), !1;
8538 $(".address-selector-label").text("Addresses")
8539 })
8540 });
8541 typeof global.color != "undefined" && $("#send-coins-form").size() > 0 && n();
8542 $("#addressTo").trigger("input");
8543 $(".metadata-selector").trigger("change")
8544};
8545$(document).ready(startup);
8546startup = function() {
8547 function r(n) {
8548 var t, r, i, f, u;
8549 try {
8550 t = Bitcoin.Base58.decode(n)
8551 } catch (e) {
8552 return null
8553 }
8554 return t.length != 38 || t[33] != 1 ? null : (r = t.slice(0, 34), i = Crypto.SHA256(Crypto.SHA256(r, {
8555 asBytes: !0
8556 }), {
8557 asBytes: !0
8558 }), i[0] != t[34] || i[1] != t[35] || i[2] != t[36] || i[3] != t[37]) ? null : (f = r.shift(), f != 128) ? null : (u = new Bitcoin.ECKey(t.slice(1, 33)), u.setCompressed(!0), u)
8559 }
8560 var i = !1,
8561 n, t;
8562 $(".change-password").submit(function() {
8563 var n = $(this);
8564 if (!i) {
8565 $("button[type='submit']", n).prop("disabled", !0);
8566 $(".hashing-progress-container").removeClass("hide");
8567 var r = $("#currentPassword").val(),
8568 t = global.loginSalt,
8569 u = ColorWallet.hashPassword(r, t);
8570 return $("input[name='currentPasswordHash']").val(u), ColorWallet.hashPasswordToForm(n, $("#password").val(), t), ColorWallet.decryptPrivateKey($("#currentPassword").val(), $("#salt").val(), global.keys, function() {
8571 ColorWallet.encryptPrivateKeys($("#password").val(), global.keys, $("#salt").val(), function() {
8572 var t = {};
8573 for (var r in global.keys) t[r] = global.keys[r].privateKey;
8574 $("input[name='encryptionMode']").val(ColorWallet.walletEncryptionMode.mode);
8575 $("input[name='encryptionIterations']").val(ColorWallet.walletEncryptionMode.iterations);
8576 $("input[name='privateKeys']").val(JSON.stringify(t));
8577 i = !0;
8578 n.submit()
8579 }, function(n) {
8580 $(".hash-progress").css("width", 50 + Math.round(n / 2) + "%");
8581 $(".hash-progress-text").text(50 + Math.round(n / 2) + "%")
8582 })
8583 }, function(n) {
8584 $(".hash-progress").css("width", Math.round(n / 2) + "%");
8585 $(".hash-progress-text").text(Math.round(n / 2) + "%")
8586 }), !1
8587 }
8588 });
8589 $("#backup-type").change(function() {
8590 var n = $("option:selected", $(this)).val();
8591 n == "dec" ? $(".backup-password").removeClass("hide") : $(".backup-password").addClass("hide")
8592 });
8593 $(".run-export").submit(function() {
8594 function u() {
8595 $("#backup-content").val(JSON.stringify(n));
8596 $(".backup-result").removeClass("hide");
8597 $(".hashing-progress-container").addClass("hide");
8598 $(".backup-type-group").addClass("hide");
8599 $(".backup-password").addClass("hide");
8600 i.length > 0 && ($(".backup-error").removeClass("hide"), $(".corrupted-addresses").text(i.join(", ")))
8601 }
8602 var e = $(this),
8603 n, i, f, t, r;
8604 if ($("button[type='submit']", e).prop("disabled", !0), $(".hashing-progress-container").removeClass("hide"), n = {
8605 keys: []
8606 }, i = [], f = $("#backup-type option:selected").val(), f == "enc") {
8607 n.salt = global.salt;
8608 for (t in global.keys) n.keys.push({
8609 addr: t,
8610 priv: global.keys[t].privateKey,
8611 encryptionMode: global.keys[t].encryptionMode,
8612 iterations: global.keys[t].iterations
8613 });
8614 u()
8615 } else {
8616 r = $("#password").val();
8617
8618 function o() {
8619 ColorWallet.decryptPrivateKey(r, global.salt, global.keys, function() {
8620 var r, f, e, t, o;
8621 for (r in global.keys)
8622 if (t = global.keys[r].decryptedKey, f = new Bitcoin.ECKey(t), f.setCompressed(!0), e = f.getBitcoinAddress(), e.version = global.version, e.toString() != r) i.push(r);
8623 else {
8624 for (t = f.priv.toByteArrayUnsigned(); t.length < 32;) t.unshift(0);
8625 t.push(1);
8626 o = new Bitcoin.Address(t);
8627 o.version = global.privVersion;
8628 n.keys.push({
8629 addr: r,
8630 priv: o.toString()
8631 })
8632 }
8633 u()
8634 }, function(n) {
8635 $(".hash-progress").css("width", n + "%");
8636 $(".hash-progress-text").text(n + "%")
8637 })
8638 }
8639 $.post(global.validateUrl, {
8640 password: ColorWallet.hashPassword(r, global.loginSalt),
8641 __RequestVerificationToken: $("input[name='__RequestVerificationToken']").val()
8642 }, function(n) {
8643 n.valid ? o() : window.location.href = window.location.href
8644 })
8645 }
8646 return !1
8647 });
8648 $(".run-import #privateKey").on("input", function() {
8649 var n, i;
8650 t || (n = r($(this).val()), n == null ? ($(".run-import #address").val(""), $(".run-import #rawPrivateKey").val(""), global.importedPrivateKey = null, $(".run-import button[type='submit']").prop("disabled", !0)) : (i = n.getBitcoinAddress(), i.version = global.version, $(".run-import #address").val(i.toString()), global.importedPrivateKey = n, $(".run-import button[type='submit']").prop("disabled", !1)))
8651 });
8652 n = !1;
8653 t = !1;
8654 $(".run-import").submit(function() {
8655 var r, i, u, f;
8656 return global.importedPrivateKey == null ? !1 : (r = global.importedPrivateKey, i = $(this), n ? void 0 : (t = !0, $("button[type='submit']", i).prop("disabled", !0), $(".hashing-progress-container").removeClass("hide"), u = r.priv.toByteArrayUnsigned(), f = {
8657 key: {
8658 decryptedKey: u
8659 }
8660 }, ColorWallet.hashPasswordToForm(i, $("#password").val(), $("#loginSalt").val()), ColorWallet.encryptPrivateKeys($("#password").val(), f, $("#salt").val(), function(t) {
8661 var u = Crypto.util.bytesToHex(r.getPub());
8662 $("input[name='publicKey']").val(u);
8663 $("input[name='encryptionMode']").val(ColorWallet.walletEncryptionMode.mode);
8664 $("input[name='encryptionIterations']").val(ColorWallet.walletEncryptionMode.iterations);
8665 $("input[name='privateKey']").val(t.key.privateKey);
8666 n = !0;
8667 i.submit()
8668 }, function(n) {
8669 $(".hash-progress").css("width", n + "%");
8670 $(".hash-progress-text").text(n + "%")
8671 }), !1))
8672 });
8673 $(".two-factor").submit(function() {
8674 var n = $("#password").val(),
8675 t = ColorWallet.hashPassword(n, global.loginSalt);
8676 $("input[name='passwordHash']").val(t)
8677 })
8678};
8679$(document).ready(startup);
8680startup = function() {
8681 function t(n, t) {
8682 $(".pin-matrix button").click(function() {
8683 $("#trezor-pin").val($("#trezor-pin").val() + $(this).attr("data-value"))
8684 });
8685 $("#confirm-pin").click(function() {
8686 $(".pin-show").addClass("hide");
8687 t(null, $("#trezor-pin").val())
8688 });
8689 $(".pin-show").removeClass("hide")
8690 }
8691 var n = !1;
8692 $("#sign-transaction").submit(function() {
8693 var t, i;
8694 if (!n) {
8695 for ($("button[type='submit']", $(this)).prop("disabled", !0), $(".hashing-progress-container").removeClass("hide"), ColorWallet.hashPasswordToForm($(this), $("#password").val(), $("#loginSalt").val()), t = [], i = 0; i < global.transactions.length; i++) t.push(ColorWallet.buildTransaction(global.transactions[i]));
8696 return ColorWallet.decryptPrivateKey($("#password").val(), global.salt, global.keys, function() {
8697 for (var r, f, u = null, e = "", i = 0; i < t.length; i++) {
8698 if (u != null)
8699 for (r = 0; r < t[i].ins.length; r++) f = t[i].ins[r], f.outpoint.hash.length == 0 && (f.outpoint.hash = Crypto.util.bytesToBase64(u));
8700 u = ColorWallet.signTransaction(t[i], global.keys);
8701 e += Crypto.util.bytesToHex(t[i].serialize()) + " "
8702 }
8703 $("input[name='rawTransaction']").val(e);
8704 n = !0;
8705 $("#sign-transaction").submit()
8706 }, function(n) {
8707 $(".hash-progress").css("width", n + "%");
8708 $(".hash-progress-text").text(n + "%")
8709 }), !1
8710 }
8711 });
8712 $("#sign-trezor").click(function() {
8713 var i, n, f, r;
8714 for ($("#sign-trezor").prop("disabled", !0), i = [], n = 0; n < global.supportingTransactions.length; n++) f = ColorWallet.buildTransaction(global.supportingTransactions[n]), r = ColorWallet.buildTransaction(global.supportingTransactions[n]), r.hash = global.supportingTransactions[n].hash, i[global.supportingTransactions[n].hash] = global.supportingTransactions[n];
8715 var e = trezorWallet.getAddressPath(0, global.derivationPath),
8716 u = trezorWallet.getTransport().then(trezorWallet.getSession).then(function(n) {
8717 return n._emitter.addListener("pin", t), n
8718 }),
8719 o = u.then(function(n) {
8720 var t = u,
8721 r = global.transactions.map(function(r) {
8722 var u = t.then(function() {
8723 return trezorWallet.createTrezorTransaction(n, r, i, e, global.coinName)
8724 });
8725 return t = u, u
8726 });
8727 return Promise.all(r)
8728 }),
8729 r = o.then(function(n) {
8730 var t = n.map(function(n) {
8731 return n.message.serialized.serialized_tx
8732 });
8733 $("input[name='rawTransaction']").val(t.join(" "));
8734 $("#submit-trezor").submit()
8735 }).catch(function(n) {
8736 console.log(n);
8737 $(".trezor-error").removeClass("hide");
8738 $(".error-message").text($(".error-message").text() + n.message)
8739 })
8740 });
8741 $(".get-recipients").click(function() {
8742 var n = new Blob([global.recipients], {
8743 type: "text/csv;charset=utf-8"
8744 });
8745 return saveAs(n, "summary.csv"), !1
8746 });
8747 $("select#offlineWalletType").on("change", function() {
8748 var t = $("option:selected", this),
8749 n = this.value;
8750 $(".offline-wallet-group").addClass("hide");
8751 $(".offline-wallet-group." + n).removeClass("hide")
8752 })
8753};
8754$(document).ready(startup);
8755startup = function() {
8756 function t(i) {
8757 function u() {
8758 n = JSON.parse($("[js-var]", r).text());
8759 $("button.load-more", r).click(t);
8760 setupAssetPopup(r)
8761 }
8762 var r = $($(this).parents(".transactions-container")[0]),
8763 f = $("input[name='__RequestVerificationToken']").val();
8764 n.__RequestVerificationToken = f;
8765 r.load("/address/getmoretransactions", n, u);
8766 $(this).prop("disabled", !0);
8767 i.preventDefault()
8768 }
8769 var n = global.pagingToken;
8770 $("button.load-more").click(t)
8771};
8772$(document).ready(startup);
8773startup = function() {
8774 $(".smart-address").size() > 0 && (setInterval(refreshQuote, 5e3), $(".btc-to-usd-btn").click(function() {
8775 $(".btc-to-usd").removeClass("hide");
8776 $(".usd-to-btc").addClass("hide");
8777 $(".btc-to-usd-btn").addClass("btn-primary");
8778 $(".btc-to-usd-btn").removeClass("btn-default");
8779 $(".usd-to-btc-btn").removeClass("btn-primary");
8780 $(".usd-to-btc-btn").addClass("btn-default")
8781 }), $(".usd-to-btc-btn").click(function() {
8782 $(".btc-to-usd").addClass("hide");
8783 $(".usd-to-btc").removeClass("hide");
8784 $(".btc-to-usd-btn").removeClass("btn-primary");
8785 $(".btc-to-usd-btn").addClass("btn-default");
8786 $(".usd-to-btc-btn").addClass("btn-primary");
8787 $(".usd-to-btc-btn").removeClass("btn-default")
8788 }))
8789};
8790$(document).ready(startup);
8791startup = function() {};
8792$(document).ready(startup);
8793_gaq = _gaq || [];
8794_gaq.push(["_setAccount", "UA-26257569-4"]);
8795_gaq.push(["_trackPageview"])