pc.4cc8c1cc.js 34 KB

1
  1. (function(t){function e(e){for(var i,s,a=e[0],c=e[1],u=e[2],h=0,d=[];h<a.length;h++)s=a[h],r[s]&&d.push(r[s][0]),r[s]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(t[i]=c[i]);l&&l(e);while(d.length)d.shift()();return o.push.apply(o,u||[]),n()}function n(){for(var t,e=0;e<o.length;e++){for(var n=o[e],i=!0,s=1;s<n.length;s++){var a=n[s];0!==r[a]&&(i=!1)}i&&(o.splice(e--,1),t=c(c.s=n[0]))}return t}var i={},s={pc:0,"chunk-cb34f022":0},r={pc:0,"chunk-cb34f022":0},o=[];function a(t){return c.p+"js/"+({}[t]||t)+"."+{"chunk-16c7788e":"435a1a7e","chunk-74a922ec":"75d6a583","chunk-352466e2":"fdd374fe","chunk-3c3559fc":"0f399dba","chunk-3d694970":"ad0e5512","chunk-4031c6b3":"0b1e3043","chunk-437e2b39":"9d30634e","chunk-66871504":"8a1d69f1","chunk-1d9b7d3a":"7a6ad702","chunk-1e160aad":"1a7361d6","chunk-392b6146":"e339a89c","chunk-b17cf818":"913b8d09","chunk-09f52bd0":"9c00bf68","chunk-580cf024":"14d7734a","chunk-5a6c5be1":"44dac6b5","chunk-60610c8a":"a47d6ec6","chunk-6361f770":"f496f1c3","chunk-6c021ec0":"66abd4ea","chunk-a81e4a76":"bbf68338","chunk-6f498702":"4911296f","chunk-b401ae72":"0dd96389","chunk-d42f0a14":"fca71a2d","chunk-e1cff4e2":"f3763875"}[t]+".js"}function c(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.e=function(t){var e=[],n={"chunk-16c7788e":1,"chunk-74a922ec":1,"chunk-352466e2":1,"chunk-3c3559fc":1,"chunk-3d694970":1,"chunk-4031c6b3":1,"chunk-66871504":1,"chunk-1d9b7d3a":1,"chunk-1e160aad":1,"chunk-392b6146":1,"chunk-b17cf818":1,"chunk-09f52bd0":1,"chunk-580cf024":1,"chunk-5a6c5be1":1,"chunk-60610c8a":1,"chunk-6361f770":1,"chunk-6c021ec0":1,"chunk-a81e4a76":1,"chunk-6f498702":1,"chunk-b401ae72":1,"chunk-e1cff4e2":1};s[t]?e.push(s[t]):0!==s[t]&&n[t]&&e.push(s[t]=new Promise(function(e,n){for(var i="css/"+({}[t]||t)+"."+{"chunk-16c7788e":"652db6b3","chunk-74a922ec":"4b0c5d76","chunk-352466e2":"33bf20c7","chunk-3c3559fc":"c581b33e","chunk-3d694970":"cd5067d4","chunk-4031c6b3":"16b86625","chunk-437e2b39":"31d6cfe0","chunk-66871504":"0c677439","chunk-1d9b7d3a":"2141a0c4","chunk-1e160aad":"9d966e19","chunk-392b6146":"2b7cc37a","chunk-b17cf818":"1737301f","chunk-09f52bd0":"ca822529","chunk-580cf024":"3e00a85d","chunk-5a6c5be1":"5efbb31d","chunk-60610c8a":"1eb38ece","chunk-6361f770":"e85683b9","chunk-6c021ec0":"2806d288","chunk-a81e4a76":"8bcff4db","chunk-6f498702":"a8887c6a","chunk-b401ae72":"94a16efd","chunk-d42f0a14":"31d6cfe0","chunk-e1cff4e2":"f84fbbfb"}[t]+".css",r=c.p+i,o=document.getElementsByTagName("link"),a=0;a<o.length;a++){var u=o[a],h=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(h===i||h===r))return e()}var d=document.getElementsByTagName("style");for(a=0;a<d.length;a++){u=d[a],h=u.getAttribute("data-href");if(h===i||h===r)return e()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=e,l.onerror=function(e){var i=e&&e.target&&e.target.src||r,o=new Error("Loading CSS chunk "+t+" failed.\n("+i+")");o.request=i,delete s[t],l.parentNode.removeChild(l),n(o)},l.href=r;var p=document.getElementsByTagName("head")[0];p.appendChild(l)}).then(function(){s[t]=0}));var i=r[t];if(0!==i)if(i)e.push(i[2]);else{var o=new Promise(function(e,n){i=r[t]=[e,n]});e.push(i[2]=o);var u,h=document.createElement("script");h.charset="utf-8",h.timeout=120,c.nc&&h.setAttribute("nonce",c.nc),h.src=a(t),u=function(e){h.onerror=h.onload=null,clearTimeout(d);var n=r[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),s=e&&e.target&&e.target.src,o=new Error("Loading chunk "+t+" failed.\n("+i+": "+s+")");o.type=i,o.request=s,n[1](o)}r[t]=void 0}};var d=setTimeout(function(){u({type:"timeout",target:h})},12e4);h.onerror=h.onload=u,document.head.appendChild(h)}return Promise.all(e)},c.m=t,c.c=i,c.d=function(t,e,n){c.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},c.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)c.d(n,i,function(e){return t[e]}.bind(null,i));return n},c.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return c.d(e,"a",e),e},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.p="//static.meechat.me/cdn/new.mee.chat/dist/",c.oe=function(t){throw console.error(t),t};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],h=u.push.bind(u);u.push=e,u=u.slice();for(var d=0;d<u.length;d++)e(u[d]);var l=h;o.push([6,"chunk-vendors","chunk-common"]),n()})({1749:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-view"},[n("div",{staticClass:"box"},[n("div",{staticClass:"box-hd"},[n("div",{staticClass:"title-wrap"},[t._v(t._s(t.$t("group.recommendGroup"))+"\n ")])]),n("div",{staticClass:"box-bd pub-scroll-box"},[n("ul",{staticClass:"list-group"},t._l(t.showHotList,function(e,i){return n("li",{key:i,staticClass:"group-item"},[n("div",{staticClass:"avatar-wrap",on:{click:function(n){return t.joinGroup(e.group_id,e.is_join)}}},[e.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:e.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.bgColorNum(e.group_id),attrs:{"data-name":e.group_title&&e.group_title.slice(0,2).toUpperCase()}}),1==e.is_auth?n("i",{staticClass:"icon-auth"}):t._e()]),n("div",{staticClass:"info"},[n("h3",{on:{click:function(n){return t.joinGroup(e.group_id,e.is_join)}}},[t._v(t._s(e.group_title))]),n("p",[n("i",{staticClass:"icon-group"}),t._v("\n "+t._s(e.member_num)+"\n ")]),n("el-button",{attrs:{type:"primary"},on:{click:function(n){return t.joinGroup(e.group_id,e.is_join)}}},[t._v(t._s(1==e.is_join?t.$t("group.enter"):"+ "+t.$t("group.join")))])],1)])}),0)])])])},s=[],r=(n("dc12"),n("5cf1"),n("ad09"),n("94c8")),o=n.n(r),a=n("8973"),c=n("bced");a["default"].component(o.a.name,o.a);var u={name:"hotGroup",mixins:[c["a"]]},h=u,d=(n("63ab"),n("fc05")),l=Object(d["a"])(h,i,s,!1,null,"46ea1e22",null);e["default"]=l.exports},"1a6c":function(t,e,n){},"24cd":function(t,e,n){},"2c53":function(t,e,n){},"3e04":function(t,e,n){"use strict";var i=n("469e"),s=n.n(i);s.a},"41f4":function(t,e,n){},"469e":function(t,e,n){},"4c01":function(t,e,n){"use strict";var i=n("830f"),s=n.n(i);s.a},"57d1":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pub-chat-item",class:{current:t.item.session_id==t.curSession,top:1==t.item.is_pin},on:{click:function(e){return t.changeSessionId(t.item)},contextmenu:function(e){return e.preventDefault(),t.onToolBtn(e)}}},[n("div",{staticClass:"avatar-wrap"},[t.item.unread>0&&1==t.item.is_mute?n("i",{staticClass:"mute mute-point"}):t.item.unread>0&&0==t.item.is_mute?n("i",{staticClass:"mute mute-num"},[t._v(t._s(t.item.unread))]):t._e(),t.item.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.item.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.bgColorNum(t.item.session_id),attrs:{"data-name":t.item.name&&t.item.name.slice(0,2).toUpperCase()}}),1==t.item.is_auth?n("i",{staticClass:"icon-auth"}):t._e()]),n("div",{staticClass:"info"},[n("h3",[1==t.item.is_group?n("i",{staticClass:"icon-group"}):t._e(),n("span",[t._v(t._s(t.item.name))])]),n("p",[t.item.unread>0&&1==t.item.is_mute?n("span",[t._v("["+t._s(t.item.unread)+t._s(t.$t("public.item"))+"]")]):t._e(),t.item.last_msg?[t.item.is_group?[t._v("\n "+t._s(t.item.last_msg.nick_name)+":"+t._s(0===t.item.last_msg.msg_type?t.item.cont:-1===t.item.last_msg.msg_type?t.$t("chat.revokeMsg"):"["+t.$t("chat.msgType["+(t.item.last_msg.msg_type-1)+"]")+"]")+"\n ")]:[t._v("\n "+t._s(0===t.item.last_msg.msg_type?t.item.cont:-1===t.item.last_msg.msg_type?""+(t.userId==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+t.$t("chat.revokeMsg"):"["+t.$t("chat.msgType["+(t.item.last_msg.msg_type-1)+"]")+"]")+"\n ")]]:t._e()],2),n("span",{staticClass:"time"},[t._v(t._s(t.handleUpdate(t.item.update_time_int)))]),1==t.item.is_mute?n("i",{staticClass:"icon-mute"}):t._e()]),t.item.session_id?n("ul",{directives:[{name:"show",rawName:"v-show",value:t.showToolbar,expression:"showToolbar"}],staticClass:"pub-pop-toolbar ext-session",style:{left:t.toolBarLeft,top:t.toolBarTop}},[n("li",{on:{click:function(e){return e.stopPropagation(),t.changePin(t.item.session_id,t.item.is_pin)}}},[t._v(t._s(1==t.item.is_pin?""+t.$t("public.cancel")+t.$t("chat.sticky"):t.$t("chat.sticky")))]),n("li",{on:{click:function(e){return e.stopPropagation(),t.changeMute(t.item.session_id,t.item.is_mute)}}},[t._v(t._s(1==t.item.is_mute?t.$t("group.cancelDisturb"):t.$t("group.doNotDisturb")))]),n("li",{on:{click:function(e){return e.stopPropagation(),t.delSession(t.item.session_id)}}},[t._v(t._s(t.$t("chat.deleteSession")))])]):t._e()])},s=[],r=(n("b5aa"),n("4457")),o=n("bd31"),a=n("52c1"),c=n("5975"),u=n("33f8"),h={name:"msgItem",props:{item:{type:Object}},data:function(){return{toolBarLeft:0,toolBarTop:0,showToolbar:!1,meechatType:Object(u["o"])()}},computed:Object(o["a"])({},Object(a["e"])(["curSession","userId"]),{userInfo:function(){return this.$store.state.userInfo}}),methods:{changeSessionId:function(t){var e=1==t.is_group?"/group/".concat(t.session_id):"/pm/".concat(t.session_id);this.$router.push({path:e})},bgColorNum:function(t){return Object(u["l"])(t,this.userId)},hideToolbar:function(t){!1!==this.showToolbar&&(this.showToolbar=!1,document.body.removeEventListener("click",this.hideToolbar,!1),document.body.removeEventListener("contextmenu",this.hideToolbar,!1))},getPagePos:function(t){var e=t,n=0,i=0;while(!/pub-chat-item/gi.test(e.getAttribute("class")))e=e.offsetParent;while(null!=e)n+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{actualX:n,actualY:i}},onToolBtn:function(t){var e=this;if(this.showToolbar)this.hideToolbar(t);else{var n="h5"==this.meechatType?window.innerWidth:276,i=100,s=this.getPagePos(t.target),r=s.actualX,o=t.pageX,a=o-r,c=n-i-20;this.toolBarLeft="".concat(a<c?a:c,"px"),setTimeout(function(){document.body.addEventListener("click",e.hideToolbar,!1),document.body.addEventListener("contextmenu",e.hideToolbar,!1)},0),this.showToolbar=!0}},changePin:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var i,s,r,o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=0==n?"setPin":"cancelPin",s=0==n?"updateSessionListByPin":"cancelSessionListByPin",t.next=4,c["a"].session[i]({session_id:e});case 4:r=t.sent,o=r.data.data,this.$store.commit("updatePin",n),this.hideToolbar(),this.$store.commit(s,{session_id:e,is_pin:o.is_pin,pin_time_int:o.pin_time_int});case 9:case"end":return t.stop()}},t,this)}));function e(e,n){return t.apply(this,arguments)}return e}(),changeMute:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e,n){var i,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return i=0==n?"setMute":"cancelMute",s=0==n?"updateSessionListByMute":"cancelSessionListByMute",t.next=4,c["a"].session[i]({session_id:e});case 4:this.hideToolbar(),this.$store.commit("updateMute",n),this.$store.commit(s,e);case 7:case"end":return t.stop()}},t,this)}));function e(e,n){return t.apply(this,arguments)}return e}(),delSession:function(t){var e=this;Object(u["f"])(this.$t("chat.closeSessionMsg")).then(function(){e.$store.commit("removeSessionListById",t),e.hideToolbar(),e.curSession==t&&(e.$store.commit("changeSessionId",0),e.$router.push({path:"/"}))})},handleUpdate:function(t){return Object(u["j"])(t,1,this)}}},d=h,l=(n("3e04"),n("fc05")),p=Object(l["a"])(d,i,s,!1,null,null,null);e["a"]=p.exports},6:function(t,e,n){t.exports=n("921e")},"63ab":function(t,e,n){"use strict";var i=n("2c53"),s=n.n(i);s.a},"7e42":function(t,e,n){"use strict";var i=n("41f4"),s=n.n(i);s.a},"830f":function(t,e,n){},"921e":function(t,e,n){"use strict";n.r(e);n("fd99"),n("ad09");var i=n("a0df"),s=n.n(i),r=(n("9dce"),n("d6e8"),n("b709"),n("e9fc"),n("8973")),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("div",{class:[t.pwa?"c-pwa":"","c-main"]},[t.toApp?n("div",{staticClass:"c-wrap"},[n("panel"),n("router-view")],1):n("div",{staticClass:"c-login"},[n("login-box")],1)]),t._m(0)])},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-copyright"},[n("span",[t._v("copyright © 2019 MeeChat.")])])}],c=(n("b5aa"),n("4457")),u=(n("46b5"),n("dcfb"),n("bd31")),h=n("33f8"),d=n("455d"),l=n("52c1"),p=n("1015"),m=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"c-panel"},[n("div",{staticClass:"c-panel-header"},[t.userInfo?n("div",{staticClass:"avatar-wrap",on:{click:t.$showUserInfo}},[t.userInfo.cover_photo?n("img",{attrs:{src:t.userInfo.cover_photo+"?imageview/0/w/180",alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.userInfo.user_id%9,attrs:{"data-name":t.userInfo.nick_name&&t.userInfo.nick_name.slice(0,2).toUpperCase()}})]):t._e(),t._m(0),n("div",{staticClass:"panel-setting"},[n("div",{class:["panel-nav-icon",{active:t.isShowSetting}],on:{click:function(e){return e.stopPropagation(),t.toggleLoginOut()}}}),n("ul",{class:["menu",{active:t.isShowSetting}]},[n("li",{staticClass:"item",on:{click:function(e){return e.stopPropagation(),t.handleGlobalMute(e)}}},[n("i",{class:["icon-msg","icon-msg"+t.openGlobalNotice]}),t._v(t._s(0==t.openGlobalNotice?t.$t("public.closeMsg"):t.$t("public.openMsg"))+"\n ")]),n("li",{staticClass:"item",on:{click:function(e){return e.stopPropagation(),t.handleFeedback(e)}}},[n("i",{staticClass:"icon-feedback"}),t._v(t._s(t.$t("public.feedback"))+"\n ")]),n("li",{staticClass:"item",on:{click:function(e){return e.stopPropagation(),t.changeLang(e)}}},[n("i",{staticClass:"icon-lang"}),t._v(t._s("en"==t.curLang?t.$t("public.chinese"):t.$t("public.english"))+"\n ")]),n("li",{staticClass:"item",on:{click:function(e){return e.stopPropagation(),t.handleLoginOut(e)}}},[n("i",{staticClass:"icon-logout"}),t._v(t._s(t.$t("public.quit"))+"\n ")])])])]),n("div",{staticClass:"c-panel-nav"},[n("div",{staticClass:"panel-searbar"},[n("div",{staticClass:"input-con"},[n("i",{staticClass:"el-icon-search"}),n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTxt,expression:"searchTxt"}],attrs:{type:"text",placeholder:t.$t("public.searchHotGroup")},domProps:{value:t.searchTxt},on:{input:[function(e){e.target.composing||(t.searchTxt=e.target.value)},function(e){return t.searchUser(e,t.sessionList)}]}})]),n("i",{staticClass:"el-icon-plus",on:{click:function(e){return t.$showInvite(1)}}})]),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isSearch,expression:"!isSearch"}],class:["group-recommand",{current:"0"==t.curSession}],on:{click:function(e){return t.$router.push("/hotGroup")}}},[n("i",{staticClass:"group-icon"}),n("p",{staticClass:"title"},[t._v(t._s(t.$t("chat.hotGroupRecommend"))),n("i",{staticClass:"el-icon-arrow-right"})])]),n("div",{staticClass:"chat-list pub-scroll-box"},[t.isSearch?[t._l(t.searchList,function(t){return n("session-item",{key:t.group_id,attrs:{item:t}})}),n("hot-group",{attrs:{searchTxt:t.searchTxt}})]:t._l(t.sessionList,function(t){return n("session-item",{key:t.group_id,attrs:{item:t}})})],2)])])},f=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"panel-ctrls"},[n("li",{staticClass:"current"},[n("i",{staticClass:"mee-icon-chat"})])])}],g=(n("0adb"),n("57d1")),b=n("1749"),v=n("8869"),k=n("5975"),_={name:"panel",mixins:[v["f"],v["a"],v["b"]],data:function(){return{searchTxt:"",isShowSetting:!1,openGlobalNotice:h["t"].getGlobalNotice()}},computed:Object(u["a"])({},Object(l["e"])({curSession:function(t){return t.curSession},userId:function(t){return t.userId},sessionList:function(t){return t.chat.sessionList},userInfo:function(t){return t.userInfo}})),components:{hotGroup:b["default"],sessionItem:g["a"]},methods:{toggleLoginOut:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isShowSetting=!!t&&!this.isShowSetting},handleLoginOut:function(){this.$store.commit("setUserInfo",null),this.$store.commit("initChatData"),this.$store.commit("initGroupData"),this.$store.dispatch("doScatterLogout"),this.$store.commit("chatAppLogin",!1),this.$store.commit("toApp",!1),this.isShowSetting=!1},handleFeedback:function(){var t=this;k["a"].base.feedback().then(function(e){var n=e.data,i=n.data.serverId,s=t.userId>i?"".concat(i,"-").concat(t.userId):"".concat(t.userId,"-").concat(i);t.addPanelSession(i,s),t.$store.commit("changeSessionId",s),t.$router.push({path:"/pm/".concat(s)}),t.isShowSetting=!1})},handleGlobalMute:function(){var t=0==this.openGlobalNotice?1:0;h["t"].setGlobalNotice(t,this)}},created:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.$store.dispatch("getSessionList"),t.next=3,this.$store.dispatch("getUserInfo");case 3:location.hash.match("user")&&this.$showUserInfo();case 4:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){var t=this;document.addEventListener("click",function(){t.toggleLoginOut(!1)})}},w=_,y=(n("9c28"),n("fc05")),$=Object(y["a"])(w,m,f,!1,null,"c3a4bf56",null),L=$.exports,C={name:"App",mixins:[d["a"]],components:{loginBox:p["a"],panel:L},computed:Object(u["a"])({},Object(l["e"])({isLogin:function(t){return t.chat.isLogin},toApp:function(t){return t.chat.toApp},curSession:function(t){return t.curSession},sessionList:function(t){return t.chat.sessionList}})),data:function(){return{pwa:"1"==Object(h["q"])("pwa")}},methods:{showUnreadNum:function(){var t=0;this.sessionList.forEach(function(e){0==e.is_mute&&(t+=Number(e.unread))}),h["t"].changeTitle(t>99?"99+":t)}},created:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:this.checkLocalLogin();case 1:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){var t=this,e=null;document.addEventListener("visibilitychange",function(){"hidden"!==document.visibilityState?(h["t"].changeTitle(0),e&&clearInterval(e)):(t.showUnreadNum(),e=setInterval(function(){t.showUnreadNum()},2e3))}),window.$router=this.$router}},I=C,S=(n("f682"),n("fc1f"),Object(y["a"])(I,o,a,!1,null,"63eb6840",null)),T=S.exports,x=n("1c04"),j=n("c375"),N=n("4bc7"),O=n("6032"),G=n("43e0"),P=n("5a09"),M=n("21f7"),E=n("8f20"),B=n("3488"),A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-wrapper",on:{click:function(t){t.stopPropagation()}}},[n("div",{staticClass:"pub-mask",on:{click:function(e){t.visible=!1}}}),n("div",{staticClass:"pub-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),n("div",{staticClass:"modal-bd"},[n("psw-setting")],1)])]):t._e()])},R=[];r["default"].component("psw-setting",function(){return n.e("chunk-6c021ec0").then(n.bind(null,"d030"))});var U={name:"loginPopup",data:function(){return{visible:!0}},computed:{},methods:{},created:function(){}},H=U,F=(n("4c01"),Object(y["a"])(H,A,R,!1,null,"08099d50",null)),W=F.exports,q=n("6103");W.install=function(t,e){var n,i=t.extend(W);t.prototype.$pswSetting=function(){n&&(document.body.removeChild(n.$el),n=null),n=new i({el:document.createElement("div"),computed:{$store:function(){return e}},i18n:q["a"],data:function(){return{}}}),document.body.appendChild(n.$el)}};var D=W,J=n("9729"),X=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-wrapper",on:{click:function(t){t.stopPropagation()}}},[n("div",{staticClass:"pub-mask",on:{click:function(e){t.visible=!1}}}),n("div",{staticClass:"pub-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),n("div",{staticClass:"modal-bd"},[n("groupTypeSetting")],1)])]):t._e()])},Y=[];r["default"].component("groupTypeSetting",function(){return n.e("chunk-580cf024").then(n.bind(null,"8eed"))});var z={name:"loginPopup",data:function(){return{visible:!0}},computed:{},methods:{},created:function(){}},K=z,Q=(n("7e42"),Object(y["a"])(K,X,Y,!1,null,"9e910f5a",null)),V=Q.exports;V.install=function(t,e){var n,i=t.extend(V);t.prototype.$setGroupType=function(){n&&(document.body.removeChild(n.$el),n=null),n=new i({el:document.createElement("div"),computed:{$store:function(){return e}},i18n:q["a"],data:function(){return{}}}),document.body.appendChild(n.$el)}};var Z=V,tt=n("8134"),et=n.n(tt),nt=n("7199"),it=n.n(nt);n("3537");function st(t){requestAnimationFrame(st),it.a.update(t)}r["default"].use(N["a"],x["a"],j["b"]),r["default"].use(O["a"],x["a"],q["a"]),r["default"].use(G["a"],x["a"],q["a"]),r["default"].use(P["a"],x["a"],j["b"]),r["default"].use(E["a"],x["a"]),r["default"].use(B["a"],x["a"]),r["default"].use(D,x["a"]),r["default"].use(J["a"]),r["default"].use(Z,x["a"]),r["default"].use(et.a),r["default"].use(M["a"]),r["default"].use(s.a),r["default"].config.productionTip=!1,new r["default"]({render:function(t){return t(T)},store:x["a"],i18n:q["a"],router:j["b"]}).$mount("#app"),requestAnimationFrame(st),"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(function(t){t.installing?console.log("Service worker installing"):t.waiting?console.log("Service worker installed"):t.active&&console.log("Service worker active"),t.addEventListener("updatefound",function(){if(navigator.serviceWorker.controller){var e=t.installing;e.onstatechange=function(){switch(console.log("installingWorker.state:"+e.state),e.state){case"installed":break;case"redundant":break;default:}}}}),navigator.serviceWorker&&navigator.serviceWorker.addEventListener("statechange",function(t){console.log("statechange: ",t.target.state)})}).catch(function(t){console.log("Registration failed with "+t)})},"9c28":function(t,e,n){"use strict";var i=n("d3e5"),s=n.n(i);s.a},bced:function(t,e,n){"use strict";n.d(e,"c",function(){return f}),n.d(e,"b",function(){return g}),n.d(e,"a",function(){return b});n("c9db"),n("ad09");var i=n("514e"),s=n.n(i),r=(n("3b70"),n("dfe5")),o=n.n(r),a=(n("dcfb"),n("0adb"),n("b5aa"),n("4457")),c=n("bd31"),u=n("5975"),h=n("52c1"),d=n("33f8"),l=n("8869"),p=n("c1f9"),m=n.n(p),f={computed:Object(c["a"])({},Object(h["e"])({myId:function(t){return t.userId},group:function(t){return t.group},curGroupId:function(t){return t.curSession},members:function(t){return t.group.members},sessionInfo:function(t){return t.group.sessionInfo},shareName:function(t){return t.group.shareName},adminList:function(t){return t.group.adminList},membersArray:function(t){return t.group.membersArray}}),{isAdmin:function(){return this.members&&this.members[this.myId]&&1==this.members[this.myId].is_admin},isCreator:function(){return this.group.creator==this.myId},isPrivate:function(){return this.$store.getters.isPrivate}}),mounted:function(){var t=this,e=this.$route.params.id;this.changeSessionId(e),this.isPrivate||this.group.groupId||(this.initGroup({userId:this.myId,groupId:e,useCache:!1}),this.getGroupInfo()),document.addEventListener("click",function(){if(t.$refs.chatSet){var e=t.$refs.chatSet.getAttribute("class");e.indexOf("move-left")>-1&&t.$emit("showCharSet",0)}})},data:function(){return{msgPush:!1,msgTop:!1,limitHeight:!0,isEdit:!1,newGroupName:"",newLink:"",newNotice:"",isEditLink:!1,editNotice:!1,editShareName:"",sharePath:"".concat(location.origin,"/s/"),isSearch:!1,searchList:[],searchTxt:"",meechatType:Object(d["o"])()}},methods:Object(c["a"])({},Object(h["d"])(["initGroup","changeSessionId","changeHotGroupStatus","removeSessionListById"]),Object(h["b"])(["updateSessionItem","getGroupInfo"]),{handleTitleBlur:function(){var t=this;this.isEdit=!1,this.newGroupName.length&&u["a"].group.changeTitle({group_id:this.curGroupId,title:this.newGroupName}).then(function(e){e.data;t.updateSessionItem({sessionId:t.curGroupId,data:{name:t.newGroupName}}),t.$store.commit("updateGroup",{key:"groupName",data:t.newGroupName})})},handleTitleFocus:function(){this.isEdit=!0,this.newGroupName=this.group.groupName},handleShowAll:function(){this.limitHeight||(this.$refs.scrollWrap.scrollTop=0),this.limitHeight=!this.limitHeight},handleLinkBlur:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.isEditLink=!1,!this.editShareName.match(/^\d{1,}$/)){t.next=4;break}return this.$showTips("分享链接不能是纯数字"),t.abrupt("return");case 4:if(this.editShareName.match(/^(\w|.){1,}$/)){t.next=7;break}return this.$showTips("分享链接只能是英文字母,数字和 . 的组合"),t.abrupt("return");case 7:return t.next=9,Object(d["f"])("分享链接只能被修改一次,确认修改为:".concat(this.sharePath+this.editShareName),"提示").catch(function(t){});case 9:u["a"].group.changeName({group_id:this.curGroupId,name:this.editShareName}).then(function(){e.$store.commit("updateGroup",{key:"shareName",data:e.editShareName})});case 10:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),handleLinkFocus:function(){this.isEditLink=!0,this.editShareName=this.shareName},handleNotice:function(){var t=this;u["a"].group.changeNotice({group_id:this.curGroupId,notice:this.newNotice}).then(function(){t.$showTips("修改成功"),t.editNotice=!1,t.$store.commit("updateGroup",{key:"groupNotice",data:t.newNotice})})},handleGroudMgr:function(){this.$emit("handleShowGroudMgr",1)},handleOpenNotice:function(){this.editNotice=!0,this.newNotice=this.group.groupNotice},copyLink:function(t){var e=this,n=document.location.protocol+t;this.$copyText(n).then(function(t){e.$showTips("复制成功")})},changePin:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(e){var n,i,s,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=1==e?"setPin":"cancelPin",i=1==e?"updateSessionListByPin":"cancelSessionListByPin",t.next=4,u["a"].session[n]({session_id:this.curGroupId});case 4:s=t.sent,r=s.data.data,this.$store.commit("updatePin",e),this.$store.commit(i,{session_id:this.curGroupId,is_pin:r.is_pin,pin_time_int:r.pin_time_int});case 8:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),changeMute:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(e){var n,i;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=1==e?"setMute":"cancelMute",i=1==e?"updateSessionListByMute":"cancelSessionListByMute",t.next=4,u["a"].session[n]({session_id:this.curGroupId});case 4:this.$store.commit("updateMute",e),this.$store.commit(i,this.curGroupId);case 6:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),leaveGroup:function(){var t=this;Object(d["f"])("确认退出该群聊?").then(function(){t.$emit("showLoadingRoom",!0),u["a"].group.leaveGroup({group_id:t.curGroupId}).then(function(){t.changeHotGroupStatus({groupId:t.curGroupId,isJoin:0}),t.removeSessionListById(t.curGroupId),t.$showTips("已退出该群聊"),t.$emit("showLoadingRoom",!1),"h5"==t.meechatType&&t.$router.go(-2)}).catch(function(){t.$emit("showLoadingRoom",!1)})})},searchUser:function(){var t=this;if(this.searchTxt.trim())if(this.membersArray.length<this.group.membersNum)u["a"].group.searchMember({group_id:this.group.groupId,keyword:this.searchTxt}).then(function(e){var n=e.data;t.searchList=n.data});else{var e=this.searchTxt;this.searchList=this.membersArray.filter(function(t){var n,i;return n=!!t.user_name&&t.user_name.indexOf(e)>-1,i=!!t.nick_name&&t.nick_name.indexOf(e)>-1,n||i})}}})},g={mixins:[l["e"]],data:function(){return{curItemIndex:0,checkList:[],groupName:"",isLoading:!1,showNum:0,meechatType:Object(d["o"])()}},computed:Object(c["a"])({checkedNum:function(){return this.checkList.filter(function(t){return t.isChecked}).length}},Object(h["e"])({userId:function(t){return t.userId},friendList:function(t){return t.chat.friendList},groupId:function(t){return t.group.groupId},group:function(t){return t.group},members:function(t){return t.group.members},membersArray:function(t){return t.group.membersArray},membersNum:function(t){return t.group.membersNum},adminList:function(t){return t.group.adminList}}),{inviteList:function(){return this.checkList.filter(function(t){return t.isChecked}).map(function(t){return t.user_id}).join(",")},resultList:function(){return this.checkList&&this.checkList.filter(function(t){return t.isChecked})||[]}}),methods:Object(c["a"])({},Object(h["b"])(["getGroupInfo"]),Object(h["d"])(["initGroup","changeSessionId"]),{getItemByUid:function(t){var e=this;return this.checkList.filter(function(n,i){return n.user_id==t&&(e.curItemIndex=i),n.user_id==t})[0]},changeState:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getItemByUid(t);n.isChoosed||(4==this.inviteType&&e&&this.adminList.length+this.checkedNum>5?this.$showTips(this.$t("group.groupMgrMostTips")):(5==this.inviteType&&this.checkList.forEach(function(t){t.isChecked=!1}),n["isChecked"]=e,this.$set(this.checkList,this.curItemIndex,n)))},changeStateForH5:function(t){var e=this.getItemByUid(t),n=!e.isChecked;4==this.inviteType&&n&&this.adminList.length+this.checkedNum>5?this.$showTips(this.$t("group.groupMgrMostTips")):(5==this.inviteType&&this.checkList.forEach(function(t){t.isChecked=!1}),e["isChecked"]=n,this.$set(this.checkList,this.curItemIndex,e))},initList:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:t.t0=this.inviteType,t.next=1===t.t0?3:2===t.t0?7:3===t.t0?11:4===t.t0?11:5===t.t0?11:13;break;case 3:return t.next=5,this.$store.dispatch("getFriendList");case 5:return this.checkList=this.friendList,t.abrupt("break",13);case 7:return t.next=9,this.$store.dispatch("getFriendList");case 9:return this.checkList=m.a.filter(this.friendList,function(t){return!e.members[t.user_id]}),t.abrupt("break",13);case 11:return this.checkList=this.membersArray,t.abrupt("break",13);case 13:this.checkList=m.a.filter(this.checkList,function(t){return t.isChecked=!1,t.isChoosed=!1,t.isShow=!0,4==e.inviteType&&1==t.is_admin&&(t.isChoosed=!0),t.user_id!=e.userId}),this.showNum=this.checkList.length;case 15:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),optSubmit:function(){switch(this.inviteType){case 1:this.createGroup();break;case 2:this.invitesMember();break;case 3:this.removesMember();break;case 4:this.addAdmin();break;case 5:this.changeCreator();break}},createGroup:function(){var t=this;this.groupName.length>16?this.$showTips(this.$t("group.groupNameLengthTips")):this.groupName?(this.isLoading=!0,u["a"].group.createGroup({group_title:this.groupName,user_id_list:this.inviteList}).then(function(e){var n=e.data;t.$showTips(""),t.$store.commit("addSessionItem",n.data),t.$router.push("/group/".concat(n.data.session_id)),"h5"!=t.meechatType&&t.hidePopup()})):o()({message:this.$t("group.groupNameTips"),type:"warning"})},invitesMember:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.next=3,u["a"].group.invites({user_ids:this.inviteList,group_id:this.groupId});case 3:return t.next=5,this.getGroupInfo();case 5:"h5"==this.meechatType?this.$router.go(-1):this.hidePopup();case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),removesMember:function(){var t=Object(a["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.next=3,u["a"].group.removes({user_ids:this.inviteList,group_id:this.groupId});case 3:return t.next=5,this.getGroupInfo();case 5:"h5"==this.meechatType?this.$router.go(-1):this.hidePopup();case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),addAdmin:function(){var t=this;this.isLoading=!0,u["a"].group.addAdmin({user_ids:this.inviteList,group_id:this.groupId}).then(function(e){e.data;t.getGroupInfo(),"h5"==t.meechatType?t.$router.go(-1):t.hidePopup()})},changeCreator:function(){var t=this;if(!(this.checkedNum<=0)){var e=this.checkList[this.curItemIndex],n=e.nick_name||e.user_name;s.a.confirm("".concat(this.$t("group.groupMgrComfime")," ").concat(n)).then(function(){t.isLoading=!0,u["a"].group.changeCreator({new_creator:t.inviteList,group_id:t.groupId}).then(function(e){e.data;"h5"==t.meechatType?t.$router.go(-1):t.hidePopup(),t.$store.dispatch("getGroupInfo"),o()({message:"".concat(t.$t("group.groupMgrResult")," ").concat(n),type:"warning"})})}).catch(function(t){console.log(t)})}}}),mounted:function(){this.initList()}},b={props:{searchTxt:String},data:function(){return{}},components:{},computed:Object(c["a"])({},Object(h["e"])(["hotList"]),Object(h["b"])(["getHotList"]),{showHotList:function(){var t=this.searchTxt&&this.searchTxt.trim();if(!t)return this.hotList;var e=this.hotList.filter(function(e){var n=e.group_title&&e.group_title.toLocaleLowerCase()||"";return n.match(t)});return e}}),methods:Object(c["a"])({},Object(h["d"])(["changeHotGroupStatus"]),{bgColorNum:function(t){return Object(d["l"])(t,this.userId)},joinGroup:function(t,e){var n=this;1==e?this.$router.push("/group/".concat(t)):u["a"].group.joinGroup({group_id:t}).then(function(){n.changeHotGroupStatus({groupId:t,isJoin:1}),n.$router.push("/group/".concat(t))})}}),mounted:function(){this.$store.commit("changeSessionId","0"),this.$store.dispatch("getHotList")}}},d3e5:function(t,e,n){},f682:function(t,e,n){"use strict";var i=n("24cd"),s=n.n(i);s.a},fc1f:function(t,e,n){"use strict";var i=n("1a6c"),s=n.n(i);s.a}});