!function() {
var e = document.getElementsByTagName("script")
, t = e.length
, n = e[t - 1].src
, i = n.indexOf("/js/")
, o = n.substr(0, i) + "/js/";
window.importScriptList = {},
window.importScript = function(e) {
e && (-1 === e.indexOf("http://") && -1 === e.indexOf("https://") && ("/" === e.substr(0, 1) && (e = e.substr(1)),
e = o + e),
e in importScriptList || (importScriptList[e] = !0,
document.write('')))
}
}(),
passport._define("login.js", function() {
function _(e) {
alert("undefined:" + e)
}
function hex_md5(e) {
return binl2hex(core_md5(str2binl(e), e.length * chrsz))
}
function b64_md5(e) {
return binl2b64(core_md5(str2binl(e), e.length * chrsz))
}
function str_md5(e) {
return binl2str(core_md5(str2binl(e), e.length * chrsz))
}
function hex_hmac_md5(e, t) {
return binl2hex(core_hmac_md5(e, t))
}
function b64_hmac_md5(e, t) {
return binl2b64(core_hmac_md5(e, t))
}
function str_hmac_md5(e, t) {
return binl2str(core_hmac_md5(e, t))
}
function md5_vm_test() {
return "900150983cd24fb0d6963f7d28e17f72" == hex_md5("abc")
}
function core_md5(e, t) {
e[t >> 5] |= 128 << t % 32,
e[(t + 64 >>> 9 << 4) + 14] = t;
for (var n = 1732584193, i = -271733879, o = -1732584194, s = 271733878, a = 0; a < e.length; a += 16) {
var r = n
, c = i
, l = o
, d = s;
n = md5_ff(n, i, o, s, e[a + 0], 7, -680876936),
s = md5_ff(s, n, i, o, e[a + 1], 12, -389564586),
o = md5_ff(o, s, n, i, e[a + 2], 17, 606105819),
i = md5_ff(i, o, s, n, e[a + 3], 22, -1044525330),
n = md5_ff(n, i, o, s, e[a + 4], 7, -176418897),
s = md5_ff(s, n, i, o, e[a + 5], 12, 1200080426),
o = md5_ff(o, s, n, i, e[a + 6], 17, -1473231341),
i = md5_ff(i, o, s, n, e[a + 7], 22, -45705983),
n = md5_ff(n, i, o, s, e[a + 8], 7, 1770035416),
s = md5_ff(s, n, i, o, e[a + 9], 12, -1958414417),
o = md5_ff(o, s, n, i, e[a + 10], 17, -42063),
i = md5_ff(i, o, s, n, e[a + 11], 22, -1990404162),
n = md5_ff(n, i, o, s, e[a + 12], 7, 1804603682),
s = md5_ff(s, n, i, o, e[a + 13], 12, -40341101),
o = md5_ff(o, s, n, i, e[a + 14], 17, -1502002290),
i = md5_ff(i, o, s, n, e[a + 15], 22, 1236535329),
n = md5_gg(n, i, o, s, e[a + 1], 5, -165796510),
s = md5_gg(s, n, i, o, e[a + 6], 9, -1069501632),
o = md5_gg(o, s, n, i, e[a + 11], 14, 643717713),
i = md5_gg(i, o, s, n, e[a + 0], 20, -373897302),
n = md5_gg(n, i, o, s, e[a + 5], 5, -701558691),
s = md5_gg(s, n, i, o, e[a + 10], 9, 38016083),
o = md5_gg(o, s, n, i, e[a + 15], 14, -660478335),
i = md5_gg(i, o, s, n, e[a + 4], 20, -405537848),
n = md5_gg(n, i, o, s, e[a + 9], 5, 568446438),
s = md5_gg(s, n, i, o, e[a + 14], 9, -1019803690),
o = md5_gg(o, s, n, i, e[a + 3], 14, -187363961),
i = md5_gg(i, o, s, n, e[a + 8], 20, 1163531501),
n = md5_gg(n, i, o, s, e[a + 13], 5, -1444681467),
s = md5_gg(s, n, i, o, e[a + 2], 9, -51403784),
o = md5_gg(o, s, n, i, e[a + 7], 14, 1735328473),
i = md5_gg(i, o, s, n, e[a + 12], 20, -1926607734),
n = md5_hh(n, i, o, s, e[a + 5], 4, -378558),
s = md5_hh(s, n, i, o, e[a + 8], 11, -2022574463),
o = md5_hh(o, s, n, i, e[a + 11], 16, 1839030562),
i = md5_hh(i, o, s, n, e[a + 14], 23, -35309556),
n = md5_hh(n, i, o, s, e[a + 1], 4, -1530992060),
s = md5_hh(s, n, i, o, e[a + 4], 11, 1272893353),
o = md5_hh(o, s, n, i, e[a + 7], 16, -155497632),
i = md5_hh(i, o, s, n, e[a + 10], 23, -1094730640),
n = md5_hh(n, i, o, s, e[a + 13], 4, 681279174),
s = md5_hh(s, n, i, o, e[a + 0], 11, -358537222),
o = md5_hh(o, s, n, i, e[a + 3], 16, -722521979),
i = md5_hh(i, o, s, n, e[a + 6], 23, 76029189),
n = md5_hh(n, i, o, s, e[a + 9], 4, -640364487),
s = md5_hh(s, n, i, o, e[a + 12], 11, -421815835),
o = md5_hh(o, s, n, i, e[a + 15], 16, 530742520),
i = md5_hh(i, o, s, n, e[a + 2], 23, -995338651),
n = md5_ii(n, i, o, s, e[a + 0], 6, -198630844),
s = md5_ii(s, n, i, o, e[a + 7], 10, 1126891415),
o = md5_ii(o, s, n, i, e[a + 14], 15, -1416354905),
i = md5_ii(i, o, s, n, e[a + 5], 21, -57434055),
n = md5_ii(n, i, o, s, e[a + 12], 6, 1700485571),
s = md5_ii(s, n, i, o, e[a + 3], 10, -1894986606),
o = md5_ii(o, s, n, i, e[a + 10], 15, -1051523),
i = md5_ii(i, o, s, n, e[a + 1], 21, -2054922799),
n = md5_ii(n, i, o, s, e[a + 8], 6, 1873313359),
s = md5_ii(s, n, i, o, e[a + 15], 10, -30611744),
o = md5_ii(o, s, n, i, e[a + 6], 15, -1560198380),
i = md5_ii(i, o, s, n, e[a + 13], 21, 1309151649),
n = md5_ii(n, i, o, s, e[a + 4], 6, -145523070),
s = md5_ii(s, n, i, o, e[a + 11], 10, -1120210379),
o = md5_ii(o, s, n, i, e[a + 2], 15, 718787259),
i = md5_ii(i, o, s, n, e[a + 9], 21, -343485551),
n = safe_add(n, r),
i = safe_add(i, c),
o = safe_add(o, l),
s = safe_add(s, d)
}
return Array(n, i, o, s)
}
function md5_cmn(e, t, n, i, o, s) {
return safe_add(bit_rol(safe_add(safe_add(t, e), safe_add(i, s)), o), n)
}
function md5_ff(e, t, n, i, o, s, a) {
return md5_cmn(t & n | ~t & i, e, t, o, s, a)
}
function md5_gg(e, t, n, i, o, s, a) {
return md5_cmn(t & i | n & ~i, e, t, o, s, a)
}
function md5_hh(e, t, n, i, o, s, a) {
return md5_cmn(t ^ n ^ i, e, t, o, s, a)
}
function md5_ii(e, t, n, i, o, s, a) {
return md5_cmn(n ^ (t | ~i), e, t, o, s, a)
}
function core_hmac_md5(e, t) {
var n = str2binl(e);
n.length > 16 && (n = core_md5(n, e.length * chrsz));
for (var i = Array(16), o = Array(16), s = 0; 16 > s; s++)
i[s] = 909522486 ^ n[s],
o[s] = 1549556828 ^ n[s];
var a = core_md5(i.concat(str2binl(t)), 512 + t.length * chrsz);
return core_md5(o.concat(a), 640)
}
function safe_add(e, t) {
var n = (65535 & e) + (65535 & t)
, i = (e >> 16) + (t >> 16) + (n >> 16);
return i << 16 | 65535 & n
}
function bit_rol(e, t) {
return e << t | e >>> 32 - t
}
function str2binl(e) {
for (var t = Array(), n = (1 << chrsz) - 1, i = 0; i < e.length * chrsz; i += chrsz)
t[i >> 5] |= (e.charCodeAt(i / chrsz) & n) << i % 32;
return t
}
function binl2str(e) {
for (var t = "", n = (1 << chrsz) - 1, i = 0; i < 32 * e.length; i += chrsz)
t += String.fromCharCode(e[i >> 5] >>> i % 32 & n);
return t
}
function binl2hex(e) {
for (var t = hexcase ? "0123456789ABCDEF" : "0123456789abcdef", n = "", i = 0; i < 4 * e.length; i++)
n += t.charAt(e[i >> 2] >> i % 4 * 8 + 4 & 15) + t.charAt(e[i >> 2] >> i % 4 * 8 & 15);
return n
}
function binl2b64(e) {
for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = "", i = 0; i < 4 * e.length; i += 3)
for (var o = (e[i >> 2] >> 8 * (i % 4) & 255) << 16 | (e[i + 1 >> 2] >> 8 * ((i + 1) % 4) & 255) << 8 | e[i + 2 >> 2] >> 8 * ((i + 2) % 4) & 255, s = 0; 4 > s; s++)
n += 8 * i + 6 * s > 32 * e.length ? b64pad : t.charAt(o >> 6 * (3 - s) & 63);
return n
}
var passport = passport || window.passport || {}
, baidu = passport.tangramInst || baidu || window.baidu;
!function(e) {
var t, n = document.location.protocol.toLowerCase();
t = passport && passport.ieVersion && passport.ieVersion() <= 8 ? "https:" === n ? "https://passport.baidu.com" : "http://passport.baidu.com" : "https:" === n ? "https://ppui-static-pc.cdn.bcebos.com" : "http://ppui-static-pc.cdn.bcebos.com",
e.apiDomain = {
staticDomain: t
}
}(passport);
var magic = null;
if ("function" != typeof magic)
var magic = function() {};
magic._baiduInstName = magic._baiduInstName || "bdInst_" + (new Date).getTime();
var baiduInstance = baiduInstance || baidu.baiduInstance || window.baiduInstance;
window[magic._baiduInstName] = window[magic._baiduInstName] || baiduInstance,
magic.resourcePath = "",
magic.skinName = "default",
magic.version = "1.0.0.0",
/msie 6/i.test(navigator.userAgent) && document.execCommand("BackgroundImageCache", !1, !0),
baidu.form = baidu.form || {},
baidu.url = baidu.url || {},
baidu.url.escapeSymbol = baidu.url.escapeSymbol || function(e) {
return String(e).replace(/[#%&+=\/\\\ \ \f\r\n\t]/g, function(e) {
return "%" + (256 + e.charCodeAt()).toString(16).substring(1).toUpperCase()
})
}
,
baidu.form.json = baidu.form.json || function(e, t) {
function n(e, t) {
var n = p[e];
n ? (n.push || (p[e] = [n]),
p[e].push(t)) : p[e] = t
}
for (var i, o, s, a, r, c, l, d, u = e.elements, t = t || function(e) {
return e
}
, p = {}, g = 0, m = u.length; m > g; g++)
if (i = u[g],
s = i.name,
!i.disabled && s)
switch (o = i.type,
a = baidu.url.escapeSymbol(i.value),
o) {
case "radio":
case "checkbox":
i.checked && n(s, t(a, s));
break;
case "textarea":
case "text":
case "password":
case "hidden":
case "file":
case "select-one":
n(s, t(a, s));
break;
case "select-multiple":
for (r = i.options,
l = r.length,
c = 0; l > c; c++)
d = r[c],
d.selected && n(s, t(d.value, s))
}
return p
}
,
magic.Base = function() {
baidu.lang.Class.call(this),
this._ids = {},
this._eid = this.guid + "__"
}
,
baidu.lang.inherits(magic.Base, baidu.lang.Class, "magic.Base").extend({
getElement: function(e) {
return document.getElementById(this.$getId(e))
},
getElements: function() {
var e = {}
, t = this._ids;
for (var n in t)
e[n] = this.getElement(n);
return e
},
$getId: function(e) {
return e = baidu.lang.isString(e) ? e : "",
this._ids[e] || (this._ids[e] = this._eid + e)
},
$mappingDom: function(e, t) {
return baidu.lang.isString(t) ? this._ids[e] = t : t && t.nodeType && (t.id ? this._ids[e] = t.id : t.id = this.$getId(e)),
this
},
$hide: function(e) {
return ("string" == (typeof e).toLowerCase() || "" === e) && (e = this.getElement(e)),
e && e.style && (e.style.display = "none",
e.style.visibility = "hidden"),
this
},
$show: function(e) {
return ("string" == (typeof e).toLowerCase() || "" === e) && (e = this.getElement(e)),
e && e.style && (e.style.display = "block",
e.style.visibility = "visible",
e.style.opacity = "1"),
this
},
$dispose: function() {
this.fire("ondispose") && baidu.lang.Class.prototype.dispose.call(this)
}
}),
magic.control = magic.control || {},
function() {
function e(e, t) {
var i, o = e.getAttribute(t), s = !1;
if (o && (i = o.match(n[0]))) {
s = {};
for (var a, r = 0; r < i.length; r++)
a = i[r].match(n[1]),
!isNaN(a[2]) && (a[2] = +a[2]),
n[2].test(a[2]) && (a[2] = a[2].replace(n[3], "$2")),
n[4].test(a[2]) && (a[2] = n[5].test(a[2])),
s[a[1]] = a[2]
}
return s
}
function t(t, n) {
var i = e(t, "tang-event");
if (i)
for (var o in i) {
var s = i[o].substr(1);
s.indexOf("(") < 0 && (s += "()"),
baidu.dom(t).on(o, new Function(magic._baiduInstName + "('" + n + "') && " + magic._baiduInstName + "('" + n + "')" + s))
}
}
magic.setup = magic.setup || function(n, i, o) {
var s = e(n, "tang-param") || {};
for (var a in o)
s[a] = o[a];
var r = new i(s);
r.$mappingDom("", n),
t(n, r.guid);
for (var c = n.getElementsByTagName("*"), a = c.length - 1; a >= 0; a--)
t(c[a], r.guid);
return r
}
;
var n = [/\b[\w\$\-]+\s*:\s*[^;]+/g, /([\w\$\-]+)\s*:\s*([^;]+)\s*/, /\'|\"/, /^\s*(\'|\")([^\1]*)\1\s*/, /^(true|false)\s*$/i, /\btrue\b/i]
}(),
passport = passport || {},
passport.lib = passport.lib || {},
passport.lib.RSAExport = {},
function(e) {
function t(e, t, n) {
null != e && ("number" == typeof e ? this.fromNumber(e, t, n) : null == t && "string" != typeof e ? this.fromString(e, 256) : this.fromString(e, t))
}
function n() {
return new t(null)
}
function i(e, t, n, i, o, s) {
for (; --s >= 0; ) {
var a = t * this[e++] + n[i] + o;
o = Math.floor(a / 67108864),
n[i++] = 67108863 & a
}
return o
}
function o(e, t, n, i, o, s) {
for (var a = 32767 & t, r = t >> 15; --s >= 0; ) {
var c = 32767 & this[e]
, l = this[e++] >> 15
, d = r * c + l * a;
c = a * c + ((32767 & d) << 15) + n[i] + (1073741823 & o),
o = (c >>> 30) + (d >>> 15) + r * l + (o >>> 30),
n[i++] = 1073741823 & c
}
return o
}
function s(e, t, n, i, o, s) {
for (var a = 16383 & t, r = t >> 14; --s >= 0; ) {
var c = 16383 & this[e]
, l = this[e++] >> 14
, d = r * c + l * a;
c = a * c + ((16383 & d) << 14) + n[i] + o,
o = (c >> 28) + (d >> 14) + r * l,
n[i++] = 268435455 & c
}
return o
}
function a(e) {
return xn.charAt(e)
}
function r(e, t) {
var n = Ln[e.charCodeAt(t)];
return null == n ? -1 : n
}
function c(e) {
for (var t = this.t - 1; t >= 0; --t)
e[t] = this[t];
e.t = this.t,
e.s = this.s
}
function l(e) {
this.t = 1,
this.s = 0 > e ? -1 : 0,
e > 0 ? this[0] = e : -1 > e ? this[0] = e + DV : this.t = 0
}
function d(e) {
var t = n();
return t.fromInt(e),
t
}
function u(e, n) {
var i;
if (16 == n)
i = 4;
else if (8 == n)
i = 3;
else if (256 == n)
i = 8;
else if (2 == n)
i = 1;
else if (32 == n)
i = 5;
else {
if (4 != n)
return void this.fromRadix(e, n);
i = 2
}
this.t = 0,
this.s = 0;
for (var o = e.length, s = !1, a = 0; --o >= 0; ) {
var c = 8 == i ? 255 & e[o] : r(e, o);
0 > c ? "-" == e.charAt(o) && (s = !0) : (s = !1,
0 == a ? this[this.t++] = c : a + i > this.DB ? (this[this.t - 1] |= (c & (1 << this.DB - a) - 1) << a,
this[this.t++] = c >> this.DB - a) : this[this.t - 1] |= c << a,
a += i,
a >= this.DB && (a -= this.DB))
}
8 == i && 0 != (128 & e[0]) && (this.s = -1,
a > 0 && (this[this.t - 1] |= (1 << this.DB - a) - 1 << a)),
this.clamp(),
s && t.ZERO.subTo(this, this)
}
function p() {
for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e; )
--this.t
}
function g(e) {
if (this.s < 0)
return "-" + this.negate().toString(e);
var t;
if (16 == e)
t = 4;
else if (8 == e)
t = 3;
else if (2 == e)
t = 1;
else if (32 == e)
t = 5;
else {
if (4 != e)
return this.toRadix(e);
t = 2
}
var n, i = (1 << t) - 1, o = !1, s = "", r = this.t, c = this.DB - r * this.DB % t;
if (r-- > 0)
for (c < this.DB && (n = this[r] >> c) > 0 && (o = !0,
s = a(n)); r >= 0; )
t > c ? (n = (this[r] & (1 << c) - 1) << t - c,
n |= this[--r] >> (c += this.DB - t)) : (n = this[r] >> (c -= t) & i,
0 >= c && (c += this.DB,
--r)),
n > 0 && (o = !0),
o && (s += a(n));
return o ? s : "0"
}
function m() {
var e = n();
return t.ZERO.subTo(this, e),
e
}
function f() {
return this.s < 0 ? this.negate() : this
}
function h(e) {
var t = this.s - e.s;
if (0 != t)
return t;
var n = this.t;
if (t = n - e.t,
0 != t)
return this.s < 0 ? -t : t;
for (; --n >= 0; )
if (0 != (t = this[n] - e[n]))
return t;
return 0
}
function b(e) {
var t, n = 1;
return 0 != (t = e >>> 16) && (e = t,
n += 16),
0 != (t = e >> 8) && (e = t,
n += 8),
0 != (t = e >> 4) && (e = t,
n += 4),
0 != (t = e >> 2) && (e = t,
n += 2),
0 != (t = e >> 1) && (e = t,
n += 1),
n
}
function y() {
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + b(this[this.t - 1] ^ this.s & this.DM)
}
function _(e, t) {
var n;
for (n = this.t - 1; n >= 0; --n)
t[n + e] = this[n];
for (n = e - 1; n >= 0; --n)
t[n] = 0;
t.t = this.t + e,
t.s = this.s
}
function w(e, t) {
for (var n = e; n < this.t; ++n)
t[n - e] = this[n];
t.t = Math.max(this.t - e, 0),
t.s = this.s
}
function E(e, t) {
var n, i = e % this.DB, o = this.DB - i, s = (1 << o) - 1, a = Math.floor(e / this.DB), r = this.s << i & this.DM;
for (n = this.t - 1; n >= 0; --n)
t[n + a + 1] = this[n] >> o | r,
r = (this[n] & s) << i;
for (n = a - 1; n >= 0; --n)
t[n] = 0;
t[a] = r,
t.t = this.t + a + 1,
t.s = this.s,
t.clamp()
}
function C(e, t) {
t.s = this.s;
var n = Math.floor(e / this.DB);
if (n >= this.t)
return void (t.t = 0);
var i = e % this.DB
, o = this.DB - i
, s = (1 << i) - 1;
t[0] = this[n] >> i;
for (var a = n + 1; a < this.t; ++a)
t[a - n - 1] |= (this[a] & s) << o,
t[a - n] = this[a] >> i;
i > 0 && (t[this.t - n - 1] |= (this.s & s) << o),
t.t = this.t - n,
t.clamp()
}
function S(e, t) {
for (var n = 0, i = 0, o = Math.min(e.t, this.t); o > n; )
i += this[n] - e[n],
t[n++] = i & this.DM,
i >>= this.DB;
if (e.t < this.t) {
for (i -= e.s; n < this.t; )
i += this[n],
t[n++] = i & this.DM,
i >>= this.DB;
i += this.s
} else {
for (i += this.s; n < e.t; )
i -= e[n],
t[n++] = i & this.DM,
i >>= this.DB;
i -= e.s
}
t.s = 0 > i ? -1 : 0,
-1 > i ? t[n++] = this.DV + i : i > 0 && (t[n++] = i),
t.t = n,
t.clamp()
}
function T(e, n) {
var i = this.abs()
, o = e.abs()
, s = i.t;
for (n.t = s + o.t; --s >= 0; )
n[s] = 0;
for (s = 0; s < o.t; ++s)
n[s + i.t] = i.am(0, o[s], n, s, 0, i.t);
n.s = 0,
n.clamp(),
this.s != e.s && t.ZERO.subTo(n, n)
}
function I(e) {
for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0; )
e[n] = 0;
for (n = 0; n < t.t - 1; ++n) {
var i = t.am(n, t[n], e, 2 * n, 0, 1);
(e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, i, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV,
e[n + t.t + 1] = 1)
}
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)),
e.s = 0,
e.clamp()
}
function D(e, i, o) {
var s = e.abs();
if (!(s.t <= 0)) {
var a = this.abs();
if (a.t < s.t)
return null != i && i.fromInt(0),
void (null != o && this.copyTo(o));
null == o && (o = n());
var r = n()
, c = this.s
, l = e.s
, d = this.DB - b(s[s.t - 1]);
d > 0 ? (s.lShiftTo(d, r),
a.lShiftTo(d, o)) : (s.copyTo(r),
a.copyTo(o));
var u = r.t
, p = r[u - 1];
if (0 != p) {
var g = p * (1 << this.F1) + (u > 1 ? r[u - 2] >> this.F2 : 0)
, m = this.FV / g
, f = (1 << this.F1) / g
, h = 1 << this.F2
, v = o.t
, y = v - u
, _ = null == i ? n() : i;
for (r.dlShiftTo(y, _),
o.compareTo(_) >= 0 && (o[o.t++] = 1,
o.subTo(_, o)),
t.ONE.dlShiftTo(u, _),
_.subTo(r, r); r.t < u; )
r[r.t++] = 0;
for (; --y >= 0; ) {
var w = o[--v] == p ? this.DM : Math.floor(o[v] * m + (o[v - 1] + h) * f);
if ((o[v] += r.am(0, w, o, y, 0, u)) < w)
for (r.dlShiftTo(y, _),
o.subTo(_, o); o[v] < --w; )
o.subTo(_, o)
}
null != i && (o.drShiftTo(u, i),
c != l && t.ZERO.subTo(i, i)),
o.t = u,
o.clamp(),
d > 0 && o.rShiftTo(d, o),
0 > c && t.ZERO.subTo(o, o)
}
}
}
function k(e) {
var i = n();
return this.abs().divRemTo(e, null, i),
this.s < 0 && i.compareTo(t.ZERO) > 0 && e.subTo(i, i),
i
}
function R(e) {
this.m = e
}
function x(e) {
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e
}
function L(e) {
return e
}
function P(e) {
e.divRemTo(this.m, null, e)
}
function A(e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
}
function M(e, t) {
e.squareTo(t),
this.reduce(t)
}
function B() {
if (this.t < 1)
return 0;
var e = this[0];
if (0 == (1 & e))
return 0;
var t = 3 & e;
return t = t * (2 - (15 & e) * t) & 15,
t = t * (2 - (255 & e) * t) & 255,
t = t * (2 - ((65535 & e) * t & 65535)) & 65535,
t = t * (2 - e * t % this.DV) % this.DV,
t > 0 ? this.DV - t : -t
}
function O(e) {
this.m = e,
this.mp = e.invDigit(),
this.mpl = 32767 & this.mp,
this.mph = this.mp >> 15,
this.um = (1 << e.DB - 15) - 1,
this.mt2 = 2 * e.t
}
function V(e) {
var i = n();
return e.abs().dlShiftTo(this.m.t, i),
i.divRemTo(this.m, null, i),
e.s < 0 && i.compareTo(t.ZERO) > 0 && this.m.subTo(i, i),
i
}
function $(e) {
var t = n();
return e.copyTo(t),
this.reduce(t),
t
}
function U(e) {
for (; e.t <= this.mt2; )
e[e.t++] = 0;
for (var t = 0; t < this.m.t; ++t) {
var n = 32767 & e[t]
, i = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
for (n = t + this.m.t,
e[n] += this.m.am(0, i, e, t, 0, this.m.t); e[n] >= e.DV; )
e[n] -= e.DV,
e[++n]++
}
e.clamp(),
e.drShiftTo(this.m.t, e),
e.compareTo(this.m) >= 0 && e.subTo(this.m, e)
}
function N(e, t) {
e.squareTo(t),
this.reduce(t)
}
function q(e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
}
function H() {
return 0 == (this.t > 0 ? 1 & this[0] : this.s)
}
function F(e, i) {
if (e > 4294967295 || 1 > e)
return t.ONE;
var o = n()
, s = n()
, a = i.convert(this)
, r = b(e) - 1;
for (a.copyTo(o); --r >= 0; )
if (i.sqrTo(o, s),
(e & 1 << r) > 0)
i.mulTo(s, a, o);
else {
var c = o;
o = s,
s = c
}
return i.revert(o)
}
function W(e, t) {
var n;
return n = 256 > e || t.isEven() ? new R(t) : new O(t),
this.exp(e, n)
}
function K() {
var e = n();
return this.copyTo(e),
e
}
function j() {
if (this.s < 0) {
if (1 == this.t)
return this[0] - this.DV;
if (0 == this.t)
return -1
} else {
if (1 == this.t)
return this[0];
if (0 == this.t)
return 0
}
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
}
function Q() {
return 0 == this.t ? this.s : this[0] << 24 >> 24
}
function J() {
return 0 == this.t ? this.s : this[0] << 16 >> 16
}
function G(e) {
return Math.floor(Math.LN2 * this.DB / Math.log(e))
}
function z() {
return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
}
function Z(e) {
if (null == e && (e = 10),
0 == this.signum() || 2 > e || e > 36)
return "0";
var t = this.chunkSize(e)
, i = Math.pow(e, t)
, o = d(i)
, s = n()
, a = n()
, r = "";
for (this.divRemTo(o, s, a); s.signum() > 0; )
r = (i + a.intValue()).toString(e).substr(1) + r,
s.divRemTo(o, s, a);
return a.intValue().toString(e) + r
}
function Y(e, n) {
this.fromInt(0),
null == n && (n = 10);
for (var i = this.chunkSize(n), o = Math.pow(n, i), s = !1, a = 0, c = 0, l = 0; l < e.length; ++l) {
var d = r(e, l);
0 > d ? "-" == e.charAt(l) && 0 == this.signum() && (s = !0) : (c = n * c + d,
++a >= i && (this.dMultiply(o),
this.dAddOffset(c, 0),
a = 0,
c = 0))
}
a > 0 && (this.dMultiply(Math.pow(n, a)),
this.dAddOffset(c, 0)),
s && t.ZERO.subTo(this, this)
}
function X(e, n, i) {
if ("number" == typeof n)
if (2 > e)
this.fromInt(1);
else
for (this.fromNumber(e, i),
this.testBit(e - 1) || this.bitwiseTo(t.ONE.shiftLeft(e - 1), rt, this),
this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n); )
this.dAddOffset(2, 0),
this.bitLength() > e && this.subTo(t.ONE.shiftLeft(e - 1), this);
else {
var o = new Array
, s = 7 & e;
o.length = (e >> 3) + 1,
n.nextBytes(o),
s > 0 ? o[0] &= (1 << s) - 1 : o[0] = 0,
this.fromString(o, 256)
}
}
function et() {
var e = this.t
, t = new Array;
t[0] = this.s;
var n, i = this.DB - e * this.DB % 8, o = 0;
if (e-- > 0)
for (i < this.DB && (n = this[e] >> i) != (this.s & this.DM) >> i && (t[o++] = n | this.s << this.DB - i); e >= 0; )
8 > i ? (n = (this[e] & (1 << i) - 1) << 8 - i,
n |= this[--e] >> (i += this.DB - 8)) : (n = this[e] >> (i -= 8) & 255,
0 >= i && (i += this.DB,
--e)),
0 != (128 & n) && (n |= -256),
0 == o && (128 & this.s) != (128 & n) && ++o,
(o > 0 || n != this.s) && (t[o++] = n);
return t
}
function tt(e) {
return 0 == this.compareTo(e)
}
function nt(e) {
return this.compareTo(e) < 0 ? this : e
}
function it(e) {
return this.compareTo(e) > 0 ? this : e
}
function ot(e, t, n) {
var i, o, s = Math.min(e.t, this.t);
for (i = 0; s > i; ++i)
n[i] = t(this[i], e[i]);
if (e.t < this.t) {
for (o = e.s & this.DM,
i = s; i < this.t; ++i)
n[i] = t(this[i], o);
n.t = this.t
} else {
for (o = this.s & this.DM,
i = s; i < e.t; ++i)
n[i] = t(o, e[i]);
n.t = e.t
}
n.s = t(this.s, e.s),
n.clamp()
}
function st(e, t) {
return e & t
}
function at(e) {
var t = n();
return this.bitwiseTo(e, st, t),
t
}
function rt(e, t) {
return e | t
}
function ct(e) {
var t = n();
return this.bitwiseTo(e, rt, t),
t
}
function lt(e, t) {
return e ^ t
}
function dt(e) {
var t = n();
return this.bitwiseTo(e, lt, t),
t
}
function ut(e, t) {
return e & ~t
}
function pt(e) {
var t = n();
return this.bitwiseTo(e, ut, t),
t
}
function gt() {
for (var e = n(), t = 0; t < this.t; ++t)
e[t] = this.DM & ~this[t];
return e.t = this.t,
e.s = ~this.s,
e
}
function mt(e) {
var t = n();
return 0 > e ? this.rShiftTo(-e, t) : this.lShiftTo(e, t),
t
}
function ft(e) {
var t = n();
return 0 > e ? this.lShiftTo(-e, t) : this.rShiftTo(e, t),
t
}
function ht(e) {
if (0 == e)
return -1;
var t = 0;
return 0 == (65535 & e) && (e >>= 16,
t += 16),
0 == (255 & e) && (e >>= 8,
t += 8),
0 == (15 & e) && (e >>= 4,
t += 4),
0 == (3 & e) && (e >>= 2,
t += 2),
0 == (1 & e) && ++t,
t
}
function vt() {
for (var e = 0; e < this.t; ++e)
if (0 != this[e])
return e * this.DB + ht(this[e]);
return this.s < 0 ? this.t * this.DB : -1
}
function bt(e) {
for (var t = 0; 0 != e; )
e &= e - 1,
++t;
return t
}
function yt() {
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n)
e += bt(this[n] ^ t);
return e
}
function _t(e) {
var t = Math.floor(e / this.DB);
return t >= this.t ? 0 != this.s : 0 != (this[t] & 1 << e % this.DB)
}
function wt(e, n) {
var i = t.ONE.shiftLeft(e);
return this.bitwiseTo(i, n, i),
i
}
function Et(e) {
return this.changeBit(e, rt)
}
function Ct(e) {
return this.changeBit(e, ut)
}
function St(e) {
return this.changeBit(e, lt)
}
function Tt(e, t) {
for (var n = 0, i = 0, o = Math.min(e.t, this.t); o > n; )
i += this[n] + e[n],
t[n++] = i & this.DM,
i >>= this.DB;
if (e.t < this.t) {
for (i += e.s; n < this.t; )
i += this[n],
t[n++] = i & this.DM,
i >>= this.DB;
i += this.s
} else {
for (i += this.s; n < e.t; )
i += e[n],
t[n++] = i & this.DM,
i >>= this.DB;
i += e.s
}
t.s = 0 > i ? -1 : 0,
i > 0 ? t[n++] = i : -1 > i && (t[n++] = this.DV + i),
t.t = n,
t.clamp()
}
function It(e) {
var t = n();
return this.addTo(e, t),
t
}
function Dt(e) {
var t = n();
return this.subTo(e, t),
t
}
function kt(e) {
var t = n();
return this.multiplyTo(e, t),
t
}
function Rt() {
var e = n();
return this.squareTo(e),
e
}
function xt(e) {
var t = n();
return this.divRemTo(e, t, null),
t
}
function Lt(e) {
var t = n();
return this.divRemTo(e, null, t),
t
}
function Pt(e) {
var t = n()
, i = n();
return this.divRemTo(e, t, i),
new Array(t,i)
}
function At(e) {
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t),
++this.t,
this.clamp()
}
function Mt(e, t) {
if (0 != e) {
for (; this.t <= t; )
this[this.t++] = 0;
for (this[t] += e; this[t] >= this.DV; )
this[t] -= this.DV,
++t >= this.t && (this[this.t++] = 0),
++this[t]
}
}
function Bt() {}
function Ot(e) {
return e
}
function Vt(e, t, n) {
e.multiplyTo(t, n)
}
function $t(e, t) {
e.squareTo(t)
}
function Ut(e) {
return this.exp(e, new Bt)
}
function Nt(e, t, n) {
var i = Math.min(this.t + e.t, t);
for (n.s = 0,
n.t = i; i > 0; )
n[--i] = 0;
var o;
for (o = n.t - this.t; o > i; ++i)
n[i + this.t] = this.am(0, e[i], n, i, 0, this.t);
for (o = Math.min(e.t, t); o > i; ++i)
this.am(0, e[i], n, i, 0, t - i);
n.clamp()
}
function qt(e, t, n) {
--t;
var i = n.t = this.t + e.t - t;
for (n.s = 0; --i >= 0; )
n[i] = 0;
for (i = Math.max(t - this.t, 0); i < e.t; ++i)
n[this.t + i - t] = this.am(t - i, e[i], n, 0, 0, this.t + i - t);
n.clamp(),
n.drShiftTo(1, n)
}
function Ht(e) {
this.r2 = n(),
this.q3 = n(),
t.ONE.dlShiftTo(2 * e.t, this.r2),
this.mu = this.r2.divide(e),
this.m = e
}
function Ft(e) {
if (e.s < 0 || e.t > 2 * this.m.t)
return e.mod(this.m);
if (e.compareTo(this.m) < 0)
return e;
var t = n();
return e.copyTo(t),
this.reduce(t),
t
}
function Wt(e) {
return e
}
function Kt(e) {
for (e.drShiftTo(this.m.t - 1, this.r2),
e.t > this.m.t + 1 && (e.t = this.m.t + 1,
e.clamp()),
this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0; )
e.dAddOffset(1, this.m.t + 1);
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0; )
e.subTo(this.m, e)
}
function jt(e, t) {
e.squareTo(t),
this.reduce(t)
}
function Qt(e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
}
function Jt(e, t) {
var i, o, s = e.bitLength(), a = d(1);
if (0 >= s)
return a;
i = 18 > s ? 1 : 48 > s ? 3 : 144 > s ? 4 : 768 > s ? 5 : 6,
o = 8 > s ? new R(t) : t.isEven() ? new Ht(t) : new O(t);
var r = new Array
, c = 3
, l = i - 1
, u = (1 << i) - 1;
if (r[1] = o.convert(this),
i > 1) {
var p = n();
for (o.sqrTo(r[1], p); u >= c; )
r[c] = n(),
o.mulTo(p, r[c - 2], r[c]),
c += 2
}
var g, m, f = e.t - 1, h = !0, v = n();
for (s = b(e[f]) - 1; f >= 0; ) {
for (s >= l ? g = e[f] >> s - l & u : (g = (e[f] & (1 << s + 1) - 1) << l - s,
f > 0 && (g |= e[f - 1] >> this.DB + s - l)),
c = i; 0 == (1 & g); )
g >>= 1,
--c;
if ((s -= c) < 0 && (s += this.DB,
--f),
h)
r[g].copyTo(a),
h = !1;
else {
for (; c > 1; )
o.sqrTo(a, v),
o.sqrTo(v, a),
c -= 2;
c > 0 ? o.sqrTo(a, v) : (m = a,
a = v,
v = m),
o.mulTo(v, r[g], a)
}
for (; f >= 0 && 0 == (e[f] & 1 << s); )
o.sqrTo(a, v),
m = a,
a = v,
v = m,
--s < 0 && (s = this.DB - 1,
--f)
}
return o.revert(a)
}
function Gt(e) {
var t = this.s < 0 ? this.negate() : this.clone()
, n = e.s < 0 ? e.negate() : e.clone();
if (t.compareTo(n) < 0) {
var i = t;
t = n,
n = i
}
var o = t.getLowestSetBit()
, s = n.getLowestSetBit();
if (0 > s)
return t;
for (s > o && (s = o),
s > 0 && (t.rShiftTo(s, t),
n.rShiftTo(s, n)); t.signum() > 0; )
(o = t.getLowestSetBit()) > 0 && t.rShiftTo(o, t),
(o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n),
t.compareTo(n) >= 0 ? (t.subTo(n, t),
t.rShiftTo(1, t)) : (n.subTo(t, n),
n.rShiftTo(1, n));
return s > 0 && n.lShiftTo(s, n),
n
}
function zt(e) {
if (0 >= e)
return 0;
var t = this.DV % e
, n = this.s < 0 ? e - 1 : 0;
if (this.t > 0)
if (0 == t)
n = this[0] % e;
else
for (var i = this.t - 1; i >= 0; --i)
n = (t * n + this[i]) % e;
return n
}
function Zt(e) {
var n = e.isEven();
if (this.isEven() && n || 0 == e.signum())
return t.ZERO;
for (var i = e.clone(), o = this.clone(), s = d(1), a = d(0), r = d(0), c = d(1); 0 != i.signum(); ) {
for (; i.isEven(); )
i.rShiftTo(1, i),
n ? (s.isEven() && a.isEven() || (s.addTo(this, s),
a.subTo(e, a)),
s.rShiftTo(1, s)) : a.isEven() || a.subTo(e, a),
a.rShiftTo(1, a);
for (; o.isEven(); )
o.rShiftTo(1, o),
n ? (r.isEven() && c.isEven() || (r.addTo(this, r),
c.subTo(e, c)),
r.rShiftTo(1, r)) : c.isEven() || c.subTo(e, c),
c.rShiftTo(1, c);
i.compareTo(o) >= 0 ? (i.subTo(o, i),
n && s.subTo(r, s),
a.subTo(c, a)) : (o.subTo(i, o),
n && r.subTo(s, r),
c.subTo(a, c))
}
return 0 != o.compareTo(t.ONE) ? t.ZERO : c.compareTo(e) >= 0 ? c.subtract(e) : c.signum() < 0 ? (c.addTo(e, c),
c.signum() < 0 ? c.add(e) : c) : c
}
function Yt(e) {
var t, n = this.abs();
if (1 == n.t && n[0] <= Pn[Pn.length - 1]) {
for (t = 0; t < Pn.length; ++t)
if (n[0] == Pn[t])
return !0;
return !1
}
if (n.isEven())
return !1;
for (t = 1; t < Pn.length; ) {
for (var i = Pn[t], o = t + 1; o < Pn.length && An > i; )
i *= Pn[o++];
for (i = n.modInt(i); o > t; )
if (i % Pn[t++] == 0)
return !1
}
return n.millerRabin(e)
}
function Xt(e) {
var i = this.subtract(t.ONE)
, o = i.getLowestSetBit();
if (0 >= o)
return !1;
var s = i.shiftRight(o);
e = e + 1 >> 1,
e > Pn.length && (e = Pn.length);
for (var a = n(), r = 0; e > r; ++r) {
a.fromInt(Pn[Math.floor(Math.random() * Pn.length)]);
var c = a.modPow(s, this);
if (0 != c.compareTo(t.ONE) && 0 != c.compareTo(i)) {
for (var l = 1; l++ < o && 0 != c.compareTo(i); )
if (c = c.modPowInt(2, this),
0 == c.compareTo(t.ONE))
return !1;
if (0 != c.compareTo(i))
return !1
}
}
return !0
}
function en() {
this.i = 0,
this.j = 0,
this.S = new Array
}
function tn(e) {
var t, n, i;
for (t = 0; 256 > t; ++t)
this.S[t] = t;
for (n = 0,
t = 0; 256 > t; ++t)
n = n + this.S[t] + e[t % e.length] & 255,
i = this.S[t],
this.S[t] = this.S[n],
this.S[n] = i;
this.i = 0,
this.j = 0
}
function nn() {
var e;
return this.i = this.i + 1 & 255,
this.j = this.j + this.S[this.i] & 255,
e = this.S[this.i],
this.S[this.i] = this.S[this.j],
this.S[this.j] = e,
this.S[e + this.S[this.i] & 255]
}
function on() {
return new en
}
function sn(e) {
Bn[On++] ^= 255 & e,
Bn[On++] ^= e >> 8 & 255,
Bn[On++] ^= e >> 16 & 255,
Bn[On++] ^= e >> 24 & 255,
On >= Vn && (On -= Vn)
}
function an() {
sn((new Date).getTime())
}
function rn() {
if (null == Mn) {
for (an(),
Mn = on(),
Mn.init(Bn),
On = 0; On < Bn.length; ++On)
Bn[On] = 0;
On = 0
}
return Mn.next()
}
function cn(e) {
var t;
for (t = 0; t < e.length; ++t)
e[t] = rn()
}
function ln() {}
function dn(e, n) {
return new t(e,n)
}
function un(e, n) {
if (n < e.length + 11)
return console.error("Message too long for RSA"),
null;
for (var i = new Array, o = e.length - 1; o >= 0 && n > 0; ) {
var s = e.charCodeAt(o--);
128 > s ? i[--n] = s : s > 127 && 2048 > s ? (i[--n] = 63 & s | 128,
i[--n] = s >> 6 | 192) : (i[--n] = 63 & s | 128,
i[--n] = s >> 6 & 63 | 128,
i[--n] = s >> 12 | 224)
}
i[--n] = 0;
for (var a = new ln, r = new Array; n > 2; ) {
for (r[0] = 0; 0 == r[0]; )
a.nextBytes(r);
i[--n] = r[0]
}
return i[--n] = 2,
i[--n] = 0,
new t(i)
}
function pn() {
this.n = null,
this.e = 0,
this.d = null,
this.p = null,
this.q = null,
this.dmp1 = null,
this.dmq1 = null,
this.coeff = null
}
function gn(e, t) {
null != e && null != t && e.length > 0 && t.length > 0 ? (this.n = dn(e, 16),
this.e = parseInt(t, 16)) : console.error("Invalid RSA public key")
}
function mn(e) {
return e.modPowInt(this.e, this.n)
}
function fn(e) {
var t = un(e, this.n.bitLength() + 7 >> 3);
if (null == t)
return null;
var n = this.doPublic(t);
if (null == n)
return null;
var i = n.toString(16);
return 0 == (1 & i.length) ? i : "0" + i
}
function hn(e, t) {
for (var n = e.toByteArray(), i = 0; i < n.length && 0 == n[i]; )
++i;
if (n.length - i != t - 1 || 2 != n[i])
return null;
for (++i; 0 != n[i]; )
if (++i >= n.length)
return null;
for (var o = ""; ++i < n.length; ) {
var s = 255 & n[i];
128 > s ? o += String.fromCharCode(s) : s > 191 && 224 > s ? (o += String.fromCharCode((31 & s) << 6 | 63 & n[i + 1]),
++i) : (o += String.fromCharCode((15 & s) << 12 | (63 & n[i + 1]) << 6 | 63 & n[i + 2]),
i += 2)
}
return o
}
function vn(e, t, n) {
null != e && null != t && e.length > 0 && t.length > 0 ? (this.n = dn(e, 16),
this.e = parseInt(t, 16),
this.d = dn(n, 16)) : console.error("Invalid RSA private key")
}
function bn(e, t, n, i, o, s, a, r) {
null != e && null != t && e.length > 0 && t.length > 0 ? (this.n = dn(e, 16),
this.e = parseInt(t, 16),
this.d = dn(n, 16),
this.p = dn(i, 16),
this.q = dn(o, 16),
this.dmp1 = dn(s, 16),
this.dmq1 = dn(a, 16),
this.coeff = dn(r, 16)) : console.error("Invalid RSA private key")
}
function yn(e, n) {
var i = new ln
, o = e >> 1;
this.e = parseInt(n, 16);
for (var s = new t(n,16); ; ) {
for (; this.p = new t(e - o,1,i),
0 != this.p.subtract(t.ONE).gcd(s).compareTo(t.ONE) || !this.p.isProbablePrime(10); )
;
for (; this.q = new t(o,1,i),
0 != this.q.subtract(t.ONE).gcd(s).compareTo(t.ONE) || !this.q.isProbablePrime(10); )
;
if (this.p.compareTo(this.q) <= 0) {
var a = this.p;
this.p = this.q,
this.q = a
}
var r = this.p.subtract(t.ONE)
, c = this.q.subtract(t.ONE)
, l = r.multiply(c);
if (0 == l.gcd(s).compareTo(t.ONE)) {
this.n = this.p.multiply(this.q),
this.d = s.modInverse(l),
this.dmp1 = this.d.mod(r),
this.dmq1 = this.d.mod(c),
this.coeff = this.q.modInverse(this.p);
break
}
}
}
function _n(e) {
if (null == this.p || null == this.q)
return e.modPow(this.d, this.n);
for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0; )
t = t.add(this.p);
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)
}
function wn(e) {
var t = dn(e, 16)
, n = this.doPrivate(t);
return null == n ? null : hn(n, this.n.bitLength() + 7 >> 3)
}
function En(e) {
var t, n, i = "";
for (t = 0; t + 3 <= e.length; t += 3)
n = parseInt(e.substring(t, t + 3), 16),
i += Nn.charAt(n >> 6) + Nn.charAt(63 & n);
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16),
i += Nn.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16),
i += Nn.charAt(n >> 2) + Nn.charAt((3 & n) << 4)); (3 & i.length) > 0; )
i += qn;
return i
}
function Cn(e) {
var t, n, i = "", o = 0;
for (t = 0; t < e.length && e.charAt(t) != qn; ++t)
v = Nn.indexOf(e.charAt(t)),
0 > v || (0 == o ? (i += a(v >> 2),
n = 3 & v,
o = 1) : 1 == o ? (i += a(n << 2 | v >> 4),
n = 15 & v,
o = 2) : 2 == o ? (i += a(n),
i += a(v >> 2),
n = 3 & v,
o = 3) : (i += a(n << 2 | v >> 4),
i += a(15 & v),
o = 0));
return 1 == o && (i += a(n << 2)),
i
}
var Sn, Tn = 0xdeadbeefcafe, In = 15715070 == (16777215 & Tn);
In && "Microsoft Internet Explorer" == navigator.appName ? (t.prototype.am = o,
Sn = 30) : In && "Netscape" != navigator.appName ? (t.prototype.am = i,
Sn = 26) : (t.prototype.am = s,
Sn = 28),
t.prototype.DB = Sn,
t.prototype.DM = (1 << Sn) - 1,
t.prototype.DV = 1 << Sn;
var Dn = 52;
t.prototype.FV = Math.pow(2, Dn),
t.prototype.F1 = Dn - Sn,
t.prototype.F2 = 2 * Sn - Dn;
var kn, Rn, xn = "0123456789abcdefghijklmnopqrstuvwxyz", Ln = new Array;
for (kn = "0".charCodeAt(0),
Rn = 0; 9 >= Rn; ++Rn)
Ln[kn++] = Rn;
for (kn = "a".charCodeAt(0),
Rn = 10; 36 > Rn; ++Rn)
Ln[kn++] = Rn;
for (kn = "A".charCodeAt(0),
Rn = 10; 36 > Rn; ++Rn)
Ln[kn++] = Rn;
R.prototype.convert = x,
R.prototype.revert = L,
R.prototype.reduce = P,
R.prototype.mulTo = A,
R.prototype.sqrTo = M,
O.prototype.convert = V,
O.prototype.revert = $,
O.prototype.reduce = U,
O.prototype.mulTo = q,
O.prototype.sqrTo = N,
t.prototype.copyTo = c,
t.prototype.fromInt = l,
t.prototype.fromString = u,
t.prototype.clamp = p,
t.prototype.dlShiftTo = _,
t.prototype.drShiftTo = w,
t.prototype.lShiftTo = E,
t.prototype.rShiftTo = C,
t.prototype.subTo = S,
t.prototype.multiplyTo = T,
t.prototype.squareTo = I,
t.prototype.divRemTo = D,
t.prototype.invDigit = B,
t.prototype.isEven = H,
t.prototype.exp = F,
t.prototype.toString = g,
t.prototype.negate = m,
t.prototype.abs = f,
t.prototype.compareTo = h,
t.prototype.bitLength = y,
t.prototype.mod = k,
t.prototype.modPowInt = W,
t.ZERO = d(0),
t.ONE = d(1),
Bt.prototype.convert = Ot,
Bt.prototype.revert = Ot,
Bt.prototype.mulTo = Vt,
Bt.prototype.sqrTo = $t,
Ht.prototype.convert = Ft,
Ht.prototype.revert = Wt,
Ht.prototype.reduce = Kt,
Ht.prototype.mulTo = Qt,
Ht.prototype.sqrTo = jt;
var Pn = [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]
, An = (1 << 26) / Pn[Pn.length - 1];
t.prototype.chunkSize = G,
t.prototype.toRadix = Z,
t.prototype.fromRadix = Y,
t.prototype.fromNumber = X,
t.prototype.bitwiseTo = ot,
t.prototype.changeBit = wt,
t.prototype.addTo = Tt,
t.prototype.dMultiply = At,
t.prototype.dAddOffset = Mt,
t.prototype.multiplyLowerTo = Nt,
t.prototype.multiplyUpperTo = qt,
t.prototype.modInt = zt,
t.prototype.millerRabin = Xt,
t.prototype.clone = K,
t.prototype.intValue = j,
t.prototype.byteValue = Q,
t.prototype.shortValue = J,
t.prototype.signum = z,
t.prototype.toByteArray = et,
t.prototype.equals = tt,
t.prototype.min = nt,
t.prototype.max = it,
t.prototype.and = at,
t.prototype.or = ct,
t.prototype.xor = dt,
t.prototype.andNot = pt,
t.prototype.not = gt,
t.prototype.shiftLeft = mt,
t.prototype.shiftRight = ft,
t.prototype.getLowestSetBit = vt,
t.prototype.bitCount = yt,
t.prototype.testBit = _t,
t.prototype.setBit = Et,
t.prototype.clearBit = Ct,
t.prototype.flipBit = St,
t.prototype.add = It,
t.prototype.subtract = Dt,
t.prototype.multiply = kt,
t.prototype.divide = xt,
t.prototype.remainder = Lt,
t.prototype.divideAndRemainder = Pt,
t.prototype.modPow = Jt,
t.prototype.modInverse = Zt,
t.prototype.pow = Ut,
t.prototype.gcd = Gt,
t.prototype.isProbablePrime = Yt,
t.prototype.square = Rt,
en.prototype.init = tn,
en.prototype.next = nn;
var Mn, Bn, On, Vn = 256;
if (null == Bn) {
Bn = new Array,
On = 0;
var $n;
if ("Netscape" == navigator.appName && navigator.appVersion < "5" && window.crypto && window.crypto.random) {
var Un = window.crypto.random(32);
for ($n = 0; $n < Un.length; ++$n)
Bn[On++] = 255 & Un.charCodeAt($n)
}
for (; Vn > On; )
$n = Math.floor(65536 * Math.random()),
Bn[On++] = $n >>> 8,
Bn[On++] = 255 & $n;
On = 0,
an()
}
ln.prototype.nextBytes = cn,
pn.prototype.doPublic = mn,
pn.prototype.setPublic = gn,
pn.prototype.encrypt = fn,
pn.prototype.doPrivate = _n,
pn.prototype.setPrivate = vn,
pn.prototype.setPrivateEx = bn,
pn.prototype.generate = yn,
pn.prototype.decrypt = wn,
function() {
var e = function(e, i, o) {
var s = new ln
, a = e >> 1;
this.e = parseInt(i, 16);
var r = new t(i,16)
, c = this
, l = function() {
var i = function() {
if (c.p.compareTo(c.q) <= 0) {
var e = c.p;
c.p = c.q,
c.q = e
}
var n = c.p.subtract(t.ONE)
, i = c.q.subtract(t.ONE)
, s = n.multiply(i);
0 == s.gcd(r).compareTo(t.ONE) ? (c.n = c.p.multiply(c.q),
c.d = r.modInverse(s),
c.dmp1 = c.d.mod(n),
c.dmq1 = c.d.mod(i),
c.coeff = c.q.modInverse(c.p),
setTimeout(function() {
o()
}, 0)) : setTimeout(l, 0)
}
, d = function() {
c.q = n(),
c.q.fromNumberAsync(a, 1, s, function() {
c.q.subtract(t.ONE).gcda(r, function(e) {
0 == e.compareTo(t.ONE) && c.q.isProbablePrime(10) ? setTimeout(i, 0) : setTimeout(d, 0)
})
})
}
, u = function() {
c.p = n(),
c.p.fromNumberAsync(e - a, 1, s, function() {
c.p.subtract(t.ONE).gcda(r, function(e) {
0 == e.compareTo(t.ONE) && c.p.isProbablePrime(10) ? setTimeout(d, 0) : setTimeout(u, 0)
})
})
};
setTimeout(u, 0)
};
setTimeout(l, 0)
};
pn.prototype.generateAsync = e;
var i = function(e, t) {
var n = this.s < 0 ? this.negate() : this.clone()
, i = e.s < 0 ? e.negate() : e.clone();
if (n.compareTo(i) < 0) {
var o = n;
n = i,
i = o
}
var s = n.getLowestSetBit()
, a = i.getLowestSetBit();
if (0 > a)
return void t(n);
a > s && (a = s),
a > 0 && (n.rShiftTo(a, n),
i.rShiftTo(a, i));
var r = function() {
(s = n.getLowestSetBit()) > 0 && n.rShiftTo(s, n),
(s = i.getLowestSetBit()) > 0 && i.rShiftTo(s, i),
n.compareTo(i) >= 0 ? (n.subTo(i, n),
n.rShiftTo(1, n)) : (i.subTo(n, i),
i.rShiftTo(1, i)),
n.signum() > 0 ? setTimeout(r, 0) : (a > 0 && i.lShiftTo(a, i),
setTimeout(function() {
t(i)
}, 0))
};
setTimeout(r, 10)
};
t.prototype.gcda = i;
var o = function(e, n, i, o) {
if ("number" == typeof n)
if (2 > e)
this.fromInt(1);
else {
this.fromNumber(e, i),
this.testBit(e - 1) || this.bitwiseTo(t.ONE.shiftLeft(e - 1), rt, this),
this.isEven() && this.dAddOffset(1, 0);
var s = this
, a = function() {
s.dAddOffset(2, 0),
s.bitLength() > e && s.subTo(t.ONE.shiftLeft(e - 1), s),
s.isProbablePrime(n) ? setTimeout(function() {
o()
}, 0) : setTimeout(a, 0)
};
setTimeout(a, 0)
}
else {
var r = new Array
, c = 7 & e;
r.length = (e >> 3) + 1,
n.nextBytes(r),
c > 0 ? r[0] &= (1 << c) - 1 : r[0] = 0,
this.fromString(r, 256)
}
};
t.prototype.fromNumberAsync = o
}();
var Nn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
, qn = "="
, Hn = Hn || {};
Hn.env = Hn.env || {};
var Fn = Hn
, Wn = Object.prototype
, Kn = "[object Function]"
, jn = ["toString", "valueOf"];
Hn.env.parseUA = function(e) {
var t, n = function(e) {
var t = 0;
return parseFloat(e.replace(/\./g, function() {
return 1 == t++ ? "" : "."
}))
}, i = navigator, o = {
ie: 0,
opera: 0,
gecko: 0,
webkit: 0,
chrome: 0,
mobile: null,
air: 0,
ipad: 0,
iphone: 0,
ipod: 0,
ios: null,
android: 0,
webos: 0,
caja: i && i.cajaVersion,
secure: !1,
os: null
}, s = e || navigator && navigator.userAgent, a = window && window.location, r = a && a.href;
return o.secure = r && 0 === r.toLowerCase().indexOf("https"),
s && (/windows|win32/i.test(s) ? o.os = "windows" : /macintosh/i.test(s) ? o.os = "macintosh" : /rhino/i.test(s) && (o.os = "rhino"),
/KHTML/.test(s) && (o.webkit = 1),
t = s.match(/AppleWebKit\/([^\s]*)/),
t && t[1] && (o.webkit = n(t[1]),
/ Mobile\//.test(s) ? (o.mobile = "Apple",
t = s.match(/OS ([^\s]*)/),
t && t[1] && (t = n(t[1].replace("_", "."))),
o.ios = t,
o.ipad = o.ipod = o.iphone = 0,
t = s.match(/iPad|iPod|iPhone/),
t && t[0] && (o[t[0].toLowerCase()] = o.ios)) : (t = s.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/),
t && (o.mobile = t[0]),
/webOS/.test(s) && (o.mobile = "WebOS",
t = s.match(/webOS\/([^\s]*);/),
t && t[1] && (o.webos = n(t[1]))),
/ Android/.test(s) && (o.mobile = "Android",
t = s.match(/Android ([^\s]*);/),
t && t[1] && (o.android = n(t[1])))),
t = s.match(/Chrome\/([^\s]*)/),
t && t[1] ? o.chrome = n(t[1]) : (t = s.match(/AdobeAIR\/([^\s]*)/),
t && (o.air = t[0]))),
o.webkit || (t = s.match(/Opera[\s\/]([^\s]*)/),
t && t[1] ? (o.opera = n(t[1]),
t = s.match(/Version\/([^\s]*)/),
t && t[1] && (o.opera = n(t[1])),
t = s.match(/Opera Mini[^;]*/),
t && (o.mobile = t[0])) : (t = s.match(/MSIE\s([^;]*)/),
t && t[1] ? o.ie = n(t[1]) : (t = s.match(/Gecko\/([^\s]*)/),
t && (o.gecko = 1,
t = s.match(/rv:([^\s\)]*)/),
t && t[1] && (o.gecko = n(t[1]))))))),
o
}
,
Hn.env.ua = Hn.env.parseUA(),
Hn.isFunction = function(e) {
return "function" == typeof e || Wn.toString.apply(e) === Kn
}
,
Hn._IEEnumFix = Hn.env.ua.ie ? function(e, t) {
var n, i, o;
for (n = 0; n < jn.length; n += 1)
i = jn[n],
o = t[i],
Fn.isFunction(o) && o != Wn[i] && (e[i] = o)
}
: function() {}
,
Hn.extend = function(e, t, n) {
if (!t || !e)
throw new Error("extend failed, please check that all dependencies are included.");
var i, o = function() {};
if (o.prototype = t.prototype,
e.prototype = new o,
e.prototype.constructor = e,
e.superclass = t.prototype,
t.prototype.constructor == Wn.constructor && (t.prototype.constructor = t),
n) {
for (i in n)
Fn.hasOwnProperty(n, i) && (e.prototype[i] = n[i]);
Fn._IEEnumFix(e.prototype, n)
}
}
,
"undefined" != typeof KJUR && KJUR || (KJUR = {}),
"undefined" != typeof KJUR.asn1 && KJUR.asn1 || (KJUR.asn1 = {}),
KJUR.asn1.ASN1Util = new function() {
this.integerToByteHex = function(e) {
var t = e.toString(16);
return t.length % 2 == 1 && (t = "0" + t),
t
}
,
this.bigIntToMinTwosComplementsHex = function(e) {
var n = e.toString(16);
if ("-" != n.substr(0, 1))
n.length % 2 == 1 ? n = "0" + n : n.match(/^[0-7]/) || (n = "00" + n);
else {
var i = n.substr(1)
, o = i.length;
o % 2 == 1 ? o += 1 : n.match(/^[0-7]/) || (o += 2);
for (var s = "", a = 0; o > a; a++)
s += "f";
var r = new t(s,16)
, c = r.xor(e).add(t.ONE);
n = c.toString(16).replace(/^-/, "")
}
return n
}
,
this.getPEMStringFromHex = function(e, t) {
var n = CryptoJS.enc.Hex.parse(e)
, i = CryptoJS.enc.Base64.stringify(n)
, o = i.replace(/(.{64})/g, "$1\r\n");
return o = o.replace(/\r\n$/, ""),
"-----BEGIN " + t + "-----\r\n" + o + "\r\n-----END " + t + "-----\r\n"
}
}
,
KJUR.asn1.ASN1Object = function() {
var e = "";
this.getLengthHexFromValue = function() {
if ("undefined" == typeof this.hV || null == this.hV)
throw "this.hV is null or undefined.";
if (this.hV.length % 2 == 1)
throw "value hex must be even length: n=" + e.length + ",v=" + this.hV;
var t = this.hV.length / 2
, n = t.toString(16);
if (n.length % 2 == 1 && (n = "0" + n),
128 > t)
return n;
var i = n.length / 2;
if (i > 15)
throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
var o = 128 + i;
return o.toString(16) + n
}
,
this.getEncodedHex = function() {
return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(),
this.hL = this.getLengthHexFromValue(),
this.hTLV = this.hT + this.hL + this.hV,
this.isModified = !1),
this.hTLV
}
,
this.getValueHex = function() {
return this.getEncodedHex(),
this.hV
}
,
this.getFreshValueHex = function() {
return ""
}
}
,
KJUR.asn1.DERAbstractString = function(e) {
KJUR.asn1.DERAbstractString.superclass.constructor.call(this),
this.getString = function() {
return this.s
}
,
this.setString = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = e,
this.hV = stohex(this.s)
}
,
this.setStringHex = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = e
}
,
this.getFreshValueHex = function() {
return this.hV
}
,
"undefined" != typeof e && ("undefined" != typeof e.str ? this.setString(e.str) : "undefined" != typeof e.hex && this.setStringHex(e.hex))
}
,
Hn.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object),
KJUR.asn1.DERAbstractTime = function() {
KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),
this.localDateToUTC = function(e) {
utc = e.getTime() + 6e4 * e.getTimezoneOffset();
var t = new Date(utc);
return t
}
,
this.formatDate = function(e, t) {
var n = this.zeroPadding
, i = this.localDateToUTC(e)
, o = String(i.getFullYear());
"utc" == t && (o = o.substr(2, 2));
var s = n(String(i.getMonth() + 1), 2)
, a = n(String(i.getDate()), 2)
, r = n(String(i.getHours()), 2)
, c = n(String(i.getMinutes()), 2)
, l = n(String(i.getSeconds()), 2);
return o + s + a + r + c + l + "Z"
}
,
this.zeroPadding = function(e, t) {
return e.length >= t ? e : new Array(t - e.length + 1).join("0") + e
}
,
this.getString = function() {
return this.s
}
,
this.setString = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = e,
this.hV = stohex(this.s)
}
,
this.setByDateValue = function(e, t, n, i, o, s) {
var a = new Date(Date.UTC(e, t - 1, n, i, o, s, 0));
this.setByDate(a)
}
,
this.getFreshValueHex = function() {
return this.hV
}
}
,
Hn.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object),
KJUR.asn1.DERAbstractStructured = function(e) {
KJUR.asn1.DERAbstractString.superclass.constructor.call(this),
this.setByASN1ObjectArray = function(e) {
this.hTLV = null,
this.isModified = !0,
this.asn1Array = e
}
,
this.appendASN1Object = function(e) {
this.hTLV = null,
this.isModified = !0,
this.asn1Array.push(e)
}
,
this.asn1Array = new Array,
"undefined" != typeof e && "undefined" != typeof e.array && (this.asn1Array = e.array)
}
,
Hn.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object),
KJUR.asn1.DERBoolean = function() {
KJUR.asn1.DERBoolean.superclass.constructor.call(this),
this.hT = "01",
this.hTLV = "0101ff"
}
,
Hn.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object),
KJUR.asn1.DERInteger = function(e) {
KJUR.asn1.DERInteger.superclass.constructor.call(this),
this.hT = "02",
this.setByBigInteger = function(e) {
this.hTLV = null,
this.isModified = !0,
this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)
}
,
this.setByInteger = function(e) {
var n = new t(String(e),10);
this.setByBigInteger(n)
}
,
this.setValueHex = function(e) {
this.hV = e
}
,
this.getFreshValueHex = function() {
return this.hV
}
,
"undefined" != typeof e && ("undefined" != typeof e.bigint ? this.setByBigInteger(e.bigint) : "undefined" != typeof e["int"] ? this.setByInteger(e["int"]) : "undefined" != typeof e.hex && this.setValueHex(e.hex))
}
,
Hn.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object),
KJUR.asn1.DERBitString = function(e) {
KJUR.asn1.DERBitString.superclass.constructor.call(this),
this.hT = "03",
this.setHexValueIncludingUnusedBits = function(e) {
this.hTLV = null,
this.isModified = !0,
this.hV = e
}
,
this.setUnusedBitsAndHexValue = function(e, t) {
if (0 > e || e > 7)
throw "unused bits shall be from 0 to 7: u = " + e;
var n = "0" + e;
this.hTLV = null,
this.isModified = !0,
this.hV = n + t
}
,
this.setByBinaryString = function(e) {
e = e.replace(/0+$/, "");
var t = 8 - e.length % 8;
8 == t && (t = 0);
for (var n = 0; t >= n; n++)
e += "0";
for (var i = "", n = 0; n < e.length - 1; n += 8) {
var o = e.substr(n, 8)
, s = parseInt(o, 2).toString(16);
1 == s.length && (s = "0" + s),
i += s
}
this.hTLV = null,
this.isModified = !0,
this.hV = "0" + t + i
}
,
this.setByBooleanArray = function(e) {
for (var t = "", n = 0; n < e.length; n++)
t += 1 == e[n] ? "1" : "0";
this.setByBinaryString(t)
}
,
this.newFalseArray = function(e) {
for (var t = new Array(e), n = 0; e > n; n++)
t[n] = !1;
return t
}
,
this.getFreshValueHex = function() {
return this.hV
}
,
"undefined" != typeof e && ("undefined" != typeof e.hex ? this.setHexValueIncludingUnusedBits(e.hex) : "undefined" != typeof e.bin ? this.setByBinaryString(e.bin) : "undefined" != typeof e.array && this.setByBooleanArray(e.array))
}
,
Hn.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object),
KJUR.asn1.DEROctetString = function(e) {
KJUR.asn1.DEROctetString.superclass.constructor.call(this, e),
this.hT = "04"
}
,
Hn.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERNull = function() {
KJUR.asn1.DERNull.superclass.constructor.call(this),
this.hT = "05",
this.hTLV = "0500"
}
,
Hn.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object),
KJUR.asn1.DERObjectIdentifier = function(e) {
var n = function(e) {
var t = e.toString(16);
return 1 == t.length && (t = "0" + t),
t
}
, i = function(e) {
var i = ""
, o = new t(e,10)
, s = o.toString(2)
, a = 7 - s.length % 7;
7 == a && (a = 0);
for (var r = "", c = 0; a > c; c++)
r += "0";
s = r + s;
for (var c = 0; c < s.length - 1; c += 7) {
var l = s.substr(c, 7);
c != s.length - 7 && (l = "1" + l),
i += n(parseInt(l, 2))
}
return i
};
KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),
this.hT = "06",
this.setValueHex = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = e
}
,
this.setValueOidString = function(e) {
if (!e.match(/^[0-9.]+$/))
throw "malformed oid string: " + e;
var t = ""
, o = e.split(".")
, s = 40 * parseInt(o[0]) + parseInt(o[1]);
t += n(s),
o.splice(0, 2);
for (var a = 0; a < o.length; a++)
t += i(o[a]);
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = t
}
,
this.setValueName = function(e) {
if ("undefined" == typeof KJUR.asn1.x509.OID.name2oidList[e])
throw "DERObjectIdentifier oidName undefined: " + e;
var t = KJUR.asn1.x509.OID.name2oidList[e];
this.setValueOidString(t)
}
,
this.getFreshValueHex = function() {
return this.hV
}
,
"undefined" != typeof e && ("undefined" != typeof e.oid ? this.setValueOidString(e.oid) : "undefined" != typeof e.hex ? this.setValueHex(e.hex) : "undefined" != typeof e.name && this.setValueName(e.name))
}
,
Hn.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object),
KJUR.asn1.DERUTF8String = function(e) {
KJUR.asn1.DERUTF8String.superclass.constructor.call(this, e),
this.hT = "0c"
}
,
Hn.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERNumericString = function(e) {
KJUR.asn1.DERNumericString.superclass.constructor.call(this, e),
this.hT = "12"
}
,
Hn.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERPrintableString = function(e) {
KJUR.asn1.DERPrintableString.superclass.constructor.call(this, e),
this.hT = "13"
}
,
Hn.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERTeletexString = function(e) {
KJUR.asn1.DERTeletexString.superclass.constructor.call(this, e),
this.hT = "14"
}
,
Hn.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERIA5String = function(e) {
KJUR.asn1.DERIA5String.superclass.constructor.call(this, e),
this.hT = "16"
}
,
Hn.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString),
KJUR.asn1.DERUTCTime = function(e) {
KJUR.asn1.DERUTCTime.superclass.constructor.call(this, e),
this.hT = "17",
this.setByDate = function(e) {
this.hTLV = null,
this.isModified = !0,
this.date = e,
this.s = this.formatDate(this.date, "utc"),
this.hV = stohex(this.s)
}
,
"undefined" != typeof e && ("undefined" != typeof e.str ? this.setString(e.str) : "undefined" != typeof e.hex ? this.setStringHex(e.hex) : "undefined" != typeof e.date && this.setByDate(e.date))
}
,
Hn.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime),
KJUR.asn1.DERGeneralizedTime = function(e) {
KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, e),
this.hT = "18",
this.setByDate = function(e) {
this.hTLV = null,
this.isModified = !0,
this.date = e,
this.s = this.formatDate(this.date, "gen"),
this.hV = stohex(this.s)
}
,
"undefined" != typeof e && ("undefined" != typeof e.str ? this.setString(e.str) : "undefined" != typeof e.hex ? this.setStringHex(e.hex) : "undefined" != typeof e.date && this.setByDate(e.date))
}
,
Hn.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime),
KJUR.asn1.DERSequence = function(e) {
KJUR.asn1.DERSequence.superclass.constructor.call(this, e),
this.hT = "30",
this.getFreshValueHex = function() {
for (var e = "", t = 0; t < this.asn1Array.length; t++) {
var n = this.asn1Array[t];
e += n.getEncodedHex()
}
return this.hV = e,
this.hV
}
}
,
Hn.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured),
KJUR.asn1.DERSet = function(e) {
KJUR.asn1.DERSet.superclass.constructor.call(this, e),
this.hT = "31",
this.getFreshValueHex = function() {
for (var e = new Array, t = 0; t < this.asn1Array.length; t++) {
var n = this.asn1Array[t];
e.push(n.getEncodedHex())
}
return e.sort(),
this.hV = e.join(""),
this.hV
}
}
,
Hn.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured),
KJUR.asn1.DERTaggedObject = function(e) {
KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),
this.hT = "a0",
this.hV = "",
this.isExplicit = !0,
this.asn1Object = null,
this.setASN1Object = function(e, t, n) {
this.hT = t,
this.isExplicit = e,
this.asn1Object = n,
this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(),
this.hTLV = null,
this.isModified = !0) : (this.hV = null,
this.hTLV = n.getEncodedHex(),
this.hTLV = this.hTLV.replace(/^../, t),
this.isModified = !1)
}
,
this.getFreshValueHex = function() {
return this.hV
}
,
"undefined" != typeof e && ("undefined" != typeof e.tag && (this.hT = e.tag),
"undefined" != typeof e.explicit && (this.isExplicit = e.explicit),
"undefined" != typeof e.obj && (this.asn1Object = e.obj,
this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)))
}
,
Hn.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object),
function(e) {
"use strict";
var t, n = {};
n.decode = function(n) {
var i;
if (t === e) {
var o = "0123456789ABCDEF"
, s = " \f\n\r \u2028\u2029";
for (t = [],
i = 0; 16 > i; ++i)
t[o.charAt(i)] = i;
for (o = o.toLowerCase(),
i = 10; 16 > i; ++i)
t[o.charAt(i)] = i;
for (i = 0; i < s.length; ++i)
t[s.charAt(i)] = -1
}
var a = []
, r = 0
, c = 0;
for (i = 0; i < n.length; ++i) {
var l = n.charAt(i);
if ("=" == l)
break;
if (l = t[l],
-1 != l) {
if (l === e)
throw "Illegal character at offset " + i;
r |= l,
++c >= 2 ? (a[a.length] = r,
r = 0,
c = 0) : r <<= 4
}
}
if (c)
throw "Hex encoding incomplete: 4 bits missing";
return a
}
,
window.Hex = n
}(),
function(e) {
"use strict";
var t, n = {};
n.decode = function(n) {
var i;
if (t === e) {
var o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
, s = "= \f\n\r \u2028\u2029";
for (t = [],
i = 0; 64 > i; ++i)
t[o.charAt(i)] = i;
for (i = 0; i < s.length; ++i)
t[s.charAt(i)] = -1
}
var a = []
, r = 0
, c = 0;
for (i = 0; i < n.length; ++i) {
var l = n.charAt(i);
if ("=" == l)
break;
if (l = t[l],
-1 != l) {
if (l === e)
throw "Illegal character at offset " + i;
r |= l,
++c >= 4 ? (a[a.length] = r >> 16,
a[a.length] = r >> 8 & 255,
a[a.length] = 255 & r,
r = 0,
c = 0) : r <<= 6
}
}
switch (c) {
case 1:
throw "Base64 encoding incomplete: at least 2 bits missing";
case 2:
a[a.length] = r >> 10;
break;
case 3:
a[a.length] = r >> 16,
a[a.length] = r >> 8 & 255
}
return a
}
,
n.re = /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
n.unarmor = function(e) {
var t = n.re.exec(e);
if (t)
if (t[1])
e = t[1];
else {
if (!t[2])
throw "RegExp out of sync";
e = t[2]
}
return n.decode(e)
}
,
window.Base64 = n
}(),
function(e) {
"use strict";
function t(e, n) {
e instanceof t ? (this.enc = e.enc,
this.pos = e.pos) : (this.enc = e,
this.pos = n)
}
function n(e, t, n, i, o) {
this.stream = e,
this.header = t,
this.length = n,
this.tag = i,
this.sub = o
}
var i = 100
, o = "…"
, s = {
tag: function(e, t) {
var n = document.createElement(e);
return n.className = t,
n
},
text: function(e) {
return document.createTextNode(e)
}
};
t.prototype.get = function(t) {
if (t === e && (t = this.pos++),
t >= this.enc.length)
throw "Requesting byte offset " + t + " on a stream of length " + this.enc.length;
return this.enc[t]
}
,
t.prototype.hexDigits = "0123456789ABCDEF",
t.prototype.hexByte = function(e) {
return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(15 & e)
}
,
t.prototype.hexDump = function(e, t, n) {
for (var i = "", o = e; t > o; ++o)
if (i += this.hexByte(this.get(o)),
n !== !0)
switch (15 & o) {
case 7:
i += " ";
break;
case 15:
i += "\n";
break;
default:
i += " "
}
return i
}
,
t.prototype.parseStringISO = function(e, t) {
for (var n = "", i = e; t > i; ++i)
n += String.fromCharCode(this.get(i));
return n
}
,
t.prototype.parseStringUTF = function(e, t) {
for (var n = "", i = e; t > i; ) {
var o = this.get(i++);
n += String.fromCharCode(128 > o ? o : o > 191 && 224 > o ? (31 & o) << 6 | 63 & this.get(i++) : (15 & o) << 12 | (63 & this.get(i++)) << 6 | 63 & this.get(i++))
}
return n
}
,
t.prototype.parseStringBMP = function(e, t) {
for (var n = "", i = e; t > i; i += 2) {
var o = this.get(i)
, s = this.get(i + 1);
n += String.fromCharCode((o << 8) + s)
}
return n
}
,
t.prototype.reTime = /^((?:1[89]|2\d)?\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
t.prototype.parseTime = function(e, t) {
var n = this.parseStringISO(e, t)
, i = this.reTime.exec(n);
return i ? (n = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4],
i[5] && (n += ":" + i[5],
i[6] && (n += ":" + i[6],
i[7] && (n += "." + i[7]))),
i[8] && (n += " UTC",
"Z" != i[8] && (n += i[8],
i[9] && (n += ":" + i[9]))),
n) : "Unrecognized time: " + n
}
,
t.prototype.parseInteger = function(e, t) {
var n = t - e;
if (n > 4) {
n <<= 3;
var i = this.get(e);
if (0 === i)
n -= 8;
else
for (; 128 > i; )
i <<= 1,
--n;
return "(" + n + " bit)"
}
for (var o = 0, s = e; t > s; ++s)
o = o << 8 | this.get(s);
return o
}
,
t.prototype.parseBitString = function(e, t) {
var n = this.get(e)
, i = (t - e - 1 << 3) - n
, o = "(" + i + " bit)";
if (20 >= i) {
var s = n;
o += " ";
for (var a = t - 1; a > e; --a) {
for (var r = this.get(a), c = s; 8 > c; ++c)
o += r >> c & 1 ? "1" : "0";
s = 0
}
}
return o
}
,
t.prototype.parseOctetString = function(e, t) {
var n = t - e
, s = "(" + n + " byte) ";
n > i && (t = e + i);
for (var a = e; t > a; ++a)
s += this.hexByte(this.get(a));
return n > i && (s += o),
s
}
,
t.prototype.parseOID = function(e, t) {
for (var n = "", i = 0, o = 0, s = e; t > s; ++s) {
var a = this.get(s);
if (i = i << 7 | 127 & a,
o += 7,
!(128 & a)) {
if ("" === n) {
var r = 80 > i ? 40 > i ? 0 : 1 : 2;
n = r + "." + (i - 40 * r)
} else
n += "." + (o >= 31 ? "bigint" : i);
i = o = 0
}
}
return n
}
,
n.prototype.typeName = function() {
if (this.tag === e)
return "unknown";
var t = this.tag >> 6
, n = (this.tag >> 5 & 1,
31 & this.tag);
switch (t) {
case 0:
switch (n) {
case 0:
return "EOC";
case 1:
return "BOOLEAN";
case 2:
return "INTEGER";
case 3:
return "BIT_STRING";
case 4:
return "OCTET_STRING";
case 5:
return "NULL";
case 6:
return "OBJECT_IDENTIFIER";
case 7:
return "ObjectDescriptor";
case 8:
return "EXTERNAL";
case 9:
return "REAL";
case 10:
return "ENUMERATED";
case 11:
return "EMBEDDED_PDV";
case 12:
return "UTF8String";
case 16:
return "SEQUENCE";
case 17:
return "SET";
case 18:
return "NumericString";
case 19:
return "PrintableString";
case 20:
return "TeletexString";
case 21:
return "VideotexString";
case 22:
return "IA5String";
case 23:
return "UTCTime";
case 24:
return "GeneralizedTime";
case 25:
return "GraphicString";
case 26:
return "VisibleString";
case 27:
return "GeneralString";
case 28:
return "UniversalString";
case 30:
return "BMPString";
default:
return "Universal_" + n.toString(16)
}
case 1:
return "Application_" + n.toString(16);
case 2:
return "[" + n + "]";
case 3:
return "Private_" + n.toString(16)
}
}
,
n.prototype.reSeemsASCII = /^[ -~]+$/,
n.prototype.content = function() {
if (this.tag === e)
return null;
var t = this.tag >> 6
, n = 31 & this.tag
, s = this.posContent()
, a = Math.abs(this.length);
if (0 !== t) {
if (null !== this.sub)
return "(" + this.sub.length + " elem)";
var r = this.stream.parseStringISO(s, s + Math.min(a, i));
return this.reSeemsASCII.test(r) ? r.substring(0, 2 * i) + (r.length > 2 * i ? o : "") : this.stream.parseOctetString(s, s + a)
}
switch (n) {
case 1:
return 0 === this.stream.get(s) ? "false" : "true";
case 2:
return this.stream.parseInteger(s, s + a);
case 3:
return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(s, s + a);
case 4:
return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(s, s + a);
case 6:
return this.stream.parseOID(s, s + a);
case 16:
case 17:
return "(" + this.sub.length + " elem)";
case 12:
return this.stream.parseStringUTF(s, s + a);
case 18:
case 19:
case 20:
case 21:
case 22:
case 26:
return this.stream.parseStringISO(s, s + a);
case 30:
return this.stream.parseStringBMP(s, s + a);
case 23:
case 24:
return this.stream.parseTime(s, s + a)
}
return null
}
,
n.prototype.toString = function() {
return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]"
}
,
n.prototype.print = function(t) {
if (t === e && (t = ""),
document.writeln(t + this),
null !== this.sub) {
t += " ";
for (var n = 0, i = this.sub.length; i > n; ++n)
this.sub[n].print(t)
}
}
,
n.prototype.toPrettyString = function(t) {
t === e && (t = "");
var n = t + this.typeName() + " @" + this.stream.pos;
if (this.length >= 0 && (n += "+"),
n += this.length,
32 & this.tag ? n += " (constructed)" : 3 != this.tag && 4 != this.tag || null === this.sub || (n += " (encapsulates)"),
n += "\n",
null !== this.sub) {
t += " ";
for (var i = 0, o = this.sub.length; o > i; ++i)
n += this.sub[i].toPrettyString(t)
}
return n
}
,
n.prototype.toDOM = function() {
var e = s.tag("div", "node");
e.asn1 = this;
var t = s.tag("div", "head")
, n = this.typeName().replace(/_/g, " ");
t.innerHTML = n;
var i = this.content();
if (null !== i) {
i = String(i).replace(/",
n += "Length: " + this.header + "+",
n += this.length >= 0 ? this.length : -this.length + " (undefined)",
32 & this.tag ? n += "
(constructed)" : 3 != this.tag && 4 != this.tag || null === this.sub || (n += "
(encapsulates)"),
null !== i && (n += "
Value:
" + i + "",
"object" == typeof oids && 6 == this.tag)) {
var r = oids[i];
r && (r.d && (n += "
" + r.d),
r.c && (n += "
" + r.c),
r.w && (n += "
(warning!)"))
}
a.innerHTML = n,
e.appendChild(a);
var c = s.tag("div", "sub");
if (null !== this.sub)
for (var l = 0, d = this.sub.length; d > l; ++l)
c.appendChild(this.sub[l].toDOM());
return e.appendChild(c),
t.onclick = function() {
e.className = "node collapsed" == e.className ? "node" : "node collapsed"
}
,
e
}
,
n.prototype.posStart = function() {
return this.stream.pos
}
,
n.prototype.posContent = function() {
return this.stream.pos + this.header
}
,
n.prototype.posEnd = function() {
return this.stream.pos + this.header + Math.abs(this.length)
}
,
n.prototype.fakeHover = function(e) {
this.node.className += " hover",
e && (this.head.className += " hover")
}
,
n.prototype.fakeOut = function(e) {
var t = / ?hover/;
this.node.className = this.node.className.replace(t, ""),
e && (this.head.className = this.head.className.replace(t, ""))
}
,
n.prototype.toHexDOM_sub = function(e, t, n, i, o) {
if (!(i >= o)) {
var a = s.tag("span", t);
a.appendChild(s.text(n.hexDump(i, o))),
e.appendChild(a)
}
}
,
n.prototype.toHexDOM = function(t) {
var n = s.tag("span", "hex");
if (t === e && (t = n),
this.head.hexNode = n,
this.head.onmouseover = function() {
this.hexNode.className = "hexCurrent"
}
,
this.head.onmouseout = function() {
this.hexNode.className = "hex"
}
,
n.asn1 = this,
n.onmouseover = function() {
var e = !t.selected;
e && (t.selected = this.asn1,
this.className = "hexCurrent"),
this.asn1.fakeHover(e)
}
,
n.onmouseout = function() {
var e = t.selected == this.asn1;
this.asn1.fakeOut(e),
e && (t.selected = null,
this.className = "hex")
}
,
this.toHexDOM_sub(n, "tag", this.stream, this.posStart(), this.posStart() + 1),
this.toHexDOM_sub(n, this.length >= 0 ? "dlen" : "ulen", this.stream, this.posStart() + 1, this.posContent()),
null === this.sub)
n.appendChild(s.text(this.stream.hexDump(this.posContent(), this.posEnd())));
else if (this.sub.length > 0) {
var i = this.sub[0]
, o = this.sub[this.sub.length - 1];
this.toHexDOM_sub(n, "intro", this.stream, this.posContent(), i.posStart());
for (var a = 0, r = this.sub.length; r > a; ++a)
n.appendChild(this.sub[a].toHexDOM(t));
this.toHexDOM_sub(n, "outro", this.stream, o.posEnd(), this.posEnd())
}
return n
}
,
n.prototype.toHexString = function() {
return this.stream.hexDump(this.posStart(), this.posEnd(), !0)
}
,
n.decodeLength = function(e) {
var t = e.get()
, n = 127 & t;
if (n == t)
return n;
if (n > 3)
throw "Length over 24 bits not supported at position " + (e.pos - 1);
if (0 === n)
return -1;
t = 0;
for (var i = 0; n > i; ++i)
t = t << 8 | e.get();
return t
}
,
n.hasContent = function(e, i, o) {
if (32 & e)
return !0;
if (3 > e || e > 4)
return !1;
var s = new t(o);
3 == e && s.get();
var a = s.get();
if (a >> 6 & 1)
return !1;
try {
var r = n.decodeLength(s);
return s.pos - o.pos + r == i
} catch (c) {
return !1
}
}
,
n.decode = function(e) {
e instanceof t || (e = new t(e,0));
var i = new t(e)
, o = e.get()
, s = n.decodeLength(e)
, a = e.pos - i.pos
, r = null;
if (n.hasContent(o, s, e)) {
var c = e.pos;
if (3 == o && e.get(),
r = [],
s >= 0) {
for (var l = c + s; e.pos < l; )
r[r.length] = n.decode(e);
if (e.pos != l)
throw "Content size is not correct for container starting at offset " + c
} else
try {
for (; ; ) {
var d = n.decode(e);
if (0 === d.tag)
break;
r[r.length] = d
}
s = c - e.pos
} catch (u) {
throw "Exception while decoding undefined length content: " + u
}
} else
e.pos += s;
return new n(i,a,s,o,r)
}
,
n.test = function() {
for (var e = [{
value: [39],
expected: 39
}, {
value: [129, 201],
expected: 201
}, {
value: [131, 254, 220, 186],
expected: 16702650
}], i = 0, o = e.length; o > i; ++i) {
var s = new t(e[i].value,0)
, a = n.decodeLength(s);
a != e[i].expected && document.write("In test[" + i + "] expected " + e[i].expected + " got " + a + "\n")
}
}
,
window.ASN1 = n
}(),
ASN1.prototype.getHexStringValue = function() {
var e = this.toHexString()
, t = 2 * this.header
, n = 2 * this.length;
return e.substr(t, n)
}
,
pn.prototype.parseKey = function(e) {
try {
var t = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/
, n = t.test(e) ? Hex.decode(e) : Base64.unarmor(e)
, i = ASN1.decode(n);
if (9 === i.sub.length) {
var o = i.sub[1].getHexStringValue();
this.n = dn(o, 16);
var s = i.sub[2].getHexStringValue();
this.e = parseInt(s, 16);
var a = i.sub[3].getHexStringValue();
this.d = dn(a, 16);
var r = i.sub[4].getHexStringValue();
this.p = dn(r, 16);
var c = i.sub[5].getHexStringValue();
this.q = dn(c, 16);
var l = i.sub[6].getHexStringValue();
this.dmp1 = dn(l, 16);
var d = i.sub[7].getHexStringValue();
this.dmq1 = dn(d, 16);
var u = i.sub[8].getHexStringValue();
this.coeff = dn(u, 16)
} else {
if (2 !== i.sub.length)
return !1;
var p = i.sub[1]
, g = p.sub[0]
, o = g.sub[0].getHexStringValue();
this.n = dn(o, 16);
var s = g.sub[1].getHexStringValue();
this.e = parseInt(s, 16)
}
return !0
} catch (m) {
return !1
}
}
,
pn.prototype.getPrivateBaseKey = function() {
var e = {
array: [new KJUR.asn1.DERInteger({
"int": 0
}), new KJUR.asn1.DERInteger({
bigint: this.n
}), new KJUR.asn1.DERInteger({
"int": this.e
}), new KJUR.asn1.DERInteger({
bigint: this.d
}), new KJUR.asn1.DERInteger({
bigint: this.p
}), new KJUR.asn1.DERInteger({
bigint: this.q
}), new KJUR.asn1.DERInteger({
bigint: this.dmp1
}), new KJUR.asn1.DERInteger({
bigint: this.dmq1
}), new KJUR.asn1.DERInteger({
bigint: this.coeff
})]
}
, t = new KJUR.asn1.DERSequence(e);
return t.getEncodedHex()
}
,
pn.prototype.getPrivateBaseKeyB64 = function() {
return En(this.getPrivateBaseKey())
}
,
pn.prototype.getPublicBaseKey = function() {
var e = {
array: [new KJUR.asn1.DERObjectIdentifier({
oid: "1.2.840.113549.1.1.1"
}), new KJUR.asn1.DERNull]
}
, t = new KJUR.asn1.DERSequence(e);
e = {
array: [new KJUR.asn1.DERInteger({
bigint: this.n
}), new KJUR.asn1.DERInteger({
"int": this.e
})]
};
var n = new KJUR.asn1.DERSequence(e);
e = {
hex: "00" + n.getEncodedHex()
};
var i = new KJUR.asn1.DERBitString(e);
e = {
array: [t, i]
};
var o = new KJUR.asn1.DERSequence(e);
return o.getEncodedHex()
}
,
pn.prototype.getPublicBaseKeyB64 = function() {
return En(this.getPublicBaseKey())
}
,
pn.prototype.wordwrap = function(e, t) {
if (t = t || 64,
!e)
return e;
var n = "(.{1," + t + "})( +|$\n?)|(.{1," + t + "})";
return e.match(RegExp(n, "g")).join("\n")
}
,
pn.prototype.getPrivateKey = function() {
var e = "-----BEGIN RSA PRIVATE KEY-----\n";
return e += this.wordwrap(this.getPrivateBaseKeyB64()) + "\n",
e += "-----END RSA PRIVATE KEY-----"
}
,
pn.prototype.getPublicKey = function() {
var e = "-----BEGIN PUBLIC KEY-----\n";
return e += this.wordwrap(this.getPublicBaseKeyB64()) + "\n",
e += "-----END PUBLIC KEY-----"
}
,
pn.prototype.hasPublicKeyProperty = function(e) {
return e = e || {},
e.hasOwnProperty("n") && e.hasOwnProperty("e")
}
,
pn.prototype.hasPrivateKeyProperty = function(e) {
return e = e || {},
e.hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff")
}
,
pn.prototype.parsePropertiesFrom = function(e) {
this.n = e.n,
this.e = e.e,
e.hasOwnProperty("d") && (this.d = e.d,
this.p = e.p,
this.q = e.q,
this.dmp1 = e.dmp1,
this.dmq1 = e.dmq1,
this.coeff = e.coeff)
}
;
var Qn = function(e) {
pn.call(this),
e && ("string" == typeof e ? this.parseKey(e) : (this.hasPrivateKeyProperty(e) || this.hasPublicKeyProperty(e)) && this.parsePropertiesFrom(e))
};
Qn.prototype = new pn,
Qn.prototype.constructor = Qn;
var Jn = function(e) {
e = e || {},
this.default_key_size = parseInt(e.default_key_size) || 1024,
this.default_public_exponent = e.default_public_exponent || "010001",
this.log = e.log || !1,
this.key = null
};
Jn.prototype.setKey = function(e) {
this.log && this.key && console.warn("A key was already set, overriding existing."),
this.key = new Qn(e)
}
,
Jn.prototype.setPrivateKey = function(e) {
this.setKey(e)
}
,
Jn.prototype.setPublicKey = function(e) {
this.setKey(e)
}
,
Jn.prototype.decrypt = function(e) {
try {
return this.getKey().decrypt(Cn(e))
} catch (t) {
return !1
}
}
,
Jn.prototype.encrypt = function(e) {
try {
return En(this.getKey().encrypt(e))
} catch (t) {
return !1
}
}
,
Jn.prototype.getKey = function(e) {
if (!this.key) {
if (this.key = new Qn,
e && "[object Function]" === {}.toString.call(e))
return void this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
this.key.generate(this.default_key_size, this.default_public_exponent)
}
return this.key
}
,
Jn.prototype.getPrivateKey = function() {
return this.getKey().getPrivateKey()
}
,
Jn.prototype.getPrivateKeyB64 = function() {
return this.getKey().getPrivateBaseKeyB64()
}
,
Jn.prototype.getPublicKey = function() {
return this.getKey().getPublicKey()
}
,
Jn.prototype.getPublicKeyB64 = function() {
return this.getKey().getPublicBaseKeyB64()
}
,
e.JSEncrypt = Jn
}(passport.lib.RSAExport),
passport.lib.RSA = passport.lib.RSAExport.JSEncrypt;
var passport = passport || window.passport || {};
passport.err = passport.err || {},
function(e) {
var t = null
, n = ""
, i = new RegExp("(^|&)lang=([^&]*)(&|$)","i")
, o = window.location.search.substr(1).match(i);
null != o && (n = unescape(o[2])),
t = "function" === (typeof e.getCurrent).toLowerCase() ? e.getCurrent() : {
errMsg: {},
labelText: {}
};
var s = {
"zh-CN": {
"-1": {
msg: '系统错误,请您稍后再试,帮助中心',
field: ""
},
1: {
msg: "您输入的帐号格式不正确",
field: "userName"
},
2: {
msg: '用户名或密码有误,请重新输入或找回密码',
field: "userName"
},
3: {
msg: "验证码不存在或已过期,请重新输入",
field: ""
},
4: {
msg: "帐号或密码错误,请重新输入或者找回密码",
field: "password"
},
5: {
msg: "",
field: ""
},
6: {
msg: "您输入的验证码有误",
field: "verifyCode"
},
7: {
msg: "用户名或密码有误,请重新输入或找回密码",
field: "password"
},
16: {
msg: '您的帐号因安全问题已被限制登录,帮助中心',
field: ""
},
257: {
msg: "请输入验证码",
field: "verifyCode"
},
100027: {
msg: "百度正在进行系统升级,暂时不能提供服务,敬请谅解",
field: ""
},
120016: {
msg: "",
field: ""
},
18: {
msg: "",
field: ""
},
19: {
msg: "",
field: ""
},
20: {
msg: "",
field: ""
},
21: {
msg: "没有登录权限",
field: ""
},
22: {
msg: "",
field: ""
},
23: {
msg: "",
field: ""
},
24: {
msg: "百度正在进行系统升级,暂时不能提供服务,敬请谅解",
field: ""
},
400031: {
msg: "请在弹出的窗口操作,或重新登录",
field: ""
},
400032: {
msg: "",
field: ""
},
400034: {
msg: "",
field: ""
},
401007: {
msg: "您的手机号关联了其他帐号,请选择登录",
field: ""
},
120021: {
msg: "登录失败,请在弹出的窗口操作,或重新登录",
field: ""
},
500010: {
msg: "登录过于频繁,请24小时后再试",
field: ""
},
200010: {
msg: "验证码不存在或已过期",
field: ""
},
100005: {
msg: "系统错误,请您稍后再试",
field: ""
},
120019: {
msg: "请在弹出的窗口操作,或重新登录",
field: "userName"
},
110024: {
msg: "此帐号暂未激活,重发验证邮件",
field: ""
},
100023: {
msg: "系统升级中,为了您的帐号安全,您可以使用二维码登录或者更换其他浏览器继续登录",
field: ""
},
17: {
msg: '您的帐号已锁定,请解锁后登录',
field: "userName"
},
400401: {
msg: "",
field: ""
},
400037: {
msg: "",
field: ""
},
50023: {
msg: "1个手机号30日内最多换绑3个账号",
field: ""
},
50024: {
msg: "注册过于频繁,请稍候再试",
field: ""
},
50025: {
msg: "注册过于频繁,请稍候再试;也可以通过上行短信的方式进行注册",
field: ""
},
50028: {
msg: '帐号或密码多次输错,请3个小时之后再试或找回密码',
field: ""
},
50029: {
msg: '帐号或密码多次输错,请3个小时之后再试或找回密码',
field: ""
},
400714: {
msg: '系统检测你的帐号疑似被盗,存在安全风险请重置密码',
field: ""
},
50030: {
msg: "抱歉,该手机号的申请次数已达当日上限,请更换手机号",
field: ""
},
50031: {
msg: "抱歉,该手机号的申请次数已达当月上限,请更换手机号",
field: ""
},
50032: {
msg: "抱歉,该手机号的申请次数已达本季度上限,请更换手机号",
field: ""
},
50035: {
msg: "系统错误,请您稍后再试(50035)",
field: ""
},
400413: {
msg: "",
field: ""
},
400414: {
msg: "",
field: ""
},
400415: {
msg: "帐号存在风险,为了您的帐号安全,请到百度钱包/理财/地图任一APP登录并完成验证,谢谢",
field: ""
},
400500: {
msg: "您登录的帐号已注销,请登录其他帐号或重新注册",
field: ""
},
72200: {
msg: "您的帐号因冻结暂时无法登录,请前往冻结时的手机APP,在登录页点击遇到问题进行解冻",
field: ""
},
96001: {
msg: "您的帐号因违反百度用户协议被限制登录",
field: ""
},
100060: {
msg: "因系统升级暂不支持注册,预计6月7日恢复服务",
field: ""
},
400702: {
msg: "该帐号已关闭手机号登录,请使用帐号密码登录",
field: ""
},
400704: {
msg: "",
field: ""
},
400706: {
msg: "",
field: ""
},
50043: {
msg: "当前浏览器版本过低,请升级或更换浏览器后重试",
field: ""
},
923002: {
msg: "当前身份证无法识别",
field: ""
},
97101: {
msg: "系统繁忙,请稍候再试",
field: ""
},
400703: {
msg: "手机号已被运营商二次放号,请前往https://passport.baidu.com/v2/?reg注册新帐号",
field: ""
},
50045: {
msg: "您的手机因安全问题已被限制"
},
50046: {
msg: "您的ip因安全问题已被限制"
},
50044: {
msg: "您的网络环境存在安全风险,请切换网络重试"
},
50047: {
msg: "暂不支持海外及港澳台地区注册"
},
50048: {
msg: "您当前的操作存在安全风险,请稍后再试"
},
26: {
msg: "暂不支持海外及港澳台地区注册"
},
100073: {
msg: "网盘帐号系统正在升级,现暂停新帐号注册,将于2月28日恢复开放,对此给您带来不便深表歉意!"
},
400012: {
msg: '您的帐号因违反百度用户协议被限制登录 去申诉'
},
400044: {
msg: '您的帐号因违反百度用户协议被限制登录 去申诉'
}
},
zh_HK: {
"-1": {
msg: '系統錯誤,請您稍後再試,幫助中心',
field: ""
},
1: {
msg: "您輸入的帳號格式不正確",
field: "userName"
},
2: {
msg: '用戶名或密碼有誤,請重新輸入或找回密碼',
field: "userName"
},
3: {
msg: "驗證碼不存在或已過期,請重新輸入",
field: ""
},
4: {
msg: "帳號或密碼錯誤,請重新輸入或者找回密碼",
field: "password"
},
5: {
msg: "",
field: ""
},
6: {
msg: "您輸入的驗證碼有誤",
field: "verifyCode"
},
7: {
msg: "用戶名或密碼有誤,請重新輸入或找回密碼",
field: "password"
},
16: {
msg: '您的帳號因安全問題已被限制登錄,幫助中心',
field: ""
},
257: {
msg: "請輸入驗證碼",
field: "verifyCode"
},
100027: {
msg: "百度正在進行系統升級,暫時不能提供服務,敬請諒解",
field: ""
},
120016: {
msg: "",
field: ""
},
18: {
msg: "",
field: ""
},
19: {
msg: "",
field: ""
},
20: {
msg: "",
field: ""
},
21: {
msg: "沒有登錄權限",
field: ""
},
22: {
msg: "",
field: ""
},
23: {
msg: "",
field: ""
},
24: {
msg: "百度正在進行系統升級,暫時不能提供服務,敬請諒解",
field: ""
},
400031: {
msg: "請在彈出的窗口操作,或重新登錄",
field: ""
},
400032: {
msg: "",
field: ""
},
400034: {
msg: "",
field: ""
},
401007: {
msg: "您的手機號關聯了其他帳號,請選擇登錄",
field: ""
},
120021: {
msg: "登錄失敗,請在彈出的窗口操作,或重新登錄",
field: ""
},
500010: {
msg: "登錄過於頻繁,請24小時後再試",
field: ""
},
200010: {
msg: "驗證碼不存在或已過期",
field: ""
},
100005: {
msg: "系統錯誤,請您稍後再試",
field: ""
},
120019: {
msg: "請在彈出的窗口操作,或重新登錄",
field: "userName"
},
110024: {
msg: "此帳號暫未激活,重發驗證郵件",
field: ""
},
100023: {
msg: "系統升級中,為了您的帳號安全,您可以使用二維碼登錄或者更換其他瀏覽器繼續登錄",
field: ""
},
17: {
msg: '您的帳號已鎖定,請解鎖後登錄',
field: "userName"
},
400401: {
msg: "",
field: ""
},
400037: {
msg: "",
field: ""
},
50023: {
msg: "1個手機號30日內最多換綁3個賬號",
field: ""
},
50024: {
msg: "註冊過於頻繁,請稍候再試",
field: ""
},
50025: {
msg: "註冊過於頻繁,請稍候再試;也可以通過上行短信的方式進行註冊",
field: ""
},
50028: {
msg: '帳號或密碼多次輸錯,請3個小時之後再試或找回密碼',
field: ""
},
50029: {
msg: '帳號或密碼多次輸錯,請3個小時之後再試或找回密碼',
field: ""
},
400714: {
msg: '系統檢測你的帳號疑似被盜,存在安全風險請重置密碼',
field: ""
},
50030: {
msg: "抱歉,該手機號的申請次數已達當日上限,請更換手機號",
field: ""
},
50031: {
msg: "抱歉,該手機號的申請次數已達當月上限,請更換手機號",
field: ""
},
50032: {
msg: "抱歉,該手機號的申請次數已達本季度上限,請更換手機號",
field: ""
},
50035: {
msg: "系統錯誤,請您稍後再試(50035)",
field: ""
},
400413: {
msg: "",
field: ""
},
400414: {
msg: "",
field: ""
},
400415: {
msg: "帳號存在風險,為了您的帳號安全,請到百度錢包/理財/地圖任一APP登錄並完成驗證,謝謝",
field: ""
},
400500: {
msg: "您登錄的帳號已註銷,請登錄其他帳號或重新註冊",
field: ""
},
72200: {
msg: "您的帳號因凍結暫時無法登錄,請前往凍結時的手機APP,在登錄頁點擊遇到問題進行解凍",
field: ""
},
96001: {
msg: "您的帳號因違反百度用戶協議被限制登錄",
field: ""
},
100060: {
msg: "因系統升級暫不支持註冊,預計6月7日恢復服務",
field: ""
},
400702: {
msg: "該帳號已關閉手機號登錄,請使用帳號密碼登錄",
field: ""
},
400704: {
msg: "",
field: ""
},
400706: {
msg: "",
field: ""
},
50043: {
msg: "當前瀏覽器版本過低,請升級或更換瀏覽器後重試",
field: ""
},
923002: {
msg: "當前身份證無法識別",
field: ""
},
97101: {
msg: "系統繁忙,請稍候再試",
field: ""
},
400703: {
msg: "手機號已被運營商二次放號,請前往https://passport.baidu.com/v2/?reg註冊新帳號",
field: ""
},
50045: {
msg: "您的手機因安全問題已被限制"
},
50046: {
msg: "您的ip因安全問題已被限制"
},
50044: {
msg: "您的網絡環境存在安全風險,請切換網絡重試"
},
50047: {
msg: "暫不支持海外及港澳臺地區註冊"
},
50048: {
msg: "您當前的操作存在安全風險,請稍後再試"
},
26: {
msg: "暫不支持海外及港澳臺地區註冊"
},
100073: {
msg: "網盤帳號系統正在升級,現暫停新帳號註冊,將於2月28日恢復開放,對此給您帶來不便深表歉意!"
},
400012: {
msg: '您的帳號因違反百度用戶協議被限制登錄 去申訴'
},
400044: {
msg: '您的帳號因違反百度用戶協議被限制登錄 去申訴'
}
}
}
, a = {
"zh-CN": {
500002: {
msg: "您输入的验证码有误",
field: "verifyCode"
},
500018: {
msg: "验证码已失效,请重试",
field: "verifyCode"
}
},
zh_HK: {
500002: {
msg: "您輸入的驗證碼有誤",
field: "verifyCode"
},
500018: {
msg: "驗證碼已失效,請重試",
field: "verifyCode"
}
}
}
, r = {
"zh-CN": {
agree: "阅读并接受",
baiduUserProtocal: "百度用户协议",
baiduUserPersonal: "隐私政策",
baiduUsePassport: "百度帐号使用说明",
verifyCode: "验证码",
verifyCodeStaErr: "您输入的验证码有误",
verifyCodeLenErr: "您输入的验证码有误",
unReceiveSmsCode: "收不到短信验证码?",
captcha: "验证码",
captchaAlt: "验证码图片",
captchaChange: "换一张",
memberPassLabel: "下次自动登录",
login: "登录",
fgtPwd: "忘记密码?",
feedback: "帮助中心",
register: "立即注册",
phoneNum: "手机号",
account: "邮箱",
userName: "手机号/用户名/邮箱",
password: "密码",
passwordResetWarnNo: '用户名或密码有误,请重新输入或找回密码',
passwordResetSms: '短信登录,或者',
passwordResetWarn: '用户名或密码有误,请重新输入或找回密码',
passwordResetIn: "个月以内",
passwordResetOut: "个月以前",
unameMailLengthError: "邮箱过长,请重新输入",
unameInputError: "邮箱格式错误,若未绑定邮箱,请使用用户名登录",
smsPhone: "手机号",
smsPhoneMsg: "请输入手机号",
smsVerifyPlaceholder: "验证码",
smsVerifyCode: "验证码",
toSmsBtn: "短信快捷登录",
logining: "登录中...",
loginsuccess: "登录成功",
submitTimeup: "登录超时,请稍后再试",
backToLogin: "用户名密码登录",
footerBackToLogin: "用户名登录",
qrcodeTitle: "请使用",
qrcodeHref: '百度App',
qrcodeText: "扫码登录",
qrcodeMsg: "百度技术加密,保障您的隐私安全",
qrcodeListaq: "安全",
qrcodeListgx: "高效",
qrcodeListbj: "便捷",
appName: "百度App",
appHref: "http://xbox.m.baidu.com/mo/",
sysError: "系统错误,休息一会儿,请稍后再试",
sysUpdate: "服务正在升级中,请您稍后再试",
cookieDisable: "开启Cookie之后才能登录,如何开启?",
captchaErr: "动态密码错误",
confirmVerCodeEmpty: "验证码为空",
foreignToLogin: "帐号密码登录",
foreignMobileError: "手机号码格式不正确",
foreignMobileMsg: "请选择您的国家地区",
foreignMobileLink: "海外手机号",
phoenixBtn: "第三方登录",
qrcodeBtn: "扫码登录",
QrcodeSuccessTip: "扫描成功",
QrcodeSuccessMsg: "请在手机端确认登录",
QrcodeErrorTip: "网络连接失败",
QrcodeErrorMsg: "请稍候再试",
QrcodeRefreshTip: "二维码已失效",
QrcodeRefreshBtn: "点击刷新",
QrcodeLoadTip: "二维码加载失败",
nopassLead: '该帐号尚未设置密码,请先设置密码后在登录',
resend: "重新发送",
userNameLogin: "用户名登录",
emailLogin: "邮箱登录",
forgetEmail: "忘记邮箱?使用",
fillPhonePls: "请填写手机号",
userNameTitle: "用户名",
smsLogin: "短信登录",
fillVerifyCodePls: "请填写验证码",
forgetUserName: "忘记用户名?使用",
verifyEqualLogin: "验证即登录,未注册将自动创建百度帐号",
cantReceiveSms: "收不到验证码",
checkIfBlocked: "1.请检查短信是否被安全软件拦截",
overTimeArrive: "2.运营商网络原因,短信可能延迟到达",
reguest: "建议您",
switchLoginMethod: "切换登录方式",
usePhoneSendSms: "使用该手机号,编辑短信",
shouldLogSuccess: "即可登录成功",
introductSms: "(短信费用请参考运营商资费标准)",
rule1: "建议使用当前手机号,编辑短信 8-14 位字符(支持数字/字母/符号),",
rule2: "作为登录密码,发送至1069 0691 036590,即可注册成功",
mainland: "大陆地区"
},
zh_HK: {
agree: "閱讀並接受",
baiduUserProtocal: "百度用戶協議",
baiduUserPersonal: "隱私政策",
baiduUsePassport: "百度帳號使用說明",
verifyCode: "驗證碼",
verifyCodeStaErr: "您輸入的驗證碼有誤",
verifyCodeLenErr: "您輸入的驗證碼有誤",
unReceiveSmsCode: "收不到短信驗證碼?",
captcha: "驗證碼",
captchaAlt: "驗證碼圖片",
captchaChange: "換一張",
memberPassLabel: "下次自動登錄",
login: "登錄",
fgtPwd: "忘記密碼?",
feedback: "幫助中心",
register: "立即註冊",
phoneNum: "手機號",
account: "郵箱",
userName: "手機/郵箱/用戶名",
password: "密碼",
passwordResetWarnNo: '用戶名或密碼有誤,請重新輸入或找回密碼',
passwordResetSms: '短信登錄,或者',
passwordResetWarn: '用戶名或密碼有誤,請重新輸入或找回密碼',
passwordResetIn: "個月以內",
passwordResetOut: "個月以前",
unameMailLengthError: "郵箱過長,請重新輸入",
unameInputError: "郵箱格式錯誤,若未綁定郵箱,請使用用戶名登錄",
smsPhone: "手機號",
smsPhoneMsg: "請輸入手機號",
smsVerifyPlaceholder: "驗證碼",
smsVerifyCode: "驗證碼",
toSmsBtn: "短信快捷登錄",
logining: "登錄中...",
loginsuccess: "登錄成功",
submitTimeup: "登錄超時,請稍後再試",
backToLogin: "用戶名密碼登錄",
footerBackToLogin: "用戶名登錄",
qrcodeTitle: "請使用",
qrcodeHref: '百度App',
qrcodeText: "掃碼登錄",
qrcodeMsg: "百度技術加密,保障您的隱私安全",
qrcodeListaq: "安全",
qrcodeListgx: "高效",
qrcodeListbj: "便捷",
appName: "百度App",
appHref: "http://xbox.m.baidu.com/mo/",
sysError: "系統錯誤,休息一會兒,請稍後再試",
sysUpdate: "服務正在升級中,請您稍後再試",
cookieDisable: "開啟Cookie之後才能登錄,如何開啟?",
captchaErr: "動態密碼錯誤",
confirmVerCodeEmpty: "驗證碼為空",
foreignToLogin: "帳號密碼登錄",
foreignMobileError: "手機號碼格式不正確",
foreignMobileMsg: "請選擇您的國家地區",
foreignMobileLink: "海外手機號",
phoenixBtn: "第三方登錄",
qrcodeBtn: "掃碼登錄",
QrcodeSuccessTip: "掃描成功",
QrcodeSuccessMsg: "請在手機端確認登錄",
QrcodeErrorTip: "網絡連接失敗",
QrcodeErrorMsg: "請稍候再試",
QrcodeRefreshTip: "二維碼已失效",
QrcodeRefreshBtn: "點擊刷新",
QrcodeLoadTip: "二維碼加載失敗",
nopassLead: '該帳號尚未設置密碼,請先設置密碼後在登錄',
resend: "重新發送",
userNameLogin: "用戶名登錄",
emailLogin: "郵箱登錄",
forgetEmail: "忘記郵箱?使用",
fillPhonePls: "請填寫手機號",
userNameTitle: "用戶名",
smsLogin: "短信登錄",
fillVerifyCodePls: "請填寫驗證碼",
forgetUserName: "忘記用戶名?使用",
verifyEqualLogin: "驗證即登錄,未註冊將自動創建百度帳號",
cantReceiveSms: "收不到驗證碼",
checkIfBlocked: "1.請檢查短信是否被安全軟件攔截",
overTimeArrive: "2.運營商網絡原因,短信可能延遲到達",
reguest: "建議您",
switchLoginMethod: "切換登錄方式",
usePhoneSendSms: "使用該手機號,編輯短信",
shouldLogSuccess: "即可登錄成功",
introductSms: "(短信費用請參考運營商資費標準)",
rule1: "建議使用當前手機號,編輯短信 8-14 位字符(支持數字/字母/符號),",
rule2: "作為登錄密碼,發送至1069 0691 036590,即可註冊成功",
mainland: "大陸地區"
}
}
, c = {
"zh-CN": {
bindAction16: "您的帐号存在安全风险,我们已经为您采取保护策略,建议您先绑定手机。",
bindAction32: "快来绑定密保工具吧,提升帐号安全性的同时可以快速找回密码。",
bindAction34: "请绑定您的手机号码作为您的密保手机,提升帐号安全性的同时还可以快速找回密码。",
bindAction: "请绑定一个您的常用邮箱作为您的密保邮箱,提升帐号安全性的同时还可以快速找回密码。",
getWarnHtml: "系统检测到您的帐号疑似被盗,存在安全风险。请尽快修改密码。"
},
zh_HK: {
500002: {
msg: "您輸入的驗證碼有誤",
field: "verifyCode"
},
500018: {
msg: "驗證碼已失效,請重試",
field: "verifyCode"
}
}
}
, l = {
"zh-CN": {
agree: "阅读并同意",
user: "《百度用户协议》",
personal: "《隐私政策》",
passUse: "《百度帐号使用说明》"
},
zh_HK: {
agree: "閱讀並同意",
user: "《百度用戶協議》",
personal: "《隱私政策》",
passUse: "《百度帳號使用說明》"
}
};
e.getCurrent = function(e) {
var i = "zh_HK" === n ? "zh_HK" : "zh-CN"
, o = e ? e : i;
return t.errMsg.login = s[o],
t.errMsg.checkVerifycode = a[o],
t.labelText.login = r[o],
t.agreements = l[o],
t.hooksText = c[o],
t
}
}(passport.err);
var passport = passport || window.passport || {};
passport.data = passport.data || {},
function(e) {
function t(e) {
this._requests = [],
this._value = null,
this._exception = null,
this._isComplete = !1;
var t = this;
e(function(e) {
t._fulfillPromise(e)
}, function(e) {
t._breakPromise(e)
})
}
function n(e, t, n) {
return t ? n ? function(n) {
return n = n || {},
l.submit(d + t, i(n, e, g[e], m[e], !0), {
charset: "utf-8",
processData: function(t) {
if (t)
for (var n in t)
if (t.hasOwnProperty(n)) {
var i = t[n];
i && (t[n] = decodeURIComponent(i))
}
return o(e, t)
}
})
}
: function(n) {
return l.jsonp(d + t, i(n, e, g[e], m[e], !1), {
charset: "utf-8",
processData: function(t) {
return o(e, t)
}
})
}
: r
}
function i(e, t, n, i, o) {
var s = o ? {
staticpage: _.staticPage,
charset: _.charset || document.characterSet || document.charset || ""
} : {}
, a = f[t];
if (a)
for (var r in a) {
if (a.hasOwnProperty(r)) {
var l = a[r];
s[r] = "function" == typeof l ? l(e) : l
}
"verifypass" == r && (s[r] = decodeURIComponent(s[r]))
}
if (s.token = _.token || "",
s.tpl = _.product || "",
s.subpro = _.subpro || "",
s.apiver = "v3",
s.tt = (new Date).getTime(),
e) {
n = n || {},
i = i || {};
for (var r in e)
if (e.hasOwnProperty(r)) {
var d = i[r]
, u = d ? d(e[r], e) : e[r];
"string" == typeof u && (o && (u = decodeURIComponent(u)),
h[r] || (u = c.trim(u))),
s[n[r] || r.toLowerCase()] = u
}
}
return s
}
function o(t, n) {
if (e && e.traceID && e.traceID.getTraceID && e.traceID.getTraceID(n),
n) {
var i = v[t];
i && i(n);
var o = n.errInfo
, a = n
, r = a;
return o ? a.errInfo = s(t, o, a) : (o = {
no: n.err_no,
msg: n.err_msg || ""
},
delete a.err_no,
delete a.err_msg,
r = {
data: a,
errInfo: s(t, o, a)
}),
r
}
return n
}
function s(e, t) {
var n = y[b[e] || e];
if (n && t && 0 != t.no) {
var i = n[t.no] || n[-1];
if (i) {
var o = i.msg;
t.msg = o,
t.field = i.field
}
}
return t
}
function a(t) {
if (e && e.traceID && e.traceID.getTraceID && e.traceID.getTraceID(t),
t) {
var n = t.errInfo
, i = t;
if (!n)
for (var o in t)
if (t.hasOwnProperty(o)) {
var s = t[o];
s && (t[o] = decodeURIComponent(s))
}
n || (n = {
no: t.err_no,
msg: t.err_msg || ""
},
delete i.err_no,
delete i.err_msg,
t = {
data: i,
errInfo: n
})
}
return t
}
var r = function() {};
t.prototype = {
get_isComplete: function() {
return this._isComplete
},
get_value: function() {
if (!this._isComplete)
return void 0;
if (this._exception)
throw this._exception;
return this._value
},
call: function(e) {
for (var t = [], n = 0, i = arguments.length - 1; i > n; n++)
t[n] = arguments[n + 1];
return this.when(function(n) {
return n[e].apply(n, t)
})
},
getValue: function(e) {
return this.when(function(t) {
return t[e]
})
},
setValue: function(e, t) {
this.whenOnly(function(n) {
n[e] = t
})
},
when: function(e, n, i) {
return t.when(this, e, n, i)
},
whenOnly: function(e, n, i) {
t.whenOnly(this, e, n, i)
},
success: function(e, t) {
return this.when(e, r, t)
},
fail: function(e, t) {
return this.when(r, e, t)
},
_enqueueOne: function(e) {
this._isComplete ? this._notify(e) : this._requests.push(e)
},
_notify: function(e) {
this._exception ? e.breakPromise && e.breakPromise(this._exception) : e.fulfillPromise && e.fulfillPromise(this._value)
},
_notifyAll: function() {
for (var e = 0, t = this._requests.length; t > e; e++)
this._notify(this._requests[e])
},
_fulfillPromise: function(e) {
this._value = e,
this._exception = null,
this._isComplete = !0,
this._notifyAll()
},
_breakPromise: function(e) {
this._value = null,
this._exception = e || new Error("An error occured"),
this._isComplete = !0,
this._notifyAll()
}
},
t.when = function(e, n, i, o) {
return new t(function(s, a) {
t.make(e)._enqueueOne({
fulfillPromise: function(e) {
s(n ? n.call(o, e) : e)
},
breakPromise: function(e) {
if (i)
try {
s(i.call(o, e))
} catch (t) {
a(t)
}
else
a(e)
}
})
}
)
}
,
t.whenOnly = function(e, n, i, o) {
t.make(e)._enqueueOne({
fulfillPromise: function(e) {
n && n.call(o, e)
},
breakPromise: function(e) {
i && i.call(o, e)
}
})
}
,
t.make = function(e) {
return e instanceof t ? e : t.immediate(e)
}
,
t.immediate = function(e) {
return new t(function(t) {
t(e)
}
)
}
;
var c = {};
!function(e) {
var t = new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)","g");
e.trim = function(e) {
return String(e).replace(t, "")
}
,
e.getUniqueId = function(e) {
return e + Math.floor(2147483648 * Math.random()).toString(36)
}
,
e.g = function(e) {
return e ? "string" == typeof e || e instanceof String ? document.getElementById(e) : !e.nodeName || 1 != e.nodeType && 9 != e.nodeType ? null : e : null
}
,
e.getParent = function(t) {
return t = e.g(t),
t.parentElement || t.parentNode || null
}
,
e.encodeHTML = function(e) {
return String(e).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'")
}
,
e.array = e.array || {},
e.array.indexOf = function(e, t, n) {
var i = e.length;
for (n = 0 | n,
0 > n && (n = Math.max(0, i + n)); i > n; n++)
if (n in e && e[n] === t)
return n;
return -1
}
,
e.browser = e.browser || {},
e.browser.opera = /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent) ? +(RegExp.$6 || RegExp.$2) : void 0,
e.insertHTML = function(t, n, i) {
t = e.g(t);
var o, s;
return t.insertAdjacentHTML && !e.browser.opera ? t.insertAdjacentHTML(n, i) : (o = t.ownerDocument.createRange(),
n = n.toUpperCase(),
"AFTERBEGIN" == n || "BEFOREEND" == n ? (o.selectNodeContents(t),
o.collapse("AFTERBEGIN" == n)) : (s = "BEFOREBEGIN" == n,
o[s ? "setStartBefore" : "setEndAfter"](t),
o.collapse(s)),
o.insertNode(o.createContextualFragment(i))),
t
}
}(c),
e.base = c;
var l = {};
!function(n) {
var i = "__bdpp_pstc__" + (new Date).getTime()
, o = i + "_form"
, s = i + "_ifr"
, a = function(e) {
if ("object" == typeof e) {
var t = [];
for (var n in e) {
var i = e[n];
if (void 0 !== i && null !== i) {
t.length && t.push("&");
var o = encodeURIComponent("boolean" == typeof i ? i ? "1" : "0" : i.toString());
t.push(encodeURIComponent(n), "=", o)
}
}
return t.join("")
}
return "string" == typeof e ? e : null
}
, r = function(e, t) {
if (t = a(t),
"string" == typeof t) {
var n = /\?/g.test(e);
e += (n ? "&" : "?") + a(t)
}
return e
}
, l = function(e, t, n) {
e.setAttribute("type", "text/javascript"),
n && e.setAttribute("charset", n),
e.setAttribute("src", t),
document.getElementsByTagName("head")[0].appendChild(e)
}
, d = function(e) {
if (e.clearAttributes)
e.clearAttributes();
else
for (var t in e)
e.hasOwnProperty(t) && delete e[t];
e && e.parentNode && e.parentNode.removeChild(e),
e = null
}
, u = function(e, t, n) {
function i(e) {
return function() {
try {
e ? u.onfailure && u.onfailure() : (t.apply(window, arguments),
clearTimeout(s)),
window[o] = null,
delete window[o]
} catch (n) {} finally {
d(a)
}
}
}
var o, s, a = document.createElement("SCRIPT"), r = "bd__cbs__", u = n || {}, p = u.charset, g = u.queryField || "callback", m = u.timeOut || 0, f = new RegExp("(\\?|&)" + g + "=([^&]*)");
o = c.getUniqueId(r),
window[o] = i(0),
m && (s = setTimeout(i(1), m)),
e = e.replace(f, "$1" + g + "=" + o),
e.search(f) < 0 && (e += (e.indexOf("?") < 0 ? "?" : "&") + g + "=" + o),
l(a, e, p)
}
, p = function(e, t) {
var n = [];
n.push("
近日,某邮箱帐户存在被破解的可能性,建议您使用其他
邮箱绑定百度帐号,或及时修改您的百度帐号登陆密码并
绑定手机,以确保帐户安全。
' + b.phoneNumber + '是您绑定的手机号,请确认该手机号是否还在使用,为了帐号安全请及时解绑不使用的手机。
' + (e.label ? '" : "") + c + '' + (e.noError ? "" : '') + (e.hasSucc ? '' : "") + '
"; return l }, _getHiddenField: function(e, t) { var n, i = this, o = ' " }, _setEvent: function() { var e = this , t = this.getElement() , n = function(t) { e._eventHandler.entrance.apply(e, [t]) }; baidu(e.getElement()).on("resize", function() { var e = (navigator.userAgent, !navigator.userAgent.match(/OS [1-8]_\d[_\d]* like Mac OS X/i)) , t = !!navigator.userAgent.toString().match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) , n = navigator.userAgent.toString().indexOf("iPad"); if (e && t && null != n) { var i = document.getElementsByClassName("popBox"); null != i && i.length > 0 && (i[0].style.height = window.screen.height > document.body.clientHeight ? window.screen.height * (window.screen.height / document.body.clientHeight) + 120 + "px" : window.screen.height * (window.screen.height / document.body.clientHeight)) } }), baidu(e.getElement("form")).on("submit", n), baidu(e.getElement("license")).on("click", n), baidu(e.getElement("verifyCodeChange")).on("click", n), baidu(e.getElement("verifyCodeSend")).on("click", n), baidu(e.getElement("smsVcodeSend")).on("click", n), baidu(t).delegate(".pass-suggest-item label", "click", n), baidu(".pass-text-input", e.getElement()).on({ focus: n, blur: n, change: n, keyup: n, mouseover: n, mouseout: n }) }, _validator: { confStorage: {}, builtInMsg: { required: "请您输入%s", phone: "手机号码格式不正确", email: "邮箱格式不正确", idcard: "身份证格式不正确" }, builtInRules: { required: /\S+/, phone: /^1[3456789]\d{9}$/, email: /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, idcard: /(^\d{15}$)|(^\d{17}(\d|X|x)$)/ }, init: function(e, t) { this.confStorage[e.$getId()] = t }, validate: function(e, t, n, i) { var o = e.getElement(t) , s = { field: t } , a = /^\s*(.+?)\s*$/; if (!o || 0 === +o.offsetHeight) return !1; for (var r = o.value.replace(a, "$1"), c = this.confStorage[e.$getId()][t], l = c.rules, d = 0, u = l.length; u > d; d++) { var p, g = l[d], m = this.builtInRules[g]; if (p = "[object function]" === Object.prototype.toString.call(m).toLowerCase() ? m.call(e, o, i) : new RegExp(m).test(r), !p) return s.error = !0, e._validateInfo[t] = 0, s.msg = this.builtInMsg[g].replace(/\%s/, c.desc), e._validateError(s), void n.error(s) } c.asyncRule ? c.asyncRule.call(e, { success: function(i) { s.error = !1, s.data = i.data, e._validateInfo[t] = 1, e._validateSuccess(s), n.success(s) }, error: function(i) { s.error = !0, e._validateInfo[t] = 0, s.msg = i.msg, e._validateError(s), n.error(s) } }, i) : (s.error = !1, e._validateInfo[t] = 1, e._validateSuccess(s), n.success(s)) }, validateAll: function(e, t, n) { function i() { r = !0, a ? t && t.error(c) : t && t.success(c) } var o = this.confStorage[e.$getId()] , s = 0 , a = !1 , r = !1 , c = [] , l = this._getActiveValidate(e, !0); for (var d in o) { if (r) break; this.validate(e, d, { success: function(e) { s++, c.push(e), s === l && i() }, error: function(e) { return a = !0, s++, c.push(e), n ? void i() : void (s === l && i()) } }, "all") } }, _getActiveValidate: function(e, t) { var n = this.confStorage[e.$getId()] , i = []; for (var o in n) { var s = e.getElement(o); s && 0 !== s.offsetHeight && i.push(s) } return t ? i.length : i }, addRule: function(e, t) { var n = {}; n[e] = t, baidu.extend(this.builtInRules, n) }, addMsg: function(e, t) { var n = {}; n[e] = t, baidu.extend(this.builtInMsg, n) } }, validate: function(e, t) { var n = this , i = n.fireEvent("beforeValidate", { validate: { field: e, ele: baidu(n.getElement(e)) } }); i && n._validator.validate(n, e, { success: function(e) { var i = n.fireEvent("validateSuccess", { validate: e }); i && t && t.success && t.success(e) }, error: function(e) { var i = n.fireEvent("validateError", { validate: e }); i && t && t.error && t.error(e) } }) }, validateAll: function(e, t) { var n = this; t = "boolean" == typeof e ? e : t ? t : !1; var i = n.fireEvent("beforeValidateAll"); i && n._validator.validateAll(n, { success: function(t) { var i = n.fireEvent("validateAllSuccess", { validates: t }); i && e && e.success && e.success(t) }, error: function(t) { var i = n.fireEvent("validateAllError", { validates: t }); i && e && e.error && e.error(t) } }, t) }, getValidateStatus: function(e) { return this._validateInfo.hasOwnProperty(e) ? this._validateInfo[e] : -1 }, setValidateSuccess: function(e) { var t = this; t._validateInfo[e] = 1, t._validateSuccess({ field: e }) }, setValidateError: function(e, t, n) { var i = this; i._validateInfo[e] = 0, i._validateError({ field: e, msg: t }, n) }, setGeneralError: function(e) { this.getElement("error").innerHTML = e }, clearGeneralError: function() { this.getElement("error").innerHTML = "" }, _isSupportPlaceholder: function() { return "placeholder"in document.createElement("input") }, _getPlaceholder: function(e) { for (var t = this, n = {}, i = "", o = {}, s = 0; s < e.length; s++) { if (i = t.lang[e[s].placeholder], 0 !== +e[s].clearbtn && (o[s] = baidu(''), baidu(t.getElement(e[s].label)).after(o[s])), t._isSupportPlaceholder() && !baidu.browser.ie) try { baidu(t.getElement(e[s].label)).attr({ placeholder: i }) } catch (a) { var r = t.getElement(e[s].label); r.setAttribute("placeholder", i) } else n[s] = baidu('' + i + ""), baidu(t.getElement(e[s].label)).after(n[s]); t._rendEventPlaceholder(t.getElement(e[s].label), n[s], o[s]) } }, _getCookie: function(e) { var t, n = new RegExp("(^| )" + e + "=([^;]*)(;|$)"); return (t = document.cookie.match(n)) ? unescape(t[2]) : null }, _logNaMonitor: function(e) { var t = { page: "loginv4", tpl: this.config.product || "", module: "wapna", monitorType: e } , n = { eventType: "na-monitor" }; this._logPass(t, n, 1023) }, _logPass: function(e, t, n) { function i(e) { var t, n, i, o, s, a, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for (i = e.length, n = 0, t = ""; i > n; ) { if (o = 255 & e.charCodeAt(n++), n === i) { t += r.charAt(o >> 2), t += r.charAt((3 & o) << 4), t += "=="; break } if (s = e.charCodeAt(n++), n === i) { t += r.charAt(o >> 2), t += r.charAt((3 & o) << 4 | (240 & s) >> 4), t += r.charAt((15 & s) << 2), t += "="; break } a = e.charCodeAt(n++), t += r.charAt(o >> 2), t += r.charAt((3 & o) << 4 | (240 & s) >> 4), t += r.charAt((15 & s) << 2 | (192 & a) >> 6), t += r.charAt(63 & a) } return t } var o = n ? "&type=" + n : "" , s = document.location.protocol + "//nsclick.baidu.com/v.gif?pid=111&v=" + (new Date).getTime() + o , a = ""; for (var r in t) a = a + r + ":" + t[r] + ","; a = i("{" + a.substring(0, a.length - 1) + "}"); for (var c in e) e.hasOwnProperty(c) && (s += "&" + c + "=" + e[c]); if (s += "&source=pc", s += "&auto_statistic=" + a + "&auto_en=" + t.eventType, t.errno && (s += "&errno=" + t.errno), s) { var l = new Image; l.onload = l.onerror = function() { l.onload = l.onerror = null, l = null } , l.src = s } }, logClickLink: function(e, t) { e = e || {}, e = this.formatLogData(e); var n = t.target || t.srcElement , i = n && n.getAttribute && n.getAttribute("target") , o = "_self" === i || null === i , s = this.makeImgSrc(e); if (o && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), window.navigator.sendBeacon && o) window.navigator.sendBeacon(s), window.location.href = n.getAttribute("href"); else if (o) this.lazyLog(n, s, null); else { var a = new Image; a.onload = a.onerror = function() { a.onload = a.onerror = null, a = null } , a.src = s } }, logCallBack: function(e, t) { e = e || {}, e = this.formatLogData(e); var n = this.makeImgSrc(e); this.lazyLog({}, n, t) }, formatLogData: function(e) { var t = this.config || {}; return baidu.extend({}, { page: e.logPage || "", source: "pc-api", tpl: t.product || "", subpro: t.subpro || "", extrajson: t.extrajson || "", data_source: "fe" }, e) }, makeImgSrc: function(e) { var t = document.location.protocol + "//nsclick.baidu.com/v.gif?pid=111&type=1023&v=" + (new Date).getTime() , n = ""; for (var i in e) e.hasOwnProperty(i) && (n += "en" !== i ? "&" + i + "=" + e[i] : "&auto_en=" + e[i]); var o = "{eventType:" + (e.en || "") + "}"; return o = this.base64encode(o), t += "&auto_statistic=" + o, t += "&auto_en=" + (e.en || ""), t += n }, lazyLog: function(e, t, n) { function i() { n ? n() : window.location.href = o } var o = e.getAttribute && e.getAttribute("href") , s = new Image , a = setTimeout(function() { s.onload = s.onerror = s = null, i("imgTimeout") }, 200); s.onload = s.onerror = function() { clearTimeout(a), s.onload = s.onerror = s = null, i("imgSuccess") } , s.src = t }, base64encode: function(e) { var t, n, i, o, s, a, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for (i = e.length, n = 0, t = ""; i > n; ) { if (o = 255 & e.charCodeAt(n++), n === i) { t += r.charAt(o >> 2), t += r.charAt((3 & o) << 4), t += "=="; break } if (s = e.charCodeAt(n++), n === i) { t += r.charAt(o >> 2), t += r.charAt((3 & o) << 4 | (240 & s) >> 4), t += r.charAt((15 & s) << 2), t += "="; break } a = e.charCodeAt(n++), t += r.charAt(o >> 2), t += r.charAt((3 & o) << 4 | (240 & s) >> 4), t += r.charAt((15 & s) << 2 | (192 & a) >> 6), t += r.charAt(63 & a) } return t }, _rendEventPlaceholder: function(e, t, n) { if (e || n) { var i, o, s = this, a = function(e) { 1 === +e ? (t && t[0] && s.$hide(t[0]), n && n[0] && s.$show(n[0])) : (t && t[0] && s.$show(t[0]), n && n[0] && s.$hide(n[0])) }; setTimeout(function() { e && e.value && a(1) }, 200), baidu(t).on("mousedown", function() { o = !0, clearTimeout(i), i = setTimeout(function() { "password" === t[0] || s.suggestionDom && "none" !== s.suggestionDom.style.display || e.focus() }, 0) }), baidu(n).on("click", function() { e.value = "", a(0), e.focus(), s.suggestionDom && (s.suggestionDom.data_delete = !0, setTimeout(function() { s.suggestionDom.data_delete = !1 }, 200)) }), baidu(e).on("keyup", function() { a(e.value ? 1 : 0) }), baidu(e).on("focus", function() { window.inputCheckTimer = setInterval(function() { e.value.length ? (a(1), clearInterval(window.inputCheckTimer)) : a(0) }, 30) }) } }, SBCtoDBC: function(e) { var t = ""; if (e) { for (var n = e.length, i = 0; n > i; i++) { var o = e.charCodeAt(i); o = o >= 65281 && 65374 >= o ? o - 65248 : o, o = 12288 == o ? 32 : o, t += String.fromCharCode(o) } return t } }, hide: function() { this.getElement().style.display = "none" }, show: function() { this.getElement().style.display = "block" }, _analysis: function(e, t) { return window.passport.analysis && window.passport.analysis[this.module] && window.passport.analysis[this.module][e] ? (window.passport.analysis[this.module][e](this, t), { preventDefault: !1, preventEvent: !1 }) : void 0 }, _hook: function(e, t) { return window.passport.hook && window.passport.hook[this.module] && window.passport.hook[this.module][e] ? window.passport.hook[this.module][e](this, t) : { preventDefault: !1, preventEvent: !1 } }, fireEvent: function(e, t) { var n = this._hook(e, t) , i = !0; return n.preventEvent || (i = this.fire(e, t)), !n.preventDefault && i }, getQueryString: function(e) { var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)","i") , n = window.location.search.substr(1).match(t); return null != n ? unescape(n[2]) : "" } }); var hexcase = 0 , b64pad = "" , chrsz = 8; return magic.passport.login = baidu.lang.createClass(function(e) { var t = this; if (passport && "https" === passport._protocol) var n = "https:"; else var n = window.location ? window.location.protocol.toLowerCase() : document.location.protocol.toLowerCase(); if (t._domain = { https: "https://passport.baidu.com", http: "http://passport.baidu.com", auto: "https:" === n ? "https://passport.baidu.com" : "http://passport.baidu.com", wapAuto: "https:" === n ? "https://wappass.baidu.com" : "http://wappass.baidu.com" }, t.config = { memberPass: !0, isQuickUser: 0, safeFlag: 0, product: "", idc: "", charset: "", loginMerge: !0, staticPage: "", hasRegUrl: !1, u: "", lang: "", autosuggest: !1, hasPlaceholder: !1, registerLink: "", authsiteLogin: "", authsiteCfgLogin: "", authsiteCurrentOpen: !1, qrcode: !0, sms: 0, uniqueId: !1, autoFocus: !0, subpro: "", setWebToClient: !1, is_voice_sms: 0, voice_sms_flag: 0, userPwdLogin: 0, qrcode_animation: 1, qrcode_style: !0, vcodefrom: "", client: "", smsAutoLogin: { mobile: "", encryption: "" }, qrloginfrom: "pc", mustVerify: "", clientId: "", qrcodeCfg: {}, sid: "", logParams: {} }, baidu.extend(t.config, e), t.urlData = { page: "loginv5", tpl: t.config.product || "", subpro: t.config.subpro || "", traceId: "pc_loginv5_" + ((new Date).getTime() / 1e3).toFixed() }, t.config.sid && (t.urlData.sid = t.config.sid), t.config.logParams && t.config.logParams instanceof Object) for (var i in t.config.logParams) t.urlData[i] = t.config.logParams[i]; t.config.product = t.config.product || "isnull", t.config.qrcode = 3, t.config.page = "loginv5", t.config.loginType = "pwdLogin", this.module = "login", this.guideRandom = function() { return "xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) { var t = 16 * Math.random() | 0 , n = "x" === e ? t : 3 & t | 8; return n.toString(16) }).toUpperCase() }(); var o = t.getQueryString("lang") || t.config.lang , s = o ? "&lang=" + o : "" , a = o ? "?lang=" + o : ""; t.constant = { CHECKVERIFYCODE: !0, CONTAINER_CLASS: "tang-pass-login", LABEL_FOCUS_CLASS: "pass-text-label-focus", FOCUS_CLASS: "pass-text-input-focus", HOVER_CLASS: "pass-text-input-hover", ERROR_CLASS: "pass-text-input-error", VERIFYCODE_URL_PREFIX: t._domain.https + "/cgi-bin/genimage?", BLANK_IMG_URL: passport.apiDomain.staticDomain + "/passApi/img/small_blank.gif", MODIFY_PWD_URL_PREFIX: t._domain.https + "/forcsdnpasschange", GET_PASSWORD_URL: t._domain.https + "/?getpassindex&tt=" + (new Date).getTime() + "&gid=" + t.guideRandom + "&tpl=" + encodeURIComponent(t.config.product) + "&u=" + encodeURIComponent(t.config.u), REG_URL: t.config.registerLink || t._domain.https + "/v2/?reg&tt=" + (new Date).getTime() + "&overseas=" + t.config.overseas + "&gid=" + t.guideRandom + "&tpl=" + encodeURIComponent(t.config.product) + "&u=" + encodeURIComponent(t.config.u) + s, PROTOCAL_URL: t._domain.http + "/static/passpc-account/html/protocal.html" + a, PERSONAL_PROTOCAL_URL: "http://privacy.baidu.com/policy", NOCAPTCHA_URL: t._domain.auto + "/static/passpc-base/js/ld.min.js?cdnversion=" + (new Date).getTime(), TOUCHAPIMKD_URL: t._domain.wapAuto + "/static/machine/js/api/mkd.js?cdnversion=" + (new Date).getTime(), SUBMITFLAG: !1 }, t.lang = passport.err.getCurrent(t.config.lang).labelText.login, t.hooksText = passport.err.getCurrent(t.config.lang).hooksText, passport.data.setContext(baidu.extend({}, t.config)), this.initialized = !1, this.validatorInited = !1, this.bdPsWtoken = "", this.innerData = { normal: {}, phone: {} }, this.dataFiels = ["userName", "password"], this.initTime = (new Date).getTime(), window.confirmSmsVerifyWidget = null, window.checkPhoneWidget = null, window.checkPhoneExist = !1; var r = /msie (\d+\.\d+)/i.test(navigator.userAgent) ? document.documentMode || +RegExp.$1 : void 0; 6 >= r && (t.config.qrcode_animation = !1), t.passLowerIE = r, t.config.overseas && 1 == t.config.overseas && (this.foreignMobile = !0), this.internation = !1, t._insertNoCaptchaScript(), t.initMkd(), t.config.defaultCss && t._loadCssFileW("/passApi/css/loginv5_288e59d.css", function() {}), t._insertScriptW("https://wappass.baidu.com/static/touch/js/lib/fingerprint.js", function() { t.fuid = window.passFingerPrint() }), (t.config.memberPass || t.config.getapi) && t._initApi(), this.smsConfig = t.config.sms + "" == "5" ? !0 : !1 }, { type: "magic.passport.login", superClass: magic.passport }).extend({ _setComposeTemplate: function() { var e = ''; return e }, _getIrregularField: function(e) { var t = this , n = { makeText: '', verifyCode: ' ', generalError: '', rem: '", submit: '
' + t.lang.agree + '' + t.lang.baiduUserProtocal + ' 和 ' + t.lang.baiduUserPersonal + "
", forgetPwd: '' + t.lang.fgtPwd + "", foreignMobileMsg: '' + t.lang.foreignMobileMsg + "
", foreignMobileWrapper: ' ', foreignMobileLink: '' + t.lang.foreignMobileLink + "
", foreignMobileBack: '", choiceuser: '亲爱的用户,
为了确保您的帐号安全,请先确认您输入的帐号是用户名还是手机号:
扫码登录帐号登录短信登录
"; return t }, _getTemplate: function() { var e = this , t = '" }, _collectData: function() { for (var e = this, t = e.innerData.normal, n = e.dataFiels, i = 0, o = n.length; o > i; i++) t[n[i]] = e.getElement(n[i]).value; return t }, _restoreData: function(e) { for (var t = this, n = t.innerData[e ? e : "normal"], i = t.dataFiels, o = 0, s = i.length; s > o; o++) t.getElement(i[o]).value = n[i[o]] || ""; return n }, _loadCssFileW: function(e, t) { if (window._loadedFilesW = window._loadedFilesW || {}, window._loadedFilesW[e]) t && t(); else { window._loadedFilesW[e] = !0; var n = document.createElement("link"); n.rel = "stylesheet", n.type = "text/css", n.href = passport.apiDomain.staticDomain + e, document.getElementsByTagName("head")[0].appendChild(n), n.readyState ? n.onreadystatechange = function() { ("loaded" == n.readyState || "complete" == n.readyState) && (n.onreadystatechange = null, t && t()) } : n.onload = function() { t && t() } } }, _insertScriptW: function(e, t) { if (window._loadedFilesW = window._loadedFilesW || {}, window._loadedFilesW[e]) t && t(); else { window._loadedFilesW[e] = !0; var n = document , i = n.createElement("SCRIPT"); i.type = "text/javascript", i.charset = "UTF-8", i.readyState ? i.onreadystatechange = function() { ("loaded" == i.readyState || "complete" == i.readyState) && (i.onreadystatechange = null, t && t()) } : i.onload = function() { t && t() } , i.src = e, n.getElementsByTagName("head")[0].appendChild(i) } }, _authSiteW: function() { var e = this , t = e.config , n = e.getPhoenixId("pass_phoenix_btn"); t.authsitecssLoad && e._loadCssFileW("/passApi/css/authsite_c01e2ff.css"), e._insertScriptW(e._domain.auto + "/phoenix/account/jsapi", function() { window.baidu.phoenix && window.baidu.phoenix.require(t.authsiteLogin, baidu.extend(t.authsiteCfgLogin || {}, { authsiteCurrentOpen: t.authsiteCurrentOpen, tpl: t.product ? t.product : "", idc: t.idc ? t.idc : "", u: t.u, subpro: t && t.subpro || "", target: n, staticPage: t.staticPage, html: { qzone: 'QQ帐号', tsina: '新浪微博', tqq: '腾讯微博', qunar: '去哪儿', weixin: '微信', tianyi: '天翼', feifan: '飞凡' }, onAfterRender: function() { for (var t = baidu("#" + n + " li"), i = function(t) { t.on("click", function(n) { var i = { eventType: t.attr("data-title") + "Click" }; e._logPass(e.urlData, i), n.preventDefault() }) }, o = 0; o < t.length; o++) { var s = baidu(".phoenix-btn-item", t[o]); s.attr({ title: s[0] && s[0].innerHTML || "" }), i(s) } e._logPass(e.urlData, { eventType: "pc-authsite-show" }) } })) }) }, getVerifyCode: function(e) { var t = this , n = { fr: "login", loginVersion: "v4", vcodetype: t.vcodetype || "" }; if (t.getElement("verifyCode").value = "", t.$hide("verifyCodeSuccess"), t.getElement("verifyCode_clearbtn") && t.$hide("verifyCode_clearbtn"), t.getElement("verifyCodeImg").src = "", e && e.length) { t.$show("verifyCodeImgWrapper"), t.getElement("verifyCodeImg").src = t.constant.VERIFYCODE_URL_PREFIX + e, t.getElement("codeString").value = e; var i = t.fireEvent("renderVerifycode", { verifyStr: e, verifyCodeImg: t.constant.VERIFYCODE_URL_PREFIX + e }); if (!i) return } else passport.data.getVerifyCodeStr(n).success(function(e) { 0 == e.errInfo.no && (t.$show("verifyCodeImgWrapper"), t.getElement("verifyCodeImg").src = t.constant.VERIFYCODE_URL_PREFIX + e.data.verifyStr, t.getElement("codeString").value = e.data.verifyStr, t.fireEvent("renderVerifycode", { verifyStr: e.data.verifyStr, verifyCodeImg: t.constant.VERIFYCODE_URL_PREFIX + e.data.verifyStr })) }); t.getElement("verifyCode_placeholder") && setTimeout(function() { t.$show("verifyCode_placeholder") }, 200) }, _getWDom: { parent: function(e) { return e.parentNode || e.parentElement }, next: function(e) { do e = e.nextSibling; while (e && 1 !== e.nodeType);return e }, prev: function(e) { do e = e.previousSibling; while (e && 1 !== e.nodeType);return e } }, clearVerifyCode: function() { var e = this; e.$hide("verifyCodeImgWrapper"), e.getElement("codeString").value = "" }, getPhoenixId: function(e) { if (this.config.uniqueId) return this.$getId(e); var t = { pass_phoenix_login: "pass-phoenix-login", pass_phoenix_list_login: "pass-phoenix-list-login", pass_phoenix_btn: "pass_phoenix_btn" }; return t[e] }, getPhoenixElement: function(e) { return this.getElement(e) ? this.getElement(e) : document.getElementById(this.getPhoenixId(e)) }, _getTemplateOther: function() { var e = [] , t = this , n = 0; return t.config.authsiteLogin && (n = t.config.authsiteLogin.length), e.push('' + e.lang.QrcodeSuccessTip + '
' + e.lang.QrcodeSuccessMsg + "
' + e.lang.QrcodeErrorTip + '
' + e.lang.QrcodeRefreshBtn + "
' + e.lang.QrcodeRefreshTip + '
' + e.lang.QrcodeLoadTip + '
' + e.lang.QrcodeRefreshBtn + "
' + e.config.qrcodeCfg.appTitle + "
") : (t.push('' + e.lang.qrcodeTitle + o + e.lang.qrcodeText + "
"), t.push('扫描二维码下载' + o + '
' + e.config.qrcodeCfg.appSubTitle + "
"), t.push("' + (e.config.smsText || e.lang.verifyEqualLogin) + "
", n += '", n += "请填写图中的验证码
' }, onRender: function() { baidu(confirmSmsVerifyWidget.getElement("confirmWidget_footer")).addClass("pass-confirm-verifyWidget-bottom"), i.config.hasPlaceholder && i._getPlaceholder([{ label: "confirmVerifyCode", placeholder: "verifyCode" }]), baidu(i.getElement("confirmVerifyCodeChange")).on("click", function() { baidu(i.getElement("confirmVerifyCodeImg")).attr("src", i.constant.VERIFYCODE_URL_PREFIX + i.getElement("smsHiddenFields_smsVcodestr").value + "&v=" + (new Date).getTime()) }), baidu(i.getElement("confirmVerifyCode")).on("keyup", function() { baidu(i.getElement("confirmVerifyCode")).removeClass("pass-text-input-error"), baidu(i.getElement("confirmVerifyCodeError")).hide(), baidu(i.getElement("confirmVerifyCodeError")).get(0).innerHTML = "" }), baidu(i.getElement("confirmVerifyCode")).on("change", function() { i.getElement("confirmVerifyCode").value = i.getElement("confirmVerifyCode").value.replace(/\s/g, "") }) }, onConfirmClose: function() { baidu(i.getElement("confirmVerifyCodeError")).hide(), baidu(i.getElement("confirmVerifyCodeError")).get(0).innerHTML = "", confirmSmsVerifyWidget.hide(), i._ownerDialog && i._ownerDialog.show() }, onConfirmCancel: function() {}, onConfirmContinue: function() { if ("" == i.getElement("confirmVerifyCode").value) return baidu(i.getElement("confirmVerifyCode")).addClass("pass-text-input-error"), baidu(i.getElement("confirmVerifyCodeError")).show(), void (baidu(i.getElement("confirmVerifyCodeError")).get(0).innerHTML = i.lang.confirmVerCodeEmpty); var t = document.getElementById("dv_Input") , c = hex_md5(o.value + "Moonshadow"); c = c.replace(/o/, "ow").replace(/d/, "do").replace(/a/, "ad"), c = c.replace(/h/, "ha").replace(/s/, "sh").replace(/n/, "ns").replace(/m/, "mo"); var l = { gid: i.guideRandom || "", username: i._SBCtoDBC(o.value), countrycode: s, bdstoken: i.bdPsWtoken, tpl: i.config.product ? i.config.product : "", vcodestr: i.getElement("smsHiddenFields_smsVcodestr").value, vcodesign: i.getElement("smsHiddenFields_smsVcodesign").value, verifycode: i._SBCtoDBC(i.getElement("confirmVerifyCode").value), flag_code: i.config.voice_sms_flag, loginVersion: "v4", mkey: i.config.mkey || "", moonshad: c, dv: t ? t.value : window.LG_DV_ARG && window.LG_DV_ARG.dvjsInput || "" }; i.config.smsAutoLogin.encryption && (l.username = i._SBCtoDBC(i.config.smsAutoLogin.encryption), l.mobileencryption = 1); var d = ""; d = 1 == i.config.voice_sms_flag ? window.location.protocol.toLowerCase() + "//wappass.baidu.com/wp/api/login/sms?is_voice_sms=" + i.config.voice_sms_flag : i._domain.auto + "/v2/api/senddpass", passport.data.jsonp(d, l).success(function(t) { var o = baidu(i.getElement("confirmVerifyCodeError")); if (0 == i.config.voice_sms_flag && 0 == t.data.errno || 1 == i.config.voice_sms_flag && 0 == t.errInfo.no) { if (1 == i.config.voice_sms_flag) { var s = 15; document.getElementById("getVoiceSms").disabled = !0, n = setInterval(function() { var e = document.getElementById("getVoiceSms"); if (e) { var t = i.$getId("smsTimer"); if (0 == --s) { clearInterval(n); var o = baidu("#" + t, r); o.removeClass("pass-item-time-timing"), o.addClass("pass-item-timer"), e.disabled = !1, e.value = i.lang.resend + "语音验证码", document.getElementById(t).innerHTML = i.lang.resend, s = 60 } else { var o = baidu("#" + t, r); o.addClass("pass-item-time-timing"), o.removeClass("pass-item-timer"), e.value = "已发送" + s + "s" } } }, 1e3) } else document.getElementById(i.$getId("smsTimer")).disabled = !0, n = setInterval(function() { var e = i.$getId("smsTimer") , t = document.getElementById(e); if (t) if (0 == --a) { clearInterval(n); var o = baidu("#" + e, r); o.removeClass("pass-item-time-timing"), o.addClass("pass-item-timer"), document.getElementById(i.$getId("smsTimer")).disabled = !1, t.innerHTML = i.lang.resend, a = 60 } else { var o = baidu("#" + e, r); o.addClass("pass-item-time-timing"), o.removeClass("pass-item-timer"), 49 === a && (i._logPass(i.urlData, { eventType: "pc-smslogin-unreceive-btn-show" }), i.$show(i.getElement("smsUnReceiveWrapper"))), t.innerHTML = a + "s" } }, 1e3); o.hide(), o.get(0).innerHTML = "", confirmSmsVerifyWidget.hide(), i._ownerDialog && i._ownerDialog.show() } else 20 == t.data.errno || 21 == t.data.errno ? (baidu(i.getElement("confirmVerifyCode")).addClass("pass-text-input-error"), o.show(), o.get(0).innerHTML = t.data.msg, i.getElement("confirmVerifyCodeImg").src = i.constant.VERIFYCODE_URL_PREFIX + t.data.vcodestr, i.getElement("confirmVerifyCode").value = "", i.getElement("smsHiddenFields_smsVcodesign").value = t.data.vcodesign, i.getElement("smsHiddenFields_smsVcodestr").value = t.data.vcodestr) : 27 == e.data.errno ? document.location.href = "https://passport.baidu.com/v2/?reg&overseas=" + i.config.overseas + "&tpl=" + i.config.product + "&u=" + encodeURIComponent(i.config.u) : (o.hide(), confirmSmsVerifyWidget.hide(), i._ownerDialog && i._ownerDialog.show(), i._setSmsGeneralError(1 == i.config.voice_sms_flag ? t.errInfo.msg : t.data.msg)) }) } }), i._ownerDialog && i._ownerDialog.hide("unHide"), confirmSmsVerifyWidget.show() }) } else 27 == e.data.errno ? document.location.href = "https://passport.baidu.com/v2/?reg&overseas=" + i.config.overseas + "&tpl=" + i.config.product + "&u=" + encodeURIComponent(i.config.u) : i._setSmsGeneralError(1 !== +i.config.voice_sms_flag ? e.data.msg : e.errInfo.msg); baidu("#" + i.$getId("smsTimer"), r).addClass("pass-item-timer"), baidu("#" + i.$getId("smsTimer"), r).removeClass("pass-item-time-timing"), document.getElementById(i.$getId("smsTimer")).innerHTML = i.lang.resend } else if (1 == i.config.voice_sms_flag) { var c = 15; document.getElementById("getVoiceSms").disabled = !0, n = setInterval(function() { if (0 == --c) { clearInterval(n); var e = baidu("#" + i.$getId("smsTimer"), r); e.removeClass("pass-item-time-timing"), e.addClass("pass-item-timer"), document.getElementById("getVoiceSms").disabled = !1, document.getElementById("getVoiceSms").value = i.lang.resend + "语音验证码", document.getElementById(i.$getId("smsTimer")).innerHTML = i.lang.resend, c = 15 } else { var e = baidu("#" + i.$getId("smsTimer"), r); e.addClass("pass-item-time-timing"), e.removeClass("pass-item-timer"), document.getElementById("getVoiceSms").value = "已发送" + c + "s" } }, 1e3) } else document.getElementById(i.$getId("smsTimer")).disabled = !0, n = setInterval(function() { var e = document.getElementById(i.$getId("smsTimer")); if (e) if (0 == --a) { clearInterval(n); var t = baidu("#" + i.$getId("smsTimer"), r); t.removeClass("pass-item-time-timing"), t.addClass("pass-item-timer"), document.getElementById(i.$getId("smsTimer")).disabled = !1, e.innerHTML = i.lang.resend, a = 60 } else { var t = baidu("#" + i.$getId("smsTimer"), r); t.addClass("pass-item-time-timing"), t.removeClass("pass-item-timer"), 49 === a && (i._logPass(i.urlData, { eventType: "pc-smslogin-unreceive-btn-show" }), i.$show(i.getElement("smsUnReceiveWrapper"))), e.innerHTML = a + "s" } }, 1e3); baidu("#" + i.$getId("smsTimer"), r).on("click", function(e) { i.config.voice_sms_flag = 0, e.preventDefault(), i._checkRegPhone() }) }) } }, _validatorPhoneFn: function(e) { e.value = e.value.replace(/\s/g, ""); var t = this; if ("" == e.value) return t._setSmsGeneralError(t.lang.fillPhonePls), baidu(e).addClass(t.constant.ERROR_CLASS), !1; if (t.getElement("smsPhoneCountryLabel") && "" != baidu(t.getElement("smsPhoneCountryLabel")).attr("data-countrycode")) { if (!new RegExp(/^(\d)*$/).test(t._SBCtoDBC(e.value))) return t._setSmsGeneralError(t.lang.foreignMobileError), baidu(e).addClass(t.constant.ERROR_CLASS), !1 } else if (!new RegExp(/^1[3456789]\d{9}$/).test(t._SBCtoDBC(e.value))) return t._setSmsGeneralError(t.lang.foreignMobileError), baidu(e).addClass(t.constant.ERROR_CLASS), !1; return t._setSmsGeneralError(""), baidu(e).removeClass(t.constant.ERROR_CLASS), !0 }, _validatorSmsFn: function(e) { var t = this; return "" == e.value ? (t._setSmsGeneralError(t.lang.fillVerifyCodePls), baidu(e).addClass(t.constant.ERROR_CLASS), !1) : (t._setSmsGeneralError(""), !0) }, _postSmsData: function(e) { var t = this; e.countrycode = t.getElement("smsPhoneCountryLabel") ? baidu(t.getElement("smsPhoneCountryLabel")).attr("data-countrycode") || "" : "", e.token = t.bdPsWtoken, e.loginVersion = "v4", passport.data.traceID && passport.data.traceID.startFlow && passport.data.traceID.startFlow("login"), e.dv = document.getElementById("dv_Input") ? document.getElementById("dv_Input").value : window.LG_DV_ARG && window.LG_DV_ARG.dvjsInput || "", e = baidu.extend(e, t.fuid || {}), passport.data.login(e).success(function(e) { if (e.loginType = "sms", 0 == e.errInfo.no) { t.storageSupport(function() { localStorage.setItem("passLoginType", "sms") }), t.config.loginType = "smsLogin"; var n = t.fireEvent("loginSuccess", { rsp: e }); if (!n) return; window.location.href = e.data.u } else { t.getElement("smsSubmit").style.color = "#fff"; var n = t.fireEvent("loginError", { rsp: e }); if (t._logPass(t.urlData, { eventType: "pc-smsLogin-submit-error", errno: e.errInfo.no }), !n) return; t._setSmsGeneralError(4 == e.errInfo.no ? t.lang.captchaErr : e.errInfo.msg), (3 == e.errInfo.no || 4 == e.errInfo.no) && t._clearInput("smsVerifyCode") } var i = { eventType: "pc-smslogin-post-success" } , o = baidu.extend({}, t.urlData); o.errno = e.errInfo.no, t._logPass(o, i) }) }, smsLoginSubmit: function(e) { var t = this , e = e || {} , n = baidu.form.json(t.getElement("smsForm")); e.errInfo && 3 == e.errInfo.no ? passport.data.post("/v2/unite-bind", { username: e.data.username || "", password: n.password, countrycode: t.getElement("smsPhoneCountryLabel") ? baidu(t.getElement("smsPhoneCountryLabel")).attr("data-countrycode") || "" : "", sms: 1, apiver: "v3", loginVersion: "v4", token: e.data.token || "" }).success(function() { t._postSmsData(n) }) : t._postSmsData(n) }, _submitSmsForm: function(e) { function t() { n._postSmsData(a) } var n = this , i = document.getElementById(n.$getId("smsPhone")) , o = document.getElementById(n.$getId("smsVerifyCode")); if (!n.config.smsAutoLogin.encryption && !n._validatorPhoneFn(i)) return void i.focus(); if (n._validatorSmsFn(o)) { var s = n.fireEvent("beforeSubmit"); if (s) { n.getElement("smsSubmit").style.color = "#9ebef4"; var a = baidu.form.json(n.getElement("smsForm")); a.password = n._SBCtoDBC(a.password), a.username = n._SBCtoDBC(a.username), a.FP_UID = n._getCookie("FP_UID") || "", a.FP_INFO = window.PP_FP_INFO || "", a.client = n.config.client, a.isupsms = e ? 1 : "", a.channelid = e || "", n.config.smsAutoLogin.encryption && (a.username = encodeURIComponent(encodeURIComponent(n.config.smsAutoLogin.encryption)), a.mobileencryption = 1), "phoenix" === n.config.source && (a.isfromphoenix = 1), n.loginConnect({ username: a.username, password: a.password, countrycode: n.getElement("smsPhoneCountryLabel") ? baidu(n.getElement("smsPhoneCountryLabel")).attr("data-countrycode") || "" : "", smsVcode: a.password, isdpass: 1, sms: 1 }, { fail: function(e) { n._setSmsGeneralError(e) } }, t) } } }, _setEventChoiceUser: function() { var e = this , t = function() { baidu(e.getElement()).removeClass("tang-pass-login-hide"), e.$show(e.getElement()).$hide("choiceuser_article") } , n = function() { baidu(e.getElement()).removeClass("tang-pass-login-hide"), e.$show(e.getElement()).$hide("choiceuser_article"), e.submit() }; baidu(e.getElement("choiceuser_btn_username")).on("click", function(t) { e.getElement("loginMerge").value = "false", n(t) }), baidu(e.getElement("choiceuser_btn_mobile")).on("click", function(t) { e.getElement("isPhone").value = "true", e.getElement("loginMerge").value = "false", n(t) }), baidu(e.getElement("choiceuser_btn_back")).on("click", function(e) { e.preventDefault(), t() }) }, _getToken: function(e) { var t = this; passport[t.$getId("spareWData")] = passport[t.$getId("spareWData")] || {}, passport.data.getApiInfo({ apiType: "login", loginVersion: "v4", gid: t.guideRandom || "" }).success(function(n) { t.bdPsWtoken = n.data.token, e && e(t) }) }, _getRSA: function(e) { var t = this; passport.data.getRsaKey({ gid: t.guideRandom || "", loginVersion: "v4" }).success(function(t) { t.errInfo.no || 0 == t.errInfo.no || (t = t.data); var n = new passport.lib.RSA; n.setKey(t.pubkey), e && e({ RSA: n, rsakey: t.key }) }) }, _changeLoginType: function(e) { var t = this , n = this.getElement() , i = t._getWDom.parent(n) , o = t._getWDom.parent(i); t.getElement("qrcode"), t.getElement("sms"), baidu(".tang-pass-login-phoenix", o).get(0), t._changeTabButtonActivStatus(e); var s = t.config.composeTemplate ? { normal: { $btn: baidu(".pass-normal-btn", t.getPhoenixElement("pass_phoenix_list_login")), $ele: baidu(t.getElement("form")) }, sms: { $btn: baidu(".pass-sms-btn", t.getPhoenixElement("pass_phoenix_list_login")), $ele: baidu(t.getElement("sms")) } } : { normal: { $btn: baidu(".pass-normal-btn", t.getPhoenixElement("pass_phoenix_list_login")), $ele: baidu(t.getElement("form")).parent() }, sms: { $btn: baidu(".pass-sms-btn", t.getPhoenixElement("pass_phoenix_list_login")), $ele: baidu(t.getElement("sms")) }, qrcode: { $btn: baidu(".pass-qrcode-btn", t.getPhoenixElement("pass_phoenix_list_login")), $ele: baidu(t.getElement("qrcode")) } }; choiceuser = t.getElement("choiceuser_article"), e = e || "normal"; var a = { normal: "pwdLogin", qrcode: "qrLogin", sms: "smsLogin" }; t._logPass(t.urlData, { eventType: "pc-" + (a[e] || e) + "-show" }), t._logPass(t.urlData, { eventType: "pc-" + e + "login-show" }), "sms" === e && (t.isSendSmsCodeInput = !1, t.isSendSmsInput = !1), choiceuser && t.$hide("choiceuser_article"); var r = t.fireEvent("changeLoginType", { loginType: e, currentLoginType: t.currentLoginType || "" }); if (r) { for (var c in s) s[c].$ele && s[c].$ele.length > 0 && (c == e ? t.$show(s[c].$ele[0]) : t.$hide(s[c].$ele[0])); "qrcode" === e ? t._actionQrcode() : "sms" === e && t.$hide(t.getElement("smsUnReceiveWrapper")), t.currentLoginType = e } }, _doFocus: function(e) { var t = this; t.config.autoFocus && ("string" == (typeof e).toLowerCase() && t.getElement(e) ? t.getElement(e).focus() : e.focus()) }, _clearInput: function(e) { var t = this , n = t.getElement(e) , i = t.getElement(e + "_placeholder") , o = t.getElement(e + "_clearbtn"); n && (i && t.$show(i), o && t.$hide(i), n.value = "", t._doFocus(n)) }, _insertAfterW: function(e, t) { var n = this , i = n._getWDom.parent(t); i.lastChild == t ? i.appendChild(e) : i.insertBefore(e, n._getWDom.next(t)) }, _insertBefore: function(e, t) { var n = this , i = n._getWDom.parent(t); i.insertBefore(e, t) }, initMkd: function() { var e = this; e._insertScriptW(e.constant.TOUCHAPIMKD_URL, function() { if (window.PassMachine && window.PassMachine.mkd) { var t = window.PassMachine.mkd; e.loginPassMkd = new t({ maskModule: !0, ak: "1e3f2dd1c81f2075171a547893391274", verifySuccessFn: function(t) { e.loginPassMkd.removeMask(), e._ownerDialog && e._ownerDialog.show(), e.mkdVerifySuccessCallback(t) }, closeFn: function() { e._ownerDialog && e._ownerDialog.show() } }) } }) }, mkdVerifySuccessCallback: function(e) { var t = this; "mkdDataLoginFn" === t.currentPath ? (t.getElement("submit").disabled = !0, t.getElement("submit").value = t.lang.logining, t.getElement("submit").style.color = "#9ebef4", t.loginFn(e, t.histroyData)) : "mkdDataSendVcode" === t.currentPath && t._sendVcode(null, e) }, _insertNoCaptchaScript: function() { var e = this; e._insertScriptW(e.constant.NOCAPTCHA_URL, function() {}) }, _checkCapsLock: function() { var e = this , t = baidu(e.getElement("password")); t.on("keypress", function(t) { var n = t || window.event , i = n.keyCode || n.which , o = n.shiftKey || 16 == i || !1 , s = document.getElementById(e.$getId("caps")); if (i >= 65 && 90 >= i && !o || i >= 97 && 122 >= i && o) if (s) e.$show(s); else { var a = document.createElement("span"); a.id = e.$getId("caps"), a.innerHTML = "大小写锁定已打开"; var r = document.getElementById(e.$getId("passwordWrapper")); "static" == r.style.position && (r.style.position = "relative"), r.style.zIndex = r.style.zIndex ? r.style.zIndex + 1 : 20, a.style.cssText = 'position:absolute;left:60px;clear:both;top:25px;width:103px;height:37px;font-size:12px;line-height:45px;z-index:20;text-align:center;background:url("' + passport.apiDomain.staticDomain + '/passApi/img/caps.gif") no-repeat 0 0;', r.appendChild(a) } else s && e.$hide(s) }), t.on("blur", function() { var t = document.getElementById(e.$getId("caps")); t && e.$hide(t) }) }, _checkRegPhone: function() { var e = this , t = e.getElement("smsPhoneCountryLabel") ? baidu(e.getElement("smsPhoneCountryLabel")).attr("data-countrycode") || "" : "" , n = document.getElementById(e.$getId("smsPhone")) , i = e.config.smsAutoLogin.encryption || ""; (i || e._validatorPhoneFn(n)) && passport.data.getphonestatus({ gid: e.guideRandom || "", phone: e._SBCtoDBC(i ? i : n.value), loginVersion: "v4", countrycode: t, mobileencryption: i ? 1 : "" }).success(function(i) { var o = e.fireEvent("_checkRegPhone", { rsp: i }); if (o) if (0 == i.errInfo.no) e.config.isPwd = +i.errInfo.isPwd || 0, baidu(e.getElement("unRecevieSmsUnReg")).hide(), baidu(e.getElement("unRecevieSmsReged")).show(), e.config.sendVcodeBefore && "function" == typeof e.config.sendVcodeBefore ? e.config.sendVcodeBefore(e, e.mkdDataSendVcode, function() { n.value = "", n.focus() }) : e.bdPsWtoken ? e.mkdDataSendVcode() : e._getToken(e.mkdDataSendVcode); else if (3 === +i.errInfo.no && "1" === i.data.jumpReg) { baidu(e.getElement("unRecevieSmsReged")).hide(), baidu(e.getElement("unRecevieSmsUnReg")).show(); var s = document.getElementById(e.$getId("smsSecondPromptWrapper")) , a = document.getElementById(e.$getId("smsPhoneWrapper")); if (s) e.$show(s), e.getElement("smsSecondPromptBtn").focus(); else { var r = document.createElement("div"); r.id = e.$getId("smsSecondPromptWrapper"), r.setAttribute("class", "pass-form-sms-checkphone"), r.style.cssText = 'position:absolute;clear:both;color:#826f33;z-index:999;font-size:12px;width:211px;height:71px;padding:16px 16px 11px 13px;background:url("' + passport.apiDomain.staticDomain + '/passApi/img/smsRegphone.png") 0px 0px no-repeat;right:0px;', r.innerHTML = '手机号未注册或已被运营商二次放号,请重新注册新帐号。
', a.appendChild(r), e.getElement("smsSecondPromptBtn").focus() } baidu(e.getElement("smsSecondPromptBtn")).on("click", function(t) { e.getElement("smsSecondPromptBtn") && baidu(e.getElement("smsSecondPromptBtn")).hide(), t.preventDefault(), window.location.href = e.constant.REG_URL }) } else if (3 === +i.errInfo.no) { e.config.isPwd = -1, baidu(e.getElement("unRecevieSmsReged")).hide(), baidu(e.getElement("unRecevieSmsUnReg")).show(); var c = e.config.voice_sms_flag , l = document.getElementById(e.$getId("smsRegPromptWrapper")) , a = document.getElementById(e.$getId("smsPhoneWrapper")); if (l) e.$show(l), e.getElement("smsRegPromptBtn").focus(); else { var r = document.createElement("div"); r.id = e.$getId("smsRegPromptWrapper"), r.setAttribute("class", "pass-form-sms-checkphone"), r.style.cssText = 'position:absolute;clear:both;color:#826f33;z-index:999;font-size:12px;width:211px;height:75px;padding:16px 16px 11px 13px;background:url("' + passport.apiDomain.staticDomain + '/passApi/img/smsRegphone.png") 0px 0px no-repeat;right:0px;', r.innerHTML = '您的手机号码尚未注册或未开启手机号登录,点击注册,帮您注册新的百度帐号
', a.appendChild(r), e.getElement("smsRegPromptBtn").focus() } baidu(e.getElement("smsRegPromptBtn")).on("click", function(i) { e.config.voice_sms_flag = c, e.getElement("smsRegPromptWrapper") && baidu(e.getElement("smsRegPromptWrapper")).hide(), i.preventDefault(), "" != t ? window.location.href = e.constant.REG_URL : e.config.sendVcodeBefore && "function" == typeof e.config.sendVcodeBefore ? e.config.sendVcodeBefore(e, e.mkdDataSendVcode, function() { n.value = "", n.focus() }) : e.bdPsWtoken ? e.mkdDataSendVcode() : e._getToken(e.mkdDataSendVcode) }), e.config.voice_sms_flag = 0 } else e.config.voice_sms_flag = 0, e._setSmsGeneralError(i.errInfo.msg) }) }, mkdDataSendVcode: function(e) { var t = e || this; if (t.loginPassMkd && t.loginPassMkd.getDataAsync) { t.currentPath = "mkdDataSendVcode"; var n = {}; t.loginPassMkd.getDataAsync(function(e) { n.ds = e.ds || "xxx_loginv4", n.tk = e.tk || "xxx_loginv4", t._sendVcode(null, n) }) } else t._sendVcode() }, changeSuggestView: function(e) { var t = this; t.suggestionDom && e.list && ("hide" == e.list ? t.$hide(t.suggestionDom) : "show" == e.list && t.$show(t.suggestionDom)), t.selectBtn && e.btn && ("close" == e.btn ? (baidu(t.selectBtn).removeClass("open"), baidu(t.getElement("userName")).addClass("open"), t.$show(t.selectBtn)) : "open" == e.btn ? (baidu(t.selectBtn).addClass("open"), baidu(t.getElement("userName")).addClass("open"), t.$show(t.selectBtn)) : "hide" == e.btn ? (t.$hide(t.selectBtn), baidu(t.getElement("userName")).removeClass("open")) : e.btn + "" == "show" && (t.$show(t.selectBtn), baidu(t.getElement("userName")).addClass("open")), t.$hide(t.selectBtn)) }, _suggestion: function(e) { var t = this , n = [] , i = baidu("#" + t.$getId("userName"), t.getElement()) , o = ["qq.com", "163.com", "126.com", "sohu.com", "sina.com", "gmail.com", "21cn.com", "hotmail.com", "vip.qq.com", "yeah.net", "139.com"] , s = /^([a-zA-Z0-9_.\-+]+)([@]?[a-zA-Z0-9_\-*]*[.]?[a-zA-Z*]*[.]?[a-zA-Z*]*)$/ , a = function(e, t) { var n = e; return e.substr(0, e.indexOf("@") - 1).length > t.maxlength && (n = e.substr(0, t.maxlength - 4) + "…" + e.substr(e.indexOf("@"))), baidu('