/*! qhuc@1.0.0 5/8/2020, 7:04:42 AM */ !function(t){"use strict";var e,n=[],i={},o=[],r=function(){return{log:function(e){t.console&&t.console.log&&t.console.log(e)}}}(),a={on:function(t,e){this._event=this._event||{},this._event[t]=this._event[t]||[],this._event[t].push(e)},emit:function(t,e){var n=!0;if(!this._event||!this._event[t])return n;for(var i=0;i20&&(o=[]),o.push(t.key),e&&u(t)):p(t),i[t.key]=t,i.last=t}function y(t){t.depKeys=[],h(t)?(v(t),"_DEF_"==t.type&&function(){for(var t=n.length,e=null;e=n[--t];)h(e)&&(v(e),n.splice(t,1),"_DEF_"===e.type&&(t=n.length))}()):n.push(t)}function w(t,e,n){var i=m(t,e,n);i.type="_DEF_",y(i)}var b,x=(b=0,function(){return"k"+b++});function _(){w("lego",function(){return s})}s={version:"1.2.0",has:function(t){return t.replace(".js","")in i},inspect:function(){return{waitingMod:n,readyMod:i,hotloadKeys:o}},reset:function(){n=[],i={},_()},load:function(t,e){var n=document.createElement("script");n.src=t,e&&(n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||e()},n.onload=function(){e()}),document.body.appendChild(n)},on:a.on,emit:a.emit},_(),t._DEF_=w,t._REQ_=function(t,e,n){if(1===arguments.length&&"string"==typeof t){if(t in i)return i[t].funed;throw new Error(t+" not found")}var o=m(t,e,n);o.type="_REQ_",y(o)}}(this),_REQ_(["api/client.js","pages/index/ui.js","api/server.js","js/cookie.js","js/util.js","js/event.js"],function(t,e,n,i,o,r){var a=t["default"]?t["default"]:t,s=e.showPopup,c=e.hidePopup,u=n["default"]?n["default"]:n,d=i["default"]?i["default"]:i,f=o.console,l=r.eventable,p="_uc_mid",h="_uc_m2",g=null,m=null,v=null,y=!1;window.QHUC=l({version:"0.1",getMid:function(){return m||d.get(p)},getM2:function(){return v||d.get(h)},checkLogin:function(){return y?g:undefined},init:function(t){var e=this;void 0===t&&(t={});!1 in t&&this.emit("ready",{errno:1,msg:"src rquired"});t.needFastSignIn===undefined&&(t.needFastSignIn=!0);this.data=t,u.on("checkLogin",function(n){if(_src=t.src,g=n)return y=!0,void e.emit("ready",{errno:0,mid:e.getMid(),m2:e.getM2(),isLogin:g});t.needFastSignIn&&e.data.info?u.getData({info:e.data.info}):(y=!0,e.emit("ready",{errno:0,mid:e.getMid(),m2:e.getM2(),isLogin:g}))}),a.on("getData",function(t){var n=t.m2,i=t.mid,o=t.info;v=n,m=i,e.data.info=o,d.set(h,n),d.set(p,i),u.checkLogin()}),a.on("fail",function(){u.checkLogin()}),u.on("getData",function(t){y=!0,t.err?e.emit("ready",{errno:0,mid:e.getMid(),m2:e.getM2(),isLogin:g}):(e.userInfo=t,e.emit("ready",{errno:0,mid:e.getMid(),m2:e.getM2(),userName:t.userName,nickName:t.nickName,avatar:t.imgUrl,qid:t.qid,isLogin:g}))}),a.getData()},signOut:function(){var t=this;u.on("signOut",function(e){var n=e.err;t.emit("signOut",{err:n})}),u.signOut(this.data)},signIn:function(){y?u.signIn(this.data):f.error("run init first")},fastSignIn:function(){var t=this;u.on("confirm",function(e){var n=e.err;t.emit("fastSignIn",{err:n})}),u.confirm({info:this.data.info})},showPopup:function(t){y?t&&"length"in t?f.error("dom element required"):s.call(this,t):f.error("run init first")},hidePopup:function(){c.call(this)}})}),_DEF_("api/client.js",["js/util.js","js/event.js"],function(t,e){var n=t.adapter,i=e.eventable,o=n();var r=function(){var t=null,e=null;try{t=window.wdextcmd.GetMid(),e=window.wdextcmd.GetMidV2()}catch(n){try{t=external.GetMID(external.GetSID(window))}catch(i){try{t=external.GetSpecialData(external.twGetSecurityID(window)).split(",")[3]}catch(o){}}}return{mid:t,m2:e}}(),a=r.mid,s=r.m2;return{"default":t=i({getData:function(){var t=this;this.on("one_fail",function(){t._getData({port:51360,failKey:"two_fail"})}),this.on("two_fail",function(){a?t.emit("getData",{m2:s,mid:a}):t.emit("fail")}),this._getData({port:54360,failKey:"one_fail"})},_getData:function(t){var e=this,n=t.port,i=t.failKey;o.jsonp({url:"https://local.info.g9hc4.cn:"+n+"/",callbackName:"uuidjsonpcb2020",timeout:800,success:function(t){a&&(t.mid=a),s&&(t.m2=s),e.emit("getData",t)},fail:function(){e.emit(i)}})}})}}),_DEF_("js/util.js",[],function(){function t(t,e){var n=new Error(e);return n.errno=t,n}var e=document;var n=window.console||{log:function(){},error:function(){}};function i(t,e){this.total=t,this.count=0,this.cb=e}return i.prototype.add=function(){this.count++,this.count==this.total&&this.cb()},{Callback:i,strinify:function(t){var e=[];for(var n in t){var i=t[n];i=encodeURIComponent(i),e.push(encodeURIComponent(n)+"="+i)}return e.join("&")},console:n,adapter:function(){var n=null;window.QW?(W.prototype.append=W.prototype.appendChild,(n=window.W).isQW=!0,n.getScript=function(t,e){var n=document.createElement("script");n.onload=n.onreadystatechange=function(){e()},n.src=t,document.body.appendChild(n)}):window.jQuery?(n=window.jQuery).isQW=!1:n={};var i=0;return n.jsonp=function(n){var o=n.success,r=n.fail,a=n.url,s=n.data;void 0===s&&(s={});var c=n.timeout;void 0===c&&(c=5e3);var u=n.callbackKey;void 0===u&&(u="callback");var d=n.callbackName;void 0===d&&(d="jsonpCB_"+(new Date).getTime()+i++);var f=window.setTimeout(function(){window[d]=function(){},document.body.removeChild(p),r(new t(1,"timeout"))},c);if(a+=(-1===a.indexOf("?")?"?":"&")+u+"="+d+"&t="+(new Date).getTime(),s)for(var l in s)a+="&"+window.encodeURIComponent(l)+"="+window.encodeURIComponent(s[l]);var p=e.createElement("script");window[d]=function(n){window.clearTimeout(f),f=null,window[d]=null,e.body.removeChild(p),"errno"in n&&0!=n.errno?r&&r(new t(101,n.errmsg)):o&&o(n)},p.src=a,e.body.appendChild(p)},n},UCError:t}}),_DEF_("js/event.js",[],function(){var t={on:function(t,e){"string"==typeof t&&(t=[t]);for(var n=0;n