Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
9254 lines (9253 sloc) 316 KB
webpackJsonp([1], [function(e, exports, t) {
e.exports = t(262) + t(277);
}
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function(e, exports, t) {
e.exports = t.p + "/static/img/3wOU-7F.ico"
}
, function(e, exports, t) {
e.exports = t.p + "/static/img/qMUjOdv.png"
}
, function(e, exports, t) {
e.exports = t.p + "/static/img/2kAS7mD.png"
}
, function(e, exports) {}
, , , , , , , , , , , function(e, exports, t) {
e.exports = t.p + "/static/img/a7Nznaj.gif"
}
, , , , , , , , , , , function(e, exports) {}
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function(e, exports, t) {
e.exports = t.p + "/static/img/2z6meE1.gif"
}
, function(e, exports, t) {
e.exports = t.p + "/static/img/2KriyDK.png"
}
, function(e, exports, t) {
e.exports = t.p + "/static/img/25x4Rho.gif"
}
, function(e, exports, t) {
window.MMSource = {
copySwfPath: t(263),
jplayerSwfPath: t(264)
},
t(265),
t(269),
t(270),
t(271),
t(272),
t(273),
t(274),
t(275),
t(276)
}
, function(e, exports, t) {
e.exports = t.p + "/static/res/1OM7Ut2.swf"
}
, function(e, exports, t) {
e.exports = t.p + "/static/res/GIqH2cS.swf"
}
, , , , , , , , , , , , , function(e, exports, t) {
angular.module("Controllers", []),
t(278),
t(279),
t(280),
t(282),
t(283),
t(285),
t(286),
t(287),
t(288),
t(289),
t(290),
t(291),
angular.module("Services", []),
t(292),
t(293),
t(294),
t(295),
t(296),
t(297),
t(298),
t(299),
t(300),
t(301),
t(302),
t(303),
t(304),
t(305),
t(306),
t(307),
t(308),
t(310),
t(311),
t(312),
t(313),
angular.module("Directives", []),
t(314),
t(315),
t(316),
t(317),
t(318),
t(319),
t(320),
t(321),
t(322),
t(323),
t(324),
t(325),
t(326),
t(327),
t(328),
t(329),
t(330),
t(331),
t(332),
t(333),
t(334),
t(335),
t(336),
t(337),
t(338),
t(339),
angular.module("Filters", []),
t(341),
t(342),
function() {
"use strict";
angular.module("webwxApp", ["ui.router", "ngAnimate", "Services", "Controllers", "Directives", "Filters", "ngDialog", "jQueryScrollbar", "ngClipboard", "exceptionOverride"]).run(["$rootScope", "$state", "$stateParams", function(e, t, a) {
e.$state = t,
e.$stateParams = a
}
]).factory("httpInterceptor", ["accountFactory", function(e) {
return {
request: function(t) {
if (!t.cache && t.url.indexOf(".html") < 0 && (t.params || (t.params = {}),
t.params.pass_ticket = e.getPassticket()),
t.url.indexOf(".html") < 0) {
var a = location.href.match(/(\?|&)lang=([^&#]+)/);
if (a) {
var n = a[2];
t.params || (t.params = {}),
t.params.lang = n
}
}
return t
}
}
}
]).config(["$sceProvider", "$httpProvider", "$logProvider", "$stateProvider", "$urlRouterProvider", "ngClipProvider", function(e, t, a, n, i, o) {
e.enabled(!1),
a.debugEnabled(!0),
o.setPath(window.MMSource.copySwfPath),
t.interceptors.push("httpInterceptor");
var r = document.domain.indexOf("qq.com") < 0;
r || (document.domain = "qq.com");
var c;
n.state("chat", {
url: "",
params: {
userName: ""
},
views: {
navView: {
controller: ["$stateParams", "chatFactory", "contactFactory", "stateManageService", "$rootScope", function(e, t, a, n, i) {
function o() {
var n = a.getContact(e.userName, "", !0);
i.$broadcast("root:statechange"),
t.setCurrentUserName(e.userName),
t.addChatList([n || {
FromUserName: e.userName
}]),
e.userName = ""
}
if (n.change("navChat:active", !0),
e.userName) {
var r = a.getContact(e.userName, "", !0);
r ? o() : a.addBatchgetContact({
UserName: e.userName,
ChatRoomId: ""
}, !0).then(function(e) {
o()
}, function(e) {})
}
}
]
},
contentView: {
templateUrl: "contentChat.html",
controller: "contentChatController"
}
}
}).state("contact", {
url: "",
views: {
navView: {
controller: ["stateManageService", function(e) {
e.change("navContact:active", !0)
}
]
},
contentView: {
templateUrl: "contentContact.html",
controller: "contentContactController"
}
}
}).state("read", {
url: "",
params: {
readItem: ""
},
views: {
navView: {
controller: ["stateManageService", function(e) {
e.change("navRead:active", !0)
}
]
},
contentView: {
templateUrl: "contentRead.html",
controller: ["$scope", "$stateParams", "subscribeMsgService", "mmpop", function(e, t, a, n) {
if (t.readItem)
c = e.readItem = t.readItem;
else {
var i = a.getSubscribeMsgs()[0];
e.readItem = c || i && i.MPArticleList[0]
}
e.optionMenu = function() {
n.toggleOpen({
templateUrl: "readMenu.html",
container: angular.element(document.querySelector(".read_list_header")),
controller: "readMenuController",
singletonId: "mmpop_reader_menu",
className: "reader_menu"
})
}
}
]
}
}
})
}
]),
angular.bootstrap(document, ["webwxApp"])
}()
}
, function(e, exports) {
!function() {
"use strict";
location.href.indexOf("dev.web") < 0 ? angular.module("exceptionOverride", []).factory("$exceptionHandler", [function() {
return function(e, t) {
throw window._errorHandler && window._errorHandler(e),
e
}
}
]) : angular.module("exceptionOverride", []),
angular.module("Controllers").controller("appController", ["$rootScope", "$scope", "$timeout", "$log", "$state", "$window", "ngDialog", "mmpop", "appFactory", "loginFactory", "contactFactory", "accountFactory", "chatFactory", "confFactory", "contextMenuFactory", "notificationFactory", "utilFactory", "reportService", "monitorService", "actionTrack", "surviveCheckService", "subscribeMsgService", "stateManageService", function(e, t, a, n, i, o, r, c, s, l, d, f, u, m, g, p, h, M, v, y, b, C, w) {
function S() {
return d.pickContacts(["friend", "chatroom"], {
chatroom: {
keyword: t.keyword,
isNewArray: !0
},
friend: {
keyword: t.keyword,
isNewArray: !0,
isWithoutBrand: !0,
showFriendHeader: !0
}
}, !0).result
}
function T() {
var e = A;
e && setTimeout(function() {
var t = (e[0].clientHeight - e.find(".ngdialog-content").height()) / 2;
e.css("paddingTop", t)
}, 20)
}
function N() {
t.isLoaded = !0,
t.isUnLogin = !1,
M.report(M.ReportType.timing, {
timing: {
initStart: Date.now()
}
}),
s.init().then(function(n) {
if (h.log("initData", n),
n.BaseResponse && "0" != n.BaseResponse.Ret)
return void (l.timeoutDetect(n.BaseResponse.Ret) || (r.openConfirm({
className: "default ",
templateUrl: "comfirmTips.html",
controller: ["$scope", function(e) {
e.title = _("02d9819"),
e.content = _("0d2fc2c"),
M.report(M.ReportType.initError, {
text: "程序初始化失败,点击确认刷新页面",
code: n.BaseResponse.Ret,
cookie: document.cookie
}),
e.callback = function() {
document.location.reload(!0)
}
}
]
}),
v.report(v.INIT_EXCEPTION_COUNT, 1)));
f.setUserInfo(n.User),
f.setSkey(n.SKey),
f.setSyncKey(n.SyncKey),
d.addContact(n.User),
d.addContacts(n.ContactList),
u.initChatList(n.ChatSet),
u.notifyMobile(f.getUserName(), m.StatusNotifyCode_INITED),
C.init(n.MPSubscribeMsgList),
e.$broadcast("root:pageInit:success"),
h.setCheckUrl(f),
h.log("getUserInfo", f.getUserInfo()),
t.$broadcast("updateUser"),
M.report(M.ReportType.timing, {
timing: {
initEnd: Date.now()
}
});
var i = n.ClickReportInterval || 3e5;
setTimeout(function e() {
y.report(),
setTimeout(e, i)
}, i),
a(function() {
function e(a) {
d.initContact(a).then(function(a) {
d.addContacts(a.MemberList),
M.report(M.ReportType.timing, {
timing: {
initContactEnd: Date.now()
},
needSend: !0
}),
t <= 16 && a.Seq && 0 != a.Seq && (t++,
e(a.Seq))
})
}
M.report(M.ReportType.timing, {
timing: {
initContactStart: Date.now()
}
});
var t = 1;
e(0)
}, 0),
t.account = d.getContact(f.getUserName()),
E()
})
}
function E() {
t.debug && (x && a.cancel(x),
b.start(4e4),
x = a(function() {
s.syncCheck().then(function(e) {
return b.start(5e3),
e
}, function(e) {
return b.start(2e3),
e
}).then(G, I)
}, m.TIMEOUT_SYNC_CHECK))
}
function G(e) {
h.log("syncCheckHasChange", e);
try {
f.setSyncKey(e.SyncKey),
f.setSyncCheckKey(e.SyncCheckKey),
f.updateUserInfo(e.Profile, function() {}),
angular.forEach(e.DelContactList, function(e, t) {
u.deleteChatList(e.UserName),
u.deleteChatMessage(e.UserName),
d.deleteContact(e),
u.getCurrentUserName() == e.UserName && u.setCurrentUserName("")
}),
angular.forEach(e.ModContactList, function(e, t) {
d.addContact(e)
}),
angular.forEach(e.AddMsgList, function(e, t) {
u.messageProcess(e)
})
} catch (e) {
e.other = {
reason: "throw err when syncChackHasChange"
},
window._errorHandler && window._errorHandler(e)
} finally {
E()
}
}
function I(e) {
E()
}
function k(e) {
var t = h.getCookie("last_wxuin") || ""
, a = parseInt(h.getCookie("login_frequency") || 1);
t !== e ? a = 1 : a += 1,
h.setCookie("login_frequency", a, 2),
h.setCookie("last_wxuin", e, 2),
h.getLocalStorage().setItem("userAvatar", window.userAvatar)
}
1 == Math.floor(100 * Math.random()) && v.report(v.PV, 1);
window._appTiming = {};
i.go("chat"),
e.CONF = m,
t.isUnLogin = !window.MMCgi.isLogin,
t.debug = !0,
t.isShowReader = /qq\.com/gi.test(location.href),
window.MMCgi.isLogin && (N(),
h.browser.chrome && !MMDEV && (window.onbeforeunload = function(e) {
return e = e || window.event,
e && (e.returnValue = "关闭浏览器聊天内容将会丢失。"),
"关闭浏览器聊天内容将会丢失。"
}
)),
t.$on("newLoginPage", function(e, t) {
f.setSkey(t.SKey),
f.setSid(t.Sid),
f.setUin(t.Uin),
f.setPassticket(t.Passticket),
N(),
k(t.Uin)
});
var P, U;
t.search = function(e) {
P && a.cancel(P),
P = a(function() {
return t.keyword ? (U && U.close(),
void (U = c.open({
templateUrl: "searchList.html",
controller: ["$rootScope", "$scope", "$state", function(e, t, a) {
t.$watch(function() {
return d.contactChangeFlag
}, function(e) {
t.allContacts.length = 0,
t.allContacts.push.apply(t.allContacts, S())
}),
t.clickUserCallback = function(n) {
n.UserName && (a.go("chat", {
userName: n.UserName
}),
t.closeThisMmPop(),
e.$broadcast("root:searchList:cleanKeyWord"))
}
}
],
scope: {
keyword: t.keyword,
allContacts: S(),
heightCalc: function(e) {
return "header" === e.type ? 31 : 60
}
},
className: "recommendation",
autoFoucs: !1,
container: angular.element(document.querySelector("#search_bar"))
}))) : void (U && U.close())
}, 200)
}
,
t.searchKeydown = function(t) {
switch (t.keyCode) {
case m.KEYCODE_ARROW_UP:
U && U.isOpen() && e.$broadcast("root:searchList:keyArrowUp"),
t.preventDefault(),
t.stopPropagation();
break;
case m.KEYCODE_ARROW_DOWN:
U && U.isOpen() && e.$broadcast("root:searchList:keyArrowDown"),
t.preventDefault(),
t.stopPropagation();
break;
case m.KEYCODE_ENTER:
U && U.isOpen() && e.$broadcast("root:searchList:keyEnter"),
t.preventDefault(),
t.stopPropagation()
}
}
,
t.$on("root:searchList:cleanKeyWord", function(e) {
t.keyword = ""
});
var A;
t.$on("ngDialog.opened", function(e, t) {
w.change("dialog:open", !0),
A = t,
T()
}),
t.$on("ngDialog.closed", function(e, t) {
w.change("dialog:open", !1),
A = null
}),
$(window).on("resize", function(e) {
T()
}),
t.appClick = function(e) {
t.$broadcast("app:contextMenu:hide", e)
}
;
var F, V = $(document.body);
V.on("dragenter", function(e) {
var t = e.originalEvent;
F = t.target,
t.dataTransfer.dropEffect = "none",
V.addClass("drop-enter"),
t.stopPropagation(),
t.preventDefault()
}),
V.on("dragleave", function(e) {
var t = e.originalEvent;
t.dataTransfer.dropEffect = "none",
F === t.target && V.removeClass("drop-enter"),
t.stopPropagation(),
t.preventDefault()
}),
V.on("dragover", function(e) {
var t = e.originalEvent;
t.dataTransfer.dropEffect = "none",
t.stopPropagation(),
t.preventDefault()
}),
V.on("drop", function(e) {
var t = e.originalEvent;
t.dataTransfer.dropEffect = "none",
t.stopPropagation(),
t.preventDefault()
}),
t.showContextMenu = function(e) {
t.$broadcast("app:contextMenu:show", e)
}
,
t.toggleSystemMenu = function(e) {
c.toggleOpen({
templateUrl: "systemMenu.html",
top: 60,
left: 85,
container: angular.element(document.querySelector(".panel")),
controller: "systemMenuController",
singletonId: "mmpop_system_menu",
className: "system_menu"
})
}
,
t.showProfile = function(e) {
if (t.account) {
var a = t.account
, n = e.pageY + 25
, o = e.pageX + 6;
c.open({
templateUrl: "profile_mini.html",
className: "profile_mini_wrap scale-fade",
top: n,
left: o,
blurClose: !0,
singletonId: "mmpop_profile",
controller: ["$scope", function(e) {
e.contact = a,
e.addUserContent = "",
e.isShowSendBox = !1,
e.chat = function(t) {
i.go("chat", {
userName: t
}),
e.closeThisMmPop()
}
}
]
})
}
}
,
t.dblclickChat = function() {
t.$broadcast("app:chat:dblclick")
}
,
t.requestPermission = function() {
p.requestPermission(function() {
h.log("请求权限了...")
})
}
,
b.callback(E);
var x
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("loginController", ["$scope", "loginFactory", "utilFactory", "reportService", "monitorService", function(e, t, a, n, i) {
function o(c) {
switch (c.code) {
case 200:
t.newLoginPage(c.redirect_uri).then(function(t) {
var o = t.match(/<ret>(.*)<\/ret>/)
, r = t.match(/<script>(.*)<\/script>/)
, c = t.match(/<skey>(.*)<\/skey>/)
, s = t.match(/<wxsid>(.*)<\/wxsid>/)
, l = t.match(/<wxuin>(.*)<\/wxuin>/)
, d = t.match(/<pass_ticket>(.*)<\/pass_ticket>/)
, f = t.match(/<message>(.*)<\/message>/)
, u = t.match(/<redirecturl>(.*)<\/redirecturl>/);
return u ? void (window.location.href = u[1]) : o && "0" != o[1] ? (alert(f && f[1] || "登陆失败"),
i.report(i.AUTH_FAIL_COUNT, 1),
void location.reload()) : (e.$emit("newLoginPage", {
Ret: o && o[1],
SKey: c && c[1],
Sid: s && s[1],
Uin: l && l[1],
Passticket: d && d[1],
Code: r
}),
void (a.getCookie("webwx_data_ticket") || n.report(n.ReportType.cookieError, {
text: "webwx_data_ticket 票据丢失",
cookie: document.cookie
})))
});
break;
case 201:
e.isScan = !0,
n.report(n.ReportType.timing, {
timing: {
scan: Date.now()
}
}),
t.checkLogin(e.uuid).then(o, function(t) {
!t && window.checkLoginPromise && (e.isBrokenNetwork = !0)
});
break;
case 408:
t.checkLogin(e.uuid).then(o, function(t) {
!t && window.checkLoginPromise && (e.isBrokenNetwork = !0)
});
break;
case 400:
case 500:
case 0:
var s = a.getCookie("refreshTimes") || 0;
s < 5 ? (s++,
a.setCookie("refreshTimes", s, .5),
document.location.reload()) : e.isNeedRefresh = !0;
break;
case 202:
e.isScan = !1,
e.isAssociationLogin = !1,
a.setCookie("login_frequency", 0, 2),
window.checkLoginPromise && (window.checkLoginPromise.abort(),
window.checkLoginPromise = null),
r()
}
e.code = c.code,
e.userAvatar = c.userAvatar,
a.log("get code", c.code)
}
function r() {
t.getUUID().then(function(i) {
a.log("login", i),
e.uuid = i,
e.qrcodeUrl = "https://login.weixin.qq.com/qrcode/" + i,
e.code = 0,
e.isScan = !1,
e.isIPad = a.isIPad,
e.isMacOS = a.isMacOS,
e.isWindows = a.isWindows,
e.lang = a.queryParser().lang || "zh_CN";
var r = !1;
n.report(n.ReportType.timing, {
timing: {
qrcodeStart: Date.now()
}
}),
setTimeout(function() {
r || n.report(n.ReportType.picError, {
text: "qrcode can not load",
src: e.qrcodeUrl
})
}, 3e3),
e.qrcodeLoad = function() {
r = !0,
n.report(n.ReportType.timing, {
timing: {
qrcodeEnd: Date.now()
}
})
}
,
t.checkLogin(i, 1).then(o, function(t) {
!t && window.checkLoginPromise && (e.isBrokenNetwork = !0)
})
}, function(t) {
t || (e.isBrokenNetwork = !0)
})
}
function c() {
t.checkLogin(e.uuid, 1).then(o, function(t) {
!t && window.checkLoginPromise && (e.isBrokenNetwork = !0)
})
}
if ($(".lang .lang-item").click(function(e) {
$("script").remove(),
location.href = e.target.href,
e.preventDefault()
}),
!window.MMCgi.isLogin) {
e.isAssociationLogin = parseInt(a.getCookie("login_frequency") || 0) >= 2,
e.isWaitingAsConfirm = !1,
e.isNeedRefresh = !1,
e.isRotateLoading = !1,
e.isBrokenNetwork = !1;
var s;
e.isAssociationLogin && (e.userAvatar = a.getLocalStorage().getItem("userAvatar")),
e.associationLogin = function() {
var n = a.getCookie("last_wxuin");
e.isWaitingAsConfirm = !0,
t.associationLogin(n).then(function(t) {
e.uuid = t.uuid,
c()
}, function(t) {
t ? (e.isAssociationLogin = !1,
a.setCookie("login_frequency", 0, 2),
r(),
i.report(i.ASSOCIATION_AUTH_FAIL_COUNT, 1)) : e.isBrokenNetwork = !0
}),
s && clearTimeout(s),
i.report(i.ASSOCIATION_AUTH_COUNT, 1)
}
,
e.qrcodeLogin = function() {
e.isAssociationLogin && (e.isAssociationLogin = !1,
a.setCookie("login_frequency", 0, 2),
window.checkLoginPromise && (window.checkLoginPromise.abort(),
window.checkLoginPromise = null),
r())
}
,
e.refreshQrcode = function() {
e.isRotateLoading = !0,
setTimeout(function() {
r(),
e.isRotateLoading = !1,
e.isNeedRefresh = !1
}, 1200)
}
,
e.qrcodeException = function() {
i.report(i.QRCODE_EXCEPTION_COUNT, 1)
}
,
window.MMCgi.isLogin || e.isAssociationLogin ? s = setTimeout(function() {
e.qrcodeLogin()
}, 3e5) : r()
}
}
])
}()
}
, function(e, exports, t) {
!function() {
"use strict";
angular.module("Controllers").controller("contentChatController", ["$scope", "$timeout", "$state", "$log", "$document", "$compile", "chatFactory", "accountFactory", "contactFactory", "appFactory", "confFactory", "utilFactory", "chatroomFactory", "mmpop", "ngDialog", "preview", "reportService", "mmHttp", "emojiFactory", function(e, a, n, i, o, r, c, s, l, d, f, u, m, g, p, h, M, v, y) {
function b(t) {
var n = e.currentContact = l.getContact(t);
if (n && (e.unreadMessageCount = n.unreadCount,
n.unreadCount = 0),
e.isChangeUserFlag = !0,
e.currentUser = t,
e.chatContent = c.getChatMessage(t, !0),
e.unreadMessage = e.chatContent[e.chatContent.length - e.unreadMessageCount],
e.imagesMessagesList = [],
e.messagesAnimate = !1,
a(function() {
e.messagesAnimate = !0
}, 200),
n) {
var i = "newsapp,fmessage,filehelper,weibo,qqmail,fmessage,tmessage,qmessage,qqsync,floatbottle,lbsapp,shakeapp,medianote,qqfriend,readerapp,blogapp,facebookapp,masssendapp,meishiapp,feedsapp,voip,blogappweixin,weixin,brandsessionholder,weixinreminder,wxid_novlwrv3lqwv11,gh_22b87fa7cb3c,officialaccounts,notification_messages,wxid_novlwrv3lqwv11,gh_22b87fa7cb3c,wxitil,userexperience_alarm,notification_messages";
n.MMCanCreateChatroom = i.indexOf(n.UserName) < 0
}
}
function C(t) {
for (var a = e.imagesMessagesList, n = 0; n < a.length; n++)
if (a[n].msg.MsgId == t.MsgId) {
a.splice(n, 1);
break
}
}
function w(e, t) {
var a, n;
for (n = 0; n <= e.length; n++) {
if (a = e[n],
!a) {
e.push(t);
break
}
if (t.msg._index < a.msg._index) {
e.splice(n, 1, t, a);
break
}
}
return n
}
function S() {
e.currentContact && c.markMsgsRead(e.currentContact.UserName),
e.bottomUnreadCount = 0,
c.getChatList()
}
var T = o.find("#chatArea .scrollbar-dynamic")[0];
e.delState = !1,
e.chatContent = [],
e.isShowChatRoomMembers = !1,
o.find("#chatArea").on("drop", function(e) {
var t = c.setSendFileUsername(c.getCurrentUserName());
if (!t)
return alert(_("599d8df")),
e.preventDefault(),
e.stopPropagation(),
e.stopImmediatePropagation(),
!1
}),
e.$on("message:add:success", function(t, a) {
a.MMPeerUserName !== c.getCurrentUserName() && (a._h || e.heightCalc(a, function(e) {
a._h = e
}))
}),
e.$watch(function() {
return c.getCurrentUserName()
}, function(t) {
b(t),
e.newMsg = null,
e.isScrollToUnread = !1,
setTimeout(function() {
T.scrollTop = 999999,
e.autoScrollFlag = !0,
setTimeout(function() {
e.autoScrollFlag = !1
}, 200)
}, 10)
}),
e.$on("root:cleanMsg", function(t, a) {
c.cleanChatMessage(a),
c.getChatList(),
a == c.getCurrentUserName() && (e.imagesMessagesList = [])
}),
e.$on("root:profile", function(t, a) {
e.showProfile(a.event, a.userName, a.isAdd)
}),
e.$on("root:msgSend:success", function(t, a) {
if (a.MsgType == f.MSGTYPE_IMAGE && e.imageInit(a),
a.ToUserName == e.currentUser)
for (var n = 0, i = e.chatContent.length; n < i; ++n) {
var o = e.chatContent[n];
if (o.MsgId == a.MsgId) {
switch (a.AppMsgType) {
case f.APPMSGTYPE_ATTACH:
o.MMAppMsgDownloadUrl = o.MMAppMsgDownloadUrl.replace("#MediaId#", a.MediaId).replace("mediaid=undefined", "mediaid=" + a.MediaId)
}
return void (e.$$phase || e.$digest())
}
}
}),
e.$on("root:mmpop:closed", function(t, a) {
"mmpop_chatroom_members" == a && (e.isShowChatRoomMembers = !1,
e.$digest())
}),
e.getMsgImg = function(e, t, a) {
if (!a || "undefined" == typeof a.MMStatus || a.MMStatus == f.MSG_SEND_STATUS_SUCC)
return f.API_webwxgetmsgimg + "?&MsgID=" + e + "&skey=" + encodeURIComponent(s.getSkey()) + (t ? "&type=" + t : "")
}
,
e.getMsgVideo = function(e) {
return f.API_webwxgetvideo + "?msgid=" + e + "&skey=" + encodeURIComponent(s.getSkey())
}
,
e.messageHandle = function(e) {
e.MMRecall && C(e)
}
,
e.getUserContact = function(e, t) {
if (e || t)
return t && e != t ? l.getContact(e, t) : l.getContact(e)
}
,
e.appMsgClick = function(e, t) {
t && (alert(t),
e.preventDefault())
}
,
e.showVideo = function(t) {
p.open({
className: "default microvideo_preview_dialog",
template: '<div jplayer-directive\t id="jplayer-dialog-{{MsgId}}"\t class="jp-jplayer microvideo"\t src="{{getMsgVideo(MsgId)}}"\t timeout="10"\t ng-class="{loaded:loaded}"\t poster="{{getMsgImg(MsgId,\'slave\')}}" autoplay loop></div>',
plain: !0,
controller: ["$scope", function(a) {
a.MsgId = t,
a.getMsgVideo = e.getMsgVideo,
a.getMsgImg = e.getMsgImg,
a.width = 800,
a.height = 600
}
]
})
}
,
e.showMicroVideo = function(t) {
p.open({
className: "default microvideo_preview_dialog",
template: '<div jplayer-directive\t id="jplayer-dialog-{{MsgId}}"\t class="jp-jplayer microvideo"\t src="{{getMsgVideo(MsgId)}}"\t timeout="10"\t ng-class="{loaded:loaded}"\t poster="{{getMsgImg(MsgId,\'slave\')}}" autoplay loop></div>',
plain: !0,
controller: ["$scope", function(a) {
a.MsgId = t,
a.getMsgVideo = e.getMsgVideo,
a.getMsgImg = e.getMsgImg,
a.width = 800,
a.height = 600
}
]
})
}
,
e.scrollToTopUnread = function() {
e.unreadMessage && (e.newMsg = e.unreadMessage,
e.isScrollToUnread = !0,
e.unreadMessageCount = 0,
T.scrollTop = e.unreadMessage._offsetTop)
}
,
e.scrollToBottomUnread = function() {
if (e.bottomUnreadIndex && e.bottomUnreadCount) {
var t = e.chatContent[e.bottomUnreadIndex];
if (t) {
e.newMsg = t,
t._h = 0,
e.isScrollToUnread = !0,
e.bottomUnreadIndex = 0,
S(),
T.scrollTop = t._offsetTop;
var a = e.$on("mmRepeat:reCalc", function() {
T.scrollTop = t._offsetTop,
a()
})
}
}
}
;
var N = null;
e.$on("onScroll", function(t, a) {
var n = a.y;
if (e.currentContact && (n.maxScroll - n.scroll > 260 ? e.currentContact._notActive || (e.bottomUnreadIndex = e.chatContent.length,
e.currentContact._notActive = !0,
e.$digest()) : (S(),
e.currentContact._notActive = !1,
e.$digest())),
e.bottomUnreadIndex) {
var i = e.chatContent[e.bottomUnreadIndex];
i ? i._offsetTop < n.scroll + n.visible && (S(),
n.maxScroll - n.scroll > 260 && (e.bottomUnreadIndex = e.chatContent.length)) : S()
}
clearTimeout(N),
N = setTimeout(function() {
e.autoScrollFlag || e.unreadMessage && e.unreadMessage._offsetTop >= n.scroll && (e.unreadMessageCount = 0,
e.$digest())
}, 100)
}),
e.previewImg = function(t) {
for (var a, n, i = 0; i < e.imagesMessagesList.length; i++)
if (a = e.imagesMessagesList[i],
a.msg == t) {
n = i;
break
}
var o = t.MMStatus;
void 0 !== o && o != f.MSG_SEND_STATUS_SUCC || h.open({
imageList: e.imagesMessagesList,
current: n
})
}
,
e.resendMsg = function(e) {
c.sendMessage(e)
}
,
e.imageInit = function(t, a) {
for (var n, i, o, r = e.imagesMessagesList, c = !1, i = e.getMsgImg(t.MsgId), s = 0; s < r.length; s++)
if (n = r[s],
n.msg === t) {
c = !0,
n.url = i,
o = s;
break
}
if (!c) {
var l;
l = "undefined" == typeof t.MMStatus || t.MMStatus == f.MSG_SEND_STATUS_SUCC ? {
url: i,
msg: t,
preview: a
} : {
msg: t,
preview: a
},
o = w(r, l)
}
return o
}
,
e.showChatRoomMembers = function(t) {
g.toggleOpen({
templateUrl: "chatRoomMember.html",
scope: e,
container: angular.element(document.getElementById("chatRoomMembersWrap")),
className: "members_wrp slide-down",
singletonId: "mmpop_chatroom_members",
stopPropagation: !1,
controller: ["$scope", function(t) {
a(function(a) {
t.currentContact = e.currentContact,
t.accountUserName = s.getUserName()
}, 100),
t.addCharRoomMember = function() {
var e = {};
angular.forEach(t.currentContact.MemberList, function(t) {
e[t.UserName] = t
}),
m.setCurrentContact(t.currentContact),
m.setFilterContacts(e),
p.open({
templateUrl: "createChatroom.html",
controller: "createChatroomController",
className: "default add_chatroom",
data: {
isAdd: !0
}
}),
t.closeThisMmPop()
}
,
t.createChatroom = function() {
p.open({
templateUrl: "createChatroom.html",
controller: "createChatroomController",
className: "default create_chatroom_dlg",
data: {
isCreate: !0,
initSelectedContacts: [t.currentContact]
}
}),
t.closeThisMmPop()
}
}
]
}),
e.isShowChatRoomMembers = !0,
t.preventDefault()
}
,
e.showProfile = function(t, a, i) {
var o;
o = a ? l.getContact(a, e.currentContact.UserName) : e.currentContact;
var r = angular.element(window)
, c = 230
, d = 360
, u = r.width()
, m = r.height()
, h = t.pageY
, M = t.pageX;
u - t.pageX < c && (M = t.pageX - c),
m - t.pageY < d && (h = t.pageY - d),
g.open({
templateUrl: "profile_mini.html",
className: "profile_mini_wrap scale-fade",
top: h,
left: M,
blurClose: !0,
singletonId: "mmpop_profile",
controller: ["$scope", function(e) {
o.VerifyFlag && (e.isOfficialUser = !0),
e.contact = o,
e.MMDefaultRemark = _("8d521cc"),
e.addUserContent = _("5a97440") + y.formatHTMLToSend(s.getUserInfo().NickName),
e.isShowSendBox = i || !1,
e.chat = function(t) {
n.go("chat", {
userName: t
}),
e.closeThisMmPop()
}
,
e.verifyUser = function(t) {
l.verifyUser({
UserName: o.UserName,
Opcode: f.VERIFYUSER_OPCODE_VERIFYOK,
Scene: f.ADDSCENE_PF_WEB,
Ticket: o.Ticket
}).then(function(t) {
e.closeThisMmPop()
}, function(t) {
e.closeThisMmPop(),
alert("verify user error.")
})
}
,
e.editRemarkName = function() {
e.MMDefaultRemark == _("8d521cc") && (e.MMDefaultRemark = "")
}
,
e.text = y.transformSpanToImg(e.contact.RemarkName || ""),
e.save = function(t) {
var a = $(".profile_mini_wrap .J_Text")
, n = a.text()
, i = n.length;
return t && [8, 37, 39, 46, 13].indexOf(t.keyCode) === -1 && i > 13 ? void t.preventDefault() : void (t && 13 != t.keyCode || (n.length > 17 && (n = n.substring(0, 18)),
e.editing = !1,
e.contact.RemarkName = n,
v({
method: "POST",
url: f.API_webwxoplog,
data: angular.extend({
UserName: e.contact.UserName,
CmdId: f.oplogCmdId.MODREMARKNAME,
RemarkName: y.formatHTMLToSend(n)
}, s.getBaseRequest()),
MMRetry: {
count: 3,
timeout: 1e4,
serial: !0
}
}).success(function(t) {
e.MMDefaultRemark = _("8d521cc")
}).error(function(e) {}),
$('<div contenteditable="true"></div>').appendTo("body").focus().remove()))
}
,
e.addUser = function(t, a) {
l.verifyUser({
UserName: o.UserName,
Opcode: f.VERIFYUSER_OPCODE_SENDREQUEST,
Scene: f.ADDSCENE_PF_WEB,
Ticket: o.Ticket,
VerifyContent: a || ""
}).then(function(t) {
e.closeThisMmPop()
}, function(t) {
e.closeThisMmPop(),
p.openConfirm({
className: "default ",
templateUrl: "comfirmTips.html",
controller: ["$scope", function(e) {
e.title = _("02d9819"),
e.content = t.BaseResponse.ErrMsg || _("f45a3d8"),
e.callback = function() {
e.closeThisDialog()
}
}
]
})
})
}
}
]
})
}
,
e.removeMemberFromChatroom = function(e, t) {
m.delMember(e, t),
g.close("mmpop_chatroom_members")
}
;
var E = function() {
window.MMplayingMsg && (window.MMplayingMsg.MMPlaying = !1,
window.MMplayingMsg = null,
e.$$phase || e.$digest())
};
e.playVoice = function(e) {
t.e(2, function(require) {
var a = (t(281),
jQuery("#voiceMsgPlayer"));
if (window.MMplayingMsg) {
if (e.MsgId == window.MMplayingMsg.MsgId && e.MMPlaying)
return void a.jPlayer("stop");
E()
}
var n = f.API_webwxgetvoice + "?msgid=" + e.MsgId + "&skey=" + s.getSkey();
e.MMVoiceUnRead && (e.MMVoiceUnRead = !1),
e.MMPlaying = !0,
a.jPlayer({
ready: function() {},
timeupdate: function(e) {},
play: function(e) {},
pause: E,
ended: E,
swfPath: window.MMSource.jplayerSwfPath,
solution: "html, flash",
supplied: "mp3",
wmode: "window"
}),
a.jPlayer("stop"),
window.MMplayingMsg = e,
a.jPlayer("setMedia", {
mp3: n
}),
a.jPlayer("play")
})
}
;
var G = !1;
e.$on("mmRepeat:change", function() {
G && (T.scrollTop = 99999)
});
var I, k = !0;
e.$watchCollection("chatContent", function(t) {
if (t.length > 0 && t[t.length - 1].FromUserName === s.getUserName())
G = !0;
else {
if (e.isChangeUserFlag ? (e.isChangeUserFlag = !1,
S()) : e.bottomUnreadIndex && e.currentContact ? e.bottomUnreadCount = c.getUnreadMsgsCount(e.currentContact.UserName) : S(),
I && clearTimeout(I),
I = setTimeout(function() {
k = !0
}, 100),
!k)
return;
G = T.scrollTop + T.clientHeight + 260 >= T.scrollHeight,
k = !1
}
}),
e.heightCalc = function(t, a) {
var n = "<div message-directive ></div>"
, i = e.$new();
i.imageInit = function() {}
,
i.message = t;
var o = r(n)(i);
$("#prerender").append(o),
function(t, a, n, i) {
setTimeout(function() {
function o() {
l.height = c.height(),
l.width = c.width(),
n.MMImgStyle = l,
i(a.height()),
t.$destroy(),
a.remove()
}
function r(e) {
M.report(M.ReportType.imageLoadError, {
text: "chat content image preload fail",
src: this.src
}),
l.height = 110,
l.width = 110,
n.MMImgStyle = l,
t.$digest(),
i(a.height()),
t.$destroy(),
a.remove()
}
if (n.MsgType == f.MSGTYPE_EMOTICON || n.MsgType == f.MSGTYPE_IMAGE || n.MsgType == f.MSGTYPE_VIDEO) {
t.$digest();
var c = a.find(".content .msg-img")
, s = c.height()
, l = {};
if (n.ImgHeight)
n.MsgType == f.MSGTYPE_EMOTICON ? (l.height = n.ImgHeight * c.width() / n.ImgWidth + "px",
l.widht = c.width() + "px") : (l.height = n.ImgHeight,
l.width = n.ImgWidth),
n.MMImgStyle = l,
t.$digest(),
i(a.height()),
t.$destroy(),
a.remove();
else if (s > 40 || 1 == c[0].complete && 0 !== c[0].naturalWidth && s > 0)
i(a.height()),
t.$destroy(),
a.remove();
else {
if (n.MMPreviewSrc)
return c[0].onload = o,
c[0].onerror = r,
void (c[0].src = n.MMPreviewSrc);
if ("undefined" != typeof n.MMStatus && n.MMStatus != f.MSG_SEND_STATUS_SUCC)
var d = e.$watch(function() {
return n.MMStatus
}, function(t) {
t == f.MSG_SEND_STATUS_SUCC && (c[0].onload = o,
c[0].onerror = r,
c[0].src = e.getMsgImg(n.MsgId, "slave"),
d())
});
else
c[0].onload = o,
c[0].onerror = r
}
} else
t.$digest(),
i(a.height()),
t.$destroy(),
a.remove()
}, 0)
}(i, o, t, a)
}
,
e.cancelUploadFile = function(e) {
e.MMCancelUploadFileFunc(e)
}
}
])
}()
}
, , function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("contentContactController", ["$scope", "contactFactory", function(e, t) {
e.$watch(function() {
return t.getCurrentContact()
}, function(a) {
a && (e.currentContact = t.getCurrentContact())
})
}
])
}()
}
, function(e, exports, t) {
!function() {
"use strict";
angular.module("Controllers").controller("chatSenderController", ["$rootScope", "$scope", "$http", "$timeout", "ngDialog", "confFactory", "accountFactory", "contactFactory", "chatFactory", "screenShotFactory", "utilFactory", "mmpop", "stateManageService", "emojiFactory", "reportService", "monitorService", function(e, a, n, i, o, r, c, s, l, d, f, u, m, g, p, h) {
function M() {
var e = "undefined" != typeof x.textContent ? x.textContent : x.innerText
, t = x.getElementsByTagName("img").length > 0;
e.length > 0 || t ? m.change("sender:hasText", !0) : m.change("sender:hasText", !1)
}
function v() {
window.getSelection ? (P = window.getSelection(),
U = P.getRangeAt(0)) : U = document.selection.createRange()
}
function y() {
U ? window.getSelection ? (P.removeAllRanges(),
P.addRange(U)) : U.select() : b()
}
function b() {
var e, t;
document.createRange ? (e = document.createRange(),
e.selectNodeContents(x),
e.collapse(!1),
t = window.getSelection(),
t.removeAllRanges(),
t.addRange(e)) : document.selection && (e = document.body.createTextRange(),
e.moveToElementText(x),
e.collapse(!1),
e.select())
}
function C(e) {
var t, a, n = "";
if (window.getSelection)
t = window.getSelection(),
t.rangeCount > 0 && (a = t.getRangeAt(0).cloneRange(),
a.collapse(!0),
a.setStart(x, 0),
n = a.toString().slice(-e));
else if ((t = document.selection) && "Control" != t.type) {
var i;
a = t.createRange(),
i = a.duplicate(),
i.moveToElementText(x),
i.setEndPoint("EndToStart", a),
n = i.text.slice(-e)
}
return n
}
function w(e, t) {
var a, n;
if (t || y(),
window.getSelection) {
!t && U ? (a = P,
n = U) : (a = window.getSelection(),
n = a.getRangeAt(0)),
n.deleteContents();
var i;
if (n.createContextualFragment)
i = n.createContextualFragment(e);
else {
var o = document.createElement("div");
o.innerHTML = e,
i = document.createDocumentFragment();
for (var r, c; r = o.firstChild; )
c = i.appendChild(r)
}
var s = i.lastChild;
n.insertNode(i),
n.setStartAfter(s),
a.removeAllRanges(),
a.addRange(n);
var l = s.offsetTop - 42 + s.offsetHeight - x.offsetHeight;
x.scrollTop < l && (x.scrollTop = l)
} else
n = t || !U ? document.selection.createRange() : U,
e = e.replace(/</gi, "&lt;").replace(/>/gi, "&gt;"),
n.pasteHTML(e),
n.select()
}
function S() {
window.getSelection && (window.getSelection().getRangeAt(0).insertNode(A),
F = A.offsetLeft,
V = A.offsetTop - x.scrollTop,
D.appendChild(A))
}
function T(t) {
var a = o.open({
template: "imageUploadPreview.html",
controller: ["$scope", function(e) {
R = !0;
var a = "";
e.src = "",
e.send = function() {
a && (t.MediaId = a,
l.appendMessage(t),
l.sendMessage(t),
o.close())
}
,
e.cancel = function() {
o.close(),
t = null
}
,
e.$on("root:uploadImg:success", function(n, i) {
e.src = i.src,
t.MMPreviewSrc = i.src,
a = i.mediaId,
e.$digest()
})
}
],
className: "default image_preview"
});
return {
update: function(t, a) {
e.$broadcast("root:uploadImg:success", {
src: t,
mediaId: a
})
},
close: a.close
}
}
function N(e) {
x.innerHTML = a.editAreaCtn = e || "",
x.focus(),
M(),
m.change("sender:active", !0),
e && (b(),
v())
}
function E(e) {
return Q[e.toLowerCase()]
}
function G(e) {
var t = {
mp4: 1
};
return E(e) ? r.MSGTYPE_IMAGE : t[e.toLowerCase()] ? r.MSGTYPE_VIDEO : r.MSGTYPE_APP
}
function I(e, t) {
angular.extend(e, {
onQueued: X,
onProgress: X,
onSuccess: X,
onError: X
}, t)
}
function k() {
t.e(3, function(require) {
var e = t(284);
window.WebUploader = e;
try {
K = e.create({
auto: !0,
dnd: "#chatArea",
paste: f.browser.webkit ? "#chatArea" : void 0,
swf: r.RES_PATH + "third_party/webuploader-0.1.5/Uploader.swf",
server: r.API_webwxuploadmedia + "?f=json",
fileVal: "filename",
pick: ".js_fileupload",
compress: !1,
duplicate: !0,
threads: 1,
chunked: !0,
chunkSize: 524288,
withCredentials: !0
}).on("beforeFileQueued", function(e) {
if (e._checked)
return !0;
if (h.report(h.UPLOAD_COUNT, 1),
0 == e.size)
return K.skipFile(e),
alert(_("61e885c")),
!1;
if (e._data = e._data || {},
!l.getSendFileUsername())
return K.skipFile(e),
alert(_("599d8df")),
!1;
if (/untitled\d+.png/i.test(e.name) || j)
I(e, ee),
e.ToUserName = l.getSendFileUsername();
else if (e.ToUserName = l.getSendFileUsername(),
I(e, Z),
"gif" !== e.ext.toLowerCase() && !E(e.ext)) {
var t = G(e.ext);
if (t == r.MSGTYPE_VIDEO && e.size >= 1024 * W * 1024)
return K.skipFile(e),
void alert(_("9a7dbbc"));
e.ToUserName != l.getCurrentUserName() && (f.reportSendState("sendFileWrong"),
p.report(p.ReportType.sendError, {
type: "sendFileWrong",
browser: f.browser.msie ? "ie" : "other"
})),
e.MMSendMsg = l.createMessage({
ToUserName: e.ToUserName,
MsgType: t,
FileName: e.name,
FileSize: e.size,
MMFileId: e.id,
MMFileExt: e.ext,
MMUploadProgress: 0,
MMFileStatus: r.MM_SEND_FILE_STATUS_SENDING,
MMCancelUploadFileFunc: J
}),
l.appendMessage(e.MMSendMsg),
a.$$phase || a.$digest()
}
var i = !1;
e.size > 1024 * z * 1024 && (i = !0);
var o = Date.now();
return K.md5File(e).then(function(t) {
function a(e, t, a) {
var n, i = angular.extend(c.getBaseRequest(), {
ClientMediaId: f.now(),
TotalLen: e.size,
StartPos: 0,
DataLen: e.size,
MediaType: r.UPLOAD_MEDIA_TYPE_ATTACHMENT,
FromUserName: d.FromUserName,
ToUserName: d.ToUserName,
FileMd5: d.FileMd5,
AESKey: d.AESKey,
Signature: d.Signature
}), o = G(e.ext);
switch (o) {
case r.MSGTYPE_IMAGE:
n = "pic";
break;
case r.MSGTYPE_VIDEO:
n = "video";
break;
default:
n = "doc"
}
var s = {
mediatype: n,
uploadmediarequest: JSON.stringify(angular.extend({
UploadType: 1
}, i)),
webwx_data_ticket: f.getCookie("webwx_data_ticket"),
pass_ticket: decodeURIComponent(c.getPassticket())
};
e._uploadParams = s,
e._uploadmediarequestBase = i,
t ? (K.trigger("fileQueued", e),
K.trigger("uploadSuccess", e, a),
K.skipFile(e)) : (e._checked = !0,
K.addFiles(e))
}
var s = Date.now() - o
, l = s / e.size * 1024 * 1024;
e.size > 1048576 ? (f.reportSendState("MD5TimeBigFilePerMb", Math.floor(l)),
f.reportSendState("MD5TimeBigFilePerMbCount")) : (f.reportSendState("MD5TimeSmallFile", s),
f.reportSendState("MD5TimeSmallFileCount"));
var d, u = {
FromUserName: c.getUserName(),
ToUserName: e.ToUserName,
FileSize: e.size,
FileMd5: t,
FileName: e.name,
FileType: 7
};
if (i) {
var m = angular.extend(u, c.getBaseRequest());
d = angular.extend({}, u),
n({
method: "POST",
url: r.API_checkupload,
data: m
}).success(function(t) {
0 == t.BaseResponse.Ret ? (d = angular.extend(d, {
AESKey: t.AESKey,
Signature: t.Signature
}),
e.Signature = t.Signature,
a(e, t.MediaId, t)) : (e.MMSendMsg && (e.MMSendMsg.MMFileStatus = r.MM_SEND_FILE_STATUS_FAIL,
e.MMSendMsg.MMStatus = r.MSG_SEND_STATUS_FAIL),
alert(t.BaseResponse.ErrMsg))
}).error(function(t) {
e.MMSendMsg && (e.MMSendMsg.MMFileStatus = r.MM_SEND_FILE_STATUS_FAIL,
e.MMSendMsg.MMStatus = r.MSG_SEND_STATUS_FAIL),
alert("上传失败")
})
} else
d = angular.extend({}, u),
a(e)
}),
!1
}).on("fileQueued", function(e) {
e.onQueued.call(e)
}).on("uploadBeforeSend", function(e, t, a) {
var n = e.file;
n._data || {};
angular.extend(t, n._uploadParams, {
uploadmediarequest: JSON.stringify(angular.extend({
UploadType: 2
}, n._uploadmediarequestBase))
})
}).on("uploadProgress", function(e, t) {
e.onProgress.call(e, t)
}).on("uploadFinished", function() {
K.reset()
}).on("uploadSuccess", function(e, t) {
e.onSuccess.call(e, t)
}).on("uploadError", function(e, t) {
e.onError.call(e, t),
h.report(h.UPLOAD_FAIL_COUNT, 1)
}).on("error", function(e) {
p.report(p.ReportType.uploaderError, {
text: "WebUploader 出错",
type: e
}),
h.report(h.UPLOAD_FAIL_COUNT, 1)
})
} catch (e) {
a.noflash = !0,
p.report(p.ReportType.uploaderError, {
text: "WebUploader 出错",
type: "no_flash"
})
}
})
}
var P, U, A = document.getElementById("caretPosHelper"), F = 0, V = 0, x = document.getElementById("editArea"), D = x.parentNode, O = f.getShareObject("editingContents"), R = !1, j = !1, q = null;
$(x).on("input", function() {
v()
}).on("click", function() {
v()
}).on("paste", function(e) {
var t = l.setSendFileUsername(l.getCurrentUserName());
if (q && clearTimeout(q),
j = !0,
q = setTimeout(function() {
j = !1
}, 100),
!t)
return alert(_("599d8df")),
e.preventDefault(),
e.stopPropagation(),
!1
}),
$("#J_CatchDrop").on("drop", function(e) {
e.stopPropagation(),
e.preventDefault()
}),
a.isDisabled = !a.userName,
a.isMacOS = navigator.userAgent.toUpperCase().indexOf("MAC OS") > -1,
a.editAreaCtn = "";
var L;
a.$on("$destroy", function() {
L && (O[L] = x.innerHTML)
}),
a.$watch(function() {
return l.getCurrentUserName()
}, function(e, t) {
t && e != t && (O[t] = x.innerHTML),
L = e,
N(O[e])
}),
a.showEmojiPanel = function(e) {
u.toggleOpen({
top: -272,
left: 15,
templateUrl: "expression.html",
className: "slide-top",
controller: "emojiController",
singletonId: "mmpop_emoji_panel",
scope: a,
autoFoucs: !1,
container: angular.element(document.getElementById("tool_bar"))
}),
e.preventDefault()
}
;
var Y;
a.sendClick = function(e) {
var t = l.setSendFileUsername(l.getCurrentUserName());
if (!t)
return (!Y || e.timeStamp - Y > 30) && (Y = e.timeStamp,
alert(_("599d8df"))),
e.preventDefault(),
e.stopPropagation(),
!1
}
,
a.screenShot = function() {
var e;
d.isSupport() ? d.capture({
ok: function() {
var t = l.createMessage({
MsgType: r.MSGTYPE_IMAGE,
Type: r.MSGTYPE_IMAGE
});
e = T(t),
d.upload(JSON.stringify(t), function(t) {
!t.BaseResponse || t.BaseResponse && 0 != t.BaseResponse.Ret ? (alert(_("76a7e04")),
e.close()) : e.update(r.API_webwxpreview + "?fun=preview&mediaid=" + t.MediaId, t.MediaId)
})
}
}) : "Win64" == navigator.platform && f.browser.msie ? alert(_("82cf63d")) : confirm(_("112a5c0")) && d.install(),
h.report(h.CLICK_SNAPSHOT_COUNT, 1)
}
;
var B, H;
a.editAreaKeyup = function(e) {
if (MMDEV && e.keyCode == r.KEYCODE_NUM2 && "@" == C(1)) {
var t = l.getCurrentUserName();
if (!f.isRoomContact(t))
return;
S(),
H = function() {
B = null,
H = null;
var e = s.getChatRoomMembersContact(t, "withoutMe");
v(),
u.open({
templateUrl: "editAreaContactPanel.html",
controller: "editAreaContactListController",
left: F,
top: V,
scope: {
chatRoomUserName: t,
memberList: angular.copy(e),
insertContactToEditArea: a.insertToEditArea
},
autoFoucs: !1,
container: angular.element(D)
})
}
,
!B && H && H(),
clearTimeout(B),
B = setTimeout(function() {
H && H(),
B = null
}, 300)
}
}
,
a.editAreaKeydown = function(e) {
if (M(),
B)
return void e.preventDefault();
var t = e.keyCode;
if (t == r.KEYCODE_ENTER) {
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
var n = "<br>";
if (!f.browser.msie && window.getSelection) {
var i = window.getSelection().focusNode.nextSibling;
do
if (!i || i.nodeValue || "BR" == i.tagName)
break;
while (i = i.nextSibling);i || (n += n)
}
a.insertToEditArea(n, !0),
x.scrollTop = x.scrollHeight
} else
a.sendTextMessage();
e.preventDefault()
}
83 == t && e.altKey && (a.sendTextMessage(),
e.preventDefault()),
(t >= 65 && t <= 111 || t >= 186 && t <= 222) && u.close()
}
,
a.editAreaBlur = function(e) {
H = null,
m.change("sender:active", !1)
}
,
a.editAreaClick = function(e) {
S()
}
,
a.sendTextMessage = function() {
if (u.close(),
!a.editAreaCtn.replace(/<br\/?>/g, "").match(/^\s*$/)) {
var e = l.createMessage({
MsgType: r.MSGTYPE_TEXT,
Content: a.editAreaCtn
});
l.appendMessage(e),
l.sendMessage(e),
O[l.getCurrentUserName()] = "",
a.editAreaCtn = ""
}
}
,
a.$on("root:quoteMsg", function(e, t) {
N(t + (x.innerHTML.replace("<br>", "") ? x.innerHTML : "<br>")),
x.scrollTop = 9999
}),
a.insertToEditArea = function(e, t) {
w(e, t),
a.editAreaCtn = x.innerHTML
}
,
a.sendTuzkiEmoji = function(e, t) {
var a = l.createMessage({
MsgType: r.MSGTYPE_EMOTICON,
Content: e,
EmojiFlag: r.EMOJI_FLAG_GIF,
EMoticonMd5: e
});
a.MMPreviewSrc = r.RES_PATH + "images/icon/Tuzki/" + t,
l.appendMessage(a),
l.sendMessage(a)
}
,
a.sendGif = function(e) {}
;
var K, W = 20, z = 25, Q = {
bmp: 1,
png: 1,
jpeg: 1,
jpg: 1,
gif: 0
}, J = function(e) {
K.cancelFile(e.MMFileId),
e.MMFileStatus = r.MM_SEND_FILE_STATUS_CANCEL,
e.MMStatus = r.MSG_SEND_STATUS_READY
}, X = function() {}, Z = {
onQueued: function() {
if ((E(this.ext) || "gif" == this.ext.toLowerCase()) && this.ToUserName != l.getCurrentUserName() && (f.reportSendState("sendImageWrong"),
p.report(p.ReportType.sendError, {
type: "sendImageWrong",
browser: f.browser.msie ? "ie" : "other"
})),
"gif" == this.ext.toLowerCase())
return this.MMSendMsg = l.createMessage({
ToUserName: this.ToUserName,
MsgType: r.MSGTYPE_EMOTICON,
EmojiFlag: r.EMOJI_FLAG_GIF
}),
void function(e) {
K.makeThumb(e, function(t, a) {
a && (e.MMSendMsg.MMThumbSrc = a),
l.appendMessage(e.MMSendMsg)
}, 1, 1)
}(this);
if (E(this.ext)) {
var t = G(this.ext);
this.MMSendMsg = l.createMessage({
ToUserName: this.ToUserName,
MsgType: t,
FileName: this.name,
FileSize: this.size,
MMFileId: this.id,
MMFileExt: this.ext,
MMUploadProgress: 0,
MMFileStatus: r.MM_SEND_FILE_STATUS_QUEUED,
MMCancelUploadFileFunc: J
}),
function(t) {
t.MMSendMsg.MMThumbSrc = "",
K.makeThumb(t, function(a, n) {
!a && n || p.report(p.ReportType.uploaderError, {
text: "创建缩略图失败",
fileName: t.MMSendMsg.MMFileExt,
fileSize: t.MMSendMsg.FileSize
}),
n && (t.MMSendMsg.MMThumbSrc = n),
l.appendMessage(t.MMSendMsg),
e.$digest()
})
}(this)
}
},
onProgress: function(e) {
var t = this;
a.$apply(function() {
t.MMSendMsg && (t.MMSendMsg.MMFileStatus = r.MM_SEND_FILE_STATUS_SENDING,
t.MMSendMsg.MMUploadProgress = parseInt(100 * e))
})
},
onSuccess: function(e) {
if (0 == e.BaseResponse.Ret) {
var t = this.MMSendMsg;
t.MediaId = e.MediaId,
t.Signature = this.Signature,
l.sendMessage(t),
t.MMFileStatus = r.MM_SEND_FILE_STATUS_SUCCESS,
a.$$phase || a.$digest()
} else
this.onError("Ret: " + e.BaseResponse.Ret)
},
onError: function(e) {
var t = this;
p.report(p.ReportType.uploaderError, {
text: "chooseFile 上传失败",
reason: e,
fileName: this.ext,
fileSize: this.size
}),
a.$apply(function() {
t.MMSendMsg.MMFileStatus = r.MM_SEND_FILE_STATUS_FAIL,
t.MMSendMsg.MMStatus = r.MSG_SEND_STATUS_FAIL
})
}
}, ee = {
onQueued: function() {
var e = l.createMessage({
ToUserName: this.ToUserName,
MsgType: r.MSGTYPE_IMAGE,
Type: r.MSGTYPE_IMAGE
});
this._uploadPreviewUpdate = T(e).update
},
onSuccess: function(e) {
0 == e.BaseResponse.Ret ? this._uploadPreviewUpdate(r.API_webwxpreview + "?fun=preview&mediaid=" + e.MediaId, e.MediaId) : this.onError("Ret: " + e.BaseResponse.Ret)
},
onError: function(e) {
p.report(p.ReportType.uploaderError, {
text: "pasteImg 上传失败",
reason: e,
fileName: this.ext,
fileSize: this.size
}),
alert(_("c5795a7") + e)
}
};
window.WebUploader ? k() : e.$on("root:pageInit:success", function() {
k()
})
}
])
}()
}
, , function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("emojiController", ["$rootScope", "$scope", "$timeout", "emojiFactory", "confFactory", "utilFactory", function(e, t, a, n, i, o) {
a(function() {
t.QQFaceList = n.QQFaceList,
t.EmojiList = n.EmojiList,
t.TuzkiList = n.TuzkiList
}, 100),
t.index = 1,
t.RES_PATH = i.RES_PATH,
t.selectEmoticon = function(e) {
var a = e.target;
if ("A" == a.tagName) {
var i = a.innerText || a.textContent
, r = a.getAttribute("type");
switch (r) {
case "qq":
i = "[" + i + "]",
o.browser.msie && o.browser.version < 9 || (i = n.getEmoticonByText(i)),
t.insertToEditArea(i);
break;
case "emoji":
i = "<" + i + ">",
o.browser.msie && o.browser.version < 9 || (i = n.getEmoticonByText(i)),
t.insertToEditArea(i);
break;
case "Tuzki":
t.sendTuzkiEmoji(n.getMd5ByTuzki(i), i)
}
e.preventDefault()
}
}
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("createChatroomController", ["$rootScope", "$scope", "$timeout", "$state", "$log", "$document", "chatFactory", "contactFactory", "appFactory", "chatroomFactory", "confFactory", "mmpop", "ngDialog", "utilFactory", "stateManageService", "accountFactory", "monitorService", function(e, t, a, n, i, o, r, c, s, l, d, f, u, m, g, p, h) {
a(function() {
t.ngDialogData.isCreate && (M = []),
t.allContacts = c.pickContacts(["star", "friend"], {
star: {
filterContacts: M
},
friend: {
filterContacts: M,
isWithoutStar: !0,
isWithoutBrand: !0
}
}, !0).result,
t.chatroomContacts = c.pickContacts(["chatroom"], {
chatroom: {
noHeader: !0
}
}, !0).result
}, 100),
t.selectedUsers = t.ngDialogData.initSelectedContacts || [];
var M = t.ngDialogData.isCreate ? {} : l.getFilterContacts();
t.pickConfig = {
types: ["star", "friend"],
opt: {
star: {},
friend: {
isWithoutStar: !0,
isWithoutBrand: !0
},
all: {
filterContacts: M
}
}
},
t.add = function() {
var e = l.getCurrentContact()
, a = [];
angular.forEach(t.selectedUsers, function(e) {
a.push(e.UserName)
}),
l.addMember(e.UserName, a.join(","), function(e) {
e.BaseResponse && 0 != e.BaseResponse.Ret && e.BaseResponse.Ret != -2013 && (u.openConfirm({
className: "default ",
templateUrl: "comfirmTips.html",
controller: ["$scope", function(t) {
t.title = _("02d9819"),
t.content = e.BaseResponse.ErrMsg || _("f45a3d8"),
t.callback = function() {
t.closeThisDialog()
}
}
]
}),
h.report(h.INVITE_TO_CHAT_ROOM_FAIL_COUNT, 1))
}),
t.closeThisDialog(),
h.report(h.INVITE_TO_CHAT_ROOM_COUNT, 1)
}
,
t.create = function() {
var e = [];
return angular.forEach(t.selectedUsers, function(e, a) {
if (e.UserName == p.getUserName())
return void t.selectedUsers.splice(a, 1)
}),
1 === t.selectedUsers.length ? (n.go("chat", {
userName: t.selectedUsers[0].UserName
}),
void t.closeThisDialog()) : (angular.forEach(t.selectedUsers, function(t) {
e.push({
UserName: t.UserName
})
}),
l.create(e).then(function(e) {
e.BaseResponse && 0 == e.BaseResponse.Ret || e.BaseResponse.Ret == -2013 ? n.go("chat", {
userName: e.ChatRoomName
}) : (u.openConfirm({
className: "default ",
templateUrl: "comfirmTips.html",
controller: ["$scope", function(t) {
t.title = _("02d9819"),
t.content = e.BaseResponse.ErrMsg || _("0d42740"),
t.callback = function() {
t.closeThisDialog()
}
}
]
}),
h.report(h.CREATE_CHAT_ROOM_FAIL_COUNT, 1))
}, function(e) {
u.openConfirm({
className: "default ",
templateUrl: "comfirmTips.html",
controller: ["$scope", function(t) {
t.title = _("02d9819"),
t.content = e.BaseResponse.ErrMsg || _("0d42740"),
t.callback = function() {
t.closeThisDialog()
}
}
]
}),
h.report(h.CREATE_CHAT_ROOM_FAIL_COUNT, 1)
}),
t.closeThisDialog(),
void h.report(h.CREATE_CHAT_ROOM_COUNT, 1))
}
,
t.selectChatroom = function(e) {
n.go("chat", {
userName: e.UserName
}),
t.closeThisDialog()
}
,
t.chatRoomHeightCalc = function() {
return 64
}
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("contextMenuController", ["$rootScope", "$scope", "$state", "contextMenuFactory", "accountFactory", "confFactory", "contactFactory", "ngDialog", "chatroomFactory", "emojiFactory", "utilFactory", "chatFactory", function(e, t, a, n, i, o, r, c, s, l, d, f) {
function u(e) {
function a(e) {
return e.parentNode != e.document ? (n.push(e.parentNode),
a(e.parentNode)) : n
}
for (var n = [e.target], i = e.path || e.originalEvent.path || a(e.target), o = 0, r = i.length; o < r; o++) {
var c = angular.element(i[o]).attr("data-cm");
if (c) {
switch (c = JSON.parse(c),
t.isShowContextMenu = !0,
t.contextStyle = {
top: e.pageY,
left: e.pageX
},
c.type) {
case "chat":
m(c.username),
e.preventDefault();
break;
case "clean":
g(c.username),
e.preventDefault();
break;
case "avatar":
p(e, c.username, c.isFriend),
e.preventDefault();
break;
case "message":
h(c.actualSender, c.msgType, c.subType, c.msgId, e)
}
var s = angular.element(document.getElementById("contextMenu"))
, l = angular.element(window)
, d = s.width()
, f = s.height()
, u = l.width()
, M = l.height();
u - e.pageX < d && (t.contextStyle = {
top: e.pageY,
left: e.pageX - d
}),
M - e.pageY < f && (t.contextStyle = {
top: e.pageY - f,
left: e.pageX - d
});
break
}
}
}
function m(a) {
t.contextMenuList = [];
var n = r.getContact(a);
(n.isRoomContact() || n.isContact()) && (n.isTop() ? t.contextMenuList.push({
content: _("84e4fac"),
callback: function() {
r.setTopContact(a, !1)
}
}) : t.contextMenuList.push({
content: _("3d43ff1"),
callback: function() {
r.setTopContact(a, !0)
}
})),
n.isRoomContact() && t.contextMenuList.push({
content: _("1f9be6d"),
callback: function() {
c.open({
className: "default chatroom_topic",
template: "editorDialog.html",
controller: ["$scope", function(e, t) {
e.keypress = function(e) {
var t = $(".chatroom_topic .chatroom_name").text().length;
[8, 37, 39, 46].indexOf(e.keyCode) === -1 && t > 17 && e.preventDefault()
}
,
e.text = l.transformSpanToImg(n.getDisplayName()),
e.send = function() {
var e = $(".chatroom_topic .chatroom_name").text();
e.length > 17 && (e = e.substring(0, 18)),
e.length > 0 && e != n.getDisplayName() && s.modTopic(n.UserName, l.formatHTMLToSend(e)),
c.close()
}
,
e.cancel = function() {
c.close()
}
}
]
})
}
}),
t.contextMenuList.push({
content: _("685739c"),
callback: function() {
e.$broadcast("root:deleteChat", a)
}
})
}
function g(a) {
t.contextMenuList = [{
content: _("91382d9"),
callback: function() {
e.$broadcast("root:cleanMsg", a)
}
}]
}
function p(n, i, o) {
var r = [{
content: _("7068541"),
callback: function() {
e.$broadcast("root:profile", {
userName: i,
event: n
})
}
}];
"true" == o ? r.push({
content: _("b5f1591"),
callback: function() {
a.go("chat", {
userName: i
})
}
}) : r.push({
content: _("0bd10a8"),
callback: function() {
e.$broadcast("root:profile", {
userName: i,
isAdd: !0,
event: n
})
}
}),
t.contextMenuList = r
}
function h(a, n, s, l, u) {
function m(e) {
var t = e && e.target;
if (!t)
return !1;
if (t = angular.element(t),
t.hasClass("js_message_bubble") || (t = t.parents(".js_message_bubble")),
t = t.find(".js_message_plain"),
t.length) {
var a = t.html().replace(new RegExp("<(?!br|" + o.EMOTICON_REG + ").*?>","g"), "")
, n = d.htmlDecode(a);
return n
}
return ""
}
var g = f.getMsg(l);
if (!g)
return void (t.isShowContextMenu = !1);
var p = g.MMDigest
, h = r.getContact(a)
, M = r.getContact(g.FromUserName);
if (!h || !M)
return void (t.isShowContextMenu = !1);
switch (t.contextMenuList = [],
(!g._noSupportMsg || g.AppMsgType != o.APPMSGTYPE_TRANSFERS && g.AppMsgType != o.APPMSGTYPE_REALTIME_SHARE_LOCATION && g.AppMsgType != o.APPMSGTYPE_CARD_TICKET) && ("filehelper" != g.MMPeerUserName && i.getUserName() == g.FromUserName && Date.now() / 1e3 - g.CreateTime < 120 ? t.contextMenuList.push({
content: _("2305051"),
callback: function() {
f.revokemsg(g)
}
}) : "filehelper" != g.MMPeerUserName && i.getUserName() == g.FromUserName && t.contextMenuList.push({
isDisabled: !0,
content: _("2305051"),
callback: function() {}
})),
+n) {
case o.MSGTYPE_TEXT:
var v;
if (v = M.isRoomContact() ? h.getMemberDisplayName(g.FromUserName) || h.NickName : h.NickName,
48 == s)
break;
if (s && parseInt(s))
return void (t.isShowContextMenu = !1);
p = v ? v + ":" + g.MMActualContent : g.MMActualContent,
p = p.replace(":", ": "),
t.contextMenuList.push({
content: _("3b61c96"),
callback: function() {
var t = [_("d9eb6f5"), p, _("83b6d34"), "<br>—————————<br>"].join("");
e.$broadcast("root:quoteMsg", t)
}
}),
t.contextMenuList.push({
isCopy: !0,
content: _("79d3abe"),
callback: function() {
t.isShowContextMenu = !1
},
copyCallBack: function() {
var e = $.Range.current().toString();
return e ? e : m(u)
}
}),
u.preventDefault();
break;
case o.MSGTYPE_IMAGE:
t.contextMenuList.push({
isDownload: !0,
downloadUrl: o.API_webwxgetmsgimg + "?MsgID=" + l + "&skey=" + i.getSkey(),
content: _("f26ef91"),
callback: function() {}
}),
u.preventDefault()
}
(g.MMIsAppMsg || g.MsgType != o.MSGTYPE_IMAGE && g.MsgType != o.MSGTYPE_TEXT && g.MsgType != o.MSGTYPE_VIDEO && g.MsgType != o.MSGTYPE_MICROVIDEO && g.MsgType != o.MSGTYPE_LOCATION && g.MsgType != o.MSGTYPE_EMOTICON) && (g.MsgType != o.MSGTYPE_APP && !g.MMIsAppMsg || g.AppMsgType != o.APPMSGTYPE_ATTACH) || g._noSupportMsg || t.contextMenuList.push({
content: _("21e106f"),
callback: function() {
c.open({
templateUrl: "transpond.dialog.html",
controller: "transpondDialogController",
className: "default transpond-dialog",
data: {
msg: g
}
})
}
}),
t.contextMenuList.push({
content: _("2f4aadd"),
callback: function() {
f.localDelete(g)
}
}),
t.contextMenuList.length > 0 ? u.preventDefault() : t.isShowContextMenu = !1
}
t.$on("app:contextMenu:show", function(e, t) {
u(t)
}),
t.$on("app:contextMenu:hide", function(e, a) {
t.isShowContextMenu = !1
})
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("editAreaContactListController", ["$scope", "confFactory", "utilFactory", "$timeout", function(e, t, a, n) {
function i(t, n) {
n = a.clearHtmlStr(n) + " ",
s.innerHTML = n;
var i = s.offsetWidth;
s.innerHTML = " ",
e.insertContactToEditArea("<input type='text' un='" + t + "' value='" + n + "' style='width:" + i + "px' readonly='readonly' />"),
e.closeThisMmPop()
}
function o(e) {
var t = d + f
, a = e * t
, n = c.scrollTop;
if (n > a)
return void (c.scrollTop = a);
var i = a + t + f - c.offsetHeight;
n < i && (c.scrollTop = i)
}
var r = document.getElementById("editArea")
, c = document.getElementById("editAreaContactPanel")
, s = document.getElementById("caretPosHelper")
, l = e.memberList.length - 1
, d = 42
, f = 10;
e.selectIndex = 0,
setTimeout(function() {
c.focus()
}, 5),
e.click = function(e) {
i(e.currentTarget.getAttribute("username"), e.currentTarget.getAttribute("displayname"))
}
,
e.keydown = function(a) {
switch (a.keyCode) {
case t.KEYCODE_ARROW_UP:
e.selectIndex = --e.selectIndex < 0 ? 0 : e.selectIndex,
o(e.selectIndex),
a.stopPropagation();
break;
case t.KEYCODE_ARROW_DOWN:
e.selectIndex = ++e.selectIndex > l ? l : e.selectIndex,
o(e.selectIndex),
a.stopPropagation();
break;
case t.KEYCODE_ENTER:
var n = e.memberList[e.selectIndex];
if (!n.getDisplayName)
break;
i(n.UserName, n.getDisplayName(e.chatRoomUserName));
break;
default:
e.closeThisMmPop(),
setTimeout(function() {
r.blur(),
r.focus()
}, 0)
}
a.preventDefault()
}
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("systemMenuController", ["$rootScope", "$scope", "$timeout", "ngDialog", "loginFactory", "confFactory", "accountFactory", "utilFactory", "monitorService", "oplogFactory", function(e, t, a, n, i, o, r, c, s, l) {
t.createChatroom = function() {
n.open({
templateUrl: "createChatroom.html",
controller: "createChatroomController",
className: "default create_chatroom_dlg",
closeByDocument: !1,
data: {
isCreate: !0,
fromSystemMenu: !0
}
}),
t.closeThisMmPop()
}
,
t.loginout = function() {
i.loginout(),
t.closeThisMmPop()
}
,
t.isNotifyOpen = r.isNotifyOpen(),
t.closeNotify = function() {
r.closeNotify(),
t.closeThisMmPop()
}
,
t.openNotify = function() {
r.openNotify(),
t.closeThisMmPop()
}
,
t.isSoundOpen = r.isSoundOpen(),
t.closeSound = function() {
r.closeSound(),
t.closeThisMmPop()
}
,
t.openSound = function() {
r.openSound(),
t.closeThisMmPop()
}
,
t.feedback = function() {
n.open({
templateUrl: "feedback.html",
controller: ["$scope", function(e) {
e.content = "",
e.send = function() {
var t = "【新版web微信】【" + navigator.userAgent.toLowerCase() + "" + e.content;
t = c.htmlEncode(t),
l.feedback(t),
e.closeThisDialog(),
s.report(s.FEEDBACK_COUNT, 1)
}
}
],
className: "default"
}),
t.closeThisMmPop()
}
,
t.sendFeedback = function() {}
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("readMenuController", ["$rootScope", "$scope", "subscribeMsgService", function(e, t, a) {
t.copyCallback = function() {}
,
t.copyLink = function() {
return t.closeThisMmPop(),
a.current && a.current.Url
}
,
t.forwarding = function() {
t.closeThisMmPop()
}
,
t.openTab = function() {
var e = a.current.Url
, n = window.open(e, "_blank");
n.focus(),
t.closeThisMmPop()
}
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Controllers").controller("transpondDialogController", ["$rootScope", "$scope", "$timeout", "$state", "$log", "$document", "chatFactory", "contactFactory", "appFactory", "chatroomFactory", "confFactory", "mmpop", "ngDialog", "utilFactory", "stateManageService", "accountFactory", function(e, t, a, n, i, o, r, c, s, l, d, f, u, m, g, p) {
function h(e, t) {
if (e.MsgType != d.MSGTYPE_SYS) {
var a = angular.copy(e);
a.ToUserName = t,
a.FromUserName = p.getUserName(),
a.isTranspond = !0,
a.MsgIdBeforeTranspond = e.MsgIdBeforeTranspond || e.MsgId,
a._h = void 0,
a._offsetTop = void 0,
a.MMSourceMsgId = e.MsgId,
a.Scene = 2,
a = r.createMessage(a),
a.sendByLocal = !1,
a.Content = m.htmlDecode(a.Content.replace(/^@\w+:<br\/>/, "")),
a.MMActualSender = p.getUserName(),
a.MMSendContent && (a.MMSendContent = a.MMSendContent.replace(/^@\w+:\s/, "")),
a.MMDigest && (a.MMDigest = a.MMDigest.replace(/^@\w+:/, "")),
a.MMActualContent && (a.MMActualContent = m.clearHtmlStr(a.MMActualContent.replace(/^@\w+:<br\/>/, ""))),
r.appendMessage(a),
r.sendMessage(a)
}
}
var M = t.ngDialogData.msg;
t.pickConfig = {
types: ["chatroom", "star", "friend"],
opt: {
star: {},
chatroom: {
isSaved: !0
},
friend: {
isWithoutStar: !0,
isWithoutBrand: !0
}
}
};
var v = angular.copy(r.getChatList());
v.unshift({
text: _("b3b6735"),
type: "header"
}),
t.initList = v,
t.ensure = function() {
var e = t.selectedUsers;
t.comfirming = !1;
for (var a = 0; a < e.length; a++)
h(M, e[a].UserName);
t.closeThisDialog()
}
,
t.cancel = function() {
t.comfirming = !1
}
,
t.send = function() {
var e = t.selectedUsers.length;
if (e > 0) {
if (1 == e)
return void t.ensure();
if (e > 200)
return void alert("选择的人数必须少于200");
t.comfirming = !0
}
}
}
])
}()
}
, function(e, exports) {
!function() {
"use strict";
angular.module("Services").factory("appFactory", ["$http", "$q", "confFactory", "accountFactory", "loginFactory", "utilFactory", "reportService", "mmHttp", function(e, t, a, n, i, o, r, c) {
var s = {
globalData: {
chatList: []
},
init: function() {
var e = t.defer();
return c({
method: "POST",
url: a.API_webwxinit,
MMRetry: {
count: 1,
timeout: 1
},
data: {
BaseRequest: {
Uin: n.getUin(),
Sid: n.getSid(),
Skey: n.getSkey(),
DeviceID: n.getDeviceID()
}
}
}).success(function(t) {
e.resolve(t)
}).error(function(t) {
e.reject("error:" + t)
}),
e.promise
},
sync: function() {
var e = t.defer();
return c({
method: "POST",
MMRetry: {
serial: !0
},
url: a.API_webwxsync + "?" + ["sid=" + n.getSid(), "skey=" + n.getSkey()].join("&"),
data: angular.extend(n.getBaseRequest(), {
SyncKey: n.getSyncKey(),
rr: ~new Date
})
}).success(function(t) {
e.resolve(t),
o.getCookie("webwx_data_ticket") || r.report(r.ReportType.cookieError, {
text: "webwx_data_ticket 票据丢失",
cookie: document.cookie
})
}).error(function(t) {
e.reject("error:" + t),
o.log("sync error")
}),
e.promise
},
syncCheck: function() {
var e = t.defer()
, c = this
, s = a.API_synccheck + "?" + ["r=" + o.now(), "skey=" + encodeURIComponent(n.getSkey()), "sid=" + encodeURIComponent(n.getSid()), "uin=" + n.getUin(), "deviceid=" + n.getDeviceID(), "synckey=" + encodeURIComponent(n.getFormateSyncCheckKey())].join("&");
return window.synccheck && (window.synccheck.selector = 0),
$.ajax({
url: s,
dataType: "script",
timeout: 35e3
}).done(function() {
window.synccheck && "0" == window.synccheck.retcode ? "0" != window.synccheck.selector ? c.sync().then(function(t) {
e.resolve(t)
}, function(e) {}) : e.reject(window.synccheck && window.synccheck.selector) : !window.synccheck || "1101" != window.synccheck.retcode && "1102" != window.synccheck.retcode ? window.synccheck && "1100" == window.synccheck.retcode ? i.loginout(0) : (e.reject("syncCheck net error"),
r.report(r.ReportType.netError, {
text: "syncCheck net error",
url: s
})) : i.loginout(1)
}),
e.promise
},
report: function(e) {}
};
return s
}
])
}()
}
, function(module, exports) {
!function(_aoUndefined) {
"use strict";
angular.module("Services").factory("chatFactory", ["$rootScope", "$timeout", "$http", "$q", "contactFactory", "accountFactory", "emojiFactory", "confFactory", "notificationFactory", "utilFactory", "reportService", "mmHttp", "titleRemind", function($rootScope, $timeout, $http, $q, contactFactory, accountFactory, emojiFactory, confFactory, notificationFactory, utilFactory, reportService, mmHttp, titleRemind) {
function handleChatList(e) {
for (var t, a = [], n = [], i = 0; i < e.length; i++)
t = e[i],
t.isTop() ? a.push(t) : n.push(t);
return [].unshift.apply(n, a),
n
}
var _chatList = [], _chatListInfos = [], _chatMessages = window._chatContent = {}, _currentUserName = "", _addedMsgIdsMap = {}, _msgMap = {}, _sendFileUserName, _currentUnreadMap = {}, service = {
setCurrentUserName: function(e) {
_currentUserName = e;
var t = contactFactory.getContact(e);
t._notActive = !1
},
getCurrentUserName: function() {
return _currentUserName
},
setSendFileUsername: function(e) {
return !!this._sendCheck(e) && (_sendFileUserName = e,
!0)
},
resetSendFileUsername: function() {
_sendFileUserName = ""
},
getSendFileUsername: function() {
return _sendFileUserName || _currentUserName
},
_sendCheck: function(e) {
var t = $("#chatArea .title_wrap .title_name")[0]
, a = $("#J_NavChatScrollBody")[0];
if (t && a) {
var n = $(t)
, i = $(a)
, o = n.attr("data-username")
, r = i.attr("data-username");
return o && r || utilFactory.reportSendState("sendcheckAttrError"),
e || utilFactory.reportSendState("toUserNameNotFound"),
!(!e || o != r || r != e) || (r != e && utilFactory.reportSendState("toUserNameConflictNav"),
o != e && utilFactory.reportSendState("toUserNameConflictChat"),
utilFactory.reportSendState("uiCheckFail"),
reportService.report(reportService.ReportType.sendError, {
type: "uiCheckFail",
browser: utilFactory.browser.msie ? "ie" : "other",
values: {
chatuser: o,
navuser: r,
userName: e
}
}),
!1)
}
return t || utilFactory.reportSendState("chatCurrentNameNotFound"),
a || utilFactory.reportSendState("navcurrentNameNotFound"),
utilFactory.reportSendState("sendcheckElementError"),
!1
},
createMessage: function(e) {
switch (e.FromUserName || (e.FromUserName = accountFactory.getUserName()),
e.ToUserName || (e.ToUserName = this.getCurrentUserName()),
e.ClientMsgId = e.LocalID = e.MsgId = (utilFactory.now() + Math.random().toFixed(3)).replace(".", ""),
e.CreateTime = Math.round(utilFactory.now() / 1e3),
e.MMStatus = confFactory.MSG_SEND_STATUS_READY,
e.sendByLocal = !0,
e.MsgType) {
case confFactory.MSGTYPE_TEXT:
var t = [];
e.Content = e.Content.replace(/<input.*?un="(.*?)".*?value="(.*?)".*?>/g, function(e, a, n) {
return t.push(a),
n
}),
e.MMAtContacts = t.join(","),
e.MMSendContent = utilFactory.htmlDecode(utilFactory.clearHtmlStr(e.Content.replace(/<(?:img|IMG).*?text="(.*?)".*?>/g, function(e, t) {
return t.replace(confFactory.MM_EMOTICON_WEB, "")
}).replace(/<(?:br|BR)\/?>/g, "\n"))).replace(/<(.*?)>/g, function(e) {
return emojiFactory.EmojiCodeMap[emojiFactory.QQFaceMap[e]] || e
}),
e.Content = e.Content.replace(/<(?!(img|IMG|br|BR))[^>]*>/g, "").replace(/\n/g, "<br>");
break;
case confFactory.MSGTYPE_APP:
if (e.AppMsgType == confFactory.APPMSGTYPE_URL)
break;
e.AppMsgType = confFactory.APPMSGTYPE_ATTACH,
e.Content = "<msg><appmsg appid='wxeb7ec651dd0aefa9' sdkver=''><title>" + e.FileName + "</title><des></des><action></action><type>" + confFactory.APPMSGTYPE_ATTACH + "</type><content></content><url></url><lowurl></lowurl><appattach><totallen>" + e.FileSize + "</totallen><attachid>#MediaId#</attachid><fileext>" + (e.MMFileExt || e.MMAppMsgFileExt) + "</fileext></appattach><extinfo></extinfo></appmsg></msg>"
}
return e
},
appendMessage: function(e) {
e.MMStatus = confFactory.MSG_SEND_STATUS_SENDING,
this.messageProcess(e)
},
sendMessage: function(e) {
switch (e.MMStatus = confFactory.MSG_SEND_STATUS_SENDING,
e.MsgType) {
case confFactory.MSGTYPE_TEXT:
this.postTextMessage(e);
break;
case confFactory.MSGTYPE_IMAGE:
this.postImgMessage(e);
break;
case confFactory.MSGTYPE_MICROVIDEO:
this.postMicroVideoMessage(e);
break;
case confFactory.MSGTYPE_VIDEO:
this.postVideoMessage(e);
break;
case confFactory.MSGTYPE_APP:
this.postAppMessage(e);
break;
case confFactory.MSGTYPE_EMOTICON:
this.postEmoticonMessage(e)
}
},
_postMessage: function(url, data, msg) {
data.FromUserName = msg.FromUserName,
data.ToUserName = msg.ToUserName,
data.LocalID = msg.LocalID,
data.ClientMsgId = msg.ClientMsgId,
data = angular.extend(accountFactory.getBaseRequest(), {
Msg: data
}),
data.Scene = msg.Scene || 0,
utilFactory.browser.msie && parseInt(utilFactory.browser.version) < 9 && url == confFactory.API_webwxsendmsg && (data = eval("'" + JSON.stringify(data) + "'")),
mmHttp({
method: "POST",
url: url,
data: data,
MMRetry: {
serial: !0
}
}).success(function(e) {
0 == e.BaseResponse.Ret ? (msg.MsgId = e.MsgID,
_msgMap[msg.MsgId] = msg,
_addedMsgIdsMap[msg.MsgId] = !0,
msg.MMStatus = confFactory.MSG_SEND_STATUS_SUCC,
$rootScope.$broadcast("root:msgSend:success", msg)) : (reportService.report(reportService.ReportType.netError, {
text: "postMessage error",
url: url,
res: e
}),
msg.MMStatus = confFactory.MSG_SEND_STATUS_FAIL)
}).error(function(e) {
reportService.report(reportService.ReportType.netError, {
text: "postMessage error",
url: url,
res: e
}),
msg.MMStatus = confFactory.MSG_SEND_STATUS_FAIL
})
},
postTextMessage: function(e) {
var t = {
Type: confFactory.MSGTYPE_TEXT,
Content: e.MMSendContent
};
e.MMAtContacts && e.MMAtContacts.length && (t.MsgSource = "<msgsource><atusername>" + e.MMAtContacts + "</atusername><atchatroomname>" + e.ToUserName + "</atchatroomname></msgsource>"),
e.SubMsgType == confFactory.MSGTYPE_LOCATION && (t.Type = confFactory.MSGTYPE_LOCATION,
t.Content = e.OriContent),
this._postMessage(confFactory.API_webwxsendmsg, t, e)
},
postImgMessage: function(e) {
var t = {
Type: confFactory.MSGTYPE_IMAGE,
MediaId: e.MediaId,
Content: e.Content
};
this._postMessage(confFactory.API_webwxsendmsgimg + "?fun=async&f=json", t, e)
},
postVideoMessage: function(e) {
var t = {
Type: confFactory.MSGTYPE_VIDEO,
MediaId: e.MediaId,
Content: e.Content
};
this._postMessage(confFactory.API_webwxsendmsgvedio + "?fun=async&f=json", t, e)
},
postMicroVideoMessage: function(e) {
var t = {
Type: confFactory.MSGTYPE_MICROVIDEO,
MediaId: e.MediaId,
Content: e.Content
};
this._postMessage(confFactory.API_webwxsendmsgvedio + "?fun=async&f=json", t, e)
},
postAppMessage: function(e) {
var t;
t = {
Signature: e.Signature,
Type: e.AppMsgType
},
e.AppMsgType == confFactory.APPMSGTYPE_ATTACH ? t.Content = "<appmsg appid='wxeb7ec651dd0aefa9' sdkver=''><title>" + e.FileName + "</title><des></des><action></action><type>" + confFactory.APPMSGTYPE_ATTACH + "</type><content></content><url></url><lowurl></lowurl><appattach><totallen>" + e.FileSize + "</totallen><attachid>" + e.MediaId + "</attachid><fileext>" + (e.MMFileExt || e.MMAppMsgFileExt) + "</fileext></appattach><extinfo></extinfo></appmsg>" : t.Content = e.OriContent || e.Content,
this._postMessage(confFactory.API_webwxsendappmsg + "?fun=async&f=json", t, e)
},
postEmoticonMessage: function(e) {
var t = {
Type: confFactory.MSGTYPE_EMOTICON,
EmojiFlag: e.EmojiFlag,
EMoticonMd5: e.EMoticonMd5 || e.md5
};
e.MediaId && (t.MediaId = e.MediaId),
e.MMSourceMsgId && "undefined" != typeof e.MMStatus && e.MMStatus != confFactory.MSG_SEND_STATUS_SUCC && (e.MMPreviewSrc = confFactory.API_webwxgetmsgimg + "?&MsgID=" + e.MMSourceMsgId + "&skey=" + encodeURIComponent(accountFactory.getSkey()) + "&type=big"),
this._postMessage(confFactory.API_webwxsendemoticon + "?fun=sys", t, e)
},
initChatList: function(e) {
var t = this
, a = e.split(",");
angular.forEach(a, function(e, t) {
if (e && !utilFactory.isShieldUser(e) && !utilFactory.isSpUser(e)) {
var a = _chatList.indexOf(e);
a == -1 && (_chatList.push(e),
utilFactory.isRoomContact(e) && contactFactory.addBatchgetChatroomContact(e))
}
}),
t.getChatList()
},
addChatList: function(e) {
var t = this;
e && (angular.isArray(e) || (e = [e]),
angular.forEach(e, function(e, t) {
var a = ""
, n = 0;
if (a = e.UserName ? e.UserName : e.FromUserName == accountFactory.getUserInfo().UserName ? e.ToUserName : e.FromUserName,
n = _chatList.indexOf(a),
n == -1)
_chatList.unshift(a),
utilFactory.isRoomContact(a) && contactFactory.addBatchgetChatroomContact(a);
else {
var i = _chatList.splice(n, 1);
_chatList.unshift(i[0])
}
}),
t.getChatList(),
$rootScope.$broadcast("chat:add:success"))
},
deleteChatList: function(e) {
var t = this;
e && (angular.isArray(e) || (e = [e]),
angular.forEach(e, function(e, t) {
var a = _chatList.indexOf(e);
a > -1 && _chatList.splice(a, 1)
}),
t.getChatList())
},
getChatList: function() {
var e = this
, t = [];
return _chatListInfos.length = 0,
angular.forEach(_chatList, function(a, n) {
var i, o = contactFactory.getContact(a), r = {};
if (o && !o.isBrandContact() && !o.isShieldUser()) {
if (a == _currentUserName) {
var c = e.getUnreadMsgsCount(a);
(!o.unreadCount || o.unreadCount < c) && (o.unreadCount = e.getUnreadMsgsCount(a)),
o._notActive || e.markMsgsRead(a) && e.notifyMobile(a, confFactory.StatusNotifyCode_READED)
}
i = e._getLastMessage(o.UserName),
angular.extend(r, o, {
MMDigest: i.MMDigest || "",
NoticeCount: e.getUnreadMsgsCount(a),
MMStatus: i.MMStatus,
MMTime: i.MMTime || "",
MMDigestTime: i.MMDigestTime || ""
}),
t.push(r)
}
}),
[].push.apply(_chatListInfos, handleChatList(t)),
_chatListInfos
},
_getLastMessage: function(e) {
var t = this
, a = t.getChatMessage(e);
return a.length ? a[a.length - 1] : {}
},
addChatMessage: function(e) {
if (e) {
var t = this
, a = (e.FromUserName,
e.ToUserName,
_chatMessages[e.MMPeerUserName] || (_chatMessages[e.MMPeerUserName] = []));
_addedMsgIdsMap[e.MsgId] || (_addedMsgIdsMap[e.MsgId] = !0,
_msgMap[e.MsgId] = e,
a.push(e),
$rootScope.$broadcast("message:add:success", e),
t.getChatList())
}
},
getMsg: function(e) {
return _msgMap[e]
},
deleteChatMessage: function(e) {
_chatMessages[e] = []
},
updateChatMessage: function(e) {},
showMessage: function(e, t, a) {
if (e)
t.DisplayName = e;
else {
var n = contactFactory.getContact(t.MMActualSender);
n && n.DisplayName ? t.DisplayName = n.DisplayName : t.DisplayName = t.MMActualSender
}
},
updateMessage: function(e, t, a) {
angular.extend(e[t], a)
},
getChatMessage: function(e, t) {
var a = this;
return t && (_currentUserName = e,
a.markMsgsRead(e)),
_chatMessages[e] || (_chatMessages[e] = []),
_chatMessages[e]
},
cleanChatMessage: function(e) {
_chatMessages[e] && _chatMessages[e].splice(0, _chatMessages[e].length)
},
getChatMessageBySlice: function(e, t, a) {
var n = this;
return _currentUserName = e,
n.clearChatNoticeCount(),
_chatMessages[e] ? _chatMessages[e].slice(t, a) : []
},
setCurrentUnread: function(e, t) {
_currentUnreadMap[e] = t
},
getUnreadMsgsCount: function(e) {
var t, a = 0;
if (_currentUnreadMap[e])
return _currentUnreadMap[e];
if (t = _chatMessages[e])
for (var n = t.length - 1; n >= 0; n--)
t[n].MMUnread && ++a;
return a
},
markMsgsRead: function(e) {
for (var t = this.getChatMessage(e), a = !1, n = 0, i = t.length; n < i; n++)
t[n].MMUnread && (a = !0),
t[n].MMUnread = !1;
return this.setCurrentUnread(e, 0),
a
},
messageProcess: function(e) {
var t = this
, a = contactFactory.getContact(e.FromUserName, "", !0);
if (!a || a.isMuted() || a.isSelf() || a.isShieldUser() || a.isBrandContact() || titleRemind.increaseUnreadMsgNum(),
e.MMPeerUserName = t._getMessagePeerUserName(e),
e.MsgType == confFactory.MSGTYPE_STATUSNOTIFY)
return void t._statusNotifyProcessor(e);
if (e.MsgType != confFactory.MSGTYPE_SYSNOTICE && !(utilFactory.isShieldUser(e.FromUserName) || utilFactory.isShieldUser(e.ToUserName) || e.MsgType == confFactory.MSGTYPE_VERIFYMSG && e.RecommendInfo && e.RecommendInfo.UserName == accountFactory.getUserInfo().UserName)) {
switch (t._commonMsgProcess(e),
e.MsgType) {
case confFactory.MSGTYPE_APP:
try {
e.MMIsAppMsg = !0,
t._appMsgProcess(e)
} catch (e) {}
break;
case confFactory.MSGTYPE_EMOTICON:
t._emojiMsgProcess(e);
break;
case confFactory.MSGTYPE_IMAGE:
t._imageMsgProcess(e);
break;
case confFactory.MSGTYPE_VOICE:
t._voiceMsgProcess(e);
break;
case confFactory.MSGTYPE_VIDEO:
t._videoMsgProcess(e);
break;
case confFactory.MSGTYPE_MICROVIDEO:
t._mircovideoMsgProcess(e);
break;
case confFactory.MSGTYPE_TEXT:
"newsapp" == e.FromUserName ? t._newsMsgProcess(e) : e.AppMsgType == confFactory.APPMSGTYPE_RED_ENVELOPES ? (e.MsgType = confFactory.MSGTYPE_APP,
t._appMsgProcess(e)) : e.SubMsgType == confFactory.MSGTYPE_LOCATION ? t._locationMsgProcess(e) : t._textMsgProcess(e);
break;
case confFactory.MSGTYPE_RECALLED:
return void t._recalledMsgProcess(e);
case confFactory.MSGTYPE_LOCATION:
t._locationMsgProcess(e);
break;
case confFactory.MSGTYPE_VOIPMSG:
case confFactory.MSGTYPE_VOIPNOTIFY:
case confFactory.MSGTYPE_VOIPINVITE:
t._voipMsgProcess(e);
break;
case confFactory.MSGTYPE_POSSIBLEFRIEND_MSG:
t._recommendMsgProcess(e);
break;
case confFactory.MSGTYPE_VERIFYMSG:
t._verifyMsgProcess(e);
break;
case confFactory.MSGTYPE_SHARECARD:
t._shareCardProcess(e);
break;
case confFactory.MSGTYPE_SYS:
t._systemMsgProcess(e);
break;
default:
e.MMDigest = _("938b111")
}
e.MMActualContent = utilFactory.hrefEncode(e.MMActualContent);
var n = contactFactory.getContact(e.MMPeerUserName);
e.MMIsSend || n && (n.isMuted() || n.isBrandContact()) || e.MsgType == confFactory.MSGTYPE_SYS || (accountFactory.isNotifyOpen() && t._notify(e),
accountFactory.isSoundOpen() && utilFactory.initMsgNoticePlayer(confFactory.RES_SOUND_RECEIVE_MSG)),
t.addChatMessage(e),
t.addChatList([e])
}
},
_statusNotifyProcessor: function(e) {
var t = this;
switch (e.StatusNotifyCode) {
case confFactory.StatusNotifyCode_SYNC_CONV:
t.initChatList(e.StatusNotifyUserName);
break;
case confFactory.StatusNotifyCode_ENTER_SESSION:
t.markMsgsRead(e.MMPeerUserName),
t.addChatList([e]);
break;
case confFactory.StatusNotifyCode_QUIT_SESSION:
}
},
_commonMsgProcess: function(e) {
var t, a, n = this, i = "", o = "", r = "";
e.Content = e.Content || "",
e.MMDigest = "",
e.MMIsSend = e.FromUserName == accountFactory.getUserName() || "" == e.FromUserName,
a = n.getChatMessage(e.MMPeerUserName),
utilFactory.isRoomContact(e.MMPeerUserName) ? (e.MMIsChatRoom = !0,
i = e.Content.replace(/^(@[a-zA-Z0-9]+|[a-zA-Z0-9_-]+):<br\/>/, function(e, t) {
return o = t,
""
}),
o && o != accountFactory.getUserName() && (t = contactFactory.getContact(o, e.MMPeerUserName),
t && (r = t.getDisplayName(e.MMPeerUserName),
r && (e.MMDigest = r + ":")))) : (e.MMIsChatRoom = !1,
i = e.Content),
e.MMIsSend || e.MMUnread != _aoUndefined || e.MsgType == confFactory.MSGTYPE_SYS || (e.MMUnread = !0),
e.LocalID || (e.ClientMsgId = e.LocalID = e.MsgId),
i = emojiFactory.emoticonFormat(i),
e.MMActualContent = i,
e.MMActualSender = o || e.FromUserName,
n._calcMsgDisplayTime(a[a.length - 1], e)
},
_textMsgProcess: function(e) {
e.MsgType = confFactory.MSGTYPE_TEXT,
e.MMDigest += e.MMActualContent.replace(/<br ?[^><]*\/?>/g, "")
},
_imageMsgProcess: function(e) {
e.MsgType = confFactory.MSGTYPE_IMAGE,
e.MMDigest += _("a5627e8")
},
_voiceMsgProcess: function(e) {
e.MsgType = confFactory.MSGTYPE_VOICE,
e.MMDigest += _("b28dac0"),