chunk-common.1c8c2f7b.js 137 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"088b":function(e,t,n){"use strict";var r=n("7688"),a=n.n(r);a.a},1:function(e,t){},1015:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLogining,expression:"isLogining"}],staticClass:"c-loginBox small"},[n("div",{staticClass:"logo"},[e._v("MeeChat账号登录")]),n("h3",{staticClass:"title-other"},[e._v(e._s(e.$t("login.otherType")))]),n("other-account",{on:{initMiniLoginCallback:e.initMiniLoginCallback}})],1)},a=[],o=n("bd31"),i=n("52c1"),s=n("a3af"),c={name:"loginBox",components:{otherAccount:s["a"]},created:function(){},computed:Object(o["a"])({},Object(i["e"])(["isLogining"])),methods:{initMiniLoginCallback:function(){this.$emit("initMiniLoginCallback")}}},u=c,p=(n("5b41"),n("fc05")),d=Object(p["a"])(u,r,a,!1,null,"be9a350e",null);t["a"]=d.exports},1848:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"back-bar border-bottom"},[n("div",{staticClass:"arrow-icon",on:{click:e.onBack}},[n("i",{staticClass:"el-icon-arrow-left"})]),e._v("\n "+e._s(e.title)+"\n "),e.url?n("a",{staticClass:"icon-link",attrs:{href:e.url,target:"_blank"}}):e._e(),e._t("default")],2)},a=[],o={name:"backBar",props:{title:String,url:String},methods:{onBack:function(){this.$router?this.$router.go(-1):this.$emit("onBack")}}},i=o,s=(n("a7de"),n("fc05")),c=Object(s["a"])(i,r,a,!1,null,"bdea7596",null);t["a"]=c.exports},"1c04":function(e,t,n){"use strict";n("4694");var r=n("8973"),a=n("52c1"),o=(n("face"),{setScatter:function(e,t){e.scatter=t},setEos:function(e,t){e.eos=t},setAccount:function(e,t){e.account=t},setToAccount:function(e,t){e.toAccount=t},setBalance:function(e,t){e.balance=t},setMoney:function(e,t){e.money=t},setGt:function(e,t){e.gt=t},setMainnet:function(e,t){e.mainnet=t},setGTError:function(e,t){e.gtErrorCount=t},setEOSError:function(e,t){e.eosErrorCount=t},setPublicKey:function(e,t){e.publicKey=t},setUserId:function(e,t){e.userId=t},setToken:function(e,t){e.token=t},changeSessionId:function(e,t){e.curSession=t},setUserInfo:function(e,t){e.userInfo=t},setUserUserName:function(e,t){e.userInfo.user_name=t},setUserNickName:function(e,t){e.userInfo.nick_name=t},updateUserPhoto:function(e,t){e.userInfo.cover_photo=t},setLogining:function(e,t){e.isLogining=t},setCopyText:function(e,t){e.copyText=t},changeHotGroupStatus:function(e,t){if(!(e.hotList.length<=0)){var n=e.hotList.findIndex(function(e,n){return e.group_id==t.groupId});n>-1&&(e.hotList[n].is_join=t.isJoin,t.isJoin>0?++e.hotList[n].member_num:--e.hotList[n].member_num)}}}),i=(n("dcfb"),n("46b5"),n("024c")),s=n("badb"),c=n.n(s),u=(n("dc12"),n("61e5"),n("a700")),p=n.n(u),d=(n("b5aa"),n("4457")),l=(n("9dce"),n("d6e8"),n("b709"),n("e9fc"),n("d690")),h=n.n(l),m=n("5975"),f=n("33f8"),g=n("e332"),v=n("0892"),b=n.n(v),k={setScatter:function(e,t){var n=e.commit;return n("setScatter",t)},setEos:function(e,t){var n=e.commit;return n("setEos",t)},setAccount:function(e,t){var n=e.commit;return n("setAccount",t)},doScatterLogin:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,o,i,s,u,d,l=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.dispatch,a=t.commit,o=t.state,o.scatter){e.next=5;break}Object(f["A"])("Please install the scatter","Scatter"),e.next=40;break;case 5:if(1!=Object(f["r"])("isChangeIndentity")){e.next=10;break}return e.next=8,k.doScatterLogout.apply(k,l);case 8:localStorage.setItem("accounts",""),Object(f["z"])("isChangeIndentity",0);case 10:return e.next=12,Object(g["b"])();case 12:return i=e.sent,e.prev=13,e.next=16,o.scatter.getIdentity({accounts:[i]});case 16:s=e.sent,e.next=23;break;case 19:return e.prev=19,e.t0=e["catch"](13),"identity_rejected"!==e.t0.type&&Object(f["A"])(e.t0.message),e.abrupt("return",p.a.reject(e.t0));case 23:if(u=s.accounts.find(function(e){return"eos"===e.blockchain}),d=localStorage.getItem("accounts"),!d||JSON.parse(d).name===u.name){e.next=34;break}return e.next=28,k.doScatterLogout.apply(k,l);case 28:n.push({path:"/login"}),a("setUserInfo",null),a("initChatData"),a("initGroupData"),a("chatAppLogin",!1),a("toApp",!1);case 34:return a("setAccount",u),localStorage.setItem("accounts",c()(u)),window.EOS=o.scatter.eos(i,b.a,{}),e.next=39,r("getAccount");case 39:return e.abrupt("return",p.a.resolve(!0));case 40:case"end":return e.stop()}},e,this,[[13,19]])}));function t(t,n){return e.apply(this,arguments)}return t}(),doScatterBind:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,c,u,d,l,h,v,k,w;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,t.commit,n=t.state,r=Object(f["r"])("eosType")||"eos",a={contract:"meetone"==r?"meechat.m":"meechatadmin",net_id:"meetone"==r?2:1},n.scatter){e.next=7;break}Object(f["A"])("Please install the scatter","Scatter"),e.next=42;break;case 7:return e.next=9,Object(g["b"])();case 9:return o=e.sent,e.next=12,n.scatter&&n.scatter.forgetIdentity&&n.scatter.forgetIdentity();case 12:return Object(f["z"])("isChangeIndentity",1),e.prev=13,e.next=16,n.scatter.getIdentity({accounts:[o]});case 16:i=e.sent,e.next=23;break;case 19:return e.prev=19,e.t0=e["catch"](13),"identity_rejected"!==e.t0.type&&Object(f["A"])(e.t0.message),e.abrupt("return",p.a.reject(e.t0));case 23:return s=i.accounts.find(function(e){return"eos"===e.blockchain}),console.log("identity",i),e.next=27,m["a"].user.getRandom2({account:s.name});case 27:return c=e.sent,u=c.data,d=u.data.random,l=u.data.accessToken,h=null,v=n.scatter.eos(o,b.a,{}),e.next=35,v.contract(a.contract);case 35:return k=e.sent,console.log("contract",k),e.next=39,k.login(s.name,d,{authorization:["".concat(s.name,"@").concat(s.authority)]});case 39:return h=e.sent,w={account:s.name,access_token:l,trx_id:h.transaction_id||h.transaction.transaction_id,net_id:a.net_id},e.abrupt("return",m["a"].user.eosBind2(w));case 42:case"end":return e.stop()}},e,this,[[13,19]])}));function t(t){return e.apply(this,arguments)}return t}(),doScatterLogout:function(e,t){var n=e.commit,r=e.state;return f["a"].delCookie("user_id"),f["a"].delCookie("token"),localStorage.removeItem("user_id"),localStorage.removeItem("token"),localStorage.removeItem("accounts"),n("setUserId",null),n("setToken",null),n("setAccount",""),Object(f["z"])("isChangeIndentity",0),r.scatter&&r.scatter.forgetIdentity&&r.scatter.forgetIdentity()},getUserEOS:function(e,t){var n=e.dispatch,r=e.commit,a=e.state;return new p.a(function(e,t){window.EOS.getCurrencyBalance("eosio.token",a.account.name,"EOS").then(function(t){var n=Object(i["a"])(t,1),a=n[0],o=Number(a.replace(/\sEOS/,"")).toFixed(4);o=h.a.times(o,1e4),r("setBalance",o),r("setEOSError",0),e()}).catch(function(e){r("setEOSError",a.eosErrorCount+1),a.eosErrorCount<=5&&setTimeout(function(){n("getUserEOS")},1e3*a.eosErrorCount),t(e)})})},getAccount:function(e,t){var n=e.commit,r=e.state;return new p.a(function(e,t){window.EOS.getAccount(r.account.name).then(function(t){var r=JSON.parse(c()(t.permissions));r.forEach(function(e){if("active"===e.perm_name){var t=e.required_auth.keys[0].key;n("setPublicKey",t)}}),e(t)}).catch(function(e){t(e)})})},doGameLogin:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,o,i,s,c,u;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,r=t.commit,a=t.state,o=localStorage.getItem("user_id"),i=localStorage.getItem("token"),!o||!i){e.next=9;break}return r("setUserId",o),r("setToken",i),e.abrupt("return",p.a.resolve({user_id:o,token:i}));case 9:return e.next=11,m["a"].user.getRandom({account:a.account.name});case 11:return s=e.sent,c=s.data.data,u=a.publicKey,e.abrupt("return",new p.a(function(e,t){a.scatter.getArbitrarySignature(u,c,"Need Login").then(function(n){var o={account:a.account.name,sign:n,pubkey:u,data:c};m["a"].user.eosLogin(o).then(function(n){var a=n.data;if(1===a.result){var o=a.data.user_id,i=a.data.token;localStorage.setItem("user_id",o),localStorage.setItem("token",i),r("setUserId",o),r("setToken",i),e(a)}else t(new Error(a.msg))})}).catch(function(e){t(e)})}));case 15:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),resetGameLogin:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.dispatch,t.commit,t.state,localStorage.removeItem("user_id"),localStorage.removeItem("token"),e.next=5,r("doContractLogin");case 5:self!==top?location.replace(location.href.replace("show=false","show=true")):location.reload();case 6:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),doContractLogin:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,o,i,s,c,u,d,l,h,g,v,b,k,w,y,_,x;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,o=Object(f["r"])("eosType")||"eos",i={contract:"meetone"==o?"meechat.m":"meechatadmin",net_id:"meetone"==o?2:1},s=localStorage.getItem("user_id"),c=localStorage.getItem("token"),!s||!c){e.next=11;break}return r("setUserId",s),r("setToken",c),e.abrupt("return",p.a.resolve({user_id:s,token:c}));case 11:return e.prev=11,e.next=14,m["a"].user.getRandom2({account:a.account.name});case 14:if(u=e.sent,d=u.data,l=d.data.random,h=d.data.accessToken,g={authorization:["".concat(a.account.name,"@").concat(a.account.authority)]},v=null,self===top){e.next=26;break}return e.next=23,window.postMessager.send({action:"meechat:eosAction",data:{contract:i.contract,action:"login",param:[a.account.name,l,g]}});case 23:v=e.sent,e.next=33;break;case 26:return b=window.EOS||a.scatter.eos,e.next=29,b.contract(i.contract);case 29:return k=e.sent,e.next=32,k.login(a.account.name,l,g);case 32:v=e.sent;case 33:return w={account:a.account.name,access_token:h,trx_id:v.transaction_id||v.transaction.transaction_id,group_id:a.group.groupId||null,net_id:i.net_id},e.next=36,m["a"].user.eosLogin2(w);case 36:if(y=e.sent,1!==y.data.result){e.next=45;break}return _=y.data.data.user_id,x=y.data.data.token,localStorage.setItem("user_id",_),localStorage.setItem("token",x),r("setUserId",_),r("setToken",x),e.abrupt("return",p.a.resolve(y.data));case 45:e.next=50;break;case 47:return e.prev=47,e.t0=e["catch"](11),e.abrupt("return",p.a.reject(e.t0));case 50:case"end":return e.stop()}},e,this,[[11,47]])}));function t(t,n){return e.apply(this,arguments)}return t}(),getHotList:function(e,t){var n=e.state;n.hotList.length>0||m["a"].group.getHotList().then(function(e){var t=e.data;n.hotList=t.data})},getDiscovery:function(e,t){var n=e.state;n.hotGame.length>0&&n.hotList.length>0||m["a"].base.discovery().then(function(e){var t=e.data;n.hotGame=t.data.hotGame,n.hotList=t.data.hotGroup})}},w=function(){return{scatter:null,eos:null,account:"",balance:0,mainnet:EOS_HOST,gtErrorCount:0,eosErrorCount:0,publicKey:null,userId:localStorage.getItem("user_id")||"",token:localStorage.getItem("token")||"",curSession:"",userInfo:null,isLogining:!1,copyText:"",hotList:[],hotGame:[]}},y=function(){return{sessionList:[],isLogin:!0,toApp:!1,friendList:[]}},_=function(){return{useCache:!1,adminList:[],creator:"",blockList:[],userCounts:"",groupName:"",shareName:"",groupNotice:"",privateName:"",coverPhoto:"",url:"",inviteUrl:"",sessionInfo:{},eosInfo:null,groupId:"",members:{},membersArray:[],membersNum:0,userId:"",nickName:"",atList:[],chatList:[],lastMsgUid:0,startHash:"",endHash:"",chatUserList:[],userInfo:{},unreadNums:0,chatInputFocus:!1,pinMsg:{},searchList:[],isNewAt:!0,isNewAtFound:!1,isJoin:!0,isRefreshImg:!1}},x=n("ab01"),S=n.n(x),I=n("a585"),L=n("26cb"),O=n("fd86"),M=n("3d0b"),T=n("d26d"),C=n("411a"),j=function(e){function t(){return Object(I["a"])(this,t),Object(O["a"])(this,Object(M["a"])(t).call(this,"session"))}return Object(T["a"])(t,e),Object(L["a"])(t,[{key:"getSortList",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(t=e.sent,t){e.next=5;break}return e.abrupt("return",[]);case 5:return e.next=7,t.index("pin_time_int").openCursor(null,"prev");case 7:n=e.sent,r=[];case 9:if(!n||!n.value){e.next=17;break}return a=n.value,(!a.delete_time_int||a.delete_time_int<a.update_time_int)&&r.push(a),e.next=14,n.continue();case 14:n=e.sent,e.next=9;break;case 17:return e.abrupt("return",r);case 18:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"updateItem",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateObject(n,{session_id:t});case 1:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"setUnread",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateItem(t,{unread:n});case 1:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"setPin",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:r=n?(new Date).getTime():0,this.updateItem(t,{is_pin:n,pin_time_int:r});case 2:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"setMute",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateItem(t,{is_mute:n});case 1:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"clearData",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(){var t,n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(t=e.sent,t){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,t.openCursor(null,"prev");case 7:n=e.sent;case 8:if(!n||!n.value){e.next=16;break}return r=n.value,r.delete_time_int||t.delete(r.session_id),e.next=13,n.continue();case 13:n=e.sent,e.next=8;break;case 16:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"replaceSession",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(n=e.sent,n){e.next=5;break}return e.abrupt("return",t);case 5:e.t0=regeneratorRuntime.keys(t);case 6:if((e.t1=e.t0()).done){e.next=18;break}return r=e.t1.value,a=t[r]["session_id"],e.next=11,n.get(a);case 11:if(!e.sent){e.next=15;break}this.updateObject(t[r],{session_id:a}),e.next=16;break;case 15:n.put(t[r]);case 16:e.next=6;break;case 18:return e.abrupt("return",this.getSortList());case 19:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"remove",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,n.get(t);case 7:r=e.sent,r&&this.updateItem(t,{delete_time_int:r.update_time_int});case 9:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"recover",value:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateItem(t,{delete_time_int:0});case 1:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()}]),t}(C["a"]),R=j,A=n("2593"),P=new R,N={refreshSessionList:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.commit,t.state,e.next=3,P.getSortList();case 3:a=e.sent,a&&a.length&&r("setSessionList",a);case 5:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),getSessionList:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:r=t.dispatch,a=t.commit,t.state,r("refreshSessionList"),m["a"].session.sessionList(function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.data,!n||!n.data){e.next=8;break}return e.next=4,P.clearData();case 4:return e.next=6,P.replaceSession(n.data);case 6:r=e.sent,a("setSessionList",r);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),getUserInfo:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,c;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,r=t.rootState,e.prev=1,a=r.userId||localStorage.getItem("user_id"),e.next=5,m["a"].user.getInfo({target_id:a});case 5:o=e.sent,i=o.data,n("setUserInfo",i.data),n("setGroupUserInfo",i.data),i.data.user_id&&(s=new A["a"],c={cover_photo:i.data.cover_photo,nick_name:i.data.nick_name,user_name:i.data.user_name},s.updateObject(c,{user_id:i.data.user_id})),e.next=14;break;case 12:e.prev=12,e.t0=e["catch"](1);case 14:case"end":return e.stop()}},e,this,[[1,12]])}));function t(t){return e.apply(this,arguments)}return t}(),updateSessionItem:function(e,t){var n=e.commit,r=e.state,a=r.sessionList.find(function(e){return e.session_id==t.sessionId});a=S()(a,t.data),n("setSessionItem",a)},doRepealPersonMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,t.commit,t.state,n=t.rootState,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].person.repealPersonMsg({session_id:n.curSession,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));function t(t){return e.apply(this,arguments)}return t}(),getFriendList:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,e.prev=1,e.next=4,m["a"].group.getFriends();case 4:r=e.sent,a=r.data,n("setFriendList",a.data),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:case"end":return e.stop()}},e,this,[[1,9]])}));function t(t){return e.apply(this,arguments)}return t}()},E=N,$=n("c1f9"),G=n.n($),U=new R,q={setSessionList:function(e,t){t.forEach(function(e){var t=e["last_msg"];e.cont=t?Object(f["i"])(t.content):""}),e.sessionList=t},addSession:function(e,t){e.sessionList.push(t)},chatAppLogin:function(e,t){e.isLogin=t},toApp:function(e,t){e.toApp=t},addSessionItem:function(e,t){var n=e.sessionList.filter(function(e){return 1===e.is_pin}),r=n.length||0;e.sessionList.splice(r,0,t),U.recover(t.session_id)},setSessionItemUnread:function(e,t){var n=0;e.sessionList.forEach(function(e,a){if(e.session_id=="".concat(t.session_id)){var o=e.unread;t.unread&&t.curSession!=t.session_id?o+=t.unread:o=0,r["default"].set(e,"unread",o),U.setUnread(e.session_id,o),n=a}});var a=e.sessionList[n];n&&!a.is_pin&&t.cont&&(e.sessionList.splice(n,1),q.addSessionItem(e,a))},setFriendList:function(e,t){e.friendList=t},setSessionRepeal:function(e,t){e.sessionList.forEach(function(e){e.session_id==(t.sessionId||t.group_id)&&(r["default"].set(e.last_msg,"msg_type",-1),r["default"].set(e,"update_time_int",t.timestamp))})},setSessionItem:function(e,t){e.sessionList.forEach(function(e){e.session_id==t.session_id&&(e=t)})},updateSessionListByPin:function(e,t){U.setPin(t.session_id,1),e.sessionList.forEach(function(n,r){n.session_id==t.session_id&&(n.is_pin=t.is_pin,n.pin_time_int=t.pin_time_int,e.sessionList.unshift(e.sessionList.splice(r,1)[0]))})},cancelSessionListByPin:function(e,t){U.setPin(t.session_id,0);var n=null;e.sessionList.forEach(function(r,a){r.session_id==t.session_id?(r.is_pin=t.is_pin,r.pin_time_int=t.pin_time_int,n=e.sessionList.splice(a,1)[0]):n&&r.is_pin<1&&(e.sessionList.splice(a,0,n),n=null)})},updateSessionListByMute:function(e,t){U.setMute(t,1),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=1)})},cancelSessionListByMute:function(e,t){U.setMute(t,0),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=0)})},removeSessionListById:function(e,t){U.remove(t),e.sessionList=G.a.filter(e.sessionList,function(e,n){return e.session_id!=t})},updateSessionLastmsg:function(e,t){var n=e.sessionList.find(function(e){return e.session_id==(t.group_id||t.sessionId||t.session_id)});n&&q.setSessionLastmsg(e,n,t)},updateSessionLastMsgNoDecode:function(e,t){q.updateSessionLastmsg(e,S()(t,{noDecryptoMsg:!0}))},setSessionLastmsg:function(e,t,n){t.last_msg||r["default"].set(t,"last_msg",{});var a=t.last_msg;r["default"].set(a,"content",n.content),r["default"].set(a,"from",n.from),r["default"].set(a,"msg_type",n.msg_type),r["default"].set(a,"name",n.name),r["default"].set(a,"nick_name",n.nick_name),r["default"].set(a,"time",n.timestamp),r["default"].set(t,"update_time_int",n.timestamp),r["default"].set(t,"cont",n.noDecryptoMsg?n.content:Object(f["i"])(n.content)),n.ext_info&&n.ext_info.event_type&&r["default"].set(a,"event_type",n.ext_info.event_type)},initChatData:function(e){var t=y();for(var n in e)t.hasOwnProperty(n)&&(e[n]=t[n])}},B=q,D={state:y(),actions:E,mutations:B},H=D,F=n("5f19"),J=(n("0adb"),n("c7d9"),n("76a4")),z=n("7f43"),W=n.n(z),K=n("8d4d"),Y=null,V={getGroupInfo:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t,n){var r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:t.dispatch,r=t.commit,a=t.state,m["a"].group.getGroupInfo2({group_id:a.groupId},function(e){if(0===e.data.code){var t=e.data.data.adminList,n=e.data.data.blockList,o=e.data.data.pinMsg,i=e.data.data.group,s=e.data.data.members,c=e.data.data.group.member_num,u=e.data.data.userInfo,p=e.data.data.sessionInfo,d=e.data.data.members.some(function(e){return a.userId==e.user_id}),l=e.data.data.eosInfo;o&&(o.visible=!0);var h={};s.forEach(function(e){e.user_id&&(h[e.user_id]=e)}),r("setGroupInfo",{userCounts:s.length,groupName:i.group_title,shareName:i.group_name,members:h,membersArray:s,membersNum:c,userInfo:u,groupNotice:i.group_notice,url:i.url,inviteUrl:i.invite_url,sessionInfo:p||{is_mute:0,is_pin:0,pin_time_int:0},isJoin:d,coverPhoto:i.cover_photo,adminList:t,blockList:n,pinMsg:o||{},creator:i.creator,eosInfo:l})}});case 2:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),commonGetNewMsgFromDb:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,c=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},r=t.rootState,a=t.state,o=t.commit,i=new K["a"],e.next=5,i.getMsg(n.isPrivate?r.curSession:a.groupId);case 5:if(s=e.sent,Object(f["z"])("lastShowMsgUid",0),!(s&&s.list.length>0)){e.next=14;break}return n.fromdb=!0,o("setGroupMembers",S()(s.userMap,a.members)),V._renderMsg(t,s,n),e.abrupt("return",!0);case 14:return e.abrupt("return",!1);case 15:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),commonGetNewMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},r=t.rootState,a=t.state,o=t.commit,!n.isPrivate){e.next=8;break}return e.next=5,m["a"].person.getNewMsg({session_id:r.curSession,client_hash:a.endHash}).catch(function(){});case 5:i=e.sent,e.next=11;break;case 8:return e.next=10,m["a"].group.getNewMsg({group_id:a.groupId,client_hash:a.endHash}).catch(function(){});case 10:i=e.sent;case 11:return 0===i.data.code&&i.data.data.list.length>0&&(n.fromdb=!1,o("setGroupMembers",S()(i.data.data.userMap,a.members)),V._renderMsg(t,i.data.data,n)),e.abrupt("return",i.data);case 13:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),commonGetHistoryMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,u,p,d,l=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,n=t.commit,r=t.state,a=t.rootState,o=l.length>1&&void 0!==l[1]?l[1]:{},i=localStorage.getItem(o.hash),s=[],u="",!i||!r.useCache){e.next=9;break}s=JSON.parse(i),e.next=19;break;case 9:if(!o.isPrivate){e.next=15;break}return e.next=12,m["a"].person.getHistoryMsg({session_id:a.curSession,client_hash:r.startHash}).catch(function(){});case 12:p=e.sent,e.next=18;break;case 15:return e.next=17,m["a"].group.getHistoryMsg({group_id:r.groupId,client_hash:r.startHash}).catch(function(){});case 17:p=e.sent;case 18:p&&0===p.data.code&&p.data.data.list.length>0&&(d=0,p.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(f["i"])(e.msg)):e.msg=Object(f["i"])(e.msg);var t=p.data.data.userMap[e.from];n("updateMembers",p.data.data.userMap),t&&(5==e.msg_type&&e.ext_info&&"leave_group"==e.ext_info.event_type&&!r.adminList.some(function(e){return e==a.userId})||(s.push({name:t?t.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:t?t.cover_photo:"",hash:e.hash,type:e.from==r.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null,ext_info:e.ext_info?e.ext_info:null,isShowFullInfo:e.from!=d}),5==e.msg_type&&(d=0),d=5==e.msg_type?0:e.from))}),r.useCache&&localStorage.setItem(o.hash,c()(s)));case 19:return s.length>0?(n("setHash",{startHash:s[0].hash}),n("addHistoryList",s),u="done"):(n("setHash",{startHash:null}),u="end"),e.abrupt("return",u);case 21:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),commonDoSendMsg:function(e){e.dispatch;var t=e.commit,n=e.state,r=e.rootState,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new p.a(function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(o,i){var s,c,u,p,d,l;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!a.isPrivate){e.next=6;break}return e.next=3,m["a"].person.sendMsg({session_id:r.curSession,msg_type:a.type,msg:a.msg});case 3:s=e.sent,e.next=9;break;case 6:return e.next=8,m["a"].group.sendMsg({group_id:n.groupId,msg_type:a.type,msg:a.msg}).catch(function(e){a.createTime&&Object(f["h"])(n,a.createTime),i(e)});case 8:s=e.sent;case 9:if(c=s.data,0!==c.code){e.next=34;break}if(!a.createTime){e.next=26;break}u=a.createTime,c.data.content=Object(f["i"])(c.data.content),p=n.chatList,d=p.length-1;case 16:if(!(d>=0)){e.next=24;break}if(l=p[d],l.createTime!==u){e.next=21;break}return t("updataChatItem",{index:d,hash:c.data.hash,isCommfirm:!0}),e.abrupt("break",24);case 21:d--,e.next=16;break;case 24:e.next=29;break;case 26:t("updateMembers",c.data.userMap),c.data.content=Object(f["i"])(c.data.content),t("addChatItem",c.data);case 29:t("setHash",{endHash:c.data.hash}),t("updateSessionLastMsgNoDecode",S()(c.data,{group_id:n.groupId})),o(c.data),e.next=35;break;case 34:a.createTime&&Object(f["h"])(n,a.createTime);case 35:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}())},_renderMsg:function(e,t,n){var r=e.commit,a=e.state,o=e.rootState,i=[],s=Object(f["r"])("lastShowMsgUid")||0;if(t.list.forEach(function(e){var t=a.members[e.from];t&&(5==e.msg_type&&e.ext_info&&"leave_group"==e.ext_info.event_type&&!a.adminList.some(function(e){return e==o.userId})||(i.push({name:t.nick_name||t.user_name||"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:t.cover_photo||"",hash:e.hash,type:e.from==a.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null,ext_info:e.ext_info?e.ext_info:null,isShowFullInfo:e.from!=s}),5==e.msg_type&&(s=0),s=5==e.msg_type?0:e.from))}),Object(f["z"])("lastShowMsgUid",s),a.chatList.length?r("setHash",{endHash:i[i.length-1]?i[i.length-1].hash:""}):r("setHash",{endHash:i[i.length-1]?i[i.length-1].hash:"",startHash:i[0]?i[0].hash:""}),n.isPrivate)for(var c in a.members)if(c!==o.userId){r("updateGroup",{key:"privateName",data:a.members[c]&&a.members[c]["nick_name"]||""});break}var u=n.newMsg?{list:i,newMsg:n.newMsg,fromdb:!1}:{list:i,fromdb:n.fromdb};r("addChatItem",u)},getNewMsgFromDb:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!1,e.abrupt("return",V.commonGetNewMsgFromDb(t,n));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getNewMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!1,e.abrupt("return",V.commonGetNewMsg(t,n));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getPrivateNewMsgFromDb:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!0,e.abrupt("return",V.commonGetNewMsgFromDb(t,n));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getPrivateNewMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!0,e.abrupt("return",V.commonGetNewMsg(t,n));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",V.commonGetHistoryMsg(t,n));case 2:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getPrivateHistoryMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!0,e.abrupt("return",V.commonGetHistoryMsg(t,n));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),doSendMsg:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.isPrivate=!1,V.commonDoSendMsg(e,t)},doSendFile:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,r=t.state,a=t.rootState,o=i.length>1&&void 0!==i[1]?i[1]:{},e.abrupt("return",new p.a(function(e,t){var i=a.userId,s=a.token,c=new FormData;if(c.append("res",o.res),c.append("user_id",i),c.append("token",s),r.groupId)c.append("group_id",r.groupId);else{var u,p=a.curSession.split("-");u=p[0]==a.userId?p[1]:p[0],c.append("to_user",u)}var d=r.groupId?"group/sendFile":"person/sendFile";W()({url:[m["a"].host,d].join(""),method:"post",data:c,headers:{"Content-Type":"multipart/form-data"}}).then(function(t){var i=t.data;if(0===i.code){if(o.createTime){var s=o.createTime;i.data.content=Object(f["i"])(i.data.content);var c=r.chatList;c.forEach(function(e){e.createTime===s&&(e.res=void 0,e.content=i.data.content,e.hash=i.data.hash,e.loading=!1,e.fail=!1,e.ext_info||(e.ext_info={}),e.ext_info.cover_url=i.data.ext_info&&i.data.ext_info.cover_url)})}else n("updateMembers",i.data.userMap),i.data.content=Object(f["i"])(i.data.content),n("addChatItem",i.data);n("setHash",{endHash:i.data.hash}),n("updateSessionLastMsgNoDecode",S()(i.data,{group_id:r.groupId||a.curSession})),e(i.data)}else o.createTime&&Object(f["h"])(r,o.createTime)}).catch(function(e){o.createTime&&Object(f["h"])(r,o.createTime),t(e)})}));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),doSendPrivateMsg:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.isPrivate=!0,V.commonDoSendMsg(e,t)},initSocket:function(e){var t=e.commit,n=e.state,r=e.rootState,a=e.rootGetters,o=e.dispatch;arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.WebSocket){var i="".concat(Object(g["c"])(),"/?user_id=").concat(r.userId,"&token=").concat(r.token);Y&&(Y.destroy(),Y=null),Y=new J["a"](i,{autoConnect:!0,reconnection:!0,reconnectionDelay:5e3,keepAliveContent:c()({act:"alive",player:name})}),Y.on("open",function(e){}),Y.on("message",function(e){var i=JSON.parse(e),s=i.channel,c=i.data,u=a.muteList;if(s.match("chat:group")){var p=u.some(function(e){return e.session_id==c.group_id});if("msg"===c.type&&(r.curSession==c.group_id&&(o("getNewMsg",{newMsg:!0}),c.from!=r.userId&&t("addUnreadNums")),p||f["w"].showNotification(c)),c.type,c.type,c.type,"repeal"===c.type&&(t("repealChatItem",c),c.msg_type=-1,t("updateSessionLastmsg",c)),"block"===c.type&&t("updateGroupBlockList",{type:"add",id:c.to}),"unblock"===c.type&&t("updateGroupBlockList",{type:"delete",id:c.to}),"leave"===c.type&&c.group_id==n.groupId){if(c.user_info.user_id==r.userId)return;c.user_id==r.userId?o("getGroupInfo"):t("updateMembersArray",{type:"del",userInfo:c.user_info})}if("join"===c.type&&c.group_id==n.groupId){if(c.user_info.user_id==r.userId)return;c.joinMsg=(c.user_info.nick_name||c.user_info.name)+"加入群组",t("updateMembers",Object(F["a"])({},c.user_info.user_id,c.user_info)),t("updateMembersArray",{type:"add",userInfo:c.user_info})}"pin_msg"===c.type&&c.group_id==n.groupId&&t("updateGroupPinMsg",c.pinMsg),"unpin_msg"===c.type&&c.group_id==n.groupId&&t("updateGroupPinMsg",null),"new_redpack"===c.type&&r.curSession==c.group_id&&(t("addPacketItem",c),t("updateSessionLastmsg",c)),"grab_redpack"===c.type&&r.curSession==c.group_id&&(c.from!=r.userId&&c.to!=r.userId||(t("addPacketTip",c),t("updateSessionLastmsg",c)))}if(s.match("chat:person")){if(!r.curSession)return;var d=+c.to>+c.from?"".concat(c.from,"-").concat(c.to):"".concat(c.to,"-").concat(c.from),l=u.some(function(e){return e.session_id==d});if("msg"===c.type&&(r.curSession==d&&(o("getPrivateNewMsg"),c.from!=r.userId&&t("addUnreadNums")),l||f["w"].showNotification(c)),"repeal"===c.type){t("repealChatItem",c);var h=c.from>c.to?"".concat(c.to,"-").concat(c.from):"".concat(c.from,"-").concat(c.to);c.group_id=h,c.msg_type=-1,t("updateSessionLastmsg",c)}"new_redpack"===c.type&&t("addPacketItem",c),"grab_redpack"===c.type&&a.otherUserId==c.from&&(c.from!=r.userId&&c.to!=r.userId||t("addPacketTip",c)),"join_group"===c.type&&(t("updateMembers",Object(F["a"])({},r.userInfo.user_id,r.userInfo)),t("updateMembersArray",{type:"add",userInfo:r.userInfo})),"leave_group"===c.type&&(t("updateMembersArray",{type:"del",userInfo:r.userInfo}),o("getGroupInfo"))}var g=5==c.msg_type&&"leave_group"==c.ext_info.event_type;if(!g&&("msg"===c.type||"new_redpack"===c.type)){var v,b=r.chat.sessionList;v=c.group_id?c.group_id:+c.to>+c.from?"".concat(c.from,"-").concat(c.to):"".concat(c.to,"-").concat(c.from);var k=b.some(function(e){return e.session_id==v}),w={session_id:v,cont:Object(f["i"])(c.content),unread:r.userId==c.from?0:1,update_time_int:c.timestamp,timestamp:c.timestamp};k||(c.group_id?m["a"].group.getGroupInfo({group_id:c.group_id}).then(function(e){var n=e.data,r=n.data.group,a={cover_photo:r.cover_photo,is_group:"1",is_auth:r.is_auth,name:r.group_title};t("addSessionItem",S()(a,w))}):m["a"].user.getOtherInfo({target_id:r.userId===c.from?c.to:c.from}).then(function(e){var n=e.data,r={cover_photo:n.data.cover_photo,is_group:"0",name:n.data.nick_name};t("addSessionItem",S()(r,w))})),c.from!=r.userId&&t("setSessionItemUnread",S()({curSession:r.curSession},w)),t("updateSessionLastmsg",S()(c,{sessionId:v}))}})}else console.error("Error: WebSocket is not supported .")},doRepealGroupMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,t.commit,n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].group.repealGroupMsg({group_id:n.groupId,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));function t(t){return e.apply(this,arguments)}return t}(),doBlockUser:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].group.blockUser({group_id:n.groupId,block_id:r.id});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));function t(t){return e.apply(this,arguments)}return t}(),doUnBlockUser:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].group.unblockUser({group_id:n.groupId,block_id:r.id});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));function t(t){return e.apply(this,arguments)}return t}(),doPinMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].group.pinMsg({group_id:n.groupId,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));function t(t){return e.apply(this,arguments)}return t}(),doUnpinMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].group.unpinMsg({group_id:n.groupId,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));function t(t){return e.apply(this,arguments)}return t}(),joinGroup:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=t.commit,a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,m["a"].group.joinGroup({group_id:n.groupId});case 5:r("updateJoin",!0),r("changeHotGroupStatus",{groupId:n.groupId,isJoin:1}),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](2);case 11:case"end":return e.stop()}},e,this,[[2,9]])}));function t(t){return e.apply(this,arguments)}return t}()},X=V,Q=new K["a"],Z={initGroup:function(e,t){e.userId=t.userId,e.groupId=t.groupId,e.useCache=t.useCache},initState:function(e,t){var n=_();for(var r in n){if("userId"==r||"userInfo"==r)break;e[r]=n[r]}},setGroupInfo:function(e,t){for(var n in t)"pinMsg"==n?(Object(f["k"])(t.pinMsg,e.userId),e.pinMsg=t.pinMsg||{}):"members"==n?e.members=S()(t.members,e.userMap):e[n]=t[n]},setGroupUserInfo:function(e,t){e.userInfo=t,e.userId=t.user_id},addHistoryList:function(e,t){if(t.length){Object(f["c"])(t),e.lastMsgUid=0;var n=G.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=n.concat(e.chatList)}},clearChatList:function(e){e.chatList=[],e.pinMsg={},e.groupId=null,e.lastMsgUid=0},addPinChatItem:function(e,t){var n={name:t?t.nick_name:"unknown",content:t.content,userId:t.userId,timestamp:t.timestamp,avatar:t?t.cover_photo:"",hash:t.hash,type:t.userId==e.userId?"me":"you",msg_type:t.msg_type,loading:!1,res:t.res,joinMsg:"",fail:!1,isShowFullInfo:!0};e.chatList.splice(0,0,n)},addChatItem:function(e,t){var n=!!t.newMsg,r=!!t.fromdb,a=e.chatList,o=e.chatList.length;if(!t.group_id||t.group_id==e.groupId){if(t.list&&(t=t.list),o>0&&(e.lastMsgUid=a[o-1].userId),t&&t.length>0){Object(f["c"])(t),r&&(e.atList=[]),n&&!r&&t.forEach(function(t){e.userInfo&&Object(f["e"])(t.content,e.userInfo.user_name)&&e.atList.push(t)});var i=G.a.differenceBy(t,a,"hash")||[];a=a.concat(i)}else{var s=Object(f["r"])("lastShowMsgUid")||0,c=e.members[t.from]||t.user_info,u={name:c?c.nick_name:"unknown",content:t.content,userId:t.from,timestamp:t.timestamp,avatar:c?c.cover_photo:"",hash:t.hash,type:t.from==e.userId?"me":"you",msg_type:t.msg_type,loading:Boolean(t.loading),res:t.res,joinMsg:t.joinMsg,fail:!1,isShowFullInfo:t.from!=s};s=5==t.msg_type?0:t.from,Object(f["z"])("lastShowMsgUid",s),t.createTime&&(u.createTime=t.createTime),Object(f["d"])(u,a),Object(f["b"])(u);var p=a.findIndex(function(e){return u.hash&&e.hash===u.hash});p<0&&a.push(u)}e.chatList=a}},addPacketItem:function(e,t){var n=Object(f["r"])("lastShowMsgUid")||0,r={name:e.members[t.from]?e.members[t.from].nick_name:"unknown",timestamp:t.timestamp,avatar:e.members[t.from]?e.members[t.from].cover_photo:"",userId:t.from,msg_type:"new_redpack"===t.type?4:5,content:JSON.parse(Object(f["i"])(t.content)),type:t.from==e.userId?"me":"you",ext:{grabbed:0,redpack_status:0},hash:t.hash,isShowFullInfo:t.from!=n};t.from!=n&&(n=t.from),Object(f["z"])("lastShowMsgUid",n),Object(f["d"])(r,e.chatList),e.chatList.push(r),e.endHash=t.hash},addPacketTip:function(e,t){var n={content:{trxId:t.content.redpack_trx_id,title:t.content.title},ext:{grabbed:1,redpack_status:0},avatar:e.members[t.from]?e.members[t.from].cover_photo:"",name:e.members[t.from]?e.members[t.from].nick_name:"unknown",from:t.from,to:t.to,redPackTip:!0};e.chatList.push(n)},unpdatePacketItem:function(e,t){var n=t.type,a=t.trxId,o=t.data,i=e.chatList,s=i.findIndex(function(e){return 4==e.msg_type&&e.content.trxId==a}),c=i[s];c.ext[n]=o,r["default"].set(e.chatList,s,c),Q.updatePackInfo(c.hash,n,o)},reSendChatItem:function(e,t){var n=e.chatList;n.forEach(function(e){e.createTime==t.createTime&&(e.loading=!0,e.fail=!1)})},removeAtListLast:function(e){e.atList.pop()},clearAtList:function(e){e.atList=[]},repealChatItem:function(e,t){for(var n=e.chatList,a=n.length-1;a>=0;a--){var o=n[a];o.hash===t.hash&&(r["default"].set(o,"repealMsg",!0),r["default"].set(o,"from",t.from))}Q.removeMsg(t["session_id"],t.hash)},deleteChatItem:function(e,t){var n=e.chatList.findIndex(function(e){return e.hash===t});e.chatList.splice(n,n)},addUnreadNums:function(e){e.unreadNums++},resetUnreadNums:function(e){e.unreadNums=0},setHash:function(e,t){t.startHash&&(e.startHash=t.startHash),t.endHash&&(e.endHash=t.endHash)},clearHash:function(e,t){e.endHash=null},updatePin:function(e,t){e.sessionInfo.is_pin=t},updateMute:function(e,t){e.sessionInfo.is_mute=t},updateJoin:function(e,t){e.isJoin=t},updateGroup:function(e,t){var n=t.key,r=t.data;e[n]=r},updateMembers:function(e,t){e.members=S()({},t,e.members)},updateMembersArray:function(e,t){var n=t.type,r=t.userInfo;if("add"==n){var a=e.membersArray.some(function(e){return r.user_id==e.user_id});a||(++e.membersNum,e.membersArray.push(r))}else{var o=e.membersArray.findIndex(function(e){return e.user_id==r.user_id});o>-1&&(--e.membersNum,e.membersArray.splice(o,1))}},updateMemberInfo:function(e,t){var n=t.userId,a=t.nickName,o=t.imageUrl;for(var i in e.members)if(i==n){var s=e.members[i];a&&(s["name"]=a),o&&(s["cover_photo"]=o,e.isRefreshImg=!0),r["default"].set(e.members,i,s)}},updateChatInputFocus:function(e,t){e.chatInputFocus=t},updateGroupBlockList:function(e,t){var n=t.type,r=t.id;if("delete"===n){var a=e.blockList.findIndex(function(e){return e==r});-1!==a&&e.blockList.splice(a,1)}else"add"===n&&e.blockList.push(r)},updateGroupPinMsg:function(e,t){t?(t.visible=!0,Object(f["k"])(t,e.userId),e.pinMsg=t):e.pinMsg={}},updateIsNewAt:function(e,t){e.isNewAt=t.isNewAt,e.isNewAtFound=t.isNewAtFound},updateGroupSearchList:function(e,t){e.searchList=t},initGroupData:function(e){var t=_();for(var n in e)t.hasOwnProperty(n)&&(e[n]=t[n])},updataChatItem:function(e,t){var n=e.chatList[t.index];n.hash=t.hash,n.loading=!1,n.isCommfirm=t.isCommfirm},setLastMsgUid:function(e,t){e.lastMsgUid=t},setGroupMembers:function(e,t){e.members=t},setIsRefreshImg:function(e,t){e.isRefreshImg=t}},ee=Z,te={state:_(),actions:X,mutations:ee},ne=te;r["default"].use(a["a"]);var re=w(),ae={isPrivate:function(e){return/-/g.test(e.curSession)},otherUserId:function(e){if(e.curSession)return e.curSession.indexOf("-")>-1?e.curSession.replace("-","").replace(e.userId,""):""},muteList:function(e){return e.chat.sessionList.filter(function(e){return 1==e.is_mute})}};t["a"]=new a["a"].Store({state:re,mutations:o,actions:k,getters:ae,modules:{chat:H,group:ne}})},2:function(e,t){},"21f7":function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=null;function o(e,t){return i.apply(this,arguments)}function i(){return i=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-1a710e5c").then(n.bind(null,"2ba8"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),i.apply(this,arguments)}var s={install:function(e){var t;e.prototype.$showImgPreview=function(){var n=Object(r["a"])(regeneratorRuntime.mark(function n(r){var i;return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,o(e,a);case 2:i=n.sent,t&&(document.body.removeChild(t.$el),t=null),t=new i({el:document.createElement("div"),data:function(){return{visible:!0,imgUrl:r}}}),document.body.appendChild(t.$el);case 6:case"end":return n.stop()}},n,this)}));return function(e){return n.apply(this,arguments)}}()}};t["a"]=s},"24bc":function(e,t,n){},2593:function(e,t,n){"use strict";n("dcfb"),n("b5aa");var r=n("4457"),a=n("a585"),o=n("26cb"),i=n("fd86"),s=n("3d0b"),c=n("d26d"),u=n("411a"),p=function(e){function t(){return Object(a["a"])(this,t),Object(i["a"])(this,Object(s["a"])(t).call(this,"user"))}return Object(c["a"])(t,e),Object(o["a"])(t,[{key:"getUserMap",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(n=e.sent,r={},n){e.next=6;break}return e.abrupt("return",r);case 6:e.t0=regeneratorRuntime.keys(t);case 7:if((e.t1=e.t0()).done){e.next=15;break}return a=e.t1.value,o=t[a],e.next=12,n.get(o);case 12:r[o]=e.sent,e.next=7;break;case 15:return e.abrupt("return",r);case 16:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()}]),t}(u["a"]);t["a"]=p},3:function(e,t){},"33f8":function(e,t,n){"use strict";n.d(t,"s",function(){return v}),n.d(t,"A",function(){return b}),n.d(t,"f",function(){return k}),n.d(t,"n",function(){return w}),n.d(t,"q",function(){return y}),n.d(t,"a",function(){return _}),n.d(t,"p",function(){return x}),n.d(t,"g",function(){return I}),n.d(t,"i",function(){return L}),n.d(t,"c",function(){return M}),n.d(t,"d",function(){return T}),n.d(t,"t",function(){return C}),n.d(t,"o",function(){return j}),n.d(t,"b",function(){return A}),n.d(t,"k",function(){return P}),n.d(t,"h",function(){return N}),n.d(t,"e",function(){return E}),n.d(t,"y",function(){return G}),n.d(t,"w",function(){return U}),n.d(t,"j",function(){return q}),n.d(t,"B",function(){return B}),n.d(t,"m",function(){return D}),n.d(t,"u",function(){return H}),n.d(t,"l",function(){return F}),n.d(t,"x",function(){return J}),n.d(t,"r",function(){return z}),n.d(t,"z",function(){return W}),n.d(t,"v",function(){return K});var r=n("badb"),a=n.n(r),o=(n("dc12"),n("c7d9"),n("4694"),n("0649")),i=n.n(o),s=(n("dcfb"),n("0adb"),n("8e5d"),n("a700")),c=n.n(s),u=(n("c9db"),n("ad09"),n("514e")),p=n.n(u),d=n("7199"),l=n.n(d),h=n("4c07"),m=n("4941"),f=18e4,g="dqWt6twz6JyEy3EZ";function v(){return/^test|\.webdev2\./.test(window.location.host)||""!==window.location.port}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";p.a.confirm(e,t,{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}})}function k(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new c.a(function(t,n){p.a.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t()}).catch(function(){})})}function w(){var e=(navigator.language||navigator.browserLanguage).toLowerCase(),t="zh";return t=e.indexOf("en")>-1?"en":"zh",t}function y(e){var t=new RegExp("[?&]"+e+"=([^&#?]*)(&|#|$)"),n=window.location.href.match(t);return n?n[1]:null}var _={setCookie:function(e,t){var n=7,r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),r.setTime(r.getTime()+6e4),"8080"===window.location.port||/^test-|\.webdev2\./.test(window.location.host)?document.cookie=e+"="+escape(t)+";expires="+r.toGMTString():document.cookie=e+"="+escape(t)+";domain=.mee.chat;path=/;expires="+r.toGMTString()},getCookie:function(e){var t=new RegExp("(^| )"+e+"=([^;]*)(;|$)"),n=document.cookie.match(t);return n?unescape(n[2]):null},delCookie:function(e){var t=e+"=;domain=.mee.chat;path=/";t+=";expires="+new Date(0).toGMTString(),document.cookie=t;var n=e+"=;path=/";n+=";expires="+new Date(0).toGMTString(),document.cookie=n}};function x(){var e,t=document.documentElement.clientHeight,n=document.documentElement.clientWidth,r=61,a=181;return t<600&&(e=600-r-a),e=t<800||n<1e3?t-r-a:.8*t-r-a,e}function S(e,t){for(var n,r=[],a=0,o="",i=0;i<256;i++)r[i]=i;for(i=0;i<256;i++)a=(a+r[i]+t.charCodeAt(i%t.length))%256,n=r[i],r[i]=r[a],r[a]=n;i=0,a=0;for(var s=0;s<e.length;s++)i=(i+1)%256,a=(a+r[i])%256,n=r[i],r[i]=r[a],r[a]=n,o+=String.fromCharCode(e.charCodeAt(s)^r[(r[i]+r[a])%256]);return o}function I(e){var t;try{t=btoa(S(encodeURIComponent(e),g))}catch(n){return e}return t}function L(e){var t;try{t=decodeURIComponent(S(atob(e),g))}catch(n){return e}return t}var O=new RegExp("(https?|ftp|file)://[-a-zA-Z0-9/-_.?#!+%&]+");function M(e){var t=null;e.forEach(function(e){e.timeMsg=null!==t&&i()(e.timestamp)-t>f,t=i()(e.timestamp),A(e)})}function T(e,t){if(0===t.length)e.timeMsg=!0;else{var n=i()(t[t.length-1].timestamp);e.timeMsg=i()(e.timestamp)-n>f}}function C(){return/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)}function j(){return location.pathname.indexOf("mini")>-1?"mini":C()?"h5":"pc"}function R(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};return e.replace(/[&<>'"]/g,function(e){return t[e]})}function A(e){0==e.msg_type&&(e.content=R(e.content),e.content.match(O)&&(e.content=e.content.replace(O,function(e){return'<a href="'.concat(e,'" class="link text" target="_blank">').concat(e,"</a>")})),e.content=h["a"].parse(e.content,{callback:function(e,t){return"https://w2.meechat.me/emoji/"+e+".svg"}}))}function P(e,t){e.name=e.nick_name,e.content=L(e.msg),e.type=e.from==t?"me":"you",e.avatar=e.cover_photo||"",e.userId=e.from}function N(e,t){e.chatList.forEach(function(e){e.createTime==t&&(e.fail=!0,e.loading=!1)})}function E(e,t){if(!t)return!1;var n=new RegExp("@".concat(t));return n.test(e)}function $(e,t){var n=Math.abs(t-e.scrollTop),r=n>500?1e3:2*n,a=new l.a.Tween(e).to({scrollTop:t},r).easing(l.a.Easing.Quadratic.Out);return a.start()}function G(e,t,n,r){$(e,t).onComplete(function(){n.classList.toggle("active"),r&&r()}),setTimeout(function(){n.classList.toggle("active")},3e3)}var U={tabTimer:null,askPermission:function(){return new c.a(function(e,t){"Notification"in window?"granted"===Notification.permission?e():"default "===Notification.permission&&Notification.requestPermission(function(n){"granted"===n?e():t(new Error)}):t(new Error("This browser does not support desktop notification"))})},showNotification:function(e){if(1!=this.getGlobalNotice()){var t=localStorage.getItem("user_id");t!=e.from&&this.askPermission().then(function(){var t,n=new Notification(e.name,{body:"你收到了一条消息",icon:"/dist/img/icons/meechat.png"});if(e.group_id)t="/group/".concat(e.group_id);else{var r=+e.to>+e.from?"".concat(e.from,"-").concat(e.to):"".concat(e.to,"-").concat(e.from);t="/pm/".concat(r)}n.onclick=function(){window.$router.push({path:t}),n.close(),window.focus()},setTimeout(function(){n.close()},3500)})}},changeTitle:function(e){var t=e?"".concat(e,"条新消息 - MeeChat"):"MeeChat";document.title=t,e&&(e=e>99?"99+":e,this.tabTimer&&clearTimeout(this.tabTimer))},getGlobalNotice:function(){if(window.Notification&&"granted"===Notification.permission){var e=z("mute");return e||0}return 1},setGlobalNotice:function(e,t){0==e?Notification.requestPermission(function(e){var n="granted"===e?0:1;t.openGlobalNotice=n,W("mute",n)}):(t.openGlobalNotice=e,W("mute",e))}};function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if(!e)return"";var r=Object(m["a"])().subtract(1,"days").format("YYYY-MM-DD"),a=Object(m["a"])(1*e),o=a.format("YYYY-MM-DD");switch(t){case 1:return o<r?a.format("MM-DD"):r==o?n.$t("chat.yesterday"):a.format("HH:mm");case 2:return o<r?a.format("MM-DD HH:mm"):r==o?n.$t("chat.yesterday")+" ".concat(a.format("HH:mm")):a.format("HH:mm")}}function B(){var e=encodeURIComponent(location.hash.replace("#",""));location.replace("".concat(location.origin+location.pathname,"#/login?from=").concat(e))}function D(e,t){window.URL=window.URL||window.webkitURL;var n=new XMLHttpRequest;n.open("get",e,!0),n.responseType="blob",n.onload=function(){if(200==this.status){var e=this.response,n=new FileReader;n.onloadend=function(e){var n=e.target.result;t&&t(n)},n.readAsDataURL(e)}},n.send()}function H(e){var t=e.wrap,n=e.imageArr,r=e.derection,a=void 0===r?"down":r;if(n&&!(n.length<=0)){var o=n.length,i=t.scrollTop,s=t.clientHeight;switch(a){case"down":for(var c=0;c<o;c++){var u=n[c],p=u.getAttribute("originurl"),d=u.getAttribute("src");if(!(u.offsetTop-i<=s))return c>=1?c-1:0;p&&p!=d&&u.setAttribute("src",p)}break;case"up":for(var l=function(e){var t=n[e],r=t.getAttribute("originurl"),a=t.getAttribute("src"),o=t.getBoundingClientRect().top;if(o>=-100&&o<s+300&&r&&r!=a)if(t.getAttribute("class").match("img-msg")){if(!/^data:image/.test(r)){var i=new Image;i.src=r,i.onload=function(){t.nextSibling.classList.add("is-hide"),t.setAttribute("src",r)},i.onerror=function(){t.nextSibling.classList.add("is-error")}}}else t.setAttribute("src",r)},h=o-1;h>=0;h--)l(h);break}}}function F(e,t){if(e+="",e.match("-")){var n=0;return e.split("-").forEach(function(e){e!==t&&(n=e%9)}),n+""}return e%9+""}function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:600,r=(window.screen.availHeight-30-n)/2,a=(window.screen.availWidth-10-t)/2,o=window.open(e,"_blank","height="+n+", width="+t+", top="+r+", left="+a+", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");return o}function z(e){var t=localStorage.getItem("userOpt")||"{}";return t=JSON.parse(t),t[e]||""}function W(e,t){var n=localStorage.getItem("userOpt")||"{}";n=JSON.parse(n),n[e]=t,localStorage.setItem("userOpt",a()(n))}function K(){top!=self&&C()&&window.postMessager.send({action:"meechat:inputBlur"})}},3488:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask",on:{click:function(t){e.visible=!1}}}),n("div",{staticClass:"packet-send-wrap"},["h5"==e.meechatType?n("back-bar",{staticClass:"redpacket-backbar",attrs:{title:e.$t("redPacket.title")},on:{onBack:e.hidePopup}}):e._e(),n("div",{staticClass:"send-wrap",class:[{"is-private":e.isPrivate}]},[n("i",{staticClass:"el-icon-close",on:{click:e.hidePopup}}),n("i",{staticClass:"el-icon-question",on:{click:function(t){e.helpShow=!0}}}),n("h3",{staticClass:"title"},[e._v(e._s(e.$t("redPacket.title")))]),n("p",{staticClass:"redpacket-tips",class:{hidden:!e.tips}},[e._v(e._s(e.tips))]),n("div",{staticClass:"main-box"},[n("div",{staticClass:"input-item"},[n("span",{staticClass:"text"},[e._v("\n "+e._s(e.$t("redPacket.totalAmount"))+"\n ")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.money,expression:"money",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"0.00"},domProps:{value:e.money},on:{blur:[e.inputBlur,function(t){return e.$forceUpdate()}],input:function(t){t.target.composing||(e.money=e._n(t.target.value))}}}),n("div",{staticClass:"unit"},[n("div",{staticClass:"cur-unit has-arrow"},[e._v(e._s(e.symbol))]),n("div",{staticClass:"code-menu"},["eos"==e.loginType?n("div",{class:["code-item",{disabled:"eos"!=e.loginType}],on:{click:function(t){return e.changeSymbol("EOS")}}},[e._v("EOS")]):e._e(),n("div",{class:["code-item",{disabled:"meetone"!=e.loginType}],on:{click:function(t){return e.changeSymbol("MEETONE")}}},[e._v("MEETONE")]),e.group.eosInfo?n("div",{staticClass:"code-item",on:{click:function(t){return e.changeSymbol(e.group.eosInfo.token)}}},[e._v(e._s(e.group.eosInfo.token))]):e._e()])])])]),e.isPrivate?e._e():n("p",{staticClass:"input-tips"},[e._v("\n "+e._s(e.$t("redPacket.tip1"))+"\n ")]),e.isPrivate?e._e():n("div",{staticClass:"input-item pack-num-input"},[n("span",{staticClass:"text"},[e._v(e._s(e.$t("redPacket.num")))]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.packetNum,expression:"packetNum",modifiers:{number:!0}}],attrs:{type:"number",placeholder:e.$t("redPacket.placeholder1")},domProps:{value:e.packetNum},on:{blur:[e.inputBlur,function(t){return e.$forceUpdate()}],input:function(t){t.target.composing||(e.packetNum=e._n(t.target.value))}}}),n("div",{staticClass:"unit"},[e._v(e._s(e.$t("redPacket.unit")))])])]),e.isPrivate?e._e():n("p",{staticClass:"group-user-num"},[e._v("\n "+e._s(e.$t("redPacket.tip2",{num:e.group.membersNum}))+"\n ")]),n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.word,expression:"word"}],staticClass:"words",attrs:{placeholder:e.$t("redPacket.memo")},domProps:{value:e.word},on:{input:function(t){t.target.composing||(e.word=t.target.value)}}}),n("div",{staticClass:"sum"},[e._v("\n "+e._s(e.amountSum)+" "),n("span",[e._v(e._s(e.symbol))])]),n("button",{staticClass:"send-btn",class:{"is-disable":!e.amountSum||!e.packetNum,loading:e.isLoading},on:{click:e.sendPacket}},[e.isLoading?n("i",{staticClass:"el-icon-loading"}):e._e(),e._v(" "+e._s(e.$t("redPacket.sendBtn"))+"\n ")])]),n("p",{staticClass:"bot"},[e._v(e._s(e.$t("redPacket.tip3")))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.helpShow,expression:"helpShow"}],staticClass:"help-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.helpShow=!1}}}),n("h3",{staticClass:"title"},[e._v(e._s(e.$t("redPacket.helpTitle")))]),n("div",{staticClass:"content"},[n("div",{staticClass:"item"},[e._v("\n "+e._s(e.$t("redPacket.helpRule1"))+"\n ")]),n("div",{staticClass:"item"},[e._v("\n "+e._s(e.$t("redPacket.helpRule2"))+"\n ")]),n("div",{staticClass:"item"},[e._v("\n "+e._s(e.$t("redPacket.helpRule3"))+"\n ")])])])],1)]):e._e()])},a=[],o=n("badb"),i=n.n(o),s=(n("46b5"),n("8e5d"),n("4694"),n("dc12"),n("024c")),c=(n("b5aa"),n("4457")),u=(n("3b70"),n("ad09"),n("dfe5")),p=n.n(u),d=n("bd31"),l=n("52c1"),h=n("d690"),m=n.n(h),f=n("b33c"),g=n("33f8"),v=n("1848"),b={name:"packetSend",data:function(){var e=Object(g["r"])("loginType")||"eos";return{visible:!0,helpShow:!1,money:1,packetNum:1,word:this.$t("redPacket.memo"),tips:"",loginType:e,symbol:e.toUpperCase(),isLoading:!1,isGameToken:!1,meechatType:Object(g["o"])()}},components:{backBar:v["a"]},computed:Object(d["a"])({},Object(l["e"])(["account","group","curSession","scatter","userInfo"]),Object(l["c"])(["isPrivate"]),{amountSum:function(){return this.money},minSum:function(){return this.isGameToken?m.a.divide(this.group.eosInfo.min_amount,1e4):.1},maxSum:function(){return this.isGameToken?m.a.divide(this.group.eosInfo.max_amount,1e4):200}}),watch:{money:function(e){e>this.maxSum&&(this.money=this.maxSum,this.showTip("".concat(this.$t("redPacket.maxMoneyTip")," ").concat(this.maxSum," ").concat(this.symbol))),e&&e/this.packetNum<.01&&(this.money=m.a.times(this.packetNum,.01),this.showTip("".concat(this.$t("redPacket.singleMinMoneyTip")," 0.01 ").concat(this.symbol)))},packetNum:function(e,t){this.money&&m.a.divide(this.money,e)<.01&&(this.packetNum=t,this.showTip("".concat(this.$t("redPacket.singleMinMoneyTip")," 0.01 ").concat(this.symbol))),e>100&&(this.packetNum=100,this.showTip("".concat(this.$t("redPacket.maxNumberTip")," 100 个")))}},methods:{inputBlur:function(){Object(g["v"])()},changeSymbol:function(e){this.symbol=e,this.isGameToken=this.group.eosInfo&&this.group.eosInfo.token==e},hidePopup:function(){this.visible=!1},showTip:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;this.tips=e,setTimeout(function(){t.tips=""},n)},checkCanSend:function(){var e=this.loginType,t=Object(g["r"])("eosType")||"eos",n=this.symbol.toLowerCase();if("eos"!=e&&"meetone"!=e)return p()({message:this.$t("redPacket.sendForEosTips"),type:"error"}),!1;if("eos"==n||"meetone"==n){var r=this.userInfo.binds.some(function(e){return e.type==n&&e.account});if(!r)return p()({message:this.$t("redPacket.bindForEosTips",{type:n}),type:"error"}),!1}return e==t||(p()({message:"重新检查下scatter身份",type:"error"}),!1)},sendPacket:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a,o,c,u,d,l,h,m=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.checkCanSend()){e.next=2;break}return e.abrupt("return");case 2:if(!(this.money<this.minSum)){e.next=5;break}return this.showTip("".concat(this.$t("redPacket.minMoneyTip")," ").concat(this.minSum," ").concat(this.symbol)),e.abrupt("return",!1);case 5:return this.isLoading=!0,t=this.amountSum.toFixed(4)+" ".concat(this.symbol),n="EOS"==this.symbol?"meechatadmin":"meechat.m",r={type:"redpack",num:this.packetNum,memo:this.word,sid:this.isPrivate?this.curSession:this.group.groupId},a=this.isGameToken?this.group.eosInfo.token_code:"eosio.token",o=this.symbol,e.next=13,f["a"].getCurrencyBalance(a,this.account.name,o);case 13:if(c=e.sent,u=Object(s["a"])(c,1),d=u[0],!d){e.next=25;break}if(l=this.isGameToken?d.replace(new RegExp("\\s"+o),""):d.replace(/\sEOS/,""),!(this.amountSum>Number(l))){e.next=22;break}return p()({message:this.$t("public.noMoney"),type:"error"}),this.isLoading=!1,e.abrupt("return");case 22:this.isGameToken?(h=this.group.eosInfo.token_code,f["a"].doSymbolTransfer(this.account.name,"toAccount",t,i()(r),this.account.authority,h).then(function(e){m.hidePopup()}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;p()({message:n[0].message,type:"error"})}}).finally(function(){m.isLoading=!1})):f["a"].transfer(this.account.name,n,t,i()(r),this.account.authority).then(function(e){m.hidePopup()}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;p()({message:n[0].message,type:"error"})}}).finally(function(){m.isLoading=!1}),e.next=27;break;case 25:p()({message:this.$t("public.noMoney"),type:"error"}),this.isLoading=!1;case 27:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},mounted:function(){}},k=b,w=(n("088b"),n("fc05")),y=Object(w["a"])(k,r,a,!1,null,null,null),_=y.exports,x=n("6103");_.install=function(e,t){var n,r=e.extend(_);e.prototype.$packetSend=function(){n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:x["a"],data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=_},3537:function(e,t,n){"use strict";var r=n("8973"),a=r["default"].directive("focus",{inserted:function(e){setTimeout(function(){e.focus()})}});t["a"]={focus:a}},3729:function(e,t,n){},4:function(e,t){},"411a":function(e,t,n){"use strict";n("dcfb");var r=n("ab01"),a=n.n(r),o=(n("b5aa"),n("4457")),i=n("a585"),s=n("26cb"),c=n("5f19"),u=n("d2eb"),p=null,d=function(){function e(){Object(i["a"])(this,e)}return Object(s["a"])(e,null,[{key:"initDb",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(n=localStorage.getItem("user_id"),p&&e.curDBUserId==n){t.next=6;break}return e.curDBUserId!=n&&(e.curDBUserId=n),t.next=5,l();case 5:p=t.sent;case 6:return t.abrupt("return",p);case 7:case"end":return t.stop()}},t,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"init",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.initDb();case 2:if(!p){t.next=6;break}return t.abrupt("return",p.transaction(n,"readwrite").objectStore(n));case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}},t,this)}));function n(e){return t.apply(this,arguments)}return n}()}]),e}();function l(){return h.apply(this,arguments)}function h(){return h=Object(o["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t=d.curDBUserId,t){e.next=3;break}return e.abrupt("return",null);case 3:return n="database_".concat(t),r=3,e.next=7,Object(u["openDb"])(n,r,function(e){switch(console.log("oldVersion:".concat(e.oldVersion,", version:").concat(r)),e.oldVersion){case 0:var t=e.createObjectStore("message",{keyPath:"hash"});t.createIndex("group_id","group_id",{unique:!1}),t.createIndex("msg_num","msg_num",{unique:!1}),t.createIndex("create_time_int","create_time_int",{unique:!1});var n=e.createObjectStore("user",{keyPath:"user_id"});n.createIndex("user_name","user_name",{unique:!0}),n.createIndex("nick_name","nick_name",{unique:!1}),n.createIndex("is_admin","is_admin",{unique:!1}),n.createIndex("is_block","is_block",{unique:!1});case 1:var a=e.createObjectStore("session",{keyPath:"session_id"});a.createIndex("pin_time_int",["pin_time_int","update_time_int"],{unique:!1}),a.createIndex("is_pin","is_pin",{unique:!1}),a.createIndex("update_time_int","update_time_int",{unique:!1});case 2:t=e.transaction.objectStore("message"),t.deleteIndex("group_id"),t.createIndex("session_id",["session_id","create_time_int"],{unique:!1})}}).catch(function(e){console.error("initDb error:"+e.message)});case 7:return a=e.sent,e.abrupt("return",a);case 9:case"end":return e.stop()}},e,this)})),h.apply(this,arguments)}Object(c["a"])(d,"curDBUserId",localStorage.getItem("user_id"));var m=d,f=function(){function e(t){Object(i["a"])(this,e),this.tableName=t}return Object(s["a"])(e,[{key:"getObjTable",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",m.init(this.tableName));case 1:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"replaceObject",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:n.put(t);case 6:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"replaceObjects",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:for(r in t)n.put(t[r]);case 6:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"updateObject",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,o,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(r=e.sent,r){e.next=5;break}return e.abrupt("return");case 5:e.t0=regeneratorRuntime.keys(n);case 6:if((e.t1=e.t0()).done){e.next=22;break}if(o=e.t1.value,i=null,o!=r.keyPath){e.next=15;break}return e.next=12,r.get(n[o]);case 12:i=e.sent,e.next=18;break;case 15:return e.next=17,r.index(o).get(n[o]);case 17:i=e.sent;case 18:return i&&(i=a()(i,t),r.put(i)),e.abrupt("break",22);case 22:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}();t["a"]=f},"43e0":function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-6c13bb44").then(n.bind(null,"15fa"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c={install:function(e,t){var n;e.prototype.$showUserInfo=Object(r["a"])(regeneratorRuntime.mark(function r(){var s;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i(e,o);case 2:s=r.sent,n?n.visible=!0:(n=new s({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0}}}),document.body.appendChild(n.$el));case 4:case"end":return r.stop()}},r,this)}))}};t["a"]=c},"455d":function(e,t,n){"use strict";n("dc12");var r=n("34f3"),a=n("a700"),o=n.n(a),i=(n("3b70"),n("ad09"),n("dfe5")),s=n.n(i),c=(n("4694"),n("badb")),u=n.n(c),p=(n("61e5"),n("b5aa"),n("4457")),d=n("bd31"),l=n("5975"),h=n("33f8"),m=n("52c1"),f=n("6bec");function g(e){if(e)return v(e)}function v(e){for(var t in g.prototype)e[t]=g.prototype[t];return e}function b(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",n=arguments.length>1?arguments[1]:void 0;if(!(this instanceof b))return new b(t,n);t&&"object"===Object(r["a"])(t)&&(n=t,t=void 0),g(this),n=n||{},n.path=n.path||"/",this.opts=n,this.target=t,this.requestQueue={},window.addEventListener("message",function(t){e.msgHandler(t)},!1)}g.prototype.on=g.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},g.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},g.prototype.off=g.prototype.removeListener=g.prototype.removeAllListeners=g.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0===arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1===arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if(n=r[a],n===t||n.fn===t){r.splice(a,1);break}return this},g.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,a=n.length;r<a;++r)n[r].apply(this,t)}return this},g.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},g.prototype.hasListeners=function(e){return!!this.listeners(e).length},b.prototype.send=function(e,t){var n=this;return e.reqId=(new Date).getTime(),window.parent.postMessage(e,this.target),new o.a(function(r,a){n.on("res_".concat(e.reqId),function(e){e&&e.data&&e.data.response?r(e.data.response):a(e.data.error),t&&t(e)})})},b.prototype.msgHandler=function(e){var t=e.data.resId;t?this.emit("res_".concat(t),e):this.opts["callback"]&&this.opts["callback"](e.data)};var k=b;n.d(t,"a",function(){return y});var w=0,y={data:function(){return{curLoginType:"",winHandler:null,winTimer:null,meechatType:Object(h["o"])(),from:decodeURIComponent(Object(h["q"])("from"))}},computed:Object(d["a"])({},Object(m["e"])(["isLogining","account"])),methods:Object(d["a"])({},Object(m["d"])(["setLogining"]),Object(m["b"])(["getUserInfo","setScatter","setAccount","doScatterLogin","doContractLogin","doScatterLogout","initSocket"]),{checkLocalLogin:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.setLogining(!0),t=localStorage.getItem("user_id"),n=localStorage.getItem("token"),t&&n){e.next=6;break}return this.setLogining(!1),e.abrupt("return",!1);case 6:return e.next=8,l["a"].user.checkLocalLogin({user_id:t,token:n});case 8:if(r=e.sent,a=r.data,!a.data.is_login){e.next=24;break}if(this.curLoginType=Object(h["r"])("loginType")||"eos","eos"!=this.curLoginType&&"meetone"!=this.curLoginType||top!=self){e.next=18;break}return e.next=15,this.loginEosMeetoneCommon(this.curLoginType);case 15:this.setLogining(!1),e.next=21;break;case 18:this.$store.commit("setUserId",t),this.$store.commit("setToken",n),this.loginSuccCallBack();case 21:return e.abrupt("return",!0);case 24:return localStorage.clear(),this.setLogining(!1),e.abrupt("return",!1);case 27:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),getParentIdentity:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(self===top){e.next=13;break}return e.prev=1,e.next=4,this.postMessager.send({action:"meechat:getIdentity"});case 4:t=e.sent,n=t.accounts.find(function(e){return"eos"===e.blockchain}),localStorage.setItem("account",u()(n)),this.setAccount(n),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](1),this.showLoginBtn=!0;case 13:case"end":return e.stop()}},e,this,[[1,10]])}));function t(){return e.apply(this,arguments)}return t}(),loginEosParent:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.setLogining(!0),e.prev=1,e.next=4,this.getParentIdentity();case 4:if(this.account){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,this.doContractLogin();case 8:location.replace(location.href.replace("show=false","show=true")),this.showLoginBtn=!1,this.setLogining(!1),e.next=18;break;case 13:e.prev=13,e.t0=e["catch"](1),e.t0.type||(t=JSON.parse(e.t0),n=t.error.details,s()({message:n[0].message,type:"error"})),this.showLoginBtn=!0,this.setLogining(!1);case 18:case"end":return e.stop()}},e,this,[[1,13]])}));function t(){return e.apply(this,arguments)}return t}(),loginEos:function(){this.loginEosMeetoneCommon("eos")},loginMeetone:function(){this.loginEosMeetoneCommon("meetone")},loginEosMeetoneCommon:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.curLoginType=t,Object(h["z"])("eosType",this.curLoginType),e.abrupt("return",new o.a(function(e,t){n.setLogining(!0),f["a"].scatter.connect("MEE_CHAT").then(function(){var a=Object(p["a"])(regeneratorRuntime.mark(function a(o){var i;return regeneratorRuntime.wrap(function(a){while(1)switch(a.prev=a.next){case 0:if(!o){a.next=36;break}if(n.setScatter(f["a"].scatter),window.ScatterJS=null,1!=Object(h["r"])("isChangeIndentity")){a.next=7;break}return a.next=6,f["a"].scatter&&f["a"].scatter.forgetIdentity&&f["a"].scatter.forgetIdentity();case 6:Object(h["z"])("isChangeIndentity",0);case 7:return a.prev=7,a.next=10,n.doScatterLogin(n.$router);case 10:return"mini"==n.meechatType&&localStorage.setItem("account",u()(n.account)),a.prev=11,a.next=14,n.doContractLogin(2);case 14:n.loginSuccCallBack(),a.next=27;break;case 17:return a.prev=17,a.t0=a["catch"](11),t(a.t0),console.log(Object(r["a"])(a.t0),a.t0),i=a.t0,"string"==typeof a.t0&&(i=JSON.parse(a.t0)),"500"==i.code&&Object(h["A"])(a.t0.error&&a.t0.error.what),n.$store.commit("setAccount",""),a.next=27,f["a"].scatter&&f["a"].scatter.forgetIdentity&&f["a"].scatter.forgetIdentity();case 27:a.next=33;break;case 29:a.prev=29,a.t1=a["catch"](7),t(a.t1),"mini"==n.meechatType?n.showLoginBtn=!0:n.isLogining&&(n.$router.replace("/login"),n.$store.commit("chatAppLogin",!1));case 33:n.setLogining(!1),a.next=40;break;case 36:"mini"==n.meechatType?n.showLoginBtn=!0:n.isLogining&&n.$router.replace("/login"),n.isLogining&&!localStorage.getItem("user_id")&&Object(h["A"])(n.$t("login.installScatter"),"Scatter"),n.setAccount(""),n.setLogining(!1);case 40:e();case 41:case"end":return a.stop()}},a,this,[[7,29],[11,17]])}));return function(e){return a.apply(this,arguments)}}())}));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),loginSimpleWallet:function(){this.curLoginType="simplewallet";var e={protocol:"SimpleWallet",version:"1.0",dappName:"MeeChat",dappIcon:"https://static.meechat.me/cdn/mee.chat/dist/img/icons/meechat_icon.png",action:"login",uuID:Math.random(),loginUrl:location.origin+"/user/simplewallet"},t="simplewallet://eos.io?param="+u()(e);this.winHandler=Object(h["x"])(t),this.loginCheck(e.uuID,0)},loginTelegram:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.curLoginType="telegram",this.winHandler=Object(h["x"])(""),e.next=4,l["a"].user.tgCSRF({type:"login"});case 4:t=e.sent,n=t.data,this.winHandler.location.href=n.data.url,this.loginCheck(n.data.csrf_token);case 8:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),loginCheck:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,i,s,c,u=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(0!==n){e.next=4;break}clearTimeout(w),e.next=6;break;case 4:if(!(n>=60)){e.next=6;break}return e.abrupt("return",!1);case 6:if(r={},a=!1,i=!0,e.prev=9,"simplewallet"!=this.curLoginType){e.next=17;break}return e.next=13,l["a"].user.simplewalletCheck({uuID:t});case 13:r=e.sent,a=r.data&&1===r.data.result,e.next=23;break;case 17:if("telegram"!=this.curLoginType){e.next=23;break}return e.next=20,l["a"].user.tgLogin2({csrf_token:t});case 20:r=e.sent,a=r.data&&r.data.data&&r.data.data.status>0,i=null!=this.winHandler||r.data&&0==r.data.status;case 23:e.next=27;break;case 25:e.prev=25,e.t0=e["catch"](9);case 27:if(!a){e.next=39;break}return s=r.data.data.user_id,c=r.data.data.token,localStorage.setItem("user_id",s),localStorage.setItem("token",c),this.$store.commit("setUserId",s),this.$store.commit("setToken",c),this.loginSuccCallBack(),null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null),e.abrupt("return",o.a.resolve(r.data));case 39:i&&(w=setTimeout(function(){u.loginCheck(t,++n)},1e3));case 40:case"end":return e.stop()}},e,this,[[9,25]])}));function t(t,n){return e.apply(this,arguments)}return t}(),loginSuccCallBack:function(){var e=Object(p["a"])(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.setLogining(!1),Object(h["z"])("loginType",this.curLoginType),e.t0=this.meechatType,e.next="mini"===e.t0?5:"h5"===e.t0?7:"pc"===e.t0?7:14;break;case 5:return this.$emit("initMiniLoginCallback"),e.abrupt("break",14);case 7:return console.log("loginSuccCallBack, meechatType:"+this.meechatType+", this.$route.name:"+this.$route.name),"h5"===this.meechatType&&"login"===this.$route.name&&(t=this.from&&"null"!=this.from?this.from:"/",console.log("this.$router.replace, url:"+t),this.$router.replace(t)),e.next=11,this.initSocket();case 11:return this.$store.commit("chatAppLogin",!0),this.$store.commit("toApp",!0),e.abrupt("break",14);case 14:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}),mounted:function(){var e=this;if(top!=self){var t=function(t){"meechat:setShow"===t.action?e.handleToggleChat(t.show):"meechat:logout"===t.action&&e.handleLogout2()};this.postMessager=new k("*",{callback:t}),window.postMessager=this.postMessager}}}},"4bc7":function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-074cda02").then(n.bind(null,"fcb7"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c={install:function(e,t,n){var s;e.prototype.$showInvite=function(){var c=Object(r["a"])(regeneratorRuntime.mark(function r(c,u){var p;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i(e,o);case 2:p=r.sent,s&&(document.body.removeChild(s.$el),s=null),s=new p({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0,inviteType:c,ext:u}}}),document.body.appendChild(s.$el);case 6:case"end":return r.stop()}},r,this)}));return function(e,t){return c.apply(this,arguments)}}()}};t["a"]=c},5975:function(e,t,n){"use strict";var r=n("ab01"),a=n.n(r),o=n("badb"),i=n.n(o),s=(n("c9db"),n("ad09"),n("514e")),c=n.n(s),u=n("a700"),p=n.n(u),d=(n("b5aa"),n("4457")),l=n("7f43"),h=n.n(l),m=n("0427"),f=n.n(m),g=n("1c04"),v=n("33f8"),b="";"8080"===window.location.port&&(b="//test.mee.chat//");var k=h.a.create({baseURL:b,headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e,t){return e=f.a.stringify(e),e}],transformResponse:[],withCredentials:!0});function w(e){return y.apply(this,arguments)}function y(){return y=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,n={user_id:localStorage.getItem("user_id")||"",token:localStorage.getItem("token")||""},"post"===t.method?t.data?t.data=a()(n,t.data):t.data=n:"get"===t.method&&(t.params?t.params=a()(n,t.params):t.params=n),e.abrupt("return",t);case 6:return e.prev=6,e.t0=e["catch"](0),e.abrupt("return",t);case 9:case"end":return e.stop()}},e,this,[[0,6]])})),y.apply(this,arguments)}k.host=b,k.interceptors.request.use(function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!t.needLogin){e.next=19;break}if(localStorage.getItem("user_id")&&localStorage.getItem("token")){e.next=16;break}if(!Object(v["o"])().indexOf("h5")){e.next=6;break}Object(v["B"])(),e.next=14;break;case 6:return e.prev=6,e.next=9,g["a"].dispatch("doGameLogin");case 9:return e.abrupt("return",w(t));case 12:e.prev=12,e.t0=e["catch"](6);case 14:e.next=17;break;case 16:return e.abrupt("return",w(t));case 17:e.next=20;break;case 19:return e.abrupt("return",w(t));case 20:case"end":return e.stop()}},e,this,[[6,12]])}));return function(t){return e.apply(this,arguments)}}(),function(e){return p.a.reject(e)}),k.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?p.a.resolve(e):-5!==e.data.code?(e.config.noErrorMsg||c.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),p.a.reject(new Error(e.data.msg))):void g["a"].dispatch("resetGameLogin")},function(e){return p.a.reject(e)}),k.request2=function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=null,!t.cache){e.next=5;break}return e.abrupt("return",new p.a(function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(r,a){var o,s,c,u,p,d,l;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return o=null,e.next=3,w(t);case 3:if(t=e.sent,"post"===t.method?o=t.data:"get"===t.method&&(o=t.params),s="",t.cacheKeys)for(c in t.cacheKeys)u=t.cacheKeys[c],s+=u+"="+o[u]+"&";else s=i()(o);return p=t.method+":"+t.url+"?"+s,d=localStorage.getItem(p),d&&(n=JSON.parse(d),t.callback(n)),e.next=12,k.request(t);case 12:n=e.sent,delete n["config"],delete n["request"],l=i()(n),d!=l&&(n.data.result&&localStorage.setItem(p,l),t.callback(n));case 17:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()));case 5:return e.next=7,k.request(t);case 7:n=e.sent,t.callback(n);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();var _=k,x={groupAuth:function(e){return _.request({url:"default/groupAuth",method:"post",needLogin:!0,data:e})},feedback:function(){return _.request({url:"default/tick ",method:"post",needLogin:!0})},discovery:function(){return _.request({url:"default/discovery",method:"post"})}},S="";"8080"===window.location.port&&(S="//test.mee.chat/");var I=h.a.create({baseURL:S,headers:{"Content-Type":"multipart/form-data"},withCredentials:!0});I.host=S,I.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?p.a.resolve(e):-5!==e.data.code?(c.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),p.a.reject(new Error(e.data.msg))):void g["a"].dispatch("resetGameLogin")},function(e){return p.a.reject(e)});var L=I,O={getRandom:function(e){return _.get("user/random",{params:e})},getRandom2:function(e){return _.get("user/random2",{params:e})},eosLogin:function(e){return _.post("user/eosLogin",e)},eosLogin2:function(e){return _.post("user/eosLogin2",e)},eosBind:function(e){return _.request({url:"user/eosBind",method:"post",needLogin:!0,data:e})},eosBind2:function(e){return _.request({url:"user/eosBind2",method:"post",needLogin:!0,data:e})},ethLogin:function(e){return _.post("user/ethLogin",e)},simplewalletCheck:function(e){return _.get("user/simplewalletCheck",{params:e,noErrorMsg:!0})},ethBind:function(e){return _.request({url:"user/ethBind",method:"post",needLogin:!0,data:e})},unBind:function(e){return _.request({url:"user/unbind",method:"post",needLogin:!0,data:e})},tgCSRF:function(e){return _.request({url:"user/tgCSRF",method:"post",data:e})},tgLogin2:function(e){return _.request({url:"user/tgLogin2",method:"post",data:e})},tgBind2:function(e){return _.request({url:"user/tgBind2",method:"post",needLogin:!0,data:e})},checkLocalLogin:function(e){return _.request({url:"user/checkLogin",method:"post",data:e})},changeUserName:function(e){return _.request({url:"user/changeUserName",method:"post",needLogin:!0,data:e})},changeNickName:function(e){return _.request({url:"user/changeNickName",method:"post",needLogin:!0,data:e})},changePhoto:function(e){return L.request({url:"user/changePhoto",method:"post",data:e})},setVisible:function(e){return _.request({url:"user/setVisible",method:"post",needLogin:!0,data:e})},getInfo:function(e){return _.request({url:"user/info",method:"get",needLogin:!0,params:e})},getOtherInfo:function(e){return _.request({url:"user/info",method:"get",needLogin:!1,params:e})}},M=(n("dcfb"),n("8d4d")),T={getNewMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,_.request({url:"group/newMsg",method:"get",needLogin:!1,params:t});case 2:return n=e.sent,r=new M["a"],e.next=6,r.saveMsg(t["group_id"],n.data.data);case 6:return n.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(v["i"])(e.msg)):e.msg=Object(v["i"])(e.msg)}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(e){return _.request({url:"group/historyMsg",method:"get",needLogin:!1,params:e})},getGroupInfo:function(e){return _.request({url:"group/info",method:"get",needLogin:!1,params:e})},getGroupInfo2:function(e,t){_.request2({url:"group/info",method:"get",needLogin:!1,cache:!0,cacheKeys:["user_id","group_id"],params:e,callback:t})},sendMsg:function(e){return e.msg=Object(v["g"])(e.msg),_.request({url:"group/sendMsg",method:"post",needLogin:!0,data:e})},createGroup:function(e){return _.request({url:"group/create",method:"post",needLogin:!0,data:e})},joinGroup:function(e){return _.request({url:"group/join",method:"get",needLogin:!0,params:e})},leaveGroup:function(e){return _.request({url:"group/leave",method:"get",needLogin:!0,params:e})},blockUser:function(e){return _.request({url:"group/blockUser",method:"get",needLogin:!0,params:e})},unblockUser:function(e){return _.request({url:"group/unblockUser",method:"get",needLogin:!0,params:e})},changeName:function(e){return _.request({url:"group/changeName",method:"post",needLogin:!0,data:e})},changeNotice:function(e){return _.request({url:"group/changeNotice",method:"post",needLogin:!0,data:e})},changeCover:function(e){return L.request({url:"group/changeCover",method:"post",data:e})},changeTitle:function(e){return _.request({url:"group/changeTitle",method:"post",needLogin:!0,data:e})},invites:function(e){return _.request({url:"group/invites",method:"post",needLogin:!0,data:e})},removes:function(e){return _.request({url:"group/removes",method:"post",needLogin:!0,data:e})},repealGroupMsg:function(e){return _.request({url:"group/repealMsg",method:"post",needLogin:!0,data:e})},sendImageMsg:function(e){return _.request({url:"group/sendImageMsg",method:"post",needLogin:!0,headers:{"Content-Type":"multipart/form-data"},data:e})},getFriends:function(e){return _.request({url:"group/getFriends",method:"get",needLogin:!0,params:e})},pinMsg:function(e){return _.request({url:"group/pinMsg",method:"post",needLogin:!0,data:e})},unpinMsg:function(e){return _.request({url:"group/unpinMsg",method:"post",needLogin:!0,data:e})},addAdmin:function(e){return _.request({url:"group/addAdmin",method:"post",needLogin:!0,data:e})},removeAdmin:function(e){return _.request({url:"group/removeAdmin",method:"post",needLogin:!0,data:e})},searchMember:function(e){return _.request({url:"group/memberSearch",method:"post",needLogin:!0,data:e})},changeCreator:function(e){return _.request({url:"group/changeCreator",method:"post",needLogin:!0,data:e})},getHotList:function(){return _.request({url:"group/hotList ",method:"post",needLogin:!0})}},C={getNewMsg:function(){var e=Object(d["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,_.request({url:"person/newMsg",method:"get",needLogin:!0,params:t});case 2:return n=e.sent,r=new M["a"],e.next=6,r.saveMsg(t["session_id"],n.data.data);case 6:return n.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(v["i"])(e.msg)):e.msg=Object(v["i"])(e.msg)}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(e){return _.request({url:"person/historyMsg",method:"get",needLogin:!0,params:e})},sendMsg:function(e){return e.msg=Object(v["g"])(e.msg),_.request({url:"person/sendMsg",method:"post",needLogin:!0,data:e})},repealPersonMsg:function(e){return _.request({url:"person/repealMsg",method:"post",needLogin:!0,data:e})}},j={sessionList:function(e){return _.request2({url:"session/list",method:"get",needLogin:!0,callback:e})},setRead:function(e){return _.request({url:"session/setRead",method:"post",needLogin:!0,data:e})},setMute:function(e){return _.request({url:"session/mute",method:"post",needLogin:!0,data:e})},cancelMute:function(e){return _.request({url:"session/unMute",method:"post",needLogin:!0,data:e})},setPin:function(e){return _.request({url:"session/pin",method:"post",needLogin:!0,data:e})},cancelPin:function(e){return _.request({url:"session/unPin",method:"post",needLogin:!0,data:e})},deleteSession:function(e){return _.request({url:"session/delete",method:"post",needLogin:!0,data:e})},fileUpload:function(e){return _.request({url:"session/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},needLogin:!0,data:e})},getMiniUnRead:function(e){return _.request({url:"session/miniUnRead ",method:"post",needLogin:!0,data:e})}},R={grabPacket:function(e){return _.request({url:"redpack/grab",method:"get",needLogin:!0,params:e})},grabDetail:function(e){return _.request({url:"redpack/detail",method:"get",needLogin:!0,params:e})},sendList:function(e){return _.request({url:"redpack/sendList",method:"get",needLogin:!0,params:e})},receiveList:function(e){return _.request({url:"redpack/receiveList",method:"get",needLogin:!0,params:e})}},A={getWebhook:function(e){return _.request({url:"tg/webhook",method:"get",needLogin:!0,params:e})},getSyncInfo:function(e){return _.request({url:"tg/sync",method:"post",needLogin:!0,params:e})},doSync:function(e){return _.request({url:"tg/doSync",method:"post",needLogin:!0,params:e})}};t["a"]={host:_.host,base:x,user:O,group:T,person:C,session:j,tg:A,redpack:R}},"5a09":function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-451c71fa").then(n.bind(null,"9744"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c={install:function(e,t,n){var s;e.prototype.$showOtherInfo=Object(r["a"])(regeneratorRuntime.mark(function r(){var c,u,p=arguments;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return c=p.length>0&&void 0!==p[0]?p[0]:0,r.next=3,i(e,o);case 3:u=r.sent,s&&(document.body.removeChild(s.$el),s=null),s=new u({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!1,userId:c}}}),document.body.appendChild(s.$el);case 7:case"end":return r.stop()}},r,this)}))}};t["a"]=c},"5b41":function(e,t,n){"use strict";var r=n("99d7"),a=n.n(r);a.a},6032:function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-72b48984").then(n.bind(null,"ab27"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c={install:function(e,t){var n;e.prototype.$editUserAvatar=Object(r["a"])(regeneratorRuntime.mark(function r(){var s,c,u=arguments;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return s=u.length>0&&void 0!==u[0]?u[0]:"",r.next=3,i(e,o);case 3:c=r.sent,n?(n.visible=!0,n.imageUrl=s,n.isMe=!0):(n=new c({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0,imageUrl:s,isMe:!0}}}),document.body.appendChild(n.$el));case 5:case"end":return r.stop()}},r,this)})),e.prototype.$editGroupAvatar=Object(r["a"])(regeneratorRuntime.mark(function r(){var s,c,u=arguments;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return s=u.length>0&&void 0!==u[0]?u[0]:"",r.next=3,i(e,o);case 3:c=r.sent,n?(n.visible=!0,n.imageUrl=s,n.isMe=!1):(n=new c({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0,imageUrl:s,isMe:!1}}}),document.body.appendChild(n.$el));case 5:case"end":return r.stop()}},r,this)}))}};t["a"]=c},6103:function(e,t,n){"use strict";var r=n("8973"),a=n("c7ac"),o={h5:{discover:"Discover",chat:"Chat",mine:"Mine",nickname:"Nickname",username:"ID",avatar:"Avatar",editInfo:"Edit info",notBind:"Not bind",logout:"Logout",chatInfo:"Chat info",groupAvatar:"Group avatar",groupName:"Group name",input:"Please input",edit:"Edit",typeNames:["Group name","Group info","Nickname","ID"],selectContact:"Select contact",createGroup:"Create group",groupNotice:"Group Notice",meechatLogin:"Meechat Login"},mini:{logout:"Logout",accountSetting:"Account setting",openWeb:"Chat in new tab",admin:"Admin",logining:"Login...",login:"Login",server:"Server"},chat:{noMore:"No more",yesterday:"Yesterday",redpack:"RedPacket",image:"Image",audio:"Audio",video:"Video",send:"Send",unreadMsg:" Messages unread",joinGroup:"Join Group",hotGroupRecommend:"Hot Groups",enterTips:"Enter Send,Ctrl + Enter NewLine",hava:"",atYouWithPeople:"people @ you",atYou:"@ you",youAreBan:"You are prohibitions",cannotBeEmpty:"Chat content can not be empty",maxUploadTips:"Upload file size limitation: audio 2M or video 3M",news:"News",closePinMsg:"Do you want to close the top message?",closeSessionMsg:"Do you want to delete this session?",quote:"Quote",copy:"Copy",paste:"Paste",forward:"Forward",sticky:"Sticky",revoke:"Revoke",revoked:" revoke",aMsg:"a message",liftaBan:"Lift a ban",revokeMsg:" revoke a message",deleteSession:"Delete session",otherRevoke:"Someone revoke a message.",msgType:["image","video","audio","redpack","ext"],imageComfirm:"Send Image",videoComfirm:"Send Video/Audio"},redPacket:{title:"Send Red Packet",random:"R",totalAmount:"Total",tip1:"Current mode: random amount",num:"Number",unit:"Packets",placeholder1:"number",tip2:"The group has {num} members",memo:"Good luck",tip3:"Unclaimed red packet will be refunded after 24 hours",sendBtn:"Put money into red packet",helpTitle:"Help",helpRule1:"1. The red envelopes are all hand-made red envelopes, and the amount of red envelopes grabbed is random; the maximum number of red envelopes is 100 at a time.",helpRule2:"2. The money can be selected when sending the red envelope; the amount of the red envelope is transferred directly to the binding account of the corresponding currency; if the account is not bound, the balance of the currency will be transferred immediately after the binding account.",helpRule3:"3. MeeChat charges 2% of the amount of each red envelope to cover the cost of the chain.",maxMoneyTip:"Total money can not more than",minMoneyTip:"Total money can not less than",singleMinMoneyTip:"Single packet can not less than",maxNumberTip:"Max pakcet number is",noPacketTips:"Slow hand, red packet is over",expiredPacketTips:"Packet is expired",open:"open",seePacketDetail:"See packet detail",transferTo:"Transferred to the corresponding account",account:" account",best:" Best luck",received:"already received",lootAll:"Loot all",expired:"expired",tip4:"Total {total} {unit}, {num} {unit} Has been open",drawed:"got",whos:" ",sendForEosTips:"Red Packet Sending is only available to EOS logged-in users",bindForEosTips:"you have not yet bound {type} account",receiveRedpack:"received a red redpack"},group:{recommendGroup:"Recommend group",groupName:"Group name",enter:"Enter",join:"Join",searchMember:"Search members",add:"Add",delete:"Delete",showAll:"Slide down",hideAll:"Slide up",setGroupAvatar:"Group avatar",groupPin:"Info",noPin:"No info",groupInviteLink:"Share Link",groupId:"Group ID",doNotDisturb:"Mute Session",cancelDisturb:"Unmute Session",topChat:"Pin Session",admin:"Group admin",quitGroup:"Leave Group",groupPinInput:"Write group info",adminSetting:"Group admin setting",groupCertification:"Application for group certification",groupTypeSetting:"Group Type Setting",relateTelegram:"Relate Telegram",needRelateTip:"Haven't bound your Telegram account ,so you need to do follow-up after binding.",teleStep1:"Search for @meechatbot in Telegram and pull the account from the administrator into the Telegram group that needs synchronization. Follow the boot steps to complete the synchronization.",teleStep2:"After synchronization, the messages of MeeChat group and Telegram group are synchronized in real time.",clickBind:"Bind",needRelateTelegram:"Relate Telegram",relate:"Realte",createGroupToRelate:"Create New Group To Relate",createSuccess:"Create Success",groupNameTips:"Please Enter Group Name",groupNameLengthTips:"Group name is too long, please enter less than 16 characters",groupMgrMostTips:"Group administrators can only set up five people at most.",groupMgrComfime:"Determine to transfer group owners to",groupMgrResult:"Transferred group owner to",leaveComfirm:"Confirm to quit the group chat?",leaveTip:"Has withdrawn from the group chat",joinTip:"Please join the group first"},emoji:{lastestUse:"Lastest use",person:"Person",nature:"Nature",food:"Food",activity:"Activity",trip:"Trip",symbol:"Symbol"},userinfo:{changePhoto:"Change avatar",bindAccounts:"Bind accounts",notBindOrHide:"Not bind or hide",openingSoon:"Opening soon",public:"Public",private:"Private",bind:"Bind",unbind:"Unbind",unbindSuccess:"Unbind Success",unbindMsg:"Do you want to unbind",nickTooLong:"Nickname too long , please write it in 16 chars",wrongPattern:"Only allow number letter and underline between 5-20 chars",maxUploadTips:"Please upload image within 2M",editAvatar:"Edit avatar",editGroupAvatar:"Edit group avatar",inputIsEmpty:"Input value can not be empty",groupNameTooLong:"Group name too long , please write it in 16 chars"},invite:{searchContact:"Search contact",noContact:"No contact",transferGroupOwner:"Transfer group owner",seleted:"Already select",numberMember:" members",checkDeleteMemberTips:"Please check the person that need to be deleted",checkAddMemberTips:"Please check the person that need to be add",writeGroupName:"Please write group name"},public:{confirm:"Confirm",cancel:"Cancel",complete:"Complete",updateSucc:"Update success",uploadSucc:"Upload success",loading:"Loading",admin:"(Admin)",owner:"(Owner)",contact:"(Contact)",sendMessage:"Send message",loginTip:"Please login",noMoney:"The balance of account is insufficient.",badNetwork:"The network is too bad. please try again. ",close:"Close",ban:"Prohibitions",setting:"Setting",remove:"Remove",you:"you",quit:"Logout",feedback:"Feedback",chinese:"中文",english:"英文",closeMsg:"Close notification",openMsg:"Open notification",search:"Search",searchHotGroup:"Search Hot Group",item:"item",me:"I",other:"the other side",pswSetting:"Password Setting",pswEdit:"Password Edit",installPwa:"Install MeeChat Desktop Edition"},login:{login:"login",accountLogin:"Account Login",autoLogin:"Auto login",loginWithScatter:"Log in using scatter",loadScatter:"Not installed? download scatter program",installScatter:"Please install scatter plugin",otherType:"Login",loginTipAccount:"Please Enter MeeChat Username",loginTipPsw:"Please Enter MeeChat Password"},psw:{setPsw:"Password Setting",oldPsw:"Old Password",oldPswTip:"Please Enter Old Password",newPsw:"New Password",newPswTip:"Please Enter Old Password",comfirmPsw:"Comfirm Password",comfirmPswTip:"Please Enter Old Password",lenTip:"Password must be at least 8 characters",pswAdd:"After setting MeeChat password, you can login to MeeChat through MeeChat account + password."}},i=o,s={h5:{discover:"发现",chat:"聊天",mine:"我的",nickname:"昵称",username:"ID",avatar:"头像",editInfo:"编辑资料",notBind:"未绑定",logout:"退出登录",chatInfo:"聊天信息",groupAvatar:"群头像",groupName:"群名字",input:"请输入",edit:"编辑",typeNames:["群名字","群公告","昵称","ID"],selectContact:"选择联系人",createGroup:"建群",groupNotice:"群公告",meechatLogin:"账号登录"},mini:{logout:"注销",accountSetting:"账号设置",openWeb:"在网页版打开聊天",admin:"群主",logining:"登录中...",login:"登录",server:"客服"},chat:{noMore:"没有更多了",yesterday:"昨天",redpack:"红包",image:"图片",audio:"音频",video:"视频",send:"发送",unreadMsg:"条未读消息",joinGroup:"加入群组",hotGroupRecommend:"热门群组推荐",enterTips:"Enter发送,Ctrl + Enter 换行",hava:"有",atYouWithPeople:"个人提到了你",atYou:"提到了你",youAreBan:"您已被禁言",cannotBeEmpty:"聊天内容不能为空",maxUploadTips:"上传文件大小限制:音频2M以内,视频3M以内",news:"消息",closePinMsg:"确定要关闭置顶消息吗?",closeSessionMsg:"确认删除当前会话?",quote:"引用",copy:"复制",paste:"粘贴",forward:"转发",sticky:"置顶",revoke:"撤回",revoked:"撤回了",aMsg:"的一条消息",liftaBan:"解禁",revokeMsg:"撤回了一条消息",deleteSession:"删除会话",otherRevoke:"有人撤回一条消息",msgType:["图片","视频","音频","红包","ext"],imageComfirm:"发送图片确认",videoComfirm:"发送视频/音频确认"},redPacket:{title:"发红包",random:"拼",totalAmount:"总金额",tip1:"当前为拼手气红包",num:"红包个数",placeholder1:"请填写个数",unit:"个",tip2:"本群共{num}人",memo:"恭喜发财,大吉大利",tip3:"未领取的红包,将于24小时后发起退款",sendBtn:"塞钱进红包",helpTitle:"帮助",helpRule1:"1. 发出的红包均为拼手气红包,抢得的红包金额随机;一次最多发100个红包;",helpRule2:"2. 发红包时可选择币种;抢到的红包金额直接转账到对应币种的绑定账户;若未绑定账户,则所得币种余额在绑定账户后即刻转账;",helpRule3:"3. MeeChat会从每次发出红包的金额中收取2%的手续费,用于支付上链成本",maxMoneyTip:"总金额 不能多于",minMoneyTip:"总金额 不能少于",singleMinMoneyTip:"单个红包最小为",maxNumberTip:"红包个数最大为",noPacketTips:"手慢了,红包派完了",expiredPacketTips:"该红包已经过期。",open:"開",seePacketDetail:"查看领取详情",transferTo:"已转到相应账户",account:"账户",best:"手气最佳",received:"已领取",lootAll:"已抢光",expired:"已过期",tip4:"共{total}{unit}红包, 已被领取{num}{unit}",drawed:"领取了",whos:"的",sendForEosTips:"发送红包功能只对Eos/Meetone登录用户开放",bindForEosTips:"你还没有绑定 {type} 账号",receiveRedpack:"领取了红包"},group:{recommendGroup:"推荐群",groupName:"群名",enter:"进入",join:"加群",searchMember:"搜索群成员",add:"添加",delete:"删除",showAll:"展开全部",hideAll:"收起",setGroupAvatar:"群头像",groupPin:"群公告",noPin:"暂无公告",groupInviteLink:"群邀请链接",groupId:"群ID",doNotDisturb:"消息免打扰",cancelDisturb:"取消免打扰",topChat:"置顶聊天",admin:"群管理",quitGroup:"退出群组",groupPinInput:"请输入你的群公告",adminSetting:"群管理员设置",groupCertification:"申请群认证",groupTypeSetting:"群类型设置",relateTelegram:"同步Telegram群",needRelateTelegram:"需要同步Telegram群",needRelateTip:"目前你还没有绑定Telegram账号,需绑定后进行后续操作",teleStep1:"在Telegram中搜索@meechatbot,并将该账户由管理员拉入到需同步的Telegram群中,跟随引导步骤即可完成同步。",teleStep2:"同步后,MeeChat群组和Telegram群的消息实时同步。",clickBind:"点击绑定",relate:"同步",createGroupToRelate:"创建新群并同步",createSuccess:"创建成功",groupNameTips:"请输入群名",groupNameLengthTips:"群名字过长,请输入16个字符以内",groupMgrMostTips:"管理员最多只能设置5个人哦",groupMgrComfime:"确定要把群主转让给",groupMgrResult:"已转让群主给",leaveComfirm:"确认退出该群聊?",leaveTip:"已退出该群聊",joinTip:"请先加入群组"},emoji:{lastestUse:"最近使用",person:"人物",nature:"人物",food:"食物",activity:"活动",trip:"旅行",symbol:"符号"},userinfo:{changePhoto:"更改头像",bindAccounts:"已绑定账户",notBindOrHide:"未绑定或已隐藏",openingSoon:"即将开放",public:"已公开",private:"未公开",bind:"绑定",unbind:"解绑",unbindSuccess:"解绑成功",unbindMsg:"确定解绑",nickTooLong:"用户呢称过长,请输入16个字符以内",wrongPattern:"只能是5-20位的数字,字母下划线",maxUploadTips:"请上传2M以内的图片",editAvatar:"编辑头像",editGroupAvatar:"编辑群头像",inputIsEmpty:"信息不能为空",groupNameTooLong:"群名字过长,请输入16个字符以内"},invite:{searchContact:"搜索联系人",noContact:"暂无联系人",transferGroupOwner:"转让群主",seleted:"已选择了",numberMember:"位群成员",checkDeleteMemberTips:"请勾选需要删除的群成员",checkAddMemberTips:"请勾选需要添加的",writeGroupName:"请输入群名称"},public:{confirm:"确认",cancel:"取消",complete:"完成",updateSucc:"修改成功",uploadSucc:"上传成功",loading:"加载中",admin:"管理员",owner:"群主",contact:"联系人",sendMessage:"发消息",loginTip:"请先登录",noMoney:"账户余额不足",badNetwork:"网络太差~ 请重试",close:"关闭",ban:"禁言",setting:"设置",remove:"移除",you:"你",quit:"退出",feedback:"意见反馈",chinese:"Chinese",english:"English",closeMsg:"关闭消息",openMsg:"开启消息",search:"搜索",searchHotGroup:"搜索热门群组",item:"条",me:"我",other:"对方",pswSetting:"设置密码",pswEdit:"修改密码",installPwa:"安装MeeChat桌面版"},login:{login:"登录",accountLogin:"账号登录",autoLogin:"自动登录中",loginWithScatter:"请使用scatter进行登录",loadScatter:"未安装?请下载scatter程序",installScatter:"请安装scatter插件",otherType:"登录方式",loginTipAccount:"请输入MeeChat账号",loginTipPsw:"请输入密码"},psw:{account:"MeeChat账号",setPsw:"设置MeeChat密码",oldPsw:"旧密码",oldPswTip:"请输入旧的密码",newPsw:"新密码",newPswTip:"请输入新的密码",comfirmPsw:"确认密码",comfirmPswTip:"请再次输入新的密码",lenTip:"密码必须至少8个字符",pswAdd:"设置MeeChat密码后可以通过MeeChat账号+密码登录MeeChat"}},c=s,u=n("33f8");r["default"].use(a["a"]);var p={en:i,zh:c},d=localStorage.getItem("lang")||Object(u["n"])(),l=new a["a"]({locale:d,messages:p});t["a"]=l},7688:function(e,t,n){},"76a4":function(e,t,n){"use strict";var r=n("34f3"),a=!1;function o(e){if(e)return i(e)}function i(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}function s(e,t){if(!(this instanceof s))return new s(e,t);e&&"object"===Object(r["a"])(e)&&(t=e,e=void 0),o(this),t=t||{},t.path=t.path||"/",this.opts=t,this.url=e,this.lastPing=null,this.socketCache=[],this.socketMaxCache=5,this.readyState="closed",this.binaryType=t.binaryType||"blob",this._reconnectTimes=0,this._reconnectionDelay=t.reconnectionDelay||1e3,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.timeout(null===t.timeout?2e4:t.timeout),this.logStyle="color:blue; font-size:16px;font-weight:bold;",this.keepAliveInterval=15e3,this.keepAliveTimeout=null,this.keepAliveContent=t.keepAliveContent||1,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.connect()}o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0===arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1===arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if(n=r[a],n===t||n.fn===t){r.splice(a,1);break}return this},o.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,a=n.length;r<a;++r)n[r].apply(this,t)}return this},o.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},o.prototype.hasListeners=function(e){return!!this.listeners(e).length},s.prototype.connect=function(e){if(~this.readyState.indexOf("open"))return this;this.readyState="opening";var t=a?this.openWxConnect():this.openH5Connect();this.socketCache.push(t),this.socket=t},s.prototype.reconnect=function(){var e=this;clearInterval(this.keepAliveTimeout),"open"===this.readyState||"opening"===this.readyState||(this._reconnectTimes<this._reconnectionAttempts?(this.socket&&this.socket.close(),this._reconnectTimes+=1,this.readyState="reconnecting",setTimeout(function(){e.socket=a?e.openWxConnect():e.openH5Connect()},this._reconnectionDelay)):(this.socket&&this.socket.close(),this._reconnectTimes=1,this.readyState="reconnecting",setTimeout(function(){e.socket=a?e.openWxConnect():e.openH5Connect()},3e4)))},s.prototype.destroy=function(){this._reconnection=!1,this.socket.close()},s.prototype.keepAlive=function(){var e=this;this.keepAliveTimeout=setInterval(function(){"open"===e.readyState?e.send(e.keepAliveContent):"closed"===e.readyState&&e.reconnect()},this.keepAliveInterval)},s.prototype.openWxConnect=function(){var e=this,t={},n=wx.connectSocket({url:this.url,header:t,success:function(e){}});return n.onOpen(function(t){e.readyState="open",e.emit("open",t),e._reconnectTimes=1,e.keepAlive()}),n.onClose(function(t){clearInterval(e.keepAliveTimeout),e.readyState="closed",e._reconnection&&e.reconnect(),e.emit("close",t)}),n.onMessage(function(t){1!==t.data&&e.emit("message",t.data)}),n.onError(function(t){clearInterval(e.keepAliveTimeout),e._reconnection?"reconnecting"!==e.readyState&&(e.readyState="error",e.reconnect()):n.close(),e.emit("error",t.errMsg)}),n},s.prototype.openH5Connect=function(){var e=this,t=new WebSocket(this.url);return t.onopen=function(t){e.readyState="open",e.emit("open",t),e._reconnectTimes=1,e.keepAlive()},t.onclose=function(t){clearInterval(e.keepAliveTimeout),e.readyState="closed";var n=t.reason;console.log("%c [Socket连接被关闭: ".concat(n,"]"),e.logStyle),e._reconnection&&e.reconnect(),e.emit("close",t)},t.onmessage=function(t){1!==t.data&&e.emit("message",t.data)},t.onerror=function(n){clearInterval(e.keepAliveTimeout),e._reconnection?"reconnecting"!==e.readyState&&(e.readyState="error",e.reconnect()):t.close(),e.emit(n)},t},s.prototype.send=function(e){if(a){var t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);this.socket.send({data:t,success:function(e){},fail:function(e){},complete:function(e){}})}else this.socket.binaryType=this.binaryType,this.socket.send(e)},s.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},s.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},s.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},t["a"]=s},8869:function(e,t,n){"use strict";n.d(t,"f",function(){return l}),n.d(t,"e",function(){return h}),n.d(t,"c",function(){return m}),n.d(t,"d",function(){return f}),n.d(t,"a",function(){return g}),n.d(t,"b",function(){return v});var r=n("34f3"),a=(n("8e5d"),n("bd31")),o=(n("0adb"),n("7486")),i=(n("dcfb"),n("b5aa"),n("4457")),s=(n("dc12"),n("5975")),c=n("33f8"),u=n("52c1"),p=n("c1f9"),d=n.n(p),l={data:function(){return{isSearch:!1,searchList:null}},methods:{searchUser:function(e,t){var n=e.target.value.toLocaleLowerCase();n?(this.searchList=t.filter(function(e){var t,r,a=(e.name||e.user_name||"").toLocaleLowerCase(),o=(e.nick_name||"").toLocaleLowerCase();return t=!!a&&a.indexOf(n)>-1,r=!!o&&o.indexOf(n)>-1,t||r}),this.isSearch=!0):this.isSearch=!1}}},h={data:function(){return{isSearchGroup:!1,searchUserTimer:null}},methods:{searchUser:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t,n){var r=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:clearTimeout(this.searchUserTimer),this.searchUserTimer=setTimeout(Object(i["a"])(regeneratorRuntime.mark(function e(){var a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.target.value.toLocaleLowerCase(),i=r.inviteType,r.isSearchGroup=!0,a.trim()){e.next=7;break}return n.forEach(function(e){r.$set(e,"isShow",!0)}),r.$nextTick(function(){r.isSearchGroup=!1,r.showNum=n.length}),e.abrupt("return");case 7:if(n.forEach(function(e){var t,n,o=(e.user_name||"").toLocaleLowerCase(),i=(e.nick_name||"").toLocaleLowerCase();t=!!o&&o.indexOf(a)>-1,n=!!i&&i.indexOf(a)>-1,r.$set(e,"isShow",t||n)}),n.length+1>=r.membersNum||1==i||2==i){e.next=11;break}return e.next=11,s["a"].group.searchMember({group_id:r.group.groupId,keyword:a}).then(function(e){var t=e.data,r=t.data;r.forEach(function(e){e.isChecked=!1,e.isChoosed=!1,e.isShow=!0}),n=d.a.unionBy([].concat(Object(o["a"])(n),Object(o["a"])(r)),"user_id")});case 11:r.$nextTick(function(){r.isSearchGroup=!1,r.showNum=n.filter(function(e){return e.isShow}).length});case 12:case"end":return e.stop()}},e,this)})),200);case 2:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}},m={data:function(){return{atInd:0}},methods:{atPerson:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];var t=this.$refs.chatInput,n=t.selectionStart,r=n-this.keyAfterAt.length;this.inputMsg=this.inputMsg.slice(0,r)+"".concat(e," ")+this.inputMsg.slice(n),this.atInd=0,t.focus(),this.$nextTick(function(){t.setSelectionRange(r+e.length+1,r+e.length+1)}),this.$store.commit("updateIsNewAt",{isNewAt:this.group.isNewAt,isNewAtFound:!0}),this.$store.commit("updateGroupSearchList",[])},handleUp:function(e){return this.atInd>0&&this.atInd--,this.atShow&&e.preventDefault(),!0},handleDown:function(e){var t=this.filterMembers.length;return this.atInd<t-1?this.atInd++:this.atInd=0,this.atShow&&e.preventDefault(),!0}}},f={data:function(){return{selectionAfterAt:!1,keyAfterAt:"",keyAfterAtTimer:"",lastKeyAfterAt:"",isIOS:!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),isShowContextmenu:!1,menuTop:0,menuLeft:0}},mounted:function(){},computed:Object(a["a"])({},Object(u["e"])(["copyText"]),{filterMembers:function(){if(!this.group.groupId)return[];var e=this.group.membersArray,t=[];if(""!==this.keyAfterAt)t=this.group.searchList;else for(var n=0;n<e.length;n++)e[n].user_id!=this.userId&&t.push(e[n]);return t.slice(0,100)},atShow:function(){return this.atInd=0,this.selectionAfterAt&&this.filterMembers.length}}),watch:{keyAfterAt:function(e){var t=this;clearTimeout(this.keyAfterAtTimer),this.keyAfterAtTimer=setTimeout(function(){t.handleKeyAfterAt(e)},200)},inputMsg:function(e,t){this.handleSelectionChange()}},methods:{handleKeyAfterAt:function(e){var t=this;if(this.group.groupId&&""!=e.trim()&&!this.group.isNewAtFound)if(this.group.membersArray.length<this.group.membersNum)s["a"].group.searchMember({group_id:this.group.groupId,keyword:e}).then(function(e){var n=e.data;t.$store.commit("updateGroupSearchList",n.data)});else{var n=this.group.membersArray.filter(function(t){var n,r;return n=!!t.user_name&&t.user_name.indexOf(e)>-1,r=!!t.nick_name&&t.nick_name.indexOf(e)>-1,n||r});this.$store.commit("updateGroupSearchList",n)}},getStrBeforeSelection:function(){var e=this.$refs.chatInput;if(!e)return"";var t=e.selectionStart,n=this.inputMsg.slice(0,t);return n},getStrAfterSelection:function(){var e=this.$refs.chatInput;if(!e)return"";var t=e.selectionStart,n=this.inputMsg.slice(t);return n},handleClick:function(){this.isShowContextmenu=!1},handleLeft:function(e){var t=this.$refs.chatInput,n=t.selectionStart;if(0===n)return!0;var r=this.getStrBeforeSelection(),a=this.group.members;for(var o in a){var i=a[o].user_name,s=new RegExp("@".concat(i," $"));if(s.test(r))return e.preventDefault(),t.setSelectionRange(n-i.length-2,n-i.length-2),!0}},handleRight:function(e){var t=this.$refs.chatInput,n=t.selectionStart,r=this.getStrAfterSelection(),a=this.group.members;for(var o in a){var i=a[o].user_name,s=new RegExp("^@".concat(i," "));if(s.test(r))return e.preventDefault(),t.setSelectionRange(n+i.length+2,n+i.length+2),!0}return!0},handleDel:function(e){var t=this,n=this.$refs.chatInput,a=n.selectionStart;if(0!==a){var o=this.getStrBeforeSelection(),i=this.group.members,s=function(r){var s=i[r].user_name,c=new RegExp("@".concat(s," $"));if(c.test(o))return e.preventDefault(),t.inputMsg=t.inputMsg.slice(0,a-s.length-2)+t.inputMsg.slice(a),t.$nextTick(function(){n.setSelectionRange(a-s.length-2,a-s.length-2)}),{v:void 0}};for(var c in i){var u=s(c);if("object"===Object(r["a"])(u))return u.v}}},handleKeyDown:function(e){var t=this;if(!this.atShow){if(e.altKey||e.ctrlKey){var n=this.getStrBeforeSelection(),r=this.getStrAfterSelection();this.inputMsg=n+"\n"+r,this.$nextTick(function(){t.$refs.chatInput.setSelectionRange(n.length+1,n.length+1)})}else this.handleSend(e),e.preventDefault();return!0}e.preventDefault();var a=this.filterMembers[this.atInd];this.atPerson(a.user_name,a.nick_name)},handleFocus:function(){var e=this;this.$emit("handleFocus"),this.updateChatInputFocus(!0),document.addEventListener("selectionchange",this.handleSelectionChange),this.isIOS&&setTimeout(function(){e.$root.$el.addEventListener("click",e.fixIOS)},0)},handleBlur:function(){var e=this;if(document.removeEventListener("selectionchange",this.handleSelectionChange),this.updateChatInputFocus(!1),(this.selectionAfterAt||this.isShowContextmenu)&&setTimeout(function(){e.selectionAfterAt=!1,e.isShowContextmenu=!1},200),this.isIOS){var t=document.body.scrollTop;document.body.scrollTop=t,this.$root.$el.removeEventListener("click",this.fixIOS)}Object(c["v"])()},handleEsc:function(){this.selectionAfterAt=!1},handleSelectionChange:function(){var e=this.$refs.chatInput;if(e){var t=e.selectionStart,n=this.$refs.chatInput.selectionEnd;if(t===n){var r=this.getStrBeforeSelection();if(this.selectionAfterAt=/@/.test(r),this.selectionAfterAt){this.keyAfterAt=r.slice(r.lastIndexOf("@")+1);var a=this.keyAfterAt.indexOf(this.lastKeyAfterAt)<0;this.$store.commit("updateIsNewAt",{isNewAt:a,isNewAtFound:!a&&this.group.isNewAtFound}),a&&this.$store.commit("updateGroupSearchList",[]),this.lastKeyAfterAt=this.keyAfterAt}}}},handleContextmenu:function(e){this.copyText&&(this.isShowContextmenu=!this.isShowContextmenu,this.isShowContextmenu&&(this.menuTop=e.offsetY,this.menuLeft=e.offsetX>100?e.offsetX-30:e.offsetX))},handlePaste:function(){this.isShowContextmenu=!1,this.inputMsg+=this.copyText},closeEmojiList:function(){this.emojiShow=!1},fixIOS:function(e){var t=this;setTimeout(function(){t.$refs.chatInput===document.activeElement&&document.activeElement.blur()},0)}}},g={methods:{addPanelSession:function(e,t){var n=this,r=this.sessionList.some(function(e){return e.session_id==t});r||s["a"].user.getOtherInfo({target_id:e}).then(function(e){var r=e.data,a=r.data,o={cover_photo:a.cover_photo,is_group:"0",name:a.nick_name,session_id:t,unread:0};n.$store.commit("addSessionItem",o)})}}},v={data:function(){return{curLang:Object(c["r"])("lang")||Object(c["n"])()}},methods:{changeLang:function(){var e="en"==this.curLang?"zh":"en";this.$i18n.locale=e,this.curLang=e,Object(c["z"])("lang",e)}}}},"8d4d":function(e,t,n){"use strict";n("dcfb");var r=n("ab01"),a=n.n(r),o=(n("b5aa"),n("4457")),i=n("a585"),s=n("26cb"),c=n("fd86"),u=n("3d0b"),p=n("d26d"),d=n("411a"),l=n("2593"),h=n("33f8"),m=function(e){function t(){return Object(i["a"])(this,t),Object(c["a"])(this,Object(u["a"])(t).call(this,"message"))}return Object(p["a"])(t,e),Object(s["a"])(t,[{key:"getMsg",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,c,u,p,d,m,f=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:30,t){e.next=3;break}return e.abrupt("return",null);case 3:return e.next=5,this.getObjTable();case 5:if(r=e.sent,r){e.next=8;break}return e.abrupt("return");case 8:return a=[t,0],o=[t,999999999999999],i=IDBKeyRange.bound(a,o),e.next=13,r.index("session_id").openCursor(i,"prev");case 13:s=e.sent,c=[],u={};case 16:if(!s||!s.value){e.next=31;break}if(p=s.value,!(c.length<n&&p["session_id"]===t)){e.next=28;break}if(4==p.msg_type)try{"string"===typeof p.msg&&(p.msg=JSON.parse(Object(h["i"])(p.msg)))}catch(g){console.error(g)}else p.msg=Object(h["i"])(p.msg);return c.unshift(p),u[p.from]=p.from,p.to&&(u[p.to]=p.to),e.next=25,s.continue();case 25:s=e.sent,e.next=29;break;case 28:return e.abrupt("break",31);case 29:e.next=16;break;case 31:return d=new l["a"],e.next=34,d.getUserMap(u);case 34:return m=e.sent,e.abrupt("return",{list:c,userMap:m});case 36:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"updatePackInfo",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n,r){var a,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(a=e.sent,a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,a.get(t);case 7:o=e.sent,o?(o.ext[n]=r,a.put(o)):console.log("can not find redpack:"+t);case 9:case"end":return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"saveMsg",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(n,r){var o,i,s,c,u;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return o=new t,e.next=3,o.getObjTable();case 3:if(i=e.sent,i){e.next=6;break}return e.abrupt("return");case 6:e.t0=regeneratorRuntime.keys(r.list);case 7:if((e.t1=e.t0()).done){e.next=14;break}return s=e.t1.value,c=a()({session_id:n},r.list[s]),e.next=12,i.put(c);case 12:e.next=7;break;case 14:u=new l["a"],u.replaceObjects(r.userMap);case 16:case"end":return e.stop()}},e,this)}));function n(t,n){return e.apply(this,arguments)}return n}()},{key:"removeMsg",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(n,r){var a,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=new t,e.next=3,a.getObjTable();case 3:if(o=e.sent,o){e.next=6;break}return e.abrupt("return");case 6:o.delete(r);case 7:case"end":return e.stop()}},e,this)}));function n(t,n){return e.apply(this,arguments)}return n}()}]),t}(d["a"]);t["a"]=m},"8f20":function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-0d7ccc16").then(n.bind(null,"c6a6"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c={install:function(e,t){var n;e.prototype.$packetGet=function(){var s=Object(r["a"])(regeneratorRuntime.mark(function r(s,c){var u;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i(e,o);case 2:u=r.sent,n&&(document.body.removeChild(n.$el),n=null),n=new u({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!1,info:s,isShowDetail:c}}}),document.body.appendChild(n.$el);case 6:case"end":return r.stop()}},r,this)}));return function(e,t){return s.apply(this,arguments)}}()}};t["a"]=c},9005:function(e,t,n){"use strict";var r=n("24bc"),a=n.n(r);a.a},9729:function(e,t,n){"use strict";var r,a=n("8973"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],staticClass:"toast"},[e._v(e._s(e.text))])])},i=[],s=(n("c62f"),n("fc05")),c={},u=Object(s["a"])(c,o,i,!1,null,"674c3536",null),p=u.exports,d=a["default"].extend(p);function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2500;r?(r.show=!0,r.text=e):(r=new d({el:document.createElement("div"),data:function(){return{text:e,show:!0}}}),document.body.appendChild(r.$el)),t&&setTimeout(function(){r.show=!1},n)}function h(){r&&(r.show=!1)}function m(){a["default"].prototype.$showTips=l,a["default"].prototype.$hideTips=h}t["a"]=m},"99d7":function(e,t,n){},a3af:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",{staticClass:"sign-list"},[n("li",{on:{click:e.handleEos}},[n("i",{staticClass:"icon icon-eos"}),n("p",[e._v("EOS")])]),n("li",{on:{click:e.loginMeetone}},[n("i",{staticClass:"icon icon-meetone"}),n("p",[e._v("Meetone")])]),e.inWallet?e._e():n("li",{on:{click:e.loginTelegram}},[n("i",{staticClass:"icon icon-tele"}),n("p",[e._v("Telegram")])])])},a=[],o=(n("dc12"),n("5cf1"),n("ad09"),n("94c8")),i=n.n(o),s=n("8973"),c=n("455d"),u=n("33f8");s["default"].component(i.a.name,i.a);var p={name:"loginBox",mixins:[c["a"]],data:function(){return{meechatType:Object(u["o"])()}},created:function(){},computed:{inWallet:function(){return/token|meet\.one|wallet|bit|eos|nova/.test(navigator.userAgent.toLowerCase())}},methods:{handleEos:function(){top===self?this.loginEos():this.loginEosParent()}}},d=p,l=(n("9005"),n("fc05")),h=Object(l["a"])(d,r,a,!1,null,"78619c99",null);t["a"]=h.exports},a7de:function(e,t,n){"use strict";var r=n("b1c0"),a=n.n(r);a.a},b1c0:function(e,t,n){},b33c:function(e,t,n){"use strict";var r=n("a700"),a=n.n(r),o=(n("b5aa"),n("4457")),i={transfer:function(e,t,n,r,a){var o="transfer",i={authorization:["".concat(e,"@").concat(a)]};return self!==top?s(o,[e,t,n,r,i]):window.EOS[o](e,t,n,r,i)},getCurrencyBalance:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"EOS",r="getCurrencyBalance";return self!==top?s(r,[e,t,n]):window.EOS.getCurrencyBalance(e,t,n)},doSymbolTransfer:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n,r,o,i,c){var u,p,d,l;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(u="transfer",p={authorization:["".concat(t,"@").concat(i)]},self===top){e.next=6;break}return e.abrupt("return",s(u,[t,n,r,o,p],c));case 6:return e.prev=6,e.next=9,window.EOS.contract(c);case 9:return d=e.sent,e.next=12,d[u](t,n,r,o,p);case 12:return l=e.sent,e.abrupt("return",a.a.resolve(l));case 16:return e.prev=16,e.t0=e["catch"](6),e.abrupt("return",a.a.reject(e.t0));case 19:case"end":return e.stop()}},e,this,[[6,16]])}));function t(t,n,r,a,o,i){return e.apply(this,arguments)}return t}()};function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return window.postMessager.send({action:"meechat:eosAction",data:{action:e,param:t,contract:n}})}t["a"]=i},c375:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var r=n("8973"),a=n("081a");r["default"].use(a["a"]);var o=new a["a"]({routes:[{path:"/",alias:["/user/:id","/login","/other/:id","/me","/editMe","/editInfo/:type","/groupSet/:id","/invite/:inviteType","/packetSend","/packetGet/:id","/search","/discover"],name:"noChat",component:function(e){n.e("chunk-3028e170").then(function(){var t=[n("18d9")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/group/:id",name:"groupChat",component:function(e){Promise.all([n.e("chunk-e59b4412"),n.e("chunk-42e7d288")]).then(function(){var t=[n("7a9f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/pm/:id",name:"pmChat",component:function(e){Promise.all([n.e("chunk-e59b4412"),n.e("chunk-42e7d288")]).then(function(){var t=[n("7a9f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/hotGroup",name:"hotGroup",component:function(e){n.e("chunk-1e6a2ebb").then(function(){var t=[n("1749")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/relateGroup",name:"relateGroup",component:function(e){n.e("chunk-a7081a9a").then(function(){var t=[n("e479")];e.apply(null,t)}.bind(this)).catch(n.oe)}}]}),i=new a["a"]({routes:[{path:"/",alias:"/user/:id",name:"chatList",component:function(e){n.e("chunk-70ed3fb8").then(function(){var t=[n("a510")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/login",name:"login",component:function(e){n.e("chunk-0a2f1101").then(function(){var t=[n("387b")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/loginMee",name:"loginMee",component:function(e){n.e("chunk-90cf752e").then(function(){var t=[n("867f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/other/:id",name:"aboutOther",component:function(e){n.e("chunk-335f5c5d").then(function(){var t=[n("97e9")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/me",name:"aboutMe",component:function(e){n.e("chunk-2781551f").then(function(){var t=[n("c918")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/editMe",name:"editMe",component:function(e){Promise.all([n.e("chunk-38822a98"),n.e("chunk-6f498702")]).then(function(){var t=[n("3d61")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/editInfo/:type/:id?",name:"editInfo",component:function(e){n.e("chunk-acbed89a").then(function(){var t=[n("4584")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/group/:id",name:"groupChat",component:function(e){Promise.all([n.e("chunk-e59b4412"),n.e("chunk-7bbde94a")]).then(function(){var t=[n("d5e1")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/groupSet/:id",name:"groupSet",component:function(e){Promise.all([n.e("chunk-38822a98"),n.e("chunk-5aae9c76")]).then(function(){var t=[n("ffb4")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/pm/:id",name:"pmChat",component:function(e){Promise.all([n.e("chunk-e59b4412"),n.e("chunk-7bbde94a")]).then(function(){var t=[n("d5e1")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/invite/:inviteType/:id?",name:"invite",component:function(e){n.e("chunk-d3efe52c").then(function(){var t=[n("a36a")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/search",name:"search",component:function(e){Promise.all([n.e("chunk-1e6a2ebb"),n.e("chunk-6e987cd2")]).then(function(){var t=[n("4d7a")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/discover",name:"discover",component:function(e){Promise.all([n.e("chunk-1e6a2ebb"),n.e("chunk-2e7e4d8a")]).then(function(){var t=[n("5592")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/password",name:"password",component:function(e){n.e("chunk-f0006e14").then(function(){var t=[n("b9c7")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/relateGroup",name:"relateGroup",component:function(e){n.e("chunk-a7081a9a").then(function(){var t=[n("e479")];e.apply(null,t)}.bind(this)).catch(n.oe)}}]});i.beforeEach(function(e,t,n){if("/login"!==e.path&&"/loginMee"!==e.path){var r=localStorage.getItem("user_id"),a=localStorage.getItem("token");r&&a?n():n("/login")}else n()})},c62f:function(e,t,n){"use strict";var r=n("3729"),a=n.n(r);a.a},e332:function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("a700"),o=n.n(a);n("dcfb"),n("c3df");function i(){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:for(r in t=[],n=function(e){var n=new o.a(function(t,n){var r=h[e];fetch("https://".concat(r,"/v1/chain/get_info")).then(function(e){t(r)}).catch(function(e){n(e)})});t.push(n)},h)n(r);return e.next=5,o.a.race(t);case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c=n("33f8");function u(){return p.apply(this,arguments)}function p(){return p=Object(r["a"])(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t={protocol:"https",blockchain:"eos",port:"443"},!Object(c["s"])()){e.next=6;break}t["host"]="localnet.eosget.io",t["chainId"]="cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f",e.next=15;break;case 6:if("meetone"!=Object(c["r"])("eosType")){e.next=11;break}t["host"]="fullnode.meet.one",t["chainId"]="cfe6486a83bad4962f232d48003b1824ab5665c36778141034d75e57b956e422",e.next=15;break;case 11:return e.next=13,i();case 13:t["host"]=e.sent,t["chainId"]="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906";case 15:return e.abrupt("return",t);case 16:case"end":return e.stop()}},e,this)})),p.apply(this,arguments)}function d(){var e,t="https:"===document.location.protocol?"wss://":"ws://";return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?t+"test-ws.mee.chat":/^new[-.]/.test(window.location.host)?t+"new-ws.mee.chat":t+"ws.mee.chat",e}function l(){var e,t="https:"===document.location.protocol?"wss://":"ws://";return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?t+"test-ws-group.mee.chat":/^new[-.]/.test(window.location.host)?t+"new-ws-group.mee.chat":t+"ws-group.mee.chat",e}n.d(t,"b",function(){return u}),n.d(t,"c",function(){return d}),n.d(t,"a",function(){return l}),n.d(t,"d",function(){return h});var h={eoscannon:"mainnet.eoscannon.io",eosbeijing:"api.eosbeijing.one",eosys:"rpc.eosys.io",proxy:"proxy.eosnode.tools",eosio:"mainnet.eosio.sg",jeda:"api.jeda.one",oraclechain:"api.oraclechain.io",eosasia:"geo.eosasia.one"}},e9ca:function(e,t,n){"use strict";var r=n("7199"),a=n.n(r);function o(e){requestAnimationFrame(o),a.a.update(e)}if(requestAnimationFrame(o),"serviceWorker"in navigator){var i="/sw.js";navigator.serviceWorker.register(i).then(function(e){e.installing?console.log("Service worker installing"):e.waiting?console.log("Service worker installed"):e.active&&console.log("Service worker active"),e.addEventListener("updatefound",function(){if(navigator.serviceWorker.controller){var t=e.installing;t.onstatechange=function(){switch(console.log("installingWorker.state:"+t.state),t.state){case"installed":break;case"redundant":break;default:}}}}),navigator.serviceWorker&&navigator.serviceWorker.addEventListener("statechange",function(e){console.log("statechange: ",e.target.state)})}).catch(function(e){console.log("Registration failed with "+e)})}window.addEventListener("storage",function(e){"user_id"===e.key&&location.reload()});var s=null,c=null;function u(){s=document.getElementById("btnPwa"),s&&(s.style.display="block",s.addEventListener("click",function(){null!=c&&(c.prompt(),c.userChoice.then(function(e){console.log(e.outcome),"dismissed"===e.outcome?console.log("用户取消安装应用"):(console.log("用户安装了应用"),s.style.display="none")}),c=null)}))}window.addEventListener("beforeinstallprompt",function(e){return s||u(),c=e,e.preventDefault(),!1})}}]);