Skip to content

Instantly share code, notes, and snippets.

@itsuki-hayashi
Created April 4, 2018 13:11
Show Gist options
  • Save itsuki-hayashi/c2e99905b16249e732cd6a0acad063d5 to your computer and use it in GitHub Desktop.
Save itsuki-hayashi/c2e99905b16249e732cd6a0acad063d5 to your computer and use it in GitHub Desktop.
allow gmail for baidu
passport = passport || {}, passport.pop = passport.pop || {}, passport.pop.ArmorWidgetImp = function (e, t, n, o) {
function i(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 s(e, t) { var n = e; for (var o in t) "undefined" === (typeof n[o]).toLowerCase() && (n[o] = t[o]); return n } var a = { "http:": "http://passport.baidu.com", "https:": "https://passport.baidu.com" }, r = { bindmobile: "http://passport.baidu.com/v2/?binding&showtype=phone", bindemail: "http://passport.baidu.com/v2/?binding&showtype=email" }, l = {}, c = {}, u = window, d = u.document, m = d.body, p = d.documentElement, f = function () { }; i.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, o = arguments.length - 1; o > 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, t, n) { return i.when(this, e, t, n) }, whenOnly: function (e, t, n) { i.whenOnly(this, e, t, n) }, success: function (e, t) { return this.when(e, f, t) }, fail: function (e, t) { return this.when(f, 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() } }, i.when = function (e, t, n, o) { return new i(function (s, a) { i.make(e)._enqueueOne({ fulfillPromise: function (e) { s(t ? t.call(o, e) : e) }, breakPromise: function (e) { if (n) try { s(n.call(o, e)) } catch (t) { a(t) } else a(e) } }) }) }, i.whenOnly = function (e, t, n, o) { i.make(e)._enqueueOne({ fulfillPromise: function (e) { t && t.call(o, e) }, breakPromise: function (e) { n && n.call(o, e) } }) }, i.make = function (e) { return e instanceof i ? e : i.immediate(e) }, i.immediate = function (e) { return new i(function (t) { t(e) }) }, function (e) { e.browser = e.browser || {}, e.browser.ie = /msie (\d+\.\d+)/i.test(navigator.userAgent) ? document.documentMode || +RegExp.$1 : void 0, e.browser.opera = /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent) ? +(RegExp.$6 || RegExp.$2) : void 0, e.g = function (e) { return e ? "string" == typeof e || e instanceof String ? d.getElementById(e) : !e.nodeName || 1 !== e.nodeType && 9 !== e.nodeType ? null : e : null }, e.id = function () { if (e && e.guid); else if (e) e.guid = "$BAIDU$"; else { var e = {}; e.guid = "$BAIDU$" } return window[e.guid] = window[e.guid] || {}, window[e.guid]._counter = window[e.guid]._counter || "1", "TANGRAM__" + window[e.guid]._counter++ }, e.on = function (e, t, n) { e && e.addEventListener ? e.addEventListener(t, n, !1) : e && e.attachEvent && e.attachEvent("on" + t, n) }, e.unon = function (e, t, n) { e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent && e.detachEvent("on" + t, n) }, e.getUniqueId = function (e) { return e + Math.floor(2147483648 * Math.random()).toString(36) }, e.createScriptTag = function (e, t, n) { e.setAttribute("type", "text/javascript"), n && e.setAttribute("charset", n), e.setAttribute("src", t), d.getElementsByTagName("head")[0].appendChild(e) }, e.removeScriptTag = function (e) { if (e.clearAttributes) e.clearAttributes(); else for (var t in e) e.hasOwnProperty(t) && "parentNode" !== t && delete e[t]; e && e.parentNode && e.parentNode.removeChild(e), e = null }, e.getSize = function (e) { return e ? { w: e.clientWidth, h: e.innerHeight || e.clientHeight } : { w: p.clientWidth || m.clientWidth, h: u.innerHeight || p.clientHeight || m.clientHeight } }, e.getViewHeight = function () { var t = document, n = e.browser.ie || 1, o = "BackCompat" === t.compatMode && 9 > n ? t.body : t.documentElement; return o.clientHeight }, e.getViewWidth = function () { var e = document, t = "BackCompat" === e.compatMode ? e.body : e.documentElement; return t.clientWidth }, e.getScrollTop = function () { var e = document; return window.pageYOffset || e.documentElement.scrollTop || e.body.scrollTop }, e.getPosition = function (t) { var n = e.getSize(), o = t, i = { t: 0, l: 0 }, s = /gecko/.test(navigator.userAgent), a = function (e, t) { i.t += e, i.l += t }; if (o && o !== m) if (o.getBoundingClientRect) { var r = o.getBoundingClientRect(), l = t.ownerDocument, c = l.body, u = l.documentElement, p = u.clientTop || c.clientTop || 0, f = u.clientLeft || c.clientLeft || 0; if (r.top === r.bottom) { var h = o.style.display; o.style.display = "block", o.style.display = h } a(r.top + n.t - p, r.left + n.l - f) } else { for (var g = d.View; o;) { a(o.offsetTop, o.offsetLeft); var v = g.getComputedStyle(o, null); if (s) { var b = parseInt(v.getPropertyValue("border-left-width"), 10) || 0, _ = parseInt(v.getPropertyValue("border-top-width"), 10) || 0; a(_, b), o !== t && "visible" !== v.getPropertyValue("overflow") && a(_, b) } o = o.offsetParent } for (o = t.parentNode; o && o !== m;)a(-o.scrollTop, -o.scrollLeft), o = o.parentNode } return i }, e.setStyle = function (e, t) { for (var n = t.split(";"), o = n.length; o--;)if (n[o]) { var i = n[o].split(":"); i && (e.style[i[0]] = i[1]) } }, e.getMousePos = function (e) { return e.pageX || e.pageY ? { x: e.pageX, y: e.pageY } : document.documentElement && document.documentElement.scrollTop ? { x: e.clientX + document.documentElement.scrollLeft - document.documentElement.clientLeft, y: e.clientY + document.documentElement.scrollTop - document.documentElement.clientTop } : document.body ? { x: e.clientX + document.body.scrollLeft - document.body.clientLeft, y: e.clientY + document.body.scrollTop - document.body.clientTop } : void 0 }, e.getTarget = function (e) { return e.target || e.srcElement }, e.addClass = function (t, n) { element = e.g(t); for (var o = n.split(/\s+/), i = element.className, s = " " + i + " ", a = 0, r = o.length; r > a; a++)s.indexOf(" " + o[a] + " ") < 0 && (i += (i ? " " : "") + o[a]); return element.className = i, element }, e.removeClass = function (t, n) { if (t = e.g(t)) { for (var o, i, s = t.className.split(/\s+/), a = n.split(/\s+/), r = a.length, l = 0; r > l; ++l)for (i = 0, o = s.length; o > i; ++i)if (s[i] === a[l]) { s.splice(i, 1); break } return t.className = s.join(" "), t } }, e.insertHTML = function (t, n, o) { t = e.g(t); var i, s; return t.insertAdjacentHTML && !e.browser.opera ? t.insertAdjacentHTML(n, o) : (i = t.ownerDocument.createRange(), n = n.toUpperCase(), "AFTERBEGIN" === n || "BEFOREEND" === n ? (i.selectNodeContents(t), i.collapse("AFTERBEGIN" === n)) : (s = "BEFOREBEGIN" === n, i[s ? "setStartBefore" : "setEndAfter"](t), i.collapse(s)), i.insertNode(i.createContextualFragment(o))), t } }(l), function (e) { var t = "__bdpp_pstc__" + (new Date).getTime(), n = t + "_form", o = t + "_ifr", s = function (e) { if ("object" == typeof e) { var t = []; for (var n in e) { var o = e[n]; if (void 0 !== o && null !== o) { t.length && t.push("&"); var i = encodeURIComponent("boolean" == typeof o ? o ? "1" : "0" : o.toString()); t.push(encodeURIComponent(n), "=", i) } } return t.join("") } return "string" == typeof e ? e : null }, a = function (e, t) { if (t = s(t), "string" == typeof t) { var n = /\?/g.test(e); e += (n ? "&" : "?") + s(t) } return e }, r = function (e, t, n) { e.setAttribute("type", "text/javascript"), n && e.setAttribute("charset", n), e.setAttribute("src", t), document.getElementsByTagName("head")[0].appendChild(e) }, c = 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 o(e) { return function () { try { e ? d.onfailure && d.onfailure() : (t.apply(window, arguments), clearTimeout(s)), window[i] = null, delete window[i] } catch (n) { } finally { c(a) } } } var i, s, a = document.createElement("SCRIPT"), u = "bd__cbs__", d = n || {}, m = d.charset, p = d.queryField || "callback", f = d.timeOut || 0, h = new RegExp("(\\?|&)" + p + "=([^&]*)"); i = l.getUniqueId(u), window[i] = o(0), f && (s = setTimeout(o(1), f)), e = e.replace(h, "$1" + p + "=" + i), e.search(h) < 0 && (e += (e.indexOf("?") < 0 ? "?" : "&") + p + "=" + i), r(a, e, m) }, d = function (e, t) { var i = []; i.push("<form id='", n, "' target='", o, "' "), i.push("action='", l.encodeHTML(e), "' method='post'>"); for (var s in t) if (t.hasOwnProperty(s)) { var a = t[s]; if (void 0 !== a && null !== a) { var r = l.encodeHTML("boolean" == typeof a ? a ? "1" : "0" : a); i.push("<input type='hidden' name='", l.encodeHTML(s), "' value='", r, "' />") } } return i.push("</form>"), i.join("") }, m = function (e, i, s, a) { function r(e) { return function () { try { e ? a.onfailure && a.onfailure() : (s.apply(window, arguments), u && clearTimeout(u)), window[m] = null, delete window[m] } catch (t) { } } } a = a || {}; var c = a.timeOut || 0, u = !1, m = l.getUniqueId("bd__pcbs__"); i[a.queryField || "callback"] = "parent." + m; var p = d(e, i); if (l.g(n)) l.getParent(n).innerHTML = p; else { var f = []; f.push("<div id='", t, "' style='display:none;'>"), f.push("<div>", p, "</div>"), f.push("<iframe name='", o, "' src='" + ("https:" === window.location.protocol.toLowerCase() ? "https://passport.baidu.com/passApi/html/_blank.html" : "about:blank") + "' style='display:none;'></iframe>"), f.push("</div>"), l.insertHTML(document.body, "beforeEnd", f.join("")) } window[m] = r(), c && (u = setTimeout(r(1), c)), l.g(n).submit() }; e.jsonp = function (e, t, n) { n = n || {}; return new i(function (o, i) { e = a(e, t), u(e, function (e) { n.processData && (e = n.processData(e)), o && o(e) }, { charset: n.charset, queryField: n.queryField, timeOut: n.timeOut, onfailure: function () { i && i() } }) }) }, e.submit = function (e, t, n) { return e && t ? new i(function (o) { m(e, t, function (e) { n.processData && (e = n.processData(e)), o && o(e) }, n) }) : void 0 }; var p = []; e.load = function (e) { return new i(function (t) { var n = p.push(new Image) - 1, o = !1, i = setTimeout(function () { o = !0, t && t() }, 1e3); p[n].onload = function () { clearTimeout(i), o || t && t(), o = !0, p[n] = p[n].onload = null }, p[n].src = e }) } }(c); var h = this.id = l.id(), g = this.getId = function (e) { return [h, e].join("__") }, v = t.traceid, b = this.getById = function (e) { var t = "string" == typeof e ? l.g([h, e].join("__")) : e; return t && (t.hide = function (e) { this.style.display = e ? e : "none" }, t.show = function (e) { this.style.display = e ? e : "block" }, t.html = function (e) { this.innerHTML = e }, t.attr = function (e, t) { this.setAttribute(e, t) }, t.on = function (e, t) { l.on(this, e, t) }, t.addClass = function (e) { l.addClass(this, e) }, t.removeClass = function (e) { l.removeClass(this, e) }, t.css = function (e, n) { return t.style[e] = n }), t }, _ = this.getJSONP = function (e, t, n) { v && v.length > 0 && (t.traceid = v), c.jsonp(e, t, { charset: "UTF-8", processData: function (e) { v = e.traceid || "", n && n(e) } }) }, w = this, y = a[window.location.protocol.toLowerCase()], k = y + "/v2/?bindwidget-init"; if ("1" === t.pcsdk) var C = "https://wappass.baidu.com/passport/bindwidget-send", x = "https://wappass.baidu.com/passport/bindwidget-bind"; else var C = y + "/v2/?bindwidget-send", x = y + "/v2/?bindwidget-bind"; var T = y + "/v2/?regphonecheck", I = y + "/v2/?regmailcheck", E = null, A = null, L = null, S = !1, B = "", N = !1, W = t.otherValue && "tb" == t.otherValue.tpl || 1 == t.overseas ? 1 : 0; w.action = e, w.is_show = !1, t = s(t, { onRender: f, onHide: f, onAfterClose: f, onIncomplete: function () { window.location.href = [r[e], "&u=", encodeURIComponent(window.location.href)].join("") }, onSendVcodeSuccess: f, onBeforeSuccess: f, onSubmitSuccess: f, onBindToLoginFn: f, onBindClose: f, successCountdown: t.successCountdown || 5, onSubmitFail: f, onInitFail: f, onGetapiError: f, title: "密保工具", msg: "", color: "blue", submitText: "", footerText: "", lstr: t.lstr, ltoken: t.ltoken, u: t.u, isexchangeable: t.isexchangeable }); var P = { bindemail: { name: "绑定邮箱", code_name: "邮箱验证码", msg: "请输入您要绑定的邮箱地址,绑定后即可用该邮箱登录所有百度产品", vali: { email: { empty: "请输入邮箱地址", format: "邮箱格式不正确", emailLimit: "不能使用该邮箱", exists: "已被其他帐号绑定", exists_title: "建议更换邮箱或直接用此邮箱登录", suffix: '为确保您能及时收到邮件,请使用<a href="http://www.baidu.com/search/passport_help.html#09" target="_blank">主流邮箱</a>' }, vcode: { empty: "请输入邮箱验证码", format: "验证码为六位数字", expire: "验证码已过期" } }, footer: t.footerText ? t.footerText : "*您可用使用此密保邮箱找回密码及登录<br />*请勿随意泄露邮箱地址,以防被不法分子利用,骗取帐号信息" }, bindmobile: { name: "绑定手机", code_name: "短信验证码", msg: "请输入您要绑定的手机号码,绑定后即可用该手机号登录所有百度产品", vali: { mobile: { empty: "请输入手机号码", format: "号码格式不正确", exists: "已被其他帐号绑定", exists_title: "建议更换号码或直接用此号码登录" }, vcode: { empty: "请输入短信验证码", format: "验证码为六位数字", expire: "验证码已过期" } }, footer: t.footerText ? t.footerText : "*您可用使用此手机找回密码及登录<br />*请勿随意泄露手机号,以防被不法分子利用,骗取帐号信息" } }; P.rebindemail = s({ name: "更换密保邮箱", code_name: "邮箱验证码" }, P.bindemail), P.rebindmobile = s({ name: "更换手机", code_name: "手机验证码" }, P.bindmobile), P.unbindemail = { name: "解绑密保邮箱", code_name: "邮箱验证码" }, P.unbindmobile = { name: "解绑手机", code_name: "手机验证码" }; var V = function (n) { var o = window.location ? window.location.protocol.toLowerCase() : document.location.protocol.toLowerCase(), i = null; "bindmobile" === e || "rebindmobile" === e ? i = ['<div class="content-element content-type clearfix">', '<div class="content-mobile clearfix" id="', h, '__content_mobile" style="display:block">', '<input type="text" class="armorwidget-input armorwidget-input-mobile ' + (W ? "armorwidget-input-code" : "") + '" id="', h, '__input_mobile" maxlength="11" />', W ? '<div><label class="ai-label-input-code" id="' + h + '__ai_content_select_show">+86</label></div>' : "", '<ul class="ai-country-select-handler" id="', h, '__ai_content_select_handler"></ul>', '<label class="armorwidget-input-label ' + (W ? "armorwidget-input-label-code" : "") + '" id="', h, '__input_label_mobile">请输入手机号</label>', '<span class="armorwidget-error content-error-mobile" id="', h, '__error_mobile"></span>', "</div>", "</div>"].join("") : ("bindemail" === e || "rebindemail" === e) && (i = ['<div class="content-element content-type clearfix">', '<div class="content-element content-email clearfix" id="', h, '__content_email" style="display:block">', '<input type="text" class="armorwidget-input armorwidget-input-mobile" id="', h, '__input_email" maxlength="50" />', '<label class="armorwidget-input-label" id="', h, '__input_label_email">请输入有效邮箱地址</label>', '<span class="armorwidget-error content-error-email" id="', h, '__error_email"></span>', "</div>", "</div>"].join("")); var s = null; return i ? (t.msg = t.msg || P[e].msg, s = ['<div class="content-element content-msg"><p class="content-msgtext" id="', h, '__content_msgtext">', t.msg, "</p></div>", i, '<div class="content-element content-vcode clearfix" id="', h, '__content_vcode" style="display:block">', '<input type="text" class="armorwidget-input armorwidget-input-vcode" id="', h, '__input_vcode" maxlength="8" />', '<input type="hidden" id="', h, '__input_exchange" />', '<label class="armorwidget-input-label" id="', h, '__input_label_vcode">', P[e].code_name, "</label>", '<input type="button" class="armorwidget-button armorwidget-button-send" id="', h, '__button_send" value="发送验证码" />', '<span class="armorwidget-error content-error-vcode" id="', h, '__error_vcode"></span>', "</div>", '<div class="content-element content-submit clearfix" id="', h, '__content_submit" style="display:block">', '<input type="button" class="armorwidget-button armorwidget-button-submit" id="', h, '__button_submit" value="确定" />', t.submitText ? '<span class="armorwidget-text content-text-submit" id="' + h + '__text_submit">' + t.submitText + "</span>" : "", '<span class="armorwidget-error content-error-submit" id="', h, '__error_submit"></span>', "</div>"].join("")) : s = ['<div class="content-element content-blank"><p class="content-msgtext" id="', h, '__content_msgtext">', t.msg, "</p></div>"].join(""), { mask: ['<div id="', h, '__mask" class="pass-armorwidget-mask" style="top: 0px; left: 0px;width:', l.getViewWidth(), "px;height:", l.getViewHeight(), 'px; position: fixed; _position: absolute;filter: alpha(opacity = 30);opacity: 0.15; z-index: 1004; background-color: rgb(0, 0, 0);display:none;">', '<iframe frameborder="0" style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity:0);position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:-1" ', 'src="', "https:" === o ? "https://passport.baidu.com/passApi/html/_blank.html" : "about:blank", '"></iframe>', '<div style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:-1;">&nbsp;</div>', "</div>"].join(""), wrapper: ['<div class="pass-armorwidget-wrapper pass-armorwidget-' + t.color + '" id="', h, '__wrapper" style="display:none;">', '<div class="armorwidget-header" id="', h, '__header">', '<h3 class="armorwidget-header-h3" id="', h, '__header_h3">', t.title, "</h3>", '<a class="armorwidget-header-a" id="', h, '__header_a"></a>', "</div>", '<div class="armorwidget-article" id="', h, '__article">', '<div class="pass-armorwidget-content" id="', h, '__content" style="">', s, '<div class="app-success clearfix" id="', h, '__app_success"><em class="app-success-icon"></em><span class="app-success-msg" id="', h, '__app_success_msg"></span></div>', '<div class="app-fail clearfix" id="', h, '__app_fail"><em class="app-fail-icon"></em><span class="app-fail-msg" id="', h, '__app_fail_msg"></span></div>', '<div class="content-element content-footer clearfix">', P[e].footer ? ['<p class="footer-tip">', P[e].footer, "</p>"].join("") : "", "</div>", "</div>", "</div>", "</div>"].join("") }[n] }, M = function () { var e = b("wrapper"), t = b("mask"); t.style.height = l.getViewHeight() + "px", t.style.width = l.getViewWidth() + "px", e.style.top = (l.getSize().h - l.getSize(e).h) / 2 + l.getScrollTop() + "px", e.style.left = (l.getSize().w - l.getSize(e).w) / 2 + "px" }, j = function () { "1" === t.pcsdk ? (e = t.action, A = t.bdstoken, L = t.authsid, dt = function () { b("mask").show(), b("wrapper").show(), M(), l.on(u, "resize", function () { M() }), w.is_show = !0 }, o && (o.show = dt), "unbindmobile" === e || "unbindemail" === e ? (ct(), U()) : ct()) : _(k, s({ token: t.token, vstr: t.vstr, subpro: t.subpro, lstr: t.lstr, ltoken: t.ltoken, u: t.u }, t.otherValue), function (n) { L = null, "0" === n.errno ? (e = n.action, E = n.authtoken, A = n.bdstoken, L = n.authsid, t.tpl = t.tpl || n.tpl, t.authsid && (L = t.authsid), dt = function () { b("mask").show(), b("wrapper").show(), M(), l.on(u, "resize", function () { M() }), w.is_show = !0 }) : "8" === n.errno ? (t.onAfterClose.call(w), t.onIncomplete.call(w)) : (t.onAfterClose.call(w), t.onInitFail(w, n), dt = function () { t.onGetapiError(n) }), o && (o.show = dt), L && L.length > 10 ? "unbindmobile" === e || "unbindemail" === e ? (ct(), U()) : ct() : J() }) }, O = null, R = null, D = null, H = null, q = 1 == t.bindToLogin && ("bindmobile" == e || "rebindmobile" == e), F = function () { var n = { action: e, authsid: L, bdstoken: A, vstr: t.vstr, vcode: b("input_vcode").value, subpro: t.subpro, lstr: t.lstr, ltoken: t.ltoken, u: t.u, setunamepwd: t.setunamepwd, tpl: t.tpl }; ("bindmobile" === e || "rebindmobile" === e) && (n.isexchangeable = void 0 != t.isexchangeable ? t.isexchangeable : 1, n.exchange = q ? 1 : b("input_exchange").value), n = s(n, t.otherValue), n.dv = document.getElementById("dv_Input") ? document.getElementById("dv_Input").value : window.LG_DV_ARG && window.LG_DV_ARG.dvjsInput || "", "bindemail" === e || "rebindemail" === e ? n.email = b("input_email").value : ("bindmobile" === e || "rebindmobile" === e) && (n.mobile = b("input_mobile").value, 1 == W && (n.countrycode = B)), b("button_submit").disabled = !0, _(x, n, function (e) { b("button_submit").disabled = !1, "0" === e.errno ? (b("button_submit").style.color = "#fff", O && (O.hide(), b("mask").show(), b("wrapper").show()), R && (R.hide(), b("mask").show(), b("wrapper").show()), D && (D.hide(), b("mask").show(), b("wrapper").show()), t.onBeforeSuccess && t.onBeforeSuccess.call(w, e), z(e)) : (b("button_submit").style.color = "#fff", t.onSubmitFail(w, e), b("error_vcode").html(e.errmsg), b("input_vcode").addClass("armorwidget-input-error")) }) }, U = function () { var n = { action: e, authsid: L, bdstoken: A, vstr: t.vstr, subpro: t.subpro, tpl: t.tpl }; n = s(n, t.otherValue), n.dv = document.getElementById("dv_Input") ? document.getElementById("dv_Input").value : window.LG_DV_ARG && window.LG_DV_ARG.dvjsInput || "", _(x, n, function (e) { "0" === e.errno ? (t.onBeforeSuccess && t.onBeforeSuccess.call(w, e), z(e)) : $(e) }) }, G = function (e, t) { var n = ["qq.com", "163.com", "126.com", "sohu.com", "sina.com", "21cn.com", "vip.qq.com", "yeah.net", "foxmail.com", "sina.cn", "yahoo.com.cn", "139.com", "yahoo.cn", "tom.com", "yahoo.com.tw", "live.cn", "hanmail.net", "189.cn", "yahoo.com", "nate.com", "aliyun.com", "yahoo.com.hk", "naver.com", "live.com", "msn.com", "outlook.com", "sogou.com", "sina.com.cn", "eyou.com", "vip.sina.com", "msn.cn", "me.com", "ymail.com", "wo.com.cn", "vip.163.com", "2980.com", "263.net", "kimo.com", "yahoo.co.jp"], o = function (e, t) { var n = document.createElement("li"); return n.className = "pass-item-suggsetion", t && (n.style.display = "none", n.className = [n.className, "pass-item-suggsetion_hover"].join(" ")), n.innerHTML = e, n }, i = function (t) { e.value = t.innerHTML.replace(/<[^>]+>/g, "") }, s = function (e) { var t = l.getTarget(e); return "li" === t.nodeName.toLowerCase() ? t : t.parentNode }, a = function (e) { if (!w.sug_ul) { w.sug_ul = document.createElement("ul"), w.sug_ul.id = g("sug_wrapper"), w.sug_ul = b(w.sug_ul); var n = b("input_email"); n.insertAdjacentElement ? n.insertAdjacentElement("afterEnd", w.sug_ul) : n.nextSibling ? n.parentNode.insertBefore(w.sug_ul, n.nextSibling) : n.parentNode.appendChild(w.sug_ul), w.sug_ul.addClass("pass-suggestion-list"), w.sug_ul.on("click", function (e) { i(s(e)), w.sug_ul.hide(), n.focus(), setTimeout(function () { t.html("") }, 100) }) } w.sug_ul.html(""), w.sug_ul.style.display = "", w.sug_ul.appendChild(e); for (var o = w.sug_ul.getElementsByTagName("li"), a = 0; a < o.length; a++) { var r = b(o[a]); r.on("mouseover", function (e) { for (var t = 0; t < o.length; t++)l.removeClass(o[t], "pass-item-suggsetion_hover"); l.addClass(s(e), "pass-item-suggsetion_hover") }), r.on("mouseout", function () { for (var e = 0; e < o.length; e++)l.removeClass(o[e], "pass-item-suggsetion_hover") }) } }, r = { UP: 38, DOWN: 40, ENTER: 13, TAB: 9, SPACE: 32 }, c = /^([a-zA-Z0-9_.\-+]+)/, u = /@([a-zA-Z0-9\-\_\.]+)/; e.on("keyup", function (t) { var s = document.createDocumentFragment(), d = null, m = 0, p = e.value; p = p ? p : ""; var f = p.match(c), h = p.match(u); if (f) if (d = o(p, !0), s.appendChild(d), p = f[1], h) for (var g = 0, v = n.length; v > g; g++) { var b = n[g], _ = h[1]; if (b.indexOf(_) > -1 && (_ = _.replace(/\./g, "\\."), b = b.replace(new RegExp(_, "g"), "<b>$&</b>"), d = o([p, b].join("@")), s.appendChild(d), m++ , m > 6)) break } else for (var g = 0, v = n.length; v > g && (d = o([p, n[g]].join("@")), s.appendChild(d), m++ , !(m > 6)); g++); if (w.sug_ul && t.keyCode !== r.UP && t.keyCode !== r.DOWN && w.sug_ul.hide(), m > 0) if (t.keyCode !== r.UP && t.keyCode !== r.DOWN) a(s); else if ((t.keyCode === r.UP || t.keyCode === r.DOWN) && "none" !== w.sug_ul.style.display) { for (var y = w.sug_ul.childNodes, m = y.length, k = -1, C = 0, g = 0; m > g; g++)y[g].className.indexOf("pass-item-suggsetion_hover") > -1 && (k = g); t.keyCode === r.UP && (C = -1 === k ? m - 1 : 0 === k ? m - 1 : k - 1), t.keyCode === r.DOWN && (C = -1 === k ? 0 : k === m - 1 ? 0 : k + 1); for (var x = w.sug_ul.getElementsByTagName("li"), g = 0; g < x.length; g++)l.removeClass(x[g], "pass-item-suggsetion_hover"); l.addClass(y[C], "pass-item-suggsetion_hover"), i(y[C]) } }), e.on("keydown", function (e) { if ((e.keyCode === r.ENTER || e.keyCode === r.TAB || e.KeyCode === r.SPACE) && w.sug_ul && "none" !== w.sug_ul.style.display) { w.sug_ul.hide(), b("input_vcode").focus(); try { e.preventDefault(), e.stopPropagation() } catch (t) { } } }), e.on("blur", function () { window.setTimeout(function () { w.sug_ul && w.sug_ul.hide() }, 200) }) }, z = function (n) { if (t.successCountdown < 1) return void (w.is_show && t.onSubmitSuccess.call(w, n) !== !1 && w.close()); O && O.hide(), D && D.hide(), R && R.hide(), b("mask").hide(), b("wrapper").hide(); var o = "", i = ""; switch (e) { case "bindemail": i = '<p class="bindsuccess-title">邮箱绑定成功</p><p class="bindsuccess-msg">您可使用该邮箱+验证码登录百度所有产品</p>'; break; case "bindmobile": i = '<p class="bindsuccess-title">手机绑定成功</p><p class="bindsuccess-msg">您可使用该手机+验证码登录百度所有产品</p>'; break; case "rebindemail": i = '<p class="bindsuccess-title">密保邮箱换绑成功</p><p class="bindsuccess-msg">您可使用该邮箱+验证码登录百度所有产品</p>'; break; case "rebindmobile": i = '<p class="bindsuccess-title">手机号换绑成功</p><p class="bindsuccess-msg">您可使用该手机+验证码登录百度所有产品</p>'; break; case "unbindemail": i = '<p class="bindsuccess-title bindsuccess-lineheight">邮箱解绑成功</p>'; break; case "unbindmobile": i = '<p class="bindsuccess-title bindsuccess-lineheight">手机解绑成功</p>' }N && (o = '<div class="bindsuccess-comeunbind"><p class="bindsuccess-comeunbind-msg">特别提醒:</p><p>手机号' + (n.phone || "") + "已绑定新帐号" + (n.displayname || "") + ",将不能用于登录原帐号" + (n.fromuser || "") + ",感谢您的使用。</p></div>"), H = passport.pop.init({ type: "confirmWidget", tangram: !0, titleText: "绑定手机", width: 400, apiOpt: { noFoot: 1, Cancel: "delete", Continue: "delete", contentHTML: '<div class="pass-armorsuccess-widget"><div class="bindsuccess-main-msg">' + i + "</div>" + o + "</div>" }, onRender: function () { }, onConfirmClose: function () { H = null, t.onSubmitSuccess && t.onSubmitSuccess.call(w, n) } }), H.show() }, $ = function (e) { var n = b("app_fail"), o = b("app_fail_msg"); n.show(), o.html("解绑失败,5秒钟后窗口关闭……"); var i = 5, s = window.setInterval(function () { i-- , o.html(["解绑失败,", i, "秒钟后窗口关闭……"].join("")), 0 === i && (window.clearInterval(s), w.is_show && t.onSubmitFail.call(w, e) !== !1 && w.close()) }, 1e3) }, X = function (e) { var t = e.substr(e.indexOf("@") + 1); t = t.replace(new RegExp("[.]", "g"), "_"); var n = { tom_com: "http://mail.tom.com", "163_com": "http://mail.163.com", qq_com: "http://mail.qq.com", gmail_com: "https://mail.google.com", yahoo_com_cn: "http://cn.yahoo.com", yahoo_com: "http://login.yahoo.com", sohu_com: "http://mail.sohu.com", sina_com: "http://mail.sina.com", sina_com_cn: "http://mail.sina.com.cn", hotmail_com: "https://login.live.com", msn_com: "https://login.live.com", live_cn: "https://login.live.com", live_com: "https://login.live.com", "126_com": "http://126.com", foxmail_com: "http://mail.foxmail.com", yeah_net: "http://yeah.net", "139_com": "http://mail.10086.cn/", "189_cn": "http://webmail11.189.cn/webmail/", "21cn_com": "http://mail.21cn.com/", "263_net": "http://mail.263.net/", wo_com_cn: "http://mail.wo.com.cn/mail/login.action" }; return n[t] ? n[t] : !1 }, Y = function (e) { if (st(!1, !1)) { var t = b("button_send"); if (et) var n = t.value, o = window.setInterval(function () { et ? t.value = "请稍等" : (t.value = n, nt && !q && Z(e), window.clearInterval(o)) }, 20); else nt && Z(e) } }, Z = (t.apiMargicInstance || {}, function () { var n = b("button_send"), o = b("error_vcode"), i = { action: e, authsid: L, bdstoken: A, vstr: t.vstr, isexchangeable: void 0 != t.isexchangeable ? t.isexchangeable : 1, countrycode: 1 == W ? B : "", exchange: q ? 1 : "", subpro: t.subpro, lstr: t.lstr, ltoken: t.ltoken, u: t.u, tpl: t.tpl }; if (i = s(i, t.otherValue), "bindemail" === e || "rebindemail" === e) { if (!K("email") || !Q("email")) return; i.email = b("input_email").value } else if ("bindmobile" === e || "rebindmobile" === e) { if (!K("mobile") || !Q("mobile")) return; i.mobile = b("input_mobile").value, i.isexchangeable = void 0 != t.isexchangeable ? t.isexchangeable : 1 } i.dv = document.getElementById("dv_Input") ? document.getElementById("dv_Input").value : window.LG_DV_ARG && window.LG_DV_ARG.dvjsInput || "", o.attr("title", ""), l.unon(n, "click", Y), n.value = "正在发送", n.addClass("armorwidget-button-sent"), _(C, i, function (s) { if ("0" === s.errno) { do { if (o.html('<span style="color:#333333">发送成功</span>'), "bindemail" === e || "rebindemail" === e) { var a = X(i.email); if (a) { o.html(['<span style="color:#333333">发送成功,</span><a class="email_url" href="', a, '" title="进入邮箱" target="_blank">立即进入邮箱</a>'].join("")); break } } t.onSendVcodeSuccess.call(w, s) } while (!1); var r = 60; n.value = "重新发送(60)", n.disabled = !0; var l = window.setInterval(function () { r-- , n.value = "重新发送(" + r + ")", 0 === r && (window.clearInterval(l), n.value = "重新发送", o.html(""), n.removeClass("armorwidget-button-sent"), n.disabled = !1, n.on("click", Y)) }, 1e3) } else if ("7" === s.errno || "8" === s.errno || "11" === s.errno) { var r = 10; "7" === s.errno && o.attr("title", P[e].vali.email.exists_title), "8" === s.errno && o.attr("title", P[e].vali.mobile.exists_title), "11" === s.errno ? (o.html(P[e].vali.email.suffix), o.style.width = "228px", r = 5) : o.html(s.errmsg), n.value = ["重新发送(", r, ")"].join(""); var l = window.setInterval(function () { r-- , n.value = "重新发送(" + r + ")", 0 === r && (window.clearInterval(l), n.value = "重新发送", o.html(""), n.removeClass("armorwidget-button-sent"), n.on("click", Y)) }, 1e3) } else o.html(s.errmsg), n.value = "重新发送", n.removeClass("armorwidget-button-sent"), n.on("click", Y) }) }), J = function () { var n = s(t.auth ? t.auth : {}, { token: E, title: t.auth_title, msg: t.auth_msg, color: t.color, subpro: t.subpro, tpl: t.tpl, traceid: v || "", onSubmitSuccess: function (t, n) { L = n.authsid, "unbindemail" === e || "unbindmobile" === e ? (ct(), U()) : ct() }, onSubmitFailure: function () { }, onHide: function () { t.onAfterClose.call(w) } }), o = passport.pop.initForceverify(n); o.show() }, K = function (t) { var n = b("input_" + t), o = b("error_" + t), i = n.value; return "" === i ? (n.addClass("armorwidget-input-error"), o.html(P[e].vali[t].empty), !1) : (n.removeClass("armorwidget-input-error"), !0) }, Q = function (t, n, o) { var i = b("input_" + t), s = b("error_" + t), a = i.value; return i.removeClass("armorwidget-input-error"), "" === a ? !1 : "email" === t ? /^[0-9a-zA-Z\.\_-]+@([0-9a-zA-Z-]+\.)+[a-z]{2,4}$/.test(a) ? /([a-zA-Z0-9_\.\-\+])+\@(baidu|hotmail)\.com$/.test(a) ? (n || (i.addClass("armorwidget-input-error"), s.html(P[e].vali[t].emailLimit)), !1) : (o ? o.call(w, t, i, a, s) : nt && !ot && (s.html(""), i.removeClass("armorwidget-input-error")), !0) : (n || (i.addClass("armorwidget-input-error"), s.html(P[e].vali[t].format)), !1) : "mobile" === t ? 1 == W && "" != B && /^(\d+)$/.test(a) || (0 == W || "" == B) && /^1[3456789]\d{9}$/.test(a) ? (o ? o.call(w, t, i, a, s) : nt && !ot && (s.html(""), i.removeClass("armorwidget-input-error")), !0) : (i.addClass("armorwidget-input-error"), s.html(P[e].vali[t].format), !1) : "vcode" === t ? /^\d{6}$/.test(a) ? !0 : (i.addClass("armorwidget-input-error"), s.html(P[e].vali[t].format), !1) : (i.removeClass("armorwidget-input-error"), !0) }, et = !1, tt = !1, nt = !1, ot = !0, it = function (n, i, s, a) {
if (!tt) if (et = !0, tt = !0, nt = !1, "email" === n) { var r = hex_md5(s + "Moonshadow"); r = r.replace(/o/, "ow").replace(/d/, "do").replace(/a/, "ad"), r = r.replace(/h/, "ha").replace(/s/, "sh").replace(/n/, "ns").replace(/m/, "mo"), _(I, { apiver: "v3", email: s, subpro: t.subpro, otherValue: t.otherValue, lstr: t.lstr, ltoken: t.ltoken, u: t.u, moonshad: r }, function (t) { et = !1, t && t.errInfo && "0" === t.errInfo.no ? (i.removeClass("armorwidget-input-error"), a.html(""), nt = !0) : t && t.errInfo && "500010" === t.errInfo.no ? (i.addClass("armorwidget-input-error"), a.html("操作频繁,请稍候再试")) : (i.addClass("armorwidget-input-error"), a.html(P[e].vali[n].exists)) }) } else if ("mobile" === n) {
var r = hex_md5(s + "Moonshadow"); r = r.replace(/o/, "ow").replace(/d/, "do").replace(/a/, "ad"), r = r.replace(/h/, "ha").replace(/s/, "sh").replace(/n/, "ns").replace(/m/, "mo"), _(T, { apiver: "v3", phone: s, countrycode: 1 == W ? B : "", isexchangeable: void 0 != t.isexchangeable ? t.isexchangeable : 1, exchange: q ? 0 : "", subpro: t.subpro, otherValue: t.otherValue, lstr: t.lstr, ltoken: t.ltoken, u: t.u, action: e, moonshad: r }, function (s) {
if (et = !1, ot = !0, N = !1, s && s.errInfo && "0" === s.errInfo.no) i.removeClass("armorwidget-input-error"), a.html(""), nt = !0, q && Z(); else if (s && s.errInfo && "500010" === s.errInfo.no) i.addClass("armorwidget-input-error"), a.html("操作频繁,请稍候再试"); else if (q && s && s.errInfo && "400503" === s.errInfo.no) if (nt = !0, O && O.hide(), R && R.hide(), H && H.hide(), b("mask").hide(), b("wrapper").hide(), D) b("rebindWidegetMobile").html(b("input_" + n).value), b("rebindWidegetUsername").html(s.errInfo.username ? s.errInfo.username : ""), D.show(); else { var r = s.errInfo.username ? s.errInfo.username : ""; D = passport.pop.init({ type: "confirmWidget", tangram: !0, titleText: "绑定手机", width: 400, apiOpt: { Cancel: "取消", Continue: "继续绑定", contentHTML: '<div class="pass-confirmbindWideget"><p class="pass-confirmbindWideget-msg pass-confirmbindWidget-bold"><span class="pass-confirmbindWideget-redcolor" id="' + h + '__rebindWidegetMobile">' + (b("input_" + n).value || "") + '</span>已绑定百度帐号<span class="pass-confirmbindWideget-redcolor" id="' + h + '__rebindWidegetUsername">' + r + "</span>,继续绑定将从原帐号解绑,来绑定至当前帐号</span></p></div>" }, onRender: function () { }, onConfirmClose: function () { D.hide(), b("error_vcode").html(""), o ? o.show() : (b("mask").show(), b("wrapper").show()), b("input_" + n).focus() }, onConfirmCancel: function () { D.hide(), b("error_vcode").html(""), b("input_" + n).value = "", o ? o.show() : (b("mask").show(), b("wrapper").show()), b("input_" + n).focus(); var e = new Image; e.onload = e.onerror = function () { e.onload = e.onerror = null, e = null }, e.src = y + "/img/v.gif?type=cancelBindBtn&canBind=1&&display=pc&tpl=" + (t.otherValue && t.otherValue.tpl || "") + "&tt=" + (new Date).getTime() }, onConfirmContinue: function (e) { D.hide(), b("error_vcode").html(""), N = !0, Z(e), o ? o.show() : (b("mask").show(), b("wrapper").show()), b("input_" + n).focus(), b("button_send").focus(), b("input_" + n).removeClass("armorwidget-input-focus"); var i = new Image; i.onload = i.onerror = function () { i.onload = i.onerror = null, i = null }, i.src = y + "/img/v.gif?type=continueBind&canBind=1&&display=pc&tpl=" + (t.otherValue && t.otherValue.tpl || "") + "&tt=" + (new Date).getTime() } }), D.show() } else if (q && s && s.errInfo && ("130020" === s.errInfo.no || "400005" === s.errInfo.no || "400001" === s.errInfo.no)) O && O.hide(), D && D.hide(), H && H.hide(), b("mask").hide(), b("wrapper").hide(), R ? (b("bindWidegetMobile").html(b("input_" + n).value), b("bindWidegetUsername").html(s.errInfo.username ? s.errInfo.username : ""), R.show()) : (R = passport.pop.init({
type: "confirmWidget", tangram: !0, titleText: "绑定手机", width: 400, apiOpt: { Cancel: "确定", Continue: "delete", contentHTML: '<div class="pass-confirmbindWideget"><p class="pass-confirmbindWideget-msg pass-confirmbindWidget-bold">手机号<span class="pass-confirmbindWideget-redcolor" id="' + h + '__bindWidegetMobile">' + (b("input_" + n).value || "") + '</span>已绑定百度帐号<span class="pass-confirmbindWideget-redcolor" id="' + h + '__bindWidegetUsername"></span>,请先解绑后再操作或更换手机号</p><p class="pass-confirmbindWideget-knowTitle">如何解绑手机</p><p class="pass-confirmbindWideget-know">1.短信快捷登录百度首页</p><p class="pass-confirmbindWideget-know">2.选择解绑手机号<span class="pass-confirmbindWideget-know-span">依次点击帐号设置-密保工具-解绑手机</span></p><p class="pass-confirmbindWideget-know">3.验证身份,完成解绑<span class="pass-confirmbindWideget-know-span">解绑前请确认帐号绑定了可用的密保邮箱</span></p></div>' }, onRender: function () { }, onConfirmClose: function () {
R.hide(), b("error_vcode").html(""), o ? o.show() : (b("mask").show(), b("wrapper").show()), b("input_" + n).focus()
}, onConfirmCancel: function () { R.hide(), b("error_vcode").html(""), b("input_" + n).value = "", o ? o.show() : (b("mask").show(), b("wrapper").show()), b("input_" + n).focus(); var e = new Image; e.onload = e.onerror = function () { e.onload = e.onerror = null, e = null }, e.src = y + "/img/v.gif?type=loginByOtherPhone&canBind=0&&display=pc&tpl=" + (t.otherValue && t.otherValue.tpl || "") + "&tt=" + (new Date).getTime() }
}), R.show()); else { i.addClass("armorwidget-input-error"); var l = s && s.errInfo && s.errInfo.msg ? s.errInfo.msg : P[e].vali[n].exists; a.html(l) }
})
} else et = !1, nt = !1
}, st = function (t, n) { return "bindmobile" === e || "rebindmobile" === e ? Q("mobile", !1, n ? it : f) : "bindemail" === e || "rebindemail" === e ? Q("email", t, n ? it : f) : void 0 }, at = function (e) { var t = 0, n = 0; for (var o in e) n++ , K(o) && Q(o) && t++; t === n && (b("button_submit").style.color = "#9ebef4", F()) }, rt = function () { _((window.location ? window.location.protocol.toLowerCase() : document.location.protocol.toLowerCase()) + "//passport.baidu.com/v2/?securitygetcountrycode", { apiver: "v3", subpro: t.subpro }, function (e) { e.data.country.length > 0 && lt(e.data.country) }) }, lt = function (e) { for (var t = '<li class="clearfix" data-curr=""><div class="forgot-code">+86</div><div class="font-code">中国</div></li>', n = b("ai_content_select_handler"), o = 0, i = e.length; i > o; o++) { var s = e[o]; t += '<li class="clearfix" data-curr="' + s.code + '"><div class="forgot-code">+' + s.code.substring(2) + '</div><div class="font-code">' + s.name + "</div></li>" } if (n.html(t), S = !0, l.on(b("ai_content_select_show"), "click", function () { var e = b("ai_content_select_handler"); e && "block" !== e.style.display ? e.style.display = "block" : e && (e.style.display = "none") }), b("ai_content_select_handler")) { var a = function () { b("ai_content_select_handler").style.display = "none" }; l.on(b("wrapper"), "click", function (e) { var t = l.getTarget(e); t.id !== w.id + "__ai_content_select_show" && a() }), l.on(b("mask"), "click", function () { a() }), l.on(b("ai_content_select_handler"), "click", function (e) { var t = l.getTarget(e), n = t.parentNode.attributes["data-curr"].value; B = n, b("ai_content_select_show").html(t.parentNode.firstChild.innerHTML), a() }) } }, ct = function () { l.insertHTML(m, "afterBegin", V("mask")), l.insertHTML(m, "beforeEnd", V("wrapper")), t.onRender.call(w); var o = {}, i = b("wrapper"), s = {}, a = !1; if (!S && W && rt(), b("header_h3").on("mousedown", function (e) { e.preventDefault ? e.preventDefault() : window.event.returnValue = !1, o.x = l.getMousePos(e).x, o.y = l.getMousePos(e).y, s.l = parseInt(i.style.left), s.t = parseInt(i.style.top), a = !0 }), l.on(m, "mousemove", function (e) { a && (i.style.left = s.l - o.x + l.getMousePos(e).x + "px", i.style.top = s.t - o.y + l.getMousePos(e).y + "px") }), l.on(m, "mouseup", function () { a = !1 }), b("header_a").on("click", function () { ut(), t && t.onBindClose && t.onBindClose.call(w) }), "unbindemail" !== e && "unbindmobile" !== e) { var r = {}, c = function (e) { var t = b("input_label_" + e); if (t) { var n = b("input_" + e), o = b("error_" + e); r[e] = { label: t, input: n, error: o }, t.on("click", function () { n.focus() }), n.on("focus", function () { l.addClass(n, "armorwidget-input-focus"), "vcode" === e && st(!1, !1), "email" === e && (tt = !1), "mobile" === e && (tt = !1) }), q ? b("button_send").on("click", function () { n.removeClass("armorwidget-input-focus"), "" === n.value && t.show(), st(!0, !0), "vcode" === e && Q("vcode") }) : n.on("blur", function () { n.removeClass("armorwidget-input-focus"), "" === n.value && t.show(), st(!0, !0), "vcode" === e && Q("vcode") }), n.on("keydown", function (n) { t.hide(), o.html(""), "vcode" === e && 13 === n.keyCode && u.click() }), "email" === e && G(n, o) } }; ("bindmobile" === e || "rebindmobile" === e) && (c("mobile"), c("vcode")), ("bindemail" === e || "rebindemail" === e) && (c("email"), c("vcode")); var u = b("button_submit"); u.on("click", function () { if (et) var e = u.value, t = window.setInterval(function () { return et ? void (u.value = "请稍等") : (u.value = e, at(r), void window.clearInterval(t)) }, 20); else at(r) }), u.on("mouseover", function () { u.addClass("armorwidget-button-hover") }), u.on("mouseout", function () { u.removeClass("armorwidget-button-hover") }), u.on("mousedown", function () { u.addClass("armorwidget-button-press") }), u.on("mouseup", function () { u.removeClass("armorwidget-button-press") }), q || b("button_send").on("click", Y) } n && window.setTimeout(function () { dt() }, 50) }, ut = this.close = function () { t.onHide.call(w), b("mask").hide(), b("wrapper").hide(), b("app_fail") && b("app_fail").hide(), w.is_show = !1, t.onAfterClose.call(w) }, dt = f; return j(), w
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment