From 069ec46cb97859a94cae18cc442270f39d4e1343 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Sat, 15 Feb 2025 16:35:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=BD=E7=95=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/common/js/config.js | 2 +- .../cache/.vite/deps/@tencentcloud_chat.js | 10519 ---------------- .../.vite/deps/@tencentcloud_chat.js.map | 7 - ...centcloud_chat_modules_group-module__js.js | 3339 ----- ...cloud_chat_modules_group-module__js.js.map | 7 - .../dist/cache/.vite/deps/_metadata.json | 37 - .../dist/cache/.vite/deps/chunk-TDUMLE5V.js | 17 - .../cache/.vite/deps/chunk-TDUMLE5V.js.map | 7 - .../dist/cache/.vite/deps/crypto-js.js | 6591 ---------- .../dist/cache/.vite/deps/crypto-js.js.map | 7 - .../dist/cache/.vite/deps/js-pinyin.js | 947 -- .../dist/cache/.vite/deps/js-pinyin.js.map | 7 - .../unpackage/dist/cache/.vite/deps/lodash.js | 5497 -------- .../dist/cache/.vite/deps/lodash.js.map | 7 - .../dist/cache/.vite/deps/package.json | 3 - .../cache/.vite/deps/tim-upload-plugin.js | 242 - .../cache/.vite/deps/tim-upload-plugin.js.map | 7 - jiuyi2/vite.config.js | 2 +- 18 files changed, 2 insertions(+), 27243 deletions(-) delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js.map delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat_modules_group-module__js.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat_modules_group-module__js.js.map delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/_metadata.json delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/chunk-TDUMLE5V.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/chunk-TDUMLE5V.js.map delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js.map delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js.map delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js.map delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/package.json delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/tim-upload-plugin.js delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/tim-upload-plugin.js.map diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index aa30024d..e05aaa5e 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -7,7 +7,7 @@ const config = { // #endif // #ifndef H5 // host: 'http://91f.xyz:8080', - host: 'http://d5si5v.natappfree.cc', + host: 'http://1a4b9ed1.r24.cpolar.top', // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js b/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js deleted file mode 100644 index 47f4e6ad..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js +++ /dev/null @@ -1,10519 +0,0 @@ -import { - __commonJS -} from "./chunk-TDUMLE5V.js"; - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/@tencentcloud/chat/index.js -var require_chat = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/@tencentcloud/chat/index.js"(exports, module) { - !function(e, t) { - "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).TencentCloudChat = t(); - }(exports, function() { - function U(t2, e2) { - var n2, o2 = Object.keys(t2); - return Object.getOwnPropertySymbols && (n2 = Object.getOwnPropertySymbols(t2), e2 && (n2 = n2.filter(function(e3) { - return Object.getOwnPropertyDescriptor(t2, e3).enumerable; - })), o2.push.apply(o2, n2)), o2; - } - function y(t2) { - for (var e2 = 1; e2 < arguments.length; e2++) { - var n2 = null != arguments[e2] ? arguments[e2] : {}; - e2 % 2 ? U(Object(n2), true).forEach(function(e3) { - F(t2, e3, n2[e3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(n2)) : U(Object(n2)).forEach(function(e3) { - Object.defineProperty(t2, e3, Object.getOwnPropertyDescriptor(n2, e3)); - }); - } - return t2; - } - function b(e2) { - return (b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) { - return typeof e3; - } : function(e3) { - return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3; - })(e2); - } - function d(e2, t2) { - if (!(e2 instanceof t2)) - throw new TypeError("Cannot call a class as a function"); - } - function w(e2, t2) { - for (var n2 = 0; n2 < t2.length; n2++) { - var o2 = t2[n2]; - o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e2, o2.key, o2); - } - } - function e(e2, t2, n2) { - return t2 && w(e2.prototype, t2), n2 && w(e2, n2), Object.defineProperty(e2, "prototype", { writable: false }), e2; - } - function F(e2, t2, n2) { - return t2 in e2 ? Object.defineProperty(e2, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e2[t2] = n2, e2; - } - function t(e2, t2) { - if ("function" != typeof t2 && null !== t2) - throw new TypeError("Super expression must either be null or a function"); - e2.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e2, writable: true, configurable: true } }), Object.defineProperty(e2, "prototype", { writable: false }), t2 && x(e2, t2); - } - function q(e2) { - return (q = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e3) { - return e3.__proto__ || Object.getPrototypeOf(e3); - })(e2); - } - function x(e2, t2) { - return (x = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e3, t3) { - return e3.__proto__ = t3, e3; - })(e2, t2); - } - function V() { - if ("undefined" == typeof Reflect || !Reflect.construct) - return false; - if (Reflect.construct.sham) - return false; - if ("function" == typeof Proxy) - return true; - try { - return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })), true; - } catch (e2) { - return false; - } - } - function H(e2, t2, n2) { - return (H = V() ? Reflect.construct.bind() : function(e3, t3, n3) { - var o2 = [null], t3 = (o2.push.apply(o2, t3), new (Function.bind.apply(e3, o2))()); - return n3 && x(t3, n3.prototype), t3; - }).apply(null, arguments); - } - function B(e2) { - var n2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; - return function(e3) { - if (null === e3 || -1 === Function.toString.call(e3).indexOf("[native code]")) - return e3; - if ("function" != typeof e3) - throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== n2) { - if (n2.has(e3)) - return n2.get(e3); - n2.set(e3, t2); - } - function t2() { - return H(e3, arguments, q(this).constructor); - } - return t2.prototype = Object.create(e3.prototype, { constructor: { value: t2, enumerable: false, writable: true, configurable: true } }), x(t2, e3); - }(e2); - } - function K(e2, t2) { - if (null == e2) - return {}; - var n2, o2 = function(e3, t3) { - if (null == e3) - return {}; - for (var n3, o3 = {}, i3 = Object.keys(e3), a3 = 0; a3 < i3.length; a3++) - n3 = i3[a3], 0 <= t3.indexOf(n3) || (o3[n3] = e3[n3]); - return o3; - }(e2, t2); - if (Object.getOwnPropertySymbols) - for (var i2 = Object.getOwnPropertySymbols(e2), a2 = 0; a2 < i2.length; a2++) - n2 = i2[a2], 0 <= t2.indexOf(n2) || Object.prototype.propertyIsEnumerable.call(e2, n2) && (o2[n2] = e2[n2]); - return o2; - } - function i(e2) { - if (void 0 === e2) - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e2; - } - function n(n2) { - var o2 = V(); - return function() { - var e2, t2 = q(n2), t2 = (e2 = o2 ? (e2 = q(this).constructor, Reflect.construct(t2, arguments, e2)) : t2.apply(this, arguments), this); - if (e2 && ("object" == typeof e2 || "function" == typeof e2)) - return e2; - if (void 0 !== e2) - throw new TypeError("Derived constructors may only return object or undefined"); - return i(t2); - }; - } - function Y(e2, t2) { - return W(e2) || function(e3, t3) { - var n2 = null == e3 ? null : "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"]; - if (null != n2) { - var o2, i2, a2 = [], s2 = true, r2 = false; - try { - for (n2 = n2.call(e3); !(s2 = (o2 = n2.next()).done) && (a2.push(o2.value), !t3 || a2.length !== t3); s2 = true) - ; - } catch (e4) { - r2 = true, i2 = e4; - } finally { - try { - s2 || null == n2.return || n2.return(); - } finally { - if (r2) - throw i2; - } - } - return a2; - } - }(e2, t2) || J(e2, t2) || X(); - } - function p(e2) { - return function(e3) { - if (Array.isArray(e3)) - return z(e3); - }(e2) || j(e2) || J(e2) || function() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }(); - } - function W(e2) { - if (Array.isArray(e2)) - return e2; - } - function j(e2) { - if ("undefined" != typeof Symbol && null != e2[Symbol.iterator] || null != e2["@@iterator"]) - return Array.from(e2); - } - function J(e2, t2) { - var n2; - if (e2) - return "string" == typeof e2 ? z(e2, t2) : "Map" === (n2 = "Object" === (n2 = Object.prototype.toString.call(e2).slice(8, -1)) && e2.constructor ? e2.constructor.name : n2) || "Set" === n2 ? Array.from(e2) : "Arguments" === n2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? z(e2, t2) : void 0; - } - function z(e2, t2) { - (null == t2 || t2 > e2.length) && (t2 = e2.length); - for (var n2 = 0, o2 = new Array(t2); n2 < t2; n2++) - o2[n2] = e2[n2]; - return o2; - } - function X() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function Z(e2, t2) { - var n2, o2, i2, a2, s2 = "undefined" != typeof Symbol && e2[Symbol.iterator] || e2["@@iterator"]; - if (s2) - return i2 = !(o2 = true), { s: function() { - s2 = s2.call(e2); - }, n: function() { - var e3 = s2.next(); - return o2 = e3.done, e3; - }, e: function(e3) { - i2 = true, n2 = e3; - }, f: function() { - try { - o2 || null == s2.return || s2.return(); - } finally { - if (i2) - throw n2; - } - } }; - if (Array.isArray(e2) || (s2 = J(e2)) || t2 && e2 && "number" == typeof e2.length) - return s2 && (e2 = s2), a2 = 0, { s: t2 = function() { - }, n: function() { - return a2 >= e2.length ? { done: true } : { done: false, value: e2[a2++] }; - }, e: function(e3) { - throw e3; - }, f: t2 }; - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var h = { SDK_READY: "sdkStateReady", SDK_NOT_READY: "sdkStateNotReady", SDK_DESTROY: "sdkDestroy", MESSAGE_RECEIVED: "onMessageReceived", ROOM_CUSTOM_DATA_RECEIVED: "onRoomCustomDataReceived", MESSAGE_MODIFIED: "onMessageModified", MESSAGE_REVOKED: "onMessageRevoked", MESSAGE_READ_BY_PEER: "onMessageReadByPeer", MESSAGE_READ_RECEIPT_RECEIVED: "onMessageReadReceiptReceived", MESSAGE_EXTENSIONS_UPDATED: "onMessageExtensionsUpdated", MESSAGE_EXTENSIONS_DELETED: "onMessageExtensionsDeleted", MESSAGE_REACTIONS_UPDATED: "onMessageReactionsUpdated", CONVERSATION_LIST_UPDATED: "onConversationListUpdated", TOTAL_UNREAD_MESSAGE_COUNT_UPDATED: "onTotalUnreadMessageCountUpdated", CONVERSATION_GROUP_LIST_UPDATED: "onConversationGroupListUpdated", CONVERSATION_IN_GROUP_UPDATED: "onConversationInGroupUpdated", GROUP_LIST_UPDATED: "onGroupListUpdated", GROUP_ATTRIBUTES_UPDATED: "groupAttributesUpdated", GROUP_COUNTER_UPDATED: "onGroupCounterUpdated", TOPIC_CREATED: "onTopicCreated", TOPIC_DELETED: "onTopicDeleted", TOPIC_UPDATED: "onTopicUpdated", PROFILE_UPDATED: "onProfileUpdated", USER_STATUS_UPDATED: "onUserStatusUpdated", BLACKLIST_UPDATED: "blacklistUpdated", FRIEND_LIST_UPDATED: "onFriendListUpdated", FRIEND_GROUP_LIST_UPDATED: "onFriendGroupListUpdated", FRIEND_APPLICATION_LIST_UPDATED: "onFriendApplicationListUpdated", MY_FOLLOWERS_LIST_UPDATED: "onMyFollowersListUpdated", MY_FOLLOWING_LIST_UPDATED: "onMyFollowingListUpdated", MUTUAL_FOLLOWERS_LIST_UPDATED: "onMutualFollowersListUpdated", KICKED_OUT: "kickedOut", ERROR: "error", NET_STATE_CHANGE: "netStateChange", ALL_RECEIVE_MESSAGE_OPT_UPDATED: "onAllReceiveMessageOptUpdated" }, A = { MSG_TEXT: "TIMTextElem", MSG_IMAGE: "TIMImageElem", MSG_SOUND: "TIMSoundElem", MSG_AUDIO: "TIMSoundElem", MSG_FILE: "TIMFileElem", MSG_FACE: "TIMFaceElem", MSG_VIDEO: "TIMVideoFileElem", MSG_GEO: "TIMLocationElem", MSG_LOCATION: "TIMLocationElem", MSG_GRP_TIP: "TIMGroupTipElem", MSG_GRP_SYS_NOTICE: "TIMGroupSystemNoticeElem", MSG_CUSTOM: "TIMCustomElem", MSG_MERGER: "TIMRelayElem", MSG_PRIORITY_HIGH: "High", MSG_PRIORITY_NORMAL: "Normal", MSG_PRIORITY_LOW: "Low", MSG_PRIORITY_LOWEST: "Lowest", CONV_C2C: "C2C", CONV_GROUP: "GROUP", CONV_TOPIC: "TOPIC", CONV_SYSTEM: "@TIM#SYSTEM", CONV_AT_ME: 1, CONV_AT_ALL: 2, CONV_AT_ALL_AT_ME: 3, CONV_MARK_TYPE_STAR: 1, CONV_MARK_TYPE_UNREAD: 2, CONV_MARK_TYPE_FOLD: 4, CONV_MARK_TYPE_HIDE: 8, GRP_PRIVATE: "Private", GRP_WORK: "Private", GRP_PUBLIC: "Public", GRP_CHATROOM: "ChatRoom", GRP_MEETING: "ChatRoom", GRP_AVCHATROOM: "AVChatRoom", GRP_COMMUNITY: "Community", GRP_ROOM: "Room", GRP_LIVE: "Live", GRP_MBR_ROLE_OWNER: "Owner", GRP_MBR_ROLE_ADMIN: "Admin", GRP_MBR_ROLE_MEMBER: "Member", GRP_MBR_ROLE_CUSTOM: "Custom", GRP_TIP_MBR_JOIN: 1, GRP_TIP_MBR_QUIT: 2, GRP_TIP_MBR_KICKED_OUT: 3, GRP_TIP_MBR_SET_ADMIN: 4, GRP_TIP_MBR_CANCELED_ADMIN: 5, GRP_TIP_GRP_PROFILE_UPDATED: 6, GRP_TIP_MBR_PROFILE_UPDATED: 7, GRP_TIP_BAN_AVCHATROOM_MEMBER: 10, GRP_TIP_UNBAN_AVCHATROOM_MEMBER: 11, MSG_REMIND_ACPT_AND_NOTE: "AcceptAndNotify", MSG_REMIND_ACPT_NOT_NOTE: "AcceptNotNotify", MSG_REMIND_DISCARD: "Discard", RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT: "AcceptNotNotifyExceptAt", NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT: "AcceptNotNotifyExceptAt", NOT_RECEIVE_MSG_EXCEPT_AT: "NotReceiveMsgExceptAt", GENDER_UNKNOWN: "Gender_Type_Unknown", GENDER_FEMALE: "Gender_Type_Female", GENDER_MALE: "Gender_Type_Male", KICKED_OUT_MULT_ACCOUNT: "multipleAccount", KICKED_OUT_MULT_DEVICE: "multipleDevice", KICKED_OUT_USERSIG_EXPIRED: "userSigExpired", KICKED_OUT_REST_API: "REST_API_Kick", ALLOW_TYPE_ALLOW_ANY: "AllowType_Type_AllowAny", ALLOW_TYPE_NEED_CONFIRM: "AllowType_Type_NeedConfirm", ALLOW_TYPE_DENY_ANY: "AllowType_Type_DenyAny", FORBID_TYPE_NONE: "AdminForbid_Type_None", FORBID_TYPE_SEND_OUT: "AdminForbid_Type_SendOut", JOIN_OPTIONS_FREE_ACCESS: "FreeAccess", JOIN_OPTIONS_NEED_PERMISSION: "NeedPermission", JOIN_OPTIONS_DISABLE_APPLY: "DisableApply", JOIN_STATUS_SUCCESS: "JoinedSuccess", JOIN_STATUS_ALREADY_IN_GROUP: "AlreadyInGroup", JOIN_STATUS_WAIT_APPROVAL: "WaitAdminApproval", INVITE_OPTIONS_DISABLE_INVITE: "DisableInvite", INVITE_OPTIONS_NEED_PERMISSION: "NeedPermission", INVITE_OPTIONS_FREE_ACCESS: "FreeAccess", GRP_PROFILE_OWNER_ID: "ownerID", GRP_PROFILE_CREATE_TIME: "createTime", GRP_PROFILE_LAST_INFO_TIME: "lastInfoTime", GRP_PROFILE_MEMBER_NUM: "memberNum", GRP_PROFILE_MAX_MEMBER_NUM: "maxMemberNum", GRP_PROFILE_JOIN_OPTION: "joinOption", GRP_PROFILE_INVITE_OPTION: "inviteOption", GRP_PROFILE_INTRODUCTION: "introduction", GRP_PROFILE_NOTIFICATION: "notification", GRP_PROFILE_MUTE_ALL_MBRS: "muteAllMembers", SNS_ADD_TYPE_SINGLE: "Add_Type_Single", SNS_ADD_TYPE_BOTH: "Add_Type_Both", SNS_DELETE_TYPE_SINGLE: "Delete_Type_Single", SNS_DELETE_TYPE_BOTH: "Delete_Type_Both", SNS_APPLICATION_TYPE_BOTH: "Pendency_Type_Both", SNS_APPLICATION_SENT_TO_ME: "Pendency_Type_ComeIn", SNS_APPLICATION_SENT_BY_ME: "Pendency_Type_SendOut", SNS_APPLICATION_AGREE: "Response_Action_Agree", SNS_APPLICATION_AGREE_AND_ADD: "Response_Action_AgreeAndAdd", SNS_CHECK_TYPE_BOTH: "CheckResult_Type_Both", SNS_CHECK_TYPE_SINGLE: "CheckResult_Type_Single", SNS_TYPE_NO_RELATION: "CheckResult_Type_NoRelation", SNS_TYPE_A_WITH_B: "CheckResult_Type_AWithB", SNS_TYPE_B_WITH_A: "CheckResult_Type_BWithA", SNS_TYPE_BOTH_WAY: "CheckResult_Type_BothWay", NET_STATE_CONNECTED: "connected", NET_STATE_CONNECTING: "connecting", NET_STATE_DISCONNECTED: "disconnected", MSG_AT_ALL: "__kImSDK_MesssageAtALL__", READ_ALL_C2C_MSG: "readAllC2CMessage", READ_ALL_GROUP_MSG: "readAllGroupMessage", READ_ALL_MSG: "readAllMessage", USER_STATUS_UNKNOWN: 0, USER_STATUS_ONLINE: 1, USER_STATUS_OFFLINE: 2, USER_STATUS_UNLOGINED: 3, IOS_OFFLINE_PUSH_NO_SOUND: "push.no_sound", IOS_OFFLINE_PUSH_DEFAULT_SOUND: "default" }, Q = { NEW_INVITATION_RECEIVED: "newInvitationReceived", INVITEE_ACCEPTED: "ts_invitee_accepted", INVITEE_REJECTED: "ts_invitee_rejected", INVITATION_CANCELLED: "ts_invitation_cancelled", INVITATION_TIMEOUT: "ts_invitation_timeout", INVITATION_MODIFIED: "ts_invitation_modified", ACTION_TYPE_UNKNOWN: 0, ACTION_TYPE_INVITE: 1, ACTION_TYPE_CANCEL_INVITE: 2, ACTION_TYPE_ACCEPT_INVITE: 3, ACTION_TYPE_REJECT_INVITE: 4, ACTION_TYPE_INVITE_TIMEOUT: 5 }, $ = (e(de, [{ key: "use", value: function(e2) { - if ("function" != typeof e2) - throw "middleware must be a function"; - return this.cache.push(e2), this; - } }, { key: "next", value: function(e2) { - if (this.middlewares && 0 < this.middlewares.length) - return this.middlewares.shift().call(this, this.options, this.next.bind(this)); - } }, { key: "run", value: function(e2) { - return this.middlewares = this.cache.map(function(e3) { - return e3; - }), this.options = e2, this.next(); - } }]), de), ee = (e(le, [{ key: "equal", value: function(e2) { - return null !== e2 && this.low === e2.low && this.high === e2.high; - } }, { key: "toString", value: function() { - var e2 = Number(this.high).toString(16), t2 = Number(this.low).toString(16); - if (t2.length < 8) - for (var n2 = 8 - t2.length; n2; ) - t2 = "0" + t2, n2--; - return e2 + t2; - } }]), le), te = { TEST: { CHINA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, OVERSEA: { DEFAULT: "wss://wss-dev.tim.qq.com" }, SINGAPORE: { DEFAULT: "wss://wsssgp-dev.im.qcloud.com" }, KOREA: { DEFAULT: "wss://wsskr-dev.im.qcloud.com" }, GERMANY: { DEFAULT: "wss://wssger-dev.im.qcloud.com" }, IND: { DEFAULT: "wss://wssind-dev.im.qcloud.com" }, JPN: { DEFAULT: "wss://wssjpn-dev.im.qcloud.com" }, USA: { DEFAULT: "wss://wssusa-dev.im.qcloud.com" }, INDONESIA: { DEFAULT: "wss://wssidn-dev.im.qcloud.com" } }, PRODUCTION: { CHINA: { DEFAULT0: "wss://*w4c.my-imcloud.com", DEFAULT: "wss://wss.im.qcloud.com", BACKUP: "wss://wss.tim.qq.com", STAT: "https://events.im.qcloud.com", ANYCAST: "wss://162.14.13.203" }, OVERSEA: { DEFAULT0: "wss://*w4c.my-imcloud.com", DEFAULT: "wss://wss.im.qcloud.com", BACKUP: "wss://wss.my-imcloud.com", STAT: "https://api.my-imcloud.com" }, SINGAPORE: { DEFAULT0: "wss://*w4s.my-imcloud.com", DEFAULT: "wss://wsssgp.im.qcloud.com", BACKUP: "wss://wsssgp.my-imcloud.com", STAT: "https://apisgp.my-imcloud.com", ANYCAST: "wss://162.14.19.159" }, KOREA: { DEFAULT0: "wss://*w4k.my-imcloud.com", DEFAULT: "wss://wsskr.im.qcloud.com", BACKUP: "wss://wsskr.my-imcloud.com", STAT: "https://apikr.my-imcloud.com", ANYCAST: "wss://162.14.13.104" }, GERMANY: { DEFAULT0: "wss://*w4g.my-imcloud.com", DEFAULT: "wss://wssger.im.qcloud.com", BACKUP: "wss://wssger.my-imcloud.com", STAT: "https://apiger.my-imcloud.com", ANYCAST: "wss://162.14.3.17" }, IND: { DEFAULT0: "wss://*w4i.my-imcloud.com", DEFAULT: "wss://wssind.my-imcloud.com", BACKUP: "wss://wssind.im.qcloud.com", STAT: "https://apiind.my-imcloud.com", ANYCAST: "wss://162.14.18.188" }, JPN: { DEFAULT0: "wss://*w4j.my-imcloud.com", DEFAULT: "wss://wssjpn.im.qcloud.com", BACKUP: "wss://wssjpn.my-imcloud.com", STAT: "https://apijpn.my-imcloud.com" }, USA: { DEFAULT0: "wss://*w4u.my-imcloud.com", DEFAULT: "wss://wssusa.im.qcloud.com", BACKUP: "wss://wssusa.my-imcloud.com", STAT: "https://apiusa.my-imcloud.com", ANYCAST: "wss://162.14.10.42" }, INDONESIA: { DEFAULT0: "wss://*w4y.my-imcloud.com", DEFAULT: "wss://wssidn.im.qcloud.com", BACKUP: "wss://wssidn.my-imcloud.com", STAT: "https://apiidn.my-imcloud.com", ANYCAST: "wss://43.129.34.169" } } }, ne = { ANDROID: 2, IOS: 3, MAC: 4, WEB: 7, WX_MP: 8, QQ_MP: 9, TT_MP: 10, BAIDU_MP: 11, ALI_MP: 12, IPAD: 13, UNI_NATIVE_APP: 15, DONUT_NATIVE_APP: 19, NS_NATIVE_APP: 20, RN_NATIVE_APP: 21 }, oe = "1.7.3", ae = 537048168, se = "CHINA", a = { HOST: { CURRENT: { DEFAULT: "wss://wss.im.qcloud.com", STAT: "https://events.im.qcloud.com" }, setCurrent: function() { - this.CURRENT = te.PRODUCTION[0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : se]; - } }, NAME: { OPEN_IM: "openim", OPEN_IM_MSG_EXT: "openim_msg_ext_http_svc", GRP: "group_open_http_svc", GRP_AV: "group_open_avchatroom_http_svc", GRP_COMMUNITY: "million_group_open_http_svc", GRP_ATTR: "group_open_attr_http_svc", FD: "sns", PROFILE: "profile", RECENT_CONTACT: "recentcontact", PIC: "openpic", BIG_GRP_NO_AUTH: "group_open_http_noauth_svc", BIG_GRP_POLLING: "group_open_long_polling_http_svc", BIG_GRP_POLLING_NO_AUTH: "group_open_long_polling_http_noauth_svc", IM_OPEN_STAT: "imopenstat", WEB_IM: "webim", IM_COS_SIGN: "im_cos_sign_svr", CUSTOM_UPLOAD: "im_cos_msg", HEARTBEAT: "heartbeat", IM_OPEN_PUSH: "im_open_push", IM_OPEN_STATUS: "im_open_status", IM_LONG_MSG: "im_long_msg", IM_CONFIG_MANAGER: "im_sdk_config_mgr", STAT_SERVICE: "StatSvc", OVERLOAD_PUSH: "OverLoadPush", IM_MSG_AUDIT_MGR: "im_msg_audit_mgr", TUIROOM_SVR: "tui_room_svr", IM_OPEN_TRANSLATE: "im_open_translate", IM_OPEN_SPEECH: "im_open_speech", MSG_SEARCH: "message_search", FOLLOW: "follow", OFFLINE_PUSH_REPORT: "offline_push_report", IM_MSG_LOGIC: "im_msg_db_logic" } }, _ = { SEARCH_GRP_SNS: new ee(0, Math.pow(2, 1)).toString(), AV_HISTORY_MSG: new ee(0, Math.pow(2, 2)).toString(), GRP_COMMUNITY: new ee(0, Math.pow(2, 3)).toString(), MSG_TO_SPECIFIED_GRP_MBR: new ee(0, Math.pow(2, 4)).toString(), AV_MBR_LIST: new ee(0, Math.pow(2, 6)).toString(), USER_STATUS: new ee(0, Math.pow(2, 7)).toString(), CONV_MARK: new ee(0, Math.pow(2, 9)).toString(), CONV_GROUP: new ee(0, Math.pow(2, 10)).toString(), AV_BAN_MBR: new ee(0, Math.pow(2, 11)).toString(), MSG_EXT: new ee(0, Math.pow(2, 13)).toString(), GRP_COUNTER: new ee(0, Math.pow(2, 15)).toString(), PLUGIN_TRANSLATE: new ee(Math.pow(2, 6)).toString(), PLUGIN_VOICE_TO_TEXT: new ee(Math.pow(2, 7)).toString(), PLUGIN_CS: new ee(Math.pow(2, 8)).toString(), PLUGIN_PUSH: new ee(Math.pow(2, 9)).toString(), PLUGIN_BOT: new ee(Math.pow(2, 10)).toString(), MSG_REACTION: new ee(Math.pow(2, 16)).toString(), FOLLOW: new ee(Math.pow(2, 20)).toString() }, re = "group_profile", ce = ["Type", "Name", "Introduction", "Notification", "FaceUrl", "Owner_Account", "CreateTime", "InfoSeq", "LastInfoTime", "LastMsgTime", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "NextMsgSeq", "ShutUpAllMember", "InviteJoinOption"], ue = ["Role", "JoinTime", "MsgSeq", "MsgFlag"]; - function le() { - var e2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0, t2 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0; - d(this, le), this.high = e2, this.low = t2; - } - function de() { - d(this, de), this.cache = [], this.options = null; - } - a.HOST.setCurrent(se); - for (var pe, _e = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting), he = _e && "function" == typeof wx.createGamePortal, ge = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), fe = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), me = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), ve = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), o = "undefined" != typeof jd && "function" == typeof jd.getSystemInfoSync, Ie = "undefined" != typeof uni && "undefined" == typeof window && "function" == typeof uni.requireNativePlugin, s = _e && "object" === b(wx.miniapp), Me = "undefined" != typeof uni, v = _e || ge || fe || me || ve || Ie || o, r = "undefined" == typeof window && !v && "undefined" != typeof global && void 0 !== global.NativeScriptGlobals, ye = "undefined" != typeof global && (void 0 !== global.nativeModuleProxy || void 0 !== global.ReactNative), Ce = "undefined" != typeof uni ? !v : "undefined" != typeof window && !v && !ye, I = ge ? qq : fe ? tt : me ? swan : ve ? my : _e ? wx : Ie ? uni : o ? jd : {}, Te = Ce && window && window.navigator && window.navigator.userAgent || "", De = (o = "WEB", /(micromessenger|webbrowser)/i.test(Te) ? o = "WEB" : ge ? o = "QQ_MP" : fe ? o = "TT_MP" : me ? o = "BAIDU_MP" : ve ? o = "ALI_MP" : _e ? o = s ? "DONUT_NATIVE_APP" : "WX_MP" : Ie ? o = "UNI_NATIVE_APP" : r ? o = "NS_NATIVE_APP" : ye && (o = "RN_NATIVE_APP"), ne[o]), s = /iPad/i.test(Te), r = /iPhone/i.test(Te) && !s, o = /iPod/i.test(Te), Ee = r || s || o, Le = (r = Te.match(/OS (\d+)_/i)) && r[1] ? r[1] : null, Se = /Android/i.test(Te), ke = (s = Te.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i)) ? (o = s[1] && parseFloat(s[1]), r = s[2] && parseFloat(s[2]), o && r ? parseFloat(s[1] + "." + s[2]) : o || null) : null, r = /Edge/i.test(Te), s = !r && /Chrome/i.test(Te), Ae = /MSIE/.test(Te) || -1 < Te.indexOf("Trident") && -1 < Te.indexOf("rv:11.0"), Re = o = !(o = (o = /MSIE\s(\d+)\.\d/.exec(Te)) && parseFloat(o[1])) && /Trident\/7.0/i.test(Te) && /rv:11.0/.test(Te) ? 11 : o, o = /Safari/i.test(Te) && !s && !Se && !r, Oe = /Windows/i.test(Te), Ne = /MAC OS X/i.test(Te), Ge = Ce && "undefined" != typeof Worker && !Ae, Pe = Se || Ee, Ue = Ce && void 0 !== window.tencent_cloud_im_csig_flutter_for_web_25F_cy, be = "undefined" != typeof window && void 0 !== window.navigator && (s = window.navigator.standalone, !(!Ee || s || o)), we = "undefined" != typeof console ? console : "undefined" != typeof global && global.console ? global.console : "undefined" != typeof window && window.console ? window.console : {}, Fe = function() { - }, qe = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"], xe = qe.length; xe--; ) - pe = qe[xe], console[pe] || (we[pe] = Fe); - function Ve() { - var e2 = /* @__PURE__ */ new Date(); - return e2.setTime(We()), e2; - } - function He() { - Ye = 0; - } - function Be() { - return Math.floor(We() / 1e3); - } - var Ke = we, Ye = 0, We = function() { - return (/* @__PURE__ */ new Date()).getTime() + Ye; - }, je = 0; - function Je() { - return Qt() ? "%c Chat %c" : "Chat"; - } - function ze() { - var e2 = Ve(); - return e2.toLocaleTimeString("en-US", { hour12: false }) + "." + function(e3) { - var t2; - switch (e3.toString().length) { - case 1: - t2 = "00" + e3; - break; - case 2: - t2 = "0" + e3; - break; - default: - t2 = e3; - } - return t2; - }(e2.getMilliseconds()); - } - var M = { arguments2String: function(e2) { - var t2 = ""; - if (1 === e2.length) - t2 = e2[0]; - else - for (var n2 = 0, o2 = e2.length; n2 < o2; n2++) { - if (Ct(e2[n2])) - try { - t2 += Tt(e2[n2]) ? JSON.stringify(e2[n2], ["message", "code"]) : JSON.stringify(e2[n2]); - } catch (e3) { - t2 += e3 ? e3.message : ""; - break; - } - else - t2 += e2[n2]; - t2 += " "; - } - return t2; - }, _exec: function(e2, t2) { - Qt() ? Ke[e2](Je(), "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", ze(), t2) : Ke[e2]("".concat(Je(), " ").concat(ze(), " ").concat(t2)); - }, d: function() { - var e2; - je <= -1 && (e2 = this.arguments2String(arguments), this._exec("debug", e2)); - }, l: function() { - var e2; - je <= 0 && (e2 = this.arguments2String(arguments), this._exec("log", e2)); - }, log: function() { - var e2; - je <= 0 && (e2 = this.arguments2String(arguments), this._exec("log", e2)); - }, i: function() { - var e2; - je <= 1 && (e2 = this.arguments2String(arguments), this._exec("info", e2)); - }, w: function() { - var e2; - je <= 2 && (e2 = this.arguments2String(arguments), this._exec("warn", e2)); - }, e: function() { - var e2; - je <= 3 && (e2 = this.arguments2String(arguments), this._exec("error", e2)); - }, setLevel: function(e2) { - e2 < 4 && this._exec("log", "set level from " + je + " to " + e2), je = e2; - }, getLevel: function() { - return je; - } }, Xe = { JPG: 1, JPEG: 1, GIF: 2, PNG: 3, BMP: 4, UNKNOWN: 255 }, r = "Tag_Profile_IM_", g = { NICK: "".concat(r, "Nick"), GENDER: "".concat(r, "Gender"), BIRTHDAY: "".concat(r, "BirthDay"), LOCATION: "".concat(r, "Location"), SELFSIGNATURE: "".concat(r, "SelfSignature"), ALLOWTYPE: "".concat(r, "AllowType"), LANGUAGE: "".concat(r, "Language"), AVATAR: "".concat(r, "Image"), MESSAGESETTINGS: "".concat(r, "MsgSettings"), ADMINFORBIDTYPE: "".concat(r, "AdminForbidType"), LEVEL: "".concat(r, "Level"), ROLE: "".concat(r, "Role") }, Ze = { GROUP: "".concat("Tag_SNS_IM_", "Group"), REMARK: "".concat("Tag_SNS_IM_", "Remark"), ADDSOURCE: "".concat("Tag_SNS_IM_", "AddSource"), ADDWORDING: "".concat("Tag_SNS_IM_", "Wording"), ADDTIME: "".concat("Tag_SNS_IM_", "AddTime") }, s = "Gender_Type_", Qe = { UNKNOWN: "".concat(s, "Unknown"), FEMALE: "".concat(s, "Female"), MALE: "".concat(s, "Male") }, $e = { NONE: "".concat("AdminForbid_Type_", "None"), SEND_OUT: "".concat("AdminForbid_Type_", "SendOut") }, et = { NEED_CONFIRM: "".concat("AllowType_Type_", "NeedConfirm"), ALLOW_ANY: "".concat("AllowType_Type_", "AllowAny"), DENY_ANY: "".concat("AllowType_Type_", "DenyAny") }, nt = "JoinedSuccess", ot = "WaitAdminApproval", it = "@TOPIC#_", at = Object.prototype.hasOwnProperty; - function S(e2) { - if (null == e2) - return true; - if ("boolean" == typeof e2) - return false; - if ("number" == typeof e2) - return 0 === e2; - if ("string" == typeof e2) - return 0 === e2.length; - if ("function" == typeof e2) - return 0 === e2.length; - if (Array.isArray(e2)) - return 0 === e2.length; - if (e2 instanceof Error) - return "" === e2.message; - if (f(e2)) { - for (var t2 in e2) - if (at.call(e2, t2)) - return false; - return true; - } - return !!(st(e2) || rt(e2) || ct(e2)) && 0 === e2.size; - } - function st(e2) { - return "map" === Dt(e2); - } - function rt(e2) { - return "set" === Dt(e2); - } - function ct(e2) { - return "file" === Dt(e2); - } - function R(e2) { - return null !== e2 && ("number" == typeof e2 && !isNaN(+e2) || "object" === b(e2) && e2.constructor === Number); - } - function ut(e2) { - return null !== e2 && "object" === b(e2); - } - function f(e2) { - if ("object" === b(e2) && null !== e2) { - if (null === (e2 = Object.getPrototypeOf(e2))) - return 1; - for (var t2 = e2; null !== Object.getPrototypeOf(t2); ) - t2 = Object.getPrototypeOf(t2); - return e2 === t2; - } - } - function O(e2) { - return "function" == typeof Array.isArray ? Array.isArray(e2) : "array" === Dt(e2); - } - function lt(e2) { - return "function" == typeof e2; - } - function dt(e2) { - return "filelist" === Dt(e2); - } - function pt(e2) { - return "string" == typeof e2 && (e2 = e2[0], !/[^a-zA-Z0-9]/.test(e2)); - } - function _t(e2, t2, n2, o2) { - if (!Ct(e2) || !Ct(t2)) - return 0; - for (var i2, a2 = 0, s2 = Object.keys(t2), r2 = 0, c2 = s2.length; r2 < c2; r2++) - if (i2 = s2[r2], !(N(t2[i2]) || n2 && n2.includes(i2))) - if (Ct(e2[i2]) && Ct(t2[i2])) - a2 += _t(e2[i2], t2[i2], n2, o2); - else { - if (o2 && o2.includes(t2[i2])) - continue; - e2[i2] !== t2[i2] && (e2[i2] = t2[i2], a2 += 1); - } - return a2; - } - function ht(e2, t2) { - var n2, o2 = /* @__PURE__ */ new Map(), i2 = Z(e2.entries()); - try { - for (i2.s(); !(n2 = i2.n()).done; ) { - var a2 = Y(n2.value, 2), s2 = a2[0], r2 = a2[1]; - r2 && o2.set(s2, t2 ? JSON.stringify(r2) : JSON.parse(JSON.stringify(r2))); - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - return o2; - } - function gt(e2) { - if (0 === e2.length) - return 0; - for (var t2 = 0, n2 = 0, o2 = "undefined" != typeof document && void 0 !== document.characterSet ? document.characterSet : "UTF-8"; void 0 !== e2[t2]; ) - n2 += e2[t2++].charCodeAt[t2] <= 255 ? 1 : false === o2 ? 3 : 2; - return n2; - } - function ft(e2) { - return e2 = e2 || 99999999, Math.round(Math.random() * e2); - } - function mt() { - for (var e2 = "", t2 = 32; 0 < t2; --t2) - e2 += Et[Math.floor(Math.random() * Lt)]; - return e2; - } - function vt(e2, t2) { - for (var n2 in e2) - if (e2[n2] === t2) - return 1; - } - function It(e2) { - return -1 === e2.indexOf("http://") || -1 === e2.indexOf("https://") ? "https://" + e2 : e2.replace(/https|http/, "https"); - } - function Mt(e2) { - if (0 === Object.getOwnPropertyNames(e2).length) - return /* @__PURE__ */ Object.create(null); - var t2, n2, o2 = Array.isArray(e2) ? [] : /* @__PURE__ */ Object.create(null); - for (n2 in e2) - null !== e2[n2] ? void 0 !== e2[n2] ? (t2 = b(e2[n2]), 0 <= ["string", "number", "function", "boolean"].indexOf(t2) ? o2[n2] = e2[n2] : o2[n2] = Mt(e2[n2])) : o2[n2] = void 0 : o2[n2] = null; - return o2; - } - var yt = ["url"], m = function(e2) { - return "string" == typeof e2; - }, N = function(e2) { - return void 0 === e2; - }, Ct = function(e2) { - return O(e2) || ut(e2); - }, Tt = function(e2) { - return e2 instanceof Error; - }, Dt = function(e2) { - return Object.prototype.toString.call(e2).match(/^\[object (.*)\]$/)[1].toLowerCase(); - }, Et = (Date.now || (Date.now = function() { - return (/* @__PURE__ */ new Date()).getTime(); - }), "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), Lt = Et.length, St = {}; - function kt(o2, e2) { - var i2; - return !(!O(o2) || !O(e2)) && (i2 = false, e2.forEach(function(e3) { - var t2 = e3.key, e3 = e3.value, n2 = o2.find(function(e4) { - return e4.key === t2; - }); - n2 ? n2.value !== e3 && (n2.value = e3, i2 = true) : (o2.push({ key: t2, value: e3 }), i2 = true); - }), i2); - } - function At(e2) { - return S(e2) ? [] : e2.filter(function(e3) { - return true === e3.isModified; - }); - } - function Rt(e2) { - return S(e2) ? [] : e2.filter(function(e3) { - return false === e3.isModified; - }); - } - function Ot(e2) { - return e2 === A.GRP_AVCHATROOM; - } - function Nt(e2) { - var t2 = e2.type, e2 = e2.groupID; - return t2 === A.GRP_COMMUNITY || "".concat(e2).startsWith("@TGS#_") && !"".concat(e2).includes(it); - } - function Gt(e2) { - return "".concat(e2).startsWith("@TGS#_") && "".concat(e2).includes(it); - } - function Pt(e2) { - return m(e2) && e2.slice(0, 3) === A.CONV_C2C; - } - function Ut(e2) { - return m(e2) && e2.slice(0, 5) === A.CONV_GROUP; - } - function bt(e2) { - return m(e2) && e2 === A.CONV_SYSTEM; - } - function wt(t2, n2) { - var o2 = {}; - return Object.keys(t2).forEach(function(e2) { - o2[e2] = n2(t2[e2], e2); - }), o2; - } - function Ft(o2) { - return ye ? Promise.resolve({ width: 0, height: 0 }) : v ? new Promise(function(t2, e2) { - I.getImageInfo({ src: o2, success: function(e3) { - t2({ width: e3.width, height: e3.height }); - }, fail: function() { - t2({ width: 0, height: 0 }); - } }); - }) : Ae && 9 === Re ? Promise.resolve({ width: 0, height: 0 }) : new Promise(function(e2, t2) { - var n2 = new Image(); - n2.onload = function() { - e2({ width: this.width, height: this.height }), n2 = null; - }, n2.onerror = function() { - e2({ width: 0, height: 0 }), n2 = null; - }, n2.src = o2; - }); - } - function qt() { - function e2() { - return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); - } - return "".concat(e2() + e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()).concat(e2()); - } - function xt() { - var e2 = Se ? "android" : Ee ? "ios" : Oe ? "windows" : Ne ? "mac" : "unknown"; - if (v) - try { - var t2 = I.getSystemInfoSync().platform; - void 0 !== t2 && (e2 = t2); - } catch (e3) { - } - return e2; - } - function Vt(e2, t2) { - e2 = e2.split("."), t2 = t2.split("."); - for (var n2 = Math.max(e2.length, t2.length); e2.length < n2; ) - e2.push("0"); - for (; t2.length < n2; ) - t2.push("0"); - for (var o2 = 0; o2 < n2; o2++) { - var i2 = parseInt(e2[o2]), a2 = parseInt(t2[o2]); - if (a2 < i2) - return 1; - if (i2 < a2) - return -1; - } - return 0; - } - function Ht(e2) { - var t2 = e2.originUrl, t2 = void 0 === t2 ? void 0 : t2, n2 = e2.originWidth, o2 = e2.originHeight, e2 = e2.min, e2 = void 0 === e2 ? 198 : e2, n2 = parseInt(n2), o2 = parseInt(o2), i2 = { url: void 0, width: 0, height: 0 }; - return (n2 <= o2 ? n2 : o2) <= e2 ? (i2.url = t2, i2.width = n2, i2.height = o2) : (o2 <= n2 ? (i2.width = Math.ceil(n2 * e2 / o2), i2.height = e2) : (i2.width = e2, i2.height = Math.ceil(o2 * e2 / n2)), o2 = t2 && -1 < t2.indexOf("?") ? "".concat(t2, "&") : "".concat(t2, "?"), i2.url = "".concat(o2, 198 === e2 ? "imageView2/3/w/198/h/198" : "imageView2/3/w/720/h/720")), N(t2) ? K(i2, yt) : i2; - } - function Bt(e2) { - var t2 = e2[2]; - e2[2] = e2[1], e2[1] = t2; - for (var n2 = 0; n2 < e2.length; n2++) - e2[n2].setType(n2); - } - function Kt(e2) { - e2 = e2.servcmd; - return e2.slice(e2.indexOf(".") + 1); - } - function Yt(e2, t2) { - return Math.round(Number(e2) * Math.pow(10, t2)) / Math.pow(10, t2); - } - function Wt(e2, t2) { - return e2.includes(t2); - } - function jt(e2, t2) { - return e2.includes(t2); - } - function Jt(e2) { - return e2.split(it)[0]; - } - var zt = function(e2, t2, n2) { - if (N(t2)) - return ""; - switch (e2) { - case A.MSG_TEXT: - return t2.text; - case A.MSG_IMAGE: - return n2 ? "[Image]" : "[图片]"; - case A.MSG_LOCATION: - return n2 ? "[Location]" : "[位置]"; - case A.MSG_AUDIO: - return n2 ? "[Voice]" : "[语音]"; - case A.MSG_VIDEO: - return n2 ? "[Video]" : "[视频]"; - case A.MSG_FILE: - return n2 ? "[File]" : "[文件]"; - case A.MSG_CUSTOM: - return n2 ? "[Custom Messages]" : "[自定义消息]"; - case A.MSG_GRP_TIP: - return n2 ? "[Group Notification]" : "[群提示消息]"; - case A.MSG_GRP_SYS_NOTICE: - return n2 ? "[Group System Message]" : "[群系统通知]"; - case A.MSG_FACE: - return n2 ? "[Animated Sticker]" : "[动画表情]"; - case A.MSG_MERGER: - return n2 ? "[Chat Record]" : "[聊天记录]"; - default: - return ""; - } - }; - function Xt(e2) { - return e2 === A.MSG_TEXT || e2 === A.MSG_CUSTOM || e2 === A.MSG_LOCATION || e2 === A.MSG_FACE; - } - function Zt(e2) { - var t2 = []; - if (m(e2)) { - var n2 = e2.length; - if (0 !== n2) - for (var o2 = n2 - 1; 0 <= o2; o2--) - "1" === e2[o2] && t2.push(Math.pow(2, n2 - o2 - 1)); - } - return t2; - } - function Qt() { - return !Ae && !v; - } - function $t(e2) { - return "the length of userIDList cannot exceed ".concat(e2); - } - function en(e2) { - var t2; - if (O(e2) && 0 !== e2.length) - return t2 = 0, e2.forEach(function(e3) { - t2 += e3; - }), t2.toFixed(0); - } - function tn(e2) { - var t2; - if (O(e2) && 0 !== e2.length) - return t2 = 0, e2.forEach(function(e3) { - t2 += e3; - }), (t2 / e2.length).toFixed(0); - } - function nn(e2, t2, n2) { - var t2 = !(1 < arguments.length && void 0 !== t2) || t2, n2 = !(2 < arguments.length && void 0 !== n2) || n2, o2 = Date.now(); - return t2 ? n2 ? "".concat(o2 - e2, " ms") : "".concat(Math.round((o2 - e2) / 1e3), " s") : n2 ? o2 - e2 : Math.round((o2 - e2) / 1e3); - } - function on(e2) { - return e2 && 1 < e2 ? true : false; - } - function an(e2, t2, n2, o2) { - var i2, a2, s2; - return void 0 === t2 || (i2 = true, t2.required && S(e2) && (M.e("[".concat(n2, '] Missing required params: "').concat(o2, '".')), i2 = false), S(e2) || (a2 = Dt(e2)) === (s2 = t2.type.toLowerCase()) || "asyncfunction" === a2 && "function" === s2 || (M.e("[".concat(n2, '] Invalid params: type check failed for "').concat(o2, '". Expected ').concat(t2.type, ".")), i2 = false), t2.validator && !t2.validator(e2, n2, o2) && (M.e("[".concat(n2, '] Invalid params: custom validator check failed for "').concat(o2, '".')), i2 = false), i2); - } - function sn(e2) { - return !(!e2 || !(Pt(e2) || Ut(e2) || bt(e2)) && ((e2 = l("InvalidConversationID", e2)) && M.w(e2), 1)); - } - function c(e2) { - "" !== e2.desc && "" !== l("API_REFER") && M.w("[".concat(e2.api, "] | ").concat(e2.paramName, " | ").concat(e2.desc, ", ").concat(l("API_REFER")).concat(e2.api)); - } - function rn() { - return l("StringRequiredLog"); - } - function cn(e2) { - return l("NonEmptyStringRequiredLog", e2); - } - function un() { - return l("NumberRequiredLog"); - } - function ln() { - return l("UndefinedNotAllowedLog"); - } - function dn() { - return l("FileRequiredLog"); - } - function pn() { - return l("FunctionRequiredLog"); - } - function _n() { - return l("ArrayRequiredLog"); - } - function hn() { - return l("NonEmptyArrayLog"); - } - function gn() { - return l("CallbackMissingLog"); - } - function fn() { - return l("PositiveIntegerRequiredLog"); - } - function mn(e2, t2) { - return l("StringNotLongerThanLog", e2, t2); - } - function vn(e2, t2) { - return l("NumberGreaterOrEqualLog", e2, t2); - } - function In(e2) { - return l("KeyValueStringRequiredLog", e2); - } - function Mn() { - return l("PlainObjectRequiredLog"); - } - function yn() { - return l("NonEmptyContentRequiredLog"); - } - function Cn() { - return l("FileNotSelectedLog"); - } - function Tn() { - return l("MessageInstanceRequiredLog"); - } - function Dn() { - return l("NonAnonymousFunctionLog"); - } - function En() { - return l("MessageExtensionNotAvailableLog"); - } - function Ln() { - return l("MessageReactionRequiredLog"); - } - function Sn(e2, t2) { - return l("MaximumArrayLengthLog", e2, t2); - } - function C(e2) { - return { code: 0, data: e2 || {} }; - } - function T(e2) { - return Promise.resolve(C(e2)); - } - function D(e2) { - var t2, n2 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1]; - return e2 instanceof E ? (n2 && null !== qn && qn.emit(h.ERROR, e2), Promise.reject(e2)) : e2 instanceof Error ? (t2 = new E({ code: L.UNCAUGHT_ERROR }), n2 && null !== qn && qn.emit(h.ERROR, t2), Promise.reject(t2)) : N(e2) || N(e2.code) ? Promise.reject(new E({ code: L.UNCAUGHT_ERROR })) : (t2 = new E(e2), n2 && null !== qn && qn.emit(h.ERROR, t2), Promise.reject(t2)); - } - var kn, An = "unSend", Rn = "success", On = "fail", Nn = "notStart", Gn = "pending", Pn = "resolved", Un = "rejected", o = { type: "String", required: true }, r = { type: "Array", required: true }, s = { type: "Object", required: true }, bn = { type: "Boolean", required: true }, u = { type: "number", required: true }, l = null, wn = { hookGetAPITips: function(e2) { - l = e2; - }, login: { userID: o, userSig: o }, addToBlacklist: { userIDList: r }, removeFromBlacklist: { userIDList: r }, on: [{ name: "eventName", type: "String", validator: function(e2, t2, n2) { - return "string" == typeof e2 && 0 !== e2.length || (c({ api: t2, paramName: n2, desc: cn(n2) }), false); - } }, { name: "handler", type: "Function", validator: function(e2, t2, n2) { - return "function" != typeof e2 ? (c({ api: t2, paramName: n2, desc: pn() }), false) : ("" === e2.name && c({ api: t2, paramName: n2, desc: Dn() }), true); - } }], once: [{ name: "eventName", type: "String", validator: function(e2, t2, n2) { - return "string" == typeof e2 && 0 !== e2.length || (c({ api: t2, paramName: n2, desc: cn(n2) }), false); - } }, { name: "handler", type: "Function", validator: function(e2, t2, n2) { - return "function" != typeof e2 ? (c({ api: t2, paramName: n2, desc: pn() }), false) : ("" === e2.name && c({ api: t2, paramName: n2, desc: Dn() }), true); - } }], off: [{ name: "eventName", type: "String", validator: function(e2, t2, n2) { - return "string" == typeof e2 && 0 !== e2.length || (c({ api: t2, paramName: n2, desc: cn(n2) }), false); - } }, { name: "handler", type: "Function", validator: function(e2, t2, n2) { - return "function" != typeof e2 ? (c({ api: t2, paramName: n2, desc: pn() }), false) : ("" === e2.name && c({ api: t2, paramName: n2, desc: Dn() }), true); - } }], sendMessage: [y({ name: "message" }, s)], setMessageExtensions: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return e2.status === Rn && true === e2.isSupportExtension || (c({ api: t2, paramName: n2, desc: En() }), false); - } }), y({ name: "extensions" }, r)], getMessageExtensions: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return e2.status === Rn && true === e2.isSupportExtension || (c({ api: t2, paramName: n2, desc: En() }), false); - } })], deleteMessageExtensions: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return e2.status === Rn && true === e2.isSupportExtension || (c({ api: t2, paramName: n2, desc: En() }), false); - } })], addMessageReaction: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return e2.status === Rn || (c({ api: t2, paramName: n2, desc: Ln() }), false); - } }), y({ name: "reactionID" }, o)], removeMessageReaction: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return e2.status === Rn || (c({ api: t2, paramName: n2, desc: Ln() }), false); - } }), y({ name: "reactionID" }, o)], getMessageReactions: { messageList: y({}, r) }, getAllUserListOfMessageReaction: { message: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return e2.status === Rn || (c({ api: t2, paramName: n2, desc: Ln() }), false); - } }), reactionID: y({}, o), nextSeq: { type: "Number" }, count: { type: "Number" } }, getMessageList: { conversationID: y(y({}, o), {}, { validator: sn }), nextReqMessageID: { type: "String" }, count: { type: "Number", validator: function(e2, t2, n2) { - return !(!N(e2) && !/^[1-9][0-9]*$/.test(e2) && (c({ api: t2, paramName: n2, desc: fn() }), 1)); - } } }, getMessageListHopping: { conversationID: y(y({}, o), {}, { validator: sn }), sequence: { type: "Number" }, time: { type: "Number" }, direction: { type: "Number", validator: function(e2, t2, n2) { - return !(!N(e2) && 0 !== e2 && 1 !== e2 && (c({ api: t2, paramName: n2, desc: l("0Or1RequiredLog") }), 1)); - } }, count: { type: "Number", validator: function(e2, t2, n2) { - return !(!N(e2) && !/^[1-9][0-9]*$/.test(e2) && (c({ api: t2, paramName: n2, desc: fn }), 1)); - } } }, setMessageRead: { conversationID: y(y({}, o), {}, { validator: sn }) }, setAllMessageRead: { scope: { type: "String", required: false, validator: function(e2, t2, n2) { - return !e2 || -1 !== [A.READ_ALL_C2C_MSG, A.READ_ALL_GROUP_MSG, A.READ_ALL_MSG].indexOf(e2) || (c({ api: t2, paramName: n2, desc: l("ValidScopeRequired") }), false); - } } }, getConversationProfile: [y(y({ name: "conversationID" }, o), {}, { validator: sn })], clearHistoryMessage: [y(y({ name: "conversationID" }, o), {}, { validator: sn })], pinConversation: { conversationID: y(y({}, o), {}, { validator: sn }), isPinned: y({}, bn) }, setConversationDraft: { conversationID: y(y({}, o), {}, { validator: sn }), draftText: { type: "String", validator: function(e2, t2, n2) { - return !!m(e2) || (c({ api: t2, paramName: n2, desc: rn() }), false); - } } }, setConversationCustomData: { conversationIDList: y({}, r), customData: { type: "String", validator: function(e2, t2, n2) { - return m(e2) ? !(256 < e2.length && (c({ api: t2, paramName: n2, desc: mn(n2, 256) }), 1)) : (c({ api: t2, paramName: n2, desc: rn() }), false); - } } }, markConversation: { conversationIDList: y({}, r), markType: { type: "number", validator: function(e2, t2, n2) { - return R(e2) ? e2 <= 0 ? (c({ api: t2, paramName: n2, desc: l("NumberGreaterThanLog", n2, 0) }), false) : !(e2 >= Math.pow(2, 64) && (c({ api: t2, paramName: n2, desc: l("NumberLessThanLog", n2, "Math.pow(2,64)") }), 1)) : (c({ api: t2, paramName: n2, desc: un() }), false); - } }, enableMark: y({}, bn) }, createConversationGroup: { conversationIDList: y({}, r), groupName: y(y({}, o), {}, { validator: function(e2, t2, n2) { - return !(!e2 || 32 < e2.length && (c({ api: t2, paramName: n2, desc: mn(n2, 32) }), 1)); - } }) }, deleteConversationGroup: [y({ name: "groupName" }, o)], renameConversationGroup: { oldName: y({}, o), newName: y(y({}, o), {}, { validator: function(e2, t2, n2) { - return !(!e2 || 32 < e2.length && (c({ api: t2, paramName: n2, desc: mn(n2, 32) }), 1)); - } }) }, addConversationsToGroup: { conversationIDList: y({}, r), groupName: y({}, o) }, deleteConversationsFromGroup: { conversationIDList: y({}, r), groupName: y({}, o) }, getGroupList: { groupProfileFilter: { type: "Array" } }, getGroupProfile: { groupID: o, groupCustomFieldFilter: { type: "Array" }, memberCustomFieldFilter: { type: "Array" } }, getGroupProfileAdvance: { groupIDList: r }, createGroup: { name: o }, joinGroup: { groupID: o, type: { type: "String" }, applyMessage: { type: "String" } }, quitGroup: [y({ name: "groupID" }, o)], handleApplication: { message: s, handleAction: o, handleMessage: { type: "String" } }, changeGroupOwner: { groupID: o, newOwnerID: o }, updateGroupProfile: { groupID: o, muteAllMembers: { type: "Boolean" } }, dismissGroup: [y({ name: "groupID" }, o)], searchGroupByID: [y({ name: "groupID" }, o)], getGroupOnlineMemberCount: [y({ name: "groupID" }, o)], initGroupAttributes: { groupID: o, groupAttributes: y(y({}, s), {}, { validator: function(t2, n2, o2) { - var i2 = true; - return Object.keys(t2).forEach(function(e2) { - if (!m(t2[e2])) - return c({ api: n2, paramName: o2, desc: In("value") }), i2 = false; - }), i2; - } }) }, setGroupAttributes: { groupID: o, groupAttributes: y(y({}, s), {}, { validator: function(t2, n2, o2) { - var i2 = true; - return Object.keys(t2).forEach(function(e2) { - if (!m(t2[e2])) - return c({ api: n2, paramName: o2, desc: In("value") }), i2 = false; - }), i2; - } }) }, deleteGroupAttributes: { groupID: o, keyList: { type: "Array", validator: function(e2, t2, n2) { - var o2; - return N(e2) || !O(e2) ? (c({ api: t2, paramName: n2, desc: _n() }), false) : !!S(e2) || (o2 = true, e2.forEach(function(e3) { - if (!m(e3)) - return c({ api: t2, paramName: n2, desc: l("StringArrayRequiredLog") }), o2 = false; - }), o2); - } } }, getGroupAttributes: { groupID: o, keyList: { type: "Array", validator: function(e2, t2, n2) { - var o2; - return N(e2) || !O(e2) ? (c({ api: t2, paramName: n2, desc: _n() }), false) : !!S(e2) || (o2 = true, e2.forEach(function(e3) { - if (!m(e3)) - return c({ api: t2, paramName: n2, desc: In("key") }), o2 = false; - }), o2); - } } }, setGroupCounters: { groupID: o, counters: s }, increaseGroupCounter: { groupID: o, key: o, value: u }, decreaseGroupCounter: { groupID: o, key: o, value: u }, getGroupCounters: { groupID: o }, getGroupMemberList: { groupID: o, count: { type: "Number" } }, getGroupMemberProfile: { groupID: o, userIDList: r, memberCustomFieldFilter: { type: "Array" } }, addGroupMember: { groupID: o, userIDList: r }, setGroupMemberRole: { groupID: o, userID: o, role: o }, setGroupMemberMuteTime: { groupID: o, userID: o, muteTime: { type: "Number", validator: function(e2) { - return 0 <= e2; - } } }, setGroupMemberNameCard: { groupID: o, userID: { type: "String" }, nameCard: { type: "String", validator: function(e2, t2, n2) { - return m(e2) ? (e2.length, true) : (c({ api: t2, paramName: n2, desc: rn() }), false); - } } }, setGroupMemberCustomField: { groupID: o, userID: { type: "String" }, memberCustomField: r }, deleteGroupMember: { groupID: o }, markGroupMemberList: { groupID: o, markType: { type: "number", validator: function(e2, t2, n2) { - return R(e2) ? !(e2 < 1e3 && (c({ api: t2, paramName: n2, desc: vn(n2, 1e3) }), 1)) : (c({ api: t2, paramName: n2, desc: un() }), false); - } }, userIDList: y({}, r), enableMark: y({}, bn) }, createTextMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? m(e2.text) ? 0 !== e2.text.length || (c({ api: t2, paramName: "payload.text", desc: yn() }), false) : (c({ api: t2, paramName: "payload.text", desc: rn() }), false) : (c({ api: t2, paramName: n2, desc: Mn() }), false); - } }) }, createTextAtMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? m(e2.text) ? 0 === e2.text.length ? (c({ api: t2, paramName: "payload.text", desc: yn() }), false) : !(e2.atUserList && !O(e2.atUserList) && (c({ api: t2, paramName: "payload.atUserList", desc: _n() }), 1)) : (c({ api: t2, paramName: "payload.text", desc: rn() }), false) : (c({ api: t2, paramName: n2, desc: Mn() }), false); - } }) }, createCustomMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? e2.data && !m(e2.data) ? (c({ api: t2, paramName: "payload.data", desc: rn() }), false) : e2.description && !m(e2.description) ? (c({ api: t2, paramName: "payload.description", desc: rn() }), false) : !(e2.extension && !m(e2.extension) && (c({ api: t2, paramName: "payload.extension", desc: rn() }), 1)) : (c({ api: t2, paramName: "payload", desc: Mn() }), false); - } }) }, createImageMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - if (!f(e2)) - return c({ api: t2, paramName: n2, desc: Mn() }), false; - if (N(e2.file)) - return c({ api: t2, paramName: "payload.file", desc: ln() }), false; - if (Ce) { - if (!(e2.file instanceof HTMLInputElement || ct(e2.file))) - return f(e2.file) && "undefined" != typeof uni ? 0 !== e2.file.tempFilePaths.length && 0 !== e2.file.tempFiles.length || (c({ api: t2, paramName: "payload.file", desc: Cn() }), false) : (c({ api: t2, paramName: "payload.file", desc: dn() }), false); - if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length) - return c({ api: t2, paramName: "payload.file", desc: Cn() }), false; - } - return true; - }, onProgress: { type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: gn() }), true; - } } }) }, createAudioMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return !!f(e2) || (c({ api: t2, paramName: n2, desc: Mn() }), false); - } }), onProgress: { type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: gn() }), true; - } } }, createVideoMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - if (!f(e2)) - return c({ api: t2, paramName: n2, desc: Mn() }), false; - if (N(e2.file)) - return c({ api: t2, paramName: "payload.file", desc: ln() }), false; - if (Ce) { - if (!(e2.file instanceof HTMLInputElement || ct(e2.file))) - return f(e2.file) && "undefined" != typeof uni ? !!ct(e2.file.tempFile) || (c({ api: t2, paramName: "payload.file", desc: Cn() }), false) : (c({ api: t2, paramName: "payload.file", desc: dn() }), false); - if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length) - return c({ api: t2, paramName: "payload.file", desc: Cn() }), false; - } - return true; - } }), onProgress: { type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: gn() }), true; - } } }, createFaceMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? R(e2.index) ? !!m(e2.data) || (c({ api: t2, paramName: "payload.data", desc: rn() }), false) : (c({ api: t2, paramName: "payload.index", desc: un() }), false) : (c({ api: t2, paramName: n2, desc: Mn() }), false); - } }) }, createFileMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - if (!f(e2)) - return c({ api: t2, paramName: n2, desc: Mn() }), false; - if (N(e2.file)) - return c({ api: t2, paramName: "payload.file", desc: ln() }), false; - if (Ce) { - if (!(e2.file instanceof HTMLInputElement || ct(e2.file))) - return f(e2.file) && "undefined" != typeof uni ? 0 !== e2.file.tempFilePaths.length && 0 !== e2.file.tempFiles.length || (c({ api: t2, paramName: "payload.file", desc: Cn() }), false) : (c({ api: t2, paramName: "payload.file", desc: dn() }), false); - if (e2.file instanceof HTMLInputElement && 0 === e2.file.files.length) - return c({ api: t2, paramName: "payload.file", desc: Cn() }), false; - } - return true; - } }), onProgress: { type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: gn() }), true; - } } }, createLocationMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? m(e2.description) ? R(e2.longitude) ? !!R(e2.latitude) || (c({ api: t2, paramName: "payload.latitude", desc: un() }), false) : (c({ api: t2, paramName: "payload.longitude", desc: un() }), false) : (c({ api: t2, paramName: "payload.description", desc: rn() }), false) : (c({ api: t2, paramName: n2, desc: Mn() }), false); - } }) }, createMergerMessage: { to: o, conversationType: o, payload: y(y({}, s), {}, { validator: function(e2, t2, n2) { - var o2; - return S(e2.messageList) ? (c({ api: t2, paramName: "payload.messageList", desc: hn() }), false) : S(e2.compatibleText) ? (c({ api: t2, paramName: "payload.compatibleText", desc: cn("compatibleText") }), false) : (o2 = false, e2.messageList.forEach(function(e3) { - e3.status === On && (o2 = true); - }), !o2 || (c({ api: t2, paramName: "payload.messageList", desc: l("MergeFailedMessageLog") }), false)); - } }) }, revokeMessage: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return S(e2) ? (c({ api: t2, paramName: n2, desc: Tn() }), false) : e2.conversationType === A.CONV_SYSTEM ? (c({ api: t2, paramName: n2, desc: l("MessageCanBeRevokedDesc") }), false) : true !== e2.isRevoked || (c({ api: t2, paramName: n2, desc: l("MessageRevokedLog") }), false); - } })], deleteMessage: [y(y({ name: "messageList" }, r), {}, { validator: function(e2, t2, n2) { - return !S(e2) || (c({ api: t2, paramName: n2, desc: hn() }), false); - } })], translateText: { sourceTextList: r, sourceLanguage: o, targetLanguage: o }, convertVoiceToText: { message: y(y({}, s), {}, { validator: function(e2, t2, n2) { - return S(e2) ? (c({ api: t2, paramName: n2, desc: Tn() }), false) : e2.type === A.MSG_AUDIO && e2.status === Rn || (c({ api: t2, paramName: n2, desc: l("AudioMessageRequiredLog") }), false); - } }) }, modifyMessage: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return S(e2) ? (c({ api: t2, paramName: n2, desc: Tn() }), false) : e2.conversationType === A.CONV_SYSTEM ? (c({ api: t2, paramName: n2, desc: l("MessageCanBeModifiedLog") }), false) : true !== e2._onlineOnlyFlag || (c({ api: t2, paramName: n2, desc: l("OnlineMessageNotSupportLog") }), false); - } })], searchCloudMessages: { keywordList: { type: "Array", required: false, validator: function(e2, t2, n2) { - return !(e2 && (O(e2) ? 0 === e2.length ? (c({ api: t2, paramName: n2, desc: hn() }), 1) : 5 < e2.length && (c({ api: t2, paramName: n2, desc: Sn(n2, 5) }), 1) : (c({ api: t2, paramName: n2, desc: _n() }), 1))); - } }, keywordListMatchType: { type: "String", required: false, validator: function(e2, t2, n2) { - return !e2 || "or" === e2 || "and" === e2 || c({ api: t2, paramName: n2, desc: "".concat(e2, " is invalid match type") }); - } }, senderUserIDList: { type: "Array", required: false, validator: function(e2, t2, n2) { - return !(e2 && (O(e2) ? (0 === e2.length && c({ api: t2, paramName: n2, desc: hn() }), 5 < e2.length && (c({ api: t2, paramName: n2, desc: Sn(n2, 5) }), 1)) : (c({ api: t2, paramName: n2, desc: _n() }), 1))); - } }, messageTypeList: { type: "Array", required: false, validator: function(e2, t2, n2) { - if (!e2) - return true; - if (!O(e2)) - return c({ api: t2, paramName: n2, desc: _n() }), false; - 0 === e2.length && c({ api: t2, paramName: n2, desc: hn() }); - var o2 = [A.MSG_TEXT, A.MSG_IMAGE, A.MSG_AUDIO, A.MSG_FILE, A.MSG_VIDEO, A.MSG_LOCATION, A.MSG_CUSTOM, A.MSG_MERGER]; - return !(0 < e2.filter(function(e3) { - return -1 === o2.indexOf(e3); - }).length && (c({ api: t2, paramName: n2, desc: l("ContainsUnsupportedMessageTypeLog", n2) }), 1)); - } }, conversationID: { type: "String", required: false, validator: function(e2) { - return !e2 || sn(e2); - } }, timePosition: { type: "number", required: false, validator: function(e2, t2, n2) { - return !(e2 && e2 < 0 && (c({ api: t2, paramName: n2, desc: vn(n2, 0) }), 1)); - } }, timePeriod: { type: "number", required: false, validator: function(e2, t2, n2) { - return !(e2 && e2 < 0 && (c({ api: t2, paramName: n2, desc: vn(n2, 0) }), 1)); - } }, cursor: { type: "String", required: false } }, getUserProfile: { userIDList: { type: "Array", validator: function(e2, t2, n2) { - return O(e2) ? (0 === e2.length && c({ api: t2, paramName: n2, desc: hn() }), true) : (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, updateMyProfile: { profileCustomField: { type: "Array", validator: function(e2, t2, n2) { - return !!N(e2) || !!O(e2) || (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, setSelfStatus: { customStatus: { type: "String", validator: function(e2, t2, n2) { - return !!m(e2) || (c({ api: t2, paramName: n2, desc: rn() }), false); - } } }, getUserStatus: { userIDList: { type: "Array", validator: function(e2, t2, n2) { - return O(e2) ? 0 !== e2.length || (c({ api: t2, paramName: n2, desc: hn() }), false) : (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, subscribeUserStatus: { userIDList: { type: "Array", validator: function(e2, t2, n2) { - return O(e2) ? 0 !== e2.length || (c({ api: t2, paramName: n2, desc: hn() }), false) : (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, unsubscribeUserStatus: { userIDList: { type: "Array", validator: function(e2, t2, n2) { - return !e2 || !!O(e2) || (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, addFriend: { to: o, source: { type: "String", required: true, validator: function(e2, t2, n2) { - return !(!e2 || (e2.startsWith("AddSource_Type_") ? 8 < e2.replace("AddSource_Type_", "").length && (c({ api: t2, paramName: n2, desc: mn("keyword", 8) }), 1) : (c({ api: t2, paramName: n2, desc: l("SourcePrefixLog") }), 1))); - } }, remark: { type: "String", required: false, validator: function(e2, t2, n2) { - return !(m(e2) && 96 < e2.length && (c({ api: t2, paramName: n2, desc: mn(n2, 96) }), 1)); - } } }, deleteFriend: { userIDList: r }, checkFriend: { userIDList: r }, getFriendProfile: { userIDList: r }, updateFriend: { userID: o, remark: { type: "String", required: false, validator: function(e2, t2, n2) { - return !(m(e2) && 96 < e2.length && (c({ api: t2, paramName: n2, desc: mn(n2, 96) }), 1)); - } }, friendCustomField: { type: "Array", required: false, validator: function(e2, t2, n2) { - var o2; - return !e2 || (O(e2) ? (o2 = true, e2.forEach(function(e3) { - return m(e3.key) && -1 !== e3.key.indexOf("Tag_SNS_Custom") ? m(e3.value) ? 8 < e3.key.replace("Tag_SNS_Custom_", "").length ? (c({ api: t2, paramName: n2, desc: mn("keyword", 8) }), o2 = false) : void 0 : (c({ api: t2, paramName: n2, desc: In("value") }), o2 = false) : (c({ api: t2, paramName: n2, desc: l("FriendCustomFieldPrefixLog") }), o2 = false); - }), o2) : (c({ api: t2, paramName: n2, desc: _n() }), false)); - } } }, acceptFriendApplication: { userID: o }, refuseFriendApplication: { userID: o }, deleteFriendApplication: { userID: o }, createFriendGroup: { name: o }, deleteFriendGroup: { name: o }, addToFriendGroup: { name: o, userIDList: r }, removeFromFriendGroup: { name: o, userIDList: r }, renameFriendGroup: { oldName: o, newName: o }, sendMessageReadReceipt: [{ name: "messageList", type: "Array", validator: function(e2, t2, n2) { - return O(e2) ? 0 !== e2.length || (c({ api: t2, paramName: n2, desc: hn() }), false) : (c({ api: t2, paramName: n2, desc: _n() }), false); - } }], getMessageReadReceiptList: [{ name: "messageList", type: "Array", validator: function(e2, t2, n2) { - return O(e2) ? 0 !== e2.length || (c({ api: t2, paramName: n2, desc: hn() }), false) : (c({ api: t2, paramName: n2, desc: _n() }), false); - } }], createTopicInCommunity: { groupID: o, topicName: o }, deleteTopicFromCommunity: { groupID: o, topicIDList: { type: "Array", validator: function(e2, t2, n2) { - return !e2 || !!O(e2) || (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, updateTopicProfile: { groupID: o, topicID: o }, getTopicList: { groupID: o, topicIDList: { type: "Array", validator: function(e2, t2, n2) { - return !e2 || !!O(e2) || (c({ api: t2, paramName: n2, desc: _n() }), false); - } } }, followUser: [y({ name: "userIDList" }, r)], unfollowUser: [y({ name: "userIDList" }, r)], getMyFollowingList: [y(y({ name: "startIndex" }, o), {}, { required: false })], getMyFollowersList: [y(y({ name: "startIndex" }, o), {}, { required: false })], getMutualFollowersList: [y(y({ name: "startIndex" }, o), {}, { required: false })], getUserFollowInfo: [y(y({ name: "userIDList" }, r), {}, { required: false })], checkFollowType: [y({ name: "userIDList" }, r)], addSignalingListener: [{ name: "eventName", type: "String", validator: function(e2, t2, n2) { - return "string" == typeof e2 && 0 !== e2.length || (c({ api: t2, paramName: n2, desc: cn(n2) }), false); - } }, { name: "handler", type: "Function", validator: function(e2, t2, n2) { - return "function" != typeof e2 ? (c({ api: t2, paramName: n2, desc: pn() }), false) : ("" === e2.name && c({ api: t2, paramName: n2, desc: Dn() }), true); - } }], removeSignalingListener: [{ name: "eventName", type: "String", validator: function(e2, t2, n2) { - return "string" == typeof e2 && 0 !== e2.length || (c({ api: t2, paramName: n2, desc: cn(n2) }), false); - } }, { name: "handler", type: "Function", validator: function(e2, t2, n2) { - return "function" != typeof e2 ? (c({ api: t2, paramName: n2, desc: pn() }), false) : ("" === e2.name && c({ api: t2, paramName: n2, desc: Dn() }), true); - } }], invite: { userID: o }, inviteSync: [y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? !!m(e2.userID) || (c({ api: t2, paramName: "options.userID", desc: rn() }), false) : (c({ api: t2, paramName: "options", desc: Mn() }), false); - } }), { name: "successCb", type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: pn() }), true; - } }, { name: "errorCb", type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: pn() }), true; - } }], inviteInGroup: { groupID: o, inviteeList: r }, inviteInGroupSync: [y(y({}, s), {}, { validator: function(e2, t2, n2) { - return f(e2) ? m(e2.groupID) ? !!O(e2.inviteeList) || (c({ api: t2, paramName: "options.inviteeList", desc: _n() }), false) : (c({ api: t2, paramName: "options.groupID", desc: rn() }), false) : (c({ api: t2, paramName: "options", desc: Mn() }), false); - } }), { name: "successCb", type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: pn() }), true; - } }, { name: "errorCb", type: "Function", required: false, validator: function(e2, t2, n2) { - return N(e2) && c({ api: t2, paramName: n2, desc: pn() }), true; - } }], accept: { inviteID: o }, reject: { inviteID: o }, getSignalingInfo: [y(y({ name: "message" }, s), {}, { validator: function(e2, t2, n2) { - return !S(e2) || (c({ api: t2, paramName: n2, desc: Tn() }), false); - } })], modifyInvitation: { inviteID: o, data: o } }, Fn = { login: 1, logout: 1, getLoginUser: 1, getServerTime: 1, on: 1, once: 1, off: 1, setLogLevel: 1, registerPlugin: 1, destroy: 1, isReady: 1, createTextMessage: 1, createTextAtMessage: 1, createImageMessage: 1, createAudioMessage: 1, createVideoMessage: 1, createCustomMessage: 1, createFaceMessage: 1, createFileMessage: 1, createLocationMessage: 1, createMergerMessage: 1, downloadMergerMessage: 1, createForwardMessage: 1, sendMessage: 1, resendMessage: 1, revokeMessage: 1, deleteMessage: 1, translateText: 1, convertVoiceToText: 1, modifyMessage: 1, searchCloudMessages: 1, sendMessageReadReceipt: 1, getGroupMessageReadMemberList: 1, getMessageReadReceiptList: 1, setMessageExtensions: 1, getMessageExtensions: 1, deleteMessageExtensions: 1, addMessageReaction: 1, removeMessageReaction: 1, getMessageReactions: 1, getAllUserListOfMessageReaction: 1, getMessageList: 1, findMessage: 1, getMessageListHopping: 1, setMessageRead: 1, setAllMessageRead: 1, getConversationList: 1, getConversationProfile: 1, deleteConversation: 1, setConversationDraft: 1, pinConversation: 1, getTotalUnreadMessageCount: 1, setConversationCustomData: 1, markConversation: 1, createConversationGroup: 1, getConversationGroupList: 1, deleteConversationGroup: 1, renameConversationGroup: 1, addConversationsToGroup: 1, deleteConversationsFromGroup: 1, clearHistoryMessage: 1, setMessageRemindType: 1, setAllReceiveMessageOpt: 1, getAllReceiveMessageOpt: 1, getGroupList: 1, getGroupProfile: 1, createGroup: 1, joinGroup: 1, updateGroupProfile: 1, quitGroup: 1, dismissGroup: 1, changeGroupOwner: 1, searchGroupByID: 1, getGroupApplicationList: 1, handleGroupApplication: 1, initGroupAttributes: 1, setGroupAttributes: 1, deleteGroupAttributes: 1, getGroupAttributes: 1, setGroupCounters: 1, increaseGroupCounter: 1, decreaseGroupCounter: 1, getGroupCounters: 1, getJoinedCommunityList: 1, createTopicInCommunity: 1, deleteTopicFromCommunity: 1, updateTopicProfile: 1, getTopicList: 1, getGroupMemberProfile: 1, getGroupMemberList: 1, addGroupMember: 1, deleteGroupMember: 1, setGroupMemberNameCard: 1, setGroupMemberMuteTime: 1, setGroupMemberRole: 1, setGroupMemberCustomField: 1, getGroupOnlineMemberCount: 1, markGroupMemberList: 1, getMyProfile: 1, getUserProfile: 1, updateMyProfile: 1, setSelfStatus: 1, getUserStatus: 1, subscribeUserStatus: 1, unsubscribeUserStatus: 1, getBlacklist: 1, addToBlacklist: 1, removeFromBlacklist: 1, getFriendList: 1, addFriend: 1, deleteFriend: 1, checkFriend: 1, updateFriend: 1, getFriendProfile: 1, getFriendApplicationList: 1, refuseFriendApplication: 1, deleteFriendApplication: 1, acceptFriendApplication: 1, setFriendApplicationRead: 1, getFriendGroupList: 1, createFriendGroup: 1, renameFriendGroup: 1, deleteFriendGroup: 1, addToFriendGroup: 1, removeFromFriendGroup: 1, followUser: 1, unfollowUser: 1, getMyFollowingList: 1, getMyFollowersList: 1, getMutualFollowersList: 1, getUserFollowInfo: 1, checkFollowType: 1, callExperimentalAPI: 1, addSignalingListener: 1, removeSignalingListener: 1, invite: 1, inviteSync: 1, inviteInGroup: 1, inviteInGroupSync: 1, cancel: 1, accept: 1, reject: 1, getSignalingInfo: 1, modifyInvitation: 1 }, E = (t(io, B(Error)), kn = n(io), e(io)), L = { NO_SDKAPPID: 2e3, NO_ACCOUNT_TYPE: 2001, NO_IDENTIFIER: 2002, NO_USERSIG: 2003, NO_TINYID: 2022, NO_A2KEY: 2023, USER_NOT_LOGGED_IN: 2024, REPEAT_LOGIN: 2025, COS_UNDETECTED: 2040, COS_GET_SIG_FAIL: 2041, MSG_SEND_FAIL: 2100, MSG_SEND_FAIL_NOT_IN_AV: 2101, MSG_INSTANCE_REQUIRED: 2105, MSG_INVALID_CONV_TYPE: 2106, MSG_F_IS_EMPTY: 2108, MSG_ONPROGRESS_ERR: 2109, MSG_REVOKE_FAIL: 2110, MSG_DELETE_FAIL: 2111, MSG_UNREAD_ALL_FAIL: 2112, READ_RECEIPT_MSG_LIST_EMPTY: 2114, MSG_SEND_GRP_WITH_TOPIC_FAIL: 2115, CANNOT_DELETE_GRP_SYSTEM_NOTICE: 2116, TRANSLATE_TEXT_FAIL: 2117, VOICE_TO_TEXT_FAIL: 2118, UNSUPPORTED_VOICE_FORMAT: 2119, MSG_I_SELECT_F_FIRST: 2251, MSG_I_TYPES_LIMIT: 2252, MSG_I_SIZE_LIMIT: 2253, MSG_A_UPLOAD_FAIL: 2300, MSG_A_SIZE_LIMIT: 2301, MSG_V_UPLOAD_FAIL: 2350, MSG_V_SIZE_LIMIT: 2351, MSG_V_TYPES_LIMIT: 2352, MSG_F_UPLOAD_FAIL: 2400, MSG_F_SELECT_F_FIRST: 2401, MSG_F_SIZE_LIMIT: 2402, MSG_F_URL_IS_EMPTY: 2403, MSG_MERGER_TYPE_INVALID: 2450, MSG_MERGER_KEY_INVALID: 2451, MSG_MERGER_DOWNLOAD_FAIL: 2452, MSG_FORWARD_TYPE_INVALID: 2453, MSG_FORWARD_INVALID_ELEMENTS: 2454, MSG_MODIFY_CONFLICT: 2480, MSG_MODIFY_DISABLED_IN_AV: 2481, CONV_NOT_FOUND: 2500, USER_OR_GRP_NOT_FOUND: 2501, CONV_UN_RECORDED_TYPE: 2502, INVALID_CONV_ID: 2503, ILLEGAL_GRP_TYPE: 2600, ILLEGAL_GRP_ID: 2602, CANNOT_FIND_GRP: 2603, CANNOT_CHANGE_OWNER_IN_AV: 2620, CANNOT_CHANGE_OWNER_TO_SELF: 2621, MEMBER_NOT_IN_GRP: 2623, JOIN_GRP_FAIL: 2660, CANNOT_ADD_MEMBER_IN_AV: 2661, CANNOT_JOIN_NON_AV_WITHOUT_LOGIN: 2662, NOT_OWNER: 2681, INVALID_MEMBER_ROLE: 2683, CANNOT_SET_SELF_MEMBER_ROLE: 2684, CANNOT_MUTE_SELF: 2685, BAN_DURATION_INVALID: 2686, OPERATION_NOT_SUPPORTED_IN_AV: 2687, NOT_MY_FRIEND: 2700, ALREADY_MY_FRIEND: 2701, FRIEND_GRP_EXISTED: 2710, FRIEND_GRP_NOT_EXIST: 2711, FRIEND_APPLICATION_NOT_EXIST: 2716, UPDATE_PROFILE_INVALID_PARAM: 2721, UPDATE_PROFILE_NO_KEY: 2722, CANNOT_ADD_SELF_TO_BLACKLIST: 2742, NETWORK_ERROR: 2800, NETWORK_TIMEOUT: 2801, NO_NETWORK: 2805, UNCAUGHT_ERROR: 2903, INVALID_OPERATION: 2905, INVALID_TRTC_CMD: 2995, OVER_FREQUENCY_LIMIT: 2996, NO_PROTOCOL: 2997, NO_MODULE: 2998, SDK_IS_NOT_READY: 2999, LOGGING_IN: 3e3, LOGIN_FAILED: 3001, KICKED_OUT_MULT_DEVICE: 3002, KICKED_OUT_MULT_ACCOUNT: 3003, KICKED_OUT_USERSIG_EXPIRED: 3004, LOGGED_OUT: 3005, KICKED_OUT_REST_API: 3006, ILLEGAL_TOPIC_ID: 3021, NO_USE: 3122, PROFANITY_FOUND: 3123, OPTIONS_IS_EMPTY: 3153, MSG_A2KEY_EXPIRED: 20002, ACCOUNT_A2KEY_EXPIRED: 70001, HELLO_ANSWER_KICKED_OUT: 1002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, SIGNALING_INVALID_INVITE_ID: 8010, SIGNALING_NO_PERMISSION: 8011, SIGNALING_ALREADY_EXISTS: 8012, INVALID_CANCEL_MESSAGE: 8020, MSG_SEARCH_CURSOR_INVALID: 27002, MSG_SEARCH_CURSOR_EXPIRED: 27003 }, qn = null, u = (e(oo, [{ key: "isLoggedIn", value: function() { - return this._m.get(12).isLoggedIn(); - } }, { key: "isOversea", value: function() { - return this._m.get(12).isOversea(); - } }, { key: "isPrivateNetWork", value: function() { - var e2 = this._m.get(12); - return e2.isPrivateNetWork() && !e2.getFileDownloadProxy(); - } }, { key: "getFileDownloadProxy", value: function() { - return this._m.get(12).getFileDownloadProxy(); - } }, { key: "getDowloadFileAuthKey", value: function() { - return this._m.get(12).getDowloadFileAuthKey(); - } }, { key: "getMyUserID", value: function() { - return this._m.get(12).getUserID(); - } }, { key: "getMyTinyID", value: function() { - return this._m.get(12).getTinyID(); - } }, { key: "getSDKAppID", value: function() { - return this._m.get(12).getSDKAppID(); - } }, { key: "isIntl", value: function() { - return this._m.get(12).isIntl(); - } }, { key: "isUsingChatCore", value: function() { - return this._m.get(12).isUsingChatCore(); - } }, { key: "isDevMode", value: function() { - return this._m.get(12).isDevMode(); - } }, { key: "get", value: function(e2) { - return this._m.get(e2); - } }, { key: "getPlatform", value: function() { - return De; - } }, { key: "getCloudConfig", value: function(e2) { - return this._m.get(23).getCloudConfig(e2); - } }, { key: "emitOEvt", value: function(e2, t2) { - this._m.getOEmitInst().emit(e2, t2); - } }, { key: "emitIEvt", value: function(e2, t2) { - this._m.getIEmitInst().emit(e2, t2); - } }, { key: "getIEmitInst", value: function() { - return this._m.getIEmitInst(); - } }, { key: "req", value: function(e2) { - return this._m.get(20).req(e2); - } }, { key: "canIUse", value: function(e2) { - return this._m.get(27).canIUse(e2); - } }, { key: "getErrMsg", value: function(e2, t2, n2) { - return this._m.getErrMsg(e2, t2, n2); - } }, { key: "warn", value: function(e2, t2, n2) { - e2 = this.getErrMsg(e2, t2, n2); - e2 && M.w(e2); - } }, { key: "noUse", value: function(e2) { - var t2 = L.NO_USE; - return D({ code: t2, message: this.getErrMsg(t2, e2) }); - } }]), oo), k = { LOGIN: "wslogin", LOGOUT: "wslogout", HELLO: "wshello", KICK_OTHER: "KickOther", SYNC_UNREAD_MSG: "getmsg", SEND_C2C_MSG: "sendmsg", SEND_GRP_MSG: "send_group_msg", GET_USER_PROFILE: "portrait_get_all", UPDATE_MY_PROFILE: "portrait_set", GET_BL: "black_list_get", ADD_TO_BL: "black_list_add", RM_FROM_BL: "black_list_delete", GET_FD_LIST: "friend_get", GET_FD_PROFILE: "friend_get_specified", CHECK_FD: "friend_check", DEL_FD: "friend_delete", ADD_FD: "friend_add", UPDATE_FD: "friend_update", RESPOND_FD_APPLICATION: "friend_response", GET_FD_APPLICATION_LIST: "pendency_get", DEL_FD_APPLICATION: "pendency_delete", REFUSE_FD_APPLICATION: "pendency_refuse", REPORT_FD_APPLICATION: "pendency_report", GET_FD_GRP_LIST: "group_get", CREATE_FD_GRP: "group_add", DEL_FD_GRP: "group_delete", UPDATE_FD_GRP: "group_update", REVOKE_C2C_MSG: "msgwithdraw", SET_C2C_MSG_READ: "msgreaded", SET_C2C_PEER_MUTE_NOTIFICATIONS: "set_c2c_peer_mute_notifications", GET_C2C_PEER_MUTE_NOTIFICATIONS: "get_c2c_peer_mute_notifications", GET_C2C_ROAMING_MSG: "getroammsg", GET_C2C_PEER_READ_TIME: "get_peer_read_time", DEL_C2C_MSG: "delete_c2c_msg_ramble", MODIFY_C2C_MSG: "modify_c2c_msg", MODIFY_C2C_MSG_EXT: "set_key_values", GET_C2C_MSG_EXT: "get_key_values", ADD_C2C_MSG_REACTION: "reaction_add", RM_C2C_MSG_REACTION: "reaction_del", GET_C2C_MSG_REACTIONS: "reaction_multi_stat", GET_C2C_MSG_REACTION_USER_LIST: "reaction_iterate", PAGING_GET_CONV_LIST: "page_get", DEL_CONV: "batch_delete", CLEAR_HISTORY_MSG: "clear_msg", PIN_CONV: "top", DEL_GROUP_AT_TIPS: "deletemsg", SET_CONV_CUSTOM_DATA: "set_conv_custom_data", MARK_CONV: "mark_contact", CREATE_CONV_GRP: "create_contact_group", DEL_CONV_GRP: "del_contact_group", RENAME_CONV_GRP: "update_contact_group", ADD_CONV_TO_GRP: "add_conv_to_group", DEL_CONV_FROM_GRP: "del_conv_from_group", GET_CONV_GRP_LIST: "get_contact_group", SEARCH_CONV_GRP_MARK: "search_contact_group", GET_GRP_LIST: "get_joined_group_list", GET_GRP_PROFILE: "get_group_self_member_info", CREATE_GRP: "create_group", DISMISS_GRP: "destroy_group", UPDATE_GRP_PROFILE: "modify_group_base_info", APPLY_JOIN_GRP: "apply_join_group", APPLY_JOIN_GRP_NOAUTH: "apply_join_group_noauth", QUIT_GRP: "quit_group", SEARCH_GRP: "get_group_public_info", CHANGE_GRP_OWNER: "change_group_owner", HANDLE_GRP_APPLICATION: "handle_apply_join_group", HANDLE_INVITE_JOIN_GRP: "handle_invite_join_permission_group", HANDLE_GRP_INVITATION: "handle_invite_join_group", REVOKE_GRP_MSG: "group_msg_recall", SET_GRP_MSG_READ: "msg_read_report", SET_ALL_MSG_READ: "read_all_unread_msg", GET_GRP_ROAMING_MSG: "group_msg_get", GET_READ_RECEIPT: "get_group_msg_receipt", SEND_READ_RECEIPT: "group_msg_receipt", SEND_C2C_READ_RECEIPT: "c2c_msg_read_receipt", GET_READ_RECEIPT_DETAIL: "get_group_msg_receipt_detail", GET_GRP_PENDENCY: "get_pendency", DEL_GRP_SYSTEM_NOTICE: "deletemsg", AV_POLLING: "get_msg", AV_NOAUTH_POLLING: "get_msg_noauth", GET_ONLINE_MBR_NUM: "get_online_member_num", DEL_GRP_MSG: "delete_group_ramble_msg_by_seq", MODIFY_GRP_MSG: "modify_group_msg", SET_GRP_ATTR: "set_group_attr", MODIFY_GRP_ATTR: "modify_group_attr", DEL_GRP_ATTR: "delete_group_attr", CLEAR_GRP_ATTR: "clear_group_attr", GET_GRP_ATTR: "get_group_attr", MODIFY_GRP_MSG_EXT: "group_set_key_values", GET_GRP_MSG_EXT: "group_get_key_values", GET_GRP_NOTIFY: "batch_get_group_notify", UPDATE_GRP_COUNTER: "update_group_counter", GET_GRP_COUNTER: "get_group_counter", ADD_GRP_MSG_REACTION: "group_reaction_add", RM_GRP_MSG_REACTION: "group_reaction_del", GET_GRP_MSG_REACTIONS: "group_reaction_multi_stat", GET_GRP_MSG_REACTION_USER_LIST: "group_reaction_iterate", GET_GRP_MBR_LIST: "get_group_member_info", GET_AV_MBR_LIST: "get_members", GET_GRP_MBR_PROFILE: "get_specified_group_member_info", ADD_GRP_MBR: "add_group_member", DEL_GRP_MBR: "delete_group_member", BAN_AV_MBR: "ban_group_member", MODIFY_GRP_MBR_INFO: "modify_group_member_info", MARK_AV_MBR_INFO: "modify_user_info", COS_SIGN: "cos", COS_PRE_SIG: "pre_sig", SIMPLE_COS_PRE_SIG: "simple_sig", GET_IMAGE_INFO: "get_imageinfo", GET_IP: "get_final_ip", VIDEO_COVER: "video_cover", SSO_STAT: "tim_web_report_v2", PING: "alive", MSG_PUSH: "msg_push", MSG_CLOUD_SEARCH: "query", MULTI_MSG_PUSH: "multi_msg_push_ws", MSG_PUSH_ACK: "ws_msg_push_ack", STATUS_FORCE_OFFLINE: "stat_forceoffline", UPLOAD_MERGER_MSG: "save_relay_json_msg", DOWNLOAD_MERGER_MSG: "get_relay_json_msg", FETCH_CLOUD_CTRL_CONFIG: "fetch_config", PUSHED_CLOUD_CTRL_CONFIG: "push_configv2", FETCH_COMMERCIAL_CONFIG: "fetch_imsdk_purchase_bitsv2", PUSHED_COMMERCIAL_CONFIG: "push_imsdk_purchase_bitsv2", OVERLOAD_NOTIFY: "notify2", CREATE_TOPIC: "create_topic", DEL_TOPIC: "destroy_topic", UPDATE_TOPIC_PROFILE: "modify_topic", GET_TOPIC_LIST: "get_topic", SET_SELF_STATUS: "ws_set_custom_status", GET_USER_STATUS: "ws_get_user_status", SUB_USER_STATUS: "ws_status_subscribe", UNSUB_USER_STATUS: "ws_status_unsubscribe", STAT_BACKGROUND: "ws_stat_background", STAT_FOREGROUND: "ws_stat_foreground", SET_TOKEN: "ws_stat_settoken", PUSH_REPORT: "uniapp_sdk_report", GET_PROFANITY_LIST: "get_local_words", TRANSLATE_TEXT: "ws_batch_trans_text", VOICE_TO_TEXT: "ws_sentence_recognition", FOLLOW: "follow_add", UNFOLLOW: "follow_delete", GET_FOLLOW: "follow_get", GET_FOLLOW_INFO: "follow_get_info", CHECK_FOLLOW_TYPE: "follow_check", SET_ALL_RECEIVE_MSG_OPT: "ws_set_do_not_disturb", GET_ALL_RECEIVE_MSG_OPT: "ws_get_do_not_disturb" }, xn = "networkRTT", Vn = "messageE2EDelay", Hn = "sendMessageC2C", Bn = "sendMessageGroup", Kn = "sendMessageGroupAV", Yn = "sendMessageRichMedia", Wn = "cosUpload", jn = "messageReceivedGroup", Jn = "messageReceivedGroupAVPush", zn = "messageReceivedGroupAVPull", Xn = (F(bn = {}, xn, 2), F(bn, Vn, 3), F(bn, Hn, 4), F(bn, Bn, 5), F(bn, Kn, 6), F(bn, Yn, 7), F(bn, jn, 8), F(bn, Jn, 9), F(bn, zn, 10), F(bn, Wn, 11), bn), Zn = { info: 4, warning: 5, error: 6 }, Qn = { wifi: 1, "2g": 2, "3g": 3, "4g": 4, "5g": 5, unknown: 6, none: 7, online: 8 }, $n = { login: 4, plugin_search: 16, plugin_translate: 16, plugin_voice_to_text: 16, plugin_cs: 16, plugin_push: 16, plugin_bot: 16, plugin_emoji_reaction: 16 }, G = (e(no, [{ key: "updateTimeStamp", value: function() { - this.timestamp = We(); - } }, { key: "start", value: function(e2) { - return this._startts = e2, this; - } }, { key: "end", value: function() { - var e2, t2 = this, n2 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0]; - this._sentFlag || (this._netMonitorModule && (e2 = this._netMonitorModule.getNetworkType(), this.setNetworkType(e2)), e2 = We(), 0 === this.costTime && (this.costTime = e2 - this._startts), this.setMoreMessage("startts:".concat(this._startts, " endts:").concat(e2)), n2 ? (this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this)) : setTimeout(function() { - t2._sentFlag = true, t2._eventStatModule && t2._eventStatModule.pushIn(t2); - }, 0)); - } }, { key: "setError", value: function(e2) { - var t2; - return e2 instanceof Error ? this._sentFlag || (t2 = true, (t2 = this._netMonitorModule ? this._netMonitorModule.isOnline() : t2) ? (e2.code && this.setCode(e2.code), e2.message && this.setMoreMessage(e2.message)) : this.setCode(L.NO_NETWORK), this.setLevel("error")) : M.w("".concat(this._n, ".setError value not instanceof Error, please check!")), this; - } }, { key: "setCode", value: function(e2) { - return N(e2) || this._sentFlag || ("ECONNABORTED" === e2 && (this.code = 103), R(e2) ? this.code = e2 : M.w("".concat(this._n, ".setCode value not a number, please check!"), e2, b(e2))), this; - } }, { key: "setMessage", value: function(e2) { - return N(e2) || this._sentFlag || (R(e2) && (this.message = e2.toString()), m(e2) && (this.message = e2)), this; - } }, { key: "setCostTime", value: function(e2) { - return this.costTime = e2, this; - } }, { key: "setLevel", value: function(e2) { - return N(e2) || this._sentFlag || (this.level = Zn[e2]), this; - } }, { key: "setMoreMessage", value: function(e2) { - return S(this.moreMessage) ? this.moreMessage = "".concat(e2) : this.moreMessage += " ".concat(e2), this; - } }, { key: "setNetworkType", value: function(e2) { - return N(e2) ? M.w("".concat(this._n, ".setNetworkType value is undefined, please check!")) : (e2 = Qn[e2.toLowerCase()], N(e2) || (this.networkType = e2)), this; - } }, { key: "getStartTs", value: function() { - return this._startts; - } }, { key: "setUIPlatform", value: function(e2) { - return this.uiPlatform = e2, this; - } }, { key: "setExtension", value: function(e2) { - return this.extension = e2, this; - } }, { key: "setEventType", value: function(e2) { - return this.eventType = e2, this; - } }], [{ key: "bindEventStatModule", value: function(e2) { - no.prototype._eventStatModule = e2; - } }, { key: "bindNetMonitorModule", value: function(e2) { - no.prototype._netMonitorModule = e2; - } }]), no), eo = (e(to, [{ key: "setText", value: function(e2) { - this.content.text = e2; - } }, { key: "sendable", value: function() { - return 0 !== this.content.text.length; - } }]), to); - function to(e2) { - d(this, to), this.type = A.MSG_TEXT, this.content = { text: e2.text || "" }; - } - function no(e2) { - d(this, no), this._n = "SSOLogData", this.eventType = $n[e2] || 0, this.timestamp = 0, this.networkType = 8, this.code = 0, this.message = "", this.moreMessage = "", this.extension = e2, this.costTime = 0, this.duplicate = false, this.level = 4, this.uiPlatform = void 0, this._sentFlag = false, this._startts = We(); - } - function oo(e2) { - d(this, oo), this._m = e2, this._n = ""; - } - function io(e2) { - d(this, io), t2 = kn.call(this); - var t2, n2 = e2.code, o2 = e2.message, e2 = e2.data; - return t2.code = n2, o2 ? t2.message = o2 : t2._getErrMsg && (t2.message = t2._getErrMsg(t2.code)), t2.data = e2 || {}, t2; - } - function ao(e2, t2, n2, o2) { - var i2, o2 = 3 < arguments.length && void 0 !== o2 ? o2 : []; - if (e2) - return i2 = e2, t2 && (e2.startsWith("http://") ? i2 = e2.replace(/^http:\/\/[^/]+/, t2) : e2.startsWith("https://") && (i2 = e2.replace(/^https:\/\/[^/]+/, t2))), n2 && -1 === i2.indexOf("authKey=") && co(i2, o2) ? (-1 < i2.indexOf("?") ? "".concat(i2, "&authKey=") : "".concat(i2, "?authKey=")).concat(n2) : i2; - } - function so(e2, t2, n2) { - var n2 = 2 < arguments.length && void 0 !== n2 ? n2 : []; - return e2 === A.MSG_VIDEO ? co((t2[0].content || t2[0].payload).snapshotUrl, n2) && (t2[0].content ? (t2[0].content.snapshotUrl = ro(t2[0].content.snapshotUrl), t2[0].content.thumbUrl = ro(t2[0].content.thumbUrl)) : (t2[0].payload.snapshotUrl = ro(t2[0].payload.snapshotUrl), t2[0].payload.thumbUrl = ro(t2[0].payload.thumbUrl))) : e2 === A.MSG_FILE ? co((t2[0].content || t2[0].payload).fileUrl, n2) && (t2[0].content ? t2[0].content.fileUrl = ro(t2[0].content.fileUrl) : t2[0].payload.fileUrl = ro(t2[0].payload.fileUrl)) : e2 === A.MSG_MERGER && (e2 = (n2 = t2[0].content || t2[0].payload).downloadKey, n2 = void 0 === (n2 = n2.messageList) ? [] : n2, S(void 0 === e2 ? "" : e2)) && n2.forEach(function(e3) { - so(e3.messageBody[0].type, e3.messageBody); - }), t2; - } - function ro(e2) { - if (!e2) - return e2; - if (-1 === e2.indexOf("authKey=")) - return e2; - for (var e2 = e2.split("?"), t2 = e2[1].split("&"), n2 = 0, o2 = 0; o2 < t2.length; o2++) - if (-1 < t2[o2].indexOf("authKey=")) { - n2 = o2; - break; - } - return t2.splice(n2, 1), 0 < t2.length ? "".concat(e2[0], "?").concat(t2.join("&")) : e2[0]; - } - function co(e2, t2) { - var n2 = false; - if (e2) { - var e2 = e2.match(/:\/\/([0-9]?\.)?(.[^/:]+)/), o2 = e2 && e2[2] || ""; - if (o2.includes("rich-dev")) - return 1; - for (var i2 = 0; i2 < t2.length; i2++) - if (o2.endsWith(t2[i2])) { - n2 = true; - break; - } - } - return n2; - } - e(bo, [{ key: "_initImageInfoModel", value: function() { - var t2 = this; - this._ImageInfoModel = function(e2) { - this.instanceID = ft(9999999), this.sizeType = e2.type || 0, this.type = 0, this.size = e2.size || 0, this.width = e2.width || 0, this.height = e2.height || 0, this.imageUrl = e2.imageUrl || e2.url || "", this.url = ao(e2.url || t2._imageMemoryURL, t2._fileDownloadProxy, t2._authKey, t2._fileDNList); - }, this._ImageInfoModel.prototype = { setSizeType: function(e2) { - this.sizeType = e2; - }, setType: function(e2) { - this.type = e2; - }, setImageUrl: function(e2) { - e2 && (this.imageUrl = e2); - }, getImageUrl: function() { - return this.imageUrl; - } }; - } }, { key: "initImageInfoArray", value: function(e2) { - for (var t2, n2 = 0, o2 = null; n2 <= 2; ) - t2 = N(e2) || N(e2[n2]) ? { type: 0, size: 0, width: 0, height: 0, url: "" } : e2[n2], (o2 = new this._ImageInfoModel(t2)).setSizeType(n2 + 1), o2.setType(n2), this.addImageInfo(o2), n2++; - this.updateAccessSideImageInfoArray(); - } }, { key: "updateImageInfoArray", value: function(e2) { - for (var t2, n2 = this.content.imageInfoArray.length, o2 = 0; o2 < n2; o2++) - t2 = this.content.imageInfoArray[o2], e2[o2].size && (t2.size = e2[o2].size), e2[o2].url && t2.setImageUrl(e2[o2].url), e2[o2].width && (t2.width = e2[o2].width), e2[o2].height && (t2.height = e2[o2].height); - } }, { key: "_autoFixUrl", value: function() { - for (var e2 = this.content.imageInfoArray.length, t2 = "", n2 = "", o2 = ["http", "https"], i2 = null, a2 = 0; a2 < e2; a2++) - this.content.imageInfoArray[a2].url && "" !== (i2 = this.content.imageInfoArray[a2]).imageUrl && (n2 = i2.imageUrl.slice(0, i2.imageUrl.indexOf("://") + 1), t2 = i2.imageUrl.slice(i2.imageUrl.indexOf("://") + 1), o2.indexOf(n2) < 0 && (n2 = "https:"), this.content.imageInfoArray[a2].setImageUrl([n2, t2].join(""))); - } }, { key: "updatePercent", value: function(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } }, { key: "updateImageFormat", value: function(e2) { - this.content.imageFormat = Xe[e2.toUpperCase()] || Xe.UNKNOWN; - } }, { key: "createImageDataASURLInWeb", value: function(e2) { - void 0 !== e2 && 0 < e2.files.length && (this._imageMemoryURL = window.URL.createObjectURL(e2.files[0])); - } }, { key: "createImageDataASURL", value: function(e2) { - e2 && e2.url && (this._imageMemoryURL = e2.url); - } }, { key: "replaceImageInfo", value: function(e2, t2) { - this.content.imageInfoArray[t2] instanceof this._ImageInfoModel || (this.content.imageInfoArray[t2] = e2); - } }, { key: "addImageInfo", value: function(e2) { - 3 <= this.content.imageInfoArray.length || this.content.imageInfoArray.push(e2); - } }, { key: "updateAccessSideImageInfoArray", value: function() { - var e2 = this.content.imageInfoArray, t2 = e2[0], n2 = t2.width, n2 = void 0 === n2 ? 0 : n2, t2 = t2.height, t2 = void 0 === t2 ? 0 : t2; - 0 !== n2 && 0 !== t2 && (Bt(e2), Object.assign(e2[2], Ht({ originWidth: n2, originHeight: t2, min: 720 }))); - } }, { key: "sendable", value: function() { - return 0 !== this.content.imageInfoArray.length && "" !== this.content.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0].size; - } }]); - var uo = bo, lo = (e(Uo, [{ key: "sendable", value: function() { - return null !== this.content; - } }]), Uo), po = (e(Po, [{ key: "updatePercent", value: function(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } }, { key: "updateAudioUrl", value: function(e2) { - this.content.remoteAudioUrl = e2; - } }, { key: "sendable", value: function() { - return "" !== this.content.remoteAudioUrl; - } }]), Po), _o = { from: true, groupID: true, groupName: true, to: true }, ho = (e(Go, [{ key: "_initContent", value: function(t2) { - var n2 = this; - Object.keys(t2).forEach(function(e2) { - switch (e2) { - case "remarkInfo": - break; - case "groupProfile": - n2.content.groupProfile = {}, n2._initGroupProfile(t2[e2]); - break; - case "operatorInfo": - n2.content.operatorInfo = {}, n2._initOperatorInfo(t2[e2]); - break; - case "memberInfoList": - case "msgMemberInfo": - n2._updateMemberList(t2[e2]); - break; - case "memberExtraInfo": - case "onlineMemberInfo": - break; - case "memberNum": - n2.content[e2] = t2[e2], n2.content.memberCount = t2[e2]; - break; - case "newGroupProfile": - n2.content.newGroupProfile = {}, n2._initNewGroupProfile(t2[e2]); - break; - default: - n2.content[e2] = t2[e2]; - } - }), this.content.userIDList || (this.content.userIDList = [this.content.operatorID]); - } }, { key: "_initGroupProfile", value: function(e2) { - for (var t2 = Object.keys(e2), n2 = 0; n2 < t2.length; n2++) { - var o2 = t2[n2]; - _o[o2] && (this.content.groupProfile[o2] = e2[o2]); - } - } }, { key: "_initOperatorInfo", value: function(e2) { - for (var t2 = Object.keys(e2), n2 = 0; n2 < t2.length; n2++) { - var o2 = t2[n2]; - this.content.operatorInfo[o2] = e2[o2]; - } - } }, { key: "_updateMemberList", value: function(e2) { - S(this.content.memberList) ? this.content.memberList = e2 : this.content.memberList.forEach(function(t2) { - e2.forEach(function(e3) { - t2.userID === e3.userID && Object.assign(t2, e3); - }); - }); - } }, { key: "_initNewGroupProfile", value: function(e2) { - for (var t2 = Object.keys(e2), n2 = 0; n2 < t2.length; n2++) { - var o2 = t2[n2]; - this.content.newGroupProfile[o2] = "muteAllMembers" !== o2 ? e2[o2] : 1 === e2[o2]; - } - } }]), Go), go = { from: true, groupID: true, groupName: true, to: true, groupType: true }, fo = (e(No, [{ key: "_initContent", value: function(t2) { - var n2 = this; - Object.keys(t2).forEach(function(e2) { - switch (e2) { - case "memberInfoList": - break; - case "remarkInfo": - n2.content.handleMessage = t2[e2]; - break; - case "groupProfile": - n2.content.groupProfile = {}, n2._initGroupProfile(t2[e2]); - break; - default: - n2.content[e2] = t2[e2]; - } - }); - } }, { key: "_initGroupProfile", value: function(e2) { - for (var t2 = Object.keys(e2), n2 = 0; n2 < t2.length; n2++) { - var o2 = t2[n2]; - go[o2] && ("groupName" === o2 ? this.content.groupProfile.name = e2[o2] : this.content.groupProfile[o2] = e2[o2]); - } - } }]), No), mo = (e(Oo, [{ key: "_getFileInfo", value: function(e2) { - var t2, n2; - return N(e2.fileName) || N(e2.fileSize) ? (t2 = e2.file.files[0], Ie && (t2.path && -1 !== t2.path.indexOf(".") && (n2 = t2.path.slice(t2.path.lastIndexOf(".") + 1).toLowerCase(), t2.type = n2, t2.name || (t2.name = "".concat(ft(999999), ".").concat(n2))), t2.name || (t2.type = "", t2.name = t2.path.slice(t2.path.lastIndexOf("/") + 1).toLowerCase()), t2.suffix && (t2.type = t2.suffix), t2.url || (t2.url = t2.path)), { size: t2.size, name: t2.name }) : { size: e2.fileSize, name: e2.fileName }; - } }, { key: "updatePercent", value: function(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } }, { key: "updateFileUrl", value: function(e2) { - this.content.fileUrl = e2; - } }, { key: "sendable", value: function() { - return "" !== this.content.fileUrl && "" !== this.content.fileName && 0 !== this.content.fileSize; - } }]), Oo), vo = (e(Ro, [{ key: "setData", value: function(e2) { - return this.content.data = e2, this; - } }, { key: "setDescription", value: function(e2) { - return this.content.description = e2, this; - } }, { key: "setExtension", value: function(e2) { - return this.content.extension = e2, this; - } }, { key: "sendable", value: function() { - return 0 !== this.content.data.length || 0 !== this.content.description.length || 0 !== this.content.extension.length; - } }]), Ro), Io = (e(Ao, [{ key: "updatePercent", value: function(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } }, { key: "updateVideoUrl", value: function(e2) { - e2 && (this.content.remoteVideoUrl = e2); - } }, { key: "updateSnapshotInfo", value: function(e2) { - var t2 = e2.snapshotUrl, n2 = e2.snapshotWidth, e2 = e2.snapshotHeight; - S(t2) || (this.content.thumbUrl = this.content.snapshotUrl = t2), S(n2) || (this.content.thumbWidth = this.content.snapshotWidth = Number(n2)), S(e2) || (this.content.thumbHeight = this.content.snapshotHeight = Number(e2)); - } }, { key: "sendable", value: function() { - return "" !== this.content.remoteVideoUrl; - } }]), Ao), Mo = (e(ko, [{ key: "sendable", value: function() { - return true; - } }]), ko), yo = (e(So, [{ key: "_patchRichMediaPayload", value: function(e2, t2) { - e2 === A.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e3) { - !e3.imageUrl && e3.url && (e3.imageUrl = e3.url, e3.sizeType = e3.type, 1 === e3.type ? e3.type = 0 : 3 === e3.type && (e3.type = 1)); - }) : e2 === A.MSG_VIDEO ? !t2.remoteVideoUrl && t2.videoUrl && (t2.remoteVideoUrl = t2.videoUrl) : e2 === A.MSG_AUDIO ? !t2.remoteAudioUrl && t2.url && (t2.remoteAudioUrl = t2.url) : e2 === A.MSG_FILE && !t2.fileUrl && t2.url && (t2.fileUrl = t2.url, t2.url = void 0); - } }, { key: "_updateRichMediaDownloadUrl", value: function(e2, t2, n2, o2, i2) { - (n2 || o2) && (e2 === A.MSG_IMAGE ? t2.imageInfoArray.forEach(function(e3) { - e3.url = ao(e3.url, n2, o2, i2); - }) : e2 === A.MSG_VIDEO ? (t2.videoUrl = ao(t2.videoUrl, n2, o2, i2), t2.snapshotUrl = ao(t2.thumbUrl, n2, o2, i2), t2.snapshotHeight = t2.thumbHeight, t2.snapshotWidth = t2.thumbWidth) : e2 === A.MSG_AUDIO ? t2.url = ao(t2.url, n2, o2, i2) : e2 === A.MSG_FILE && (t2.fileUrl = ao(t2.fileUrl, n2, o2, i2))); - } }]), So), Co = (e(Lo, [{ key: "sendable", value: function() { - return !S(this.content.messageList) || !S(this.content.downloadKey); - } }]), Lo), To = { 1: A.MSG_PRIORITY_HIGH, 2: A.MSG_PRIORITY_NORMAL, 3: A.MSG_PRIORITY_LOW, 4: A.MSG_PRIORITY_LOWEST }, Do = (e(Eo, [{ key: "elements", get: function() { - return this._elements; - } }, { key: "getElements", value: function() { - return this._elements; - } }, { key: "extractGroupInfo", value: function(e2) { - null !== e2 && (m(e2.nick) && (this.nick = e2.nick), m(e2.avatar) && (this.avatar = e2.avatar), e2 = e2.messageFromAccountExtraInformation, f(e2)) && m(e2.nameCard) && (this.nameCard = e2.nameCard); - } }, { key: "handleGroupAtInfo", value: function(e2) { - var t2 = this; - e2.payload && e2.payload.atUserList && e2.payload.atUserList.forEach(function(e3) { - e3 !== A.MSG_AT_ALL ? (t2._groupAtInfoList.push({ groupAtAllFlag: 0, groupAtUserID: e3 }), t2.atUserList.push(e3)) : (t2._groupAtInfoList.push({ groupAtAllFlag: 1 }), t2.atUserList.push(A.MSG_AT_ALL)); - }), O(e2.groupAtInfo) && e2.groupAtInfo.forEach(function(e3) { - 0 === e3.groupAtAllFlag ? t2.atUserList.push(e3.groupAtUserID) : 1 === e3.groupAtAllFlag && t2.atUserList.push(A.MSG_AT_ALL); - }); - } }, { key: "getGroupAtInfoList", value: function() { - return this._groupAtInfoList; - } }, { key: "_initProxy", value: function() { - this._elements[0] && (this.payload = this._elements[0].content, this.type = this._elements[0].type); - } }, { key: "reInitialize", value: function(e2) { - e2 && (this.status = this.from ? Rn : An, !this.from) && (this.from = e2), this._initFlow(e2), this._initSequence(e2), this._concatConversationID(e2), this.generateMessageID(); - } }, { key: "isSendable", value: function() { - return 0 !== this._elements.length && (true === this._relayFlag || "function" == typeof this._elements[0].sendable && this._elements[0].sendable()); - } }, { key: "_initTo", value: function(e2) { - this.conversationType === A.CONV_GROUP && (this.to = e2.groupID); - } }, { key: "_initSequence", value: function(e2) { - var t2, n2, o2; - 0 === this.clientSequence && e2 && (this.clientSequence = !!(e2 = e2) && (void 0 === St[e2] && (o2 = /* @__PURE__ */ new Date(), t2 = "3".concat(o2.getHours()).slice(-2), n2 = "0".concat(o2.getMinutes()).slice(-2), o2 = "0".concat(o2.getSeconds()).slice(-2), St[e2] = parseInt([t2, n2, o2, "0001"].join("")), o2 = n2 = t2 = null, M.l("autoIncrementIndex start index:".concat(St[e2]))), St[e2]++)), 0 === this.sequence && this.conversationType === A.CONV_C2C && (this.sequence = this.clientSequence); - } }, { key: "generateMessageID", value: function() { - this.from === A.CONV_SYSTEM && (this.senderTinyID = "144115198244471703"), this.ID = "".concat(this.senderTinyID, "-").concat(this.clientTime, "-").concat(this.random); - } }, { key: "_initFlow", value: function(e2) { - "" !== e2 && (e2 === this.from ? (this.flow = "out", this.isRead = true) : this.flow = "in"); - } }, { key: "_concatConversationID", value: function(e2) { - var t2 = this.to, n2 = this.conversationType; - n2 !== A.CONV_SYSTEM ? (e2 = n2 === A.CONV_C2C ? e2 === this.from ? t2 : this.from : this.to, this.conversationID = e2 ? "".concat(n2).concat(e2) : null) : this.conversationID = A.CONV_SYSTEM; - } }, { key: "isElement", value: function(e2) { - return e2 instanceof eo || e2 instanceof uo || e2 instanceof lo || e2 instanceof po || e2 instanceof mo || e2 instanceof Io || e2 instanceof ho || e2 instanceof fo || e2 instanceof vo || e2 instanceof Mo || e2 instanceof Co; - } }, { key: "setElement", value: function(e2, t2, n2, o2) { - var i2 = this; - if (this.isElement(e2)) - this._elements = [e2]; - else { - var a2 = function(e3) { - if (e3.type && e3.content) - switch (e3.type) { - case A.MSG_TEXT: - i2.setTextElement(e3.content); - break; - case A.MSG_IMAGE: - i2.setImageElement(e3.content, t2, n2, o2); - break; - case A.MSG_AUDIO: - i2.setAudioElement(e3.content, t2, n2, o2); - break; - case A.MSG_FILE: - i2.setFileElement(e3.content, t2, n2, o2); - break; - case A.MSG_VIDEO: - i2.setVideoElement(e3.content, t2, n2, o2); - break; - case A.MSG_CUSTOM: - i2.setCustomElement(e3.content); - break; - case A.MSG_LOCATION: - i2.setLocationElement(e3.content); - break; - case A.MSG_GRP_TIP: - i2.setGroupTipElement(e3.content); - break; - case A.MSG_GRP_SYS_NOTICE: - i2.setGroupSystemNoticeElement(e3.content); - break; - case A.MSG_FACE: - i2.setFaceElement(e3.content); - break; - case A.MSG_MERGER: - i2.setMergerElement(e3.content, t2, n2, o2); - } - }; - if (O(e2)) - for (var s2 = 0; s2 < e2.length; s2++) - a2(e2[s2]); - else - a2(e2); - } - this._initProxy(); - } }, { key: "clearElement", value: function() { - this._elements.length = 0; - } }, { key: "setTextElement", value: function(e2) { - e2 = "string" == typeof e2 ? e2 : e2.text, e2 = new eo({ text: e2 }); - this._elements.push(e2); - } }, { key: "setImageElement", value: function(e2, t2, n2, o2) { - e2 = new uo(e2, t2, n2, o2); - this._elements.push(e2); - } }, { key: "setAudioElement", value: function(e2, t2, n2, o2) { - e2 = new po(e2, t2, n2, o2); - this._elements.push(e2); - } }, { key: "setFileElement", value: function(e2, t2, n2, o2) { - e2 = new mo(e2, t2, n2, o2); - this._elements.push(e2); - } }, { key: "setVideoElement", value: function(e2, t2, n2, o2) { - e2 = new Io(e2, t2, n2, o2); - this._elements.push(e2); - } }, { key: "setLocationElement", value: function(e2) { - e2 = new Mo(e2); - this._elements.push(e2); - } }, { key: "setCustomElement", value: function(e2) { - e2 = new vo(e2); - this._elements.push(e2); - } }, { key: "setGroupTipElement", value: function(e2) { - var t2, n2 = {}, o2 = e2.operationType; - S(e2.memberInfoList) ? e2.operatorInfo && (n2 = e2.operatorInfo) : o2 !== A.GRP_TIP_MBR_JOIN && o2 !== A.GRP_TIP_MBR_KICKED_OUT && o2 !== A.GRP_TIP_MBR_SET_ADMIN && o2 !== A.GRP_TIP_MBR_CANCELED_ADMIN || (n2 = e2.memberInfoList[0]), S(e2.memberExtraInfo) || (t2 = e2.memberExtraInfo.reason, e2.msgMemberInfo.forEach(function(e3) { - e3.reason = t2; - })); - o2 = n2.nick, n2 = n2.avatar, m(o2) && (this.nick = o2), m(n2) && (this.avatar = n2), o2 = new ho(e2); - this._elements.push(o2); - } }, { key: "setGroupSystemNoticeElement", value: function(e2) { - e2 = new fo(e2); - this._elements.push(e2); - } }, { key: "setFaceElement", value: function(e2) { - e2 = new lo(e2); - this._elements.push(e2); - } }, { key: "setMergerElement", value: function(e2, t2, n2, o2) { - e2 = new Co(e2, t2, n2, o2); - this._elements.push(e2); - } }, { key: "setIsRead", value: function(e2) { - this.isRead = e2; - } }, { key: "setRelayFlag", value: function(e2) { - this._relayFlag = e2; - } }, { key: "_computePriority", value: function(e2) { - if (!N(e2)) { - if (m(e2) && -1 !== Object.values(To).indexOf(e2)) - return e2; - if (R(e2)) { - e2 = "" + e2; - if (-1 !== Object.keys(To).indexOf(e2)) - return To[e2]; - } - } - return A.MSG_PRIORITY_NORMAL; - } }, { key: "setNickAndAvatar", value: function(e2) { - var t2 = e2.nick, e2 = e2.avatar; - m(t2) && (this.nick = t2), m(e2) && (this.avatar = e2); - } }, { key: "setNameCard", value: function(e2) { - m(e2) && (this.nameCard = e2); - } }, { key: "initC2CReadReceiptInfo", value: function(e2) { - var t2 = e2.readReceiptSentByPeer, e2 = e2.timestamp, e2 = void 0 === e2 ? 0 : e2; - this.conversationType === A.CONV_C2C && true === this.needReadReceipt && (this.readReceiptInfo.isPeerRead = 1 === (void 0 === t2 ? void 0 : t2), this.readReceiptInfo.timestamp = e2); - } }]), Eo); - function Eo(e2) { - d(this, Eo), this.ID = "", this.conversationID = e2.conversationID || null, this.conversationType = e2.conversationType || A.CONV_C2C, this.conversationSubType = e2.conversationSubType, this.time = e2.time || Math.ceil(Date.now() / 1e3), this.sequence = e2.sequence || 0, this.clientSequence = e2.clientSequence || e2.sequence || 0, this.random = e2.random || 0 === e2.random ? e2.random : ft(), this.priority = this._computePriority(e2.priority), this.nick = e2.nick || "", this.avatar = e2.avatar || "", this.isPeerRead = false, this.nameCard = "", this.hasRiskContent = on(e2.checkResult), this._elements = [], this.isPlaceMessage = e2.isPlaceMessage || 0, this.isRevoked = 2 === e2.isPlaceMessage || 8 === e2.msgFlagBits, this.from = e2.from || null, this.to = e2.to || null, this.flow = "", this.isSystemMessage = e2.isSystemMessage || false, this.protocol = e2.protocol || "JSON", this.isResend = false, this.isRead = false, this.status = e2.status || Rn, this._onlineOnlyFlag = false, this._groupAtInfoList = [], this._relayFlag = false, this.atUserList = [], this.cloudCustomData = e2.cloudCustomData || "", this.isDeleted = false, this.isModified = !!e2.messageVersion, this._isExcludedFromUnreadCount = !(!e2.messageControlInfo || 1 !== e2.messageControlInfo.excludedFromUnreadCount), this._isExcludedFromLastMessage = !(!e2.messageControlInfo || 1 !== e2.messageControlInfo.excludedFromLastMessage), this.clientTime = e2.clientTime || Be() || 0, this.senderTinyID = e2.senderTinyID || e2.tinyID || "", this.readReceiptInfo = e2.readReceiptInfo || { readCount: void 0, unreadCount: void 0, isPeerRead: void 0, timestamp: 0 }, this.needReadReceipt = true === e2.needReadReceipt || 1 === e2.needReadReceipt, this.version = e2.messageVersion || 0, this.isBroadcastMessage = e2.isBroadcastMessage || false, this._receiverList = e2.receiverList || void 0, this.isSupportExtension = true === e2.isSupportExtension || 1 === e2.isSupportExtension, this._cmConfigID = e2.customModerationConfigurationID, this.revoker = e2.revokerInfo && e2.revokerInfo.revoker || "", this.revokerInfo = e2.revokerInfo || { userID: "", nick: "", avatar: "" }, this.revokeReason = e2.revokeReason || "", this.reInitialize(e2.currentUser), this.extractGroupInfo(e2.groupProfile || null), this.handleGroupAtInfo(e2), this.initC2CReadReceiptInfo(e2); - } - function Lo(e2, t2, n2, o2) { - var i2, a2, s2, r2, c2, u2, l2; - d(this, Lo), this.type = A.MSG_MERGER, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, e2.downloadKey ? (a2 = e2.downloadKey, s2 = e2.pbDownloadKey, r2 = e2.title, c2 = e2.abstractList, u2 = e2.compatibleText, i2 = e2.version, this.content.downloadKey = a2, this.content.pbDownloadKey = s2, this.content.title = r2, this.content.abstractList = c2, this.content.compatibleText = u2, this.content.version = i2 || 0) : S(e2.messageList) ? 1 === e2.layersOverLimit && (this.content.layersOverLimit = true) : (a2 = e2.messageList, s2 = e2.title, r2 = e2.abstractList, c2 = e2.compatibleText, u2 = e2.version, l2 = [], a2.forEach(function(e3) { - S(e3) || (e3 = new yo(e3, t2, n2, o2), l2.push(e3)); - }), this.content.messageList = l2, this.content.title = s2, this.content.abstractList = r2, this.content.compatibleText = c2, this.content.version = u2 || 0); - } - function So(e2, t2, n2, o2) { - var i2, a2; - d(this, So), this.from = e2.from, this.messageSender = e2.from, this.time = e2.time, this.messageSequence = e2.sequence, this.clientSequence = e2.clientSequence || e2.sequence, this.messageRandom = e2.random, this.cloudCustomData = e2.cloudCustomData || "", this.clientTime = e2.clientTime || void 0, e2.ID ? (this.ID = e2.ID || "", this.nick = e2.nick || "", this.avatar = e2.avatar || "", e2.messageBody ? this.messageBody = JSON.parse(JSON.stringify(e2.messageBody)) : this.messageBody = [{ type: e2.type, payload: e2.payload }], e2.conversationType ? e2.conversationType.startsWith(A.CONV_C2C) ? this.receiverUserID = e2.to : e2.conversationType.startsWith(A.CONV_GROUP) && (this.receiverGroupID = e2.to) : e2.receiverGroupID ? this.receiverGroupID = e2.receiverGroupID : e2.receiverUserID && (this.receiverUserID = e2.receiverUserID), this.messageReceiver = e2.to || e2.messageReceiver) : (this.nick = e2.nick || "", this.avatar = e2.avatar || "", this.messageBody = [], i2 = e2.elements[0].type, a2 = e2.elements[0].content, this._patchRichMediaPayload(i2, a2), this._updateRichMediaDownloadUrl(i2, a2, t2, n2, o2), i2 === A.MSG_MERGER ? this.messageBody.push({ type: i2, payload: new Co(a2, t2, n2, o2).content }) : this.messageBody.push({ type: i2, payload: a2 }), e2.groupID && (this.receiverGroupID = e2.groupID, this.messageReceiver = e2.groupID), e2.to && (this.receiverUserID = e2.to, this.messageReceiver = e2.to), this.ID = "".concat(e2.tinyID, "-").concat(e2.clientTime, "-").concat(e2.random)); - } - function ko(e2) { - d(this, ko), this.type = A.MSG_LOCATION; - var t2 = e2.description, n2 = e2.longitude, e2 = e2.latitude; - this.content = { description: t2, longitude: n2, latitude: e2 }; - } - function Ao(e2, t2, n2, o2) { - d(this, Ao), this.type = A.MSG_VIDEO, this._percent = 0, this.content = { remoteVideoUrl: e2.remoteVideoUrl || e2.videoUrl || "", videoFormat: e2.videoFormat, videoSecond: parseInt(e2.videoSecond, 10), videoSize: e2.videoSize, videoUrl: ao(e2.videoUrl, t2, n2, o2), videoDownloadFlag: 2, videoUUID: e2.videoUUID, thumbUUID: e2.thumbUUID, thumbFormat: e2.thumbFormat, thumbWidth: e2.thumbWidth, snapshotWidth: e2.thumbWidth, thumbHeight: e2.thumbHeight, snapshotHeight: e2.thumbHeight, thumbSize: e2.thumbSize, snapshotSize: e2.thumbSize, thumbDownloadFlag: 2, thumbUrl: ao(e2.thumbUrl, t2, n2, o2), snapshotUrl: ao(e2.thumbUrl, t2, n2, o2) }; - } - function Ro(e2) { - d(this, Ro), this.type = A.MSG_CUSTOM, this.content = { data: e2.data || "", description: e2.description || "", extension: e2.extension || "" }; - } - function Oo(e2, t2, n2, o2) { - d(this, Oo), this.type = A.MSG_FILE, this._percent = 0; - var i2 = this._getFileInfo(e2); - this.content = { downloadFlag: 2, fileUrl: ao(e2.url || e2.fileUrl, t2, n2, o2) || "", uuid: e2.uuid, fileName: i2.name || "", fileSize: i2.size || 0 }; - } - function No(e2) { - d(this, No), this.type = A.MSG_GRP_SYS_NOTICE, this.content = {}, this._initContent(e2); - } - function Go(e2) { - d(this, Go), this.type = A.MSG_GRP_TIP, this.content = {}, this._initContent(e2); - } - function Po(e2, t2, n2, o2) { - d(this, Po), this.type = A.MSG_AUDIO, this._percent = 0, this.content = { downloadFlag: 2, second: e2.second, size: e2.size, url: ao(e2.url, t2, n2, o2), remoteAudioUrl: e2.url || "", uuid: e2.uuid }; - } - function Uo(e2) { - d(this, Uo), this.type = A.MSG_FACE, this.content = e2 || null; - } - function bo(e2, t2, n2, o2) { - d(this, bo), this._imageMemoryURL = "", this._fileDownloadProxy = t2, this._authKey = n2, this._fileDNList = o2, v || ye ? this.createImageDataASURL(e2.file) : this.createImageDataASURLInWeb(e2.file), this._initImageInfoModel(), this.type = A.MSG_IMAGE, this._percent = 0, this.content = { imageFormat: e2.imageFormat || Xe.UNKNOWN, uuid: e2.uuid, imageInfoArray: [] }, this.initImageInfoArray(e2.imageInfoArray), this._autoFixUrl(); - } - function wo(e2) { - if (f(e2)) - return { pushFlag: true === e2.disablePush ? 1 : 0, title: e2.title || "", desc: e2.description || "", ext: e2.extension || "", apnsInfo: (n2 = void 0 === (n2 = (t2 = e2).apnsInfo) ? {} : n2, o2 = t2.ignoreIOSBadge, t2 = t2.disableVoipPush, o2 = true === n2.ignoreIOSBadge || true === (void 0 !== o2 && o2) ? 1 : 0, i2 = void 0, N(t2) || (i2 = false === t2 ? 1 : 0), N(n2.disableVoipPush) || (i2 = false === n2.disableVoipPush ? 1 : 0), y(y({}, n2), {}, { badgeMode: o2, isVoipPush: i2 })), androidInfo: (n2 = void 0 === (n2 = (t2 = e2).androidInfo) ? {} : n2, t2 = t2.androidOPPOChannelID, t2 = n2.OPPOChannelID || (void 0 === t2 ? "" : t2), y(y({}, n2), {}, { Sound: -1 === (i2 = (o2 = n2.sound || "").lastIndexOf(".")) ? o2 : o2.slice(0, i2), OPPOChannelID: t2, GoogleChannelID: n2.FCMChannelID || "" })) }; - var t2, n2, o2, i2; - } - t(Ho, u), Fo = n(Ho), e(Ho, [{ key: "onNewMessage", value: function(e2) { - var t2 = e2.dataList, n2 = e2.isInstantMessage, o2 = e2.C2CRemainingUnreadList, i2 = e2.C2CPairUnreadList, e2 = e2.isSyncingEnded, t2 = (n2 || M.l("".concat(this._n, ".onNewMessage C2CPairUnreadList:"), i2, "C2CRemainingUnreadList:", o2), this._assembly({ dataList: t2, C2CRemainingUnreadList: o2, C2CPairUnreadList: i2, isInstantMessage: n2 })), o2 = t2.conversationOptionsList, i2 = t2.messageList, t2 = t2.isUnreadC2CMessage, a2 = At(i2), a2 = (0 < a2.length && this.emitOEvt(h.MESSAGE_MODIFIED, a2), this.get(11).onNewMessage({ conversationOptionsList: o2, isInstantMessage: n2, isUnreadC2CMessage: t2, isSyncingEnded: e2 }), Rt(i2)); - n2 && 0 < a2.length && this.emitOEvt(h.MESSAGE_RECEIVED, a2), i2.length = 0; - } }, { key: "_assembly", value: function(e2) { - for (var t2 = e2.dataList, n2 = e2.C2CRemainingUnreadList, o2 = e2.C2CPairUnreadList, i2 = e2.isInstantMessage, a2 = null, s2 = [], r2 = [], c2 = {}, u2 = this.get(26), l2 = false, d2 = this.get(11), p2 = this.get(4), e2 = this.get(17), _2 = this.getFileDownloadProxy(), h2 = this.getDowloadFileAuthKey(), g2 = e2.getFileDNList(), f2 = 0, m2 = t2.length; f2 < m2; f2++) - if (this._isC2CNotice(t2[f2])) - this._noticeFromUnreadDBList.push(t2[f2].eventArray[0].c2CNotifyMsgArray[0]); - else { - var v2 = t2[f2], I2 = (v2.currentUser = this.getMyUserID(), v2.conversationType = A.CONV_C2C, v2.isSystemMessage = !!v2.isSystemMessage, (N(v2.nick) || N(v2.avatar)) && (l2 = true), (a2 = new Do(v2)).setElement(v2.elements, _2, h2, g2), a2.setNickAndAvatar({ nick: v2.nick, avatar: v2.avatar }), a2.conversationID); - if (i2) { - if (this._msgFromUnreadDBMap.get(a2.ID)) - continue; - var M2, y2, C2 = false, T2 = (a2.from !== this.getMyUserID() ? (y2 = d2.getLatestMessageSentByPeer(I2)) && (M2 = y2.nick, y2 = y2.avatar, l2 ? a2.setNickAndAvatar({ nick: M2, avatar: y2 }) : M2 === a2.nick && y2 === a2.avatar || (C2 = true)) : (M2 = d2.getLatestMessageSentByMe(I2)) && (y2 = M2.nick, T2 = M2.avatar, y2 === a2.nick && T2 === a2.avatar || (d2.modifyMessageSentByMe({ conversationID: I2, latestNick: a2.nick, latestAvatar: a2.avatar }), p2.mockOnNickAvatarModified(a2.nick, a2.avatar))), 1 === t2[f2].isModified); - if (d2.isMessageSentByCurrentInstance(a2) ? a2.isModified = T2 : T2 = false, 0 === v2.msgLifeTime) - a2._onlineOnlyFlag = true, d2.isMessageSentByCurrentInstance(a2) || r2.push(a2); - else { - if (!d2.pushIntoMessageList(r2, a2, T2)) - continue; - C2 && (d2.modifyMessageSentByPeer({ conversationID: I2, latestNick: a2.nick, latestAvatar: a2.avatar }), d2.updateUserProfileSpecifiedKey({ conversationID: I2, nick: a2.nick, avatar: a2.avatar })); - } - i2 && 0 < a2.clientTime && u2.addMessageDelay(a2.clientTime); - } else - this._msgFromUnreadDBMap.set(a2.ID, a2); - if (0 !== v2.msgLifeTime) { - if (false === a2._onlineOnlyFlag) { - C2 = d2.getLastMessageTime(I2); - if (R(C2) && a2.time < C2) - continue; - i2 && (N(c2[I2]) ? (v2 = 0, "in" !== a2.flow || a2._isExcludedFromUnreadCount || (v2 = 1), c2[I2] = s2.push({ conversationID: I2, unreadCount: v2, type: a2.conversationType, subType: a2.conversationSubType, lastMessage: a2._isExcludedFromLastMessage ? "" : a2 }) - 1) : (v2 = c2[I2], s2[v2].type = a2.conversationType, s2[v2].subType = a2.conversationSubType, s2[v2].lastMessage = a2._isExcludedFromLastMessage ? "" : a2, "in" !== a2.flow || a2._isExcludedFromUnreadCount || s2[v2].unreadCount++)); - } - } else - a2._onlineOnlyFlag = true; - } - this._handleNoticeFromUnreadDB(); - var D2 = false; - if (O(o2) && 0 < o2.length) - for (var E2 = 0, L2 = o2.length; E2 < L2; E2++) - !function(t3) { - if (o2[t3].from === A.CONV_SYSTEM) - return; - D2 = true; - var e3 = s2.find(function(e4) { - return e4.conversationID === "".concat(A.CONV_C2C).concat(o2[t3].from); - }); - e3 ? e3.unreadCount = o2[t3].unreadCount : s2.push({ conversationID: "".concat(A.CONV_C2C).concat(o2[t3].from), unreadCount: o2[t3].unreadCount, type: A.CONV_C2C }); - }(E2); - if (O(n2)) - for (var S2 = 0, k2 = n2.length; S2 < k2; S2++) - !function(t3) { - s2.find(function(e3) { - return e3.conversationID === "".concat(A.CONV_C2C).concat(n2[t3].from); - }) || s2.push({ conversationID: "".concat(A.CONV_C2C).concat(n2[t3].from), type: A.CONV_C2C, lastMsgTime: n2[t3].lastMsgTime }); - }(S2); - return { conversationOptionsList: s2, messageList: r2, isUnreadC2CMessage: D2 }; - } }, { key: "getMessageListFromUnreadDB", value: function() { - return p(this._msgFromUnreadDBMap.values()); - } }, { key: "_isC2CNotice", value: function(e2) { - e2 = e2.eventArray; - return !(!O(e2) || 10 !== e2[0].event); - } }, { key: "_handleNoticeFromUnreadDB", value: function() { - var t2, e2 = this._noticeFromUnreadDBList.length; - 0 !== e2 && (M.l("".concat(this._n, "._handleNoticeFromUnreadDB count:").concat(e2)), t2 = [], this._noticeFromUnreadDBList.forEach(function(e3) { - e3.hasOwnProperty("c2cMessageRevokedNotify") && t2.push(e3); - }), this.onMsgRevoked({ dataList: t2 }), this._noticeFromUnreadDBList.length = 0, t2.length = 0); - } }, { key: "onMsgRevoked", value: function(e2) { - var a2, s2 = this, r2 = this.get(11), c2 = []; - e2.dataList.forEach(function(e3) { - e3.c2cMessageRevokedNotify && (e3 = e3.c2cMessageRevokedNotify.revokedInfos, N(e3) || e3.forEach(function(e4) { - var t2 = s2.getMyUserID() === e4.from ? "".concat(A.CONV_C2C).concat(e4.to) : "".concat(A.CONV_C2C).concat(e4.from); - a2 = r2.revoke(t2, e4.sequence, e4.random); - var n2, o2 = e4.revokerInfo && e4.revokerInfo.revoker, i2 = e4.revokerInfo && e4.revokerInfo.reason || ""; - a2 ? n2 = a2 : (n2 = { conversationID: t2, sequence: e4.sequence }, e4.tinyID && e4.clientTime && e4.random && (n2.ID = "".concat(e4.tinyID, "-").concat(e4.clientTime, "-").concat(e4.random)), e4.time && (n2.time = e4.time)), n2 && (n2.revoker = o2, n2.revokeReason = i2, n2.revokerInfo = { userID: o2, nick: "", avatar: "" }, c2.push(n2)); - })); - }), 0 !== c2.length && (r2.onMessageRevoked(c2), M.l("".concat(this._n, ".onMsgRevoked count:").concat(c2.length)), r2.updateRevokerInfo(c2).then(function(e3) { - s2.emitOEvt(h.MESSAGE_REVOKED, e3); - })); - } }, { key: "onMsgReadReceipt", value: function(e2) { - var i2 = this; - e2.dataList.forEach(function(e3) { - var o2; - S(e3.c2cMessageReadReceipt) || (o2 = e3.c2cMessageReadReceipt.to, e3.c2cMessageReadReceipt.uinPairReadArray.forEach(function(e4) { - var e4 = e4.peerReadTime, t2 = (M.l("".concat(i2._n, ".onMsgReadReceipt to:").concat(o2, " peerReadTime:").concat(e4)), "".concat(A.CONV_C2C).concat(o2)), n2 = i2.get(11); - n2.recordPeerReadTime(t2, e4), n2.updateMsgIsPeerReadProp(t2, e4); - })); - }); - } }, { key: "onMsgReadNotice", value: function(e2) { - var o2 = this; - e2.dataList.forEach(function(e3) { - var n2; - S(e3.c2cMessageReadNotice) || (n2 = o2.get(11), e3.c2cMessageReadNotice.uinPairReadArray.forEach(function(e4) { - var t2 = e4.from, e4 = e4.peerReadTime, t2 = (M.l("".concat(o2._n, ".onMsgReadNotice from:").concat(t2, " lastReadTime:").concat(e4)), "".concat(A.CONV_C2C).concat(t2)); - n2.updateIsReadAfterReadReport({ conversationID: t2, lastMessageTime: e4 }), n2.updateUnreadCount(t2); - })); - }); - } }, { key: "onMsgModified", value: function(e2) { - M.l("".concat(this._n, ".onMsgModified options:"), e2); - var t2 = this.get(11); - e2.dataList.forEach(function(e3) { - t2.onMessageModified(y(y({}, e3), {}, { conversationType: A.CONV_C2C })); - }); - } }, { key: "onReadReceiptList", value: function(e2) { - M.l("".concat(this._n, ".onReadReceiptList options:"), e2), this.get(11).updateReadReceiptInfo(e2.dataList); - } }, { key: "sendMessage", value: function(e2, t2) { - e2 = this._createC2CMessagePack(e2, t2); - return this.req(e2); - } }, { key: "_createC2CMessagePack", value: function(e2, t2) { - var n2 = null, o2 = (t2 && (t2.offlinePushInfo && (n2 = t2.offlinePushInfo), true === t2.onlineUserOnly) && (n2 ? n2.disablePush = true : n2 = { disablePush: true }), ""), i2 = (m(e2.cloudCustomData) && 0 < e2.cloudCustomData.length && (o2 = e2.cloudCustomData), []), a2 = (f(t2) && f(t2.messageControlInfo) && (a2 = (r2 = t2.messageControlInfo).excludedFromUnreadCount, s2 = r2.excludedFromLastMessage, r2 = r2.excludedFromContentModeration, true === a2 && i2.push("NoUnread"), true === s2 && i2.push("NoLastMsg"), true === r2) && i2.push("NoMsgCheck"), this.isOnlineMessage(e2, t2) ? 0 : void 0), s2 = JSON.parse(JSON.stringify(e2.getElements())), r2 = this.get(17).getFileDNList(); - return { P: k.SEND_C2C_MSG, data: { fromAccount: this.getMyUserID(), toAccount: e2.to, msgBody: so(e2.type, s2, r2), cloudCustomData: o2, msgSeq: e2.sequence, msgRandom: e2.random, msgLifeTime: a2, nick: e2.nick, avatar: e2.avatar, offlinePushInfo: wo(n2), messageControlInfo: 0 !== a2 ? i2 : void 0, clientTime: e2.clientTime, needReadReceipt: true === e2.needReadReceipt ? 1 : 0, isSupportExtension: true === e2.isSupportExtension ? 1 : 0, isRelayMessage: true === e2._relayFlag ? 1 : 0, cmConfigID: e2._cmConfigID } }; - } }, { key: "isOnlineMessage", value: function(e2, t2) { - return !(!t2 || true !== t2.onlineUserOnly); - } }, { key: "revokeMessage", value: function(e2) { - return this.req({ P: k.REVOKE_C2C_MSG, data: { msgInfo: { fromAccount: e2.from, toAccount: e2.to, msgSeq: e2.sequence, msgRandom: e2.random, msgTimeStamp: e2.time } } }); - } }, { key: "deleteMessage", value: function(e2) { - var t2 = e2.to, e2 = e2.keyList; - return M.l("".concat(this._n, ".deleteMessage toAccount:").concat(t2, " count:").concat(e2.length)), this.req({ P: k.DEL_C2C_MSG, data: { fromAccount: this.getMyUserID(), to: t2, keyList: e2 } }); - } }, { key: "modifyRemoteMessage", value: function(e2) { - var t2 = e2.from, n2 = e2.to, o2 = e2.version, o2 = void 0 === o2 ? 0 : o2, i2 = e2.sequence, a2 = e2.random, s2 = e2.time, r2 = e2.payload, c2 = e2.type, u2 = e2.cloudCustomData, e2 = e2._elements, l2 = void 0; - return Xt(c2) && (1 < e2.length && e2.splice(0, 1, { type: c2, content: r2 }), l2 = e2), this.req({ P: k.MODIFY_C2C_MSG, data: { from: t2, to: n2, version: o2, sequence: i2, random: a2, time: s2, elements: l2, cloudCustomData: u2 } }); - } }, { key: "setMessageRead", value: function(e2) { - var t2 = this, n2 = e2.conversationID, o2 = e2.lastMessageTime, i2 = "".concat(this._n, ".").concat("setMessageRead"), e2 = "convID:".concat(n2, " lastMessageTime:").concat(o2), a2 = (M.l("".concat(i2, " ").concat(e2)), R(o2) || this.warn("DoNotModifyLastTime"), new G("setMessageRead")); - return a2.setMessage(e2), this.req({ P: k.SET_C2C_MSG_READ, data: { C2CMsgReaded: { cookie: "", C2CMsgReadedItem: [{ toAccount: n2.replace("C2C", ""), lastMessageTime: o2, receipt: 1 }] } } }).then(function() { - a2.end(), M.l("".concat(i2, " ok")); - var e3 = t2.get(11); - return e3.updateIsReadAfterReadReport({ conversationID: n2, lastMessageTime: o2 }), e3.updateUnreadCount(n2), C(); - }).catch(function(e3) { - return a2.setError(e3).end(), M.l("".concat(i2, " failed. error:"), e3), D(e3); - }); - } }, { key: "getRoamingMessage", value: function(e2) { - var s2 = this, r2 = "".concat(this._n, ".").concat("getRoamingMessage"), t2 = e2.peerAccount, c2 = e2.conversationID, n2 = e2.count, o2 = e2.lastMessageTime, e2 = e2.messageKey, u2 = "peerAccount:".concat(t2, " count:").concat(n2 || 15, " lastMessageTime:").concat(o2 || 0, " messageKey:").concat(e2), l2 = (M.l("".concat(r2, " ").concat(u2)), new G("getRoamingMessage")); - return this.req({ P: k.GET_C2C_ROAMING_MSG, data: { peerAccount: t2, count: n2 || 15, lastMessageTime: o2 || 0, messageKey: e2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.complete, n3 = e3.messageList, o3 = e3.messageKey, e3 = e3.lastMessageTime, i2 = (N(n3) ? M.l("".concat(r2, " ok. complete:").concat(t3, " but messageList is undefined!")) : M.l("".concat(r2, " ok. complete:").concat(t3, " count:").concat(n3.length)), l2.setMessage("".concat(u2, " complete:").concat(t3, " length:").concat(n3.length)).end(), s2.get(11)), t3 = 1 === t3, a2 = (t3 && i2.setCompleted(c2), []), n3 = i2.onRoamingMessage(n3, c2, true, a2), o3 = (i2.modifyMessageList(c2), i2.updateIsRead(c2), i2.updateRoamingMsgKeyAndTime(c2, o3, e3), i2.getPeerReadTime(c2)), o3 = (M.l("".concat(r2, " update isPeerRead property. convID:").concat(c2, " peerReadTime:").concat(o3)), o3 ? i2.updateMsgIsPeerReadProp(c2, o3) : (e3 = c2.replace(A.CONV_C2C, ""), s2.getRemotePeerReadTime([e3]).then(function() { - i2.updateMsgIsPeerReadProp(c2, i2.getPeerReadTime(c2)); - })), ""); - return 0 < n3.length ? o3 = n3[0].ID : (e3 = i2.getLocalOldestMessage(c2)) && (o3 = e3.ID), M.l("".concat(r2, " nextReqID:").concat(o3, " storedMsgCount:").concat(n3.length)), { nextReqID: o3, storedMessageList: n3, assembledMessageList: a2, isPullingCompleted: t3 }; - }).catch(function(e3) { - return l2.setMessage(u2).setError(e3).end(), M.w("".concat(r2, " failed. error:"), e3), D(e3); - }); - } }, { key: "getRoamingMessagesHopping", value: function(e2) { - var a2 = this, s2 = "".concat(this._n, ".").concat("getRoamingMessagesHopping"), t2 = e2.peerAccount, n2 = e2.time, n2 = void 0 === n2 ? 0 : n2, o2 = e2.count, r2 = e2.direction, c2 = "".concat(A.CONV_C2C).concat(t2), u2 = "peerAccount:".concat(t2, " count:").concat(o2, " time:").concat(n2, " direction:").concat(r2), l2 = (M.l("".concat(s2, " ").concat(u2)), new G("getRoamingMessagesHopping")); - return this.req({ P: k.GET_C2C_ROAMING_MSG, data: { peerAccount: t2, count: o2 + 1, lastMessageTime: n2, direction: r2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.complete, n3 = e3.messageList, n3 = void 0 === n3 ? [] : n3, e3 = e3.lastMessageTime, o3 = "complete:".concat(t3, " count:").concat(n3.length), i2 = (M.l("".concat(s2, " ok. ").concat(o3)), l2.setMessage("".concat(u2, " ").concat(o3)).end(), 1 !== t3 && (1 === r2 ? n3.pop() : n3.shift()), a2.get(11)), o3 = i2.onRoamingMessage(n3, c2, false), n3 = (a2._modifyMessageList(c2, o3), a2._computeResult({ complete: t3, lastMessageTime: e3, resultList: o3 })), t3 = (i2.storeHoppingMessageList(n3.messageList), i2.getPeerReadTime(c2)); - return M.l("".concat(s2, " update isPeerRead property. convID:").concat(c2, " peerReadTime:").concat(t3)), t3 ? i2.updateMsgIsPeerReadProp(c2, t3) : (e3 = c2.replace(A.CONV_C2C, ""), a2.getRemotePeerReadTime([e3]).then(function() { - i2.updateMsgIsPeerReadProp(c2, i2.getPeerReadTime(c2)); - })), C(n3); - }).catch(function(e3) { - return l2.setMessage(u2).setError(e3).end(), M.w("".concat(s2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_computeResult", value: function(e2) { - var t2 = e2.complete, t2 = void 0 === t2 ? 0 : t2, n2 = e2.lastMessageTime, e2 = e2.resultList, e2 = { messageList: p(void 0 === e2 ? [] : e2), isCompleted: false, nextMessageTime: "" }; - return 1 === t2 ? e2.isCompleted = true : e2.nextMessageTime = n2, e2; - } }, { key: "_modifyMessageList", value: function(e2, t2) { - e2 = this.get(11).getLocalConversation(e2); - if (e2) - for (var n2 = e2.userProfile.nick, o2 = e2.userProfile.avatar, e2 = this.get(4).getNickAndAvatarByUserID(this.getMyUserID()), i2 = e2.nick, a2 = e2.avatar, s2 = t2.length - 1; 0 <= s2; s2--) { - var r2 = t2[s2]; - "in" === r2.flow && (r2.nick !== n2 && r2.setNickAndAvatar({ nick: n2 }), r2.avatar !== o2) && r2.setNickAndAvatar({ avatar: o2 }), "out" === r2.flow && (r2.nick !== i2 && r2.setNickAndAvatar({ nick: i2 }), r2.avatar !== a2) && r2.setNickAndAvatar({ avatar: a2 }); - } - } }, { key: "getRemotePeerReadTime", value: function(a2) { - var s2, r2 = this, c2 = "".concat(this._n, ".").concat("getRemotePeerReadTime"); - return S(a2) ? Promise.resolve() : (s2 = new G("getRemotePeerReadTime"), M.l("".concat(c2, " userIDList:").concat(a2)), this.req({ P: k.GET_C2C_PEER_READ_TIME, data: { userIDList: a2 } }).then(function(e2) { - var t2 = e2.data.peerReadTimeList; - M.l("".concat(c2, " ok. peerReadTimeList:").concat(t2)); - for (var n2 = "", o2 = r2.get(11), i2 = 0; i2 < a2.length; i2++) - n2 += "".concat(a2[i2], "-").concat(t2[i2], " "), 0 < t2[i2] && o2.recordPeerReadTime("".concat(A.CONV_C2C).concat(a2[i2]), t2[i2]); - s2.setMessage(n2).end(); - }).catch(function(e2) { - s2.setError(e2).end(), M.w("".concat(c2, " failed. error:"), e2); - })); - } }, { key: "sendReadReceipt", value: function(e2) { - var t2, n2 = e2[0].conversationID.replace(A.CONV_C2C, ""), o2 = new G("sendReadReceipt"), i2 = (o2.setMessage("peerAccount:".concat(n2)), this.getMyUserID()), e2 = e2.filter(function(e3) { - return e3.from !== i2 && true === e3.needReadReceipt; - }).map(function(e3) { - return { fromAccount: e3.from, toAccount: e3.to, sequence: e3.sequence, random: e3.random, time: e3.time, clientTime: e3.clientTime }; - }); - return 0 === e2.length ? D({ code: L.READ_RECEIPT_MSG_LIST_EMPTY }) : (t2 = "".concat(this._n, ".").concat("sendReadReceipt"), M.l("".concat(t2, ". peerAccount:").concat(n2, " length:").concat(e2.length)), this.req({ P: k.SEND_C2C_READ_RECEIPT, data: { peerAccount: n2, messageInfoList: e2 } }).then(function(e3) { - return o2.end(), M.l("".concat(t2, " ok")), C(); - }).catch(function(e3) { - return o2.setError(e3).end(), M.w("".concat(t2, " failed. error:"), e3), D(e3); - })); - } }, { key: "getReadReceiptList", value: function(e2) { - var t2 = e2[0].conversationID.replace(A.CONV_C2C, ""); - return M.l("".concat(this._n, ".getReadReceiptList peerAccount:").concat(t2, " msgCount:").concat(e2.length)), T({ messageList: e2 }); - } }, { key: "getMessageExtensions", value: function(e2, t2) { - return M.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.req({ P: k.GET_C2C_MSG_EXT, data: { from: e2.from, to: e2.to, messageKey: this.getMessageKey(e2), startSequence: t2 } }); - } }, { key: "modifyMsgExts", value: function(e2, t2) { - var n2 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1; - return M.l("".concat(this._n, ".modifyMsgExts operateType:").concat(n2)), this.req({ P: k.MODIFY_C2C_MSG_EXT, data: { from: e2.from, to: e2.to, messageKey: this.getMessageKey(e2), extensionList: t2, operateType: n2 } }); - } }, { key: "getMessageKey", value: function(e2) { - var t2 = e2.clientSequence, n2 = e2.random, e2 = e2.time; - return "".concat(t2, "_").concat(n2, "_").concat(e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._msgFromUnreadDBMap.clear(), this._noticeFromUnreadDBList.length = 0; - } }]); - var Fo, qo = Ho, P = { A2KEY_AND_TINYID_UPDATED: "_inner".concat(1), CLOUD_CONFIG: "_inner".concat(2), PROFILE_UPDATED: "_inner".concat(3), CONV_SYNC_COMPLETED: "_inner".concat(4), C2C_UNREAD_HANDLE_COMPLETED: "_inner".concat(5) }, xo = (e(Vo, [{ key: "_onCloudConfig", value: function() { - var e2 = this._convM.getCloudConfig("topic_msg_limit"); - N(e2) || (this.TOPIC_MSG_LIMIT = Number(e2)), M.l("".concat(this._n, "._onCloudConfig topicMsgLimit:").concat(this.TOPIC_MSG_LIMIT)); - } }, { key: "onCheckTimer", value: function(e2) { - if (e2 % 20 == 0 && 0 < this._map.size) { - var t2, n2 = Z(this._map); - try { - for (n2.s(); !(t2 = n2.n()).done; ) { - var o2 = Y(t2.value, 2), i2 = o2[0], a2 = o2[1]; - i2.includes(it) && a2.size >= this.TOPIC_MSG_LIMIT && this._convM.clearMemMsg(i2, true); - } - } catch (e3) { - n2.e(e3); - } finally { - n2.f(); - } - } - } }, { key: "pushIn", value: function(e2) { - var t2 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], n2 = e2.conversationID, o2 = true, i2 = (this._map.has(n2) || this._map.set(n2, /* @__PURE__ */ new Map()), this._getUniqueIDOfMsg(e2)); - if (this._map.get(n2).has(i2)) { - var a2 = this._map.get(n2).get(i2); - if (!t2 || true === a2.isModified) - return false; - } - return this._map.get(n2).set(i2, e2), this._setLatestMsgSentByPeer(n2, e2), this._setLatestMsgSentByMe(n2, e2), o2; - } }, { key: "unshift", value: function(e2, t2) { - var n2; - if (O(e2) ? 0 < e2.length && (n2 = e2[0].conversationID, this._unshiftMultipleMsgs(e2, t2)) : (n2 = e2.conversationID, this._unshiftSingleMsg(e2, t2)), n2) { - var o2 = Array.from(this._map.get(n2).values()), e2 = o2.length; - if (0 !== e2) { - for (var i2 = e2 - 1; 0 <= i2; i2--) - if ("out" === o2[i2].flow) { - this._setLatestMsgSentByMe(n2, o2[i2]); - break; - } - if (n2.startsWith(A.CONV_C2C)) { - for (var a2 = e2 - 1; 0 <= a2; a2--) - if ("in" === o2[a2].flow) { - this._setLatestMsgSentByPeer(n2, o2[a2]); - break; - } - } - } - } - } }, { key: "_unshiftSingleMsg", value: function(e2, t2) { - var n2, o2, i2 = e2.conversationID, a2 = this._getUniqueIDOfMsg(e2); - this._map.has(i2) ? (n2 = this._map.get(i2), o2 = Array.from(n2), n2.has(a2) || (o2.unshift([a2, e2]), this._map.set(i2, new Map(o2)), t2.push(e2))) : (this._map.set(i2, /* @__PURE__ */ new Map()), this._map.get(i2).set(a2, e2), t2.push(e2)); - } }, { key: "_unshiftMultipleMsgs", value: function(e2, t2) { - for (var n2 = e2.length, o2 = [], i2 = e2[0].conversationID, a2 = this._map.get(i2), s2 = this._map.has(i2) ? Array.from(a2) : [], r2 = 0; r2 < n2; r2++) { - var c2 = this._getUniqueIDOfMsg(e2[r2]); - a2 && a2.has(c2) || (o2.push([c2, e2[r2]]), t2.push(e2[r2])); - } - this._map.set(i2, new Map(o2.concat(s2))); - } }, { key: "remove", value: function(e2) { - var t2 = e2.conversationID, e2 = this._getUniqueIDOfMsg(e2); - this._map.has(t2) && this._map.get(t2).delete(e2); - } }, { key: "revoke", value: function(e2, t2, n2) { - var o2; - return this._map.has(e2) ? (o2 = this._map.get(e2), this._updateMsgIsRevoked(o2, t2, n2)) : this._hoppingMsgMap.has(e2) ? (o2 = this._hoppingMsgMap.get(e2), this._updateMsgIsRevoked(o2, t2, n2)) : null; - } }, { key: "_updateMsgIsRevoked", value: function(e2, t2, n2) { - var o2, i2 = Z(e2); - try { - for (i2.s(); !(o2 = i2.n()).done; ) { - var a2 = Y(o2.value, 2)[1]; - if (a2.sequence === t2 && (N(n2) || a2.random === n2)) - return a2.isRevoked || (a2.isRevoked = true), a2; - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - } }, { key: "removeByConvID", value: function(e2) { - var t2 = this._map.has(e2); - M.l("".concat(this._n, ".removeByConvID convID:").concat(e2, " has:").concat(t2)), t2 && (this._map.delete(e2), this._latestMsgSentByPeerMap.delete(e2), this._latestMsgSentByMeMap.delete(e2)); - } }, { key: "findMessage", value: function(e2) { - return this._findMsg(e2, this._map) || this._findMsg(e2, this._hoppingMsgMap); - } }, { key: "_findMsg", value: function(e2, t2) { - var n2, o2 = null, i2 = Z(t2); - try { - for (i2.s(); !(n2 = i2.n()).done; ) - for (var a2 = p(Y(n2.value, 2)[1].values()), s2 = a2.length, r2 = 0; r2 < s2; r2++) - if (a2[r2].ID === e2) { - o2 = a2[r2]; - break; - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - return o2; - } }, { key: "updateMsgIsPeerReadProp", value: function(e2, t2) { - var n2, o2 = []; - return this._map.has(e2) ? (n2 = this._map.get(e2), o2 = this._updateMsgIsPeerReadProp(n2, t2)) : this._hoppingMsgMap.has(e2) && (n2 = this._hoppingMsgMap.get(e2), o2 = this._updateMsgIsPeerReadProp(n2, t2)), M.l("".concat(this._n, ".updateMsgIsPeerReadProp convID:").concat(e2, " peerReadTime:").concat(t2, " count:").concat(o2.length)), o2; - } }, { key: "_updateMsgIsPeerReadProp", value: function(e2, t2) { - var n2, o2 = [], i2 = Z(e2); - try { - for (i2.s(); !(n2 = i2.n()).done; ) { - var a2 = Y(n2.value, 2)[1]; - a2.time <= t2 && !a2.isPeerRead && "out" === a2.flow && (a2.isPeerRead = true, o2.push(a2)); - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - return o2; - } }, { key: "updateMsgIsModifiedProp", value: function(e2) { - var t2 = e2.conversationID; - this._map.has(t2) && (e2 = this._getUniqueIDOfMsg(e2), t2 = this._map.get(t2).get(e2)) && (t2.isModified = true); - } }, { key: "hasLocalMsgList", value: function(e2) { - return this._map.has(e2); - } }, { key: "getLocalMsgList", value: function(e2) { - return this.hasLocalMsgList(e2) ? p(this._map.get(e2).values()) : []; - } }, { key: "getLocalMaxSeq", value: function(e2) { - return this.hasLocalMsgList(e2) ? (e2 = p(this._map.get(e2).values()).map(function(e3) { - return e3.sequence; - }), Math.max.apply(Math, p(e2))) : 0; - } }, { key: "getLocalMaxTime", value: function(e2) { - return this.hasLocalMsgList(e2) ? (e2 = p(this._map.get(e2).values()).map(function(e3) { - return e3.time; - }), Math.max.apply(Math, p(e2))) : 0; - } }, { key: "hasLocalMsg", value: function(e2, t2) { - for (var n2 = false, o2 = this.getLocalMsgList(e2), i2 = o2.length, a2 = 0; a2 < i2; a2++) - o2[a2].ID === t2 && (n2 = true); - return n2; - } }, { key: "getLocalMsg", value: function(e2, t2) { - for (var n2 = null, o2 = this.getLocalMsgList(e2), i2 = o2.length, a2 = 0; a2 < i2; a2++) - if (o2[a2].ID === t2) { - n2 = o2[a2]; - break; - } - return n2; - } }, { key: "getLocalLastMsg", value: function(e2) { - e2 = this.getLocalMsgList(e2); - return e2[e2.length - 1]; - } }, { key: "getLocalSecondLastMsg", value: function(e2) { - e2 = this.getLocalMsgList(e2); - return e2[e2.length - 2]; - } }, { key: "getLocalOldestMsg", value: function(e2) { - return this.getLocalMsgList(e2)[0]; - } }, { key: "_setLatestMsgSentByPeer", value: function(e2, t2) { - e2.startsWith(A.CONV_C2C) && "in" === t2.flow && this._latestMsgSentByPeerMap.set(e2, t2); - } }, { key: "_setLatestMsgSentByMe", value: function(e2, t2) { - "out" === t2.flow && this._latestMsgSentByMeMap.set(e2, t2); - } }, { key: "getLatestMsgSentByPeer", value: function(e2) { - return this._latestMsgSentByPeerMap.get(e2); - } }, { key: "getLatestMsgSentByMe", value: function(e2) { - return this._latestMsgSentByMeMap.get(e2); - } }, { key: "modifyMsgSentByPeer", value: function(e2) { - var t2 = e2.conversationID, n2 = e2.latestNick, o2 = e2.latestAvatar, e2 = this._map.get(t2); - if (!S(e2)) { - var i2 = Array.from(e2.values()), e2 = i2.length; - if (0 !== e2) { - for (var a2 = null, s2 = 0, r2 = false, c2 = e2 - 1; 0 <= c2; c2--) - "in" === i2[c2].flow && ((a2 = i2[c2]).nick !== n2 && (a2.setNickAndAvatar({ nick: n2 }), r2 = true), a2.avatar !== o2 && (a2.setNickAndAvatar({ avatar: o2 }), r2 = true), r2) && (s2 += 1); - M.l("".concat(this._n, ".modifyMsgSentByPeer convID:").concat(t2, " count:").concat(s2)); - } - } - } }, { key: "modifyMsgSentByMe", value: function(e2) { - var t2 = e2.conversationID, n2 = e2.latestNick, o2 = e2.latestAvatar, e2 = this._map.get(t2); - if (!S(e2)) { - var i2 = Array.from(e2.values()), e2 = i2.length; - if (0 !== e2) { - for (var a2 = null, s2 = 0, r2 = false, c2 = e2 - 1; 0 <= c2; c2--) - "out" === i2[c2].flow && ((a2 = i2[c2]).nick !== n2 && (a2.setNickAndAvatar({ nick: n2 }), r2 = true), a2.avatar !== o2 && (a2.setNickAndAvatar({ avatar: o2 }), r2 = true), r2) && (s2 += 1); - M.l("".concat(this._n, ".modifyMsgSentByMe convID:").concat(t2, " count:").concat(s2)); - } - } - } }, { key: "getTopicConvIDList", value: function(t2) { - return p(this._map.keys()).filter(function(e2) { - return e2.startsWith("".concat(A.CONV_GROUP).concat(t2)); - }); - } }, { key: "onMsgModified", value: function(e2, t2) { - var n2, o2, i2, a2; - return (this._map.has(e2) || this._hoppingMsgMap.has(e2)) && (n2 = "".concat(this._n, ".onMsgModified"), i2 = this._getUniqueIDOfMsg(t2), a2 = !!(o2 = this._getTargetMsg(e2, i2)), M.l("".concat(n2, " convID:").concat(e2, " uniqueID:").concat(i2, " has:").concat(a2)), a2) ? (e2 = t2.messageVersion, i2 = t2.elements, a2 = t2.cloudCustomData, t2 = t2.checkResult, M.l("".concat(n2, " localVersion:").concat(o2.version, " remoteVersion:").concat(e2)), o2.version < e2 ? (o2.version = e2, o2._elements = JSON.parse(JSON.stringify(i2)), o2.payload = JSON.parse(JSON.stringify(i2[0].content)), o2.type = i2[0].type, o2.cloudCustomData = a2, o2.isModified = true, o2.hasRiskContent = on(t2), { isUpdated: true, message: o2 }) : { isUpdated: false, message: o2 }) : { isUpdated: false, message: null }; - } }, { key: "_getUniqueIDOfMsg", value: function(e2) { - var t2 = e2.from, n2 = e2.to, o2 = e2.random, i2 = e2.sequence, e2 = e2.time; - return "".concat(t2, "-").concat(n2, "-").concat(o2, "-").concat(i2, "-").concat(e2); - } }, { key: "_getTargetMsg", value: function(e2, t2) { - if (this._map.has(e2)) - return this._map.get(e2).get(t2); - var n2 = void 0; - if (this._hoppingMsgMap.has(e2)) { - for (var o2 = p(this._hoppingMsgMap.get(e2).values()), i2 = 0; i2 < o2.length; i2++) - if (this._getUniqueIDOfMsg(o2[i2]) === t2) { - n2 = o2[i2]; - break; - } - } - return n2; - } }, { key: "storeHoppingMsgList", value: function(e2) { - if (0 !== e2.length) { - var t2 = e2[0].conversationID, n2 = e2.length; - this._hoppingMsgMap.has(t2) || this._hoppingMsgMap.set(t2, /* @__PURE__ */ new Map()); - for (var o2 = this._hoppingMsgMap.get(t2), i2 = 0; i2 < n2; i2++) { - var a2 = e2[i2]; - o2.has(a2.ID) || o2.set(a2.ID, a2); - } - } - } }, { key: "getHoppingMsg", value: function(e2, t2) { - if (this._hoppingMsgMap.has(e2)) - return this._hoppingMsgMap.get(e2).get(t2); - } }, { key: "reset", value: function() { - this._map.clear(), this._latestMsgSentByPeerMap.clear(), this._latestMsgSentByMeMap.clear(), this._hoppingMsgMap.clear(); - } }]), Vo); - function Vo(e2) { - d(this, Vo), this._convM = e2, this._map = /* @__PURE__ */ new Map(), this._n = "MsgListHandler", this._latestMsgSentByPeerMap = /* @__PURE__ */ new Map(), this._latestMsgSentByMeMap = /* @__PURE__ */ new Map(), this._hoppingMsgMap = /* @__PURE__ */ new Map(), this.TOPIC_MSG_LIMIT = 1e3, this._convM.getIEmitInst().on(P.CLOUD_CONFIG, this._onCloudConfig, this); - } - function Ho(e2) { - return d(this, Ho), (e2 = Fo.call(this, e2))._n = "C2CModule", e2._msgFromUnreadDBMap = /* @__PURE__ */ new Map(), e2._noticeFromUnreadDBList = [], e2; - } - function Bo(e2) { - this.mixin(e2); - } - Bo.mixin = function(e2) { - e2 = e2.prototype || e2; - e2._isReady = false, e2.ready = function(e3) { - if (e3) - return this._isReady ? void (1 < arguments.length && void 0 !== arguments[1] && arguments[1] ? e3.call(this) : setTimeout(e3, 1)) : (this._readyQueue = this._readyQueue || [], void this._readyQueue.push(e3)); - }, e2.triggerReady = function() { - var t2 = this; - this._isReady = true, setTimeout(function() { - var e3 = t2._readyQueue; - t2._readyQueue = [], e3 && 0 < e3.length && e3.forEach(function(e4) { - e4.call(this); - }, t2); - }, 1); - }, e2.resetReady = function() { - this._isReady = false, this._readyQueue = []; - }, e2.isReady = function() { - return this._isReady; - }; - }; - function Ko(e2, t2, n2) { - return N(e2) ? { lastTime: 0, lastSequence: 0, fromAccount: "", messageForShow: "", payload: null, type: "", isRevoked: false, cloudCustomData: "", onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: false, revoker: null } : n2 && e2.ID || e2 instanceof Do ? { lastTime: e2.time || 0, lastSequence: e2.sequence || 0, fromAccount: e2.from || "", messageForShow: zt(e2.type, e2.payload, t2), payload: e2.payload || null, type: e2.type || null, isRevoked: e2.isRevoked || false, cloudCustomData: e2.cloudCustomData || "", onlineOnlyFlag: e2._onlineOnlyFlag || false, nick: e2.nick || "", nameCard: e2.nameCard || "", version: e2.version || 0, isPeerRead: e2.isPeerRead || false, revoker: e2.revoker || null } : y(y({}, e2), {}, { messageForShow: zt(e2.type, e2.payload, t2) }); - } - function Yo(e2, t2) { - return S(e2) ? { lastTime: 0, lastSequence: 0, fromAccount: "", payload: null, type: "", messageForShow: "", nick: "", avatar: "", version: 0, cloudCustomData: "", isRevoked: false, revoker: null } : { lastTime: e2.time || 0, lastSequence: e2.sequence || 0, fromAccount: e2.from || "", payload: e2.payload || null, type: e2.type || "", messageForShow: zt(e2.type, e2.payload, t2), nick: e2.nick || "", avatar: e2.avatar || "", version: e2.version || 0, cloudCustomData: e2.cloudCustomData || "", isRevoked: e2.isRevoked || false, revoker: e2.revoker || null }; - } - function Wo(e2) { - var t2 = String(e2).replace(/[=]+$/, ""), n2 = ""; - if (t2.length % 4 == 1) - return ""; - for (var o2, i2, a2 = 0, s2 = 0; i2 = t2.charAt(s2++); ~i2 && (o2 = a2 % 4 ? 64 * o2 + i2 : i2, a2++ % 4) && (n2 += String.fromCharCode(255 & o2 >> (-2 * a2 & 6)))) - i2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i2); - try { - return decodeURIComponent(escape(n2)); - } catch (e3) { - return ""; - } - } - var jo, Jo, zo, Xo, Zo, Qo = ["jpg", "jpeg", "gif", "png", "bmp", "image", "webp"], $o = ["mp4", "quicktime", "mov"], ei = (e(oa, [{ key: "validate", value: function(e2) { - var t2, n2 = true, o2 = ""; - if (S(e2)) - return { valid: false, tips: "empty options" }; - if (e2.profileCustomField) - for (var i2 = e2.profileCustomField.length, a2 = null, s2 = 0; s2 < i2; s2++) { - if (a2 = e2.profileCustomField[s2], !m(a2.key) || -1 === a2.key.indexOf("Tag_Profile_Custom")) - return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" }; - if (!m(a2.value)) - return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" }; - } - for (t2 in e2) - if (Object.prototype.hasOwnProperty.call(e2, t2)) { - if ("profileCustomField" === t2) - continue; - if (S(e2[t2]) && !m(e2[t2]) && !R(e2[t2])) { - o2 = "key:" + t2 + ", invalid value:" + e2[t2], n2 = false; - continue; - } - switch (t2) { - case "nick": - m(e2[t2]) || (n2 = !(o2 = "nick must be a string")), 500 < gt(e2[t2]) && (o2 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(gt(e2[t2]), " bytes"), n2 = false); - break; - case "gender": - vt(Qe, e2.gender) || (o2 = "key:gender, invalid value:" + e2.gender, n2 = false); - break; - case "birthday": - R(e2.birthday) || (n2 = !(o2 = "birthday must be a number")); - break; - case "location": - m(e2.location) || (n2 = !(o2 = "location must be a string")); - break; - case "selfSignature": - m(e2.selfSignature) || (n2 = !(o2 = "selfSignature must be a string")); - break; - case "allowType": - vt(et, e2.allowType) || (o2 = "key:allowType, invalid value:" + e2.allowType, n2 = false); - break; - case "language": - R(e2.language) || (n2 = !(o2 = "language must be a number")); - break; - case "avatar": - m(e2.avatar) || (n2 = !(o2 = "avatar must be a string")); - break; - case "messageSettings": - 0 !== e2.messageSettings && 1 !== e2.messageSettings && (n2 = !(o2 = "messageSettings must be 0 or 1")); - break; - case "adminForbidType": - vt($e, e2.adminForbidType) || (o2 = "key:adminForbidType, invalid value:" + e2.adminForbidType, n2 = false); - break; - case "level": - R(e2.level) || (n2 = !(o2 = "level must be a number")); - break; - case "role": - R(e2.role) || (n2 = !(o2 = "role must be a number")); - break; - default: - o2 = "unknown key:" + t2 + " " + e2[t2], n2 = false; - } - } - return { valid: n2, tips: o2 }; - } }]), oa), ti = (e(na, [{ key: "set", value: function(e2) { - var t2; - this.map.size >= this.MAX_LENGTH && (t2 = this.map.entries().next().value[0], this.map.delete(t2)), this.map.set(e2, 1); - } }, { key: "has", value: function(e2) { - return this.map.has(e2); - } }, { key: "delete", value: function(e2) { - this.has(e2) && this.map.delete(e2); - } }, { key: "reset", value: function() { - this.map.clear(); - } }]), na), ni = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo", "createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum", "maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers", "isSupportTopic", "inviteOption", "_lastRevokedTime"], oi = (e(ta, [{ key: "memberNum", get: function() { - return this.memberCount; - }, set: function(e2) { - } }, { key: "maxMemberNum", get: function() { - return this.maxMemberCount; - }, set: function(e2) { - } }, { key: "_initGroup", value: function(e2) { - for (var t2 in e2) - ni.indexOf(t2) < 0 || ("selfInfo" !== t2 ? ("memberNum" === t2 && (this.memberCount = e2[t2]), "maxMemberNum" === t2 && (this.maxMemberCount = e2[t2]), "isSupportTopic" !== t2 ? this[t2] = e2[t2] : this.isSupportTopic = 1 === e2[t2]) : this.updateSelfInfo(e2[t2])); - } }, { key: "updateGroup", value: function(e2) { - var t2 = this, e2 = (e2.appid = void 0, e2.grossTopicNextMsgSeq = void 0, e2.selfInfo && (e2.selfInfo.grossTopicReadSeq = void 0), JSON.parse(JSON.stringify(e2))); - e2.lastMsgTime && (this.lastMessage.lastTime = e2.lastMsgTime), N(e2.muteAllMembers) || ("On" === e2.muteAllMembers ? e2.muteAllMembers = true : e2.muteAllMembers = false), e2.groupCustomField && kt(this.groupCustomField, e2.groupCustomField), N(e2.memberNum) || (this.memberCount = e2.memberNum), N(e2.maxMemberNum) || (this.maxMemberCount = e2.maxMemberNum), N(e2.isSupportTopic) || (this.isSupportTopic = R(e2.isSupportTopic) ? 1 === e2.isSupportTopic : e2.isSupportTopic), _t(this, e2, ["members", "errorCode", "lastMsgTime", "groupCustomField", "memberNum", "maxMemberNum", "isSupportTopic"]), O(e2.members) && 0 < e2.members.length && e2.members.forEach(function(e3) { - e3.userID === t2.selfInfo.userID && _t(t2.selfInfo, e3, ["sequence"]); - }); - } }, { key: "updateSelfInfo", value: function(e2) { - e2 = { nameCard: e2.nameCard, joinTime: e2.joinTime, role: e2.role, messageRemindType: e2.messageRemindType, readedSequence: e2.readedSequence, excludedUnreadSequenceList: e2.excludedUnreadSequenceList }; - _t(this.selfInfo, y({}, e2), [], ["", null, void 0, 0, NaN]); - } }, { key: "setSelfNameCard", value: function(e2) { - this.selfInfo.nameCard = e2; - } }]), ta), ii = (e(ea, [{ key: "toAccount", get: function() { - return this.conversationID.startsWith(A.CONV_C2C) ? this.conversationID.replace(A.CONV_C2C, "") : this.conversationID.startsWith(A.CONV_GROUP) ? this.conversationID.replace(A.CONV_GROUP, "") : ""; - } }, { key: "_initProfile", value: function(t2) { - var n2 = this; - Object.keys(t2).forEach(function(e2) { - switch (e2) { - case "userProfile": - n2.userProfile = t2.userProfile; - break; - case "groupProfile": - n2.groupProfile = t2.groupProfile; - } - }), N(this.userProfile) && this.type === A.CONV_C2C ? this.userProfile = new ei({ userID: t2.conversationID.replace("C2C", "") }) : N(this.groupProfile) && this.type === A.CONV_GROUP && (this.groupProfile = new oi({ groupID: t2.conversationID.replace("GROUP", "") })); - } }, { key: "updateUnreadCount", value: function(e2) { - var t2 = e2.nextUnreadCount, n2 = e2.isFromGetConversations, e2 = e2.isUnreadC2CMessage; - N(t2) || (Ot(this.subType) ? this.unreadCount = 0 : n2 && this.type === A.CONV_GROUP || n2 && this.type === A.CONV_TOPIC || e2 && this.type === A.CONV_C2C ? this.unreadCount = t2 : this.unreadCount = this.unreadCount + t2); - } }, { key: "updateLastMessage", value: function(e2) { - this.lastMessage = Ko(e2); - } }, { key: "updateGroupAtInfoList", value: function(e2) { - var t2; - this._isNeedMergeGroupAtInfo(e2) || (-1 !== (t2 = (W(t2 = e2.groupAtType) || j(t2) || J(t2) || X()).slice(0)).indexOf(A.CONV_AT_ME) && -1 !== t2.indexOf(A.CONV_AT_ALL) && (t2 = [A.CONV_AT_ALL_AT_ME]), t2 = { from: e2.from, groupID: e2.groupID, topicID: e2.topicID, messageSequence: e2.sequence, atTypeArray: t2, __random: e2.__random, __sequence: e2.__sequence }, this.groupAtInfoList.push(t2)); - } }, { key: "_isNeedMergeGroupAtInfo", value: function(t2) { - var n2, e2 = t2.groupID, o2 = t2.sequence; - return !!Nt({ groupID: e2 }) && (n2 = false, this.groupAtInfoList.forEach(function(e3) { - e3.messageSequence === o2 && (-1 < e3.atTypeArray.indexOf(A.CONV_AT_ME) && -1 < t2.groupAtType.indexOf(A.CONV_AT_ALL) && (e3.atTypeArray = [A.CONV_AT_ALL_AT_ME]), -1 < e3.atTypeArray.indexOf(A.CONV_AT_ALL) && -1 < t2.groupAtType.indexOf(A.CONV_AT_ME) && (e3.atTypeArray = [A.CONV_AT_ALL_AT_ME], e3.__random = t2.__random, e3.__sequence = t2.__sequence), n2 = true); - }), n2); - } }, { key: "clearGroupAtInfoList", value: function() { - this.groupAtInfoList.length = 0; - } }, { key: "reduceUnreadCount", value: function() { - return 1 <= this.unreadCount && (--this.unreadCount, true); - } }, { key: "isLastMessageRevoked", value: function(e2) { - var t2 = e2.sequence, e2 = e2.time; - return this.type === A.CONV_C2C && t2 === this.lastMessage.lastSequence && e2 === this.lastMessage.lastTime || this.type === A.CONV_GROUP && t2 === this.lastMessage.lastSequence; - } }, { key: "setLastMessageRevoked", value: function(e2) { - this.lastMessage.isRevoked = e2; - } }, { key: "setLastMessageRevoker", value: function(e2) { - this.lastMessage.revoker = e2; - } }, { key: "setDraftText", value: function(e2) { - this.draftText = e2; - } }]), ea), ai = (F(r = {}, A.MSG_REMIND_ACPT_AND_NOTE, 0), F(r, A.MSG_REMIND_DISCARD, 1), F(r, A.MSG_REMIND_ACPT_NOT_NOTE, 2), r), si = (e($i, [{ key: "onAllRcvMsgOptNotify", value: function(e2) { - e2 = this._handleResult(e2); - this._convM.emitOEvt(h.ALL_RECEIVE_MESSAGE_OPT_UPDATED, e2); - } }, { key: "getC2CMsgRemindType", value: function(t2) { - var n2 = this, o2 = "".concat(this._n, ".getC2CMsgRemindType"); - return this._convM.req({ P: k.GET_C2C_PEER_MUTE_NOTIFICATIONS, data: { toAccount: this._convM.getMyUserID(), userIDList: t2 } }).then(function(e2) { - M.l("".concat(o2, " ok. userIDList:").concat(t2)); - e2 = e2.data.muteFlagList; - n2._convM.onC2CMsgRemindTypeFetched(e2); - }).catch(function(e2) { - M.e("".concat(o2, " failed. error:"), e2); - }); - } }, { key: "set", value: function(e2) { - return e2.groupID ? this._setGroupMsgRemindType(e2) : O(e2.userIDList) ? this._setC2CMsgRemindType(e2) : void 0; - } }, { key: "_setGroupMsgRemindType", value: function(t2) { - var n2 = this, o2 = "".concat(this._n, ".").concat("_setGroupMsgRemindType"), e2 = t2.groupID, i2 = t2.messageRemindType, a2 = "groupID:".concat(e2, " messageRemindType:").concat(i2), s2 = new G("_setGroupMsgRemindType"), r2 = (s2.setMessage(a2), this._get(7)); - return r2 ? r2.modifyGroupMemberInfo({ groupID: e2, messageRemindType: i2, userID: this._convM.getMyUserID() }).then(function() { - s2.end(), M.l("".concat(o2, " ok. ").concat(a2)); - var e3 = n2.onGroupMsgRemindTypeUpdated(t2); - return n2._convM.onTotalUnreadCountUpdate(), C(e3); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - }) : D({ code: L.NO_MODULE }); - } }, { key: "onGroupMsgRemindTypeUpdated", value: function(e2) { - var t2, n2, o2 = e2.groupID, e2 = e2.messageRemindType, i2 = (M.l("".concat(this._n, ".onGroupMsgRemindTypeUpdated groupID:").concat(o2, " messageRemindType:").concat(e2)), this._get(7).getLocalGroupProfile(o2)); - return i2 && (i2.selfInfo.messageRemindType = e2), Gt(o2) ? (t2 = Jt(n2 = o2), (n2 = this._get(10).getLocalTopic(t2, n2)) && n2.updateSelfInfo({ messageRemindType: e2 }) && this._convM.emitOEvt(h.TOPIC_UPDATED, { groupID: t2, topic: n2 }), { topic: n2 }) : (this._convM.patchMsgRemindType({ ID: o2, isC2CConversation: false, messageRemindType: e2 }) && this._emitConvUpdate(), { group: i2 }); - } }, { key: "_setC2CMsgRemindType", value: function(e2) { - var i2 = this, a2 = "".concat(this._n, ".").concat("_setC2CMsgRemindType"), t2 = e2.userIDList, s2 = e2.messageRemindType, r2 = t2.slice(0, 30), e2 = ai[s2] || 0, c2 = "userIDList:".concat(r2, " messageRemindType:").concat(s2), u2 = new G("_setC2CMsgRemindType"); - return u2.setMessage(c2), this._convM.req({ P: k.SET_C2C_PEER_MUTE_NOTIFICATIONS, data: { userIDList: r2, muteFlag: e2 } }).then(function(e3) { - u2.end(); - var e3 = e3.data.errorList, t3 = [], n2 = [], e3 = (O(e3) && e3.forEach(function(e4) { - t3.push(e4.userID), n2.push({ userID: e4.userID, code: e4.errorCode }); - }), r2.filter(function(e4) { - return -1 === t3.indexOf(e4); - })), o2 = (M.l("".concat(a2, " ok. ").concat(c2, " successUserIDList:").concat(e3, " failureUserIDList:").concat(JSON.stringify(n2))), 0); - return e3.forEach(function(e4) { - i2._convM.patchMsgRemindType({ ID: e4, isC2CConversation: true, messageRemindType: s2 }) && (o2 += 1); - }), 1 <= o2 && i2._emitConvUpdate(), r2.length = t3.length = 0, i2._convM.onTotalUnreadCountUpdate(), T({ successUserIDList: e3.map(function(e4) { - return { userID: e4 }; - }), failureUserIDList: n2 }); - }).catch(function(e3) { - return u2.setError(e3).end(), M.e("".concat(a2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_get", value: function(e2) { - return this._convM.get(e2); - } }, { key: "_emitConvUpdate", value: function() { - this._convM.emitConvUpdate(true, false); - } }, { key: "setAllRcvMsgOpt", value: function(e2) { - var t2 = "".concat(this._n, ".").concat("setAllRcvMsgOpt"), n2 = e2.messageRemindType, n2 = void 0 === n2 ? A.MSG_REMIND_ACPT_NOT_NOTE : n2, o2 = e2.isRepeated, o2 = void 0 === o2 || o2, i2 = this._calcStartAndEndTime(e2), a2 = i2.startTime, a2 = void 0 === a2 ? 0 : a2, i2 = i2.endTime, i2 = void 0 === i2 ? 0 : i2, e2 = JSON.stringify(e2), s2 = new G("setAllRcvMsgOpt"); - return s2.setMessage(e2), M.l("".concat(t2, " options:").concat(e2)), this._convM.req({ P: k.SET_ALL_RECEIVE_MSG_OPT, data: { messageRemindType: ai[n2], startTime: a2, endTime: i2, isRepeated: o2 ? 1 : 0 } }).then(function(e3) { - return s2.end(), M.l("".concat(t2, " ok.")), C(e3); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_calcStartAndEndTime", value: function(e2) { - var t2 = e2.startHour, t2 = void 0 === t2 ? 0 : t2, n2 = e2.startMinute, n2 = void 0 === n2 ? 0 : n2, o2 = e2.startSecond, o2 = void 0 === o2 ? 0 : o2, i2 = e2.duration, i2 = void 0 === i2 ? 0 : i2, e2 = e2.isRepeated, e2 = void 0 === e2 || e2, a2 = /* @__PURE__ */ new Date(), s2 = a2.getFullYear(), r2 = a2.getMonth(), a2 = a2.getDate(), s2 = Math.round(new Date(s2, r2, a2, t2, n2, o2).getTime() / 1e3); - return { startTime: s2, endTime: e2 && 86400 <= i2 ? s2 + 86400 : s2 + i2 }; - } }, { key: "getAllRcvMsgOpt", value: function() { - var t2 = this, n2 = "".concat(this._n, ".").concat("getAllRcvMsgOpt"), o2 = new G("getAllRcvMsgOpt"); - return this._convM.req({ P: k.GET_ALL_RECEIVE_MSG_OPT, data: { toAccount: this._convM.getMyUserID() } }).then(function(e2) { - e2 = e2.data, o2.setMessage(JSON.stringify(e2)).end(), M.l("".concat(n2, " ok. data:").concat(JSON.stringify(e2))), e2 = t2._handleResult(e2); - return C(e2); - }).catch(function(e2) { - return o2.setError(e2).end(), M.e("".concat(n2, " failed. error:"), e2), D(e2); - }); - } }, { key: "_handleResult", value: function(e2) { - var t2 = e2.messageRemindType, n2 = e2.startTime, o2 = e2.endTime, e2 = e2.isRepeated, i2 = A.MSG_REMIND_ACPT_AND_NOTE; - return 1 === t2 && (i2 = A.MSG_REMIND_DISCARD), { messageRemindType: i2 = 2 === t2 ? A.MSG_REMIND_ACPT_NOT_NOTE : i2, startTime: n2, endTime: o2, isRepeated: 1 === e2 }; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")); - } }]), $i), ri = (e(Qi, [{ key: "setConvCustomData", value: function(e2) { - var i2 = this, a2 = "".concat(this._n, ".").concat("setConvCustomData"), t2 = e2.conversationIDList, s2 = e2.customData, r2 = (M.l("".concat(a2, " options:"), e2), new G("setConvCustomData")), n2 = (r2.setMessage(JSON.stringify(e2)), { fromAccount: this._getMyUserID(), itemList: [] }), c2 = [], u2 = []; - return t2.forEach(function(e3) { - var t3; - return i2._hasLocalConv(e3) ? Pt(e3) || Ut(e3) ? (t3 = { operationType: 2, contactItem: void 0, customMark: s2 }, Pt(e3) ? t3.contactItem = { type: 1, toAccount: e3.replace(A.CONV_C2C, "") } : Ut(e3) && (t3.contactItem = { type: 2, groupID: e3.replace(A.CONV_GROUP, "") }), void n2.itemList.push(t3)) : (i2._onConvIDInvalid(u2, e3), true) : (i2._onConvNotFound(u2, e3), true); - }), u2.length === t2.length ? T({ successConversationIDList: c2, failureConversationIDList: u2 }) : this._convM.req({ P: k.SET_CONV_CUSTOM_DATA, data: n2 }).then(function(e3) { - r2.end(), M.l("".concat(a2, " ok")); - var t3, n3, o2, e3 = e3.data.resultItem; - return O(e3) && (o2 = false, e3.forEach(function(e4) { - t3 = i2._concatConvID(e4.contactItem), 0 === e4.resultCode ? (c2.push(t3), (n3 = i2._getLocalConv(t3)) && n3.customData !== s2 && (n3.customData = s2, o2 = true)) : u2.push({ conversationID: t3, code: e4.resultCode, message: e4.resultInfo }); - }), true === o2) && i2._emitConvUpdate(), C({ successConversationIDList: c2, failureConversationIDList: u2 }); - }).catch(function(e3) { - return r2.setError(e3).end(), M.e("".concat(a2, " failed. error:"), e3), D(e3); - }); - } }, { key: "markConv", value: function(e2) { - var t2, n2, a2, s2, r2, o2, i2, c2, u2, l2, d2 = this; - return this._convM.canIUse(_.CONV_MARK) ? (t2 = "".concat(this._n, ".").concat("markConv"), n2 = e2.conversationIDList, a2 = e2.markType, s2 = e2.enableMark, M.l("".concat(t2, " options:"), e2), r2 = new G("markConv"), o2 = void r2.setMessage(JSON.stringify(e2)), i2 = void 0, e2 = this._getFlagBit(a2), true === s2 ? i2 = [e2] : o2 = [e2], c2 = { fromAccount: this._getMyUserID(), itemList: [] }, u2 = [], l2 = [], n2.forEach(function(e3) { - var t3; - return d2._hasLocalConv(e3) ? Pt(e3) || Ut(e3) ? (t3 = { operationType: 1, contactItem: void 0, clearMark: o2, setMark: i2 }, Pt(e3) ? t3.contactItem = { type: 1, toAccount: e3.replace(A.CONV_C2C, "") } : Ut(e3) && (t3.contactItem = { type: 2, groupID: e3.replace(A.CONV_GROUP, "") }), void c2.itemList.push(t3)) : (d2._onConvIDInvalid(l2, e3), true) : (d2._onConvNotFound(l2, e3), true); - }), l2.length === n2.length ? T({ successConversationIDList: u2, failureConversationIDList: l2 }) : this._convM.req({ P: k.MARK_CONV, data: c2 }).then(function(e3) { - r2.end(), M.l("".concat(t2, " ok")); - var n3, o3, i3, e3 = e3.data.resultItem; - return O(e3) && (i3 = false, e3.forEach(function(e4) { - var t3; - n3 = d2._concatConvID(e4.contactItem), 0 === e4.resultCode ? (u2.push(n3), (o3 = d2._getLocalConv(n3)) && (t3 = o3.markList.indexOf(a2), true === s2 ? -1 === t3 && (o3.markList.push(a2), i3 = true) : -1 !== t3 && (o3.markList.splice(t3, 1), i3 = true))) : l2.push({ conversationID: n3, code: e4.resultCode, message: e4.resultInfo }); - }), true === i3) && d2._emitConvUpdate(), C({ successConversationIDList: u2, failureConversationIDList: l2 }); - }).catch(function(e3) { - return r2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._convM.noUse("markConv"); - } }, { key: "getLocalConvGroupList", value: function() { - var e2 = this; - return M.l("".concat(this._n, ".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === Un ? this.getRemoteConvGroupList().then(function() { - return C(p(e2._convGroupMap.values())); - }) : T(p(this._convGroupMap.values())); - } }, { key: "searchConvGroupAndMark", value: function(e2, t2) { - var n2 = this, o2 = "".concat(this._n, ".searchConvGroupAndMark"), i2 = []; - return e2.forEach(function(e3) { - 1 === t2 ? i2.push({ type: 1, toAccount: e3 }) : 2 === t2 && i2.push({ type: 2, groupID: e3 }); - }), M.l("".concat(o2, " type:").concat(t2, " list:"), e2), this._convM.req({ P: k.SEARCH_CONV_GRP_MARK, data: { fromAccount: this._getMyUserID(), contactItem: i2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.contactItem, e3 = e3.groupItem; - M.l("".concat(o2, " ok. contactItem:"), t3, "groupItem:", e3), n2._fillConvGroupMap(e3), n2._handleContactItem(t3), n2._emitConvUpdate(); - }).catch(function(e3) { - M.w("".concat(o2, " failed. error:"), e3); - }); - } }, { key: "_fillConvGroupMap", value: function(e2) { - var n2 = this; - O(e2) && e2.forEach(function(e3) { - var t2 = e3.convGroupID, e3 = e3.groupName; - n2._convGroupMap.set(t2, e3); - }); - } }, { key: "_handleContactItem", value: function(e2) { - var a2, s2 = this; - O(e2) && e2.forEach(function(e3) { - var t2 = [], n2 = e3.standardMark, o2 = e3.customData, i2 = e3.convGroupIDList; - O(i2) && i2.forEach(function(e4) { - s2._convGroupMap.has(e4) && t2.push(s2._convGroupMap.get(e4)); - }), a2 = s2._concatConvID(e3), (a2 = s2._getLocalConv(a2)) && (a2.markList = Zt(n2), a2.customData = o2 || "", a2.conversationGroupList = [].concat(t2)); - }); - } }, { key: "getRemoteConvGroupList", value: function() { - var i2 = this, a2 = "".concat(this._n, ".getRemoteConvGroupList"); - return this._pagingStatus = Gn, this._convM.req({ P: k.GET_CONV_GRP_LIST, data: { fromAccount: this._getMyUserID(), startIndex: this._startIndex } }).then(function(e2) { - var e2 = e2.data, t2 = e2.completeFlag, n2 = e2.contactItem, o2 = e2.nextStartIndex, o2 = void 0 === o2 ? 0 : o2, e2 = e2.groupItem; - if (i2._startIndex = o2, M.l("".concat(a2, " completeFlag:").concat(t2, " nextStartIndex:").concat(o2, ", groupItem:"), e2, "contactItem:", n2), i2._fillConvGroupMap(e2), i2._handleContactItem(n2), 0 === t2) - return i2.getRemoteConvGroupList(); - 1 === t2 && (i2._pagingStatus = Pn, i2._emitConvUpdate(), i2._emitConvGroupListUpdate()); - }).catch(function(e2) { - i2._pagingStatus = Un, M.w("".concat(a2, " failed. error:"), e2); - }); - } }, { key: "createConvGroup", value: function(e2) { - var a2, s2, r2, t2, c2, u2, l2 = this; - return this._convM.canIUse(_.CONV_GROUP) ? (a2 = "".concat(this._n, ".").concat("createConvGroup"), M.l("".concat(a2, " options:"), e2), (s2 = new G("createConvGroup")).setMessage(JSON.stringify(e2)), r2 = e2.groupName, e2 = e2.conversationIDList, t2 = { fromAccount: this._getMyUserID(), itemList: [{ groupName: r2, contactItem: [] }] }, c2 = [], u2 = [], e2.forEach(function(e3) { - return l2._hasLocalConv(e3) ? Pt(e3) || Ut(e3) ? void (Pt(e3) ? t2.itemList[0].contactItem.push({ type: 1, toAccount: e3.replace(A.CONV_C2C, "") }) : Ut(e3) && t2.itemList[0].contactItem.push({ type: 2, groupID: e3.replace(A.CONV_GROUP, "") })) : (l2._onConvIDInvalid(u2, e3), true) : (l2._onConvNotFound(u2, e3), true); - }), u2.length === e2.length ? T({ successConversationIDList: c2, failureConversationIDList: u2 }) : this._convM.req({ P: k.CREATE_CONV_GRP, data: t2 }).then(function(e3) { - s2.end(), M.l("".concat(a2, " ok")); - var t3, n2, o2, e3 = e3.data.groupResultItem[0], i2 = e3.groupItem, e3 = e3.resultItem; - return f(i2) && (l2._convGroupMap.set(i2.convGroupID, i2.groupName), l2._emitConvGroupListUpdate()), O(e3) && (o2 = false, e3.forEach(function(e4) { - t3 = l2._concatConvID(e4.contactItem), 0 === e4.resultCode ? (c2.push(t3), (n2 = l2._getLocalConv(t3)) && -1 === n2.conversationGroupList.indexOf(r2) && (n2.conversationGroupList.push(r2), o2 = true)) : u2.push({ conversationID: t3, code: e4.resultCode, message: e4.resultInfo }); - }), true === o2) && (l2._emitConvUpdate(), l2._emitConvGroupListUpdate()), C({ successConversationIDList: c2, failureConversationIDList: u2 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(a2, " failed. error:"), e3), D(e3); - })) : this._convM.noUse("createConvGroup"); - } }, { key: "deleteConvGroup", value: function(n2) { - var o2, i2, a2 = this; - return this._convM.canIUse(_.CONV_GROUP) ? (o2 = "".concat(this._n, ".").concat("deleteConvGroup"), M.l("".concat(o2, " groupName:").concat(n2)), (i2 = new G("deleteConvGroup")).setMessage(n2), this._convM.req({ P: k.DEL_CONV_GRP, data: { fromAccount: this._getMyUserID(), groupName: [n2] } }).then(function(e2) { - i2.end(), M.l("".concat(o2, " ok")); - var t2, e2 = e2.data.groupItem; - O(e2) && (t2 = false, e2.forEach(function(e3) { - a2._convGroupMap.has(e3.convGroupID) && (a2._convGroupMap.delete(e3.convGroupID), t2 = true); - }), true === t2) && a2._emitConvGroupListUpdate(), a2._eraseFromConversationGroupList([n2]); - }).catch(function(e2) { - return i2.setError(e2).end(), M.e("".concat(o2, " failed. error:"), e2), D(e2); - })) : this._convM.noUse("deleteConvGroup"); - } }, { key: "renameConvGroup", value: function(e2) { - var i2, a2, s2, r2, c2 = this; - return this._convM.canIUse(_.CONV_GROUP) ? (i2 = "".concat(this._n, ".").concat("renameConvGroup"), M.l("".concat(i2, " options:"), e2), (a2 = new G("renameConvGroup")).setMessage(JSON.stringify(e2)), s2 = e2.oldName, r2 = e2.newName, this._convM.req({ P: k.RENAME_CONV_GRP, data: { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 1, oldName: s2, newName: r2 } } }).then(function(e3) { - a2.end(), M.l("".concat(i2, " ok")); - e3 = e3.data.updateGroupResult.convGroupID; - c2._convGroupMap.set(e3, r2), c2._emitConvGroupListUpdate(); - var t2, n2, e3 = c2._convM.getLocalConvList(), o2 = false; - e3.forEach(function(e4) { - t2 = e4.conversationGroupList, -1 !== (n2 = t2.indexOf(s2)) && (t2.splice(n2, 1, r2), o2 = true); - }), true === o2 && c2._emitConvUpdate(); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })) : this._convM.noUse("renameConvGroup"); - } }, { key: "addConvsToGroup", value: function(e2) { - var i2, a2, t2, s2, n2, r2, c2, u2 = this; - return this._convM.canIUse(_.CONV_GROUP) ? (i2 = "".concat(this._n, ".").concat("addConvsToGroup"), M.l("".concat(i2, " options:"), e2), (a2 = new G("addConvsToGroup")).setMessage(JSON.stringify(e2)), t2 = e2.conversationIDList, s2 = e2.groupName, n2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: s2, updateItem: [] } }, r2 = [], c2 = [], t2.forEach(function(e3) { - return u2._hasLocalConv(e3) ? Pt(e3) || Ut(e3) ? void (Pt(e3) ? n2.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 1, toAccount: e3.replace(A.CONV_C2C, "") } }) : Ut(e3) && n2.updateGroup.updateItem.push({ operationType: 1, contactItem: { type: 2, groupID: e3.replace(A.CONV_GROUP, "") } })) : (u2._onConvIDInvalid(c2, e3), true) : (u2._onConvNotFound(c2, e3), true); - }), c2.length === t2.length ? T({ successConversationIDList: r2, failureConversationIDList: c2 }) : this._convM.req({ P: k.ADD_CONV_TO_GRP, data: n2 }).then(function(e3) { - a2.end(), M.l("".concat(i2, " ok")); - var t3, n3, o2, e3 = e3.data.updateGroupResult.contactResultItem; - return O(e3) && (o2 = false, e3.forEach(function(e4) { - t3 = u2._concatConvID(e4.contactItem), 0 === e4.resultCode ? (n3 = u2._getLocalConv(t3)) && -1 === n3.conversationGroupList.indexOf(s2) && (n3.conversationGroupList.push(s2), r2.push(t3), o2 = true) : c2.push({ conversationID: t3, code: e4.resultCode, message: e4.resultInfo }); - }), true === o2) && (u2._emitConvUpdate(), u2._emitConvInGroupUpdate(s2)), C({ successConversationIDList: r2, failureConversationIDList: c2 }); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })) : this._convM.noUse("addConvsToGroup"); - } }, { key: "deleteConvsFromGroup", value: function(e2) { - var t2, a2, n2, s2, o2, r2, c2, u2 = this, i2 = "deleteConvsFromGroup"; - return this._convM.canIUse(_.CONV_GROUP) ? (t2 = "".concat(this._n, ".").concat(i2), M.l("".concat(t2, " options:"), e2), (a2 = new G(i2)).setMessage(JSON.stringify(e2)), n2 = e2.conversationIDList, s2 = e2.groupName, o2 = { fromAccount: this._getMyUserID(), updateType: 1, updateGroup: { updateGroupType: 2, groupName: s2, updateItem: [] } }, r2 = [], c2 = [], n2.forEach(function(e3) { - return u2._hasLocalConv(e3) ? Pt(e3) || Ut(e3) ? void (Pt(e3) ? o2.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 1, toAccount: e3.replace(A.CONV_C2C, "") } }) : Ut(e3) && o2.updateGroup.updateItem.push({ operationType: 2, contactItem: { type: 2, groupID: e3.replace(A.CONV_GROUP, "") } })) : (u2._onConvIDInvalid(c2, e3), true) : (u2._onConvNotFound(c2, e3), true); - }), c2.length === n2.length ? T({ successConversationIDList: r2, failureConversationIDList: c2 }) : this._convM.req({ P: k.DEL_CONV_FROM_GRP, data: o2 }).then(function(e3) { - a2.end(), M.l("".concat(t2, " ok")); - var n3, o3, i3, e3 = e3.data.updateGroupResult.contactResultItem; - return O(e3) && (i3 = false, e3.forEach(function(e4) { - var t3; - n3 = u2._concatConvID(e4.contactItem), 0 === e4.resultCode ? (o3 = u2._getLocalConv(n3)) && -1 !== (t3 = o3.conversationGroupList.indexOf(s2)) && (o3.conversationGroupList.splice(t3, 1), r2.push(n3), i3 = true) : c2.push({ conversationID: n3, code: e4.resultCode, message: e4.resultInfo }); - }), true === i3) && (u2._emitConvUpdate(), u2._emitConvInGroupUpdate(s2)), C({ successConversationIDList: r2, failureConversationIDList: c2 }); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._convM.noUse(i2); - } }, { key: "onConvMarkUpdated", value: function(e2) { - var i2, a2, s2 = this; - S(e2) || (M.l("".concat(this._n, ".onConvMarkUpdated markItemList:"), e2), a2 = false, e2.forEach(function(e3) { - var t2 = e3.recentContactItem, n2 = e3.optType, o2 = e3.standardMark, e3 = e3.customMark; - i2 = s2._concatConvID(t2), (i2 = s2._getLocalConv(i2)) && (1 === n2 ? a2 = s2._diffStandardMark(i2, o2) : 2 === n2 ? a2 = s2._diffCustomMark(i2, e3) : 3 === n2 && (t2 = s2._diffStandardMark(i2, o2), n2 = s2._diffCustomMark(i2, e3), a2 = t2 || n2)); - }), true === a2 && this._emitConvUpdate()); - } }, { key: "_diffStandardMark", value: function(e2, t2) { - var t2 = Zt(t2), n2 = false; - return true !== function(e3, t3) { - if (e3 !== t3) { - if (!e3 || !t3) - return false; - if (e3.length !== t3.length) - return false; - for (var n3 = 0, o2 = e3.length; n3 < o2; n3++) - if (e3[n3] !== t3[n3]) - return false; - } - return true; - }(e2.markList, t2) && (e2.markList = t2, n2 = true), n2; - } }, { key: "_diffCustomMark", value: function(e2, t2) { - var n2 = false; - return e2.customData !== t2 && void 0 !== t2 && (e2.customData = t2, n2 = true), n2; - } }, { key: "onConvGroupCreated", value: function(e2) { - var a2 = this, s2 = (M.l("".concat(this._n, ".onConvGroupCreated resultList:"), e2), false), r2 = false; - O(e2) && (e2.forEach(function(e3) { - var t2 = e3.msgGroupItem, n2 = t2.groupID, o2 = t2.groupName; - a2._convGroupMap.get(n2) !== o2 && (a2._convGroupMap.set(n2, o2), r2 = true); - var i2, t2 = e3.msgRecentContactItem; - O(t2) && t2.forEach(function(e4) { - i2 = a2._concatConvID(e4), (i2 = a2._getLocalConv(i2)) && -1 === i2.conversationGroupList.indexOf(o2) && (i2.conversationGroupList.push(o2), s2 = true); - }); - }), true === s2 && this._emitConvUpdate(), true === r2) && this._emitConvGroupListUpdate(); - } }, { key: "onConvGroupDeleted", value: function(e2) { - var n2, o2 = this, i2 = (M.l("".concat(this._n, ".onConvGroupDeleted groupItemList:"), e2), []); - O(e2) && (n2 = false, e2.forEach(function(e3) { - var t2 = e3.groupID, e3 = e3.groupName; - o2._convGroupMap.has(t2) && (o2._convGroupMap.delete(t2), n2 = true, i2.push(e3)); - }), true === n2) && this._emitConvGroupListUpdate(), this._eraseFromConversationGroupList(i2); - } }, { key: "_eraseFromConversationGroupList", value: function(t2) { - S(t2) || (this._convM.getLocalConvList().forEach(function(e2) { - e2.conversationGroupList = e2.conversationGroupList.filter(function(e3) { - return !t2.includes(e3); - }); - }), this._emitConvUpdate()); - } }, { key: "onConvGroupNameUpdated", value: function(e2) { - M.l("".concat(this._n, ".onConvGroupNameUpdated options:"), e2); - var t2, n2, o2, i2 = e2.groupID, a2 = e2.groupName, s2 = e2.oldGroupName; - this._convGroupMap.get(i2) !== a2 && (this._convGroupMap.set(i2, a2), this._emitConvGroupListUpdate(), e2 = this._convM.getLocalConvList(), o2 = false, e2.forEach(function(e3) { - t2 = e3.conversationGroupList, -1 !== (n2 = t2.indexOf(s2)) && (t2.splice(n2, 1, a2), o2 = true); - }), true === o2) && this._emitConvUpdate(); - } }, { key: "onConvInGroupUpdated", value: function(e2) { - var n2, o2, i2, a2 = this, s2 = (M.l("".concat(this._n, ".onConvInGroupUpdated options:"), e2), e2.oldGroupName), e2 = e2.recentContactUpdateGroupItem; - O(e2) && (i2 = false, e2.forEach(function(e3) { - var t2 = e3.contactOptType, e3 = e3.recentContactItem; - n2 = a2._concatConvID(e3), (n2 = a2._getLocalConv(n2)) && (o2 = n2.conversationGroupList.indexOf(s2), 1 === t2 ? -1 === o2 && (n2.conversationGroupList.push(s2), i2 = true) : 2 === t2 && -1 !== o2 && (n2.conversationGroupList.splice(o2, 1), i2 = true)); - }), true === i2) && (this._emitConvUpdate(), this._emitConvInGroupUpdate(s2)); - } }, { key: "onConvAddedToOrDeletedFromGroup", value: function(e2) { - var n2, o2, i2 = this, t2 = (M.l("".concat(this._n, ".onConvAddedToOrDeletedFromGroup options:"), e2), e2.msgRecentContactItem), e2 = e2.msgRecentContactUpdateContactItem, t2 = this._concatConvID(t2), a2 = this._getLocalConv(t2); - a2 && O(e2) && (o2 = false, e2.forEach(function(e3) { - var t3 = e3.groupOptType, e3 = e3.recentContactGroupItem.groupName; - n2 = a2.conversationGroupList.indexOf(e3), 1 === t3 ? -1 === n2 && (a2.conversationGroupList.push(e3), o2 = true) : 2 === t3 && -1 !== n2 && (a2.conversationGroupList.splice(n2, 1), o2 = true), true === o2 && i2._emitConvInGroupUpdate(e3); - }), true === o2) && this._emitConvUpdate(); - } }, { key: "onConvGroupListSynced", value: function(e2) { - O(e2) && 0 !== e2.length && (M.l("".concat(this._n, ".onConvGroupListSynced groupItem:"), e2), this._fillConvGroupMap(e2)); - } }, { key: "getConvGroupListByID", value: function(e2) { - var t2, n2 = this; - if (!S(e2)) - return t2 = [], e2.forEach(function(e3) { - n2._convGroupMap.has(e3) && t2.push(n2._convGroupMap.get(e3)); - }), t2; - } }, { key: "_onConvNotFound", value: function(e2, t2) { - e2.push({ conversationID: t2, code: L.CONV_NOT_FOUND, message: this._convM.getErrMsg(L.CONV_NOT_FOUND) }); - } }, { key: "_onConvIDInvalid", value: function(e2, t2) { - e2.push({ conversationID: t2, code: L.INVALID_CONV_ID, message: this._convM.getErrMsg(L.INVALID_CONV_ID) }); - } }, { key: "_getFlagBit", value: function(e2) { - for (var t2 = e2.toString(2), n2 = t2.length, o2 = n2 - 1; 0 <= o2; o2--) - if ("1" === t2[o2]) - return n2 - o2 - 1; - } }, { key: "_concatConvID", value: function(e2) { - var t2, n2 = e2.type, o2 = e2.to, i2 = e2.groupID, e2 = e2.userID; - return 1 === n2 ? N(e2) ? N(o2) || (t2 = "".concat(A.CONV_C2C).concat(o2)) : t2 = "".concat(A.CONV_C2C).concat(e2) : 2 === n2 && (t2 = "".concat(A.CONV_GROUP).concat(i2)), t2; - } }, { key: "_getMyUserID", value: function() { - return this._convM.getMyUserID(); - } }, { key: "_getLocalConv", value: function(e2) { - return this._convM.getLocalConversation(e2); - } }, { key: "_hasLocalConv", value: function(e2) { - return this._convM.hasLocalConversation(e2); - } }, { key: "_emitConvUpdate", value: function() { - this._convM.emitConvUpdate(true, false); - } }, { key: "_emitConvGroupListUpdate", value: function() { - this._convM.emitOEvt(h.CONVERSATION_GROUP_LIST_UPDATED, p(this._convGroupMap.values())); - } }, { key: "_emitConvInGroupUpdate", value: function(t2) { - var e2 = { groupName: t2, conversationList: [] }, n2 = this._convM.getLocalConvList(); - e2.conversationList = n2.filter(function(e3) { - return e3.conversationGroupList.includes(t2); - }), this._convM.emitOEvt(h.CONVERSATION_IN_GROUP_UPDATED, e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._convGroupMap.clear(), this._startIndex = 0, this._pagingStatus = Nn; - } }]), Qi), ci = (t(Zi, u), Zo = n(Zi), e(Zi, [{ key: "_initListeners", value: function() { - var e2 = this.getIEmitInst(); - e2.on(P.A2KEY_AND_TINYID_UPDATED, this._init, this), e2.on(P.PROFILE_UPDATED, this._onProfileUpdated, this), e2.on(P.CLOUD_CONFIG, this._onCloudConfig, this); - } }, { key: "_init", value: function() { - var e2 = this, t2 = (M.l("".concat(this._n, "._init")), this.get(13).getItem("conversationMap")), n2 = this.isIntl(), o2 = this.isUsingChatCore(); - if (t2) { - for (var i2 = t2.length, a2 = 0; a2 < i2; a2++) { - var s2 = t2[a2]; - if (s2) { - if (this._isNonExistentAccount(s2.conversationID)) - continue; - if (s2.groupProfile && Ot(s2.groupProfile.type)) - continue; - } - this._convMap.set(s2.conversationID, new ii(t2[a2], n2, o2)); - } - this.emitConvUpdate(true, false); - } - this.ready(function() { - 0 < e2._tmpGroupList.length && (e2.updateConvGroupProfile(e2._tmpGroupList), e2._tmpGroupList.length = 0); - }), this.syncConvList(); - } }, { key: "_isNonExistentAccount", value: function(e2) { - var t2; - return "@TLS#ERROR" === (t2 = e2.startsWith(A.CONV_C2C) ? e2.replace(A.CONV_C2C, "") : t2) || "@TLS#NOT_FOUND" === t2; - } }, { key: "onCheckTimer", value: function(e2) { - this.isLoggedIn() && this._msgListHandler.onCheckTimer(e2); - } }, { key: "onMessageSent", value: function(e2) { - this._onSendOrRcvMsg({ conversationOptionsList: e2.conversationOptionsList, isInstantMessage: true }); - } }, { key: "onNewMessage", value: function(e2) { - this._onSendOrRcvMsg(e2); - } }, { key: "_onSendOrRcvMsg", value: function(e2) { - var t2 = this, n2 = e2.conversationOptionsList, o2 = e2.isInstantMessage, o2 = void 0 === o2 || o2, i2 = e2.isUnreadC2CMessage, i2 = void 0 !== i2 && i2, a2 = e2.updateUnreadCount, a2 = void 0 === a2 || a2, s2 = e2.isSyncingEnded, s2 = void 0 !== s2 && s2; - this._isReady ? 0 !== n2.length ? (true === o2 && this._checkNewConv(n2), this._updateLocalConvList({ conversationOptionsList: n2, isInstantMessage: o2, isUnreadC2CMessage: i2, isFromGetConversations: false, updateUnreadCount: a2 }), o2 || (this._convIDFromUnreadDBMap = new Map([].concat(p(this._convIDFromUnreadDBMap), p(n2.map(function(e3) { - return [e3.conversationID, 1]; - })))), this._diffAndDeleteConv(), s2 && this.emitIEvt(P.C2C_UNREAD_HANDLE_COMPLETED)), 0 < n2.filter(function(e3) { - return !t2._isConvNeedShow(e3.conversationID); - }).length || this.emitConvUpdate()) : s2 && this.emitIEvt(P.C2C_UNREAD_HANDLE_COMPLETED) : this.ready(function() { - t2._onSendOrRcvMsg(e2); - }); - } }, { key: "updateConvGroupProfile", value: function(e2) { - var n2, o2 = this; - O(e2) && 0 === e2.length || (0 !== this._convMap.size ? (n2 = false, e2.forEach(function(e3) { - var t2 = "".concat(A.CONV_GROUP).concat(e3.groupID); - o2._convMap.has(t2) && (n2 = true, (t2 = o2._convMap.get(t2)).groupProfile = JSON.parse(JSON.stringify(e3)), t2.lastMessage.lastSequence < e3.nextMessageSeq && (t2.lastMessage.lastSequence = e3.nextMessageSeq - 1), t2.subType || (t2.subType = e3.type)); - }), n2 && this.emitConvUpdate(true, false)) : this._tmpGroupList = e2); - } }, { key: "onMessageRevoked", value: function(e2, t2) { - var n2, o2, i2, a2 = this; - 0 !== e2.length && (n2 = null, o2 = false, i2 = [], e2.forEach(function(e3) { - (n2 = a2._convMap.get(e3.conversationID)) && (t2 && n2.reduceUnreadCount() && (o2 = n2.type !== A.CONV_TOPIC), n2.type === A.CONV_TOPIC ? i2.push(e3) : n2.isLastMessageRevoked({ sequence: e3.sequence, time: e3.time }) && (n2.setLastMessageRevoked(true), n2.setLastMessageRevoker(e3.revoker), o2 = true)); - }), this.get(10).onMessageRevoked(i2), o2) && this.emitConvUpdate(true, false); - } }, { key: "updateRevokerInfo", value: function(u2) { - for (var e2 = /* @__PURE__ */ new Set(), t2 = 0; t2 < u2.length; t2++) { - var n2 = u2[t2].revoker; - e2.add(n2); - } - var o2 = p(e2), i2 = this.get(4); - return new Promise(function(c2) { - i2.getUserProfile({ userIDList: o2 }).then(function(e3) { - e3 = e3.data; - if (!O(e3) || 0 === e3.length) - return c2(u2); - var t3, n3 = {}, o3 = Z(e3); - try { - for (o3.s(); !(t3 = o3.n()).done; ) { - var i3 = t3.value, a2 = i3.userID, s2 = i3.nick, r2 = i3.avatar; - n3[a2] = { nick: s2, avatar: r2 }; - } - } catch (e4) { - o3.e(e4); - } finally { - o3.f(); - } - u2.forEach(function(e4) { - var t4 = e4.revoker; - n3[t4] && (e4.revokerInfo.nick = n3[t4].nick || "", e4.revokerInfo.avatar = n3[t4].avatar || ""); - }), c2(u2); - }).catch(function() { - c2(u2); - }); - }); - } }, { key: "isLastMessageRevoked", value: function(e2) { - var t2 = false, n2 = e2.conversationID, o2 = e2.sequence, i2 = e2.time, a2 = this._convMap.get(n2); - return a2 && (t2 = a2.type === A.CONV_TOPIC ? this.get(10).isLastMessageRevoked({ topicID: n2.replace(A.CONV_GROUP, ""), sequence: o2 }) : a2.isLastMessageRevoked({ sequence: o2, time: i2 })), M.l("".concat(this._n, ".isLastMessageRevoked options:"), e2, "ret:".concat(t2)), t2; - } }, { key: "onMessageDeleted", value: function(e2) { - var t2 = this; - if (0 !== e2.length) { - var n2 = null; - e2.forEach(function(e3) { - (n2 = t2._msgListHandler.getLocalMsg(e3.conversationID, e3.ID)) && (n2.isDeleted = true), e3 !== n2 && (e3.isDeleted = true); - }); - for (var e2 = e2[0].conversationID, o2 = this._msgListHandler.getLocalMsgList(e2), i2 = {}, a2 = o2.length - 1; 0 <= a2; a2--) - if (!o2[a2].isDeleted) { - i2 = o2[a2]; - break; - } - var s2, r2 = this._convMap.get(e2); - r2 && (s2 = false, r2.lastMessage.lastSequence === i2.sequence && r2.lastMessage.lastTime === i2.time || (S(i2) && (i2 = void 0), r2.updateLastMessage(i2), r2.type !== A.CONV_TOPIC && (s2 = true), M.l("".concat(this._n, ".onMessageDeleted. update convID:").concat(e2, " with lastMessage:"), r2.lastMessage)), e2.startsWith(A.CONV_C2C) && this.updateUnreadCount(e2), s2) && this.emitConvUpdate(true, false); - } - } }, { key: "onMessageModified", value: function(e2) { - var t2 = "".concat(this._n, ".onMessageModified"), n2 = e2.conversationType, o2 = e2.from, i2 = e2.to, a2 = e2.time, s2 = e2.sequence, r2 = e2.elements, c2 = e2.cloudCustomData, u2 = e2.messageVersion, l2 = this.getMyUserID(), d2 = "".concat(n2).concat(i2), l2 = (i2 === l2 && n2 === A.CONV_C2C && (d2 = "".concat(n2).concat(o2)), this._msgListHandler.onMsgModified(d2, e2)), n2 = l2.isUpdated, l2 = l2.message, p2 = (true === n2 && this.emitOEvt(h.MESSAGE_MODIFIED, [l2]), this._isTopicConv(d2)); - return null === l2 ? M.l("".concat(t2, " message is null! options:"), e2) : M.l("".concat(t2, " isUpdated:").concat(n2, " isTopicMessage:").concat(p2, " from:").concat(o2, " to:").concat(i2, " sequence:").concat(l2.sequence, " time:").concat(l2.time)), p2 ? this.get(10).onMessageModified(e2) : (n2 = this._convMap.get(d2)) && (o2 = n2.lastMessage) && o2.lastTime === a2 && o2.lastSequence === s2 && o2.version !== u2 && (M.l("".concat(t2, " convID:").concat(d2, " lastMessage updated")), o2.type = r2[0].type, o2.payload = r2[0].content, o2.messageForShow = zt(o2.type, o2.payload, this.isIntl()), o2.cloudCustomData = c2, o2.version = u2, this.emitConvUpdate(true, false)), l2; - } }, { key: "onNewGroupAtTips", value: function(e2) { - var t2 = this, e2 = e2.dataList, n2 = null; - e2.forEach(function(e3) { - e3.groupAtTips ? n2 = e3.groupAtTips : e3.elements ? n2 = y(y({}, e3.elements), {}, { sync: true }) : e3.groupAtType && (n2 = y(y({}, e3), {}, { sync: true })), n2.__random = e3.random, n2.__sequence = e3.clientSequence, t2._tmpGroupAtTipsList.push(n2); - }), M.l("".concat(this._n, ".onNewGroupAtTips isReady:").concat(this._isReady), this._tmpGroupAtTipsList), this._isReady && this._handleGroupAtTipsList(); - } }, { key: "_handleGroupAtTipsList", value: function() { - var s2, r2 = this; - 0 !== this._tmpGroupAtTipsList.length && (s2 = false, this._tmpGroupAtTipsList.forEach(function(e2) { - var t2, n2 = e2.groupID, o2 = e2.from, i2 = e2.topicID, i2 = void 0 === i2 ? void 0 : i2, a2 = e2.sync, a2 = void 0 !== a2 && a2; - o2 !== r2.getMyUserID() && (N(i2) ? (o2 = r2._convMap.get("".concat(A.CONV_GROUP).concat(n2))) && (o2.updateGroupAtInfoList(e2), s2 = true) : ((n2 = r2._convMap.get("".concat(A.CONV_GROUP).concat(i2))) && (n2.updateGroupAtInfoList(e2), o2 = r2.get(10), t2 = n2.groupAtInfoList, o2.onAtInfoUpdated({ topicID: i2, groupAtInfoList: t2 })), S(n2) && a2 && (r2.updateTopicConversation([{ conversationID: "".concat(A.CONV_GROUP).concat(i2), type: A.CONV_TOPIC }]), r2._convMap.get("".concat(A.CONV_GROUP).concat(i2)).updateGroupAtInfoList(e2)))); - }), s2 && this.emitConvUpdate(true, false), this._tmpGroupAtTipsList.length = 0); - } }, { key: "_checkNewConv", value: function(e2) { - var t2 = this, n2 = [], o2 = []; - e2.forEach(function(e3) { - t2._convMap.has(e3.conversationID) || (e3.type === A.CONV_C2C ? n2.push(e3.conversationID.replace(A.CONV_C2C, "")) : e3.type === A.CONV_GROUP && o2.push(e3.conversationID.replace(A.CONV_GROUP, ""))); - }), 0 < n2.length && (this._onNewC2CConv(n2), n2 = null), 0 < o2.length && (this._onNewGroupConv(o2), o2 = null); - } }, { key: "_onNewC2CConv", value: function(e2) { - var t2 = this.get(6); - return Promise.all([t2.getRemotePeerReadTime(e2), this._msgRemindHandler.getC2CMsgRemindType(e2), this._convGroupHandler.searchConvGroupAndMark(e2, 1)]); - } }, { key: "_onNewGroupConv", value: function(e2) { - var t2 = this.get(7); - return t2 ? Promise.all([t2.getMsgRemindType(e2), this._convGroupHandler.searchConvGroupAndMark(e2, 2)]) : Promise.resolve(); - } }, { key: "_setStorageConvList", value: function() { - var e2 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t2 = this.getLocalConvList().filter(function(e3) { - return e3.type === A.CONV_C2C || e3.type === A.CONV_GROUP && e3.lastMessage.type !== A.MSG_GRP_TIP; - }).slice(0, 20).map(function(e3) { - return { conversationID: e3.conversationID, type: e3.type, subType: e3.subType, lastMessage: e3.lastMessage, groupProfile: e3.groupProfile, userProfile: e3.userProfile }; - }); - this.get(13).setItem("conversationMap", t2, e2); - } }, { key: "emitConvUpdate", value: function() { - var e2 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], t2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], n2 = this.getLocalConvList(); - t2 && (t2 = this.get(7)) && t2.updateGroupLastMessage(n2), e2 && (this.get(12).isPartialUpdatedConvs() ? (this._diffConvMap(this._convMapForDiff, this._convMap), 0 < this._partialUpdatedConvMap.size && (this.emitOEvt(h.CONVERSATION_LIST_UPDATED), this.onTotalUnreadCountUpdate(), this._convMapForDiff.clear(), this._convMapForDiff = ht(this._convMap, true)), 0 === this._convMapForDiff.size && (this._convMapForDiff = ht(this._convMap, true))) : (this.emitOEvt(h.CONVERSATION_LIST_UPDATED), this.onTotalUnreadCountUpdate())); - } }, { key: "_diffConvMap", value: function(e2, t2) { - var n2, o2 = Z(t2); - try { - for (o2.s(); !(n2 = o2.n()).done; ) { - var i2 = Y(n2.value, 2), a2 = i2[0], s2 = i2[1]; - e2.has(a2) && JSON.stringify(s2) === e2.get(a2) || this._partialUpdatedConvMap.set(a2, s2); - } - } catch (e3) { - o2.e(e3); - } finally { - o2.f(); - } - } }, { key: "getPartialUpdatedConvs", value: function() { - var e2 = p(ht(this._partialUpdatedConvMap, false).values()); - return this._partialUpdatedConvMap.clear(), e2; - } }, { key: "getLocalConvList", value: function() { - var t2 = this; - return p(this._convMap.values()).filter(function(e2) { - return t2._isConvNeedShow(e2.conversationID); - }); - } }, { key: "getLocalConversation", value: function(e2) { - return this._convMap.get(e2); - } }, { key: "hasLocalConversation", value: function(e2) { - return this._convMap.has(e2); - } }, { key: "getLocalOldestMessage", value: function(e2) { - return this._msgListHandler.getLocalOldestMsg(e2); - } }, { key: "syncConvList", value: function() { - var o2 = this, e2 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], i2 = "syncConvList", a2 = new G(i2); - return this._pagingStatus === Nn && this._convMap.clear(), this._pagingGetConvList(e2).then(function(e3) { - var t2 = tn(o2._pagingGetCostList), n2 = en(o2._pagingGetCostList), n2 = (o2._pagingGetCostList.length = 0, o2._pagingStatus = Pn, o2._diffAndDeleteConv(), o2.emitConvUpdate(true, false), o2._setStorageConvList(), o2._handleC2CPeerReadTime(), o2.emitIEvt(P.CONV_SYNC_COMPLETED), "count:".concat(o2._convMap.size, " sum:").concat(n2, " avg:").concat(t2)); - return M.l("".concat(o2._n, ".").concat(i2, ". ").concat(n2)), a2.setMessage(n2).end(), e3; - }).catch(function(e3) { - return o2._pagingStatus = Un, a2.setMessage(o2._pagingTs).setError(e3).end(), D(e3); - }); - } }, { key: "_diffAndDeleteConv", value: function() { - var n2, o2 = this; - this._isSyncCompleted() && (n2 = [], this._convMap.forEach(function(e2, t2) { - !o2._pagingConvIDMap.has(t2) && o2._convIDFromUnreadDBMap.has(t2) && (o2._convMap.delete(t2), n2.push(t2)); - }), M.l("".concat(this._n, "._diffAndDeleteConv list:").concat(n2)), n2 = null); - } }, { key: "_pagingGetConvList", value: function() { - var r2 = this, e2 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], c2 = "".concat(this._n, "._pagingGetConvList"), u2 = (M.l("".concat(c2, " incrementalPullFlag:").concat(e2, " ts:").concat(this._pagingTs, " startIdx:").concat(this._pagingStartIdx) + " pinnedTs:".concat(this._pagingPinnedTs, " pinnedStartIdx:").concat(this._pagingPinnedStartIdx)), Date.now()); - return this._pagingStatus = Gn, this.req({ P: k.PAGING_GET_CONV_LIST, data: { fromAccount: this.getMyUserID(), timeStamp: e2 ? this._pagingTs : 0, startIndex: e2 ? this._pagingStartIdx : 0, pinnedTimeStamp: e2 ? this._pagingPinnedTs : 0, pinnedStartIndex: e2 ? this._pagingPinnedStartIdx : 0, orderType: 1 } }).then(function(e3) { - var e3 = e3.data, t2 = e3.completeFlag, n2 = e3.conversations, n2 = void 0 === n2 ? [] : n2, o2 = e3.timeStamp, i2 = e3.startIndex, a2 = e3.pinnedTimeStamp, s2 = e3.pinnedStartIndex, e3 = e3.groupItem; - if (r2._pagingGetCostList.push(nn(u2, false)), M.l("".concat(c2, " ok. completeFlag:").concat(t2, " count:").concat(n2.length, " cost:").concat(nn(u2))), r2._convGroupHandler.onConvGroupListSynced(e3), 0 < n2.length && (e3 = r2._getConvOptions(n2), r2._pagingConvIDMap = new Map([].concat(p(r2._pagingConvIDMap), p(e3.map(function(e4) { - return [e4.conversationID, 1]; - })))), r2._updateLocalConvList({ conversationOptionsList: e3, isFromGetConversations: true, updateUnreadCount: true }), r2.isLoggedIn()) && r2.emitConvUpdate(), !r2._isReady) { - if (!r2.isLoggedIn()) - return T(); - r2.triggerReady(); - } - return r2._pagingTs = o2, r2._pagingStartIdx = i2, r2._pagingPinnedTs = a2, r2._pagingPinnedStartIdx = s2, 1 !== t2 ? r2._pagingGetConvList() : (r2._handleGroupAtTipsList(), r2._convGroupHandler.getRemoteConvGroupList(), T()); - }).catch(function(e3) { - throw !r2.isLoggedIn() || r2._isReady || (M.w("".concat(c2, " failed. error:"), e3), r2.triggerReady()), e3; - }); - } }, { key: "_updateLocalConvList", value: function(e2) { - var t2 = e2.isFromGetConversations, n2 = Date.now(), e2 = this._getTmpConvListMapping(e2).newConvList; - this._convMap = new Map(this._sortConvList(p(this._convMap))), t2 || this._updateUserOrGroupProfile(e2), M.l("".concat(this._n, "._updateLocalConvList cost:").concat(nn(n2))); - } }, { key: "_getTmpConvListMapping", value: function(e2) { - for (var t2 = e2.conversationOptionsList, n2 = e2.isFromGetConversations, o2 = e2.isInstantMessage, i2 = e2.isUnreadC2CMessage, a2 = void 0 !== i2 && i2, s2 = e2.updateUnreadCount, r2 = [], c2 = [], u2 = this.get(7), l2 = this.get(8), d2 = this.isIntl(), p2 = this.isUsingChatCore(), _2 = 0, h2 = t2.length; _2 < h2; _2++) { - var g2 = new ii(t2[_2], d2, p2), f2 = g2.conversationID, m2 = g2.type; - if (!this._isNonExistentAccount(f2)) { - if (this._convMap.has(f2)) { - var v2 = this._convMap.get(f2); - if (n2) { - this._convMap.set(f2, g2), m2 === A.CONV_C2C ? g2.unreadCount = v2.unreadCount : m2 === A.CONV_GROUP && (g2.groupProfile = JSON.parse(JSON.stringify(v2.groupProfile))); - continue; - } - var I2 = ["unreadCount", "allowType", "adminForbidType", "payload"], M2 = (false === o2 && I2.push("lastMessage"), "boolean" == typeof o2 && I2.push("isPinned"), t2[_2].lastMessage), y2 = !N(M2); - y2 || t2[_2].type === A.CONV_TOPIC || this._onLastMsgNotExist(t2[_2]), N(o2) && y2 && null === v2.lastMessage.payload && (v2.lastMessage.payload = M2.payload), S(v2.lastMessage.revoker) || (v2.lastMessage.revoker = null), _t(v2, g2, I2, [null, void 0, "", 0, NaN]), true === s2 && v2.updateUnreadCount({ nextUnreadCount: g2.unreadCount, isFromGetConversations: n2, isUnreadC2CMessage: a2 }), o2 && y2 && (M2.payload && (v2.lastMessage.payload = M2.payload), v2.type === A.CONV_GROUP) && (v2.lastMessage.nameCard = M2.nameCard, v2.lastMessage.nick = M2.nick), y2 && v2.lastMessage.cloudCustomData !== M2.cloudCustomData && (v2.lastMessage.cloudCustomData = M2.cloudCustomData || ""); - } else - m2 === A.CONV_GROUP && u2 ? (I2 = g2.groupProfile.groupID, (y2 = u2.getLocalGroupProfile(I2)) && (g2.groupProfile = y2, true === s2) && g2.updateUnreadCount({ nextUnreadCount: 0 })) : m2 === A.CONV_C2C && (v2 = f2.replace(A.CONV_C2C, ""), l2) && l2.isMyFriend(v2) && (g2.remark = l2.getFriendRemark(v2)), r2.push(g2), this._convMap.set(f2, g2); - this._convMap.get(f2).type === A.CONV_TOPIC && c2.push(this._convMap.get(f2)); - } - } - for (var C2 = this.get(10), T2 = 0, D2 = c2.length; T2 < D2; T2++) { - var E2 = c2[T2], L2 = E2.conversationID, E2 = E2.groupAtInfoList; - S(E2) || C2.onAtInfoUpdated({ topicID: L2.replace(A.CONV_GROUP, ""), groupAtInfoList: E2 }); - } - return { newConvList: r2 }; - } }, { key: "_onLastMsgNotExist", value: function(e2) { - new G("lastMsgNotExist").setMessage(JSON.stringify(e2)).end(); - } }, { key: "_sortConvList", value: function(e2) { - var t2 = [], n2 = [], o2 = [], i2 = []; - return e2.forEach(function(e3) { - (true === e3[1].isPinned ? S(e3[1].lastMessage.lastTime) ? n2 : t2 : S(e3[1].lastMessage.lastTime) ? i2 : o2).push(e3); - }), t2.sort(function(e3, t3) { - return t3[1].lastMessage.lastTime - e3[1].lastMessage.lastTime; - }).concat(n2).concat(o2.sort(function(e3, t3) { - return t3[1].lastMessage.lastTime - e3[1].lastMessage.lastTime; - })).concat(i2); - } }, { key: "_sortConvListAndEmitEvent", value: function() { - this._convMap = new Map(this._sortConvList(p(this._convMap))), this.emitConvUpdate(true, false); - } }, { key: "_updateUserOrGroupProfile", value: function(e2) { - var n2, o2, t2, i2, a2 = this; - 0 !== e2.length && (n2 = [], o2 = [], t2 = this.get(4), i2 = this.get(7), e2.forEach(function(e3) { - var t3; - e3.type === A.CONV_C2C ? n2.push(e3.toAccount) : e3.type === A.CONV_GROUP && (t3 = e3.toAccount, i2.hasLocalGroup(t3) ? e3.groupProfile = i2.getLocalGroupProfile(t3) : o2.push(t3)); - }), M.l("".concat(this._n, "._updateUserOrGroupProfile userIDList:").concat(n2, " groupIDList:").concat(o2)), 0 < n2.length && t2.getUserProfile({ userIDList: n2 }).then(function(e3) { - e3 = e3.data; - O(e3) ? e3.forEach(function(e4) { - a2._doUpdateUserProfile("".concat(A.CONV_C2C).concat(e4.userID), e4); - }) : a2._doUpdateUserProfile("".concat(A.CONV_C2C).concat(e3.userID), e3); - }), 0 < o2.length) && i2.getGroupProfileAdvance({ groupIDList: o2, responseFilter: { groupBaseInfoFilter: ["Type", "Name", "FaceUrl"] } }).then(function(e3) { - var e3 = e3.data.successGroupList, n3 = false; - e3.forEach(function(e4) { - var t3 = "".concat(A.CONV_GROUP).concat(e4.groupID); - a2._convMap.has(t3) && (t3 = a2._convMap.get(t3), _t(t3.groupProfile, e4, [], [null, void 0, "", 0, NaN]), !t3.subType && e4.type && (t3.subType = e4.type), n3 = true); - }), n3 && a2.emitConvUpdate(); - }); - } }, { key: "_doUpdateUserProfile", value: function(e2, t2) { - this.hasLocalConversation(e2) && (this.getLocalConversation(e2).userProfile = t2, this.emitConvUpdate()); - } }, { key: "_getConvOptions", value: function(e2) { - var n2 = this, o2 = [], e2 = e2.filter(function(e3) { - var t2 = e3.type, e3 = e3.userID; - return 1 === t2 && !n2._isNonExistentAccount(e3) || 2 === t2; - }), i2 = this.getMyUserID(), e2 = e2.map(function(e3) { - var t2; - return N(e3.lastMsg) && (e3.lastMsg = { elements: [] }), 1 === e3.type ? (t2 = { userID: e3.userID, nick: e3.peerNick, avatar: e3.peerAvatar }, o2.push(t2), { conversationID: "".concat(A.CONV_C2C).concat(e3.userID), type: A.CONV_C2C, lastMessage: { lastTime: e3.time, lastSequence: e3.sequence, fromAccount: e3.lastC2CMsgFromAccount, type: e3.lastMsg.elements[0] ? e3.lastMsg.elements[0].type : null, payload: e3.lastMsg.elements[0] ? n2._amendLayersOverLimitProp(e3.lastMsg.elements[0].content) : null, cloudCustomData: e3.lastMsg.cloudCustomData || "", isRevoked: 8 === e3.lastMessageFlag, onlineOnlyFlag: false, nick: "", nameCard: "", version: 0, isPeerRead: e3.lastC2CMsgFromAccount === i2 && e3.time <= e3.c2cPeerReadTime, revoker: e3.lastMsg.revokerInfo ? e3.lastMsg.revokerInfo.revoker : null }, unreadCount: 0, userProfile: new ei(t2), peerReadTime: e3.c2cPeerReadTime, isPinned: 1 === e3.isPinned, customData: e3.customMark || "", markList: Zt(e3.standardMark), conversationGroupList: n2._convGroupHandler.getConvGroupListByID(e3.contactGroupId), remark: e3.friendRemark || "", messageRemindType: n2._transMsgRemindType(e3.messageRemindType) }) : { conversationID: "".concat(A.CONV_GROUP).concat(e3.groupID), type: A.CONV_GROUP, lastMessage: y(y({ lastTime: e3.time, lastSequence: e3.sequence, fromAccount: e3.msgGroupFromAccount }, n2._patchTypeAndPayload(e3)), {}, { cloudCustomData: e3.lastMsg.cloudCustomData || "", isRevoked: 2 === e3.lastMessageFlag, onlineOnlyFlag: false, nick: e3.senderNick || "", nameCard: e3.senderNameCard || "", revoker: e3.lastMsg.revokerInfo ? e3.lastMsg.revokerInfo.revoker : null }), groupProfile: new oi({ groupID: e3.groupID, name: e3.groupNick, avatar: e3.groupImage, type: e3.groupType, nextMessageSeq: e3.nextMessageSeq }), unreadCount: n2._computeGroupUnreadCount(e3), peerReadTime: 0, isPinned: 1 === e3.isPinned, version: 0, customData: e3.customMark || "", markList: Zt(e3.standardMark), conversationGroupList: n2._convGroupHandler.getConvGroupListByID(e3.contactGroupId), messageRemindType: n2._transMsgRemindType(e3.messageRemindType) }; - }); - return 0 < o2.length && this.get(4).onConvProfileUpdated(o2), e2; - } }, { key: "_transMsgRemindType", value: function(e2) { - var t2 = ""; - return 0 === e2 ? t2 = A.MSG_REMIND_ACPT_AND_NOTE : 1 === e2 ? t2 = A.MSG_REMIND_DISCARD : 2 === e2 ? t2 = A.MSG_REMIND_ACPT_NOT_NOTE : 3 === e2 && (t2 = A.NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT), t2; - } }, { key: "_computeGroupUnreadCount", value: function(e2) { - var t2 = e2.unreadCount, e2 = e2.noUnreadCount, t2 = (void 0 === t2 ? 0 : t2) - (void 0 === e2 ? 0 : e2); - return 0 < t2 ? t2 : 0; - } }, { key: "_patchTypeAndPayload", value: function(e2) { - var e2 = e2.lastMsg, t2 = e2.event, n2 = e2.elements, n2 = void 0 === n2 ? [] : n2, e2 = e2.groupTips, e2 = void 0 === e2 ? {} : e2; - return N(void 0 === t2 ? void 0 : t2) || S(e2) ? { type: n2[0] ? n2[0].type : null, payload: n2[0] ? this._amendLayersOverLimitProp(n2[0].content) : null } : ((t2 = new Do(e2)).setElement({ type: A.MSG_GRP_TIP, content: y(y({}, e2.elements), {}, { groupProfile: e2.groupProfile }) }), n2 = JSON.parse(JSON.stringify(t2.payload)), t2 = null, { type: A.MSG_GRP_TIP, payload: n2 }); - } }, { key: "_amendLayersOverLimitProp", value: function(e2) { - var t2 = e2.layersOverLimit; - return 0 === t2 ? e2.layersOverLimit = false : 1 === t2 && (e2.layersOverLimit = true), e2; - } }, { key: "getLocalMessageList", value: function(e2) { - return this._msgListHandler.getLocalMsgList(e2); - } }, { key: "deleteLocalMessage", value: function(e2) { - e2 instanceof Do && this._msgListHandler.remove(e2); - } }, { key: "onConvDeleted", value: function(e2) { - O(e2) && (e2 = e2.map(function(e3) { - var t2 = e3.type, n2 = e3.userID, e3 = e3.groupID; - return 1 === t2 ? "".concat(A.CONV_C2C).concat(n2) : 2 === t2 ? "".concat(A.CONV_GROUP).concat(e3) : void 0; - }), M.l("".concat(this._n, ".onConvDeleted convIDList:").concat(e2)), this.deleteLocalConvList(e2)); - } }, { key: "onConvPinnedStatus", value: function(e2, i2) { - var a2, s2 = this; - O(e2) && (a2 = false, e2.forEach(function(e3) { - var t2, n2 = e3.type, o2 = e3.userID, e3 = e3.groupID; - 1 === n2 ? t2 = s2.getLocalConversation("".concat(A.CONV_C2C).concat(o2)) : 2 === n2 && (t2 = s2.getLocalConversation("".concat(A.CONV_GROUP).concat(e3))), t2 && (M.l("".concat(s2._n, ".onConvPinnedStatus convID:").concat(t2.conversationID, " localPinned:").concat(t2.isPinned, " remotePinned:").concat(i2)), i2 ? t2.isPinned || (t2.isPinned = true, a2 = true) : t2.isPinned && (t2.isPinned = false, a2 = true)); - }), a2) && this._sortConvListAndEmitEvent(); - } }, { key: "getMessageList", value: function(e2) { - var r2 = this, c2 = e2.conversationID, t2 = e2.nextReqMessageID, e2 = e2.count, u2 = "".concat(this._n, ".getMessageList"), n2 = this.getLocalConversation(c2), o2 = ""; - if (n2 && n2.groupProfile && (o2 = n2.groupProfile.type), Ot(o2)) - return M.l("".concat(u2, " not available in ").concat(o2, ". convID:").concat(c2)), T({ messageList: [], nextReqMessageID: "", isCompleted: true }); - (N(e2) || 15 < e2) && (e2 = 15), t2 || this._isMeInCommunity(c2) || this.clearMemMsg(c2); - var l2 = this._computeRemainingCount({ conversationID: c2, nextReqMessageID: t2 }), n2 = this._completedMap.has(c2); - if (M.l("".concat(u2, " convID:").concat(c2, " isEverCleared:").concat(this._isEverCleared(c2), " nextReqMessageID:").concat(t2) + " remainingCount:".concat(l2, " count:").concat(e2, " isCompleted:").concat(n2)), this._needGetHistory({ conversationID: c2, remainingCount: l2, count: e2 })) - return this.getHistoryMessages({ conversationID: c2, nextReqMessageID: t2, count: 20 }).then(function(e3) { - var t3 = e3.nextReqID, n3 = e3.storedMessageList, o3 = e3.assembledMessageList, e3 = e3.isPullingCompleted, i2 = r2._completedMap.has(c2), a2 = n3, s2 = (0 < l2 && (a2 = r2._msgListHandler.getLocalMsgList(c2).slice(0, n3.length + l2)), { nextReqMessageID: void 0, messageList: void 0, isCompleted: void 0 }), n3 = (r2._isEverCleared(c2) ? (s2.nextReqMessageID = t3, s2.messageList = o3, s2.isCompleted = e3) : (s2.nextReqMessageID = i2 ? "" : t3, s2.messageList = a2, s2.isCompleted = i2), s2.messageList.filter(function(e4) { - return e4.isRevoked; - }) || []), o3 = s2.messageList.map(function(e4) { - return e4.sequence; - }); - return M.l("".concat(u2, " ret.nextReqMessageID:").concat(s2.nextReqMessageID, " ret.isCompleted:").concat(s2.isCompleted, " sequenceList:"), o3), O(n3) && 0 !== n3.length ? r2.updateRevokerInfo(n3).then(function(e4) { - return e4.forEach(function(t4) { - var n4 = t4.revokerInfo; - s2.messageList = s2.messageList.map(function(e5) { - return e5.ID === t4.ID && n4 && (e5.revokeReason = n4.reason || "", e5.revokerInfo = { userID: n4.revoker || e5.revoker, nick: n4.nick, avatar: n4.avatar }), e5; - }); - }), C(s2); - }) : C(s2); - }); - this.modifyMessageList(c2); - o2 = this._getMsgListFromMem({ conversationID: c2, nextReqMessageID: t2, count: e2 }); - return T(o2); - } }, { key: "_isEverCleared", value: function(e2) { - return this._everClearedMap.has(e2); - } }, { key: "_getMsgListFromMem", value: function(e2) { - var t2 = e2.conversationID, n2 = e2.nextReqMessageID, e2 = e2.count, o2 = "".concat(this._n, "._getMsgListFromMem"), i2 = this._msgListHandler.getLocalMsgList(t2), a2 = i2.length, s2 = Pt(t2), r2 = 0, c2 = { isCompleted: false, nextReqMessageID: "", messageList: [] }, e2 = (n2 ? (r2 = s2 ? i2.findIndex(function(e3) { - return e3.ID === n2; - }) : i2.findIndex(function(e3) { - return e3.sequence + "" === n2; - })) > e2 ? (c2.messageList = i2.slice(r2 - e2, r2), c2.nextReqMessageID = s2 ? i2[r2 - e2].ID : i2[r2 - e2].sequence + "") : (c2.messageList = i2.slice(0, r2), c2.isCompleted = true) : e2 < a2 ? (c2.messageList = i2.slice(r2 = a2 - e2, a2), c2.nextReqMessageID = s2 ? i2[r2].ID : i2[r2].sequence + "") : (c2.messageList = i2.slice(0, a2), c2.isCompleted = true), c2.messageList.map(function(e3) { - return e3.sequence; - })); - return M.l("".concat(o2, " convID:").concat(t2) + " ret.nextReqMessageID:".concat(c2.nextReqMessageID, " ret.isCompleted:").concat(c2.isCompleted, " sequenceList:").concat(e2)), c2; - } }, { key: "getMessageListHopping", value: function(e2) { - var t2, n2, o2 = e2.conversationID, i2 = e2.sequence, a2 = e2.time, s2 = e2.count, e2 = e2.direction, e2 = void 0 === e2 ? 0 : e2; - return (N(s2) || 15 < s2) && (s2 = 15), o2.startsWith(A.CONV_C2C) ? (t2 = this.get(6), n2 = o2.replace(A.CONV_C2C, ""), t2.getRoamingMessagesHopping({ peerAccount: n2, time: a2, count: s2, direction: e2 })) : o2.startsWith(A.CONV_GROUP) ? (t2 = this.get(7), n2 = o2.replace(A.CONV_GROUP, ""), t2.getRoamingMessagesHopping({ groupID: n2, sequence: i2, count: s2, direction: e2 })) : void 0; - } }, { key: "_computeRemainingCount", value: function(e2) { - var t2, n2 = e2.conversationID, o2 = e2.nextReqMessageID, e2 = this._msgListHandler.getLocalMsgList(n2), i2 = e2.length; - return M.l("".concat(this._n, "._computeRemainingCount convID:").concat(n2, " nextReqMessageID:").concat(o2, " length:").concat(i2)), o2 ? (t2 = 0, Pt(n2) ? t2 = e2.findIndex(function(e3) { - return e3.ID === o2; - }) : Ut(n2) && (t2 = -1 !== o2.indexOf("-") ? e2.findIndex(function(e3) { - return e3.ID === o2; - }) : e2.findIndex(function(e3) { - return e3.sequence + "" === o2; - })), -1 === t2 ? 0 : t2) : i2; - } }, { key: "_needGetHistory", value: function(e2) { - var t2 = e2.conversationID, n2 = e2.remainingCount, e2 = e2.count, o2 = this.getLocalConversation(t2), i2 = ""; - return o2 && o2.groupProfile && (i2 = o2.groupProfile.type), !(bt(t2) || Ot(i2) || !this._isEverCleared(t2) && (o2 = n2 <= e2 && !this._completedMap.has(t2), M.l("".concat(this._n, "._needGetHistory convID:").concat(t2, " ret:").concat(o2)), !o2)); - } }, { key: "_isTopicConv", value: function(e2) { - e2 = e2.replace(A.CONV_GROUP, ""); - return Gt(e2); - } }, { key: "getHistoryMessages", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2 = e2.conversationID, c2 = e2.count, e2 = e2.nextReqMessageID; - return r2 === A.CONV_SYSTEM ? T() : (c2 = 20 < c2 ? 20 : 15, t2 = null, Pt(r2) ? (s2 = 0, n2 = "", o2 = false, a2 = this._roamingMsgKeyAndTimeMap.has(r2), e2 && (o2 = true, a2 ? (s2 = this._roamingMsgKeyAndTimeMap.get(r2).lastMessageTime, n2 = this._roamingMsgKeyAndTimeMap.get(r2).messageKey) : (i2 = this._msgListHandler.findMessage(e2)) && (s2 = i2.time, M.l("".concat(this._n, ".getHistoryMessages convID:").concat(r2, " isRelayInfoExisted:").concat(a2, " lastMessageTime:").concat(s2)))), (t2 = this.get(6)).getRoamingMessage({ conversationID: r2, peerAccount: r2.replace(A.CONV_C2C, ""), count: c2, lastMessageTime: o2 ? s2 : 0, messageKey: o2 ? n2 : "" })) : Ut(r2) ? (t2 = this.get(7)) ? (i2 = r2.replace(A.CONV_GROUP, ""), a2 = null, this._convMap.has(r2) && !Gt(i2) && (a2 = this._convMap.get(r2).lastMessage), s2 = 0, e2 ? s2 = Number(e2) : a2 && (s2 = a2.lastSequence), t2.getRoamingMessage({ conversationID: r2, groupID: i2, count: c2, sequence: s2 })) : D({ code: L.NO_MODULE }) : T()); - } }, { key: "patchConvLastMessage", value: function(e2) { - var t2, n2, o2 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], i2 = this.getLocalConversation(e2); - i2 && (t2 = (n2 = i2.lastMessage).messageForShow, n2 = n2.payload, S(t2) || S(n2) || o2) && 0 !== (t2 = this._msgListHandler.getLocalMsgList(e2)).length && (n2 = t2[t2.length - 1], M.l("".concat(this._n, ".patchConvLastMessage bForceUpdate:").concat(o2, " convID:").concat(e2, " payload:"), n2.payload), i2.updateLastMessage(n2)); - } }, { key: "onRoamingMessage", value: function() { - for (var e2, t2, n2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [], o2 = 1 < arguments.length ? arguments[1] : void 0, i2 = !(2 < arguments.length && void 0 !== arguments[2]) || arguments[2], a2 = 3 < arguments.length ? arguments[3] : void 0, s2 = o2.startsWith(A.CONV_C2C) ? A.CONV_C2C : A.CONV_GROUP, r2 = null, c2 = [], o2 = [], u2 = 0, l2 = n2.length, d2 = s2 === A.CONV_GROUP, p2 = this.getFileDownloadProxy(), _2 = this.getDowloadFileAuthKey(), h2 = O(a2), g2 = this.get(17).getFileDNList(), f2 = function() { - d2 ? --u2 : ++u2; - }, m2 = function() { - return d2 ? l2 <= u2 : u2 < l2; - }, u2 = d2 ? n2.length - 1 : 0, l2 = d2 ? 0 : n2.length; m2(); f2()) - 1 !== n2[u2].isPlaceMessage && ((r2 = new Do(n2[u2])).to = n2[u2].to, s2 !== A.CONV_GROUP || N(n2[u2].topicID) || (r2.to = n2[u2].topicID), r2.isSystemMessage = !!n2[u2].isSystemMessage, r2.conversationType = s2, e2 = 4 === n2[u2].event ? { type: A.MSG_GRP_TIP, content: y(y({}, n2[u2].elements), {}, { groupProfile: n2[u2].groupProfile }) } : n2[u2].elements, d2 || r2.setNickAndAvatar({ nick: n2[u2].nick, avatar: n2[u2].avatar }), S(e2) ? ((t2 = new G("emptyMessageBody")).setMessage("from:".concat(r2.from, " to:").concat(r2.to, " sequence:").concat(r2.sequence, " event:").concat(n2[u2].event)), t2.setLevel("warning").end()) : (r2.setElement(e2, p2, _2, g2), r2.reInitialize(this.getMyUserID()), c2.push(r2), h2 && a2.push(r2))); - return f2 = m2 = null, i2 ? (this._msgListHandler.unshift(c2, o2), c2 = null, o2) : c2; - } }, { key: "findMessage", value: function(e2) { - return this._msgListHandler.findMessage(e2); - } }, { key: "_isMeInCommunity", value: function(e2) { - var t2 = true; - return this._isTopicConv(e2) && (e2 = Jt(e2.replace(A.CONV_GROUP, "")), this.get(7).hasLocalGroup(e2) || (t2 = false, M.l("".concat(this._n, "._isMeInCommunity groupID:").concat(e2, " ret:").concat(t2)))), t2; - } }, { key: "deleteTopicRoamingInfo", value: function(e2) { - var t2 = this; - Nt({ groupID: e2 }) && this._msgListHandler.getTopicConvIDList(e2).forEach(function(e3) { - t2.clearMemMsg(e3); - }); - } }, { key: "deleteGroupRoamingInfo", value: function(e2) { - e2 = "".concat(A.CONV_GROUP).concat(e2); - 0 < this._msgListHandler.getLocalMsgList(e2).length && this.clearMemMsg(e2); - } }, { key: "setMessageRead", value: function(e2) { - var t2 = e2.conversationID, n2 = this.getLocalConversation(t2), e2 = "".concat(this._n, ".setMessageRead"); - if (M.l("".concat(e2, " convID:").concat(t2, " unreadCount:").concat(n2 ? n2.unreadCount : 0)), !n2) - return T(); - if (n2.type !== A.CONV_GROUP && n2.type !== A.CONV_TOPIC || S(n2.groupAtInfoList) || this.deleteGroupAtTips(t2), 0 === n2.unreadCount) - return T(); - var o2 = this._msgListHandler.getLocalLastMsg(t2), i2 = n2.lastMessage.lastTime, a2 = this._msgListHandler.getLocalMaxTime(t2), a2 = (i2 < a2 && (M.l("".concat(e2, " update lastMessageTime from ").concat(i2, " to ").concat(a2)), i2 = a2), this._msgListHandler.getLocalMaxSeq(t2)), s2 = n2.lastMessage.lastSequence, r2 = (s2 < a2 && (M.l("".concat(e2, " update lastMessageSeq from ").concat(s2, " to ").concat(a2)), s2 = a2), n2.type === A.CONV_TOPIC && N(o2) && (e2 = this.get(10), o2 = Jt(a2 = t2.replace(A.CONV_GROUP, "")), e2 = e2.getLocalTopic(o2, a2)) && (s2 = e2.nextMessageSeq - 1), null); - switch (n2.type) { - case A.CONV_C2C: - return (r2 = this.get(6)) ? r2.setMessageRead({ conversationID: t2, lastMessageTime: i2 }) : D({ code: L.NO_MODULE }); - case A.CONV_GROUP: - case A.CONV_TOPIC: - return (r2 = this.get(7)) ? r2.setMessageRead({ conversationID: t2, lastMessageSeq: s2 }) : D({ code: L.NO_MODULE }); - case A.CONV_SYSTEM: - return n2.unreadCount = 0, this.emitConvUpdate(true, false), T(); - default: - return T(); - } - } }, { key: "setAllMessageRead", value: function() { - var t2, n2 = this, o2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, e2 = "setAllMessageRead", i2 = "".concat(this._n, ".").concat(e2), a2 = (o2.scope || (o2.scope = A.READ_ALL_MSG), M.l("".concat(i2, " options:"), o2), this._createSetAllMessageReadPack(o2)); - return 0 === a2.readAllC2CMessage && 0 === a2.groupMessageReadInfoList.length ? T() : (t2 = new G(e2), this.req({ P: k.SET_ALL_MSG_READ, data: a2 }).then(function(e3) { - e3 = e3.data, e3 = n2._handleAllMsgRead(e3); - return t2.setMessage("scope:".concat(o2.scope, " failureGroups:").concat(JSON.stringify(e3))).end(), T(); - }).catch(function(e3) { - return t2.setError(e3).end(), M.w("".concat(i2, " failed. error:"), e3), D({ code: e3 && e3.code ? e3.code : L.MSG_UNREAD_ALL_FAIL, message: e3 && e3.message ? e3.message : void 0 }); - })); - } }, { key: "setConvCustomData", value: function(e2) { - return this._convGroupHandler.setConvCustomData(e2); - } }, { key: "markConv", value: function(e2) { - return this._convGroupHandler.markConv(e2); - } }, { key: "getConvGroupList", value: function() { - return this._convGroupHandler.getLocalConvGroupList(); - } }, { key: "createConvGroup", value: function(e2) { - return this._convGroupHandler.createConvGroup(e2); - } }, { key: "deleteConvGroup", value: function(e2) { - return this._convGroupHandler.deleteConvGroup(e2); - } }, { key: "renameConvGroup", value: function(e2) { - return this._convGroupHandler.renameConvGroup(e2); - } }, { key: "addConvsToGroup", value: function(e2) { - return this._convGroupHandler.addConvsToGroup(e2); - } }, { key: "deleteConvsFromGroup", value: function(e2) { - return this._convGroupHandler.deleteConvsFromGroup(e2); - } }, { key: "onConvMarkUpdated", value: function(e2) { - this._convGroupHandler.onConvMarkUpdated(e2); - } }, { key: "onConvGroupCreated", value: function(e2) { - this._convGroupHandler.onConvGroupCreated(e2); - } }, { key: "onConvGroupDeleted", value: function(e2) { - this._convGroupHandler.onConvGroupDeleted(e2); - } }, { key: "onConvGroupNameUpdated", value: function(e2) { - this._convGroupHandler.onConvGroupNameUpdated(e2); - } }, { key: "onConvInGroupUpdated", value: function(e2) { - this._convGroupHandler.onConvInGroupUpdated(e2); - } }, { key: "onConvAddedToOrDeletedFromGroup", value: function(e2) { - this._convGroupHandler.onConvAddedToOrDeletedFromGroup(e2); - } }, { key: "_getConvLastMessageSeq", value: function(e2) { - var t2 = this._msgListHandler.getLocalLastMsg(e2.conversationID), e2 = e2.lastMessage.lastSequence; - return e2 = t2 && e2 < t2.sequence ? t2.sequence : e2; - } }, { key: "_getConvLastMessageTime", value: function(e2) { - var t2 = this._msgListHandler.getLocalLastMsg(e2.conversationID), e2 = e2.lastMessage.lastTime; - return e2 = t2 && e2 < t2.time ? t2.time : e2; - } }, { key: "_createSetAllMessageReadPack", value: function(e2) { - var t2, n2 = { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, o2 = e2.scope, i2 = Z(this._convMap); - try { - for (i2.s(); !(t2 = i2.n()).done; ) { - var a2, s2 = Y(t2.value, 2)[1]; - if (0 < s2.unreadCount) - if (s2.type === A.CONV_C2C && 0 === n2.readAllC2CMessage) { - if (o2 === A.READ_ALL_MSG) - n2.readAllC2CMessage = 1; - else if (o2 === A.READ_ALL_C2C_MSG) { - n2.readAllC2CMessage = 1; - break; - } - } else - s2.type !== A.CONV_GROUP || o2 !== A.READ_ALL_GROUP_MSG && o2 !== A.READ_ALL_MSG || (a2 = this._getConvLastMessageSeq(s2), n2.groupMessageReadInfoList.push({ groupID: s2.groupProfile.groupID, messageSequence: a2 })); - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - return n2; - } }, { key: "onPushedAllMessageRead", value: function(e2) { - this._handleAllMsgRead(e2); - } }, { key: "_handleAllMsgRead", value: function(e2) { - var t2 = e2.groupMessageReadInfoList, e2 = e2.readAllC2CMessage, t2 = this._parseGroupReadInfo(t2); - return 1 <= this._updateAllConvUnreadCount({ readAllC2CMessage: e2 }) && this.emitConvUpdate(true, false), t2; - } }, { key: "_parseGroupReadInfo", value: function(e2) { - var t2 = []; - if (e2 && e2.length) - for (var n2 = 0, o2 = e2.length; n2 < o2; n2++) { - var i2 = e2[n2], a2 = i2.groupID, s2 = i2.sequence, r2 = i2.retCode, i2 = i2.lastMessageSeq; - N(r2) ? this._remoteGroupReadSeqMap.set(a2, i2) : (this._remoteGroupReadSeqMap.set(a2, s2), 0 !== r2 && t2.push("".concat(a2, "-").concat(s2, "-").concat(r2))); - } - return t2; - } }, { key: "_updateAllConvUnreadCount", value: function(e2) { - var t2, n2 = e2.readAllC2CMessage, o2 = 0, i2 = Z(this._convMap); - try { - for (i2.s(); !(t2 = i2.n()).done; ) { - var a2, s2, r2, c2, u2 = Y(t2.value, 2), l2 = u2[0], d2 = u2[1]; - 1 <= d2.unreadCount && (1 === n2 && d2.type === A.CONV_C2C ? (a2 = this._getConvLastMessageTime(d2), this.updateIsReadAfterReadReport({ conversationID: l2, lastMessageTime: a2 })) : d2.type === A.CONV_GROUP && (s2 = l2.replace(A.CONV_GROUP, ""), this._remoteGroupReadSeqMap.has(s2)) && (r2 = this._remoteGroupReadSeqMap.get(s2), c2 = this._getConvLastMessageSeq(d2), this.updateIsReadAfterReadReport({ conversationID: l2, remoteReadSequence: r2 }), r2 <= c2) && this._remoteGroupReadSeqMap.delete(s2), this.updateUnreadCount(l2, false)) && (o2 += 1); - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - return o2; - } }, { key: "isRemoteRead", value: function(e2) { - var t2, n2 = e2.conversationID, e2 = e2.sequence, o2 = n2.replace(A.CONV_GROUP, ""), i2 = false; - return this._remoteGroupReadSeqMap.has(o2) && (e2 <= (t2 = this._remoteGroupReadSeqMap.get(o2)) && (i2 = true, M.l("".concat(this._n, ".isRemoteRead convID:").concat(n2, " msgSeq:").concat(e2, " remoteReadSeq:").concat(t2))), t2 + 10 <= e2) && this._remoteGroupReadSeqMap.delete(o2), i2; - } }, { key: "updateIsReadAfterReadReport", value: function(e2) { - var t2 = e2.conversationID, n2 = e2.lastMessageSeq, o2 = e2.lastMessageTime, i2 = this._msgListHandler.getLocalMsgList(t2); - if (0 !== i2.length) { - for (var a2, s2 = i2.length - 1; 0 <= s2; s2--) - if (a2 = i2[s2], !(o2 && a2.time > o2 || n2 && a2.sequence > n2)) { - if ("in" === a2.flow && a2.isRead) - break; - a2.setIsRead(true); - } - } - } }, { key: "updateUnreadCount", value: function(e2) { - var t2, n2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], o2 = false, i2 = this.getLocalConversation(e2), a2 = this._msgListHandler.getLocalMsgList(e2); - if (i2) - return (t2 = i2.unreadCount) !== (a2 = a2.filter(function(e3) { - return !e3.isRead && !e3._onlineOnlyFlag && !e3.isDeleted; - }).length) && (i2.unreadCount = a2, o2 = true, M.l("".concat(this._n, ".updateUnreadCount from ").concat(t2, " to ").concat(a2, ", convID:").concat(e2)), true === n2) && this.emitConvUpdate(true, false), o2 && i2.type === A.CONV_TOPIC && (t2 = i2.unreadCount, a2 = this.get(10), n2 = e2.replace(A.CONV_GROUP, ""), a2.onUnreadCountUpdatedFromConv(n2, t2)), o2; - } }, { key: "clearGroupAtInfoList", value: function(e2) { - var t2, n2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], o2 = this.getLocalConversation(e2); - o2 && 0 < o2.groupAtInfoList.length && (o2.clearGroupAtInfoList(), M.l("".concat(this._n, ".clearGroupAtInfoList convID:").concat(e2)), o2.type === A.CONV_TOPIC && (o2 = o2.groupAtInfoList, t2 = this.get(10), e2 = e2.replace(A.CONV_GROUP, ""), t2.onAtInfoUpdated({ topicID: e2, groupAtInfoList: o2 })), true === n2) && this.emitConvUpdate(true, false); - } }, { key: "updateReadReceiptInfo", value: function(e2) { - var a2, s2, o2, r2 = this, t2 = e2.userID, i2 = void 0 === t2 ? void 0 : t2, t2 = e2.groupID, c2 = void 0 === t2 ? void 0 : t2, t2 = e2.readReceiptList, e2 = e2.timestamp, u2 = void 0 === e2 ? 0 : e2; - S(t2) || (a2 = [], N(i2) ? N(c2) || (s2 = "".concat(A.CONV_GROUP).concat(c2), t2.forEach(function(e3) { - var t3 = e3.tinyID, n2 = e3.clientTime, o3 = e3.random, i3 = e3.readCount, e3 = e3.unreadCount, t3 = "".concat(t3, "-").concat(n2, "-").concat(o3), n2 = r2._msgListHandler.getLocalMsg(s2, t3) || r2._msgListHandler.getHoppingMsg(s2, t3), o3 = { groupID: c2, messageID: t3, readCount: 0, unreadCount: 0 }; - n2 && (R(i3) && (n2.readReceiptInfo.readCount = i3, o3.readCount = i3), R(e3) && (n2.readReceiptInfo.unreadCount = e3, o3.unreadCount = e3), a2.push(o3)); - })) : (o2 = "".concat(A.CONV_C2C).concat(i2), t2.forEach(function(e3) { - var t3 = e3.tinyID, n2 = e3.clientTime, e3 = e3.random, t3 = "".concat(t3, "-").concat(n2, "-").concat(e3), n2 = r2._msgListHandler.getLocalMsg(o2, t3) || r2._msgListHandler.getHoppingMsg(o2, t3); - n2 && !n2.readReceiptInfo.isPeerRead && (n2.readReceiptInfo.isPeerRead = true, n2.readReceiptInfo.timestamp = u2, a2.push({ userID: i2, messageID: t3, isPeerRead: true, timestamp: u2 })); - })), 0 < a2.length && this.emitOEvt(h.MESSAGE_READ_RECEIPT_RECEIVED, a2)); - } }, { key: "updateIsRead", value: function(e2) { - var t2 = this.getLocalConversation(e2), n2 = this.getLocalMessageList(e2); - if (t2 && 0 !== n2.length && !bt(t2.type)) { - for (var o2 = [], i2 = 0, a2 = n2.length; i2 < a2; i2++) - "in" !== n2[i2].flow ? "out" !== n2[i2].flow || n2[i2].isRead || n2[i2].setIsRead(true) : o2.push(n2[i2]); - var s2 = 0; - s2 = t2.type === A.CONV_C2C ? (e2 = o2.slice(-t2.unreadCount).filter(function(e3) { - return e3.isRevoked; - }).length, o2.length - t2.unreadCount - e2) : o2.length - t2.unreadCount; - for (var r2 = 0; r2 < s2 && !o2[r2].isRead; r2++) - o2[r2].setIsRead(true); - } - } }, { key: "deleteGroupAtTips", value: function(e2) { - var t2, n2, o2, i2 = this, a2 = "".concat(this._n, ".deleteGroupAtTips"), s2 = (M.l("".concat(a2)), this._convMap.get(e2)); - return !s2 || 0 === (t2 = s2.groupAtInfoList).length ? Promise.resolve() : (s2 = void 0, e2.startsWith(A.CONV_GROUP) && (s2 = e2.replace(A.CONV_GROUP, "")), n2 = p(t2), (Nt({ groupID: s2 }) || Gt(s2)) && 0 === (n2 = t2.filter(function(e3) { - return !e3.atTypeArray.includes(A.CONV_AT_ALL); - })).length ? (this.clearGroupAtInfoList(e2, false), Promise.resolve()) : (o2 = this.getMyUserID(), this.req({ P: k.DEL_GROUP_AT_TIPS, data: { messageListToDelete: n2.map(function(e3) { - return { from: e3.from, to: o2, messageSeq: e3.__sequence, messageRandom: e3.__random, groupID: N(e3.topicID) ? e3.groupID : e3.topicID }; - }) } }).then(function() { - return M.l("".concat(a2, " ok. count:").concat(t2.length)), i2.clearGroupAtInfoList(e2, false), Promise.resolve(); - }).catch(function(e3) { - return M.e("".concat(a2, " failed. error:"), e3), D(e3); - }))); - } }, { key: "appendToMessageList", value: function(e2) { - return this._msgListHandler.pushIn(e2); - } }, { key: "setMessageRandom", value: function(e2) { - this._sll.set(e2.random); - } }, { key: "deleteMessageRandom", value: function(e2) { - this._sll.delete(e2.random); - } }, { key: "pushIntoMessageList", value: function(e2, t2, n2) { - return !(!this._msgListHandler.pushIn(t2, n2) || this._sll.has(t2.random) && !n2 || (e2.push(t2), 0)); - } }, { key: "revoke", value: function(e2, t2, n2) { - return this._msgListHandler.revoke(e2, t2, n2); - } }, { key: "getPeerReadTime", value: function(e2) { - return this._peerReadTimeMap.get(e2); - } }, { key: "recordPeerReadTime", value: function(e2, t2) { - (!this._peerReadTimeMap.has(e2) || this._peerReadTimeMap.get(e2) < t2) && this._peerReadTimeMap.set(e2, t2); - } }, { key: "updateMsgIsPeerReadProp", value: function(e2, t2) { - var n2; - e2.startsWith(A.CONV_C2C) && 0 < t2 && (0 < (n2 = this._msgListHandler.updateMsgIsPeerReadProp(e2, t2)).length && this.emitOEvt(h.MESSAGE_READ_BY_PEER, n2), this._convMap.has(e2)) && !S(n2 = this._convMap.get(e2).lastMessage) && n2.fromAccount === this.getMyUserID() && n2.lastTime <= t2 && !n2.isPeerRead && (n2.isPeerRead = true, this.emitConvUpdate(true, false)); - } }, { key: "updateMsgIsModifiedProp", value: function(e2) { - this._msgListHandler.updateMsgIsModifiedProp(e2); - } }, { key: "setCompleted", value: function(e2) { - M.l("".concat(this._n, ".setCompleted convID:").concat(e2)), this._completedMap.set(e2, true); - } }, { key: "updateRoamingMsgKeyAndTime", value: function(e2, t2, n2) { - this._roamingMsgKeyAndTimeMap.set(e2, { messageKey: t2, lastMessageTime: n2 }); - } }, { key: "getConvList", value: function(t2) { - var n2, o2 = this, i2 = "".concat(this._n, ".").concat("getConvList"), e2 = "pagingStatus:".concat(this._pagingStatus, ", local conversation count:").concat(this._convMap.size, ", options:").concat(JSON.stringify(t2)); - return M.l("".concat(i2, ". ").concat(e2)), this._pagingStatus === Un ? ((n2 = new G("getConvList")).setMessage(e2), this.syncConvList().then(function() { - n2.end(); - var e3 = o2._getConvList(t2); - return C({ conversationList: e3, isSyncCompleted: o2._isSyncCompleted() }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })) : (e2 = this._getConvList(t2), M.l("".concat(i2, ". returned conversation count:").concat(e2.length)), T({ conversationList: e2, isSyncCompleted: this._isSyncCompleted() })); - } }, { key: "_getConvList", value: function(t2) { - var n2, o2, i2, a2, s2, r2 = this; - return N(t2) ? this.getLocalConvList() : O(t2) ? 0 === t2.length ? [] : this.getLocalConvList().filter(function(e2) { - return t2.includes(e2.conversationID); - }) : f(t2) ? (n2 = t2.type, o2 = t2.markType, i2 = t2.groupName, a2 = t2.hasUnreadCount, s2 = t2.hasGroupAtInfo, this.getLocalConvList().filter(function(e2) { - return r2._filterType(e2, n2) && r2._filterMarkType(e2, o2) && r2._filterGroupName(e2, i2) && r2._filterUnreadCount(e2, a2) && r2._filterGroupAtInfo(e2, s2); - })) : []; - } }, { key: "_filterType", value: function(e2, t2) { - return t2 !== A.CONV_C2C && t2 !== A.CONV_GROUP || e2.type === t2; - } }, { key: "_filterGroupName", value: function(e2, t2) { - return !m(t2) || ("" === t2 ? 0 === e2.conversationGroupList.length : e2.conversationGroupList.includes(t2)); - } }, { key: "_filterMarkType", value: function(e2, t2) { - return !R(t2) || (0 === t2 ? 0 === e2.markList.length : e2.markList.includes(t2)); - } }, { key: "_filterUnreadCount", value: function(e2, t2) { - var n2 = true; - return true === t2 ? n2 = 1 <= e2.unreadCount : false === t2 && (n2 = 0 === e2.unreadCount), n2; - } }, { key: "_filterGroupAtInfo", value: function(e2, t2) { - var n2 = true; - return true === t2 ? n2 = 1 <= e2.groupAtInfoList.length : false === t2 && (n2 = 0 === e2.groupAtInfoList.length), n2; - } }, { key: "_handleC2CPeerReadTime", value: function() { - var e2, t2 = Z(this._convMap); - try { - for (t2.s(); !(e2 = t2.n()).done; ) { - var n2 = Y(e2.value, 2), o2 = n2[0], i2 = n2[1]; - i2.type === A.CONV_C2C && this.recordPeerReadTime(o2, i2.peerReadTime); - } - } catch (e3) { - t2.e(e3); - } finally { - t2.f(); - } - } }, { key: "_isPagingGetGroupListCompleted", value: function() { - var e2 = this.get(7); - return !e2 || e2.isPagingGetCompleted(); - } }, { key: "_getLocalGroupCount", value: function() { - var e2 = this.get(7); - return e2 ? e2.getLocalGroupList().length : 0; - } }, { key: "_hasLocalGroup", value: function(e2) { - var t2 = this.get(7); - return !!t2 && t2.hasLocalGroup(e2.replace(A.CONV_GROUP, "")); - } }, { key: "getConversationProfile", value: function(o2) { - var i2, a2 = this, s2 = false; - if (this._convMap.has(o2) ? i2 = this._convMap.get(o2) : (i2 = new ii({ conversationID: o2, type: Pt(o2) ? A.CONV_C2C : A.CONV_GROUP }, this.isIntl(), this.isUsingChatCore()), s2 = true), i2._isInfoCompleted || i2.type === A.CONV_SYSTEM) - return T({ conversation: i2 }); - if (Ut(o2)) { - if (!this.get(7)) - return D({ code: L.NO_MODULE }); - if (!this._hasLocalGroup(o2)) - return T({ conversation: i2 }); - } - var r2 = "".concat(this._n, ".").concat("getConversationProfile"), c2 = new G("getConversationProfile"); - return M.l("".concat(r2, ". convID:").concat(o2, " remark:").concat(i2.remark, " lastMessage:"), i2.lastMessage), this._getUserOrGroupProfile(i2).then(function(e2) { - c2.setMessage("convID:".concat(o2, " unreadCount:").concat(e2.data.conversation.unreadCount)).end(); - var t2, n2 = a2.get(8); - if (n2 && i2.type === A.CONV_C2C && (t2 = o2.replace(A.CONV_C2C, ""), n2.isMyFriend(t2)) && (n2 = n2.getFriendRemark(t2), i2.remark !== n2) && (i2.remark = n2, M.l("".concat(r2, ". convID:").concat(o2, " patch remark:").concat(i2.remark))), M.l("".concat(r2, " ok. isNewConv:").concat(s2, " convID:").concat(o2)), s2) { - if (i2.type === A.CONV_C2C) - return a2._onNewC2CConv([o2.replace(A.CONV_C2C, "")]).then(function() { - return T({ conversation: i2 }); - }); - if (i2.type === A.CONV_GROUP) - return a2._onNewGroupConv([o2.replace(A.CONV_GROUP, "")]).then(function() { - return T({ conversation: i2 }); - }); - } - return e2; - }).catch(function(e2) { - return c2.setError(e2).setMessage("convID:".concat(o2)).end(), M.e("".concat(r2, " failed. error:"), e2), D(e2); - }); - } }, { key: "_getUserOrGroupProfile", value: function(t2) { - var n2 = this; - return t2.type === A.CONV_C2C ? this.get(4).getUserProfile({ userIDList: [t2.toAccount] }).then(function(e2) { - e2 = e2.data; - return 0 === e2.length ? D({ code: L.USER_OR_GRP_NOT_FOUND }) : (t2.userProfile = e2[0], t2._isInfoCompleted = true, n2._insertConvAfterTopmost(t2), T({ conversation: t2 })); - }) : this.get(7).getGroupProfile({ groupID: t2.toAccount }).then(function(e2) { - return t2.groupProfile = e2.data.group, t2._isInfoCompleted = true, n2._insertConvAfterTopmost(t2), T({ conversation: t2 }); - }); - } }, { key: "_insertConvAfterTopmost", value: function(e2) { - var t2, n2; - e2 instanceof ii && !this._convMap.has(e2.conversationID) && (n2 = (t2 = p(this._convMap)).findIndex(function(e3) { - return false === e3[1].isPinned; - }), t2.splice(n2, 0, [e2.conversationID, e2]), this._convMap = new Map(t2), this._setStorageConvList(), this.emitConvUpdate(true, false)); - } }, { key: "_onProfileUpdated", value: function(e2) { - var n2 = this; - e2.data.forEach(function(e3) { - var t2 = e3.userID; - t2 === n2.getMyUserID() ? n2._onMyProfileModified({ latestNick: e3.nick, latestAvatar: e3.avatar }) : (t2 = n2._convMap.get("".concat(A.CONV_C2C).concat(t2))) && (t2.userProfile = e3); - }); - } }, { key: "_onCloudConfig", value: function(e2) { - "0" === this.getCloudConfig("pull_on_invite") && (this._bPullOnInvite = false), M.l("".concat(this._n, "._onCloudConfig bPullOnInvite:").concat(this._bPullOnInvite)); - } }, { key: "disableMsgPullOnInvite", value: function() { - this._bPullOnInvite = false; - } }, { key: "_isSyncCompleted", value: function() { - return this._pagingStatus === Pn; - } }, { key: "_errorLog", value: function(e2, t2, n2, o2) { - var i2 = new Error("Params validate failed."), a2 = "".concat(this.getErrMsg("API_REFER")).concat(e2); - throw M.w("[".concat(e2, "] | ").concat(t2, " | ").concat(this.getErrMsg(n2, o2), ", ").concat(a2)), M.e("[".concat(e2, "] Invalid ").concat(t2, ": type check failed for ").concat(t2, ".")), i2; - } }, { key: "_isValidConvID", value: function(e2) { - return Pt(e2) || Ut(e2) || bt(e2); - } }, { key: "deleteConversation", value: function(e2) { - var t2 = this, n2 = "deleteConversation"; - return m(e2) || ut(e2) || this._errorLog(n2, "options", "StringOrObjectRequiredLog"), m(e2) ? (this._isValidConvID(e2) || this._errorLog(n2, "options", "InvalidConversationID", e2), M.l("".concat(this._n, ".").concat(n2, " convID:").concat(e2)), this.deleteConvList({ conversationIDList: [e2], flag: 1 })) : (O(e2.conversationIDList) || this._errorLog(n2, "conversationIDList", "ArrayRequiredLog"), 0 === e2.conversationIDList.length && this._errorLog(n2, "conversationIDList", "NonEmptyArrayLog"), e2.conversationIDList.forEach(function(e3) { - t2._isValidConvID(e3) || t2._errorLog(n2, "conversationIDList", "InvalidConversationID", e3); - }), "clearHistoryMessage" in e2 && "boolean" != typeof e2.clearHistoryMessage && this._errorLog(n2, "clearHistoryMessage", "BooleanRequiredLog"), 100 < e2.conversationIDList.length && (e2.conversationIDList = e2.conversationIDList.slice(0, 100)), this.deleteConvList(e2)); - } }, { key: "deleteConvList", value: function(e2) { - var t2 = e2.conversationIDList, t2 = void 0 === t2 ? [] : t2, n2 = e2.clearHistoryMessage, n2 = void 0 === n2 || n2, e2 = e2.flag, o2 = void 0 === e2 ? 0 : e2, i2 = "".concat(this._n, ".").concat("deleteConvList"), e2 = "convIDList:".concat(t2, " clearHistoryMessage:").concat(n2), a2 = (M.l("".concat(i2, " ").concat(e2)), new G("deleteConvList")); - return a2.setMessage(e2), Promise.all([this.rmLocalOnlyConvList(t2), this.rmLocalAndRemoteConvList(t2, n2)]).then(function(e3) { - a2.end(); - e3 = [].concat(p(e3[0]), p(e3[1])); - return 0 === e3.length ? D(new E({ code: L.CONV_NOT_FOUND })) : (M.l("".concat(i2, " ok")), T(1 === o2 ? { conversationID: e3[0] } : { conversationIDList: e3 })); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - }); - } }, { key: "rmLocalOnlyConvList", value: function(e2) { - var n2 = this; - return e2.filter(function(e3) { - var t2; - return !!n2._convMap.has(e3) && ((t2 = n2.getLocalConversation(e3).type) !== A.CONV_GROUP || n2._hasLocalGroup(e3) ? t2 === A.CONV_SYSTEM && (n2.get(7).deleteGroupSystemNotice({ messageList: n2._msgListHandler.getLocalMsgList(e3) }), n2.deleteLocalConv(e3), true) : (n2.deleteLocalConv(e3), true)); - }); - } }, { key: "rmLocalAndRemoteConvList", value: function(e2, t2) { - var n2 = this, o2 = { fromAccount: this.getMyUserID(), conversationList: [], clearHistoryMessage: t2 ? 1 : 0 }; - return e2.forEach(function(e3) { - var t3; - n2._convMap.has(e3) && ((t3 = n2.getLocalConversation(e3).type) === A.CONV_C2C ? o2.conversationList.push({ toAccount: e3.replace(t3, ""), type: 1 }) : t3 === A.CONV_GROUP && n2._hasLocalGroup(e3) && o2.conversationList.push({ toGroupID: e3.replace(t3, ""), type: 2 })); - }), 0 === o2.conversationList.length ? [] : this.req({ P: k.DEL_CONV, data: o2 }).then(function(e3) { - var t3 = []; - return 0 < e3.data.resultList.length && e3.data.resultList.map(function(e4) { - 0 === e4.code && (e4 = 1 === e4.type ? "".concat(A.CONV_C2C).concat(e4.to) : "".concat(A.CONV_GROUP).concat(e4.groupID), t3.push(e4)); - }), n2.deleteLocalConvList(t3), t3; - }); - } }, { key: "setConvDraft", value: function(e2) { - var t2 = e2.conversationID, e2 = e2.draftText, n2 = "".concat(this._n, ".").concat("setConvDraft"); - return M.l("".concat(n2, " convID:").concat(t2, " draftText:").concat(e2)), this._convMap.has(t2) ? ((n2 = this._convMap.get(t2)).setDraftText(e2), this.emitConvUpdate(), T({ code: 0, conversation: n2 })) : D({ code: L.CONV_NOT_FOUND }); - } }, { key: "clearHistoryMessage", value: function(t2) { - var n2 = this, e2 = { fromAccount: this.getMyUserID(), toAccount: void 0, type: void 0, toGroupID: void 0 }; - if (!this._convMap.has(t2)) - return D({ code: L.CONV_NOT_FOUND }); - var o2 = this._convMap.get(t2).type; - if (o2 === A.CONV_C2C) - e2.type = 1, e2.toAccount = t2.replace(A.CONV_C2C, ""); - else { - if (o2 !== A.CONV_GROUP) - return o2 === A.CONV_SYSTEM ? (this.get(7).deleteGroupSystemNotice({ messageList: this._msgListHandler.getLocalMsgList(t2) }), T({ conversationID: t2 })) : D({ code: L.CONV_UN_RECORDED_TYPE }); - e2.type = 2, e2.toGroupID = t2.replace(A.CONV_GROUP, ""); - } - var i2 = "".concat(this._n, ".").concat("clearHistoryMessage"), a2 = new G("clearHistoryMessage"); - return a2.setMessage("convID:".concat(t2)), M.l("".concat(i2, ". convID:").concat(t2)), this.setMessageRead({ conversationID: t2 }).then(function() { - return n2.req({ P: k.CLEAR_HISTORY_MSG, data: e2 }); - }).then(function() { - a2.end(), M.l("".concat(i2, " ok")), n2.clearMemMsg(t2); - var e3 = n2.getLocalConversation(t2); - return e3 && (e3.updateLastMessage(), n2._sortConvListAndEmitEvent()), T({ conversationID: t2 }); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - }); - } }, { key: "pinConversation", value: function(e2) { - var t2, n2, o2, i2 = this, a2 = e2.conversationID, s2 = e2.isPinned, r2 = this.getLocalConversation(a2); - return r2 && r2.isPinned === s2 ? T({ conversationID: a2 }) : bt(a2) ? (r2 && (r2.isPinned = s2), this._sortConvListAndEmitEvent(), T({ conversationID: a2 })) : (e2 = null, Pt(a2) ? e2 = { type: 1, toAccount: a2.replace(A.CONV_C2C, "") } : Ut(a2) && (e2 = { type: 2, groupID: a2.replace(A.CONV_GROUP, "") }), null === e2 ? D({ code: L.INVALID_CONV_ID }) : (t2 = "".concat(this._n, ".").concat("pinConversation"), n2 = "convID:".concat(a2, " isPinned:").concat(s2), (o2 = new G("pinConversation")).setMessage(n2), M.l("".concat(t2, ". ").concat(n2)), this.req({ P: k.PIN_CONV, data: { fromAccount: this.getMyUserID(), operationType: true === s2 ? 1 : 2, itemList: [e2] } }).then(function() { - return o2.end(), M.l("".concat(t2, " ok")), r2 ? r2.isPinned !== s2 && (r2.isPinned = s2) : i2._convMap.set(a2, new ii({ conversationID: a2, type: Pt(a2) ? A.CONV_C2C : A.CONV_GROUP, isPinned: s2 }, i2.isIntl(), i2.isUsingChatCore())), i2._sortConvListAndEmitEvent(), C({ conversationID: a2 }); - }).catch(function(e3) { - return o2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - }))); - } }, { key: "setMessageRemindType", value: function(e2) { - return this._msgRemindHandler.set(e2); - } }, { key: "patchMsgRemindType", value: function(e2) { - var t2 = e2.ID, n2 = e2.isC2CConversation, o2 = e2.messageRemindType, i2 = false, n2 = this.getLocalConversation("".concat(n2 ? A.CONV_C2C : A.CONV_GROUP).concat(t2)); - return n2 && n2.messageRemindType !== o2 && (n2.messageRemindType = o2, i2 = true), M.l("".concat(this._n, ".patchMsgRemindType options:"), e2, "ret:".concat(i2)), i2; - } }, { key: "onC2CMsgRemindTypeFetched", value: function(e2) { - var n2, o2 = this; - O(e2) && 0 < e2.length && (n2 = 0, e2.forEach(function(e3) { - var t2 = e3.userID, e3 = e3.muteFlag, e3 = o2._transMsgRemindType(e3); - true === o2.patchMsgRemindType({ ID: t2, isC2CConversation: true, messageRemindType: e3 }) && (n2 += 1); - }), M.l("".concat(this._n, ".onC2CMsgRemindTypeFetched updateCount:").concat(n2)), 1 <= n2) && this.emitConvUpdate(true, false); - } }, { key: "onC2CMsgRemindTypeSynced", value: function(e2) { - var n2 = this, o2 = "".concat(this._n, ".onC2CMsgRemindTypeSynced"); - e2.dataList.forEach(function(e3) { - var t2; - S(e3.muteNotificationsSync) || (t2 = (e3 = e3.muteNotificationsSync).to, e3 = e3.muteFlag, e3 = n2._transMsgRemindType(e3), n2.patchMsgRemindType({ ID: t2, isC2CConversation: !(t2 = 0), messageRemindType: e3 }) && (t2 += 1), M.l("".concat(o2, " updateCount:").concat(t2)), 1 <= t2 && n2.emitConvUpdate(true, false)); - }); - } }, { key: "onGroupMsgRemindTypeUpdated", value: function(e2) { - this._msgRemindHandler.onGroupMsgRemindTypeUpdated(e2); - } }, { key: "deleteLocalConv", value: function(e2) { - var t2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], n2 = this._convMap.has(e2); - M.l("".concat(this._n, ".deleteLocalConv convID:").concat(e2, " has:").concat(n2)), n2 && (this._convMap.delete(e2), this._convMapForDiff.delete(e2), this.clearMemMsg(e2), this._setStorageConvList(true), t2) && (n2 = !this._isTopicConv(e2), this.emitConvUpdate(n2, false)); - } }, { key: "pullMsgOnInvite", value: function(e2) { - var t2, n2, o2, i2, a2, s2 = this.get(7); - s2 && (t2 = "".concat(this._n, ".pullMsgOnInvite"), M.l("".concat(t2, " flag:").concat(this._bPullOnInvite)), this._bPullOnInvite) && (a2 = this.getLocalLastMessage(e2), n2 = this.getLocalSecondLastMessage(e2), i2 = o2 = 1, a2 && (o2 = a2.sequence), n2 && (i2 = n2.sequence), a2 = s2.getGroupRemoteLastSeq(e2.replace(A.CONV_GROUP, "")), M.l("".concat(t2, " convID:").concat(e2, " localLastSeq:").concat(o2, " localSecondLastSeq:").concat(i2, " remoteLastSeq:").concat(a2)), this.clearMemMsg(e2), 1 < o2 - i2 ? this._recursiveGetMsgList([], e2, false, o2, i2) : 1 < a2 - o2 && this._recursiveGetMsgList([], e2, true, a2, o2)); - } }, { key: "_recursiveGetMsgList", value: function(i2, a2, s2, r2, c2, e2) { - var u2 = this; - this.getMessageList({ conversationID: a2, nextReqMessageID: e2 }).then(function(e3) { - var e3 = e3.data, t2 = e3.messageList, n2 = e3.isCompleted, e3 = e3.nextReqMessageID, o2 = t2.filter(function(e4) { - return s2 ? e4.sequence > c2 && e4.sequence <= r2 : e4.sequence > c2 && e4.sequence < r2; - }); - i2.unshift.apply(i2, p(o2)), !n2 && 0 < t2.length && t2[0].sequence > c2 && i2.length < 60 ? u2._recursiveGetMsgList(i2, a2, s2, r2, c2, e3) : u2._emitMsgReceived(a2, i2); - }); - } }, { key: "_emitMsgReceived", value: function(e2, t2) { - var n2, o2, i2 = this; - 0 < t2.length && (t2 = t2.filter(function(t3, e3, n3) { - return e3 === n3.findIndex(function(e4) { - return e4.sequence === t3.sequence; - }); - }), n2 = this.hasLocalConversation(e2), o2 = t2.map(function(e3) { - return e3.sequence; - }), M.l("".concat(this._n, "._emitMsgReceived convID:").concat(e2, " has:").concat(n2, " count:").concat(o2.length, " sequenceList:"), o2), this.emitOEvt(h.MESSAGE_RECEIVED, t2), n2 ? this.patchConvLastMessage(e2, true) : this.getConversationProfile(e2).then(function() { - i2.patchConvLastMessage(e2, true); - })); - } }, { key: "deleteLocalConvList", value: function(e2) { - var t2 = this, n2 = false; - e2.forEach(function(e3) { - t2._convMap.has(e3) && (t2.deleteLocalConv(e3, false), n2 = true); - }), M.l("".concat(this._n, ".deleteLocalConvList convID:").concat(e2, " isConvIDExisted:").concat(n2)), n2 && this.emitConvUpdate(true, false); - } }, { key: "isMessageSentByCurrentInstance", value: function(e2) { - return !(!this._msgListHandler.hasLocalMsg(e2.conversationID, e2.ID) && !this._sll.has(e2.random)); - } }, { key: "modifyMessageList", value: function(e2) { - var t2, n2; - e2.startsWith(A.CONV_C2C) && this._convMap.has(e2) && (n2 = this._convMap.get(e2), t2 = Date.now(), this._msgListHandler.modifyMsgSentByPeer({ conversationID: e2, latestNick: n2.userProfile.nick, latestAvatar: n2.userProfile.avatar }), n2 = this.get(4).getNickAndAvatarByUserID(this.getMyUserID()), this._msgListHandler.modifyMsgSentByMe({ conversationID: e2, latestNick: n2.nick, latestAvatar: n2.avatar }), M.l("".concat(this._n, ".modifyMessageList convID:").concat(e2, " cost:").concat(nn(t2)))); - } }, { key: "updateUserProfileSpecifiedKey", value: function(e2) { - M.l("".concat(this._n, ".updateUserProfileSpecifiedKey options:"), e2); - var t2 = e2.conversationID, n2 = e2.nick, e2 = e2.avatar; - this._convMap.has(t2) && (t2 = this._convMap.get(t2).userProfile, m(n2) && t2.nick !== n2 && (t2.nick = n2), m(e2) && t2.avatar !== e2 && (t2.avatar = e2), this.emitConvUpdate(true, false)); - } }, { key: "_onMyProfileModified", value: function(t2) { - var n2 = this, e2 = this.getLocalConvList(), o2 = Date.now(); - e2.forEach(function(e3) { - n2.modifyMessageSentByMe(y({ conversationID: e3.conversationID }, t2)); - }), M.l("".concat(this._n, "._onMyProfileModified. modify all messages sent by me, cost:").concat(nn(o2))); - } }, { key: "modifyMessageSentByMe", value: function(e2) { - this._msgListHandler.modifyMsgSentByMe(e2); - } }, { key: "getLatestMessageSentByMe", value: function(e2) { - return this._msgListHandler.getLatestMsgSentByMe(e2); - } }, { key: "modifyMessageSentByPeer", value: function(e2) { - this._msgListHandler.modifyMsgSentByPeer(e2); - } }, { key: "getLatestMessageSentByPeer", value: function(e2) { - return this._msgListHandler.getLatestMsgSentByPeer(e2); - } }, { key: "pushIntoNoticeResult", value: function(e2, t2) { - return !(!this._msgListHandler.pushIn(t2) || this._sll.has(t2.random) || (e2.push(t2), 0)); - } }, { key: "getLocalLastMessage", value: function(e2) { - return this._msgListHandler.getLocalLastMsg(e2); - } }, { key: "getLocalSecondLastMessage", value: function(e2) { - return this._msgListHandler.getLocalSecondLastMsg(e2); - } }, { key: "checkAndPatchRemark", value: function() { - var e2, n2, o2 = this.get(8); - 0 !== this._convMap.size && o2 && 0 !== (e2 = p(this._convMap.values()).filter(function(e3) { - return e3.type === A.CONV_C2C; - })).length && (n2 = 0, e2.forEach(function(e3) { - var t2 = e3.conversationID.replace(A.CONV_C2C, ""); - o2.isMyFriend(t2) && (t2 = o2.getFriendRemark(t2), e3.remark !== t2) && (e3.remark = t2, n2 += 1); - }), M.l("".concat(this._n, ".checkAndPatchRemark. c2cConvCount:").concat(e2.length, " patchedCount:").concat(n2)), 0 < n2) && this.emitConvUpdate(true, false); - } }, { key: "updateTopicConversation", value: function(e2) { - this._updateLocalConvList({ conversationOptionsList: e2, isFromGetConversations: true, updateUnreadCount: true }); - } }, { key: "sendReadReceipt", value: function(e2) { - var t2 = e2[0], n2 = null; - return t2.conversationType === A.CONV_C2C ? n2 = this._m.get(6) : t2.conversationType === A.CONV_GROUP && (n2 = this._m.get(7)), n2 ? n2.sendReadReceipt(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getReadReceiptList", value: function(e2) { - var t2 = e2[0], n2 = null; - return t2.conversationType === A.CONV_C2C ? n2 = this._m.get(6) : t2.conversationType === A.CONV_GROUP && (n2 = this._m.get(7)), n2 ? n2.getReadReceiptList(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getLastMessageTime", value: function(e2) { - e2 = this.getLocalConversation(e2); - return e2 ? e2.lastMessage.lastTime : 0; - } }, { key: "getTotalUnreadCount", value: function() { - var e2 = this.getLocalConvList(), t2 = 0; - return e2.forEach(function(e3) { - e3.type === A.CONV_SYSTEM || "" !== e3.messageRemindType && e3.messageRemindType !== A.MSG_REMIND_ACPT_AND_NOTE || (t2 += e3.unreadCount); - }), t2; - } }, { key: "onTotalUnreadCountUpdate", value: function() { - var e2 = this.getTotalUnreadCount(); - this._convTotalUnreadCount !== e2 && (M.l("".concat(this._n, ".onTotalUnreadCountUpdate from ").concat(this._convTotalUnreadCount, " to ").concat(e2)), this._convTotalUnreadCount = e2, this.emitOEvt(h.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED)); - } }, { key: "_isConvNeedShow", value: function(e2) { - var t2, n2, e2 = this.getLocalConversation(e2); - return !(!N(e2) && (t2 = e2.type === A.CONV_TOPIC, n2 = e2.type === A.CONV_GROUP && e2.groupProfile.type === A.GRP_ROOM, e2 = e2.type === A.CONV_GROUP && e2.groupProfile.type === A.GRP_LIVE, t2 || n2 || e2)); - } }, { key: "setAllRcvMsgOpt", value: function(e2) { - return this._msgRemindHandler.setAllRcvMsgOpt(e2); - } }, { key: "getAllRcvMsgOpt", value: function() { - return this._msgRemindHandler.getAllRcvMsgOpt(); - } }, { key: "onAllRcvMsgOptNotify", value: function(e2) { - this._msgRemindHandler.onAllRcvMsgOptNotify(e2); - } }, { key: "clearUnreadCount", value: function(e2) { - e2 = this.getLocalConversation(e2); - e2 && 0 < e2.unreadCount && (e2.unreadCount = 0, this.emitConvUpdate(true, false)); - } }, { key: "storeHoppingMessageList", value: function(e2) { - this._msgListHandler.storeHoppingMsgList(e2); - } }, { key: "clearMemMsg", value: function(e2) { - var t2 = 1 < arguments.length && void 0 !== arguments[1] && arguments[1]; - M.l("".concat(this._n, ".clearMemMsg convID:").concat(e2, " isOverLimit:").concat(t2)), this._msgListHandler.removeByConvID(e2), this._completedMap.delete(e2), this._roamingMsgKeyAndTimeMap.delete(e2), this._everClearedMap.set(e2, 1); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._setStorageConvList(true), this._pagingStatus = Nn, this._msgListHandler.reset(), this._msgRemindHandler.reset(), this._roamingMsgKeyAndTimeMap.clear(), this._sll.reset(), this._peerReadTimeMap.clear(), this._completedMap.clear(), this._convMap.clear(), this._pagingTs = 0, this._pagingStartIdx = 0, this._pagingPinnedTs = 0, this._pagingPinnedStartIdx = 0, this._remoteGroupReadSeqMap.clear(), this._convTotalUnreadCount = 0, this._pagingGetCostList.length = 0, this._pagingConvIDMap.clear(), this._convIDFromUnreadDBMap.clear(), this._pagingGetCostList.length = 0, this._convMapForDiff.clear(), this._partialUpdatedConvMap.clear(), this._everClearedMap.clear(), this._bPullOnInvite = true, this._convGroupHandler.reset(), this.resetReady(); - } }]), Zi), ui = (e(Xi, [{ key: "onCheckTimer", value: function(e2) { - e2 % 1 == 0 && 0 < this._cachedGroupTipsMap.size && this._check(); - } }, { key: "_check", value: function() { - var i2 = this; - this._cachedGroupTipsMap.forEach(function(e2, t2) { - var n2 = i2._checkCountMap.get(t2), o2 = i2._grpM.hasLocalGroup(t2); - M.l("".concat(i2._n, "._check groupID:").concat(t2, " hasLocalGroup:").concat(o2, " checkCount:").concat(n2)), o2 ? (i2._notifyCachedGroupTips(t2), i2._checkCountMap.delete(t2), i2._grpM.deleteUnjoinedAVChatRoom(t2)) : n2 >= i2.MAX_CHECK_COUNT ? (i2._deleteCachedGroupTips(t2), i2._checkCountMap.delete(t2)) : i2._checkCountMap.set(t2, ++n2); - }); - } }, { key: "onNewGroupTips", value: function(e2) { - M.l("".concat(this._n, ".onNewGroupTips options:").concat(JSON.stringify(e2.dataList))); - var e2 = this._assembly(e2), t2 = e2.eventDataList, n2 = e2.result, e2 = e2.AVChatRoomMessageList; - 0 < e2.length && this._grpM.onAVChatRoomMessage(e2), 0 < n2.length && (this._grpM.emitOEvt(h.MESSAGE_RECEIVED, n2), this._handleTips(n2)), 0 < t2.length && (this._grpM.updateNextMessageSeq(t2), this._grpM.get(11).onNewMessage({ conversationOptionsList: t2, isInstantMessage: true })); - } }, { key: "_assembly", value: function(e2) { - for (var t2 = e2.event, n2 = e2.dataList, o2 = null, i2 = [], a2 = [], s2 = {}, r2 = [], c2 = 0, u2 = n2.length; c2 < u2; c2++) { - var l2 = Mt(n2[c2]); - if (6 === t2) { - if (this._grpM.isGroupAttributesUpdatedNotice(l2)) - continue; - if (this._grpM.isGroupCountersNotice(l2)) - continue; - } - var d2 = l2.groupProfile, p2 = d2.groupID, _2 = d2.communityType, _2 = void 0 === _2 ? 0 : _2, h2 = d2.topicID, h2 = void 0 === h2 ? void 0 : h2, g2 = d2.invisible, d2 = d2.groupType, d2 = void 0 === d2 ? void 0 : d2, f2 = void 0, m2 = this._grpM.isMessageFromTopic(_2, h2), v2 = (m2 && (f2 = A.CONV_TOPIC, l2.to = h2), this._grpM.hasLocalGroup(p2)); - if (v2 || !this._grpM.isUnjoinedAVChatRoom(p2)) - if (v2 || m2) - if (this._grpM.isMessageFromOrToAVChatroom(p2)) - l2.event = t2, r2.push(l2); - else if (l2.currentUser = this._grpM.getMyUserID(), l2.conversationType = A.CONV_GROUP, (o2 = new Do(l2)).setElement({ type: A.MSG_GRP_TIP, content: y(y({}, l2.elements), {}, { groupProfile: l2.groupProfile }) }), o2.isSystemMessage = false, 1 !== g2) { - var v2 = this._grpM.get(11), m2 = o2, g2 = m2.conversationID, m2 = m2.sequence; - if (6 === t2) - o2._onlineOnlyFlag = true, a2.push(o2); - else if (!v2.pushIntoNoticeResult(a2, o2)) - continue; - this._grpM.isMessageFromCommunityOfTopic(_2, h2) || 6 === t2 && v2.getLocalConversation(g2) || (6 !== t2 && this._qualityStat(o2), _2 = v2.isRemoteRead({ conversationID: g2, sequence: m2 }), N(s2[g2]) ? (h2 = 0, "in" !== o2.flow || o2._isExcludedFromUnreadCount || o2._onlineOnlyFlag || _2 || (h2 = 1), s2[g2] = i2.push({ conversationID: g2, unreadCount: h2, type: N(f2) ? o2.conversationType : f2, subType: o2.conversationSubType, lastMessage: o2._isExcludedFromLastMessage ? "" : o2 }) - 1) : (i2[v2 = s2[g2]].type = o2.conversationType, i2[v2].subType = o2.conversationSubType, i2[v2].lastMessage = o2._isExcludedFromLastMessage ? "" : o2, "in" !== o2.flow || o2._isExcludedFromUnreadCount || o2._onlineOnlyFlag || _2 || i2[v2].unreadCount++)); - } else - this._qualityStat(o2); - else - this._cacheAndCompare({ groupID: p2, event: t2, item: l2, groupType: d2 }); - } - return { eventDataList: i2, result: a2, AVChatRoomMessageList: r2 }; - } }, { key: "_qualityStat", value: function(e2) { - this._grpM.get(26).addMessageSequence({ key: jn, message: e2 }); - } }, { key: "_handleTips", value: function(e2) { - var t2 = this; - e2.forEach(function(e3) { - switch (e3.payload.operationType) { - case 1: - t2._onNewMemberComeIn(e3); - break; - case 2: - t2._onMemberQuit(e3); - break; - case 3: - t2._onMemberKickedOut(e3); - break; - case 4: - t2._onMemberSetAdmin(e3); - break; - case 5: - t2._onMemberCancelledAdmin(e3); - break; - case 6: - t2._onGroupProfileModified(e3); - break; - case 7: - t2._onMemberInfoModified(e3); - break; - case 8: - t2._onTopicProfileUpdated(e3); - break; - default: - M.w("".concat(t2._n, "._handleTips unknown operationType:").concat(e3.payload.operationType)); - } - }); - } }, { key: "_onNewMemberComeIn", value: function(e2) { - var e2 = e2.payload, t2 = e2.memberNum, e2 = e2.groupProfile.groupID, e2 = this._grpM.getLocalGroupProfile(e2); - e2 && R(t2) && e2.memberCount !== t2 && (e2.memberCount = t2, this._updateConvGroupProfile(e2)); - } }, { key: "_onMemberQuit", value: function(e2) { - var t2 = e2.payload, n2 = t2.memberNum, t2 = t2.groupProfile.groupID, o2 = this._grpM.getLocalGroupProfile(t2); - o2 && R(n2) && o2.memberCount !== n2 && (o2.memberCount = n2, this._updateConvGroupProfile(o2)), this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(t2, e2.payload.userIDList); - } }, { key: "_onMemberKickedOut", value: function(e2) { - var t2 = e2.payload, n2 = t2.memberNum, t2 = t2.groupProfile.groupID, o2 = this._grpM.getLocalGroupProfile(t2); - o2 && R(n2) && o2.memberCount !== n2 && (o2.memberCount = n2, this._updateConvGroupProfile(o2)), this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(t2, e2.payload.userIDList); - } }, { key: "_updateConvGroupProfile", value: function(e2) { - this._grpM.get(11).updateConvGroupProfile([e2]); - } }, { key: "_onMemberSetAdmin", value: function(e2) { - var t2 = e2.payload.groupProfile.groupID, e2 = e2.payload.userIDList, n2 = this._grpM.getGroupMemberHandler(); - e2.forEach(function(e3) { - e3 = n2.getLocalGroupMemberInfo(t2, e3); - e3 && e3.updateRole(A.GRP_MBR_ROLE_ADMIN); - }); - } }, { key: "_onMemberCancelledAdmin", value: function(e2) { - var t2 = e2.payload.groupProfile.groupID, e2 = e2.payload.userIDList, n2 = this._grpM.getGroupMemberHandler(); - e2.forEach(function(e3) { - e3 = n2.getLocalGroupMemberInfo(t2, e3); - e3 && e3.updateRole(A.GRP_MBR_ROLE_MEMBER); - }); - } }, { key: "_onGroupProfileModified", value: function(e2) { - var t2 = this, e2 = e2.payload, n2 = e2.newGroupProfile, o2 = e2.groupProfile, i2 = e2.operatorInfo, e2 = o2.groupID, a2 = this._grpM.getLocalGroupProfile(e2), o2 = (Object.keys(n2).forEach(function(e3) { - switch (e3) { - case "ownerID": - t2._ownerChanged(a2, n2); - break; - case "groupName": - a2.name = n2[e3]; - break; - default: - a2[e3] = n2[e3]; - } - }), N(i2) || Object.keys(i2).forEach(function(e3) { - "nameCard" === e3 ? a2.updateSelfInfo({ nameCard: i2[e3] }) : "role" === e3 && a2.updateSelfInfo({ role: i2[e3] }); - }), !a2.isSupportTopic); - this._grpM.emitGroupListUpdate(true, o2); - } }, { key: "_ownerChanged", value: function(e2, t2) { - var e2 = e2.groupID, n2 = this._grpM.getLocalGroupProfile(e2), o2 = this._grpM.getMyUserID(); - o2 === t2.ownerID && (n2.updateGroup({ selfInfo: { role: A.GRP_MBR_ROLE_OWNER } }), n2 = (t2 = this._grpM.getGroupMemberHandler()).getLocalGroupMemberInfo(e2, o2), o2 = this._grpM.getLocalGroupProfile(e2).ownerID, t2 = t2.getLocalGroupMemberInfo(e2, o2), n2 && n2.updateRole(A.GRP_MBR_ROLE_OWNER), t2) && t2.updateRole(A.GRP_MBR_ROLE_MEMBER); - } }, { key: "_onMemberInfoModified", value: function(e2) { - var t2 = e2.to, n2 = e2.payload, o2 = n2.groupProfile, n2 = n2.memberList, i2 = o2.groupID, a2 = (Gt(t2) && this._updateTopicMuteTime(e2), this._grpM.getGroupMemberHandler()); - n2.forEach(function(e3) { - var t3 = a2.getLocalGroupMemberInfo(i2, e3.userID); - t3 && R(e3.muteTime) && t3.updateMuteUntil(e3.muteTime); - }); - } }, { key: "_updateTopicMuteTime", value: function(e2) { - var t2 = e2.to, e2 = e2.payload, n2 = e2.groupProfile, e2 = e2.memberList, o2 = void 0 === e2 ? [] : e2, e2 = this._grpM.get(10), n2 = n2.groupID, i2 = e2.getLocalTopic(n2, t2); - if (i2) { - for (var a2 = false, s2 = 0; s2 < o2.length; s2++) { - var r2 = o2[s2]; - if (r2.userID === this._grpM.getMyUserID() && 0 <= r2.muteTime) { - i2.updateSelfInfo({ muteTime: r2.muteTime }), a2 = true; - break; - } - } - a2 && this._grpM.emitOEvt(h.TOPIC_UPDATED, { groupID: n2, topic: i2 }); - } - } }, { key: "_onTopicProfileUpdated", value: function(e2) { - var t2 = e2.payload, n2 = t2.groupProfile.groupID, t2 = t2.newTopicInfo; - this._grpM.get(10).onTopicProfileUpdated(y({ groupID: n2, topicID: e2.to }, t2)); - } }, { key: "_cacheGroupTips", value: function(e2, t2) { - this._cachedGroupTipsMap.has(e2) || this._cachedGroupTipsMap.set(e2, []), this._cachedGroupTipsMap.get(e2).push(t2); - } }, { key: "_deleteCachedGroupTips", value: function(e2) { - this._cachedGroupTipsMap.has(e2) && this._cachedGroupTipsMap.delete(e2); - } }, { key: "_notifyCachedGroupTips", value: function(e2, t2) { - var n2 = this, o2 = this._cachedGroupTipsMap.get(e2) || []; - M.l("".concat(this._n, "._notifyCachedGroupTips groupID:").concat(e2, " groupType:").concat(t2, " count:").concat(o2.length)), o2.forEach(function(e3) { - n2.onNewGroupTips(e3); - }), this._deleteCachedGroupTips(e2); - } }, { key: "_cacheAndCompare", value: function(e2) { - var t2 = e2.groupID, n2 = e2.event, o2 = e2.item, e2 = e2.groupType, n2 = (M.l("".concat(this._n, "._cacheAndCompare groupID:").concat(t2, " groupType:").concat(e2)), this._cacheGroupTips(t2, { event: n2, dataList: [o2] }), { groupID: t2, type: e2 }); - e2 === A.GRP_AVCHATROOM ? this._grpM.hasLocalGroup(t2) ? this._notifyCachedGroupTips(t2, e2) : this._grpM.setUnjoinedAVChatRoom(t2) : (this._grpM.updateGroupMap([n2]), this._notifyCachedGroupTips(t2, e2)), this._checkCountMap.has(t2) || this._checkCountMap.set(t2, 0); - } }, { key: "reset", value: function() { - this._cachedGroupTipsMap.clear(), this._checkCountMap.clear(); - } }]), Xi), li = (e(zi, [{ key: "onCheckTimer", value: function(e2) { - e2 % 1 == 0 && 0 < this._cachedGroupMessageMap.size && this._check(); - } }, { key: "_check", value: function() { - var i2 = this; - this._cachedGroupMessageMap.forEach(function(e2, t2) { - var n2 = i2._checkCountMap.get(t2), o2 = i2._grpM.hasLocalGroup(t2); - M.l("".concat(i2._n, "._check groupID:").concat(t2, " hasLocalGroup:").concat(o2, " checkCount:").concat(n2)), o2 ? (i2._notifyCachedGroupMessage(t2), i2._checkCountMap.delete(t2), i2._grpM.deleteUnjoinedAVChatRoom(t2)) : n2 >= i2.MAX_CHECK_COUNT ? (i2._deleteCachedGroupMessage(t2), i2._checkCountMap.delete(t2)) : i2._checkCountMap.set(t2, ++n2); - }); - } }, { key: "updateLastMsg", value: function(e2) { - var t2 = "".concat(this._n, ".updateLastMsg"); - if (0 !== this._grpM.getGroupMap().size) { - for (var n2, o2, i2, a2, s2 = false, r2 = e2.length, c2 = 0; c2 < r2; c2++) - (n2 = e2[c2]).type === A.CONV_GROUP && 0 !== n2.lastMessage.lastSequence && null !== n2.lastMessage.payload && (o2 = n2.conversationID.split(/^GROUP/)[1], o2 = this._grpM.getLocalGroupProfile(o2)) && (i2 = o2.lastMessage, a2 = n2.lastMessage, JSON.stringify(i2) !== JSON.stringify(a2)) && (o2.lastMessage = y({}, n2.lastMessage), s2 = true); - M.l("".concat(t2, " convCount:").concat(r2, " groupCount:").concat(this._grpM.getLocalGroupList().length, " isUpdated:").concat(s2)), s2 && (this._grpM.sortLocalGroupList(), this._grpM.emitGroupListUpdate(true, false)); - } else - this.tempConversationList = e2; - } }, { key: "onNewMessage", value: function(e2) { - var t2 = this._assembly(e2), n2 = t2.conversationOptionsList, o2 = t2.messageList, t2 = t2.AVChatRoomMessageList, t2 = (0 < t2.length && this._grpM.onAVChatRoomMessage(t2), At(o2)), t2 = (0 < t2.length && this._grpM.emitOEvt(h.MESSAGE_MODIFIED, t2), 0 < n2.length && (this._grpM.get(11).onNewMessage({ conversationOptionsList: n2, isInstantMessage: false !== e2.isInstantMessage, updateUnreadCount: false !== e2.updateUnreadCount }), this._grpM.updateNextMessageSeq(n2)), Rt(o2)); - 0 < t2.length && this._grpM.emitOEvt(h.MESSAGE_RECEIVED, t2), o2.length = 0; - } }, { key: "_assembly", value: function(e2) { - var t2 = e2.dataList, n2 = e2.event, o2 = e2.isInstantMessage, i2 = null, a2 = [], s2 = [], r2 = [], c2 = {}, u2 = this._grpM.getFileDownloadProxy(), l2 = this._grpM.getDowloadFileAuthKey(), d2 = this._grpM.get(17).getFileDNList(), p2 = t2.length; - 1 < p2 && t2.sort(function(e3, t3) { - return e3.sequence - t3.sequence; - }); - for (var _2 = this._grpM.get(11), h2 = this._grpM.get(4), g2 = 0; g2 < p2; g2++) { - var f2, m2 = Mt(t2[g2]), v2 = m2.groupProfile, I2 = v2.groupID, M2 = v2.communityType, M2 = void 0 === M2 ? 0 : M2, y2 = v2.topicID, y2 = void 0 === y2 ? void 0 : y2, C2 = v2.invisible, v2 = v2.groupType, v2 = void 0 === v2 ? void 0 : v2, T2 = void 0, D2 = this._grpM.isMessageFromTopic(M2, y2), E2 = (D2 && (T2 = A.CONV_TOPIC, m2.to = y2), this._grpM.hasLocalGroup(I2)); - !E2 && this._grpM.isUnjoinedAVChatRoom(I2) || (E2 || D2 ? this._grpM.isMessageFromOrToAVChatroom(I2) ? (m2.event = n2, r2.push(m2)) : (m2.currentUser = this._grpM.getMyUserID(), m2.conversationType = A.CONV_GROUP, m2.isSystemMessage = !!m2.isSystemMessage, (i2 = new Do(m2)).setElement(m2.elements, u2, l2, d2), 1 !== C2 ? (E2 = 1 === t2[g2].isModified, _2.isMessageSentByCurrentInstance(i2) ? i2.isModified = E2 : E2 = false, 1 === m2.onlineOnlyFlag ? (i2._onlineOnlyFlag = true, _2.isMessageSentByCurrentInstance(i2) || s2.push(i2)) : this._grpM.isMessageFromCommunityOfTopic(M2, y2) ? s2.push(i2) : (i2.from === this._grpM.getMyUserID() && (D2 = _2.getLatestMessageSentByMe(i2.conversationID)) && (C2 = D2.nick, M2 = D2.avatar, C2 === i2.nick && M2 === i2.avatar || (_2.modifyMessageSentByMe({ conversationID: f2, latestNick: i2.nick, latestAvatar: i2.avatar }), h2.mockOnNickAvatarModified(i2.nick, i2.avatar))), _2.pushIntoMessageList(s2, i2, E2) && (this._qualityStat(o2, i2), f2 = (y2 = i2).conversationID, D2 = y2.sequence, C2 = _2.isRemoteRead({ conversationID: f2, sequence: D2 }), N(c2[f2]) ? (M2 = 0, "in" !== i2.flow || i2._isExcludedFromUnreadCount || C2 || (M2 = 1), c2[f2] = a2.push({ conversationID: f2, unreadCount: M2, type: N(T2) ? i2.conversationType : T2, subType: i2.conversationSubType, lastMessage: i2._isExcludedFromLastMessage ? "" : i2 }) - 1) : (a2[E2 = c2[f2]].type = N(T2) ? i2.conversationType : T2, a2[E2].subType = i2.conversationSubType, a2[E2].lastMessage = i2._isExcludedFromLastMessage ? "" : i2, "in" !== i2.flow || i2._isExcludedFromUnreadCount || C2 || a2[E2].unreadCount++)))) : this._qualityStat(o2, i2)) : this._cacheAndCompare({ groupID: I2, event: n2, item: m2, groupType: v2 })); - } - return { conversationOptionsList: a2, messageList: s2, AVChatRoomMessageList: r2 }; - } }, { key: "_qualityStat", value: function(e2, t2) { - var n2 = this._grpM.get(26); - n2.addMessageSequence({ key: jn, message: t2 }), e2 && 0 < t2.clientTime && n2.addMessageDelay(t2.clientTime); - } }, { key: "onMsgRevoked", value: function(e2, t2) { - var n2 = this, u2 = this._grpM.get(11), l2 = [], d2 = []; - e2.dataList.forEach(function(e3) { - var t3 = e3.elements.revokedInfos, s2 = e3.revokerInfo, r2 = e3.groupProfile, c2 = false; - r2 && (c2 = Nt({ groupID: r2.groupID }) || !S(r2.topicID)), N(t3) || t3.forEach(function(e4) { - var t4, n3 = S(e4.topicID) ? "GROUP".concat(e4.groupID) : "GROUP".concat(e4.topicID), o2 = u2.getLocalConversation(n3), i2 = e4.revokerInfo && e4.revokerInfo.revoker || s2 && s2.revoker, a2 = s2 && s2.reason || ""; - o2 && Ot(o2.type) ? t4 = { conversationID: n3, sequence: e4.sequence, ID: "".concat(e4.tinyID, "-").concat(e4.clientTime, "-").concat(e4.random) } : (o2 = u2.revoke(n3, e4.sequence, e4.random)) ? t4 = o2 : (t4 = { conversationID: n3, sequence: e4.sequence }, e4.tinyID && e4.clientTime && e4.random && (t4.ID = "".concat(e4.tinyID, "-").concat(e4.clientTime, "-").concat(e4.random)), e4.time && (t4.time = e4.time)), t4 && (t4.revoker = i2, t4.revokeReason = a2, t4.revokerInfo = { userID: i2, nick: "", avatar: "" }, (c2 ? (t4.revokerInfo.nick = r2.nick, t4.revokerInfo.avatar = r2.avatar, l2) : d2).push(t4)); - }); - }), 0 === d2.length && 0 === l2.length || (u2.onMessageRevoked([].concat(l2, d2), t2), 0 < l2.length && this._grpM.emitOEvt(h.MESSAGE_REVOKED, l2), 0 < d2.length && u2.updateRevokerInfo(d2).then(function(e3) { - n2._grpM.emitOEvt(h.MESSAGE_REVOKED, e3); - })); - } }, { key: "_groupListTreeShaking", value: function(e2) { - for (var n2 = new Map(p(this._grpM.getGroupMap())), t2 = 0, o2 = e2.length; t2 < o2; t2++) - n2.delete(e2[t2].groupID); - this._grpM.hasJoinedAVChatRoom() && this._grpM.getJoinedAVChatRoom().forEach(function(e3) { - n2.delete(e3); - }), this._grpM.getGroupMap().forEach(function(e3, t3) { - e3.isSupportTopic && n2.delete(t3); - }); - for (var i2 = p(n2.keys()), a2 = 0, s2 = i2.length; a2 < s2; a2++) - this._grpM.deleteGroup(i2[a2]); - } }, { key: "syncGroupList", value: function() { - var o2, i2, a2 = this, e2 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t2 = (this._pagingStatus === Nn && this._grpM.clearGroupMap(), p(ce)), n2 = this.PAGING_GRP_COUNT_LIMIT, s2 = []; - return true === e2 ? this._pagingGetGroupListWithTopic({ limit: n2, offset: 0, groupBaseInfoFilter: t2, groupList: s2 }) : (e2 = "syncGroupList", o2 = "".concat(this._n, ".").concat(e2), i2 = new G(e2), this._pagingGetGroupList({ limit: n2, offset: 0, groupBaseInfoFilter: t2, groupList: s2 }).then(function() { - var e3 = tn(a2._pagingGetCostList), t3 = en(a2._pagingGetCostList), n3 = (a2._pagingGetCostList.length = 0, a2._pagingStatus = Pn, a2._groupListTreeShaking(s2), a2._grpM.updateGroupMap(s2), a2._grpM.getLocalGroupList().length), n3 = "count:".concat(n3, " sum:").concat(t3, " avg:").concat(e3); - return M.l("".concat(o2, " ok. ").concat(n3)), i2.setMessage(n3).end(), a2.tempConversationList && (a2.updateLastMsg(a2.tempConversationList), a2.tempConversationList = null), a2._grpM.emitGroupListUpdate(true, true), C({ groupList: a2._grpM.getLocalGroupList() }); - }).catch(function(e3) { - return a2._pagingStatus = Un, i2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - })); - } }, { key: "getGroupList", value: function() { - var e2, t2 = this, n2 = "".concat(this._n, ".").concat("getGroupList"); - return M.l("".concat(n2, " pagingStatus:").concat(this._pagingStatus)), this._pagingStatus === Un || this._pagingStatus === Nn ? this.syncGroupList().then(function() { - var e3 = t2._grpM.getLocalGroupList(); - return C({ groupList: e3, isSyncCompleted: t2.isPagingGetCompleted() }); - }).catch(function(e3) { - return M.e("".concat(n2, " failed. error:"), e3), D(e3); - }) : (e2 = this._grpM.getLocalGroupList(), M.l("".concat(n2, ". returned group count:").concat(e2.length)), T({ groupList: e2, isSyncCompleted: this.isPagingGetCompleted() })); - } }, { key: "isPagingGetCompleted", value: function() { - return this._pagingStatus === Pn; - } }, { key: "_pagingGetGroupList", value: function(e2) { - var o2 = this, i2 = "".concat(this._n, ".").concat("_pagingGetGroupList"), t2 = e2.isCommunityRelay, a2 = void 0 !== t2 && t2, s2 = e2.limit, r2 = e2.offset, c2 = e2.groupBaseInfoFilter, u2 = e2.groupList, l2 = Date.now(); - return this._grpM.req({ P: k.GET_GRP_LIST, data: { type: a2 ? A.GRP_COMMUNITY : void 0, memberAccount: this._grpM.getMyUserID(), limit: s2, offset: r2, responseFilter: { groupBaseInfoFilter: c2, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] } } }).then(function(e3) { - var e3 = e3.data, t3 = e3.groups, t3 = void 0 === t3 ? [] : t3, e3 = e3.totalCount, t3 = (u2.push.apply(u2, p(t3)), o2._handleGroupAtInfoWithoutTopic(a2, t3), r2 + s2), n2 = !(t3 < e3), e3 = "offset:".concat(r2, " limit:").concat(s2, " total:").concat(e3, " isCompleted:").concat(n2, " ") + "current:".concat(u2.length, " isCommunityRelay:").concat(a2); - return o2._pagingGetCostList.push(nn(l2, false)), M.l("".concat(i2, " ok. ").concat(e3, " cost:").concat(nn(l2))), a2 || n2 ? !a2 && n2 ? (M.l("".concat(i2, " start to get community list")), r2 = 0, o2._pagingGetGroupList({ limit: s2, offset: r2, groupBaseInfoFilter: c2, groupList: u2, isCommunityRelay: true })) : a2 && !n2 ? (r2 = t3, o2._pagingGetGroupList({ limit: s2, offset: r2, groupBaseInfoFilter: c2, groupList: u2, isCommunityRelay: true })) : C({ groupList: u2 }) : (r2 = t3, o2._pagingGetGroupList({ limit: s2, offset: r2, groupBaseInfoFilter: c2, groupList: u2 })); - }).catch(function(e3) { - return 10018 === e3.code ? (M.w("".concat(o2.logPrefix, " response size exceeds the limit, request count:").concat(s2)), s2 = 50, o2._pagingGetGroupList({ limit: s2, offset: r2, groupBaseInfoFilter: c2, groupList: u2, isCommunityRelay: a2 })) : a2 ? (11e3 === e3.code && M.l("".concat(i2, " ok. community unavailable")), T({ groupList: u2 })) : D(e3); - }); - } }, { key: "_pagingGetGroupListWithTopic", value: function(e2) { - var o2 = this, i2 = "".concat(this._n, "._pagingGetGroupListWithTopic"), a2 = e2.limit, s2 = e2.offset, r2 = e2.groupBaseInfoFilter, c2 = e2.groupList, u2 = Date.now(); - return this._grpM.req({ P: k.GET_GRP_LIST, data: { type: A.GRP_COMMUNITY, memberAccount: this._grpM.getMyUserID(), limit: a2, offset: s2, responseFilter: { groupBaseInfoFilter: r2, selfInfoFilter: p(ue) }, isSupportTopic: 1, needAppDefineData: 1 } }).then(function(e3) { - var e3 = e3.data, t2 = e3.groups, e3 = e3.totalCount, t2 = (c2.push.apply(c2, p(void 0 === t2 ? [] : t2)), s2 + a2), n2 = !(t2 < e3); - if (M.l("".concat(i2, " ok. offset:").concat(s2, " limit:").concat(a2, " totalCount:").concat(e3, " isCompleted:").concat(n2, " currentCount:").concat(c2.length, " cost:").concat(nn(u2))), !n2) - return s2 = t2, o2._pagingGetGroupListWithTopic({ limit: a2, offset: s2, groupBaseInfoFilter: r2, groupList: c2 }); - o2._grpM.updateGroupMap(c2), o2._grpM.emitGroupListUpdate(true, false); - e3 = o2._grpM.getLocalGroupList().filter(function(e4) { - return true === e4.isSupportTopic; - }); - return C({ groupList: e3 }); - }).catch(function(e3) { - return 10018 === e3.code ? (M.w("".concat(o2.logPrefix, " response size exceeds the limit, request count:").concat(a2)), a2 = 50, o2._pagingGetGroupListWithTopic({ limit: a2, offset: s2, groupBaseInfoFilter: r2, groupList: c2 })) : D(e3); - }); - } }, { key: "_cacheGroupMessage", value: function(e2, t2) { - this._cachedGroupMessageMap.has(e2) || this._cachedGroupMessageMap.set(e2, []), this._cachedGroupMessageMap.get(e2).push(t2); - } }, { key: "_deleteCachedGroupMessage", value: function(e2) { - this._cachedGroupMessageMap.has(e2) && this._cachedGroupMessageMap.delete(e2); - } }, { key: "_notifyCachedGroupMessage", value: function(e2, t2) { - var n2 = this, o2 = this._cachedGroupMessageMap.get(e2) || []; - M.l("".concat(this._n, "._notifyCachedGroupMessage groupID:").concat(e2, " groupType:").concat(t2, " count:").concat(o2.length)), o2.forEach(function(e3) { - n2.onNewMessage(e3); - }), this._deleteCachedGroupMessage(e2); - } }, { key: "_cacheAndCompare", value: function(e2) { - var t2 = e2.groupID, n2 = e2.event, o2 = e2.item, e2 = e2.groupType, n2 = (M.l("".concat(this._n, "._cacheAndCompare groupID:").concat(t2, " groupType:").concat(e2)), this._cacheGroupMessage(t2, { event: n2, dataList: [o2] }), { groupID: t2, type: e2 }); - e2 === A.GRP_AVCHATROOM ? this._grpM.hasLocalGroup(t2) ? this._notifyCachedGroupMessage(t2, e2) : this._grpM.setUnjoinedAVChatRoom(t2) : (this._grpM.updateGroupMap([n2]), this._notifyCachedGroupMessage(t2, e2)), this._checkCountMap.has(t2) || this._checkCountMap.set(t2, 0); - } }, { key: "_handleGroupAtInfoWithoutTopic", value: function(e2, t2) { - var o2 = this; - e2 && 0 !== t2.length && t2.forEach(function(e3) { - var t3 = e3.groupID, e3 = e3.groupAtInfoList, n2 = []; - N(e3) || (e3.forEach(function(e4) { - n2.push(y(y({}, e4), {}, { groupID: t3 })); - }), o2._grpM.get(11).onNewGroupAtTips({ dataList: n2 })); - }); - } }, { key: "setPagingGroupCount", value: function(e2) { - N(e2) || (this.PAGING_GRP_COUNT_LIMIT = parseInt(e2, 10)); - } }, { key: "reset", value: function() { - this.PAGING_GRP_COUNT_LIMIT = 200, this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._pagingStatus = Nn, this._pagingGetCostList = []; - } }]), zi), di = (e(Ji, [{ key: "_onCloudConfig", value: function() { - var e2 = this._grpM.getCloudConfig("grp_attr_cache_time"); - N(e2) || (this.CACHE_EXPIRE_TIME = Number(e2)); - } }, { key: "updateLocalMainSequenceOnReconnected", value: function() { - this._groupAttributesMap.forEach(function(e2) { - e2.localMainSequence = 0; - }); - } }, { key: "isGroupAttributesUpdatedNotice", value: function(e2) { - var t2 = e2.to, e2 = e2.elements.newGroupProfile, n2 = !N(e2) && !S(e2.groupAttributeOption); - return n2 && this._onGroupAttributesUpdated({ groupID: t2, groupAttributeOption: e2.groupAttributeOption }), n2; - } }, { key: "_onGroupAttributesUpdated", value: function(e2) { - var t2, n2 = this, o2 = e2.groupID, e2 = e2.groupAttributeOption, i2 = e2.mainSequence, a2 = e2.isWithChangedAttributeInfo, s2 = e2.groupAttributeList, s2 = void 0 === s2 ? [] : s2, e2 = e2.operationType; - M.l("".concat(this._n, ".onGroupAttributesUpdated. ") + "groupID:".concat(o2, " isWithChangedAttributeInfo:").concat(a2, " operationType:").concat(e2)), N(e2) || (this._groupAttributesCopy = this._getCachedAttributes({ groupID: o2 }), 0 != (t2 = i2 - this._getLocalGroupAttributes(o2).localMainSequence) && (1 === a2 && 1 == t2 ? (this._refreshCachedGroupAttributes({ groupID: o2, remoteMainSequence: i2, groupAttributeList: s2, operationType: e2 }), this._emitGroupAttributesUpdated(o2)) : this._hasLocalGroupAttributes(o2) && (a2 = this._getLocalGroupAttributes(o2).avChatRoomKey, this._getGroupAttributes({ groupID: o2, avChatRoomKey: a2 }).then(function() { - n2._emitGroupAttributesUpdated(o2); - })))); - } }, { key: "initGroupAttributesCache", value: function(e2) { - var t2 = e2.groupID, e2 = e2.avChatRoomKey, e2 = void 0 === e2 ? void 0 : e2; - this._groupAttributesMap.set(t2, { lastUpdateTime: 0, localMainSequence: 0, remoteMainSequence: 0, attributes: /* @__PURE__ */ new Map(), avChatRoomKey: e2 }), M.l("".concat(this._n, ".initGroupAttributesCache groupID:").concat(t2, " avChatRoomKey:").concat(e2)); - } }, { key: "initGroupAttributes", value: function(e2) { - var n2 = this, o2 = e2.groupID, i2 = e2.groupAttributes, e2 = this._getLocalGroupAttributes(o2), t2 = e2.remoteMainSequence, e2 = e2.avChatRoomKey, a2 = new G("initGroupAttributes"); - return a2.setMessage("groupID:".concat(o2, " avChatRoomKey:").concat(e2, " mainSequence:").concat(t2)), this._grpM.req({ P: k.SET_GRP_ATTR, data: { groupID: o2, avChatRoomKey: e2, mainSequence: t2, groupAttributeList: this._transformGroupAttributes(i2) } }).then(function(e3) { - M.l("".concat(n2._n, ".").concat("initGroupAttributes", " ok. groupID:").concat(o2)); - var e3 = e3.data, t3 = e3.mainSequence, e3 = p(e3.groupAttributeList); - return e3.forEach(function(e4) { - e4.value = i2[e4.key]; - }), n2._groupAttributesCopy = n2._getCachedAttributes({ groupID: o2 }), n2._refreshCachedGroupAttributes({ groupID: o2, remoteMainSequence: t3, groupAttributeList: e3, operationType: 1 }), n2._emitGroupAttributesUpdated(o2), a2.end(), C({ groupAttributes: i2 }); - }).catch(function(e3) { - return a2.setError(e3).end(), D(e3); - }); - } }, { key: "setGroupAttributes", value: function(e2) { - var n2 = this, o2 = "".concat(this._n, ".").concat("setGroupAttributes"), i2 = e2.groupID, a2 = e2.groupAttributes, e2 = this._getLocalGroupAttributes(i2), t2 = e2.remoteMainSequence, s2 = e2.avChatRoomKey, r2 = e2.attributes, e2 = this._transformGroupAttributes(a2), c2 = (e2.forEach(function(e3) { - var t3 = e3.key; - e3.sequence = 0, r2.has(t3) && (e3.sequence = r2.get(t3).sequence); - }), new G("setGroupAttributes")); - return c2.setMessage("groupID:".concat(i2, " groupAttributes:").concat(JSON.stringify(a2))), M.l("".concat(o2, ". groupID:").concat(i2, " mainSequence:").concat(t2)), this._grpM.req({ P: k.MODIFY_GRP_ATTR, data: { groupID: i2, avChatRoomKey: s2, mainSequence: t2, groupAttributeList: e2 } }).then(function(e3) { - M.l("".concat(o2, " ok.")); - var e3 = e3.data, t3 = e3.mainSequence, e3 = p(e3.groupAttributeList); - return e3.forEach(function(e4) { - e4.value = a2[e4.key]; - }), n2._groupAttributesCopy = n2._getCachedAttributes({ groupID: i2 }), n2._refreshCachedGroupAttributes({ groupID: i2, remoteMainSequence: t3, groupAttributeList: e3, operationType: 2 }), n2._emitGroupAttributesUpdated(i2), c2.end(), C({ groupAttributes: a2 }); - }).catch(function(e3) { - return c2.setError(e3).end(), D(e3); - }); - } }, { key: "deleteGroupAttributes", value: function(e2) { - var t2 = this, n2 = e2.groupID, e2 = e2.keyList, e2 = void 0 === e2 ? [] : e2, o2 = this._getLocalGroupAttributes(n2), i2 = o2.remoteMainSequence, a2 = o2.avChatRoomKey, s2 = o2.attributes, r2 = p(s2.keys()), o2 = k.CLEAR_GRP_ATTR, c2 = 3, a2 = { groupID: n2, avChatRoomKey: a2, mainSequence: i2 }, u2 = [], l2 = (0 < e2.length && (r2 = [], o2 = k.DEL_GRP_ATTR, c2 = 4, e2.forEach(function(e3) { - var t3 = 0; - s2.has(e3) && (t3 = s2.get(e3).sequence, r2.push(e3)), u2.push({ key: e3, sequence: t3 }); - }), a2.groupAttributeList = u2), new G("deleteGroupAttributes")); - return l2.setMessage("groupID:".concat(n2, " mainSequence:").concat(i2, " keyList:").concat(e2, " proto:").concat(o2)), this._grpM.req({ P: o2, data: a2 }).then(function(e3) { - M.l("".concat(t2._n, ".").concat("deleteGroupAttributes", " ok. groupID:").concat(n2)); - e3 = e3.data.mainSequence; - return t2._groupAttributesCopy = t2._getCachedAttributes({ groupID: n2 }), t2._refreshCachedGroupAttributes({ groupID: n2, remoteMainSequence: e3, groupAttributeList: u2, operationType: c2 }), t2._emitGroupAttributesUpdated(n2), l2.end(), C({ keyList: r2 }); - }).catch(function(e3) { - return l2.setError(e3).end(), D(e3); - }); - } }, { key: "getGroupAttributes", value: function(t2) { - var n2 = this, o2 = "".concat(this._n, ".").concat("getGroupAttributes"), i2 = t2.groupID, e2 = this._getLocalGroupAttributes(i2), a2 = e2.avChatRoomKey, s2 = e2.lastUpdateTime, r2 = e2.localMainSequence, e2 = e2.remoteMainSequence, c2 = new G("getGroupAttributes"); - if (c2.setMessage("groupID:".concat(i2, " localMainSequence:").concat(r2, " remoteMainSequence:").concat(e2, " keyList:").concat(t2.keyList)), Date.now() - s2 >= this.CACHE_EXPIRE_TIME || r2 < e2) - return this._getGroupAttributes({ groupID: i2, avChatRoomKey: a2 }).then(function(e3) { - c2.setMoreMessage("get attributes from remote. count:".concat(e3.length)).end(), M.l("".concat(o2, " from remote. groupID:").concat(i2)); - e3 = n2._getCachedAttributes(t2); - return C({ groupAttributes: e3 }); - }).catch(function(e3) { - return c2.setError(e3).end(), D(e3); - }); - c2.setMoreMessage("get attributes from cache").end(), M.l("".concat(o2, " from cache. groupID:").concat(i2)); - s2 = this._getCachedAttributes(t2); - return T({ groupAttributes: s2 }); - } }, { key: "_getGroupAttributes", value: function(o2) { - var i2 = this, e2 = 0; - return N(o2.avChatRoomKey) || (e2 = 1), this._grpM.req({ P: k.GET_GRP_ATTR, data: y(y({}, o2), {}, { groupType: e2 }) }).then(function(e3) { - M.l("".concat(i2._n, "._getGroupAttributes ok. groupID:").concat(o2.groupID)); - var e3 = e3.data, t2 = e3.mainSequence, e3 = e3.groupAttributeList, n2 = p(e3); - return N(t2) || i2._refreshCachedGroupAttributes({ groupID: o2.groupID, remoteMainSequence: t2, groupAttributeList: n2, operationType: 5 }), e3; - }).catch(function(e3) { - return D(e3); - }); - } }, { key: "_refreshCachedGroupAttributes", value: function(e2) { - var t2 = e2.groupID, n2 = e2.remoteMainSequence, o2 = e2.groupAttributeList, e2 = e2.operationType; - if (this._hasLocalGroupAttributes(t2)) { - var i2 = this._getLocalGroupAttributes(t2), a2 = i2.localMainSequence; - if (5 === e2 || n2 - a2 == 1) - i2.remoteMainSequence = n2, i2.localMainSequence = n2, i2.lastUpdateTime = Date.now(), this._updateCachedAttributes({ groupAttributes: i2, groupAttributeList: o2, operationType: e2 }); - else { - if (a2 === n2) - return; - i2.remoteMainSequence = n2; - } - this._groupAttributesMap.set(t2, i2); - o2 = "operationType:".concat(e2, " localMainSequence:").concat(a2, " remoteMainSequence:").concat(n2); - M.l("".concat(this._n, "._refreshCachedGroupAttributes. ").concat(o2)); - } - } }, { key: "_getCachedAttributes", value: function(e2) { - var t2 = e2.groupID, e2 = e2.keyList, e2 = void 0 === e2 ? [] : e2, n2 = {}; - if (this._hasLocalGroupAttributes(t2)) { - var o2 = this._getLocalGroupAttributes(t2).attributes; - if (0 < e2.length) - e2.forEach(function(e3) { - o2.has(e3) && (n2[e3] = o2.get(e3).value); - }); - else { - var i2, a2 = Z(o2.keys()); - try { - for (a2.s(); !(i2 = a2.n()).done; ) { - var s2 = i2.value; - n2[s2] = o2.get(s2).value; - } - } catch (e3) { - a2.e(e3); - } finally { - a2.f(); - } - } - } - return n2; - } }, { key: "_updateCachedAttributes", value: function(e2) { - var o2 = e2.groupAttributes, t2 = e2.groupAttributeList, e2 = e2.operationType; - 3 !== e2 ? 4 !== e2 ? (1 === e2 && o2.attributes.clear(), t2.forEach(function(e3) { - var t3 = e3.key, n2 = e3.value, e3 = e3.sequence; - o2.attributes.set(t3, { value: n2, sequence: e3 }); - })) : t2.forEach(function(e3) { - o2.attributes.delete(e3.key); - }) : o2.attributes.clear(); - } }, { key: "_hasLocalGroupAttributes", value: function(e2) { - return this._groupAttributesMap.has(e2); - } }, { key: "_getLocalGroupAttributes", value: function(e2) { - return this._hasLocalGroupAttributes(e2) || this.initGroupAttributesCache({ groupID: e2 }), this._groupAttributesMap.get(e2); - } }, { key: "_transformGroupAttributes", value: function(t2) { - var n2 = []; - return Object.keys(t2).forEach(function(e2) { - n2.push({ key: e2, value: t2[e2] }); - }), n2; - } }, { key: "_emitGroupAttributesUpdated", value: function(e2) { - var t2 = this._getCachedAttributes({ groupID: e2 }), n2 = this._computeAttrChangedInfo(t2), o2 = n2.updatedKeyList, n2 = n2.deletedKeyList; - M.l("".concat(this._n, "._emitGroupAttributesUpdated update:").concat(o2.length, ", delete:").concat(n2.length)), 0 === o2.length && 0 === n2.length || this._grpM.emitOEvt(h.GROUP_ATTRIBUTES_UPDATED, { groupID: e2, groupAttributes: t2, updatedKeyList: o2, deletedKeyList: n2 }); - } }, { key: "_computeAttrChangedInfo", value: function(t2) { - var n2 = this, o2 = [], i2 = []; - return Object.keys(t2).forEach(function(e2) { - t2[e2] !== n2._groupAttributesCopy[e2] && o2.push(e2); - }), Object.keys(this._groupAttributesCopy).forEach(function(e2) { - N(t2[e2]) && i2.push(e2); - }), this._groupAttributesCopy = {}, { updatedKeyList: o2, deletedKeyList: i2 }; - } }, { key: "deleteLocalGroupAttributes", value: function(e2) { - this._hasLocalGroupAttributes(e2) && this._groupAttributesMap.delete(e2); - } }, { key: "reset", value: function() { - this._groupAttributesMap.clear(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4; - } }]), Ji), pi = (e(ji, [{ key: "_onCloudConfig", value: function() { - var e2 = this._grpM.getCloudConfig("grp_counter_expire_time"); - N(e2) || (this.EXPIRE_TIME = Number(e2)); - } }, { key: "isGroupCountersNotice", value: function(e2) { - var t2 = e2.to, e2 = e2.elements.groupCounterInfo, n2 = false; - return S(e2) || (this._onGroupCountersUpdated({ groupID: t2, groupCounterInfo: e2 }), n2 = true), n2; - } }, { key: "_onGroupCountersUpdated", value: function(e2) { - var o2 = this, i2 = e2.groupID; - e2.groupCounterInfo.forEach(function(e3) { - var t2 = e3.type, n2 = e3.groupCounterSeq, e3 = e3.counterList, e3 = void 0 === e3 ? [] : e3; - 0 !== t2 && 2 !== t2 || (o2._updateLocalGroupCounters({ groupID: i2, groupCounterSeq: n2, counterList: e3 }), e3.forEach(function(e4) { - o2._grpM.emitOEvt(h.GROUP_COUNTER_UPDATED, { groupID: i2, key: e4.key, value: e4.value }); - })), 1 === t2 && o2._deleteLocalGroupCounters({ groupID: i2, groupCounterSeq: n2, counterList: e3 }); - }), M.l("".concat(this._n, "._onGroupCountersUpdated groupID:").concat(i2)); - } }, { key: "initGroupCountersCache", value: function(e2) { - var t2 = e2.groupID, e2 = e2.avChatRoomKey; - this._groupCountersMap.set(t2, { lastUpdateTime: 0, groupCounterSeq: 0, counters: /* @__PURE__ */ new Map(), avChatRoomKey: e2 }), M.l("".concat(this._n, ".initGroupCountersCache groupID:").concat(t2, " avChatRoomKey:").concat(e2)); - } }, { key: "setGroupCounters", value: function(e2) { - var t2, n2, o2, i2, a2; - return this._grpM.canIUse(_.GRP_COUNTER) ? (t2 = "".concat(this._n, ".").concat("setGroupCounters"), n2 = e2.groupID, e2 = e2.counters, e2 = this._convertObjectToList(e2), o2 = this._getLocalGroupCounters(n2).avChatRoomKey, i2 = "groupID:".concat(n2, " count:").concat(e2.length), (a2 = new G("setGroupCounters")).setMessage("".concat(i2)), M.l("".concat(t2, ". ").concat(i2)), this._updateGroupCounters({ groupID: n2, counterList: e2, avChatRoomKey: o2, mode: "Set" }).then(function(e3) { - return a2.end(), M.l("".concat(t2, " ok.")), C({ counters: e3 }); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._grpM.noUse("setGroupCounters"); - } }, { key: "increaseGroupCounter", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2 = "increaseGroupCounter"; - return this._grpM.canIUse(_.GRP_COUNTER) ? (t2 = "".concat(this._n, ".").concat(r2), n2 = e2.groupID, o2 = e2.key, e2 = e2.value, i2 = this._getLocalGroupCounters(n2).avChatRoomKey, a2 = "groupID:".concat(n2, " key:").concat(o2, " value:").concat(e2), (s2 = new G(r2)).setMessage("".concat(a2)), M.l("".concat(t2, ". ").concat(a2)), this._updateGroupCounters({ groupID: n2, counterList: [{ key: o2, value: e2 }], avChatRoomKey: i2, mode: "Increase" }).then(function(e3) { - return s2.end(), M.l("".concat(t2, " ok.")), C({ counters: e3 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._grpM.noUse(r2); - } }, { key: "decreaseGroupCounter", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2 = "decreaseGroupCounter"; - return this._grpM.canIUse(_.GRP_COUNTER) ? (t2 = "".concat(this._n, ".").concat(r2), n2 = e2.groupID, o2 = e2.key, e2 = e2.value, i2 = this._getLocalGroupCounters(n2).avChatRoomKey, a2 = "groupID:".concat(n2, " key:").concat(o2, " value:").concat(e2), (s2 = new G(r2)).setMessage("".concat(a2)), M.l("".concat(t2, ". ").concat(a2)), this._updateGroupCounters({ groupID: n2, counterList: [{ key: o2, value: e2 }], avChatRoomKey: i2, mode: "Decrease" }).then(function(e3) { - return s2.end(), M.l("".concat(t2, " ok.")), C({ counters: e3 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._grpM.noUse(r2); - } }, { key: "getGroupCounters", value: function(e2) { - var t2 = this; - if (!this._grpM.canIUse(_.GRP_COUNTER)) - return this._grpM.noUse("getGroupCounters"); - var n2 = "".concat(this._n, ".").concat("getGroupCounters"), o2 = e2.groupID, e2 = e2.keyList, i2 = void 0 === e2 ? [] : e2, e2 = this._getLocalGroupCounters(o2), a2 = e2.avChatRoomKey, e2 = e2.lastUpdateTime, s2 = new G("getGroupCounters"); - if (s2.setMessage("groupID:".concat(o2)), Date.now() - e2 >= this.EXPIRE_TIME) - return this._getRemoteGroupCounters({ groupID: o2, avChatRoomKey: a2 }).then(function(e3) { - s2.setMoreMessage("from remote. count:".concat(e3.length)).end(), M.l("".concat(n2, " from remote. groupID:").concat(o2)); - e3 = t2._getLocalCounters(o2, i2); - return C({ counters: e3 }); - }).catch(function(e3) { - return s2.setError(e3).end(), D(e3); - }); - s2.setMoreMessage("from cache").end(), M.l("".concat(n2, " from cache. groupID:").concat(o2)); - e2 = this._getLocalCounters(o2, i2); - return T({ counters: e2 }); - } }, { key: "_getRemoteGroupCounters", value: function(n2) { - var o2 = this; - return this._grpM.req({ P: k.GET_GRP_COUNTER, data: y({}, n2) }).then(function(e2) { - var e2 = e2.data, t2 = e2.counterList, t2 = void 0 === t2 ? [] : t2, e2 = e2.groupCounterSeq; - return o2._updateLocalGroupCounters({ groupID: n2.groupID, counterList: t2, groupCounterSeq: e2 }), M.l("".concat(o2._n, "._getRemoteGroupCounters ok. groupID:").concat(n2.groupID)), t2; - }).catch(function(e2) { - return D(e2); - }); - } }, { key: "_convertObjectToList", value: function(t2) { - var n2 = []; - return Object.keys(t2).forEach(function(e2) { - n2.push({ key: e2, value: t2[e2] }); - }), n2; - } }, { key: "_updateGroupCounters", value: function(e2) { - var t2 = "".concat(this._n, "._updateGroupCounters"), n2 = e2.groupID, o2 = e2.avChatRoomKey, i2 = e2.mode; - return M.l("".concat(t2, ". groupID:").concat(n2, " avChatRoomKey:").concat(o2, " mode:").concat(i2)), this._grpM.req({ P: k.UPDATE_GRP_COUNTER, data: y({}, e2) }).then(function(e3) { - M.l("".concat(t2, " ok.")); - var e3 = e3.data.counterList, n3 = {}; - return (void 0 === e3 ? [] : e3).forEach(function(e4) { - var t3 = e4.key, e4 = e4.value; - n3[t3] = e4; - }), n3; - }).catch(function(e3) { - return D(e3); - }); - } }, { key: "_hasLocalGroupCounters", value: function(e2) { - return this._groupCountersMap.has(e2); - } }, { key: "_getLocalGroupCounters", value: function(e2) { - return this._hasLocalGroupCounters(e2) || this.initGroupCountersCache({ groupID: e2 }), this._groupCountersMap.get(e2); - } }, { key: "_updateLocalGroupCounters", value: function(e2) { - var n2, t2, o2, i2 = e2.groupID, a2 = e2.counterList, a2 = void 0 === a2 ? [] : a2, e2 = e2.groupCounterSeq; - this._hasLocalGroupCounters(i2) && (o2 = this._getLocalGroupCounters(i2), n2 = o2.counters, t2 = o2.avChatRoomKey, o2 = o2.groupCounterSeq, 0 < e2 && e2 < o2 || (a2.forEach(function(e3) { - var t3 = e3.key, e3 = e3.value; - n2.set(t3, e3); - }), this._groupCountersMap.set(i2, { lastUpdateTime: Date.now(), groupCounterSeq: e2, counters: n2, avChatRoomKey: t2 }))); - } }, { key: "_deleteLocalGroupCounters", value: function(e2) { - var t2, n2, o2 = e2.groupID, i2 = e2.counterList, i2 = void 0 === i2 ? [] : i2, e2 = e2.groupCounterSeq; - this._hasLocalGroupCounters(o2) && (n2 = this._getLocalGroupCounters(o2), t2 = n2.counters, n2 = n2.avChatRoomKey, i2.forEach(function(e3) { - t2.delete(e3.key); - }), this._groupCountersMap.set(o2, { lastUpdateTime: Date.now(), groupCounterSeq: e2, counters: t2, avChatRoomKey: n2 })); - } }, { key: "_getLocalCounters", value: function(e2, t2) { - var n2 = {}; - if (this._hasLocalGroupCounters(e2)) { - var o2 = this._getLocalGroupCounters(e2).counters; - if (0 < t2.length) - t2.forEach(function(e3) { - o2.has(e3) && (n2[e3] = o2.get(e3)); - }); - else { - var i2, a2 = Z(o2.keys()); - try { - for (a2.s(); !(i2 = a2.n()).done; ) { - var s2 = i2.value; - n2[s2] = o2.get(s2); - } - } catch (e3) { - a2.e(e3); - } finally { - a2.f(); - } - } - } - return n2; - } }, { key: "reset", value: function() { - this._groupCountersMap.clear(), this.EXPIRE_TIME = 3e4; - } }]), ji), _i = (e(Wi, [{ key: "start", value: function() { - var e2 = this._grpM.isLoggedIn(); - e2 || (this._proto = k.AV_NOAUTH_POLLING), M.l("".concat(this._n, ".start pollingInterval:").concat(this._manager.getPollingInterval(), " isLoggedIn:").concat(e2)), this._isRunning = true, this._request(); - } }, { key: "isRunning", value: function() { - return this._isRunning; - } }, { key: "_request", value: function() { - var t2 = this, e2 = this._onInit(this._groupID); - this._grpM.req({ P: this._proto, data: e2 }).then(function(e3) { - t2._onSuccess(t2._groupID, e3), t2.isRunning() && (clearTimeout(t2._timeoutID), t2._timeoutID = setTimeout(t2._request.bind(t2), t2._manager.getPollingInterval())); - }).catch(function(e3) { - t2._onFail(t2._groupID, e3), t2.isRunning() && (clearTimeout(t2._timeoutID), t2._timeoutID = setTimeout(t2._request.bind(t2), t2._manager.MAX_POLLING_INTERVAL)); - }); - } }, { key: "stop", value: function() { - M.l("".concat(this._n, ".stop")), 0 < this._timeoutID && (clearTimeout(this._timeoutID), this._timeoutID = -1), this._isRunning = false; - } }, { key: "getPollingTimerID", value: function() { - return this._timeoutID; - } }]), Wi), hi = { 3: true, 4: true, 5: true, 6: true, 17: true, 20: true, 21: true, 100: true }, gi = (e(Yi, [{ key: "hasJoinedAVChatRoom", value: function() { - var e2 = []; - return 0 < (e2 = 0 < this._joinedGroupMap.size ? p(this._joinedGroupMap.values()).filter(function(e3) { - return e3.type === A.GRP_AVCHATROOM; - }) : e2).length; - } }, { key: "getJoinedLiveList", value: function() { - var e2 = []; - return e2 = 0 < this._joinedGroupMap.size ? p(this._joinedGroupMap.values()).filter(function(e3) { - return e3.type === A.GRP_LIVE; - }) : e2; - } }, { key: "checkJoinedAVChatRoomByID", value: function(e2) { - return this._joinedGroupMap.has(e2); - } }, { key: "getJoinedAVChatRoom", value: function() { - return 0 < this._joinedGroupMap.size ? p(this._joinedGroupMap.keys()) : []; - } }, { key: "_updatedata", value: function(e2) { - var t2 = this._pollingRequestInfoMap.get(e2); - return e2 === p(this._pollingInstanceMap.keys())[0] ? y(y({}, t2), {}, { startBroadcastSeq: this._startBroadcastSeq, simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }) : y(y({}, t2), {}, { simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }); - } }, { key: "_handleSuccess", value: function(e2, t2) { - var n2, o2 = t2.data, i2 = o2.key, a2 = o2.nextSeq, s2 = o2.rspMsgList, r2 = o2.errorCode, c2 = o2.nextBroadcastSeq, o2 = o2.broadcastMessageList; - 0 !== r2 ? (r2 = this._pollingRequestInfoMap.get(e2), n2 = new G("longPollingAVError"), r2 = r2 ? "".concat(r2.key, "-").concat(r2.startSeq) : "requestInfo is undefined", n2.setMessage("".concat(e2, "-").concat(r2, "-").concat(t2.errorInfo)).setCode(t2.errorCode).end(true)) : this.checkJoinedAVChatRoomByID(e2) && (m(i2) && R(a2) && this._pollingRequestInfoMap.set(e2, { key: i2, startSeq: a2 }), R(c2) && c2 > this._startBroadcastSeq && (this._startBroadcastSeq = c2), O(s2) && 0 < s2.length ? (s2.forEach(function(e3) { - e3.to = e3.groupID; - }), this.onMessage(s2, e2)) : (this._pollingNoMessageCount += 1, this._pollingNoMessageCount === this.DEFAULT_POLLING_NO_MESSAGE_COUNT && (this._pollingInterval = this.DEFAULT_POLLING_INTERVAL + this.DEFAULT_POLLING_INTERVAL_PLUS)), this._onBroadcastMessage(o2)); - } }, { key: "_handleFailure", value: function(e2, t2) { - } }, { key: "onMessage", value: function(e2, t2) { - if (O(e2) && 0 !== e2.length) { - var n2 = "".concat(this._n, ".onMessage"), o2 = (t2 && (n2 += " groupID:".concat(t2)), 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL), null), i2 = [], a2 = this._get(11), s2 = this._get(26), r2 = e2.length, c2 = (1 < r2 && e2.sort(function(e3, t3) { - return e3.sequence - t3.sequence; - }), this._get(12).isUnlimitedAVChatRoom()), u2 = false; - M.getLevel() <= 0 && (t2 = e2.map(function(e3) { - return e3.sequence; - }), M.l("".concat(n2, " count:").concat(t2.length, " sequenceList:").concat(t2)), t2.length = 0); - for (var l2 = 0; l2 < r2; l2++) { - var d2 = this.restoreMessageFromSimplified(e2[l2]); - if (hi[d2.event]) { - if (6 === d2.event) { - if (this._grpM.isGroupAttributesUpdatedNotice(d2)) - continue; - if (this._grpM.isGroupCountersNotice(d2)) - continue; - } - if (20 !== d2.event) - if (21 !== d2.event) - if (100 !== d2.event) { - var o2 = this.packMessage(d2, d2.event), p2 = 1 === d2.isModified, u2 = 1 === d2.isHistoryMessage; - if (!c2) { - if (this._seqSll.has(o2.sequence)) - continue; - this._seqSll.set(o2.sequence); - } - var _2 = this._IDSll.has(o2.ID); - _2 ? M.w("".concat(n2, " ID:").concat(o2.ID, " has:").concat(_2)) : (this._IDSll.set(o2.ID), _2 = false, !u2 && this._isMessageSentByCurrentInstance(o2) ? p2 && (_2 = true, o2.isModified = p2, a2.updateMsgIsModifiedProp(o2)) : _2 = true, _2 && (o2.conversationType === A.CONV_SYSTEM && 5 === o2.payload.operationType && this._onGroupDismissed(o2.payload.groupProfile.groupID), u2 || o2.conversationType === A.CONV_SYSTEM || (p2 = o2.conversationID.replace(A.CONV_GROUP, ""), this._pollingInstanceMap.has(p2) ? this._grpM.isLoggedIn() && s2.addMessageSequence({ key: zn, message: o2 }) : (o2.type !== A.MSG_GRP_TIP && 0 < o2.clientTime && s2.addMessageDelay(o2.clientTime), s2.addMessageSequence({ key: Jn, message: o2 }))), i2.push(o2))); - } else - this.onRoomCustomData(d2); - else - this._get(34).onMessageReactionNotify({ event: 21, dataList: d2.elements.messageReactionNotifyList }); - else - this.handleMessageRevokedNotice(d2); - } else - M.w("".concat(n2, ". unknown event:").concat(d2.event)); - } - 0 !== i2.length && (0 < (t2 = At(i2)).length && this._grpM.emitOEvt(h.MESSAGE_MODIFIED, t2), u2 || 0 < (t2 = this.packConversationOption(i2)).length && a2.onNewMessage({ conversationOptionsList: t2, isInstantMessage: true }), this._checkMessageStacked(i2), 0 < (t2 = Rt(i2)).length && this._grpM.emitOEvt(h.MESSAGE_RECEIVED, t2), i2.length = 0); - } - } }, { key: "handleMessageRevokedNotice", value: function(e2) { - var t2 = this, i2 = e2.groupID, n2 = e2.elements.revokeMsgList, a2 = e2.revokerInfo, s2 = []; - n2.forEach(function(e3) { - var t3 = e3.tinyID, n3 = e3.clientTime, o2 = e3.random, e3 = e3.sequence, t3 = { conversationID: "".concat(A.CONV_GROUP).concat(i2), ID: "".concat(t3, "-").concat(n3, "-").concat(o2), revoker: a2.revoker, revokeReason: a2.reason || "", revokerInfo: { userID: a2.revoker, nick: "", avatar: "" }, sequence: e3 }; - s2.push(t3); - }), 0 !== s2.length && this._get(11).updateRevokerInfo(s2).then(function(e3) { - t2._grpM.emitOEvt(h.MESSAGE_REVOKED, e3); - }); - } }, { key: "isBroadcastOrNormal", value: function(e2) { - return 3 === e2 || 17 === e2; - } }, { key: "isGroupTip", value: function(e2) { - return 4 === e2 || 6 === e2; - } }, { key: "isGroupSystemNotice", value: function(e2) { - return 5 === e2; - } }, { key: "restoreGroupTipElements", value: function() { - var e2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t2 = e2.operatorInfo, t2 = void 0 === t2 ? {} : t2, n2 = e2.operatorID, o2 = e2.userIDList, o2 = void 0 === o2 ? [] : o2, i2 = e2.operationType, i2 = (R(e2.groupJoinType) || 1 !== i2 && 2 !== i2 || (e2.groupJoinType = 2 === i2 ? 0 : 1), t2.userID), a2 = t2.avatar, t2 = t2.nick, n2 = (e2.operatorInfo = { userID: void 0 === i2 ? n2 : i2, avatar: void 0 === a2 ? "" : a2, nick: void 0 === t2 ? "" : t2 }, o2.map(function(e3) { - return { userID: e3 }; - })); - return e2.memberInfoList = e2.memberInfoList || n2, e2; - } }, { key: "restoreMessageFromSimplified", value: function(n2) { - var e2, t2, o2, i2 = n2.event; - return this.isBroadcastOrNormal(i2) && (n2.cloudCustomData = n2.cloudCustomData || "", n2.elements = n2.elements.map(function(e3) { - var t3; - return e3.type === A.MSG_CUSTOM && (t3 = e3.content, e3.content = y({ data: "", description: "", extension: "" }, void 0 === t3 ? {} : t3)), e3; - })), (this.isGroupTip(i2) || this.isGroupSystemNotice(i2)) && (n2.from = n2.from || "@TIM#SYSTEM"), this.isGroupTip(i2) && (n2.elements = this.restoreGroupTipElements(n2.elements), t2 = (o2 = void 0 === (o2 = n2.elements) ? {} : o2).operationType, e2 = o2.operatorInfo, 1 === t2) && (t2 = [{ userID: (void 0 === e2 ? {} : e2).userID }], o2.memberInfoList = o2.memberInfoList || t2), this.isGroupSystemNotice(i2) && (o2 = (e2 = n2.elements).memberInfoList, t2 = e2.operatorInfo, n2.elements.memberInfoList = y({ userID: n2.elements.operatorID, avatar: "", nick: "" }, o2 = o2 || (void 0 === t2 ? {} : t2)), n2.elements = y({ authentication: "", remarkInfo: "", messageKey: 1e3 * n2.time }, n2.elements), i2 = Object.keys(n2.elements).filter(function(e3) { - return "operatorInfo" !== e3; - }).reduce(function(e3, t3) { - return y(y({}, e3), {}, F({}, t3, n2.elements[t3])); - }, {}), n2.elements = i2), n2; - } }, { key: "_onGroupDismissed", value: function(e2) { - M.l("".concat(this._n, "._onGroupDismissed groupID:").concat(e2)), this._grpM.deleteLocalGroupAndConversation(e2), this.reset(e2); - } }, { key: "_checkMessageStacked", value: function(e2) { - var t2 = "MessageStacked", e2 = e2.length; - 100 <= e2 && (this._grpM.warn(t2, e2), this._reportMessageStackedCount < 5) && (new G(t2).setMessage("count:".concat(e2, " groupID:").concat(p(this._joinedGroupMap.keys()))).setLevel("warning").end(), this._reportMessageStackedCount += 1); - } }, { key: "_isMessageSentByCurrentInstance", value: function(e2) { - return !!this._get(11).isMessageSentByCurrentInstance(e2); - } }, { key: "packMessage", value: function(e2, t2) { - e2.currentUser = this._grpM.getMyUserID(), e2.conversationType = 5 === t2 ? A.CONV_SYSTEM : A.CONV_GROUP, e2.isSystemMessage = !!e2.isSystemMessage; - var n2 = new Do(e2), e2 = this.packElements(e2, t2), t2 = this._grpM.getFileDownloadProxy(), o2 = this._grpM.getDowloadFileAuthKey(), i2 = this._get(17).getFileDNList(); - return n2.setElement(e2, t2, o2, i2), n2; - } }, { key: "packElements", value: function(e2, t2) { - return 4 === t2 || 6 === t2 ? (this._updateMemberCountByGroupTips(e2), { type: A.MSG_GRP_TIP, content: y(y({}, e2.elements), {}, { groupProfile: e2.groupProfile }) }) : 5 === t2 ? { type: A.MSG_GRP_SYS_NOTICE, content: y(y({}, e2.elements), {}, { groupProfile: y(y({}, e2.groupProfile), {}, { groupID: e2.groupID }) }) } : e2.elements; - } }, { key: "packConversationOption", value: function(e2) { - for (var t2 = /* @__PURE__ */ new Map(), n2 = 0; n2 < e2.length; n2++) { - var o2, i2 = e2[n2], a2 = i2.conversationID; - t2.has(a2) ? "in" === ((o2 = t2.get(a2)).lastMessage = i2).flow && o2.unreadCount++ : t2.set(a2, { conversationID: i2.conversationID, unreadCount: "out" === i2.flow ? 0 : 1, type: i2.conversationType, subType: i2.conversationSubType, lastMessage: i2 }); - } - return p(t2.values()); - } }, { key: "_updateMemberCountByGroupTips", value: function(e2) { - var t2, n2, o2, i2 = e2.groupProfile.groupID, e2 = e2.elements.onlineMemberInfo, e2 = void 0 === e2 ? void 0 : e2; - S(e2) || (t2 = void 0 === (t2 = e2.onlineMemberNum) ? 0 : t2, e2 = void 0 === (e2 = e2.expireTime) ? this.DEFAULT_EXPIRE_TIME : e2, n2 = this._onlineMemberCountMap.get(i2) || {}, o2 = Date.now(), S(n2) ? Object.assign(n2, { lastReqTime: 0, lastSyncTime: 0, latestUpdateTime: o2, memberCount: t2, expireTime: e2 }) : (n2.latestUpdateTime = o2, n2.memberCount = t2), this._onlineMemberCountMap.set(i2, n2)); - } }, { key: "_onBroadcastMessage", value: function(e2) { - if (!S(e2)) { - for (var t2 = [], n2 = e2.length, o2 = null, i2 = 0; i2 < n2; i2++) { - var a2 = this.restoreMessageFromSimplified(e2[i2]); - hi[a2.event] ? ((o2 = this.packMessage(a2, a2.event)).isBroadcastMessage = true, this._broadcastMessageIDMap.has(o2.ID) || (t2.push(o2), this._broadcastMessageIDMap.set(o2.ID, 1))) : M.w("".concat(this._n, "._onBroadcastMessage unknown event:").concat(a2.event)); - } - 0 < t2.length && this._grpM.emitOEvt(h.MESSAGE_RECEIVED, t2); - } - } }, { key: "start", value: function(e2) { - var t2; - this._pollingInstanceMap.has(e2) ? (t2 = this._pollingInstanceMap.get(e2)).isRunning() || t2.start() : ((t2 = new _i({ manager: this, groupID: e2, onInit: this._updatedata.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) })).start(), this._pollingInstanceMap.set(e2, t2), M.l("".concat(this._n, ".start groupID:").concat(e2))); - } }, { key: "handleJoinResult", value: function(o2) { - var i2 = this; - return this._preCheck(o2.group).then(function() { - var e2 = o2.longPollingKey, t2 = o2.group, n2 = t2.groupID; - return i2._joinedGroupMap.set(n2, t2), i2._grpM.updateGroupMap([t2]), i2._grpM.deleteUnjoinedAVChatRoom(n2), i2._grpM.emitGroupListUpdate(true, false), N(e2) ? T({ status: nt, group: t2 }) : Promise.resolve(); - }); - } }, { key: "startRunLoop", value: function(i2) { - var a2 = this; - return this.handleJoinResult(i2).then(function() { - var e2 = i2.longPollingKey, t2 = i2.group, n2 = i2.startSeq, o2 = t2.groupID; - return a2._pollingRequestInfoMap.set(o2, { key: e2, startSeq: void 0 === n2 ? 0 : n2 }), a2.start(o2), a2._grpM.isLoggedIn() ? T({ status: nt, group: t2 }) : T({ status: nt }); - }); - } }, { key: "_preCheck", value: function(e2) { - if (!this._get(12).isUnlimitedAVChatRoom() && this.hasJoinedAVChatRoom() && e2.type !== A.GRP_LIVE) { - var e2 = Y(this._joinedGroupMap.entries().next().value, 2), t2 = e2[0], e2 = e2[1]; - if (this._grpM.isLoggedIn() && e2.selfInfo.role !== A.GRP_MBR_ROLE_OWNER && e2.ownerID !== this._grpM.getMyUserID()) - return this._grpM.quitGroup(t2); - this._grpM.deleteLocalGroupAndConversation(t2), this.reset(t2); - } - return Promise.resolve(); - } }, { key: "joinWithoutAuth", value: function(e2) { - var n2 = this, o2 = e2.groupID, i2 = "".concat(this._n, ".").concat("joinWithoutAuth"), a2 = new G("joinWithoutAuth"); - return this._grpM.req({ P: k.APPLY_JOIN_GRP_NOAUTH, data: e2 }).then(function(e3) { - e3 = e3.data.longPollingKey; - if (a2.setMessage("groupID:".concat(o2, " longPollingKey:").concat(e3)).end(true), N(e3)) - return D({ code: L.CANNOT_JOIN_NON_AV_WITHOUT_LOGIN }); - M.l("".concat(i2, " ok. groupID:").concat(o2)), n2._get(11).setCompleted("".concat(A.CONV_GROUP).concat(o2)); - var t2 = new oi({ groupID: o2 }); - return n2.startRunLoop({ group: t2, longPollingKey: e3 }), C({ status: nt }); - }).catch(function(e3) { - return M.e("".concat(i2, " failed. groupID:").concat(o2, " error:"), e3), a2.setError(e3).setMessage("groupID:".concat(o2)).end(true), D(e3); - }).finally(function() { - n2._grpM.get(14).reportAtOnce(); - }); - } }, { key: "getGroupOnlineMemberCount", value: function(e2) { - var t2 = this._onlineMemberCountMap.get(e2) || {}, n2 = Date.now(); - return S(t2) || n2 - t2.lastSyncTime > 1e3 * t2.expireTime && 1e4 < n2 - t2.latestUpdateTime && 3e3 < n2 - t2.lastReqTime ? (t2.lastReqTime = n2, this._onlineMemberCountMap.set(e2, t2), this._getGroupOnlineMemberCount(e2).then(function(e3) { - return C({ memberCount: e3.memberCount }); - }).catch(function(e3) { - return D(e3); - })) : T({ memberCount: t2.memberCount }); - } }, { key: "_getGroupOnlineMemberCount", value: function(i2) { - var a2 = this, s2 = "".concat(this._n, ".").concat("_getGroupOnlineMemberCount"), t2 = new G("_getGroupOnlineMemberCount"); - return this._grpM.requestOnlineCount(i2).then(function(e2) { - var t3 = a2._onlineMemberCountMap.get(i2) || {}, e2 = e2.data, n2 = e2.memberCount, n2 = void 0 === n2 ? 0 : n2, e2 = e2.expireTime, e2 = void 0 === e2 ? a2.DEFAULT_EXPIRE_TIME : e2, o2 = (M.l("".concat(s2, " ok. groupID:").concat(i2, " memberCount:").concat(n2, " expireTime:").concat(e2)), Date.now()); - return S(t3) && (t3.lastReqTime = o2), a2._onlineMemberCountMap.set(i2, Object.assign(t3, { lastSyncTime: o2, latestUpdateTime: o2, memberCount: n2, expireTime: e2 })), { memberCount: n2 }; - }).catch(function(e2) { - return M.w("".concat(s2, " failed. error:"), e2), t2.setCode(e2.code).setMessage("groupID:".concat(i2, " error:").concat(JSON.stringify(e2))).end(), Promise.reject(e2); - }); - } }, { key: "_get", value: function(e2) { - return this._grpM.get(e2); - } }, { key: "setPollingInterval", value: function(e2) { - N(e2) || (R(e2) ? this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = e2 : this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = parseInt(e2, 10)); - } }, { key: "setPollingIntervalPlus", value: function(e2) { - N(e2) || (R(e2) ? this.DEFAULT_POLLING_INTERVAL_PLUS = e2 : this.DEFAULT_POLLING_INTERVAL_PLUS = parseInt(e2, 10)); - } }, { key: "setPollingNoMessageCount", value: function(e2) { - N(e2) || (R(e2) ? this.DEFAULT_POLLING_NO_MESSAGE_COUNT = e2 : this.DEFAULT_POLLING_NO_MESSAGE_COUNT = parseInt(e2, 10)); - } }, { key: "setPollingSimplifiedMessage", value: function(e2) { - N(e2) || "0" !== e2 && "1" !== e2 || (this.DEFAULT_POLLING_SIMPLIFIED_MSG = parseInt(e2, 10)); - } }, { key: "getPollingInterval", value: function() { - return this._pollingInterval; - } }, { key: "onAVChatRoomMemberBanned", value: function(e2) { - e2 = e2.payload.groupProfile.groupID; - M.l("".concat(this._n, ".onAVChatRoomMemberBanned groupID:").concat(e2)), this._grpM.deleteLocalGroupAndConversation(e2), this.reset(e2); - } }, { key: "restartPolling", value: function() { - M.l("".concat(this._n, ".restartPolling count:").concat(this._pollingInstanceMap.size)); - var e2, t2 = Z(this._pollingInstanceMap.values()); - try { - for (t2.s(); !(e2 = t2.n()).done; ) { - var n2 = e2.value; - n2.stop(), n2.start(); - } - } catch (e3) { - t2.e(e3); - } finally { - t2.f(); - } - } }, { key: "getPollingTimerID", value: function(e2) { - var t2; - return this._pollingInstanceMap.has(e2) ? (t2 = this._pollingInstanceMap.get(e2).getPollingTimerID(), M.l("".concat(this._n, ".getPollingTimerID groupID:").concat(e2, " timerID:").concat(t2)), t2) : -1; - } }, { key: "hasPollingInstance", value: function(e2) { - return this._pollingInstanceMap.has(e2); - } }, { key: "onRoomCustomData", value: function(e2) { - var t2 = e2.groupID, n2 = e2.sequence, o2 = e2.time, e2 = e2.elements, e2 = e2 && e2.content; - this._get(30).onRoomCustomDataReceived(e2), M.l("".concat(this._n, ".onRoomCustomData groupID:").concat(t2, " sequence:").concat(n2, " time:").concat(o2, " data:").concat(e2)); - } }, { key: "reset", value: function(e2) { - if (e2) { - M.l("".concat(this._n, ".reset groupID:").concat(e2)); - var t2 = this._pollingInstanceMap.get(e2); - t2 && t2.stop(), this._pollingInstanceMap.delete(e2), this._joinedGroupMap.delete(e2), this._pollingRequestInfoMap.delete(e2), this._onlineMemberCountMap.delete(e2); - } else { - M.l("".concat(this._n, ".reset all")); - var n2, o2 = Z(this._pollingInstanceMap.values()); - try { - for (o2.s(); !(n2 = o2.n()).done; ) - n2.value.stop(); - } catch (e3) { - o2.e(e3); - } finally { - o2.f(); - } - this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this._pollingRequestInfoMap.clear(), this._onlineMemberCountMap.clear(), this._broadcastMessageIDMap.clear(); - } - this._seqSll.reset(), this._IDSll.reset(), this._reportMessageStackedCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = 300, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0; - } }]), Yi), fi = (e(Ki, [{ key: "updateMember", value: function(e2) { - N(e2.onlineStatus) || (this.isOnline = "Online" === e2.onlineStatus); - var t2 = [null, void 0, "", 0, NaN]; - e2.memberCustomField && kt(this.memberCustomField, e2.memberCustomField), _t(this, e2, ["memberCustomField", "marks", "onlineStatus"], t2); - } }, { key: "updateRole", value: function(e2) { - ["Owner", "Admin", "Member"].indexOf(e2) < 0 || (this.role = e2); - } }, { key: "updateMuteUntil", value: function(e2) { - N(e2) || (this.muteUntil = Math.floor((Date.now() + 1e3 * e2) / 1e3)); - } }, { key: "updateNameCard", value: function(e2) { - N(e2) || (this.nameCard = e2); - } }, { key: "updateMemberCustomField", value: function(e2) { - e2 && kt(this.memberCustomField, e2); - } }]), Ki), mi = (e(Bi, [{ key: "_onProfileUpdated", value: function(e2) { - for (var n2 = this, o2 = e2.data, t2 = 0; t2 < o2.length; t2++) - !function(e3) { - var t3 = o2[e3]; - n2.groupMemberListMap.forEach(function(e4) { - e4.has(t3.userID) && e4.get(t3.userID).updateMember({ nick: t3.nick, avatar: t3.avatar }); - }); - }(t2); - } }, { key: "deleteGroupMemberList", value: function(e2) { - this.groupMemberListMap.delete(e2); - } }, { key: "getGroupMemberList", value: function(e2) { - var t2, o2 = this, i2 = e2.groupID, n2 = e2.role, n2 = void 0 === n2 ? void 0 : n2, a2 = e2.offset, s2 = void 0 === a2 ? 0 : a2, a2 = e2.count, r2 = void 0 === a2 ? 15 : a2, a2 = e2.filter, e2 = void 0 === a2 ? void 0 : a2, c2 = "".concat(this._n, ".").concat("getGroupMemberList"), a2 = this._grpM.hasLocalGroup(i2); - if (M.l("".concat(c2, " groupID:").concat(i2, " role:").concat(n2, " offset:").concat(s2, " count:").concat(r2, " hasLocalGroup:").concat(a2)), !a2) - return T({ memberList: [], offset: 0 }); - if (this._grpM.getLocalGroupProfile(i2).type === A.GRP_AVCHATROOM) { - if (this._grpM.canIUse(_.AV_MBR_LIST)) - return this._getAVChatRoomMemberList({ groupID: i2, offset: s2, filter: e2 }); - this._grpM.warn("LiveOnlineMember"); - } - n2 !== A.GRP_MBR_ROLE_ADMIN && n2 !== A.GRP_MBR_ROLE_OWNER && n2 !== A.GRP_MBR_ROLE_MEMBER || (t2 = n2); - var u2 = new G("getGroupMemberList"), l2 = 0, a2 = { groupID: i2, limit: 100 < r2 ? 100 : r2, memberRoleFilter: t2 ? [t2] : void 0, memberInfoFilter: this.DEFAULT_MEMBER_INFO_FILTER }, d2 = (Nt({ groupID: i2 }) ? a2.next = "".concat(s2) : l2 = (a2.offset = s2) + r2, []); - return this._grpM.req({ P: k.GET_GRP_MBR_LIST, data: a2 }).then(function(e3) { - var e3 = e3.data, t3 = e3.members, n3 = e3.memberNum, e3 = e3.next, e3 = void 0 === e3 ? void 0 : e3; - return N(e3) || (l2 = S(e3) ? 0 : e3), O(t3) && 0 !== t3.length ? (o2._grpM.hasLocalGroup(i2) && (o2._grpM.getLocalGroupProfile(i2).memberNum = n3), d2 = o2._updateLocalGroupMemberMap(i2, t3), o2._grpM.get(4).getUserProfile({ userIDList: t3.map(function(e4) { - return e4.userID; - }), tagList: [g.NICK, g.AVATAR] })) : (l2 = 0, Promise.resolve([])); - }).then(function(e3) { - var e3 = e3.data; - return O(e3) && 0 !== e3.length ? (e3 = e3.map(function(e4) { - return { userID: e4.userID, nick: e4.nick, avatar: e4.avatar }; - }), o2._updateLocalGroupMemberMap(i2, e3), d2.length < r2 && (l2 = 0), u2.setMessage("groupID:".concat(i2, " offset:").concat(s2, " count:").concat(r2)).end(), M.l("".concat(c2, " ok.")), C({ memberList: d2, offset: l2 })) : T({ memberList: [], offset: l2 }); - }).catch(function(e3) { - return u2.setError(e3).end(), M.e("".concat(c2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_getAVChatRoomMemberList", value: function(e2) { - var n2 = this, o2 = e2.groupID, t2 = e2.offset, e2 = e2.filter, i2 = "".concat(this._n, ".").concat("_getAVChatRoomMemberList"), a2 = new G("_getAVChatRoomMemberList"); - return a2.setMessage("groupID:".concat(o2, " offset:").concat(t2, " filter:").concat(e2)), this._grpM.req({ P: k.GET_AV_MBR_LIST, data: { groupID: o2, offset: t2, filter: e2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.memberList, t3 = void 0 === t3 ? [] : t3, e3 = e3.offset, e3 = void 0 === e3 ? 0 : e3, t3 = (a2.end(), M.l("".concat(i2, " ok. member count:").concat(t3.length, ", next request timestamp:").concat(e3)), t3.map(function(e4) { - return y(y({}, e4), {}, { onlineStatus: "Online" }); - })), t3 = n2._updateLocalGroupMemberMap(o2, t3); - return C({ memberList: t3, offset: e3 }); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - }); - } }, { key: "getGroupMemberProfile", value: function(e2) { - var t2, n2 = this, o2 = "getGroupMemberProfile", i2 = "".concat(this._n, ".").concat(o2), a2 = "groupID:".concat(e2.groupID), s2 = (5 < e2.userIDList.length ? a2 += " userIDList.length:".concat(e2.userIDList.length) : a2 += " userIDList:".concat(e2.userIDList), M.l("".concat(i2, " ").concat(a2)), 50 < e2.userIDList.length && (e2.userIDList = e2.userIDList.slice(0, 50)), e2.groupID), r2 = e2.userIDList, i2 = this._grpM.getLocalGroupProfile(s2); - return i2 && Ot(i2.type) ? D({ code: i2 = L.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(i2, o2) }) : ((t2 = new G(o2)).setMessage(a2), this._getGroupMemberProfileAdvance(y(y({}, e2), {}, { userIDList: r2 })).then(function(e3) { - e3 = e3.data.members; - return O(e3) && 0 !== e3.length ? (n2._updateLocalGroupMemberMap(s2, e3), n2._grpM.get(4).getUserProfile({ userIDList: e3.map(function(e4) { - return e4.userID; - }), tagList: [g.NICK, g.AVATAR] })) : T([]); - }).then(function(e3) { - e3 = e3.data.map(function(e4) { - return { userID: e4.userID, nick: e4.nick, avatar: e4.avatar }; - }), n2._updateLocalGroupMemberMap(s2, e3), e3 = r2.filter(function(e4) { - return n2.hasLocalGroupMember(s2, e4); - }).map(function(e4) { - return n2.getLocalGroupMemberInfo(s2, e4); - }); - return t2.end(), C({ memberList: e3 }); - })); - } }, { key: "addGroupMember", value: function(a2) { - var s2 = this, r2 = "".concat(this._n, ".").concat("addGroupMember"), e2 = a2.groupID, c2 = this._grpM.getLocalGroupProfile(e2), t2 = c2.type, u2 = new G("addGroupMember"); - return u2.setMessage("groupID:".concat(e2, " groupType:").concat(t2)), Ot(t2) ? (t2 = new E({ code: L.CANNOT_ADD_MEMBER_IN_AV }), u2.setError(t2).end(), D(t2)) : (a2.userIDList = a2.userIDList.map(function(e3) { - return { userID: e3 }; - }), M.l("".concat(r2, " groupID:").concat(e2)), this._grpM.req({ P: k.ADD_GRP_MBR, data: a2 }).then(function(e3) { - var e3 = e3.data.members, t3 = (M.l("".concat(r2, " ok")), e3.filter(function(e4) { - return 1 === e4.result; - }).map(function(e4) { - return e4.userID; - })), n2 = e3.filter(function(e4) { - return 0 === e4.result; - }).map(function(e4) { - return e4.userID; - }), o2 = e3.filter(function(e4) { - return 2 === e4.result; - }).map(function(e4) { - return e4.userID; - }), e3 = e3.filter(function(e4) { - return 4 === e4.result; - }).map(function(e4) { - return e4.userID; - }), i2 = "groupID:".concat(a2.groupID, ", ") + "successUserIDList:".concat(t3, ", ") + "failureUserIDList:".concat(n2, ", ") + "existedUserIDList:".concat(o2, ", ") + "overLimitUserIDList:".concat(e3); - return u2.setMoreMessage(i2).end(), 0 === t3.length ? C({ successUserIDList: t3, failureUserIDList: n2, existedUserIDList: o2, overLimitUserIDList: e3 }) : (s2._updateConvGroupProfile(c2), C({ successUserIDList: t3, failureUserIDList: n2, existedUserIDList: o2, overLimitUserIDList: e3, group: c2 })); - }).catch(function(e3) { - return u2.setError(e3).end(), M.e("".concat(r2, " failed. error:"), e3), D(e3); - })); - } }, { key: "deleteGroupMember", value: function(e2) { - var t2, n2, o2 = this, i2 = "".concat(this._n, ".").concat("deleteGroupMember"), a2 = e2.groupID, s2 = e2.userIDList, r2 = this._grpM.getLocalGroupProfile(a2); - return N(r2) ? D({ code: L.CANNOT_FIND_GRP }) : Ot(r2.type) ? this._grpM.canIUse(_.AV_BAN_MBR) ? this._banAVChatRoomMember(e2) : this._grpM.noUse("deleteGroupMember") : (t2 = "groupID:".concat(a2, " ").concat(5 < s2.length ? "userIDList.length:".concat(s2.length) : "userIDList:".concat(s2)), M.l("".concat(i2, " groupID:").concat(a2, " userIDList:"), s2), (n2 = new G("deleteGroupMember")).setMessage(t2), this._grpM.req({ P: k.DEL_GRP_MBR, data: e2 }).then(function() { - return n2.end(), M.l("".concat(i2, " ok")), o2._updateConvGroupProfile(r2), o2.deleteLocalGroupMembers(a2, s2), C({ group: r2, userIDList: s2 }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })); - } }, { key: "_updateConvGroupProfile", value: function(e2) { - this._grpM.get(11).updateConvGroupProfile([e2]); - } }, { key: "_banAVChatRoomMember", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("_banAVChatRoomMember"), o2 = e2.groupID, i2 = e2.userIDList, a2 = "groupID:".concat(o2, " ").concat(5 < i2.length ? "userIDList.length:".concat(i2.length) : "userIDList:".concat(i2)), s2 = new G("_banAVChatRoomMember"), r2 = (s2.setMessage(a2), M.l("".concat(n2, " groupID:").concat(o2, " userIDList:"), i2), this._grpM.getLocalGroupProfile(o2)); - return N(e2.duration) || 0 === e2.duration ? D({ code: L.BAN_DURATION_INVALID }) : this._grpM.req({ P: k.BAN_AV_MBR, data: e2 }).then(function() { - return s2.end(), M.l("".concat(n2, " ok")), t2.deleteLocalGroupMembers(o2, i2), C({ group: r2, userIDList: i2 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "setGroupMemberMuteTime", value: function(e2) { - var t2, n2, o2 = this, i2 = e2.groupID, a2 = e2.userID, e2 = e2.muteTime, s2 = "".concat(this._n, ".").concat("setGroupMemberMuteTime"); - return a2 === this._grpM.getMyUserID() ? D({ code: L.CANNOT_MUTE_SELF }) : (t2 = "groupID:".concat(i2, " userID:").concat(a2, " muteTime:").concat(e2), M.l("".concat(s2, " ").concat(t2)), (n2 = new G("setGroupMemberMuteTime")).setMessage(t2), this.modifyGroupMemberInfo({ groupID: i2, userID: a2, muteTime: e2 }).then(function(e3) { - n2.end(), M.l("".concat(s2, " ok")); - var t3 = o2._grpM.getLocalGroupProfile(i2); - return C({ group: t3, member: e3 }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(s2, " failed. error:"), e3), D(e3); - })); - } }, { key: "setGroupMemberRole", value: function(e2) { - var t2, n2, o2 = "".concat(this._n, ".").concat("setGroupMemberRole"), i2 = e2.groupID, a2 = e2.userID, e2 = e2.role, s2 = "groupID:".concat(i2, " userID:").concat(a2, " role:").concat(e2), r2 = this._grpM.getLocalGroupProfile(i2); - return r2 && r2.selfInfo.role !== A.GRP_MBR_ROLE_OWNER ? D({ code: L.NOT_OWNER }) : (t2 = [A.GRP_MBR_ROLE_ADMIN, A.GRP_MBR_ROLE_MEMBER], Nt({ groupID: i2 }) && t2.push(A.GRP_MBR_ROLE_CUSTOM), t2.indexOf(e2) < 0 ? D({ code: L.INVALID_MEMBER_ROLE }) : a2 === this._grpM.getMyUserID() ? D({ code: L.CANNOT_SET_SELF_MEMBER_ROLE }) : ((n2 = new G("setGroupMemberRole")).setMessage(s2), M.l("".concat(o2, " ").concat(s2)), this.modifyGroupMemberInfo({ groupID: i2, userID: a2, role: e2 }).then(function(e3) { - return n2.end(), M.l("".concat(o2, " ok")), C({ group: r2, member: e3 }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - }))); - } }, { key: "_filterProfanity", value: function(e2, t2) { - var n2, o2 = this._grpM.get(29); - return !o2 || (n2 = (o2 = o2.filterText(t2[e2], "group_member_profile")).isAllowedToSend, o2 = o2.modifiedText, true === n2 && (t2[e2] = o2, true)); - } }, { key: "setGroupMemberNameCard", value: function(e2) { - var n2, o2, i2, t2, a2, s2 = this, r2 = "setGroupMemberNameCard", c2 = "".concat(this._n, ".").concat(r2); - return e2.nameCard && false === this._filterProfanity("nameCard", e2) ? D({ code: L.PROFANITY_FOUND }) : (n2 = e2.groupID, t2 = e2.userID, o2 = void 0 === t2 ? this._grpM.getMyUserID() : t2, i2 = e2.nameCard, t2 = "groupID:".concat(n2, " userID:").concat(o2, " nameCard:").concat(i2), M.l("".concat(c2, " ").concat(t2)), (e2 = this._grpM.getLocalGroupProfile(n2)) && Ot(e2.type) ? D({ code: e2 = L.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(e2, r2) }) : ((a2 = new G(r2)).setMessage(t2), this.modifyGroupMemberInfo({ groupID: n2, userID: o2, nameCard: i2 }).then(function(e3) { - M.l("".concat(c2, " ok")), a2.end(); - var t3 = s2._grpM.getLocalGroupProfile(n2); - return o2 === s2._grpM.getMyUserID() && t3 && t3.setSelfNameCard(i2), C({ group: t3, member: e3 }); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(c2, " failed. error:"), e3), D(e3); - }))); - } }, { key: "setGroupMemberCustomField", value: function(e2) { - var n2, o2 = this, t2 = "setGroupMemberCustomField", i2 = "".concat(this._n, ".").concat(t2), a2 = e2.groupID, s2 = e2.userID, s2 = void 0 === s2 ? this._grpM.getMyUserID() : s2, e2 = e2.memberCustomField, r2 = "groupID:".concat(a2, " userID:").concat(s2, " memberCustomField:").concat(JSON.stringify(e2)), c2 = (M.l("".concat(i2, " ").concat(r2)), this._grpM.getLocalGroupProfile(a2)); - return c2 && Ot(c2.type) ? D({ code: c2 = L.OPERATION_NOT_SUPPORTED_IN_AV, message: this._grpM.getErrMsg(c2, t2) }) : ((n2 = new G(t2)).setMessage(r2), this.modifyGroupMemberInfo({ groupID: a2, userID: s2, memberCustomField: e2 }).then(function(e3) { - n2.end(), M.l("".concat(i2, " ok")); - var t3 = o2._grpM.getLocalGroupProfile(a2); - return C({ group: t3, member: e3 }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })); - } }, { key: "modifyGroupMemberInfo", value: function(t2) { - var n2 = this, o2 = t2.groupID, i2 = t2.userID, e2 = void 0; - return Gt(o2) && (o2 = Jt(e2 = o2)), this._grpM.req({ P: k.MODIFY_GRP_MBR_INFO, data: y(y({}, t2), {}, { groupID: o2, topicID: e2 }) }).then(function() { - var e3; - return n2.hasLocalGroupMember(o2, i2) ? (e3 = n2.getLocalGroupMemberInfo(o2, i2), N(t2.muteTime) || e3.updateMuteUntil(t2.muteTime), N(t2.role) || e3.updateRole(t2.role), N(t2.nameCard) || e3.updateNameCard(t2.nameCard), N(t2.memberCustomField) || e3.updateMemberCustomField(t2.memberCustomField), e3) : (e3 = n2._grpM.getLocalGroupProfile(o2)) && !Ot(e3.type) ? n2.getGroupMemberProfile({ groupID: o2, userIDList: [i2] }).then(function(e4) { - return Y(e4.data.memberList, 1)[0]; - }) : void 0; - }); - } }, { key: "markGroupMemberList", value: function(e2) { - var o2 = "".concat(this._n, ".").concat("markGroupMemberList"), t2 = e2.groupID, n2 = e2.markType, i2 = e2.enableMark, e2 = e2.userIDList, a2 = void 0 === e2 ? [] : e2, e2 = "groupID:".concat(t2, " markType:").concat(n2, " enableMark:").concat(i2, " userIDList count:").concat(a2.length), s2 = (M.l("".concat(o2, " ").concat(e2)), 2), r2 = [], i2 = (true === i2 && (s2 = 1), p(a2)), c2 = (500 < a2.length && (i2 = a2.slice(0, 500), M.w("".concat(o2, " ").concat($t(500)))), i2.forEach(function(e3) { - r2.push({ userID: e3, markType: [n2] }); - }), i2 = null, new G("markGroupMemberList")); - return c2.setMessage(e2), this._grpM.req({ P: k.MARK_AV_MBR_INFO, data: { groupID: t2, operationType: s2, memberList: r2 } }).then(function(e3) { - var e3 = e3.data.memberList, e3 = void 0 === e3 ? [] : e3, t3 = [], n3 = [], e3 = (e3.length === a2.length ? t3.push.apply(t3, p(a2)) : (e3.forEach(function(e4) { - t3.push(e4.userID); - }), a2.forEach(function(e4) { - t3.includes(e4) || n3.push(e4); - })), "success count:".concat(t3.length, " fail count:").concat(n3.length)); - return c2.setMessage(e3).end(), M.l("".concat(o2, " ok. ").concat(e3)), C({ successUserIDList: t3, failureUserIDList: n3 }); - }).catch(function(e3) { - return c2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_getGroupMemberProfileAdvance", value: function(e2) { - return this._grpM.req({ P: k.GET_GRP_MBR_PROFILE, data: y(y({}, e2), {}, { memberInfoFilter: e2.memberInfoFilter || this.DEFAULT_MEMBER_INFO_FILTER }) }); - } }, { key: "_updateLocalGroupMemberMap", value: function(t2, e2) { - var n2 = this; - return O(e2) && 0 !== e2.length ? e2.map(function(e3) { - return n2.hasLocalGroupMember(t2, e3.userID) ? n2.getLocalGroupMemberInfo(t2, e3.userID).updateMember(e3) : n2.setLocalGroupMember(t2, new fi(e3)), n2.getLocalGroupMemberInfo(t2, e3.userID); - }) : []; - } }, { key: "deleteLocalGroupMembers", value: function(e2, t2) { - var n2 = this.groupMemberListMap.get(e2); - n2 && t2.forEach(function(e3) { - n2.delete(e3); - }); - } }, { key: "getLocalGroupMemberInfo", value: function(e2, t2) { - return this.groupMemberListMap.has(e2) ? this.groupMemberListMap.get(e2).get(t2) : null; - } }, { key: "setLocalGroupMember", value: function(e2, t2) { - this.groupMemberListMap.has(e2) ? this.groupMemberListMap.get(e2).set(t2.userID, t2) : (t2 = (/* @__PURE__ */ new Map()).set(t2.userID, t2), this.groupMemberListMap.set(e2, t2)); - } }, { key: "getLocalGroupMemberList", value: function(e2) { - return this.groupMemberListMap.get(e2); - } }, { key: "hasLocalGroupMember", value: function(e2, t2) { - return this.groupMemberListMap.has(e2) && this.groupMemberListMap.get(e2).has(t2); - } }, { key: "hasLocalGroupMemberMap", value: function(e2) { - return this.groupMemberListMap.has(e2); - } }, { key: "reset", value: function() { - this.groupMemberListMap.clear(); - } }]), Bi), vi = [17, 18, 20], Ii = (e(Hi, [{ key: "onNewGroupSystemNotice", value: function(e2) { - var t2 = e2.dataList, n2 = e2.isSyncingEnded, e2 = e2.isInstantMessage, t2 = (M.d("".concat(this._n, ".onReceiveSystemNotice count:").concat(t2.length)), this._assembly({ notifiesList: t2, isInstantMessage: e2 })), o2 = t2.eventDataList, t2 = t2.result; - 0 < o2.length && (this._grpM.get(11).onNewMessage({ conversationOptionsList: o2, isInstantMessage: e2 }), this._onReceivedGroupSystemNotice({ result: t2, isInstantMessage: e2 })), e2 ? 0 < t2.length && this._grpM.emitOEvt(h.MESSAGE_RECEIVED, t2) : true === n2 && this._clearGroupSystemNotice(); - } }, { key: "_assembly", value: function(e2) { - for (var t2 = e2.notifiesList, n2 = e2.isInstantMessage, o2 = null, i2 = t2.length, a2 = 0, s2 = [], r2 = { conversationID: A.CONV_SYSTEM, unreadCount: 0, type: A.CONV_SYSTEM, subType: null, lastMessage: null }, a2 = 0; a2 < i2; a2++) { - var c2 = t2[a2], u2 = c2.groupProfile, l2 = u2.communityType, u2 = u2.topicID, u2 = void 0 === u2 ? void 0 : u2, d2 = c2.elements, p2 = d2.topicIDList, p2 = void 0 === p2 ? void 0 : p2, d2 = d2.operationType; - if (!(2 !== (void 0 === l2 ? 0 : l2) || S(u2) && S(p2))) { - if (vi.includes(d2)) { - this._handleTopicSystemNotice(c2); - continue; - } - S(u2) || (c2.to = u2); - } - 15 !== c2.elements.operationType && (c2.currentUser = this._grpM.getMyUserID(), c2.conversationType = A.CONV_SYSTEM, c2.conversationID = A.CONV_SYSTEM, (o2 = new Do(c2)).setElement({ type: A.MSG_GRP_SYS_NOTICE, content: y(y({}, c2.elements), {}, { groupProfile: y({}, c2.groupProfile) }) }), o2.isSystemMessage = true, (1 === o2.sequence && 1 === o2.random || 2 === o2.sequence && 2 === o2.random) && (o2.sequence = ft(), o2.random = ft(), o2.generateMessageID(), M.l("".concat(this._n, "._assembly regenerate ID:").concat(o2.ID))), this._grpM.get(11).pushIntoNoticeResult(s2, o2)) && (n2 ? r2.unreadCount++ : o2.setIsRead(true), r2.subType = o2.conversationSubType); - } - return r2.lastMessage = s2[s2.length - 1], { eventDataList: 0 < s2.length ? [r2] : [], result: s2 }; - } }, { key: "_clearGroupSystemNotice", value: function() { - var a2 = this; - this._getPendencyList().then(function(e2) { - e2.forEach(function(e3) { - a2.pendencyMap.set("".concat(e3.from, "_").concat(e3.groupID, "_").concat(e3.to), e3); - }); - var e2 = a2._grpM.get(11).getLocalMessageList(A.CONV_SYSTEM), i2 = []; - e2.forEach(function(e3) { - var t2 = e3.payload, n2 = t2.operatorID, o2 = t2.operationType, t2 = t2.groupProfile; - 1 === o2 && (o2 = "".concat(n2, "_").concat(t2.groupID, "_").concat(t2.to), n2 = a2.pendencyMap.get(o2)) && R(n2.handled) && 0 !== n2.handled && i2.push(e3); - }), a2.deleteGroupSystemNotice({ messageList: i2 }); - }); - } }, { key: "deleteGroupSystemNotice", value: function(e2) { - var n2 = this, o2 = "".concat(this._n, ".deleteGroupSystemNotice"); - return O(e2.messageList) && 0 !== e2.messageList.length ? (M.l("".concat(o2, " ") + e2.messageList.map(function(e3) { - return e3.ID; - })), this._grpM.req({ P: k.DEL_GRP_SYSTEM_NOTICE, data: { messageListToDelete: e2.messageList.map(function(e3) { - return { from: A.CONV_SYSTEM, messageSeq: e3.clientSequence, messageRandom: e3.random }; - }) } }).then(function() { - M.l("".concat(o2, " ok")); - var t2 = n2._grpM.get(11); - return e2.messageList.forEach(function(e3) { - t2.deleteLocalMessage(e3); - }), C(); - }).catch(function(e3) { - return M.e("".concat(o2, " error:"), e3), D(e3); - })) : T(); - } }, { key: "_getPendencyList", value: function() { - var n2 = this, e2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t2 = e2.type, o2 = e2.startTime, e2 = e2.limit; - return this._grpM.req({ P: k.GET_GRP_PENDENCY, data: { type: void 0 === t2 ? void 0 : t2, startTime: void 0 === o2 ? 0 : o2, limit: void 0 === e2 ? 20 : e2, handleAccount: this._grpM.getMyUserID() } }).then(function(e3) { - var t3 = e3.data.pendencyList; - return 0 !== e3.data.nextStartTime ? n2._getPendencyList({ startTime: e3.data.nextStartTime }).then(function(e4) { - return [].concat(p(t3), p(e4)); - }) : t3; - }); - } }, { key: "getGroupApplicationList", value: function() { - var n2 = this; - return this._getPendencyList().then(function(t2) { - return n2._getPendencyList({ type: A.GRP_COMMUNITY }).then(function(e2) { - return t2.push.apply(t2, p(e2)), n2._handlePendencyResult(t2); - }).catch(function(e2) { - return n2._handlePendencyResult(t2); - }); - }); - } }, { key: "_handlePendencyResult", value: function(e2) { - var t2 = this, n2 = []; - return e2.forEach(function(e3) { - t2.pendencyMap.set("".concat(e3.from, "_").concat(e3.groupID, "_").concat(e3.to), e3), 0 === e3.handled && n2.push({ applicant: e3.from, applicantNick: e3.fromUserNickName, groupName: e3.groupName, groupID: e3.groupID, authentication: e3.authentication, messageKey: e3.time, applicationType: e3.applicationType, userID: e3.userID, note: e3.note }); - }), T({ applicationList: n2 }); - } }, { key: "_onReceivedGroupSystemNotice", value: function(e2) { - var t2 = this, n2 = e2.result; - e2.isInstantMessage && n2.forEach(function(e3) { - switch (e3.payload.operationType) { - case 1: - break; - case 2: - t2._onApplyJoinGroup(e3); - break; - case 3: - break; - case 4: - t2._onMemberKicked(e3); - break; - case 5: - t2._onGroupDismissed(e3); - break; - case 6: - break; - case 7: - t2._onInviteGroup(e3); - break; - case 8: - t2._onQuitGroup(e3); - break; - case 9: - t2._onSetManager(e3); - break; - case 10: - t2._onDeleteManager(e3); - break; - case 11: - case 12: - case 15: - break; - case 20: - t2._onMessageRemindTypeSynced(e3); - break; - case 21: - t2._grpM.onAVChatRoomMemberBanned(e3); - } - }); - } }, { key: "_onApplyJoinGroup", value: function(e2) { - var t2 = this, e2 = e2.payload.groupProfile, n2 = e2.groupID, e2 = e2.groupType, o2 = this._grpM.hasLocalGroup(n2); - M.l("".concat(this._n, "._onApplyJoinGroup groupID:").concat(n2, " groupType:").concat(e2, " hasGroup:").concat(o2)), o2 || Ot(e2) || this._grpM.getGroupProfile({ groupID: n2 }).then(function(e3) { - var e3 = e3.data.group; - e3 && (t2._grpM.updateGroupMap([e3]), e3 = !e3.isSupportTopic, t2._grpM.emitGroupListUpdate(true, e3)); - }); - } }, { key: "_onMemberKicked", value: function(e2) { - e2 = e2.payload.groupProfile.groupID; - this._grpM.hasLocalGroup(e2) && this._grpM.deleteLocalGroupAndConversation(e2); - } }, { key: "_onGroupDismissed", value: function(e2) { - var e2 = e2.payload.groupProfile.groupID, t2 = (this._grpM.hasLocalGroup(e2) && this._grpM.deleteLocalGroupAndConversation(e2), this._grpM._AVChatRoomHandler); - t2 && t2.checkJoinedAVChatRoomByID(e2) && t2.reset(e2); - } }, { key: "_onInviteGroup", value: function(e2) { - var t2 = this, n2 = e2.payload.groupProfile.groupID, e2 = this._grpM.hasLocalGroup(n2); - M.l("".concat(this._n, "._onInviteGroup groupID:").concat(n2, " hasGroup:").concat(e2)), this._grpM.getGroupProfile({ groupID: n2 }).then(function() { - t2._grpM.emitGroupListUpdate(), t2._grpM.get(11).pullMsgOnInvite("".concat(A.CONV_GROUP).concat(n2)); - }); - } }, { key: "_onQuitGroup", value: function(e2) { - var e2 = e2.payload.groupProfile, t2 = e2.groupID, e2 = e2.groupType, n2 = this._grpM.hasLocalGroup(t2); - M.l("".concat(this._n, "._onQuitGroup groupID:").concat(t2, " groupType:").concat(e2, " hasGroup:").concat(n2)), n2 && this._grpM.deleteLocalGroupAndConversation(t2); - } }, { key: "_onSetManager", value: function(e2) { - var e2 = e2.payload.groupProfile, t2 = e2.to, e2 = e2.groupID, e2 = this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(e2, t2); - e2 && e2.updateRole(A.GRP_MBR_ROLE_ADMIN); - } }, { key: "_onDeleteManager", value: function(e2) { - var e2 = e2.payload.groupProfile, t2 = e2.to, e2 = e2.groupID, e2 = this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(e2, t2); - e2 && e2.updateRole(A.GRP_MBR_ROLE_MEMBER); - } }, { key: "_onMessageRemindTypeSynced", value: function(e2) { - var t2 = e2.payload.groupProfile.groupID, e2 = e2.payload.messageRemindType; - this._grpM.get(11).onGroupMsgRemindTypeUpdated({ groupID: t2, messageRemindType: e2 }); - } }, { key: "_handleTopicSystemNotice", value: function(e2) { - var t2 = e2.groupProfile, n2 = t2.groupID, t2 = t2.topicID, e2 = e2.elements, o2 = e2.operationType, i2 = e2.topicIDList, e2 = e2.messageRemindType, a2 = this._grpM.get(10); - 17 === o2 ? a2.onTopicCreated({ groupID: n2, topicID: t2 }) : 18 === o2 ? a2.onTopicDeleted({ groupID: n2, topicIDList: i2 }) : 20 === o2 && a2.onMessageRemindTypeUpdated({ groupID: n2, topicID: t2, messageRemindType: e2 }); - } }, { key: "reset", value: function() { - this.pendencyMap.clear(); - } }]), Hi), Mi = ["relayFlag"], yi = (t(Vi, u), Xo = n(Vi), e(Vi, [{ key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("polling_interval"), t2 = this.getCloudConfig("polling_interval_plus"), n2 = this.getCloudConfig("polling_no_msg_count"), o2 = this.getCloudConfig("polling_simplified_msg"), i2 = this.getCloudConfig("paging_grp_count"); - M.l("".concat(this._n, "._onCloudConfig pollingInterval:").concat(e2) + " pollingIntervalPlus:".concat(t2, " pollingNoMessageCount:").concat(n2) + " pollingSimplifiedMessage:".concat(o2, " pagingGroupCount:").concat(i2)), this._AVChatRoomHandler.setPollingInterval(e2), this._AVChatRoomHandler.setPollingIntervalPlus(t2), this._AVChatRoomHandler.setPollingNoMessageCount(n2), this._AVChatRoomHandler.setPollingSimplifiedMessage(o2), this._commonGroupHandler.setPagingGroupCount(i2); - } }, { key: "onCheckTimer", value: function(e2) { - this.isLoggedIn() && (this._commonGroupHandler.onCheckTimer(e2), this._groupTipsHandler.onCheckTimer(e2)); - } }, { key: "guardForAVChatRoom", value: function(t2) { - var n2, o2 = this; - return t2.conversationType !== A.CONV_GROUP || (n2 = Gt(t2.to) ? Jt(t2.to) : t2.to, this.hasLocalGroup(n2)) ? T() : this.getGroupProfile({ groupID: n2 }).then(function(e2) { - var e2 = e2.data.group.type; - return M.l("".concat(o2._n, ".guardForAVChatRoom. groupID:").concat(n2, " type:").concat(e2)), e2 === A.GRP_AVCHATROOM ? D(new E({ code: e2 = L.MSG_SEND_FAIL_NOT_IN_AV, message: o2.getErrMsg(e2, t2.from, n2), data: { message: t2 } })) : T(); - }); - } }, { key: "checkJoinedAVChatRoomByID", value: function(e2) { - return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e2); - } }, { key: "onNewMessage", value: function(e2) { - this._commonGroupHandler.onNewMessage(e2); - } }, { key: "updateNextMessageSeq", value: function(e2) { - var n2, o2 = this; - O(e2) && (n2 = this.get(10), e2.forEach(function(e3) { - var t2 = e3.conversationID.replace(A.CONV_GROUP, ""); - Gt(t2) && n2.updateUnreadCountAndLastMsg(t2, e3.lastMessage), o2.groupMap.has(t2) && (o2.groupMap.get(t2).nextMessageSeq = e3.lastMessage.sequence + 1); - })); - } }, { key: "onNewGroupTips", value: function(e2) { - this._groupTipsHandler.onNewGroupTips(e2); - } }, { key: "onMsgRevoked", value: function(e2) { - this._commonGroupHandler.onMsgRevoked(e2, !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1]); - } }, { key: "onNewGroupSystemNotice", value: function(e2) { - this._groupSystemNoticeHandler.onNewGroupSystemNotice(e2); - } }, { key: "onMsgReadNotice", value: function(e2) { - var a2 = this; - e2.dataList.forEach(function(e3) { - var i2, e3 = e3.elements.groupMessageReadNotice; - N(e3) || (i2 = a2.get(11), e3.forEach(function(e4) { - var t2 = e4.groupID, n2 = e4.topicID, n2 = void 0 === n2 ? void 0 : n2, e4 = e4.lastMessageSeq, t2 = (M.l("".concat(a2._n, ".onMsgReadNotice groupID:").concat(t2, " lastMessageSeq:").concat(e4)), "".concat(A.CONV_GROUP).concat(t2)), o2 = true; - S(n2) || (t2 = "".concat(A.CONV_GROUP).concat(n2), o2 = false), i2.updateIsReadAfterReadReport({ conversationID: t2, lastMessageSeq: e4 }), i2.updateUnreadCount(t2, o2), i2.clearGroupAtInfoList(t2, o2); - })); - }); - } }, { key: "onReadReceiptList", value: function(e2) { - var o2 = this; - M.l("".concat(this._n, ".onReadReceiptList options:"), e2), e2.dataList.forEach(function(e3) { - var t2 = e3.groupProfile, e3 = e3.elements, t2 = t2.groupID, n2 = o2.get(11), e3 = e3.readReceiptList; - n2.updateReadReceiptInfo({ groupID: t2, readReceiptList: e3 }); - }); - } }, { key: "onMsgModified", value: function(e2) { - M.l("".concat(this._n, ".onMsgModified options:"), e2); - var t2 = this.get(11); - e2.dataList.forEach(function(e3) { - t2.onMessageModified(y(y({}, e3), {}, { conversationType: A.CONV_GROUP, to: e3.topicID || e3.groupID })); - }); - } }, { key: "deleteGroupSystemNotice", value: function(e2) { - this._groupSystemNoticeHandler.deleteGroupSystemNotice(e2); - } }, { key: "initGroupMap", value: function(e2) { - this.groupMap.set(e2.groupID, new oi(e2)); - } }, { key: "clearGroupMap", value: function() { - this.groupMap.clear(); - } }, { key: "deleteGroup", value: function(e2) { - this.groupMap.delete(e2); - } }, { key: "updateGroupMap", value: function(e2) { - var t2, n2 = this, o2 = this.get(11); - e2.forEach(function(e3) { - t2 = e3.groupID, n2.groupMap.has(t2) ? n2.groupMap.get(t2).updateGroup(e3) : (n2.groupMap.set(t2, new oi(e3)), o2.deleteGroupRoamingInfo(t2)); - }); - var i2, a2 = this.getMyUserID(), s2 = Z(this.groupMap); - try { - for (s2.s(); !(i2 = s2.n()).done; ) { - var r2 = Y(i2.value, 2)[1]; - r2.selfInfo.userID = a2, "Owner" === r2.selfInfo.role && (r2.ownerID = a2); - } - } catch (e3) { - s2.e(e3); - } finally { - s2.f(); - } - } }, { key: "getGroupMap", value: function() { - return this.groupMap; - } }, { key: "getLocalGroupList", value: function() { - return p(this.groupMap.values()).filter(function(e2) { - return e2.type !== A.GRP_ROOM && e2.type !== A.GRP_LIVE; - }); - } }, { key: "getLocalGroupProfile", value: function(e2) { - return this.groupMap.get(e2); - } }, { key: "sortLocalGroupList", value: function() { - var e2 = p(this.groupMap).filter(function(e3) { - e3 = Y(e3, 2); - return e3[0], !S(e3[1].lastMessage); - }); - e2.sort(function(e3, t2) { - return t2[1].lastMessage.lastTime - e3[1].lastMessage.lastTime; - }), this.groupMap = new Map(p(e2)); - } }, { key: "updateGroupLastMessage", value: function(e2) { - this._commonGroupHandler.updateLastMsg(e2); - } }, { key: "emitGroupListUpdate", value: function() { - var e2 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], t2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], n2 = this.getLocalGroupList(); - e2 && this.emitOEvt(h.GROUP_LIST_UPDATED), t2 && (e2 = JSON.parse(JSON.stringify(n2)), this.get(11).updateConvGroupProfile(e2)); - } }, { key: "getMyNameCardByGroupID", value: function(e2) { - e2 = this.getLocalGroupProfile(e2); - return e2 ? e2.selfInfo.nameCard : ""; - } }, { key: "isPagingGetCompleted", value: function() { - return this._commonGroupHandler.isPagingGetCompleted(); - } }, { key: "getMsgRemindType", value: function(e2) { - var n2 = this; - return !O(e2) || 0 === e2.length || 0 === (e2 = e2.filter(function(e3) { - return !Ot(n2.getLocalGroupProfile(e3).type); - })).length ? Promise.resolve() : (M.l("".concat(this._n, ".getMsgRemindType groupIDList:").concat(e2)), this.getGroupProfileAdvance({ groupIDList: e2, responseFilter: { memberInfoFilter: ["MsgFlag"] } }).then(function(e3) { - var e3 = e3.data.successGroupList, t2 = n2.get(11); - e3.forEach(function(e4) { - t2.onGroupMsgRemindTypeUpdated({ groupID: e4.groupID, messageRemindType: O(e4.members) ? e4.members[0].messageRemindType : "" }); - }); - })); - } }, { key: "getGroupList", value: function() { - return this._commonGroupHandler.getGroupList(); - } }, { key: "syncCommunityWithTopic", value: function() { - return this._commonGroupHandler.syncGroupList(true); - } }, { key: "getGroupProfile", value: function(t2) { - var n2 = this, o2 = "".concat(this._n, ".").concat("getGroupProfile"), i2 = new G("getGroupProfile"), a2 = t2.groupID, e2 = t2.groupCustomFieldFilter, e2 = (M.l("".concat(o2, " groupID:").concat(a2)), { groupIDList: [a2], responseFilter: { groupBaseInfoFilter: p(ce), groupCustomFieldFilter: e2, memberInfoFilter: [].concat(p(ue), ["NameCard"]) } }); - return this.getGroupProfileAdvance(e2).then(function(e3) { - var e3 = e3.data, t3 = e3.successGroupList, e3 = e3.failureGroupList; - return M.l("".concat(o2, " ok")), 0 < e3.length ? D(e3[0]) : ((e3 = Ot(t3[0].type) && !n2.hasLocalGroup(a2) ? new oi(t3[0]) : (n2.updateGroupMap(t3), n2.getLocalGroupProfile(a2))).isSupportTopic || n2.get(11).updateConvGroupProfile([e3]), i2.setMessage("groupID:".concat(a2, " type:").concat(e3.type, " muteAllMembers:").concat(e3.muteAllMembers, " ownerID:").concat(e3.ownerID)).end(), C({ group: e3 })); - }).catch(function(e3) { - return i2.setError(e3).setMessage("groupID:".concat(t2.groupID)).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - }); - } }, { key: "getGroupProfileAdvance", value: function(e2) { - var t2, n2 = "".concat(this._n, ".getGroupProfileAdvance"), o2 = e2.groupIDList, i2 = (O(o2) && 50 < o2.length && (this.warn("GetGroupProfileLimit"), o2.length = 50), []), a2 = [], o2 = (o2.forEach(function(e3) { - (Nt({ groupID: e3 }) ? a2 : i2).push(e3); - }), []); - return 0 < i2.length && (t2 = this._getGroupProfileAdvance(y(y({}, e2), {}, { groupIDList: i2 })), o2.push(t2)), 0 < a2.length && (t2 = this._getGroupProfileAdvance(y(y({}, e2), {}, { groupIDList: a2, relayFlag: 0 < i2.length })), o2.push(t2)), Promise.all(o2).then(function(e3) { - var t3 = [], n3 = []; - return e3.forEach(function(e4) { - t3.push.apply(t3, p(e4.successGroupList)), n3.push.apply(n3, p(e4.failureGroupList)); - }), C({ successGroupList: t3, failureGroupList: n3 }); - }).catch(function(e3) { - return M.e("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_getGroupProfileAdvance", value: function(t2) { - var n2 = this, e2 = t2.relayFlag, o2 = void 0 !== e2 && e2, i2 = K(t2, Mi); - return this.req({ P: k.GET_GRP_PROFILE, data: i2 }).then(function(e3) { - M.l("".concat(n2._n, "._getGroupProfileAdvance ok. options:"), i2); - e3 = e3.data.groups; - return { successGroupList: e3.filter(function(e4) { - return N(e4.errorCode) || 0 === e4.errorCode; - }), failureGroupList: e3.filter(function(e4) { - return e4.errorCode && 0 !== e4.errorCode; - }).map(function(e4) { - return new E({ code: e4.errorCode, message: e4.errorInfo, data: { groupID: e4.groupID } }); - }) }; - }).catch(function(e3) { - return o2 && Nt({ groupID: t2.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : D(e3); - }); - } }, { key: "createGroup", value: function(s2) { - var r2 = this, e2 = [A.GRP_PUBLIC, A.GRP_WORK, A.GRP_MEETING, A.GRP_AVCHATROOM, A.GRP_COMMUNITY], c2 = "".concat(this._n, ".").concat("createGroup"), t2 = s2.type, n2 = s2.groupID; - if (s2.name && false === this._filterProfanity("name", s2)) - return D({ code: L.PROFANITY_FOUND }); - if (s2.introduction && false === this._filterProfanity("introduction", s2)) - return D({ code: L.PROFANITY_FOUND }); - if (s2.notification && false === this._filterProfanity("notification", s2)) - return D({ code: L.PROFANITY_FOUND }); - if (!e2.includes(t2)) - return D({ code: L.ILLEGAL_GRP_TYPE }); - if (!Nt({ type: t2 })) { - if (!S(n2) && Nt({ groupID: n2 })) - return D({ code: L.ILLEGAL_GRP_ID }); - s2.isSupportTopic = void 0; - } - if (Ot(t2) && !N(s2.memberList) && 0 < s2.memberList.length && (s2.memberList = void 0), this._canIUseJoinOption(t2) || N(s2.joinOption) || (s2.joinOption = void 0), Nt({ type: t2 })) { - if (!S(n2) && !Nt({ groupID: n2 })) - return D({ code: L.ILLEGAL_GRP_ID }); - s2.isSupportTopic = true === s2.isSupportTopic ? 1 : 0; - } - var u2 = new G("createGroup"), l2 = (M.l("".concat(c2, " options:"), s2), null), d2 = []; - return this.req({ P: k.CREATE_GRP, data: y(y({}, s2), {}, { ownerID: this.getMyUserID(), webPushFlag: 1 }) }).then(function(e3) { - var t3, n3, o2, e3 = e3.data, i2 = e3.groupID, e3 = e3.overLimitUserIDList, a2 = void 0 === e3 ? [] : e3, e3 = (l2 = i2, d2 = a2, "groupType:".concat(s2.type, " groupID:").concat(i2, " overLimitUserIDList:").concat(a2)); - return u2.setMessage(e3).end(), M.l("".concat(c2, " ok. ").concat(e3)), s2.type === A.GRP_AVCHATROOM || s2.type === A.GRP_COMMUNITY && 1 === s2.isSupportTopic || (S(s2.memberList) || S(a2) || (s2.memberList = s2.memberList.filter(function(e4) { - return -1 === a2.indexOf(e4.userID); - })), r2.updateGroupMap([y(y({}, s2), {}, { groupID: i2 })]), e3 = r2.get(2), o2 = "", t3 = 0, s2.type === A.GRP_COMMUNITY ? (o2 = r2.isIntl() ? "Create Community" : "创建社群", t3 = 1) : o2 = r2.isIntl() ? "Create Group" : "创建群组", n3 = r2.get(4).getMyNick(), o2 = e3.createCustomMessage({ to: i2, conversationType: A.CONV_GROUP, payload: { data: JSON.stringify({ businessID: "group_create", content: o2, cmd: t3, opUser: n3 || r2.getMyUserID(), version: 4 }) } }), e3.sendMessageInstance(o2), r2.emitGroupListUpdate()), r2.getGroupProfile({ groupID: i2 }); - }).then(function(e3) { - var e3 = e3.data.group, t3 = e3.selfInfo, n3 = t3.nameCard, t3 = t3.joinTime; - return e3.updateSelfInfo({ nameCard: n3, joinTime: t3, messageRemindType: A.MSG_REMIND_ACPT_AND_NOTE, role: A.GRP_MBR_ROLE_OWNER }), C({ group: e3, overLimitUserIDList: d2 }); - }).catch(function(e3) { - var t3; - return u2.setMessage("groupType:".concat(s2.type)).setError(e3).end(), 10010 === e3.code || 10007 === e3.code ? (r2._silentlyGetGroupProfile(e3.code, l2), r2.updateGroupMap([y(y({}, s2), {}, { groupID: l2 })]), (t3 = r2.getLocalGroupProfile(l2)).selfInfo.role = A.GRP_MBR_ROLE_OWNER, C({ group: t3, overLimitUserIDList: d2 })) : (M.e("".concat(c2, " failed. error:"), e3), D(e3)); - }); - } }, { key: "dismissGroup", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("dismissGroup"), o2 = "groupID:".concat(e2), i2 = new G("dismissGroup"); - return i2.setMessage(o2), M.l("".concat(n2, " ").concat(o2)), this.req({ P: k.DISMISS_GRP, data: { groupID: e2 } }).then(function() { - return i2.end(), M.l("".concat(n2, " ok")), t2.deleteLocalGroupAndConversation(e2), t2.checkJoinedAVChatRoomByID(e2) && t2._AVChatRoomHandler.reset(e2), t2._groupAttributesHandler.deleteLocalGroupAttributes(e2), C({ groupID: e2 }); - }).catch(function(e3) { - return i2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "updateGroupProfile", value: function(e2) { - var t2, n2, o2 = this, i2 = "".concat(this._n, ".").concat("updateGroupProfile"); - return this.hasLocalGroup(e2.groupID) && (t2 = this.getLocalGroupProfile(e2.groupID).type, this._canIUseJoinOption(t2) || N(e2.joinOption) || (M.w("".concat(i2, " joinOption is unavailable for Work/Meeting/AVChatRoom")), e2.joinOption = void 0)), N(e2.muteAllMembers) || (e2.muteAllMembers ? e2.muteAllMembers = "On" : e2.muteAllMembers = "Off"), e2.name && false === this._filterProfanity("name", e2) || e2.introduction && false === this._filterProfanity("introduction", e2) || e2.notification && false === this._filterProfanity("notification", e2) ? D({ code: L.PROFANITY_FOUND }) : ((n2 = new G("updateGroupProfile")).setMessage(JSON.stringify(e2)), M.l("".concat(i2, " groupID:").concat(e2.groupID)), this.req({ P: k.UPDATE_GRP_PROFILE, data: e2 }).then(function() { - return n2.end(), M.l("".concat(i2, " ok")), o2.hasLocalGroup(e2.groupID) && o2.groupMap.get(e2.groupID).updateGroup(e2), C({ group: o2.groupMap.get(e2.groupID) }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.l("".concat(i2, " failed. error:"), e3), D(e3); - })); - } }, { key: "_filterProfanity", value: function(e2, t2) { - var n2, o2 = this.get(29); - return !o2 || (n2 = (o2 = o2.filterText(t2[e2], re)).isAllowedToSend, o2 = o2.modifiedText, true === n2 && (t2[e2] = o2, true)); - } }, { key: "joinGroup", value: function(t2) { - var n2, o2 = this, i2 = t2.groupID, a2 = "".concat(this._n, ".joinGroup"); - return this.deleteUnjoinedAVChatRoom(i2), this.hasLocalGroup(i2) ? this.isLoggedIn() ? (n2 = new G("applyJoinGroup"), this.getGroupProfile({ groupID: i2 }).then(function() { - return n2.setMessage("groupID:".concat(i2, " joinedStatus:").concat(A.JOIN_STATUS_ALREADY_IN_GROUP)).end(), T({ status: A.JOIN_STATUS_ALREADY_IN_GROUP }); - }).catch(function(e2) { - return n2.setMessage("groupID:".concat(i2, " unjoined")).end(), M.w("".concat(a2, " ").concat(i2, " was unjoined, now join!")), o2.groupMap.delete(i2), o2.applyJoinGroup(t2); - })) : T({ status: A.JOIN_STATUS_ALREADY_IN_GROUP }) : (M.l("".concat(a2, " groupID:").concat(i2)), this.isLoggedIn() ? this.applyJoinGroup(t2) : this._AVChatRoomHandler.joinWithoutAuth(t2)); - } }, { key: "applyJoinGroup", value: function(e2) { - var c2, u2, l2 = this, d2 = "".concat(this._n, ".").concat("applyJoinGroup"), p2 = e2.groupID; - return S(e2.applyMessage) || false !== this._filterProfanity("applyMessage", e2) ? (c2 = new G("applyJoinGroup"), e2 = y({}, e2), (u2 = this.canIUse(_.AV_HISTORY_MSG)) && (e2.historyMessageFlag = 1), this.get(11).deleteTopicRoamingInfo(p2), this.req({ P: k.APPLY_JOIN_GRP, data: e2 }).then(function(e3) { - var e3 = e3.data, t2 = e3.joinedStatus, n2 = e3.longPollingKey, o2 = e3.startSeq, i2 = e3.avChatRoomFlag, a2 = e3.avChatRoomKey, s2 = e3.messageList, e3 = "groupID:".concat(p2, " joinedStatus:").concat(t2, " longPollingKey:").concat(n2, " startSeq:").concat(o2) + " avChatRoomFlag:".concat(i2, " canGetAVChatRoomHistoryMsg:").concat(u2, ",") + " historyMsgCount:".concat(S(s2) ? 0 : s2.length); - switch (c2.setMessage(e3).end(), M.l("".concat(d2, " ok. ").concat(e3)), t2) { - case ot: - return C({ status: ot }); - case nt: - return l2.getGroupProfile({ groupID: p2 }).then(function(e4) { - e4 = e4.data.group; - return l2._handleJoinResult({ group: e4, avChatRoomFlag: i2, longPollingKey: n2, startSeq: o2, avChatRoomKey: a2, messageList: s2 }); - }).catch(function(e4) { - var t3; - return 10010 === e4.code || 10007 === e4.code ? (l2._silentlyGetGroupProfile(e4.code, p2), t3 = new oi({ groupID: p2 }), l2.updateGroupMap([t3]), l2._handleJoinResult({ group: t3, avChatRoomFlag: i2, longPollingKey: n2, startSeq: o2, avChatRoomKey: a2, messageList: s2 })) : (M.e("".concat(d2, " failed. error:"), e4), D(e4)); - }); - default: - var r2 = new E({ code: L.JOIN_GRP_FAIL }); - return M.e("".concat(d2, " failed. error:"), r2), D(r2); - } - }).catch(function(e3) { - return c2.setMessage("groupID:".concat(p2)).setError(e3).end(), M.e("".concat(d2, " failed. error:"), e3), D(e3); - })) : D({ code: L.PROFANITY_FOUND }); - } }, { key: "_handleJoinResult", value: function(e2) { - var t2 = this, n2 = e2.group, o2 = e2.avChatRoomFlag, i2 = e2.longPollingKey, a2 = e2.startSeq, s2 = e2.avChatRoomKey, r2 = e2.messageList, c2 = n2.groupID; - return 1 === o2 ? (this.get(11).setCompleted("".concat(A.CONV_GROUP).concat(c2)), this._groupAttributesHandler.initGroupAttributesCache({ groupID: c2, avChatRoomKey: s2 }), this._groupCountersHandler.initGroupCountersCache({ groupID: c2, avChatRoomKey: s2 }), (e2 = N(i2) ? this._AVChatRoomHandler.handleJoinResult({ group: n2 }) : this._AVChatRoomHandler.startRunLoop({ group: n2, longPollingKey: i2, startSeq: a2 })).then(function() { - t2._onAVChatRoomHistoryMessage(r2, c2); - }), e2) : (this.emitGroupListUpdate(true, false), C({ status: nt, group: n2 })); - } }, { key: "quitGroup", value: function(e2) { - var t2, n2 = this, o2 = "".concat(this._n, ".").concat("quitGroup"), i2 = "groupID:".concat(e2), a2 = (M.l("".concat(o2, " ").concat(i2)), this.checkJoinedAVChatRoomByID(e2)); - return a2 || this.hasLocalGroup(e2) ? a2 && !this.isLoggedIn() ? (M.l("".concat(o2, " anonymously ok. ").concat(i2)), this.deleteLocalGroupAndConversation(e2), this._AVChatRoomHandler.reset(e2), T({ groupID: e2 })) : ((t2 = new G("quitGroup")).setMessage(i2), this.req({ P: k.QUIT_GRP, data: { groupID: e2 } }).then(function() { - return t2.end(), M.l("".concat(o2, " ok")), n2.deleteLocalGroupAndConversation(e2), a2 && n2._AVChatRoomHandler.reset(e2), n2._groupAttributesHandler.deleteLocalGroupAttributes(e2), C({ groupID: e2 }); - }).catch(function(e3) { - return t2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - })) : D({ code: L.MEMBER_NOT_IN_GRP }); - } }, { key: "searchGroupByID", value: function(e2) { - var t2 = "".concat(this._n, ".").concat("searchGroupByID"), n2 = { groupIDList: [e2] }, o2 = new G("searchGroupByID"); - return o2.setMessage("groupID:".concat(e2)), M.l("".concat(t2, " groupID:").concat(e2)), this.req({ P: k.SEARCH_GRP, data: n2 }).then(function(e3) { - e3 = e3.data.groupProfile; - if (0 !== e3[0].errorCode) - throw new E({ code: e3[0].errorCode, message: e3[0].errorInfo }); - return o2.end(), M.l("".concat(t2, " ok")), C({ group: new oi(e3[0]) }); - }).catch(function(e3) { - return o2.setError(e3).end(), M.w("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "changeGroupOwner", value: function(i2) { - var a2, s2 = this, r2 = "".concat(this._n, ".").concat("changeGroupOwner"); - return this.hasLocalGroup(i2.groupID) && this.getLocalGroupProfile(i2.groupID).type === A.GRP_AVCHATROOM ? D({ code: L.CANNOT_CHANGE_OWNER_IN_AV }) : i2.newOwnerID === this.getMyUserID() ? D({ code: L.CANNOT_CHANGE_OWNER_TO_SELF }) : ((a2 = new G("changeGroupOwner")).setMessage("groupID:".concat(i2.groupID, " newOwnerID:").concat(i2.newOwnerID)), M.l("".concat(r2, " groupID:").concat(i2.groupID)), this.req({ P: k.CHANGE_GRP_OWNER, data: i2 }).then(function() { - a2.end(), M.l("".concat(r2, " ok")); - var e2, t2 = i2.groupID, n2 = i2.newOwnerID, o2 = (s2.groupMap.get(t2).ownerID = n2, s2._groupMemberHandler.getLocalGroupMemberList(t2)); - return o2 instanceof Map && (e2 = o2.get(s2.getMyUserID()), N(e2) || (e2.updateRole("Member"), s2.groupMap.get(t2).selfInfo.role = "Member"), e2 = o2.get(n2), N(e2) || e2.updateRole("Owner")), s2.emitGroupListUpdate(true, false), C({ group: s2.groupMap.get(t2) }); - }).catch(function(e2) { - return a2.setError(e2).end(), M.e("".concat(r2, " failed. error:"), e2), D(e2); - })); - } }, { key: "getGroupApplicationList", value: function() { - return this._groupSystemNoticeHandler.getGroupApplicationList(); - } }, { key: "handleGroupApplication", value: function(e2) { - var t2, n2, o2, i2, a2, s2 = this, r2 = "".concat(this._n, ".").concat("handleGroupApplication"), c2 = e2.handleAction, u2 = e2.handleMessage, l2 = e2.message, d2 = e2.application, p2 = (l2 ? (t2 = l2.payload.operatorID, n2 = l2.payload.groupProfile.groupID, o2 = l2.payload.authentication, i2 = l2.payload.messageKey) : d2 && (t2 = d2.applicant, n2 = d2.groupID, o2 = d2.authentication, i2 = d2.messageKey), k.HANDLE_GRP_APPLICATION), _2 = (d2 && 2 === d2.applicationType && (p2 = k.HANDLE_INVITE_JOIN_GRP, a2 = d2.userID), new G("handleGroupApplication")); - return _2.setMessage("groupID:".concat(n2)), M.l("".concat(r2, " groupID:").concat(n2)), this.req({ P: p2, data: { handleAction: c2, handleMessage: u2, applicant: t2, invitee: a2, groupID: n2, authentication: o2, messageKey: i2 } }).then(function() { - return _2.end(), M.l("".concat(r2, " ok")), l2 && s2._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e2.message] }), C({ group: s2.getLocalGroupProfile(n2) }); - }).catch(function(e3) { - return _2.setError(e3).end(), M.e("".concat(r2, " failed. error"), e3), D(e3); - }); - } }, { key: "handleGroupInvitation", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("handleGroupInvitation"), o2 = e2.message.payload, i2 = o2.groupProfile.groupID, a2 = o2.authentication, s2 = o2.messageKey, o2 = o2.operatorID, r2 = e2.handleAction, c2 = new G("handleGroupInvitation"); - return c2.setMessage("groupID:".concat(i2, " inviter:").concat(o2, " handleAction:").concat(r2)), M.l("".concat(n2, " groupID:").concat(i2, " inviter:").concat(o2, " handleAction:").concat(r2)), this.req({ P: k.HANDLE_GRP_INVITATION, data: y(y({}, e2), {}, { inviter: o2, groupID: i2, authentication: a2, messageKey: s2 }) }).then(function() { - return c2.end(), M.l("".concat(n2, " ok")), t2._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e2.message] }), C({ group: t2.getLocalGroupProfile(i2) }); - }).catch(function(e3) { - return c2.setError(e3).end(), M.e("".concat(n2, " failed. error"), e3), D(e3); - }); - } }, { key: "getGroupOnlineMemberCount", value: function(t2) { - var n2 = this, o2 = "".concat(this._n, ".getGroupOnlineMemberCount"), e2 = this._AVChatRoomHandler.checkJoinedAVChatRoomByID(t2), i2 = this.hasLocalGroup(t2); - if (M.l("".concat(o2, " groupID:").concat(t2, " isAVChatRoom:").concat(e2, " has:").concat(i2)), e2) - return this._AVChatRoomHandler.getGroupOnlineMemberCount(t2); - if (!i2) - return T({ memberCount: 0 }); - e2 = Date.now(); - if (this._onlineMemberCountMap.has(t2)) { - i2 = this._onlineMemberCountMap.get(t2); - if (e2 - i2.lastReqTime <= 6e4) - return T({ memberCount: i2.memberCount }); - i2.lastReqTime = e2; - } - return this.requestOnlineCount(t2).then(function(e3) { - e3 = e3.data.memberCount, e3 = void 0 === e3 ? 0 : e3; - return n2._onlineMemberCountMap.set(t2, { lastReqTime: Date.now(), memberCount: e3 }), M.l("".concat(o2, " ok. groupID:").concat(t2, " memberCount:").concat(e3)), T({ memberCount: e3 }); - }).catch(function(e3) { - return M.w("".concat(o2, " failed. error:"), e3), Promise.reject(e3); - }); - } }, { key: "requestOnlineCount", value: function(e2) { - return this.req({ P: k.GET_ONLINE_MBR_NUM, data: { groupID: e2 } }); - } }, { key: "hasLocalGroup", value: function(e2) { - return this.groupMap.has(e2); - } }, { key: "deleteLocalGroupAndConversation", value: function(e2) { - var t2 = this.checkJoinedAVChatRoomByID(e2), n2 = (M.l("".concat(this._n, ".deleteLocalGroupAndConversation groupID:").concat(e2, " isJoinedAVChatRoom:").concat(t2)), this.get(11)), o2 = "".concat(A.CONV_GROUP).concat(e2); - t2 && (this.stopMessageLongPolling({ groupID: e2 }), n2.deleteLocalConv(o2)), Nt({ groupID: e2 }) && (t2 = this.getLocalGroupProfile(e2)) && true === t2.isSupportTopic && this.get(10).deleteTopicListInCommunity(e2), n2.clearUnreadCount(o2), n2.setCompleted(o2), this._deleteLocalGroup(e2), this._onlineMemberCountMap.delete(e2), this.emitGroupListUpdate(true, false); - } }, { key: "_deleteLocalGroup", value: function(e2) { - this.groupMap.delete(e2), this._groupMemberHandler.deleteGroupMemberList(e2); - } }, { key: "sendMessage", value: function(e2, t2) { - return O(e2._receiverList) && 0 < e2._receiverList.length && !this.canIUse(_.MSG_TO_SPECIFIED_GRP_MBR) ? this.noUse("Targeted Group Message") : (e2 = this.createGroupMessagePack(e2, t2), this.req(e2)); - } }, { key: "createGroupMessagePack", value: function(e2, t2) { - var n2 = null, o2 = (t2 && t2.offlinePushInfo && (n2 = t2.offlinePushInfo), ""), i2 = (m(e2.cloudCustomData) && 0 < e2.cloudCustomData.length && (o2 = e2.cloudCustomData), []), a2 = (f(t2) && f(t2.messageControlInfo) && (a2 = (r2 = t2.messageControlInfo).excludedFromUnreadCount, s2 = r2.excludedFromLastMessage, r2 = r2.excludedFromContentModeration, true === a2 && i2.push("NoUnread"), true === s2 && i2.push("NoLastMsg"), true === r2) && i2.push("NoMsgCheck"), void 0), s2 = (O(e2._receiverList) && 0 < e2._receiverList.length && (a2 = e2._receiverList, 50 < e2._receiverList.length) && (a2 = e2._receiverList.slice(0, 50), this.warn("ReceiverListLimit")), this.isOnlineMessage(e2, t2) ? 1 : 0), r2 = JSON.parse(JSON.stringify(e2.getElements())), t2 = this.get(17).getFileDNList(), c2 = e2.getGroupAtInfoList(), r2 = { fromAccount: this.getMyUserID(), groupID: e2.to, msgBody: so(e2.type, r2, t2), cloudCustomData: o2, random: e2.random, priority: e2.priority, clientSequence: e2.clientSequence, groupAtInfo: e2.type !== A.MSG_TEXT || S(c2) ? void 0 : c2, onlineOnlyFlag: s2, clientTime: e2.clientTime, offlinePushInfo: wo(n2), messageControlInfo: 0 == s2 ? i2 : void 0, needReadReceipt: true !== e2.needReadReceipt || this.isMessageFromOrToAVChatroom(e2.to) ? 0 : 1, receiverList: a2, isSupportExtension: true === e2.isSupportExtension ? 1 : 0, isRelayMessage: true === e2._relayFlag ? 1 : 0, cmConfigID: e2._cmConfigID }; - return Gt(e2.to) && (r2.groupID = Jt(e2.to), r2.topicID = e2.to), { P: k.SEND_GRP_MSG, data: r2 }; - } }, { key: "revokeMessage", value: function(e2) { - var t2 = { groupID: e2.to, msgSeqList: [{ msgSeq: e2.sequence }] }; - return Gt(e2.to) && (t2.groupID = Jt(e2.to), t2.topicID = e2.to), this.req({ P: k.REVOKE_GRP_MSG, data: t2 }); - } }, { key: "deleteMessage", value: function(e2) { - var t2 = e2.to, e2 = e2.keyList, e2 = (M.l("".concat(this._n, ".deleteMessage groupID:").concat(t2, " count:").concat(e2.length)), { groupID: t2, deleter: this.getMyUserID(), keyList: e2 }); - return Gt(t2) && (e2.groupID = Jt(t2), e2.topicID = t2), this.req({ P: k.DEL_GRP_MSG, data: e2 }); - } }, { key: "modifyRemoteMessage", value: function(e2) { - var t2 = e2.to, n2 = e2.sequence, o2 = e2.payload, i2 = e2.type, a2 = e2.version, a2 = void 0 === a2 ? 0 : a2, s2 = e2.cloudCustomData, e2 = e2._elements, r2 = t2, c2 = void 0, t2 = (Gt(t2) && (r2 = Jt(t2), c2 = t2), void 0); - return Xt(i2) && (1 < e2.length && e2.splice(0, 1, { type: i2, content: o2 }), t2 = e2), this.req({ P: k.MODIFY_GRP_MSG, data: { groupID: r2, topicID: c2, sequence: n2, version: a2, elements: t2, cloudCustomData: s2 } }); - } }, { key: "getRoamingMessage", value: function(e2) { - var r2 = this, c2 = "".concat(this._n, ".").concat("getRoamingMessage"), u2 = e2.conversationID, l2 = e2.groupID, e2 = e2.sequence, d2 = new G("getRoamingMessage"), p2 = 0, _2 = void 0; - return Gt(l2) && (l2 = Jt(_2 = l2)), this._computeLastSequence({ groupID: l2, topicID: _2, sequence: e2 }).then(function(e3) { - return p2 = e3, M.l("".concat(c2, " groupID:").concat(l2, " startSequence:").concat(p2)), r2.req({ P: k.GET_GRP_ROAMING_MSG, data: { groupID: l2, count: 21, sequence: p2, topicID: _2 } }); - }).then(function(e3) { - var t2 = e3.data, n2 = t2.messageList, o2 = t2.complete, t2 = t2.invisibleSequenceList, t2 = void 0 === t2 ? [] : t2, e3 = e3.data.nextSequence, e3 = void 0 === e3 ? 0 : e3, i2 = (N(n2) ? M.l("".concat(c2, " ok. complete:").concat(o2, " nextSequence:").concat(e3, " but messageList is undefined!")) : M.l("".concat(c2, " ok. complete:").concat(o2, " nextSequence:").concat(e3, " count:").concat(n2.length)), d2.setMessage("groupID:".concat(l2, " topicID:").concat(_2, " startSequence:").concat(p2, " complete:").concat(o2, " nextSequence:").concat(e3)).end(), r2.get(11)), a2 = [], s2 = [], n2 = (S(n2) || (a2 = i2.onRoamingMessage(n2, u2, true, s2), i2.updateIsRead(u2), i2.patchConvLastMessage(u2)), 2 === o2 || e3 < 1); - return n2 && (i2.setCompleted(u2), e3 = ""), M.l("".concat(c2, " isPullingCompleted:").concat(n2, " nextReqID:").concat(e3, " storedMsgCount:").concat(a2.length) + " invisibleSeqCount:".concat(t2.length)), { nextReqID: e3 + "", storedMessageList: a2, assembledMessageList: s2, isPullingCompleted: n2 }; - }).catch(function(e3) { - return d2.setError(e3).setMessage("groupID:".concat(l2, " topicID:").concat(_2, " startSequence:").concat(p2)).end(), M.w("".concat(c2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_getGroupIDOfMessage", value: function(e2) { - return e2.conversationID.replace(A.CONV_GROUP, ""); - } }, { key: "getReadReceiptList", value: function(n2) { - var t2, o2 = "".concat(this._n, ".").concat("getReadReceiptList"), e2 = this._getGroupIDOfMessage(n2[0]), i2 = this.getMyUserID(), a2 = n2.filter(function(e3) { - return e3.from === i2 && true === e3.needReadReceipt; - }).map(function(e3) { - return { sequence: e3.sequence }; - }); - return M.l("".concat(o2, " groupID:").concat(e2, " sequenceList:").concat(JSON.stringify(a2))), 0 === a2.length ? T({ messageList: n2 }) : ((t2 = new G("getReadReceiptList")).setMessage("groupID:".concat(e2)), this.req({ P: k.GET_READ_RECEIPT, data: { groupID: e2, sequenceList: a2 } }).then(function(e3) { - t2.end(), M.l("".concat(o2, " ok")); - e3 = e3.data.readReceiptList; - return O(e3) && e3.forEach(function(t3) { - n2.forEach(function(e4) { - 0 === t3.code && t3.sequence === e4.sequence && (e4.readReceiptInfo.readCount = t3.readCount, e4.readReceiptInfo.unreadCount = t3.unreadCount); - }); - }), C({ messageList: n2 }); - }).catch(function(e3) { - return t2.setError(e3).end(), M.w("".concat(o2, " failed. error:"), e3), D(e3); - })); - } }, { key: "sendReadReceipt", value: function(e2) { - var t2 = "".concat(this._n, ".").concat("sendReadReceipt"), n2 = this._getGroupIDOfMessage(e2[0]), o2 = new G("sendReadReceipt"), i2 = (o2.setMessage("groupID:".concat(n2)), this.getMyUserID()), e2 = e2.filter(function(e3) { - return e3.from !== i2 && true === e3.needReadReceipt; - }).map(function(e3) { - return { sequence: e3.sequence }; - }); - return 0 === e2.length ? D({ code: L.READ_RECEIPT_MSG_LIST_EMPTY }) : (M.l("".concat(t2, ". sequenceList:").concat(JSON.stringify(e2))), this.req({ P: k.SEND_READ_RECEIPT, data: { groupID: n2, sequenceList: e2 } }).then(function(e3) { - return o2.end(), M.l("".concat(t2, " ok")), C(); - }).catch(function(e3) { - return o2.setError(e3).end(), M.w("".concat(t2, " failed. error:"), e3), D(e3); - })); - } }, { key: "getReadReceiptDetail", value: function(e2) { - var i2 = this, t2 = e2.message, n2 = e2.filter, o2 = e2.cursor, e2 = e2.count, a2 = this._getGroupIDOfMessage(t2), s2 = t2.ID, t2 = t2.sequence, r2 = "".concat(this._n, ".").concat("getReadReceiptDetail"), c2 = this._receiptDetailCompleteMap.get(s2) || false, u2 = 0 !== n2 && 1 !== n2 ? 0 : n2, n2 = m(o2) ? o2 : "", o2 = !R(e2) || e2 <= 0 || 100 <= e2 ? 100 : e2, e2 = "groupID:".concat(a2, " sequence:").concat(t2, " cursor:").concat(n2, " filter:").concat(u2, " completeFlag:").concat(c2), l2 = (M.l("".concat(r2, " ").concat(e2)), { cursor: "", isCompleted: false, messageID: s2, unreadUserIDList: [], readUserIDList: [] }), d2 = new G("getReadReceiptDetail"); - return d2.setMessage(e2), this.req({ P: k.GET_READ_RECEIPT_DETAIL, data: { groupID: a2, sequence: t2, flag: u2, cursor: n2, count: o2 } }).then(function(e3) { - d2.end(); - var e3 = e3.data, t3 = e3.cursor, n3 = e3.isCompleted, o3 = e3.unreadUserIDList, e3 = e3.readUserIDList; - return l2.cursor = t3, 1 === n3 && (l2.isCompleted = true, i2._receiptDetailCompleteMap.set(s2, true)), 0 === u2 ? l2.readUserIDList = e3.map(function(e4) { - return e4.userID; - }) : 1 === u2 && (l2.unreadUserIDList = o3.map(function(e4) { - return e4.userID; - })), M.l("".concat(r2, " ok")), C(l2); - }).catch(function(e3) { - return d2.setError(e3).end(), M.w("".concat(r2, " failed. error:"), e3), D(e3); - }); - } }, { key: "getRoamingMessagesHopping", value: function(c2) { - var u2 = this, l2 = "".concat(this._n, ".").concat("getRoamingMessagesHopping"), t2 = c2.groupID, n2 = c2.count, d2 = c2.sequence, p2 = c2.direction, o2 = void 0; - return N(d2) && 1 === p2 ? T({ messageList: [], isCompleted: true, nextMessageSeq: "" }) : (Gt(t2) && (t2 = Jt(o2 = t2)), this._computeReqSeqHopping({ groupID: t2, topicID: o2, sequence: d2 }).then(function(e2) { - N(d2) || 1 !== p2 || (e2 = d2 + n2 - 1); - var s2 = "".concat(o2 ? "topicID:".concat(o2) : "groupID:".concat(t2), " sequence:").concat(d2, " reqSeq:").concat(e2, " direction:").concat(p2), r2 = (M.l("".concat(l2, " ").concat(s2)), new G("getRoamingMessagesHopping")); - return u2.req({ P: k.GET_GRP_ROAMING_MSG, data: { groupID: t2, topicID: o2, count: n2, sequence: e2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.messageList, t3 = void 0 === t3 ? [] : t3, n3 = e3.complete, o3 = e3.nextSequence, o3 = void 0 === o3 ? 0 : o3, e3 = e3.invisibleSequenceList, e3 = void 0 === e3 ? [] : e3, i2 = "complete:".concat(n3, " nextSequence:").concat(o3, " remoteMsgCount:").concat(t3.length, " invisibleSequenceList:").concat(e3), i2 = (r2.setMessage("".concat(s2, " ").concat(i2)).end(), M.l("".concat(l2, " ok. ").concat(i2)), "".concat(A.CONV_GROUP).concat(c2.groupID)), a2 = u2.get(11), i2 = a2.onRoamingMessage(t3, i2, false), t3 = u2._computeResult({ groupID: c2.groupID, direction: p2, sequence: d2, remoteMessageList: t3, processedMessageList: i2, complete: n3, nextSequence: o3, invisibleSequenceList: e3 }); - return a2.storeHoppingMessageList(t3.messageList), C(t3); - }).catch(function(e3) { - return r2.setError(e3).setMessage("groupID:".concat(t2, " sequence:").concat(d2, " count:").concat(n2)).end(), M.w("".concat(l2, " failed. error:"), e3), D(e3); - }); - })); - } }, { key: "_computeReqSeqHopping", value: function(e2) { - var n2 = this, o2 = e2.groupID, t2 = e2.topicID, t2 = void 0 === t2 ? void 0 : t2, e2 = e2.sequence, e2 = void 0 === e2 ? void 0 : e2; - return 0 < e2 ? Promise.resolve(e2) : N(t2) ? this.getGroupProfileAdvance({ groupIDList: [o2], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }).then(function(e3) { - var e3 = e3.data.successGroupList, t3 = 0; - return S(e3) || (t3 = e3[0].nextMessageSeq - 1), M.l("".concat(n2._n, "._computeReqSeqHopping groupID:").concat(o2, " lastSequence:").concat(t3, " from remote")), t3; - }).catch(function(e3) { - return D(e3); - }) : Promise.resolve(0); - } }, { key: "_computeResult", value: function(e2) { - var t2 = { messageList: [], isCompleted: false, nextMessageSeq: "" }, n2 = e2.groupID, o2 = e2.direction, i2 = e2.sequence, a2 = e2.remoteMessageList, a2 = void 0 === a2 ? [] : a2, s2 = e2.processedMessageList, s2 = void 0 === s2 ? [] : s2, r2 = e2.complete, c2 = e2.nextSequence, e2 = e2.invisibleSequenceList; - if (0 === o2) - return t2.nextMessageSeq = c2, (2 === r2 || c2 < 1) && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2.messageList = s2, t2; - if (1 === o2) { - if (S(a2)) { - if (S(e2)) - return t2.isCompleted = true, t2.nextMessageSeq = "", t2; - t2.nextMessageSeq = e2[0] + 1; - } else { - r2 = a2[0].sequence, c2 = e2[0] || 0; - t2.nextMessageSeq = c2 < r2 ? r2 + 1 : c2 + 1; - } - return s2.forEach(function(e3) { - e3.sequence >= i2 && t2.messageList.push(e3); - }), (Nt({ groupID: n2 }) || Gt(n2)) && 0 === t2.messageList.length && a2[0].sequence < i2 && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2; - } - } }, { key: "setMessageRead", value: function(e2) { - var o2 = this, i2 = e2.conversationID, a2 = e2.lastMessageSeq, s2 = "".concat(this._n, ".").concat("setMessageRead"), e2 = "convID:".concat(i2, " lastMessageSeq:").concat(a2), r2 = (M.l("".concat(s2, " ").concat(e2)), R(a2) || this.warn("DoNotModifyLastSeq"), new G("setMessageRead")), c2 = (r2.setMessage(e2), i2.replace(A.CONV_GROUP, "")), u2 = void 0; - return Gt(c2) && (c2 = Jt(u2 = c2)), this.req({ P: k.SET_GRP_MSG_READ, data: { groupID: c2, topicID: u2, messageReadSeq: a2 } }).then(function() { - r2.end(), M.l("".concat(s2, " ok")); - var e3, t2 = o2.get(11), n2 = (t2.updateIsReadAfterReadReport({ conversationID: i2, lastMessageSeq: a2 }), true); - return !N(u2) && (n2 = false, e3 = o2.get(10).getLocalTopic(c2, u2)) && e3.updateSelfInfo({ readedSequence: a2 }), t2.updateUnreadCount(i2, n2), C(); - }).catch(function(e3) { - return r2.setError(e3).end(), M.l("".concat(s2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_computeLastSequence", value: function(e2) { - var t2 = e2.groupID, n2 = e2.topicID, n2 = void 0 === n2 ? void 0 : n2, e2 = e2.sequence; - return 0 < e2 ? Promise.resolve(e2) : N(n2) ? this.getGroupLastSequence(t2) : Promise.resolve(0); - } }, { key: "getGroupLastSequence", value: function(e2) { - var t2 = "".concat(this._n, ".").concat("getGroupLastSequence"), n2 = new G("getGroupLastSequence"), o2 = 0, i2 = "", a2 = "groupID:".concat(e2); - if (this.hasLocalGroup(e2)) { - var s2 = this.getLocalGroupProfile(e2), r2 = s2.lastMessage; - if (0 < r2.lastSequence && false === r2.onlineOnlyFlag) - return o2 = r2.lastSequence, i2 = "".concat(a2, ", ").concat(o2, " from group.lastMessage.lastSequence"), M.l("".concat(t2, " ").concat(i2)), n2.setMessage(i2).end(), Promise.resolve(o2); - if (1 < s2.nextMessageSeq) - return o2 = s2.nextMessageSeq - 1, i2 = "".concat(a2, ", ").concat(o2, " from group.nextMessageSeq"), M.l("".concat(t2, " ").concat(i2)), n2.setMessage(i2).end(), Promise.resolve(o2); - } - r2 = this.get(11).getLocalConversation("GROUP".concat(e2)); - return r2 && r2.lastMessage.lastSequence && false === r2.lastMessage.onlineOnlyFlag ? (o2 = r2.lastMessage.lastSequence, i2 = "".concat(a2, ", ").concat(o2, " from conversation.lastMessage.lastSequence"), M.l("".concat(t2, " ").concat(i2)), n2.setMessage(i2).end(), Promise.resolve(o2)) : this.getGroupProfileAdvance({ groupIDList: [e2], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }).then(function(e3) { - e3 = e3.data.successGroupList; - return S(e3) ? M.w("".concat(t2, " ").concat(a2, ", empty successGroupList")) : (o2 = e3[0].nextMessageSeq - 1, i2 = "".concat(a2, ", ").concat(o2, " from remote"), M.l("".concat(t2, " ").concat(i2))), n2.setMessage(i2).end(), o2; - }).catch(function(e3) { - return n2.setError(e3).setMessage(a2).end(), M.w("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "isMessageFromOrToAVChatroom", value: function(e2) { - return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e2); - } }, { key: "hasJoinedAVChatRoom", value: function() { - return this._AVChatRoomHandler.hasJoinedAVChatRoom(); - } }, { key: "getJoinedAVChatRoom", value: function() { - return this._AVChatRoomHandler.getJoinedAVChatRoom(); - } }, { key: "getGroupRemoteLastSeq", value: function(e2) { - e2 = this.getLocalGroupProfile(e2); - return e2 ? e2.nextMessageSeq - 1 : 1; - } }, { key: "isOnlineMessage", value: function(e2, t2) { - return !(!this._canIUseOnlineOnlyFlag(e2) || !t2 || true !== t2.onlineUserOnly); - } }, { key: "_canIUseOnlineOnlyFlag", value: function(e2) { - var t2 = this.getJoinedAVChatRoom(); - return !t2 || !t2.includes(e2.to) || e2.conversationType !== A.CONV_GROUP; - } }, { key: "_onAVChatRoomHistoryMessage", value: function(e2, t2) { - var n2; - S(e2) || (M.l("".concat(this._n, "._onAVChatRoomHistoryMessage groupID:").concat(t2, " count:").concat(e2.length)), n2 = [], e2.forEach(function(e3) { - n2.push(y(y({}, e3), {}, { isHistoryMessage: 1 })); - }), this.onAVChatRoomMessage(n2, t2)); - } }, { key: "onAVChatRoomMessage", value: function(e2) { - this._AVChatRoomHandler.onMessage(e2, 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : ""); - } }, { key: "onAVChatRoomMemberBanned", value: function(e2) { - this._AVChatRoomHandler.onAVChatRoomMemberBanned(e2); - } }, { key: "setUnjoinedAVChatRoom", value: function(e2) { - this._unjoinedAVChatRoomList.set(e2, 1); - } }, { key: "deleteUnjoinedAVChatRoom", value: function(e2) { - this._unjoinedAVChatRoomList.has(e2) && this._unjoinedAVChatRoomList.delete(e2); - } }, { key: "isUnjoinedAVChatRoom", value: function(e2) { - return this._unjoinedAVChatRoomList.has(e2); - } }, { key: "isGroupAttributesUpdatedNotice", value: function(e2) { - return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e2); - } }, { key: "updateLocalMainSequenceOnReconnected", value: function() { - this._groupAttributesHandler.updateLocalMainSequenceOnReconnected(); - } }, { key: "initGroupAttributes", value: function(e2) { - return this._groupAttributesHandler.initGroupAttributes(e2); - } }, { key: "setGroupAttributes", value: function(e2) { - return this._groupAttributesHandler.setGroupAttributes(e2); - } }, { key: "deleteGroupAttributes", value: function(e2) { - return this._groupAttributesHandler.deleteGroupAttributes(e2); - } }, { key: "getGroupAttributes", value: function(e2) { - return this._groupAttributesHandler.getGroupAttributes(e2); - } }, { key: "isMessageFromTopic", value: function(e2, t2) { - return 2 === e2 && !S(t2); - } }, { key: "isMessageFromCommunityOfTopic", value: function(e2, t2) { - return 2 === e2 && S(t2); - } }, { key: "getMessageExtensions", value: function(e2, t2) { - return M.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)), this.req({ P: k.GET_GRP_MSG_EXT, data: { groupID: e2.to, messageSequence: e2.sequence, startSequence: t2 } }); - } }, { key: "modifyMsgExts", value: function(e2, t2) { - var n2 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1; - return M.l("".concat(this._n, ".modifyMsgExts operateType:").concat(n2)), this.req({ P: k.MODIFY_GRP_MSG_EXT, data: { groupID: e2.to, messageSequence: e2.sequence, extensionList: t2, operateType: n2 } }); - } }, { key: "_genNotifyReqList", value: function(e2) { - for (var t2, n2, o2, i2, a2 = [], s2 = 0, r2 = e2.length; s2 < r2; s2++) - t2 = e2[s2], i2 = this.getLocalGroupProfile(t2).type, n2 = this._getGroupLastRevokedTime(t2), o2 = 1e3 * We(), i2 = { notifyType: 1, limit: 20, type: Nt({ type: i2, groupID: t2 }) ? A.GRP_COMMUNITY : void 0, groupID: t2, beginTime: n2, endTime: o2 }, a2.push(i2); - return a2; - } }, { key: "getNotice", value: function(e2) { - var r2 = this, t2 = "".concat(this._n, ".getNotice"), e2 = e2.filter(function(e3) { - var t3; - return !!r2.hasLocalGroup(e3) && (t3 = (e3 = r2.getLocalGroupProfile(e3)).type, e3 = e3.isSupportTopic, !Ot(t3)) && !e3; - }); - 0 !== e2.length && (M.l("".concat(t2, " list:").concat(e2)), this.req({ P: k.GET_GRP_NOTIFY, data: { notifyReqList: this._genNotifyReqList(e2) } }).then(function(e3) { - var i2, a2, e3 = e3.data.notifyRspList, s2 = []; - O(e3) && (i2 = { dataList: [] }, a2 = "".concat(t2, " ok."), e3.forEach(function(e4) { - var t3 = e4.nextRevokedTime, n2 = e4.groupID, o2 = e4.notifyList; - a2 += " groupID:".concat(n2, " nextRevokedTime:").concat(t3, " count:").concat(o2.length, "\n"), i2.dataList.push({ elements: { revokedInfos: r2._genRevokedInfos(e4) } }), 0 !== t3 ? (r2._setGroupLastRevokedTime(n2, t3), s2.push(n2)) : r2._setGroupLastRevokedTime(n2, 1e3 * We()); - }), M.l(a2), r2.onMsgRevoked(i2, false)), 0 < s2.length && r2.getNotice(s2); - }).catch(function(e3) { - M.e("".concat(t2, " failed. error:"), e3); - })); - } }, { key: "_genRevokedInfos", value: function(e2) { - var t2 = e2.notifyList, n2 = e2.groupID, o2 = []; - return O(t2) && t2.forEach(function(e3) { - o2.push({ groupID: n2, sequence: e3.sequence, random: e3.random, revokerInfo: y({}, e3.revokerInfo) }); - }), o2; - } }, { key: "_getGroupLastRevokedTime", value: function(e2) { - return this.hasLocalGroup(e2) ? this.getLocalGroupProfile(e2)._lastRevokedTime : 0; - } }, { key: "_setGroupLastRevokedTime", value: function(e2, t2) { - this.hasLocalGroup(e2) && (this.getLocalGroupProfile(e2)._lastRevokedTime = t2); - } }, { key: "isGroupCountersNotice", value: function(e2) { - return this._groupCountersHandler.isGroupCountersNotice(e2); - } }, { key: "setGroupCounters", value: function(e2) { - return this._groupCountersHandler.setGroupCounters(e2); - } }, { key: "increaseGroupCounter", value: function(e2) { - return this._groupCountersHandler.increaseGroupCounter(e2); - } }, { key: "decreaseGroupCounter", value: function(e2) { - return this._groupCountersHandler.decreaseGroupCounter(e2); - } }, { key: "getGroupCounters", value: function(e2) { - return this._groupCountersHandler.getGroupCounters(e2); - } }, { key: "getGroupMemberHandler", value: function() { - return this._groupMemberHandler; - } }, { key: "getGroupMemberList", value: function(e2) { - return this._groupMemberHandler.getGroupMemberList(e2); - } }, { key: "getGroupMemberProfile", value: function(e2) { - return this._groupMemberHandler.getGroupMemberProfile(e2); - } }, { key: "addGroupMember", value: function(e2) { - return this._groupMemberHandler.addGroupMember(e2); - } }, { key: "deleteGroupMember", value: function(e2) { - return this._groupMemberHandler.deleteGroupMember(e2); - } }, { key: "setGroupMemberMuteTime", value: function(e2) { - return this._groupMemberHandler.setGroupMemberMuteTime(e2); - } }, { key: "setGroupMemberRole", value: function(e2) { - return this._groupMemberHandler.setGroupMemberRole(e2); - } }, { key: "setGroupMemberNameCard", value: function(e2) { - return this._groupMemberHandler.setGroupMemberNameCard(e2); - } }, { key: "setGroupMemberCustomField", value: function(e2) { - return this._groupMemberHandler.setGroupMemberCustomField(e2); - } }, { key: "markGroupMemberList", value: function(e2) { - return this._groupMemberHandler.markGroupMemberList(e2); - } }, { key: "modifyGroupMemberInfo", value: function(e2) { - return this._groupMemberHandler.modifyGroupMemberInfo(e2); - } }, { key: "restartPolling", value: function() { - this._AVChatRoomHandler.restartPolling(); - } }, { key: "getPollingTimerID", value: function(e2) { - var t2; - return e2 && (t2 = this.getLocalGroupProfile(e2)) && Ot(t2.type) ? this._AVChatRoomHandler.getPollingTimerID(e2) : -1; - } }, { key: "_canIUseJoinOption", value: function(e2) { - return e2 === A.GRP_PUBLIC || Nt({ type: e2 }); - } }, { key: "_silentlyGetGroupProfile", value: function(e2, t2) { - var n2 = setTimeout(this.getGroupProfile.bind(this, { groupID: t2 }), 3e3); - this._timeoutIDs.push(n2), M.l("".concat(this._n, "._silentlyGetGroupProfile errorCode:").concat(e2, " groupID:").concat(t2, " timeoutIDs:").concat(this._timeoutIDs)); - } }, { key: "_clearTimeoutIDs", value: function() { - this._timeoutIDs.forEach(function(e2) { - clearTimeout(e2); - }), this._timeoutIDs = []; - } }, { key: "startMessageLongPolling", value: function(e2) { - var t2 = e2.groupID, n2 = e2.longPollingKey, e2 = e2.longPollingSequence, e2 = void 0 === e2 ? 1 : e2, o2 = this.get(12).isUnlimitedAVChatRoom(), i2 = (this._AVChatRoomHandler.hasPollingInstance(t2) && this.stopMessageLongPolling({ groupID: t2 }), this._AVChatRoomHandler.getJoinedLiveList()), o2 = (!o2 && 0 < i2.length && this.stopMessageLongPolling({ groupID: i2[0] }), new oi({ groupID: t2, type: A.GRP_LIVE })); - return M.l("".concat(this._n, ".startMessageLongPolling groupID:").concat(t2, " longPollingKey:").concat(n2, " longPollingSequence:").concat(e2)), this._AVChatRoomHandler.startRunLoop({ group: o2, longPollingKey: n2, startSeq: e2 }); - } }, { key: "stopMessageLongPolling", value: function(e2) { - var e2 = e2.groupID, t2 = this.get(11); - return this._AVChatRoomHandler.reset(e2), this._deleteLocalGroup(e2), t2.deleteLocalConv("".concat(A.CONV_GROUP).concat(e2)), M.l("".concat(this._n, ".stopMessageLongPolling ok, groupID:").concat(e2)), T({ groupID: e2 }); - } }, { key: "reset", value: function() { - this.groupMap.clear(), this._unjoinedAVChatRoomList.clear(), this._receiptDetailCompleteMap.clear(), this._onlineMemberCountMap.clear(), this._commonGroupHandler.reset(), this._groupSystemNoticeHandler.reset(), this._groupTipsHandler.reset(), this._groupAttributesHandler.reset(), this._groupCountersHandler.reset(), this._AVChatRoomHandler.reset(), this._groupMemberHandler.reset(), this._clearTimeoutIDs(); - } }]), Vi), Ci = ["topicID", "topicName", "avatar", "introduction", "notification", "unreadCount", "muteAllMembers", "customData", "groupAtInfoList", "nextMessageSeq", "selfInfo"], Ti = (e(xi, [{ key: "_initTopic", value: function(e2) { - for (var t2 in e2) - Ci.indexOf(t2) < 0 || ("selfInfo" === t2 ? this.updateSelfInfo(e2[t2]) : this[t2] = "muteAllMembers" === t2 ? 1 === e2[t2] : e2[t2]); - } }, { key: "updateUnreadCount", value: function() { - this.unreadCount = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0; - } }, { key: "updateNextMessageSeq", value: function(e2) { - this.nextMessageSeq = e2; - } }, { key: "updateLastMessage", value: function(e2) { - this.lastMessage = Yo(e2); - } }, { key: "updateGroupAtInfoList", value: function(e2) { - this.groupAtInfoList = JSON.parse(JSON.stringify(e2)); - } }, { key: "updateTopic", value: function(e2) { - N(e2.selfInfo) || this.updateSelfInfo(e2.selfInfo), N(e2.muteAllMembers) || (this.muteAllMembers = 1 === e2.muteAllMembers), _t(this, e2, ["groupID", "lastMessageTime", "selfInfo", "muteAllMembers", "lastMsg"]); - } }, { key: "updateSelfInfo", value: function(e2) { - return 0 === _t(this.selfInfo, e2, [], [""]); - } }, { key: "reduceUnreadCount", value: function() { - return 1 <= this.unreadCount && (--this.unreadCount, true); - } }, { key: "isLastMessageRevoked", value: function(e2) { - return e2.sequence === this.lastMessage.lastSequence; - } }, { key: "setLastMessageRevoked", value: function(e2) { - this.lastMessage.isRevoked = e2; - } }, { key: "setLastMessageRevoker", value: function(e2) { - this.lastMessage.revoker = e2; - } }]), xi), Di = (t(qi, u), zo = n(qi), e(qi, [{ key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("topic_cache_time"), t2 = this.getCloudConfig("topic_last_active_time"); - N(e2) || (this.TOPIC_CACHE_TIME = Number(e2)), N(t2) || (this.TOPIC_LAST_ACTIVE_TIME = Number(t2)); - } }, { key: "onTopicCreated", value: function(e2) { - var t2 = e2.groupID; - this.resetGetTopicTime(t2), this.emitOEvt(h.TOPIC_CREATED, e2); - } }, { key: "onTopicDeleted", value: function(e2) { - var t2 = this, n2 = e2.groupID, o2 = e2.topicIDList; - (void 0 === o2 ? [] : o2).forEach(function(e3) { - t2._deleteLocalTopic(n2, e3); - }), this.emitOEvt(h.TOPIC_DELETED, e2); - } }, { key: "onTopicProfileUpdated", value: function(e2) { - var t2 = e2.groupID, n2 = e2.topicID, n2 = this.getLocalTopic(t2, n2); - n2 && (n2.updateTopic(e2), this.emitOEvt(h.TOPIC_UPDATED, { groupID: t2, topic: n2 })); - } }, { key: "onTopicLatestMsg", value: function(e2) { - var t2, n2, e2 = e2 || {}, o2 = e2.topicLatestMessage, e2 = e2.excludedUnreadSequenceList; - S(o2) || (t2 = o2.groupProfile.topicID, o2.conversationType = A.CONV_GROUP, o2.to = t2, (n2 = new Do(o2)).setElement(o2.elements), this.updateUnreadCountAndLastMsg(t2, n2, e2)); - } }, { key: "onMessageRemindTypeUpdated", value: function(e2) { - var t2, n2 = e2.groupID, o2 = e2.topicID, e2 = e2.messageRemindType, i2 = this.getLocalTopic(n2, o2); - i2 && ((t2 = i2.updateSelfInfo({ messageRemindType: e2 })) && this.emitOEvt(h.TOPIC_UPDATED, { groupID: n2, topic: i2 }), M.l("".concat(this._n, ".onMessageRemindTypeUpdated topicID:").concat(o2, " messageRemindType:").concat(e2, " isUpdated:").concat(t2))); - } }, { key: "onAtInfoUpdated", value: function(e2) { - var t2 = e2.topicID, e2 = e2.groupAtInfoList, n2 = Jt(t2), t2 = this.getLocalTopic(n2, t2); - t2 && !N(e2) && (t2.updateGroupAtInfoList(e2), this.emitOEvt(h.TOPIC_UPDATED, { groupID: n2, topic: t2 })); - } }, { key: "onUnreadCountUpdatedFromConv", value: function(e2) { - var t2 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 0, n2 = Jt(e2), e2 = this.getLocalTopic(n2, e2); - e2 && e2.unreadCount !== t2 && (e2.updateUnreadCount(t2), 0 === t2 && e2.updateSelfInfo({ readedSequence: e2.lastMessage.lastSequence }), this.emitOEvt(h.TOPIC_UPDATED, { groupID: n2, topic: e2 })); - } }, { key: "onMessageSent", value: function(e2) { - var t2, n2, o2 = e2.groupID, i2 = e2.topicID, e2 = e2.lastMessage, i2 = this.getLocalTopic(o2, i2); - i2 && (n2 = (t2 = void 0 === (t2 = e2.sequence) ? 0 : t2) + 1) > i2.nextMessageSeq && (i2.updateNextMessageSeq(n2), i2.updateLastMessage(e2), i2.updateSelfInfo({ readedSequence: t2 }), i2.updateUnreadCount(0), this.emitOEvt(h.TOPIC_UPDATED, { groupID: o2, topic: i2 })); - } }, { key: "onMessageModified", value: function(e2) { - var t2, n2 = e2.to, o2 = e2.time, i2 = e2.sequence, a2 = e2.elements, s2 = e2.cloudCustomData, r2 = e2.messageVersion, c2 = Jt(n2), u2 = this.getLocalTopic(c2, n2); - u2 && (t2 = u2.lastMessage, M.d("".concat(this._n, ".onMessageModified topicID:").concat(n2, " lastMessage:"), JSON.stringify(t2), "options:", JSON.stringify(e2)), t2) && (null === t2.payload || t2.lastTime === o2 && t2.lastSequence === i2 && t2.version !== r2) && (t2.type = a2[0].type, t2.payload = a2[0].content, t2.messageForShow = zt(t2.type, t2.payload, this.isIntl()), t2.cloudCustomData = s2, t2.version = r2, t2.lastSequence = i2, t2.lastTime = o2, this.emitOEvt(h.TOPIC_UPDATED, { groupID: c2, topic: u2 })); - } }, { key: "onMessageRevoked", value: function(e2) { - var n2, o2, i2, a2 = this; - 0 !== e2.length && (o2 = n2 = null, i2 = false, e2.forEach(function(e3) { - var t2 = e3.to; - o2 = Jt(t2), (n2 = a2.getLocalTopic(o2, t2)) && (n2.reduceUnreadCount() && (i2 = true), n2.isLastMessageRevoked(e3) && (n2.setLastMessageRevoked(true), n2.setLastMessageRevoker(e3.revoker), i2 = true), (t2 = n2.selfInfo.excludedUnreadSequenceList || []).push(e3.sequence), n2.updateSelfInfo({ excludedUnreadSequenceList: t2 })); - }), i2) && this.emitOEvt(h.TOPIC_UPDATED, { groupID: o2, topic: n2 }); - } }, { key: "isLastMessageRevoked", value: function(e2) { - var t2 = e2.topicID, e2 = e2.sequence, n2 = Jt(t2), n2 = this.getLocalTopic(n2, t2), t2 = false; - return t2 = n2 ? n2.isLastMessageRevoked({ sequence: e2 }) : t2; - } }, { key: "updateUnreadCountAndLastMsg", value: function(e2, t2, n2) { - var o2, i2 = Jt(e2), a2 = this.getLocalTopic(i2, e2); - a2 && (o2 = a2.selfInfo.excludedUnreadSequenceList || [], N(n2) || (o2 = n2), t2._isExcludedFromUnreadCount && o2.push(t2.sequence), a2.updateSelfInfo({ excludedUnreadSequenceList: o2 }), M.l("".concat(this._n, ".updateUnreadCountAndLastMsg seq:").concat(t2.sequence, " lastSeq:").concat(a2.lastMessage.lastSequence)), t2.sequence > a2.lastMessage.lastSequence) && (a2.updateLastMessage(t2), n2 = t2.sequence + 1, a2.updateNextMessageSeq(n2), o2 = this._computeUnreadCount(a2), a2.updateUnreadCount(o2), (t2 = this.get(11).getLocalConversation("".concat(A.CONV_GROUP).concat(e2))) && t2.updateUnreadCount({ nextUnreadCount: o2, isFromGetConversations: true }), this.emitOEvt(h.TOPIC_UPDATED, { groupID: i2, topic: a2 })); - } }, { key: "getJoinedCommunityList", value: function() { - return this.get(7).syncCommunityWithTopic(); - } }, { key: "createTopicInCommunity", value: function(t2) { - var n2, o2 = this, i2 = "".concat(this._n, ".").concat("createTopicInCommunity"), e2 = t2.topicID; - return N(e2) || Gt(e2) ? t2.topicName && false === this._filterProfanity("topicName", t2) || t2.introduction && false === this._filterProfanity("introduction", t2) || t2.notification && false === this._filterProfanity("notification", t2) ? D({ code: L.PROFANITY_FOUND }) : (n2 = new G("createTopicInCommunity"), this.req({ P: k.CREATE_TOPIC, data: y({}, t2) }).then(function(e3) { - e3 = e3.data.topicID; - return n2.setMessage("topicID:".concat(e3)).end(), M.l("".concat(i2, " ok. topicID:").concat(e3)), o2._updateTopicMap([y(y({}, t2), {}, { topicID: e3 })]), C({ topicID: e3 }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })) : D({ code: L.ILLEGAL_TOPIC_ID }); - } }, { key: "deleteTopicFromCommunity", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("deleteTopicFromCommunity"), a2 = e2.groupID, e2 = e2.topicIDList, e2 = void 0 === e2 ? [] : e2, s2 = new G("deleteTopicFromCommunity"); - return s2.setMessage("groupID:".concat(a2, " topicIDList:").concat(e2)), this.req({ P: k.DEL_TOPIC, data: { groupID: a2, topicIDList: e2 } }).then(function(e3) { - var e3 = e3.data.resultList, o2 = [], i2 = [], e3 = ((void 0 === e3 ? [] : e3).forEach(function(e4) { - var t3 = e4.topicID, n3 = e4.errorCode, e4 = e4.errorInfo; - 0 === n3 ? o2.push({ topicID: t3 }) : i2.push({ topicID: t3, code: n3, message: e4 }); - }), "success count:".concat(o2.length, ", fail count:").concat(i2.length)); - return s2.setMoreMessage(e3).end(), M.l("".concat(n2, " ok. ").concat(e3)), o2.forEach(function(e4) { - t2._deleteLocalTopic(a2, e4.topicID); - }), C({ successTopicList: o2, failureTopicList: i2 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "updateTopicProfile", value: function(e2) { - var t2, n2 = this, o2 = "".concat(this._n, ".").concat("updateTopicProfile"); - return M.l("".concat(o2, " options:"), e2), e2.topicName && false === this._filterProfanity("topicName", e2) || e2.introduction && false === this._filterProfanity("introduction", e2) || e2.notification && false === this._filterProfanity("notification", e2) ? D({ code: L.PROFANITY_FOUND }) : ((t2 = new G("updateTopicProfile")).setMessage("groupID:".concat(e2.groupID, " topicID:").concat(e2.topicID)), N(e2.muteAllMembers) || (e2.muteAllMembers = true === e2.muteAllMembers ? "On" : "Off"), this.req({ P: k.UPDATE_TOPIC_PROFILE, data: y({}, e2) }).then(function() { - return t2.end(), M.l("".concat(o2, " ok")), n2._updateTopicMap([e2]), C({ topic: n2.getLocalTopic(e2.groupID, e2.topicID) }); - }).catch(function(e3) { - return t2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - })); - } }, { key: "getTopicList", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("getTopicList"), o2 = e2.groupID, e2 = e2.topicIDList, e2 = void 0 === e2 ? [] : e2, i2 = 0 === e2.length, c2 = new G("getTopicList"); - if (c2.setMessage("groupID:".concat(o2)), this._getTopicTimeMap.has(o2)) { - var a2 = this._getTopicTimeMap.get(o2), s2 = a2.isGetAll, a2 = a2.time; - if ((s2 || !s2 && !i2) && Date.now() - a2 < 1e3 * this.TOPIC_CACHE_TIME) { - s2 = this._getLocalTopicList(o2, e2); - if (i2 || s2.length === e2.length) - return c2.setMoreMessage("from cache, topic count:".concat(s2.length)).end(), M.l("".concat(n2, " groupID:").concat(o2, " from cache, topic count:").concat(s2.length)), T({ successTopicList: s2, failureTopicList: [] }); - } - } - return this.req({ P: k.GET_TOPIC_LIST, data: { groupID: o2, topicIDList: e2 } }).then(function(e3) { - var e3 = e3.data.topicInfoList, a3 = [], s3 = [], r2 = [], e3 = ((void 0 === e3 ? [] : e3).forEach(function(e4) { - var t3 = e4.topic, n3 = e4.selfInfo, o3 = e4.errorCode, e4 = e4.errorInfo, i3 = t3.topicID; - 0 === o3 ? (a3.push(y(y({}, t3), {}, { selfInfo: n3 })), s3.push(i3)) : r2.push({ topicID: i3, code: o3, message: e4 }); - }), t2._updateTopicMap(a3), t2._handleTopicAtInfo(a3), "success count:".concat(s3.length, ", fail count:").concat(r2.length)), e3 = (c2.setMoreMessage(e3).end(), M.l("".concat(n2, " groupID:").concat(o2, " from remote, ").concat(e3)), []); - return S(s3) || (t2._getTopicTimeMap.set(o2, { time: Date.now(), isGetAll: i2 }), e3 = t2._getLocalTopicList(o2, s3)), C({ successTopicList: e3, failureTopicList: r2 }); - }).catch(function(e3) { - return c2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "hasLocalTopic", value: function(e2, t2) { - return !!this._topicMap.has(e2) && this._topicMap.get(e2).has(t2); - } }, { key: "getLocalTopic", value: function(e2, t2) { - var n2 = null; - return n2 = this._topicMap.has(e2) ? this._topicMap.get(e2).get(t2) : n2; - } }, { key: "_getLocalTopicList", value: function(e2) { - var t2 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [], e2 = this._topicMap.get(e2), n2 = []; - return e2 && (n2 = p(e2.values())), 0 === t2.length ? n2 : n2.filter(function(e3) { - return t2.includes(e3.topicID); - }); - } }, { key: "_deleteLocalTopic", value: function(e2, t2) { - this._topicMap.has(e2) && this._topicMap.get(e2).has(t2) && (this._topicMap.get(e2).delete(t2), M.l("".concat(this._n, "._deleteLocalTopic groupID:").concat(e2, " topicID:").concat(t2))); - } }, { key: "_updateTopicMap", value: function(e2) { - var i2 = this, a2 = []; - e2.forEach(function(e3) { - var t2 = e3.groupID, n2 = e3.topicID, o2 = null, e3 = (i2._topicMap.has(t2) || i2._topicMap.set(t2, /* @__PURE__ */ new Map()), i2._topicMap.get(t2).has(n2) ? (o2 = i2._topicMap.get(t2).get(n2)).updateTopic(e3) : (i2._getTopicLastMessage(e3), o2 = new Ti(e3, i2.isIntl()), i2._topicMap.get(t2).set(n2, o2)), i2._computeUnreadCount(o2)); - o2.updateUnreadCount(e3), a2.push({ conversationID: "".concat(A.CONV_GROUP).concat(n2), type: A.CONV_TOPIC, unreadCount: e3 }); - }), 0 < a2.length && this.get(11).updateTopicConversation(a2); - } }, { key: "resetGetTopicTime", value: function(e2) { - var t2 = this; - N(e2) ? p(this._getTopicTimeMap.keys()).forEach(function(e3) { - t2._getTopicTimeMap.set(e3, 0); - }) : this._getTopicTimeMap.set(e2, 0); - } }, { key: "getTopicListOnReconnected", value: function() { - var o2 = this, e2 = p(this._topicMap.keys()), i2 = [], a2 = this.get(11); - e2.forEach(function(e3) { - var n2 = [], t2 = o2._getLocalTopicList(e3); - a2.deleteTopicRoamingInfo(e3), t2.forEach(function(e4) { - var t3 = e4.lastMessage.lastTime, t3 = void 0 === t3 ? 0 : t3; - Date.now() - 1e3 * t3 < 1e3 * o2.TOPIC_LAST_ACTIVE_TIME && n2.push(e4.topicID); - }), 0 < n2.length && i2.push({ groupID: e3, topicIDList: n2 }); - }), M.l("".concat(this._n, ".getTopicListOnReconnected. active community count:").concat(i2.length)), this._relayGetTopicList(i2); - } }, { key: "_relayGetTopicList", value: function(t2) { - var e2, n2, o2, i2 = this; - 0 !== t2.length && (n2 = 5 < (e2 = t2.shift()).topicIDList.length ? "topicIDList.length:".concat(e2.topicIDList.length) : "topicIDList:".concat(e2.topicIDList), (o2 = new G("relayGetTopicList")).setMessage(n2), M.l("".concat(this._n, "._relayGetTopicList. ").concat(n2)), this.getTopicList(e2).then(function() { - o2.end(), i2._relayGetTopicList(t2); - }).catch(function(e3) { - o2.setError(e3).end(), i2._relayGetTopicList(t2); - })); - } }, { key: "_handleTopicAtInfo", value: function(e2) { - var i2 = this; - 0 !== e2.length && e2.forEach(function(e3) { - var t2 = e3.groupID, n2 = e3.topicID, e3 = e3.groupAtInfoList, o2 = []; - N(e3) || (e3.forEach(function(e4) { - o2.push(y(y({}, e4), {}, { groupID: t2, topicID: n2 })); - }), i2.get(11).onNewGroupAtTips({ dataList: o2 })); - }); - } }, { key: "_getTopicLastMessage", value: function(e2) { - var t2; - N(e2.lastMsg) || (t2 = { time: e2.lastMsg.time, sequence: e2.lastMsg.sequence, from: e2.lastMsg.from, payload: e2.lastMsg.elements[0] ? e2.lastMsg.elements[0].content : null, type: e2.lastMsg.elements[0] ? e2.lastMsg.elements[0].type : "", nick: e2.lastMsg.nick, avatar: e2.lastMsg.avatar, version: e2.lastMsg.messageVersion, cloudCustomData: e2.lastMsg.cloudCustomData, isRevoked: 2 === e2.lastMsg.isPlaceMessage, revoker: S(e2.lastMsg.revokerInfo) ? null : e2.lastMsg.revokerInfo.revoker }, e2.lastMessage = t2); - } }, { key: "deleteTopicListInCommunity", value: function(t2) { - var n2 = this, e2 = this._getLocalTopicList(t2), o2 = this.get(11); - e2.forEach(function(e3) { - e3 = e3.topicID; - n2._deleteLocalTopic(t2, e3), n2._getTopicTimeMap.delete(t2), o2.deleteLocalConv("".concat(A.CONV_GROUP).concat(e3)); - }); - } }, { key: "_computeUnreadCount", value: function(t2) { - var n2, e2 = t2.selfInfo, o2 = e2.excludedUnreadSequenceList, i2 = e2.readedSequence, e2 = t2.nextMessageSeq - t2.selfInfo.readedSequence - 1; - return O(o2) && (n2 = 0, o2.forEach(function(e3) { - i2 < e3 && e3 <= t2.nextMessageSeq - 1 && (n2 += 1); - }), 1 <= n2) && (e2 -= n2), e2 < 0 ? 0 : e2; - } }, { key: "_filterProfanity", value: function(e2, t2) { - var n2, o2 = this.get(29); - return !o2 || (n2 = (o2 = o2.filterText(t2[e2], re)).isAllowedToSend, o2 = o2.modifiedText, true === n2 && (t2[e2] = o2, true)); - } }, { key: "getMessageExtensions", value: function(e2, t2) { - M.l("".concat(this._n, ".getMessageExtensions startSequence:").concat(t2)); - var n2 = Jt(e2.to); - return this.req({ P: k.GET_GRP_MSG_EXT, data: { groupID: n2, topicID: e2.to, messageSequence: e2.sequence, startSequence: t2 } }); - } }, { key: "modifyMsgExts", value: function(e2, t2) { - var n2 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1, o2 = (M.l("".concat(this._n, ".modifyMsgExts operateType:").concat(n2)), Jt(e2.to)); - return this.req({ P: k.MODIFY_GRP_MSG_EXT, data: { groupID: o2, topicID: e2.to, messageSequence: e2.sequence, extensionList: t2, operateType: n2 } }); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._topicMap.clear(), this._getTopicTimeMap.clear(), this.TOPIC_CACHE_TIME = 300, this.TOPIC_LAST_ACTIVE_TIME = 3600; - } }]), qi), Ei = (e(Fi, [{ key: "setExpirationTime", value: function(e2) { - this.expirationTime = e2; - } }, { key: "getUserProfile", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("getUserProfile"), o2 = e2.userIDList; - e2.fromAccount = this._userM.getMyAccount(), 100 < o2.length && (M.w("".concat(n2, " ").concat($t(100))), o2.length = 100); - for (var i2, a2 = [], s2 = [], r2 = 0, c2 = o2.length; r2 < c2; r2++) - i2 = o2[r2], this._userM.isMyFriend(i2) && this._contains(i2) ? s2.push(this._getProfileFromMap(i2)) : a2.push(i2); - if (0 === a2.length) - return T(s2); - e2.toAccount = a2; - var u2 = e2.bFromGetMyProfile || false, l2 = [], d2 = (e2.toAccount.forEach(function(e3) { - l2.push({ toAccount: e3, standardSequence: 0, customSequence: 0 }); - }), e2.userItem = l2, new G("getUserProfile")); - return d2.setMessage(5 < o2.length ? "userIDList.length:".concat(o2.length) : "userIDList:".concat(o2)), this._userM.req({ P: k.GET_USER_PROFILE, data: e2 }).then(function(e3) { - d2.end(), M.i("".concat(n2, " ok")); - e3 = t2._handleResponse(e3).concat(s2); - return C(u2 ? e3[0] : e3); - }).catch(function(e3) { - return d2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "getMyProfile", value: function() { - var e2, t2 = this._userM.getMyAccount(), n2 = "".concat(this._n, ".getMyProfile"); - return M.l("".concat(n2, " myAccount:").concat(t2)), this._fill(), this._contains(t2) ? (e2 = this._getProfileFromMap(t2), M.d("".concat(n2, " from cache, myProfile:").concat(JSON.stringify(e2))), T(e2)) : this.getUserProfile({ fromAccount: t2, userIDList: [t2], bFromGetMyProfile: true }); - } }, { key: "_handleResponse", value: function(e2) { - var t2 = e2.data.userProfileItem; - if (!O(t2)) - return []; - for (var n2 = [], e2 = Date.now(), o2 = 0, i2 = t2.length; o2 < i2; o2++) { - var a2 = t2[o2], s2 = a2.to, a2 = a2.profileItem; - "@TLS#NOT_FOUND" !== s2 && "" !== s2 && (s2 = this._update(s2, this._getLatestProfileFromResponse(s2, a2)).latestProfile, n2.push(s2)); - } - return M.l("".concat(this._n, "._handleResponse cost:").concat(nn(e2))), n2; - } }, { key: "_getLatestProfileFromResponse", value: function(e2, t2) { - var n2 = { userID: e2, profileCustomField: [] }; - if (!S(t2)) - for (var o2 = 0, i2 = t2.length; o2 < i2; o2++) - if (-1 < t2[o2].tag.indexOf("Tag_Profile_Custom")) - n2.profileCustomField.push({ key: t2[o2].tag, value: t2[o2].value }); - else - switch (t2[o2].tag) { - case g.NICK: - n2.nick = t2[o2].value; - break; - case g.GENDER: - n2.gender = t2[o2].value; - break; - case g.BIRTHDAY: - n2.birthday = t2[o2].value; - break; - case g.LOCATION: - n2.location = t2[o2].value; - break; - case g.SELFSIGNATURE: - n2.selfSignature = t2[o2].value; - break; - case g.ALLOWTYPE: - n2.allowType = t2[o2].value; - break; - case g.LANGUAGE: - n2.language = t2[o2].value; - break; - case g.AVATAR: - n2.avatar = t2[o2].value; - break; - case g.MESSAGESETTINGS: - n2.messageSettings = t2[o2].value; - break; - case g.ADMINFORBIDTYPE: - n2.adminForbidType = t2[o2].value; - break; - case g.LEVEL: - n2.level = t2[o2].value; - break; - case g.ROLE: - n2.role = t2[o2].value; - break; - default: - M.w("".concat(this._n, "._getLatestProfileFromResponse unknown tag:"), t2[o2].tag, t2[o2].value); - } - return n2; - } }, { key: "updateMyProfile", value: function(o2) { - var i2 = this, a2 = "".concat(this._n, ".").concat("updateMyProfile"); - if (o2.nick && false === this._userM.filterProfanity("nick", o2)) - return D({ code: L.PROFANITY_FOUND }); - if (o2.selfSignature && false === this._userM.filterProfanity("selfSignature", o2)) - return D({ code: L.PROFANITY_FOUND }); - var s2 = new G("updateMyProfile"), e2 = (s2.setMessage(JSON.stringify(o2)), new ei().validate(o2)); - if (!e2.valid) - return s2.setCode(L.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(e2.tips)).end(), M.e("".concat(a2, " info:").concat(e2.tips)), D({ code: L.UPDATE_PROFILE_INVALID_PARAM }); - var t2, r2, n2 = []; - for (t2 in o2) - Object.prototype.hasOwnProperty.call(o2, t2) && ("profileCustomField" === t2 ? o2.profileCustomField.forEach(function(e3) { - n2.push({ tag: e3.key, value: e3.value }); - }) : n2.push({ tag: g[t2.toUpperCase()], value: o2[t2] })); - return 0 === n2.length ? (e2 = new E({ code: L.UPDATE_PROFILE_NO_KEY }), s2.setError(e2).end(), M.e("".concat(a2, " failed. error:"), e2), D(e2)) : (r2 = this._userM.getMyAccount(), this._userM.req({ P: k.UPDATE_MY_PROFILE, data: { fromAccount: r2, profileItem: n2 } }).then(function(e3) { - s2.end(), M.i("".concat(a2, " ok")); - var t3 = i2._update(r2, o2), n3 = t3.isProfileUpdated, t3 = t3.latestProfile; - return true === n3 && i2._userM.emitOEvt(h.PROFILE_UPDATED, [t3]), T(t3); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(a2, " failed. error:"), e3), D(e3); - })); - } }, { key: "onProfileModified", value: function(e2) { - var t2 = e2.dataList; - if (!S(t2)) { - var n2 = t2.length; - M.d("".concat(this._n, ".onProfileModified count:").concat(n2, " dataList:"), e2.dataList); - for (var o2 = [], i2 = 0; i2 < n2; i2++) { - var a2 = t2[i2].userID, a2 = this._update(a2, this._getLatestProfileFromResponse(a2, t2[i2].profileList)), s2 = a2.isProfileUpdated, a2 = a2.latestProfile; - true === s2 && o2.push(a2); - } - 0 < o2.length && (this._userM.emitIEvt(P.PROFILE_UPDATED, o2), this._userM.emitOEvt(h.PROFILE_UPDATED, o2)); - } - } }, { key: "_fill", value: function() { - if (0 === this.accountProfileMap.size) { - for (var e2 = this._getCachedProfiles(), t2 = Date.now(), n2 = 0, o2 = e2.length; n2 < o2; n2++) - t2 - e2[n2].lastUpdatedTime < this.expirationTime && this.accountProfileMap.set(e2[n2].userID, e2[n2]); - M.l("".concat(this._n, "._fill from cache, size:").concat(this.accountProfileMap.size)); - } - } }, { key: "_update", value: function(e2, t2) { - var n2, o2 = false, i2 = Date.now(); - return this._contains(e2) ? (n2 = this._getProfileFromMap(e2), t2.profileCustomField && true === kt(n2.profileCustomField, t2.profileCustomField) && (n2.lastUpdatedTime = i2, o2 = true), 0 < _t(n2, t2, ["profileCustomField"]) && (n2.lastUpdatedTime = i2, o2 = true)) : (n2 = new ei(t2), !this._userM.isMyFriend(e2) && e2 !== this._userM.getMyAccount() || (n2.lastUpdatedTime = i2, o2 = true, this.accountProfileMap.set(e2, n2))), this._flush(e2 === this._userM.getMyAccount()), true === o2 && M.l("".concat(this._n, "._update account:").concat(e2, " isUpdated:").concat(o2)), { isProfileUpdated: o2, latestProfile: n2 }; - } }, { key: "_flush", value: function(e2) { - var t2 = p(this.accountProfileMap.values()), n2 = this._userM.getStorageModule(); - M.d("".concat(this._n, "._flush length:").concat(t2.length, " flushAtOnce:").concat(e2)), n2.setItem(this.TAG, t2, e2); - } }, { key: "_contains", value: function(e2) { - return this.accountProfileMap.has(e2); - } }, { key: "_getProfileFromMap", value: function(e2) { - return this.accountProfileMap.get(e2); - } }, { key: "_getCachedProfiles", value: function() { - var e2 = this._userM.getStorageModule().getItem(this.TAG); - return S(e2) ? [] : e2; - } }, { key: "onConvProfileUpdated", value: function(e2) { - for (var t2, n2, o2, i2 = [], a2 = 0, s2 = e2.length; a2 < s2; a2++) - n2 = (t2 = e2[a2]).userID, this._userM.isMyFriend(n2) && (this._contains(n2) ? (o2 = this._getProfileFromMap(n2), 0 < _t(o2, t2) && i2.push(n2)) : i2.push(t2.userID)); - 0 !== i2.length && (M.l("".concat(this._n, ".onConvProfileUpdated toAccountList:").concat(i2)), this.getUserProfile({ userIDList: i2 })); - } }, { key: "getNickAndAvatarByUserID", value: function(e2) { - return this._contains(e2) ? { nick: (e2 = this._getProfileFromMap(e2)).nick, avatar: e2.avatar } : { nick: "", avatar: "" }; - } }, { key: "getUserNickAndAvatar", value: function(e2) { - var t2, n2 = this, o2 = p(new Set(e2)), i2 = (M.l("".concat(this._n, ".getUserNickAndAvatar userIDList.length:").concat(e2.length, " uniqueUserIDList.length:").concat(o2.length)), []); - return 0 === e2.length ? Promise.resolve(i2) : (e2 = this._createUserIDListGroup(o2), t2 = [], e2.forEach(function(e3) { - t2.push(n2.getUserProfile({ userIDList: e3 })); - }), Promise.all(t2).then(function(e3) { - return e3.forEach(function(e4) { - e4 = e4.data.map(function(e5) { - return { userID: e5.userID, nick: e5.nick, avatar: e5.avatar }; - }); - i2.push.apply(i2, p(e4)); - }), i2; - })); - } }, { key: "_createUserIDListGroup", value: function(e2) { - for (var t2 = [], n2 = 0; n2 < e2.length; ) - t2.push(e2.slice(n2, n2 += 100)); - return t2; - } }, { key: "reset", value: function() { - this._flush(true), this.accountProfileMap.clear(); - } }]), Fi), Li = e(function e2(t2) { - d(this, e2); - }), Si = (e(wi, [{ key: "getLocalBlacklist", value: function() { - return p(this._blacklistMap.keys()); - } }, { key: "getBlacklist", value: function() { - var o2 = this, i2 = "".concat(this._n, ".getBlacklist"), e2 = { fromAccount: this._userM.getMyAccount(), maxLimited: this.maxLimited, startIndex: 0, lastSequence: this.currentSequence }, a2 = new G("getBlacklist"); - return this._userM.req({ P: k.GET_BL, data: e2 }).then(function(e3) { - var e3 = e3.data, t2 = e3.blackListItem, e3 = e3.currentSequence, n2 = S(t2) ? 0 : t2.length; - a2.setMessage("count:".concat(n2)).end(), M.i("".concat(i2, " ok")), o2.currentSequence = e3, o2._handleResponse(t2, true), o2._userM.emitOEvt(h.BLACKLIST_UPDATED, p(o2._blacklistMap.keys())); - }).catch(function(e3) { - return a2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - }); - } }, { key: "addBlacklist", value: function(t2) { - var e2, n2, o2 = this, i2 = new G("addToBlacklist"), a2 = "".concat(this._n, ".addBlacklist"), s2 = this._userM.getMyAccount(); - return 1 === t2.userIDList.length && t2.userIDList[0] === s2 ? (n2 = this._userM.getErrMsg(e2 = L.CANNOT_ADD_SELF_TO_BLACKLIST), i2.setCode(e2).setMessage(n2).end(), n2 = new E({ code: e2 }), M.e("".concat(a2, " failed. error:"), n2), D(n2)) : (t2.userIDList.includes(s2) && (t2.userIDList = t2.userIDList.filter(function(e3) { - return e3 !== s2; - })), t2.fromAccount = this._userM.getMyAccount(), t2.toAccount = t2.userIDList, this._userM.req({ P: k.ADD_TO_BL, data: t2 }).then(function(e3) { - return i2.setMessage(5 < t2.userIDList.length ? "userIDList.length:".concat(t2.userIDList.length) : "userIDList:".concat(t2.userIDList)).end(), M.i("".concat(a2, " ok")), o2._handleResponse(e3.resultItem, true), C(p(o2._blacklistMap.keys())); - }).catch(function(e3) { - return i2.setError(e3).end(), M.e("".concat(a2, " failed. error:"), e3), D(e3); - })); - } }, { key: "_handleResponse", value: function(e2, t2) { - if (!S(e2)) - for (var n2, o2, i2, a2 = 0, s2 = e2.length; a2 < s2; a2++) - o2 = e2[a2].to, i2 = e2[a2].resultCode, !N(i2) && 0 !== i2 || (t2 ? ((n2 = this._blacklistMap.has(o2) ? this._blacklistMap.get(o2) : new Li()).userID = o2, S(e2[a2].addBlackTimeStamp) || (n2.timeStamp = e2[a2].addBlackTimeStamp), this._blacklistMap.set(o2, n2)) : this._blacklistMap.has(o2) && (n2 = this._blacklistMap.get(o2), this._blacklistMap.delete(o2))); - M.l("".concat(this._n, "._handleResponse total:").concat(this._blacklistMap.size, " bAdd:").concat(t2)); - } }, { key: "deleteBlacklist", value: function(t2) { - var n2 = this, o2 = "".concat(this._n, ".deleteBlacklist"), i2 = new G("removeFromBlacklist"); - return t2.fromAccount = this._userM.getMyAccount(), t2.toAccount = t2.userIDList, this._userM.req({ P: k.RM_FROM_BL, data: t2 }).then(function(e2) { - return i2.setMessage(5 < t2.userIDList.length ? "userIDList.length:".concat(t2.userIDList.length) : "userIDList:".concat(t2.userIDList)).end(), M.i("".concat(o2, " ok")), n2._handleResponse(e2.data.resultItem, false), C(p(n2._blacklistMap.keys())); - }).catch(function(e2) { - return i2.setError(e2).end(), M.e("".concat(o2, " failed. error:"), e2), D(e2); - }); - } }, { key: "onAccountDeleted", value: function(e2) { - for (var t2 = 0, n2 = e2.length; t2 < n2; t2++) { - var o2 = e2[t2]; - this._blacklistMap.has(o2) && this._blacklistMap.delete(o2); - } - var i2 = e2.length; - 0 < i2 && (M.l("".concat(this._n, ".onAccountDeleted count:").concat(i2, " ").concat(i2 < 30 ? "userIDList:".concat(e2) : "")), this._userM.emitOEvt(h.BLACKLIST_UPDATED, p(this._blacklistMap.keys()))); - } }, { key: "onAccountAdded", value: function(e2) { - for (var t2, n2 = [], o2 = 0, i2 = e2.length; o2 < i2; o2++) - t2 = e2[o2], this._blacklistMap.has(t2) || (this._blacklistMap.set(t2, new Li({ userID: t2 })), n2.push(t2)); - 0 < n2.length && (M.l("".concat(this._n, ".onAccountAdded count:").concat(n2.length, " userIDList:"), n2), this._userM.emitOEvt(h.BLACKLIST_UPDATED, p(this._blacklistMap.keys()))); - } }, { key: "reset", value: function() { - this._blacklistMap.clear(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0; - } }]), wi), ki = (e(bi, [{ key: "_onCloudConfig", value: function() { - var e2 = this._userM.getCloudConfig("status_query_count"), t2 = this._userM.getCloudConfig("status_sub_count"), n2 = this._userM.getCloudConfig("status_unsub_count"); - M.l("".concat(this._n, "._onCloudConfig statusQueryCount:").concat(e2, " statusSubscribeCount:").concat(t2) + " statusUnsubscribeCount:".concat(n2)), N(e2) || (this.MAX_QUERY_USER_COUNT = parseInt(e2, 10)), N(e2) || (this.MAX_SUBSCRIBE_USER_COUNT = parseInt(t2, 10)), N(e2) || (this.MAX_UNSUBSCRIBE_USER_COUNT = parseInt(n2, 10)); - } }, { key: "onUserStatusUpdated", value: function(e2) { - var e2 = e2.dataList, o2 = this._userM.getMyUserID(), i2 = this._userM.get(12), e2 = e2.map(function(e3) { - var t2 = e3.to, n2 = e3.statusType, e3 = e3.customStatus, e3 = Wo(e3); - return t2 === o2 && i2.setCustomStatus(e3), { userID: t2, statusType: n2, customStatus: e3 }; - }); - M.l("".concat(this._n, ".onUserStatusUpdated list:").concat(JSON.stringify(e2))), this._userM.emitOEvt(h.USER_STATUS_UPDATED, e2); - } }, { key: "setSelfStatus", value: function(e2) { - var t2, n2, o2 = this, i2 = "".concat(this._n, ".setSelfStatus"); - return false === this._userM.filterProfanity("customStatus", e2) ? D({ code: L.PROFANITY_FOUND }) : (t2 = new G("setSelfStatus"), n2 = e2.customStatus, this._userM.req({ P: k.SET_SELF_STATUS, data: { customStatus: n2 } }).then(function(e3) { - return t2.setMessage("customStatus:".concat(n2)).end(), M.l("".concat(i2, " ok. customStatus:").concat(n2)), o2._userM.get(12).setCustomStatus(n2), C({ userID: o2._userM.getMyUserID(), statusType: 1, customStatus: n2 }); - }).catch(function(e3) { - return t2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })); - } }, { key: "getUserStatus", value: function(e2) { - var o2 = "".concat(this._n, ".").concat("getUserStatus"), e2 = e2.userIDList, i2 = void 0 === e2 ? [] : e2, e2 = this._userM.getMyUserID(), t2 = p(i2), a2 = void 0, n2 = t2.indexOf(e2); - if (-1 < n2 && (t2.splice(n2, 1), a2 = { userID: e2, statusType: 1, customStatus: this._userM.get(12).getCustomStatus() }), 0 === t2.length) - return T({ successUserList: [a2], failureUserList: [] }); - if (!this._userM.canIUse(_.USER_STATUS)) - return this._userM.noUse("getUserStatus"); - t2.length > this.MAX_QUERY_USER_COUNT && (M.w("".concat(o2, " ").concat($t(this.MAX_QUERY_USER_COUNT))), t2 = i2.slice(0, this.MAX_QUERY_USER_COUNT)); - var s2 = new G("getUserStatus"); - return this._userM.req({ P: k.GET_USER_STATUS, data: { userIDList: t2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.successUserList, t3 = void 0 === t3 ? [] : t3, e3 = e3.failureUserList, e3 = void 0 === e3 ? [] : e3, t3 = t3.map(function(e4) { - var t4 = e4.userID, n4 = e4.statusType, e4 = e4.customStatus; - return { userID: t4, statusType: n4, customStatus: Wo(e4) }; - }), e3 = e3.map(function(e4) { - var t4 = e4.userID, n4 = e4.invalidUserID, o3 = e4.errorCode, e4 = e4.errorInfo; - return { userID: S(n4) ? t4 : n4, code: o3, message: e4 }; - }), n3 = (N(a2) || t3.unshift(a2), "userID count:".concat(i2.length, ", success count:").concat(t3.length, ", fail count:").concat(e3.length)); - return s2.setMessage("".concat(n3)).end(), M.l("".concat(o2, " ok. ").concat(n3, ".")), C({ successUserList: t3, failureUserList: e3 }); - }).catch(function(e3) { - return s2.setMessage("userID count:".concat(i2.length)).setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - }); - } }, { key: "subscribeUserStatus", value: function(e2) { - var t2, n2, o2, i2, a2 = "subscribeUserStatus"; - return this._userM.canIUse(_.USER_STATUS) ? (t2 = "".concat(this._n, ".").concat(a2), (n2 = p(e2 = void 0 === (e2 = e2.userIDList) ? [] : e2)).length > this.MAX_SUBSCRIBE_USER_COUNT && (M.w("".concat(t2, " ").concat($t(this.MAX_SUBSCRIBE_USER_COUNT))), n2 = e2.slice(0, this.MAX_SUBSCRIBE_USER_COUNT)), o2 = new G(a2), i2 = "userID count:".concat(e2.length), M.l("".concat(t2, " ").concat(i2)), this._userM.req({ P: k.SUB_USER_STATUS, data: { userIDList: n2 } }).then(function(e3) { - e3 = e3.data.failureUserList, e3 = (void 0 === e3 ? [] : e3).map(function(e4) { - var t3 = e4.userID, n3 = e4.invalidUserID, o3 = e4.errorCode, e4 = e4.errorInfo; - return { userID: S(n3) ? t3 : n3, code: o3, message: e4 }; - }); - return o2.setMessage("".concat(i2, " fail count:").concat(e3.length)).end(), M.l("".concat(t2, " ok. fail count:").concat(e3.length, ".")), C({ failureUserList: e3 }); - }).catch(function(e3) { - return o2.setMessage(i2).setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._userM.noUse(a2); - } }, { key: "unsubscribeUserStatus", value: function(e2) { - var t2, n2, o2, i2, a2 = "unsubscribeUserStatus"; - return this._userM.canIUse(_.USER_STATUS) ? (t2 = "".concat(this._n, ".").concat(a2), n2 = p(e2 = void 0 === (e2 = (e2 || {}).userIDList) ? [] : e2), e2.length > this.MAX_UNSUBSCRIBE_USER_COUNT && (M.w("".concat(t2, " ").concat($t(this.MAX_UNSUBSCRIBE_USER_COUNT))), n2 = e2.slice(0, this.MAX_UNSUBSCRIBE_USER_COUNT)), o2 = new G(a2), i2 = "userID count:".concat(e2.length), M.l("".concat(t2, " ").concat(i2)), e2 = { userIDList: n2 }, 0 === n2.length && (e2.userIDList = void 0, e2.unsubscribeAll = 1), this._userM.req({ P: k.UNSUB_USER_STATUS, data: e2 }).then(function(e3) { - e3 = e3.data.failureUserList, e3 = (void 0 === e3 ? [] : e3).map(function(e4) { - var t3 = e4.userID, n3 = e4.invalidUserID, o3 = e4.errorCode, e4 = e4.errorInfo; - return { userID: S(n3) ? t3 : n3, code: o3, message: e4 }; - }); - return o2.setMessage("".concat(i2, " fail count:").concat(e3.length)).end(), M.l("".concat(t2, " ok. fail count:").concat(e3.length, ".")), C({ failureUserList: e3 }); - }).catch(function(e3) { - return o2.setMessage("".concat(i2)).setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this._userM.noUse(a2); - } }, { key: "reset", value: function() { - this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100; - } }]), bi), Ai = (t(Ui, u), Jo = n(Ui), e(Ui, [{ key: "onContextUpdated", value: function(e2) { - this._profileHandler.getMyProfile(), this._blacklistHandler.getBlacklist(); - } }, { key: "mockOnNickAvatarModified", value: function(e2, t2) { - M.l("".concat(this._n, "._mockOnNickAvatarModified nick:").concat(e2, " avatar:").concat(t2)), this.onProfileModified({ dataList: [{ pushType: 1, userID: this.getMyUserID(), profileList: [{ tag: g.NICK, value: e2 }, { tag: g.AVATAR, value: t2 }] }] }); - } }, { key: "onProfileModified", value: function(e2) { - this._profileHandler.onProfileModified(e2); - } }, { key: "onRelationChainModified", value: function(e2) { - var t2, n2, e2 = e2.dataList; - S(e2) || (t2 = [], e2.forEach(function(e3) { - e3.blackListDelAccount && t2.push.apply(t2, p(e3.blackListDelAccount)); - }), 0 < t2.length && this._blacklistHandler.onAccountDeleted(t2), n2 = [], e2.forEach(function(e3) { - e3.blackListAddAccount && n2.push.apply(n2, p(e3.blackListAddAccount)); - }), 0 < n2.length && this._blacklistHandler.onAccountAdded(n2)); - } }, { key: "onConvProfileUpdated", value: function(e2) { - this._profileHandler.onConvProfileUpdated(e2); - } }, { key: "getMyAccount", value: function() { - return this.getMyUserID(); - } }, { key: "getMyNick", value: function() { - return this._profileHandler.getNickAndAvatarByUserID(this.getMyUserID()).nick; - } }, { key: "getMyProfile", value: function() { - return this._profileHandler.getMyProfile(); - } }, { key: "getStorageModule", value: function() { - return this.get(13); - } }, { key: "filterProfanity", value: function(e2, t2) { - var n2, o2 = this.get(29); - return !o2 || (n2 = (o2 = o2.filterText(t2[e2], "user_profile")).isAllowedToSend, o2 = o2.modifiedText, true === n2 && (t2[e2] = o2, true)); - } }, { key: "isMyFriend", value: function(e2) { - var t2 = this.get(8); - return !!t2 && t2.isMyFriend(e2); - } }, { key: "getUserProfile", value: function(e2) { - return this._profileHandler.getUserProfile(e2); - } }, { key: "updateMyProfile", value: function(e2) { - return this._profileHandler.updateMyProfile(e2); - } }, { key: "getNickAndAvatarByUserID", value: function(e2) { - return this._profileHandler.getNickAndAvatarByUserID(e2); - } }, { key: "getUserNickAndAvatar", value: function(e2) { - return this._profileHandler.getUserNickAndAvatar(e2); - } }, { key: "getLocalBlacklist", value: function() { - var e2 = this._blacklistHandler.getLocalBlacklist(); - return T(e2); - } }, { key: "addBlacklist", value: function(e2) { - return this._blacklistHandler.addBlacklist(e2); - } }, { key: "deleteBlacklist", value: function(e2) { - return this._blacklistHandler.deleteBlacklist(e2); - } }, { key: "onUserStatusUpdated", value: function(e2) { - this._userStatusHandler.onUserStatusUpdated(e2); - } }, { key: "setSelfStatus", value: function(e2) { - return this._userStatusHandler.setSelfStatus(e2); - } }, { key: "getUserStatus", value: function(e2) { - return this._userStatusHandler.getUserStatus(e2); - } }, { key: "subscribeUserStatus", value: function(e2) { - return this._userStatusHandler.subscribeUserStatus(e2); - } }, { key: "unsubscribeUserStatus", value: function(e2) { - return this._userStatusHandler.unsubscribeUserStatus(e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._profileHandler.reset(), this._blacklistHandler.reset(), this._userStatusHandler.reset(); - } }]), Ui), Ri = (e(Pi, [{ key: "isLoggedIn", value: function() { - return this._isLoggedIn; - } }, { key: "isOversea", value: function() { - return this._oversea; - } }, { key: "isPrivateNetWork", value: function() { - return this._proxyServer; - } }, { key: "isDevMode", value: function() { - return this._isDevMode; - } }, { key: "isTestEnv", value: function() { - return this._isTestEnv; - } }, { key: "isPartialUpdatedConvs", value: function() { - return this._isPartialUpdatedConvs; - } }, { key: "isSingaporeSite", value: function() { - return 2e7 <= this._SDKAppID && this._SDKAppID < 3e7 || 172e7 <= this._SDKAppID && this._SDKAppID < 173e7; - } }, { key: "isKoreaSite", value: function() { - return 3e7 <= this._SDKAppID && this._SDKAppID < 4e7 || 173e7 <= this._SDKAppID && this._SDKAppID < 174e7; - } }, { key: "isGermanySite", value: function() { - return 4e7 <= this._SDKAppID && this._SDKAppID < 5e7 || 174e7 <= this._SDKAppID && this._SDKAppID < 175e7; - } }, { key: "isIndiaSite", value: function() { - return 5e7 <= this._SDKAppID && this._SDKAppID < 6e7 || 175e7 <= this._SDKAppID && this._SDKAppID < 176e7; - } }, { key: "isJapanSite", value: function() { - return 6e7 <= this._SDKAppID && this._SDKAppID < 7e7 || 176e7 <= this._SDKAppID && this._SDKAppID < 177e7; - } }, { key: "isUSASite", value: function() { - return 7e7 <= this._SDKAppID && this._SDKAppID < 8e7 || 177e7 <= this._SDKAppID && this._SDKAppID < 178e7; - } }, { key: "isIndonesiaSite", value: function() { - return 8e7 <= this._SDKAppID && this._SDKAppID < 9e7 || 178e7 <= this._SDKAppID && this._SDKAppID < 179e7; - } }, { key: "isIntl", value: function() { - return 0 === (e2 = this._SDKAppID) || 2e7 <= e2 && e2 < 9e7 || 172e7 <= e2 && e2 < 179e7; - var e2; - } }, { key: "isUnlimitedAVChatRoom", value: function() { - return this._unlimitedAVChatRoom; - } }, { key: "isUsingChatCore", value: function() { - return this._isUsingChatCore; - } }, { key: "setUsingChatCore", value: function(e2) { - this._isUsingChatCore = e2; - } }, { key: "getUIPlatform", value: function() { - return this._uiPlatform; - } }, { key: "setUIPlatform", value: function(e2) { - this._uiPlatform = e2; - } }, { key: "setUserID", value: function(e2) { - this._userID = e2; - } }, { key: "getUserID", value: function() { - return this._userID; - } }, { key: "setUserSig", value: function(e2) { - this._userSig = e2; - } }, { key: "getUserSig", value: function() { - return this._userSig; - } }, { key: "getSDKAppID", value: function() { - return this._SDKAppID; - } }, { key: "setTinyID", value: function(e2) { - this._tinyID = e2, this._isLoggedIn = true; - } }, { key: "getTinyID", value: function() { - return this._tinyID; - } }, { key: "setCustomStatus", value: function(e2) { - this._customStatus = e2; - } }, { key: "getCustomStatus", value: function() { - return this._customStatus; - } }, { key: "getScene", value: function() { - return Ue ? window.tencent_cloud_im_csig_flutter_for_web_25F_cy : this._isTUIKit() ? "tuikit" : this._scene; - } }, { key: "getInstanceID", value: function() { - return this._instanceID; - } }, { key: "getStatusInstanceID", value: function() { - return this._statusInstanceID; - } }, { key: "setStatusInstanceID", value: function(e2) { - this._statusInstanceID = e2; - } }, { key: "getVersion", value: function() { - return this._version; - } }, { key: "getA2Key", value: function() { - return this._a2Key; - } }, { key: "setA2Key", value: function(e2) { - this._a2Key = e2; - } }, { key: "getContentType", value: function() { - return this._contentType; - } }, { key: "getProxyServer", value: function() { - return this._proxyServer; - } }, { key: "getFileUploadProxy", value: function() { - return this._fileUploadProxy; - } }, { key: "getFileDownloadProxy", value: function() { - return this._fileDownloadProxy; - } }, { key: "setApplicationID", value: function(e2) { - this._applicationID = e2; - } }, { key: "getApplicationID", value: function() { - return this._applicationID; - } }, { key: "setDowloadFileAuthKey", value: function(e2) { - this._authKey = e2; - } }, { key: "getDowloadFileAuthKey", value: function() { - return this._authKey; - } }, { key: "setCustomLoginInfo", value: function(e2) { - this._customLoginInfo = e2; - } }, { key: "getCustomLoginInfo", value: function() { - return this._customLoginInfo; - } }, { key: "_isTUIKit", value: function() { - var e2 = false, t2 = false, n2 = false, o2 = false, i2 = []; - v && (i2 = Object.keys(I)); - for (var a2 = 0, s2 = (i2 = Ce ? Me ? Object.keys(uni) : Object.keys(window) : i2).length; a2 < s2; a2++) - if (i2[a2].toLowerCase().includes("uikit")) { - e2 = true; - break; - } - var r2, i2 = null, c2 = (v && !lt(I.createGamePortal) && lt(getApp) && !N(getApp()) && (r2 = getApp().globalData, f(r2)) && true === r2.isTUIKit && (t2 = true), true === this._m.get(13).getStorageSync("TIM_".concat(this._SDKAppID, "_isTUIKit")) && (n2 = true), null); - if (_e && !fe && "undefined" == typeof uni && __wxConfig && (c2 = __wxConfig.pages), ge && "undefined" == typeof uni && __qqConfig && (c2 = __qqConfig.pages), O(c2) && 0 < c2.length) { - for (var u2 = 0, l2 = c2.length; u2 < l2; u2++) - if (c2[u2].toLowerCase().includes("tui")) { - o2 = true; - break; - } - c2 = null; - } - return e2 || t2 || n2 || o2; - } }, { key: "reset", value: function() { - this._isLoggedIn = false, this._userSig = "", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._statusInstanceID = 0; - } }]), Pi), Oi = { "k-vue2-pc": 1, "k-vue2-h5": 2, "k-vue2-h5-uni": 3, "k-vue2-app-uni": 4, "k-vue2-mp-uni": 5, "k-vue2-pc-uni": 6, "k-vue3-pc": 7, "k-vue3-h5": 8, "k-vue3-h5-uni": 9, "k-vue3-app-uni": 10, "k-vue3-mp-uni": 11, "k-vue3-pc-uni": 12, "k-rn": 13 }, Ni = (t(Gi, u), jo = n(Gi), e(Gi, [{ key: "onCheckTimer", value: function(e2) { - this.isLoggedIn() && e2 % this._helloInterval == 0 && this._hello(); - } }, { key: "getPushModule", value: function() { - var e2 = void 0, t2 = this.get(36), n2 = this.get(28); - return t2.canIUseTIMPush() ? e2 = t2 : n2.canIUseOfflinePush() && (e2 = n2), e2; - } }, { key: "login", value: function(e2) { - if (this.isLoggedIn()) - return n2 = this.getMyUserID(), (n2 = this.getErrMsg("RepeatLogin", n2)) && M.w(n2), T({ actionStatus: "OK", errorCode: 0, errorInfo: n2, repeatLogin: true }); - if (Date.now() - this._lastLoginTs <= 15e3) - return this.warn("LoggingIn", e2.userID), D({ code: L.REPEAT_LOGIN }); - M.l("".concat(this._n, ".login userID:").concat(e2.userID)); - var t2, n2 = this._checkLoginInfo(e2); - return 0 !== n2.code ? D(n2) : (n2 = this.get(12), t2 = e2.userID, e2 = e2.userSig, n2.setUserID(t2), n2.setUserSig(e2), this.get(20).updateProtocolConfig(), this._login()); - } }, { key: "_login", value: function() { - var _2 = this, h2 = this.get(12), g2 = h2.getScene(), e2 = 0, t2 = g2, f2 = (g2 && g2.startsWith("k-") && (t2 = Oi[g2], g2 = "tuikit"), new G("login")), n2 = (f2.setMessage("".concat(t2)).setMoreMessage("identifier:".concat(this.getMyUserID())), "tuikit" === g2), o2 = 0, n2 = (Me ? o2 = n2 ? 3 === t2 || 4 === t2 || 5 === t2 || 6 === t2 ? 31 : 9 === t2 || 10 === t2 || 11 === t2 || 12 === t2 ? 32 : 4 : 3 : v ? o2 = he ? 36 : "tuikit" === g2 ? 12 : 11 : Ce ? o2 = Ue ? "flutter_web_uikit" === g2 ? 21 : 20 : this._isReactUIKit() ? Pe ? 25 : 24 : n2 ? 1 === t2 || 2 === t2 ? 29 : 7 === t2 || 8 === t2 ? 30 : Pe ? 17 : 14 : Pe ? 16 : 13 : 13 === t2 && (o2 = 38), f2.setUIPlatform(o2), h2.setUIPlatform(o2), this.getPushModule()), m2 = (n2 && (this._isWebUniapp = n2.getUniAppPlatform(), t2 = this._getStatusInstanceID(), h2.setStatusInstanceID(t2), this.get(20).updateProtocolConfig(), e2 = n2.getDeviceBrand()), "".concat(this._n, "._login")); - return this._lastLoginTs = Date.now(), this.req({ P: k.LOGIN, data: { deviceBrand: e2, isWebUniapp: this._isWebUniapp, customInfo: h2.getCustomLoginInfo() } }).then(function(e3) { - _2._lastLoginTs = 0; - var t3 = Date.now(), n3 = null, o3 = e3.data, i2 = o3.a2Key, a2 = o3.tinyID, s2 = o3.helloInterval, r2 = o3.instanceID, c2 = o3.timeStamp, u2 = o3.customStatus, u2 = void 0 === u2 ? "" : u2, l2 = o3.purchaseBits, o3 = o3.authKey, o3 = void 0 === o3 ? "" : o3, d2 = 1e3 * c2, p2 = t3 - f2.getStartTs(), p2 = d2 + parseInt(p2 / 2) - t3, t3 = f2.getStartTs() + p2; - if (f2.start(t3), t3 = d2, Ye = p2, (d2 = /* @__PURE__ */ new Date()).setTime(t3), M.i("baseTime from server:".concat(d2, " offset:").concat(Ye)), a2) { - if (i2) - return t3 = _2.get(21).getSocketID(), d2 = Wo(u2), u2 = "socketID:".concat(t3, " scene:").concat(g2, " helloInterval:").concat(s2, " instanceID:").concat(r2, " timeStamp:").concat(c2) + " offset:".concat(p2, " customStatus:").concat(d2, " isWebUniapp:").concat(_2._isWebUniapp), M.l("".concat(m2, " ok. ").concat(u2)), c2 = t3 = "", _e && lt(I.getAccountInfoSync) && (p2 = I.getAccountInfoSync().miniProgram) && (t3 = p2.appId, c2 = p2.envVersion), f2.setMoreMessage("".concat(u2, " href:").concat(Ce ? window.location.href : "", " mpAppId:").concat(t3, " envVersion:").concat(c2, " authKey:").concat(o3)).end(), h2.setA2Key(i2), h2.setTinyID(a2), h2.setStatusInstanceID(r2), h2.setCustomStatus(d2), h2.setDowloadFileAuthKey(o3), l2 && _2.get(27).onPushedConfig({ errorCode: 0, expiredTime: 0, purchaseBits: l2 }), _2.get(20).updateProtocolConfig(), _2.emitIEvt(P.A2KEY_AND_TINYID_UPDATED), _2._helloInterval = s2, _2.triggerReady(), (p2 = _2.getPushModule()) && (uni.setStorageSync("timUniAppInstanceID", r2), p2.init()), _2._fetchCloudControlConfig(), _2.get(29).init(), e3; - n3 = new E({ code: L.NO_A2KEY }); - } else - n3 = new E({ code: L.NO_TINYID }); - throw f2.setError(n3).end(), n3; - }).catch(function(e3) { - return f2.setError(e3).end(true), _2._m.setNotReadyReason(L.LOGIN_FAILED), M.e("".concat(m2, " failed. error:"), e3), _2._lastLoginTs = 0, _2._m.onLoginFailed(), D(e3); - }); - } }, { key: "logout", value: function() { - var t2 = this, e2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0, n2 = "".concat(this._n, ".logout"), o2 = this.isLoggedIn(); - return M.i("".concat(n2, " type:").concat(e2, " isLoggedIn:").concat(o2, " isWebUniapp:").concat(this._isWebUniapp)), o2 ? (new G("logout").setMessage("identifier:".concat(this.getMyUserID())).end(true), 0 === e2 && this._m.setNotReadyReason(L.LOGGED_OUT), this.req({ P: k.LOGOUT, data: { type: e2, isWebUniapp: this._isWebUniapp } }).then(function() { - return t2.resetReady(), T({}); - }).catch(function(e3) { - return M.e("".concat(n2, " error:"), e3), t2.resetReady(), T({}); - })) : D({ code: L.USER_NOT_LOGGED_IN }); - } }, { key: "getLoginUser", value: function() { - return this.isLoggedIn() ? this.getMyUserID() : ""; - } }, { key: "_fetchCloudControlConfig", value: function() { - this.get(23).fetchConfig(); - } }, { key: "_getStatusInstanceID", value: function() { - return uni.getStorageSync("timUniAppInstanceID") || 0; - } }, { key: "_hello", value: function() { - var t2 = this; - this._lastWsHelloTs = Date.now(), this.req({ P: k.HELLO, data: { isWebUniapp: this._isWebUniapp } }).catch(function(e2) { - M.w("".concat(t2._n, "._hello error:"), e2); - }); - } }, { key: "getLastWsHelloTs", value: function() { - return this._lastWsHelloTs; - } }, { key: "_checkLoginInfo", value: function(e2) { - var t2 = 0; - return S(this.get(12).getSDKAppID()) ? t2 = L.NO_SDKAPPID : S(e2.userID) ? t2 = L.NO_IDENTIFIER : S(e2.userSig) && (t2 = L.NO_USERSIG), { code: t2 }; - } }, { key: "_isReactUIKit", value: function() { - return Ce && void 0 !== window.tencent_cloud_im_csig_react_uikit_23F_xa; - } }, { key: "onMultipleAccountKickedOut", value: function(e2) { - var t2 = this; - new G("kickedOut").setMessage("type:".concat(A.KICKED_OUT_MULT_ACCOUNT, " newInstanceInfo:").concat(JSON.stringify(e2))).end(true), M.w("".concat(this._n, ".onMultipleAccountKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e2), this.logout(1).then(function() { - t2.emitOEvt(h.KICKED_OUT, { type: A.KICKED_OUT_MULT_ACCOUNT }), t2._m.setNotReadyReason(L.KICKED_OUT_MULT_ACCOUNT), t2._m.reset(); - }); - } }, { key: "onMultipleDeviceKickedOut", value: function(e2) { - var t2 = this; - new G("kickedOut").setMessage("type:".concat(A.KICKED_OUT_MULT_DEVICE, " newInstanceInfo:").concat(JSON.stringify(e2))).end(true), M.w("".concat(this._n, ".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e2), this.logout(1).then(function() { - t2.emitOEvt(h.KICKED_OUT, { type: A.KICKED_OUT_MULT_DEVICE }), t2._m.setNotReadyReason(L.KICKED_OUT_MULT_DEVICE), t2._m.reset(); - }); - } }, { key: "onUserSigExpired", value: function() { - new G("kickedOut").setMessage(A.KICKED_OUT_USERSIG_EXPIRED).end(true), M.w("".concat(this._n, ".onUserSigExpired userID:").concat(this.getMyUserID())), 0 !== this.get(12).getStatusInstanceID() && (this.emitOEvt(h.KICKED_OUT, { type: A.KICKED_OUT_USERSIG_EXPIRED }), this._m.setNotReadyReason(L.KICKED_OUT_USERSIG_EXPIRED), this._m.reset()); - } }, { key: "onRestApiKickedOut", value: function(e2) { - new G("kickedOut").setMessage("type:".concat(A.KICKED_OUT_REST_API, " newInstanceInfo:").concat(JSON.stringify(e2))).end(true), M.w("".concat(this._n, ".onRestApiKickedOut userID:").concat(this.getMyUserID(), " newInstanceInfo:"), e2), 0 !== this.get(12).getStatusInstanceID() && (this.emitOEvt(h.KICKED_OUT, { type: A.KICKED_OUT_REST_API }), this._m.setNotReadyReason(L.KICKED_OUT_REST_API), this._m.reset(), this.get(21).onRestApiKickedOut()); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this.resetReady(), this._helloInterval = 120, this._lastLoginTs = 0, this._lastWsHelloTs = 0, this._isWebUniapp = 0; - } }]), Gi); - function Gi(e2) { - return d(this, Gi), (e2 = jo.call(this, e2))._n = "SignModule", e2._helloInterval = 120, e2._lastLoginTs = 0, e2._lastWsHelloTs = 0, e2._isWebUniapp = 0, Bo.mixin(i(e2)), e2; - } - function Pi(e2, t2) { - d(this, Pi), this._m = e2, this._isLoggedIn = false, this._SDKAppID = t2.SDKAppID, this._userID = t2.userID || "", this._userSig = t2.userSig || "", this._version = "3.4.7", this._a2Key = "", this._tinyID = "", this._customStatus = "", this._contentType = "json", this._unlimitedAVChatRoom = t2.unlimitedAVChatRoom, this._scene = t2.scene || "", this._oversea = t2.oversea, this._instanceID = t2.instanceID, this._statusInstanceID = 0, this._isDevMode = t2.devMode, this._isTestEnv = t2.testEnv, this._proxyServer = t2.proxyServer, this._fileUploadProxy = t2.fileUploadProxy, this._fileDownloadProxy = t2.fileDownloadProxy, this._applicationID = 0, this._isPartialUpdatedConvs = t2.partialUpdatedConversations, this._isUsingChatCore = false, this._uiPlatform = 0, this._authKey = "", this._customLoginInfo = ""; - } - function Ui(e2) { - return d(this, Ui), (e2 = Jo.call(this, e2))._n = "UserModule", e2._profileHandler = new Ei(i(e2)), e2._blacklistHandler = new Si(i(e2)), e2._userStatusHandler = new ki(i(e2)), e2.getIEmitInst().on(P.A2KEY_AND_TINYID_UPDATED, e2.onContextUpdated, i(e2)), e2; - } - function bi(e2) { - d(this, bi), this._userM = e2, this._n = "UserStatusHandler", this.MAX_QUERY_USER_COUNT = 500, this.MAX_SUBSCRIBE_USER_COUNT = 100, this.MAX_UNSUBSCRIBE_USER_COUNT = 100, this._userM.getIEmitInst().on(P.CLOUD_CONFIG, this._onCloudConfig, this); - } - function wi(e2) { - d(this, wi), this._userM = e2, this._n = "BlacklistHandler", this._blacklistMap = /* @__PURE__ */ new Map(), this.startIndex = 0, this.maxLimited = 100, this.currentSequence = 0; - } - function Fi(e2) { - d(this, Fi), this._userM = e2, this._n = "ProfileHandler", this.TAG = "profile", this.accountProfileMap = /* @__PURE__ */ new Map(), this.expirationTime = 864e5; - } - function qi(e2) { - return d(this, qi), (e2 = zo.call(this, e2))._n = "TopicModule", e2._topicMap = /* @__PURE__ */ new Map(), e2._getTopicTimeMap = /* @__PURE__ */ new Map(), e2.TOPIC_CACHE_TIME = 300, e2.TOPIC_LAST_ACTIVE_TIME = 3600, e2.getIEmitInst().on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function xi(e2, t2) { - d(this, xi), this.topicID = "", this.topicName = "", this.avatar = "", this.introduction = "", this.notification = "", this.unreadCount = 0, this.muteAllMembers = false, this.customData = "", this.groupAtInfoList = [], this.nextMessageSeq = 0, this.lastMessage = Yo(e2.lastMessage, t2), this.selfInfo = { muteTime: 0, readedSequence: 0, messageRemindType: "", excludedUnreadSequenceList: void 0 }, this._initTopic(e2); - } - function Vi(e2) { - return d(this, Vi), (e2 = Xo.call(this, e2))._n = "GroupModule", e2._commonGroupHandler = new li(i(e2)), e2._groupAttributesHandler = new di(i(e2)), e2._groupCountersHandler = new pi(i(e2)), e2._AVChatRoomHandler = new gi(i(e2)), e2._groupTipsHandler = new ui(i(e2)), e2._groupSystemNoticeHandler = new Ii(i(e2)), e2._groupMemberHandler = new mi(i(e2)), e2.groupMap = /* @__PURE__ */ new Map(), e2._unjoinedAVChatRoomList = /* @__PURE__ */ new Map(), e2._receiptDetailCompleteMap = /* @__PURE__ */ new Map(), e2._onlineMemberCountMap = /* @__PURE__ */ new Map(), e2._timeoutIDs = [], e2.getIEmitInst().on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function Hi(e2) { - d(this, Hi), this._grpM = e2, this._n = "GroupSystemNoticeHandler", this.pendencyMap = /* @__PURE__ */ new Map(); - } - function Bi(e2) { - d(this, Bi), this._grpM = e2, this._n = "GroupMemberHandler", this.groupMemberListMap = /* @__PURE__ */ new Map(), this.DEFAULT_MEMBER_INFO_FILTER = ["Role", "JoinTime", "NameCard", "ShutUpUntil", "OnlineStatus"], this._grpM.getIEmitInst().on(P.PROFILE_UPDATED, this._onProfileUpdated, this); - } - function Ki(e2) { - d(this, Ki), this.userID = "", this.avatar = "", this.nick = "", this.role = "", this.joinTime = "", this.lastSendMsgTime = "", this.nameCard = "", this.muteUntil = 0, this.memberCustomField = [], this.isOnline = false, this.updateMember(e2); - } - function Yi(e2) { - d(this, Yi), this._grpM = e2, this._n = "AVChatRoomHandler", this._joinedGroupMap = /* @__PURE__ */ new Map(), this._pollingRequestInfoMap = /* @__PURE__ */ new Map(), this._pollingInstanceMap = /* @__PURE__ */ new Map(), this._seqSll = new ti(200), this._IDSll = new ti(100), this._reportMessageStackedCount = 0, this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this.DEFAULT_EXPIRE_TIME = 60, this.DEFAULT_POLLING_INTERVAL = 300, this.MAX_POLLING_INTERVAL = 2e3, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0, this._startBroadcastSeq = 1, this._broadcastMessageIDMap = /* @__PURE__ */ new Map(), this.DEFAULT_POLLING_SIMPLIFIED_MSG = 0; - } - function Wi(e2) { - d(this, Wi); - var t2 = e2.manager, n2 = e2.groupID, o2 = e2.onInit, i2 = e2.onSuccess, e2 = e2.onFail; - this._n = "Polling", this._manager = t2, this._grpM = t2._grpM, this._onInit = o2, this._onSuccess = i2, this._onFail = e2, this._groupID = n2, this._timeoutID = -1, this._isRunning = false, this._proto = k.AV_POLLING; - } - function ji(e2) { - d(this, ji), this._grpM = e2, this._n = "GroupCountersHandler", this._groupCountersMap = /* @__PURE__ */ new Map(), this.EXPIRE_TIME = 3e4, this._grpM.getIEmitInst().on(P.CLOUD_CONFIG, this._onCloudConfig, this); - } - function Ji(e2) { - d(this, Ji), this._grpM = e2, this._n = "GroupAttributesHandler", this._groupAttributesMap = /* @__PURE__ */ new Map(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4, this._grpM.getIEmitInst().on(P.CLOUD_CONFIG, this._onCloudConfig, this); - } - function zi(e2) { - d(this, zi), this._grpM = e2, this._n = "CommonGroupHandler", this.tempConversationList = null, this._cachedGroupMessageMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this.PAGING_GRP_COUNT_LIMIT = 200, this._pagingStatus = Nn, this._pagingGetCostList = [], e2.getIEmitInst().on(P.A2KEY_AND_TINYID_UPDATED, this.syncGroupList, this); - } - function Xi(e2) { - d(this, Xi), this._grpM = e2, this._n = "GroupTipsHandler", this._cachedGroupTipsMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4; - } - function Zi(e2) { - return d(this, Zi), (e2 = Zo.call(this, e2))._n = "ConvModule", Bo.mixin(i(e2)), e2._msgListHandler = new xo(i(e2)), e2._msgRemindHandler = new si(i(e2)), e2._convGroupHandler = new ri(i(e2)), e2._sll = new ti(100), e2._pagingStatus = Nn, e2._pagingTs = 0, e2._pagingStartIdx = 0, e2._pagingPinnedTs = 0, e2._pagingPinnedStartIdx = 0, e2._pagingConvIDMap = /* @__PURE__ */ new Map(), e2._convIDFromUnreadDBMap = /* @__PURE__ */ new Map(), e2._convMap = /* @__PURE__ */ new Map(), e2._tmpGroupList = [], e2._tmpGroupAtTipsList = [], e2._peerReadTimeMap = /* @__PURE__ */ new Map(), e2._completedMap = /* @__PURE__ */ new Map(), e2._roamingMsgKeyAndTimeMap = /* @__PURE__ */ new Map(), e2._remoteGroupReadSeqMap = /* @__PURE__ */ new Map(), e2._convTotalUnreadCount = 0, e2._pagingGetCostList = [], e2._convMapForDiff = /* @__PURE__ */ new Map(), e2._partialUpdatedConvMap = /* @__PURE__ */ new Map(), e2._everClearedMap = /* @__PURE__ */ new Map(), e2._bPullOnInvite = true, e2._initListeners(), e2; - } - function Qi(e2) { - d(this, Qi), this._convM = e2, this._n = "ConvGroupHandler", this._convGroupMap = /* @__PURE__ */ new Map(), this._startIndex = 0, this._pagingStatus = Nn; - } - function $i(e2) { - d(this, $i), this._convM = e2, this._n = "MsgRemindHandler"; - } - function ea(e2, t2) { - var n2 = 2 < arguments.length && void 0 !== arguments[2] && arguments[2]; - d(this, ea), this.conversationID = e2.conversationID || "", this.unreadCount = e2.unreadCount || 0, this.type = e2.type || "", this.lastMessage = Ko(e2.lastMessage, t2, n2), e2.lastMsgTime && (this.lastMessage.lastTime = e2.lastMsgTime), this._isInfoCompleted = false, this.peerReadTime = e2.peerReadTime || 0, this.groupAtInfoList = [], this.remark = "", this.isPinned = e2.isPinned || false, this.messageRemindType = e2.messageRemindType, this.markList = e2.markList || [], this.customData = e2.customData || "", this.conversationGroupList = e2.conversationGroupList || [], this.draftText = e2.draftText || "", this._initProfile(e2), this.subType = this.groupProfile ? this.groupProfile.type : ""; - } - function ta(e2) { - d(this, ta), this.groupID = "", this.name = "", this.avatar = "", this.type = "", this.introduction = "", this.notification = "", this.ownerID = "", this.createTime = "", this.infoSequence = "", this.lastInfoTime = "", this.selfInfo = { messageRemindType: "", joinTime: "", nameCard: "", role: "", userID: "", memberCustomField: void 0, readedSequence: 0, excludedUnreadSequenceList: void 0 }, this.lastMessage = { lastTime: "", lastSequence: "", fromAccount: "", messageForShow: "" }, this.nextMessageSeq = "", this.memberNum = "", this.memberCount = "", this.maxMemberNum = "", this.maxMemberCount = "", this.joinOption = "", this.inviteOption = "", this.groupCustomField = [], this.muteAllMembers = false, this.isSupportTopic = false, this._lastRevokedTime = 0, this._initGroup(e2); - } - function na(e2) { - d(this, na), this.MAX_LENGTH = e2, this.map = /* @__PURE__ */ new Map(); - } - function oa(e2) { - var t2 = this; - d(this, oa), S(e2) || (this.userID = e2.userID || "", this.nick = e2.nick || "", this.gender = e2.gender || "", this.birthday = e2.birthday || 0, this.location = e2.location || "", this.selfSignature = e2.selfSignature || "", this.allowType = e2.allowType || A.ALLOW_TYPE_ALLOW_ANY, this.language = e2.language || 0, this.avatar = e2.avatar || "", this.messageSettings = e2.messageSettings || 0, this.adminForbidType = e2.adminForbidType || A.FORBID_TYPE_NONE, this.level = e2.level || 0, this.role = e2.role || 0, this.lastUpdatedTime = 0, this.profileCustomField = [], S(e2.profileCustomField)) || e2.profileCustomField.forEach(function(e3) { - t2.profileCustomField.push({ key: e3.key, value: e3.value }); - }); - } - function ia() { - return null; - } - function aa(e2) { - var t2 = e2.get(12); - return { SDKType: 10, SDKAppID: t2.getSDKAppID(), SDKVersion: t2.getVersion(), tinyID: Number(t2.getTinyID()), userID: t2.getUserID(), platform: e2.getPlatform(), instanceID: t2.getInstanceID(), traceID: We() }; - } - e(fa, [{ key: "_errorTolerantHandle", value: function() { - v || "undefined" != typeof window && this._canIUseCookies() || (this.getItem = ia, this.setItem = ia, this.removeItem = ia, this.clear = ia); - } }, { key: "onCheckTimer", value: function(e2) { - e2 % 20 == 0 && 0 !== this._storageQueue.size && this._doFlush(); - } }, { key: "_doFlush", value: function() { - try { - var e2, t2 = Z(this._storageQueue); - try { - for (t2.s(); !(e2 = t2.n()).done; ) { - var n2 = Y(e2.value, 2), o2 = n2[0], i2 = n2[1]; - this._setStorageSync(this._getKey(o2), i2); - } - } catch (e3) { - t2.e(e3); - } finally { - t2.f(); - } - this._storageQueue.clear(); - } catch (e3) { - M.w("".concat(this._n, "._doFlush error:"), e3); - } - } }, { key: "_getPrefix", value: function() { - var e2 = this._m.get(12); - return "TIM_".concat(e2.getSDKAppID(), "_").concat(e2.getUserID(), "_"); - } }, { key: "_getKey", value: function(e2) { - return "".concat(this._getPrefix()).concat(e2); - } }, { key: "getItem", value: function(e2) { - var t2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1]; - try { - var n2 = t2 ? this._getKey(e2) : e2; - return this.getStorageSync(n2); - } catch (e3) { - return M.w("".concat(this._n, ".getItem error:"), e3), {}; - } - } }, { key: "setItem", value: function(e2, t2) { - var n2; - 2 < arguments.length && void 0 !== arguments[2] && arguments[2] ? (n2 = !(3 < arguments.length && void 0 !== arguments[3]) || arguments[3] ? this._getKey(e2) : e2, this._setStorageSync(n2, t2)) : this._storageQueue.set(e2, t2); - } }, { key: "clear", value: function() { - try { - v ? I.clearStorageSync() : this._canIUseCookies() && localStorage.clear(); - } catch (e2) { - M.w("".concat(this._n, ".clear error:"), e2); - } - } }, { key: "removeItem", value: function(e2) { - var t2 = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1]; - try { - var n2 = t2 ? this._getKey(e2) : e2; - this._removeStorageSync(n2); - } catch (e3) { - M.w("".concat(this._n, ".removeItem error:"), e3); - } - } }, { key: "getSize", value: function(e2) { - var t2 = this, n2 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "b"; - try { - var o2 = { size: 0, limitSize: 5242880, unit: n2 }; - if (Object.defineProperty(o2, "leftSize", { enumerable: true, get: function() { - return o2.limitSize - o2.size; - } }), v && (o2.limitSize = 1024 * I.getStorageInfoSync().limitSize), e2) - o2.size = JSON.stringify(this.getItem(e2)).length + this._getKey(e2).length; - else if (v) - I.getStorageInfoSync().keys.forEach(function(e3) { - o2.size += JSON.stringify(t2.getStorageSync(e3)).length + t2._getKey(e3).length; - }); - else if (this._canIUseCookies()) - for (var i2 in localStorage) - localStorage.hasOwnProperty(i2) && (o2.size += localStorage.getItem(i2).length + i2.length); - return this._convertUnit(o2); - } catch (e3) { - M.w("".concat(this._n, " error:"), e3); - } - } }, { key: "_convertUnit", value: function(e2) { - var t2, n2 = {}, o2 = e2.unit; - for (t2 in n2.unit = o2, e2) - "number" == typeof e2[t2] && ("kb" === o2.toLowerCase() ? n2[t2] = Math.round(e2[t2] / 1024) : "mb" === o2.toLowerCase() ? n2[t2] = Math.round(e2[t2] / 1024 / 1024) : n2[t2] = e2[t2]); - return n2; - } }, { key: "_setStorageSync", value: function(e2, t2) { - v ? ve ? my.setStorageSync({ key: e2, data: t2 }) : I.setStorageSync(e2, t2) : this._canIUseCookies() && localStorage.setItem(e2, JSON.stringify(t2)); - } }, { key: "getStorageSync", value: function(e2) { - return v ? ve ? my.getStorageSync({ key: e2 }).data : I.getStorageSync(e2) : this._canIUseCookies() ? JSON.parse(localStorage.getItem(e2)) : {}; - } }, { key: "_removeStorageSync", value: function(e2) { - v ? ve ? my.removeStorageSync({ key: e2 }) : I.removeStorageSync(e2) : this._canIUseCookies() && localStorage.removeItem(e2); - } }, { key: "_canIUseCookies", value: function() { - return "undefined" != typeof window && navigator && navigator.cookieEnabled && localStorage; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._doFlush(); - } }]); - var sa, ra = fa, ca = (e(ga, [{ key: "pushIn", value: function(e2) { - M.d("".concat(this._n, ".pushIn"), this._report.length, e2), this._report.push(e2); - } }, { key: "backfill", value: function(e2) { - var t2; - O(e2) && 0 !== e2.length && (M.d("".concat(this._n, ".backfill"), this._report.length, e2.length), (t2 = this._report).unshift.apply(t2, p(e2))); - } }, { key: "getLogsNumInMemory", value: function() { - return this._report.length; - } }, { key: "isEmpty", value: function() { - return 0 === this._report.length; - } }, { key: "_reset", value: function() { - this._report.length = 0, this._report = []; - } }, { key: "getLogsInMemory", value: function() { - var e2 = this._report.slice(); - return this._reset(), e2; - } }]), ga), ua = (t(ha, u), sa = n(ha), e(ha, [{ key: "reportAtOnce", value: function() { - this._report(); - } }, { key: "_onLoginSuccess", value: function() { - var t2 = this, e2 = this.get(13), n2 = e2.getItem(this.TAG, false); - !S(n2) && lt(n2.forEach) && (M.l("".concat(this._n, "._onLoginSuccess. logs count:").concat(n2.length)), n2.forEach(function(e3) { - t2._reportBody.pushIn(e3); - }), e2.removeItem(this.TAG, false)); - } }, { key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("evt_rpt_threshold"), t2 = this.getCloudConfig("evt_rpt_waiting"), n2 = this.getCloudConfig("evt_rpt_level"), o2 = this.getCloudConfig("evt_rpt_sdkappid_bl"), i2 = this.getCloudConfig("evt_rpt_tinyid_wl"); - N(e2) || (this.MIN_THRESHOLD = Number(e2)), N(t2) || (this.WAITING_TIME = Number(t2)), N(n2) || (this.REPORT_LEVEL = n2.split(",").map(function(e3) { - return Number(e3); - })), N(o2) || (this.REPORT_SDKAPPID_BLACKLIST = o2.split(",").map(function(e3) { - return Number(e3); - })), N(i2) || (this.REPORT_TINYID_WHITELIST = i2.split(",")); - } }, { key: "pushIn", value: function(e2) { - e2 instanceof G && (e2.updateTimeStamp(), this._reportBody.pushIn(e2), this._reportBody.getLogsNumInMemory() >= this.MIN_THRESHOLD) && this._report(); - } }, { key: "onCheckTimer", value: function() { - Date.now() < this._lastReportTime + this.WAITING_TIME || this._reportBody.isEmpty() || this._report(); - } }, { key: "_filterLogs", value: function(e2) { - var t2 = this, n2 = this.get(12), o2 = n2.getSDKAppID(), n2 = n2.getTinyID(); - return Wt(this.REPORT_SDKAPPID_BLACKLIST, o2) && !jt(this.REPORT_TINYID_WHITELIST, n2) ? [] : e2.filter(function(e3) { - return t2.REPORT_LEVEL.includes(e3.level); - }); - } }, { key: "_report", value: function() { - var t2, e2, n2 = this; - this._reportBody.isEmpty() || (t2 = this._reportBody.getLogsInMemory(), 0 !== (e2 = this._filterLogs(t2)).length ? (e2 = { header: aa(this), event: e2 }, this.req({ P: k.SSO_STAT, data: y({}, e2) }).then(function() { - n2._lastReportTime = Date.now(); - }).catch(function(e3) { - M.w("".concat(n2._n, "._report failed. error:"), e3), n2._lastReportTime = Date.now(), n2._reportBody.backfill(t2), n2._reportBody.getLogsNumInMemory() > n2.MAX_THRESHOLD && n2._flushAtOnce(); - })) : this._lastReportTime = Date.now()); - } }, { key: "_flushAtOnce", value: function() { - var e2 = this.get(13), t2 = e2.getItem(this.TAG, false), n2 = this._reportBody.getLogsInMemory(), o2 = "".concat(this._n, "._flushAtOnce"); - S(t2) ? (M.l("".concat(o2, " count:").concat(n2.length)), e2.setItem(this.TAG, n2, true, false)) : ((n2 = n2.concat(t2)).length > this.MAX_THRESHOLD && (n2 = n2.slice(0, this.MAX_THRESHOLD)), M.l("".concat(o2, " count:").concat(n2.length)), e2.setItem(this.TAG, n2, true, false)); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._lastReportTime = 0, this._report(), this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = []; - } }]), ha), la = "none", da = "online", pa = (e(_a, [{ key: "_startRN", value: function() { - var e2, n2 = this; - ye && (e2 = this._m.get(18).getPlugin("chat-network-monitor")) && (this._removeListener = e2.addEventListener(function(e3) { - var t2 = e3.isConnected, e3 = e3.type; - n2._networkType !== e3 && n2._onNetworkStatusChange({ isConnected: void 0 !== t2 && t2, networkType: e3 }); - })); - } }, { key: "start", value: function() { - var t2 = this, n2 = "".concat(this._n, ".start"); - v ? (I.getNetworkType({ success: function(e2) { - t2._networkType = e2.networkType || e2.subtype || "", e2.networkType === la ? M.w("".concat(n2, " no network, please check!")) : M.i("".concat(n2, " networkType:").concat(e2.networkType)); - } }), this._mpNetworkStatusCallback = this._onNetworkStatusChange.bind(this), I.onNetworkStatusChange(this._mpNetworkStatusCallback)) : Ce && (this._networkType = da, this._webOnlineCallback = this._onWebOnline.bind(this), this._webOfflineCallback = this._onWebOffline.bind(this), window.addEventListener("online", this._webOnlineCallback), window.addEventListener("offline", this._webOfflineCallback)); - } }, { key: "_onWebOnline", value: function() { - this._onNetworkStatusChange({ isConnected: true, networkType: da }); - } }, { key: "_onWebOffline", value: function() { - this._onNetworkStatusChange({ isConnected: false, networkType: la }); - } }, { key: "_onNetworkStatusChange", value: function(e2) { - var t2 = e2.isConnected, e2 = e2.networkType, n2 = "".concat(this._n, "._onNetworkStatusChange"), o2 = false, i2 = "previous:".concat(this._networkType, " current:").concat(e2); - t2 ? (M.i("".concat(n2, " ").concat(i2)), this._networkType !== e2 && (o2 = true, this._networkType = e2, this._m.get(21).reConnect(true))) : this._networkType !== e2 && (o2 = true, this._networkType = e2, M.w("".concat(n2, " no network, please check!")), this._m.get(21).offline()), o2 && new G("networkChange").setMessage("isConnected:".concat(t2, " ").concat(i2)).end(); - } }, { key: "isOnline", value: function() { - return this._networkType !== la; - } }, { key: "getNetworkType", value: function() { - return this._networkType; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), v ? null !== this._mpNetworkStatusCallback && (I.offNetworkStatusChange && I.offNetworkStatusChange(this._mpNetworkStatusCallback), this._mpNetworkStatusCallback = null) : Ce ? (null !== this._webOnlineCallback && (window.removeEventListener("online", this._webOnlineCallback), this._webOnlineCallback = null), null !== this._onWebOffline && (window.removeEventListener("offline", this._webOfflineCallback), this._webOfflineCallback = null)) : ye && this._removeListener && (this._removeListener(), this._removeListener = null); - } }]), _a); - function _a(e2) { - d(this, _a), this._m = e2, this._networkType = da, this._n = "NetMonitorModule", this._mpNetworkStatusCallback = null, this._webOnlineCallback = null, this._webOfflineCallback = null, this._removeListener = null, this._m.getIEmitInst().on(P.A2KEY_AND_TINYID_UPDATED, this._startRN, this); - } - function ha(e2) { - d(this, ha), (e2 = sa.call(this, e2))._n = "EventStatModule", e2.TAG = "im-ssolog-event", e2._reportBody = new ca(), e2.MIN_THRESHOLD = 20, e2.MAX_THRESHOLD = 100, e2.WAITING_TIME = 6e4, e2.REPORT_LEVEL = [4, 5, 6], e2.REPORT_SDKAPPID_BLACKLIST = [], e2.REPORT_TINYID_WHITELIST = [], e2._lastReportTime = Date.now(); - var t2 = e2.getIEmitInst(); - return t2.on(P.A2KEY_AND_TINYID_UPDATED, e2._onLoginSuccess, i(e2)), t2.on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function ga(e2) { - d(this, ga), this._n = "SSOLogBody", this._report = []; - } - function fa(e2) { - d(this, fa), this._m = e2, this._n = "StorageModule", this._storageQueue = /* @__PURE__ */ new Map(), this._errorTolerantHandle(); - } - function ma(e2, t2) { - return e2(t2 = { exports: {} }, t2.exports), t2.exports; - } - var va, Ia = ma(function(e2) { - var o2 = Object.prototype.hasOwnProperty, _2 = "~"; - function n2() { - } - function a2(e3, t3, n3) { - this.fn = e3, this.context = t3, this.once = n3 || false; - } - function i2(e3, t3, n3, o3, i3) { - if ("function" != typeof n3) - throw new TypeError("The listener must be a function"); - n3 = new a2(n3, o3 || e3, i3), o3 = _2 ? _2 + t3 : t3; - return e3._events[o3] ? e3._events[o3].fn ? e3._events[o3] = [e3._events[o3], n3] : e3._events[o3].push(n3) : (e3._events[o3] = n3, e3._eventsCount++), e3; - } - function c2(e3, t3) { - 0 == --e3._eventsCount ? e3._events = new n2() : delete e3._events[t3]; - } - function t2() { - this._events = new n2(), this._eventsCount = 0; - } - Object.create && (n2.prototype = /* @__PURE__ */ Object.create(null), new n2().__proto__ || (_2 = false)), t2.prototype.eventNames = function() { - var e3, t3, n3 = []; - if (0 === this._eventsCount) - return n3; - for (t3 in e3 = this._events) - o2.call(e3, t3) && n3.push(_2 ? t3.slice(1) : t3); - return Object.getOwnPropertySymbols ? n3.concat(Object.getOwnPropertySymbols(e3)) : n3; - }, t2.prototype.listeners = function(e3) { - var e3 = _2 ? _2 + e3 : e3, t3 = this._events[e3]; - if (!t3) - return []; - if (t3.fn) - return [t3.fn]; - for (var n3 = 0, o3 = t3.length, i3 = new Array(o3); n3 < o3; n3++) - i3[n3] = t3[n3].fn; - return i3; - }, t2.prototype.listenerCount = function(e3) { - e3 = _2 ? _2 + e3 : e3, e3 = this._events[e3]; - return e3 ? e3.fn ? 1 : e3.length : 0; - }, t2.prototype.emit = function(e3, t3, n3, o3, i3, a3) { - var s2 = _2 ? _2 + e3 : e3; - if (!this._events[s2]) - return false; - var r2, c3 = this._events[s2], u2 = arguments.length; - if (c3.fn) { - switch (c3.once && this.removeListener(e3, c3.fn, void 0, true), u2) { - case 1: - return c3.fn.call(c3.context), true; - case 2: - return c3.fn.call(c3.context, t3), true; - case 3: - return c3.fn.call(c3.context, t3, n3), true; - case 4: - return c3.fn.call(c3.context, t3, n3, o3), true; - case 5: - return c3.fn.call(c3.context, t3, n3, o3, i3), true; - case 6: - return c3.fn.call(c3.context, t3, n3, o3, i3, a3), true; - } - for (p2 = 1, r2 = new Array(u2 - 1); p2 < u2; p2++) - r2[p2 - 1] = arguments[p2]; - c3.fn.apply(c3.context, r2); - } else - for (var l2, d2 = c3.length, p2 = 0; p2 < d2; p2++) - switch (c3[p2].once && this.removeListener(e3, c3[p2].fn, void 0, true), u2) { - case 1: - c3[p2].fn.call(c3[p2].context); - break; - case 2: - c3[p2].fn.call(c3[p2].context, t3); - break; - case 3: - c3[p2].fn.call(c3[p2].context, t3, n3); - break; - case 4: - c3[p2].fn.call(c3[p2].context, t3, n3, o3); - break; - default: - if (!r2) - for (l2 = 1, r2 = new Array(u2 - 1); l2 < u2; l2++) - r2[l2 - 1] = arguments[l2]; - c3[p2].fn.apply(c3[p2].context, r2); - } - return true; - }, t2.prototype.on = function(e3, t3, n3) { - return i2(this, e3, t3, n3, false); - }, t2.prototype.once = function(e3, t3, n3) { - return i2(this, e3, t3, n3, true); - }, t2.prototype.removeListener = function(e3, t3, n3, o3) { - e3 = _2 ? _2 + e3 : e3; - if (this._events[e3]) - if (t3) { - var i3 = this._events[e3]; - if (i3.fn) - i3.fn !== t3 || o3 && !i3.once || n3 && i3.context !== n3 || c2(this, e3); - else { - for (var a3 = 0, s2 = [], r2 = i3.length; a3 < r2; a3++) - (i3[a3].fn !== t3 || o3 && !i3[a3].once || n3 && i3[a3].context !== n3) && s2.push(i3[a3]); - s2.length ? this._events[e3] = 1 === s2.length ? s2[0] : s2 : c2(this, e3); - } - } else - c2(this, e3); - return this; - }, t2.prototype.removeAllListeners = function(e3) { - return e3 ? (e3 = _2 ? _2 + e3 : e3, this._events[e3] && c2(this, e3)) : (this._events = new n2(), this._eventsCount = 0), this; - }, t2.prototype.off = t2.prototype.removeListener, t2.prototype.addListener = t2.prototype.on, t2.prefixed = _2, e2.exports = t2.EventEmitter = t2; - }), Ma = ["rich.my-imcloud.com", "imrich.qcloud.com"], ya = ["requestSnapshotUrl"], Ca = (t(ka, u), va = n(ka), e(ka, [{ key: "_init", value: function() { - this._fileDownloadProxy = this.getFileDownloadProxy(), this._authKey = this.getDowloadFileAuthKey(); - var e2 = this.get(18); - this.TIMUploadPlugin = e2.getPlugin("tim-upload-plugin"), this.TIMUploadPlugin ? this._initUploaderMethod() : (this.COSSDK = e2.getPlugin(e2 = v ? "cos-wx-sdk" : "cos-js-sdk"), this.COSSDK ? (this._getAuthorizationKey(), this.warn("CosReplacement", e2)) : this.warn("PluginUndetected")); - } }, { key: "_onCloudConfig", value: function() { - var t2 = this, e2 = "".concat(this._n, "._onCloudConfig"), n2 = this.getCloudConfig("upload_size_limit"), o2 = this.getCloudConfig("simple_cos"), i2 = this.getCloudConfig("file_dn_list"); - if (M.l("".concat(e2, " uploadSizeLimit:").concat(n2, " simpleCos:").concat(o2)), !N(n2)) - try { - var a2 = JSON.parse(n2); - this.UPLOAD_SIZE_LIMIT = { A: a2.a ? 1048576 * parseInt(a2.a) : this.UPLOAD_SIZE_LIMIT.A, F: a2.f ? 1048576 * parseInt(a2.f) : this.UPLOAD_SIZE_LIMIT.F, I: a2.i ? 1048576 * parseInt(a2.i) : this.UPLOAD_SIZE_LIMIT.I, V: a2.v ? 1048576 * parseInt(a2.v) : this.UPLOAD_SIZE_LIMIT.V }; - } catch (e3) { - } - if (N(o2) || (this.isSimpleCos = "1" === o2), !N(i2)) - try { - JSON.parse(i2).forEach(function(e3) { - t2._fileDNList.includes(e3) || t2._fileDNList.push(e3); - }); - } catch (e3) { - } - } }, { key: "_getAuthorizationKey", value: function() { - var n2 = this, o2 = "".concat(this._n, ".").concat("_getAuthorizationKey"), i2 = new G("_getAuthorizationKey"), a2 = Math.ceil(Date.now() / 1e3); - this.req({ P: k.COS_SIGN, data: { duration: this.expiredTimeLimit } }).then(function(e2) { - var e2 = e2.data, t2 = (M.l("".concat(o2, " ok. data:"), e2), e2.expiredTime - a2); - i2.setMessage("requestId:".concat(e2.requestId, " requestTime:").concat(a2, " expiredTime:").concat(e2.expiredTime, " diff:").concat(t2, "s")).end(), !v && e2.region && (n2.region = e2.region), n2.appid = e2.appid, n2.bucketName = e2.bucketName, n2.ciUrl = e2.ciUrl, n2.directory = e2.directory, n2.downloadUrl = e2.downloadUrl, n2.uploadUrl = e2.uploadUrl, n2.cosOptions = { secretId: e2.secretId, secretKey: e2.secretKey, sessionToken: e2.sessionToken, expiredTime: e2.expiredTime }, M.l("".concat(o2, " ok. region:").concat(n2.region, " bucketName:").concat(n2.bucketName)), n2._initUploaderMethod(); - }).catch(function(e2) { - i2.setError(e2).end(), M.w("".concat(o2, " failed. error:"), e2); - }); - } }, { key: "_getCosPreSigUrl", value: function(t2) { - var i2 = this, a2 = "".concat(this._n, ".").concat("_getCosPreSigUrl"), s2 = Math.ceil(Date.now() / 1e3), r2 = new G("_getCosPreSigUrl"), e2 = { uploadMethod: t2.uploadMethod, platform: this.getPlatform(), SDKAppID: this.getSDKAppID(), userID: t2.userID, conversationType: t2.conversationType, uploadConfig: [{ fileID: 1, fileType: t2.fileType, fileName: t2.fileName }] }, n2 = k.SIMPLE_COS_PRE_SIG; - return this.isSimpleCos || (e2 = { fileType: t2.fileType, fileName: t2.fileName, uploadMethod: t2.uploadMethod, duration: t2.duration }, n2 = k.COS_PRE_SIG), this.req({ P: n2, data: e2 }).then(function(e3) { - i2.tryCount = 0; - var t3, n3, e3 = e3.data || {}, o2 = (M.l("".concat(a2, " ok. isSimpleCos:").concat(i2.isSimpleCos, " data:"), e3), ""); - return o2 = i2.isSimpleCos ? (t3 = (n3 = e3.preSig[0]).uploadUrl, n3 = n3.fileKey, "uploadIP:".concat(e3.uploadIP, " uploadUrl:").concat(t3, " fileKey:").concat(n3, " cost:").concat(nn(s2))) : "requestId:".concat(e3.requestId, " expiredTime:").concat(e3.expiredTime, " diff:").concat(e3.expiredTime - s2, "s"), r2.setMessage(o2).end(), e3; - }).catch(function(e3) { - return -1 === e3.code && (e3.code = L.COS_GET_SIG_FAIL), r2.setError(e3).end(), M.w("".concat(a2, " failed. error:"), e3), i2.tryCount < 1 ? (i2.tryCount++, i2._getCosPreSigUrl(t2)) : (i2.tryCount = 0, D({ code: L.COS_GET_SIG_FAIL })); - }); - } }, { key: "_initUploaderMethod", value: function() { - var n2 = this; - this.TIMUploadPlugin ? (this.timUploadPlugin = new this.TIMUploadPlugin(), this._cosUploadMethod = function(e2, t2) { - n2.timUploadPlugin.uploadFile(e2, t2); - }) : this.appid && (this.cos = v ? new this.COSSDK({ ForcePathStyle: true, getAuthorization: this._getAuthorization.bind(this) }) : new this.COSSDK({ getAuthorization: this._getAuthorization.bind(this) }), this._cosUploadMethod = v ? function(e2, t2) { - n2.cos.postObject(e2, t2); - } : function(e2, t2) { - n2.cos.uploadFiles(e2, t2); - }); - } }, { key: "onCheckTimer", value: function(e2) { - !this.COSSDK || this.TIMUploadPlugin || this.isLoggedIn() && e2 % 60 == 0 && Math.ceil(Date.now() / 1e3) >= this.cosOptions.expiredTime - 120 && this._getAuthorizationKey(); - } }, { key: "getFileDNList", value: function() { - return this._fileDNList; - } }, { key: "_getAuthorization", value: function(e2, t2) { - t2({ TmpSecretId: this.cosOptions.secretId, TmpSecretKey: this.cosOptions.secretKey, XCosSecurityToken: this.cosOptions.sessionToken, ExpiredTime: this.cosOptions.expiredTime }); - } }, { key: "upload", value: function(e2) { - if (true === e2._relayFlag) - return Promise.resolve(); - var t2 = this.get(26); - switch (e2.type) { - case A.MSG_IMAGE: - return t2.addTotalCount(Wn), this._uploadImage(e2); - case A.MSG_FILE: - return t2.addTotalCount(Wn), this._uploadFile(e2); - case A.MSG_AUDIO: - return t2.addTotalCount(Wn), this._uploadAudio(e2); - case A.MSG_VIDEO: - return t2.addTotalCount(Wn), this._uploadVideo(e2); - default: - return Promise.resolve(); - } - } }, { key: "_uploadImage", value: function(v2) { - var I2 = this, e2 = this.get(2), M2 = v2.getElements()[0], t2 = e2.getMessageOption(v2.clientSequence); - return this.doUploadImage({ file: t2.payload.file, to: t2.to, message: v2, onProgress: function(e3) { - if (M2.updatePercent(e3), lt(t2.onProgress)) - try { - t2.onProgress(e3); - } catch (e4) { - return D({ code: L.MSG_ONPROGRESS_ERR }); - } - } }).then(function(e3) { - var t3 = e3.location, n2 = e3.fileType, o2 = e3.fileSize, i2 = e3.width, a2 = e3.height, s2 = e3.smallImageUrl, r2 = e3.smallImageWidth, c2 = e3.smallImageHeight, u2 = e3.largeImageUrl, l2 = e3.largeImageWidth, d2 = e3.largeImageHeight, p2 = e3.imageInfoArray, e3 = I2.isPrivateNetWork() ? t3 : It(t3); - M2.updateImageFormat(n2); - var _2, h2, g2 = { size: o2, url: e3, width: i2, height: a2 }; - if (p2 && 0 < p2.length) - for (var f2 = 0; f2 < p2.length; f2++) { - var m2 = p2[f2]; - 1 === m2.type ? _2 = m2 : 2 === m2.type ? h2 = m2 : g2 = y(y({}, g2), m2); - } - else - h2 = s2 && u2 ? (_2 = { url: s2, width: r2, height: c2 }, { url: u2, width: l2, height: d2 }) : (_2 = Ht({ originUrl: e3, originWidth: i2, originHeight: a2, min: 198 }), Ht({ originUrl: e3, originWidth: i2, originHeight: a2, min: 720 })); - return M2.updateImageInfoArray([y({}, g2), y({}, h2), y({}, _2)]), v2; - }); - } }, { key: "_uploadFile", value: function(n2) { - var o2 = this, e2 = this.get(2), i2 = n2.getElements()[0], t2 = e2.getMessageOption(n2.clientSequence); - return this.doUploadFile({ file: t2.payload.file, to: t2.to, message: n2, onProgress: function(e3) { - if (i2.updatePercent(e3), lt(t2.onProgress)) - try { - t2.onProgress(e3); - } catch (e4) { - return D({ code: L.MSG_ONPROGRESS_ERR }); - } - } }).then(function(e3) { - var e3 = e3.location, t3 = e3; - return o2.isPrivateNetWork() || (t3 = ao(t3 = It(e3), o2._fileDownloadProxy, o2._authKey, o2._fileDNList)), i2.updateFileUrl(t3), n2; - }); - } }, { key: "_uploadAudio", value: function(t2) { - var n2 = this, e2 = this.get(2), o2 = t2.getElements()[0], i2 = e2.getMessageOption(t2.clientSequence); - return this.doUploadAudio({ file: i2.payload.file, to: i2.to, message: t2, onProgress: function(e3) { - if (o2.updatePercent(e3), lt(i2.onProgress)) - try { - i2.onProgress(e3); - } catch (e4) { - return D({ code: L.MSG_ONPROGRESS_ERR }); - } - } }).then(function(e3) { - e3 = e3.location, e3 = n2.isPrivateNetWork() ? e3 : It(e3); - return o2.updateAudioUrl(e3), t2; - }); - } }, { key: "_uploadVideo", value: function(n2) { - var o2 = this, e2 = this.get(2), i2 = n2.getElements()[0], t2 = e2.getMessageOption(n2.clientSequence); - return this.doUploadVideo({ file: t2.payload.file, to: t2.to, message: n2, onProgress: function(e3) { - if (i2.updatePercent(e3), lt(t2.onProgress)) - try { - t2.onProgress(e3); - } catch (e4) { - return D({ code: L.MSG_ONPROGRESS_ERR }); - } - } }).then(function(e3) { - var t3 = e3.location, e3 = e3.snapshotInfo, t3 = o2.isPrivateNetWork() ? t3 : It(t3); - return i2.updateVideoUrl(t3), S(e3) || i2.updateSnapshotInfo(e3), n2; - }); - } }, { key: "_checkSizeError", value: function(e2) { - var t2 = ""; - return "A" === e2 ? t2 = "audio" : "I" === e2 ? t2 = "image" : "V" === e2 ? t2 = "video" : "F" === e2 && (t2 = "file"), D({ code: L["MSG_".concat(e2, "_SIZE_LIMIT")], message: this.getErrMsg("UploadSizeLimit", t2, "".concat(this.UPLOAD_SIZE_LIMIT[e2] / 1048576, "MB")) }); - } }, { key: "doUploadImage", value: function(o2) { - var e2, i2, a2 = this; - return !o2.file || this._isEmptyFileList(o2.file.files) ? D({ code: L.MSG_I_SELECT_F_FIRST }) : true !== (e2 = this._checkImageType(o2.file)) ? e2 : true !== (e2 = this._checkImageSize(o2.file)) ? e2 : (i2 = null, this._setUploadFileType(1), this.uploadByCOS(o2).then(function(e3) { - if (i2 = e3, a2.isPrivateNetWork()) - return Ft(n2); - if (O(i2.imageInfoArray)) { - var t2 = i2.imageInfoArray.find(function(e4) { - return 3 === e4.type; - }); - if (t2) - return t2; - } - var n2; - return ye ? { width: o2.file.width, height: o2.file.height } : (n2 = It(e3.location), a2.COSSDK ? Ft(n2) : Ft(n2 = ao(n2, a2._fileDownloadProxy, a2._authKey, a2._fileDNList))); - }).then(function(e3) { - return i2.width = e3.width, i2.height = e3.height, Promise.resolve(i2); - })); - } }, { key: "_checkImageType", value: function(e2) { - var t2 = "", t2 = v ? e2.url.slice(e2.url.lastIndexOf(".") + 1) : ye ? e2.type.split("/")[1] : e2.files[0].name.slice(e2.files[0].name.lastIndexOf(".") + 1); - return 0 <= Qo.indexOf(t2.toLowerCase()) || D({ code: L.MSG_I_TYPES_LIMIT }); - } }, { key: "_checkImageSize", value: function(e2) { - return 0 === (e2 = (v || ye ? e2 : e2.files[0]).size) ? D({ code: L.MSG_F_IS_EMPTY }) : e2 < this.UPLOAD_SIZE_LIMIT.I || this._checkSizeError("I"); - } }, { key: "doUploadFile", value: function(e2) { - return !e2.file || this._isEmptyFileList(e2.file.files) ? D({ code: L.MSG_F_SELECT_F_FIRST }) : e2.file.files[0].size > this.UPLOAD_SIZE_LIMIT.F ? this._checkSizeError("F") : 0 === e2.file.files[0].size ? D({ code: L.MSG_F_IS_EMPTY }) : (this._setUploadFileType(255), this.uploadByCOS(e2)); - } }, { key: "doUploadVideo", value: function(e2) { - return e2.file.videoFile.size > this.UPLOAD_SIZE_LIMIT.V ? this._checkSizeError("V") : 0 === e2.file.videoFile.size ? D({ code: L.MSG_F_IS_EMPTY }) : -1 === $o.indexOf(e2.file.videoFile.type) ? D({ code: L.MSG_V_TYPES_LIMIT }) : (this._setUploadFileType(2), v || ye ? this.handleVideoUpload(y(y({}, e2), {}, { file: e2.file.videoFile })) : Ce ? this.handleVideoUpload(e2) : void 0); - } }, { key: "handleVideoUpload", value: function(n2) { - var o2 = this; - return new Promise(function(t2, e2) { - o2.uploadByCOS(n2).then(function(e3) { - t2(e3); - }).catch(function() { - o2.uploadByCOS(n2).then(function(e3) { - t2(e3); - }).catch(function() { - e2(new E({ code: L.MSG_V_UPLOAD_FAIL })); - }); - }); - }); - } }, { key: "doUploadAudio", value: function(e2) { - return e2.file ? e2.file.size > this.UPLOAD_SIZE_LIMIT.A ? this._checkSizeError("A") : 0 === e2.file.size ? D({ code: L.MSG_F_IS_EMPTY }) : (this._setUploadFileType(3), this.uploadByCOS(e2)) : D({ code: L.MSG_A_UPLOAD_FAIL }); - } }, { key: "uploadByCOS", value: function(t2) { - var c2, u2, l2, d2, p2 = this; - return lt(this._cosUploadMethod) ? this.timUploadPlugin ? this._uploadWithPreSigUrl(t2) : (c2 = new G("upload"), u2 = "".concat(this._n, ".uploadByCOS"), l2 = Date.now(), d2 = this._getFile(t2), new Promise(function(a2, s2) { - var e2 = v ? p2._createCosOptionsWXMiniApp(t2) : p2._createCosOptionsWeb(t2), r2 = p2; - p2._cosUploadMethod(e2, function(e3, t3) { - var n2, o2, i2 = /* @__PURE__ */ Object.create(null); - t3 ? e3 || O(t3.files) && t3.files[0].error ? (n2 = new E({ code: L.MSG_F_UPLOAD_FAIL }), c2.setError(n2).end(), M.l("".concat(u2, " failed. error:"), t3.files[0].error), 403 === t3.files[0].error.statusCode && p2._getAuthorizationKey(), s2(n2)) : (i2.fileName = d2.name, i2.fileSize = d2.size, i2.fileType = d2.type.slice(d2.type.indexOf("/") + 1).toLowerCase(), i2.location = (v ? t3 : t3.files[0].data).Location, n2 = Date.now() - l2, t3 = r2._formatFileSize(d2.size), o2 = r2._formatSpeed(1e3 * d2.size / n2), t3 = "size:".concat(t3, " time:").concat(n2, "ms speed:").concat(o2), M.l("".concat(u2, " success. name:").concat(d2.name, " ").concat(t3)), a2(i2), (o2 = p2.get(26)).addCost(Wn, n2), o2.addFileSize(Wn, d2.size), c2.setMessage(t3).end()) : (i2 = new E({ code: L.MSG_F_UPLOAD_FAIL }), c2.setError(i2).end(), M.w("".concat(u2, " failed. error:"), e3), 403 === e3.statusCode && p2._getAuthorizationKey(), s2(i2)); - }); - })) : (this.warn("PluginUndetected"), D({ code: L.COS_UNDETECTED })); - } }, { key: "_uploadWithPreSigUrl", value: function(e2) { - var p2 = this, _2 = "".concat(this._n, "._uploadWithPreSigUrl"), h2 = this._getFile(e2); - return this._createCosOptionsPreSigUrl(e2).then(function(d2) { - return new Promise(function(a2, s2) { - var r2 = new G("upload"), e3 = d2.requestSnapshotUrl, c2 = void 0 === e3 ? void 0 : e3, u2 = K(d2, ya), l2 = Date.now(); - p2._cosUploadMethod(u2, function(e4, t2) { - if (e4 || 403 === t2.statusCode) - r2.setError(new E(e4)).end(), o2 = { HttpStatusCode: 9999, CostTime: nn(l2, false), error: e4, url: d2.url }, t2.data && t2.data.uploadIP && (o2.uploadIP = t2.data.uploadIP), p2._uploadSSOLog(o2), M.l("".concat(_2, " failed, error:"), e4), s2(new E({ code: L.MSG_F_UPLOAD_FAIL })); - else { - var n2 = /* @__PURE__ */ Object.create(null), o2 = t2.data.location || "", e4 = (p2.isPrivateNetWork() || 0 !== o2.indexOf("https://") && 0 !== o2.indexOf("http://") || (o2 = o2.split("//")[1]), n2.fileName = h2.name, n2.fileSize = h2.size, n2.fileType = h2.type.slice(h2.type.indexOf("/") + 1).toLowerCase(), n2.location = o2, nn(l2, false)), o2 = p2._formatFileSize(h2.size), i2 = p2._formatSpeed(1e3 * h2.size / e4), o2 = "size:".concat(o2, " time:").concat(e4, "ms speed:").concat(i2, " res:").concat(JSON.stringify(t2.data)), i2 = (M.l("".concat(_2, " ok. name:").concat(h2.name, " ").concat(o2)), r2.setMessage(o2).end(), { HttpStatusCode: t2.statusCode, FileSize: h2.size, CostTime: e4, url: d2.url }), o2 = (t2.data && t2.data.uploadIP && (i2.uploadIP = t2.data.uploadIP), p2._uploadSSOLog(i2), p2.get(26)), i2 = (o2.addCost(Wn, e4), o2.addFileSize(Wn, h2.size), []); - if (u2.thumbUrl && u2.largeUrl && i2.push.apply(i2, [p2._getSmallImageInfoByUrl(u2.thumbUrl, n2), p2._getLargeImageInfoByUrl(u2.largeUrl, n2)]), 1 === p2.uploadFileType && p2.isSimpleCos && !p2.isPrivateNetWork() && (i2.push(p2._getImageInfoArray(u2.downloadUrl, n2)), t2.data.uploadIP) && i2.push(p2._getDownloadIP(u2.downloadUrl.split("//")[1].split("/")[0], n2)), c2 && i2.push(p2._getSnapshotInfoByUrl(c2, n2)), 0 < i2.length) - return Promise.all(i2).then(function() { - a2(n2); - }); - a2(n2); - } - }); - }); - }); - } }, { key: "_getDownloadIP", value: function(e2, n2) { - var o2 = "".concat(this._n, "._getDownloadIP"), i2 = Date.now(); - return this.req({ P: k.GET_IP, data: { domainName: e2 } }).then(function(e3) { - var t2; - e3.data && e3.data.ip && (M.l("".concat(o2, " ok. downloadIP:").concat(e3.data.ip, " cost:").concat(nn(i2))), (t2 = n2.location.split("/"))[0] = e3.data.ip, n2.location = t2.join("/")); - }).catch(function(e3) { - }); - } }, { key: "_getImageInfoArray", value: function(t2, n2) { - var o2 = this, i2 = "".concat(this._n, "._getImageInfoArray"), a2 = Date.now(); - return this.req({ P: k.GET_IMAGE_INFO, data: { imageUrl: t2 } }).then(function(e2) { - e2 = e2.data || {}; - return M.l("".concat(i2, " ok. data: ").concat(JSON.stringify(e2), " cost:").concat(nn(a2))), n2.imageInfoArray = e2.imageInfoArray, e2; - }).catch(function(e2) { - n2.imageInfoArray = void 0, o2._uploadSSOLog({ HttpStatusCode: 1e4, CostTime: nn(a2, false), url: t2 }); - }); - } }, { key: "_uploadSSOLog", value: function(e2) { - var t2, n2; - this.isSimpleCos && ((t2 = new G()).setEventType(18), e2.error && t2.setError(new E(e2.error)), n2 = "HttpStatusCode:".concat(e2.HttpStatusCode, "|CosRequestId:").concat(e2.CosRequestId || "", "|") + "FileAlreadyExist:".concat(e2.FileAlreadyExist || 0, "|FileSize:").concat(e2.FileSize || 0, "|CostTime:").concat(e2.CostTime), e2.uploadIP && (n2 += "|FinalIP:".concat(e2.uploadIP)), t2.setMessage("OK").setMoreMessage(e2.url).setExtension(n2).end()); - } }, { key: "_getRawOrUploadProxyUrl", value: function(e2) { - var t2 = this.get(12).getFileUploadProxy(), n2 = e2; - return n2 = t2 ? e2.replace(/^https:\/\/[^/]+/, t2) : n2; - } }, { key: "_getFile", value: function(e2) { - return O(e2.file.files) || dt(e2.file.files) ? e2.file.files[0] : e2.file; - } }, { key: "_formatFileSize", value: function(e2) { - return e2 < 1024 ? e2 + "B" : e2 < 1048576 ? Math.floor(e2 / 1024) + "KB" : Math.floor(e2 / 1048576) + "MB"; - } }, { key: "_formatSpeed", value: function(e2) { - return e2 <= 1048576 ? Yt(e2 / 1024, 1) + "KB/s" : Yt(e2 / 1048576, 1) + "MB/s"; - } }, { key: "_createCosOptionsWeb", value: function(t2) { - var e2 = this._getFile(t2), n2 = e2.name, n2 = n2.slice(n2.lastIndexOf(".")), n2 = this._genFileName("".concat(ft(999999)).concat(n2)); - return { files: [{ Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(n2), Body: e2 }], SliceSize: 1048576, onProgress: function(e3) { - if ("function" == typeof t2.onProgress) - try { - t2.onProgress(e3.percent); - } catch (e4) { - M.w("onProgress callback error:", e4); - } - }, onFileFinish: function(e3, t3, n3) { - } }; - } }, { key: "_createCosOptionsWXMiniApp", value: function(t2) { - var e2 = this._getFile(t2), n2 = this._genFileName(e2.name), e2 = e2.url; - return { Bucket: "".concat(this.bucketName, "-").concat(this.appid), Region: this.region, Key: "".concat(this.directory, "/").concat(n2), FilePath: e2, onProgress: function(e3) { - if (M.l(JSON.stringify(e3)), "function" == typeof t2.onProgress) - try { - t2.onProgress(e3.percent); - } catch (e4) { - M.w("onProgress callback error:", e4); - } - } }; - } }, { key: "_createCosOptionsPreSigUrl", value: function(r2) { - var e2, c2 = this, u2 = "", l2 = "", t2 = 0, n2 = this._getFile(r2), t2 = v || ye ? (u2 = r2.message.type === A.MSG_FILE ? (e2 = (e2 = n2.name).slice(e2.lastIndexOf(".")), this._genFileName("".concat(ft(999999)).concat(e2))) : this._genFileName(n2.name), l2 = n2.url, 1) : (e2 = (e2 = n2.name).slice(e2.lastIndexOf(".")), u2 = this._genFileName("".concat(ft(999999)).concat(e2)), l2 = n2, 0); - return this._getCosPreSigUrl({ fileType: this.uploadFileType, fileName: u2, uploadMethod: t2, duration: this.duration, userID: r2.message.from, conversationType: Pt(r2.message.conversationID) ? 1 : 2 }).then(function(e3) { - var t3 = c2.isSimpleCos ? e3.preSig[0] : e3, n3 = t3.uploadUrl, o2 = t3.downloadUrl, i2 = t3.requestSnapshotUrl, i2 = void 0 === i2 ? void 0 : i2, a2 = t3.thumbUrl, s2 = t3.largeUrl, t3 = t3.fileKey, e3 = e3.uploadIP, e3 = void 0 === e3 ? "" : e3; - return { url: c2._getRawOrUploadProxyUrl(n3), fileType: c2.uploadFileType, fileName: u2, resources: l2, downloadUrl: o2, requestSnapshotUrl: i2, thumbUrl: a2, largeUrl: s2, fileKey: t3, uploadIP: !c2.isPrivateNetWork() && e3, onProgress: function(e4) { - if ("function" == typeof r2.onProgress) - try { - r2.onProgress(e4.percent); - } catch (e5) { - M.w("onProgress callback error:", e5), M.e(e5); - } - } }; - }); - } }, { key: "_genFileName", value: function(e2) { - return "".concat(qt(), "-").concat(e2); - } }, { key: "_setUploadFileType", value: function(e2) { - this.uploadFileType = e2; - } }, { key: "_getSnapshotInfoByUrl", value: function(e2, n2) { - var o2 = this, i2 = "_getSnapshotInfoByUrl", a2 = new G(i2); - return this.req({ P: k.VIDEO_COVER, data: { platform: this.getPlatform(), coverName: this._genFileName(ft(99999)), requestSnapshotUrl: e2 } }).then(function(e3) { - var t2, e3 = (e3.data || {}).snapshotUrl; - return M.l("".concat(o2._n, ".").concat(i2, " ok. snapshotUrl:").concat(e3)), a2.setMessage("snapshotUrl:".concat(e3)).end(), S(e3) ? {} : Ft(t2 = ao(e3, o2._fileDownloadProxy, o2._authKey, o2._fileDNList)).then(function(e4) { - n2.snapshotInfo = { snapshotUrl: t2, snapshotWidth: e4.width, snapshotHeight: e4.height }; - }); - }).catch(function(e3) { - return M.w("".concat(o2._n, ".").concat(i2, " failed. error:"), e3), a2.setCode(e3.errorCode).setMessage(e3.errorInfo).end(), {}; - }); - } }, { key: "_getSmallImageInfoByUrl", value: function(t2, n2) { - return Ft(ao(t2, this._fileDownloadProxy, this._authKey, this._fileDNList)).then(function(e2) { - n2.smallImageUrl = t2, n2.smallImageWidth = e2.width, n2.smallImageHeight = e2.height; - }); - } }, { key: "_getLargeImageInfoByUrl", value: function(t2, n2) { - return Ft(ao(t2, this._fileDownloadProxy, this._authKey, this._fileDNList)).then(function(e2) { - n2.largeImageUrl = t2, n2.largeImageWidth = e2.width, n2.largeImageHeight = e2.height; - }); - } }, { key: "_isEmptyFileList", value: function(e2) { - return !(!dt(e2) || 0 !== e2.length); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")); - } }]), ka), Ta = ["downloadKey", "pbDownloadKey", "messageList"], Da = (e(Sa, [{ key: "uploadMergerMessage", value: function(e2, n2) { - var o2 = "".concat(this._n, ".").concat("uploadMergerMessage"), e2 = (M.d("".concat(o2, " message:"), e2, "messageBytes:".concat(n2)), JSON.parse(JSON.stringify(e2.payload)).messageList), i2 = e2.length, t2 = this._msgM.get(17).getFileDNList(), a2 = new G("uploadMergerMessage"); - return e2.forEach(function(e3) { - so(e3.messageBody[0].type, e3.messageBody, t2); - }), this._msgM.req({ P: k.UPLOAD_MERGER_MSG, data: { messageList: e2 } }).then(function(e3) { - M.d("".concat(o2, " ok. response:"), e3.data); - var e3 = e3.data, t3 = e3.pbDownloadKey, e3 = e3.downloadKey, t3 = { pbDownloadKey: t3, downloadKey: e3, messageNumber: i2 }; - return a2.setMessage("".concat(i2, "-").concat(n2, "-").concat(e3)).end(), t3; - }).catch(function(e3) { - throw M.w("".concat(o2, " failed. error:"), e3), a2.setError(e3).end(), e3; - }); - } }, { key: "downloadMergerMessage", value: function(i2) { - var a2 = this, s2 = "".concat(this._n, ".").concat("downloadMergerMessage"), t2 = (M.d("".concat(s2, " message:"), i2), i2.payload.downloadKey), r2 = this._msgM.getFileDownloadProxy(), c2 = this._msgM.getDowloadFileAuthKey(), u2 = new G("downloadMergerMessage"); - return u2.setMessage("downloadKey:".concat(t2)), this._msgM.req({ P: k.DOWNLOAD_MERGER_MSG, data: { downloadKey: t2 } }).then(function(e2) { - M.d("".concat(s2, " ok. response:"), e2.data); - var t3, n2, o2 = a2._msgM.get(17).getFileDNList(); - return lt(i2.clearElement) ? ((t3 = i2.payload).downloadKey, t3.pbDownloadKey, t3.messageList, t3 = K(t3, Ta), i2.clearElement(), i2.setElement({ type: i2.type, content: y({ messageList: e2.data.messageList }, t3) }, r2, c2, o2)) : (n2 = [], e2.data.messageList.forEach(function(e3) { - S(e3) || (e3 = new yo(e3, r2, c2, o2), n2.push(e3)); - }), i2.payload.messageList = n2, i2.payload.downloadKey = "", i2.payload.pbDownloadKey = ""), u2.end(), i2; - }).catch(function(e2) { - throw M.w("".concat(s2, " failed. key:").concat(t2, " error:"), e2), u2.setError(e2).end(), e2; - }); - } }, { key: "createMergerMessagePack", value: function(e2, t2, n2) { - return e2.conversationType === A.CONV_C2C ? this._createC2CMergerMessagePack(e2, t2, n2) : this._createGroupMergerMessagePack(e2, t2, n2); - } }, { key: "_createC2CMergerMessagePack", value: function(e2, t2, n2) { - var o2 = null, i2 = (t2 && (t2.offlinePushInfo && (o2 = t2.offlinePushInfo), true === t2.onlineUserOnly) && (o2 ? o2.disablePush = true : o2 = { disablePush: true }), []), a2 = (f(t2) && f(t2.messageControlInfo) && (a2 = (r2 = t2.messageControlInfo).excludedFromUnreadCount, s2 = r2.excludedFromLastMessage, r2 = r2.excludedFromContentModeration, true === a2 && i2.push("NoUnread"), true === s2 && i2.push("NoLastMsg"), true === r2) && i2.push("NoMsgCheck"), ""), s2 = (m(e2.cloudCustomData) && 0 < e2.cloudCustomData.length && (a2 = e2.cloudCustomData), n2.pbDownloadKey), r2 = n2.downloadKey, n2 = n2.messageNumber, c2 = e2.payload, u2 = c2.title, l2 = c2.abstractList, c2 = c2.compatibleText, d2 = this._msgM.get(6), d2 = d2 && d2.isOnlineMessage(e2, t2) ? 0 : void 0; - return { P: k.SEND_C2C_MSG, data: { fromAccount: this._msgM.getMyUserID(), toAccount: e2.to, msgBody: [{ msgType: e2.type, msgContent: { pbDownloadKey: s2, downloadKey: r2, title: u2, abstractList: l2, compatibleText: c2, messageNumber: n2 } }], cloudCustomData: a2, clientTime: e2.clientTime, msgSeq: e2.sequence, msgRandom: e2.random, msgLifeTime: d2, offlinePushInfo: wo(o2), messageControlInfo: 0 !== d2 ? i2 : void 0, isSupportExtension: true === e2.isSupportExtension ? 1 : 0, isRelayMessage: true === e2._relayFlag ? 1 : 0 } }; - } }, { key: "_createGroupMergerMessagePack", value: function(e2, t2, n2) { - var o2 = null, i2 = (t2 && t2.offlinePushInfo && (o2 = t2.offlinePushInfo), []), a2 = (f(t2) && f(t2.messageControlInfo) && (a2 = (r2 = t2.messageControlInfo).excludedFromUnreadCount, s2 = r2.excludedFromLastMessage, r2 = r2.excludedFromContentModeration, true === a2 && i2.push("NoUnread"), true === s2 && i2.push("NoLastMsg"), true === r2) && i2.push("NoMsgCheck"), ""), s2 = (m(e2.cloudCustomData) && 0 < e2.cloudCustomData.length && (a2 = e2.cloudCustomData), n2.pbDownloadKey), r2 = n2.downloadKey, n2 = n2.messageNumber, c2 = e2.payload, u2 = c2.title, l2 = c2.abstractList, c2 = c2.compatibleText, d2 = this._msgM.get(7), t2 = d2 && d2.isOnlineMessage(e2, t2) ? 1 : 0; - return { P: k.SEND_GRP_MSG, data: { fromAccount: this._msgM.getMyUserID(), groupID: e2.to, msgBody: [{ msgType: e2.type, msgContent: { pbDownloadKey: s2, downloadKey: r2, title: u2, abstractList: l2, compatibleText: c2, messageNumber: n2 } }], random: e2.random, priority: e2.priority, clientSequence: e2.clientSequence, groupAtInfo: void 0, cloudCustomData: a2, onlineOnlyFlag: t2, offlinePushInfo: wo(o2), clientTime: e2.clientTime, needReadReceipt: true !== e2.needReadReceipt || d2.isMessageFromOrToAVChatroom(e2.to) ? 0 : 1, messageControlInfo: 0 == t2 ? i2 : void 0, isSupportExtension: true === e2.isSupportExtension ? 1 : 0, isRelayMessage: true === e2._relayFlag ? 1 : 0 } }; - } }]), Sa), Ea = { ERR_SVR_COMM_SENSITIVE_TEXT: 80001, ERR_SVR_COMM_BODY_SIZE_LIMIT: 80002, OPEN_SERVICE_OVERLOAD_ERROR: 60022, ERR_SVR_MSG_PKG_PARSE_FAILED: 20001, ERR_SVR_MSG_INTERNAL_AUTH_FAILED: 20002, ERR_SVR_MSG_INVALID_ID: 20003, ERR_SVR_MSG_PUSH_DENY: 20006, ERR_SVR_MSG_IN_PEER_BLACKLIST: 20007, ERR_SVR_MSG_BOTH_NOT_FRIEND: 20009, ERR_SVR_MSG_NOT_PEER_FRIEND: 20010, ERR_SVR_MSG_NOT_SELF_FRIEND: 20011, ERR_SVR_MSG_SHUTUP_DENY: 20012, ERR_SVR_GROUP_INVALID_PARAMETERS: 10004, ERR_SVR_GROUP_PERMISSION_DENY: 10007, ERR_SVR_GROUP_NOT_FOUND: 10010, ERR_SVR_GROUP_INVALID_GROUPID: 10015, ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY: 10016, ERR_SVR_GROUP_SHUTUP_DENY: 10017, MSG_SEND_FAIL: 2100, OVER_FREQUENCY_LIMIT: 2996 }, La = [L.MSG_ONPROGRESS_ERR, L.MSG_I_SELECT_F_FIRST, L.MSG_I_TYPES_LIMIT, L.MSG_F_IS_EMPTY, L.MSG_I_SIZE_LIMIT, L.MSG_F_SELECT_F_FIRST, L.MSG_F_SIZE_LIMIT, L.MSG_V_SIZE_LIMIT, L.MSG_V_TYPES_LIMIT, L.MSG_A_UPLOAD_FAIL, L.MSG_A_SIZE_LIMIT, L.COS_UNDETECTED]; - function Sa(e2) { - d(this, Sa), this._n = "MergerMessageHandler", this._msgM = e2; - } - function ka(e2) { - d(this, ka), (e2 = va.call(this, e2))._n = "UploadModule", e2.TIMUploadPlugin = null, e2.timUploadPlugin = null, e2.COSSDK = null, e2._cosUploadMethod = null, e2.expiredTimeLimit = 600, e2.appid = 0, e2.bucketName = "", e2.ciUrl = "", e2.directory = "", e2.downloadUrl = "", e2.uploadUrl = "", e2.region = "ap-shanghai", e2.cos = null, e2.cosOptions = { secretId: "", secretKey: "", sessionToken: "", expiredTime: 0 }, e2.uploadFileType = "", e2.duration = 900, e2.tryCount = 0, e2.UPLOAD_SIZE_LIMIT = { A: 20971520, F: 104857600, I: 20971520, V: 104857600 }, e2.isSimpleCos = false, e2._fileDownloadProxy = "", e2._authKey = "", e2._fileDNList = Ma; - var t2 = e2.getIEmitInst(); - return t2.on(P.A2KEY_AND_TINYID_UPDATED, e2._init, i(e2)), t2.on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function Aa(e2) { - var t2 = false; - return Object.values(Ea).includes(e2) && (t2 = true), t2 = 120001 <= e2 && e2 <= 13e4 || 10100 <= e2 && e2 <= 10200 ? true : t2; - } - var Ra, Oa, Na, Ga, Pa, Ua, ba = ["conversationID", "timePosition", "timePeriod"], wa = (t(za, u), Ua = n(za), e(za, [{ key: "createTextMessage", value: function(e2) { - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)), e2 = m(e2.payload) ? e2.payload : e2.payload.text, e2 = new eo({ text: e2 }), t2 = this._getNickAndAvatarByUserID(t2); - return n2.setElement(e2), n2.setNickAndAvatar(t2), n2.setNameCard(this._getNameCardByGroupID(n2)), n2; - } }, { key: "createImageMessage", value: function(e2) { - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)); - if (v) { - var o2 = e2.payload.file; - if (ct(o2)) - return void this.warn("FileUnsupportedInMP", "createImageMessage"); - var i2 = o2.tempFiles[0].path || o2.tempFiles[0].tempFilePath, o2 = { url: i2, name: i2.slice(i2.lastIndexOf("/") + 1), size: o2.tempFiles && o2.tempFiles[0].size || 1, type: i2.slice(i2.lastIndexOf(".") + 1).toLowerCase() }; - e2.payload.file = o2; - } else - ye ? (o2 = { url: (i2 = e2.payload.file).uri, name: i2.fileName, size: i2.fileSize || 1, type: i2.type, width: i2.width, height: i2.height }, e2.payload.file = o2) : Ce && (ct(e2.payload.file) ? (i2 = e2.payload.file, e2.payload.file = { files: [i2] }) : f(e2.payload.file) && "undefined" != typeof uni && (o2 = e2.payload.file.tempFiles[0], e2.payload.file = { files: [o2] })); - i2 = new uo({ imageFormat: Xe.UNKNOWN, uuid: this._generateUUID(e2.payload.file), file: e2.payload.file }), o2 = this._getNickAndAvatarByUserID(t2); - return n2.setElement(i2), n2.setNickAndAvatar(o2), n2.setNameCard(this._getNameCardByGroupID(n2)), this._messageOptionsMap.set(n2.clientSequence, e2), n2; - } }, { key: "createAudioMessage", value: function(e2) { - var t2 = e2.payload.file, n2 = (v && (n2 = { url: t2.tempFilePath, name: t2.tempFilePath.slice(t2.tempFilePath.lastIndexOf("/") + 1), size: t2.fileSize, second: parseInt(t2.duration) / 1e3, type: t2.tempFilePath.slice(t2.tempFilePath.lastIndexOf(".") + 1).toLowerCase() }, e2.payload.file = n2), ye && (n2 = { url: t2.uri, name: t2.uri.slice(t2.uri.lastIndexOf("/") + 1), size: t2.fileSize || 1, second: Math.floor(t2.duration / 1e3), type: t2.uri.slice(t2.uri.lastIndexOf(".") + 1).toLowerCase() }, e2.payload.file = n2), this.getMyUserID()), o2 = (e2.currentUser = n2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)), t2 = new po({ second: Math.floor(t2.duration / 1e3), size: t2.fileSize || t2.size || 1, url: t2.tempFilePath, uuid: this._generateUUID(e2.payload.file) }), n2 = this._getNickAndAvatarByUserID(n2); - return o2.setElement(t2), o2.setNickAndAvatar(n2), o2.setNameCard(this._getNameCardByGroupID(o2)), this._messageOptionsMap.set(o2.clientSequence, e2), o2; - } }, { key: "createVideoMessage", value: function(e2) { - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), e2.payload.file.thumbUrl = "", e2.payload.file.thumbSize = 0, {}); - if (v) { - if (ve) - return void this.warn("VideoUnsupportedInAlipay"); - if (ct(e2.payload.file)) - return void this.warn("FileUnsupportedInMP", "createVideoMessage"); - var o2 = e2.payload.file; - O(o2.tempFiles) && (o2 = o2.tempFiles[0]), n2.url = o2.tempFilePath, n2.name = o2.tempFilePath.slice(o2.tempFilePath.lastIndexOf("/") + 1), n2.size = o2.size || 1, n2.second = o2.duration || 0, n2.type = o2.tempFilePath.slice(o2.tempFilePath.lastIndexOf(".") + 1).toLowerCase(); - } else - ye ? (o2 = e2.payload.file, n2.url = o2.uri, n2.name = o2.fileName, n2.size = o2.fileSize || 1, n2.second = o2.duration || 0, n2.type = o2.type.split("/")[1]) : Ce && (ct(e2.payload.file) ? (o2 = e2.payload.file, e2.payload.file.files = [o2]) : f(e2.payload.file) && "undefined" != typeof uni && (o2 = e2.payload.file.tempFile, e2.payload.file.files = [o2]), o2 = e2.payload.file, n2.url = window.URL.createObjectURL(o2.files[0]), n2.name = o2.files[0].name, n2.size = o2.files[0].size || 1, n2.second = o2.files[0].duration || 0, n2.type = o2.files[0].type.split("/")[1]); - e2.payload.file.videoFile = n2; - o2 = new Do(e2), n2 = new Io({ videoFormat: n2.type, videoSecond: Yt(n2.second, 0), videoSize: n2.size, remoteVideoUrl: "", videoUrl: n2.url, videoUUID: this._generateUUID(e2.payload.file.videoFile), thumbUUID: this._generateUUID(e2.payload.file.videoFile), thumbWidth: e2.payload.file.width || 200, thumbHeight: e2.payload.file.height || 200, thumbUrl: e2.payload.file.thumbUrl, thumbSize: e2.payload.file.thumbSize, thumbFormat: e2.payload.file.thumbUrl.slice(e2.payload.file.thumbUrl.lastIndexOf(".") + 1).toLowerCase() }), t2 = this._getNickAndAvatarByUserID(t2); - return o2.setElement(n2), o2.setNickAndAvatar(t2), o2.setNameCard(this._getNameCardByGroupID(o2)), this._messageOptionsMap.set(o2.clientSequence, e2), o2; - } }, { key: "createCustomMessage", value: function(e2) { - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)), e2 = new vo({ data: e2.payload.data, description: e2.payload.description, extension: e2.payload.extension }), t2 = this._getNickAndAvatarByUserID(t2); - return n2.setElement(e2), n2.setNickAndAvatar(t2), n2.setNameCard(this._getNameCardByGroupID(n2)), n2; - } }, { key: "createFaceMessage", value: function(e2) { - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)), e2 = new lo(e2.payload), t2 = this._getNickAndAvatarByUserID(t2); - return n2.setElement(e2), n2.setNickAndAvatar(t2), n2.setNameCard(this._getNameCardByGroupID(n2)), n2; - } }, { key: "createMergerMessage", value: function(e2) { - var t2 = this.getMyUserID(), t2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), this._getNickAndAvatarByUserID(t2)), n2 = new Do(e2), e2 = new Co(e2.payload); - return n2.setElement(e2), n2.setNickAndAvatar(t2), n2.setNameCard(this._getNameCardByGroupID(n2)), n2.setRelayFlag(true), n2; - } }, { key: "createForwardMessage", value: function(e2) { - var t2, n2, o2 = e2.to, i2 = e2.conversationType, a2 = e2.priority, s2 = e2.payload, r2 = e2.needReadReceipt, c2 = e2.receiverList; - return O(s2._elements) ? (t2 = this.getMyUserID(), n2 = this._getNickAndAvatarByUserID(t2), s2.type === A.MSG_GRP_TIP ? D({ code: L.MSG_FORWARD_TYPE_INVALID }) : (i2 = { to: o2, conversationType: i2, conversationID: "".concat(i2).concat(o2), priority: a2, isPlaceMessage: 0, status: An, currentUser: t2, senderTinyID: this.getMyTinyID(), cloudCustomData: e2.cloudCustomData || s2.cloudCustomData || "", needReadReceipt: r2, receiverList: c2, isSupportExtension: e2.isSupportExtension || false }, (o2 = new Do(i2)).setElement(s2._elements[0]), o2.setNickAndAvatar(n2), o2.setNameCard(this._getNameCardByGroupID(s2)), o2.setRelayFlag(true), o2)) : D({ code: L.MSG_FORWARD_INVALID_ELEMENTS }); - } }, { key: "downloadMergerMessage", value: function(e2) { - return this._mergerMessageHandler.downloadMergerMessage(e2); - } }, { key: "createFileMessage", value: function(e2) { - if (v) { - if (!_e && !ge && !Ie) - return; - var t2 = I.getSystemInfoSync().SDKVersion; - if (_e && Vt(t2, "2.5.0") < 0) - return void this.warn("WXChooseMessageFile"); - if (ge && Vt(t2, "1.18.0") < 0) - return void this.warn("QQChooseMessageFile"); - } - Ce || Ie ? ct(e2.payload.file) ? (t2 = e2.payload.file, e2.payload.file = { files: [t2] }) : f(e2.payload.file) && "undefined" != typeof uni && (o2 = (t2 = e2.payload.file).tempFiles, t2 = t2.files, n2 = null, O(o2) ? n2 = o2[0] : O(t2) && (n2 = t2[0]), e2.payload.file = { files: [n2] }) : _e || ge ? (t2 = y(y({}, (o2 = e2.payload.file.tempFiles)[0]), {}, { url: o2[0].path }), e2.payload.file = { files: [t2] }) : ye && (o2 = y(y({}, n2 = e2.payload.file), {}, { url: n2.uri }), e2.payload.file = { files: [o2] }); - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)), o2 = new mo({ uuid: this._generateUUID(e2.payload.file), file: e2.payload.file }), t2 = this._getNickAndAvatarByUserID(t2); - return n2.setElement(o2), n2.setNickAndAvatar(t2), n2.setNameCard(this._getNameCardByGroupID(n2)), this._messageOptionsMap.set(n2.clientSequence, e2), n2; - } }, { key: "createLocationMessage", value: function(e2) { - var t2 = this.getMyUserID(), n2 = (e2.currentUser = t2, e2.senderTinyID = this.getMyTinyID(), new Do(e2)), e2 = new Mo(e2.payload), t2 = this._getNickAndAvatarByUserID(t2); - return n2.setElement(e2), n2.setNickAndAvatar(t2), n2.setNameCard(this._getNameCardByGroupID(n2)), n2; - } }, { key: "_onNoModule", value: function() { - return D({ code: L.NO_MODULE }); - } }, { key: "sendMessageInstance", value: function(i2, a2) { - var s2 = this; - if (false === this.get(29).filterMessage(i2, a2)) - return i2.hasRiskContent = true, this._onSendMessageFailed(i2, new E({ code: L.PROFANITY_FOUND })); - var r2, c2, u2, l2, t2 = null; - if (i2.conversationType === A.CONV_C2C) - t2 = this.get(6); - else { - if (i2.conversationType !== A.CONV_GROUP) - return D({ code: L.MSG_INVALID_CONV_TYPE }); - t2 = this.get(7); - } - return t2 ? (c2 = "".concat(this._n, ".sendMessageInstance"), u2 = this.get(11), l2 = t2.isOnlineMessage(i2, a2), this.get(17).upload(i2).then(function() { - return s2._getSendMessageSpecifiedKey(i2) === Yn && s2.get(26).addSuccessCount(Wn), s2._guardForGroup(i2).then(function() { - if (!i2.isSendable()) - return D({ code: L.MSG_F_URL_IS_EMPTY }); - s2._addSendMessageTotalCount(i2), r2 = Date.now(); - var e2 = function(e3) { - var t3 = "utf-8"; - Ce && document && (t3 = document.charset.toLowerCase()); - var n2, o2 = 0, i3 = e3.length; - if ("utf-8" === t3 || "utf8" === t3) - for (var a3 = 0; a3 < i3; a3++) - (n2 = e3.codePointAt(a3)) <= 127 ? o2 += 1 : n2 <= 2047 ? o2 += 2 : n2 <= 65535 ? o2 += 3 : (o2 += 4, a3++); - else if ("utf-16" === t3 || "utf16" === t3) - for (var s3 = 0; s3 < i3; s3++) - (n2 = e3.codePointAt(s3)) <= 65535 ? o2 += 2 : (o2 += 4, s3++); - else - o2 = e3.replace(/[^\x00-\xff]/g, "aa").length; - return o2; - }(JSON.stringify(i2)); - return i2.type === A.MSG_MERGER && 11264 < e2 ? s2._mergerMessageHandler.uploadMergerMessage(i2, e2).then(function(e3) { - e3 = s2._mergerMessageHandler.createMergerMessagePack(i2, a2, e3); - return s2.req(e3); - }) : (u2.setMessageRandom(i2), t2.sendMessage(i2, a2)); - }).then(function(e2) { - var e2 = e2.data, t3 = e2.time, n2 = e2.sequence, o2 = e2.readReceiptCode, e2 = e2.messageDropReason, e2 = (R(o2) && 0 !== o2 && (new G("sendMessageWithReceipt").setMessage("from:".concat(i2.from, " to:").concat(i2.to, " sequence:").concat(n2, " readReceiptCode:").concat(o2)).end(), M.w("".concat(c2, " readReceiptCode:").concat(o2, " message:").concat(s2.getErrMsg(o2)))), e2 && (o2 = new G("messageDropReason"), e2 = "from:".concat(i2.from, " to:").concat(i2.to, " sequence:").concat(n2, " messageDropReason:").concat(e2), o2.setMessage(e2).end(), M.w("".concat(c2, " ").concat(e2))), s2._addSendMessageSuccessCount(i2, r2), s2._messageOptionsMap.delete(i2.clientSequence), true === i2.isResend && (o2 = u2.findMessage(i2.ID)) && (M.l("".concat(c2, " resend ok. ID:").concat(o2.ID)), u2.deleteLocalMessage(o2)), i2.status = Rn, i2.time = t3, false); - return i2.conversationType === A.CONV_GROUP ? i2.sequence = n2 : i2.conversationType === A.CONV_C2C && (o2 = u2.getLatestMessageSentByMe(i2.conversationID)) && (t3 = o2.nick, n2 = o2.avatar, t3 === i2.nick && n2 === i2.avatar || (e2 = true)), e2 && u2.modifyMessageSentByMe({ conversationID: i2.conversationID, latestNick: i2.nick, latestAvatar: i2.avatar }), true === l2 ? i2._onlineOnlyFlag = true : (u2.appendToMessageList(i2), o2 = i2, f(a2) && f(a2.messageControlInfo) && (true === a2.messageControlInfo.excludedFromLastMessage && (i2._isExcludedFromLastMessage = true, o2 = ""), true === a2.messageControlInfo.excludedFromUnreadCount) && (i2._isExcludedFromUnreadCount = true), t3 = i2.conversationType, Gt(i2.to) && (t3 = A.CONV_TOPIC, s2.get(10).onMessageSent({ groupID: Jt(i2.to), topicID: i2.to, lastMessage: o2 })), u2.onMessageSent({ conversationOptionsList: [{ conversationID: i2.conversationID, unreadCount: 0, type: t3, subType: i2.conversationSubType, lastMessage: o2 }] })), i2._relayFlag || "TIMImageElem" !== i2.type || Bt(i2.payload.imageInfoArray), C({ message: i2 }); - }); - }).catch(function(e2) { - return s2._onSendMessageFailed(i2, e2, l2); - })) : this._onNoModule(); - } }, { key: "_guardForGroup", value: function(e2) { - if (e2.conversationType !== A.CONV_GROUP) - return Promise.resolve(); - var t2 = this.get(7); - if (!t2) - return this._onNoModule(); - if (Nt({ groupID: e2.to })) { - var n2 = t2.getLocalGroupProfile(e2.to); - if (n2 && n2.isSupportTopic) - return D({ code: L.MSG_SEND_GRP_WITH_TOPIC_FAIL }); - } - return t2.guardForAVChatRoom(e2); - } }, { key: "_onSendMessageFailed", value: function(e2, t2) { - var n2 = 2 < arguments.length && void 0 !== arguments[2] && arguments[2], o2 = "".concat(this._n, "._onSendMessageFailed"), i2 = (e2.status = On, 80001 !== t2.code && 80004 !== t2.code || (e2.hasRiskContent = true), this.get(11)), a2 = (i2.deleteMessageRandom(e2), 10100 <= t2.code && t2.code <= 10200 || 120001 <= t2.code && t2.code <= 13e4), n2 = (n2 || a2 || true === i2.appendToMessageList(e2) && M.l("".concat(o2, " message stored, ID:").concat(e2.ID)), this._addSendMessageFailCountOnUser(e2, t2), new G("sendMessage")), a2 = "head.seq:".concat(t2.data.headSeq, " type:").concat(e2.type, " from:").concat(e2.from, " to:").concat(e2.to); - return Ce && ("connection" in navigator && (i2 = navigator.connection, a2 += " downlink:".concat(i2.downlink, " effectiveType:").concat(i2.effectiveType, " rtt:").concat(i2.rtt)), "memory" in window.performance) && (i2 = window.performance.memory, a2 += " usedJSHeapSize:".concat(i2.usedJSHeapSize, " totalJSHeapSize:").concat(i2.totalJSHeapSize, " jsHeapSizeLimit:").concat(i2.jsHeapSizeLimit)), n2.setMessage(a2).setError(t2).end(), M.e("".concat(o2, " ").concat(a2, " error:"), t2), D(new E({ code: t2 && t2.code ? t2.code : L.MSG_SEND_FAIL, message: t2 && t2.message ? t2.message : void 0, data: { message: e2 } })); - } }, { key: "_getSendMessageSpecifiedKey", value: function(e2) { - if ([A.MSG_IMAGE, A.MSG_AUDIO, A.MSG_VIDEO, A.MSG_FILE].includes(e2.type)) - return Yn; - if (e2.conversationType === A.CONV_C2C) - return Hn; - if (e2.conversationType === A.CONV_GROUP) { - var t2 = this.get(7); - if (t2) { - t2 = t2.getLocalGroupProfile(e2.to); - if (t2) - return e2 = t2.type, Ot(e2) ? Kn : Bn; - } - } - } }, { key: "_addSendMessageTotalCount", value: function(e2) { - e2 = this._getSendMessageSpecifiedKey(e2); - e2 && this.get(26).addTotalCount(e2); - } }, { key: "_addSendMessageSuccessCount", value: function(e2, t2) { - var n2, e2 = this._getSendMessageSpecifiedKey(e2); - e2 && ((n2 = this.get(26)).addSuccessCount(e2), n2.addCost(e2, nn(t2, false))); - } }, { key: "_addSendMessageFailCountOnUser", value: function(e2, t2) { - var n2, t2 = t2.code, t2 = void 0 === t2 ? -1 : t2, o2 = this.get(26), e2 = this._getSendMessageSpecifiedKey(e2); - e2 === Yn && (n2 = false, n2 = La.includes(t2) ? true : n2) ? o2.addFailedCountOfUserSide(Wn) : Aa(t2) && e2 && o2.addFailedCountOfUserSide(e2); - } }, { key: "resendMessage", value: function(e2, t2) { - return e2.isResend = true, e2.status = An, this.sendMessageInstance(e2, t2); - } }, { key: "revokeMessage", value: function(n2) { - var o2, i2, t2 = this, e2 = null; - return n2.conversationType === A.CONV_C2C ? e2 = this.get(6) : n2.conversationType === A.CONV_GROUP && (e2 = this.get(7)), e2 ? ((o2 = new G("revokeMessage")).setMessage("type:".concat(n2.type, " from:").concat(n2.from, " to:").concat(n2.to)), i2 = "".concat(this._n, ".").concat("revokeMessage"), e2.revokeMessage(n2).then(function(e3) { - var e3 = e3.data.recallRetList; - return S(e3) || 0 === e3[0].retCode ? (M.i("".concat(i2, " ok. ID:").concat(n2.ID)), n2.isRevoked = true, o2.end(), t2.get(11).onMessageRevoked([n2]), C({ message: n2 })) : (e3 = new E({ code: e3[0].retCode, data: { message: n2 } }), o2.setCode(e3.code).setMoreMessage(e3.message).end(), D(e3)); - }).catch(function(e3) { - o2.setError(e3).end(); - var t3 = new E({ code: e3 && e3.code ? e3.code : L.MSG_REVOKE_FAIL, message: e3 && e3.message ? e3.message : void 0, data: { message: n2 } }); - return M.w("".concat(i2, " failed. error:"), e3), D(t3); - })) : this._onNoModule(); - } }, { key: "deleteMessage", value: function(e2) { - var t2 = this, n2 = null, o2 = e2[0], i2 = o2.conversationID, a2 = "", s2 = [], r2 = []; - if (o2.conversationType === A.CONV_C2C) - n2 = this.get(6), a2 = i2.replace(A.CONV_C2C, ""), e2.forEach(function(e3) { - e3 && e3.status === Rn && e3.conversationID === i2 && (e3._onlineOnlyFlag || s2.push("".concat(e3.sequence, "_").concat(e3.random, "_").concat(e3.time)), r2.push(e3)); - }); - else if (o2.conversationType === A.CONV_GROUP) - n2 = this.get(7), a2 = i2.replace(A.CONV_GROUP, ""), e2.forEach(function(e3) { - e3 && e3.status === Rn && e3.conversationID === i2 && (e3._onlineOnlyFlag || s2.push("".concat(e3.sequence)), r2.push(e3)); - }); - else if (o2.conversationType === A.CONV_SYSTEM) - return D({ code: L.CANNOT_DELETE_GRP_SYSTEM_NOTICE }); - if (!n2) - return this._onNoModule(); - if (0 === s2.length) - return this._onMessageDeleted(r2); - 30 < s2.length && (s2 = s2.slice(0, 30), r2 = r2.slice(0, 30)); - var c2 = new G("deleteMessage"), u2 = (c2.setMessage("to:".concat(a2, " count:").concat(s2.length)), "".concat(this._n, ".").concat("deleteMessage")); - return n2.deleteMessage({ to: a2, keyList: s2 }).then(function(e3) { - return c2.end(), M.i("".concat(u2, " ok")), t2._onMessageDeleted(r2); - }).catch(function(e3) { - c2.setError(e3).end(), M.w("".concat(u2, " failed. error:"), e3); - e3 = new E({ code: e3 && e3.code ? e3.code : L.MSG_DELETE_FAIL, message: e3 && e3.message ? e3.message : void 0 }); - return D(e3); - }); - } }, { key: "_onMessageDeleted", value: function(e2) { - return this.get(11).onMessageDeleted(e2), T({ messageList: e2 }); - } }, { key: "translateText", value: function(e2) { - var o2 = "".concat(this._n, ".").concat("translateText"), t2 = e2.sourceTextList, n2 = e2.sourceLanguage, e2 = e2.targetLanguage, i2 = new G("translateText"); - return i2.setMessage("sourceLanguage:".concat(n2, " targetLanguage:").concat(e2)), this.req({ P: k.TRANSLATE_TEXT, data: { sourceTextList: t2, source: n2 || "auto", target: e2, from: this.getMyTinyID(), SDKAppID: this.getSDKAppID() } }).then(function(e3) { - var e3 = e3.data, t3 = e3.error, n3 = e3.requestID, e3 = e3.translatedTextList; - if (0 === t3.code) - return i2.end(), M.i("".concat(o2, " ok. requestID:").concat(n3)), C({ translatedTextList: e3 }); - throw y(y({}, t3), {}, { requestID: n3 }); - }).catch(function(e3) { - return i2.setCode(e3.code).setMoreMessage(e3.requestID).end(), M.w("".concat(o2, " failed. error:"), e3), D({ code: L.TRANSLATE_TEXT_FAIL }); - }); - } }, { key: "convertVoiceToText", value: function(e2) { - var t2, o2, i2, n2 = e2.message, e2 = e2.language, a2 = n2.payload.url, n2 = (n2.from === this.getMyUserID() && "out" === n2.flow && (a2 = n2.payload.remoteAudioUrl), /\.(wav|pcm|ogg-opus|speex|silk|mp3|m4a|aac|amr)/); - return n2.test(a2) ? (n2 = n2.exec(a2)[1] || "mp3", t2 = "16k_zh-PY", e2 ? "zh (cmn-Hans-CN)" === e2 ? t2 = "16k_zh" : "en-US" === e2 ? t2 = "16k_en" : "yue-Hant-HK" === e2 ? t2 = "16k_yue" : "ja-JP" === e2 && (t2 = "16k_ja") : t2 = "16k_zh-PY", e2 = "serviceType:".concat(t2, " url:").concat(a2), o2 = "".concat(this._n, ".").concat("convertVoiceToText"), M.i("".concat(o2, " ").concat(e2)), (i2 = new G("convertVoiceToText")).setMessage(e2), this.req({ P: k.VOICE_TO_TEXT, data: { url: a2, language: t2, SDKAppID: this.getSDKAppID(), format: n2 } }).then(function(e3) { - var e3 = e3.data, t3 = e3.error, n3 = e3.requestID, e3 = e3.result; - if (0 === t3.code) - return i2.end(), M.i("".concat(o2, " ok. requestID:").concat(n3)), C({ result: e3 }); - throw y(y({}, t3), {}, { requestID: n3 }); - }).catch(function(e3) { - return i2.setCode(e3.code).setMoreMessage(e3.requestID || "").end(), M.w("".concat(o2, " failed. error:"), e3), D({ code: L.VOICE_TO_TEXT_FAIL }); - })) : D({ code: L.UNSUPPORTED_VOICE_FORMAT }); - } }, { key: "modifyRemoteMessage", value: function(n2) { - var o2 = this, e2 = null, t2 = n2.conversationType, i2 = n2.to, a2 = this.get(7); - if (!a2) - return this._onNoModule(); - if (a2.isMessageFromOrToAVChatroom(i2)) - return D({ code: L.MSG_MODIFY_DISABLED_IN_AV, data: { message: n2 } }); - if (false === this.get(29).filterMessage(n2)) - return n2.hasRiskContent = true, D({ code: L.PROFANITY_FOUND, data: { message: n2 } }); - t2 === A.CONV_C2C ? e2 = this.get(6) : t2 === A.CONV_GROUP && (e2 = this.get(7)); - var s2 = new G("modifyMessage"), r2 = (s2.setMessage("to:".concat(i2)), "".concat(this._n, ".modifyRemoteMessage")); - return e2.modifyRemoteMessage(n2).then(function(e3) { - s2.end(), M.i("".concat(r2, " ok")); - e3 = o2._onModifyRemoteMessageResp(n2, e3.data); - return C({ message: e3 }); - }).catch(function(e3) { - var t3; - return s2.setCode(e3.code).setMoreMessage(e3.message).end(), M.w("".concat(r2, " failed. error:"), e3), 20027 === e3.code ? (t3 = o2._onModifyRemoteMessageResp(n2, e3.data), D({ code: L.MSG_MODIFY_CONFLICT, data: { message: t3 } })) : D({ code: e3.code, message: e3.message, data: { message: n2 } }); - }); - } }, { key: "_generateSearchdata", value: function(e2) { - var t2 = e2.conversationID, n2 = e2.timePosition, o2 = e2.timePeriod, e2 = K(e2, ba); - return N(t2) || (Pt(t2) && (e2.account = t2.replace(A.CONV_C2C, "")), Ut(t2) && (e2.groupID = t2.replace(A.CONV_GROUP, ""))), R(o2) && 0 < o2 && (R(n2) && 0 < n2 ? e2.startTime = n2 - o2 : e2.startTime = Be() - o2), e2.startTime && e2.startTime < 0 && (e2.startTime = void 0), R(n2) && 0 < n2 && (e2.endTime = n2), e2; - } }, { key: "searchCloudMessages", value: function(i2) { - var a2 = this, e2 = "searchCloudMessages", s2 = "".concat(this._n, ".").concat(e2); - if (!i2) - return D({ code: L.OPTIONS_IS_EMPTY, message: this.getErrMsg(L.OPTIONS_IS_EMPTY, e2) }); - var r2, c2, u2, t2 = i2.keywordList, n2 = i2.keywordListMatchType, o2 = i2.conversationID, l2 = i2.cursor, d2 = O(i2.senderUserIDList) && 0 < i2.senderUserIDList.length, p2 = O(i2.messageTypeList) && 0 < i2.messageTypeList.length; - if (t2 || d2 || p2) - return r2 = Date.now(), c2 = new G(e2), u2 = "keywordList:".concat(t2, " keywordListMatchType:").concat(n2, " ") + "convID:".concat(o2, " cursor:").concat(l2), M.l("".concat(s2, " ").concat(u2)), this.req({ P: k.MSG_CLOUD_SEARCH, data: this._generateSearchdata(i2) }).then(function(e3) { - var t3 = e3.data, n3 = t3.code, t3 = t3.message; - if (0 !== n3) - return t3 = a2.getErrMsg(60020 === n3 ? "SearchCloudMessagesUnavailable" : n3) || t3, n3 = new E({ code: n3, message: t3 }), c2.setMessage(u2).setError(n3).end(), D(n3); - a2.get(27).isSearchCloudMessagesEnabled(); - var t3 = e3.data, n3 = t3.cursor, e3 = t3.totalCount, t3 = t3.searchResult, o3 = "totalCount:".concat(e3, " cost:").concat(nn(r2)), o3 = (M.l("".concat(s2, " ok. cursor:").concat(n3, " ").concat(o3)), c2.setMessage("".concat(u2, " ").concat(o3)).end(), a2._handleSearchResults(t3, !i2.conversationID)); - return C({ searchResultList: o3, cursor: n3, totalCount: e3 }); - }).catch(function(e3) { - return c2.setMessage(u2).setError(e3).end(), D(e3); - }); - throw M.e("[".concat(e2, '] Missing required params: "keywordList".')), new Error("Params validate failed."); - } }, { key: "_handleSearchResults", value: function(e2, a2) { - var s2 = this.get(11); - return O(e2) && 0 !== e2.length ? e2.map(function(e3) { - var t2 = e3.groupID, n2 = e3.userID, o2 = e3.messageCount, e3 = e3.messageList, e3 = void 0 === e3 ? [] : e3, n2 = t2 ? "".concat(A.CONV_GROUP).concat(t2) : "".concat(A.CONV_C2C).concat(n2), i2 = { conversationID: n2, messageCount: o2, messageList: [] }; - return a2 && 1 < o2 || 0 < (o2 = e3.filter(function(e4) { - return !!e4; - })).length && (e3 = s2.onRoamingMessage(o2, n2, false), t2 && e3.reverse(), i2.messageList = e3, i2.messageCount = e3.length), i2; - }) : []; - } }, { key: "_onModifyRemoteMessageResp", value: function(e2, t2) { - M.d("".concat(this._n, "._onModifyRemoteMessageResp options:"), t2); - var n2 = e2.conversationType, o2 = e2.from, i2 = e2.to, a2 = e2.random, s2 = e2.sequence, e2 = e2.time, r2 = t2.elements, c2 = t2.messageVersion, t2 = t2.cloudCustomData, t2 = void 0 === t2 ? "" : t2; - return this.get(11).onMessageModified({ conversationType: n2, from: o2, to: i2, time: e2, random: a2, sequence: s2, elements: r2, cloudCustomData: t2, messageVersion: c2 }); - } }, { key: "_generateUUID", value: function(e2) { - var t2 = this.get(12), t2 = "".concat(t2.getSDKAppID(), "-").concat(t2.getUserID(), "-").concat(mt()), e2 = e2.name || e2.value || e2.url || e2.tempFilePath, e2 = e2 && e2.slice(e2.lastIndexOf(".") + 1); - return t2 = e2 ? "".concat(t2, ".").concat(e2) : t2; - } }, { key: "getMessageOption", value: function(e2) { - return this._messageOptionsMap.get(e2); - } }, { key: "_getNickAndAvatarByUserID", value: function(e2) { - return this.get(4).getNickAndAvatarByUserID(e2); - } }, { key: "_getNameCardByGroupID", value: function(e2) { - if (e2.conversationType === A.CONV_GROUP) { - var t2 = this.get(7); - if (t2) - return t2.getMyNameCardByGroupID(e2.to); - } - return ""; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._messageOptionsMap.clear(); - } }]), za), Fa = (t(Ja, u), Pa = n(Ja), e(Ja, [{ key: "onMsgExtNotify", value: function(e2) { - var o2 = this, e2 = e2.dataList, t2 = e2.messageInfo, i2 = e2.operateType, n2 = e2.operateResultList, a2 = e2.tinyID, e2 = e2.globalSequence, s2 = t2.clientTime, t2 = t2.random, r2 = "".concat(a2, "-").concat(s2, "-").concat(t2), c2 = [], u2 = [], l2 = (M.l("".concat(this._n, ".onMsgExtNotify messageID:").concat(r2, " operateType:").concat(i2, " globalSequence:").concat(e2)), this._updateGlobalSeq(r2, e2), false), d2 = false; - n2.forEach(function(e3) { - var t3 = e3.extensions, t3 = void 0 === t3 ? [] : t3, n3 = e3.clearSequence; - 1 === i2 ? (l2 = true, t3.forEach(function(e4) { - c2.push({ key: e4.key, value: e4.value }); - }), o2._updateLocalExt(r2, t3)) : 2 === i2 ? (d2 = true, t3.forEach(function(e4) { - u2.push(e4.key); - }), o2._updateLocalExt(r2, t3)) : 3 === i2 && (d2 = true, o2._hasLocalExt(r2) && o2._getLocalExt(r2).forEach(function(e4, t4) { - e4.seq <= n3 && !S(e4.value) && u2.push(t4); - }), o2._clearLocalExt(r2, n3)); - }), l2 && this.emitOEvt(h.MESSAGE_EXTENSIONS_UPDATED, { messageID: r2, extensions: c2 }), d2 && this.emitOEvt(h.MESSAGE_EXTENSIONS_DELETED, { messageID: r2, keyList: u2 }); - } }, { key: "setMessageExtensions", value: function(e2, t2) { - var o2, n2, i2, a2, s2, r2, c2, u2 = "setMessageExtensions"; - return this.canIUse(_.MSG_EXT) ? (o2 = "".concat(this._n, ".").concat(u2), n2 = e2.ID, i2 = e2.conversationID, a2 = e2.sequence, s2 = e2.time, r2 = p(t2), 20 < t2.length && (r2 = t2.slice(0, 20), M.w("".concat(o2, ". the length of extensions cannot exceed 20."))), t2 = "convID:".concat(i2, " messageID:").concat(n2, " sequence:").concat(a2, " time:").concat(s2, " count:").concat(r2.length), (c2 = new G(u2)).setMessage(t2), M.l("".concat(o2, " ").concat(t2)), this._modifyMsgExts(e2, r2).then(function(e3) { - var t3 = e3.resultList, n3 = e3.successCount, e3 = e3.failureCount, n3 = "successCount:".concat(n3, " failCount:").concat(e3); - return c2.setMoreMessage(n3).end(), M.l("".concat(o2, " ok. ").concat(n3)), C({ extensions: t3 }); - }).catch(function(e3) { - return c2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - })) : this.noUse(u2); - } }, { key: "getMessageExtensions", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2, c2 = this, u2 = "getMessageExtensions"; - return this.canIUse(_.MSG_EXT) ? (t2 = "".concat(this._n, ".").concat(u2), n2 = e2.ID, a2 = e2.conversationID, o2 = e2.sequence, i2 = e2.time, a2 = "convID:".concat(a2, " messageID:").concat(n2, " sequence:").concat(o2, " time:").concat(i2), (s2 = new G(u2)).setMessage(a2), r2 = void M.l("".concat(t2, " ").concat(a2)), this.getMsgExtsMap.has(n2) && (r2 = this._getGlobalSeq(n2)), this._getMsgExts(e2, r2).then(function(e3) { - return s2.end(), M.l("".concat(t2, " ok. extCount:").concat(e3.length)), N(r2) && 0 < e3.length && c2.getMsgExtsMap.set(n2, 1), C({ extensions: e3 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this.noUse(u2); - } }, { key: "deleteMessageExtensions", value: function(e2, t2) { - var i2, n2, a2, o2, s2, r2, c2, u2 = "deleteMessageExtensions"; - return this.canIUse(_.MSG_EXT) ? (i2 = "".concat(this._n, ".").concat(u2), n2 = [], a2 = 3, S(t2) || (a2 = 2, t2.forEach(function(e3) { - n2.push({ key: e3, value: "", seq: 0 }); - })), t2 = e2.ID, r2 = e2.conversationID, o2 = e2.sequence, s2 = e2.time, r2 = "convID:".concat(r2, " messageID:").concat(t2, " sequence:").concat(o2, " time:").concat(s2, " operateType:").concat(a2), (c2 = new G(u2)).setMessage(r2), M.l("".concat(i2, " ").concat(r2)), this._modifyMsgExts(e2, n2, a2).then(function(e3) { - var t3 = e3.resultList, n3 = e3.successCount, e3 = e3.failureCount, o3 = ""; - return 2 === a2 && (o3 = "success count:".concat(n3, " fail count:").concat(e3)), c2.setMoreMessage("".concat(o3)).end(), M.l("".concat(i2, " ok. ").concat(o3)), C({ extensions: t3 }); - }).catch(function(e3) { - return c2.setError(e3).end(), M.e("".concat(i2, " failed. error:"), e3), D(e3); - })) : this.noUse(u2); - } }, { key: "_modifyMsgExts", value: function(n2, e2) { - var o2 = this, t2 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 1, i2 = Gt(n2.to) ? A.CONV_TOPIC : n2.conversationType, a2 = void 0, s2 = (3 !== t2 && (a2 = this._getReqExts(n2, e2)), null); - switch (i2) { - case A.CONV_C2C: - s2 = this.get(6); - break; - case A.CONV_GROUP: - s2 = this.get(7); - break; - case A.CONV_TOPIC: - s2 = this.get(10); - break; - default: - return D({ code: L.NO_MODULE }); - } - return s2.modifyMsgExts(n2, a2, t2).then(function(e3) { - var e3 = e3.data, t3 = e3.extensions, e3 = e3.seq, i3 = [], a3 = 0, s3 = 0, r2 = []; - return (t3 = S(t3) ? [] : t3).forEach(function(e4) { - var t4 = e4.errorCode, e4 = e4.extension, n3 = e4.key, o3 = e4.value, e4 = e4.seq; - i3.push({ code: t4, key: n3, value: o3 }), 0 === t4 ? a3++ : s3++, r2.push({ key: n3, value: o3, seq: e4 }); - }), o2._updateGlobalSeq(n2.ID, e3), 0 < r2.length && (o2._updateLocalExt(n2.ID, r2), r2 = null), { resultList: i3, successCount: a3, failureCount: s3 }; - }).catch(function(e3) { - return D(e3); - }); - } }, { key: "_getReqExts", value: function(e2, t2) { - var o2, i2 = []; - return this._hasLocalExt(e2.ID) ? (o2 = this._getLocalExt(e2.ID), t2.forEach(function(e3) { - var t3 = e3.key, e3 = e3.value, n2 = 0; - o2.has(t3) && (n2 = o2.get(t3).seq), i2.push({ key: t3, value: e3, seq: n2 }); - })) : t2.forEach(function(e3) { - var t3 = e3.key, e3 = e3.value; - i2.push({ key: t3, value: e3, seq: 0 }); - }), i2; - } }, { key: "_getMsgExts", value: function(i2, e2) { - var a2 = this, s2 = "".concat(this._n, "._getMsgExts"), r2 = i2.ID, t2 = i2.to, n2 = null; - switch (Gt(t2) ? A.CONV_TOPIC : i2.conversationType) { - case A.CONV_C2C: - n2 = this.get(6); - break; - case A.CONV_GROUP: - n2 = this.get(7); - break; - case A.CONV_TOPIC: - n2 = this.get(10); - break; - default: - return D({ code: L.NO_MODULE }); - } - return n2.getMessageExtensions(i2, e2).then(function(e3) { - var e3 = e3.data, t3 = e3.extensions, n3 = e3.completeFlag, o2 = e3.globalSequence, e3 = e3.clearSequence, t3 = S(t3) ? [] : t3; - return M.l("".concat(s2, " ok. completeFlag:").concat(n3, " globalSequence:").concat(o2, " clearSequence:").concat(e3, " count:").concat(t3.length)), a2._updateLocalExt(r2, t3), a2._clearLocalExt(r2, e3), a2._updateGlobalSeq(r2, o2), 1 !== n3 ? (e3 = t3.slice(-1)[0].seq + 1, a2._getMsgExts(i2, e3)) : a2._getLocalExtList(r2); - }).catch(function(e3) { - return D(e3); - }); - } }, { key: "_hasLocalExt", value: function(e2) { - return this.msgExtMap.has(e2); - } }, { key: "_getLocalExt", value: function(e2) { - return this.msgExtMap.get(e2); - } }, { key: "_updateLocalExt", value: function(e2, t2) { - this._hasLocalExt(e2) || this.msgExtMap.set(e2, /* @__PURE__ */ new Map()); - var o2 = this._getLocalExt(e2); - t2.forEach(function(e3) { - var t3 = e3.key, n2 = e3.value, e3 = e3.seq; - o2.set(t3, { value: void 0 === n2 ? "" : n2, seq: e3 }); - }); - } }, { key: "_clearLocalExt", value: function(e2, n2) { - var o2; - n2 <= 0 || !this._hasLocalExt(e2) || (o2 = this._getLocalExt(e2)).forEach(function(e3, t2) { - e3.seq <= n2 && o2.delete(t2); - }); - } }, { key: "_getLocalExtList", value: function(e2) { - var n2 = []; - return this._hasLocalExt(e2) && this._getLocalExt(e2).forEach(function(e3, t2) { - e3 = e3.value; - S(e3) || n2.push({ key: t2, value: e3 }); - }), n2; - } }, { key: "_getGlobalSeq", value: function(e2) { - return this.globalSeqMap.get(e2); - } }, { key: "_updateGlobalSeq", value: function(e2, t2) { - this.globalSeqMap.set(e2, t2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this.msgExtMap.clear(), this.globalSeqMap.clear(), this.getMsgExtsMap.clear(); - } }]), Ja), qa = (t(ja, u), Ga = n(ja), e(ja, [{ key: "onReactionNotifyList", value: function(e2) { - var a2 = this, e2 = (e2 || {}).dataList; - (void 0 === e2 ? [] : e2).forEach(function(e3) { - var t2 = e3.C2CMessageInfo, n2 = e3.groupMessageInfo, n2 = void 0 === n2 ? {} : n2, e3 = e3.reactionList, e3 = void 0 === e3 ? [] : e3, t2 = y(y({}, void 0 === t2 ? {} : t2), n2), n2 = t2.tinyID, o2 = t2.clientTime, t2 = t2.random, n2 = "".concat(n2, "-").concat(o2, "-").concat(t2), i2 = []; - e3.forEach(function(e4) { - N(e4.userIDList) && (e4.userIDList = [], e4.count = 0), i2.push.apply(i2, p(e4.userIDList)); - }), M.l("".concat(a2._n, ".onReactionNotifyList messageID:").concat(n2, " reactionList:").concat(e3.length)), a2._handleReactionSummary([{ messageID: n2, reactionList: e3 }], i2).then(function(e4) { - a2.emitOEvt(h.MESSAGE_REACTIONS_UPDATED, y({}, e4[0])); - }); - }); - } }, { key: "onReactionNotify", value: function(e2) { - var e2 = e2.dataList || {}, t2 = e2.C2CMessageInfo, n2 = e2.groupMessageInfo, n2 = void 0 === n2 ? {} : n2, o2 = e2.reactionID, e2 = e2.operateType, t2 = y(y({}, void 0 === t2 ? {} : t2), n2), n2 = t2.tinyID, i2 = t2.clientTime, t2 = t2.random, n2 = "".concat(n2, "-").concat(i2, "-").concat(t2), i2 = (M.l("".concat(this._n, ".onReactionNotify messageID:").concat(n2, " reactionID:").concat(o2, " operateType:").concat(e2)), 1 === e2 ? this._addReactedByMyselfMap(n2, o2) : this._removeReactedByMyselfMap(n2, o2), "".concat(n2, "-").concat(o2)); - this._reactionInfoMap.has(i2) && ((t2 = this._reactionInfoMap.get(i2)).reactedByMyself = 1 === e2, this.emitOEvt(h.MESSAGE_REACTIONS_UPDATED, { messageID: n2, reactionList: [t2] })); - } }, { key: "addMessageReaction", value: function(t2, n2) { - var o2, e2, i2, a2, s2 = this, r2 = "addMessageReaction"; - return this.canIUse(_.MSG_REACTION) ? (o2 = "".concat(this._n, ".").concat(r2), a2 = t2.ID, e2 = t2.conversationID, e2 = "convID:".concat(e2, " messageID:").concat(a2, " reactionID:").concat(n2), (i2 = new G(r2)).setMessage(e2), M.l("".concat(o2, " ").concat(e2)), a2 = this._createReactionOperationPack(t2, n2, 1), this._addReactedByMyselfMap(t2.ID, n2), this.req(a2).then(function() { - return i2.end(), M.l("".concat(o2, " ok.")), C(); - }).catch(function(e3) { - return s2._removeReactedByMyselfMap(t2.ID, n2), i2.setError(e3).end(), M.e("".concat(o2, " failed. error:"), e3), D(e3); - })) : this.noUse(r2); - } }, { key: "removeMessageReaction", value: function(e2, t2) { - var n2, o2, i2, a2, s2 = "removeMessageReaction"; - return this.canIUse(_.MSG_REACTION) ? (n2 = "".concat(this._n, ".").concat(s2), a2 = e2.ID, o2 = e2.conversationID, o2 = "convID:".concat(o2, " messageID:").concat(a2, " reactionID:").concat(t2), (i2 = new G(s2)).setMessage(o2), M.l("".concat(n2, " ").concat(o2)), a2 = this._createReactionOperationPack(e2, t2, 2), this._removeReactedByMyselfMap(e2.ID, t2), this.req(a2).then(function() { - return i2.end(), M.l("".concat(n2, " ok.")), C(); - }).catch(function(e3) { - return i2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3), D(e3); - })) : this.noUse(s2); - } }, { key: "getMessageReactions", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2 = this, c2 = "getMessageReactions"; - return this.canIUse(_.MSG_REACTION) ? (t2 = "".concat(this._n, ".").concat(c2), n2 = e2.messageList, s2 = e2.maxUserCountPerReaction, o2 = n2[0].conversationID, o2 = "convID:".concat(o2, " maxUserCountPerReaction:").concat(s2, " msgCount:").concat(n2.length), (i2 = new G(c2)).setMessage(o2), M.l("".concat(t2, " ").concat(o2)), a2 = /* @__PURE__ */ new Map(), s2 = this._createReactionSummaryPack(y(y({}, e2), {}, { messageIDMap: a2 })), this.req(s2).then(function(e3) { - var e3 = e3.data.resultList, o3 = [], i3 = []; - return (void 0 === e3 ? [] : e3).forEach(function(e4) { - var t3 = e4.messageKey, t3 = void 0 === t3 ? void 0 : t3, n3 = e4.messageSequence, n3 = void 0 === n3 ? void 0 : n3, e4 = e4.reactionList, e4 = void 0 === e4 ? [] : e4, n3 = N(t3) ? a2.get(n3) : a2.get(t3); - o3.push({ messageID: n3, reactionList: e4 }), e4.forEach(function(e5) { - i3.push.apply(i3, p(e5.userIDList)); - }); - }), r2._handleReactionSummary(o3, i3); - }).then(function(e3) { - return i2.end(), M.l("".concat(t2, " ok.")), a2.clear(), C({ resultList: e3 }); - }).catch(function(e3) { - return i2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this.noUse(c2); - } }, { key: "getAllUserListOfMessageReaction", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2, c2, u2 = this, l2 = "getAllUserListOfMessageReaction"; - return this.canIUse(_.MSG_REACTION) ? (t2 = "".concat(this._n, ".").concat(l2), a2 = e2.message, n2 = e2.reactionID, o2 = e2.nextSeq, i2 = e2.count, c2 = a2.ID, a2 = a2.conversationID, a2 = "convID:".concat(a2, " messageID:").concat(c2, " reactionID:").concat(n2, " nextSeq:").concat(o2, " count:").concat(i2), (s2 = new G(l2)).setMessage(a2), M.l("".concat(t2, " ").concat(a2)), r2 = { userList: [], nextSeq: 0, isCompleted: false }, c2 = this._createReactionUserListPack(e2), this.req(c2).then(function(e3) { - var e3 = e3.data, t3 = e3.userIDList, t3 = void 0 === t3 ? [] : t3, e3 = e3.nextSeq, e3 = void 0 === e3 ? 0 : e3; - return r2.nextSeq = e3, r2.isCompleted = 0 === e3, u2.get(4).getUserNickAndAvatar(t3); - }).then(function(e3) { - return r2.userList = e3, s2.end(), M.l("".concat(t2, " ok.")), C(r2); - }).catch(function(e3) { - return s2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this.noUse(l2); - } }, { key: "_createReactionOperationPack", value: function(e2, t2, n2) { - var o2, i2, a2 = void 0, t2 = { reactionID: t2, userIDList: [this.getMyUserID()] }; - return e2.conversationType === A.CONV_C2C && (o2 = this.get(6), a2 = 1 === n2 ? k.ADD_C2C_MSG_REACTION : k.RM_C2C_MSG_REACTION, t2.from = e2.from, t2.to = e2.to, t2.messageKey = o2.getMessageKey(e2)), e2.conversationType === A.CONV_GROUP && (o2 = void 0, i2 = e2.to, Gt(e2.to) && (i2 = Jt(o2 = e2.to)), a2 = 1 === n2 ? k.ADD_GRP_MSG_REACTION : k.RM_GRP_MSG_REACTION, t2.groupID = i2, t2.topicID = o2, t2.messageSequence = e2.sequence), { P: a2, data: t2 }; - } }, { key: "_createReactionSummaryPack", value: function(e2) { - var n2, t2, o2, i2 = e2.messageList, a2 = e2.maxUserCountPerReaction, a2 = void 0 === a2 ? 10 : a2, s2 = e2.messageIDMap, e2 = i2[0], r2 = void 0, c2 = void 0; - return e2.conversationType === A.CONV_C2C && (n2 = this.get(6), t2 = i2.map(function(e3) { - var t3 = n2.getMessageKey(e3); - return s2.set(t3, e3.ID), t3; - }), r2 = k.GET_C2C_MSG_REACTIONS, c2 = { from: e2.from, to: e2.to, messageKeyList: t2, count: a2 }), e2.conversationType === A.CONV_GROUP && (t2 = void 0, o2 = e2.to, Gt(e2.to) && (o2 = Jt(t2 = e2.to)), e2 = i2.map(function(e3) { - return s2.set(e3.sequence, e3.ID), e3.sequence; - }), r2 = k.GET_GRP_MSG_REACTIONS, c2 = { groupID: o2, topicID: t2, messageSequenceList: e2, count: a2 }), { P: r2, data: c2 }; - } }, { key: "_createReactionUserListPack", value: function(e2) { - var t2 = e2.message, n2 = e2.reactionID, o2 = e2.nextSeq, e2 = e2.count, e2 = void 0 === e2 ? 100 : e2, i2 = void 0, n2 = { reactionID: n2, nextSeq: void 0 === o2 ? 0 : o2, count: 100 < e2 ? 100 : e2 }; - return t2.conversationType === A.CONV_C2C && (o2 = this.get(6), i2 = k.GET_C2C_MSG_REACTION_USER_LIST, n2.from = t2.from, n2.to = t2.to, n2.messageKey = o2.getMessageKey(t2)), t2.conversationType === A.CONV_GROUP && (e2 = void 0, o2 = t2.to, Gt(t2.to) && (o2 = Jt(e2 = t2.to)), i2 = k.GET_GRP_MSG_REACTION_USER_LIST, n2.groupID = o2, n2.topicID = e2, n2.messageSequence = t2.sequence), { P: i2, data: n2 }; - } }, { key: "_handleReactionSummary", value: function(t2, e2) { - var c2 = this; - return this.get(4).getUserNickAndAvatar(e2).then(function(r2) { - var e3 = []; - return t2.forEach(function(a2) { - var s2 = []; - a2.reactionList.forEach(function(e4) { - var t3 = e4.reactionID, n2 = e4.count, o2 = e4.userIDList, e4 = e4.reactedByMyself, e4 = void 0 === e4 ? void 0 : e4, i2 = [], o2 = (o2.forEach(function(t4) { - r2.forEach(function(e5) { - t4 === e5.userID && i2.push(e5); - }); - }), { reactionID: t3, totalUserCount: n2, partialUserList: i2, reactedByMyself: c2._computeReactedByMyself({ reactedByMyself: e4, messageID: a2.messageID, reactionID: t3 }) }); - s2.push(o2), N(e4) && !c2._reactedByMyselfMap.has(a2.messageID) && (n2 = "".concat(a2.messageID, "-").concat(t3), c2._reactionInfoMap.set(n2, o2)); - }), e3.push({ messageID: a2.messageID, reactionList: s2 }); - }), e3; - }); - } }, { key: "_addReactedByMyselfMap", value: function(e2, t2) { - this._reactedByMyselfMap.has(e2) || this._reactedByMyselfMap.set(e2, []); - e2 = this._reactedByMyselfMap.get(e2); - -1 === e2.indexOf(t2) && e2.push(t2); - } }, { key: "_removeReactedByMyselfMap", value: function(e2, t2) { - this._reactedByMyselfMap.has(e2) && -1 < (t2 = (e2 = this._reactedByMyselfMap.get(e2)).indexOf(t2)) && e2.splice(t2, 1); - } }, { key: "_computeReactedByMyself", value: function(e2) { - var t2 = e2.reactedByMyself, n2 = e2.messageID, e2 = e2.reactionID; - return N(t2) ? !!this._reactedByMyselfMap.has(n2) && this._reactedByMyselfMap.get(n2).includes(e2) : 1 === t2; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._reactedByMyselfMap.clear(), this._reactionInfoMap.clear(); - } }]), ja), xa = (t(Wa, u), Na = n(Wa), e(Wa, [{ key: "sendMessage", value: function(e2) { - var o2 = this, i2 = this._createMsg(e2); - if (null === i2) - return D({ code: L.MSG_SEND_FAIL }); - this._addSendMessageTotalCount(i2); - var a2 = Date.now(); - return this.get(11).setMessageRandom(i2), this._sendComboMessage(i2, e2).then(function(e3) { - var e3 = e3.data, t2 = e3.time, n2 = e3.sequence, e3 = e3.readReceiptCode, e3 = (R(e3) && 0 !== e3 && (new G("sendMessageWithReceipt").setMessage("from:".concat(i2.from, " to:").concat(i2.to, " sequence:").concat(n2, " readReceiptCode:").concat(e3)).end(), M.w("".concat(o2._n, ".sendMessage readReceiptCode:").concat(e3, " message:").concat(o2.getErrMsg(e3)))), o2._addSendMessageSuccessCount(i2, a2), o2.get(11)), t2 = (i2.status = Rn, i2.time = t2, i2.conversationType === A.CONV_GROUP && (i2.sequence = n2), e3.appendToMessageList(i2), i2); - return true === i2._isExcludedFromLastMessage && (t2 = ""), e3.onMessageSent({ conversationOptionsList: [{ conversationID: i2.conversationID, unreadCount: 0, type: i2.conversationType, subType: i2.conversationSubType, lastMessage: t2 }] }), C({ message: i2 }); - }).catch(function(e3) { - return o2._onSendMessageFailed(i2, e3); - }); - } }, { key: "_sendComboMessage", value: function(e2, t2) { - var n2 = this._m.get(20), o2 = ""; - return e2.conversationType === A.CONV_C2C && (o2 = "".concat(a.NAME.OPEN_IM, ".").concat(k.SEND_C2C_MSG)), e2.conversationType === A.CONV_GROUP && (o2 = "".concat(a.NAME.GRP, ".").concat(k.SEND_GRP_MSG)), n2.sendComboMessage({ servcmd: o2, data: t2 }); - } }, { key: "_createMsg", value: function(e2) { - var t2 = "".concat(this._n, "._createMsg"), n2 = null; - try { - var o2, i2 = this.getMyUserID(), a2 = {}; - a2.senderTinyID = this.getMyTinyID(), a2.currentUser = i2, a2.from = e2.From_Account || i2, e2.GroupId ? (a2.conversationID = "".concat(A.CONV_GROUP).concat(e2.GroupId), a2.conversationType = A.CONV_GROUP, a2.to = e2.GroupId) : e2.To_Account && (a2.conversationID = "".concat(A.CONV_C2C).concat(e2.To_Account), a2.conversationType = A.CONV_C2C, a2.to = e2.To_Account), a2.time = e2.MsgTimeStamp || 0, a2.random = e2.Random || e2.MsgRandom || 0, a2.priority = e2.MsgPriority, m(e2.CloudCustomData) && 0 < e2.CloudCustomData.length && (a2.cloudCustomData = e2.CloudCustomData), O(e2.SendMsgControl) && (a2.messageControlInfo = {}, e2.SendMsgControl.includes("NoUnread") && (a2.messageControlInfo.excludedFromUnreadCount = 1), e2.SendMsgControl.includes("NoLastMsg")) && (a2.messageControlInfo.excludedFromLastMessage = 1), a2.conversationType === A.CONV_GROUP && O(e2.To_Account) && 0 < e2.To_Account.length && (o2 = e2.To_Account, 50 < e2.To_Account.length && (o2 = e2.To_Account.slice(0, 50), M.w("".concat(t2, " To_Account must be less than or equal to 50."))), a2.receiverList = p(o2), e2.To_Account = p(o2)), 1 !== e2.IsNeedReadReceipt && 1 !== e2.NeedReadReceipt || (a2.needReadReceipt = true), 1 === e2.SupportMessageExtension && (a2.isSupportExtension = true), (n2 = new Do(a2)).status = An, e2.MsgClientTime = n2.clientTime, n2.conversationType === A.CONV_C2C && (e2.MsgSeq = n2.sequence); - for (var s2, r2 = e2.MsgBody.length, c2 = 0; c2 < r2; c2++) - "TIMTextElem" === (s2 = e2.MsgBody[c2]).MsgType ? n2.setTextElement(s2.MsgContent.Text) : "TIMCustomElem" === s2.MsgType ? n2.setCustomElement({ data: s2.MsgContent.Data || "", description: s2.MsgContent.Desc || "", extension: s2.MsgContent.Ext || "" }) : "TIMFaceElem" === s2.MsgType && n2.setFaceElement({ index: s2.MsgContent.Index, data: s2.MsgContent.Data }); - var u2 = n2.getElements(); - n2.payload = u2[0].content, n2.type = u2[0].type; - } catch (e3) { - n2 = null, M.e("".concat(t2, " failed. error:"), e3); - } - return n2; - } }, { key: "_onSendMessageFailed", value: function(e2, t2) { - e2.status = On, this.get(11).deleteMessageRandom(e2), this._addSendMessageFailCountOnUser(e2, t2); - var n2 = new G("sendMessage"), o2 = "head.seq:".concat(t2.data.headSeq, " type:").concat(e2.type, " from:").concat(e2.from, " to:").concat(e2.to); - return n2.setMessage(o2).setError(t2).end(), M.e("".concat(this._n, "._onSendMessageFailed ").concat(o2, " error:"), t2), D(new E({ code: t2 && t2.code ? t2.code : L.MSG_SEND_FAIL, message: t2 && t2.message ? t2.message : void 0, data: { message: e2 } })); - } }, { key: "_getSendMessageSpecifiedKey", value: function(e2) { - if (e2.conversationType === A.CONV_C2C) - return Hn; - if (e2.conversationType === A.CONV_GROUP) { - var e2 = this.get(7).getLocalGroupProfile(e2.to); - if (e2) - return e2 = e2.type, Ot(e2) ? Kn : Bn; - } - } }, { key: "_addSendMessageTotalCount", value: function(e2) { - e2 = this._getSendMessageSpecifiedKey(e2); - e2 && this.get(26).addTotalCount(e2); - } }, { key: "_addSendMessageSuccessCount", value: function(e2, t2) { - var n2, e2 = this._getSendMessageSpecifiedKey(e2); - e2 && ((n2 = this.get(26)).addSuccessCount(e2), n2.addCost(e2, nn(t2, false))); - } }, { key: "_addSendMessageFailCountOnUser", value: function(e2, t2) { - var t2 = t2.code, t2 = void 0 === t2 ? -1 : t2, n2 = this.get(26), e2 = this._getSendMessageSpecifiedKey(e2); - Aa(t2) && e2 && n2.addFailedCountOfUserSide(e2); - } }]), Wa), Va = (t(Ya, u), Oa = n(Ya), e(Ya, [{ key: "registerPlugin", value: function(t2) { - var n2 = this, o2 = "0"; - Object.keys(t2).forEach(function(e2) { - n2.plugins[e2] = t2[e2], "tim-upload-plugin" === e2 && "function" == typeof t2[e2].getVersion && (o2 = t2[e2].getVersion()); - }), new G("registerPlugin").setMessage("".concat(Object.keys(t2))).setMoreMessage("version:".concat(o2)).end(); - } }, { key: "getPlugin", value: function(e2) { - return this.plugins[e2]; - } }, { key: "reset", value: function() { - } }]), Ya), Ha = (t(Ka, u), Ra = n(Ka), e(Ka, [{ key: "_init", value: function() { - this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 }); - } }, { key: "_startSync", value: function(e2) { - var i2 = this, t2 = e2.cookie, n2 = e2.syncFlag, o2 = e2.isOnlineSync, a2 = "".concat(this._n, "._startSync"), s2 = (M.l("".concat(a2, " options:"), e2), new G("syncUnread")); - s2.setMessage(JSON.stringify(e2)), this.req({ P: k.SYNC_UNREAD_MSG, data: { cookie: t2, syncFlag: n2, isOnlineSync: o2 } }).then(function(e3) { - var t3 = e3.data, n3 = t3.cookie, t3 = t3.syncFlag, o3 = "$cookie:".concat(n3, " syncFlag:").concat(t3); - M.l("".concat(a2, " ok. ").concat(o3)), i2._cookie = n3, s2.setMoreMessage(o3).end(), S(n3) || (0 === t3 || 1 === t3 ? (i2._dispatch(y(y({}, e3.data), {}, { isSyncingEnded: false })), i2._startSync({ cookie: n3, syncFlag: t3, isOnlineSync: 0 })) : 2 === t3 && i2._dispatch(y(y({}, e3.data), {}, { isSyncingEnded: true }))); - }).catch(function(e3) { - s2.setError(e3).end(), M.e("".concat(a2, " failed. error:"), e3); - }); - } }, { key: "_dispatch", value: function(e2) { - e2.eventArray && this.get(20).onMessage({ head: {}, body: { eventArray: e2.eventArray, isInstantMessage: this._onlineSyncFlag, isSyncingEnded: e2.isSyncingEnded } }), this.get(6).onNewMessage({ dataList: e2.messageList, isInstantMessage: !!e2.isSyncingEnded && this._onlineSyncFlag, C2CRemainingUnreadList: e2.C2CRemainingUnreadList, C2CPairUnreadList: e2.C2CPairUnreadList, isSyncingEnded: e2.isSyncingEnded }); - } }, { key: "syncOnNeed", value: function() { - M.l("".concat(this._n, ".syncOnNeed cookie:").concat(this._cookie)), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 1 }); - } }, { key: "syncOnReconnected", value: function() { - M.l("".concat(this._n, ".syncOnReconnected cookie:").concat(this._cookie)), this._onlineSyncFlag = true, this._startSync({ cookie: this._cookie, syncFlag: 0, isOnlineSync: 0 }); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._onlineSyncFlag = false, this._cookie = ""; - } }]), Ka), Ba = { req: { toAccount: "To_Account", fromAccount: "From_Account", to: "To_Account", from: "From_Account", groupID: "GroupId", groupAtUserID: "GroupAt_Account", extension: "Ext", data: "Data", description: "Desc", elements: "MsgBody", sizeType: "Type", downloadFlag: "Download_Flag", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", videoUrl: "", imageUrl: "URL", fileUrl: "Url", uuid: "UUID", priority: "MsgPriority", receiverUserID: "To_Account", receiverGroupID: "GroupId", messageSender: "SenderId", messageReceiver: "ReceiverId", nick: "From_AccountNick", avatar: "From_AccountHeadurl", messageNumber: "MsgNum", pbDownloadKey: "PbMsgKey", downloadKey: "JsonMsgKey", applicationType: "PendencyType", userIDList: "To_Account", groupNameList: "GroupName", userID: "To_Account", groupAttributeList: "GroupAttr", mainSequence: "AttrMainSeq", avChatRoomKey: "BytesKey", attributeControl: "AttrControl", sequence: "seq", messageControlInfo: "SendMsgControl", updateSequence: "UpdateSeq", clientTime: "MsgClientTime", sequenceList: "MsgSeqList", topicID: "TopicId", customData: "CustomString", isSupportTopic: "SupportTopic", isWebUniapp: "is_web_uniapp", isSupportExtension: "SupportMessageExtension", messageSequence: "MsgSeq", messageKey: "MsgKey", startSequence: "startSeq", simplifiedMessage: "DownsizeFlag", isRelayMessage: "IsRelayMsg", reactionID: "Reaction", messageSequenceList: "MsgSeqList", messageKeyList: "MsgKeyList", cmConfigID: "CustomModerationConfigID" }, res: { MsgPriority: "priority", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", Download_Flag: "downloadFlag", GroupId: "groupID", Member_Account: "userID", MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", MsgSeq: "sequence", MsgRandom: "random", MsgTime: "time", MsgTimeStamp: "time", MsgContent: "content", MsgBody: "elements", From_AccountNick: "nick", From_AccountHeadurl: "avatar", GroupWithdrawInfoArray: "revokedInfos", GroupReadInfoArray: "groupMessageReadNotice", LastReadMsgSeq: "lastMessageSeq", WithdrawC2cMsgNotify: "c2cMessageRevokedNotify", C2cWithdrawInfoArray: "revokedInfos", C2cReadedReceipt: "c2cMessageReadReceipt", ReadC2cMsgNotify: "c2cMessageReadNotice", LastReadTime: "peerReadTime", MsgRand: "random", MsgType: "type", MsgShow: "messageShow", NextMsgSeq: "nextMessageSeq", FaceUrl: "avatar", ProfileDataMod: "profileModify", Profile_Account: "userID", ValueBytes: "value", ValueNum: "value", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgFrom_AccountExtraInfo: "messageFromAccountExtraInformation", Operator_Account: "operatorID", OpType: "operationType", ReportType: "operationType", UserId: "userID", User_Account: "userID", List_Account: "userIDList", MsgOperatorMemberExtraInfo: "operatorInfo", MsgMemberExtraInfo: "memberInfoList", ImageUrl: "avatar", NickName: "nick", MsgGroupNewInfo: "newGroupProfile", MsgAppDefinedData: "groupCustomField", Owner_Account: "ownerID", GroupFaceUrl: "avatar", GroupIntroduction: "introduction", GroupNotification: "notification", GroupApplyJoinOption: "joinOption", MsgKey: "messageKey", GroupInfo: "groupProfile", ShutupTime: "muteTime", Desc: "description", Ext: "extension", GroupAt_Account: "groupAtUserID", MsgNum: "messageNumber", PbMsgKey: "pbDownloadKey", JsonMsgKey: "downloadKey", MsgModifiedFlag: "isModified", PendencyItem: "applicationItem", PendencyType: "applicationType", AddTime: "time", AddSource: "source", AddWording: "wording", ProfileImImage: "avatar", PendencyAdd: "friendApplicationAdded", FrienPencydDel_Account: "friendApplicationDeletedUserIDList", Peer_Account: "userID", GroupAttr: "groupAttributeList", GroupAttrAry: "groupAttributeList", AttrMainSeq: "mainSequence", seq: "sequence", GroupAttrOption: "groupAttributeOption", BytesChangedKeys: "changedKeyList", GroupAttrInfo: "groupAttributeList", GroupAttrSeq: "mainSequence", PushChangedAttrValFlag: "isWithChangedAttributeInfo", SubKeySeq: "sequence", Val: "value", MsgGroupFromCardName: "senderNameCard", MsgGroupFromNickName: "senderNick", C2cNick: "peerNick", C2cImage: "peerAvatar", SendMsgControl: "messageControlInfo", NoLastMsg: "excludedFromLastMessage", NoUnread: "excludedFromUnreadCount", UpdateSeq: "updateSequence", MuteNotifications: "muteFlag", MsgClientTime: "clientTime", TinyId: "tinyID", GroupMsgReceiptList: "readReceiptList", ReadNum: "readCount", UnreadNum: "unreadCount", TopicId: "topicID", MillionGroupFlag: "communityType", SupportTopic: "isSupportTopic", MsgTopicNewInfo: "newTopicInfo", ShutupAll: "muteAllMembers", CustomString: "customData", TopicFaceUrl: "avatar", TopicIntroduction: "introduction", TopicNotification: "notification", TopicIdArray: "topicIDList", MsgVersion: "messageVersion", C2cMsgModNotifys: "c2cMessageModified", GroupMsgModNotifys: "groupMessageModified", ApplyJoinOption: "joinOption", MsgFlag: "messageRemindType", AtInfoList: "groupAtInfoList", AtFlagList: "groupAtType", AtMsgSeq: "sequence", BanDuration: "duration", BanDescription: "reason", NotVisible: "invisible", BytesTag: "tag", BytesValue: "value", RptBytesValue: "value", LatestSeq: "globalSequence", ClearSeq: "clearSequence", SupportMessageExtension: "isSupportExtension", ExtensionList: "extensions", GroupCounter: "counterList", Revoker_Account: "revoker", MsgExtensionNotify: "messageExtensionNotify", ExtensionC2cMsgInfo: "messageInfo", ExtensionGroupMsgInfo: "messageInfo", MsgOptType: "operateType", SetKVInfo: "operateResultList", DeleteKVInfo: "operateResultList", ClearKVInfo: "operateResultList", MsgKeyValue: "extensions", ClearMsgSeq: "clearSequence", MsgLastSeq: "globalSequence", InviteJoinOption: "inviteOption", MemberList_Account: "inviteeList", MsgMemberExtraInfoList: "inviteeInfoList", E: "event", GInf: "groupProfile", MCT: "clientTime", MR: "random", MP: "priority", MTS: "time", GId: "groupID", MS: "sequence", CCD: "cloudCustomData", F_Account: "from", F_Hd: "avatar", F_NN: "nick", GN: "groupName", GT: "groupType", IsSys: "isSystemMessage", OpInf: "operatorInfo", Img: "avatar", NN: "nick", OnlineInf: "onlineMemberInfo", ET: "expireTime", Num: "onlineMemberNum", Opt: "operationType", O_Account: "operatorID", RT: "operationType", UDF: "userDefinedField", L_Account: "userIDList", IsPlaceMsg: "isPlaceMessage", MsgCheckResult: "checkResult", Results: "resultList", Reaction: "reactionID", Reaction_Account: "userIDList", MsgReactionNotifyList: "messageReactionNotifyList", MsgReactionNotify: "messageReactionNotify", MsgReactionSummary: "reactionList", C2CMsgInfo: "C2CMessageInfo", GroupMsgInfo: "groupMessageInfo", int32_err_code: "errorCode", str_err_msg: "errorMsg", MsgDropReason: "messageDropReason", ReactedByMe: "reactedByMyself", Level: "messageRemindType", PeerReadTime: "timestamp", NoUnreadSeqList: "excludedUnreadSequenceList", NewMsg: "topicLatestMessage" }, ignoreKeyWord: ["C2C", "ID", "USP"] }; - function Ka(e2) { - return d(this, Ka), (e2 = Ra.call(this, e2))._n = "SyncUnreadMsgModule", e2._cookie = "", e2._onlineSyncFlag = false, e2.getIEmitInst().on(P.A2KEY_AND_TINYID_UPDATED, e2._init, i(e2)), e2; - } - function Ya(e2) { - return d(this, Ya), (e2 = Oa.call(this, e2))._n = "PluginModule", e2.plugins = {}, e2; - } - function Wa(e2) { - return d(this, Wa), (e2 = Na.call(this, e2))._n = "ComboMsgModule", e2; - } - function ja(e2) { - return d(this, ja), (e2 = Ga.call(this, e2))._n = "MsgReactionModule", e2._reactedByMyselfMap = /* @__PURE__ */ new Map(), e2._reactionInfoMap = /* @__PURE__ */ new Map(), e2; - } - function Ja(e2) { - return d(this, Ja), (e2 = Pa.call(this, e2))._n = "MsgExtModule", e2.msgExtMap = /* @__PURE__ */ new Map(), e2.globalSeqMap = /* @__PURE__ */ new Map(), e2.getMsgExtsMap = /* @__PURE__ */ new Map(), e2; - } - function za(e2) { - return d(this, za), (e2 = Ua.call(this, e2))._n = "MessageModule", e2._messageOptionsMap = /* @__PURE__ */ new Map(), e2._mergerMessageHandler = new Da(i(e2)), e2; - } - function Xa(e2, t2) { - if ("string" == typeof e2 || Array.isArray(e2)) - return t2 = Object.assign({ pascalCase: false }, t2), 0 === (e2 = Array.isArray(e2) ? e2.map(function(e3) { - return e3.trim(); - }).filter(function(e3) { - return e3.length; - }).join("-") : e2.trim()).length ? "" : 1 === e2.length ? t2.pascalCase ? e2.toUpperCase() : e2.toLowerCase() : (e2 = e2 = (e2 = e2 !== e2.toLowerCase() ? Za(e2) : e2).replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, function(e3, t3) { - return t3.toUpperCase(); - }).replace(/\d+(\w|$)/g, function(e3) { - return e3.toUpperCase(); - }), t2.pascalCase ? e2.charAt(0).toUpperCase() + e2.slice(1) : e2); - throw new TypeError("Expected the input to be `string | string[]`"); - } - var Za = function(e2) { - for (var t2 = false, n2 = false, o2 = false, i2 = 0; i2 < e2.length; i2++) { - var a2 = e2[i2]; - t2 && /[a-zA-Z]/.test(a2) && a2.toUpperCase() === a2 ? (e2 = e2.slice(0, i2) + "-" + e2.slice(i2), o2 = n2, n2 = !(t2 = false), i2++) : n2 && o2 && /[a-zA-Z]/.test(a2) && a2.toLowerCase() === a2 ? (e2 = e2.slice(0, i2 - 1) + "-" + e2.slice(i2 - 1), o2 = n2, t2 = !(n2 = false)) : (t2 = a2.toLowerCase() === a2 && a2.toUpperCase() !== a2, o2 = n2, n2 = a2.toUpperCase() === a2 && a2.toLowerCase() !== a2); - } - return e2; - }; - function Qa(e2, t2) { - var r2 = 0; - return function n2(e3, i2) { - var t3, o2, a2, s2; - return 100 < ++r2 ? (r2--, e3) : O(e3) ? (t3 = e3.map(function(e4) { - return ut(e4) ? n2(e4, i2) : e4; - }), r2--, t3) : ut(e3) ? (o2 = e3, a2 = function(e4, t4) { - if (!pt(t4)) - return false; - if (t4 !== Xa(t4)) - for (var n3 = 0; n3 < Ba.ignoreKeyWord.length && !t4.includes(Ba.ignoreKeyWord[n3]); n3++) - ; - var o3; - return N(i2[t4]) ? "OPPOChannelID" === (o3 = t4) ? o3 : o3[0].toUpperCase() + Xa(o3).slice(1) : i2[t4]; - }, s2 = /* @__PURE__ */ Object.create(null), Object.keys(o2).forEach(function(e4) { - var t4 = a2(o2[e4], e4); - t4 && (s2[t4] = o2[e4]); - }), t3 = wt(t3 = s2, function(e4, t4) { - return O(e4) || ut(e4) ? n2(e4, i2) : e4; - }), r2--, t3) : void 0; - }(e2, t2); - } - for (var $a, es = String.fromCharCode, ts = function(e2) { - var t2 = 0 | e2.charCodeAt(0); - if (55296 <= t2) - if (t2 < 56320) { - e2 = 0 | e2.charCodeAt(1); - if (56320 <= e2 && e2 <= 57343) { - if (65535 < (t2 = (t2 << 10) + e2 - 56613888 | 0)) - return es(240 | t2 >>> 18, 128 | t2 >>> 12 & 63, 128 | t2 >>> 6 & 63, 128 | 63 & t2); - } else - t2 = 65533; - } else - t2 <= 57343 && (t2 = 65533); - return t2 <= 2047 ? es(192 | t2 >>> 6, 128 | 63 & t2) : es(224 | t2 >>> 12, 128 | t2 >>> 6 & 63, 128 | 63 & t2); - }, ns = function(e2) { - for (var t2 = void 0 === e2 ? "" : ("" + e2).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, ts), n2 = 0 | t2.length, o2 = new Uint8Array(n2), i2 = 0; i2 < n2; i2 = i2 + 1 | 0) - o2[i2] = 0 | t2.charCodeAt(i2); - return o2; - }, os = (e(Ls, [{ key: "getID", value: function() { - return this._id; - } }, { key: "_onOpen", value: function(e2) { - this._handler.onOpen({ id: this._id, res: JSON.stringify(e2) }); - } }, { key: "_onClose", value: function(e2) { - this._handler.onClose({ id: this._id, e: e2 }); - } }, { key: "_onMessage", value: function(e2) { - e2 = this._canIUseBinaryFrame ? this._isAppCompressedData(e2.data) ? this._handler.inflate(e2.data) : function(e3) { - for (var t2 = new Uint8Array(e3), n2 = "", o2 = 0, i2 = t2.length; o2 < i2; ) { - var a2 = t2[o2], s2 = 0, r2 = 0; - if (a2 <= 127 ? (s2 = 0, r2 = 255 & a2) : a2 <= 223 ? (s2 = 1, r2 = 31 & a2) : a2 <= 239 ? (s2 = 2, r2 = 15 & a2) : a2 <= 244 && (s2 = 3, r2 = 7 & a2), 0 < i2 - o2 - s2) - for (var c2 = 0; c2 < s2; ) - r2 = r2 << 6 | 63 & (a2 = t2[o2 + c2 + 1]), c2 += 1; - else - r2 = 65533, s2 = i2 - o2; - n2 += String.fromCodePoint(r2), o2 += s2 + 1; - } - return n2; - }(e2.data) : e2.data; - this._handler.onMessage({ data: e2 }); - } }, { key: "_isAppCompressedData", value: function(e2) { - e2 = new Uint8Array(e2); - return 67 === e2[0] && 79 === e2[1] && 77 === e2[2] && 80 === e2[3]; - } }, { key: "_onError", value: function(e2) { - this._handler.onError({ id: this._id, e: e2 }); - } }, { key: "setIsWorkerEnabled", value: function(e2) { - this._isWorkerEnabled = true; - } }, { key: "close", value: function(e2) { - this._workerSocket && (this._workerSocket.postMessage({ cmd: "stop", code: e2 }), this._workerSocket.terminate(), this._workerSocket = null), ve ? (I.offSocketClose(), I.offSocketMessage(), I.offSocketOpen(), I.offSocketError(), I.closeSocket()) : this._socket && (v ? (this._socket.onClose(function() { - }), this._socket.onOpen(function() { - }), this._socket.onMessage(function() { - }), this._socket.onError(function() { - })) : (this._socket.onopen = null, this._socket.onmessage = null, this._socket.onclose = null, this._socket.onerror = null), me ? this._socket.close({ code: e2 }) : this._socket.close(e2), this._socket = null); - } }, { key: "send", value: function(e2) { - this._workerSocket ? this._workerSocket.postMessage({ cmd: "sendMessage", data: this._canIUseBinaryFrame ? ns(e2.data).buffer : e2.data }) : ve ? I.sendSocketMessage({ data: e2.data, fail: function() { - e2.fail && e2.requestID && e2.fail(e2.requestID); - } }) : this._socket && (v ? this._socket.send({ data: this._canIUseBinaryFrame ? ns(e2.data).buffer : e2.data, fail: function() { - e2.fail && e2.requestID && e2.fail(e2.requestID); - } }) : this._socket.send(this._canIUseBinaryFrame ? ns(e2.data) : e2.data)); - } }]), Ls), is = ["keyMap"], as = ["keyMap"], ss = "connected", rs = "connecting", cs = "disconnected", us = (e(Es, [{ key: "_setWebsocketHost", value: function() { - var e2 = this._chM.get(12); - this._currentSite = se, this._chM.isOversea() && (this._currentSite = "OVERSEA"), e2.isSingaporeSite() ? this._currentSite = "SINGAPORE" : e2.isKoreaSite() ? this._currentSite = "KOREA" : e2.isGermanySite() ? this._currentSite = "GERMANY" : e2.isIndiaSite() ? this._currentSite = "IND" : e2.isJapanSite() ? this._currentSite = "JPN" : e2.isUSASite() ? this._currentSite = "USA" : e2.isIndonesiaSite() && (this._currentSite = "INDONESIA"), a.HOST.setCurrent(this._currentSite); - } }, { key: "_initConnection", value: function() { - var e2 = this._chM.get(12).getSDKAppID() + "", e2 = (N(a.HOST.CURRENT.BACKUP) ? this._url = a.HOST.CURRENT.DEFAULT : "" === this._url ? this._url = a.HOST.CURRENT.DEFAULT0.replace("*", e2) : -1 < this._url.indexOf(e2) ? this._url = a.HOST.CURRENT.DEFAULT : this._url === a.HOST.CURRENT.DEFAULT ? this._url = a.HOST.CURRENT.BACKUP : this._url === a.HOST.CURRENT.BACKUP ? this._url = this._canIUseAnyCast() ? a.HOST.CURRENT.ANYCAST : a.HOST.CURRENT.DEFAULT : this._url === a.HOST.CURRENT.ANYCAST && (a.HOST.CURRENT.ANYCAST = "", this._url = a.HOST.CURRENT.DEFAULT), this._chM.get(12)), t2 = e2.getProxyServer(); - S(t2) || (this._url = t2), e2.isTestEnv() && (this._url = te.TEST[this._currentSite].DEFAULT), this._connect(), this._nextPingTs = 0; - } }, { key: "_canIUseAnyCast", value: function() { - return Ce && a.HOST.CURRENT.ANYCAST; - } }, { key: "onCheckTimer", value: function(e2) { - e2 % 1 == 0 && (this._checkPromiseMap(), this._checkNativeAppWS()); - } }, { key: "_checkPromiseMap", value: function() { - var a2 = this; - 0 !== this._promiseMap.size && this._promiseMap.forEach(function(e2, t2) { - var n2 = e2.reject, o2 = e2.timestamp, e2 = e2.headSeq, i2 = 15e3; - -1 !== t2.indexOf(k.LOGIN) ? i2 = 9e4 : -1 !== t2.indexOf(k.PING) && (i2 = 3e3), Date.now() - o2 >= i2 && (M.l("".concat(a2._n, "._checkPromiseMap request timeout, delete requestID:").concat(t2)), a2._promiseMap.delete(t2), n2(new E({ code: L.NETWORK_TIMEOUT, data: { headSeq: e2 } })), a2._chM.onRequestTimeout()); - }); - } }, { key: "_checkNativeAppWS", value: function() { - Ie && !this.isConnected() && this._reConnect(); - } }, { key: "onOpen", value: function(e2) { - var t2, n2; - this._readyState !== cs && (this._onOpenTs = Date.now(), n2 = e2.id, e2 = e2.res, this._socketID = n2, t2 = nn(this._startTs, false), n2 = "socketID:".concat(n2, " res:").concat(e2), M.l("".concat(this._n, "._onOpen cost:").concat(t2, " ms. ").concat(n2)), new G("wsOnOpen").setMessage(t2).setCostTime(t2).setMoreMessage(n2).end(), this._readyState = ss, this._reConnectCount = 0, this._resend(), true === this._reConnectFlag && (this._chM.onReconnected(), this._reConnectFlag = false), this._chM.onOpen()); - } }, { key: "onClose", value: function(e2) { - var t2 = new G("wsOnClose"), n2 = e2.id, e2 = e2.e, o2 = "sourceSocketID:".concat(n2, " currentSocketID:").concat(this._socketID, " code:").concat(e2.code, " reason:").concat(e2.reason), i2 = 0; - 0 !== this._onOpenTs && (i2 = Date.now() - this._onOpenTs), t2.setMessage(i2).setCostTime(i2).setMoreMessage(o2).setCode(e2.code).end(true), M.l("".concat(this._n, "._onClose ").concat(o2, " onlineTime:").concat(i2)), n2 === this._socketID && (this._readyState = cs, i2 < 1e3 ? this._chM.onReconnectFailed() : this._chM.onClose()); - } }, { key: "onError", value: function(e2) { - var t2 = e2.id, e2 = e2.e, n2 = "sourceSocketID:".concat(t2, " currentSocketID:").concat(this._socketID); - new G("wsOnError").setMessage(e2.errMsg || JSON.stringify(e2, ["message", "code"])).setMoreMessage(n2).setLevel("error").end(true), M.w("".concat(this._n, "._onError"), e2, n2), t2 === this._socketID && (this._readyState = cs, this._chM.onError()); - } }, { key: "onMessage", value: function(t2) { - var e2, n2, o2, i2, a2, s2; - try { - e2 = JSON.parse(t2.data); - } catch (e3) { - new G("jsonParseError").setMessage(t2.data).end(); - } - e2 && e2.head && (t2 = this._getRequestIDFromHead(e2.head), n2 = e2.body, this._chM.get(30).isTRTCCommand(t2) || (s2 = Kt(e2.head), n2 = function t3(e3, n3) { - var o3, i3, a3; - return O(e3) ? e3.map(function(e4) { - return ut(e4) ? t3(e4, n3) : e4; - }) : ut(e3) ? (o3 = e3, i3 = function(e4, t4) { - return N(n3[t4]) ? Xa(t4) : n3[t4]; - }, a3 = {}, Object.keys(o3).forEach(function(e4) { - a3[i3(o3[e4], e4)] = o3[e4]; - }), wt(a3, function(e4) { - return O(e4) || ut(e4) ? t3(e4, n3) : e4; - })) : void 0; - }(e2.body, this._getResKeyMap(s2))), M.d("".concat(this._n, ".onMessage ret:").concat(JSON.stringify(n2), " requestID:").concat(t2, " has:").concat(this._promiseMap.has(t2))), this._setNextPingTs(), this._promiseMap.has(t2) ? (o2 = (s2 = this._promiseMap.get(t2)).resolve, i2 = s2.reject, a2 = s2.timestamp, s2 = s2.headSeq, this._promiseMap.delete(t2), this._calcRTT(a2), n2.errorCode && 0 !== n2.errorCode ? (this._chM.onErrorCodeNotZero(n2), i2(new E({ code: n2.errorCode, message: n2.errorInfo || "", data: t2.includes(k.MODIFY_C2C_MSG) || t2.includes(k.MODIFY_GRP_MSG) ? { elements: n2.elements, messageVersion: n2.messageVersion, cloudCustomData: n2.cloudCustomData, headSeq: s2 } : { headSeq: s2 } }))) : o2(C(n2))) : this._chM.onMessage({ head: e2.head, body: n2 })); - } }, { key: "_calcRTT", value: function(e2) { - e2 = Date.now() - e2; - this._chM.get(26).addRTT(e2); - } }, { key: "_connect", value: function() { - this._readyState !== rs && this._readyState !== ss && (this._startTs = Date.now(), this._onOpenTs = 0, this._readyState = rs, this._socket = new os(this), this._socketID = this._socket.getID(), M.l("".concat(this._n, "._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled(), " socketID:").concat(this._socketID, " url:").concat(this.getURL())), new G("wsConnect").setMessage("socketID:".concat(this._socketID, " url:").concat(this.getURL())).end()); - } }, { key: "getURL", value: function() { - this._chM.isDevMode() && (this._canIUseBinaryFrame = false); - var e2 = xt(), t2 = ((ve || _e && "windows" === e2 || Ie) && (this._canIUseBinaryFrame = false), -1), n2 = ("ios" === e2 ? t2 = Le || -1 : "android" === e2 && (t2 = ke || -1), this._chM.get(12)), o2 = this._chM.getPlatform(), i2 = n2.getSDKAppID(), n2 = n2.getInstanceID(), i2 = "sdkappid=".concat(i2, "&instanceid=").concat(n2, "&random=").concat(this._getRandom(), "&platform=").concat(o2, "&host=").concat(e2) + "&version=".concat(t2, "&sdkversion=").concat("3.4.7"); - return he && (i2 += "&isminigame=1"), this._chM.canIUseInflate() && (i2 += "&compress=gzip"), (this._canIUseBinaryFrame ? "".concat(this._url, "/binfo?") : "".concat(this._url, "/info?")).concat(i2); - } }, { key: "_closeConnection", value: function(e2) { - M.l("".concat(this._n, "._closeConnection socketID:").concat(this._socketID)), this._socket && (this._socket.close(e2), this._socketID = -1, this._socket = null, this._readyState = cs); - } }, { key: "_resend", value: function() { - var i2 = this; - if (M.l("".concat(this._n, "._resend reConnectFlag:").concat(this._reConnectFlag), "promiseMap.size:".concat(this._promiseMap.size, " simpleRequestMap.size:").concat(this._simpleRequestMap.size)), 0 < this._promiseMap.size && this._promiseMap.forEach(function(e3, t3) { - var n3 = e3.uplinkData, o3 = e3.resolve, e3 = e3.reject; - -1 !== t3.indexOf(k.AV_POLLING) ? i2._promiseMap.delete(t3) : (i2._promiseMap.set(t3, { resolve: o3, reject: e3, timestamp: Date.now(), uplinkData: n3 }), i2._execute(t3, n3)); - }), 0 < this._simpleRequestMap.size) { - var e2, t2 = Z(this._simpleRequestMap); - try { - for (t2.s(); !(e2 = t2.n()).done; ) { - var n2 = Y(e2.value, 2), o2 = n2[0], a2 = n2[1]; - this._execute(o2, a2); - } - } catch (e3) { - t2.e(e3); - } finally { - t2.f(); - } - this._simpleRequestMap.clear(); - } - } }, { key: "send", value: function(n2) { - var o2 = this, i2 = (n2.head.seq = this._getSequence(), n2.head.reqtime = Math.floor(Date.now() / 1e3), n2.keyMap, K(n2, is)), a2 = this._getRequestIDFromHead(n2.head), s2 = JSON.stringify(i2); - return new Promise(function(e2, t2) { - o2._promiseMap.set(a2, { resolve: e2, reject: t2, timestamp: Date.now(), uplinkData: s2, headSeq: n2.head.seq }), M.d("".concat(o2._n, ".send uplinkData:").concat(JSON.stringify(i2), " requestID:").concat(a2, " readyState:").concat(o2._readyState)), o2._readyState !== ss ? o2._reConnect() : (o2._execute(a2, s2), o2._chM.get(26).addRequestCount()); - }); - } }, { key: "simplySend", value: function(e2) { - e2.head.seq = this._getSequence(), e2.head.reqtime = Math.floor(Date.now() / 1e3), e2.keyMap; - var t2 = K(e2, as), e2 = this._getRequestIDFromHead(e2.head), t2 = JSON.stringify(t2); - this._readyState !== ss ? (this._simpleRequestMap.size < this.MAX_SIZE ? this._simpleRequestMap.set(e2, t2) : M.l("".concat(this._n, ".simplySend. simpleRequestMap is full, drop request!")), this._reConnect()) : this._execute(e2, t2); - } }, { key: "_execute", value: function(e2, t2) { - this._socket.send({ data: t2, fail: v ? this._onSendFail.bind(this) : void 0, requestID: e2 }); - } }, { key: "_onSendFail", value: function(e2) { - M.l("".concat(this._n, "._onSendFail requestID:").concat(e2)), this._chM.onSendFail(); - } }, { key: "_getSequence", value: function() { - var e2; - if (this._startSequence < 2415919103) - return e2 = this._startSequence, this._startSequence += 1, 2415919103 === this._startSequence && (this._startSequence = ft()), e2; - } }, { key: "_getRequestIDFromHead", value: function(e2) { - return e2.servcmd + e2.seq; - } }, { key: "_getResKeyMap", value: function(e2) { - e2 = this._chM.getKeyMap(e2); - return y(y({}, Ba.res), e2.res); - } }, { key: "_reConnect", value: function() { - this._readyState !== ss && this._readyState !== rs && this.forcedReconnect(); - } }, { key: "forcedReconnect", value: function() { - var e2 = "".concat(this._n, ".forcedReconnect"); - M.l("".concat(e2, " count:").concat(this._reConnectCount, " readyState:").concat(this._readyState)), this._reConnectFlag = true, this._resetRandom(), this._reConnectCount < this.MAX_RECONNECT_COUNT ? (this._reConnectCount += 1, this._closeConnection(4001), this._initConnection()) : (this._reConnectCount = 0, this._chM.get(15).isOnline() ? (M.w("".concat(e2, " disconnected from wsserver but network is ok, continue...")), this._closeConnection(4001), this._initConnection()) : this._chM.onReconnectFailed()); - } }, { key: "getReconnectFlag", value: function() { - return this._reConnectFlag; - } }, { key: "_setNextPingTs", value: function() { - this._nextPingTs = Ie ? Date.now() + 5e3 : Date.now() + 1e4; - } }, { key: "getNextPingTs", value: function() { - return this._nextPingTs; - } }, { key: "isConnected", value: function() { - return this._readyState === ss; - } }, { key: "canIUseBinaryFrame", value: function() { - return this._canIUseBinaryFrame; - } }, { key: "getSocketID", value: function() { - return this._socketID; - } }, { key: "inflate", value: function(e2) { - if (this._chM.canIUseInflate()) - return this._chM.get(37).inflate(e2); - } }, { key: "setIsWorkerEnabled", value: function(e2) { - M.l("".concat(this._n, ".setIsWorkerEnabled flag:").concat(e2)), this._isWorkerEnabled = e2; - } }, { key: "getIsWorkerEnabled", value: function() { - return this._isWorkerEnabled && Ge; - } }, { key: "_getRandom", value: function() { - return 0 === this._random && (this._random = Math.random()), this._random; - } }, { key: "_resetRandom", value: function() { - this._random = 0; - } }, { key: "close", value: function() { - M.l("".concat(this._n, ".close")), this._closeConnection(4e3), this._promiseMap.clear(), this._startSequence = ft(), this._readyState = cs, this._simpleRequestMap.clear(), this._reConnectFlag = false, this._reConnectCount = 0, this._onOpenTs = 0, this._url = "", this._random = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true; - } }]), Es), ls = function(a2, s2, r2) { - return new Promise(function(t2, e2) { - var n2, o2, i2 = "application/x-www-form-urlencoded;charset=UTF-8"; - v ? I.request({ url: s2, data: r2, method: a2, timeout: 3e3, header: { "content-type": i2 }, success: function(e3) { - e3 && e3.data && e3.data.NetCheckInfo && M.l("".concat("getconninfo ok in", " miniapp. ret:"), e3.data), t2(); - }, fail: function() { - e2(new E({ code: L.NETWORK_ERROR })); - } }) : (n2 = new XMLHttpRequest(), o2 = setTimeout(function() { - n2.abort(), e2(new E({ code: L.NETWORK_TIMEOUT })); - }, 3e3), n2.onreadystatechange = function() { - 4 === n2.readyState && (clearTimeout(o2), 200 === n2.status || 304 === n2.status ? (n2.responseText && -1 < n2.responseText.indexOf("NetCheckInfo") && M.l("".concat("getconninfo ok in", " web. ret:"), JSON.parse(n2.responseText)), t2()) : e2(new E({ code: L.NETWORK_ERROR }))); - }, n2.open(a2, s2, true), n2.setRequestHeader("Content-type", i2), r2 ? n2.send(r2) : n2.send()); - }); - }, ds = (t(Ds, u), $a = n(Ds), e(Ds, [{ key: "onCheckTimer", value: function(e2) { - this._socketHandler && (this.isLoggedIn() ? (0 < this._timerForNotLoggedIn && (clearInterval(this._timerForNotLoggedIn), this._timerForNotLoggedIn = -1), this._socketHandler.onCheckTimer(e2)) : this._socketHandler.onCheckTimer(1), this._checkNextPing()); - } }, { key: "onErrorCodeNotZero", value: function(e2) { - this.get(20).onErrorCodeNotZero(e2); - } }, { key: "onMessage", value: function(e2) { - this.get(20).onMessage(e2); - } }, { key: "send", value: function(e2) { - return this._socketHandler ? this._previousState !== A.NET_STATE_CONNECTED && e2.head.servcmd.includes(k.SSO_STAT) ? (this.reConnect(), this.isPrivateNetWork() ? Promise.resolve() : this._sendLogViaHTTP(e2)) : this._socketHandler.send(e2) : Promise.reject(); - } }, { key: "_sendLogViaHTTP", value: function(e2) { - var t2 = a.HOST.CURRENT.STAT, t2 = "".concat(t2, "/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e2.head.sdkappid, "&reqtime=").concat(Date.now()), e2 = JSON.stringify(e2.body); - return ls("POST", t2, e2); - } }, { key: "simplySend", value: function(e2) { - return this._socketHandler ? this._socketHandler.simplySend(e2) : Promise.reject(); - } }, { key: "onOpen", value: function() { - this._ping(); - } }, { key: "onClose", value: function() { - this._socketHandler && this._socketHandler.getReconnectFlag() && this._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED), this.reConnect(); - } }, { key: "onError", value: function() { - v && !Ie && this.warn("DomainNameInMP"), this._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED); - } }, { key: "getKeyMap", value: function(e2) { - return this.get(20).getKeyMap(e2); - } }, { key: "onRequestTimeout", value: function() { - 3e4 <= Date.now() - this._lastDiagnoseTS && this.diagnose(); - } }, { key: "onSendFail", value: function() { - this._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED); - } }, { key: "onReconnected", value: function() { - M.l("".concat(this._n, ".onReconnected cost:").concat(nn(this._disconnectedTS, true, true))), this._m.restartTimer(), this.get(20).onReconnected(nn(this._disconnectedTS, false, false)), this._disconnectedTS = 0, this._emitNetStateChangeEvent(A.NET_STATE_CONNECTED); - } }, { key: "onReconnectFailed", value: function() { - M.l("".concat(this._n, ".onReconnectFailed")), this._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED); - } }, { key: "setIsWorkerEnabled", value: function(e2) { - this._socketHandler && this._socketHandler.setIsWorkerEnabled(false); - } }, { key: "offline", value: function() { - this._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED); - } }, { key: "reConnect", value: function() { - var e2 = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t2 = false, n2 = (this._socketHandler && (t2 = this._socketHandler.getReconnectFlag()), "forcedFlag:".concat(e2, " fatalErrorFlag:").concat(this._fatalErrorFlag, " previousState:").concat(this._previousState, " reconnectFlag:").concat(t2)); - M.l("".concat(this._n, ".reConnect ").concat(n2)), this._fatalErrorFlag || !this._socketHandler || true !== e2 && this._previousState === A.NET_STATE_CONNECTING && t2 || (this._socketHandler.forcedReconnect(), this._emitNetStateChangeEvent(A.NET_STATE_CONNECTING)); - } }, { key: "_emitNetStateChangeEvent", value: function(e2) { - this._previousState !== e2 && (M.l("".concat(this._n, "._emitNetStateChangeEvent from ").concat(this._previousState, " to ").concat(e2)), e2 === A.NET_STATE_DISCONNECTED && 0 === this._disconnectedTS && (this._disconnectedTS = Date.now(), this.diagnose()), this._previousState = e2, this.emitOEvt(h.NET_STATE_CHANGE, { state: e2 })); - } }, { key: "_ping", value: function() { - var e2, n2 = this; - true !== this._probing && (this._probing = true, e2 = this.get(20).getProtocolData({ P: k.PING }), this.send(e2).then(function() { - n2._probing = false; - }).catch(function(e3) { - n2._probing = false; - var t2 = n2.get(15).isOnline(); - M.w("".concat(n2._n, "._ping failed. bOnline:").concat(t2, " error:"), e3), e3 && 60002 === e3.code ? (new G("error").setMessage("code:".concat(e3.code, " message:").concat(e3.message)).end(), n2._fatalErrorFlag = true, n2._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED)) : t2 ? n2.reConnect() : n2._emitNetStateChangeEvent(A.NET_STATE_DISCONNECTED); - })); - } }, { key: "_checkNextPing", value: function() { - this._socketHandler && this._socketHandler.isConnected() && Date.now() >= this._socketHandler.getNextPingTs() && this._ping(); - } }, { key: "dealloc", value: function() { - this._socketHandler && (this._socketHandler.close(), this._socketHandler = null), -1 < this._timerForNotLoggedIn && clearInterval(this._timerForNotLoggedIn); - } }, { key: "onRestApiKickedOut", value: function() { - this._socketHandler && (this._socketHandler.close(), this.reConnect(true)); - } }, { key: "canIUseInflate", value: function() { - return this._m.canIUseInflate(); - } }, { key: "getSocketID", value: function() { - if (this._socketHandler) - return this._socketHandler.getSocketID(); - } }, { key: "diagnose", value: function() { - this.isPrivateNetWork() || (this._lastDiagnoseTS = Date.now(), this._diagnoseBySSO(), this._diagnoseByCDN()); - } }, { key: "_diagnoseBySSO", value: function() { - var t2 = this, e2 = this._socketHandler.getURL(), n2 = e2.split("/")[2]; - n2.startsWith("ws") && (e2 = e2.slice(e2.indexOf("info?") + 5), n2 = "https://".concat(n2, "/v3/netcheck/getconninfo?").concat(e2, "&reqtime=").concat(Date.now()), ls("GET", n2).catch(function(e3) { - M.w("".concat(t2._n, "._diagnoseBySSO failed. error:"), e3); - })); - } }, { key: "_diagnoseByCDN", value: function() { - var t2 = this, e2 = this._socketHandler.getURL(), e2 = e2.slice(e2.indexOf("info?") + 5), e2 = "https://boce-cdn.my-imcloud.com/v3/netcheck/getconninfo?".concat(e2, "&reqtime=").concat(Date.now()); - ls("GET", e2).catch(function(e3) { - M.w("".concat(t2._n, "._diagnoseByCDN failed. error:"), e3); - }); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._previousState = A.NET_STATE_CONNECTED, this._probing = false, this._fatalErrorFlag = false, this._timerForNotLoggedIn = setInterval(this.onCheckTimer.bind(this), 1e3), this._disconnectedTS = 0, this._lastDiagnoseTS = 0; - } }]), Ds), ps = ["a2", "tinyid"], _s = ["a2", "tinyid"], hs = (e(Ts, [{ key: "_fillMap", value: function() { - this._map.clear(); - var e2 = this._sessionM.genCommonHead(), t2 = this._sessionM.genCosSpecifiedHead(), n2 = this._sessionM.genSSOReportHead(); - this._map.set(k.LOGIN, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.LOGIN) }), body: { state: "Online", isWebUniapp: 0, deviceBrand: 0, customInfo: "" }, keyMap: { req: { deviceBrand: "InstType" }, res: { InstId: "instanceID", HelloInterval: "helloInterval", RichMsgAuthKey: "authKey" } } }), this._map.set(k.LOGOUT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.LOGOUT) }), body: { type: 0, isWebUniapp: 0 }, keyMap: { req: { type: "wslogout_type" } } }), this._map.set(k.HELLO, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.HELLO) }), body: { isWebUniapp: 0 }, keyMap: { res: { NewInstInfo: "newInstanceInfo" } } }), this._map.set(k.KICK_OTHER, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.STAT_SERVICE, ".").concat(k.KICK_OTHER) }), body: {} }), this._map.set(k.COS_SIGN, { head: y(y({}, t2), {}, { servcmd: "".concat(a.NAME.IM_COS_SIGN, ".").concat(k.COS_SIGN) }), body: { cmd: "open_im_cos_svc", subCmd: "get_cos_token", duration: 300, version: 2 }, keyMap: { req: { userSig: "usersig", subCmd: "sub_cmd", cmd: "cmd", duration: "duration", version: "version" }, res: { expired_time: "expiredTime", bucket_name: "bucketName", session_token: "sessionToken", tmp_secret_id: "secretId", tmp_secret_key: "secretKey" } } }), this._map.set(k.COS_PRE_SIG, { head: y(y({}, t2), {}, { servcmd: "".concat(a.NAME.CUSTOM_UPLOAD, ".").concat(k.COS_PRE_SIG) }), body: { fileType: void 0, fileName: void 0, uploadMethod: 0, duration: 900 }, keyMap: { req: { userSig: "usersig", fileType: "file_type", fileName: "file_name", uploadMethod: "upload_method" }, res: { expired_time: "expiredTime", request_id: "requestId", head_url: "headUrl", upload_url: "uploadUrl", download_url: "downloadUrl", ci_url: "ciUrl", snapshot_url: "requestSnapshotUrl" } } }), this._map.set(k.SIMPLE_COS_PRE_SIG, { head: y(y({}, t2), {}, { servcmd: "".concat(a.NAME.CUSTOM_UPLOAD, ".").concat(k.SIMPLE_COS_PRE_SIG) }), body: { uploadMethod: 0, platform: 2, SDKAppID: 0, userID: "", conversationType: 1, uploadConfig: [{ fileID: 1, fileType: 1, fileName: "" }] }, keyMap: { req: { platform: "uint32_platform", SDKAppID: "uint32_sdkappid", userID: "str_user_id", uploadMethod: "uint32_upload_method", conversationType: "uint32_scene", uploadConfig: "rpt_upload_object", fileID: "uint32_file_id", fileType: "uint32_file_type", fileName: "str_file_name" }, res: { str_final_ip: "uploadIP", rpt_pre_sig: "preSig", uint32_file_id: "fileID", uint32_exist_flag: "existFlag", str_download_url: "downloadUrl", str_upload_url: "uploadUrl", str_snapshot_url: "requestSnapshotUrl", str_file_key: "fileKey" } } }), this._map.set(k.GET_IMAGE_INFO, { head: y(y({}, t2), {}, { servcmd: "".concat(a.NAME.CUSTOM_UPLOAD, ".").concat(k.GET_IMAGE_INFO) }), body: { imageUrl: "" }, keyMap: { req: { imageUrl: "str_image_url" }, res: { rpt_msg_image_info: "imageInfoArray", uint32_image_type: "type", str_url: "url", uint32_width: "width", uint32_height: "height", str_image_format: "imageFormat" } } }), this._map.set(k.GET_IP, { head: y(y({}, t2), {}, { servcmd: "".concat(a.NAME.CUSTOM_UPLOAD, ".").concat(k.GET_IP) }), body: { domainName: "" }, keyMap: { req: { domainName: "str_domain" }, res: { str_final_ip: "ip" } } }), this._map.set(k.VIDEO_COVER, { head: y(y({}, t2), {}, { servcmd: "".concat(a.NAME.CUSTOM_UPLOAD, ".").concat(k.VIDEO_COVER) }), body: { version: 1, platform: void 0, coverName: void 0, requestSnapshotUrl: void 0 }, keyMap: { req: { version: "version", platform: "platform", coverName: "cover_name", requestSnapshotUrl: "snapshot_url" }, res: { error_code: "errorCode", error_msg: "errorInfo", download_url: "snapshotUrl" } } }), this._map.set(k.FETCH_COMMERCIAL_CONFIG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_CONFIG_MANAGER, ".").concat(k.FETCH_COMMERCIAL_CONFIG) }), body: { SDKAppID: 0 }, keyMap: { req: { SDKAppID: "uint32_sdkappid" }, res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }), this._map.set(k.PUSHED_COMMERCIAL_CONFIG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_CONFIG_MANAGER, ".").concat(k.PUSHED_COMMERCIAL_CONFIG) }), body: {}, keyMap: { res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_purchase_bits: "purchaseBits", uint32_expired_time: "expiredTime" } } }), this._map.set(k.FETCH_CLOUD_CTRL_CONFIG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_CONFIG_MANAGER, ".").concat(k.FETCH_CLOUD_CTRL_CONFIG) }), body: { SDKAppID: 0, version: 0 }, keyMap: { req: { SDKAppID: "uint32_sdkappid", version: "uint64_version" }, res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }), this._map.set(k.PUSHED_CLOUD_CTRL_CONFIG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_CONFIG_MANAGER, ".").concat(k.PUSHED_CLOUD_CTRL_CONFIG) }), body: {}, keyMap: { res: { int32_error_code: "errorCode", str_error_message: "errorMessage", str_json_config: "cloudControlConfig", uint32_expired_time: "expiredTime", uint32_sdkappid: "SDKAppID", uint64_version: "version" } } }), this._map.set(k.OVERLOAD_NOTIFY, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OVERLOAD_PUSH, ".").concat(k.OVERLOAD_NOTIFY) }), body: {}, keyMap: { res: { OverLoadServCmd: "overloadCommand", DelaySecs: "waitingTime" } } }), this._map.set(k.SYNC_UNREAD_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.SYNC_UNREAD_MSG) }), body: { cookie: "", syncFlag: 0, needAbstract: 1, isOnlineSync: 0, needSignaling: 1, needCachedMsg: 1 }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", from: "From_Account", to: "To_Account", time: "MsgTimeStamp", sequence: "MsgSeq", random: "MsgRandom", elements: "MsgBody" }, res: { MsgList: "messageList", SyncFlag: "syncFlag", To_Account: "to", From_Account: "from", ClientSeq: "clientSequence", MsgSeq: "sequence", NoticeSeq: "noticeSequence", NotifySeq: "notifySequence", MsgRandom: "random", MsgTimeStamp: "time", MsgContent: "content", ToGroupId: "to", MsgKey: "messageKey", GroupTips: "groupTips", MsgBody: "elements", MsgType: "type", C2CRemainingUnreadCount: "C2CRemainingUnreadList", C2CPairUnreadCount: "C2CPairUnreadList" } } }), this._map.set(k.GET_PROFANITY_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_MSG_AUDIT_MGR, ".").concat(k.GET_PROFANITY_LIST) }), body: { version: 0, deviceID: "", startIndex: void 0 }, keyMap: { req: { version: "uint64_version", deviceID: "str_device_id", startIndex: "uint64_start_index" }, res: { msg_cmd_error_code: "errorInfo", str_err_msg: "errorMessage", uint32_code: "errorCode", msg_scene_ctl_config: "filterConfig", uint64_c2c_custom_msg_flag: "c2c_custom_message", uint64_c2c_text_msg_flag: "c2c_text_message", uint64_group_custom_msg_flag: "group_custom_message", uint64_group_text_msg_flag: "group_text_message", uint64_group_info_flag: "group_profile", uint64_group_member_info_flag: "group_member_profile", uint64_relation_chain_flag: "sns", uint64_user_info_flag: "user_profile", rpt_msg_dirty_word: "lexicon", str_dirty_word: "profanity", str_replaced_content: "replacement", uint64_filter_type: "filterType", uint64_id: "id", uint64_word_type: "profanityType", uint64_complete_flag: "completeFlag", uint64_next_start_index: "nextStartIndex", uint64_version: "version", uint64_expired_time: "expiredTime" } } }), this._map.set(k.SEND_C2C_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.SEND_C2C_MSG) }), body: { fromAccount: "", toAccount: "", msgSeq: 0, msgRandom: 0, msgBody: [], cloudCustomData: void 0, nick: "", avatar: "", msgLifeTime: void 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { sound: "", badgeMode: 0, isVoipPush: void 0, image: "" }, androidInfo: { sound: "", XiaoMiChannelID: "", OPPOChannelID: "", GoogleChannelID: "", VIVOClassification: 1, VIVOCategory: "", HuaWeiCategory: "", HuaWeiImage: "", HonorImage: "", GoogleImage: "" } }, messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, isSupportExtension: 0, isRelayMessage: 0, cmConfigID: void 0 }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", count: "MaxCnt", lastMessageTime: "LastMsgTime", messageKey: "MsgKey", peerAccount: "Peer_Account", data: "Data", description: "Desc", extension: "Ext", type: "MsgType", content: "MsgContent", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", nick: "From_AccountNick", avatar: "From_AccountHeadurl", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "IsNeedReadReceipt", GoogleChannelID: "GoogleChannelID", XiaoMiChannelID: "XiaoMiChannelID" } } }), this._map.set(k.SEND_GRP_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.SEND_GRP_MSG) }), body: { fromAccount: "", groupID: "", random: 0, clientSequence: 0, priority: "", msgBody: [], cloudCustomData: void 0, onlineOnlyFlag: 0, offlinePushInfo: { pushFlag: 0, title: "", desc: "", ext: "", apnsInfo: { sound: "", badgeMode: 0, isVoipPush: void 0, image: "" }, androidInfo: { sound: "", XiaoMiChannelID: "", OPPOChannelID: "", GoogleChannelID: "", VIVOClassification: 1, VIVOCategory: "", HuaWeiCategory: "", HuaWeiImage: "", HonorImage: "", GoogleImage: "" } }, groupAtInfo: [], messageControlInfo: void 0, clientTime: void 0, needReadReceipt: 0, topicID: void 0, receiverList: void 0, isSupportExtension: 0, isRelayMessage: 0, cmConfigID: void 0 }, keyMap: { req: { to: "GroupId", extension: "Ext", data: "Data", description: "Desc", random: "Random", sequence: "ReqMsgSeq", count: "ReqMsgNumber", type: "MsgType", priority: "MsgPriority", content: "MsgContent", elements: "MsgBody", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", clientSequence: "ClientSeq", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody", needReadReceipt: "NeedReadReceipt", receiverList: "To_Account", GoogleChannelID: "GoogleChannelID", XiaoMiChannelID: "XiaoMiChannelID" }, res: { MsgTime: "time", MsgSeq: "sequence" } } }), this._map.set(k.REVOKE_C2C_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.REVOKE_C2C_MSG) }), body: { msgInfo: { fromAccount: "", toAccount: "", msgTimeStamp: 0, msgSeq: 0, msgRandom: 0 } }, keyMap: { req: { msgInfo: "MsgInfo", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom" } } }), this._map.set(k.REVOKE_GRP_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.REVOKE_GRP_MSG) }), body: { groupID: "", msgSeqList: void 0, topicID: "" }, keyMap: { req: { msgSeqList: "MsgSeqList", msgSeq: "MsgSeq" } } }), this._map.set(k.GET_C2C_ROAMING_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.GET_C2C_ROAMING_MSG) }), body: { peerAccount: "", count: 15, lastMessageTime: 0, messageKey: "", withRecalledMessage: 1, direction: 0 }, keyMap: { req: { messageKey: "MsgKey", peerAccount: "Peer_Account", count: "MaxCnt", lastMessageTime: "LastMsgTime", withRecalledMessage: "WithRecalledMsg", direction: "GetDirection" }, res: { LastMsgTime: "lastMessageTime", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer" } } }), this._map.set(k.MODIFY_C2C_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.MODIFY_C2C_MSG) }), body: { from: "", to: "", sequence: 0, random: 0, time: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { req: { sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }), this._map.set(k.GET_GRP_ROAMING_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_ROAMING_MSG) }), body: { withRecalledMsg: 1, groupID: "", count: 15, sequence: "", topicID: void 0 }, keyMap: { req: { sequence: "ReqMsgSeq", count: "ReqMsgNumber", withRecalledMessage: "WithRecalledMsg" }, res: { Random: "random", MsgTime: "time", MsgSeq: "sequence", ReqMsgSeq: "sequence", RspMsgList: "messageList", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgPriority: "priority", MsgBody: "elements", MsgType: "type", MsgContent: "content", IsFinished: "complete", Download_Flag: "downloadFlag", ClientSeq: "clientSequence", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList", NextReqMsgSeq: "nextSequence" } } }), this._map.set(k.SET_C2C_MSG_READ, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.SET_C2C_MSG_READ) }), body: { C2CMsgReaded: void 0 }, keyMap: { req: { lastMessageTime: "LastedMsgTime" } } }), this._map.set(k.SET_C2C_PEER_MUTE_NOTIFICATIONS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.SET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { userIDList: void 0, muteFlag: 0 }, keyMap: { req: { userIDList: "Peer_Account", muteFlag: "Mute_Notifications" } } }), this._map.set(k.GET_C2C_PEER_MUTE_NOTIFICATIONS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.GET_C2C_PEER_MUTE_NOTIFICATIONS) }), body: { toAccount: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Peer_Account" }, res: { MuteNotificationsList: "muteFlagList" } } }), this._map.set(k.SET_GRP_MSG_READ, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.SET_GRP_MSG_READ) }), body: { groupID: void 0, messageReadSeq: void 0, topicID: void 0 }, keyMap: { req: { messageReadSeq: "MsgReadedSeq" } } }), this._map.set(k.SET_ALL_MSG_READ, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.SET_ALL_MSG_READ) }), body: { readAllC2CMessage: 0, groupMessageReadInfoList: [] }, keyMap: { req: { readAllC2CMessage: "C2CReadAllMsg", groupMessageReadInfoList: "GroupReadInfo", messageSequence: "MsgSeq" }, res: { C2CReadAllMsg: "readAllC2CMessage", GroupReadInfoArray: "groupMessageReadInfoList" } } }), this._map.set(k.DEL_C2C_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.DEL_C2C_MSG) }), body: { fromAccount: "", to: "", keyList: void 0 }, keyMap: { req: { keyList: "MsgKeyList" } } }), this._map.set(k.DEL_GRP_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.DEL_GRP_MSG) }), body: { groupID: "", deleter: "", keyList: void 0, topicID: void 0 }, keyMap: { req: { deleter: "Deleter_Account", keyList: "Seqs" } } }), this._map.set(k.TRANSLATE_TEXT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_TRANSLATE, ".").concat(k.TRANSLATE_TEXT) }), body: { sourceTextList: void 0, SDKAppID: 0, from: 0, source: "", target: "" }, keyMap: { req: { sourceTextList: "SourceText", SDKAppID: "SdkAppId", from: "FromAccount" }, res: { TargetText: "translatedTextList", RequestId: "requestID", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(k.VOICE_TO_TEXT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_SPEECH, ".").concat(k.VOICE_TO_TEXT) }), body: { url: "", SDKAppID: 0, format: "", sourceType: 0, language: "" }, keyMap: { req: { url: "BytesUrl", SDKAppID: "Uint32Sdkappid", format: "BytesVoiceFormat", sourceType: "Uint64SourceType", language: "BytesEngServiceType" }, res: { BytesRequestid: "requestID", BytesResult: "result", CmdErrorCode: "error", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(k.MODIFY_GRP_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.MODIFY_GRP_MSG) }), body: { groupID: "", topicID: void 0, sequence: 0, version: 0, elements: void 0, cloudCustomData: void 0 }, keyMap: { req: { sequence: "MsgSeq", version: "MsgVersion", type: "MsgType", content: "MsgContent" } } }), this._map.set(k.GET_READ_RECEIPT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { req: { sequence: "MsgSeq" } } }), this._map.set(k.SEND_C2C_READ_RECEIPT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.SEND_C2C_READ_RECEIPT) }), body: { peerAccount: "", messageInfoList: void 0 }, keyMap: { req: { peerAccount: "Peer_Account", messageInfoList: "C2CMsgInfo", fromAccount: "From_Account", toAccount: "To_Account", sequence: "MsgSeq", random: "MsgRandom", time: "MsgTime", clientTime: "MsgClientTime" } } }), this._map.set(k.SEND_READ_RECEIPT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.SEND_READ_RECEIPT) }), body: { groupID: "", sequenceList: void 0 }, keyMap: { req: { sequenceList: "MsgSeqList", sequence: "MsgSeq" } } }), this._map.set(k.GET_READ_RECEIPT_DETAIL, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_READ_RECEIPT_DETAIL) }), body: { groupID: "", sequence: void 0, flag: 0, cursor: 0, count: 0 }, keyMap: { req: { sequence: "MsgSeq", count: "Num" }, res: { ReadList: "readUserIDList", Read_Account: "userID", UnreadList: "unreadUserIDList", Unread_Account: "userID", IsFinish: "isCompleted" } } }), this._map.set(k.MODIFY_C2C_MSG_EXT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.MODIFY_C2C_MSG_EXT) }), body: { from: void 0, to: void 0, messageKey: void 0, operateType: void 0, extensionList: void 0 } }), this._map.set(k.GET_C2C_MSG_EXT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.GET_C2C_MSG_EXT) }), body: { from: void 0, to: void 0, messageKey: void 0, startSequence: void 0 } }), this._map.set(k.MODIFY_GRP_MSG_EXT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.MODIFY_GRP_MSG_EXT) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, operateType: void 0, extensionList: void 0 } }), this._map.set(k.GET_GRP_MSG_EXT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.GET_GRP_MSG_EXT) }), body: { groupID: void 0, topicID: void 0, messageSequence: void 0, startSequence: void 0 } }), this._map.set(k.MSG_CLOUD_SEARCH, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.MSG_SEARCH, ".").concat(k.MSG_CLOUD_SEARCH) }), body: { keywordList: void 0, keywordListMatchType: "or", account: void 0, groupID: void 0, count: 100, cursor: void 0, messageTypeList: void 0, senderUserIDList: void 0, startTime: void 0, endTime: void 0 }, keyMap: { req: { keywordListMatchType: "MatchType", account: "PeerAccount", groupID: "GroupID", messageTypeList: "MsgTypeList", senderUserIDList: "SendUserIDList" }, res: { GroupID: "groupID", UserID: "userID", Count: "messageCount", LastMsgTime: "lastMessageTime", ConversationMsgs: "searchResult", IsNeedReadReceipt: "needReadReceipt", IsPeerRead: "readReceiptSentByPeer", MsgSeq: "sequence", ReqMsgSeq: "sequence", IsSystemMsg: "isSystemMessage", ToGroupId: "to", EnumFrom_AccountType: "fromAccountType", EnumTo_AccountType: "toAccountType", GroupCode: "groupCode", MsgContent: "content", ClientSeq: "clientSequence", ToTopicId: "topicID", InvisibleMsgSeq: "invisibleSequenceList", ErrorCode: "code", ErrorInfo: "message" } } }), this._map.set(k.ADD_C2C_MSG_REACTION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.ADD_C2C_MSG_REACTION) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Add_Account" } } }), this._map.set(k.RM_C2C_MSG_REACTION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.RM_C2C_MSG_REACTION) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Del_Account" } } }), this._map.set(k.GET_C2C_MSG_REACTIONS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.GET_C2C_MSG_REACTIONS) }), body: { from: void 0, to: void 0, messageKeyList: void 0, count: void 0 } }), this._map.set(k.GET_C2C_MSG_REACTION_USER_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.GET_C2C_MSG_REACTION_USER_LIST) }), body: { from: void 0, to: void 0, reactionID: void 0, messageKey: void 0, count: void 0 } }), this._map.set(k.ADD_GRP_MSG_REACTION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.ADD_GRP_MSG_REACTION) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Add_Account" } } }), this._map.set(k.RM_GRP_MSG_REACTION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.RM_GRP_MSG_REACTION) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, userIDList: void 0 }, keyMap: { req: { userIDList: "Del_Account" } } }), this._map.set(k.GET_GRP_MSG_REACTIONS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.GET_GRP_MSG_REACTIONS) }), body: { groupID: void 0, topicID: void 0, messageSequenceList: void 0, count: void 0 }, keyMap: { res: { MsgSeq: "messageSequence" } } }), this._map.set(k.GET_GRP_MSG_REACTION_USER_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM_MSG_EXT, ".").concat(k.GET_GRP_MSG_REACTION_USER_LIST) }), body: { groupID: void 0, topicID: void 0, reactionID: void 0, messageSequence: void 0, nextSeq: void 0, count: void 0 } }), this._map.set(k.GET_C2C_PEER_READ_TIME, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.GET_C2C_PEER_READ_TIME) }), body: { userIDList: void 0 }, keyMap: { req: { userIDList: "To_Account" }, res: { ReadTime: "peerReadTimeList" } } }), this._map.set(k.PAGING_GET_CONV_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.PAGING_GET_CONV_LIST) }), body: { fromAccount: void 0, timeStamp: void 0, startIndex: void 0, pinnedTimeStamp: void 0, pinnedStartIndex: void 0, orderType: void 0, messageAssistFlag: 15, assistFlag: 31 }, keyMap: { req: { messageAssistFlag: "MsgAssistFlags", assistFlag: "AssistFlags", pinnedTimeStamp: "TopTimeStamp", pinnedStartIndex: "TopStartIndex" }, res: { SessionItem: "conversations", ToAccount: "groupID", To_Account: "userID", UnreadMsgCount: "unreadCount", MsgGroupReadedSeq: "messageReadSeq", C2cPeerReadTime: "c2cPeerReadTime", LastMsgFlags: "lastMessageFlag", TopFlags: "isPinned", TopTimeStamp: "pinnedTimeStamp", TopStartIndex: "pinnedStartIndex", GroupId: "convGroupID", C2cRemark: "friendRemark", MsgRecvOption: "messageRemindType", GroupIgnoredUnreadSeqCount: "noUnreadCount", GroupNextMsgSeq: "nextMessageSeq" } } }), this._map.set(k.DEL_CONV, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.DEL_CONV) }), body: { fromAccount: "", conversationList: void 0, clearHistoryMessage: void 0 }, keyMap: { req: { toGroupID: "ToGroupid", clearHistoryMessage: "ClearRamble", conversationList: "ContactItem" }, res: { ResultItem: "resultList", ToGroupid: "groupID", ResultCode: "code", ResultInfo: "info" } } }), this._map.set(k.CLEAR_HISTORY_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.CLEAR_HISTORY_MSG) }), body: { fromAccount: "", toAccount: void 0, type: 1, toGroupID: void 0 }, keyMap: { req: { toGroupID: "ToGroupid" } } }), this._map.set(k.PIN_CONV, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.PIN_CONV) }), body: { fromAccount: "", operationType: 1, itemList: void 0 }, keyMap: { req: { itemList: "RecentContactItem" } } }), this._map.set(k.DEL_GROUP_AT_TIPS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.DEL_GROUP_AT_TIPS) }), body: { messageListToDelete: void 0 }, keyMap: { req: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }), this._map.set(k.SET_CONV_CUSTOM_DATA, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.MARK_CONV) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, res: { ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(k.MARK_CONV, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.MARK_CONV) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "MarkItem", operationType: "OptType", groupID: "ToGroupId" }, res: { ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(k.CREATE_CONV_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.CREATE_CONV_GRP) }), body: { fromAccount: "", itemList: void 0 }, keyMap: { req: { itemList: "GroupContactItem", groupID: "ToGroupId" }, res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType" } } }), this._map.set(k.DEL_CONV_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.DEL_CONV_GRP) }), body: { fromAccount: "", groupName: void 0 }, keyMap: { res: { GroupId: "convGroupID" } } }), this._map.set(k.RENAME_CONV_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 }, keyMap: { req: { oldName: "OldGroupName", newName: "NewGroupName", groupID: "ToGroupId", operationType: "ContactOptType", groupName: "OldGroupName", updateItem: "ContactUpdateItem" }, res: { ContactOptType: "operationType", ToGroupId: "groupID", GroupId: "convGroupID" } } }), this._map.set(k.ADD_CONV_TO_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: { groupName: void 0, updateGroupType: void 0, updateItem: void 0 } } }), this._map.set(k.DEL_CONV_FROM_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.RENAME_CONV_GRP) }), body: { fromAccount: "", updateType: void 0, updateGroup: void 0 } }), this._map.set(k.GET_CONV_GRP_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.GET_CONV_GRP_LIST) }), body: { fromAccount: "", startIndex: void 0 }, keyMap: { res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList" } } }), this._map.set(k.SEARCH_CONV_GRP_MARK, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.RECENT_CONTACT, ".").concat(k.SEARCH_CONV_GRP_MARK) }), body: { fromAccount: "", contactItem: void 0 }, keyMap: { req: { groupID: "ToGroupId" }, res: { GroupId: "convGroupID", ToGroupId: "groupID", OptType: "operationType", CustomMark: "customData", ContactGroupId: "convGroupIDList", ContactResultItem: "contactItem" } } }), this._map.set(k.GET_USER_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.PROFILE, ".").concat(k.GET_USER_PROFILE) }), body: { fromAccount: "", userItem: [] }, keyMap: { req: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }), this._map.set(k.UPDATE_MY_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.PROFILE, ".").concat(k.UPDATE_MY_PROFILE) }), body: { fromAccount: "", profileItem: [{ tag: g.NICK, value: "" }, { tag: g.GENDER, value: "" }, { tag: g.ALLOWTYPE, value: "" }, { tag: g.AVATAR, value: "" }] }, keyMap: { req: { toAccount: "To_Account", standardSequence: "StandardSequence", customSequence: "CustomSequence" } } }), this._map.set(k.GET_BL, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.GET_BL) }), body: { fromAccount: "", startIndex: 0, maxLimited: 30, lastSequence: 0 }, keyMap: { res: { CurruentSequence: "currentSequence" } } }), this._map.set(k.ADD_TO_BL, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.ADD_TO_BL) }), body: { fromAccount: "", toAccount: [] } }), this._map.set(k.RM_FROM_BL, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.RM_FROM_BL) }), body: { fromAccount: "", toAccount: [] } }), this._map.set(k.SET_SELF_STATUS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.SET_SELF_STATUS) }), body: { customStatus: "" } }), this._map.set(k.GET_USER_STATUS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.GET_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { res: { UserStatusList: "successUserList", ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID", Status: "statusType" } } }), this._map.set(k.SUB_USER_STATUS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.SUB_USER_STATUS) }), body: { userIDList: void 0 }, keyMap: { res: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }), this._map.set(k.UNSUB_USER_STATUS, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.UNSUB_USER_STATUS) }), body: { userIDList: void 0, unsubscribeAll: void 0 }, keyMap: { res: { ErrorList: "failureUserList", To_Account: "userID", Invalid_Account: "invalidUserID" } } }), this._map.set(k.GET_FD_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.GET_FD_LIST) }), body: { fromAccount: "", startIndex: 0, standardSequence: 0, customSequence: 0 }, keyMap: { res: { FriendNum: "friendCount", UserDataItem: "resultList", ValueItem: "tagValueList" } } }), this._map.set(k.ADD_FD, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.ADD_FD) }), body: { fromAccount: "", addFriendItem: [], type: "" }, keyMap: { req: { source: "AddSource", wording: "AddWording", type: "AddType" }, res: { ResultItem: "resultList" } } }), this._map.set(k.UPDATE_FD, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.UPDATE_FD) }), body: { fromAccount: "", updateItem: void 0 }, keyMap: { req: { snsItem: "SnsItem" }, res: { ResultItem: "resultList" } } }), this._map.set(k.DEL_FD, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.DEL_FD) }), body: { fromAccount: "", userIDList: [], type: "" }, keyMap: { req: { type: "DeleteType" }, res: { ResultItem: "resultList" } } }), this._map.set(k.GET_FD_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.GET_FD_PROFILE) }), body: { fromAccount: "", userIDList: void 0 }, keyMap: { res: { InfoItem: "resultList", SnsProfileItem: "tagValueList" } } }), this._map.set(k.CHECK_FD, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.CHECK_FD) }), body: { fromAccount: "", userIDList: [], type: "" }, keyMap: { req: { type: "CheckType" }, res: { InfoItem: "resultList" } } }), this._map.set(k.GET_FD_APPLICATION_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.GET_FD_APPLICATION_LIST) }), body: { fromAccount: "", applicationType: "", startTime: 0, maxLimited: 0, lastSequence: 0 }, keyMap: { res: { PendencyItem: "resultList", AddSource: "source", AddTime: "time", AddWording: "wording", Image: "avatar", UnreadPendencyCount: "unreadCount", To_Account: "userID", PendencyType: "type" } } }), this._map.set(k.RESPOND_FD_APPLICATION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.RESPOND_FD_APPLICATION) }), body: { fromAccount: "", responseFriendItem: [] }, keyMap: { req: { tag: "TagName", action: "ResponseAction" }, res: { ResultItem: "resultList" } } }), this._map.set(k.DEL_FD_APPLICATION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.DEL_FD_APPLICATION) }), body: { fromAccount: "", type: "", userIDList: void 0 }, keyMap: { req: { type: "PendencyType", userIDList: "To_Account" }, res: { ResultItem: "resultList" } } }), this._map.set(k.REPORT_FD_APPLICATION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.REPORT_FD_APPLICATION) }), body: { fromAccount: "", latestTimeStamp: "" }, keyMap: { req: { latestTimeStamp: "LatestPendencyTimeStamp" } } }), this._map.set(k.CREATE_FD_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.CREATE_FD_GRP) }), body: { fromAccount: "", groupName: void 0, userIDList: void 0 }, keyMap: { req: { groupName: "GroupName", userIDList: "To_Account" }, res: { ResultItem: "resultList" } } }), this._map.set(k.DEL_FD_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.DEL_FD_GRP) }), body: { fromAccount: "", nameList: void 0 }, keyMap: { req: { nameList: "GroupName" } } }), this._map.set(k.GET_FD_GRP_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.GET_FD_GRP_LIST) }), body: { fromAccount: "", lastSequence: 0, needFriend: "Need_Friend_Type_Yes" }, keyMap: { res: { ResultItem: "resultList", GroupName: "name", FriendNumber: "friendCount", To_Account: "userIDList" } } }), this._map.set(k.UPDATE_FD_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FD, ".").concat(k.UPDATE_FD_GRP) }), body: { fromAccount: "", oldName: "", newName: void 0, updateGroupItem: void 0 }, keyMap: { req: { oldName: "GroupOldName", newName: "GroupNewName" }, res: { UpdateType: "type", ResultItem: "resultList" } } }), this._map.set(k.GET_GRP_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_LIST) }), body: { memberAccount: "", limit: void 0, offset: void 0, groupType: void 0, responseFilter: { groupBaseInfoFilter: void 0, selfInfoFilter: void 0 }, isSupportTopic: 0, needAppDefineData: 1 }, keyMap: { req: { memberAccount: "Member_Account" }, res: { GroupIdList: "groups", MsgSeq: "readedSequence", LastRecallTime: "_lastRevokedTime", AppDefinedData: "groupCustomField" } } }), this._map.set(k.GET_GRP_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_PROFILE) }), body: { groupIDList: void 0, responseFilter: { groupBaseInfoFilter: void 0, groupCustomFieldFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 } }, keyMap: { req: { groupIDList: "GroupIdList", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", groupCustomFieldFilter: "AppDefinedDataFilter_Group", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { GroupIdList: "groups", AppDefinedData: "groupCustomField", AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_Group: "groupCustomFieldFilter", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", InfoSeq: "infoSequence", MemberList: "members", GroupInfo: "groups", ShutUpUntil: "muteUntil", ShutUpAllMember: "muteAllMembers" } } }), this._map.set(k.CREATE_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.CREATE_GRP) }), body: { type: void 0, name: void 0, groupID: void 0, ownerID: void 0, introduction: void 0, notification: void 0, maxMemberNum: void 0, joinOption: void 0, memberList: void 0, groupCustomField: void 0, memberCustomField: void 0, webPushFlag: 1, avatar: "", isSupportTopic: void 0, inviteOption: void 0 }, keyMap: { req: { ownerID: "Owner_Account", userID: "Member_Account", avatar: "FaceUrl", maxMemberNum: "MaxMemberCount", joinOption: "ApplyJoinOption", groupCustomField: "AppDefinedData", memberCustomField: "AppMemberDefinedData", inviteOption: "InviteJoinOption" }, res: { HugeGroupFlag: "avChatRoomFlag", OverJoinedGroupLimit_Account: "overLimitUserIDList" } } }), this._map.set(k.DISMISS_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.DISMISS_GRP) }), body: { groupID: void 0 } }), this._map.set(k.UPDATE_GRP_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.UPDATE_GRP_PROFILE) }), body: { groupID: void 0, name: void 0, introduction: void 0, notification: void 0, avatar: void 0, joinOption: void 0, groupCustomField: void 0, muteAllMembers: void 0, inviteOption: void 0 }, keyMap: { req: { groupCustomField: "AppDefinedData", muteAllMembers: "ShutUpAllMember", joinOption: "ApplyJoinOption", avatar: "FaceUrl", inviteOption: "InviteJoinOption" }, res: { AppDefinedData: "groupCustomField", ShutUpAllMember: "muteAllMembers" } } }), this._map.set(k.APPLY_JOIN_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.APPLY_JOIN_GRP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1, historyMessageFlag: void 0 }, keyMap: { req: { applyMessage: "ApplyMsg", historyMessageFlag: "HugeGroupHistoryMsgFlag" }, res: { HugeGroupFlag: "avChatRoomFlag", AVChatRoomKey: "avChatRoomKey", RspMsgList: "messageList", ToGroupId: "to" } } }), this._map.set(k.APPLY_JOIN_GRP_NOAUTH, (e2.a2, e2.tinyid, { head: y(y({}, K(e2, ps)), {}, { servcmd: "".concat(a.NAME.BIG_GRP_NO_AUTH, ".").concat(k.APPLY_JOIN_GRP) }), body: { groupID: void 0, applyMessage: void 0, userDefinedField: void 0, webPushFlag: 1 }, keyMap: { req: { applyMessage: "ApplyMsg" }, res: { HugeGroupFlag: "avChatRoomFlag" } } })), this._map.set(k.QUIT_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.QUIT_GRP) }), body: { groupID: void 0 } }), this._map.set(k.SEARCH_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.SEARCH_GRP) }), body: { groupIDList: void 0, responseFilter: { groupBasePublicInfoFilter: ["Type", "Name", "Introduction", "Notification", "FaceUrl", "CreateTime", "Owner_Account", "LastInfoTime", "LastMsgTime", "NextMsgSeq", "MemberNum", "MaxMemberNum", "ApplyJoinOption", "InviteJoinOption"] } } }), this._map.set(k.CHANGE_GRP_OWNER, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.CHANGE_GRP_OWNER) }), body: { groupID: void 0, newOwnerID: void 0 }, keyMap: { req: { newOwnerID: "NewOwner_Account" } } }), this._map.set(k.HANDLE_GRP_APPLICATION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.HANDLE_GRP_APPLICATION) }), body: { groupID: void 0, applicant: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { req: { applicant: "Applicant_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }), this._map.set(k.HANDLE_INVITE_JOIN_GRP, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.HANDLE_INVITE_JOIN_GRP) }), body: { groupID: void 0, applicant: void 0, invitee: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, userDefinedField: void 0 }, keyMap: { req: { applicant: "Applicant_Account", invitee: "Invited_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg" } } }), this._map.set(k.HANDLE_GRP_INVITATION, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.HANDLE_GRP_INVITATION) }), body: { groupID: void 0, inviter: void 0, handleAction: void 0, handleMessage: void 0, authentication: void 0, messageKey: void 0, userDefinedField: void 0 }, keyMap: { req: { inviter: "Inviter_Account", handleAction: "HandleMsg", handleMessage: "ApprovalMsg", messageKey: "MsgKey" } } }), this._map.set(k.GET_GRP_PENDENCY, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_PENDENCY) }), body: { startTime: void 0, limit: void 0, handleAccount: void 0 }, keyMap: { req: { handleAccount: "Handle_Account" }, res: { To_Account: "userID", ApplyInviteMsg: "note" } } }), this._map.set(k.DEL_GRP_SYSTEM_NOTICE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.DEL_GRP_SYSTEM_NOTICE) }), body: { messageListToDelete: void 0 }, keyMap: { req: { messageListToDelete: "DelMsgList", messageSeq: "MsgSeq", messageRandom: "MsgRandom" } } }), this._map.set(k.AV_POLLING, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.BIG_GRP_POLLING, ".").concat(k.AV_POLLING) }), body: { USP: 1, startSeq: 1, startBroadcastSeq: void 0, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { req: { USP: "USP" }, res: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } }), this._map.set(k.AV_NOAUTH_POLLING, (e2.a2, e2.tinyid, { head: y(y({}, K(e2, _s)), {}, { servcmd: "".concat(a.NAME.BIG_GRP_POLLING_NO_AUTH, ".").concat(k.AV_POLLING) }), body: { USP: 1, startSeq: 1, holdTime: 90, key: void 0, simplifiedMessage: void 0 }, keyMap: { req: { USP: "USP" }, res: { ToGroupId: "groupID", RspBroadcastMsgList: "broadcastMessageList", IsSystemMsg: "isSystemMessage" } } })), this._map.set(k.GET_ONLINE_MBR_NUM, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_ONLINE_MBR_NUM) }), body: { groupID: void 0 }, keyMap: { res: { OnlineMemberNum: "memberCount" } } }), this._map.set(k.SET_GRP_ATTR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.SET_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key", value: "value" } } }), this._map.set(k.MODIFY_GRP_ATTR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.MODIFY_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key", value: "value" } } }), this._map.set(k.DEL_GRP_ATTR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.DEL_GRP_ATTR) }), body: { groupID: void 0, groupAttributeList: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] }, keyMap: { req: { key: "key" } } }), this._map.set(k.CLEAR_GRP_ATTR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.CLEAR_GRP_ATTR) }), body: { groupID: void 0, mainSequence: void 0, avChatRoomKey: void 0, attributeControl: ["RaceConflict"] } }), this._map.set(k.GET_GRP_ATTR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_ATTR, ".").concat(k.GET_GRP_ATTR) }), body: { groupID: void 0, avChatRoomKey: void 0, groupType: 1 }, keyMap: { req: { avChatRoomKey: "Key", groupType: "GroupType" } } }), this._map.set(k.GET_GRP_NOTIFY, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_NOTIFY) }), body: { notifyReqList: [] }, keyMap: { req: { notifyReqList: "NotifyReqList" }, res: { NextMsgTime: "nextRevokedTime", NotifyMsgList: "notifyList", NotifyRspList: "notifyRspList" } } }), this._map.set(k.UPDATE_GRP_COUNTER, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.UPDATE_GRP_COUNTER) }), body: { groupID: void 0, counterList: void 0, avChatRoomKey: void 0, mode: void 0 }, keyMap: { req: { counterList: "GroupCounter" } } }), this._map.set(k.GET_GRP_COUNTER, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_COUNTER) }), body: { groupID: void 0, keyList: [], avChatRoomKey: void 0 }, keyMap: { req: { keyList: "GroupCounterKeys" } } }), this._map.set(k.CREATE_TOPIC, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_COMMUNITY, ".").concat(k.CREATE_TOPIC) }), body: { groupID: void 0, topicName: void 0, avatar: void 0, customData: void 0, topicID: void 0, notification: void 0, introduction: void 0 }, keyMap: { req: { avatar: "FaceUrl" } } }), this._map.set(k.DEL_TOPIC, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_COMMUNITY, ".").concat(k.DEL_TOPIC) }), body: { groupID: void 0, topicIDList: void 0 }, keyMap: { req: { topicIDList: "TopicIdList" }, res: { DestroyResultItem: "resultList" } } }), this._map.set(k.UPDATE_TOPIC_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_COMMUNITY, ".").concat(k.UPDATE_TOPIC_PROFILE) }), body: { groupID: void 0, topicID: void 0, avatar: void 0, customData: void 0, notification: void 0, introduction: void 0, muteAllMembers: void 0, topicName: void 0 }, keyMap: { req: { avatar: "FaceUrl", muteAllMembers: "ShutUpAllMember" } } }), this._map.set(k.GET_TOPIC_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_COMMUNITY, ".").concat(k.GET_TOPIC_LIST) }), body: { groupID: void 0, topicIDList: void 0, MemberInfoFilter: ["NoUnreadSeqList"] }, keyMap: { req: { topicIDList: "TopicIdList" }, res: { TopicAndSelfInfo: "topicInfoList", TopicInfo: "topic", GroupID: "groupID", ShutUpTime: "muteTime", ShutUpAllFlag: "muteAllMembers", LastMsgTime: "lastMessageTime", MsgSeq: "readedSequence", LastMsgSeq: "sequence" } } }), this._map.set(k.GET_GRP_MBR_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_MBR_LIST) }), body: { groupID: void 0, limit: 0, offset: void 0, next: void 0, memberRoleFilter: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { req: { memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { AppMemberDefinedData: "memberCustomField", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", MemberList: "members", ShutUpUntil: "muteUntil" } } }), this._map.set(k.GET_AV_MBR_LIST, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_AV, ".").concat(k.GET_AV_MBR_LIST) }), body: { groupID: void 0, offset: void 0, filter: void 0 }, keyMap: { req: { offset: "Timestamp", filter: "Mark" }, res: { NextTimestamp: "offset" } } }), this._map.set(k.GET_GRP_MBR_PROFILE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.GET_GRP_MBR_PROFILE) }), body: { groupID: void 0, userIDList: void 0, memberInfoFilter: void 0, memberCustomFieldFilter: void 0 }, keyMap: { req: { userIDList: "Member_List_Account", memberCustomFieldFilter: "AppDefinedDataFilter_GroupMember" }, res: { MemberList: "members", ShutUpUntil: "muteUntil", AppDefinedDataFilter_GroupMember: "memberCustomFieldFilter", AppMemberDefinedData: "memberCustomField" } } }), this._map.set(k.ADD_GRP_MBR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.ADD_GRP_MBR) }), body: { groupID: void 0, silence: void 0, userIDList: void 0 }, keyMap: { req: { userID: "Member_Account", userIDList: "MemberList" }, res: { MemberList: "members" } } }), this._map.set(k.DEL_GRP_MBR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.DEL_GRP_MBR) }), body: { groupID: void 0, userIDList: void 0, reason: void 0 }, keyMap: { req: { userIDList: "MemberToDel_Account" } } }), this._map.set(k.BAN_AV_MBR, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.BAN_AV_MBR) }), body: { groupID: void 0, userIDList: void 0, duration: void 0, reason: "" }, keyMap: { req: { userIDList: "Members_Account", duration: "Duration", reason: "Description" } } }), this._map.set(k.MODIFY_GRP_MBR_INFO, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP, ".").concat(k.MODIFY_GRP_MBR_INFO) }), body: { groupID: void 0, topicID: void 0, userID: void 0, messageRemindType: void 0, nameCard: void 0, role: void 0, memberCustomField: void 0, muteTime: void 0 }, keyMap: { req: { userID: "Member_Account", memberCustomField: "AppMemberDefinedData", muteTime: "ShutUpTime", messageRemindType: "MsgFlag" } } }), this._map.set(k.MARK_AV_MBR_INFO, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.GRP_AV, ".").concat(k.MARK_AV_MBR_INFO) }), body: { groupID: void 0, operationType: 1, memberList: [] }, keyMap: { req: { operationType: "CommandType", memberList: "MemberList", markType: "Marks", userID: "Member_Account" }, res: { CommandType: "operationType", Marks: "markType", Member_Account: "userID" } } }), this._map.set(k.SSO_STAT, { head: y(y({}, n2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STAT, ".").concat(k.SSO_STAT) }), body: { header: {}, event: [], quality: [] }, keyMap: { req: { SDKType: "sdk_type", SDKVersion: "sdk_version", deviceType: "device_type", platform: "platform", instanceID: "instance_id", traceID: "trace_id", SDKAppID: "sdk_app_id", userID: "user_id", tinyID: "tiny_id", extension: "extension", timestamp: "timestamp", networkType: "network_type", eventType: "event_type", code: "error_code", message: "error_message", moreMessage: "more_message", duplicate: "duplicate", costTime: "cost_time", level: "level", qualityType: "quality_type", reportIndex: "report_index", wholePeriod: "whole_period", totalCount: "total_count", rttCount: "success_count_business", successRateOfRequest: "percent_business", countLessThan1Second: "success_count_business", percentOfCountLessThan1Second: "percent_business", countLessThan3Second: "success_count_platform", percentOfCountLessThan3Second: "percent_platform", successCountOfBusiness: "success_count_business", successRateOfBusiness: "percent_business", successCountOfPlatform: "success_count_platform", successRateOfPlatform: "percent_platform", successCountOfMessageReceived: "success_count_business", successRateOfMessageReceived: "percent_business", avgRTT: "average_value", avgDelay: "average_value", avgValue: "average_value", uiPlatform: "ui_platform" } } }), this._map.set(k.PING, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.HEARTBEAT, ".").concat(k.PING) }), body: {} }), this._map.set(k.MSG_PUSH, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_PUSH, ".").concat(k.MSG_PUSH) }), body: {}, keyMap: { res: { C2cMsgArray: "C2CMessageArray", GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", C2cNotifyMsgArray: "C2CNotifyMessageArray", C2cMsgInfo: "C2CReadReceiptArray", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyAdd_Account: "userID", ProfileImNick: "nick", PendencyType: "applicationType", C2CReadAllMsg: "readAllC2CMessage", IsNeedReadReceipt: "needReadReceipt", Status: "statusType" } } }), this._map.set(k.MULTI_MSG_PUSH, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_PUSH, ".").concat(k.MULTI_MSG_PUSH) }), body: {}, keyMap: { res: { GroupMsgArray: "groupMessageArray", GroupTips: "groupTips", ClientSeq: "clientSequence", MsgPriority: "priority", NoticeSeq: "noticeSequence", MsgContent: "content", MsgType: "type", MsgBody: "elements", ToGroupId: "to", Desc: "description", Ext: "extension", IsSyncMsg: "isSyncMessage", Flag: "needSync", NeedAck: "needAck", PendencyType: "applicationType" } } }), this._map.set(k.MSG_PUSH_ACK, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OPEN_IM, ".").concat(k.MSG_PUSH_ACK) }), body: { sessionData: void 0 }, keyMap: { req: { sessionData: "SessionData" } } }), this._map.set(k.STATUS_FORCE_OFFLINE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.STATUS_FORCE_OFFLINE) }), body: {}, keyMap: { res: { C2cNotifyMsgArray: "C2CNotifyMessageArray", NoticeSeq: "noticeSequence", KickoutMsgNotify: "kickoutMsgNotify", NewInstInfo: "newInstanceInfo" } } }), this._map.set(k.DOWNLOAD_MERGER_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_LONG_MSG, ".").concat(k.DOWNLOAD_MERGER_MSG) }), body: { downloadKey: "" }, keyMap: { res: { Data: "data", Desc: "description", Ext: "extension", Download_Flag: "downloadFlag", ThumbUUID: "thumbUUID", VideoUUID: "videoUUID" } } }), this._map.set(k.UPLOAD_MERGER_MSG, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_LONG_MSG, ".").concat(k.UPLOAD_MERGER_MSG) }), body: { messageList: [] }, keyMap: { req: { fromAccount: "From_Account", toAccount: "To_Account", msgTimeStamp: "MsgTimeStamp", msgSeq: "MsgSeq", msgRandom: "MsgRandom", msgBody: "MsgBody", type: "MsgType", content: "MsgContent", data: "Data", description: "Desc", extension: "Ext", sizeType: "Type", uuid: "UUID", url: "", imageUrl: "URL", fileUrl: "Url", remoteAudioUrl: "Url", remoteVideoUrl: "VideoUrl", thumbUUID: "ThumbUUID", videoUUID: "VideoUUID", videoUrl: "", downloadFlag: "Download_Flag", from: "From_Account", time: "MsgTimeStamp", messageRandom: "MsgRandom", messageSequence: "MsgSeq", elements: "MsgBody", clientSequence: "ClientSeq", payload: "MsgContent", messageList: "MsgList", messageNumber: "MsgNum", abstractList: "AbstractList", messageBody: "MsgBody" } } }), this._map.set(k.FOLLOW, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FOLLOW, ".").concat(k.FOLLOW) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "FollowItem" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(k.UNFOLLOW, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FOLLOW, ".").concat(k.UNFOLLOW) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(k.GET_FOLLOW_INFO, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FOLLOW, ".").concat(k.GET_FOLLOW_INFO) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { FollowInfo: "followInfoList", To_Account: "userID", FollowerCount: "followersCount", FollowingCount: "followingCount", MutualFollowingCount: "mutualFollowersCount" } } }), this._map.set(k.GET_FOLLOW, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FOLLOW, ".").concat(k.GET_FOLLOW) }), body: { fromAccount: "", type: 1, nextCursor: "", count: 500 }, keyMap: { req: { type: "FollowType", nextCursor: "StartCursor", count: "WantNum" }, res: { FollowItem: "resultList", To_Account: "userID", ProfileItem: "profileList" } } }), this._map.set(k.CHECK_FOLLOW_TYPE, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.FOLLOW, ".").concat(k.CHECK_FOLLOW_TYPE) }), body: { fromAccount: "", userIDList: [] }, keyMap: { req: { userIDList: "To_Account" }, res: { ResultItem: "resultList", To_Account: "userID" } } }), this._map.set(k.SET_TOKEN, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.SET_TOKEN) }), body: { tokenID: "", pushMsg: 0, sdkAppID: 0, businessID: "", deviceBrand: "", deviceToken: "", isTpns: 0, isWebUniapp: 0, notificationStatus: 0, deviceModel: "", systemVersion: "", pushVersion: "" }, keyMap: { req: { tokenID: "TokenID", pushMsg: "PushMsg", sdkAppID: "EnterVersion", businessID: "BusiID", deviceBrand: "InstType", deviceToken: "VarToken", isTpns: "IsTpns", notificationStatus: "NotificationStatus", deviceModel: "DeviceModel", systemVersion: "SystemVersion", pushVersion: "PushPluginVersion" } } }), this._map.set(k.STAT_FOREGROUND, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.STAT_FOREGROUND) }), body: { isWebUniapp: 0 } }), this._map.set(k.STAT_BACKGROUND, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_OPEN_STATUS, ".").concat(k.STAT_BACKGROUND) }), body: { C2CUnread: 0, GroupUnread: 0, isWebUniapp: 0 }, keyMap: { req: { c2cUnreadCount: "C2cUnread", groupUnreadCount: "GrpUnread" } } }), this._map.set(k.PUSH_REPORT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.OFFLINE_PUSH_REPORT, ".").concat(k.PUSH_REPORT) }), body: { eventList: [] }, keyMap: { req: { eventList: "UinappPushEvents", type: "EventType", time: "EventTime", pushId: "ClickExt" } } }), this._map.set(k.SET_ALL_RECEIVE_MSG_OPT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_MSG_LOGIC, ".").concat(k.SET_ALL_RECEIVE_MSG_OPT) }), body: { startTime: 0, endTime: 0, isRepeated: 0, messageRemindType: 0 }, keyMap: { req: { messageRemindType: "Level" } } }), this._map.set(k.GET_ALL_RECEIVE_MSG_OPT, { head: y(y({}, e2), {}, { servcmd: "".concat(a.NAME.IM_MSG_LOGIC, ".").concat(k.GET_ALL_RECEIVE_MSG_OPT) }), body: { toAccount: void 0 } }); - } }, { key: "has", value: function(e2) { - return this._map.has(e2); - } }, { key: "get", value: function(e2) { - return this._map.get(e2); - } }, { key: "update", value: function() { - this._fillMap(); - } }, { key: "getKeyMap", value: function(e2) { - return this.has(e2) ? this.get(e2).keyMap || {} : (M.w("".concat(this._n, ".getKeyMap unknown P:").concat(e2)), {}); - } }, { key: "getProtocolData", value: function(e2) { - var t2 = e2.P, n2 = e2.data, e2 = this.get(t2), t2 = null; - if (n2) { - var o2, i2 = this._simpleDeepCopy(e2), i2 = this._updateService(n2, i2), a2 = i2.body, s2 = /* @__PURE__ */ Object.create(null); - for (o2 in a2) - if (Object.prototype.hasOwnProperty.call(a2, o2)) { - if (s2[o2] = a2[o2], void 0 === n2[o2]) - continue; - s2[o2] = n2[o2]; - } - i2.body = s2, t2 = this._getUplinkData(i2); - } else - t2 = this._getUplinkData(e2); - return t2; - } }, { key: "_getUplinkData", value: function(e2) { - var e2 = this._dataCleaner(e2), t2 = Kt(e2.head), t2 = Qa(e2.body, this._getReqKeyMap(t2)); - return e2.body = t2, e2; - } }, { key: "_updateService", value: function(e2, t2) { - var n2, o2, i2 = Kt(t2.head); - return this._isFromGroupRequest(t2) && (n2 = e2.type, o2 = e2.groupID, e2 = void 0 === (e2 = e2.groupIDList) ? [] : e2, N(o2 = void 0 === o2 ? void 0 : o2) && (o2 = e2[0] || ""), Nt({ type: n2, groupID: o2 })) && (t2.head.servcmd = "".concat(a.NAME.GRP_COMMUNITY, ".").concat(i2)), t2; - } }, { key: "_isFromGroupRequest", value: function(e2) { - return e2.head.servcmd.includes(a.NAME.GRP) || e2.head.servcmd.includes(a.NAME.GRP_ATTR); - } }, { key: "_getReqKeyMap", value: function(e2) { - e2 = this.getKeyMap(e2); - return y(y({}, Ba.req), e2.req); - } }, { key: "_dataCleaner", value: function(e2) { - var t2, n2 = Array.isArray(e2) ? [] : /* @__PURE__ */ Object.create(null); - for (t2 in e2) - Object.prototype.hasOwnProperty.call(e2, t2) && pt(t2) && null !== e2[t2] && void 0 !== e2[t2] && ("object" !== b(e2[t2]) ? n2[t2] = e2[t2] : n2[t2] = this._dataCleaner.bind(this)(e2[t2])); - return n2; - } }, { key: "_simpleDeepCopy", value: function(e2) { - for (var t2, n2 = Object.keys(e2), o2 = {}, i2 = 0, a2 = n2.length; i2 < a2; i2++) - t2 = n2[i2], O(e2[t2]) ? o2[t2] = Array.from(e2[t2]) : ut(e2[t2]) ? o2[t2] = this._simpleDeepCopy(e2[t2]) : o2[t2] = e2[t2]; - return o2; - } }]), Ts), gs = [k.MSG_PUSH_ACK], fs = (e(Cs, [{ key: "_onC2CMsgArray", value: function(e2) { - var t2 = this._sessionM.get(6); - e2.dataList.forEach(function(e3) { - var t3; - 1 === e3.isSyncMessage && (t3 = e3.from, e3.from = e3.to, e3.to = t3); - }), 1 === e2.needSync && this._sessionM.get(19).syncOnNeed(), t2.onNewMessage({ dataList: e2.dataList, isInstantMessage: true }); - } }, { key: "_onC2CMsgModified", value: function(e2) { - this._sessionM.get(6).onMsgModified(e2); - } }, { key: "_onGroupMsgArray", value: function(e2) { - var t2 = this._sessionM.get(7); - t2 && t2.onNewMessage({ event: e2.event, dataList: e2.dataList, isInstantMessage: true }); - } }, { key: "_onGroupMsgModified", value: function(e2) { - var t2 = this._sessionM.get(7); - t2 && t2.onMsgModified(e2); - } }, { key: "_onGroupTips", value: function(e2) { - var t2 = this._sessionM.get(7); - if (t2) { - var n2 = e2.event, o2 = e2.dataList, i2 = e2.isInstantMessage, a2 = void 0 === i2 || i2, s2 = e2.isSyncingEnded; - switch (n2) { - case 4: - case 6: - t2.onNewGroupTips({ event: n2, dataList: o2 }); - break; - case 5: - for (var r2 = 0; r2 < o2.length; r2++) - if (O(o2[r2].elements.revokedInfos)) - t2.onMsgRevoked({ dataList: o2 }); - else if (O(o2[r2].elements.groupMessageReadNotice)) - t2.onMsgReadNotice({ dataList: o2 }); - else { - if (!O(o2[r2].elements.readReceiptList)) { - t2.onNewGroupSystemNotice({ dataList: o2, isInstantMessage: a2, isSyncingEnded: s2 }); - break; - } - t2.onReadReceiptList({ dataList: o2 }); - } - break; - case 12: - this._sessionM.get(11).onNewGroupAtTips({ dataList: o2 }); - break; - default: - M.l("".concat(this._n, "._onGroupTips unknown event:").concat(n2, " dataList:"), o2); - } - } - } }, { key: "_onC2CNotifyMsgArray", value: function(e2) { - var o2, i2 = this, a2 = e2.dataList; - O(a2) && (o2 = this._sessionM.get(6), a2.forEach(function(e3) { - var t2, n2; - f(e3) && (e3.hasOwnProperty("kickoutMsgNotify") ? (t2 = (n2 = e3.kickoutMsgNotify).kickType, n2 = void 0 === (n2 = n2.newInstanceInfo) ? {} : n2, 1 === t2 ? i2._sessionM.onMultipleAccountKickedOut(n2) : 2 === t2 ? i2._sessionM.onMultipleDeviceKickedOut(n2) : 3 === t2 && i2._sessionM.onRestApiKickedOut(n2)) : e3.hasOwnProperty("c2cMessageRevokedNotify") ? o2 && o2.onMsgRevoked({ dataList: a2 }) : e3.hasOwnProperty("c2cMessageReadReceipt") ? o2 && o2.onMsgReadReceipt({ dataList: a2 }) : e3.hasOwnProperty("c2cMessageReadNotice") ? o2 && o2.onMsgReadNotice({ dataList: a2 }) : e3.hasOwnProperty("muteNotificationsSync") && i2._sessionM.get(11).onC2CMsgRemindTypeSynced({ dataList: a2 })); - })); - } }, { key: "_onC2CReadReceiptArray", value: function(e2) { - this._sessionM.get(6).onReadReceiptList(e2); - } }, { key: "_onProfileModified", value: function(e2) { - this._sessionM.get(4).onProfileModified({ dataList: e2.dataList }); - var t2 = this._sessionM.get(8); - t2 && t2.onFriendProfileModified({ dataList: e2.dataList }); - } }, { key: "_onRelationChainModified", value: function(e2) { - this._sessionM.get(4).onRelationChainModified({ dataList: e2.dataList }); - var t2 = this._sessionM.get(8); - t2 && t2.onRelationChainModified({ dataList: e2.dataList }); - } }, { key: "_onRecentContact", value: function(e2) { - var i2, e2 = e2.dataList; - O(e2) && (i2 = this._sessionM.get(11)) && e2.forEach(function(e3) { - var t2, n2, o2 = e3.pushType; - 1 === o2 ? (t2 = e3.recentContactDeleteItem, i2.onConvDeleted(t2.recentContactList)) : 2 === o2 ? (t2 = e3.recentContactTopItem, i2.onConvPinnedStatus(t2.recentContactList, true)) : 3 === o2 ? (t2 = e3.recentContactTopItem, i2.onConvPinnedStatus(t2.recentContactList, false)) : 4 === o2 ? (t2 = e3.recentContactMarkContact, i2.onConvMarkUpdated(t2.recentContactMarkContactItem)) : 5 === o2 ? (t2 = e3.recentContactCreateContactGroup, i2.onConvGroupCreated(t2.msgContactGroupContactItem)) : 6 === o2 ? (t2 = e3.recentContactDelContactGroup, i2.onConvGroupDeleted(t2.msgGroupItem)) : 7 === o2 && (o2 = (t2 = e3.recentContactUpdateContactGroup).updateType, e3 = t2.msgUpdateGroup, t2 = t2.msgUpdateContact, 1 === o2 ? 1 === (n2 = e3.updateGroupType) ? i2.onConvGroupNameUpdated(e3) : 2 === n2 && i2.onConvInGroupUpdated(e3) : 2 === o2 && i2.onConvAddedToOrDeletedFromGroup(t2)); - }); - } }, { key: "_onAllMsgRead", value: function(e2) { - var e2 = e2.dataList, t2 = this._sessionM.get(11); - t2 && t2.onPushedAllMessageRead(e2); - } }, { key: "_onUserStatusList", value: function(e2) { - this._sessionM.get(4).onUserStatusUpdated(e2); - } }, { key: "_onMsgExtNotify", value: function(e2) { - this._sessionM.get(3).onMsgExtNotify(e2); - } }, { key: "_onMsgReactionNotifyList", value: function(e2) { - this._sessionM.get(34).onReactionNotifyList(e2); - } }, { key: "_onMsgReactionNotify", value: function(e2) { - this._sessionM.get(34).onReactionNotify(e2); - } }, { key: "_onFollowNotify", value: function(e2) { - this._sessionM.get(35).onFollowNotify(e2); - } }, { key: "_onTopicLatestMsg", value: function(e2) { - this._sessionM.get(10).onTopicLatestMsg(e2); - } }, { key: "onMessage", value: function(e2) { - var t2 = this, n2 = e2.body; - if (this._filterMsgFromIMOpenPush(e2)) { - var o2, i2 = n2.eventArray, a2 = n2.isInstantMessage, s2 = n2.isSyncingEnded, r2 = n2.needSync; - if (O(i2)) - for (var c2, u2, l2, d2 = 0, p2 = i2.length; d2 < p2; d2++) - 100 !== (l2 = (c2 = i2[d2]).event) ? 24 !== l2 ? 26 !== l2 ? (o2 = Object.keys(c2).find(function(e3) { - return -1 !== t2._keys.indexOf(e3); - })) ? (u2 = 14 === l2 ? { readAllC2CMessage: c2[o2], groupMessageReadInfoList: c2.groupMessageReadNotice || [] } : 16 === l2 ? { userID: c2.userID, timestamp: c2.timestamp, readReceiptList: c2[o2] } : c2[o2], this._eventHandlerMap.get(o2)({ event: l2, dataList: u2, isInstantMessage: a2, isSyncingEnded: s2, needSync: r2 })) : M.l("".concat(this._n, ".onMessage unknown eventItem:"), c2) : this._onTopicLatestMsg(c2) : this._onAllRcvMsgOptNotify(c2) : this._onRoomCustomData(c2.content); - } - } }, { key: "_onRoomCustomData", value: function(e2) { - this._sessionM.get(30).onRoomCustomDataReceived(e2), M.l("".concat(this._n, "._onRoomCustomData data:").concat(e2)); - } }, { key: "_onAllRcvMsgOptNotify", value: function(e2) { - this._sessionM.get(11).onAllRcvMsgOptNotify(e2); - } }, { key: "_filterMsgFromIMOpenPush", value: function(e2) { - var t2 = e2.head, e2 = e2.body, t2 = t2.servcmd, n2 = false; - return !(n2 = N(t2) ? n2 : t2.includes(a.NAME.IM_CONFIG_MANAGER) || t2.includes(a.NAME.OVERLOAD_PUSH) || t2.includes(a.NAME.STAT_SERVICE)) || (t2.includes(k.PUSHED_CLOUD_CTRL_CONFIG) ? this._sessionM.get(23).onPushedConfig(e2) : t2.includes(k.PUSHED_COMMERCIAL_CONFIG) ? this._sessionM.get(27).onPushedConfig(e2) : t2.includes(k.OVERLOAD_NOTIFY) ? this._sessionM.onPushedServerOverload(e2) : t2.includes(k.KICK_OTHER) && (n2 = Date.now(), this._sessionM.reLoginOnKickOther(), e2 = new G("kickOther"), n2 = n2 - (t2 = this._sessionM.get(1).getLastWsHelloTs()), e2.setMessage("last wshello time:".concat(t2, " diff:").concat(n2, "ms")).end()), false); - } }]), Cs), ms = [{ cmd: k.GET_GRP_PROFILE, interval: 1, count: 8 }, { cmd: k.UPDATE_GRP_PROFILE, interval: 1, count: 8 }, { cmd: k.GET_AV_MBR_LIST, interval: 3, count: 1 }, { cmd: k.GET_GRP_PENDENCY, interval: 1, count: 15 }, { cmd: k.GET_TOPIC_LIST, interval: 1, count: 10 }, { cmd: k.SET_GRP_ATTR, interval: 5, count: 10 }, { cmd: k.MODIFY_GRP_ATTR, interval: 5, count: 10 }, { cmd: k.DEL_GRP_ATTR, interval: 5, count: 10 }, { cmd: k.CLEAR_GRP_ATTR, interval: 5, count: 10 }, { cmd: k.GET_GRP_ATTR, interval: 5, count: 20 }, { cmd: k.UPDATE_GRP_COUNTER, interval: 5, count: 20 }, { cmd: k.GET_GRP_COUNTER, interval: 5, count: 20 }, { cmd: k.SET_ALL_MSG_READ, interval: 1, count: 1 }, { cmd: k.GET_USER_STATUS, interval: 5, count: 20 }, { cmd: k.SUB_USER_STATUS, interval: 5, count: 20 }, { cmd: k.UNSUB_USER_STATUS, interval: 5, count: 20 }, { cmd: k.MSG_CLOUD_SEARCH, interval: 1, count: 2 }, { cmd: k.CHECK_FOLLOW_TYPE, interval: 5, count: 20 }, { cmd: k.GET_GRP_ROAMING_MSG, interval: 1, count: 20 }, { cmd: k.GET_C2C_ROAMING_MSG, interval: 1, count: 20 }], vs = /* @__PURE__ */ new Map(), Is = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"], Ms = 0, ys = Is.length; Ms < ys; Ms++) - vs.set(Ms, Is[Ms]); - function Cs(e2) { - d(this, Cs), this._sessionM = e2, this._n = "MsgDispatcher", this._eventHandlerMap = /* @__PURE__ */ new Map(), this._eventHandlerMap.set("C2CMessageArray", this._onC2CMsgArray.bind(this)), this._eventHandlerMap.set("groupMessageArray", this._onGroupMsgArray.bind(this)), this._eventHandlerMap.set("groupTips", this._onGroupTips.bind(this)), this._eventHandlerMap.set("C2CNotifyMessageArray", this._onC2CNotifyMsgArray.bind(this)), this._eventHandlerMap.set("C2CReadReceiptArray", this._onC2CReadReceiptArray.bind(this)), this._eventHandlerMap.set("profileModify", this._onProfileModified.bind(this)), this._eventHandlerMap.set("friendListMod", this._onRelationChainModified.bind(this)), this._eventHandlerMap.set("recentContactMod", this._onRecentContact.bind(this)), this._eventHandlerMap.set("readAllC2CMessage", this._onAllMsgRead.bind(this)), this._eventHandlerMap.set("c2cMessageModified", this._onC2CMsgModified.bind(this)), this._eventHandlerMap.set("groupMessageModified", this._onGroupMsgModified.bind(this)), this._eventHandlerMap.set("userStatusList", this._onUserStatusList.bind(this)), this._eventHandlerMap.set("messageExtensionNotify", this._onMsgExtNotify.bind(this)), this._eventHandlerMap.set("messageReactionNotifyList", this._onMsgReactionNotifyList.bind(this)), this._eventHandlerMap.set("messageReactionNotify", this._onMsgReactionNotify.bind(this)), this._eventHandlerMap.set("followChangeList", this._onFollowNotify.bind(this)), this._keys = p(this._eventHandlerMap.keys()); - } - function Ts(e2) { - d(this, Ts), this._n = "PHandler", this._sessionM = e2, this._map = /* @__PURE__ */ new Map(), this._fillMap(); - } - function Ds(e2) { - return d(this, Ds), (e2 = $a.call(this, e2))._n = "ChannelModule", e2._socketHandler = new us(i(e2)), e2._probing = false, e2._isAppShowing = true, e2._previousState = A.NET_STATE_CONNECTED, e2._timerForNotLoggedIn = -1, e2._timerForNotLoggedIn = setInterval(e2.onCheckTimer.bind(i(e2)), 1e3), e2._fatalErrorFlag = false, e2._disconnectedTS = 0, e2._lastDiagnoseTS = 0, e2; - } - function Es(e2) { - d(this, Es), this._chM = e2, this._n = "SocketHandler", this._promiseMap = /* @__PURE__ */ new Map(), this._readyState = cs, this._simpleRequestMap = /* @__PURE__ */ new Map(), this.MAX_SIZE = 100, this._startSequence = ft(), this._startTs = 0, this._reConnectFlag = false, this._nextPingTs = 0, this._reConnectCount = 0, this.MAX_RECONNECT_COUNT = 3, this._socketID = -1, this._random = 0, this._socket = null, this._url = "", this._onOpenTs = 0, this._canIUseBinaryFrame = true, this._isWorkerEnabled = true, this._currentSite = se, this._setWebsocketHost(), this._initConnection(); - } - function Ls(e2) { - d(this, Ls); - var t2, i2, n2 = (this._handler = e2).getURL(); - this._socket = null, this._workerSocket = null, this._id = ft(), this._handler.getIsWorkerEnabled() ? (t2 = URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'], { type: "application/javascript; charset=utf-8" })), this._workerSocket = new Worker(t2), (i2 = this)._workerSocket.onmessage = function(e3) { - var t3 = e3.data, n3 = t3.callback, o2 = t3.e, t3 = t3.extensions; - "onOpen" === n3 ? i2._onOpen(t3) : "onClose" === n3 ? i2._onClose(o2) : "onError" === n3 ? i2._onError(o2) : "onMessage" === n3 && i2._onMessage(e3.data); - }, this._workerSocket.postMessage({ cmd: "start", id: this._id, url: n2 })) : v ? ve ? (I.connectSocket({ url: n2, header: { "content-type": "application/json" } }), I.onSocketClose(this._onClose.bind(this)), I.onSocketOpen(this._onOpen.bind(this)), I.onSocketMessage(this._onMessage.bind(this)), I.onSocketError(this._onError.bind(this))) : (this._socket = I.connectSocket({ url: n2, header: { "content-type": "application/json" }, complete: function() { - } }), this._socket.onClose(this._onClose.bind(this)), this._socket.onOpen(this._onOpen.bind(this)), this._socket.onMessage(this._onMessage.bind(this)), this._socket.onError(this._onError.bind(this))) : (this._socket = new WebSocket(n2), this._socket.binaryType = "arraybuffer", this._socket.onopen = this._onOpen.bind(this, this._socket.extensions), this._socket.onmessage = this._onMessage.bind(this), this._socket.onclose = this._onClose.bind(this), this._socket.onerror = this._onError.bind(this)), this._canIUseBinaryFrame = e2.canIUseBinaryFrame(); - } - function Ss(e2) { - for (var t2, n2, o2 = e2, i2 = "", a2 = 0, s2 = (o2 = e2.length % 8 != 0 ? "0".repeat(8 - e2.length % 8) + e2 : o2).length; a2 < s2; a2 += 8) - t2 = parseInt(o2.slice(a2, a2 + 4), 2), n2 = parseInt(o2.slice(a2 + 4, a2 + 8), 2), i2 += vs.get(t2) + vs.get(n2); - return i2; - } - function ks(e2) { - var t2; - return e2 < 0 || 53 < e2 ? NaN : (t2 = 0 | 1073741824 * Math.random(), 30 < e2 ? t2 + 1073741824 * (0 | Math.random() * (1 << e2 - 30)) : t2 >>> 30 - e2); - } - function As(e2, t2) { - for (var n2 = e2.toString(16), o2 = t2 - n2.length, i2 = "0"; 0 < o2; o2 >>>= 1, i2 += i2) - 1 & o2 && (n2 = i2 + n2); - return n2; - } - t(Wr, u), xs = n(Wr), e(Wr, [{ key: "_init", value: function() { - this._updateCmdFreqLimitMap(ms); - } }, { key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("cmd_frequency_limit"); - N(e2) || (e2 = JSON.parse(e2), this._updateCmdFreqLimitMap(e2)); - } }, { key: "_updateCmdFreqLimitMap", value: function(e2) { - var t2 = this; - e2.forEach(function(e3) { - t2._cmdFreqLimitMap.set(e3.cmd, { interval: e3.interval, count: e3.count }); - }); - } }, { key: "updateProtocolConfig", value: function() { - this._pHandler.update(); - } }, { key: "req", value: function(e2) { - M.d("".concat(this._n, ".req options:"), e2); - var t2, n2, o2 = e2.P; - return this._pHandler.has(o2) ? (t2 = (e2 = this.getProtocolData(e2)).head.servcmd, this._isFreqOverLimit(t2) ? D({ code: n2 = L.OVER_FREQUENCY_LIMIT, message: this.getErrMsg(n2, this._getCmd(t2)) }) : this._isServerOverload(t2) ? D({ code: n2 = L.OPEN_SERVICE_OVERLOAD_ERROR, message: this.getErrMsg(n2, this._getCmd(t2)) }) : (n2 = this.get(21), gs.includes(o2) ? n2.simplySend(e2) : n2.send(e2))) : (M.w("".concat(this._n, ".req unknown P:").concat(o2)), D({ code: L.NO_PROTOCOL })); - } }, { key: "getKeyMap", value: function(e2) { - return this._pHandler.getKeyMap(e2); - } }, { key: "genCommonHead", value: function() { - var e2 = this.get(12); - return { ver: "v4", platform: this._platform, websdkappid: ae, websdkversion: oe, a2: e2.getA2Key() || void 0, tinyid: e2.getTinyID() || void 0, status_instid: e2.getStatusInstanceID(), sdkappid: e2.getSDKAppID(), contenttype: e2.getContentType(), reqtime: 0, identifier: e2.getA2Key() ? void 0 : e2.getUserID(), usersig: e2.getA2Key() ? void 0 : e2.getUserSig(), sdkability: 12775283, sdkability_ext: Ss(""), cappid: e2.getApplicationID() }; - } }, { key: "genCosSpecifiedHead", value: function() { - var e2 = this.get(12); - return { ver: "v4", platform: this._platform, websdkappid: ae, websdkversion: oe, sdkappid: e2.getSDKAppID(), contenttype: e2.getContentType(), reqtime: 0, identifier: e2.getUserID(), usersig: e2.getUserSig(), status_instid: e2.getStatusInstanceID(), sdkability: 12775283, sdkability_ext: Ss(""), cappid: e2.getApplicationID() }; - } }, { key: "genSSOReportHead", value: function() { - var e2 = this.get(12); - return { ver: "v4", platform: this._platform, websdkappid: ae, websdkversion: oe, sdkappid: e2.getSDKAppID(), contenttype: "", reqtime: 0, identifier: "", usersig: "", status_instid: e2.getStatusInstanceID(), sdkability: 12775283, sdkability_ext: Ss(""), cappid: e2.getApplicationID() }; - } }, { key: "getProtocolData", value: function(e2) { - return this._pHandler.getProtocolData(e2); - } }, { key: "trans", value: function(e2) { - var t2 = e2.servcmd, e2 = e2.data, t2 = { head: y(y({}, this.genCommonHead()), {}, { servcmd: t2 }), body: e2 }; - return this.get(21).send(t2); - } }, { key: "sendComboMessage", value: function(e2) { - var t2 = e2.servcmd, e2 = e2.data, t2 = { head: y(y({}, this.genCommonHead()), {}, { servcmd: t2 }), body: e2 }; - return this.get(21).send(t2); - } }, { key: "onErrorCodeNotZero", value: function(e2) { - var t2, n2 = e2.errorCode; - n2 === L.HELLO_ANSWER_KICKED_OUT && (t2 = e2.kickType, e2 = void 0 === (e2 = e2.newInstanceInfo) ? {} : e2, 1 === t2 ? this.onMultipleAccountKickedOut(e2) : 2 === t2 ? this.onMultipleDeviceKickedOut(e2) : 3 === t2 && this.onRestApiKickedOut(e2)), n2 !== L.MSG_A2KEY_EXPIRED && n2 !== L.ACCOUNT_A2KEY_EXPIRED || (this._onUserSigExpired(), this.get(21).reConnect()); - } }, { key: "onMessage", value: function(e2) { - var t2 = e2.body, n2 = t2.needAck, t2 = t2.sessionData; - 1 === (void 0 === n2 ? 0 : n2) && this._sendACK(t2), this._msgDispatcher.onMessage(e2); - } }, { key: "onReconnected", value: function(e2) { - this._incrementalPullContactFlag = e2 <= 300, this._reLoginOnReconnected(); - } }, { key: "reLoginOnKickOther", value: function() { - M.l("".concat(this._n, ".reLoginOnKickOther")), this._reLogin(); - } }, { key: "_reLoginOnReconnected", value: function() { - M.l("".concat(this._n, "._reLoginOnReconnected")), this._reLogin(); - } }, { key: "_reLogin", value: function() { - var e2, t2, s2, r2 = this, c2 = "".concat(this._n, "._reLogin"); - this.isLoggedIn() && (e2 = 0, (t2 = this.get(1).getPushModule()) && (e2 = t2.getUniAppPlatform()), s2 = new G("reLogin"), this.req({ P: k.LOGIN, data: { isWebUniapp: e2, customInfo: this.get(12).getCustomLoginInfo() } }).then(function(e3) { - var e3 = e3.data, t3 = e3.instanceID, e3 = e3.customStatus, n2 = r2.get(12), o2 = Wo(e3), i2 = (n2.setStatusInstanceID(t3), r2.get(21)), a2 = i2.getSocketID(), a2 = "socketID:".concat(a2, " instanceID:").concat(t3, " customStatus:").concat(o2), t3 = (s2.setMessage(a2).end(true), M.l("".concat(c2, " ok. ").concat(a2)), n2.getCustomStatus() !== o2 && r2.get(4).onUserStatusUpdated({ dataList: [{ to: r2.getMyUserID(), statusType: A.USER_STATUS_ONLINE, customStatus: e3 }] }), i2.diagnose(), r2.get(11).syncConvList(r2._incrementalPullContactFlag).then(function() { - M.l("".concat(c2, ", sync conv list ok.")), r2.get(25).start(); - }), r2.get(7)), a2 = (t3 && t3.updateLocalMainSequenceOnReconnected(), r2.get(10)), n2 = (a2.resetGetTopicTime(), a2.getTopicListOnReconnected(), r2.get(35)); - n2 && n2.clearCacheOnReconnected(); - })); - } }, { key: "onMultipleAccountKickedOut", value: function(e2) { - this.get(1).onMultipleAccountKickedOut(e2); - } }, { key: "onMultipleDeviceKickedOut", value: function(e2) { - this.get(1).onMultipleDeviceKickedOut(e2); - } }, { key: "_onUserSigExpired", value: function() { - this.get(1).onUserSigExpired(); - } }, { key: "onRestApiKickedOut", value: function(e2) { - this.get(1).onRestApiKickedOut(e2); - } }, { key: "_sendACK", value: function(e2) { - this.req({ P: k.MSG_PUSH_ACK, data: { sessionData: e2 } }); - } }, { key: "_isFreqOverLimit", value: function(e2) { - var t2, n2, o2, i2, e2 = e2.split(".")[1]; - return !!this._cmdFreqLimitMap.has(e2) && (!this._cmdReqInfoMap.has(e2) || (t2 = (n2 = this._cmdFreqLimitMap.get(e2)).count, n2 = n2.interval, o2 = (i2 = this._cmdReqInfoMap.get(e2)).startTime, i2 = i2.requestCount, Date.now() - o2 > 1e3 * n2) ? (this._cmdReqInfoMap.set(e2, { startTime: Date.now(), requestCount: 1 }), false) : (this._cmdReqInfoMap.set(e2, { startTime: o2, requestCount: i2 += 1 }), t2 < i2)); - } }, { key: "_isServerOverload", value: function(e2) { - var t2, n2; - return !!this._serverOverloadInfoMap.has(e2) && (t2 = (n2 = this._serverOverloadInfoMap.get(e2)).overloadTime, n2 = n2.waitingTime, Date.now() - t2 <= 1e3 * n2 || (this._serverOverloadInfoMap.delete(e2), false)); - } }, { key: "_getCmd", value: function(e2) { - var t2 = ""; - if (e2.includes(".")) { - var n2, o2 = e2.split(".")[1]; - for (n2 in k) - if (k[n2] === o2) { - t2 = n2; - break; - } - } - return t2; - } }, { key: "onPushedServerOverload", value: function(e2) { - var t2 = e2.overloadCommand, e2 = e2.waitingTime; - this._serverOverloadInfoMap.set(t2, { overloadTime: Date.now(), waitingTime: e2 }), M.w("".concat(this._n, ".onPushedServerOverload waitingTime:").concat(e2, "s cmd:").concat(this._getCmd(t2))); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._updateCmdFreqLimitMap(ms), this._cmdReqInfoMap.clear(), this._serverOverloadInfoMap.clear(), this._incrementalPullContactFlag = true; - } }]); - var Rs, Os, Ns, Gs, Ps, Us, bs, ws, Fs, qs, xs, Vs = Wr, Hs = (t(Yr, u), qs = n(Yr), e(Yr, [{ key: "getCloudConfig", value: function(e2) { - return N(e2) ? this._cloudConfig : this._cloudConfig.has(e2) ? this._cloudConfig.get(e2) : void 0; - } }, { key: "getServerConfig", value: function(e2) { - var t2 = { code: 0, data: "" }; - return !N(e2) && this._cloudConfig.has(e2) && (t2.data = this._cloudConfig.get(e2)), Promise.resolve(t2); - } }, { key: "_canFetch", value: function() { - return this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime; - } }, { key: "fetchConfig", value: function() { - var o2, i2 = this, a2 = "".concat(this._n, ".fetchConfig"), e2 = this._canFetch(); - M.l("".concat(a2, " canFetch:").concat(e2)), e2 && (o2 = new G("fetchCloudCtrlConfig"), e2 = this.get(12).getSDKAppID(), this._isFetching = true, this.req({ P: k.FETCH_CLOUD_CTRL_CONFIG, data: { SDKAppID: e2, version: this._version } }).then(function(e3) { - i2._isFetching = false; - var t2 = e3.data, n2 = t2.version, t2 = t2.cloudControlConfig; - o2.setMessage("version:".concat(i2._version, " newVersion:").concat(n2, " config:").concat(t2)).end(), M.l("".concat(a2, " ok")), i2._parse(e3.data); - }).catch(function(e3) { - i2._isFetching = false, o2.setError(e3).end(), M.l("".concat(a2, " failed. error:"), e3), i2._setExpiredTime(12e4); - })); - } }, { key: "onPushedConfig", value: function(e2) { - M.l("".concat(this._n, ".onPushedConfig config:"), e2), new G("pushedCloudCtrlConfig").setMessage("newVersion:".concat(e2.version, " config:").concat(e2.cloudControlConfig)).end(), this._parse(e2); - } }, { key: "onCheckTimer", value: function(e2) { - this._canFetch() && this.fetchConfig(); - } }, { key: "_parse", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, "._parse"), o2 = e2.errorCode, i2 = e2.errorMessage, a2 = e2.cloudControlConfig, s2 = e2.version, r2 = e2.expiredTime; - if (0 === o2) { - if (this._version !== s2) { - var c2 = null; - try { - c2 = JSON.parse(a2); - } catch (e3) { - this.isPrivateNetWork() || M.e("".concat(n2, " failed. config:"), a2); - } - c2 && (this._cloudConfig.clear(), Object.keys(c2).forEach(function(e3) { - t2._cloudConfig.set(e3, c2[e3]); - }), this._version = s2, this.emitIEvt(P.CLOUD_CONFIG)); - } - this._setExpiredTime(1e3 * r2); - } else - N(o2) ? (M.l("".concat(n2, " failed. Invalid message format:"), e2), this._setExpiredTime(36e5)) : (M.e("".concat(n2, " errorCode:").concat(o2, " errorMessage:").concat(i2)), this._setExpiredTime(12e4)); - } }, { key: "_setExpiredTime", value: function(e2) { - this._expiredTime = Date.now() + e2; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._cloudConfig.clear(), this._expiredTime = 0, this._version = 0, this._isFetching = false; - } }]), Yr), Bs = (t(Kr, u), Fs = n(Kr), e(Kr, [{ key: "start", value: function() { - this._recoverGroupChat(), this._recoverC2CChat(); - } }, { key: "_recoverGroupChat", value: function() { - var n2, o2, i2, a2, s2 = this, e2 = this._getLocalConvList().filter(function(e3) { - return e3.type === A.CONV_GROUP && e3.groupProfile.type !== A.GRP_AVCHATROOM; - }), r2 = this.get(11), c2 = []; - e2.forEach(function(e3) { - var t2 = e3.conversationID, e3 = e3.lastMessage; - n2 = t2.replace(A.CONV_GROUP, ""), o2 = r2.getLocalLastMessage(t2), e3 && 0 !== e3.lastSequence && o2 && (i2 = e3.lastSequence, o2 = o2.sequence, a2 = i2 - o2, 0 < o2) && 1 <= a2 && a2 < 300 ? s2._recoverGroupMsg({ groupID: n2, localLastMessageSequence: o2, remoteLastMessageSequence: i2 }) : c2.push(n2); - }), this._getGroupNotice(c2); - } }, { key: "_recoverC2CChat", value: function() { - var n2, o2, i2, a2 = this, e2 = this._getLocalConvList().filter(function(e3) { - return e3.type === A.CONV_C2C; - }), s2 = this.get(11), r2 = [Promise.resolve()]; - e2.forEach(function(e3) { - var t2 = e3.conversationID, e3 = e3.lastMessage; - n2 = s2.getLocalLastMessage(t2), e3 && 0 !== e3.lastTime && n2 && (o2 = e3.lastTime, n2 = n2.time, i2 = o2 - n2, 0 < n2) && 1 <= i2 && i2 <= 600 && r2.push(a2._recoverC2CMsg({ conversationID: t2, localLastMessageTime: n2, remoteLastMessageTime: o2 })); - }), Promise.all(r2).then(function() { - M.l("".concat(a2._n, "._recoverC2CChat all done")), a2.get(19).syncOnReconnected(); - }); - } }, { key: "_getLocalConvList", value: function() { - return this.get(11).getLocalConvList(); - } }, { key: "_recoverGroupMsg", value: function(e2) { - var d2 = this, p2 = "".concat(this._n, ".").concat("_recoverGroupMsg"), _2 = (M.l("".concat(p2, " options:"), e2), e2.groupID), h2 = e2.localLastMessageSequence, g2 = e2.remoteLastMessageSequence, f2 = JSON.stringify(e2), m2 = new G("_recoverGroupMsg"); - m2.setMessage(f2), this._getGroupRoamingMsg({ groupID: _2, sequence: h2 }).then(function(e3) { - var e3 = e3.data, t2 = e3.complete, n2 = e3.messageList; - if (!N(n2)) { - var e3 = n2[0].sequence, o2 = n2.map(function(e4) { - return e4.sequence; - }), o2 = "".concat(f2, " complete:").concat(t2, " sequenceList:").concat(o2), i2 = (M.l("".concat(p2, " ").concat(o2)), e3 !== h2 && e3 < g2 && 2 !== t2 && d2._recoverGroupMsg({ groupID: _2, localLastMessageSequence: e3, remoteLastMessageSequence: g2 }), m2.setMessage(o2).end(), d2.get(7)); - 1 < n2.length && n2.sort(function(e4, t3) { - return e4.sequence - t3.sequence; - }); - for (var a2 = false, s2 = 0, r2 = n2.length; s2 < r2; s2++) - if (n2[s2].from === A.CONV_SYSTEM) { - a2 = true; - break; - } - if (a2) - for (var c2 = 0, u2 = n2.length; c2 < u2; c2++) { - var l2 = n2[c2]; - l2.from !== A.CONV_SYSTEM ? i2.onNewMessage({ dataList: [l2], isInstantMessage: false, updateUnreadCount: false }) : i2.onNewGroupTips({ event: l2.event, dataList: [l2] }); - } - else - i2.onNewMessage({ dataList: n2, isInstantMessage: false, updateUnreadCount: false }); - } - }).catch(function(e3) { - m2.setError(e3).end(), M.w("".concat(p2, " failed. error:"), e3); - }); - } }, { key: "_getGroupNotice", value: function(e2) { - var t2 = e2.length; - if (M.l("".concat(this._n, "._getGroupNotice length:").concat(t2)), 0 !== t2) { - var n2 = this.get(7); - if (t2 <= 10) - n2.getNotice(e2); - else { - var o2 = Math.floor(t2 / 10); - 5 <= o2 && (o2 = 5); - for (var i2 = 0; i2 <= o2; i2++) - n2.getNotice(e2.slice(10 * i2, 10 * (i2 + 1))); - } - } - } }, { key: "_getGroupRoamingMsg", value: function(e2) { - var t2 = e2.groupID, e2 = e2.sequence; - return this.req({ P: k.GET_GRP_ROAMING_MSG, data: { groupID: t2, count: this.PULL_LIMIT_COUNT, sequence: e2 + this.PULL_LIMIT_COUNT - 1 } }); - } }, { key: "_recoverC2CMsg", value: function(e2) { - var o2 = this, i2 = "".concat(this._n, ".").concat("_recoverC2CMsg"), a2 = (M.l("".concat(i2, " options:"), e2), e2.conversationID), t2 = e2.localLastMessageTime, s2 = e2.remoteLastMessageTime, r2 = JSON.stringify(e2), c2 = new G("_recoverC2CMsg"); - return c2.setMessage(r2), this._getC2CRoamingMsg({ conversationID: a2, time: t2 }).then(function(e3) { - var e3 = e3.data, t3 = e3.complete, e3 = e3.messageList; - if (!N(e3)) { - var n2 = e3.length, n2 = (o2.get(6).onNewMessage({ dataList: e3, isInstantMessage: true }), e3[n2 - 1].time), e3 = e3.map(function(e4) { - return e4.random; - }), e3 = "".concat(r2, " complete:").concat(t3, " randomList:").concat(e3); - if (M.l("".concat(i2, " ").concat(e3)), c2.setMessage(e3).end(), n2 < s2 && 1 !== t3) - return o2._recoverC2CMsg({ conversationID: a2, localLastMessageTime: n2, remoteLastMessageTime: s2 }); - } - }).catch(function(e3) { - c2.setError(e3).end(), M.w("".concat(i2, " failed. error:"), e3); - }); - } }, { key: "_getC2CRoamingMsg", value: function(e2) { - var t2 = e2.conversationID, e2 = e2.time; - return this.req({ P: k.GET_C2C_ROAMING_MSG, data: { peerAccount: t2.replace(A.CONV_C2C, ""), count: this.PULL_LIMIT_COUNT + 1, lastMessageTime: e2, direction: 1 } }); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")); - } }]), Kr), Ks = (e(Br, [{ key: "addMessageDelay", value: function(e2) { - e2 = Be() - e2; - 0 <= e2 && this._e2eDelayArray.push(e2); - } }, { key: "_calcAvg", value: function(e2, t2) { - var n2; - return 0 === t2 ? 0 : (n2 = 0, e2.forEach(function(e3) { - n2 += e3; - }), Yt(n2 / t2, 1)); - } }, { key: "_calcCountWithLimit", value: function(e2) { - var t2 = e2.e2eDelayArray, n2 = e2.min, o2 = e2.max; - return t2.filter(function(e3) { - return n2 <= e3 && e3 < o2; - }).length; - } }, { key: "_calcPercent", value: function(e2, t2) { - e2 = Yt(e2 / t2 * 100, 2); - return e2 = 100 < e2 ? 100 : e2; - } }, { key: "_checkE2EDelayException", value: function(e2, t2) { - var n2, o2, i2, a2 = e2.filter(function(e3) { - return t2 < e3; - }); - 0 < a2.length && (n2 = a2.length, o2 = Math.min.apply(Math, p(a2)), i2 = Math.max.apply(Math, p(a2)), a2 = this._calcAvg(a2, n2), 50 < (e2 = Yt(n2 / e2.length * 100, 2))) && new G("messageE2EDelayException").setMessage("count:".concat(n2, " min:").concat(o2, " max:").concat(i2, " avg:").concat(a2, " percent:").concat(e2)).setLevel("warning").end(); - } }, { key: "getStatResult", value: function() { - var e2, t2, n2, o2, i2, a2, s2 = this._e2eDelayArray.length; - return 0 === s2 ? null : (e2 = p(this._e2eDelayArray), t2 = this._calcCountWithLimit({ e2eDelayArray: e2, min: 0, max: 1 }), n2 = this._calcCountWithLimit({ e2eDelayArray: e2, min: 1, max: 3 }), o2 = this._calcPercent(t2, s2), i2 = this._calcPercent(n2, s2), a2 = this._calcAvg(e2, s2), this._checkE2EDelayException(e2, 3), e2.length = 0, this.reset(), { totalCount: s2, countLessThan1Second: t2, percentOfCountLessThan1Second: o2, countLessThan3Second: n2, percentOfCountLessThan3Second: i2, avgDelay: a2 }); - } }, { key: "reset", value: function() { - this._e2eDelayArray.length = 0; - } }]), Br), Ys = (e(Hr, [{ key: "addRequestCount", value: function() { - this._requestCount += 1; - } }, { key: "addRTT", value: function(e2) { - this._rttArray.push(e2); - } }, { key: "_calcTotalCount", value: function() { - return this._requestCount; - } }, { key: "_calcRTTCount", value: function(e2) { - return e2.length; - } }, { key: "_calcSuccessRateOfRequest", value: function(e2, t2) { - return 0 === t2 ? 0 : 100 < (e2 = Yt(e2 / t2 * 100, 2)) ? 100 : e2; - } }, { key: "_calcAvg", value: function(e2, t2) { - var n2; - return 0 === t2 ? 0 : (n2 = 0, e2.forEach(function(e3) { - n2 += e3; - }), parseInt(n2 / t2)); - } }, { key: "_calcMax", value: function() { - return Math.max.apply(Math, p(this._rttArray)); - } }, { key: "_calcMin", value: function() { - return Math.min.apply(Math, p(this._rttArray)); - } }, { key: "getStatResult", value: function() { - var e2, t2, n2 = this._calcTotalCount(), o2 = p(this._rttArray); - return 0 === n2 ? null : (e2 = this._calcRTTCount(o2), t2 = this._calcSuccessRateOfRequest(e2, n2), o2 = this._calcAvg(o2, e2), M.l("".concat(this._n, ".getStatResult max:").concat(this._calcMax(), " min:").concat(this._calcMin(), " avg:").concat(o2)), this.reset(), { totalCount: n2, rttCount: e2, successRateOfRequest: t2, avgRTT: o2 }); - } }, { key: "reset", value: function() { - this._requestCount = 0, this._rttArray.length = 0; - } }]), Hr), Ws = (e(Vr, [{ key: "initMap", value: function(e2) { - var t2 = this; - e2.forEach(function(e3) { - t2._map.set(e3, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] }); - }); - } }, { key: "addTotalCount", value: function(e2) { - return !(N(e2) || !this._map.has(e2) || (this._map.get(e2).totalCount += 1, 0)); - } }, { key: "addSuccessCount", value: function(e2) { - return !(N(e2) || !this._map.has(e2) || (this._map.get(e2).successCount += 1, 0)); - } }, { key: "addFailedCountOfUserSide", value: function(e2) { - return !(N(e2) || !this._map.has(e2) || (this._map.get(e2).failedCountOfUserSide += 1, 0)); - } }, { key: "addCost", value: function(e2, t2) { - return !(N(e2) || !this._map.has(e2) || (this._map.get(e2).costArray.push(t2), 0)); - } }, { key: "addFileSize", value: function(e2, t2) { - return !(N(e2) || !this._map.has(e2) || (this._map.get(e2).fileSizeArray.push(t2), 0)); - } }, { key: "_calcSuccessRateOfBusiness", value: function(e2) { - return N(e2) || !this._map.has(e2) ? -1 : 100 < (e2 = Yt((e2 = this._map.get(e2)).successCount / e2.totalCount * 100, 2)) ? 100 : e2; - } }, { key: "_calcSuccessRateOfPlatform", value: function(e2) { - var t2; - return N(e2) || !this._map.has(e2) ? -1 : (t2 = this._map.get(e2), 100 < (e2 = Yt(e2 = this._calcSuccessCountOfPlatform(e2) / t2.totalCount * 100, 2)) ? 100 : e2); - } }, { key: "_calcTotalCount", value: function(e2) { - return N(e2) || !this._map.has(e2) ? -1 : this._map.get(e2).totalCount; - } }, { key: "_calcSuccessCountOfBusiness", value: function(e2) { - return N(e2) || !this._map.has(e2) ? -1 : this._map.get(e2).successCount; - } }, { key: "_calcSuccessCountOfPlatform", value: function(e2) { - return N(e2) || !this._map.has(e2) ? -1 : (e2 = this._map.get(e2)).successCount + e2.failedCountOfUserSide; - } }, { key: "_calcAvg", value: function(e2) { - return N(e2) || !this._map.has(e2) ? -1 : e2 === Wn ? this._calcAvgSpeed(e2) : this._calcAvgCost(e2); - } }, { key: "_calcAvgCost", value: function(e2) { - var t2, n2 = this._map.get(e2).costArray.length; - return 0 === n2 ? 0 : (t2 = 0, this._map.get(e2).costArray.forEach(function(e3) { - t2 += e3; - }), parseInt(t2 / n2)); - } }, { key: "_calcAvgSpeed", value: function(e2) { - var t2 = 0, n2 = 0; - return this._map.get(e2).costArray.forEach(function(e3) { - t2 += e3; - }), this._map.get(e2).fileSizeArray.forEach(function(e3) { - n2 += e3; - }), parseInt(1e3 * n2 / t2); - } }, { key: "getStatResult", value: function(e2) { - var t2, n2, o2, i2, a2, s2 = this._calcTotalCount(e2); - return 0 === s2 ? null : (t2 = this._calcSuccessCountOfBusiness(e2), n2 = this._calcSuccessRateOfBusiness(e2), o2 = this._calcSuccessCountOfPlatform(e2), i2 = this._calcSuccessRateOfPlatform(e2), a2 = this._calcAvg(e2), this.reset(e2), { totalCount: s2, successCountOfBusiness: t2, successRateOfBusiness: n2, successCountOfPlatform: o2, successRateOfPlatform: i2, avgValue: a2 }); - } }, { key: "reset", value: function(e2) { - N(e2) ? this._map.clear() : this._map.set(e2, { totalCount: 0, successCount: 0, failedCountOfUserSide: 0, costArray: [], fileSizeArray: [] }); - } }]), Vr), js = (e(xr, [{ key: "initMap", value: function(e2) { - var t2 = this; - e2.forEach(function(e3) { - t2._lastMap.set(e3, /* @__PURE__ */ new Map()), t2._currentMap.set(e3, /* @__PURE__ */ new Map()); - }); - } }, { key: "addMessageSequence", value: function(e2) { - var t2, n2, o2, i2 = e2.key, a2 = e2.message; - return !(N(i2) || !this._lastMap.has(i2) || !this._currentMap.has(i2) || (t2 = a2.conversationID, a2 = a2.sequence, t2 = t2.replace(A.CONV_GROUP, ""), 0 !== this._lastMap.get(i2).size && this._lastMap.get(i2).has(t2) && (o2 = (n2 = this._lastMap.get(i2).get(t2)).length - 1, a2 > n2[0]) && a2 < n2[o2] ? (n2.push(a2), n2.sort(), this._lastMap.get(i2).set(t2, n2)) : this._addCurrentMap(e2), 0)); - } }, { key: "_addCurrentMap", value: function(e2) { - var t2 = e2.key, e2 = e2.message, n2 = e2.conversationID, e2 = e2.sequence, n2 = n2.replace(A.CONV_GROUP, ""); - this._currentMap.get(t2).has(n2) || this._currentMap.get(t2).set(n2, []), this._currentMap.get(t2).get(n2).push(e2); - } }, { key: "_copyData", value: function(e2) { - if (!N(e2)) { - this._lastMap.set(e2, /* @__PURE__ */ new Map()); - var t2, n2 = this._lastMap.get(e2), o2 = Z(this._currentMap.get(e2)); - try { - for (o2.s(); !(t2 = o2.n()).done; ) { - var i2 = Y(t2.value, 2), a2 = i2[0], s2 = i2[1]; - n2.set(a2, s2); - } - } catch (e3) { - o2.e(e3); - } finally { - o2.f(); - } - n2 = null, this._currentMap.set(e2, /* @__PURE__ */ new Map()); - } - } }, { key: "getStatResult", value: function(e2) { - var o2, i2, t2; - return N(this._currentMap.get(e2)) || N(this._lastMap.get(e2)) ? null : 0 === this._lastMap.get(e2).size ? (this._copyData(e2), null) : (i2 = o2 = 0, this._lastMap.get(e2).forEach(function(e3, t3) { - var e3 = p(e3.values()), n2 = e3.length, e3 = e3[n2 - 1] - e3[0] + 1; - o2 += e3, i2 += n2; - }), 0 === o2 ? null : (100 < (t2 = Yt(i2 / o2 * 100, 2)) && (t2 = 100), this._copyData(e2), { totalCount: o2, successCountOfMessageReceived: i2, successRateOfMessageReceived: t2 })); - } }, { key: "reset", value: function() { - this._currentMap.clear(), this._lastMap.clear(); - } }]), xr), Js = (t(qr, u), ws = n(qr), e(qr, [{ key: "_onLoginSuccess", value: function() { - var t2 = this, e2 = (this._rateMessageSent.initMap(this._messageSentItems), this._rateMessageReceived.initMap(this._messageReceivedItems), this.get(13)), n2 = e2.getItem(this.TAG, false); - !S(n2) && lt(n2.forEach) && (M.l("".concat(this._n, "._onLoginSuccess. logs count:").concat(n2.length)), n2.forEach(function(e3) { - t2._statInfoArr.push(e3); - }), e2.removeItem(this.TAG, false)); - } }, { key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("q_rpt_interval"), t2 = this.getCloudConfig("q_rpt_sdkappid_bl"), n2 = this.getCloudConfig("q_rpt_tinyid_wl"); - N(e2) || (this.REPORT_INTERVAL = Number(e2)), N(t2) || (this.REPORT_SDKAPPID_BLACKLIST = t2.split(",").map(function(e3) { - return Number(e3); - })), N(n2) || (this.REPORT_TINYID_WHITELIST = n2.split(",")); - } }, { key: "onCheckTimer", value: function(e2) { - this.isLoggedIn() && e2 % this.REPORT_INTERVAL == 0 && (this.wholePeriod = true, this._report()); - } }, { key: "addRequestCount", value: function() { - this._avgRTT.addRequestCount(); - } }, { key: "addRTT", value: function(e2) { - this._avgRTT.addRTT(e2); - } }, { key: "addMessageDelay", value: function(e2) { - this._avgE2EDelay.addMessageDelay(e2); - } }, { key: "addTotalCount", value: function(e2) { - this._rateMessageSent.addTotalCount(e2) || M.w("".concat(this._n, ".addTotalCount invalid key:"), e2); - } }, { key: "addSuccessCount", value: function(e2) { - this._rateMessageSent.addSuccessCount(e2) || M.w("".concat(this._n, ".addSuccessCount invalid key:"), e2); - } }, { key: "addFailedCountOfUserSide", value: function(e2) { - this._rateMessageSent.addFailedCountOfUserSide(e2) || M.w("".concat(this._n, ".addFailedCountOfUserSide invalid key:"), e2); - } }, { key: "addCost", value: function(e2, t2) { - this._rateMessageSent.addCost(e2, t2) || M.w("".concat(this._n, ".addCost invalid key or cost:"), e2, t2); - } }, { key: "addFileSize", value: function(e2, t2) { - this._rateMessageSent.addFileSize(e2, t2) || M.w("".concat(this._n, ".addFileSize invalid key or size:"), e2, t2); - } }, { key: "addMessageSequence", value: function(e2) { - this._rateMessageReceived.addMessageSequence(e2) || M.w("".concat(this._n, ".addMessageSequence invalid key:"), e2.key); - } }, { key: "_getQualityItem", value: function(e2) { - var t2 = {}, n2 = Qn[this.get(15).getNetworkType()], n2 = (N(n2) && (n2 = 8), { qualityType: Xn[e2], timestamp: We(), networkType: n2, extension: "" }); - switch (e2) { - case xn: - t2 = this._avgRTT.getStatResult(); - break; - case Vn: - t2 = this._avgE2EDelay.getStatResult(); - break; - case Hn: - case Bn: - case Kn: - case Yn: - case Wn: - t2 = this._rateMessageSent.getStatResult(e2); - break; - case jn: - case Jn: - case zn: - t2 = this._rateMessageReceived.getStatResult(e2); - } - return null === t2 ? null : y(y({}, n2), t2); - } }, { key: "_report", value: function(e2) { - var t2 = this, n2 = [], o2 = null, e2 = (N(e2) ? this._qualityItems.forEach(function(e3) { - null !== (o2 = t2._getQualityItem(e3)) && (o2.reportIndex = t2.reportIndex, o2.wholePeriod = t2.wholePeriod, n2.push(o2)); - }) : null !== (o2 = this._getQualityItem(e2)) && (o2.reportIndex = this.reportIndex, o2.wholePeriod = this.wholePeriod, n2.push(o2)), M.d("".concat(this._n, "._report"), n2), 0 < this._statInfoArr.length && (n2 = n2.concat(this._statInfoArr), this._statInfoArr = []), this.get(12)), i2 = e2.getSDKAppID(), e2 = e2.getTinyID(); - 0 < (n2 = Wt(this.REPORT_SDKAPPID_BLACKLIST, i2) && !jt(this.REPORT_TINYID_WHITELIST, e2) ? [] : n2).length && this._doReport(n2); - } }, { key: "_doReport", value: function(t2) { - var n2 = this, e2 = { header: aa(this), quality: t2 }; - this.req({ P: k.SSO_STAT, data: y({}, e2) }).then(function() { - n2.reportIndex++, n2.wholePeriod = false; - }).catch(function(e3) { - M.w("".concat(n2._n, "._doReport failed. error:"), e3), n2._statInfoArr = n2._statInfoArr.concat(t2), n2._flushAtOnce(); - }); - } }, { key: "_flushAtOnce", value: function() { - var e2 = this.get(13), t2 = e2.getItem(this.TAG, false), n2 = this._statInfoArr, o2 = "".concat(this._n, "._flushAtOnce"); - S(t2) ? (M.l("".concat(o2, " count:").concat(n2.length)), e2.setItem(this.TAG, n2, true, false)) : (10 < (n2 = n2.concat(t2)).length && (n2 = n2.slice(0, 10)), M.l("".concat(o2, " count:").concat(n2.length)), e2.setItem(this.TAG, n2, true, false)), this._statInfoArr = []; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._report(), this.reportIndex = 0, this.wholePeriod = false, this.REPORT_SDKAPPID_BLACKLIST = [], this.REPORT_TINYID_WHITELIST = [], this._avgRTT.reset(), this._avgE2EDelay.reset(), this._rateMessageSent.reset(), this._rateMessageReceived.reset(); - } }]), qr), zs = e(function e2(t2) { - d(this, e2), S(t2) || (this.userID = t2.userID || "", this.nick = t2.nick || "", this.avatar = t2.avatar || "", this.time = t2.time || 0, this.source = t2.source || "", this.wording = t2.wording || "", this.type = t2.type || ""); - }), Xs = (e(Fr, [{ key: "getLocalApplicationList", value: function() { - return { friendApplicationList: p(this._map.values()), unreadCount: this._unreadCount }; - } }, { key: "_onApplicationListUpdated", value: function() { - this._snsM.emitOEvt(h.FRIEND_APPLICATION_LIST_UPDATED, { friendApplicationList: p(this._map.values()), unreadCount: this._unreadCount }); - } }, { key: "onApplicationRead", value: function() { - this._unreadCount = 0, this._onApplicationListUpdated(); - } }, { key: "onApplicationAdded", value: function(e2, t2) { - var n2, o2, i2 = this; - S(e2) || (n2 = "", n2 = t2 === this._snsM.getMyUserID() ? A.SNS_APPLICATION_SENT_BY_ME : A.SNS_APPLICATION_SENT_TO_ME, o2 = false, e2.forEach(function(e3) { - var t3 = "".concat(e3.userID, "_").concat(n2); - n2 !== A.SNS_APPLICATION_SENT_TO_ME || i2._map.has(t3) || (i2._unreadCount += 1), i2._map.set(t3, new zs(y(y({}, e3), {}, { type: n2 }))), o2 = true; - }), o2 && this._onApplicationListUpdated()); - } }, { key: "onApplicationDeleted", value: function(e2) { - S(e2) || (this._startTime = 0, this._currentSeq = 0, this.getApplicationList()); - } }, { key: "getApplicationList", value: function() { - var a2 = this, s2 = "".concat(this._n, ".").concat("getApplicationList"), r2 = new G("getApplicationList"); - return this._snsM.req({ P: k.GET_FD_APPLICATION_LIST, data: { applicationType: A.SNS_APPLICATION_TYPE_BOTH, fromAccount: this._snsM.getMyUserID(), maxLimited: this._maxLimited, startTime: this._startTime, lastSequence: this._currentSeq } }).then(function(e2) { - var e2 = e2.data, t2 = e2.resultList, n2 = e2.unreadCount, o2 = e2.startTime, e2 = e2.currentSequence, i2 = (a2._startTime = o2, a2._currentSeq = e2, a2._unreadCount = n2, O(t2) ? t2.length : 0), i2 = "applicationCount:".concat(i2, " unreadCount:").concat(n2, " startTime:").concat(o2, " currentSequence:").concat(e2); - r2.setMessage(i2).end(), M.i("".concat(s2, " ok. ").concat(i2)), a2._map.clear(), O(t2) && t2.forEach(function(e3) { - var t3 = e3.userID, n3 = e3.type, e3 = new zs(e3); - a2._map.set("".concat(t3, "_").concat(n3), e3); - }), a2._onApplicationListUpdated(); - }).catch(function(e2) { - return r2.setError(e2).end(), M.w("".concat(s2, " failed. error:"), e2), D(e2); - }); - } }, { key: "deleteApplication", value: function(e2) { - var i2, a2 = "".concat(this._n, ".").concat("deleteApplication"), s2 = e2.userID, r2 = e2.type; - return r2 && (r2 === A.SNS_APPLICATION_SENT_BY_ME || r2 === A.SNS_APPLICATION_SENT_TO_ME) || (r2 = A.SNS_APPLICATION_SENT_TO_ME), this._map.has("".concat(s2, "_").concat(r2)) ? ((i2 = new G("deleteApplication")).setMessage("userID:".concat(s2, " type:").concat(r2)), this._snsM.req({ P: k.DEL_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), userIDList: [s2], type: r2 } }).then(function(e3) { - var e3 = e3.data.resultList, t2 = e3[0], n2 = t2.to, o2 = t2.resultCode, t2 = t2.resultInfo; - return i2.setMoreMessage("resultList:".concat(JSON.stringify(e3))).end(), M.i("".concat(a2, " ok. userID:").concat(s2, " type:").concat(r2)), 0 === o2 ? C() : D({ userID: n2, code: o2, message: t2 }); - }).catch(function(e3) { - return i2.setError(e3).end(), M.w("".concat(a2, " failed. error:"), e3), D(e3); - })) : D({ code: L.FRIEND_APPLICATION_NOT_EXIST }); - } }, { key: "acceptApplication", value: function(e2) { - var n2 = "".concat(this._n, ".").concat("acceptApplication"), o2 = e2.userID, t2 = e2.remark, i2 = e2.tag, a2 = e2.type, s2 = (a2 && (a2 === A.SNS_APPLICATION_AGREE || a2 === A.SNS_APPLICATION_AGREE_AND_ADD) || (a2 = A.SNS_APPLICATION_AGREE_AND_ADD), new G("acceptApplication")); - return s2.setMessage("userID:".concat(o2, " type:").concat(a2)), this._snsM.req({ P: k.RESPOND_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), responseFriendItem: [{ userID: o2, remark: t2, tag: i2, action: a2 }] } }).then(function(e3) { - s2.end(); - var e3 = e3.data.resultList[0], t3 = e3.resultCode, e3 = e3.resultInfo; - if (0 !== t3) - return D({ code: t3, message: e3 }); - M.i("".concat(n2, " ok. userID:").concat(o2, " type:").concat(a2)); - }).catch(function(e3) { - return s2.setError(e3).end(), M.w("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "refuseApplication", value: function(e2) { - var n2 = "".concat(this._n, ".").concat("refuseApplication"), o2 = e2.userID, i2 = new G("refuseApplication"); - return i2.setMessage("userID:".concat(o2)), this._snsM.req({ P: k.RESPOND_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), responseFriendItem: [{ userID: o2, action: "Response_Action_Reject" }] } }).then(function(e3) { - i2.end(); - var e3 = e3.data.resultList[0], t2 = e3.resultCode, e3 = e3.resultInfo; - if (0 !== t2) - return D({ code: t2, message: e3 }); - M.i("".concat(n2, " ok. userID:").concat(o2)); - }).catch(function(e3) { - return i2.setError(e3).end(), M.w("".concat(n2, " failed. error:"), e3), D(e3); - }); - } }, { key: "setApplicationRead", value: function() { - var t2 = this, n2 = "".concat(this._n, ".").concat("setApplicationRead"), o2 = new G("setApplicationRead"); - return this._snsM.req({ P: k.REPORT_FD_APPLICATION, data: { fromAccount: this._snsM.getMyUserID(), latestTimeStamp: Yt(We() / 1e3, 0) } }).then(function(e2) { - o2.end(), M.i("".concat(n2, " ok")), t2._unreadCount = 0; - }).catch(function(e2) { - return o2.setError(e2).end(), M.w("".concat(n2, " failed. error:"), e2), D(e2); - }); - } }, { key: "reset", value: function() { - this._maxLimited = 100, this._currentSeq = 0, this._unreadCount = 0, this._map.clear(); - } }]), Fr), Zs = (e(wr, [{ key: "validate", value: function(e2) { - var t2, n2 = true, o2 = ""; - if (S(e2)) - return { valid: false, tips: "empty options" }; - if (e2.profileCustomField) - for (var i2 = e2.profileCustomField.length, a2 = null, s2 = 0; s2 < i2; s2++) { - if (a2 = e2.profileCustomField[s2], !m(a2.key) || -1 === a2.key.indexOf("Tag_Profile_Custom")) - return { valid: false, tips: "The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom" }; - if (!m(a2.value)) - return { valid: false, tips: "The type of values of the custom profile key-value pairs (which is profileCustomField) must be String" }; - } - for (t2 in e2) - if (Object.prototype.hasOwnProperty.call(e2, t2)) { - if ("profileCustomField" === t2) - continue; - if (S(e2[t2]) && !m(e2[t2]) && !R(e2[t2])) { - o2 = "key:" + t2 + ", invalid value:" + e2[t2], n2 = false; - continue; - } - switch (t2) { - case "nick": - m(e2[t2]) || (n2 = !(o2 = "nick must be a string")), 500 < gt(e2[t2]) && (o2 = "nick name limited: must less than or equal to ".concat(500, " bytes, current size: ").concat(gt(e2[t2]), " bytes"), n2 = false); - break; - case "gender": - vt(Qe, e2.gender) || (o2 = "key:gender, invalid value:" + e2.gender, n2 = false); - break; - case "birthday": - R(e2.birthday) || (n2 = !(o2 = "birthday must be a number")); - break; - case "location": - m(e2.location) || (n2 = !(o2 = "location must be a string")); - break; - case "selfSignature": - m(e2.selfSignature) || (n2 = !(o2 = "selfSignature must be a string")); - break; - case "allowType": - vt(et, e2.allowType) || (o2 = "key:allowType, invalid value:" + e2.allowType, n2 = false); - break; - case "language": - R(e2.language) || (n2 = !(o2 = "language must be a number")); - break; - case "avatar": - m(e2.avatar) || (n2 = !(o2 = "avatar must be a string")); - break; - case "messageSettings": - 0 !== e2.messageSettings && 1 !== e2.messageSettings && (n2 = !(o2 = "messageSettings must be 0 or 1")); - break; - case "adminForbidType": - vt($e, e2.adminForbidType) || (o2 = "key:adminForbidType, invalid value:" + e2.adminForbidType, n2 = false); - break; - case "level": - R(e2.level) || (n2 = !(o2 = "level must be a number")); - break; - case "role": - R(e2.role) || (n2 = !(o2 = "role must be a number")); - break; - default: - o2 = "unknown key:" + t2 + " " + e2[t2], n2 = false; - } - } - return { valid: n2, tips: o2 }; - } }, { key: "update", value: function(e2) { - var t2, n2 = "", o2 = []; - this.friendCustomField.forEach(function(e3) { - o2.push(e3.key); - }); - for (var i2 = 0, a2 = e2.length; i2 < a2; i2++) - if (n2 = e2[i2].tag, t2 = e2[i2].value, -1 < n2.indexOf("Tag_SNS_Custom")) - -1 < o2.indexOf(n2) ? this.friendCustomField.forEach(function(e3) { - e3.key === n2 && (e3.value = t2); - }) : this.friendCustomField.push({ key: n2, value: t2 }); - else if (-1 < n2.indexOf("Tag_Profile_Custom")) { - var s2 = false; - this.profile.profileCustomField.forEach(function(e3) { - e3.key === n2 && (e3.value = t2, s2 = true); - }), s2 || this.profile.profileCustomField.push({ key: n2, value: t2 }); - } else - switch (n2) { - case g.NICK: - this.profile.nick = t2; - break; - case g.GENDER: - this.profile.gender = t2; - break; - case g.BIRTHDAY: - this.profile.birthday = t2; - break; - case g.LOCATION: - this.profile.location = t2; - break; - case g.SELFSIGNATURE: - this.profile.selfSignature = t2; - break; - case g.ALLOWTYPE: - this.profile.allowType = t2; - break; - case g.LANGUAGE: - this.profile.language = t2; - break; - case g.AVATAR: - this.profile.avatar = t2; - break; - case g.MESSAGESETTINGS: - this.profile.messageSettings = t2; - break; - case g.ADMINFORBIDTYPE: - this.profile.adminForbidType = t2; - break; - case g.LEVEL: - this.profile.level = t2; - break; - case g.ROLE: - this.profile.role = t2; - break; - case Ze.REMARK: - this.remark = t2; - break; - case Ze.ADDTIME: - this.addTime = t2; - break; - case Ze.GROUP: - this.groupList = JSON.parse(JSON.stringify(t2)); - break; - case Ze.ADDSOURCE: - this.source = t2; - break; - case Ze.ADDWORDING: - break; - default: - M.d("snsProfileItem unkown tag->", e2[i2].tag); - } - this.timestamp = Date.now(), o2.length = 0; - } }, { key: "updateProfile", value: function(e2) { - this.profile = JSON.parse(JSON.stringify(e2)), this.timestamp = Date.now(); - } }, { key: "addToGroupList", value: function(e2) { - -1 === this.groupList.indexOf(e2) && (this.groupList.push(e2), this.count = this.groupList.length); - } }, { key: "removeFromGroupList", value: function(e2) { - e2 = this.groupList.indexOf(e2); - -1 < e2 && (this.groupList.splice(e2, 1), this.count = this.groupList.length); - } }]), wr), Qs = (e(br, [{ key: "getLocalFriendList", value: function() { - return p(this._map.values()); - } }, { key: "getFriendRemark", value: function(e2) { - return this._map.has(e2) ? this._map.get(e2).remark : ""; - } }, { key: "onFriendProfileModified", value: function(e2) { - var o2, i2 = this, e2 = e2.dataList; - S(e2) || (o2 = this._snsM.get(11), e2.forEach(function(e3) { - var t2, n2 = e3.userID, e3 = e3.profileList; - i2.isMyFriend(n2) && (M.l("".concat(i2._n, ".onFriendProfileModified. friend account:").concat(n2, ", profileList:").concat(JSON.stringify(e3))), (t2 = i2._map.get(n2)).update(e3), o2.modifyMessageSentByPeer({ conversationID: "".concat(A.CONV_C2C).concat(n2), latestNick: t2.profile.nick, latestAvatar: t2.profile.avatar })); - }), this._onFriendListUpdated()); - } }, { key: "onFriendAdded", value: function(t2) { - var n2 = this; - 0 !== t2.length && (M.l("".concat(this._n, ".onFriendAdded userIDList:").concat(t2)), t2.forEach(function(e2) { - n2._map.set(e2, new Zs(e2)); - }), this.getFriendProfile({ userIDList: t2 }).then(function(e2) { - t2.forEach(function(e3) { - var t3 = n2._map.get(e3); - 0 < t3.groupList.length && n2._snsM.updateWhenFriendAdded({ nameList: t3.groupList, userID: e3 }); - }), n2._onFriendListUpdated(); - })); - } }, { key: "onFriendDeleted", value: function(e2) { - var n2 = this; - 0 !== e2.length && (M.l("".concat(this._n, ".onFriendDeleted userIDList:").concat(e2)), e2.forEach(function(e3) { - var t2 = n2._map.get(e3); - 0 < t2.groupList.length && n2._snsM.updateWhenFriendDeleted({ nameList: t2.groupList, userID: e3 }), n2._map.delete(e3); - }), this._onFriendListUpdated()); - } }, { key: "_onFriendListUpdated", value: function() { - this._snsM.emitOEvt(h.FRIEND_LIST_UPDATED), this._snsM.get(11).checkAndPatchRemark(); - } }, { key: "getFriendProfile", value: function(e2) { - var t2, a2 = this, n2 = "".concat(this._n, ".").concat("getFriendProfile"), e2 = e2.userIDList, s2 = [], r2 = [], o2 = []; - return e2.forEach(function(e3) { - var t3; - a2._map.has(e3) ? (t3 = a2._map.get(e3), Date.now() - t3.timestamp < a2._expirationTime ? r2.push(t3) : o2.push(e3)) : s2.push({ userID: e3, code: L.NOT_MY_FRIEND, message: a2._snsM.getErrMsg(L.NOT_MY_FRIEND) }); - }), 0 === o2.length ? (M.i("".concat(n2, " newUserIDList is empty")), T({ friendList: r2, failureUserIDList: s2 })) : ((t2 = new G("getFriendProfile")).setMessage("userIDList:".concat(o2)), M.i("".concat(n2, " userIDList:").concat(o2)), this._snsM.req({ P: k.GET_FD_PROFILE, data: { fromAccount: this._snsM.getMyUserID(), userIDList: o2 } }).then(function(e3) { - return t2.end(), M.i("".concat(n2, " ok")), e3.data.resultList.forEach(function(e4) { - var t3, n3 = e4.to, o3 = e4.resultCode, i2 = e4.resultInfo, e4 = e4.tagValueList; - N(o3) || 0 === o3 ? (a2._map.has(n3) ? (t3 = a2._map.get(n3)).update(e4) : (t3 = new Zs(n3, e4), a2._map.set(n3, t3)), r2.push(t3)) : s2.push({ userID: n3, code: o3, message: i2 }); - }), C({ friendList: r2, failureUserIDList: s2 }); - }).catch(function(e3) { - return t2.setError(e3).end(), M.w("".concat(n2, " failed. error:"), e3), D(e3); - })); - } }, { key: "isMyFriend", value: function(e2) { - return this._map.has(e2); - } }, { key: "pagingGetFriendList", value: function() { - var s2 = this, r2 = "".concat(this._n, ".").concat("getFriendList"), c2 = new G("getFriendList"), u2 = Date.now(); - this._snsM.req({ P: k.GET_FD_LIST, data: { fromAccount: this._snsM.getMyUserID(), startIndex: this._startIdx, standardSequence: this._standardSeq, customSequence: this._customSeq } }).then(function(e2) { - var e2 = e2.data, t2 = e2.friendCount, n2 = e2.resultList, o2 = e2.nextStartIndex, i2 = e2.standardSequence, a2 = e2.customSequence, e2 = e2.completeFlag, t2 = (s2._startIdx = o2, s2._standardSeq = i2, s2._customSeq = a2, "friendCount:".concat(t2, " nextStartIndex:").concat(o2, " standardSequence:").concat(i2, " ") + "customSequence:".concat(a2, " completeFlag:").concat(e2, " cost:").concat(nn(u2))); - c2.setMessage(t2).end(), M.i("".concat(r2, " ok."), t2), S(n2) || n2.forEach(function(e3) { - var t3 = e3.to, e3 = e3.tagValueList; - s2._map.set(t3, new Zs(t3, e3)); - }), 0 === e2 ? s2.pagingGetFriendList() : (s2._snsM.emitOEvt(h.FRIEND_LIST_UPDATED), s2._pagingGetFriendProfile()); - }).catch(function(e2) { - return c2.setError(e2).end(), M.w("".concat(r2, " failed. error:"), e2), D(e2); - }); - } }, { key: "_pagingGetFriendProfile", value: function() { - var n2 = this, e2 = p(this._map.keys()), t2 = this._snsM.get(4), o2 = e2.length, i2 = o2 <= 100 ? 1 : Math.ceil(o2 / 100); - M.l("".concat(this._n, "._pagingGetFriendProfile friendCount:").concat(o2, " pageCount:").concat(i2)); - for (var a2 = 0; a2 < i2; a2++) - t2.getUserProfile({ userIDList: e2.slice(100 * a2, 100 * (a2 + 1)) }).then(function(e3) { - e3.data.forEach(function(e4) { - var t3 = n2._map.get(e4.userID); - t3 && t3.updateProfile(e4); - }), n2._onFriendListUpdated(); - }); - } }, { key: "addFriend", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2, c2 = this, u2 = "".concat(this._n, ".").concat("addFriend"); - return this._map.has(e2.to) ? D({ code: L.ALREADY_MY_FRIEND }) : e2.wording && false === this._snsM.filterProfanity("wording", e2) ? D({ code: L.PROFANITY_FOUND }) : (t2 = e2.to, n2 = e2.source, o2 = e2.type, i2 = e2.wording, a2 = e2.remark, e2 = e2.groupName, (s2 = o2) && (s2 === A.SNS_ADD_TYPE_SINGLE || s2 === A.SNS_ADD_TYPE_BOTH) || (s2 = A.SNS_ADD_TYPE_BOTH), (r2 = new G("addFriend")).setMessage("to:".concat(t2, " source:").concat(n2, " type:").concat(s2)), this._snsM.req({ P: k.ADD_FD, data: { fromAccount: this._snsM.getMyUserID(), addFriendItem: [{ to: t2, source: n2, wording: i2, remark: a2, groupName: e2 }], type: s2 } }).then(function(e3) { - var e3 = e3.data.resultList, e3 = (r2.setMoreMessage("resultList:".concat(JSON.stringify(e3))).end(), e3[0]), t3 = e3.to, n3 = e3.resultCode, e3 = e3.resultInfo; - return M.i("".concat(u2, " ok. to:").concat(t3, " type:").concat(s2, " code:").concat(n3)), N(n3) || 0 === n3 ? C({ userID: t3, code: 0 }) : 30539 === n3 ? C({ userID: t3, code: n3, message: c2._snsM.getErrMsg(n3) }) : D({ userID: t3, code: n3, message: c2._snsM.getErrMsg(n3) || e3 }); - }).catch(function(e3) { - return r2.setError(e3).end(), M.w("".concat(u2, " failed. error:"), e3), D(e3); - })); - } }, { key: "deleteFriend", value: function(e2) { - var t2, n2 = this, o2 = "".concat(this._n, ".").concat("deleteFriend"), i2 = e2.userIDList, e2 = e2.type, a2 = (1e3 < i2.length && (M.w("".concat(o2, " ").concat($t(1e3))), i2.length = 1e3), []), s2 = [], r2 = []; - return i2.forEach(function(e3) { - n2._map.has(e3) ? r2.push(e3) : a2.push({ userID: e3, code: L.NOT_MY_FRIEND, message: n2._snsM.getErrMsg(L.NOT_MY_FRIEND) }); - }), 0 === r2.length ? T({ successUserIDList: s2, failureUserIDList: a2 }) : ((i2 = e2) && (i2 === A.SNS_DELETE_TYPE_SINGLE || i2 === A.SNS_DELETE_TYPE_BOTH) || (i2 = A.SNS_DELETE_TYPE_BOTH), (t2 = new G("deleteFriend")).setMessage("userIDList:".concat(r2, " type:").concat(i2)), this._snsM.req({ P: k.DEL_FD, data: { fromAccount: this._snsM.getMyUserID(), userIDList: r2, type: i2 } }).then(function(e3) { - t2.end(), M.i("".concat(o2, " ok")); - e3 = e3.data.resultList; - return S(e3) || e3.forEach(function(e4) { - var t3 = e4.to, n3 = e4.resultCode, e4 = e4.resultInfo; - N(n3) || 0 === n3 ? s2.push({ userID: t3 }) : a2.push({ userID: t3, code: n3, message: e4 }); - }), C({ successUserIDList: s2, failureUserIDList: a2 }); - }).catch(function(e3) { - return t2.setError(e3).end(), M.w("".concat(o2, " error:"), e3), D(e3); - })); - } }, { key: "updateFriend", value: function(e2) { - var o2, i2, t2, a2 = this, n2 = e2.userID, s2 = e2.remark, r2 = e2.friendCustomField; - return this._map.has(n2) ? (o2 = "".concat(this._n, ".").concat("updateFriend"), (i2 = new G("updateFriend")).setMessage("userID:".concat(n2, " remark:").concat(s2, " friendCustomField:").concat(r2)), t2 = [], N(s2) || t2.push({ tag: Ze.REMARK, value: s2 }), O(r2) && 0 < r2.length && r2.forEach(function(e3) { - t2.push({ tag: e3.key, value: e3.value }); - }), this._snsM.req({ P: k.UPDATE_FD, data: { fromAccount: this._snsM.getMyUserID(), updateItem: [{ to: n2, snsItem: t2 }] } }).then(function(e3) { - i2.end(), M.i("".concat(o2, " ok")); - var e3 = e3.data.resultList[0], t3 = e3.to, n3 = e3.resultCode, e3 = e3.resultInfo; - return N(n3) || 0 === n3 ? ((t3 = a2._map.get(t3)) && (N(s2) || (t3.remark = s2), O(r2) && 0 < r2.length && kt(t3.friendCustomField, r2), a2._onFriendListUpdated()), C(t3)) : D({ code: n3, message: e3 }); - }).catch(function(e3) { - return i2.setError(e3).end(), M.w("".concat(o2, " failed. error:"), e3), D(e3); - })) : D({ code: L.NOT_MY_FRIEND }); - } }, { key: "checkFriend", value: function(e2) { - var t2 = "".concat(this._n, ".").concat("checkFriend"), n2 = e2.userIDList, o2 = e2.type, s2 = (o2 && (o2 === A.SNS_CHECK_TYPE_SINGLE || o2 === A.SNS_CHECK_TYPE_BOTH) || (o2 = A.SNS_CHECK_TYPE_BOTH), new G("checkFriend")); - return s2.setMessage("userIDList:".concat(n2, " type:").concat(o2)), this._snsM.req({ P: k.CHECK_FD, data: { fromAccount: this._snsM.getMyUserID(), userIDList: n2, type: o2 } }).then(function(e3) { - s2.end(), M.i("".concat(t2, " ok. userIDList:").concat(n2, " type:").concat(o2)); - var i2 = [], a2 = [], e3 = e3.data.resultList; - return O(e3) && e3.forEach(function(e4) { - var t3 = e4.to, n3 = e4.relation, o3 = e4.resultCode, e4 = e4.resultInfo; - N(o3) || 0 === o3 ? i2.push({ userID: t3, code: 0, relation: n3 }) : a2.push({ userID: t3, code: o3, message: e4 }); - }), C({ successUserIDList: i2, failureUserIDList: a2 }); - }).catch(function(e3) { - return s2.setError(e3).end(), M.w("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "onAddedToFriendGroup", value: function(e2) { - var t2 = this, n2 = e2.name, e2 = e2.userIDList; - M.l("".concat(this._n, ".onAddedToFriendGroup groupName:").concat(n2, " userIDList:").concat(e2)), n2 && !S(e2) && e2.forEach(function(e3) { - t2._map.has(e3) && t2._map.get(e3).addToGroupList(n2); - }); - } }, { key: "onRemovedFromFriendGroup", value: function(e2) { - var t2 = this, n2 = e2.name, e2 = e2.userIDList; - M.l("".concat(this._n, ".onRemovedFromFriendGroup groupName:").concat(n2, " userIDList:").concat(e2)), n2 && !S(e2) && e2.forEach(function(e3) { - t2._map.has(e3) && t2._map.get(e3).removeFromGroupList(n2); - }); - } }, { key: "reset", value: function() { - this._map.clear(), this._startIdx = 0, this._standardSeq = 0, this._customSeq = 0; - } }]), br), $s = (e(Ur, [{ key: "addToUserIDList", value: function(e2) { - -1 === this.userIDList.indexOf(e2) && (this.userIDList.push(e2), this.count = this.userIDList.length); - } }, { key: "removeFromUserIDList", value: function(e2) { - e2 = this.userIDList.indexOf(e2); - -1 < e2 && (this.userIDList.splice(e2, 1), this.count = this.userIDList.length); - } }]), Ur), er = (e(Pr, [{ key: "getLocalGroupList", value: function() { - return p(this._map.values()); - } }, { key: "_onGroupListUpdated", value: function() { - var e2 = p(this._map.values()); - this._snsM.emitOEvt(h.FRIEND_GROUP_LIST_UPDATED, e2); - } }, { key: "getGroupList", value: function() { - var n2 = this, t2 = "".concat(this._n, ".").concat("getGroupList"), o2 = new G("getGroupList"); - return this._snsM.req({ P: k.GET_FD_GRP_LIST, data: { fromAccount: this._snsM.getMyUserID() } }).then(function(e2) { - o2.end(); - e2 = e2.data.resultList; - S(e2) ? M.i("".concat(t2, " ok. count:0")) : (M.i("".concat(t2, " ok. count:").concat(e2.length)), n2._map.clear(), e2.forEach(function(e3) { - var t3 = new $s(e3); - n2._map.set(e3.name, t3); - }), n2._onGroupListUpdated()); - }).catch(function(e2) { - return o2.setError(e2).end(), M.w("".concat(t2, " error:"), e2), D(e2); - }); - } }, { key: "createGroup", value: function(e2) { - var t2, n2, o2 = this, s2 = "".concat(this._n, ".").concat("createGroup"), r2 = e2.name, e2 = e2.userIDList; - return this._map.has(r2) ? D({ code: L.FRIEND_GRP_EXISTED }) : (t2 = "name:".concat(r2, " userIDList:").concat(e2), (n2 = new G("createGroup")).setMessage(t2), this._snsM.req({ P: k.CREATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), groupName: [r2], userIDList: O(e2) ? e2 : void 0 } }).then(function(e3) { - n2.end(), M.l("".concat(s2, " ok. ").concat(t2)); - var e3 = e3.data.resultList, i2 = [], a2 = [], e3 = (e3 && e3.forEach(function(e4) { - var t3 = e4.to, n3 = e4.resultCode, o3 = e4.resultInfo; - N(n3) || 0 === n3 ? i2.push(t3) : (t3 = { userID: e4.to, code: n3, message: o3 }, a2.push(t3)); - }), new $s({ name: r2, userIDList: i2 })); - return o2._map.set(r2, e3), o2._snsM.onAddedToFriendGroup({ name: r2, userIDList: i2 }), o2._onGroupListUpdated(), C({ friendGroup: e3, failureUserIDList: a2 }); - }).catch(function(e3) { - return n2.setError(e3).end(), M.w("".concat(s2, " failed. error:"), e3), D(e3); - })); - } }, { key: "deleteGroup", value: function(e2) { - var n2, o2, i2 = this, a2 = "".concat(this._n, ".").concat("deleteGroup"), s2 = e2.name; - return this._map.has(s2) ? (n2 = "name:".concat(s2), (o2 = new G("deleteGroup")).setMessage(n2), this._snsM.req({ P: k.DEL_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), nameList: [s2] } }).then(function(e3) { - o2.end(), M.l("".concat(a2, " ok. ").concat(n2)); - var t2 = i2._map.get(s2); - return t2 && (i2._snsM.onRemovedFromFriendGroup({ name: s2, userIDList: t2.userIDList }), i2._map.delete(s2), t2.userIDList.length = 0), i2._onGroupListUpdated(), C(t2); - }).catch(function(e3) { - return o2.setError(e3).end(), M.w("".concat(a2, " failed. error:"), e3), D(e3); - })) : this._onGroupNotExist(); - } }, { key: "renameGroup", value: function(e2) { - var t2, n2, o2 = this, i2 = "".concat(this._n, ".").concat("renameGroup"), a2 = e2.oldName, s2 = e2.newName; - return this._map.has(a2) ? (t2 = "oldName:".concat(a2, " newName:").concat(s2), (n2 = new G("renameGroup")).setMessage(t2), this._snsM.req({ P: k.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: a2, newName: s2 } }).then(function() { - var e3; - return n2.end(), M.l("".concat(i2, " ok. ").concat(t2)), o2._map.has(a2) ? ((e3 = o2._map.get(a2)).name = s2, o2._map.delete(a2), o2._map.set(s2, e3), o2._snsM.onRemovedFromFriendGroup({ name: a2, userIDList: e3.userIDList }), o2._snsM.onAddedToFriendGroup({ name: s2, userIDList: e3.userIDList }), o2._onGroupListUpdated(), C(e3)) : C(); - }).catch(function(e3) { - return n2.setError(e3).end(), M.w("".concat(i2, " failed. error:"), e3), D(e3); - })) : this._onGroupNotExist(); - } }, { key: "addToGroup", value: function(e2) { - var t2, n2, o2 = this, i2 = "".concat(this._n, ".").concat("addToGroup"), a2 = e2.name, e2 = e2.userIDList; - return this._map.has(a2) ? (t2 = "name:".concat(a2, " userIDList:").concat(e2), (n2 = new G("addToGroup")).setMessage(t2), this._snsM.req({ P: k.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: a2, updateGroupItem: e2.filter(function(e3) { - return o2._snsM.isMyFriend(e3); - }).map(function(e3) { - return { to: e3, updateType: "Update_Type_Add" }; - }) } }).then(function(e3) { - return n2.end(), M.l("".concat(i2, " ok. ").concat(t2)), o2._onGroupUpdated(a2, e3); - }).catch(function(e3) { - return n2.setError(e3).end(), M.w("".concat(i2, " failed. error:"), e3), D(e3); - })) : this._onGroupNotExist(); - } }, { key: "removeFromGroup", value: function(e2) { - var t2, n2, o2 = this, i2 = "".concat(this._n, ".").concat("removeFromGroup"), a2 = e2.name, e2 = e2.userIDList; - return this._map.has(a2) ? (t2 = "name:".concat(a2, " userIDList:").concat(e2), (n2 = new G("removeFromGroup")).setMessage(t2), this._snsM.req({ P: k.UPDATE_FD_GRP, data: { fromAccount: this._snsM.getMyUserID(), oldName: a2, updateGroupItem: e2.filter(function(e3) { - return o2._snsM.isMyFriend(e3); - }).map(function(e3) { - return { to: e3, updateType: "Update_Type_Delete" }; - }) } }).then(function(e3) { - return n2.end(), M.l("".concat(i2, " ok. ").concat(t2)), o2._onGroupUpdated(a2, e3); - }).catch(function(e3) { - return n2.setError(e3).end(), M.w("".concat(i2, " failed. error:"), e3), D(e3); - })) : this._onGroupNotExist(); - } }, { key: "_onGroupUpdated", value: function(e2, t2) { - var t2 = t2.data.resultList, a2 = this._map.get(e2), s2 = [], r2 = [], c2 = []; - return O(t2) && t2.forEach(function(e3) { - var t3 = e3.to, n2 = e3.resultCode, o2 = e3.resultInfo, i2 = e3.type; - 0 === n2 ? "Update_Type_Add" === i2 ? a2 && (a2.addToUserIDList(t3), r2.push(t3)) : "Update_Type_Delete" === i2 && a2 && (a2.removeFromUserIDList(t3), c2.push(t3)) : s2.push({ to: e3.to, code: n2, message: o2 }); - }), M.l("".concat(this._n, "._onGroupUpdated name:").concat(e2, " userIDList:").concat(a2.userIDList)), 0 < r2.length && this._snsM.onAddedToFriendGroup({ name: e2, userIDList: r2 }), 0 < c2.length && this._snsM.onRemovedFromFriendGroup({ name: e2, userIDList: c2 }), C({ friendGroup: a2, failureUserIDList: s2 }); - } }, { key: "updateWhenFriendAdded", value: function(e2) { - var t2 = this, n2 = e2.nameList, o2 = e2.userID; - M.l("".concat(this._n, ".updateWhenFriendAdded userID:").concat(o2, " nameList:").concat(n2)), S(n2) || n2.forEach(function(e3) { - t2._map.has(e3) && t2._map.get(e3).addToUserIDList(o2); - }); - } }, { key: "updateWhenFriendDeleted", value: function(e2) { - var t2 = this, n2 = e2.nameList, o2 = e2.userID; - M.l("".concat(this._n, ".updateWhenFriendDeleted userID:").concat(o2, " nameList:").concat(n2)), S(n2) || n2.forEach(function(e3) { - t2._map.has(e3) && t2._map.get(e3).removeFromUserIDList(o2); - }); - } }, { key: "_onGroupNotExist", value: function(e2) { - return D({ code: L.FRIEND_GRP_NOT_EXIST }); - } }, { key: "reset", value: function() { - this._map.clear(); - } }]), Pr), tr = (t(Gr, u), bs = n(Gr), e(Gr, [{ key: "onContextUpdated", value: function(e2) { - this._friendHandler.pagingGetFriendList(), this._friendGroupHandler.getGroupList(), this._friendApplicationHandler.getApplicationList(); - } }, { key: "onRelationChainModified", value: function(e2) { - var n2, o2, i2, a2, s2, r2, c2 = this, e2 = e2.dataList; - S(e2) || (n2 = [], o2 = [], i2 = [], s2 = !(a2 = []), r2 = "", e2.forEach(function(e3) { - var t2; - 3 !== e3.pushType && 4 !== e3.pushType || !e3.from || (r2 = e3.from), e3.friendAddAccount && (n2.push.apply(n2, p(e3.friendAddAccount)), a2.push.apply(a2, p(e3.friendAddAccount))), e3.friendDelAccount && o2.push.apply(o2, p(e3.friendDelAccount)), e3.friendApplicationAdded && i2.push.apply(i2, p(e3.friendApplicationAdded)), e3.friendApplicationDeletedUserIDList && a2.push.apply(a2, p(e3.friendApplicationDeletedUserIDList)), e3.reportTime && 7 === e3.pushType && (s2 = true), e3.friendUpInfo && (t2 = { dataList: [] }, e3.friendUpInfo.forEach(function(e4) { - t2.dataList.push({ userID: e4.friendAccount, profileList: p(e4.sns) }); - }), c2.onFriendProfileModified(t2)); - }), s2 && this._friendApplicationHandler.onApplicationRead(), this._friendApplicationHandler.onApplicationAdded(i2, r2), this._friendApplicationHandler.onApplicationDeleted(a2), this._friendHandler.onFriendAdded(n2), this._friendHandler.onFriendDeleted(o2)); - } }, { key: "isMyFriend", value: function(e2) { - return this._friendHandler.isMyFriend(e2); - } }, { key: "filterProfanity", value: function(e2, t2) { - var n2, o2 = this.get(29); - return !o2 || (n2 = (o2 = o2.filterText(t2[e2], "sns")).isAllowedToSend, o2 = o2.modifiedText, true === n2 && (t2[e2] = o2, true)); - } }, { key: "onFriendProfileModified", value: function(e2) { - this._friendHandler.onFriendProfileModified(e2); - } }, { key: "getLocalFriendList", value: function() { - var e2 = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0], t2 = this._friendHandler.getLocalFriendList(); - return e2 ? T(t2) : t2; - } }, { key: "getFriendRemark", value: function(e2) { - return this._friendHandler.getFriendRemark(e2); - } }, { key: "getFriendList", value: function() { - return this._friendHandler.pagingGetFriendList(); - } }, { key: "addFriend", value: function(e2) { - return this._friendHandler.addFriend(e2); - } }, { key: "deleteFriend", value: function(e2) { - return this._friendHandler.deleteFriend(e2); - } }, { key: "checkFriend", value: function(e2) { - return this._friendHandler.checkFriend(e2); - } }, { key: "getFriendProfile", value: function(e2) { - return this._friendHandler.getFriendProfile(e2); - } }, { key: "updateFriend", value: function(e2) { - return this._friendHandler.updateFriend(e2); - } }, { key: "onAddedToFriendGroup", value: function(e2) { - this._friendHandler.onAddedToFriendGroup(e2); - } }, { key: "onRemovedFromFriendGroup", value: function(e2) { - this._friendHandler.onRemovedFromFriendGroup(e2); - } }, { key: "getLocalFriendApplicationList", value: function() { - var e2 = this._friendApplicationHandler.getLocalApplicationList(); - return T(e2); - } }, { key: "deleteFriendApplication", value: function(e2) { - return this._friendApplicationHandler.deleteApplication(e2); - } }, { key: "refuseFriendApplication", value: function(e2) { - return this._friendApplicationHandler.refuseApplication(e2); - } }, { key: "acceptFriendApplication", value: function(e2) { - return this._friendApplicationHandler.acceptApplication(e2); - } }, { key: "setFriendApplicationRead", value: function(e2) { - return this._friendApplicationHandler.setApplicationRead(e2); - } }, { key: "getLocalFriendGroupList", value: function() { - var e2 = this._friendGroupHandler.getLocalGroupList(); - return T(e2); - } }, { key: "createFriendGroup", value: function(e2) { - return this._friendGroupHandler.createGroup(e2); - } }, { key: "deleteFriendGroup", value: function(e2) { - return this._friendGroupHandler.deleteGroup(e2); - } }, { key: "addToFriendGroup", value: function(e2) { - return this._friendGroupHandler.addToGroup(e2); - } }, { key: "removeFromFriendGroup", value: function(e2) { - return this._friendGroupHandler.removeFromGroup(e2); - } }, { key: "renameFriendGroup", value: function(e2) { - return this._friendGroupHandler.renameGroup(e2); - } }, { key: "updateWhenFriendAdded", value: function(e2) { - this._friendGroupHandler.updateWhenFriendAdded(e2); - } }, { key: "updateWhenFriendDeleted", value: function(e2) { - this._friendGroupHandler.updateWhenFriendDeleted(e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._friendHandler.reset(), this._friendGroupHandler.reset(), this._friendApplicationHandler.reset(); - } }]), Gr), nr = (t(Nr, u), Us = n(Nr), e(Nr, [{ key: "isWorkerEnabled", value: function() { - return this._isWorkerEnabled && Ge; - } }, { key: "startWorkerTimer", value: function() { - M.l("".concat(this._n, ".startWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("start"); - } }, { key: "stopWorkerTimer", value: function() { - M.l("".concat(this._n, ".stopWorkerTimer")), this._workerTimer && this._workerTimer.postMessage("stop"); - } }, { key: "_init", value: function() { - var e2, t2; - Ge && (e2 = URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'], { type: "application/javascript; charset=utf-8" })), this._workerTimer = new Worker(e2), (t2 = this)._workerTimer.onmessage = function(e3) { - e3.data ? (t2._timerID = e3.data, M.l("".concat(t2._n, "._init seed:").concat(t2._timerID))) : t2._m.onCheckTimer(); - }); - } }, { key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("enable_worker"); - M.l("".concat(this._n, "._onCloudConfig enableWorker:").concat(e2)), N(e2) || "1" === e2 ? !this._isWorkerEnabled && Ge && (this._isWorkerEnabled = true, this.startWorkerTimer(), this._m.onWorkerTimerEnabled()) : this._isWorkerEnabled && Ge && (this._isWorkerEnabled = false, this.stopWorkerTimer(), this._m.onWorkerTimerDisabled()); - } }, { key: "terminate", value: function() { - M.l("".concat(this._n, ".terminate")), this._workerTimer && (this._workerTimer.terminate(), this._workerTimer = null, this._timerID = -1); - } }, { key: "getTimerID", value: function() { - return this._timerID; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")); - } }]), Nr), or = (e(Or, [{ key: "isValidPurchaseBits", value: function(e2) { - return e2 && "string" == typeof e2 && 1 <= e2.length && e2.length <= 64 && /[01]{1,64}/.test(e2); - } }, { key: "parsePurchaseBits", value: function(e2) { - if (this.isValidPurchaseBits(e2)) { - this._featureMap.clear(); - for (var t2, n2 = e2.length - 1, o2 = 0; 0 <= n2; n2--, o2++) - t2 = (o2 < 32 ? new ee(0, Math.pow(2, o2)) : new ee(Math.pow(2, o2 - 32), 0)).toString(), "1" === e2[n2] ? this._featureMap.set(t2, true) : this._featureMap.set(t2, false); - } else - M.w("".concat(this._n, ".parsePurchaseBits invalid purchasebits:").concat(e2)); - } }, { key: "hasPurchasedFeature", value: function(e2) { - return !!this._featureMap.get(e2); - } }, { key: "isFeatureEnabled", value: function(e2) { - for (var t2 = parseInt(e2).toString(2), n2 = void 0, o2 = true, i2 = t2.length - 1, a2 = 0; 0 <= i2; i2--, a2++) - if ("1" === t2.charAt(i2) && (n2 = (a2 < 32 ? new ee(0, Math.pow(2, a2)) : new ee(Math.pow(2, a2 - 32), 0)).toString(), !this._featureMap.get(n2))) { - o2 = false; - break; - } - return M.l("".concat(this._n, ".isFeatureEnabled decimalNumber:").concat(e2, " key:").concat(n2, " ret:").concat(o2)), T({ enabled: o2 }); - } }, { key: "isFeatureEnabledForStat", value: function(e2) { - for (var t2 = parseInt(e2).toString(2), n2 = t2.length - 1, o2 = 0; 0 <= n2; n2--, o2++) - if ("1" === t2.charAt(n2)) { - if (i2 = (o2 < 32 ? new ee(0, Math.pow(2, o2)) : new ee(Math.pow(2, o2 - 32), 0)).toString(), !this._featureMap.get(i2)) - break; - var i2, a2 = "", s2 = 0; - i2 === _.PLUGIN_TRANSLATE ? (a2 = "plugin_translate", s2 = 16) : i2 === _.PLUGIN_VOICE_TO_TEXT ? (a2 = "plugin_voice_to_text", s2 = 17) : i2 === _.PLUGIN_CS ? (a2 = "plugin_cs", s2 = 14) : i2 === _.PLUGIN_PUSH ? (a2 = "plugin_push", s2 = 13) : i2 === _.PLUGIN_BOT ? (a2 = "plugin_bot", s2 = 15) : i2 === _.MSG_REACTION && (a2 = "plugin_emoji_reaction", s2 = 18), "" !== a2 && (i2 = this._commercialConfigM.get(12).getUIPlatform(), new G(a2).setCode(s2).setUIPlatform(i2).end(), M.l("".concat(this._n, ".isFeatureEnabledForStat ").concat(a2, " code:").concat(s2, " uiPlatform:").concat(i2))); - } - } }, { key: "isSearchCloudMessagesEnabled", value: function() { - var e2; - this._isSCMReported || (e2 = this._commercialConfigM.get(12).getUIPlatform(), new G("plugin_search").setCode(6).setUIPlatform(e2).end(), this._isSCMReported = true); - } }, { key: "clear", value: function() { - this._featureMap.clear(), this._isSCMReported = false; - } }]), Or), ir = (e(Rr, [{ key: "_canFetch", value: function() { - return this.get(12).isLoggedIn() ? !this._isFetching && Date.now() >= this._expiredTime : (this._expiredTime = Date.now() + 2e3, false); - } }, { key: "onCheckTimer", value: function(e2) { - this._canFetch() && this.fetchConfig(); - } }, { key: "fetchConfig", value: function() { - var t2, e2, n2 = this, o2 = this._canFetch(), i2 = "".concat(this._n, ".fetchConfig"); - M.l("".concat(i2, " canFetch:").concat(o2)), o2 && (t2 = new G("fetchCommercialConfig"), o2 = this.get(12).getSDKAppID(), e2 = this.get(20), this._isFetching = true, e2.req({ P: k.FETCH_COMMERCIAL_CONFIG, data: { SDKAppID: o2 } }).then(function(e3) { - t2.setMessage("purchaseBits:".concat(e3.data.purchaseBits)).end(), M.l("".concat(i2, " ok.")), n2._parseConfig(e3.data), n2._isFetching = false; - }).catch(function(e3) { - t2.setError(e3).end(), n2._isFetching = false; - })); - } }, { key: "onPushedConfig", value: function(e2) { - var t2 = "".concat(this._n, ".onPushedConfig data:").concat(JSON.stringify(e2)); - M.l("".concat(t2)), new G("pushedCommercialConfig").setMessage("purchaseBits:".concat(e2.purchaseBits)).end(), this._parseConfig(e2); - } }, { key: "_parseConfig", value: function(e2) { - var t2 = "".concat(this._n, "._parseConfig"), n2 = e2.errorCode, o2 = e2.errorMessage, i2 = e2.purchaseBits, a2 = e2.expiredTime; - 0 === n2 ? (this._purchasedFeatureHandler.parsePurchaseBits(i2), this._expiredTime = Date.now() + 1e3 * a2) : N(n2) ? (M.l("".concat(t2, " failed. Invalid message format:"), e2), this._setExpiredTimeOnResponseError(36e5)) : (M.e("".concat(t2, " errorCode:").concat(n2, " errorMessage:").concat(o2)), this._setExpiredTimeOnResponseError(12e4)); - } }, { key: "_setExpiredTimeOnResponseError", value: function(e2) { - this._expiredTime = Date.now() + e2; - } }, { key: "canIUse", value: function(e2) { - return this._purchasedFeatureHandler.hasPurchasedFeature(e2); - } }, { key: "isFeatureEnabled", value: function(e2) { - return this._purchasedFeatureHandler.isFeatureEnabled(e2); - } }, { key: "isFeatureEnabledForStat", value: function(e2) { - this._purchasedFeatureHandler.isFeatureEnabledForStat(e2); - } }, { key: "isSearchCloudMessagesEnabled", value: function() { - this._purchasedFeatureHandler.isSearchCloudMessagesEnabled(); - } }, { key: "get", value: function(e2) { - return this._m.get(e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler.clear(); - } }]), Rr), ar = (t(Ar, u), Ps = n(Ar), e(Ar, [{ key: "registerPlugin", value: function(e2) { - var t2, n2, o2, i2, a2, s2, r2, c2, u2, l2, d2, p2, _2; - Ie ? (this._offlinePushPlugin = e2["tim-offline-push-plugin"], t2 = (_2 = e2.offlinePushConfig || {}).huaweiBusinessID, n2 = _2.xiaomiBusinessID, o2 = _2.xiaomiAppID, i2 = _2.xiaomiAppKey, a2 = _2.meizuBusinessID, s2 = _2.meizuAppID, r2 = _2.meizuAppKey, c2 = _2.vivoBusinessID, u2 = _2.oppoBusinessID, l2 = _2.oppoAppKey, d2 = _2.oppoAppSecret, p2 = _2.honorBusinessID, _2 = _2.iosBusinessID, this._androidPushConfig.huaweiPushBussinessId = t2, this._androidPushConfig.xiaomiPushBussinessId = n2, this._androidPushConfig.xiaomiPushAppId = o2, this._androidPushConfig.xiaomiPushAppKey = i2, this._androidPushConfig.meizuPushBussinessId = a2, this._androidPushConfig.meizuPushAppId = s2, this._androidPushConfig.meizuPushAppKey = r2, this._androidPushConfig.vivoPushBussinessId = c2, this._androidPushConfig.oppoPushBussinessId = u2, this._androidPushConfig.oppoPushAppKey = l2, this._androidPushConfig.oppoPushAppSecret = d2, this._androidPushConfig.honorPushBussinessId = p2, new G("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!N(this._offlinePushPlugin))).end(true), M.l("".concat(this._n, ".").concat("registerPlugin", " ok. offlinePushConfig:").concat(JSON.stringify(e2.offlinePushConfig))), this._iosBusinessID = _2, this._setAppShowListener()) : this.warn("OfflinePushInUniapp"); - } }, { key: "init", value: function() { - this._isWebUniapp = this.getUniAppPlatform(), this._getDeviceToken(); - } }, { key: "_getDeviceToken", value: function() { - var c2, u2 = this, l2 = "".concat(this._n, ".").concat("_getDeviceToken"); - lt(this._offlinePushPlugin.getDeviceToken) ? (c2 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), ", iosBusinessID:").concat(this._iosBusinessID), M.l("".concat(l2, " start. ").concat(c2)), new G("_getDeviceToken").setMessage("".concat(c2)).end(true), this._offlinePushPlugin.getDeviceToken(this._androidPushConfig, function(e2) { - var t2, n2, o2, i2, a2 = new G("getDeviceTokenRes"), s2 = e2.code, r2 = e2.msg; - 0 === s2 ? (t2 = (i2 = e2.data).deviceToken, n2 = i2.deviceBrand, o2 = i2.deviceType, i2 = i2.bussinessId, u2._deviceToken = t2, u2._businessID = i2 || u2._iosBusinessID, c2 = "deviceToken:".concat(t2, ", deviceBrand:").concat(n2 || o2, ", businessID:").concat(u2._businessID), M.l("".concat(l2, " ok. ").concat(c2)), a2.setMessage(c2).end(true), u2._setToken()) : (a2.setMessage("code:".concat(s2, ", msg:").concat(r2)).end(true), M.e("".concat(l2, " failed. error:"), e2)); - })) : M.e("".concat(l2, " getDeviceToken is not a function")); - } }, { key: "canIUseOfflinePush", value: function() { - return Ie && !N(this._offlinePushPlugin); - } }, { key: "_setAppShowListener", value: function() { - var t2 = this, n2 = "".concat(this._n, ".").concat("_setAppShowListener"); - N(this._offlinePushPlugin) ? M.e("".concat(n2, " offlinePushPlugin is undefined")) : lt(this._offlinePushPlugin.setAppShowListener) ? (new G("_setAppShowListener").end(true), M.l("".concat(n2, " start")), this._offlinePushPlugin.setAppShowListener(function(e2) { - e2 = (e2 || {}).appShow; - new G("setAppShowListenerRes").setMessage("appShow:".concat(e2)).end(true), M.l("".concat(n2, " ok. appShow:").concat(e2)), t2._m.isReady() && (0 === e2 ? (t2._getConvUnreadCount(), t2._onBackground()) : 1 === e2 && t2._onForeground()); - })) : M.e("".concat(n2, " setAppShowListener is not a function")); - } }, { key: "getDeviceBrand", value: function() { - var e2; - if (!N(this._offlinePushPlugin) && lt(this._offlinePushPlugin.getDeviceType)) - return e2 = (this._offlinePushPlugin.getDeviceType() || {}).deviceType, M.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e2)), e2; - } }, { key: "_setToken", value: function() { - var t2 = "".concat(this._n, "._setToken"), e2 = this.get(12), n2 = 1, o2 = "", i2 = "", a2 = (S(this._deviceToken) && (n2 = 0), this.getUniAppPlatform()), s2 = this.getDeviceBrand(), r2 = (a2 === ne.IOS || a2 === ne.IPAD || a2 === ne.MAC ? i2 = this._deviceToken : a2 === ne.ANDROID && (o2 = this._deviceToken), new G("offlinePushSetToken")), a2 = "deviceToken:".concat(i2 || o2, ", businessID:").concat(this._businessID, ", ") + "deviceBrand:".concat(s2, ", isWebUniapp:").concat(this._isWebUniapp, ", pushMsg:").concat(n2, ", platform:").concat(a2); - return r2.setMessage("".concat(a2)), M.l("".concat(t2, " ").concat(a2)), this.req({ P: k.SET_TOKEN, data: { tokenID: o2, pushMsg: n2, sdkAppID: e2.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: s2, deviceToken: i2, isWebUniapp: this._isWebUniapp } }).then(function(e3) { - return r2.end(), M.l("".concat(t2, " ok")), e3; - }).catch(function(e3) { - return r2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_getConvUnreadCount", value: function() { - var t2 = this; - this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this.get(11).getLocalConvList().forEach(function(e2) { - e2.type === A.CONV_C2C && (t2._c2cUnreadCount += e2.unreadCount), e2.type === A.CONV_GROUP && (t2._groupUnreadCount += e2.unreadCount); - }); - } }, { key: "_onBackground", value: function() { - var t2 = this, n2 = "".concat(this._n, ".").concat("_onBackground"), o2 = new G("_onBackground"); - this.req({ P: k.STAT_BACKGROUND, data: { c2cUnreadCount: this._c2cUnreadCount, groupUnreadCount: this._groupUnreadCount, isWebUniapp: this._isWebUniapp } }).then(function(e2) { - return o2.setMessage("c2cUnreadCount: ".concat(t2._c2cUnreadCount, ", groupUnreadCount: ").concat(t2._groupUnreadCount)).end(), M.l("".concat(n2, " ok")), e2; - }).catch(function(e2) { - o2.setError(e2).end(), M.e("".concat(n2, " failed. error:"), e2); - }); - } }, { key: "_onForeground", value: function() { - var t2 = "".concat(this._n, ".").concat("_onForeground"), n2 = new G("_onForeground"); - this.req({ P: k.STAT_FOREGROUND, data: { isWebUniapp: this._isWebUniapp } }).then(function(e2) { - return n2.end(), M.l("".concat(t2, " ok")), e2; - }).catch(function(e2) { - n2.setError(e2).end(), M.e("".concat(t2, " failed. error:"), e2); - }); - } }, { key: "getUniAppPlatform", value: function() { - var e2 = uni.getSystemInfoSync().platform, t2 = this.getDeviceBrand(); - return "ios" === e2 ? ne.IOS : "android" === e2 ? ne.ANDROID : 1002 === t2 ? ne.IPAD : 1001 === t2 ? ne.MAC : void 0; - } }, { key: "reset", value: function() { - this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, M.l("".concat(this._n, ".reset")); - } }]), Ar), sr = (t(kr, u), Gs = n(kr), e(kr, [{ key: "registerPlugin", value: function(e2) { - var t2, n2, o2; - Ie ? (t2 = "".concat(this._n, ".").concat("registerPlugin"), this._pushPlugin = e2["tim-push"], this._getDeviceInfo(), n2 = (o2 = e2.pushConfig || {}).androidConfig, o2 = o2.iOSConfig, ut(n2) && (this._androidPushConfig = n2[this._deviceInfo.packageName]), n2 = (o2 || {}).iOSBusinessID, this._iOSBusinessID = n2, o2 = !N(this._pushPlugin), new G("registerPlugin").setMessage(this._pluginName).setMoreMessage("isExisted:".concat(o2)).end(true), M.l("".concat(t2, " ok. pushConfig:").concat(JSON.stringify(e2.pushConfig))), o2 ? (this._setAppShowListener(), this._setPushEventReportListener()) : M.e("".concat(t2, " ").concat(this._pluginName, " is undefined"))) : this.warn("TIMPushInUniapp"); - } }, { key: "init", value: function() { - this._isWebUniapp = this.getUniAppPlatform(), this._reportEventCacheList(), this._getDeviceToken(), this.get(27).isFeatureEnabledForStat(Math.pow(2, 41)); - } }, { key: "_reportEventCacheList", value: function() { - var a2 = this, s2 = "".concat(this._n, ".").concat("_reportEventCacheList"); - lt(this._pushPlugin.getPushEventCacheList) ? (new G("_reportEventCacheList").end(true), this._pushPlugin.getPushEventCacheList(function(e2) { - var t2 = e2.code, n2 = e2.data.eventList, o2 = new G("getPushEventCacheListRes"); - if (o2.setCode(t2), 0 !== t2) - o2.setMessage("res:".concat(JSON.stringify(e2))).end(true), M.e("".concat(s2, " failed. error:").concat(JSON.stringify(e2))); - else { - t2 = n2.length < 10 ? "eventList:".concat(JSON.stringify(n2)) : "eventList.length:".concat(n2.length); - M.l("".concat(s2, " ok. ").concat(t2)), o2.setMessage(t2).end(true); - for (var i2 = y(y({}, e2.data), {}, { eventList: [] }); 0 < n2.length; ) - i2.eventList = n2.splice(0, 40), a2._pushReport(i2); - } - })) : M.e("".concat(this._pluginName, ".getPushEventCacheList is not a function")); - } }, { key: "_getDeviceToken", value: function() { - var r2, c2 = this, u2 = "".concat(this._n, ".").concat("_getDeviceToken"); - lt(this._pushPlugin.getDeviceToken) ? (r2 = "androidPushConfig:".concat(JSON.stringify(this._androidPushConfig), " iOSBusinessID:").concat(this._iOSBusinessID), M.l("".concat(u2, " start. ").concat(r2)), new G("_getDeviceToken").setMessage("".concat(r2)).end(true), this._pushPlugin.getDeviceToken(this._androidPushConfig, function(e2) { - var t2, n2, o2, i2 = e2.code, a2 = e2.msg, s2 = new G("getDeviceTokenRes"); - s2.setCode(i2), 0 === i2 ? (t2 = (i2 = e2.data).deviceToken, n2 = i2.deviceBrand, o2 = i2.deviceType, i2 = i2.bussinessId, c2._deviceToken = t2, c2._businessID = i2 || c2._iOSBusinessID, r2 = "deviceToken:".concat(t2, " deviceBrand:").concat(n2 || o2, " businessID:").concat(c2._businessID), M.l("".concat(u2, " ok. ").concat(r2)), s2.setMessage(r2).end(true), c2._setToken()) : (s2.setMessage(a2).end(true), M.e("".concat(u2, " failed. error:").concat(JSON.stringify(e2)))); - })) : M.e("".concat(this._pluginName, ".getDeviceToken is not a function")); - } }, { key: "_getDeviceInfo", value: function() { - var e2, t2, n2, o2, i2 = "".concat(this._n, ".").concat("_getDeviceInfo"); - lt(this._pushPlugin.getDeviceInfo) ? (o2 = (e2 = this._pushPlugin.getDeviceInfo()).code, t2 = e2.data, (n2 = new G("_getDeviceInfo")).setCode(o2), 0 === o2 ? (this._deviceInfo = y(y({}, this._deviceInfo), t2), this._deviceInfo.pushVersion || (this._deviceInfo.pushVersion = "1.0.1"), o2 = "deviceInfo:".concat(JSON.stringify(this._deviceInfo)), M.l("".concat(i2, " ok. ").concat(o2)), n2.setMessage(o2).end(true)) : (n2.setMessage("deviceInfoRes:".concat(JSON.stringify(e2))).end(true), M.e("".concat(i2, " failed. error:").concat(JSON.stringify(e2))))) : M.e("".concat(this._pluginName, ".getDeviceInfo is not a function")); - } }, { key: "canIUseTIMPush", value: function() { - return Ie && !N(this._pushPlugin); - } }, { key: "_setAppShowListener", value: function() { - var t2 = this, n2 = "".concat(this._n, ".").concat("_setAppShowListener"); - lt(this._pushPlugin.setAppShowListener) ? (new G("_setAppShowListener").end(true), M.l("".concat(n2, " start")), this._pushPlugin.setAppShowListener(function(e2) { - e2 = (e2 || {}).appShow; - new G("setAppShowListenerRes").setMessage("appShow:".concat(e2)).end(true), M.l("".concat(n2, " ok. appShow:").concat(e2)), t2._m.isReady() && (0 === e2 ? (t2._getConvUnreadCount(), t2._onBackground()) : 1 === e2 && t2._onForeground()); - })) : M.e("".concat(this._pluginName, ".setAppShowListener is not a function")); - } }, { key: "_setPushEventReportListener", value: function() { - var a2 = this, s2 = "".concat(this._n, ".").concat("_setPushEventReportListener"); - lt(this._pushPlugin.setPushEventReportListener) ? (new G("_setPushEventReportListener").end(true), this._pushPlugin.setPushEventReportListener(function(e2) { - var t2 = e2.code, n2 = e2.data, o2 = n2.eventList, i2 = new G("setPushEventReportListenerRes"); - i2.setCode(t2), 0 === t2 ? (t2 = "eventList:".concat(JSON.stringify(o2)), M.l("".concat(s2, " ok. ").concat(t2)), i2.setMessage(t2).end(true), a2._m.isReady() && O(o2) && 0 < o2.length && a2._pushReport(n2)) : (i2.setMessage("res:".concat(JSON.stringify(e2))).end(true), M.e("".concat(s2, " failed. error:").concat(JSON.stringify(e2)))); - })) : M.e("".concat(this._pluginName, ".setPushEventReportListener is not a function")); - } }, { key: "getDeviceBrand", value: function() { - var e2; - if (!N(this._pushPlugin) && lt(this._pushPlugin.getDeviceType)) - return e2 = (this._pushPlugin.getDeviceType() || {}).deviceType, M.l("".concat(this._n, ".getDeviceBrand ok. deviceType:").concat(e2)), e2; - } }, { key: "_setToken", value: function() { - var t2 = "".concat(this._n, ".").concat("_setToken"), e2 = this.get(12), n2 = 1, o2 = "", i2 = "", a2 = (S(this._deviceToken) && (n2 = 0), this.getUniAppPlatform()), s2 = this.getDeviceBrand(), a2 = (a2 === ne.IOS || a2 === ne.IPAD || a2 === ne.MAC ? i2 = this._deviceToken : a2 === ne.ANDROID && (o2 = this._deviceToken), y({ tokenID: o2, pushMsg: n2, sdkAppID: e2.getSDKAppID(), businessID: parseInt(this._businessID), deviceBrand: s2, deviceToken: i2, isWebUniapp: this._isWebUniapp }, this._deviceInfo)), r2 = new G("_setToken"), o2 = "data:".concat(JSON.stringify(a2)); - r2.setMessage("".concat(o2)), M.l("".concat(t2, " ").concat(o2)), this.req({ P: k.SET_TOKEN, data: a2 }).then(function() { - r2.end(), M.w("".concat(t2, " ok")); - }).catch(function(e3) { - r2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_getConvUnreadCount", value: function() { - var t2 = this; - this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this.get(11).getLocalConvList().forEach(function(e2) { - e2.type === A.CONV_C2C && (t2._c2cUnreadCount += e2.unreadCount), e2.type === A.CONV_GROUP && (t2._groupUnreadCount += e2.unreadCount); - }); - } }, { key: "_onBackground", value: function() { - var e2 = this, t2 = "".concat(this._n, ".").concat("_onBackground"), n2 = new G("_onBackground"); - this.req({ P: k.STAT_BACKGROUND, data: { c2cUnreadCount: this._c2cUnreadCount, groupUnreadCount: this._groupUnreadCount, isWebUniapp: this._isWebUniapp } }).then(function() { - n2.setMessage("c2cUnreadCount:".concat(e2._c2cUnreadCount, " groupUnreadCount:").concat(e2._groupUnreadCount)).end(), M.l("".concat(t2, " ok")); - }).catch(function(e3) { - n2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3); - }); - } }, { key: "_onForeground", value: function() { - var t2 = "".concat(this._n, ".").concat("_onForeground"), n2 = new G("_onForeground"); - this.req({ P: k.STAT_FOREGROUND, data: { isWebUniapp: this._isWebUniapp } }).then(function() { - n2.end(), M.l("".concat(t2, " ok")); - }).catch(function(e2) { - n2.setError(e2).end(), M.e("".concat(t2, " failed. error:"), e2); - }); - } }, { key: "_pushReport", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("_pushReport"), o2 = new G("_pushReport"); - this.req({ P: k.PUSH_REPORT, data: { eventList: e2.eventList } }).then(function() { - o2.end(), t2._notifyReportSuccess(e2); - }).catch(function(e3) { - o2.setError(e3).end(), M.e("".concat(n2, " failed. error:"), e3); - }); - } }, { key: "_notifyReportSuccess", value: function(e2) { - !N(this._pushPlugin) && lt(this._pushPlugin.notifyReportSuccess) && (this._pushPlugin.notifyReportSuccess(e2), M.l("".concat(this._n, "._notifyReportSuccess ok"))); - } }, { key: "getUniAppPlatform", value: function() { - var e2 = uni.getSystemInfoSync().platform, t2 = this.getDeviceBrand(); - return "ios" === e2 ? ne.IOS : "android" === e2 ? ne.ANDROID : 1002 === t2 ? ne.IPAD : 1001 === t2 ? ne.MAC : void 0; - } }, { key: "reset", value: function() { - this._deviceToken = "", this._businessID = 0, this._c2cUnreadCount = 0, this._groupUnreadCount = 0, this._isWebUniapp = 0, M.l("".concat(this._n, ".reset")); - } }]), kr), rr = (t(Sr, u), Ns = n(Sr), e(Sr, [{ key: "init", value: function() { - var e2 = this.get(18).getPlugin("tim-profanity-filter-plugin"); - e2 && (this._plugin = new e2({ logger: M, isArray: O, isMap: st, isDevMode: this.isDevMode() }), this._getLexicon()); - } }, { key: "onCheckTimer", value: function() { - this._plugin && this._canIUseLexicon && this.isLoggedIn() && !this._isFetching && Date.now() >= this._expiredTime && this._getLexicon(); - } }, { key: "filterMessage", value: function(e2, t2) { - var n2 = true; - if (this._plugin && this._canIUseLexicon && (!t2 || !t2.messageControlInfo || true !== t2.messageControlInfo.excludedFromContentModeration)) { - var t2 = e2.type, o2 = e2.conversationType; - if (t2 === A.MSG_TEXT || t2 === A.MSG_CUSTOM) { - var i2, a2 = "".concat(this._n, ".filterMessage"); - if (M.l("".concat(a2)), t2 === A.MSG_TEXT) { - if (o2 === A.CONV_C2C ? i2 = "c2c_text_message" : o2 === A.CONV_GROUP && (i2 = "group_text_message"), !this._isConfigOn(i2)) - return n2; - var s2 = this._plugin.filter(e2.payload.text), r2 = s2.type, s2 = s2.modifiedText; - 1 === r2 ? n2 = false : 2 === r2 && (e2.payload.text = s2); - } else if (t2 === A.MSG_CUSTOM) { - if (o2 === A.CONV_C2C ? i2 = "c2c_custom_message" : o2 === A.CONV_GROUP && (i2 = "group_custom_message"), !this._isConfigOn(i2)) - return n2; - r2 = this._plugin.filter(e2.payload.data), s2 = this._plugin.filter(e2.payload.description), t2 = this._plugin.filter(e2.payload.extension); - 1 === r2.type || 1 === s2.type || 1 === t2.type ? n2 = false : (2 === r2.type && (e2.payload.data = r2.modifiedText), 2 === s2.type && (e2.payload.description = s2.modifiedText), 2 === t2.type && (e2.payload.extension = t2.modifiedText)); - } - M.l("".concat(a2, " done. isAllowedToSend:").concat(n2)); - } - } - return n2; - } }, { key: "filterText", value: function(e2, t2) { - var n2 = "".concat(this._n, ".filterText"), o2 = { isAllowedToSend: true, modifiedText: e2 }; - return this._plugin && this._canIUseLexicon && this._isConfigOn(t2) && (M.l("".concat(n2)), e2 = (t2 = this._plugin.filter(e2)).type, t2 = t2.modifiedText, 1 === e2 ? o2.isAllowedToSend = false : 2 === e2 && (o2.modifiedText = t2), M.l("".concat(n2, " done. ret:"), o2)), o2; - } }, { key: "_getLexicon", value: function() { - var l2 = this, d2 = new G("profanityFilter"), p2 = "".concat(this._n, "._getLexicon"); - this._isFetching = true, this.req({ P: k.GET_PROFANITY_LIST, data: { startIndex: this._startIndex, version: this._version } }).then(function(e2) { - var e2 = e2.data, t2 = e2.errorInfo, n2 = e2.filterConfig, o2 = e2.lexicon, i2 = e2.strToken, a2 = e2.completeFlag, s2 = e2.nextStartIndex, r2 = e2.version, e2 = e2.expiredTime, c2 = t2.errorCode, u2 = t2.errorMessage; - return 0 !== c2 ? (l2._isFetching = false, M.w("".concat(p2, " failed. error:"), t2), void d2.setCode(c2).setMessage(u2).end()) : (l2._onFilterConfig(n2), l2._getToken(i2), 1 === a2 ? (M.l("".concat(p2, " done. version:").concat(r2, " expiredTime:").concat(e2)), l2._version = r2, l2._canIUseLexicon = true, l2._isFetching = false, l2._expiredTime = Date.now() + 1e3 * e2, void l2._plugin.onLexiconCompleted(o2)) : (l2._startIndex = s2, l2._plugin.onLexiconSliced(o2), void l2._getLexicon())); - }).catch(function(e2) { - d2.setError(e2).end(), l2._isFetching = false, M.l("".concat(p2, " failed. error:"), e2); - }); - } }, { key: "_onFilterConfig", value: function(t2) { - var n2 = this; - S(t2) || (this._filterConfigMap.clear(), Object.keys(t2).forEach(function(e2) { - n2._filterConfigMap.set(e2, t2[e2]); - }), M.l("".concat(this._n, "._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys()), " values:").concat(Array.from(this._filterConfigMap.values())))); - } }, { key: "_isConfigOn", value: function(e2) { - return 1 === this._filterConfigMap.get(e2); - } }, { key: "_getToken", value: function(e2) { - if (m(e2)) { - var t2 = e2.length, n2 = ""; - if (t2 % 2 == 0) - for (var o2 = 0; o2 <= t2 - 1; o2 += 2) - n2 = (n2 += e2[o2 + 1]) + e2[o2]; - else { - for (var i2 = 0; i2 < t2 - 1; i2 += 2) - n2 = (n2 += e2[i2 + 1]) + e2[i2]; - n2 += e2[t2 - 1]; - } - this._plugin.onToken(n2); - } - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._plugin && (this._plugin.reset(), this._plugin = null), this._filterConfigMap.clear(), this._startIndex = 0, this._version = 0, this._canIUseLexicon = false, this._isFetching = false, this._expiredTime = 0; - } }]), Sr), cr = (e(Lr, [{ key: "_onCloudConfig", value: function() { - var t2 = this, e2 = this._m.get(23).getCloudConfig("rtc_cmd"); - N(e2) || ((e2 = JSON.parse(e2)).forEach(function(e3) { - t2._TRTCCommandList.includes(e3) || t2._TRTCCommandList.push(e3); - }), this._setTRTCCommandMap()); - } }, { key: "_setTRTCCommandMap", value: function() { - for (var e2, t2 = 0, n2 = this._TRTCCommandList.length; t2 < n2; t2++) - e2 = this._TRTCCommandList[t2].split(".")[0], this._TRTCCommandMap.set(e2, 1); - } }, { key: "onRoomCustomDataReceived", value: function(e2) { - this._m.getOEmitInst().emit(h.ROOM_CUSTOM_DATA_RECEIVED, e2); - } }, { key: "sendTRTCCustomData", value: function(e2) { - var t2 = e2.serviceCommand, e2 = e2.data, n2 = "".concat(a.NAME.TUIROOM_SVR, ".*"); - return N(t2) || (n2 = t2), this._isValidServiceCommand(n2) ? this._trans({ servcmd: n2, data: e2 }) : D({ code: L.INVALID_TRTC_CMD }); - } }, { key: "_trans", value: function(e2) { - M.d("".concat(this._n, "._trans. options:").concat(JSON.stringify(e2))); - var t2 = e2.servcmd, e2 = e2.data; - return this._m.get(20).trans({ servcmd: t2, data: m(e2) ? JSON.parse(e2) : e2 }); - } }, { key: "_isValidServiceCommand", value: function(e2) { - return e2.endsWith(".*") ? this._TRTCCommandList.includes(e2) : (e2 = e2.split(".")[0], this._TRTCCommandMap.has(e2)); - } }, { key: "isTRTCCommand", value: function(e2) { - e2 = e2.split(".")[0]; - return this._TRTCCommandMap.has(e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")); - } }]), Lr), ur = (e(Er, [{ key: "_init", value: function() { - var e2, t2 = this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE, false); - if (t2) { - try { - e2 = JSON.parse(t2); - } catch (e3) { - this._getStorageModule().removeItem(this.TIM_ERROR_ASSISTANCE, false), M.w("".concat(this._n, "._init error:"), e3); - } - e2 && (this._needToUpdate(e2) ? this._fetch() : this._fillMap(e2.message)); - } else - this._fetch(); - } }, { key: "_needToUpdate", value: function(e2) { - var t2 = e2.localSavedTime, e2 = e2.localSavedVersion, t2 = t2 && (/* @__PURE__ */ new Date()).getTime() - t2 >= this.STORAGE_EXPIRES_TIME, e2 = !e2 || "3.4.7" !== e2; - return M.l("".concat(this._n, "._needToUpdate isTimeout:").concat(t2, " isDifferentVersion:").concat(e2)), t2 || e2; - } }, { key: "_fetch", value: function() { - var e2, t2, n2, o2, i2, a2; - this._m.get(12).isPrivateNetWork() || (e2 = "https://web.sdk.qcloud.com/im/download/error-message/v3/0.0.6/tim-error-message.txt", t2 = "application/x-www-form-urlencoded;charset=UTF-8", n2 = "".concat(this._n, "._fetch ok in"), o2 = this, v ? I.request({ url: e2, method: "GET", timeout: 3e3, header: { "content-type": t2 }, dataType: "text", success: function(e3) { - o2._fillAndSave(e3.data), M.l("".concat(n2, " mini program")); - }, fail: function() { - } }) : (i2 = new XMLHttpRequest(), a2 = setTimeout(function() { - i2.abort(); - }, 3e3), i2.onreadystatechange = function() { - 4 === i2.readyState && (clearTimeout(a2), 200 !== i2.status && 304 !== i2.status || (M.l("".concat(n2, " browser")), o2._fillAndSave(i2.responseText))); - }, i2.open("GET", e2, true), i2.setRequestHeader("Content-type", t2), i2.send())); - } }, { key: "_fillAndSave", value: function(e2) { - this._fillMap(e2), this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE, JSON.stringify({ message: e2, localSavedTime: (/* @__PURE__ */ new Date()).getTime(), localSavedVersion: "3.4.7" }), true, false); - } }, { key: "_getStorageModule", value: function() { - return this._m.get(13); - } }, { key: "_fillMap", value: function(e2) { - this._map.clear(); - for (var t2, n2, o2 = e2.split(";\n"), i2 = o2.length, a2 = new RegExp(/'/g), s2 = 0; s2 < i2; s2++) - if (n2 = o2[s2].indexOf(":"), t2 = o2[s2].slice(0, n2), n2 = o2[s2].slice(n2 + 1, o2[s2].length), !t2.startsWith("//")) { - if (N(n2)) - continue; - this._map.set(t2, n2.replace(a2, "")); - } - } }, { key: "get", value: function(e2) { - var t2 = e2.isIntl, n2 = e2.key, o2 = e2.replacement1, e2 = e2.replacement2, t2 = "".concat(n2, t2 ? "_en" : "_cn"), n2 = (!this._map.has(t2) && this._map.has(n2) && (t2 = n2), ""); - return this._map.has(t2) && (n2 = this._map.get(t2), N(o2) || (n2 = n2.replace("$replacement1", o2)), N(e2) || (n2 = n2.replace("$replacement2", e2))), n2; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")); - } }]), Er), lr = (e(Dr, [{ key: "onNewMessageList", value: function(e2) { - var n2 = this; - e2.forEach(function(e3) { - var t2 = n2.getPayloadData(e3); - t2 && n2._handleActionType(t2, e3); - }); - } }, { key: "onMessageModified", value: function(e2) { - var n2 = this; - e2.forEach(function(e3) { - var t2 = n2.getPayloadData(e3); - t2 && n2._onInvitationModified(t2, e3); - }); - } }, { key: "getPayloadData", value: function(t2) { - var n2 = "".concat(this._n, ".getPayloadData"), t2 = t2.payload.data; - try { - return JSON.parse(t2); - } catch (e2) { - return M.e("".concat(n2, " JSON parse error. signalingData:").concat(t2)), null; - } - } }, { key: "_handleActionType", value: function(e2, t2) { - switch (e2.actionType) { - case Q.ACTION_TYPE_INVITE: - this._onNewInvitationReceived(e2, t2); - break; - case Q.ACTION_TYPE_REJECT_INVITE: - this._onInviteeRejected(e2); - break; - case Q.ACTION_TYPE_ACCEPT_INVITE: - this._onInviteeAccepted(e2); - break; - case Q.ACTION_TYPE_CANCEL_INVITE: - this._onInvitationCancelled(e2); - break; - case Q.ACTION_TYPE_INVITE_TIMEOUT: - this._onInvitationTimeout(e2); - } - } }, { key: "_genBaseEmitData", value: function(e2) { - return { inviteID: e2.inviteID, inviter: e2.inviter, groupID: e2.groupID, data: e2.data || "" }; - } }, { key: "_onNewInvitationReceived", value: function(e2, t2) { - var n2 = "".concat(this._n, "._onNewInvitationReceived"), o2 = e2.inviteID, i2 = e2.inviteeList, a2 = e2.groupID, s2 = e2.inviter, r2 = this._sigM.getMyUserID(), c2 = i2.includes(r2), u2 = e2.timeout, l2 = (Ve().getTime() - 1e3 * t2.time) / 1e3, n2 = (0 < u2 && 0 < l2 && l2 < u2 && (u2 -= l2), "".concat(n2, " myselfIncluded:").concat(c2, " groupID:").concat(a2, " signalObj:").concat(JSON.stringify(e2))); - M.l("".concat(n2, " timeout:").concat(u2, "s delta:").concat(l2, "s")), !(a2 && c2 || !a2) || (n2 = this._sigM.getInviteInfo(o2)) && n2 === e2 || (n2 || this._sigM.setInviteInfo(o2, y(y({}, e2), {}, { message: t2 })), this._sigM.emitEvent(Q.NEW_INVITATION_RECEIVED, y(y({}, this._genBaseEmitData(e2)), {}, { inviteeList: i2 })), s2 !== r2 && this._sigM.startTimer(y(y({}, e2), {}, { timeout: u2 }))); - } }, { key: "_onInviteeRejected", value: function(e2) { - var t2 = "".concat(this._n, "._onInviteeRejected"), n2 = e2.inviteID, o2 = e2.inviter, i2 = e2.groupID, a2 = this._sigM.hasInviteInfo(n2); - M.l("".concat(t2, " inviteID:").concat(n2, " hasInviteID:").concat(a2, " inviter:").concat(o2, " groupID:").concat(i2)), a2 && (this._sigM.updateInviteInfo(e2), this._sigM.emitEvent(Q.INVITEE_REJECTED, y(y({}, this._genBaseEmitData(e2)), {}, { invitee: e2.inviteeList[0] }))); - } }, { key: "_onInviteeAccepted", value: function(e2) { - var t2 = "".concat(this._n, "._onInviteeAccepted"), n2 = e2.inviteID, o2 = e2.inviter, i2 = e2.groupID, a2 = this._sigM.hasInviteInfo(n2); - M.l("".concat(t2, " inviteID:").concat(n2, " hasInviteID:").concat(a2, " inviter:").concat(o2, " groupID:").concat(i2)), a2 && (this._sigM.updateInviteInfo(e2), this._sigM.emitEvent(Q.INVITEE_ACCEPTED, y(y({}, this._genBaseEmitData(e2)), {}, { invitee: e2.inviteeList[0] }))); - } }, { key: "_onInvitationCancelled", value: function(e2) { - var t2 = "".concat(this._n, "._onInvitationCancelled"), n2 = e2.inviteID, o2 = e2.inviter, i2 = e2.groupID, a2 = this._sigM.hasInviteInfo(n2); - M.l("".concat(t2, " inviteID:").concat(n2, " hasInviteID:").concat(a2, " inviter:").concat(o2, " groupID:").concat(i2)), a2 && (this._sigM.deleteInviteInfo(n2), this._sigM.emitEvent(Q.INVITATION_CANCELLED, this._genBaseEmitData(e2))); - } }, { key: "_onInvitationTimeout", value: function(e2) { - var t2 = "".concat(this._n, "._onInvitationTimeout"), n2 = e2.inviteID, o2 = e2.inviter, i2 = e2.groupID, a2 = e2.inviteeList, s2 = this._sigM.hasInviteInfo(n2); - M.l("".concat(t2, " inviteID:").concat(n2, " hasInviteID:").concat(s2, " inviter:").concat(o2, " groupID:").concat(i2, " data:").concat(e2.data)), s2 && (this._sigM.updateInviteInfo(e2), this._sigM.emitEvent(Q.INVITATION_TIMEOUT, y(y({}, this._genBaseEmitData(e2)), {}, { inviteeList: a2, isSelfTimeout: false }))); - } }, { key: "_onInvitationModified", value: function(e2, t2) { - var n2 = "".concat(this._n, "._onInvitationModified"), o2 = e2.inviteID, i2 = e2.data; - M.l("".concat(n2, " inviteID:").concat(o2, " data:").concat(i2)), this._sigM.setInviteInfo(o2, y(y({}, e2), {}, { message: t2 })), this._sigM.emitEvent(Q.INVITATION_MODIFIED, { inviteID: o2, data: i2 }); - } }]), Dr), dr = (e(Tr, [{ key: "generateInviteID", value: function() { - var e2, t2 = (t2 = As)((e2 = ks)(32), 8) + "-" + t2(e2(16), 4) + "-" + t2(16384 | e2(12), 4) + "-" + t2(32768 | e2(14), 4) + "-" + t2(e2(48), 12); - return M.l("".concat(this._n, ".generateInviteID inviteID:").concat(t2)), t2; - } }, { key: "createInviteInfo", value: function(e2) { - var t2 = this.generateInviteID(), e2 = this.createInviteCustomData(y(y({}, e2), {}, { inviteID: t2 })), n2 = e2.groupID, o2 = e2.inviteeList, n2 = n2 || o2[0]; - return { customData: e2, message: this._sigM.createSignaling(e2, n2), inviteID: t2 }; - } }, { key: "_genBaseCustomData", value: function(e2) { - var t2 = e2.data, n2 = e2.inviteID, e2 = e2.groupID; - return { businessID: 1, timeout: 0, data: void 0 === t2 ? "" : t2, inviteID: void 0 === n2 ? "" : n2, groupID: void 0 === e2 ? "" : e2 }; - } }, { key: "createInviteCustomData", value: function(e2) { - var t2 = e2.userID, n2 = e2.timeout, n2 = void 0 === n2 ? 0 : n2, o2 = e2.groupID, o2 = void 0 === o2 ? "" : o2, i2 = this._sigM.getMyUserID(), i2 = y(y({}, this._genBaseCustomData(e2)), {}, { actionType: Q.ACTION_TYPE_INVITE, inviter: i2, inviteeList: o2 ? e2.inviteeList : [t2], timeout: n2 }); - return M.l("".concat(this._n, ".createInviteCustomData customData:"), i2), i2; - } }, { key: "createCancelCustomData", value: function(e2) { - var t2, n2 = "".concat(this._n, ".createCancelCustomData"), o2 = e2.inviteID, i2 = this._sigM.getMyUserID(), o2 = this._sigM.getInviteInfo(o2), a2 = o2.inviteeList, s2 = o2.groupID, o2 = o2.inviter; - return o2 === i2 ? t2 = y(y({}, this._genBaseCustomData(e2)), {}, { actionType: Q.ACTION_TYPE_CANCEL_INVITE, groupID: s2, inviter: i2, inviteeList: a2 }) : M.e("".concat(n2, " unmatched inviter:").concat(o2, " and my userID:").concat(i2)), M.l("".concat(n2, " customData:"), t2), t2; - } }, { key: "createAcceptCustomData", value: function(e2) { - var t2, n2 = "".concat(this._n, ".createAcceptCustomData"), o2 = e2.inviteID, i2 = this._sigM.getMyUserID(), a2 = this._sigM.getInviteInfo(o2), s2 = a2.inviter, r2 = a2.groupID; - return a2.inviteeList.includes(i2) ? t2 = y(y({}, this._genBaseCustomData(e2)), {}, { actionType: Q.ACTION_TYPE_ACCEPT_INVITE, groupID: r2, inviter: s2, inviteeList: [i2] }) : M.e("".concat(n2, " userID:").concat(i2, " not in inviteeList. inviteID:").concat(o2, " groupID:").concat(r2)), M.l("".concat(n2, " customData:"), t2), t2; - } }, { key: "createRejectCustomData", value: function(e2) { - var t2, n2 = "".concat(this._n, ".createRejectCustomData"), o2 = e2.inviteID, i2 = this._sigM.getMyUserID(), a2 = this._sigM.getInviteInfo(o2), s2 = a2.inviter, r2 = a2.groupID; - return a2.inviteeList.includes(i2) ? t2 = y(y({}, this._genBaseCustomData(e2)), {}, { actionType: Q.ACTION_TYPE_REJECT_INVITE, groupID: r2, inviter: s2, inviteeList: [i2] }) : M.e("".concat(n2, " userID:").concat(i2, " not in inviteeList. inviteID:").concat(o2, " groupID:").concat(r2)), M.l("".concat(n2, " customData:"), t2), t2; - } }, { key: "createTimeoutCustomData", value: function(e2) { - var t2 = "".concat(this._n, ".createTimeoutCustomData"), n2 = e2.inviteeList, o2 = e2.inviter, i2 = e2.isInviter, i2 = void 0 !== i2 && i2, a2 = this._sigM.getMyUserID(), e2 = y(y({}, this._genBaseCustomData(e2)), {}, { actionType: Q.ACTION_TYPE_INVITE_TIMEOUT, inviter: o2, inviteeList: i2 ? n2 : [a2] }); - return M.l("".concat(t2, " customData:"), e2), e2; - } }]), Tr), pr = (e(Cr, [{ key: "setCloudConfig", value: function() { - var e2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 20, t2 = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 300; - this.COUNT = e2, this.EXPIRED_TIME = t2, M.l("".concat(this._n, ".setCloudConfig count:").concat(e2, ", time:").concat(t2)); - } }, { key: "getHistorySignaling", value: function() { - var t2 = this, e2 = this._sigM.get(11).getLocalConvList(); - S(e2) || (this._getC2CSignalingList(), e2 = this._getValidGroupConvList(e2), this._getGroupSignalingList(e2).then(function(e3) { - t2._handleSignalingList(e3); - })); - } }, { key: "_getC2CSignalingList", value: function() { - var e2 = this._sigM.get(6).getMessageListFromUnreadDB(), e2 = this._sigM.filterMessageList(e2); - this._getRelatedToMeMap(e2); - } }, { key: "_getGroupSignalingList", value: function(e2) { - var n2 = this, e2 = this._createPromiseList(e2); - return 0 === e2.length ? Promise.resolve(this._sortSignaling(this._relatedToMeMap)) : this._concurrentGetMessageList(e2).then(function(e3) { - var t2 = /* @__PURE__ */ new Map(); - return e3.forEach(function(e4) { - e4 = e4.list, e4 = n2._getRelatedToMeMap(e4); - t2 = new Map([].concat(p(t2), p(e4))); - }), n2._sortSignaling(t2); - }); - } }, { key: "_handleSignalingList", value: function(e2) { - S(e2) || this._sigM.onNewMessageList(e2); - } }, { key: "_getValidGroupConvList", value: function(e2) { - for (var t2 = [], n2 = 0, o2 = e2.length; n2 < o2; n2++) { - var i2 = e2[n2], a2 = i2.type, s2 = i2.unreadCount, i2 = i2.lastMessage, a2 = a2 === A.CONV_GROUP, i2 = this._isNotExpired(i2); - a2 && s2 && i2 && t2.push(e2[n2]); - } - return t2; - } }, { key: "_isNotExpired", value: function(e2) { - return !(!e2 || !e2.lastTime) && e2.lastTime > Be() - this.EXPIRED_TIME; - } }, { key: "_createPromiseList", value: function(e2) { - for (var t2 = [], n2 = 0; n2 < e2.length; n2++) { - var o2 = e2[n2], i2 = o2.conversationID, o2 = o2.unreadCount, o2 = o2 < this.COUNT ? o2 : this.COUNT, o2 = (this._map.set(i2, { msgCount: o2, list: [] }), this._sigM.get(11).getMessageList({ conversationID: i2 })); - t2.push(o2); - } - return t2; - } }, { key: "_concurrentGetMessageList", value: function(e2) { - var i2 = this, a2 = []; - return Promise.all(e2).then(function(e3) { - for (var t2 = 0; t2 < e3.length; t2++) { - var n2 = e3[t2], o2 = n2.code, n2 = n2.data; - 0 === o2 && 0 !== n2.messageList.length && (i2._handleMessageList(n2.messageList), o2 = i2._relayGetMessageList(n2)) && a2.push(o2); - } - return 0 < a2.length ? i2._concurrentGetMessageList(a2) : i2._map; - }); - } }, { key: "_relayGetMessageList", value: function(e2) { - var t2, n2 = e2.messageList, o2 = e2.nextReqMessageID, e2 = e2.isCompleted; - return 0 === n2.length || (n2 = n2[0].conversationID, 0 === (t2 = this._map.get(n2).msgCount)) || e2 ? null : this._sigM.get(11).getMessageList({ conversationID: n2, nextReqMessageID: o2, count: t2 }); - } }, { key: "_handleMessageList", value: function(e2) { - var t2 = e2.length, n2 = e2[0].conversationID, o2 = this._map.get(n2), i2 = o2.msgCount, o2 = o2.list; - this._map.set(n2, { msgCount: 0 < i2 - t2 ? i2 - t2 : 0, list: o2.concat(this._sigM.filterMessageList(e2)) }); - } }, { key: "_getRelatedToMeMap", value: function(e2) { - for (var t2 = 0; t2 < e2.length; t2++) { - var n2 = e2[t2]; - this._saveRelatedToMe(n2); - } - return this._relatedToMeMap; - } }, { key: "_saveRelatedToMe", value: function(e2) { - var t2 = this._sigM.getPayloadData(e2) || {}, n2 = t2.actionType, t2 = t2.inviteID, o2 = void 0 === t2 ? "" : t2; - switch (void 0 === n2 ? "" : n2) { - case Q.ACTION_TYPE_INVITE: - this._setHistoryInvite(e2); - break; - case Q.ACTION_TYPE_REJECT_INVITE: - case Q.ACTION_TYPE_ACCEPT_INVITE: - this._updateHistoryInvite(e2); - break; - case Q.ACTION_TYPE_CANCEL_INVITE: - this._delHistoryInvite(o2); - break; - case Q.ACTION_TYPE_INVITE_TIMEOUT: - this._updateHistoryInvite(e2); - } - } }, { key: "_setHistoryInvite", value: function(e2) { - var t2 = this._sigM.getPayloadData(e2) || {}, n2 = t2.inviteID, n2 = void 0 === n2 ? "" : n2, o2 = t2.inviteeList, o2 = void 0 === o2 ? [] : o2, i2 = t2.timeout, i2 = void 0 === i2 ? 0 : i2, a2 = this._sigM.getMyUserID(); - o2.includes(a2) && (o2 = Be() - e2.time, 0 < i2 && i2 < o2 && 0 !== i2 || this._relatedToMeMap.set(n2, y(y({}, t2), {}, { messageList: [e2] }))); - } }, { key: "_delHistoryInvite", value: function(e2) { - this._relatedToMeMap.has(e2) && this._relatedToMeMap.delete(e2); - } }, { key: "_updateHistoryInvite", value: function(e2) { - var t2 = this._sigM.getPayloadData(e2) || {}, n2 = t2.inviteID, n2 = void 0 === n2 ? "" : n2, t2 = t2.inviteeList, o2 = void 0 === t2 ? [] : t2; - if (this._relatedToMeMap.has(n2)) { - for (var t2 = this._relatedToMeMap.get(n2), i2 = t2.inviteeList, t2 = t2.messageList, a2 = 0; a2 < o2.length; a2++) { - var s2 = o2[a2]; - i2.includes(s2) && i2.splice(i2.indexOf(s2), 1); - } - 0 === i2.length ? this._delHistoryInvite(n2) : t2.push(e2); - } else - this._delHistoryInvite(n2); - } }, { key: "_sortSignaling", value: function(e2) { - var t2 = []; - return e2.forEach(function(e3) { - t2 = [].concat(p(t2), p(e3.messageList)); - }), t2.sort(function(e3, t3) { - return e3.time - t3.time; - }); - } }, { key: "reset", value: function() { - this._map.clear(), this._relatedToMeMap.clear(); - } }]), Cr), _r = e(function e2(t2, n2) { - d(this, e2), this.businessID = t2.businessID || 1, this.inviteID = t2.inviteID, this.groupID = t2.groupID || "", this.inviter = t2.inviter || "", this.inviteeList = t2.inviteeList || [], this.data = t2.data || "", this.actionType = t2.actionType || Q.ACTION_TYPE_INVITE, this.timeout = t2.timeout || 0; - }), hr = ["message"], gr = ["message"], fr = (t(yr, u), Os = n(yr), e(yr, [{ key: "onC2CUnreadHandleCompleted", value: function() { - this._isC2CUnreadHandleCompleted = true, this._isCloudConfigCompleted && this._isConvSyncCompleted && !this._isSyncCompleted && this.onReady(); - } }, { key: "onConvSyncCompleted", value: function() { - this._isConvSyncCompleted = true, this._isC2CUnreadHandleCompleted && this._isCloudConfigCompleted && !this._isSyncCompleted && this.onReady(); - } }, { key: "onCloudConfig", value: function() { - this._isCloudConfigCompleted = true; - var e2 = this.getCloudConfig("history_s_count"), t2 = this.getCloudConfig("history_s_time"); - N(e2) || (e2 = Number(e2)), N(t2) || (t2 = Number(t2)), this._historySignalingHandler.setCloudConfig(e2, t2), this._isC2CUnreadHandleCompleted && this._isConvSyncCompleted && !this._isSyncCompleted && this.onReady(); - } }, { key: "_isListenerExisted", value: function() { - return -1 < this._m.getOEmitInst().eventNames().indexOf(Q.NEW_INVITATION_RECEIVED); - } }, { key: "onReady", value: function() { - this._isSyncCompleted = true; - var e2 = this._isListenerExisted(); - M.l("".concat(this._n, ".onReady. isListenerExisted: ").concat(e2)), e2 && this._historySignalingHandler.getHistorySignaling(); - } }, { key: "onNewMessageList", value: function(e2) { - e2 = this.filterMessageList(e2); - if (0 < e2.length) - return this._remoteSignalingHandler.onNewMessageList(e2); - } }, { key: "onMessageModified", value: function(e2) { - e2 = this.filterMessageList(e2); - if (0 < e2.length) - return this._remoteSignalingHandler.onMessageModified(e2); - } }, { key: "hasInviteInfo", value: function(e2) { - return this._inviteInfoMap.has(e2); - } }, { key: "getInviteInfo", value: function(e2) { - return this._inviteInfoMap.get(e2); - } }, { key: "setInviteInfo", value: function(e2, t2) { - var n2 = t2.message, t2 = K(t2, hr); - M.l("".concat(this._n, ".setInviteInfo inviteID:").concat(e2, " data:"), t2), this._inviteInfoMap.set(e2, y(y({}, t2), {}, { message: n2 })); - } }, { key: "deleteInviteInfo", value: function(e2) { - this.hasInviteInfo(e2) && (M.l("".concat(this._n, ".deleteInviteInfo inviteID:").concat(e2, ".")), this._inviteInfoMap.delete(e2)); - } }, { key: "updateInviteInfo", value: function(e2) { - var t2 = "".concat(this._n, ".updateInviteInfo"), n2 = e2.inviteID, o2 = e2.inviter, i2 = e2.inviteeList, e2 = e2.groupID; - M.l("".concat(t2, " inviteID:").concat(n2, " inviter:").concat(o2, " groupID:").concat(e2)), e2 && this.hasInviteInfo(n2) && (o2 = i2[0], (e2 = this.getInviteInfo(n2).inviteeList).includes(o2) && (e2.splice(e2.indexOf(o2), 1), M.l("".concat(t2, " remove ").concat(o2, ". localInviteeList.length:").concat(e2.length))), 0 !== e2.length) || this.deleteInviteInfo(n2); - } }, { key: "canIUseSignaling", value: function() { - return this._canIUseSignaling; - } }, { key: "emitEvent", value: function(e2, t2) { - this.emitOEvt(e2, t2); - } }, { key: "addSignalingListener", value: function(e2, t2, n2) { - this._canIUseSignaling || (this._canIUseSignaling = true), this._m.getOEmitInst().on(e2, t2, n2); - } }, { key: "removeSignalingListener", value: function(e2, t2, n2) { - this._m.getOEmitInst().off(e2, t2, n2), this._isListenerExisted() || (this._canIUseSignaling = false); - } }, { key: "invite", value: function(e2) { - var t2 = this, n2 = "".concat(this._n, ".").concat("invite"), o2 = this._localSignalingHandler.createInviteInfo(e2), i2 = o2.message, a2 = o2.customData, s2 = o2.inviteID; - return M.l("".concat(n2, " options:").concat(JSON.stringify(e2), " inviteID:").concat(s2)), this.sendSignaling(i2, e2).then(function(e3) { - return e3 && 0 === e3.code ? (t2.setInviteInfo(s2, y(y({}, a2), {}, { message: i2 })), t2.startTimer(y(y({}, a2), {}, { inviteID: s2 })), y(y({}, e3), {}, { inviteID: s2 })) : e3; - }).catch(function(e3) { - return D(e3); - }); - } }, { key: "inviteSync", value: function(e2, t2, n2) { - var o2 = this, i2 = "".concat(this._n, ".").concat("inviteSync"), a2 = this._localSignalingHandler.createInviteInfo(e2), s2 = a2.message, r2 = a2.customData, c2 = a2.inviteID; - return M.l("".concat(i2, " options:").concat(JSON.stringify(e2), " inviteID:").concat(c2)), this.sendSignaling(s2, e2).then(function(e3) { - if (e3 && 0 === e3.code) - return o2.setInviteInfo(c2, y(y({}, r2), {}, { message: s2 })), o2.startTimer(y(y({}, r2), {}, { inviteID: c2 })), t2 && t2({ inviteID: c2 }), { inviteID: c2 }; - n2 && n2(0 === e3.code, e3.message || ""); - }).catch(function(e3) { - return n2 && n2(e3.code, e3.message), D(e3); - }), c2; - } }, { key: "_handleImResponse", value: function(e2, t2, n2) { - t2 && 0 === t2.code && (this._isHandling = false, n2 ? this.deleteInviteInfo(e2.inviteID) : this.updateInviteInfo(e2)); - } }, { key: "cancel", value: function(t2) { - var n2 = this, e2 = "".concat(this._n, ".").concat("cancel"); - if (M.l("".concat(e2, " options:").concat(JSON.stringify(t2))), !this.hasInviteInfo(t2.inviteID) || this._isHandling) - return D({ code: L.INVALID_CANCEL_MESSAGE }); - this._isHandling = true; - var o2, i2 = this._localSignalingHandler.createCancelCustomData(t2); - return i2 ? (e2 = i2.groupID, o2 = i2.inviteeList, e2 = e2 || o2[0], o2 = this.createSignaling(i2, e2), this.sendSignaling(o2, t2).then(function(e3) { - return n2._handleImResponse(i2, e3, true), 0 === e3.code ? y(y({}, e3), {}, { inviteID: t2.inviteID }) : e3; - }).catch(function(e3) { - return D(e3); - })) : (this._isHandling = false, D({ code: L.SIGNALING_NO_PERMISSION })); - } }, { key: "accept", value: function(t2) { - var n2 = this, e2 = "".concat(this._n, ".").concat("accept"); - if (M.l("".concat(e2, " options:").concat(JSON.stringify(t2))), !this.hasInviteInfo(t2.inviteID) || this._isHandling) - return D({ code: L.SIGNALING_INVALID_INVITE_ID }); - this._isHandling = true; - var o2 = this._localSignalingHandler.createAcceptCustomData(t2); - return o2 ? (e2 = this.createSignaling(o2), this.sendSignaling(e2, t2).then(function(e3) { - return n2._handleImResponse(o2, e3), 0 === e3.code ? y(y({}, e3), {}, { inviteID: t2.inviteID }) : e3; - }).catch(function(e3) { - return D(e3); - })) : (this._isHandling = false, D({ code: L.SIGNALING_NO_PERMISSION })); - } }, { key: "reject", value: function(t2) { - var n2 = this, e2 = "".concat(this._n, ".").concat("reject"); - if (M.l("".concat(e2, " options:").concat(JSON.stringify(t2))), !this.hasInviteInfo(t2.inviteID) || this._isHandling) - return D({ code: L.SIGNALING_INVALID_INVITE_ID }); - this._isHandling = true; - var o2 = this._localSignalingHandler.createRejectCustomData(t2); - return o2 ? (e2 = this.createSignaling(o2), this.sendSignaling(e2, t2).then(function(e3) { - return n2._handleImResponse(o2, e3, true), 0 === e3.code ? y(y({}, e3), {}, { inviteID: t2.inviteID }) : e3; - }).catch(function(e3) { - return D(e3); - })) : (this._isHandling = false, D({ code: L.SIGNALING_NO_PERMISSION })); - } }, { key: "getSignalingInfo", value: function(e2) { - var t2 = "".concat(this._n, ".getSignalingInfo"), n2 = e2.ID, o2 = e2.from, i2 = e2.to, a2 = this._filterSignaling(e2), s2 = null, e2 = (a2 && (e2 = this.getPayloadData(e2), s2 = new _r(e2)), a2 ? "actionType:".concat(s2.actionType) : ""); - return M.l("".concat(t2, " messageID:").concat(n2, " from:").concat(o2, " to:").concat(i2, " ") + "".concat(e2, " isSignaling:").concat(a2)), s2; - } }, { key: "modifyInvitation", value: function(e2) { - var t2 = this, n2 = e2.inviteID, o2 = e2.data; - if (!this.hasInviteInfo(e2.inviteID) || this._isHandling) - return D({ code: L.SIGNALING_INVALID_INVITE_ID }); - this._isHandling = true; - var e2 = this.getInviteInfo(n2), i2 = e2.message, a2 = K(e2, gr), s2 = i2.payload.data; - return a2.data = o2, i2.payload.data = JSON.stringify(a2), this.get(2).modifyRemoteMessage(i2).then(function(e3) { - return t2.setInviteInfo(n2, y(y({}, a2), {}, { message: i2 })), t2._isHandling = false, e3; - }).catch(function(e3) { - return t2._isHandling = false, i2.payload.data = s2, D(e3); - }); - } }, { key: "_genMsgCtrlInfo", value: function() { - var e2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, t2 = e2.data, t2 = void 0 === t2 ? "" : t2, n2 = e2.onlineUserOnly, o2 = e2.inviteID, o2 = void 0 === o2 ? "" : o2, i2 = e2.offlinePushInfo, e2 = e2.actionType, a2 = { _onlineOnlyFlag: false }, o2 = { onlineUserOnly: (a2 = o2 && this.getInviteInfo(o2) ? this.getInviteInfo(o2).message : a2)._onlineOnlyFlag || n2 || false, offlinePushInfo: i2, messageControlInfo: { excludedFromContentModeration: true, excludedFromUnreadCount: false, excludedFromLastMessage: false } }; - return e2 === Q.ACTION_TYPE_INVITE_TIMEOUT ? (a2 = !!t2.match(/excludeTimeoutSignalingFromHistoryMessage/), o2.messageControlInfo.excludedFromUnreadCount = a2, o2.messageControlInfo.excludedFromLastMessage = a2) : (n2 = !!t2.match(/excludeFromHistoryMessage/), i2 = !!t2.match(/excludeOriginalSignalingFromHistoryMessage/), o2.messageControlInfo.excludedFromUnreadCount = n2 || i2, o2.messageControlInfo.excludedFromLastMessage = n2 || i2), o2; - } }, { key: "sendSignaling", value: function(e2, t2) { - var n2 = this; - return this.get(2).sendMessageInstance(e2, this._genMsgCtrlInfo(t2)).catch(function(e3) { - return n2._isHandling = false, D(e3); - }); - } }, { key: "filterMessageList", value: function(e2) { - var t2 = this; - return e2.filter(function(e3) { - return t2._filterSignaling(e3); - }); - } }, { key: "getPayloadData", value: function(e2) { - return this._remoteSignalingHandler.getPayloadData(e2); - } }, { key: "createSignaling", value: function(e2, t2) { - var n2 = e2.groupID, o2 = e2.inviter, t2 = { to: t2 || n2 || o2, conversationType: n2 ? A.CONV_GROUP : A.CONV_C2C, priority: A.MSG_PRIORITY_HIGH, payload: { data: JSON.stringify(e2) } }, o2 = this.get(2).createCustomMessage(t2); - return M.l("".concat(this._n, ".createSignaling. message:"), o2), o2; - } }, { key: "_filterSignaling", value: function(e2) { - var t2, n2, o2 = false; - return e2.type && e2.type === A.MSG_CUSTOM && (t2 = e2.cloudCustomData, e2 = void 0 === (e2 = e2.payload.data) ? "" : e2, t2 = (void 0 === t2 ? "" : t2).match(/"type":"tsignaling"/), n2 = e2.match(/inviteID/), e2 = e2.match(/actionType/), o2 = t2 || n2 && e2), !!o2; - } }, { key: "startTimer", value: function(t2) { - var n2, o2, i2, a2 = this, s2 = "".concat(this._n, ".startTimer"), e2 = t2.timeout, r2 = t2.inviteID, c2 = t2.inviter, u2 = t2.groupID, l2 = c2 === this.getMyUserID(); - M.l("".concat(s2, " timeout:").concat(e2, " isInviter:").concat(l2, " groupID:").concat(u2)), e2 <= 0 || (n2 = l2 ? e2 + 5 : e2, o2 = 1, i2 = setInterval(function() { - var e3 = a2._hasLocalInviteInfo(t2, l2); - o2 < n2 && e3 ? ++o2 : (e3 && a2._sendTimeoutNotice(r2, l2), M.l("".concat(s2, " end.")), clearInterval(i2)); - }, 1e3)); - } }, { key: "_hasLocalInviteInfo", value: function(e2, t2) { - var n2, o2, i2 = e2.inviteID, e2 = e2.groupID; - return !!this.hasInviteInfo(i2) && (n2 = "".concat(this._n, "._hasLocalInviteInfo"), o2 = this.getInviteInfo(i2).inviteeList, M.l("".concat(n2, " inviteID:").concat(i2, " inviteeList:").concat(o2, " groupID:").concat(e2)), !e2 || (t2 ? 0 < o2.length : 0 < o2.length && o2.includes(this.getMyUserID()))); - } }, { key: "_getReceiver", value: function(e2, t2) { - var n2 = t2.groupID, o2 = t2.inviteeList, t2 = t2.inviter; - return e2 ? n2 || o2[0] : n2 || t2; - } }, { key: "_sendTimeoutNotice", value: function(i2, a2) { - var s2 = this, e2 = this.getInviteInfo(i2), t2 = this._getReceiver(a2, e2), r2 = (M.l("".concat(this._n, "._sendTimeoutNotice inviteID:").concat(i2, " to:").concat(t2, " isInviter:").concat(a2)), this._localSignalingHandler.createTimeoutCustomData(y(y({}, e2), {}, { isInviter: a2 }))), c2 = this.createSignaling(r2, t2); - return this.sendSignaling(c2, r2).then(function(e3) { - var t3, n2, o2; - e3 && 0 === e3.code && (e3 = r2.data, t3 = r2.groupID, n2 = r2.inviteeList, o2 = r2.inviter, s2.emitEvent(Q.INVITATION_TIMEOUT, { data: e3, groupID: t3, inviteID: i2, inviteeList: n2, inviter: o2, isSelfTimeout: true, message: c2 }), a2 ? s2.deleteInviteInfo(i2) : s2.updateInviteInfo(r2)); - }); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._inviteInfoMap.clear(), this._canIUseSignaling = false, this._isHandling = false, this._historySignalingHandler.reset(), this._isC2CUnreadHandleCompleted = false, this._isConvSyncCompleted = false, this._isSyncCompleted = false, this._isCloudConfigCompleted = false; - } }]), yr), mr = ["followDiffList"], vr = { NONE: 0, FOLLOWERS: 1, FOLLOWING: 2, MUTUAL: 3 }, Ir = (t(Mr, u), Rs = n(Mr), e(Mr, [{ key: "_onCloudConfig", value: function() { - var e2 = this.getCloudConfig("follow_req_count"); - N(e2) || (e2 = Number(e2), this.DEFAULT_COUNT = e2 > this.MAX_COUNT ? this.MAX_COUNT : e2, this._clearFollowList()); - } }, { key: "clearCacheOnReconnected", value: function() { - this._clearFollowList(), this._followType.clear(); - } }, { key: "onFollowNotify", value: function(e2) { - var i2 = this, e2 = e2.dataList || []; - M.l("".concat(this._n, ".onFollowNotify followChangeList:").concat(e2.length)), e2.forEach(function(e3) { - var t2 = e3.followDiffList, t2 = void 0 === t2 ? [] : t2, o2 = K(e3, mr); - t2.forEach(function(e4) { - var t3 = e4.isAdd, e4 = e4.followType, e4 = void 0 === e4 ? [] : e4, n2 = i2._initFollowInfo(); - n2[e4].userInfoList.push(o2), n2[e4].isAdd = 1 === t3, i2._emitEvent(n2); - }); - }); - } }, { key: "_initFollowInfo", value: function() { - var t2 = {}; - return Object.values(vr).forEach(function(e2) { - e2 !== vr.NONE && (t2[e2] = { userInfoList: [], isAdd: false }); - }), t2; - } }, { key: "_emitEvent", value: function(n2) { - var o2 = this; - Object.keys(n2).forEach(function(e2) { - var e2 = Number(e2), t2 = n2[e2]; - 0 < t2.userInfoList.length && (e2 === vr.FOLLOWERS && (o2._clearFollowList(vr.FOLLOWERS), o2.emitOEvt(h.MY_FOLLOWERS_LIST_UPDATED, t2)), e2 === vr.FOLLOWING && (o2._clearFollowList(vr.FOLLOWING), o2.emitOEvt(h.MY_FOLLOWING_LIST_UPDATED, t2)), e2 === vr.MUTUAL) && (o2._clearFollowList(vr.MUTUAL), o2.emitOEvt(h.MUTUAL_FOLLOWERS_LIST_UPDATED, t2)); - }); - } }, { key: "followUser", value: function(e2) { - var t2, n2, o2; - return this.canIUse(_.FOLLOW) ? (t2 = "".concat(this._n, ".").concat("followUser"), n2 = "userIDList:".concat(e2.length), (o2 = new G("followUser")).setMessage(n2), M.l("".concat(t2, " ").concat(n2)), this.req({ P: k.FOLLOW, data: { fromAccount: this.getMyUserID(), userIDList: e2.map(function(e3) { - return { userID: e3 }; - }) } }).then(function(e3) { - return o2.end(), M.l("".concat(t2, " ok.")), C(e3.data.resultList); - }).catch(function(e3) { - return o2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this.noUse("followUser"); - } }, { key: "unfollowUser", value: function(e2) { - var t2, n2, o2; - return this.canIUse(_.FOLLOW) ? (t2 = "".concat(this._n, ".").concat("unfollowUser"), n2 = "userIDList:".concat(e2.length), (o2 = new G("unfollowUser")).setMessage(n2), M.l("".concat(t2, " ").concat(n2)), this.req({ P: k.UNFOLLOW, data: { fromAccount: this.getMyUserID(), userIDList: e2 } }).then(function(e3) { - return o2.end(), M.l("".concat(t2, " ok.")), C(e3.data.resultList); - }).catch(function(e3) { - return o2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this.noUse("unfollowUser"); - } }, { key: "getMyFollowersList", value: function() { - var t2 = this, n2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "", o2 = "getMyFollowersList"; - if (!this.canIUse(_.FOLLOW)) - return this.noUse(o2); - var i2 = n2 || this.FIRST_PAGE_INDEX; - if (this._myFollowersList.has(i2)) { - var e2 = this._myFollowersList.get(i2), a2 = e2.resultList, s2 = e2.nextCursor, e2 = e2.lastUpdateTime; - if (Date.now() - e2 < this.MAX_CATCH_TIME && 0 < a2.length) - return M.l("".concat(this._n, ".").concat(o2, " nextCursor:").concat(n2, " from local.")), T({ resultList: a2, nextCursor: s2 }); - } - return this._getFollowList(n2, vr.FOLLOWERS).then(function(e3) { - return t2._myFollowersList.set(i2, y(y({}, e3), {}, { lastUpdateTime: Date.now() })), M.l("".concat(t2._n, ".").concat(o2, " nextCursor:").concat(n2, " from remote.")), C(e3); - }); - } }, { key: "getMyFollowingList", value: function() { - var t2 = this, n2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "", o2 = "getMyFollowingList"; - if (!this.canIUse(_.FOLLOW)) - return this.noUse(o2); - var i2 = n2 || this.FIRST_PAGE_INDEX; - if (this._myFollowingList.has(i2)) { - var e2 = this._myFollowingList.get(i2), a2 = e2.resultList, s2 = e2.nextCursor, e2 = e2.lastUpdateTime; - if (Date.now() - e2 < this.MAX_CATCH_TIME && 0 < a2.length) - return M.l("".concat(this._n, ".").concat(o2, " nextCursor:").concat(n2, " from local.")), T({ resultList: a2, nextCursor: s2 }); - } - return this._getFollowList(n2, vr.FOLLOWING).then(function(e3) { - return t2._myFollowingList.set(i2, y(y({}, e3), {}, { lastUpdateTime: Date.now() })), M.l("".concat(t2._n, ".").concat(o2, " nextCursor:").concat(n2, " from remote.")), C(e3); - }); - } }, { key: "getMutualFollowersList", value: function() { - var t2 = this, n2 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "", o2 = "getMutualFollowersList"; - if (!this.canIUse(_.FOLLOW)) - return this.noUse(o2); - var i2 = n2 || this.FIRST_PAGE_INDEX; - if (this._myMutualFollowersList.has(i2)) { - var e2 = this._myMutualFollowersList.get(i2), a2 = e2.resultList, s2 = e2.nextCursor, e2 = e2.lastUpdateTime; - if (Date.now() - e2 < this.MAX_CATCH_TIME && 0 < a2.length) - return M.l("".concat(this._n, ".").concat(o2, " nextCursor:").concat(n2, " from local.")), T({ resultList: a2, nextCursor: s2 }); - } - return this._getFollowList(n2, vr.MUTUAL).then(function(e3) { - return t2._myMutualFollowersList.set(i2, y(y({}, e3), {}, { lastUpdateTime: Date.now() })), M.l("".concat(t2._n, ".").concat(o2, " nextCursor:").concat(n2, " from remote.")), C(e3); - }); - } }, { key: "_getFollowList", value: function(e2, t2) { - var i2 = this, n2 = new G("_getFollowList"); - return n2.setMessage("nextCursor:".concat(e2, " type:").concat(t2)), this.req({ P: k.GET_FOLLOW, data: { fromAccount: this.getMyUserID(), count: this.DEFAULT_COUNT, nextCursor: e2, type: t2 } }).then(function(e3) { - n2.end(); - var e3 = e3.data, t3 = e3.resultList, t3 = void 0 === t3 ? [] : t3, e3 = e3.nextCursor, e3 = void 0 === e3 ? "" : e3, o2 = []; - return t3.forEach(function(e4) { - var t4 = e4.userID, n3 = e4.followTime, e4 = e4.profileList; - o2.push(y({ userID: t4, followTime: n3 }, i2._handleProfileItem(void 0 === e4 ? [] : e4))); - }), { resultList: o2, nextCursor: e3 }; - }).catch(function(e3) { - return n2.setError(e3).end(), M.e("".concat(i2._n, "._getFollowList failed. error:"), e3), D(e3); - }); - } }, { key: "_handleProfileItem", value: function(e2) { - var t2 = {}; - return e2.forEach(function(e3) { - switch (e3.tag) { - case g.NICK: - t2.nick = e3.value; - break; - case g.GENDER: - t2.gender = e3.value; - break; - case g.BIRTHDAY: - t2.birthday = e3.value; - break; - case g.LOCATION: - t2.location = e3.value; - break; - case g.SELFSIGNATURE: - t2.selfSignature = e3.value; - break; - case g.ALLOWTYPE: - t2.allowType = e3.value; - break; - case g.LANGUAGE: - t2.language = e3.value; - break; - case g.AVATAR: - t2.avatar = e3.value; - break; - case g.MESSAGESETTINGS: - t2.messageSettings = e3.value; - break; - case g.ADMINFORBIDTYPE: - t2.adminForbidType = e3.value; - break; - case g.LEVEL: - t2.level = e3.value; - break; - case g.ROLE: - t2.role = e3.value; - break; - default: - t2[e3.tag] = e3.value; - } - }), t2; - } }, { key: "getUserFollowInfo", value: function(e2) { - var t2, n2, i2; - return this.canIUse(_.FOLLOW) ? (n2 = false, N(e2 = e2) && (e2 = [this.getMyUserID()], n2 = true), t2 = "".concat(this._n, ".").concat("getUserFollowInfo"), n2 = "userIDList:".concat(e2.length, " isGetMyFollowInfo:").concat(n2), (i2 = new G("getUserFollowInfo")).setMessage(n2), M.l("".concat(t2, " ").concat(n2)), this.req({ P: k.GET_FOLLOW_INFO, data: { fromAccount: this.getMyUserID(), userIDList: e2 } }).then(function(e3) { - i2.end(), M.l("".concat(t2, " ok.")); - var e3 = e3.data.followInfoList, o2 = []; - return (void 0 === e3 ? [] : e3).forEach(function(e4) { - var t3 = e4.followersCount, n3 = e4.followingCount, e4 = e4.mutualFollowersCount; - o2.push({ followersCount: t3, followingCount: n3, mutualFollowersCount: e4 }); - }), C(o2); - }).catch(function(e3) { - return i2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - })) : this.noUse("getUserFollowInfo"); - } }, { key: "checkFollowType", value: function(e2) { - var n2 = this; - if (!this.canIUse(_.FOLLOW)) - return this.noUse("checkFollowType"); - 100 < e2.length && (e2 = e2.slice(0, 100), M.w("".concat(t2, " ").concat($t(100)))); - var t2 = "".concat(this._n, ".").concat("checkFollowType"), o2 = "userIDList length:".concat(e2.length, " "), i2 = new G("checkFollowType"), a2 = (i2.setMessage(o2), M.l("".concat(t2, " ").concat(o2)), []), s2 = []; - return e2.forEach(function(e3) { - var t3; - n2._followType.has(e3) ? (t3 = n2._followType.get(e3), a2.push({ userID: e3, followType: t3 })) : s2.push(e3); - }), M.l("".concat(t2, " from local count:").concat(a2.length, ", from remote count:").concat(s2.length, ".")), 0 === s2.length ? T(a2) : this.req({ P: k.CHECK_FOLLOW_TYPE, data: { fromAccount: this.getMyUserID(), userIDList: s2 } }).then(function(e3) { - i2.end(), M.l("".concat(t2, " ok.")); - e3 = e3.data.resultList; - return (void 0 === e3 ? [] : e3).forEach(function(e4) { - var t3 = e4.userID, e4 = e4.followType; - n2._setFollowType(t3, e4), a2.push({ userID: t3, followType: e4 }); - }), C(a2); - }).catch(function(e3) { - return i2.setError(e3).end(), M.e("".concat(t2, " failed. error:"), e3), D(e3); - }); - } }, { key: "_setFollowType", value: function(e2, t2) { - this._followType.set(e2, t2); - } }, { key: "_clearFollowList", value: function(e2) { - N(e2) ? (this._myFollowersList.clear(), this._myFollowingList.clear(), this._myMutualFollowersList.clear()) : e2 !== vr.FOLLOWERS ? e2 !== vr.FOLLOWING ? e2 === vr.MUTUAL && this._myMutualFollowersList.clear() : this._myFollowingList.clear() : this._myFollowersList.clear(); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._clearFollowList(), this._followType.clear(); - } }]), Mr), ie = ma(function(e2, t2) { - var n2 = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array; - t2.assign = function(e3) { - for (var t3, n3, o3 = Array.prototype.slice.call(arguments, 1); o3.length; ) { - var i3 = o3.shift(); - if (i3) { - if ("object" !== b(i3)) - throw new TypeError(i3 + "must be non-object"); - for (var a2 in i3) - t3 = i3, n3 = a2, Object.prototype.hasOwnProperty.call(t3, n3) && (e3[a2] = i3[a2]); - } - } - return e3; - }, t2.shrinkBuf = function(e3, t3) { - return e3.length === t3 ? e3 : e3.subarray ? e3.subarray(0, t3) : (e3.length = t3, e3); - }; - var o2 = { arraySet: function(e3, t3, n3, o3, i3) { - if (t3.subarray && e3.subarray) - e3.set(t3.subarray(n3, n3 + o3), i3); - else - for (var a2 = 0; a2 < o3; a2++) - e3[i3 + a2] = t3[n3 + a2]; - }, flattenChunks: function(e3) { - for (var t3, n3, o3, i3 = 0, a2 = 0, s2 = e3.length; a2 < s2; a2++) - i3 += e3[a2].length; - for (o3 = new Uint8Array(i3), a2 = t3 = 0, s2 = e3.length; a2 < s2; a2++) - n3 = e3[a2], o3.set(n3, t3), t3 += n3.length; - return o3; - } }, i2 = { arraySet: function(e3, t3, n3, o3, i3) { - for (var a2 = 0; a2 < o3; a2++) - e3[i3 + a2] = t3[n3 + a2]; - }, flattenChunks: function(e3) { - return [].concat.apply([], e3); - } }; - t2.setTyped = function(e3) { - e3 ? (t2.Buf8 = Uint8Array, t2.Buf16 = Uint16Array, t2.Buf32 = Int32Array, t2.assign(t2, o2)) : (t2.Buf8 = Array, t2.Buf16 = Array, t2.Buf32 = Array, t2.assign(t2, i2)); - }, t2.setTyped(n2); - }); - function Mr(e2) { - return d(this, Mr), (e2 = Rs.call(this, e2))._n = "FollowModule", e2._myFollowersList = /* @__PURE__ */ new Map(), e2._myFollowingList = /* @__PURE__ */ new Map(), e2._myMutualFollowersList = /* @__PURE__ */ new Map(), e2._followType = /* @__PURE__ */ new Map(), e2.MAX_CATCH_TIME = 6e5, e2.FIRST_PAGE_INDEX = mt(), e2.DEFAULT_COUNT = 500, e2.MAX_COUNT = 1e3, e2.getIEmitInst().on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function yr(e2) { - d(this, yr), (e2 = Os.call(this, e2))._n = "SignalingModule", e2._inviteInfoMap = /* @__PURE__ */ new Map(), e2._canIUseSignaling = false, e2._isHandling = false, e2._remoteSignalingHandler = new lr(i(e2)), e2._localSignalingHandler = new dr(i(e2)), e2._historySignalingHandler = new pr(i(e2)), e2._isC2CUnreadHandleCompleted = false, e2._isConvSyncCompleted = false, e2._isSyncCompleted = false, e2._isCloudConfigCompleted = false; - var t2 = e2.getIEmitInst(); - return t2.on(P.C2C_UNREAD_HANDLE_COMPLETED, e2.onC2CUnreadHandleCompleted, i(e2)), t2.on(P.CONV_SYNC_COMPLETED, e2.onConvSyncCompleted, i(e2)), t2.on(P.CLOUD_CONFIG, e2.onCloudConfig, i(e2)), e2; - } - function Cr(e2) { - d(this, Cr), this._n = "HistorySignalingHandler", this._sigM = e2, this.COUNT = 20, this.EXPIRED_TIME = 300, this._map = /* @__PURE__ */ new Map(), this._relatedToMeMap = /* @__PURE__ */ new Map(); - } - function Tr(e2) { - d(this, Tr), this._n = "LocalSignalingHandler", this._sigM = e2; - } - function Dr(e2) { - d(this, Dr), this._n = "RemoteSignalingHandler", this._sigM = e2; - } - function Er(e2) { - d(this, Er), this._m = e2, this._n = "ErrMsgModule", this.TIM_ERROR_ASSISTANCE = "tim_error_assistance", this.STORAGE_EXPIRES_TIME = 6048e5, this._map = /* @__PURE__ */ new Map(), this._init(); - } - function Lr(e2) { - d(this, Lr), this._m = e2, this._n = "TransCmdModule", this._TRTCCommandList = ["tui_room_svr.*", "callkit_records_svr.*", "room_engine_srv.*", "room_engine_http_srv.*", "room_engine_mic.*", "live_engine_srv.*", "live_engine_http_srv.*", "live_engine_pk.*", "trtc_ai_service.*"], this._TRTCCommandMap = /* @__PURE__ */ new Map(), this._setTRTCCommandMap(), this._m.getIEmitInst().on(P.CLOUD_CONFIG, this._onCloudConfig, this); - } - function Sr(e2) { - return d(this, Sr), (e2 = Ns.call(this, e2))._n = "ProfanityFilterModule", e2._plugin = null, e2._filterConfigMap = /* @__PURE__ */ new Map(), e2._startIndex = 0, e2._version = 0, e2._canIUseLexicon = false, e2._isFetching = false, e2._expiredTime = 0, e2; - } - function kr(e2) { - var t2; - return d(this, kr), (t2 = Gs.call(this, e2))._m = e2, t2._n = "TIMPushModule", t2._pluginName = "TIMPush", t2._pushPlugin = void 0, t2._androidPushConfig = {}, t2._deviceToken = "", t2._businessID = 0, t2._iOSBusinessID = 0, t2._c2cUnreadCount = 0, t2._groupUnreadCount = 0, t2._isWebUniapp = 0, t2._deviceInfo = { notificationStatus: 0, deviceModel: "", systemVersion: "", pushVersion: "1.0.1", packageName: "" }, t2; - } - function Ar(e2) { - var t2; - return d(this, Ar), (t2 = Ps.call(this, e2))._m = e2, t2._n = "OfflinePushModule", t2._offlinePushPlugin = void 0, t2._androidPushConfig = { huaweiPushBussinessId: "", xiaomiPushBussinessId: "", xiaomiPushAppId: "", xiaomiPushAppKey: "", meizuPushBussinessId: "", meizuPushAppId: "", meizuPushAppKey: "", vivoPushBussinessId: "", fcmPushBussinessId: "", oppoPushBussinessId: "", oppoPushAppKey: "", oppoPushAppSecret: "", honorPushBussinessId: "" }, t2._deviceToken = "", t2._businessID = 0, t2._iosBusinessID = 0, t2._c2cUnreadCount = 0, t2._groupUnreadCount = 0, t2._isWebUniapp = 0, t2; - } - function Rr(e2) { - d(this, Rr), this._m = e2, this._n = "CommercialConfigModule", this._expiredTime = 0, this._isFetching = false, this._purchasedFeatureHandler = new or(this); - } - function Or(e2) { - d(this, Or), this._commercialConfigM = e2, this._n = "PurchasedFeatureHandler", this._isSCMReported = false, this._featureMap = /* @__PURE__ */ new Map(); - } - function Nr(e2) { - return d(this, Nr), (e2 = Us.call(this, e2))._n = "WorkerTimerModule", e2._isWorkerEnabled = true, e2._workerTimer = null, e2._timerID = -1, e2._init(), e2.getIEmitInst().on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function Gr(e2) { - return d(this, Gr), (e2 = bs.call(this, e2))._n = "SnsModule", e2._friendHandler = new Qs(i(e2)), e2._friendApplicationHandler = new Xs(i(e2)), e2._friendGroupHandler = new er(i(e2)), e2.getIEmitInst().on(P.A2KEY_AND_TINYID_UPDATED, e2.onContextUpdated, i(e2)), e2; - } - function Pr(e2) { - d(this, Pr), this._snsM = e2, this._n = "FriendGroupHandler", this._map = /* @__PURE__ */ new Map(); - } - function Ur(e2) { - d(this, Ur), S(e2) || (this.name = e2.name || "", this.userIDList = e2.userIDList || [], this.count = this.userIDList.length || 0); - } - function br(e2) { - d(this, br), this._snsM = e2, this._n = "FriendHandler", this._map = /* @__PURE__ */ new Map(), this._startIdx = 0, this._standardSeq = 0, this._customSeq = 0, this._expirationTime = 18e4; - } - function wr(e2, t2) { - d(this, wr), this.userID = e2, this.remark = "", this.groupList = [], this.source = "", this.addTime = 0, this.friendCustomField = [], this.timestamp = 0; - var n2 = {}, o2 = []; - if (n2.userID = e2, !S(t2)) - for (var i2, a2 = "", s2 = 0, r2 = t2.length; s2 < r2; s2++) - if (a2 = t2[s2].tag, i2 = t2[s2].value, -1 < a2.indexOf("Tag_SNS_Custom")) - this.friendCustomField.push({ key: a2, value: i2 }); - else if (-1 < a2.indexOf("Tag_Profile_Custom")) - o2.push({ key: a2, value: i2 }); - else - switch (a2) { - case g.NICK: - n2.nick = i2; - break; - case g.GENDER: - n2.gender = i2; - break; - case g.BIRTHDAY: - n2.birthday = i2; - break; - case g.LOCATION: - n2.location = i2; - break; - case g.SELFSIGNATURE: - n2.selfSignature = i2; - break; - case g.ALLOWTYPE: - n2.allowType = i2; - break; - case g.LANGUAGE: - n2.language = i2; - break; - case g.AVATAR: - n2.avatar = i2; - break; - case g.MESSAGESETTINGS: - n2.messageSettings = i2; - break; - case g.ADMINFORBIDTYPE: - n2.adminForbidType = i2; - break; - case g.LEVEL: - n2.level = i2; - break; - case g.ROLE: - n2.role = i2; - break; - case Ze.REMARK: - this.remark = i2; - break; - case Ze.ADDTIME: - this.addTime = i2; - break; - case Ze.GROUP: - this.groupList = JSON.parse(JSON.stringify(i2)); - break; - case Ze.ADDSOURCE: - this.source = i2; - break; - case Ze.ADDWORDING: - break; - default: - M.l("snsProfileItem unknown tag->", t2[s2].tag); - } - this.profile = new ei(y(y({}, n2), {}, { profileCustomField: o2 })); - } - function Fr(e2) { - d(this, Fr), this._snsM = e2, this._n = "FriendApplicationHandler", this._startTime = 0, this._maxLimited = 100, this._currentSeq = 0, this._map = /* @__PURE__ */ new Map(), this._unreadCount = 0; - } - function qr(e2) { - d(this, qr), (e2 = ws.call(this, e2))._n = "QualityStatModule", e2.TAG = "im-ssolog-quality-stat", e2.reportIndex = 0, e2.wholePeriod = false, e2._qualityItems = [xn, Vn, Hn, Bn, Kn, Yn, Wn, jn, Jn, zn], e2._messageSentItems = [Hn, Bn, Kn, Yn, Wn], e2._messageReceivedItems = [jn, Jn, zn], e2.REPORT_INTERVAL = 120, e2.REPORT_SDKAPPID_BLACKLIST = [], e2.REPORT_TINYID_WHITELIST = [], e2._statInfoArr = [], e2._avgRTT = new Ys(), e2._avgE2EDelay = new Ks(), e2._rateMessageSent = new Ws(), e2._rateMessageReceived = new js(); - var t2 = e2.getIEmitInst(); - return t2.on(P.A2KEY_AND_TINYID_UPDATED, e2._onLoginSuccess, i(e2)), t2.on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - function xr() { - d(this, xr), this._lastMap = /* @__PURE__ */ new Map(), this._currentMap = /* @__PURE__ */ new Map(); - } - function Vr() { - d(this, Vr), this._map = /* @__PURE__ */ new Map(); - } - function Hr() { - d(this, Hr), this._n = "AvgRTT", this._requestCount = 0, this._rttArray = []; - } - function Br() { - d(this, Br), this._n = "AvgE2EDelay", this._e2eDelayArray = []; - } - function Kr(e2) { - return d(this, Kr), (e2 = Fs.call(this, e2))._n = "RecoverMsgModule", e2.PULL_LIMIT_COUNT = 15, e2; - } - function Yr(e2) { - return d(this, Yr), (e2 = qs.call(this, e2))._n = "CloudControlModule", e2._cloudConfig = /* @__PURE__ */ new Map(), e2._expiredTime = 0, e2._version = 0, e2._isFetching = false, e2; - } - function Wr(e2) { - return d(this, Wr), (e2 = xs.call(this, e2))._n = "SessionModule", e2._platform = e2.getPlatform(), e2._pHandler = new hs(i(e2)), e2._msgDispatcher = new fs(i(e2)), e2._cmdFreqLimitMap = /* @__PURE__ */ new Map(), e2._cmdReqInfoMap = /* @__PURE__ */ new Map(), e2._serverOverloadInfoMap = /* @__PURE__ */ new Map(), e2._incrementalPullContactFlag = true, e2._init(), e2.getIEmitInst().on(P.CLOUD_CONFIG, e2._onCloudConfig, i(e2)), e2; - } - ie.assign, ie.shrinkBuf, ie.setTyped, ie.Buf8, ie.Buf16, ie.Buf32; - function jr(e2, t2, n2, o2) { - for (var i2 = 65535 & e2 | 0, a2 = e2 >>> 16 & 65535 | 0, s2 = 0; 0 !== n2; ) { - for (n2 -= s2 = 2e3 < n2 ? 2e3 : n2; a2 = a2 + (i2 = i2 + t2[o2++] | 0) | 0, --s2; ) - ; - i2 %= 65521, a2 %= 65521; - } - return i2 | a2 << 16 | 0; - } - function Jr(e2, t2, n2, o2) { - var i2 = Xr, a2 = o2 + n2; - e2 ^= -1; - for (var s2 = o2; s2 < a2; s2++) - e2 = e2 >>> 8 ^ i2[255 & (e2 ^ t2[s2])]; - return -1 ^ e2; - } - function zr(e2, t2, n2, o2, i2, a2, s2, r2) { - for (var c2, u2, l2, d2, p2, _2, h2, g2, f2, m2 = r2.bits, v2 = 0, I2 = 0, M2 = 0, y2 = 0, C2 = 0, T2 = 0, D2 = 0, E2 = 0, L2 = 0, S2 = 0, k2 = null, A2 = 0, R2 = new ie.Buf16(16), O2 = new ie.Buf16(16), N2 = null, G2 = 0, v2 = 0; v2 <= 15; v2++) - R2[v2] = 0; - for (I2 = 0; I2 < o2; I2++) - R2[t2[n2 + I2]]++; - for (C2 = m2, y2 = 15; 1 <= y2 && 0 === R2[y2]; y2--) - ; - if (y2 < C2 && (C2 = y2), 0 === y2) - i2[a2++] = 20971520, i2[a2++] = 20971520, r2.bits = 1; - else { - for (M2 = 1; M2 < y2 && 0 === R2[M2]; M2++) - ; - for (C2 < M2 && (C2 = M2), v2 = E2 = 1; v2 <= 15; v2++) - if ((E2 = (E2 << 1) - R2[v2]) < 0) - return -1; - if (0 < E2 && (0 === e2 || 1 !== y2)) - return -1; - for (O2[1] = 0, v2 = 1; v2 < 15; v2++) - O2[v2 + 1] = O2[v2] + R2[v2]; - for (I2 = 0; I2 < o2; I2++) - 0 !== t2[n2 + I2] && (s2[O2[t2[n2 + I2]]++] = I2); - if (_2 = 0 === e2 ? (k2 = N2 = s2, 19) : 1 === e2 ? (k2 = Zr, A2 -= 257, N2 = Qr, G2 -= 257, 256) : (k2 = $r, N2 = ec, -1), v2 = M2, p2 = a2, D2 = I2 = S2 = 0, l2 = -1, d2 = (L2 = 1 << (T2 = C2)) - 1, 1 === e2 && 852 < L2 || 2 === e2 && 592 < L2) - return 1; - for (; ; ) { - for (f2 = s2[I2] < _2 ? (g2 = 0, s2[I2]) : s2[I2] > _2 ? (g2 = N2[G2 + s2[I2]], k2[A2 + s2[I2]]) : (g2 = 96, 0), c2 = 1 << (h2 = v2 - D2), M2 = u2 = 1 << T2; i2[p2 + (S2 >> D2) + (u2 -= c2)] = h2 << 24 | g2 << 16 | f2 | 0, 0 !== u2; ) - ; - for (c2 = 1 << v2 - 1; S2 & c2; ) - c2 >>= 1; - if (0 !== c2 ? S2 = (S2 & c2 - 1) + c2 : S2 = 0, I2++, 0 == --R2[v2]) { - if (v2 === y2) - break; - v2 = t2[n2 + s2[I2]]; - } - if (C2 < v2 && (S2 & d2) !== l2) { - for (p2 += M2, E2 = 1 << (T2 = v2 - (D2 = 0 === D2 ? C2 : D2)); T2 + D2 < y2 && !((E2 -= R2[T2 + D2]) <= 0); ) - T2++, E2 <<= 1; - if (L2 += 1 << T2, 1 === e2 && 852 < L2 || 2 === e2 && 592 < L2) - return 1; - i2[l2 = S2 & d2] = C2 << 24 | T2 << 16 | p2 - a2 | 0; - } - } - 0 !== S2 && (i2[p2 + S2] = v2 - D2 << 24 | 64 << 16 | 0), r2.bits = C2; - } - return 0; - } - var Xr = function() { - for (var e2 = [], t2 = 0; t2 < 256; t2++) { - for (var n2 = t2, o2 = 0; o2 < 8; o2++) - n2 = 1 & n2 ? 3988292384 ^ n2 >>> 1 : n2 >>> 1; - e2[t2] = n2; - } - return e2; - }(), Zr = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], Qr = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], $r = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], ec = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]; - function tc(e2) { - return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24); - } - function nc() { - this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new ie.Buf16(320), this.work = new ie.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0; - } - function oc(e2) { - var t2; - return e2 && e2.state ? (t2 = e2.state, e2.total_in = e2.total_out = t2.total = 0, e2.msg = "", t2.wrap && (e2.adler = 1 & t2.wrap), t2.mode = 1, t2.last = 0, t2.havedict = 0, t2.dmax = 32768, t2.head = null, t2.hold = 0, t2.bits = 0, t2.lencode = t2.lendyn = new ie.Buf32(852), t2.distcode = t2.distdyn = new ie.Buf32(592), t2.sane = 1, t2.back = -1, 0) : -2; - } - function ic(e2) { - var t2; - return e2 && e2.state ? ((t2 = e2.state).wsize = 0, t2.whave = 0, t2.wnext = 0, oc(e2)) : -2; - } - function ac(e2, t2) { - var n2, o2; - return !e2 || !e2.state || (o2 = e2.state, t2 < 0 ? (n2 = 0, t2 = -t2) : (n2 = 1 + (t2 >> 4), t2 < 48 && (t2 &= 15)), t2 && (t2 < 8 || 15 < t2)) ? -2 : (null !== o2.window && o2.wbits !== t2 && (o2.window = null), o2.wrap = n2, o2.wbits = t2, ic(e2)); - } - function sc(e2, t2) { - var n2; - return e2 ? (n2 = new nc(), (e2.state = n2).window = null, 0 !== (n2 = ac(e2, t2)) && (e2.state = null), n2) : -2; - } - var rc, cc, uc = true; - function lc(e2, t2, n2, o2) { - var i2, e2 = e2.state; - return null === e2.window && (e2.wsize = 1 << e2.wbits, e2.wnext = 0, e2.whave = 0, e2.window = new ie.Buf8(e2.wsize)), o2 >= e2.wsize ? (ie.arraySet(e2.window, t2, n2 - e2.wsize, e2.wsize, 0), e2.wnext = 0, e2.whave = e2.wsize) : ((i2 = e2.wsize - e2.wnext) > o2 && (i2 = o2), ie.arraySet(e2.window, t2, n2 - o2, i2, e2.wnext), (o2 -= i2) ? (ie.arraySet(e2.window, t2, n2 - o2, o2, 0), e2.wnext = o2, e2.whave = e2.wsize) : (e2.wnext += i2, e2.wnext === e2.wsize && (e2.wnext = 0), e2.whave < e2.wsize && (e2.whave += i2))), 0; - } - var dc = { inflateReset: ic, inflateReset2: ac, inflateResetKeep: oc, inflateInit: function(e2) { - return sc(e2, 15); - }, inflateInit2: sc, inflate: function(e2, b2) { - var t2, n2, w2, o2, i2, a2, s2, r2, c2, F2, u2, l2, q2, x2, d2, p2, _2, h2, V2, H2, g2, f2, m2, v2, I2 = 0, M2 = new ie.Buf8(4), B2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in) - return -2; - 12 === (t2 = e2.state).mode && (t2.mode = 13), i2 = e2.next_out, w2 = e2.output, s2 = e2.avail_out, o2 = e2.next_in, n2 = e2.input, a2 = e2.avail_in, r2 = t2.hold, c2 = t2.bits, F2 = a2, u2 = s2, f2 = 0; - e: - for (; ; ) - switch (t2.mode) { - case 1: - if (0 === t2.wrap) - t2.mode = 13; - else { - for (; c2 < 16; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (2 & t2.wrap && 35615 === r2) - M2[t2.check = 0] = 255 & r2, M2[1] = r2 >>> 8 & 255, t2.check = Jr(t2.check, M2, 2, 0), c2 = r2 = 0, t2.mode = 2; - else if (t2.flags = 0, t2.head && (t2.head.done = false), !(1 & t2.wrap) || (((255 & r2) << 8) + (r2 >> 8)) % 31) - e2.msg = "incorrect header check", t2.mode = 30; - else if (8 != (15 & r2)) - e2.msg = "unknown compression method", t2.mode = 30; - else { - if (c2 -= 4, g2 = 8 + (15 & (r2 >>>= 4)), 0 === t2.wbits) - t2.wbits = g2; - else if (g2 > t2.wbits) { - e2.msg = "invalid window size", t2.mode = 30; - break; - } - t2.dmax = 1 << g2, e2.adler = t2.check = 1, t2.mode = 512 & r2 ? 10 : 12, c2 = r2 = 0; - } - } - break; - case 2: - for (; c2 < 16; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (t2.flags = r2, 8 != (255 & t2.flags)) { - e2.msg = "unknown compression method", t2.mode = 30; - break; - } - if (57344 & t2.flags) { - e2.msg = "unknown header flags set", t2.mode = 30; - break; - } - t2.head && (t2.head.text = r2 >> 8 & 1), 512 & t2.flags && (M2[0] = 255 & r2, M2[1] = r2 >>> 8 & 255, t2.check = Jr(t2.check, M2, 2, 0)), c2 = r2 = 0, t2.mode = 3; - case 3: - for (; c2 < 32; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - t2.head && (t2.head.time = r2), 512 & t2.flags && (M2[0] = 255 & r2, M2[1] = r2 >>> 8 & 255, M2[2] = r2 >>> 16 & 255, M2[3] = r2 >>> 24 & 255, t2.check = Jr(t2.check, M2, 4, 0)), c2 = r2 = 0, t2.mode = 4; - case 4: - for (; c2 < 16; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - t2.head && (t2.head.xflags = 255 & r2, t2.head.os = r2 >> 8), 512 & t2.flags && (M2[0] = 255 & r2, M2[1] = r2 >>> 8 & 255, t2.check = Jr(t2.check, M2, 2, 0)), c2 = r2 = 0, t2.mode = 5; - case 5: - if (1024 & t2.flags) { - for (; c2 < 16; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - t2.length = r2, t2.head && (t2.head.extra_len = r2), 512 & t2.flags && (M2[0] = 255 & r2, M2[1] = r2 >>> 8 & 255, t2.check = Jr(t2.check, M2, 2, 0)), c2 = r2 = 0; - } else - t2.head && (t2.head.extra = null); - t2.mode = 6; - case 6: - if (1024 & t2.flags && ((l2 = (l2 = t2.length) > a2 ? a2 : l2) && (t2.head && (g2 = t2.head.extra_len - t2.length, t2.head.extra || (t2.head.extra = new Array(t2.head.extra_len)), ie.arraySet(t2.head.extra, n2, o2, l2, g2)), 512 & t2.flags && (t2.check = Jr(t2.check, n2, l2, o2)), a2 -= l2, o2 += l2, t2.length -= l2), t2.length)) - break e; - t2.length = 0, t2.mode = 7; - case 7: - if (2048 & t2.flags) { - if (0 === a2) - break e; - for (l2 = 0; g2 = n2[o2 + l2++], t2.head && g2 && t2.length < 65536 && (t2.head.name += String.fromCharCode(g2)), g2 && l2 < a2; ) - ; - if (512 & t2.flags && (t2.check = Jr(t2.check, n2, l2, o2)), a2 -= l2, o2 += l2, g2) - break e; - } else - t2.head && (t2.head.name = null); - t2.length = 0, t2.mode = 8; - case 8: - if (4096 & t2.flags) { - if (0 === a2) - break e; - for (l2 = 0; g2 = n2[o2 + l2++], t2.head && g2 && t2.length < 65536 && (t2.head.comment += String.fromCharCode(g2)), g2 && l2 < a2; ) - ; - if (512 & t2.flags && (t2.check = Jr(t2.check, n2, l2, o2)), a2 -= l2, o2 += l2, g2) - break e; - } else - t2.head && (t2.head.comment = null); - t2.mode = 9; - case 9: - if (512 & t2.flags) { - for (; c2 < 16; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (r2 !== (65535 & t2.check)) { - e2.msg = "header crc mismatch", t2.mode = 30; - break; - } - c2 = r2 = 0; - } - t2.head && (t2.head.hcrc = t2.flags >> 9 & 1, t2.head.done = true), e2.adler = t2.check = 0, t2.mode = 12; - break; - case 10: - for (; c2 < 32; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - e2.adler = t2.check = tc(r2), c2 = r2 = 0, t2.mode = 11; - case 11: - if (0 === t2.havedict) - return e2.next_out = i2, e2.avail_out = s2, e2.next_in = o2, e2.avail_in = a2, t2.hold = r2, t2.bits = c2, 2; - e2.adler = t2.check = 1, t2.mode = 12; - case 12: - if (5 === b2 || 6 === b2) - break e; - case 13: - if (t2.last) - r2 >>>= 7 & c2, c2 -= 7 & c2, t2.mode = 27; - else { - for (; c2 < 3; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - switch (t2.last = 1 & r2, --c2, 3 & (r2 >>>= 1)) { - case 0: - t2.mode = 14; - break; - case 1: - y2 = C2 = void 0; - var y2, C2 = t2; - if (uc) { - for (rc = new ie.Buf32(512), cc = new ie.Buf32(32), y2 = 0; y2 < 144; ) - C2.lens[y2++] = 8; - for (; y2 < 256; ) - C2.lens[y2++] = 9; - for (; y2 < 280; ) - C2.lens[y2++] = 7; - for (; y2 < 288; ) - C2.lens[y2++] = 8; - for (zr(1, C2.lens, 0, 288, rc, 0, C2.work, { bits: 9 }), y2 = 0; y2 < 32; ) - C2.lens[y2++] = 5; - zr(2, C2.lens, 0, 32, cc, 0, C2.work, { bits: 5 }), uc = false; - } - if (C2.lencode = rc, C2.lenbits = 9, C2.distcode = cc, C2.distbits = 5, t2.mode = 20, 6 !== b2) - break; - r2 >>>= 2, c2 -= 2; - break e; - case 2: - t2.mode = 17; - break; - case 3: - e2.msg = "invalid block type", t2.mode = 30; - } - r2 >>>= 2, c2 -= 2; - } - break; - case 14: - for (r2 >>>= 7 & c2, c2 -= 7 & c2; c2 < 32; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if ((65535 & r2) != (r2 >>> 16 ^ 65535)) { - e2.msg = "invalid stored block lengths", t2.mode = 30; - break; - } - if (t2.length = 65535 & r2, c2 = r2 = 0, t2.mode = 15, 6 === b2) - break e; - case 15: - t2.mode = 16; - case 16: - if (l2 = t2.length) { - if (0 === (l2 = s2 < (l2 = a2 < l2 ? a2 : l2) ? s2 : l2)) - break e; - ie.arraySet(w2, n2, o2, l2, i2), a2 -= l2, o2 += l2, s2 -= l2, i2 += l2, t2.length -= l2; - } else - t2.mode = 12; - break; - case 17: - for (; c2 < 14; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (t2.nlen = 257 + (31 & r2), r2 >>>= 5, c2 -= 5, t2.ndist = 1 + (31 & r2), r2 >>>= 5, c2 -= 5, t2.ncode = 4 + (15 & r2), r2 >>>= 4, c2 -= 4, 286 < t2.nlen || 30 < t2.ndist) { - e2.msg = "too many length or distance symbols", t2.mode = 30; - break; - } - t2.have = 0, t2.mode = 18; - case 18: - for (; t2.have < t2.ncode; ) { - for (; c2 < 3; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - t2.lens[B2[t2.have++]] = 7 & r2, r2 >>>= 3, c2 -= 3; - } - for (; t2.have < 19; ) - t2.lens[B2[t2.have++]] = 0; - if (t2.lencode = t2.lendyn, t2.lenbits = 7, m2 = { bits: t2.lenbits }, f2 = zr(0, t2.lens, 0, 19, t2.lencode, 0, t2.work, m2), t2.lenbits = m2.bits, f2) { - e2.msg = "invalid code lengths set", t2.mode = 30; - break; - } - t2.have = 0, t2.mode = 19; - case 19: - for (; t2.have < t2.nlen + t2.ndist; ) { - for (; p2 = (I2 = t2.lencode[r2 & (1 << t2.lenbits) - 1]) >>> 16 & 255, _2 = 65535 & I2, !((d2 = I2 >>> 24) <= c2); ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (_2 < 16) - r2 >>>= d2, c2 -= d2, t2.lens[t2.have++] = _2; - else { - if (16 === _2) { - for (v2 = d2 + 2; c2 < v2; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (r2 >>>= d2, c2 -= d2, 0 === t2.have) { - e2.msg = "invalid bit length repeat", t2.mode = 30; - break; - } - g2 = t2.lens[t2.have - 1], l2 = 3 + (3 & r2), r2 >>>= 2, c2 -= 2; - } else if (17 === _2) { - for (v2 = d2 + 3; c2 < v2; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - g2 = 0, l2 = 3 + (7 & (r2 >>>= d2)), r2 >>>= 3, c2 = c2 - d2 - 3; - } else { - for (v2 = d2 + 7; c2 < v2; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - g2 = 0, l2 = 11 + (127 & (r2 >>>= d2)), r2 >>>= 7, c2 = c2 - d2 - 7; - } - if (t2.have + l2 > t2.nlen + t2.ndist) { - e2.msg = "invalid bit length repeat", t2.mode = 30; - break; - } - for (; l2--; ) - t2.lens[t2.have++] = g2; - } - } - if (30 === t2.mode) - break; - if (0 === t2.lens[256]) { - e2.msg = "invalid code -- missing end-of-block", t2.mode = 30; - break; - } - if (t2.lenbits = 9, m2 = { bits: t2.lenbits }, f2 = zr(1, t2.lens, 0, t2.nlen, t2.lencode, 0, t2.work, m2), t2.lenbits = m2.bits, f2) { - e2.msg = "invalid literal/lengths set", t2.mode = 30; - break; - } - if (t2.distbits = 6, t2.distcode = t2.distdyn, m2 = { bits: t2.distbits }, f2 = zr(2, t2.lens, t2.nlen, t2.ndist, t2.distcode, 0, t2.work, m2), t2.distbits = m2.bits, f2) { - e2.msg = "invalid distances set", t2.mode = 30; - break; - } - if (t2.mode = 20, 6 === b2) - break e; - case 20: - t2.mode = 21; - case 21: - if (6 <= a2 && 258 <= s2) { - e2.next_out = i2, e2.avail_out = s2, e2.next_in = o2, e2.avail_in = a2, t2.hold = r2, t2.bits = c2, G2 = Y2 = k2 = S2 = L2 = E2 = D2 = T2 = oe2 = ne2 = te2 = ee2 = U2 = P2 = $2 = Q2 = Z2 = X2 = z2 = J2 = j2 = N2 = W2 = O2 = R2 = void 0; - var T2, D2, E2, L2, S2, k2, A2 = e2, K2 = u2, R2 = A2.state, O2 = A2.next_in, Y2 = A2.input, W2 = O2 + (A2.avail_in - 5), N2 = A2.next_out, G2 = A2.output, j2 = N2 - (K2 - A2.avail_out), J2 = N2 + (A2.avail_out - 257), z2 = R2.dmax, X2 = R2.wsize, Z2 = R2.whave, Q2 = R2.wnext, $2 = R2.window, P2 = R2.hold, U2 = R2.bits, ee2 = R2.lencode, te2 = R2.distcode, ne2 = (1 << R2.lenbits) - 1, oe2 = (1 << R2.distbits) - 1; - t: - do { - for (U2 < 15 && (P2 += Y2[O2++] << U2, U2 += 8, P2 += Y2[O2++] << U2, U2 += 8), T2 = ee2[P2 & ne2]; ; ) { - if (P2 >>>= D2 = T2 >>> 24, U2 -= D2, 0 == (D2 = T2 >>> 16 & 255)) - G2[N2++] = 65535 & T2; - else { - if (!(16 & D2)) { - if (0 == (64 & D2)) { - T2 = ee2[(65535 & T2) + (P2 & (1 << D2) - 1)]; - continue; - } - if (32 & D2) { - R2.mode = 12; - break t; - } - A2.msg = "invalid literal/length code", R2.mode = 30; - break t; - } - for (E2 = 65535 & T2, (D2 &= 15) && (U2 < D2 && (P2 += Y2[O2++] << U2, U2 += 8), E2 += P2 & (1 << D2) - 1, P2 >>>= D2, U2 -= D2), U2 < 15 && (P2 += Y2[O2++] << U2, U2 += 8, P2 += Y2[O2++] << U2, U2 += 8), T2 = te2[P2 & oe2]; ; ) { - if (P2 >>>= D2 = T2 >>> 24, U2 -= D2, !(16 & (D2 = T2 >>> 16 & 255))) { - if (0 == (64 & D2)) { - T2 = te2[(65535 & T2) + (P2 & (1 << D2) - 1)]; - continue; - } - A2.msg = "invalid distance code", R2.mode = 30; - break t; - } - if (L2 = 65535 & T2, U2 < (D2 &= 15) && (P2 += Y2[O2++] << U2, (U2 += 8) < D2) && (P2 += Y2[O2++] << U2, U2 += 8), (L2 += P2 & (1 << D2) - 1) > z2) { - A2.msg = "invalid distance too far back", R2.mode = 30; - break t; - } - if (P2 >>>= D2, U2 -= D2, L2 > (D2 = N2 - j2)) { - if ((D2 = L2 - D2) > Z2 && R2.sane) { - A2.msg = "invalid distance too far back", R2.mode = 30; - break t; - } - if (k2 = $2, (S2 = 0) === Q2) { - if (S2 += X2 - D2, D2 < E2) { - for (E2 -= D2; G2[N2++] = $2[S2++], --D2; ) - ; - S2 = N2 - L2, k2 = G2; - } - } else if (Q2 < D2) { - if (S2 += X2 + Q2 - D2, (D2 -= Q2) < E2) { - for (E2 -= D2; G2[N2++] = $2[S2++], --D2; ) - ; - if (S2 = 0, Q2 < E2) { - for (E2 -= D2 = Q2; G2[N2++] = $2[S2++], --D2; ) - ; - S2 = N2 - L2, k2 = G2; - } - } - } else if (S2 += Q2 - D2, D2 < E2) { - for (E2 -= D2; G2[N2++] = $2[S2++], --D2; ) - ; - S2 = N2 - L2, k2 = G2; - } - for (; 2 < E2; ) - G2[N2++] = k2[S2++], G2[N2++] = k2[S2++], G2[N2++] = k2[S2++], E2 -= 3; - E2 && (G2[N2++] = k2[S2++], 1 < E2) && (G2[N2++] = k2[S2++]); - } else { - for (S2 = N2 - L2; G2[N2++] = G2[S2++], G2[N2++] = G2[S2++], G2[N2++] = G2[S2++], 2 < (E2 -= 3); ) - ; - E2 && (G2[N2++] = G2[S2++], 1 < E2) && (G2[N2++] = G2[S2++]); - } - break; - } - } - break; - } - } while (O2 < W2 && N2 < J2); - O2 -= E2 = U2 >> 3, P2 &= (1 << (U2 -= E2 << 3)) - 1, A2.next_in = O2, A2.next_out = N2, A2.avail_in = O2 < W2 ? W2 - O2 + 5 : 5 - (O2 - W2), A2.avail_out = N2 < J2 ? J2 - N2 + 257 : 257 - (N2 - J2), R2.hold = P2, R2.bits = U2, i2 = e2.next_out, w2 = e2.output, s2 = e2.avail_out, o2 = e2.next_in, n2 = e2.input, a2 = e2.avail_in, r2 = t2.hold, c2 = t2.bits, 12 === t2.mode && (t2.back = -1); - break; - } - for (t2.back = 0; p2 = (I2 = t2.lencode[r2 & (1 << t2.lenbits) - 1]) >>> 16 & 255, _2 = 65535 & I2, !((d2 = I2 >>> 24) <= c2); ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (p2 && 0 == (240 & p2)) { - for (h2 = d2, V2 = p2, H2 = _2; p2 = (I2 = t2.lencode[H2 + ((r2 & (1 << h2 + V2) - 1) >> h2)]) >>> 16 & 255, _2 = 65535 & I2, !(h2 + (d2 = I2 >>> 24) <= c2); ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - r2 >>>= h2, c2 -= h2, t2.back += h2; - } - if (r2 >>>= d2, c2 -= d2, t2.back += d2, t2.length = _2, 0 === p2) { - t2.mode = 26; - break; - } - if (32 & p2) { - t2.back = -1, t2.mode = 12; - break; - } - if (64 & p2) { - e2.msg = "invalid literal/length code", t2.mode = 30; - break; - } - t2.extra = 15 & p2, t2.mode = 22; - case 22: - if (t2.extra) { - for (v2 = t2.extra; c2 < v2; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - t2.length += r2 & (1 << t2.extra) - 1, r2 >>>= t2.extra, c2 -= t2.extra, t2.back += t2.extra; - } - t2.was = t2.length, t2.mode = 23; - case 23: - for (; p2 = (I2 = t2.distcode[r2 & (1 << t2.distbits) - 1]) >>> 16 & 255, _2 = 65535 & I2, !((d2 = I2 >>> 24) <= c2); ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (0 == (240 & p2)) { - for (h2 = d2, V2 = p2, H2 = _2; p2 = (I2 = t2.distcode[H2 + ((r2 & (1 << h2 + V2) - 1) >> h2)]) >>> 16 & 255, _2 = 65535 & I2, !(h2 + (d2 = I2 >>> 24) <= c2); ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - r2 >>>= h2, c2 -= h2, t2.back += h2; - } - if (r2 >>>= d2, c2 -= d2, t2.back += d2, 64 & p2) { - e2.msg = "invalid distance code", t2.mode = 30; - break; - } - t2.offset = _2, t2.extra = 15 & p2, t2.mode = 24; - case 24: - if (t2.extra) { - for (v2 = t2.extra; c2 < v2; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - t2.offset += r2 & (1 << t2.extra) - 1, r2 >>>= t2.extra, c2 -= t2.extra, t2.back += t2.extra; - } - if (t2.offset > t2.dmax) { - e2.msg = "invalid distance too far back", t2.mode = 30; - break; - } - t2.mode = 25; - case 25: - if (0 === s2) - break e; - if (t2.offset > (l2 = u2 - s2)) { - if ((l2 = t2.offset - l2) > t2.whave && t2.sane) { - e2.msg = "invalid distance too far back", t2.mode = 30; - break; - } - q2 = l2 > t2.wnext ? (l2 -= t2.wnext, t2.wsize - l2) : t2.wnext - l2, l2 > t2.length && (l2 = t2.length), x2 = t2.window; - } else - x2 = w2, q2 = i2 - t2.offset, l2 = t2.length; - for (s2 -= l2 = s2 < l2 ? s2 : l2, t2.length -= l2; w2[i2++] = x2[q2++], --l2; ) - ; - 0 === t2.length && (t2.mode = 21); - break; - case 26: - if (0 === s2) - break e; - w2[i2++] = t2.length, s2--, t2.mode = 21; - break; - case 27: - if (t2.wrap) { - for (; c2 < 32; ) { - if (0 === a2) - break e; - a2--, r2 |= n2[o2++] << c2, c2 += 8; - } - if (u2 -= s2, e2.total_out += u2, t2.total += u2, u2 && (e2.adler = t2.check = (t2.flags ? Jr : jr)(t2.check, w2, u2, i2 - u2)), u2 = s2, (t2.flags ? r2 : tc(r2)) !== t2.check) { - e2.msg = "incorrect data check", t2.mode = 30; - break; - } - c2 = r2 = 0; - } - t2.mode = 28; - case 28: - if (t2.wrap && t2.flags) { - for (; c2 < 32; ) { - if (0 === a2) - break e; - a2--, r2 += n2[o2++] << c2, c2 += 8; - } - if (r2 !== (4294967295 & t2.total)) { - e2.msg = "incorrect length check", t2.mode = 30; - break; - } - c2 = r2 = 0; - } - t2.mode = 29; - case 29: - f2 = 1; - break e; - case 30: - f2 = -3; - break e; - case 31: - return -4; - default: - return -2; - } - return e2.next_out = i2, e2.avail_out = s2, e2.next_in = o2, e2.avail_in = a2, t2.hold = r2, t2.bits = c2, (t2.wsize || u2 !== e2.avail_out && t2.mode < 30 && (t2.mode < 27 || 4 !== b2)) && lc(e2, e2.output, e2.next_out, u2 - e2.avail_out), F2 -= e2.avail_in, u2 -= e2.avail_out, e2.total_in += F2, e2.total_out += u2, t2.total += u2, t2.wrap && u2 && (e2.adler = t2.check = (t2.flags ? Jr : jr)(t2.check, w2, u2, e2.next_out - u2)), e2.data_type = t2.bits + (t2.last ? 64 : 0) + (12 === t2.mode ? 128 : 0) + (20 === t2.mode || 15 === t2.mode ? 256 : 0), f2 = (0 == F2 && 0 === u2 || 4 === b2) && 0 === f2 ? -5 : f2; - }, inflateEnd: function(e2) { - var t2; - return e2 && e2.state ? ((t2 = e2.state).window && (t2.window = null), e2.state = null, 0) : -2; - }, inflateGetHeader: function(e2, t2) { - return !e2 || !e2.state || 0 == (2 & (e2 = e2.state).wrap) ? -2 : ((e2.head = t2).done = false, 0); - }, inflateSetDictionary: function(e2, t2) { - var n2, o2 = t2.length; - return !e2 || !e2.state || 0 !== (n2 = e2.state).wrap && 11 !== n2.mode ? -2 : 11 === n2.mode && jr(1, t2, o2, 0) !== n2.check ? -3 : lc(e2, t2, o2, o2) ? (n2.mode = 31, -4) : (n2.havedict = 1, 0); - }, inflateInfo: "pako inflate (from Nodeca project)" }, pc = true, _c = true; - try { - String.fromCharCode.apply(null, [0]); - } catch (e2) { - pc = false; - } - try { - String.fromCharCode.apply(null, new Uint8Array(1)); - } catch (e2) { - _c = false; - } - for (var hc = new ie.Buf8(256), gc = 0; gc < 256; gc++) - hc[gc] = 252 <= gc ? 6 : 248 <= gc ? 5 : 240 <= gc ? 4 : 224 <= gc ? 3 : 192 <= gc ? 2 : 1; - hc[254] = hc[254] = 1; - function fc(e2, t2) { - for (var n2, o2, i2 = t2 || e2.length, a2 = new Array(2 * i2), s2 = 0, r2 = 0; r2 < i2; ) - if ((n2 = e2[r2++]) < 128) - a2[s2++] = n2; - else if (4 < (o2 = hc[n2])) - a2[s2++] = 65533, r2 += o2 - 1; - else { - for (n2 &= 2 === o2 ? 31 : 3 === o2 ? 15 : 7; 1 < o2 && r2 < i2; ) - n2 = n2 << 6 | 63 & e2[r2++], o2--; - 1 < o2 ? a2[s2++] = 65533 : n2 < 65536 ? a2[s2++] = n2 : (n2 -= 65536, a2[s2++] = 55296 | n2 >> 10 & 1023, a2[s2++] = 56320 | 1023 & n2); - } - var c2 = a2, u2 = s2; - if (u2 < 65534 && (c2.subarray && _c || !c2.subarray && pc)) - return String.fromCharCode.apply(null, ie.shrinkBuf(c2, u2)); - for (var l2 = "", d2 = 0; d2 < u2; d2++) - l2 += String.fromCharCode(c2[d2]); - return l2; - } - function mc() { - this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0; - } - function vc() { - this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false; - } - var Ic = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 }, Mc = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" }, yc = Object.prototype.toString; - function Cc(e2) { - if (!(this instanceof Cc)) - return new Cc(e2); - this.options = ie.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e2 || {}); - var t2 = this.options, e2 = (t2.raw && 0 <= t2.windowBits && t2.windowBits < 16 && (t2.windowBits = -t2.windowBits, 0 === t2.windowBits) && (t2.windowBits = -15), !(0 <= t2.windowBits && t2.windowBits < 16) || e2 && e2.windowBits || (t2.windowBits += 32), 15 < t2.windowBits && t2.windowBits < 48 && 0 == (15 & t2.windowBits) && (t2.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new mc(), this.strm.avail_out = 0, dc.inflateInit2(this.strm, t2.windowBits)); - if (e2 !== Ic.Z_OK) - throw new Error(Mc[e2]); - if (this.header = new vc(), dc.inflateGetHeader(this.strm, this.header), t2.dictionary && ("string" == typeof t2.dictionary ? t2.dictionary = function(e3) { - for (var t3, n2, o2, i2, a2 = e3.length, s2 = 0, r2 = 0; r2 < a2; r2++) - 55296 == (64512 & (n2 = e3.charCodeAt(r2))) && r2 + 1 < a2 && 56320 == (64512 & (o2 = e3.charCodeAt(r2 + 1))) && (n2 = 65536 + (n2 - 55296 << 10) + (o2 - 56320), r2++), s2 += n2 < 128 ? 1 : n2 < 2048 ? 2 : n2 < 65536 ? 3 : 4; - for (t3 = new ie.Buf8(s2), r2 = i2 = 0; i2 < s2; r2++) - 55296 == (64512 & (n2 = e3.charCodeAt(r2))) && r2 + 1 < a2 && 56320 == (64512 & (o2 = e3.charCodeAt(r2 + 1))) && (n2 = 65536 + (n2 - 55296 << 10) + (o2 - 56320), r2++), n2 < 128 ? t3[i2++] = n2 : (n2 < 2048 ? t3[i2++] = 192 | n2 >>> 6 : (n2 < 65536 ? t3[i2++] = 224 | n2 >>> 12 : (t3[i2++] = 240 | n2 >>> 18, t3[i2++] = 128 | n2 >>> 12 & 63), t3[i2++] = 128 | n2 >>> 6 & 63), t3[i2++] = 128 | 63 & n2); - return t3; - }(t2.dictionary) : "[object ArrayBuffer]" === yc.call(t2.dictionary) && (t2.dictionary = new Uint8Array(t2.dictionary)), t2.raw) && (e2 = dc.inflateSetDictionary(this.strm, t2.dictionary)) !== Ic.Z_OK) - throw new Error(Mc[e2]); - } - function Tc(e2, t2) { - t2 = new Cc(t2); - if (t2.push(e2, true), t2.err) - throw t2.msg || Mc[t2.err]; - return t2.result; - } - Cc.prototype.push = function(e2, t2) { - var n2, o2, i2, a2, s2, r2 = this.strm, c2 = this.options.chunkSize, u2 = this.options.dictionary, l2 = false; - if (this.ended) - return false; - o2 = t2 === ~~t2 ? t2 : true === t2 ? Ic.Z_FINISH : Ic.Z_NO_FLUSH, "string" == typeof e2 ? r2.input = function(e3) { - for (var t3 = new ie.Buf8(e3.length), n3 = 0, o3 = t3.length; n3 < o3; n3++) - t3[n3] = e3.charCodeAt(n3); - return t3; - }(e2) : "[object ArrayBuffer]" === yc.call(e2) ? r2.input = new Uint8Array(e2) : r2.input = e2, r2.next_in = 0, r2.avail_in = r2.input.length; - do { - if (0 === r2.avail_out && (r2.output = new ie.Buf8(c2), r2.next_out = 0, r2.avail_out = c2), (n2 = (n2 = dc.inflate(r2, Ic.Z_NO_FLUSH)) === Ic.Z_NEED_DICT && u2 ? dc.inflateSetDictionary(this.strm, u2) : n2) === Ic.Z_BUF_ERROR && true === l2 && (n2 = Ic.Z_OK, l2 = false), n2 !== Ic.Z_STREAM_END && n2 !== Ic.Z_OK) - return this.onEnd(n2), !(this.ended = true); - !r2.next_out || 0 !== r2.avail_out && n2 !== Ic.Z_STREAM_END && (0 !== r2.avail_in || o2 !== Ic.Z_FINISH && o2 !== Ic.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i2 = function(e3, t3) { - for (var n3 = (t3 = (t3 = t3 || e3.length) > e3.length ? e3.length : t3) - 1; 0 <= n3 && 128 == (192 & e3[n3]); ) - n3--; - return !(n3 < 0 || 0 === n3) && n3 + hc[e3[n3]] > t3 ? n3 : t3; - }(r2.output, r2.next_out), a2 = r2.next_out - i2, s2 = fc(r2.output, i2), r2.next_out = a2, r2.avail_out = c2 - a2, a2 && ie.arraySet(r2.output, r2.output, i2, a2, 0), this.onData(s2)) : this.onData(ie.shrinkBuf(r2.output, r2.next_out))), 0 === r2.avail_in && 0 === r2.avail_out && (l2 = true); - } while ((0 < r2.avail_in || 0 === r2.avail_out) && n2 !== Ic.Z_STREAM_END); - return (o2 = n2 === Ic.Z_STREAM_END ? Ic.Z_FINISH : o2) === Ic.Z_FINISH ? (n2 = dc.inflateEnd(this.strm), this.onEnd(n2), this.ended = true, n2 === Ic.Z_OK) : o2 !== Ic.Z_SYNC_FLUSH || (this.onEnd(Ic.Z_OK), !(r2.avail_out = 0)); - }, Cc.prototype.onData = function(e2) { - this.chunks.push(e2); - }, Cc.prototype.onEnd = function(e2) { - e2 === Ic.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = ie.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg; - }; - var s = {}, Dc = ((0, ie.assign)(s, { Inflate: Cc, inflate: Tc, inflateRaw: function(e2, t2) { - return (t2 = t2 || {}).raw = true, Tc(e2, t2); - }, ungzip: Tc }, Ic), s), Ec = (e(Gc, [{ key: "inflate", value: function(e2) { - var t2, e2 = new Uint8Array(e2).slice(4), n2 = Date.now(); - try { - t2 = Dc.inflate(e2, { to: "string" }), this._bLogForInflateOK || (this._bLogForInflateOK = true, new G("inflateOK").end()); - } catch (e3) { - return this._bLogForInflateError ? void 0 : (this._bLogForInflateError = true, void new G("inflateError").setMessage(e3).end()); - } - var e2 = e2.length + 4, o2 = t2.length; - return M.d("inflate ok. zipped:".concat(e2, " unzipped:").concat(o2) + " compression ratio:".concat(Math.round(100 * (o2 - e2) / o2), "% cost:").concat(Date.now() - n2)), t2; - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._bLogForInflateOK = false, this._bLogForInflateError = false; - } }]), Gc), Lc = (e(Nc, [{ key: "_startTimer", value: function() { - var e2 = this._map.get(24), t2 = e2.isWorkerEnabled(); - M.l("".concat(this._n, ".startTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e2.startWorkerTimer() : this._startMainThreadTimer(); - } }, { key: "_startMainThreadTimer", value: function() { - this._checkTimer < 0 && (this._checkTimer = setInterval(this.onCheckTimer.bind(this), 1e3)), M.l("".concat(this._n, "._startMainThreadTimer seed:").concat(this._checkTimer)); - } }, { key: "stopTimer", value: function() { - var e2 = this._map.get(24), t2 = e2.isWorkerEnabled(); - M.l("".concat(this._n, ".stopTimer isWorkerEnabled:").concat(t2, " seed:").concat(this._checkTimer)), t2 ? e2.stopWorkerTimer() : this._stopMainThreadTimer(); - } }, { key: "_stopMainThreadTimer", value: function() { - M.l("".concat(this._n, "._stopMainThreadTimer")), 0 < this._checkTimer && (clearInterval(this._checkTimer), this._checkTimer = -1, this._checkCount = 0); - } }, { key: "_stopMainThreadSocket", value: function() { - M.l("".concat(this._n, "._stopMainThreadSocket")); - var e2 = this._map.get(21); - e2.setIsWorkerEnabled(true), e2.reConnect(); - } }, { key: "_startMainThreadSocket", value: function() { - M.l("".concat(this._n, "._startMainThreadSocket")); - var e2 = this._map.get(21); - e2.setIsWorkerEnabled(false), e2.reConnect(); - } }, { key: "onWorkerTimerEnabled", value: function() { - M.l("".concat(this._n, ".onWorkerTimerEnabled, disable main thread timer and socket")), this._stopMainThreadTimer(), this._stopMainThreadSocket(); - } }, { key: "onWorkerTimerDisabled", value: function() { - M.l("".concat(this._n, ".onWorkerTimerDisabled, enable main thread timer and socket")), this._startMainThreadTimer(), this._startMainThreadSocket(); - } }, { key: "onCheckTimer", value: function() { - this._checkCount += 1; - var e2, t2 = Z(this._map); - try { - for (t2.s(); !(e2 = t2.n()).done; ) { - var n2 = Y(e2.value, 2)[1]; - n2.onCheckTimer && n2.onCheckTimer(this._checkCount); - } - } catch (e3) { - t2.e(e3); - } finally { - t2.f(); - } - } }, { key: "_initReadyList", value: function() { - var t2 = this; - this._readyList = [this._map.get(1)], this._readyList.forEach(function(e2) { - e2.ready(function() { - return t2._onModuleReady(); - }); - }); - } }, { key: "_onModuleReady", value: function() { - var e2, t2, n2 = true; - this._readyList.forEach(function(e3) { - e3.isReady() || (n2 = false); - }), n2 && !this._isReady && (this._isReady = true, this._oEmitter.emit(h.SDK_READY), e2 = Date.now() - this._startLoginTs, M.w("SDK is ready. cost ".concat(e2, " ms")), this._startLoginTs = Date.now(), t2 = this._ssoLogForReady.getStartTs() + Ye, this._ssoLogForReady.setMessage(e2).start(t2).end()); - } }, { key: "login", value: function() { - 0 === this._startLoginTs && (He(), this._startLoginTs = Date.now(), this._startTimer(), this._map.get(15).start(), this._ssoLogForReady = new G("sdkReady"), this._reason = L.LOGGING_IN); - } }, { key: "onLoginFailed", value: function() { - this._startLoginTs = 0; - } }, { key: "getOEmitInst", value: function() { - return null === this._oEmitter && (this._oEmitter = new Ia(), e2 = this._oEmitter, qn = e2, this._oEmitter._emit = this._oEmitter.emit, this._oEmitter.emit = (function(e3, t2) { - var n2, o2, i2 = this; - this._canIUseSignaling() && (e3 === h.MESSAGE_RECEIVED && this.get(33).onNewMessageList(t2), e3 === h.MESSAGE_MODIFIED) && this.get(33).onMessageModified(t2), e3 === h.CONVERSATION_LIST_UPDATED || e3 === h.FRIEND_LIST_UPDATED || e3 === h.GROUP_LIST_UPDATED || e3 === h.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED ? false !== this._eventThrottling ? this._eventThrottleMap.has(e3) ? (n2 = Date.now()) - (o2 = this._eventThrottleMap.get(e3)).last <= 1e3 ? (o2.timeoutID && clearTimeout(o2.timeoutID), o2.timeoutID = setTimeout(function() { - o2.last = Date.now(), i2._oEmitter._emit.apply(i2._oEmitter, [e3, { name: e3, data: i2._getEventData(e3) }]); - }, 1e3)) : (o2.last = n2, this._oEmitter._emit.apply(this._oEmitter, [e3, { name: e3, data: this._getEventData(e3) }])) : (this._eventThrottleMap.set(e3, { last: Date.now(), timeoutID: -1 }), this._oEmitter._emit.apply(this._oEmitter, [e3, { name: e3, data: this._getEventData(e3) }])) : this._oEmitter._emit.apply(this._oEmitter, [e3, { name: e3, data: this._getEventData(e3) }]) : this._oEmitter._emit.apply(this._oEmitter, [e3, { name: e3, data: t2 }]); - }).bind(this)), this._oEmitter; - var e2; - } }, { key: "_canIUseSignaling", value: function() { - var e2 = this.get(33); - return !!e2 && e2.canIUseSignaling(); - } }, { key: "_getEventData", value: function(e2) { - return e2 === h.CONVERSATION_LIST_UPDATED ? this._map.get(12).isPartialUpdatedConvs() ? this._map.get(11).getPartialUpdatedConvs() : this._map.get(11).getLocalConvList() : e2 === h.FRIEND_LIST_UPDATED ? this._map.get(8).getLocalFriendList(false) : e2 === h.GROUP_LIST_UPDATED ? this._map.get(7).getLocalGroupList() : e2 === h.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED ? this._map.get(11).getTotalUnreadCount() : e2 === h.CONVERSATION_ID_LIST_UPDATED ? this._map.get(11).getUpdatedConvIDList() : void 0; - } }, { key: "getIEmitInst", value: function() { - return null === this._iEmitter && (this._iEmitter = new Ia(), this._iEmitter._emit = this._iEmitter.emit, this._iEmitter.emit = (function(e2, t2) { - e2 = f(t2) && t2.data ? [e2, { name: e2, data: t2.data }] : [e2, { name: e2, data: t2 }]; - this._iEmitter._emit.apply(this._iEmitter, e2); - }).bind(this)), this._iEmitter; - } }, { key: "hasModule", value: function(e2) { - return this._map.has(e2); - } }, { key: "get", value: function(e2) { - return this._map.get(e2); - } }, { key: "canIUseModule", value: function(e2) { - return !this._map.get(12).isUsingChatCore() || this._optionalModuleMap.has(e2); - } }, { key: "canIUseInflate", value: function() { - return !!this._map.get(37); - } }, { key: "isReady", value: function() { - return this._isReady; - } }, { key: "isIntl", value: function() { - return this.get(12).isIntl(); - } }, { key: "getNotReadyReason", value: function() { - return this._reason; - } }, { key: "setNotReadyReason", value: function(e2) { - this._reason = e2; - } }, { key: "getErrMsg", value: function(e2, t2, n2) { - return this._map.get(32).get({ key: e2, replacement1: t2, replacement2: n2, isIntl: this.isIntl() }); - } }, { key: "warn", value: function(e2, t2, n2) { - e2 = this.getErrMsg(e2, t2, n2); - e2 && M.w(e2); - } }, { key: "onError", value: function(e2) { - var t2 = "code:".concat(e2.code, " message:").concat(e2.message); - M.w("Oops! ".concat(t2)), new G("error").setMessage(t2).setLevel("error").end(), this.getOEmitInst().emit(h.ERROR, e2); - } }, { key: "restartTimer", value: function() { - M.l("".concat(this._n, ".restartTimer")), this.stopTimer(), this._startTimer(); - var e2 = this.get(7); - e2 && e2.restartPolling(); - } }, { key: "getTimerID", value: function() { - var e2 = this._map.get(24); - return e2.isWorkerEnabled() ? e2.getTimerID() : this._checkTimer; - } }, { key: "getPollingTimerID", value: function(e2) { - return this._map.get(7).getPollingTimerID(e2); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), He(); - var e2, t2 = Z(this._map); - try { - for (t2.s(); !(e2 = t2.n()).done; ) { - var n2 = Y(e2.value, 2)[1]; - n2.reset && n2.reset(); - } - } catch (e3) { - t2.e(e3); - } finally { - t2.f(); - } - this._startLoginTs = 0, this._initReadyList(), this._isReady = false, this.stopTimer(), this._oEmitter.emit(h.SDK_NOT_READY); - var o2, i2 = Z(this._eventThrottleMap); - try { - for (i2.s(); !(o2 = i2.n()).done; ) { - var a2 = Y(o2.value, 2)[1]; - a2.timeoutID && clearTimeout(a2.timeoutID); - } - } catch (e3) { - i2.e(e3); - } finally { - i2.f(); - } - this._eventThrottleMap.clear(); - } }]), Nc), Sc = (e(Oc, [{ key: "defense", value: function(e2, t2) { - var n2 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0; - if ("string" != typeof e2) - return null; - if (0 === e2.length) - return null; - if ("function" != typeof t2) - return null; - if (this._funcMap.has(e2) && this._funcMap.get(e2).has(t2)) - return this._funcMap.get(e2).get(t2); - this._funcMap.has(e2) || this._funcMap.set(e2, /* @__PURE__ */ new Map()); - var o2 = null; - return this._funcMap.get(e2).has(t2) ? o2 = this._funcMap.get(e2).get(t2) : (o2 = this._pack(e2, t2, n2), this._funcMap.get(e2).set(t2, o2)), o2; - } }, { key: "defenseOnce", value: function(e2, t2) { - return "function" != typeof t2 ? null : this._pack(e2, t2, 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0); - } }, { key: "find", value: function(e2, t2) { - return "string" != typeof e2 || 0 === e2.length || "function" != typeof t2 ? null : this._funcMap.has(e2) && this._funcMap.get(e2).has(t2) ? this._funcMap.get(e2).get(t2) : (this._m.warn("ListenerFnNotFound", e2), null); - } }, { key: "delete", value: function(e2, t2) { - return "function" == typeof t2 && !!this._funcMap.has(e2) && !!this._funcMap.get(e2).has(t2) && (this._funcMap.get(e2).delete(t2), 0 === this._funcMap.get(e2).size && this._funcMap.delete(e2), true); - } }, { key: "_pack", value: function(o2, e2, i2) { - var a2 = this; - return function() { - try { - e2.apply(i2, Array.from(arguments)); - } catch (e3) { - var t2 = Object.values(h).indexOf(o2), n2 = "CallbackError"; - -1 !== t2 && (t2 = Object.keys(h)[t2], a2._m.warn(n2, t2, e3)), a2._reportCount < 5 && (new G(n2).setMessage("eventName:".concat(o2)).setMoreMessage(e3.message).end(), a2._reportCount += 1); - } - }; - } }, { key: "destroy", value: function() { - this._funcMap.clear(); - } }, { key: "reset", value: function() { - M.l("".concat(this._n, ".reset")), this._reportCount = 0; - } }]), Oc), kc = (e(Rc, [{ key: "onError", value: function(e2) { - this._m.onError(e2); - } }, { key: "login", value: function(e2) { - return this._m.login(), this._get(1).login(e2); - } }, { key: "logout", value: function() { - var t2 = this; - return this._get(1).logout().then(function(e2) { - return t2._safetyCallbackFactory.reset(), t2._m.reset(), e2; - }); - } }, { key: "getLoginUser", value: function() { - return this._get(1).getLoginUser(); - } }, { key: "getServerTime", value: function() { - return We(); - } }, { key: "isReady", value: function() { - return this._m.isReady(); - } }, { key: "isIntl", value: function() { - return this._m.isIntl(); - } }, { key: "getNotReadyReason", value: function() { - return this._m.getNotReadyReason(); - } }, { key: "getErrMsg", value: function(e2, t2, n2) { - return this._m.getErrMsg(e2, t2, n2); - } }, { key: "_get", value: function(e2) { - return this._m.get(e2); - } }, { key: "destroy", value: function() { - var e2 = this, t2 = this._get(12), n2 = t2.getSDKAppID(); - return M.w("destroy ".concat(n2, " ").concat(t2.getInstanceID())), this.logout().finally(function() { - e2._safetyCallbackFactory.destroy(), e2._m.stopTimer(), e2._get(24).terminate(), e2._get(21).dealloc(), e2._m.getOEmitInst().emit(h.SDK_DESTROY, { SDKAppID: n2 }); - }); - } }, { key: "on", value: function(e2, t2, n2) { - M.d("on", "eventName:".concat(e2)), this._m.getOEmitInst().on(e2, this._safetyCallbackFactory.defense(e2, t2, n2), n2); - } }, { key: "once", value: function(e2, t2, n2) { - M.d("once", "eventName:".concat(e2)), this._m.getOEmitInst().once(e2, this._safetyCallbackFactory.defenseOnce(e2, t2, n2), n2 || this); - } }, { key: "off", value: function(e2, t2, n2, o2) { - M.d("off", "eventName:".concat(e2)); - var i2 = this._safetyCallbackFactory.find(e2, t2); - null !== i2 && (this._m.getOEmitInst().off(e2, i2, n2, o2), this._safetyCallbackFactory.delete(e2, t2)); - } }, { key: "registerPlugin", value: function(e2) { - (N(e2["tim-push"]) ? N(e2["tim-offline-push-plugin"]) ? this._get(18) : this._get(28) : this._get(36)).registerPlugin(e2); - } }, { key: "setLogLevel", value: function(e2) { - var t2; - e2 <= 0 && ((t2 = this.getErrMsg("TIM_ASCII_ART")) && console.log(t2), (t2 = this.getErrMsg("API_REFER")) && (Qt() ? console.log("%c ".concat("IM SDK API ->", " %c"), "background:#ff9d00; padding:1px; border-radius:3px; color: #fff", "background:transparent", t2) : console.log("IM SDK API ->", t2)), (t2 = this.getErrMsg("DOCS_GUIDE")) && console.log(t2), t2 = this.getErrMsg("IOS_WEBVIEW_WARNING"), be) && t2 && console.warn(t2), M.setLevel(e2); - } }, { key: "createTextMessage", value: function(e2) { - return this._get(2).createTextMessage(e2); - } }, { key: "createTextAtMessage", value: function(e2) { - return this._get(2).createTextMessage(e2); - } }, { key: "createImageMessage", value: function(e2) { - return this._get(2).createImageMessage(e2); - } }, { key: "createAudioMessage", value: function(e2) { - return this._get(2).createAudioMessage(e2); - } }, { key: "createVideoMessage", value: function(e2) { - return this._get(2).createVideoMessage(e2); - } }, { key: "createCustomMessage", value: function(e2) { - return this._get(2).createCustomMessage(e2); - } }, { key: "createFaceMessage", value: function(e2) { - return this._get(2).createFaceMessage(e2); - } }, { key: "createFileMessage", value: function(e2) { - return this._get(2).createFileMessage(e2); - } }, { key: "createLocationMessage", value: function(e2) { - return this._get(2).createLocationMessage(e2); - } }, { key: "createMergerMessage", value: function(e2) { - return this._get(2).createMergerMessage(e2); - } }, { key: "downloadMergerMessage", value: function(e2) { - return e2.type !== A.MSG_MERGER ? D({ code: L.MSG_MERGER_TYPE_INVALID }) : S(e2.payload.downloadKey) ? D({ code: L.MSG_MERGER_KEY_INVALID }) : this._get(2).downloadMergerMessage(e2).catch(function(e3) { - return D({ code: L.MSG_MERGER_DOWNLOAD_FAIL }); - }); - } }, { key: "createForwardMessage", value: function(e2) { - return this._get(2).createForwardMessage(e2); - } }, { key: "sendMessage", value: function(e2, t2) { - return e2 instanceof Do ? this._get(2).sendMessageInstance(e2, t2) : D({ code: L.MSG_INSTANCE_REQUIRED }); - } }, { key: "searchCloudMessages", value: function(e2) { - return this._get(2).searchCloudMessages(e2); - } }, { key: "callExperimentalAPI", value: function(e2, t2) { - return "sendComboMessage" === e2 ? this._get(31).sendMessage(t2) : "handleGroupInvitation" === e2 ? this._get(7).handleGroupInvitation(t2) : "isCommercialAbilityEnabled" === e2 ? this._get(27).isFeatureEnabled(t2) : "isFeatureEnabledForStat" === e2 ? this._get(27).isFeatureEnabledForStat(t2) : "isIntl" === e2 ? this.isIntl() : "sendTRTCCustomData" === e2 || "sendRoomCustomData" === e2 ? this._get(30).sendTRTCCustomData(t2) : "getTimerID" === e2 ? this._m.getTimerID() : "getPollingTimerID" === e2 ? this._m.getPollingTimerID(t2) : "setApplicationID" === e2 ? (this._get(12).setApplicationID(t2), void this._get(20).updateProtocolConfig()) : "getServerConfig" === e2 ? this._get(23).getServerConfig(t2) : "canIUseModule" === e2 ? this._m.canIUseModule(t2) : "startMessageLongPolling" === e2 ? this._get(7).startMessageLongPolling(t2) : "stopMessageLongPolling" === e2 ? this._get(7).stopMessageLongPolling(t2) : "disableMessagePullOnInvite" === e2 ? this._get(11).disableMsgPullOnInvite(t2) : "clearLocalMessage" === e2 ? this._get(11).clearMemMsg(t2, false) : "setCustomLoginInfo" === e2 ? this._get(12).setCustomLoginInfo(t2) : D({ code: L.INVALID_OPERATION }); - } }, { key: "revokeMessage", value: function(e2) { - return this._get(2).revokeMessage(e2); - } }, { key: "resendMessage", value: function(e2, t2) { - return e2 instanceof Do ? this._get(2).resendMessage(e2, t2) : D({ code: L.MSG_INSTANCE_REQUIRED }); - } }, { key: "deleteMessage", value: function(e2) { - return this._get(2).deleteMessage(e2); - } }, { key: "translateText", value: function(e2) { - return this._get(2).translateText(e2); - } }, { key: "convertVoiceToText", value: function(e2) { - return this._get(2).convertVoiceToText(e2); - } }, { key: "setMessageExtensions", value: function(e2, t2) { - return this._get(3).setMessageExtensions(e2, t2); - } }, { key: "getMessageExtensions", value: function(e2) { - return this._get(3).getMessageExtensions(e2); - } }, { key: "deleteMessageExtensions", value: function(e2, t2) { - return this._get(3).deleteMessageExtensions(e2, t2); - } }, { key: "addMessageReaction", value: function(e2, t2) { - return this._get(34).addMessageReaction(e2, t2); - } }, { key: "removeMessageReaction", value: function(e2, t2) { - return this._get(34).removeMessageReaction(e2, t2); - } }, { key: "getMessageReactions", value: function(e2) { - return this._get(34).getMessageReactions(e2); - } }, { key: "getAllUserListOfMessageReaction", value: function(e2) { - return this._get(34).getAllUserListOfMessageReaction(e2); - } }, { key: "modifyMessage", value: function(e2) { - return this._get(2).modifyRemoteMessage(e2); - } }, { key: "getMessageList", value: function(e2) { - return this._get(11).getMessageList(e2); - } }, { key: "getMessageListHopping", value: function(e2) { - return this._get(11).getMessageListHopping(e2); - } }, { key: "sendMessageReadReceipt", value: function(e2) { - return this._get(11).sendReadReceipt(e2); - } }, { key: "getMessageReadReceiptList", value: function(e2) { - return this._get(11).getReadReceiptList(e2); - } }, { key: "getGroupMessageReadMemberList", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getReadReceiptDetail(e2) : D({ code: L.NO_MODULE }); - } }, { key: "findMessage", value: function(e2) { - return this._get(11).findMessage(e2); - } }, { key: "setMessageRead", value: function(e2) { - return this._get(11).setMessageRead(e2); - } }, { key: "getConversationList", value: function(e2) { - return this._get(11).getConvList(e2); - } }, { key: "getConversationProfile", value: function(e2) { - return this._get(11).getConversationProfile(e2); - } }, { key: "deleteConversation", value: function(e2) { - return this._get(11).deleteConversation(e2); - } }, { key: "setConversationDraft", value: function(e2) { - return this._get(11).setConvDraft(e2); - } }, { key: "clearHistoryMessage", value: function(e2) { - return this._get(11).clearHistoryMessage(e2); - } }, { key: "pinConversation", value: function(e2) { - return this._get(11).pinConversation(e2); - } }, { key: "setAllMessageRead", value: function(e2) { - return this._get(11).setAllMessageRead(e2); - } }, { key: "setMessageRemindType", value: function(e2) { - return this._get(11).setMessageRemindType(e2); - } }, { key: "setAllReceiveMessageOpt", value: function(e2) { - return this._get(11).setAllRcvMsgOpt(e2); - } }, { key: "getAllReceiveMessageOpt", value: function() { - return this._get(11).getAllRcvMsgOpt(); - } }, { key: "getTotalUnreadMessageCount", value: function() { - return this._get(11).getTotalUnreadCount(); - } }, { key: "setConversationCustomData", value: function(e2) { - return this._get(11).setConvCustomData(e2); - } }, { key: "markConversation", value: function(e2) { - return this._get(11).markConv(e2); - } }, { key: "getConversationGroupList", value: function() { - return this._get(11).getConvGroupList(); - } }, { key: "createConversationGroup", value: function(e2) { - return this._get(11).createConvGroup(e2); - } }, { key: "deleteConversationGroup", value: function(e2) { - return this._get(11).deleteConvGroup(e2); - } }, { key: "renameConversationGroup", value: function(e2) { - return this._get(11).renameConvGroup(e2); - } }, { key: "addConversationsToGroup", value: function(e2) { - return this._get(11).addConvsToGroup(e2); - } }, { key: "deleteConversationsFromGroup", value: function(e2) { - return this._get(11).deleteConvsFromGroup(e2); - } }, { key: "getMyProfile", value: function() { - return this._get(4).getMyProfile(); - } }, { key: "getUserProfile", value: function(e2) { - return this._get(4).getUserProfile(e2); - } }, { key: "updateMyProfile", value: function(e2) { - return this._get(4).updateMyProfile(e2); - } }, { key: "getBlacklist", value: function() { - return this._get(4).getLocalBlacklist(); - } }, { key: "addToBlacklist", value: function(e2) { - return this._get(4).addBlacklist(e2); - } }, { key: "removeFromBlacklist", value: function(e2) { - return this._get(4).deleteBlacklist(e2); - } }, { key: "setSelfStatus", value: function(e2) { - return this._get(4).setSelfStatus(e2); - } }, { key: "getUserStatus", value: function(e2) { - return this._get(4).getUserStatus(e2); - } }, { key: "subscribeUserStatus", value: function(e2) { - return this._get(4).subscribeUserStatus(e2); - } }, { key: "unsubscribeUserStatus", value: function(e2) { - return this._get(4).unsubscribeUserStatus(e2); - } }, { key: "getFriendList", value: function() { - var e2 = this._get(8); - return e2 ? e2.getLocalFriendList() : D({ code: L.NO_MODULE }); - } }, { key: "addFriend", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.addFriend(e2) : D({ code: L.NO_MODULE }); - } }, { key: "deleteFriend", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.deleteFriend(e2) : D({ code: L.NO_MODULE }); - } }, { key: "checkFriend", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.checkFriend(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getFriendProfile", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.getFriendProfile(e2) : D({ code: L.NO_MODULE }); - } }, { key: "updateFriend", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.updateFriend(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getFriendApplicationList", value: function() { - var e2 = this._get(8); - return e2 ? e2.getLocalFriendApplicationList() : D({ code: L.NO_MODULE }); - } }, { key: "acceptFriendApplication", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.acceptFriendApplication(e2) : D({ code: L.NO_MODULE }); - } }, { key: "refuseFriendApplication", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.refuseFriendApplication(e2) : D({ code: L.NO_MODULE }); - } }, { key: "deleteFriendApplication", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.deleteFriendApplication(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setFriendApplicationRead", value: function() { - var e2 = this._get(8); - return e2 ? e2.setFriendApplicationRead() : D({ code: L.NO_MODULE }); - } }, { key: "getFriendGroupList", value: function() { - var e2 = this._get(8); - return e2 ? e2.getLocalFriendGroupList() : D({ code: L.NO_MODULE }); - } }, { key: "createFriendGroup", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.createFriendGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "deleteFriendGroup", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.deleteFriendGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "addToFriendGroup", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.addToFriendGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "removeFromFriendGroup", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.removeFromFriendGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "renameFriendGroup", value: function(e2) { - var t2 = this._get(8); - return t2 ? t2.renameFriendGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "followUser", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.followUser(e2) : D({ code: L.NO_MODULE }); - } }, { key: "unfollowUser", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.unfollowUser(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getMyFollowersList", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.getMyFollowersList(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getMyFollowingList", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.getMyFollowingList(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getMutualFollowersList", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.getMutualFollowersList(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getUserFollowInfo", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.getUserFollowInfo(e2) : D({ code: L.NO_MODULE }); - } }, { key: "checkFollowType", value: function(e2) { - var t2 = this._get(35); - return t2 ? t2.checkFollowType(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupList", value: function() { - var e2 = this._get(7); - return e2 ? e2.getGroupList() : D({ code: L.NO_MODULE }); - } }, { key: "getGroupProfile", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getGroupProfile(e2) : D({ code: L.NO_MODULE }); - } }, { key: "createGroup", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.createGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "dismissGroup", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.dismissGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "updateGroupProfile", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.updateGroupProfile(e2) : D({ code: L.NO_MODULE }); - } }, { key: "joinGroup", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.joinGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "quitGroup", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.quitGroup(e2) : D({ code: L.NO_MODULE }); - } }, { key: "searchGroupByID", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.searchGroupByID(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupOnlineMemberCount", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getGroupOnlineMemberCount(e2) : D({ code: L.NO_MODULE }); - } }, { key: "changeGroupOwner", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.changeGroupOwner(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupApplicationList", value: function() { - var e2 = this._get(7); - return e2 ? e2.getGroupApplicationList() : D({ code: L.NO_MODULE }); - } }, { key: "handleGroupApplication", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.handleGroupApplication(e2) : D({ code: L.NO_MODULE }); - } }, { key: "initGroupAttributes", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.initGroupAttributes(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setGroupAttributes", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.setGroupAttributes(e2) : D({ code: L.NO_MODULE }); - } }, { key: "deleteGroupAttributes", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.deleteGroupAttributes(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupAttributes", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getGroupAttributes(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setGroupCounters", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.setGroupCounters(e2) : D({ code: L.NO_MODULE }); - } }, { key: "increaseGroupCounter", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.increaseGroupCounter(e2) : D({ code: L.NO_MODULE }); - } }, { key: "decreaseGroupCounter", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.decreaseGroupCounter(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupCounters", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getGroupCounters(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupMemberList", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getGroupMemberList(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getGroupMemberProfile", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.getGroupMemberProfile(e2) : D({ code: L.NO_MODULE }); - } }, { key: "addGroupMember", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.addGroupMember(e2) : D({ code: L.NO_MODULE }); - } }, { key: "deleteGroupMember", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.deleteGroupMember(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setGroupMemberMuteTime", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.setGroupMemberMuteTime(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setGroupMemberRole", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.setGroupMemberRole(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setGroupMemberNameCard", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.setGroupMemberNameCard(e2) : D({ code: L.NO_MODULE }); - } }, { key: "setGroupMemberCustomField", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.setGroupMemberCustomField(e2) : D({ code: L.NO_MODULE }); - } }, { key: "markGroupMemberList", value: function(e2) { - var t2 = this._get(7); - return t2 ? t2.markGroupMemberList(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getJoinedCommunityList", value: function() { - return this._get(10).getJoinedCommunityList(); - } }, { key: "createTopicInCommunity", value: function(e2) { - return this._get(10).createTopicInCommunity(e2); - } }, { key: "deleteTopicFromCommunity", value: function(e2) { - return this._get(10).deleteTopicFromCommunity(e2); - } }, { key: "updateTopicProfile", value: function(e2) { - return this._get(10).updateTopicProfile(e2); - } }, { key: "getTopicList", value: function(e2) { - return this._get(10).getTopicList(e2); - } }, { key: "addSignalingListener", value: function(e2, t2, n2) { - var o2 = this._get(33); - o2 && o2.addSignalingListener(e2, this._safetyCallbackFactory.defense(e2, t2, n2), n2); - } }, { key: "removeSignalingListener", value: function(e2, t2, n2) { - var o2, i2 = this._safetyCallbackFactory.find(e2, t2); - null !== i2 && (o2 = this._get(33)) && (o2.removeSignalingListener(e2, i2, n2), this._safetyCallbackFactory.delete(e2, t2)); - } }, { key: "invite", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.invite(e2) : D({ code: L.NO_MODULE }); - } }, { key: "inviteSync", value: function(e2, t2, n2) { - var o2 = this._get(33); - return o2 ? o2.inviteSync(e2, t2, n2) : ""; - } }, { key: "inviteInGroup", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.invite(e2) : D({ code: L.NO_MODULE }); - } }, { key: "inviteInGroupSync", value: function(e2, t2, n2) { - var o2 = this._get(33); - return o2 ? o2.inviteSync(e2, t2, n2) : ""; - } }, { key: "cancel", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.cancel(e2) : D({ code: L.NO_MODULE }); - } }, { key: "accept", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.accept(e2) : D({ code: L.NO_MODULE }); - } }, { key: "reject", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.reject(e2) : D({ code: L.NO_MODULE }); - } }, { key: "getSignalingInfo", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.getSignalingInfo(e2) : null; - } }, { key: "modifyInvitation", value: function(e2) { - var t2 = this._get(33); - return t2 ? t2.modifyInvitation(e2) : D({ code: L.NO_MODULE }); - } }]), Rc), Ac = { login: 1, logout: 1, getLoginUser: 1, destroy: 1, on: 1, off: 1, ready: 1, setLogLevel: 1, joinGroup: 1, quitGroup: 1, registerPlugin: 1, getGroupOnlineMemberCount: 1, isReady: 1, addSignalingListener: 1, removeSignalingListener: 1, callExperimentalAPI: 1 }; - function Rc(e2) { - d(this, Rc); - e2 = { SDKAppID: e2.SDKAppID, unlimitedAVChatRoom: e2.unlimitedAVChatRoom || false, scene: e2.scene || "", oversea: e2.oversea || false, instanceID: qt(), devMode: e2.devMode || false, testEnv: e2.testEnv || false, proxyServer: e2.proxyServer || void 0, fileUploadProxy: e2.fileUploadProxy || void 0, fileDownloadProxy: e2.fileDownloadProxy || e2.fileUploadProxy || void 0, eventThrottling: false !== e2.eventThrottling, partialUpdatedConversations: true === e2.partialUpdatedConversations, modules: e2.modules || void 0 }; - this._m = new Lc(e2), this._safetyCallbackFactory = new Sc(this._m); - } - function Oc(e2) { - d(this, Oc), this._funcMap = /* @__PURE__ */ new Map(), this._m = e2, this._n = "SafetyCallback", this._reportCount = 0; - } - function Nc(t2) { - var n2 = this; - d(this, Nc); - var o2, e2 = new G("sdkConstruct"), i2 = (this._n = "ModuleManager", this._isReady = false, this._reason = L.USER_NOT_LOGGED_IN, this._startLoginTs = 0, this._map = /* @__PURE__ */ new Map(), this._optionalModuleMap = /* @__PURE__ */ new Map(), this._iEmitter = null, this._oEmitter = null, this._checkCount = 0, this._checkTimer = -1, this._map.set(12, new Ri(this, t2)), this._map.set(37, new Ec(this)), this._map.set(15, new pa(this)), this._map.set(27, new ir(this)), this._map.set(23, new Hs(this)), this._map.set(24, new nr(this)), this._map.set(26, new Js(this)), this._map.set(21, new ds(this)), this._map.set(20, new Vs(this)), this._map.set(1, new Ni(this)), this._map.set(2, new wa(this)), this._map.set(3, new Fa(this)), this._map.set(34, new qa(this)), this._map.set(31, new xa(this)), this._map.set(4, new Ai(this)), this._map.set(6, new qo(this)), this._map.set(11, new ci(this)), this._map.set(7, new yi(this)), this._map.set(10, new Di(this)), this._map.set(13, new ra(this)), this._map.set(32, new ur(this)), this._map.set(14, new ua(this)), this._map.set(17, new Ca(this)), this._map.set(18, new Va(this)), this._map.set(19, new Ha(this)), this._map.set(25, new Bs(this)), this._map.set(8, new tr(this)), this._map.set(28, new ar(this)), this._map.set(36, new sr(this)), this._map.set(29, new rr(this)), this._map.set(30, new cr(this)), this._map.set(33, new fr(this)), this._map.set(35, new Ir(this)), this._eventThrottleMap = /* @__PURE__ */ new Map(), this._eventThrottling = t2.eventThrottling, this._map.get(12).isPartialUpdatedConvs() && (this._eventThrottling = false), f(t2.modules) ? (Object.keys(t2.modules).forEach(function(e3) { - o2 = t2.modules[e3], "group-module" === e3 ? n2._map.set(7, new o2(n2)) : "relationship-module" === e3 ? n2._map.set(8, new o2(n2)) : "signaling-module" === e3 ? n2._map.set(33, new o2(n2)) : "follow-module" === e3 && n2._map.set(35, new o2(n2)), n2._optionalModuleMap.set(e3, 1); - }), this._map.get(12).setUsingChatCore(true)) : this._map.has(7) || this._map.get(12).setUsingChatCore(true), t2.instanceID), a2 = t2.SDKAppID, s2 = this._map.get(12).isIntl(), r2 = this._map.get(12).isUsingChatCore(), i2 = "instanceID:".concat(i2, " SDKAppID:").concat(a2, " isIntl:").concat(s2, " isUsingChatCore:").concat(r2, " host:").concat(xt()) + " isIOSWebView:".concat(be, " platform:").concat(De, " canIUseInflate:").concat(this.canIUseInflate()) + " workerAvailable:".concat(Ge, " eventThrottling:").concat(this._eventThrottling, " UserAgent:").concat(Te); - G.bindEventStatModule(this._map.get(14)), G.bindNetMonitorModule(this._map.get(15)), e2.setMessage("".concat(i2, " ").concat(function() { - var t3 = ""; - if (v) - try { - var e3 = I.getSystemInfoSync(), n3 = e3.model, o3 = e3.version, i3 = e3.system, a3 = e3.platform, s3 = e3.SDKVersion, t3 = "model:".concat(n3, " version:").concat(o3, " system:").concat(i3, " platform:").concat(a3, " SDKVersion:").concat(s3); - } catch (e4) { - t3 = ""; - } - return t3; - }())).end(), M.i("SDK ".concat(i2)), E.prototype._getErrMsg = this.getErrMsg.bind(this), this._readyList = void 0, this._ssoLogForReady = null, this._initReadyList(); - } - function Gc(e2) { - d(this, Gc), this._m = e2, this._n = "InflateModule", this._bLogForInflateOK = false, this._bLogForInflateError = false; - } - var Pc = {}, o = {}; - return o.create = function(e2) { - var t2 = "TencentCloudChat.create", n2 = 0, o2 = e2.SDKAppID; - if (R(o2)) - n2 = o2; - else if (n2 = parseInt(o2), isNaN(o2)) - return M.e("".concat(t2, " failed. Failed to parse the SDKAppID, please check the arguments")), null; - if (n2 && Pc[n2]) - return Pc[n2]; - M.l("".concat(t2)); - var s2, i2, o2 = new kc(y(y({}, e2), {}, { SDKAppID: n2 })), e2 = (o2.on(h.SDK_DESTROY, function(e3) { - Pc[e3.data.SDKAppID] = null, delete Pc[e3.data.SDKAppID]; - }), s2 = o2, i2 = /* @__PURE__ */ Object.create(null), Object.keys(Fn).forEach(function(a2) { - var t3; - s2[a2] && (t3 = new $(), i2[a2] = function() { - var e3 = Array.from(arguments); - return t3.use(function(e4, t4) { - i3 = a2; - var n3, o3, i3 = !(!(n3 = s2).isReady() && 1 !== Ac[i3]) || (o3 = { code: o3 = n3.getNotReadyReason(), message: "".concat(n3.getErrMsg(o3), " | ").concat(i3, " | ").concat(n3.getErrMsg(L.SDK_IS_NOT_READY)) }, n3.onError(o3), o3); - return true === i3 ? t4() : D(i3); - }).use(function(e4, t4) { - if (true === function(n3, o3, i3) { - if (void 0 === o3) - return true; - var a3 = true; - if (f(o3)) - Object.keys(o3).forEach(function(e6) { - var t5 = 1 === n3.length ? n3[0][e6] : void 0; - a3 = !!an(t5, o3[e6], i3, e6) && a3; - }); - else if (O(o3)) - for (var e5 = 0; e5 < o3.length; e5++) - a3 = !!an(n3[e5], o3[e5], i3, o3[e5].name) && a3; - if (a3) - return a3; - throw new Error("Params validate failed."); - }(e4, wn[a2], a2)) - return t4(); - }).use(function(e4, t4) { - return s2[a2].apply(s2, e4); - }), t3.run(e3); - }); - }), i2); - return Pc[n2] = e2, wn.hookGetAPITips(o2.getErrMsg.bind(o2)), M.l("".concat(t2, " ok")), e2; - }, o.TYPES = A, o.EVENT = h, o.TSignaling = Q, o.VERSION = "3.4.7", M.l("TencentCloudChat.VERSION:".concat(o.VERSION)), o; - }); - } -}); -export default require_chat(); -//# sourceMappingURL=@tencentcloud_chat.js.map diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js.map b/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js.map deleted file mode 100644 index 760e482a..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../../node_modules/@tencentcloud/chat/index.js"], - "sourcesContent": ["\"use strict\";!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).TencentCloudChat=t()}(this,function(){function U(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function y(t){for(var e=1;ee.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var h={SDK_READY:\"sdkStateReady\",SDK_NOT_READY:\"sdkStateNotReady\",SDK_DESTROY:\"sdkDestroy\",MESSAGE_RECEIVED:\"onMessageReceived\",ROOM_CUSTOM_DATA_RECEIVED:\"onRoomCustomDataReceived\",MESSAGE_MODIFIED:\"onMessageModified\",MESSAGE_REVOKED:\"onMessageRevoked\",MESSAGE_READ_BY_PEER:\"onMessageReadByPeer\",MESSAGE_READ_RECEIPT_RECEIVED:\"onMessageReadReceiptReceived\",MESSAGE_EXTENSIONS_UPDATED:\"onMessageExtensionsUpdated\",MESSAGE_EXTENSIONS_DELETED:\"onMessageExtensionsDeleted\",MESSAGE_REACTIONS_UPDATED:\"onMessageReactionsUpdated\",CONVERSATION_LIST_UPDATED:\"onConversationListUpdated\",TOTAL_UNREAD_MESSAGE_COUNT_UPDATED:\"onTotalUnreadMessageCountUpdated\",CONVERSATION_GROUP_LIST_UPDATED:\"onConversationGroupListUpdated\",CONVERSATION_IN_GROUP_UPDATED:\"onConversationInGroupUpdated\",GROUP_LIST_UPDATED:\"onGroupListUpdated\",GROUP_ATTRIBUTES_UPDATED:\"groupAttributesUpdated\",GROUP_COUNTER_UPDATED:\"onGroupCounterUpdated\",TOPIC_CREATED:\"onTopicCreated\",TOPIC_DELETED:\"onTopicDeleted\",TOPIC_UPDATED:\"onTopicUpdated\",PROFILE_UPDATED:\"onProfileUpdated\",USER_STATUS_UPDATED:\"onUserStatusUpdated\",BLACKLIST_UPDATED:\"blacklistUpdated\",FRIEND_LIST_UPDATED:\"onFriendListUpdated\",FRIEND_GROUP_LIST_UPDATED:\"onFriendGroupListUpdated\",FRIEND_APPLICATION_LIST_UPDATED:\"onFriendApplicationListUpdated\",MY_FOLLOWERS_LIST_UPDATED:\"onMyFollowersListUpdated\",MY_FOLLOWING_LIST_UPDATED:\"onMyFollowingListUpdated\",MUTUAL_FOLLOWERS_LIST_UPDATED:\"onMutualFollowersListUpdated\",KICKED_OUT:\"kickedOut\",ERROR:\"error\",NET_STATE_CHANGE:\"netStateChange\",ALL_RECEIVE_MESSAGE_OPT_UPDATED:\"onAllReceiveMessageOptUpdated\"},A={MSG_TEXT:\"TIMTextElem\",MSG_IMAGE:\"TIMImageElem\",MSG_SOUND:\"TIMSoundElem\",MSG_AUDIO:\"TIMSoundElem\",MSG_FILE:\"TIMFileElem\",MSG_FACE:\"TIMFaceElem\",MSG_VIDEO:\"TIMVideoFileElem\",MSG_GEO:\"TIMLocationElem\",MSG_LOCATION:\"TIMLocationElem\",MSG_GRP_TIP:\"TIMGroupTipElem\",MSG_GRP_SYS_NOTICE:\"TIMGroupSystemNoticeElem\",MSG_CUSTOM:\"TIMCustomElem\",MSG_MERGER:\"TIMRelayElem\",MSG_PRIORITY_HIGH:\"High\",MSG_PRIORITY_NORMAL:\"Normal\",MSG_PRIORITY_LOW:\"Low\",MSG_PRIORITY_LOWEST:\"Lowest\",CONV_C2C:\"C2C\",CONV_GROUP:\"GROUP\",CONV_TOPIC:\"TOPIC\",CONV_SYSTEM:\"@TIM#SYSTEM\",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:\"Private\",GRP_WORK:\"Private\",GRP_PUBLIC:\"Public\",GRP_CHATROOM:\"ChatRoom\",GRP_MEETING:\"ChatRoom\",GRP_AVCHATROOM:\"AVChatRoom\",GRP_COMMUNITY:\"Community\",GRP_ROOM:\"Room\",GRP_LIVE:\"Live\",GRP_MBR_ROLE_OWNER:\"Owner\",GRP_MBR_ROLE_ADMIN:\"Admin\",GRP_MBR_ROLE_MEMBER:\"Member\",GRP_MBR_ROLE_CUSTOM:\"Custom\",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:\"AcceptAndNotify\",MSG_REMIND_ACPT_NOT_NOTE:\"AcceptNotNotify\",MSG_REMIND_DISCARD:\"Discard\",RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT:\"AcceptNotNotifyExceptAt\",NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT:\"AcceptNotNotifyExceptAt\",NOT_RECEIVE_MSG_EXCEPT_AT:\"NotReceiveMsgExceptAt\",GENDER_UNKNOWN:\"Gender_Type_Unknown\",GENDER_FEMALE:\"Gender_Type_Female\",GENDER_MALE:\"Gender_Type_Male\",KICKED_OUT_MULT_ACCOUNT:\"multipleAccount\",KICKED_OUT_MULT_DEVICE:\"multipleDevice\",KICKED_OUT_USERSIG_EXPIRED:\"userSigExpired\",KICKED_OUT_REST_API:\"REST_API_Kick\",ALLOW_TYPE_ALLOW_ANY:\"AllowType_Type_AllowAny\",ALLOW_TYPE_NEED_CONFIRM:\"AllowType_Type_NeedConfirm\",ALLOW_TYPE_DENY_ANY:\"AllowType_Type_DenyAny\",FORBID_TYPE_NONE:\"AdminForbid_Type_None\",FORBID_TYPE_SEND_OUT:\"AdminForbid_Type_SendOut\",JOIN_OPTIONS_FREE_ACCESS:\"FreeAccess\",JOIN_OPTIONS_NEED_PERMISSION:\"NeedPermission\",JOIN_OPTIONS_DISABLE_APPLY:\"DisableApply\",JOIN_STATUS_SUCCESS:\"JoinedSuccess\",JOIN_STATUS_ALREADY_IN_GROUP:\"AlreadyInGroup\",JOIN_STATUS_WAIT_APPROVAL:\"WaitAdminApproval\",INVITE_OPTIONS_DISABLE_INVITE:\"DisableInvite\",INVITE_OPTIONS_NEED_PERMISSION:\"NeedPermission\",INVITE_OPTIONS_FREE_ACCESS:\"FreeAccess\",GRP_PROFILE_OWNER_ID:\"ownerID\",GRP_PROFILE_CREATE_TIME:\"createTime\",GRP_PROFILE_LAST_INFO_TIME:\"lastInfoTime\",GRP_PROFILE_MEMBER_NUM:\"memberNum\",GRP_PROFILE_MAX_MEMBER_NUM:\"maxMemberNum\",GRP_PROFILE_JOIN_OPTION:\"joinOption\",GRP_PROFILE_INVITE_OPTION:\"inviteOption\",GRP_PROFILE_INTRODUCTION:\"introduction\",GRP_PROFILE_NOTIFICATION:\"notification\",GRP_PROFILE_MUTE_ALL_MBRS:\"muteAllMembers\",SNS_ADD_TYPE_SINGLE:\"Add_Type_Single\",SNS_ADD_TYPE_BOTH:\"Add_Type_Both\",SNS_DELETE_TYPE_SINGLE:\"Delete_Type_Single\",SNS_DELETE_TYPE_BOTH:\"Delete_Type_Both\",SNS_APPLICATION_TYPE_BOTH:\"Pendency_Type_Both\",SNS_APPLICATION_SENT_TO_ME:\"Pendency_Type_ComeIn\",SNS_APPLICATION_SENT_BY_ME:\"Pendency_Type_SendOut\",SNS_APPLICATION_AGREE:\"Response_Action_Agree\",SNS_APPLICATION_AGREE_AND_ADD:\"Response_Action_AgreeAndAdd\",SNS_CHECK_TYPE_BOTH:\"CheckResult_Type_Both\",SNS_CHECK_TYPE_SINGLE:\"CheckResult_Type_Single\",SNS_TYPE_NO_RELATION:\"CheckResult_Type_NoRelation\",SNS_TYPE_A_WITH_B:\"CheckResult_Type_AWithB\",SNS_TYPE_B_WITH_A:\"CheckResult_Type_BWithA\",SNS_TYPE_BOTH_WAY:\"CheckResult_Type_BothWay\",NET_STATE_CONNECTED:\"connected\",NET_STATE_CONNECTING:\"connecting\",NET_STATE_DISCONNECTED:\"disconnected\",MSG_AT_ALL:\"__kImSDK_MesssageAtALL__\",READ_ALL_C2C_MSG:\"readAllC2CMessage\",READ_ALL_GROUP_MSG:\"readAllGroupMessage\",READ_ALL_MSG:\"readAllMessage\",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3,IOS_OFFLINE_PUSH_NO_SOUND:\"push.no_sound\",IOS_OFFLINE_PUSH_DEFAULT_SOUND:\"default\"},Q={NEW_INVITATION_RECEIVED:\"newInvitationReceived\",INVITEE_ACCEPTED:\"ts_invitee_accepted\",INVITEE_REJECTED:\"ts_invitee_rejected\",INVITATION_CANCELLED:\"ts_invitation_cancelled\",INVITATION_TIMEOUT:\"ts_invitation_timeout\",INVITATION_MODIFIED:\"ts_invitation_modified\",ACTION_TYPE_UNKNOWN:0,ACTION_TYPE_INVITE:1,ACTION_TYPE_CANCEL_INVITE:2,ACTION_TYPE_ACCEPT_INVITE:3,ACTION_TYPE_REJECT_INVITE:4,ACTION_TYPE_INVITE_TIMEOUT:5},$=(e(de,[{key:\"use\",value:function(e){if(\"function\"!=typeof e)throw\"middleware must be a function\";return this.cache.push(e),this}},{key:\"next\",value:function(e){if(this.middlewares&&0=Math.pow(2,64)&&(c({api:t,paramName:n,desc:l(\"NumberLessThanLog\",n,\"Math.pow(2,64)\")}),1)):(c({api:t,paramName:n,desc:un()}),!1)}},enableMark:y({},bn)},createConversationGroup:{conversationIDList:y({},r),groupName:y(y({},o),{},{validator:function(e,t,n){return!(!e||32=this.TOPIC_MSG_LIMIT&&this._convM.clearMemMsg(i,!0)}}catch(e){n.e(e)}finally{n.f()}}}},{key:\"pushIn\",value:function(e){var t=1>(-2*a&6))))i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(i);try{return decodeURIComponent(escape(n))}catch(e){return\"\"}}var jo,Jo,zo,Xo,Zo,Qo=[\"jpg\",\"jpeg\",\"gif\",\"png\",\"bmp\",\"image\",\"webp\"],$o=[\"mp4\",\"quicktime\",\"mov\"],ei=(e(oa,[{key:\"validate\",value:function(e){var t,n=!0,o=\"\";if(S(e))return{valid:!1,tips:\"empty options\"};if(e.profileCustomField)for(var i=e.profileCustomField.length,a=null,s=0;s=this.MAX_LENGTH&&(t=this.map.entries().next().value[0],this.map.delete(t)),this.map.set(e,1)}},{key:\"has\",value:function(e){return this.map.has(e)}},{key:\"delete\",value:function(e){this.has(e)&&this.map.delete(e)}},{key:\"reset\",value:function(){this.map.clear()}}]),na),ni=[\"groupID\",\"name\",\"avatar\",\"type\",\"introduction\",\"notification\",\"ownerID\",\"selfInfo\",\"createTime\",\"infoSequence\",\"lastInfoTime\",\"lastMessage\",\"nextMessageSeq\",\"memberNum\",\"maxMemberNum\",\"memberList\",\"joinOption\",\"groupCustomField\",\"muteAllMembers\",\"isSupportTopic\",\"inviteOption\",\"_lastRevokedTime\"],oi=(e(ta,[{key:\"memberNum\",get:function(){return this.memberCount},set:function(e){}},{key:\"maxMemberNum\",get:function(){return this.maxMemberCount},set:function(e){}},{key:\"_initGroup\",value:function(e){for(var t in e)ni.indexOf(t)<0||(\"selfInfo\"!==t?(\"memberNum\"===t&&(this.memberCount=e[t]),\"maxMemberNum\"===t&&(this.maxMemberCount=e[t]),\"isSupportTopic\"!==t?this[t]=e[t]:this.isSupportTopic=1===e[t]):this.updateSelfInfo(e[t]))}},{key:\"updateGroup\",value:function(e){var t=this,e=(e.appid=void 0,e.grossTopicNextMsgSeq=void 0,e.selfInfo&&(e.selfInfo.grossTopicReadSeq=void 0),JSON.parse(JSON.stringify(e)));e.lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),N(e.muteAllMembers)||(\"On\"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&kt(this.groupCustomField,e.groupCustomField),N(e.memberNum)||(this.memberCount=e.memberNum),N(e.maxMemberNum)||(this.maxMemberCount=e.maxMemberNum),N(e.isSupportTopic)||(this.isSupportTopic=R(e.isSupportTopic)?1===e.isSupportTopic:e.isSupportTopic),_t(this,e,[\"members\",\"errorCode\",\"lastMsgTime\",\"groupCustomField\",\"memberNum\",\"maxMemberNum\",\"isSupportTopic\"]),O(e.members)&&0e?(c.messageList=i.slice(r-e,r),c.nextReqMessageID=s?i[r-e].ID:i[r-e].sequence+\"\"):(c.messageList=i.slice(0,r),c.isCompleted=!0):eo||n&&a.sequence>n)){if(\"in\"===a.flow&&a.isRead)break;a.setIsRead(!0)}}},{key:\"updateUnreadCount\",value:function(e){var t,n=!(1c&&e.sequence<=r:e.sequence>c&&e.sequencec&&i.length<60?u._recursiveGetMsgList(i,a,s,r,c,e):u._emitMsgReceived(a,i)})}},{key:\"_emitMsgReceived\",value:function(e,t){var n,o,i=this;0=i.MAX_CHECK_COUNT?(i._deleteCachedGroupTips(t),i._checkCountMap.delete(t)):i._checkCountMap.set(t,++n)})}},{key:\"onNewGroupTips\",value:function(e){M.l(\"\".concat(this._n,\".onNewGroupTips options:\").concat(JSON.stringify(e.dataList)));var e=this._assembly(e),t=e.eventDataList,n=e.result,e=e.AVChatRoomMessageList;0=i.MAX_CHECK_COUNT?(i._deleteCachedGroupMessage(t),i._checkCountMap.delete(t)):i._checkCountMap.set(t,++n)})}},{key:\"updateLastMsg\",value:function(e){var t=\"\".concat(this._n,\".updateLastMsg\");if(0!==this._grpM.getGroupMap().size){for(var n,o,i,a,s=!1,r=e.length,c=0;c=this.CACHE_EXPIRE_TIME||r=this.EXPIRE_TIME)return this._getRemoteGroupCounters({groupID:o,avChatRoomKey:a}).then(function(e){s.setMoreMessage(\"from remote. count:\".concat(e.length)).end(),M.l(\"\".concat(n,\" from remote. groupID:\").concat(o));e=t._getLocalCounters(o,i);return C({counters:e})}).catch(function(e){return s.setError(e).end(),D(e)});s.setMoreMessage(\"from cache\").end(),M.l(\"\".concat(n,\" from cache. groupID:\").concat(o));e=this._getLocalCounters(o,i);return T({counters:e})}},{key:\"_getRemoteGroupCounters\",value:function(n){var o=this;return this._grpM.req({P:k.GET_GRP_COUNTER,data:y({},n)}).then(function(e){var e=e.data,t=e.counterList,t=void 0===t?[]:t,e=e.groupCounterSeq;return o._updateLocalGroupCounters({groupID:n.groupID,counterList:t,groupCounterSeq:e}),M.l(\"\".concat(o._n,\"._getRemoteGroupCounters ok. groupID:\").concat(n.groupID)),t}).catch(function(e){return D(e)})}},{key:\"_convertObjectToList\",value:function(t){var n=[];return Object.keys(t).forEach(function(e){n.push({key:e,value:t[e]})}),n}},{key:\"_updateGroupCounters\",value:function(e){var t=\"\".concat(this._n,\"._updateGroupCounters\"),n=e.groupID,o=e.avChatRoomKey,i=e.mode;return M.l(\"\".concat(t,\". groupID:\").concat(n,\" avChatRoomKey:\").concat(o,\" mode:\").concat(i)),this._grpM.req({P:k.UPDATE_GRP_COUNTER,data:y({},e)}).then(function(e){M.l(\"\".concat(t,\" ok.\"));var e=e.data.counterList,n={};return(void 0===e?[]:e).forEach(function(e){var t=e.key,e=e.value;n[t]=e}),n}).catch(function(e){return D(e)})}},{key:\"_hasLocalGroupCounters\",value:function(e){return this._groupCountersMap.has(e)}},{key:\"_getLocalGroupCounters\",value:function(e){return this._hasLocalGroupCounters(e)||this.initGroupCountersCache({groupID:e}),this._groupCountersMap.get(e)}},{key:\"_updateLocalGroupCounters\",value:function(e){var n,t,o,i=e.groupID,a=e.counterList,a=void 0===a?[]:a,e=e.groupCounterSeq;this._hasLocalGroupCounters(i)&&(o=this._getLocalGroupCounters(i),n=o.counters,t=o.avChatRoomKey,o=o.groupCounterSeq,0this._startBroadcastSeq&&(this._startBroadcastSeq=c),O(s)&&01e3*t.expireTime&&1e4=i&&t.messageList.push(e)}),(Nt({groupID:n})||Gt(n))&&0===t.messageList.length&&a[0].sequencei.nextMessageSeq&&(i.updateNextMessageSeq(n),i.updateLastMessage(e),i.updateSelfInfo({readedSequence:t}),i.updateUnreadCount(0),this.emitOEvt(h.TOPIC_UPDATED,{groupID:o,topic:i}))}},{key:\"onMessageModified\",value:function(e){var t,n=e.to,o=e.time,i=e.sequence,a=e.elements,s=e.cloudCustomData,r=e.messageVersion,c=Jt(n),u=this.getLocalTopic(c,n);u&&(t=u.lastMessage,M.d(\"\".concat(this._n,\".onMessageModified topicID:\").concat(n,\" lastMessage:\"),JSON.stringify(t),\"options:\",JSON.stringify(e)),t)&&(null===t.payload||t.lastTime===o&&t.lastSequence===i&&t.version!==r)&&(t.type=a[0].type,t.payload=a[0].content,t.messageForShow=zt(t.type,t.payload,this.isIntl()),t.cloudCustomData=s,t.version=r,t.lastSequence=i,t.lastTime=o,this.emitOEvt(h.TOPIC_UPDATED,{groupID:c,topic:u}))}},{key:\"onMessageRevoked\",value:function(e){var n,o,i,a=this;0!==e.length&&(o=n=null,i=!1,e.forEach(function(e){var t=e.to;o=Jt(t),(n=a.getLocalTopic(o,t))&&(n.reduceUnreadCount()&&(i=!0),n.isLastMessageRevoked(e)&&(n.setLastMessageRevoked(!0),n.setLastMessageRevoker(e.revoker),i=!0),(t=n.selfInfo.excludedUnreadSequenceList||[]).push(e.sequence),n.updateSelfInfo({excludedUnreadSequenceList:t}))}),i)&&this.emitOEvt(h.TOPIC_UPDATED,{groupID:o,topic:n})}},{key:\"isLastMessageRevoked\",value:function(e){var t=e.topicID,e=e.sequence,n=Jt(t),n=this.getLocalTopic(n,t),t=!1;return t=n?n.isLastMessageRevoked({sequence:e}):t}},{key:\"updateUnreadCountAndLastMsg\",value:function(e,t,n){var o,i=Jt(e),a=this.getLocalTopic(i,e);a&&(o=a.selfInfo.excludedUnreadSequenceList||[],N(n)||(o=n),t._isExcludedFromUnreadCount&&o.push(t.sequence),a.updateSelfInfo({excludedUnreadSequenceList:o}),M.l(\"\".concat(this._n,\".updateUnreadCountAndLastMsg seq:\").concat(t.sequence,\" lastSeq:\").concat(a.lastMessage.lastSequence)),t.sequence>a.lastMessage.lastSequence)&&(a.updateLastMessage(t),n=t.sequence+1,a.updateNextMessageSeq(n),o=this._computeUnreadCount(a),a.updateUnreadCount(o),(t=this.get(11).getLocalConversation(\"\".concat(A.CONV_GROUP).concat(e)))&&t.updateUnreadCount({nextUnreadCount:o,isFromGetConversations:!0}),this.emitOEvt(h.TOPIC_UPDATED,{groupID:i,topic:a}))}},{key:\"getJoinedCommunityList\",value:function(){return this.get(7).syncCommunityWithTopic()}},{key:\"createTopicInCommunity\",value:function(t){var n,o=this,i=\"\".concat(this._n,\".\").concat(\"createTopicInCommunity\"),e=t.topicID;return N(e)||Gt(e)?t.topicName&&!1===this._filterProfanity(\"topicName\",t)||t.introduction&&!1===this._filterProfanity(\"introduction\",t)||t.notification&&!1===this._filterProfanity(\"notification\",t)?D({code:L.PROFANITY_FOUND}):(n=new G(\"createTopicInCommunity\"),this.req({P:k.CREATE_TOPIC,data:y({},t)}).then(function(e){e=e.data.topicID;return n.setMessage(\"topicID:\".concat(e)).end(),M.l(\"\".concat(i,\" ok. topicID:\").concat(e)),o._updateTopicMap([y(y({},t),{},{topicID:e})]),C({topicID:e})}).catch(function(e){return n.setError(e).end(),M.e(\"\".concat(i,\" failed. error:\"),e),D(e)})):D({code:L.ILLEGAL_TOPIC_ID})}},{key:\"deleteTopicFromCommunity\",value:function(e){var t=this,n=\"\".concat(this._n,\".\").concat(\"deleteTopicFromCommunity\"),a=e.groupID,e=e.topicIDList,e=void 0===e?[]:e,s=new G(\"deleteTopicFromCommunity\");return s.setMessage(\"groupID:\".concat(a,\" topicIDList:\").concat(e)),this.req({P:k.DEL_TOPIC,data:{groupID:a,topicIDList:e}}).then(function(e){var e=e.data.resultList,o=[],i=[],e=((void 0===e?[]:e).forEach(function(e){var t=e.topicID,n=e.errorCode,e=e.errorInfo;0===n?o.push({topicID:t}):i.push({topicID:t,code:n,message:e})}),\"success count:\".concat(o.length,\", fail count:\").concat(i.length));return s.setMoreMessage(e).end(),M.l(\"\".concat(n,\" ok. \").concat(e)),o.forEach(function(e){t._deleteLocalTopic(a,e.topicID)}),C({successTopicList:o,failureTopicList:i})}).catch(function(e){return s.setError(e).end(),M.e(\"\".concat(n,\" failed. error:\"),e),D(e)})}},{key:\"updateTopicProfile\",value:function(e){var t,n=this,o=\"\".concat(this._n,\".\").concat(\"updateTopicProfile\");return M.l(\"\".concat(o,\" options:\"),e),e.topicName&&!1===this._filterProfanity(\"topicName\",e)||e.introduction&&!1===this._filterProfanity(\"introduction\",e)||e.notification&&!1===this._filterProfanity(\"notification\",e)?D({code:L.PROFANITY_FOUND}):((t=new G(\"updateTopicProfile\")).setMessage(\"groupID:\".concat(e.groupID,\" topicID:\").concat(e.topicID)),N(e.muteAllMembers)||(e.muteAllMembers=!0===e.muteAllMembers?\"On\":\"Off\"),this.req({P:k.UPDATE_TOPIC_PROFILE,data:y({},e)}).then(function(){return t.end(),M.l(\"\".concat(o,\" ok\")),n._updateTopicMap([e]),C({topic:n.getLocalTopic(e.groupID,e.topicID)})}).catch(function(e){return t.setError(e).end(),M.e(\"\".concat(o,\" failed. error:\"),e),D(e)}))}},{key:\"getTopicList\",value:function(e){var t=this,n=\"\".concat(this._n,\".\").concat(\"getTopicList\"),o=e.groupID,e=e.topicIDList,e=void 0===e?[]:e,i=0===e.length,c=new G(\"getTopicList\");if(c.setMessage(\"groupID:\".concat(o)),this._getTopicTimeMap.has(o)){var a=this._getTopicTimeMap.get(o),s=a.isGetAll,a=a.time;if((s||!s&&!i)&&Date.now()-a<1e3*this.TOPIC_CACHE_TIME){s=this._getLocalTopicList(o,e);if(i||s.length===e.length)return c.setMoreMessage(\"from cache, topic count:\".concat(s.length)).end(),M.l(\"\".concat(n,\" groupID:\").concat(o,\" from cache, topic count:\").concat(s.length)),T({successTopicList:s,failureTopicList:[]})}}return this.req({P:k.GET_TOPIC_LIST,data:{groupID:o,topicIDList:e}}).then(function(e){var e=e.data.topicInfoList,a=[],s=[],r=[],e=((void 0===e?[]:e).forEach(function(e){var t=e.topic,n=e.selfInfo,o=e.errorCode,e=e.errorInfo,i=t.topicID;0===o?(a.push(y(y({},t),{},{selfInfo:n})),s.push(i)):r.push({topicID:i,code:o,message:e})}),t._updateTopicMap(a),t._handleTopicAtInfo(a),\"success count:\".concat(s.length,\", fail count:\").concat(r.length)),e=(c.setMoreMessage(e).end(),M.l(\"\".concat(n,\" groupID:\").concat(o,\" from remote, \").concat(e)),[]);return S(s)||(t._getTopicTimeMap.set(o,{time:Date.now(),isGetAll:i}),e=t._getLocalTopicList(o,s)),C({successTopicList:e,failureTopicList:r})}).catch(function(e){return c.setError(e).end(),M.e(\"\".concat(n,\" failed. error:\"),e),D(e)})}},{key:\"hasLocalTopic\",value:function(e,t){return!!this._topicMap.has(e)&&this._topicMap.get(e).has(t)}},{key:\"getLocalTopic\",value:function(e,t){var n=null;return n=this._topicMap.has(e)?this._topicMap.get(e).get(t):n}},{key:\"_getLocalTopicList\",value:function(e){var t=1this.MAX_QUERY_USER_COUNT&&(M.w(\"\".concat(o,\" \").concat($t(this.MAX_QUERY_USER_COUNT))),t=i.slice(0,this.MAX_QUERY_USER_COUNT));var s=new G(\"getUserStatus\");return this._userM.req({P:k.GET_USER_STATUS,data:{userIDList:t}}).then(function(e){var e=e.data,t=e.successUserList,t=void 0===t?[]:t,e=e.failureUserList,e=void 0===e?[]:e,t=t.map(function(e){var t=e.userID,n=e.statusType,e=e.customStatus;return{userID:t,statusType:n,customStatus:Wo(e)}}),e=e.map(function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode,e=e.errorInfo;return{userID:S(n)?t:n,code:o,message:e}}),n=(N(a)||t.unshift(a),\"userID count:\".concat(i.length,\", success count:\").concat(t.length,\", fail count:\").concat(e.length));return s.setMessage(\"\".concat(n)).end(),M.l(\"\".concat(o,\" ok. \").concat(n,\".\")),C({successUserList:t,failureUserList:e})}).catch(function(e){return s.setMessage(\"userID count:\".concat(i.length)).setError(e).end(),M.e(\"\".concat(o,\" failed. error:\"),e),D(e)})}},{key:\"subscribeUserStatus\",value:function(e){var t,n,o,i,a=\"subscribeUserStatus\";return this._userM.canIUse(_.USER_STATUS)?(t=\"\".concat(this._n,\".\").concat(a),(n=p(e=void 0===(e=e.userIDList)?[]:e)).length>this.MAX_SUBSCRIBE_USER_COUNT&&(M.w(\"\".concat(t,\" \").concat($t(this.MAX_SUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_SUBSCRIBE_USER_COUNT)),o=new G(a),i=\"userID count:\".concat(e.length),M.l(\"\".concat(t,\" \").concat(i)),this._userM.req({P:k.SUB_USER_STATUS,data:{userIDList:n}}).then(function(e){e=e.data.failureUserList,e=(void 0===e?[]:e).map(function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode,e=e.errorInfo;return{userID:S(n)?t:n,code:o,message:e}});return o.setMessage(\"\".concat(i,\" fail count:\").concat(e.length)).end(),M.l(\"\".concat(t,\" ok. fail count:\").concat(e.length,\".\")),C({failureUserList:e})}).catch(function(e){return o.setMessage(i).setError(e).end(),M.e(\"\".concat(t,\" failed. error:\"),e),D(e)})):this._userM.noUse(a)}},{key:\"unsubscribeUserStatus\",value:function(e){var t,n,o,i,a=\"unsubscribeUserStatus\";return this._userM.canIUse(_.USER_STATUS)?(t=\"\".concat(this._n,\".\").concat(a),n=p(e=void 0===(e=(e||{}).userIDList)?[]:e),e.length>this.MAX_UNSUBSCRIBE_USER_COUNT&&(M.w(\"\".concat(t,\" \").concat($t(this.MAX_UNSUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_UNSUBSCRIBE_USER_COUNT)),o=new G(a),i=\"userID count:\".concat(e.length),M.l(\"\".concat(t,\" \").concat(i)),e={userIDList:n},0===n.length&&(e.userIDList=void 0,e.unsubscribeAll=1),this._userM.req({P:k.UNSUB_USER_STATUS,data:e}).then(function(e){e=e.data.failureUserList,e=(void 0===e?[]:e).map(function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode,e=e.errorInfo;return{userID:S(n)?t:n,code:o,message:e}});return o.setMessage(\"\".concat(i,\" fail count:\").concat(e.length)).end(),M.l(\"\".concat(t,\" ok. fail count:\").concat(e.length,\".\")),C({failureUserList:e})}).catch(function(e){return o.setMessage(\"\".concat(i)).setError(e).end(),M.e(\"\".concat(t,\" failed. error:\"),e),D(e)})):this._userM.noUse(a)}},{key:\"reset\",value:function(){this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100}}]),bi),Ai=(t(Ui,u),Jo=n(Ui),e(Ui,[{key:\"onContextUpdated\",value:function(e){this._profileHandler.getMyProfile(),this._blacklistHandler.getBlacklist()}},{key:\"mockOnNickAvatarModified\",value:function(e,t){M.l(\"\".concat(this._n,\"._mockOnNickAvatarModified nick:\").concat(e,\" avatar:\").concat(t)),this.onProfileModified({dataList:[{pushType:1,userID:this.getMyUserID(),profileList:[{tag:g.NICK,value:e},{tag:g.AVATAR,value:t}]}]})}},{key:\"onProfileModified\",value:function(e){this._profileHandler.onProfileModified(e)}},{key:\"onRelationChainModified\",value:function(e){var t,n,e=e.dataList;S(e)||(t=[],e.forEach(function(e){e.blackListDelAccount&&t.push.apply(t,p(e.blackListDelAccount))}),0=this.MIN_THRESHOLD)&&this._report()}},{key:\"onCheckTimer\",value:function(){Date.now()n.MAX_THRESHOLD&&n._flushAtOnce()})):this._lastReportTime=Date.now())}},{key:\"_flushAtOnce\",value:function(){var e=this.get(13),t=e.getItem(this.TAG,!1),n=this._reportBody.getLogsInMemory(),o=\"\".concat(this._n,\"._flushAtOnce\");S(t)?(M.l(\"\".concat(o,\" count:\").concat(n.length)),e.setItem(this.TAG,n,!0,!1)):((n=n.concat(t)).length>this.MAX_THRESHOLD&&(n=n.slice(0,this.MAX_THRESHOLD)),M.l(\"\".concat(o,\" count:\").concat(n.length)),e.setItem(this.TAG,n,!0,!1))}},{key:\"reset\",value:function(){M.l(\"\".concat(this._n,\".reset\")),this._lastReportTime=0,this._report(),this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[]}}]),ha),la=\"none\",da=\"online\",pa=(e(_a,[{key:\"_startRN\",value:function(){var e,n=this;ye&&(e=this._m.get(18).getPlugin(\"chat-network-monitor\"))&&(this._removeListener=e.addEventListener(function(e){var t=e.isConnected,e=e.type;n._networkType!==e&&n._onNetworkStatusChange({isConnected:void 0!==t&&t,networkType:e})}))}},{key:\"start\",value:function(){var t=this,n=\"\".concat(this._n,\".start\");v?(I.getNetworkType({success:function(e){t._networkType=e.networkType||e.subtype||\"\",e.networkType===la?M.w(\"\".concat(n,\" no network, please check!\")):M.i(\"\".concat(n,\" networkType:\").concat(e.networkType))}}),this._mpNetworkStatusCallback=this._onNetworkStatusChange.bind(this),I.onNetworkStatusChange(this._mpNetworkStatusCallback)):Ce&&(this._networkType=da,this._webOnlineCallback=this._onWebOnline.bind(this),this._webOfflineCallback=this._onWebOffline.bind(this),window.addEventListener(\"online\",this._webOnlineCallback),window.addEventListener(\"offline\",this._webOfflineCallback))}},{key:\"_onWebOnline\",value:function(){this._onNetworkStatusChange({isConnected:!0,networkType:da})}},{key:\"_onWebOffline\",value:function(){this._onNetworkStatusChange({isConnected:!1,networkType:la})}},{key:\"_onNetworkStatusChange\",value:function(e){var t=e.isConnected,e=e.networkType,n=\"\".concat(this._n,\"._onNetworkStatusChange\"),o=!1,i=\"previous:\".concat(this._networkType,\" current:\").concat(e);t?(M.i(\"\".concat(n,\" \").concat(i)),this._networkType!==e&&(o=!0,this._networkType=e,this._m.get(21).reConnect(!0))):this._networkType!==e&&(o=!0,this._networkType=e,M.w(\"\".concat(n,\" no network, please check!\")),this._m.get(21).offline()),o&&new G(\"networkChange\").setMessage(\"isConnected:\".concat(t,\" \").concat(i)).end()}},{key:\"isOnline\",value:function(){return this._networkType!==la}},{key:\"getNetworkType\",value:function(){return this._networkType}},{key:\"reset\",value:function(){M.l(\"\".concat(this._n,\".reset\")),v?null!==this._mpNetworkStatusCallback&&(I.offNetworkStatusChange&&I.offNetworkStatusChange(this._mpNetworkStatusCallback),this._mpNetworkStatusCallback=null):Ce?(null!==this._webOnlineCallback&&(window.removeEventListener(\"online\",this._webOnlineCallback),this._webOnlineCallback=null),null!==this._onWebOffline&&(window.removeEventListener(\"offline\",this._webOfflineCallback),this._webOfflineCallback=null)):ye&&this._removeListener&&(this._removeListener(),this._removeListener=null)}}]),_a);function _a(e){d(this,_a),this._m=e,this._networkType=da,this._n=\"NetMonitorModule\",this._mpNetworkStatusCallback=null,this._webOnlineCallback=null,this._webOfflineCallback=null,this._removeListener=null,this._m.getIEmitInst().on(P.A2KEY_AND_TINYID_UPDATED,this._startRN,this)}function ha(e){d(this,ha),(e=sa.call(this,e))._n=\"EventStatModule\",e.TAG=\"im-ssolog-event\",e._reportBody=new ca,e.MIN_THRESHOLD=20,e.MAX_THRESHOLD=100,e.WAITING_TIME=6e4,e.REPORT_LEVEL=[4,5,6],e.REPORT_SDKAPPID_BLACKLIST=[],e.REPORT_TINYID_WHITELIST=[],e._lastReportTime=Date.now();var t=e.getIEmitInst();return t.on(P.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,i(e)),t.on(P.CLOUD_CONFIG,e._onCloudConfig,i(e)),e}function ga(e){d(this,ga),this._n=\"SSOLogBody\",this._report=[]}function fa(e){d(this,fa),this._m=e,this._n=\"StorageModule\",this._storageQueue=new Map,this._errorTolerantHandle()}function ma(e,t){return e(t={exports:{}},t.exports),t.exports}var va,Ia=ma(function(e){var o=Object.prototype.hasOwnProperty,_=\"~\";function n(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,n,o,i){if(\"function\"!=typeof n)throw new TypeError(\"The listener must be a function\");n=new a(n,o||e,i),o=_?_+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],n]:e._events[o].push(n):(e._events[o]=n,e._eventsCount++),e}function c(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function t(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(_=!1)),t.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)o.call(e,t)&&n.push(_?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},t.prototype.listeners=function(e){var e=_?_+e:e,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var n=0,o=t.length,i=new Array(o);n=this.cosOptions.expiredTime-120&&this._getAuthorizationKey()}},{key:\"getFileDNList\",value:function(){return this._fileDNList}},{key:\"_getAuthorization\",value:function(e,t){t({TmpSecretId:this.cosOptions.secretId,TmpSecretKey:this.cosOptions.secretKey,XCosSecurityToken:this.cosOptions.sessionToken,ExpiredTime:this.cosOptions.expiredTime})}},{key:\"upload\",value:function(e){if(!0===e._relayFlag)return Promise.resolve();var t=this.get(26);switch(e.type){case A.MSG_IMAGE:return t.addTotalCount(Wn),this._uploadImage(e);case A.MSG_FILE:return t.addTotalCount(Wn),this._uploadFile(e);case A.MSG_AUDIO:return t.addTotalCount(Wn),this._uploadAudio(e);case A.MSG_VIDEO:return t.addTotalCount(Wn),this._uploadVideo(e);default:return Promise.resolve()}}},{key:\"_uploadImage\",value:function(v){var I=this,e=this.get(2),M=v.getElements()[0],t=e.getMessageOption(v.clientSequence);return this.doUploadImage({file:t.payload.file,to:t.to,message:v,onProgress:function(e){if(M.updatePercent(e),lt(t.onProgress))try{t.onProgress(e)}catch(e){return D({code:L.MSG_ONPROGRESS_ERR})}}}).then(function(e){var t=e.location,n=e.fileType,o=e.fileSize,i=e.width,a=e.height,s=e.smallImageUrl,r=e.smallImageWidth,c=e.smallImageHeight,u=e.largeImageUrl,l=e.largeImageWidth,d=e.largeImageHeight,p=e.imageInfoArray,e=I.isPrivateNetWork()?t:It(t);M.updateImageFormat(n);var _,h,g={size:o,url:e,width:i,height:a};if(p&&0this.UPLOAD_SIZE_LIMIT.F?this._checkSizeError(\"F\"):0===e.file.files[0].size?D({code:L.MSG_F_IS_EMPTY}):(this._setUploadFileType(255),this.uploadByCOS(e))}},{key:\"doUploadVideo\",value:function(e){return e.file.videoFile.size>this.UPLOAD_SIZE_LIMIT.V?this._checkSizeError(\"V\"):0===e.file.videoFile.size?D({code:L.MSG_F_IS_EMPTY}):-1===$o.indexOf(e.file.videoFile.type)?D({code:L.MSG_V_TYPES_LIMIT}):(this._setUploadFileType(2),v||ye?this.handleVideoUpload(y(y({},e),{},{file:e.file.videoFile})):Ce?this.handleVideoUpload(e):void 0)}},{key:\"handleVideoUpload\",value:function(n){var o=this;return new Promise(function(t,e){o.uploadByCOS(n).then(function(e){t(e)}).catch(function(){o.uploadByCOS(n).then(function(e){t(e)}).catch(function(){e(new E({code:L.MSG_V_UPLOAD_FAIL}))})})})}},{key:\"doUploadAudio\",value:function(e){return e.file?e.file.size>this.UPLOAD_SIZE_LIMIT.A?this._checkSizeError(\"A\"):0===e.file.size?D({code:L.MSG_F_IS_EMPTY}):(this._setUploadFileType(3),this.uploadByCOS(e)):D({code:L.MSG_A_UPLOAD_FAIL})}},{key:\"uploadByCOS\",value:function(t){var c,u,l,d,p=this;return lt(this._cosUploadMethod)?this.timUploadPlugin?this._uploadWithPreSigUrl(t):(c=new G(\"upload\"),u=\"\".concat(this._n,\".uploadByCOS\"),l=Date.now(),d=this._getFile(t),new Promise(function(a,s){var e=v?p._createCosOptionsWXMiniApp(t):p._createCosOptionsWeb(t),r=p;p._cosUploadMethod(e,function(e,t){var n,o,i=Object.create(null);t?e||O(t.files)&&t.files[0].error?(n=new E({code:L.MSG_F_UPLOAD_FAIL}),c.setError(n).end(),M.l(\"\".concat(u,\" failed. error:\"),t.files[0].error),403===t.files[0].error.statusCode&&p._getAuthorizationKey(),s(n)):(i.fileName=d.name,i.fileSize=d.size,i.fileType=d.type.slice(d.type.indexOf(\"/\")+1).toLowerCase(),i.location=(v?t:t.files[0].data).Location,n=Date.now()-l,t=r._formatFileSize(d.size),o=r._formatSpeed(1e3*d.size/n),t=\"size:\".concat(t,\" time:\").concat(n,\"ms speed:\").concat(o),M.l(\"\".concat(u,\" success. name:\").concat(d.name,\" \").concat(t)),a(i),(o=p.get(26)).addCost(Wn,n),o.addFileSize(Wn,d.size),c.setMessage(t).end()):(i=new E({code:L.MSG_F_UPLOAD_FAIL}),c.setError(i).end(),M.w(\"\".concat(u,\" failed. error:\"),e),403===e.statusCode&&p._getAuthorizationKey(),s(i))})})):(this.warn(\"PluginUndetected\"),D({code:L.COS_UNDETECTED}))}},{key:\"_uploadWithPreSigUrl\",value:function(e){var p=this,_=\"\".concat(this._n,\"._uploadWithPreSigUrl\"),h=this._getFile(e);return this._createCosOptionsPreSigUrl(e).then(function(d){return new Promise(function(a,s){var r=new G(\"upload\"),e=d.requestSnapshotUrl,c=void 0===e?void 0:e,u=K(d,ya),l=Date.now();p._cosUploadMethod(u,function(e,t){if(e||403===t.statusCode)r.setError(new E(e)).end(),o={HttpStatusCode:9999,CostTime:nn(l,!1),error:e,url:d.url},t.data&&t.data.uploadIP&&(o.uploadIP=t.data.uploadIP),p._uploadSSOLog(o),M.l(\"\".concat(_,\" failed, error:\"),e),s(new E({code:L.MSG_F_UPLOAD_FAIL}));else{var n=Object.create(null),o=t.data.location||\"\",e=(p.isPrivateNetWork()||0!==o.indexOf(\"https://\")&&0!==o.indexOf(\"http://\")||(o=o.split(\"//\")[1]),n.fileName=h.name,n.fileSize=h.size,n.fileType=h.type.slice(h.type.indexOf(\"/\")+1).toLowerCase(),n.location=o,nn(l,!1)),o=p._formatFileSize(h.size),i=p._formatSpeed(1e3*h.size/e),o=\"size:\".concat(o,\" time:\").concat(e,\"ms speed:\").concat(i,\" res:\").concat(JSON.stringify(t.data)),i=(M.l(\"\".concat(_,\" ok. name:\").concat(h.name,\" \").concat(o)),r.setMessage(o).end(),{HttpStatusCode:t.statusCode,FileSize:h.size,CostTime:e,url:d.url}),o=(t.data&&t.data.uploadIP&&(i.uploadIP=t.data.uploadIP),p._uploadSSOLog(i),p.get(26)),i=(o.addCost(Wn,e),o.addFileSize(Wn,h.size),[]);if(u.thumbUrl&&u.largeUrl&&i.push.apply(i,[p._getSmallImageInfoByUrl(u.thumbUrl,n),p._getLargeImageInfoByUrl(u.largeUrl,n)]),1===p.uploadFileType&&p.isSimpleCos&&!p.isPrivateNetWork()&&(i.push(p._getImageInfoArray(u.downloadUrl,n)),t.data.uploadIP)&&i.push(p._getDownloadIP(u.downloadUrl.split(\"//\")[1].split(\"/\")[0],n)),c&&i.push(p._getSnapshotInfoByUrl(c,n)),0>>18,128|t>>>12&63,128|t>>>6&63,128|63&t)}else t=65533}else t<=57343&&(t=65533);return t<=2047?es(192|t>>>6,128|63&t):es(224|t>>>12,128|t>>>6&63,128|63&t)},ns=function(e){for(var t=void 0===e?\"\":(\"\"+e).replace(/[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g,ts),n=0|t.length,o=new Uint8Array(n),i=0;i=i&&(M.l(\"\".concat(a._n,\"._checkPromiseMap request timeout, delete requestID:\").concat(t)),a._promiseMap.delete(t),n(new E({code:L.NETWORK_TIMEOUT,data:{headSeq:e}})),a._chM.onRequestTimeout())})}},{key:\"_checkNativeAppWS\",value:function(){Ie&&!this.isConnected()&&this._reConnect()}},{key:\"onOpen\",value:function(e){var t,n;this._readyState!==cs&&(this._onOpenTs=Date.now(),n=e.id,e=e.res,this._socketID=n,t=nn(this._startTs,!1),n=\"socketID:\".concat(n,\" res:\").concat(e),M.l(\"\".concat(this._n,\"._onOpen cost:\").concat(t,\" ms. \").concat(n)),new G(\"wsOnOpen\").setMessage(t).setCostTime(t).setMoreMessage(n).end(),this._readyState=ss,this._reConnectCount=0,this._resend(),!0===this._reConnectFlag&&(this._chM.onReconnected(),this._reConnectFlag=!1),this._chM.onOpen())}},{key:\"onClose\",value:function(e){var t=new G(\"wsOnClose\"),n=e.id,e=e.e,o=\"sourceSocketID:\".concat(n,\" currentSocketID:\").concat(this._socketID,\" code:\").concat(e.code,\" reason:\").concat(e.reason),i=0;0!==this._onOpenTs&&(i=Date.now()-this._onOpenTs),t.setMessage(i).setCostTime(i).setMoreMessage(o).setCode(e.code).end(!0),M.l(\"\".concat(this._n,\"._onClose \").concat(o,\" onlineTime:\").concat(i)),n===this._socketID&&(this._readyState=cs,i<1e3?this._chM.onReconnectFailed():this._chM.onClose())}},{key:\"onError\",value:function(e){var t=e.id,e=e.e,n=\"sourceSocketID:\".concat(t,\" currentSocketID:\").concat(this._socketID);new G(\"wsOnError\").setMessage(e.errMsg||JSON.stringify(e,[\"message\",\"code\"])).setMoreMessage(n).setLevel(\"error\").end(!0),M.w(\"\".concat(this._n,\"._onError\"),e,n),t===this._socketID&&(this._readyState=cs,this._chM.onError())}},{key:\"onMessage\",value:function(t){var e,n,o,i,a,s;try{e=JSON.parse(t.data)}catch(e){new G(\"jsonParseError\").setMessage(t.data).end()}e&&e.head&&(t=this._getRequestIDFromHead(e.head),n=e.body,this._chM.get(30).isTRTCCommand(t)||(s=Kt(e.head),n=function t(e,n){var o,i,a;return O(e)?e.map(function(e){return ut(e)?t(e,n):e}):ut(e)?(o=e,i=function(e,t){return N(n[t])?Xa(t):n[t]},a={},Object.keys(o).forEach(function(e){a[i(o[e],e)]=o[e]}),wt(a,function(e){return O(e)||ut(e)?t(e,n):e})):void 0}(e.body,this._getResKeyMap(s))),M.d(\"\".concat(this._n,\".onMessage ret:\").concat(JSON.stringify(n),\" requestID:\").concat(t,\" has:\").concat(this._promiseMap.has(t))),this._setNextPingTs(),this._promiseMap.has(t)?(o=(s=this._promiseMap.get(t)).resolve,i=s.reject,a=s.timestamp,s=s.headSeq,this._promiseMap.delete(t),this._calcRTT(a),n.errorCode&&0!==n.errorCode?(this._chM.onErrorCodeNotZero(n),i(new E({code:n.errorCode,message:n.errorInfo||\"\",data:t.includes(k.MODIFY_C2C_MSG)||t.includes(k.MODIFY_GRP_MSG)?{elements:n.elements,messageVersion:n.messageVersion,cloudCustomData:n.cloudCustomData,headSeq:s}:{headSeq:s}}))):o(C(n))):this._chM.onMessage({head:e.head,body:n}))}},{key:\"_calcRTT\",value:function(e){e=Date.now()-e;this._chM.get(26).addRTT(e)}},{key:\"_connect\",value:function(){this._readyState!==rs&&this._readyState!==ss&&(this._startTs=Date.now(),this._onOpenTs=0,this._readyState=rs,this._socket=new os(this),this._socketID=this._socket.getID(),M.l(\"\".concat(this._n,\"._connect isWorkerEnabled:\").concat(this.getIsWorkerEnabled(),\" socketID:\").concat(this._socketID,\" url:\").concat(this.getURL())),new G(\"wsConnect\").setMessage(\"socketID:\".concat(this._socketID,\" url:\").concat(this.getURL())).end())}},{key:\"getURL\",value:function(){this._chM.isDevMode()&&(this._canIUseBinaryFrame=!1);var e=xt(),t=((ve||_e&&\"windows\"===e||Ie)&&(this._canIUseBinaryFrame=!1),-1),n=(\"ios\"===e?t=Le||-1:\"android\"===e&&(t=ke||-1),this._chM.get(12)),o=this._chM.getPlatform(),i=n.getSDKAppID(),n=n.getInstanceID(),i=\"sdkappid=\".concat(i,\"&instanceid=\").concat(n,\"&random=\").concat(this._getRandom(),\"&platform=\").concat(o,\"&host=\").concat(e)+\"&version=\".concat(t,\"&sdkversion=\").concat(\"3.4.7\");return he&&(i+=\"&isminigame=1\"),this._chM.canIUseInflate()&&(i+=\"&compress=gzip\"),(this._canIUseBinaryFrame?\"\".concat(this._url,\"/binfo?\"):\"\".concat(this._url,\"/info?\")).concat(i)}},{key:\"_closeConnection\",value:function(e){M.l(\"\".concat(this._n,\"._closeConnection socketID:\").concat(this._socketID)),this._socket&&(this._socket.close(e),this._socketID=-1,this._socket=null,this._readyState=cs)}},{key:\"_resend\",value:function(){var i=this;if(M.l(\"\".concat(this._n,\"._resend reConnectFlag:\").concat(this._reConnectFlag),\"promiseMap.size:\".concat(this._promiseMap.size,\" simpleRequestMap.size:\").concat(this._simpleRequestMap.size)),0=this._socketHandler.getNextPingTs()&&this._ping()}},{key:\"dealloc\",value:function(){this._socketHandler&&(this._socketHandler.close(),this._socketHandler=null),-1>>30-e)}function As(e,t){for(var n=e.toString(16),o=t-n.length,i=\"0\";0>>=1,i+=i)1&o&&(n=i+n);return n}t(Wr,u),xs=n(Wr),e(Wr,[{key:\"_init\",value:function(){this._updateCmdFreqLimitMap(ms)}},{key:\"_onCloudConfig\",value:function(){var e=this.getCloudConfig(\"cmd_frequency_limit\");N(e)||(e=JSON.parse(e),this._updateCmdFreqLimitMap(e))}},{key:\"_updateCmdFreqLimitMap\",value:function(e){var t=this;e.forEach(function(e){t._cmdFreqLimitMap.set(e.cmd,{interval:e.interval,count:e.count})})}},{key:\"updateProtocolConfig\",value:function(){this._pHandler.update()}},{key:\"req\",value:function(e){M.d(\"\".concat(this._n,\".req options:\"),e);var t,n,o=e.P;return this._pHandler.has(o)?(t=(e=this.getProtocolData(e)).head.servcmd,this._isFreqOverLimit(t)?D({code:n=L.OVER_FREQUENCY_LIMIT,message:this.getErrMsg(n,this._getCmd(t))}):this._isServerOverload(t)?D({code:n=L.OPEN_SERVICE_OVERLOAD_ERROR,message:this.getErrMsg(n,this._getCmd(t))}):(n=this.get(21),gs.includes(o)?n.simplySend(e):n.send(e))):(M.w(\"\".concat(this._n,\".req unknown P:\").concat(o)),D({code:L.NO_PROTOCOL}))}},{key:\"getKeyMap\",value:function(e){return this._pHandler.getKeyMap(e)}},{key:\"genCommonHead\",value:function(){var e=this.get(12);return{ver:\"v4\",platform:this._platform,websdkappid:ae,websdkversion:oe,a2:e.getA2Key()||void 0,tinyid:e.getTinyID()||void 0,status_instid:e.getStatusInstanceID(),sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getA2Key()?void 0:e.getUserID(),usersig:e.getA2Key()?void 0:e.getUserSig(),sdkability:12775283,sdkability_ext:Ss(\"\"),cappid:e.getApplicationID()}}},{key:\"genCosSpecifiedHead\",value:function(){var e=this.get(12);return{ver:\"v4\",platform:this._platform,websdkappid:ae,websdkversion:oe,sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getUserID(),usersig:e.getUserSig(),status_instid:e.getStatusInstanceID(),sdkability:12775283,sdkability_ext:Ss(\"\"),cappid:e.getApplicationID()}}},{key:\"genSSOReportHead\",value:function(){var e=this.get(12);return{ver:\"v4\",platform:this._platform,websdkappid:ae,websdkversion:oe,sdkappid:e.getSDKAppID(),contenttype:\"\",reqtime:0,identifier:\"\",usersig:\"\",status_instid:e.getStatusInstanceID(),sdkability:12775283,sdkability_ext:Ss(\"\"),cappid:e.getApplicationID()}}},{key:\"getProtocolData\",value:function(e){return this._pHandler.getProtocolData(e)}},{key:\"trans\",value:function(e){var t=e.servcmd,e=e.data,t={head:y(y({},this.genCommonHead()),{},{servcmd:t}),body:e};return this.get(21).send(t)}},{key:\"sendComboMessage\",value:function(e){var t=e.servcmd,e=e.data,t={head:y(y({},this.genCommonHead()),{},{servcmd:t}),body:e};return this.get(21).send(t)}},{key:\"onErrorCodeNotZero\",value:function(e){var t,n=e.errorCode;n===L.HELLO_ANSWER_KICKED_OUT&&(t=e.kickType,e=void 0===(e=e.newInstanceInfo)?{}:e,1===t?this.onMultipleAccountKickedOut(e):2===t?this.onMultipleDeviceKickedOut(e):3===t&&this.onRestApiKickedOut(e)),n!==L.MSG_A2KEY_EXPIRED&&n!==L.ACCOUNT_A2KEY_EXPIRED||(this._onUserSigExpired(),this.get(21).reConnect())}},{key:\"onMessage\",value:function(e){var t=e.body,n=t.needAck,t=t.sessionData;1===(void 0===n?0:n)&&this._sendACK(t),this._msgDispatcher.onMessage(e)}},{key:\"onReconnected\",value:function(e){this._incrementalPullContactFlag=e<=300,this._reLoginOnReconnected()}},{key:\"reLoginOnKickOther\",value:function(){M.l(\"\".concat(this._n,\".reLoginOnKickOther\")),this._reLogin()}},{key:\"_reLoginOnReconnected\",value:function(){M.l(\"\".concat(this._n,\"._reLoginOnReconnected\")),this._reLogin()}},{key:\"_reLogin\",value:function(){var e,t,s,r=this,c=\"\".concat(this._n,\"._reLogin\");this.isLoggedIn()&&(e=0,(t=this.get(1).getPushModule())&&(e=t.getUniAppPlatform()),s=new G(\"reLogin\"),this.req({P:k.LOGIN,data:{isWebUniapp:e,customInfo:this.get(12).getCustomLoginInfo()}}).then(function(e){var e=e.data,t=e.instanceID,e=e.customStatus,n=r.get(12),o=Wo(e),i=(n.setStatusInstanceID(t),r.get(21)),a=i.getSocketID(),a=\"socketID:\".concat(a,\" instanceID:\").concat(t,\" customStatus:\").concat(o),t=(s.setMessage(a).end(!0),M.l(\"\".concat(c,\" ok. \").concat(a)),n.getCustomStatus()!==o&&r.get(4).onUserStatusUpdated({dataList:[{to:r.getMyUserID(),statusType:A.USER_STATUS_ONLINE,customStatus:e}]}),i.diagnose(),r.get(11).syncConvList(r._incrementalPullContactFlag).then(function(){M.l(\"\".concat(c,\", sync conv list ok.\")),r.get(25).start()}),r.get(7)),a=(t&&t.updateLocalMainSequenceOnReconnected(),r.get(10)),n=(a.resetGetTopicTime(),a.getTopicListOnReconnected(),r.get(35));n&&n.clearCacheOnReconnected()}))}},{key:\"onMultipleAccountKickedOut\",value:function(e){this.get(1).onMultipleAccountKickedOut(e)}},{key:\"onMultipleDeviceKickedOut\",value:function(e){this.get(1).onMultipleDeviceKickedOut(e)}},{key:\"_onUserSigExpired\",value:function(){this.get(1).onUserSigExpired()}},{key:\"onRestApiKickedOut\",value:function(e){this.get(1).onRestApiKickedOut(e)}},{key:\"_sendACK\",value:function(e){this.req({P:k.MSG_PUSH_ACK,data:{sessionData:e}})}},{key:\"_isFreqOverLimit\",value:function(e){var t,n,o,i,e=e.split(\".\")[1];return!!this._cmdFreqLimitMap.has(e)&&(!this._cmdReqInfoMap.has(e)||(t=(n=this._cmdFreqLimitMap.get(e)).count,n=n.interval,o=(i=this._cmdReqInfoMap.get(e)).startTime,i=i.requestCount,Date.now()-o>1e3*n)?(this._cmdReqInfoMap.set(e,{startTime:Date.now(),requestCount:1}),!1):(this._cmdReqInfoMap.set(e,{startTime:o,requestCount:i+=1}),t=this._expiredTime}},{key:\"fetchConfig\",value:function(){var o,i=this,a=\"\".concat(this._n,\".fetchConfig\"),e=this._canFetch();M.l(\"\".concat(a,\" canFetch:\").concat(e)),e&&(o=new G(\"fetchCloudCtrlConfig\"),e=this.get(12).getSDKAppID(),this._isFetching=!0,this.req({P:k.FETCH_CLOUD_CTRL_CONFIG,data:{SDKAppID:e,version:this._version}}).then(function(e){i._isFetching=!1;var t=e.data,n=t.version,t=t.cloudControlConfig;o.setMessage(\"version:\".concat(i._version,\" newVersion:\").concat(n,\" config:\").concat(t)).end(),M.l(\"\".concat(a,\" ok\")),i._parse(e.data)}).catch(function(e){i._isFetching=!1,o.setError(e).end(),M.l(\"\".concat(a,\" failed. error:\"),e),i._setExpiredTime(12e4)}))}},{key:\"onPushedConfig\",value:function(e){M.l(\"\".concat(this._n,\".onPushedConfig config:\"),e),new G(\"pushedCloudCtrlConfig\").setMessage(\"newVersion:\".concat(e.version,\" config:\").concat(e.cloudControlConfig)).end(),this._parse(e)}},{key:\"onCheckTimer\",value:function(e){this._canFetch()&&this.fetchConfig()}},{key:\"_parse\",value:function(e){var t=this,n=\"\".concat(this._n,\"._parse\"),o=e.errorCode,i=e.errorMessage,a=e.cloudControlConfig,s=e.version,r=e.expiredTime;if(0===o){if(this._version!==s){var c=null;try{c=JSON.parse(a)}catch(e){this.isPrivateNetWork()||M.e(\"\".concat(n,\" failed. config:\"),a)}c&&(this._cloudConfig.clear(),Object.keys(c).forEach(function(e){t._cloudConfig.set(e,c[e])}),this._version=s,this.emitIEvt(P.CLOUD_CONFIG))}this._setExpiredTime(1e3*r)}else N(o)?(M.l(\"\".concat(n,\" failed. Invalid message format:\"),e),this._setExpiredTime(36e5)):(M.e(\"\".concat(n,\" errorCode:\").concat(o,\" errorMessage:\").concat(i)),this._setExpiredTime(12e4))}},{key:\"_setExpiredTime\",value:function(e){this._expiredTime=Date.now()+e}},{key:\"reset\",value:function(){M.l(\"\".concat(this._n,\".reset\")),this._cloudConfig.clear(),this._expiredTime=0,this._version=0,this._isFetching=!1}}]),Yr),Bs=(t(Kr,u),Fs=n(Kr),e(Kr,[{key:\"start\",value:function(){this._recoverGroupChat(),this._recoverC2CChat()}},{key:\"_recoverGroupChat\",value:function(){var n,o,i,a,s=this,e=this._getLocalConvList().filter(function(e){return e.type===A.CONV_GROUP&&e.groupProfile.type!==A.GRP_AVCHATROOM}),r=this.get(11),c=[];e.forEach(function(e){var t=e.conversationID,e=e.lastMessage;n=t.replace(A.CONV_GROUP,\"\"),o=r.getLocalLastMessage(t),e&&0!==e.lastSequence&&o&&(i=e.lastSequence,o=o.sequence,a=i-o,0n[0])&&a\",e[i].tag)}this.timestamp=Date.now(),o.length=0}},{key:\"updateProfile\",value:function(e){this.profile=JSON.parse(JSON.stringify(e)),this.timestamp=Date.now()}},{key:\"addToGroupList\",value:function(e){-1===this.groupList.indexOf(e)&&(this.groupList.push(e),this.count=this.groupList.length)}},{key:\"removeFromGroupList\",value:function(e){e=this.groupList.indexOf(e);-1 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(\"\"); }, 1000); postMessage(interval); } else if (event.data === \"stop\") { clearInterval(interval); interval = -1; }};'],{type:\"application/javascript; charset=utf-8\"})),this._workerTimer=new Worker(e),(t=this)._workerTimer.onmessage=function(e){e.data?(t._timerID=e.data,M.l(\"\".concat(t._n,\"._init seed:\").concat(t._timerID))):t._m.onCheckTimer()})}},{key:\"_onCloudConfig\",value:function(){var e=this.getCloudConfig(\"enable_worker\");M.l(\"\".concat(this._n,\"._onCloudConfig enableWorker:\").concat(e)),N(e)||\"1\"===e?!this._isWorkerEnabled&&Ge&&(this._isWorkerEnabled=!0,this.startWorkerTimer(),this._m.onWorkerTimerEnabled()):this._isWorkerEnabled&&Ge&&(this._isWorkerEnabled=!1,this.stopWorkerTimer(),this._m.onWorkerTimerDisabled())}},{key:\"terminate\",value:function(){M.l(\"\".concat(this._n,\".terminate\")),this._workerTimer&&(this._workerTimer.terminate(),this._workerTimer=null,this._timerID=-1)}},{key:\"getTimerID\",value:function(){return this._timerID}},{key:\"reset\",value:function(){M.l(\"\".concat(this._n,\".reset\"))}}]),Nr),or=(e(Or,[{key:\"isValidPurchaseBits\",value:function(e){return e&&\"string\"==typeof e&&1<=e.length&&e.length<=64&&/[01]{1,64}/.test(e)}},{key:\"parsePurchaseBits\",value:function(e){if(this.isValidPurchaseBits(e)){this._featureMap.clear();for(var t,n=e.length-1,o=0;0<=n;n--,o++)t=(o<32?new ee(0,Math.pow(2,o)):new ee(Math.pow(2,o-32),0)).toString(),\"1\"===e[n]?this._featureMap.set(t,!0):this._featureMap.set(t,!1)}else M.w(\"\".concat(this._n,\".parsePurchaseBits invalid purchasebits:\").concat(e))}},{key:\"hasPurchasedFeature\",value:function(e){return!!this._featureMap.get(e)}},{key:\"isFeatureEnabled\",value:function(e){for(var t=parseInt(e).toString(2),n=void 0,o=!0,i=t.length-1,a=0;0<=i;i--,a++)if(\"1\"===t.charAt(i)&&(n=(a<32?new ee(0,Math.pow(2,a)):new ee(Math.pow(2,a-32),0)).toString(),!this._featureMap.get(n))){o=!1;break}return M.l(\"\".concat(this._n,\".isFeatureEnabled decimalNumber:\").concat(e,\" key:\").concat(n,\" ret:\").concat(o)),T({enabled:o})}},{key:\"isFeatureEnabledForStat\",value:function(e){for(var t=parseInt(e).toString(2),n=t.length-1,o=0;0<=n;n--,o++)if(\"1\"===t.charAt(n)){if(i=(o<32?new ee(0,Math.pow(2,o)):new ee(Math.pow(2,o-32),0)).toString(),!this._featureMap.get(i))break;var i,a=\"\",s=0;i===_.PLUGIN_TRANSLATE?(a=\"plugin_translate\",s=16):i===_.PLUGIN_VOICE_TO_TEXT?(a=\"plugin_voice_to_text\",s=17):i===_.PLUGIN_CS?(a=\"plugin_cs\",s=14):i===_.PLUGIN_PUSH?(a=\"plugin_push\",s=13):i===_.PLUGIN_BOT?(a=\"plugin_bot\",s=15):i===_.MSG_REACTION&&(a=\"plugin_emoji_reaction\",s=18),\"\"!==a&&(i=this._commercialConfigM.get(12).getUIPlatform(),new G(a).setCode(s).setUIPlatform(i).end(),M.l(\"\".concat(this._n,\".isFeatureEnabledForStat \").concat(a,\" code:\").concat(s,\" uiPlatform:\").concat(i)))}}},{key:\"isSearchCloudMessagesEnabled\",value:function(){var e;this._isSCMReported||(e=this._commercialConfigM.get(12).getUIPlatform(),new G(\"plugin_search\").setCode(6).setUIPlatform(e).end(),this._isSCMReported=!0)}},{key:\"clear\",value:function(){this._featureMap.clear(),this._isSCMReported=!1}}]),Or),ir=(e(Rr,[{key:\"_canFetch\",value:function(){return this.get(12).isLoggedIn()?!this._isFetching&&Date.now()>=this._expiredTime:(this._expiredTime=Date.now()+2e3,!1)}},{key:\"onCheckTimer\",value:function(e){this._canFetch()&&this.fetchConfig()}},{key:\"fetchConfig\",value:function(){var t,e,n=this,o=this._canFetch(),i=\"\".concat(this._n,\".fetchConfig\");M.l(\"\".concat(i,\" canFetch:\").concat(o)),o&&(t=new G(\"fetchCommercialConfig\"),o=this.get(12).getSDKAppID(),e=this.get(20),this._isFetching=!0,e.req({P:k.FETCH_COMMERCIAL_CONFIG,data:{SDKAppID:o}}).then(function(e){t.setMessage(\"purchaseBits:\".concat(e.data.purchaseBits)).end(),M.l(\"\".concat(i,\" ok.\")),n._parseConfig(e.data),n._isFetching=!1}).catch(function(e){t.setError(e).end(),n._isFetching=!1}))}},{key:\"onPushedConfig\",value:function(e){var t=\"\".concat(this._n,\".onPushedConfig data:\").concat(JSON.stringify(e));M.l(\"\".concat(t)),new G(\"pushedCommercialConfig\").setMessage(\"purchaseBits:\".concat(e.purchaseBits)).end(),this._parseConfig(e)}},{key:\"_parseConfig\",value:function(e){var t=\"\".concat(this._n,\"._parseConfig\"),n=e.errorCode,o=e.errorMessage,i=e.purchaseBits,a=e.expiredTime;0===n?(this._purchasedFeatureHandler.parsePurchaseBits(i),this._expiredTime=Date.now()+1e3*a):N(n)?(M.l(\"\".concat(t,\" failed. Invalid message format:\"),e),this._setExpiredTimeOnResponseError(36e5)):(M.e(\"\".concat(t,\" errorCode:\").concat(n,\" errorMessage:\").concat(o)),this._setExpiredTimeOnResponseError(12e4))}},{key:\"_setExpiredTimeOnResponseError\",value:function(e){this._expiredTime=Date.now()+e}},{key:\"canIUse\",value:function(e){return this._purchasedFeatureHandler.hasPurchasedFeature(e)}},{key:\"isFeatureEnabled\",value:function(e){return this._purchasedFeatureHandler.isFeatureEnabled(e)}},{key:\"isFeatureEnabledForStat\",value:function(e){this._purchasedFeatureHandler.isFeatureEnabledForStat(e)}},{key:\"isSearchCloudMessagesEnabled\",value:function(){this._purchasedFeatureHandler.isSearchCloudMessagesEnabled()}},{key:\"get\",value:function(e){return this._m.get(e)}},{key:\"reset\",value:function(){M.l(\"\".concat(this._n,\".reset\")),this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler.clear()}}]),Rr),ar=(t(Ar,u),Ps=n(Ar),e(Ar,[{key:\"registerPlugin\",value:function(e){var t,n,o,i,a,s,r,c,u,l,d,p,_;Ie?(this._offlinePushPlugin=e[\"tim-offline-push-plugin\"],t=(_=e.offlinePushConfig||{}).huaweiBusinessID,n=_.xiaomiBusinessID,o=_.xiaomiAppID,i=_.xiaomiAppKey,a=_.meizuBusinessID,s=_.meizuAppID,r=_.meizuAppKey,c=_.vivoBusinessID,u=_.oppoBusinessID,l=_.oppoAppKey,d=_.oppoAppSecret,p=_.honorBusinessID,_=_.iosBusinessID,this._androidPushConfig.huaweiPushBussinessId=t,this._androidPushConfig.xiaomiPushBussinessId=n,this._androidPushConfig.xiaomiPushAppId=o,this._androidPushConfig.xiaomiPushAppKey=i,this._androidPushConfig.meizuPushBussinessId=a,this._androidPushConfig.meizuPushAppId=s,this._androidPushConfig.meizuPushAppKey=r,this._androidPushConfig.vivoPushBussinessId=c,this._androidPushConfig.oppoPushBussinessId=u,this._androidPushConfig.oppoPushAppKey=l,this._androidPushConfig.oppoPushAppSecret=d,this._androidPushConfig.honorPushBussinessId=p,new G(\"registerPlugin\").setMessage(\"tim-offline-push-plugin\").setMoreMessage(\"isExist:\".concat(!N(this._offlinePushPlugin))).end(!0),M.l(\"\".concat(this._n,\".\").concat(\"registerPlugin\",\" ok. offlinePushConfig:\").concat(JSON.stringify(e.offlinePushConfig))),this._iosBusinessID=_,this._setAppShowListener()):this.warn(\"OfflinePushInUniapp\")}},{key:\"init\",value:function(){this._isWebUniapp=this.getUniAppPlatform(),this._getDeviceToken()}},{key:\"_getDeviceToken\",value:function(){var c,u=this,l=\"\".concat(this._n,\".\").concat(\"_getDeviceToken\");lt(this._offlinePushPlugin.getDeviceToken)?(c=\"androidPushConfig:\".concat(JSON.stringify(this._androidPushConfig),\", iosBusinessID:\").concat(this._iosBusinessID),M.l(\"\".concat(l,\" start. \").concat(c)),new G(\"_getDeviceToken\").setMessage(\"\".concat(c)).end(!0),this._offlinePushPlugin.getDeviceToken(this._androidPushConfig,function(e){var t,n,o,i,a=new G(\"getDeviceTokenRes\"),s=e.code,r=e.msg;0===s?(t=(i=e.data).deviceToken,n=i.deviceBrand,o=i.deviceType,i=i.bussinessId,u._deviceToken=t,u._businessID=i||u._iosBusinessID,c=\"deviceToken:\".concat(t,\", deviceBrand:\").concat(n||o,\", businessID:\").concat(u._businessID),M.l(\"\".concat(l,\" ok. \").concat(c)),a.setMessage(c).end(!0),u._setToken()):(a.setMessage(\"code:\".concat(s,\", msg:\").concat(r)).end(!0),M.e(\"\".concat(l,\" failed. error:\"),e))})):M.e(\"\".concat(l,\" getDeviceToken is not a function\"))}},{key:\"canIUseOfflinePush\",value:function(){return Ie&&!N(this._offlinePushPlugin)}},{key:\"_setAppShowListener\",value:function(){var t=this,n=\"\".concat(this._n,\".\").concat(\"_setAppShowListener\");N(this._offlinePushPlugin)?M.e(\"\".concat(n,\" offlinePushPlugin is undefined\")):lt(this._offlinePushPlugin.setAppShowListener)?(new G(\"_setAppShowListener\").end(!0),M.l(\"\".concat(n,\" start\")),this._offlinePushPlugin.setAppShowListener(function(e){e=(e||{}).appShow;new G(\"setAppShowListenerRes\").setMessage(\"appShow:\".concat(e)).end(!0),M.l(\"\".concat(n,\" ok. appShow:\").concat(e)),t._m.isReady()&&(0===e?(t._getConvUnreadCount(),t._onBackground()):1===e&&t._onForeground())})):M.e(\"\".concat(n,\" setAppShowListener is not a function\"))}},{key:\"getDeviceBrand\",value:function(){var e;if(!N(this._offlinePushPlugin)&<(this._offlinePushPlugin.getDeviceType))return e=(this._offlinePushPlugin.getDeviceType()||{}).deviceType,M.l(\"\".concat(this._n,\".getDeviceBrand ok. deviceType:\").concat(e)),e}},{key:\"_setToken\",value:function(){var t=\"\".concat(this._n,\"._setToken\"),e=this.get(12),n=1,o=\"\",i=\"\",a=(S(this._deviceToken)&&(n=0),this.getUniAppPlatform()),s=this.getDeviceBrand(),r=(a===ne.IOS||a===ne.IPAD||a===ne.MAC?i=this._deviceToken:a===ne.ANDROID&&(o=this._deviceToken),new G(\"offlinePushSetToken\")),a=\"deviceToken:\".concat(i||o,\", businessID:\").concat(this._businessID,\", \")+\"deviceBrand:\".concat(s,\", isWebUniapp:\").concat(this._isWebUniapp,\", pushMsg:\").concat(n,\", platform:\").concat(a);return r.setMessage(\"\".concat(a)),M.l(\"\".concat(t,\" \").concat(a)),this.req({P:k.SET_TOKEN,data:{tokenID:o,pushMsg:n,sdkAppID:e.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:s,deviceToken:i,isWebUniapp:this._isWebUniapp}}).then(function(e){return r.end(),M.l(\"\".concat(t,\" ok\")),e}).catch(function(e){return r.setError(e).end(),M.e(\"\".concat(t,\" failed. error:\"),e),D(e)})}},{key:\"_getConvUnreadCount\",value:function(){var t=this;this._c2cUnreadCount=0,this._groupUnreadCount=0,this.get(11).getLocalConvList().forEach(function(e){e.type===A.CONV_C2C&&(t._c2cUnreadCount+=e.unreadCount),e.type===A.CONV_GROUP&&(t._groupUnreadCount+=e.unreadCount)})}},{key:\"_onBackground\",value:function(){var t=this,n=\"\".concat(this._n,\".\").concat(\"_onBackground\"),o=new G(\"_onBackground\");this.req({P:k.STAT_BACKGROUND,data:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then(function(e){return o.setMessage(\"c2cUnreadCount: \".concat(t._c2cUnreadCount,\", groupUnreadCount: \").concat(t._groupUnreadCount)).end(),M.l(\"\".concat(n,\" ok\")),e}).catch(function(e){o.setError(e).end(),M.e(\"\".concat(n,\" failed. error:\"),e)})}},{key:\"_onForeground\",value:function(){var t=\"\".concat(this._n,\".\").concat(\"_onForeground\"),n=new G(\"_onForeground\");this.req({P:k.STAT_FOREGROUND,data:{isWebUniapp:this._isWebUniapp}}).then(function(e){return n.end(),M.l(\"\".concat(t,\" ok\")),e}).catch(function(e){n.setError(e).end(),M.e(\"\".concat(t,\" failed. error:\"),e)})}},{key:\"getUniAppPlatform\",value:function(){var e=uni.getSystemInfoSync().platform,t=this.getDeviceBrand();return\"ios\"===e?ne.IOS:\"android\"===e?ne.ANDROID:1002===t?ne.IPAD:1001===t?ne.MAC:void 0}},{key:\"reset\",value:function(){this._deviceToken=\"\",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,M.l(\"\".concat(this._n,\".reset\"))}}]),Ar),sr=(t(kr,u),Gs=n(kr),e(kr,[{key:\"registerPlugin\",value:function(e){var t,n,o;Ie?(t=\"\".concat(this._n,\".\").concat(\"registerPlugin\"),this._pushPlugin=e[\"tim-push\"],this._getDeviceInfo(),n=(o=e.pushConfig||{}).androidConfig,o=o.iOSConfig,ut(n)&&(this._androidPushConfig=n[this._deviceInfo.packageName]),n=(o||{}).iOSBusinessID,this._iOSBusinessID=n,o=!N(this._pushPlugin),new G(\"registerPlugin\").setMessage(this._pluginName).setMoreMessage(\"isExisted:\".concat(o)).end(!0),M.l(\"\".concat(t,\" ok. pushConfig:\").concat(JSON.stringify(e.pushConfig))),o?(this._setAppShowListener(),this._setPushEventReportListener()):M.e(\"\".concat(t,\" \").concat(this._pluginName,\" is undefined\"))):this.warn(\"TIMPushInUniapp\")}},{key:\"init\",value:function(){this._isWebUniapp=this.getUniAppPlatform(),this._reportEventCacheList(),this._getDeviceToken(),this.get(27).isFeatureEnabledForStat(Math.pow(2,41))}},{key:\"_reportEventCacheList\",value:function(){var a=this,s=\"\".concat(this._n,\".\").concat(\"_reportEventCacheList\");lt(this._pushPlugin.getPushEventCacheList)?(new G(\"_reportEventCacheList\").end(!0),this._pushPlugin.getPushEventCacheList(function(e){var t=e.code,n=e.data.eventList,o=new G(\"getPushEventCacheListRes\");if(o.setCode(t),0!==t)o.setMessage(\"res:\".concat(JSON.stringify(e))).end(!0),M.e(\"\".concat(s,\" failed. error:\").concat(JSON.stringify(e)));else{t=n.length<10?\"eventList:\".concat(JSON.stringify(n)):\"eventList.length:\".concat(n.length);M.l(\"\".concat(s,\" ok. \").concat(t)),o.setMessage(t).end(!0);for(var i=y(y({},e.data),{},{eventList:[]});0=this._expiredTime&&this._getLexicon()}},{key:\"filterMessage\",value:function(e,t){var n=!0;if(this._plugin&&this._canIUseLexicon&&(!t||!t.messageControlInfo||!0!==t.messageControlInfo.excludedFromContentModeration)){var t=e.type,o=e.conversationType;if(t===A.MSG_TEXT||t===A.MSG_CUSTOM){var i,a=\"\".concat(this._n,\".filterMessage\");if(M.l(\"\".concat(a)),t===A.MSG_TEXT){if(o===A.CONV_C2C?i=\"c2c_text_message\":o===A.CONV_GROUP&&(i=\"group_text_message\"),!this._isConfigOn(i))return n;var s=this._plugin.filter(e.payload.text),r=s.type,s=s.modifiedText;1===r?n=!1:2===r&&(e.payload.text=s)}else if(t===A.MSG_CUSTOM){if(o===A.CONV_C2C?i=\"c2c_custom_message\":o===A.CONV_GROUP&&(i=\"group_custom_message\"),!this._isConfigOn(i))return n;r=this._plugin.filter(e.payload.data),s=this._plugin.filter(e.payload.description),t=this._plugin.filter(e.payload.extension);1===r.type||1===s.type||1===t.type?n=!1:(2===r.type&&(e.payload.data=r.modifiedText),2===s.type&&(e.payload.description=s.modifiedText),2===t.type&&(e.payload.extension=t.modifiedText))}M.l(\"\".concat(a,\" done. isAllowedToSend:\").concat(n))}}return n}},{key:\"filterText\",value:function(e,t){var n=\"\".concat(this._n,\".filterText\"),o={isAllowedToSend:!0,modifiedText:e};return this._plugin&&this._canIUseLexicon&&this._isConfigOn(t)&&(M.l(\"\".concat(n)),e=(t=this._plugin.filter(e)).type,t=t.modifiedText,1===e?o.isAllowedToSend=!1:2===e&&(o.modifiedText=t),M.l(\"\".concat(n,\" done. ret:\"),o)),o}},{key:\"_getLexicon\",value:function(){var l=this,d=new G(\"profanityFilter\"),p=\"\".concat(this._n,\"._getLexicon\");this._isFetching=!0,this.req({P:k.GET_PROFANITY_LIST,data:{startIndex:this._startIndex,version:this._version}}).then(function(e){var e=e.data,t=e.errorInfo,n=e.filterConfig,o=e.lexicon,i=e.strToken,a=e.completeFlag,s=e.nextStartIndex,r=e.version,e=e.expiredTime,c=t.errorCode,u=t.errorMessage;return 0!==c?(l._isFetching=!1,M.w(\"\".concat(p,\" failed. error:\"),t),void d.setCode(c).setMessage(u).end()):(l._onFilterConfig(n),l._getToken(i),1===a?(M.l(\"\".concat(p,\" done. version:\").concat(r,\" expiredTime:\").concat(e)),l._version=r,l._canIUseLexicon=!0,l._isFetching=!1,l._expiredTime=Date.now()+1e3*e,void l._plugin.onLexiconCompleted(o)):(l._startIndex=s,l._plugin.onLexiconSliced(o),void l._getLexicon()))}).catch(function(e){d.setError(e).end(),l._isFetching=!1,M.l(\"\".concat(p,\" failed. error:\"),e)})}},{key:\"_onFilterConfig\",value:function(t){var n=this;S(t)||(this._filterConfigMap.clear(),Object.keys(t).forEach(function(e){n._filterConfigMap.set(e,t[e])}),M.l(\"\".concat(this._n,\"._onFilterConfig. keys:\").concat(Array.from(this._filterConfigMap.keys()),\" values:\").concat(Array.from(this._filterConfigMap.values()))))}},{key:\"_isConfigOn\",value:function(e){return 1===this._filterConfigMap.get(e)}},{key:\"_getToken\",value:function(e){if(m(e)){var t=e.length,n=\"\";if(t%2==0)for(var o=0;o<=t-1;o+=2)n=(n+=e[o+1])+e[o];else{for(var i=0;i=this.STORAGE_EXPIRES_TIME,e=!e||\"3.4.7\"!==e;return M.l(\"\".concat(this._n,\"._needToUpdate isTimeout:\").concat(t,\" isDifferentVersion:\").concat(e)),t||e}},{key:\"_fetch\",value:function(){var e,t,n,o,i,a;this._m.get(12).isPrivateNetWork()||(e=\"https://web.sdk.qcloud.com/im/download/error-message/v3/0.0.6/tim-error-message.txt\",t=\"application/x-www-form-urlencoded;charset=UTF-8\",n=\"\".concat(this._n,\"._fetch ok in\"),o=this,v?I.request({url:e,method:\"GET\",timeout:3e3,header:{\"content-type\":t},dataType:\"text\",success:function(e){o._fillAndSave(e.data),M.l(\"\".concat(n,\" mini program\"))},fail:function(){}}):(i=new XMLHttpRequest,a=setTimeout(function(){i.abort()},3e3),i.onreadystatechange=function(){4===i.readyState&&(clearTimeout(a),200!==i.status&&304!==i.status||(M.l(\"\".concat(n,\" browser\")),o._fillAndSave(i.responseText)))},i.open(\"GET\",e,!0),i.setRequestHeader(\"Content-type\",t),i.send()))}},{key:\"_fillAndSave\",value:function(e){this._fillMap(e),this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE,JSON.stringify({message:e,localSavedTime:(new Date).getTime(),localSavedVersion:\"3.4.7\"}),!0,!1)}},{key:\"_getStorageModule\",value:function(){return this._m.get(13)}},{key:\"_fillMap\",value:function(e){this._map.clear();for(var t,n,o=e.split(\";\\n\"),i=o.length,a=new RegExp(/'/g),s=0;sBe()-this.EXPIRED_TIME}},{key:\"_createPromiseList\",value:function(e){for(var t=[],n=0;nthis.MAX_COUNT?this.MAX_COUNT:e,this._clearFollowList())}},{key:\"clearCacheOnReconnected\",value:function(){this._clearFollowList(),this._followType.clear()}},{key:\"onFollowNotify\",value:function(e){var i=this,e=e.dataList||[];M.l(\"\".concat(this._n,\".onFollowNotify followChangeList:\").concat(e.length)),e.forEach(function(e){var t=e.followDiffList,t=void 0===t?[]:t,o=K(e,mr);t.forEach(function(e){var t=e.isAdd,e=e.followType,e=void 0===e?[]:e,n=i._initFollowInfo();n[e].userInfoList.push(o),n[e].isAdd=1===t,i._emitEvent(n)})})}},{key:\"_initFollowInfo\",value:function(){var t={};return Object.values(vr).forEach(function(e){e!==vr.NONE&&(t[e]={userInfoList:[],isAdd:!1})}),t}},{key:\"_emitEvent\",value:function(n){var o=this;Object.keys(n).forEach(function(e){var e=Number(e),t=n[e];0\",t[s].tag)}this.profile=new ei(y(y({},n),{},{profileCustomField:o}))}function Fr(e){d(this,Fr),this._snsM=e,this._n=\"FriendApplicationHandler\",this._startTime=0,this._maxLimited=100,this._currentSeq=0,this._map=new Map,this._unreadCount=0}function qr(e){d(this,qr),(e=ws.call(this,e))._n=\"QualityStatModule\",e.TAG=\"im-ssolog-quality-stat\",e.reportIndex=0,e.wholePeriod=!1,e._qualityItems=[xn,Vn,Hn,Bn,Kn,Yn,Wn,jn,Jn,zn],e._messageSentItems=[Hn,Bn,Kn,Yn,Wn],e._messageReceivedItems=[jn,Jn,zn],e.REPORT_INTERVAL=120,e.REPORT_SDKAPPID_BLACKLIST=[],e.REPORT_TINYID_WHITELIST=[],e._statInfoArr=[],e._avgRTT=new Ys,e._avgE2EDelay=new Ks,e._rateMessageSent=new Ws,e._rateMessageReceived=new js;var t=e.getIEmitInst();return t.on(P.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,i(e)),t.on(P.CLOUD_CONFIG,e._onCloudConfig,i(e)),e}function xr(){d(this,xr),this._lastMap=new Map,this._currentMap=new Map}function Vr(){d(this,Vr),this._map=new Map}function Hr(){d(this,Hr),this._n=\"AvgRTT\",this._requestCount=0,this._rttArray=[]}function Br(){d(this,Br),this._n=\"AvgE2EDelay\",this._e2eDelayArray=[]}function Kr(e){return d(this,Kr),(e=Fs.call(this,e))._n=\"RecoverMsgModule\",e.PULL_LIMIT_COUNT=15,e}function Yr(e){return d(this,Yr),(e=qs.call(this,e))._n=\"CloudControlModule\",e._cloudConfig=new Map,e._expiredTime=0,e._version=0,e._isFetching=!1,e}function Wr(e){return d(this,Wr),(e=xs.call(this,e))._n=\"SessionModule\",e._platform=e.getPlatform(),e._pHandler=new hs(i(e)),e._msgDispatcher=new fs(i(e)),e._cmdFreqLimitMap=new Map,e._cmdReqInfoMap=new Map,e._serverOverloadInfoMap=new Map,e._incrementalPullContactFlag=!0,e._init(),e.getIEmitInst().on(P.CLOUD_CONFIG,e._onCloudConfig,i(e)),e}ie.assign,ie.shrinkBuf,ie.setTyped,ie.Buf8,ie.Buf16,ie.Buf32;function jr(e,t,n,o){for(var i=65535&e|0,a=e>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3>>8^i[255&(e^t[s])];return-1^e}function zr(e,t,n,o,i,a,s,r){for(var c,u,l,d,p,_,h,g,f,m=r.bits,v=0,I=0,M=0,y=0,C=0,T=0,D=0,E=0,L=0,S=0,k=null,A=0,R=new ie.Buf16(16),O=new ie.Buf16(16),N=null,G=0,v=0;v<=15;v++)R[v]=0;for(I=0;I_?(g=N[G+s[I]],k[A+s[I]]):(g=96,0),c=1<<(h=v-D),M=u=1<>D)+(u-=c)]=h<<24|g<<16|f|0,0!==u;);for(c=1<>=1;if(0!==c?S=(S&c-1)+c:S=0,I++,0==--R[v]){if(v===y)break;v=t[n+s[I]]}if(C>>1:n>>>1;e[t]=n}return e}(),Zr=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Qr=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],$r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ec=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function tc(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function nc(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ie.Buf16(320),this.work=new ie.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function oc(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ie.Buf32(852),t.distcode=t.distdyn=new ie.Buf32(592),t.sane=1,t.back=-1,0):-2}function ic(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,oc(e)):-2}function ac(e,t){var n,o;return!e||!e.state||(o=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=e.wsize?(ie.arraySet(e.window,t,n-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>o&&(i=o),ie.arraySet(e.window,t,n-o,i,e.wnext),(o-=i)?(ie.arraySet(e.window,t,n-o,o,0),e.wnext=o,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave>>8&255,t.check=Jr(t.check,M,2,0),c=r=0,t.mode=2;else if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&r)<<8)+(r>>8))%31)e.msg=\"incorrect header check\",t.mode=30;else if(8!=(15&r))e.msg=\"unknown compression method\",t.mode=30;else{if(c-=4,g=8+(15&(r>>>=4)),0===t.wbits)t.wbits=g;else if(g>t.wbits){e.msg=\"invalid window size\",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&(M[0]=255&r,M[1]=r>>>8&255,t.check=Jr(t.check,M,2,0)),c=r=0,t.mode=3;case 3:for(;c<32;){if(0===a)break e;a--,r+=n[o++]<>>8&255,M[2]=r>>>16&255,M[3]=r>>>24&255,t.check=Jr(t.check,M,4,0)),c=r=0,t.mode=4;case 4:for(;c<16;){if(0===a)break e;a--,r+=n[o++]<>8),512&t.flags&&(M[0]=255&r,M[1]=r>>>8&255,t.check=Jr(t.check,M,2,0)),c=r=0,t.mode=5;case 5:if(1024&t.flags){for(;c<16;){if(0===a)break e;a--,r+=n[o++]<>>8&255,t.check=Jr(t.check,M,2,0)),c=r=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&((l=(l=t.length)>a?a:l)&&(t.head&&(g=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),ie.arraySet(t.head.extra,n,o,l,g)),512&t.flags&&(t.check=Jr(t.check,n,l,o)),a-=l,o+=l,t.length-=l),t.length))break e;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===a)break e;for(l=0;g=n[o+l++],t.head&&g&&t.length<65536&&(t.head.name+=String.fromCharCode(g)),g&&l>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=12;break;case 10:for(;c<32;){if(0===a)break e;a--,r+=n[o++]<>>=7&c,c-=7&c,t.mode=27;else{for(;c<3;){if(0===a)break e;a--,r+=n[o++]<>>=1)){case 0:t.mode=14;break;case 1:y=C=void 0;var y,C=t;if(uc){for(rc=new ie.Buf32(512),cc=new ie.Buf32(32),y=0;y<144;)C.lens[y++]=8;for(;y<256;)C.lens[y++]=9;for(;y<280;)C.lens[y++]=7;for(;y<288;)C.lens[y++]=8;for(zr(1,C.lens,0,288,rc,0,C.work,{bits:9}),y=0;y<32;)C.lens[y++]=5;zr(2,C.lens,0,32,cc,0,C.work,{bits:5}),uc=!1}if(C.lencode=rc,C.lenbits=9,C.distcode=cc,C.distbits=5,t.mode=20,6!==b)break;r>>>=2,c-=2;break e;case 2:t.mode=17;break;case 3:e.msg=\"invalid block type\",t.mode=30}r>>>=2,c-=2}break;case 14:for(r>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,r+=n[o++]<>>16^65535)){e.msg=\"invalid stored block lengths\",t.mode=30;break}if(t.length=65535&r,c=r=0,t.mode=15,6===b)break e;case 15:t.mode=16;case 16:if(l=t.length){if(0===(l=s<(l=a>>=5,c-=5,t.ndist=1+(31&r),r>>>=5,c-=5,t.ncode=4+(15&r),r>>>=4,c-=4,286>>=3,c-=3}for(;t.have<19;)t.lens[B[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,m={bits:t.lenbits},f=zr(0,t.lens,0,19,t.lencode,0,t.work,m),t.lenbits=m.bits,f){e.msg=\"invalid code lengths set\",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,_=65535&I,!((d=I>>>24)<=c);){if(0===a)break e;a--,r+=n[o++]<>>=d,c-=d,t.lens[t.have++]=_;else{if(16===_){for(v=d+2;c>>=d,c-=d,0===t.have){e.msg=\"invalid bit length repeat\",t.mode=30;break}g=t.lens[t.have-1],l=3+(3&r),r>>>=2,c-=2}else if(17===_){for(v=d+3;c>>=d)),r>>>=3,c=c-d-3}else{for(v=d+7;c>>=d)),r>>>=7,c=c-d-7}if(t.have+l>t.nlen+t.ndist){e.msg=\"invalid bit length repeat\",t.mode=30;break}for(;l--;)t.lens[t.have++]=g}}if(30===t.mode)break;if(0===t.lens[256]){e.msg=\"invalid code -- missing end-of-block\",t.mode=30;break}if(t.lenbits=9,m={bits:t.lenbits},f=zr(1,t.lens,0,t.nlen,t.lencode,0,t.work,m),t.lenbits=m.bits,f){e.msg=\"invalid literal/lengths set\",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,m={bits:t.distbits},f=zr(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,m),t.distbits=m.bits,f){e.msg=\"invalid distances set\",t.mode=30;break}if(t.mode=20,6===b)break e;case 20:t.mode=21;case 21:if(6<=a&&258<=s){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=a,t.hold=r,t.bits=c,G=Y=k=S=L=E=D=T=oe=ne=te=ee=U=P=$=Q=Z=X=z=J=j=N=W=O=R=void 0;var T,D,E,L,S,k,A=e,K=u,R=A.state,O=A.next_in,Y=A.input,W=O+(A.avail_in-5),N=A.next_out,G=A.output,j=N-(K-A.avail_out),J=N+(A.avail_out-257),z=R.dmax,X=R.wsize,Z=R.whave,Q=R.wnext,$=R.window,P=R.hold,U=R.bits,ee=R.lencode,te=R.distcode,ne=(1<>>=D=T>>>24,U-=D,0==(D=T>>>16&255))G[N++]=65535&T;else{if(!(16&D)){if(0==(64&D)){T=ee[(65535&T)+(P&(1<>>=D,U-=D),U<15&&(P+=Y[O++]<>>=D=T>>>24,U-=D,!(16&(D=T>>>16&255))){if(0==(64&D)){T=te[(65535&T)+(P&(1<z){A.msg=\"invalid distance too far back\",R.mode=30;break t}if(P>>>=D,U-=D,L>(D=N-j)){if((D=L-D)>Z&&R.sane){A.msg=\"invalid distance too far back\",R.mode=30;break t}if(k=$,(S=0)===Q){if(S+=X-D,D>3,P&=(1<<(U-=E<<3))-1,A.next_in=O,A.next_out=N,A.avail_in=O>>16&255,_=65535&I,!((d=I>>>24)<=c);){if(0===a)break e;a--,r+=n[o++]<>h)])>>>16&255,_=65535&I,!(h+(d=I>>>24)<=c);){if(0===a)break e;a--,r+=n[o++]<>>=h,c-=h,t.back+=h}if(r>>>=d,c-=d,t.back+=d,t.length=_,0===p){t.mode=26;break}if(32&p){t.back=-1,t.mode=12;break}if(64&p){e.msg=\"invalid literal/length code\",t.mode=30;break}t.extra=15&p,t.mode=22;case 22:if(t.extra){for(v=t.extra;c>>=t.extra,c-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;p=(I=t.distcode[r&(1<>>16&255,_=65535&I,!((d=I>>>24)<=c);){if(0===a)break e;a--,r+=n[o++]<>h)])>>>16&255,_=65535&I,!(h+(d=I>>>24)<=c);){if(0===a)break e;a--,r+=n[o++]<>>=h,c-=h,t.back+=h}if(r>>>=d,c-=d,t.back+=d,64&p){e.msg=\"invalid distance code\",t.mode=30;break}t.offset=_,t.extra=15&p,t.mode=24;case 24:if(t.extra){for(v=t.extra;c>>=t.extra,c-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg=\"invalid distance too far back\",t.mode=30;break}t.mode=25;case 25:if(0===s)break e;if(t.offset>(l=u-s)){if((l=t.offset-l)>t.whave&&t.sane){e.msg=\"invalid distance too far back\",t.mode=30;break}q=l>t.wnext?(l-=t.wnext,t.wsize-l):t.wnext-l,l>t.length&&(l=t.length),x=t.window}else x=w,q=i-t.offset,l=t.length;for(s-=l=s>10&1023,a[s++]=56320|1023&n)}var c=a,u=s;if(u<65534&&(c.subarray&&_c||!c.subarray&&pc))return String.fromCharCode.apply(null,ie.shrinkBuf(c,u));for(var l=\"\",d=0;d>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t}(t.dictionary):\"[object ArrayBuffer]\"===yc.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=dc.inflateSetDictionary(this.strm,t.dictionary))!==Ic.Z_OK)throw new Error(Mc[e])}function Tc(e,t){t=new Cc(t);if(t.push(e,!0),t.err)throw t.msg||Mc[t.err];return t.result}Cc.prototype.push=function(e,t){var n,o,i,a,s,r=this.strm,c=this.options.chunkSize,u=this.options.dictionary,l=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?Ic.Z_FINISH:Ic.Z_NO_FLUSH,\"string\"==typeof e?r.input=function(e){for(var t=new ie.Buf8(e.length),n=0,o=t.length;ne.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+hc[e[n]]>t?n:t}(r.output,r.next_out),a=r.next_out-i,s=fc(r.output,i),r.next_out=a,r.avail_out=c-a,a&&ie.arraySet(r.output,r.output,i,a,0),this.onData(s)):this.onData(ie.shrinkBuf(r.output,r.next_out))),0===r.avail_in&&0===r.avail_out&&(l=!0)}while((0\",\" %c\"),\"background:#ff9d00; padding:1px; border-radius:3px; color: #fff\",\"background:transparent\",t):console.log(\"IM SDK API ->\",t)),(t=this.getErrMsg(\"DOCS_GUIDE\"))&&console.log(t),t=this.getErrMsg(\"IOS_WEBVIEW_WARNING\"),be)&&t&&console.warn(t),M.setLevel(e)}},{key:\"createTextMessage\",value:function(e){return this._get(2).createTextMessage(e)}},{key:\"createTextAtMessage\",value:function(e){return this._get(2).createTextMessage(e)}},{key:\"createImageMessage\",value:function(e){return this._get(2).createImageMessage(e)}},{key:\"createAudioMessage\",value:function(e){return this._get(2).createAudioMessage(e)}},{key:\"createVideoMessage\",value:function(e){return this._get(2).createVideoMessage(e)}},{key:\"createCustomMessage\",value:function(e){return this._get(2).createCustomMessage(e)}},{key:\"createFaceMessage\",value:function(e){return this._get(2).createFaceMessage(e)}},{key:\"createFileMessage\",value:function(e){return this._get(2).createFileMessage(e)}},{key:\"createLocationMessage\",value:function(e){return this._get(2).createLocationMessage(e)}},{key:\"createMergerMessage\",value:function(e){return this._get(2).createMergerMessage(e)}},{key:\"downloadMergerMessage\",value:function(e){return e.type!==A.MSG_MERGER?D({code:L.MSG_MERGER_TYPE_INVALID}):S(e.payload.downloadKey)?D({code:L.MSG_MERGER_KEY_INVALID}):this._get(2).downloadMergerMessage(e).catch(function(e){return D({code:L.MSG_MERGER_DOWNLOAD_FAIL})})}},{key:\"createForwardMessage\",value:function(e){return this._get(2).createForwardMessage(e)}},{key:\"sendMessage\",value:function(e,t){return e instanceof Do?this._get(2).sendMessageInstance(e,t):D({code:L.MSG_INSTANCE_REQUIRED})}},{key:\"searchCloudMessages\",value:function(e){return this._get(2).searchCloudMessages(e)}},{key:\"callExperimentalAPI\",value:function(e,t){return\"sendComboMessage\"===e?this._get(31).sendMessage(t):\"handleGroupInvitation\"===e?this._get(7).handleGroupInvitation(t):\"isCommercialAbilityEnabled\"===e?this._get(27).isFeatureEnabled(t):\"isFeatureEnabledForStat\"===e?this._get(27).isFeatureEnabledForStat(t):\"isIntl\"===e?this.isIntl():\"sendTRTCCustomData\"===e||\"sendRoomCustomData\"===e?this._get(30).sendTRTCCustomData(t):\"getTimerID\"===e?this._m.getTimerID():\"getPollingTimerID\"===e?this._m.getPollingTimerID(t):\"setApplicationID\"===e?(this._get(12).setApplicationID(t),void this._get(20).updateProtocolConfig()):\"getServerConfig\"===e?this._get(23).getServerConfig(t):\"canIUseModule\"===e?this._m.canIUseModule(t):\"startMessageLongPolling\"===e?this._get(7).startMessageLongPolling(t):\"stopMessageLongPolling\"===e?this._get(7).stopMessageLongPolling(t):\"disableMessagePullOnInvite\"===e?this._get(11).disableMsgPullOnInvite(t):\"clearLocalMessage\"===e?this._get(11).clearMemMsg(t,!1):\"setCustomLoginInfo\"===e?this._get(12).setCustomLoginInfo(t):D({code:L.INVALID_OPERATION})}},{key:\"revokeMessage\",value:function(e){return this._get(2).revokeMessage(e)}},{key:\"resendMessage\",value:function(e,t){return e instanceof Do?this._get(2).resendMessage(e,t):D({code:L.MSG_INSTANCE_REQUIRED})}},{key:\"deleteMessage\",value:function(e){return this._get(2).deleteMessage(e)}},{key:\"translateText\",value:function(e){return this._get(2).translateText(e)}},{key:\"convertVoiceToText\",value:function(e){return this._get(2).convertVoiceToText(e)}},{key:\"setMessageExtensions\",value:function(e,t){return this._get(3).setMessageExtensions(e,t)}},{key:\"getMessageExtensions\",value:function(e){return this._get(3).getMessageExtensions(e)}},{key:\"deleteMessageExtensions\",value:function(e,t){return this._get(3).deleteMessageExtensions(e,t)}},{key:\"addMessageReaction\",value:function(e,t){return this._get(34).addMessageReaction(e,t)}},{key:\"removeMessageReaction\",value:function(e,t){return this._get(34).removeMessageReaction(e,t)}},{key:\"getMessageReactions\",value:function(e){return this._get(34).getMessageReactions(e)}},{key:\"getAllUserListOfMessageReaction\",value:function(e){return this._get(34).getAllUserListOfMessageReaction(e)}},{key:\"modifyMessage\",value:function(e){return this._get(2).modifyRemoteMessage(e)}},{key:\"getMessageList\",value:function(e){return this._get(11).getMessageList(e)}},{key:\"getMessageListHopping\",value:function(e){return this._get(11).getMessageListHopping(e)}},{key:\"sendMessageReadReceipt\",value:function(e){return this._get(11).sendReadReceipt(e)}},{key:\"getMessageReadReceiptList\",value:function(e){return this._get(11).getReadReceiptList(e)}},{key:\"getGroupMessageReadMemberList\",value:function(e){var t=this._get(7);return t?t.getReadReceiptDetail(e):D({code:L.NO_MODULE})}},{key:\"findMessage\",value:function(e){return this._get(11).findMessage(e)}},{key:\"setMessageRead\",value:function(e){return this._get(11).setMessageRead(e)}},{key:\"getConversationList\",value:function(e){return this._get(11).getConvList(e)}},{key:\"getConversationProfile\",value:function(e){return this._get(11).getConversationProfile(e)}},{key:\"deleteConversation\",value:function(e){return this._get(11).deleteConversation(e)}},{key:\"setConversationDraft\",value:function(e){return this._get(11).setConvDraft(e)}},{key:\"clearHistoryMessage\",value:function(e){return this._get(11).clearHistoryMessage(e)}},{key:\"pinConversation\",value:function(e){return this._get(11).pinConversation(e)}},{key:\"setAllMessageRead\",value:function(e){return this._get(11).setAllMessageRead(e)}},{key:\"setMessageRemindType\",value:function(e){return this._get(11).setMessageRemindType(e)}},{key:\"setAllReceiveMessageOpt\",value:function(e){return this._get(11).setAllRcvMsgOpt(e)}},{key:\"getAllReceiveMessageOpt\",value:function(){return this._get(11).getAllRcvMsgOpt()}},{key:\"getTotalUnreadMessageCount\",value:function(){return this._get(11).getTotalUnreadCount()}},{key:\"setConversationCustomData\",value:function(e){return this._get(11).setConvCustomData(e)}},{key:\"markConversation\",value:function(e){return this._get(11).markConv(e)}},{key:\"getConversationGroupList\",value:function(){return this._get(11).getConvGroupList()}},{key:\"createConversationGroup\",value:function(e){return this._get(11).createConvGroup(e)}},{key:\"deleteConversationGroup\",value:function(e){return this._get(11).deleteConvGroup(e)}},{key:\"renameConversationGroup\",value:function(e){return this._get(11).renameConvGroup(e)}},{key:\"addConversationsToGroup\",value:function(e){return this._get(11).addConvsToGroup(e)}},{key:\"deleteConversationsFromGroup\",value:function(e){return this._get(11).deleteConvsFromGroup(e)}},{key:\"getMyProfile\",value:function(){return this._get(4).getMyProfile()}},{key:\"getUserProfile\",value:function(e){return this._get(4).getUserProfile(e)}},{key:\"updateMyProfile\",value:function(e){return this._get(4).updateMyProfile(e)}},{key:\"getBlacklist\",value:function(){return this._get(4).getLocalBlacklist()}},{key:\"addToBlacklist\",value:function(e){return this._get(4).addBlacklist(e)}},{key:\"removeFromBlacklist\",value:function(e){return this._get(4).deleteBlacklist(e)}},{key:\"setSelfStatus\",value:function(e){return this._get(4).setSelfStatus(e)}},{key:\"getUserStatus\",value:function(e){return this._get(4).getUserStatus(e)}},{key:\"subscribeUserStatus\",value:function(e){return this._get(4).subscribeUserStatus(e)}},{key:\"unsubscribeUserStatus\",value:function(e){return this._get(4).unsubscribeUserStatus(e)}},{key:\"getFriendList\",value:function(){var e=this._get(8);return e?e.getLocalFriendList():D({code:L.NO_MODULE})}},{key:\"addFriend\",value:function(e){var t=this._get(8);return t?t.addFriend(e):D({code:L.NO_MODULE})}},{key:\"deleteFriend\",value:function(e){var t=this._get(8);return t?t.deleteFriend(e):D({code:L.NO_MODULE})}},{key:\"checkFriend\",value:function(e){var t=this._get(8);return t?t.checkFriend(e):D({code:L.NO_MODULE})}},{key:\"getFriendProfile\",value:function(e){var t=this._get(8);return t?t.getFriendProfile(e):D({code:L.NO_MODULE})}},{key:\"updateFriend\",value:function(e){var t=this._get(8);return t?t.updateFriend(e):D({code:L.NO_MODULE})}},{key:\"getFriendApplicationList\",value:function(){var e=this._get(8);return e?e.getLocalFriendApplicationList():D({code:L.NO_MODULE})}},{key:\"acceptFriendApplication\",value:function(e){var t=this._get(8);return t?t.acceptFriendApplication(e):D({code:L.NO_MODULE})}},{key:\"refuseFriendApplication\",value:function(e){var t=this._get(8);return t?t.refuseFriendApplication(e):D({code:L.NO_MODULE})}},{key:\"deleteFriendApplication\",value:function(e){var t=this._get(8);return t?t.deleteFriendApplication(e):D({code:L.NO_MODULE})}},{key:\"setFriendApplicationRead\",value:function(){var e=this._get(8);return e?e.setFriendApplicationRead():D({code:L.NO_MODULE})}},{key:\"getFriendGroupList\",value:function(){var e=this._get(8);return e?e.getLocalFriendGroupList():D({code:L.NO_MODULE})}},{key:\"createFriendGroup\",value:function(e){var t=this._get(8);return t?t.createFriendGroup(e):D({code:L.NO_MODULE})}},{key:\"deleteFriendGroup\",value:function(e){var t=this._get(8);return t?t.deleteFriendGroup(e):D({code:L.NO_MODULE})}},{key:\"addToFriendGroup\",value:function(e){var t=this._get(8);return t?t.addToFriendGroup(e):D({code:L.NO_MODULE})}},{key:\"removeFromFriendGroup\",value:function(e){var t=this._get(8);return t?t.removeFromFriendGroup(e):D({code:L.NO_MODULE})}},{key:\"renameFriendGroup\",value:function(e){var t=this._get(8);return t?t.renameFriendGroup(e):D({code:L.NO_MODULE})}},{key:\"followUser\",value:function(e){var t=this._get(35);return t?t.followUser(e):D({code:L.NO_MODULE})}},{key:\"unfollowUser\",value:function(e){var t=this._get(35);return t?t.unfollowUser(e):D({code:L.NO_MODULE})}},{key:\"getMyFollowersList\",value:function(e){var t=this._get(35);return t?t.getMyFollowersList(e):D({code:L.NO_MODULE})}},{key:\"getMyFollowingList\",value:function(e){var t=this._get(35);return t?t.getMyFollowingList(e):D({code:L.NO_MODULE})}},{key:\"getMutualFollowersList\",value:function(e){var t=this._get(35);return t?t.getMutualFollowersList(e):D({code:L.NO_MODULE})}},{key:\"getUserFollowInfo\",value:function(e){var t=this._get(35);return t?t.getUserFollowInfo(e):D({code:L.NO_MODULE})}},{key:\"checkFollowType\",value:function(e){var t=this._get(35);return t?t.checkFollowType(e):D({code:L.NO_MODULE})}},{key:\"getGroupList\",value:function(){var e=this._get(7);return e?e.getGroupList():D({code:L.NO_MODULE})}},{key:\"getGroupProfile\",value:function(e){var t=this._get(7);return t?t.getGroupProfile(e):D({code:L.NO_MODULE})}},{key:\"createGroup\",value:function(e){var t=this._get(7);return t?t.createGroup(e):D({code:L.NO_MODULE})}},{key:\"dismissGroup\",value:function(e){var t=this._get(7);return t?t.dismissGroup(e):D({code:L.NO_MODULE})}},{key:\"updateGroupProfile\",value:function(e){var t=this._get(7);return t?t.updateGroupProfile(e):D({code:L.NO_MODULE})}},{key:\"joinGroup\",value:function(e){var t=this._get(7);return t?t.joinGroup(e):D({code:L.NO_MODULE})}},{key:\"quitGroup\",value:function(e){var t=this._get(7);return t?t.quitGroup(e):D({code:L.NO_MODULE})}},{key:\"searchGroupByID\",value:function(e){var t=this._get(7);return t?t.searchGroupByID(e):D({code:L.NO_MODULE})}},{key:\"getGroupOnlineMemberCount\",value:function(e){var t=this._get(7);return t?t.getGroupOnlineMemberCount(e):D({code:L.NO_MODULE})}},{key:\"changeGroupOwner\",value:function(e){var t=this._get(7);return t?t.changeGroupOwner(e):D({code:L.NO_MODULE})}},{key:\"getGroupApplicationList\",value:function(){var e=this._get(7);return e?e.getGroupApplicationList():D({code:L.NO_MODULE})}},{key:\"handleGroupApplication\",value:function(e){var t=this._get(7);return t?t.handleGroupApplication(e):D({code:L.NO_MODULE})}},{key:\"initGroupAttributes\",value:function(e){var t=this._get(7);return t?t.initGroupAttributes(e):D({code:L.NO_MODULE})}},{key:\"setGroupAttributes\",value:function(e){var t=this._get(7);return t?t.setGroupAttributes(e):D({code:L.NO_MODULE})}},{key:\"deleteGroupAttributes\",value:function(e){var t=this._get(7);return t?t.deleteGroupAttributes(e):D({code:L.NO_MODULE})}},{key:\"getGroupAttributes\",value:function(e){var t=this._get(7);return t?t.getGroupAttributes(e):D({code:L.NO_MODULE})}},{key:\"setGroupCounters\",value:function(e){var t=this._get(7);return t?t.setGroupCounters(e):D({code:L.NO_MODULE})}},{key:\"increaseGroupCounter\",value:function(e){var t=this._get(7);return t?t.increaseGroupCounter(e):D({code:L.NO_MODULE})}},{key:\"decreaseGroupCounter\",value:function(e){var t=this._get(7);return t?t.decreaseGroupCounter(e):D({code:L.NO_MODULE})}},{key:\"getGroupCounters\",value:function(e){var t=this._get(7);return t?t.getGroupCounters(e):D({code:L.NO_MODULE})}},{key:\"getGroupMemberList\",value:function(e){var t=this._get(7);return t?t.getGroupMemberList(e):D({code:L.NO_MODULE})}},{key:\"getGroupMemberProfile\",value:function(e){var t=this._get(7);return t?t.getGroupMemberProfile(e):D({code:L.NO_MODULE})}},{key:\"addGroupMember\",value:function(e){var t=this._get(7);return t?t.addGroupMember(e):D({code:L.NO_MODULE})}},{key:\"deleteGroupMember\",value:function(e){var t=this._get(7);return t?t.deleteGroupMember(e):D({code:L.NO_MODULE})}},{key:\"setGroupMemberMuteTime\",value:function(e){var t=this._get(7);return t?t.setGroupMemberMuteTime(e):D({code:L.NO_MODULE})}},{key:\"setGroupMemberRole\",value:function(e){var t=this._get(7);return t?t.setGroupMemberRole(e):D({code:L.NO_MODULE})}},{key:\"setGroupMemberNameCard\",value:function(e){var t=this._get(7);return t?t.setGroupMemberNameCard(e):D({code:L.NO_MODULE})}},{key:\"setGroupMemberCustomField\",value:function(e){var t=this._get(7);return t?t.setGroupMemberCustomField(e):D({code:L.NO_MODULE})}},{key:\"markGroupMemberList\",value:function(e){var t=this._get(7);return t?t.markGroupMemberList(e):D({code:L.NO_MODULE})}},{key:\"getJoinedCommunityList\",value:function(){return this._get(10).getJoinedCommunityList()}},{key:\"createTopicInCommunity\",value:function(e){return this._get(10).createTopicInCommunity(e)}},{key:\"deleteTopicFromCommunity\",value:function(e){return this._get(10).deleteTopicFromCommunity(e)}},{key:\"updateTopicProfile\",value:function(e){return this._get(10).updateTopicProfile(e)}},{key:\"getTopicList\",value:function(e){return this._get(10).getTopicList(e)}},{key:\"addSignalingListener\",value:function(e,t,n){var o=this._get(33);o&&o.addSignalingListener(e,this._safetyCallbackFactory.defense(e,t,n),n)}},{key:\"removeSignalingListener\",value:function(e,t,n){var o,i=this._safetyCallbackFactory.find(e,t);null!==i&&(o=this._get(33))&&(o.removeSignalingListener(e,i,n),this._safetyCallbackFactory.delete(e,t))}},{key:\"invite\",value:function(e){var t=this._get(33);return t?t.invite(e):D({code:L.NO_MODULE})}},{key:\"inviteSync\",value:function(e,t,n){var o=this._get(33);return o?o.inviteSync(e,t,n):\"\"}},{key:\"inviteInGroup\",value:function(e){var t=this._get(33);return t?t.invite(e):D({code:L.NO_MODULE})}},{key:\"inviteInGroupSync\",value:function(e,t,n){var o=this._get(33);return o?o.inviteSync(e,t,n):\"\"}},{key:\"cancel\",value:function(e){var t=this._get(33);return t?t.cancel(e):D({code:L.NO_MODULE})}},{key:\"accept\",value:function(e){var t=this._get(33);return t?t.accept(e):D({code:L.NO_MODULE})}},{key:\"reject\",value:function(e){var t=this._get(33);return t?t.reject(e):D({code:L.NO_MODULE})}},{key:\"getSignalingInfo\",value:function(e){var t=this._get(33);return t?t.getSignalingInfo(e):null}},{key:\"modifyInvitation\",value:function(e){var t=this._get(33);return t?t.modifyInvitation(e):D({code:L.NO_MODULE})}}]),Rc),Ac={login:1,logout:1,getLoginUser:1,destroy:1,on:1,off:1,ready:1,setLogLevel:1,joinGroup:1,quitGroup:1,registerPlugin:1,getGroupOnlineMemberCount:1,isReady:1,addSignalingListener:1,removeSignalingListener:1,callExperimentalAPI:1};function Rc(e){d(this,Rc);e={SDKAppID:e.SDKAppID,unlimitedAVChatRoom:e.unlimitedAVChatRoom||!1,scene:e.scene||\"\",oversea:e.oversea||!1,instanceID:qt(),devMode:e.devMode||!1,testEnv:e.testEnv||!1,proxyServer:e.proxyServer||void 0,fileUploadProxy:e.fileUploadProxy||void 0,fileDownloadProxy:e.fileDownloadProxy||e.fileUploadProxy||void 0,eventThrottling:!1!==e.eventThrottling,partialUpdatedConversations:!0===e.partialUpdatedConversations,modules:e.modules||void 0};this._m=new Lc(e),this._safetyCallbackFactory=new Sc(this._m)}function Oc(e){d(this,Oc),this._funcMap=new Map,this._m=e,this._n=\"SafetyCallback\",this._reportCount=0}function Nc(t){var n=this;d(this,Nc);var o,e=new G(\"sdkConstruct\"),i=(this._n=\"ModuleManager\",this._isReady=!1,this._reason=L.USER_NOT_LOGGED_IN,this._startLoginTs=0,this._map=new Map,this._optionalModuleMap=new Map,this._iEmitter=null,this._oEmitter=null,this._checkCount=0,this._checkTimer=-1,this._map.set(12,new Ri(this,t)),this._map.set(37,new Ec(this)),this._map.set(15,new pa(this)),this._map.set(27,new ir(this)),this._map.set(23,new Hs(this)),this._map.set(24,new nr(this)),this._map.set(26,new Js(this)),this._map.set(21,new ds(this)),this._map.set(20,new Vs(this)),this._map.set(1,new Ni(this)),this._map.set(2,new wa(this)),this._map.set(3,new Fa(this)),this._map.set(34,new qa(this)),this._map.set(31,new xa(this)),this._map.set(4,new Ai(this)),this._map.set(6,new qo(this)),this._map.set(11,new ci(this)),this._map.set(7,new yi(this)),this._map.set(10,new Di(this)),this._map.set(13,new ra(this)),this._map.set(32,new ur(this)),this._map.set(14,new ua(this)),this._map.set(17,new Ca(this)),this._map.set(18,new Va(this)),this._map.set(19,new Ha(this)),this._map.set(25,new Bs(this)),this._map.set(8,new tr(this)),this._map.set(28,new ar(this)),this._map.set(36,new sr(this)),this._map.set(29,new rr(this)),this._map.set(30,new cr(this)),this._map.set(33,new fr(this)),this._map.set(35,new Ir(this)),this._eventThrottleMap=new Map,this._eventThrottling=t.eventThrottling,this._map.get(12).isPartialUpdatedConvs()&&(this._eventThrottling=!1),f(t.modules)?(Object.keys(t.modules).forEach(function(e){o=t.modules[e],\"group-module\"===e?n._map.set(7,new o(n)):\"relationship-module\"===e?n._map.set(8,new o(n)):\"signaling-module\"===e?n._map.set(33,new o(n)):\"follow-module\"===e&&n._map.set(35,new o(n)),n._optionalModuleMap.set(e,1)}),this._map.get(12).setUsingChatCore(!0)):this._map.has(7)||this._map.get(12).setUsingChatCore(!0),t.instanceID),a=t.SDKAppID,s=this._map.get(12).isIntl(),r=this._map.get(12).isUsingChatCore(),i=\"instanceID:\".concat(i,\" SDKAppID:\").concat(a,\" isIntl:\").concat(s,\" isUsingChatCore:\").concat(r,\" host:\").concat(xt())+\" isIOSWebView:\".concat(be,\" platform:\").concat(De,\" canIUseInflate:\").concat(this.canIUseInflate())+\" workerAvailable:\".concat(Ge,\" eventThrottling:\").concat(this._eventThrottling,\" UserAgent:\").concat(Te);G.bindEventStatModule(this._map.get(14)),G.bindNetMonitorModule(this._map.get(15)),e.setMessage(\"\".concat(i,\" \").concat(function(){var t=\"\";if(v)try{var e=I.getSystemInfoSync(),n=e.model,o=e.version,i=e.system,a=e.platform,s=e.SDKVersion,t=\"model:\".concat(n,\" version:\").concat(o,\" system:\").concat(i,\" platform:\").concat(a,\" SDKVersion:\").concat(s)}catch(e){t=\"\"}return t}())).end(),M.i(\"SDK \".concat(i)),E.prototype._getErrMsg=this.getErrMsg.bind(this),this._readyList=void 0,this._ssoLogForReady=null,this._initReadyList()}function Gc(e){d(this,Gc),this._m=e,this._n=\"InflateModule\",this._bLogForInflateOK=!1,this._bLogForInflateError=!1}var Pc={},o={};return o.create=function(e){var t=\"TencentCloudChat.create\",n=0,o=e.SDKAppID;if(R(o))n=o;else if(n=parseInt(o),isNaN(o))return M.e(\"\".concat(t,\" failed. Failed to parse the SDKAppID, please check the arguments\")),null;if(n&&Pc[n])return Pc[n];M.l(\"\".concat(t));var s,i,o=new kc(y(y({},e),{},{SDKAppID:n})),e=(o.on(h.SDK_DESTROY,function(e){Pc[e.data.SDKAppID]=null,delete Pc[e.data.SDKAppID]}),s=o,i=Object.create(null),Object.keys(Fn).forEach(function(a){var t;s[a]&&(t=new $,i[a]=function(){var e=Array.from(arguments);return t.use(function(e,t){i=a;var n,o,i=!(!(n=s).isReady()&&1!==Ac[i])||(o={code:o=n.getNotReadyReason(),message:\"\".concat(n.getErrMsg(o),\" | \").concat(i,\" | \").concat(n.getErrMsg(L.SDK_IS_NOT_READY))},n.onError(o),o);return!0===i?t():D(i)}).use(function(e,t){if(!0===function(n,o,i){if(void 0===o)return!0;var a=!0;if(f(o))Object.keys(o).forEach(function(e){var t=1===n.length?n[0][e]:void 0;a=!!an(t,o[e],i,e)&&a});else if(O(o))for(var e=0;e { - var s2 = o2.find((e4) => e4.key === t2); - s2 ? s2.value !== e3 && (s2.value = e3, r2 = true) : (o2.push({ key: t2, value: e3 }), r2 = true); - }), r2; -} -function Ze(e2) { - return qe(e2) ? [] : e2.filter((e3) => true === e3.isModified); -} -function et(e2) { - return qe(e2) ? [] : e2.filter((e3) => false === e3.isModified); -} -var st = (e2) => e2 === me; -var ot = ({ type: e2, groupID: t2 }) => e2 === de || ("" + t2).startsWith(we) && !("" + t2).includes(Ue); -var rt = (e2) => ("" + e2).startsWith(we) && ("" + e2).includes(Ue); -function it(e2) { - return e2.split(Ue)[0]; -} -function nt() { - return !O && !$; -} -function at(e2, t2 = true, s2 = true) { - var o2 = Date.now(); - return t2 ? s2 ? o2 - e2 + " ms" : Math.round((o2 - e2) / 1e3) + " s" : s2 ? o2 - e2 : Math.round((o2 - e2) / 1e3); -} -var ut = 0; -function pt() { - return nt() ? "%c Chat %c" : "Chat"; -} -function lt() { - (e2 = /* @__PURE__ */ new Date()).setTime(ve()); - var e2; - return e2.toLocaleTimeString("en-US", { hour12: false }) + "." + function(e3) { - let t2; - switch (e3.toString().length) { - case 1: - t2 = "00" + e3; - break; - case 2: - t2 = "0" + e3; - break; - default: - t2 = e3; - } - return t2; - }(e2.getMilliseconds()); -} -var ct = { arguments2String(s2) { - let o2 = ""; - if (1 === s2.length) - o2 = s2[0]; - else - for (let e2 = 0, t2 = s2.length; e2 < t2; e2++) { - if (Be(s2[e2])) - try { - o2 += s2[e2] instanceof Error ? JSON.stringify(s2[e2], ["message", "code"]) : JSON.stringify(s2[e2]); - } catch (e3) { - o2 += e3 ? e3.message : ""; - break; - } - else - o2 += s2[e2]; - o2 += " "; - } - return o2; -}, _exec(e2, t2) { - nt() ? K[e2](pt(), "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", lt(), t2) : K[e2](`${pt()} ${lt()} ` + t2); -}, d: function() { - var e2; - ut <= -1 && (e2 = this.arguments2String(arguments), this._exec("debug", e2)); -}, l: function() { - var e2; - ut <= 0 && (e2 = this.arguments2String(arguments), this._exec("log", e2)); -}, log: function() { - var e2; - ut <= 0 && (e2 = this.arguments2String(arguments), this._exec("log", e2)); -}, i: function() { - var e2; - ut <= 1 && (e2 = this.arguments2String(arguments), this._exec("info", e2)); -}, w: function() { - var e2; - ut <= 2 && (e2 = this.arguments2String(arguments), this._exec("warn", e2)); -}, e: function() { - var e2; - ut <= 3 && (e2 = this.arguments2String(arguments), this._exec("error", e2)); -}, setLevel: function(e2) { - e2 < 4 && this._exec("log", "set level from " + ut + " to " + e2), ut = e2; -}, getLevel: function() { - return ut; -} }; -var ht = function(e2) { - return { code: 0, data: e2 || {} }; -}; -var gt = class extends Error { - constructor(e2) { - super(); - var { code: e2, message: t2, data: s2 } = e2; - this.code = e2, t2 ? this.message = t2 : this._getErrMsg && (this.message = this._getErrMsg(this.code)), this.data = s2 || {}; - } -}; -var mt = 2101; -var dt = 2114; -var _t = 2600; -var ft = 2602; -var Mt = 2603; -var It = 2620; -var yt = 2621; -var Dt = 2623; -var Lt = 2660; -var Ct = 2661; -var Gt = 2662; -var bt = 2681; -var At = 2683; -var Tt = 2684; -var St = 2685; -var vt = 2686; -var Pt = 2687; -var Rt = 2805; -var $t = 2903; -var Et = 3122; -var wt = 3123; -var Ut = "onMessageReceived"; -var Nt = "onMessageModified"; -var qt = "onMessageRevoked"; -var kt = "onGroupListUpdated"; -var Ot = "groupAttributesUpdated"; -var Ft = "onGroupCounterUpdated"; -var xt = "onTopicUpdated"; -var Vt = "error"; -var Ht = null; -var jt = function(e2) { - return Promise.resolve(ht(e2)); -}; -var Kt = function(e2, t2 = false) { - if (e2 instanceof gt) - return t2 && null !== Ht && Ht.emit(Vt, e2), Promise.reject(e2); - if (e2 instanceof Error) { - const e3 = new gt({ code: $t }); - return t2 && null !== Ht && Ht.emit(Vt, e3), Promise.reject(e3); - } - return Ke(e2) || Ke(e2.code) ? Promise.reject(new gt({ code: $t })) : (e2 = new gt(e2), t2 && null !== Ht && Ht.emit(Vt, e2), Promise.reject(e2)); -}; -var Bt = { A2KEY_AND_TINYID_UPDATED: "_inner1", CLOUD_CONFIG: "_inner2", PROFILE_UPDATED: "_inner3", CONV_SYNC_COMPLETED: "_inner4", C2C_UNREAD_HANDLE_COMPLETED: "_inner5" }; -var Jt = "messageReceivedGroup"; -var Wt = "messageReceivedGroupAVPush"; -var zt = "messageReceivedGroupAVPull"; -var Xt = { info: 4, warning: 5, error: 6 }; -var Yt = { wifi: 1, "2g": 2, "3g": 3, "4g": 4, "5g": 5, unknown: 6, none: 7, online: 8 }; -var Qt = { login: 4, plugin_search: 16, plugin_translate: 16, plugin_voice_to_text: 16, plugin_cs: 16, plugin_push: 16, plugin_bot: 16, plugin_emoji_reaction: 16 }; -var Zt = class _Zt { - constructor(e2) { - this._n = "SSOLogData", this.eventType = Qt[e2] || 0, this.timestamp = 0, this.networkType = 8, this.code = 0, this.message = "", this.moreMessage = "", this.extension = e2, this.costTime = 0, this.duplicate = false, this.level = 4, this.uiPlatform = void 0, this._sentFlag = false, this._startts = ve(); - } - static bindEventStatModule(e2) { - _Zt.prototype._eventStatModule = e2; - } - static bindNetMonitorModule(e2) { - _Zt.prototype._netMonitorModule = e2; - } - updateTimeStamp() { - this.timestamp = ve(); - } - start(e2) { - return this._startts = e2, this; - } - end(e2 = false) { - if (!this._sentFlag) { - if (this._netMonitorModule) { - const e3 = this._netMonitorModule.getNetworkType(); - this.setNetworkType(e3); - } - var t2 = ve(); - 0 === this.costTime && (this.costTime = t2 - this._startts), this.setMoreMessage(`startts:${this._startts} endts:` + t2), e2 ? (this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this)) : setTimeout(() => { - this._sentFlag = true, this._eventStatModule && this._eventStatModule.pushIn(this); - }, 0); - } - } - setError(t2) { - if (t2 instanceof Error) { - if (!this._sentFlag) { - let e2 = true; - if (e2 = this._netMonitorModule ? this._netMonitorModule.isOnline() : e2) - t2.code && this.setCode(t2.code), t2.message && this.setMoreMessage(t2.message); - else { - const t3 = Rt; - this.setCode(t3); - } - this.setLevel("error"); - } - } else - ct.w(this._n + ".setError value not instanceof Error, please check!"); - return this; - } - setCode(e2) { - return Ke(e2) || this._sentFlag || ("ECONNABORTED" === e2 && (this.code = 103), xe(e2) ? this.code = e2 : ct.w(this._n + ".setCode value not a number, please check!", e2, typeof e2)), this; - } - setMessage(e2) { - return Ke(e2) || this._sentFlag || (xe(e2) && (this.message = e2.toString()), Ve(e2) && (this.message = e2)), this; - } - setCostTime(e2) { - return this.costTime = e2, this; - } - setLevel(e2) { - return Ke(e2) || this._sentFlag || (this.level = Xt[e2]), this; - } - setMoreMessage(e2) { - return qe(this.moreMessage) ? this.moreMessage = "" + e2 : this.moreMessage += " " + e2, this; - } - setNetworkType(e2) { - return Ke(e2) ? ct.w(this._n + ".setNetworkType value is undefined, please check!") : (e2 = Yt[e2.toLowerCase()], Ke(e2) || (this.networkType = e2)), this; - } - getStartTs() { - return this._startts; - } - setUIPlatform(e2) { - return this.uiPlatform = e2, this; - } - setExtension(e2) { - return this.extension = e2, this; - } - setEventType(e2) { - return this.eventType = e2, this; - } -}; -var es = "send_group_msg"; -var ts = "get_joined_group_list"; -var ss = "get_group_self_member_info"; -var os = "create_group"; -var rs = "destroy_group"; -var is = "modify_group_base_info"; -var ns = "apply_join_group"; -var as = "apply_join_group_noauth"; -var us = "quit_group"; -var ps = "get_group_public_info"; -var ls = "change_group_owner"; -var cs = "handle_apply_join_group"; -var hs = "handle_invite_join_permission_group"; -var gs = "handle_invite_join_group"; -var ms = "group_msg_recall"; -var ds = "msg_read_report"; -var _s = "group_msg_get"; -var fs = "get_group_msg_receipt"; -var Ms = "group_msg_receipt"; -var Is = "get_group_msg_receipt_detail"; -var ys = "get_pendency"; -var Ds = "deletemsg"; -var Ls = "get_msg"; -var Cs = "get_msg_noauth"; -var Gs = "get_online_member_num"; -var bs = "delete_group_ramble_msg_by_seq"; -var As = "modify_group_msg"; -var Ts = "set_group_attr"; -var Ss = "modify_group_attr"; -var vs = "delete_group_attr"; -var Ps = "clear_group_attr"; -var Rs = "get_group_attr"; -var $s = "group_set_key_values"; -var Es = "group_get_key_values"; -var ws = "batch_get_group_notify"; -var Us = "update_group_counter"; -var Ns = "get_group_counter"; -var qs = "get_group_member_info"; -var ks = "get_members"; -var Os = "get_specified_group_member_info"; -var Fs = "add_group_member"; -var xs = "delete_group_member"; -var Vs = "ban_group_member"; -var Hs = "modify_group_member_info"; -var js = "modify_user_info"; -var Ks = "unSend"; -var Bs = "success"; -var Js = "notStart"; -var Ws = "resolved"; -var zs = "rejected"; -var Xs = class { - constructor(e2) { - this.type = B, this.content = { text: e2.text || "" }; - } - setText(e2) { - this.content.text = e2; - } - sendable() { - return 0 !== this.content.text.length; - } -}; -function Ys(t2, s2, o2, r2 = []) { - if (t2) { - let e2 = t2; - return s2 && (t2.startsWith("http://") ? e2 = t2.replace(/^http:\/\/[^/]+/, s2) : t2.startsWith("https://") && (e2 = t2.replace(/^https:\/\/[^/]+/, s2))), e2 = o2 && -1 === e2.indexOf("authKey=") && eo(e2, r2) ? -1 < e2.indexOf("?") ? e2 + "&authKey=" + o2 : e2 + "?authKey=" + o2 : e2; - } -} -function Qs(e2, t2, s2 = []) { - if (e2 === Y) - eo((t2[0].content || t2[0].payload).snapshotUrl, s2) && (t2[0].content ? (t2[0].content.snapshotUrl = Zs(t2[0].content.snapshotUrl), t2[0].content.thumbUrl = Zs(t2[0].content.thumbUrl)) : (t2[0].payload.snapshotUrl = Zs(t2[0].payload.snapshotUrl), t2[0].payload.thumbUrl = Zs(t2[0].payload.thumbUrl))); - else if (e2 === z) - eo((t2[0].content || t2[0].payload).fileUrl, s2) && (t2[0].content ? t2[0].content.fileUrl = Zs(t2[0].content.fileUrl) : t2[0].payload.fileUrl = Zs(t2[0].payload.fileUrl)); - else if (e2 === se) { - const { downloadKey: e3 = "", messageList: s3 = [] } = t2[0].content || t2[0].payload; - qe(e3) && s3.forEach((e4) => { - Qs(e4.messageBody[0].type, e4.messageBody); - }); - } - return t2; -} -function Zs(e2) { - if (!e2) - return e2; - if (-1 === e2.indexOf("authKey=")) - return e2; - var e2 = e2.split("?"), t2 = e2[1].split("&"); - let s2 = 0; - for (let e3 = 0; e3 < t2.length; e3++) - if (-1 < t2[e3].indexOf("authKey=")) { - s2 = e3; - break; - } - return t2.splice(s2, 1), 0 < t2.length ? e2[0] + "?" + t2.join("&") : e2[0]; -} -function eo(e2, t2) { - let s2 = false; - if (e2) { - var e2 = e2.match(/:\/\/([0-9]?\.)?(.[^/:]+)/), o2 = e2 && e2[2] || ""; - if (o2.includes("rich-dev")) - return true; - for (let e3 = 0; e3 < t2.length; e3++) - if (o2.endsWith(t2[e3])) { - s2 = true; - break; - } - } - return s2; -} -var to = class { - constructor(e2, t2, s2, o2) { - this._imageMemoryURL = "", this._fileDownloadProxy = t2, this._authKey = s2, this._fileDNList = o2, $ || w ? this.createImageDataASURL(e2.file) : this.createImageDataASURLInWeb(e2.file), this._initImageInfoModel(), this.type = J, this._percent = 0, this.content = { imageFormat: e2.imageFormat || Pe.UNKNOWN, uuid: e2.uuid, imageInfoArray: [] }, this.initImageInfoArray(e2.imageInfoArray), this._autoFixUrl(); - } - _initImageInfoModel() { - const t2 = this; - this._ImageInfoModel = function(e2) { - this.instanceID = ze(9999999), this.sizeType = e2.type || 0, this.type = 0, this.size = e2.size || 0, this.width = e2.width || 0, this.height = e2.height || 0, this.imageUrl = e2.imageUrl || e2.url || "", this.url = Ys(e2.url || t2._imageMemoryURL, t2._fileDownloadProxy, t2._authKey, t2._fileDNList); - }, this._ImageInfoModel.prototype = { setSizeType(e2) { - this.sizeType = e2; - }, setType(e2) { - this.type = e2; - }, setImageUrl(e2) { - e2 && (this.imageUrl = e2); - }, getImageUrl() { - return this.imageUrl; - } }; - } - initImageInfoArray(e2) { - let t2 = 0, s2 = null, o2; - for (; t2 <= 2; ) - o2 = Ke(e2) || Ke(e2[t2]) ? { type: 0, size: 0, width: 0, height: 0, url: "" } : e2[t2], (s2 = new this._ImageInfoModel(o2)).setSizeType(t2 + 1), s2.setType(t2), this.addImageInfo(s2), t2++; - this.updateAccessSideImageInfoArray(); - } - updateImageInfoArray(t2) { - var s2, o2 = this.content.imageInfoArray.length; - for (let e2 = 0; e2 < o2; e2++) - s2 = this.content.imageInfoArray[e2], t2[e2].size && (s2.size = t2[e2].size), t2[e2].url && s2.setImageUrl(t2[e2].url), t2[e2].width && (s2.width = t2[e2].width), t2[e2].height && (s2.height = t2[e2].height); - } - _autoFixUrl() { - var t2 = this.content.imageInfoArray.length; - let s2 = "", o2 = ""; - var r2 = ["http", "https"], i2 = null; - for (let e2 = 0; e2 < t2; e2++) - this.content.imageInfoArray[e2].url && "" !== (i2 = this.content.imageInfoArray[e2]).imageUrl && (o2 = i2.imageUrl.slice(0, i2.imageUrl.indexOf("://") + 1), s2 = i2.imageUrl.slice(i2.imageUrl.indexOf("://") + 1), r2.indexOf(o2) < 0 && (o2 = "https:"), this.content.imageInfoArray[e2].setImageUrl([o2, s2].join(""))); - } - updatePercent(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } - updateImageFormat(e2) { - this.content.imageFormat = Pe[e2.toUpperCase()] || Pe.UNKNOWN; - } - createImageDataASURLInWeb(e2) { - void 0 !== e2 && 0 < e2.files.length && (this._imageMemoryURL = window.URL.createObjectURL(e2.files[0])); - } - createImageDataASURL(e2) { - e2 && e2.url && (this._imageMemoryURL = e2.url); - } - replaceImageInfo(e2, t2) { - this.content.imageInfoArray[t2] instanceof this._ImageInfoModel || (this.content.imageInfoArray[t2] = e2); - } - addImageInfo(e2) { - 3 <= this.content.imageInfoArray.length || this.content.imageInfoArray.push(e2); - } - updateAccessSideImageInfoArray() { - var e2 = this.content.imageInfoArray, { width: t2 = 0, height: s2 = 0 } = e2[0]; - if (0 !== t2 && 0 !== s2) { - var o2 = e2, r2 = o2[2]; - o2[2] = o2[1], o2[1] = r2; - for (let e3 = 0; e3 < o2.length; e3++) - o2[e3].setType(e3); - Object.assign(e2[2], function(e3) { - const { originUrl: t3, originWidth: s3, originHeight: o3, min: r3 = 198 } = e3, i2 = parseInt(s3), n2 = parseInt(o3), a2 = { url: void 0, width: 0, height: 0 }; - if ((i2 <= n2 ? i2 : n2) <= r3) - a2.url = t3, a2.width = i2, a2.height = n2; - else { - n2 <= i2 ? (a2.width = Math.ceil(i2 * r3 / n2), a2.height = r3) : (a2.width = r3, a2.height = Math.ceil(n2 * r3 / i2)); - const e4 = t3 && -1 < t3.indexOf("?") ? t3 + "&" : t3 + "?"; - a2.url = 198 === r3 ? e4 + "imageView2/3/w/198/h/198" : e4 + "imageView2/3/w/720/h/720"; - } - if (Ke(t3)) { - const { url: e4, ...t4 } = a2; - return t4; - } - return a2; - }({ originWidth: t2, originHeight: s2, min: 720 })); - } - } - sendable() { - return 0 !== this.content.imageInfoArray.length && "" !== this.content.imageInfoArray[0].imageUrl && 0 !== this.content.imageInfoArray[0].size; - } -}; -var so = class { - constructor(e2) { - this.type = X, this.content = e2 || null; - } - sendable() { - return null !== this.content; - } -}; -var oo = class { - constructor(e2, t2, s2, o2) { - this.type = W, this._percent = 0, this.content = { downloadFlag: 2, second: e2.second, size: e2.size, url: Ys(e2.url, t2, s2, o2), remoteAudioUrl: e2.url || "", uuid: e2.uuid }; - } - updatePercent(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } - updateAudioUrl(e2) { - this.content.remoteAudioUrl = e2; - } - sendable() { - return "" !== this.content.remoteAudioUrl; - } -}; -var ro = { from: true, groupID: true, groupName: true, to: true }; -var io = class { - constructor(e2) { - this.type = Z, this.content = {}, this._initContent(e2); - } - _initContent(t2) { - Object.keys(t2).forEach((e2) => { - switch (e2) { - case "remarkInfo": - break; - case "groupProfile": - this.content.groupProfile = {}, this._initGroupProfile(t2[e2]); - break; - case "operatorInfo": - this.content.operatorInfo = {}, this._initOperatorInfo(t2[e2]); - break; - case "memberInfoList": - case "msgMemberInfo": - this._updateMemberList(t2[e2]); - break; - case "memberExtraInfo": - case "onlineMemberInfo": - break; - case "memberNum": - this.content[e2] = t2[e2], this.content.memberCount = t2[e2]; - break; - case "newGroupProfile": - this.content.newGroupProfile = {}, this._initNewGroupProfile(t2[e2]); - break; - default: - this.content[e2] = t2[e2]; - } - }), this.content.userIDList || (this.content.userIDList = [this.content.operatorID]); - } - _initGroupProfile(t2) { - var s2 = Object.keys(t2); - for (let e2 = 0; e2 < s2.length; e2++) { - var o2 = s2[e2]; - ro[o2] && (this.content.groupProfile[o2] = t2[o2]); - } - } - _initOperatorInfo(t2) { - var s2 = Object.keys(t2); - for (let e2 = 0; e2 < s2.length; e2++) { - var o2 = s2[e2]; - this.content.operatorInfo[o2] = t2[o2]; - } - } - _updateMemberList(e2) { - qe(this.content.memberList) ? this.content.memberList = e2 : this.content.memberList.forEach((t2) => { - e2.forEach((e3) => { - t2.userID === e3.userID && Object.assign(t2, e3); - }); - }); - } - _initNewGroupProfile(t2) { - var s2 = Object.keys(t2); - for (let e2 = 0; e2 < s2.length; e2++) { - var o2 = s2[e2]; - this.content.newGroupProfile[o2] = "muteAllMembers" !== o2 ? t2[o2] : 1 === t2[o2]; - } - } -}; -var no = { from: true, groupID: true, groupName: true, to: true, groupType: true }; -var ao = class { - constructor(e2) { - this.type = ee, this.content = {}, this._initContent(e2); - } - _initContent(t2) { - Object.keys(t2).forEach((e2) => { - switch (e2) { - case "memberInfoList": - break; - case "remarkInfo": - this.content.handleMessage = t2[e2]; - break; - case "groupProfile": - this.content.groupProfile = {}, this._initGroupProfile(t2[e2]); - break; - default: - this.content[e2] = t2[e2]; - } - }); - } - _initGroupProfile(t2) { - var s2 = Object.keys(t2); - for (let e2 = 0; e2 < s2.length; e2++) { - var o2 = s2[e2]; - no[o2] && ("groupName" === o2 ? this.content.groupProfile.name = t2[o2] : this.content.groupProfile[o2] = t2[o2]); - } - } -}; -var uo = class { - constructor(e2, t2, s2, o2) { - this.type = z, this._percent = 0; - var r2 = this._getFileInfo(e2); - this.content = { downloadFlag: 2, fileUrl: Ys(e2.url || e2.fileUrl, t2, s2, o2) || "", uuid: e2.uuid, fileName: r2.name || "", fileSize: r2.size || 0 }; - } - _getFileInfo(e2) { - if (!Ke(e2.fileName) && !Ke(e2.fileSize)) - return { size: e2.fileSize, name: e2.fileName }; - var t2 = e2.file.files[0]; - if (P) { - if (t2.path && -1 !== t2.path.indexOf(".")) { - const e3 = t2.path.slice(t2.path.lastIndexOf(".") + 1).toLowerCase(); - t2.type = e3, t2.name || (t2.name = ze(999999) + "." + e3); - } - t2.name || (t2.type = "", t2.name = t2.path.slice(t2.path.lastIndexOf("/") + 1).toLowerCase()), t2.suffix && (t2.type = t2.suffix), t2.url || (t2.url = t2.path); - } - return { size: t2.size, name: t2.name }; - } - updatePercent(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } - updateFileUrl(e2) { - this.content.fileUrl = e2; - } - sendable() { - return "" !== this.content.fileUrl && "" !== this.content.fileName && 0 !== this.content.fileSize; - } -}; -var po = class { - constructor(e2) { - this.type = te, this.content = { data: e2.data || "", description: e2.description || "", extension: e2.extension || "" }; - } - setData(e2) { - return this.content.data = e2, this; - } - setDescription(e2) { - return this.content.description = e2, this; - } - setExtension(e2) { - return this.content.extension = e2, this; - } - sendable() { - return 0 !== this.content.data.length || 0 !== this.content.description.length || 0 !== this.content.extension.length; - } -}; -var lo = class { - constructor(e2, t2, s2, o2) { - this.type = Y, this._percent = 0, this.content = { remoteVideoUrl: e2.remoteVideoUrl || e2.videoUrl || "", videoFormat: e2.videoFormat, videoSecond: parseInt(e2.videoSecond, 10), videoSize: e2.videoSize, videoUrl: Ys(e2.videoUrl, t2, s2, o2), videoDownloadFlag: 2, videoUUID: e2.videoUUID, thumbUUID: e2.thumbUUID, thumbFormat: e2.thumbFormat, thumbWidth: e2.thumbWidth, snapshotWidth: e2.thumbWidth, thumbHeight: e2.thumbHeight, snapshotHeight: e2.thumbHeight, thumbSize: e2.thumbSize, snapshotSize: e2.thumbSize, thumbDownloadFlag: 2, thumbUrl: Ys(e2.thumbUrl, t2, s2, o2), snapshotUrl: Ys(e2.thumbUrl, t2, s2, o2) }; - } - updatePercent(e2) { - this._percent = e2, 1 < this._percent && (this._percent = 1); - } - updateVideoUrl(e2) { - e2 && (this.content.remoteVideoUrl = e2); - } - updateSnapshotInfo(e2) { - var { snapshotUrl: e2, snapshotWidth: t2, snapshotHeight: s2 } = e2; - qe(e2) || (this.content.thumbUrl = this.content.snapshotUrl = e2), qe(t2) || (this.content.thumbWidth = this.content.snapshotWidth = Number(t2)), qe(s2) || (this.content.thumbHeight = this.content.snapshotHeight = Number(s2)); - } - sendable() { - return "" !== this.content.remoteVideoUrl; - } -}; -var co = class { - constructor(e2) { - this.type = Q; - var { description: e2, longitude: t2, latitude: s2 } = e2; - this.content = { description: e2, longitude: t2, latitude: s2 }; - } - sendable() { - return true; - } -}; -var ho = class { - constructor(e2, t2, s2, o2) { - var r2, i2; - this.from = e2.from, this.messageSender = e2.from, this.time = e2.time, this.messageSequence = e2.sequence, this.clientSequence = e2.clientSequence || e2.sequence, this.messageRandom = e2.random, this.cloudCustomData = e2.cloudCustomData || "", this.clientTime = e2.clientTime || void 0, e2.ID ? (this.ID = e2.ID || "", this.nick = e2.nick || "", this.avatar = e2.avatar || "", e2.messageBody ? this.messageBody = JSON.parse(JSON.stringify(e2.messageBody)) : this.messageBody = [{ type: e2.type, payload: e2.payload }], e2.conversationType ? e2.conversationType.startsWith(ae) ? this.receiverUserID = e2.to : e2.conversationType.startsWith(ue) && (this.receiverGroupID = e2.to) : e2.receiverGroupID ? this.receiverGroupID = e2.receiverGroupID : e2.receiverUserID && (this.receiverUserID = e2.receiverUserID), this.messageReceiver = e2.to || e2.messageReceiver) : (this.nick = e2.nick || "", this.avatar = e2.avatar || "", this.messageBody = [], r2 = e2.elements[0].type, i2 = e2.elements[0].content, this._patchRichMediaPayload(r2, i2), this._updateRichMediaDownloadUrl(r2, i2, t2, s2, o2), r2 === se ? this.messageBody.push({ type: r2, payload: new go(i2, t2, s2, o2).content }) : this.messageBody.push({ type: r2, payload: i2 }), e2.groupID && (this.receiverGroupID = e2.groupID, this.messageReceiver = e2.groupID), e2.to && (this.receiverUserID = e2.to, this.messageReceiver = e2.to), this.ID = `${e2.tinyID}-${e2.clientTime}-` + e2.random); - } - _patchRichMediaPayload(e2, t2) { - e2 === J ? t2.imageInfoArray.forEach((e3) => { - !e3.imageUrl && e3.url && (e3.imageUrl = e3.url, e3.sizeType = e3.type, 1 === e3.type ? e3.type = 0 : 3 === e3.type && (e3.type = 1)); - }) : e2 === Y ? !t2.remoteVideoUrl && t2.videoUrl && (t2.remoteVideoUrl = t2.videoUrl) : e2 === W ? !t2.remoteAudioUrl && t2.url && (t2.remoteAudioUrl = t2.url) : e2 === z && !t2.fileUrl && t2.url && (t2.fileUrl = t2.url, t2.url = void 0); - } - _updateRichMediaDownloadUrl(e2, t2, s2, o2, r2) { - (s2 || o2) && (e2 === J ? t2.imageInfoArray.forEach((e3) => { - e3.url = Ys(e3.url, s2, o2, r2); - }) : e2 === Y ? (t2.videoUrl = Ys(t2.videoUrl, s2, o2, r2), t2.snapshotUrl = Ys(t2.thumbUrl, s2, o2, r2), t2.snapshotHeight = t2.thumbHeight, t2.snapshotWidth = t2.thumbWidth) : e2 === W ? t2.url = Ys(t2.url, s2, o2, r2) : e2 === z && (t2.fileUrl = Ys(t2.fileUrl, s2, o2, r2))); - } -}; -var go = class { - constructor(e2, t2, s2, o2) { - if (this.type = se, this.content = { downloadKey: "", pbDownloadKey: "", messageList: [], title: "", abstractList: [], compatibleText: "", version: 0, layersOverLimit: false }, e2.downloadKey) { - const { downloadKey: t3, pbDownloadKey: s3, title: o3, abstractList: r2, compatibleText: i2, version: n2 } = e2; - this.content.downloadKey = t3, this.content.pbDownloadKey = s3, this.content.title = o3, this.content.abstractList = r2, this.content.compatibleText = i2, this.content.version = n2 || 0; - } else if (qe(e2.messageList)) - 1 === e2.layersOverLimit && (this.content.layersOverLimit = true); - else { - const { messageList: a2, title: u2, abstractList: p2, compatibleText: l2, version: h2 } = e2, c2 = []; - a2.forEach((e3) => { - qe(e3) || (e3 = new ho(e3, t2, s2, o2), c2.push(e3)); - }), this.content.messageList = c2, this.content.title = u2, this.content.abstractList = p2, this.content.compatibleText = l2, this.content.version = h2 || 0; - } - } - sendable() { - return !qe(this.content.messageList) || !qe(this.content.downloadKey); - } -}; -var mo = { 1: oe, 2: re, 3: ie, 4: ne }; -var _o = class { - constructor(e2) { - this.ID = "", this.conversationID = e2.conversationID || null, this.conversationType = e2.conversationType || ae, this.conversationSubType = e2.conversationSubType, this.time = e2.time || Math.ceil(Date.now() / 1e3), this.sequence = e2.sequence || 0, this.clientSequence = e2.clientSequence || e2.sequence || 0, this.random = e2.random || 0 === e2.random ? e2.random : ze(), this.priority = this._computePriority(e2.priority), this.nick = e2.nick || "", this.avatar = e2.avatar || "", this.isPeerRead = false, this.nameCard = "", this.hasRiskContent = function(e3) { - let t2 = e3 && 1 < e3 ? true : false; - return t2; - }(e2.checkResult), this._elements = [], this.isPlaceMessage = e2.isPlaceMessage || 0, this.isRevoked = 2 === e2.isPlaceMessage || 8 === e2.msgFlagBits, this.from = e2.from || null, this.to = e2.to || null, this.flow = "", this.isSystemMessage = e2.isSystemMessage || false, this.protocol = e2.protocol || "JSON", this.isResend = false, this.isRead = false, this.status = e2.status || Bs, this._onlineOnlyFlag = false, this._groupAtInfoList = [], this._relayFlag = false, this.atUserList = [], this.cloudCustomData = e2.cloudCustomData || "", this.isDeleted = false, this.isModified = !!e2.messageVersion, this._isExcludedFromUnreadCount = !(!e2.messageControlInfo || 1 !== e2.messageControlInfo.excludedFromUnreadCount), this._isExcludedFromLastMessage = !(!e2.messageControlInfo || 1 !== e2.messageControlInfo.excludedFromLastMessage), this.clientTime = e2.clientTime || Math.floor(ve() / 1e3) || 0, this.senderTinyID = e2.senderTinyID || e2.tinyID || "", this.readReceiptInfo = e2.readReceiptInfo || { readCount: void 0, unreadCount: void 0, isPeerRead: void 0, timestamp: 0 }, this.needReadReceipt = true === e2.needReadReceipt || 1 === e2.needReadReceipt, this.version = e2.messageVersion || 0, this.isBroadcastMessage = e2.isBroadcastMessage || false, this._receiverList = e2.receiverList || void 0, this.isSupportExtension = true === e2.isSupportExtension || 1 === e2.isSupportExtension, this._cmConfigID = e2.customModerationConfigurationID, this.revoker = e2.revokerInfo && e2.revokerInfo.revoker || "", this.revokerInfo = e2.revokerInfo || { userID: "", nick: "", avatar: "" }, this.revokeReason = e2.revokeReason || "", this.reInitialize(e2.currentUser), this.extractGroupInfo(e2.groupProfile || null), this.handleGroupAtInfo(e2), this.initC2CReadReceiptInfo(e2); - } - get elements() { - return this._elements; - } - getElements() { - return this._elements; - } - extractGroupInfo(e2) { - null !== e2 && (Ve(e2.nick) && (this.nick = e2.nick), Ve(e2.avatar) && (this.avatar = e2.avatar), e2 = e2.messageFromAccountExtraInformation, He(e2)) && Ve(e2.nameCard) && (this.nameCard = e2.nameCard); - } - handleGroupAtInfo(e2) { - e2.payload && e2.payload.atUserList && e2.payload.atUserList.forEach((e3) => { - e3 !== Se ? (this._groupAtInfoList.push({ groupAtAllFlag: 0, groupAtUserID: e3 }), this.atUserList.push(e3)) : (this._groupAtInfoList.push({ groupAtAllFlag: 1 }), this.atUserList.push(Se)); - }), je(e2.groupAtInfo) && e2.groupAtInfo.forEach((e3) => { - 0 === e3.groupAtAllFlag ? this.atUserList.push(e3.groupAtUserID) : 1 === e3.groupAtAllFlag && this.atUserList.push(Se); - }); - } - getGroupAtInfoList() { - return this._groupAtInfoList; - } - _initProxy() { - this._elements[0] && (this.payload = this._elements[0].content, this.type = this._elements[0].type); - } - reInitialize(e2) { - e2 && (this.status = this.from ? Bs : Ks, !this.from) && (this.from = e2), this._initFlow(e2), this._initSequence(e2), this._concatConversationID(e2), this.generateMessageID(); - } - isSendable() { - return 0 !== this._elements.length && (true === this._relayFlag || "function" == typeof this._elements[0].sendable && this._elements[0].sendable()); - } - _initTo(e2) { - this.conversationType === ue && (this.to = e2.groupID); - } - _initSequence(e2) { - 0 === this.clientSequence && e2 && (this.clientSequence = function(o2) { - if (!o2) - return false; - if (void 0 === Xe[o2]) { - var r2 = /* @__PURE__ */ new Date(); - let e3 = ("3" + r2.getHours()).slice(-2), t2 = ("0" + r2.getMinutes()).slice(-2), s2 = ("0" + r2.getSeconds()).slice(-2); - Xe[o2] = parseInt([e3, t2, s2, "0001"].join("")), e3 = null, t2 = null, s2 = null, ct.l("autoIncrementIndex start index:" + Xe[o2]); - } - return Xe[o2]++; - }(e2)), 0 === this.sequence && this.conversationType === ae && (this.sequence = this.clientSequence); - } - generateMessageID() { - this.from === le && (this.senderTinyID = "144115198244471703"), this.ID = `${this.senderTinyID}-${this.clientTime}-` + this.random; - } - _initFlow(e2) { - "" !== e2 && (e2 === this.from ? (this.flow = "out", this.isRead = true) : this.flow = "in"); - } - _concatConversationID(e2) { - var t2 = this["to"], s2 = this.conversationType; - s2 !== le ? (e2 = s2 === ae ? e2 === this.from ? t2 : this.from : this.to, this.conversationID = e2 ? "" + s2 + e2 : null) : this.conversationID = le; - } - isElement(e2) { - return e2 instanceof Xs || e2 instanceof to || e2 instanceof so || e2 instanceof oo || e2 instanceof uo || e2 instanceof lo || e2 instanceof io || e2 instanceof ao || e2 instanceof po || e2 instanceof co || e2 instanceof go; - } - setElement(t2, s2, o2, r2) { - if (this.isElement(t2)) - this._elements = [t2]; - else { - var i2 = (e2) => { - if (e2.type && e2.content) - switch (e2.type) { - case B: - this.setTextElement(e2.content); - break; - case J: - this.setImageElement(e2.content, s2, o2, r2); - break; - case W: - this.setAudioElement(e2.content, s2, o2, r2); - break; - case z: - this.setFileElement(e2.content, s2, o2, r2); - break; - case Y: - this.setVideoElement(e2.content, s2, o2, r2); - break; - case te: - this.setCustomElement(e2.content); - break; - case Q: - this.setLocationElement(e2.content); - break; - case Z: - this.setGroupTipElement(e2.content); - break; - case ee: - this.setGroupSystemNoticeElement(e2.content); - break; - case X: - this.setFaceElement(e2.content); - break; - case se: - this.setMergerElement(e2.content, s2, o2, r2); - } - }; - if (je(t2)) - for (let e2 = 0; e2 < t2.length; e2++) - i2(t2[e2]); - else - i2(t2); - } - this._initProxy(); - } - clearElement() { - this._elements.length = 0; - } - setTextElement(e2) { - e2 = "string" == typeof e2 ? e2 : e2.text, e2 = new Xs({ text: e2 }); - this._elements.push(e2); - } - setImageElement(e2, t2, s2, o2) { - e2 = new to(e2, t2, s2, o2); - this._elements.push(e2); - } - setAudioElement(e2, t2, s2, o2) { - e2 = new oo(e2, t2, s2, o2); - this._elements.push(e2); - } - setFileElement(e2, t2, s2, o2) { - e2 = new uo(e2, t2, s2, o2); - this._elements.push(e2); - } - setVideoElement(e2, t2, s2, o2) { - e2 = new lo(e2, t2, s2, o2); - this._elements.push(e2); - } - setLocationElement(e2) { - e2 = new co(e2); - this._elements.push(e2); - } - setCustomElement(e2) { - e2 = new po(e2); - this._elements.push(e2); - } - setGroupTipElement(e2) { - let t2 = {}; - var s2 = e2.operationType; - if (qe(e2.memberInfoList) ? e2.operatorInfo && (t2 = e2.operatorInfo) : s2 !== Le && s2 !== Ce && s2 !== Ge && s2 !== be || (t2 = e2.memberInfoList[0]), !qe(e2.memberExtraInfo)) { - const t3 = e2.memberExtraInfo["reason"]; - e2.msgMemberInfo.forEach((e3) => { - e3.reason = t3; - }); - } - var { nick: s2, avatar: o2 } = t2, s2 = (Ve(s2) && (this.nick = s2), Ve(o2) && (this.avatar = o2), new io(e2)); - this._elements.push(s2); - } - setGroupSystemNoticeElement(e2) { - e2 = new ao(e2); - this._elements.push(e2); - } - setFaceElement(e2) { - e2 = new so(e2); - this._elements.push(e2); - } - setMergerElement(e2, t2, s2, o2) { - e2 = new go(e2, t2, s2, o2); - this._elements.push(e2); - } - setIsRead(e2) { - this.isRead = e2; - } - setRelayFlag(e2) { - this._relayFlag = e2; - } - _computePriority(e2) { - if (!Ke(e2)) { - if (Ve(e2) && -1 !== Object.values(mo).indexOf(e2)) - return e2; - if (xe(e2)) { - e2 = "" + e2; - if (-1 !== Object.keys(mo).indexOf(e2)) - return mo[e2]; - } - } - return re; - } - setNickAndAvatar(e2) { - var { nick: e2, avatar: t2 } = e2; - Ve(e2) && (this.nick = e2), Ve(t2) && (this.avatar = t2); - } - setNameCard(e2) { - Ve(e2) && (this.nameCard = e2); - } - initC2CReadReceiptInfo(e2) { - var { readReceiptSentByPeer: e2, timestamp: t2 = 0 } = e2; - this.conversationType === ae && true === this.needReadReceipt && (this.readReceiptInfo.isPeerRead = 1 === e2, this.readReceiptInfo.timestamp = t2); - } -}; -var fo = class { - constructor(e2) { - this._grpM = e2, this._n = "GroupTipsHandler", this._cachedGroupTipsMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4; - } - onCheckTimer(e2) { - e2 % 1 == 0 && 0 < this._cachedGroupTipsMap.size && this._check(); - } - _check() { - this._cachedGroupTipsMap.forEach((e2, t2) => { - var s2 = this._checkCountMap.get(t2), o2 = this._grpM.hasLocalGroup(t2); - ct.l(this._n + `._check groupID:${t2} hasLocalGroup:${o2} checkCount:` + s2), o2 ? (this._notifyCachedGroupTips(t2), this._checkCountMap.delete(t2), this._grpM.deleteUnjoinedAVChatRoom(t2)) : s2 >= this.MAX_CHECK_COUNT ? (this._deleteCachedGroupTips(t2), this._checkCountMap.delete(t2)) : this._checkCountMap.set(t2, ++s2); - }); - } - onNewGroupTips(e2) { - ct.l(this._n + ".onNewGroupTips options:" + JSON.stringify(e2.dataList)); - var { eventDataList: e2, result: t2, AVChatRoomMessageList: s2 } = this._assembly(e2); - 0 < s2.length && this._grpM.onAVChatRoomMessage(s2), 0 < t2.length && (this._grpM.emitOEvt(Ut, t2), this._handleTips(t2)), 0 < e2.length && (this._grpM.updateNextMessageSeq(e2), this._grpM.get(o).onNewMessage({ conversationOptionsList: e2, isInstantMessage: true })); - } - _assembly(s2) { - var { event: r2, dataList: i2 } = s2, n2 = null, a2 = [], u2 = [], p2 = {}, l2 = []; - for (let e2 = 0, t2 = i2.length; e2 < t2; e2++) { - const s3 = Ye(i2[e2]); - if (6 === r2) { - if (this._grpM.isGroupAttributesUpdatedNotice(s3)) - continue; - if (this._grpM.isGroupCountersNotice(s3)) - continue; - } - var { groupProfile: { groupID: h2, communityType: c2 = 0, topicID: g2, invisible: m2, groupType: d2 } } = s3; - let t3 = void 0; - var _2 = this._grpM.isMessageFromTopic(c2, g2), f2 = (_2 && (t3 = pe, s3.to = g2), this._grpM.hasLocalGroup(h2)); - if (f2 || !this._grpM.isUnjoinedAVChatRoom(h2)) - if (f2 || _2) - if (this._grpM.isMessageFromOrToAVChatroom(h2)) - s3.event = r2, l2.push(s3); - else if (s3.currentUser = this._grpM.getMyUserID(), s3.conversationType = ue, (n2 = new _o(s3)).setElement({ type: Z, content: { ...s3.elements, groupProfile: s3.groupProfile } }), n2.isSystemMessage = false, 1 === m2) - this._qualityStat(n2); - else { - var f2 = this._grpM.get(o), { conversationID: _2, sequence: m2 } = n2; - if (6 === r2) - n2._onlineOnlyFlag = true, u2.push(n2); - else if (!f2.pushIntoNoticeResult(u2, n2)) - continue; - if (!(this._grpM.isMessageFromCommunityOfTopic(c2, g2) || 6 === r2 && f2.getLocalConversation(_2))) { - 6 !== r2 && this._qualityStat(n2); - c2 = f2.isRemoteRead({ conversationID: _2, sequence: m2 }); - if (Ke(p2[_2])) { - let e3 = 0; - "in" !== n2.flow || n2._isExcludedFromUnreadCount || n2._onlineOnlyFlag || c2 || (e3 = 1), p2[_2] = a2.push({ conversationID: _2, unreadCount: e3, type: Ke(t3) ? n2.conversationType : t3, subType: n2.conversationSubType, lastMessage: n2._isExcludedFromLastMessage ? "" : n2 }) - 1; - } else { - const s4 = p2[_2]; - a2[s4].type = n2.conversationType, a2[s4].subType = n2.conversationSubType, a2[s4].lastMessage = n2._isExcludedFromLastMessage ? "" : n2, "in" !== n2.flow || n2._isExcludedFromUnreadCount || n2._onlineOnlyFlag || c2 || a2[s4].unreadCount++; - } - } - } - else - this._cacheAndCompare({ groupID: h2, event: r2, item: s3, groupType: d2 }); - } - return { eventDataList: a2, result: u2, AVChatRoomMessageList: l2 }; - } - _qualityStat(e2) { - this._grpM.get(p).addMessageSequence({ key: Jt, message: e2 }); - } - _handleTips(e2) { - e2.forEach((e3) => { - switch (e3.payload.operationType) { - case 1: - this._onNewMemberComeIn(e3); - break; - case 2: - this._onMemberQuit(e3); - break; - case 3: - this._onMemberKickedOut(e3); - break; - case 4: - this._onMemberSetAdmin(e3); - break; - case 5: - this._onMemberCancelledAdmin(e3); - break; - case 6: - this._onGroupProfileModified(e3); - break; - case 7: - this._onMemberInfoModified(e3); - break; - case 8: - this._onTopicProfileUpdated(e3); - break; - default: - ct.w(this._n + "._handleTips unknown operationType:" + e3.payload.operationType); - } - }); - } - _onNewMemberComeIn(e2) { - var { memberNum: e2, groupProfile: { groupID: t2 } } = e2.payload, t2 = this._grpM.getLocalGroupProfile(t2); - t2 && xe(e2) && t2.memberCount !== e2 && (t2.memberCount = e2, this._updateConvGroupProfile(t2)); - } - _onMemberQuit(e2) { - var { memberNum: t2, groupProfile: { groupID: s2 } } = e2.payload, o2 = this._grpM.getLocalGroupProfile(s2); - o2 && xe(t2) && o2.memberCount !== t2 && (o2.memberCount = t2, this._updateConvGroupProfile(o2)), this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(s2, e2.payload.userIDList); - } - _onMemberKickedOut(e2) { - var { memberNum: t2, groupProfile: { groupID: s2 } } = e2.payload, o2 = this._grpM.getLocalGroupProfile(s2); - o2 && xe(t2) && o2.memberCount !== t2 && (o2.memberCount = t2, this._updateConvGroupProfile(o2)), this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(s2, e2.payload.userIDList); - } - _updateConvGroupProfile(e2) { - this._grpM.get(o).updateConvGroupProfile([e2]); - } - _onMemberSetAdmin(e2) { - const t2 = e2.payload.groupProfile.groupID, s2 = e2.payload.userIDList, o2 = this._grpM.getGroupMemberHandler(); - s2.forEach((e3) => { - e3 = o2.getLocalGroupMemberInfo(t2, e3); - e3 && e3.updateRole(Ie); - }); - } - _onMemberCancelledAdmin(e2) { - const t2 = e2.payload.groupProfile.groupID, s2 = e2.payload.userIDList, o2 = this._grpM.getGroupMemberHandler(); - s2.forEach((e3) => { - e3 = o2.getLocalGroupMemberInfo(t2, e3); - e3 && e3.updateRole(ye); - }); - } - _onGroupProfileModified(e2) { - const { newGroupProfile: t2, groupProfile: s2, operatorInfo: o2 } = e2.payload, r2 = s2["groupID"], i2 = this._grpM.getLocalGroupProfile(r2); - Object.keys(t2).forEach((e3) => { - switch (e3) { - case "ownerID": - this._ownerChanged(i2, t2); - break; - case "groupName": - i2.name = t2[e3]; - break; - default: - i2[e3] = t2[e3]; - } - }), Ke(o2) || Object.keys(o2).forEach((e3) => { - "nameCard" === e3 ? i2.updateSelfInfo({ nameCard: o2[e3] }) : "role" === e3 && i2.updateSelfInfo({ role: o2[e3] }); - }); - e2 = !i2.isSupportTopic; - this._grpM.emitGroupListUpdate(true, e2); - } - _ownerChanged({ groupID: e2 }, t2) { - var s2 = this._grpM.getLocalGroupProfile(e2), o2 = this._grpM.getMyUserID(); - if (o2 === t2.ownerID) { - s2.updateGroup({ selfInfo: { role: Me } }); - const t3 = this._grpM.getGroupMemberHandler(), r2 = t3.getLocalGroupMemberInfo(e2, o2), i2 = this._grpM.getLocalGroupProfile(e2).ownerID, n2 = t3.getLocalGroupMemberInfo(e2, i2); - r2 && r2.updateRole(Me), n2 && n2.updateRole(ye); - } - } - _onMemberInfoModified(e2) { - const { to: t2, payload: { groupProfile: s2, memberList: o2 } } = e2, r2 = s2.groupID, i2 = (rt(t2) && this._updateTopicMuteTime(e2), this._grpM.getGroupMemberHandler()); - o2.forEach((e3) => { - var t3 = i2.getLocalGroupMemberInfo(r2, e3.userID); - t3 && xe(e3.muteTime) && t3.updateMuteUntil(e3.muteTime); - }); - } - _updateTopicMuteTime(e2) { - var { to: e2, payload: { groupProfile: o2, memberList: r2 = [] } } = e2, o2 = o2["groupID"], i2 = this._grpM.get(s).getLocalTopic(o2, e2); - if (i2) { - let t2 = false; - for (let e3 = 0; e3 < r2.length; e3++) { - const s2 = r2[e3]; - if (s2.userID === this._grpM.getMyUserID() && 0 <= s2.muteTime) { - i2.updateSelfInfo({ muteTime: s2.muteTime }), t2 = true; - break; - } - } - t2 && this._grpM.emitOEvt(xt, { groupID: o2, topic: i2 }); - } - } - _onTopicProfileUpdated(e2) { - var { groupProfile: { groupID: t2 }, newTopicInfo: o2 } = e2.payload; - this._grpM.get(s).onTopicProfileUpdated({ groupID: t2, topicID: e2.to, ...o2 }); - } - _cacheGroupTips(e2, t2) { - this._cachedGroupTipsMap.has(e2) || this._cachedGroupTipsMap.set(e2, []), this._cachedGroupTipsMap.get(e2).push(t2); - } - _deleteCachedGroupTips(e2) { - this._cachedGroupTipsMap.has(e2) && this._cachedGroupTipsMap.delete(e2); - } - _notifyCachedGroupTips(e2, t2) { - var s2 = this._cachedGroupTipsMap.get(e2) || []; - ct.l(this._n + `._notifyCachedGroupTips groupID:${e2} groupType:${t2} count:` + s2.length), s2.forEach((e3) => { - this.onNewGroupTips(e3); - }), this._deleteCachedGroupTips(e2); - } - _cacheAndCompare(e2) { - var { groupID: e2, event: t2, item: s2, groupType: o2 } = e2, t2 = (ct.l(this._n + `._cacheAndCompare groupID:${e2} groupType:` + o2), this._cacheGroupTips(e2, { event: t2, dataList: [s2] }), { groupID: e2, type: o2 }); - o2 === me ? this._grpM.hasLocalGroup(e2) ? this._notifyCachedGroupTips(e2, o2) : this._grpM.setUnjoinedAVChatRoom(e2) : (this._grpM.updateGroupMap([t2]), this._notifyCachedGroupTips(e2, o2)), this._checkCountMap.has(e2) || this._checkCountMap.set(e2, 0); - } - reset() { - this._cachedGroupTipsMap.clear(), this._checkCountMap.clear(); - } -}; -var Mo = class { - constructor(e2) { - this._grpM = e2, this._n = "CommonGroupHandler", this.tempConversationList = null, this._cachedGroupMessageMap = /* @__PURE__ */ new Map(), this._checkCountMap = /* @__PURE__ */ new Map(), this.MAX_CHECK_COUNT = 4, this.PAGING_GRP_COUNT_LIMIT = 200, this._pagingStatus = Js, this._pagingGetCostList = [], e2.getIEmitInst().on(Bt.A2KEY_AND_TINYID_UPDATED, this.syncGroupList, this); - } - onCheckTimer(e2) { - e2 % 1 == 0 && 0 < this._cachedGroupMessageMap.size && this._check(); - } - _check() { - this._cachedGroupMessageMap.forEach((e2, t2) => { - var s2 = this._checkCountMap.get(t2), o2 = this._grpM.hasLocalGroup(t2); - ct.l(this._n + `._check groupID:${t2} hasLocalGroup:${o2} checkCount:` + s2), o2 ? (this._notifyCachedGroupMessage(t2), this._checkCountMap.delete(t2), this._grpM.deleteUnjoinedAVChatRoom(t2)) : s2 >= this.MAX_CHECK_COUNT ? (this._deleteCachedGroupMessage(t2), this._checkCountMap.delete(t2)) : this._checkCountMap.set(t2, ++s2); - }); - } - updateLastMsg(i2) { - var e2 = this._n + ".updateLastMsg"; - if (0 === this._grpM.getGroupMap().size) - this.tempConversationList = i2; - else { - let t2, s2, o2, r2 = false; - var n2, a2, u2 = i2.length; - for (let e3 = 0; e3 < u2; e3++) - (t2 = i2[e3]).type === ue && 0 !== t2.lastMessage.lastSequence && null !== t2.lastMessage.payload && (s2 = t2.conversationID.split(/^GROUP/)[1], o2 = this._grpM.getLocalGroupProfile(s2)) && (n2 = o2.lastMessage, a2 = t2.lastMessage, JSON.stringify(n2) !== JSON.stringify(a2)) && (o2.lastMessage = { ...t2.lastMessage }, r2 = true); - ct.l(e2 + ` convCount:${u2} groupCount:${this._grpM.getLocalGroupList().length} isUpdated:` + r2), r2 && (this._grpM.sortLocalGroupList(), this._grpM.emitGroupListUpdate(true, false)); - } - } - onNewMessage(e2) { - var { conversationOptionsList: t2, messageList: s2, AVChatRoomMessageList: r2 } = this._assembly(e2), r2 = (0 < r2.length && this._grpM.onAVChatRoomMessage(r2), Ze(s2)), r2 = (0 < r2.length && this._grpM.emitOEvt(Nt, r2), 0 < t2.length && (this._grpM.get(o).onNewMessage({ conversationOptionsList: t2, isInstantMessage: false !== e2.isInstantMessage, updateUnreadCount: false !== e2.updateUnreadCount }), this._grpM.updateNextMessageSeq(t2)), et(s2)); - 0 < r2.length && this._grpM.emitOEvt(Ut, r2), s2.length = 0; - } - _assembly(i2) { - const { dataList: a2, event: e2, isInstantMessage: u2 } = i2; - var p2 = null; - const l2 = [], h2 = [], c2 = [], g2 = {}, m2 = this._grpM.getFileDownloadProxy(), d2 = this._grpM.getDowloadFileAuthKey(), _2 = this._grpM.get(n).getFileDNList(), f2 = a2.length; - 1 < f2 && a2.sort((e3, t2) => e3.sequence - t2.sequence); - var M2 = this._grpM.get(o), I2 = this._grpM.get(t); - for (let r2 = 0; r2 < f2; r2++) { - const i3 = Ye(a2[r2]), { groupProfile: { groupID: o2, communityType: n2 = 0, topicID: f3, invisible: L2, groupType: C2 } } = i3; - let s2 = void 0; - var y2 = this._grpM.isMessageFromTopic(n2, f3), D2 = (y2 && (s2 = pe, i3.to = f3), this._grpM.hasLocalGroup(o2)); - if (D2 || !this._grpM.isUnjoinedAVChatRoom(o2)) - if (D2 || y2) - if (this._grpM.isMessageFromOrToAVChatroom(o2)) - i3.event = e2, c2.push(i3); - else if (i3.currentUser = this._grpM.getMyUserID(), i3.conversationType = ue, i3.isSystemMessage = !!i3.isSystemMessage, (p2 = new _o(i3)).setElement(i3.elements, m2, d2, _2), 1 === L2) - this._qualityStat(u2, p2); - else { - let e3 = 1 === a2[r2].isModified; - if (M2.isMessageSentByCurrentInstance(p2) ? p2.isModified = e3 : e3 = false, 1 === i3.onlineOnlyFlag) - p2._onlineOnlyFlag = true, M2.isMessageSentByCurrentInstance(p2) || h2.push(p2); - else { - if (this._grpM.isMessageFromCommunityOfTopic(n2, f3)) { - h2.push(p2); - continue; - } - if (p2.from === this._grpM.getMyUserID()) { - const t3 = M2.getLatestMessageSentByMe(p2.conversationID); - if (t3) { - const { nick: a4, avatar: o3 } = t3; - a4 === p2.nick && o3 === p2.avatar || (M2.modifyMessageSentByMe({ conversationID: i4, latestNick: p2.nick, latestAvatar: p2.avatar }), I2.mockOnNickAvatarModified(p2.nick, p2.avatar)); - } - } - if (!M2.pushIntoMessageList(h2, p2, e3)) - continue; - this._qualityStat(u2, p2); - const { conversationID: i4, sequence: t2 } = p2, a3 = M2.isRemoteRead({ conversationID: i4, sequence: t2 }); - if (Ke(g2[i4])) { - let e4 = 0; - "in" !== p2.flow || p2._isExcludedFromUnreadCount || a3 || (e4 = 1), g2[i4] = l2.push({ conversationID: i4, unreadCount: e4, type: Ke(s2) ? p2.conversationType : s2, subType: p2.conversationSubType, lastMessage: p2._isExcludedFromLastMessage ? "" : p2 }) - 1; - } else { - const t3 = g2[i4]; - l2[t3].type = Ke(s2) ? p2.conversationType : s2, l2[t3].subType = p2.conversationSubType, l2[t3].lastMessage = p2._isExcludedFromLastMessage ? "" : p2, "in" !== p2.flow || p2._isExcludedFromUnreadCount || a3 || l2[t3].unreadCount++; - } - } - } - else - this._cacheAndCompare({ groupID: o2, event: e2, item: i3, groupType: C2 }); - } - return { conversationOptionsList: l2, messageList: h2, AVChatRoomMessageList: c2 }; - } - _qualityStat(e2, t2) { - var s2 = this._grpM.get(p); - s2.addMessageSequence({ key: Jt, message: t2 }), e2 && 0 < t2.clientTime && s2.addMessageDelay(t2.clientTime); - } - onMsgRevoked(e2, t2) { - const p2 = this._grpM.get(o), l2 = [], h2 = []; - e2.dataList.forEach((e3) => { - const t3 = e3.elements["revokedInfos"], { revokerInfo: n2, groupProfile: a2 } = e3; - let u2 = false; - a2 && (u2 = ot({ groupID: a2.groupID }) || !qe(a2.topicID)), Ke(t3) || t3.forEach((e4) => { - var t4 = qe(e4.topicID) ? "GROUP" + e4.groupID : "GROUP" + e4.topicID, s2 = p2.getLocalConversation(t4), o2 = e4.revokerInfo && e4.revokerInfo.revoker || n2 && n2.revoker, r2 = n2 && n2.reason || ""; - let i2; - if (s2 && st(s2.type)) - i2 = { conversationID: t4, sequence: e4.sequence, ID: `${e4.tinyID}-${e4.clientTime}-` + e4.random }; - else { - const n3 = p2.revoke(t4, e4.sequence, e4.random); - n3 ? i2 = n3 : (i2 = { conversationID: t4, sequence: e4.sequence }, e4.tinyID && e4.clientTime && e4.random && (i2.ID = `${e4.tinyID}-${e4.clientTime}-` + e4.random), e4.time && (i2.time = e4.time)); - } - i2 && (i2.revoker = o2, i2.revokeReason = r2, i2.revokerInfo = { userID: o2, nick: "", avatar: "" }, (u2 ? (i2.revokerInfo.nick = a2.nick, i2.revokerInfo.avatar = a2.avatar, l2) : h2).push(i2)); - }); - }), 0 === h2.length && 0 === l2.length || (p2.onMessageRevoked([...l2, ...h2], t2), 0 < l2.length && this._grpM.emitOEvt(qt, l2), 0 < h2.length && p2.updateRevokerInfo(h2).then((e3) => { - this._grpM.emitOEvt(qt, e3); - })); - } - _groupListTreeShaking(s2) { - const o2 = new Map([...this._grpM.getGroupMap()]); - for (let e2 = 0, t2 = s2.length; e2 < t2; e2++) - o2.delete(s2[e2].groupID); - this._grpM.hasJoinedAVChatRoom() && this._grpM.getJoinedAVChatRoom().forEach((e2) => { - o2.delete(e2); - }), this._grpM.getGroupMap().forEach((e2, t2) => { - e2.isSupportTopic && o2.delete(t2); - }); - var r2 = [...o2.keys()]; - for (let e2 = 0, t2 = r2.length; e2 < t2; e2++) - this._grpM.deleteGroup(r2[e2]); - } - syncGroupList(e2 = false) { - this._pagingStatus === Js && this._grpM.clearGroupMap(); - const t2 = [...L], s2 = this.PAGING_GRP_COUNT_LIMIT, o2 = []; - if (true === e2) - return this._pagingGetGroupListWithTopic({ limit: s2, offset: 0, groupBaseInfoFilter: t2, groupList: o2 }); - const r2 = this._n + ".syncGroupList", i2 = new Zt("syncGroupList"); - return this._pagingGetGroupList({ limit: s2, offset: 0, groupBaseInfoFilter: t2, groupList: o2 }).then(() => { - var e3 = function(e4) { - if (je(e4) && 0 !== e4.length) { - let t4 = 0; - return e4.forEach((e5) => { - t4 += e5; - }), (t4 / e4.length).toFixed(0); - } - }(this._pagingGetCostList), t3 = function(e4) { - if (je(e4) && 0 !== e4.length) { - let t4 = 0; - return e4.forEach((e5) => { - t4 += e5; - }), t4.toFixed(0); - } - }(this._pagingGetCostList), t3 = (this._pagingGetCostList.length = 0, this._pagingStatus = Ws, this._groupListTreeShaking(o2), this._grpM.updateGroupMap(o2), `count:${this._grpM.getLocalGroupList().length} sum:${t3} avg:` + e3); - return ct.l(r2 + " ok. " + t3), i2.setMessage(t3).end(), this.tempConversationList && (this.updateLastMsg(this.tempConversationList), this.tempConversationList = null), this._grpM.emitGroupListUpdate(true, true), ht({ groupList: this._grpM.getLocalGroupList() }); - }).catch((e3) => (this._pagingStatus = zs, i2.setError(e3).end(), ct.e(r2 + " failed. error:", e3), Kt(e3))); - } - getGroupList() { - const t2 = this._n + ".getGroupList"; - var e2; - return ct.l(t2 + " pagingStatus:" + this._pagingStatus), this._pagingStatus === zs || this._pagingStatus === Js ? this.syncGroupList().then(() => { - var e3 = this._grpM.getLocalGroupList(); - return ht({ groupList: e3, isSyncCompleted: this.isPagingGetCompleted() }); - }).catch((e3) => (ct.e(t2 + " failed. error:", e3), Kt(e3))) : (e2 = this._grpM.getLocalGroupList(), ct.l(t2 + ". returned group count:" + e2.length), jt({ groupList: e2, isSyncCompleted: this.isPagingGetCompleted() })); - } - isPagingGetCompleted() { - return this._pagingStatus === Ws; - } - _pagingGetGroupList(e2) { - const o2 = this._n + "._pagingGetGroupList"; - let { isCommunityRelay: r2 = false, limit: i2, offset: n2, groupBaseInfoFilter: a2, groupList: u2 } = e2; - const p2 = Date.now(); - return this._grpM.req({ P: ts, data: { type: r2 ? de : void 0, memberAccount: this._grpM.getMyUserID(), limit: i2, offset: n2, responseFilter: { groupBaseInfoFilter: a2, selfInfoFilter: ["Role", "JoinTime", "MsgFlag", "MsgSeq"] } } }).then((e3) => { - var { groups: e3 = [], totalCount: t2 } = e3.data, e3 = (u2.push(...e3), this._handleGroupAtInfoWithoutTopic(r2, e3), n2 + i2), s2 = !(e3 < t2), t2 = `offset:${n2} limit:${i2} total:${t2} isCompleted:${s2} current:${u2.length} isCommunityRelay:` + r2; - return this._pagingGetCostList.push(at(p2, false)), ct.l(o2 + ` ok. ${t2} cost:` + at(p2)), r2 || s2 ? !r2 && s2 ? (ct.l(o2 + " start to get community list"), n2 = 0, this._pagingGetGroupList({ limit: i2, offset: n2, groupBaseInfoFilter: a2, groupList: u2, isCommunityRelay: true })) : r2 && !s2 ? (n2 = e3, this._pagingGetGroupList({ limit: i2, offset: n2, groupBaseInfoFilter: a2, groupList: u2, isCommunityRelay: true })) : ht({ groupList: u2 }) : (n2 = e3, this._pagingGetGroupList({ limit: i2, offset: n2, groupBaseInfoFilter: a2, groupList: u2 })); - }).catch((e3) => 10018 === e3.code ? (ct.w(this.logPrefix + " response size exceeds the limit, request count:" + i2), i2 = 50, this._pagingGetGroupList({ limit: i2, offset: n2, groupBaseInfoFilter: a2, groupList: u2, isCommunityRelay: r2 })) : r2 ? (11e3 === e3.code && ct.l(o2 + " ok. community unavailable"), jt({ groupList: u2 })) : Kt(e3)); - } - _pagingGetGroupListWithTopic(e2) { - const o2 = this._n + "._pagingGetGroupListWithTopic"; - let { limit: r2, offset: i2, groupBaseInfoFilter: n2, groupList: a2 } = e2; - const u2 = Date.now(); - return this._grpM.req({ P: ts, data: { type: de, memberAccount: this._grpM.getMyUserID(), limit: r2, offset: i2, responseFilter: { groupBaseInfoFilter: n2, selfInfoFilter: [...C] }, isSupportTopic: 1, needAppDefineData: 1 } }).then((e3) => { - var { groups: e3 = [], totalCount: t2 } = e3.data, e3 = (a2.push(...e3), i2 + r2), s2 = !(e3 < t2); - if (ct.l(o2 + ` ok. offset:${i2} limit:${r2} totalCount:${t2} isCompleted:${s2} currentCount:${a2.length} cost:` + at(u2)), !s2) - return i2 = e3, this._pagingGetGroupListWithTopic({ limit: r2, offset: i2, groupBaseInfoFilter: n2, groupList: a2 }); - this._grpM.updateGroupMap(a2), this._grpM.emitGroupListUpdate(true, false); - t2 = this._grpM.getLocalGroupList().filter((e4) => true === e4.isSupportTopic); - return ht({ groupList: t2 }); - }).catch((e3) => 10018 === e3.code ? (ct.w(this.logPrefix + " response size exceeds the limit, request count:" + r2), r2 = 50, this._pagingGetGroupListWithTopic({ limit: r2, offset: i2, groupBaseInfoFilter: n2, groupList: a2 })) : Kt(e3)); - } - _cacheGroupMessage(e2, t2) { - this._cachedGroupMessageMap.has(e2) || this._cachedGroupMessageMap.set(e2, []), this._cachedGroupMessageMap.get(e2).push(t2); - } - _deleteCachedGroupMessage(e2) { - this._cachedGroupMessageMap.has(e2) && this._cachedGroupMessageMap.delete(e2); - } - _notifyCachedGroupMessage(e2, t2) { - var s2 = this._cachedGroupMessageMap.get(e2) || []; - ct.l(this._n + `._notifyCachedGroupMessage groupID:${e2} groupType:${t2} count:` + s2.length), s2.forEach((e3) => { - this.onNewMessage(e3); - }), this._deleteCachedGroupMessage(e2); - } - _cacheAndCompare(e2) { - var { groupID: e2, event: t2, item: s2, groupType: o2 } = e2, t2 = (ct.l(this._n + `._cacheAndCompare groupID:${e2} groupType:` + o2), this._cacheGroupMessage(e2, { event: t2, dataList: [s2] }), { groupID: e2, type: o2 }); - o2 === me ? this._grpM.hasLocalGroup(e2) ? this._notifyCachedGroupMessage(e2, o2) : this._grpM.setUnjoinedAVChatRoom(e2) : (this._grpM.updateGroupMap([t2]), this._notifyCachedGroupMessage(e2, o2)), this._checkCountMap.has(e2) || this._checkCountMap.set(e2, 0); - } - _handleGroupAtInfoWithoutTopic(e2, t2) { - e2 && 0 !== t2.length && t2.forEach((e3) => { - const { groupID: t3, groupAtInfoList: s2 } = e3, r2 = []; - Ke(s2) || (s2.forEach((e4) => { - r2.push({ ...e4, groupID: t3 }); - }), this._grpM.get(o).onNewGroupAtTips({ dataList: r2 })); - }); - } - setPagingGroupCount(e2) { - Ke(e2) || (this.PAGING_GRP_COUNT_LIMIT = parseInt(e2, 10)); - } - reset() { - this.PAGING_GRP_COUNT_LIMIT = 200, this._cachedGroupMessageMap.clear(), this._checkCountMap.clear(), this._pagingStatus = Js, this._pagingGetCostList = []; - } -}; -var Io = 1; -var yo = 2; -var Do = 3; -var Lo = 4; -var Co = 5; -var Go = class { - constructor(e2) { - this._grpM = e2, this._n = "GroupAttributesHandler", this._groupAttributesMap = /* @__PURE__ */ new Map(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4, this._grpM.getIEmitInst().on(Bt.CLOUD_CONFIG, this._onCloudConfig, this); - } - _onCloudConfig() { - var e2 = this._grpM.getCloudConfig("grp_attr_cache_time"); - Ke(e2) || (this.CACHE_EXPIRE_TIME = Number(e2)); - } - updateLocalMainSequenceOnReconnected() { - this._groupAttributesMap.forEach((e2) => { - e2.localMainSequence = 0; - }); - } - isGroupAttributesUpdatedNotice(e2) { - var { to: e2, elements: { newGroupProfile: t2 } } = e2, s2 = !Ke(t2) && !qe(t2.groupAttributeOption); - return s2 && this._onGroupAttributesUpdated({ groupID: e2, groupAttributeOption: t2.groupAttributeOption }), s2; - } - _onGroupAttributesUpdated(e2) { - const { groupID: t2, groupAttributeOption: s2 } = e2, { mainSequence: o2, isWithChangedAttributeInfo: r2, groupAttributeList: i2 = [], operationType: n2 } = s2; - if (ct.l(this._n + `.onGroupAttributesUpdated. groupID:${t2} isWithChangedAttributeInfo:${r2} operationType:` + n2), !Ke(n2)) { - this._groupAttributesCopy = this._getCachedAttributes({ groupID: t2 }); - e2 = this._getLocalGroupAttributes(t2)["localMainSequence"], e2 = o2 - e2; - if (0 != e2) { - if (1 === r2 && 1 == e2) - this._refreshCachedGroupAttributes({ groupID: t2, remoteMainSequence: o2, groupAttributeList: i2, operationType: n2 }), this._emitGroupAttributesUpdated(t2); - else if (this._hasLocalGroupAttributes(t2)) { - const e3 = this._getLocalGroupAttributes(t2)["avChatRoomKey"]; - this._getGroupAttributes({ groupID: t2, avChatRoomKey: e3 }).then(() => { - this._emitGroupAttributesUpdated(t2); - }); - } - } - } - } - initGroupAttributesCache(e2) { - var { groupID: e2, avChatRoomKey: t2 } = e2; - this._groupAttributesMap.set(e2, { lastUpdateTime: 0, localMainSequence: 0, remoteMainSequence: 0, attributes: /* @__PURE__ */ new Map(), avChatRoomKey: t2 }), ct.l(this._n + `.initGroupAttributesCache groupID:${e2} avChatRoomKey:` + t2); - } - initGroupAttributes(e2) { - const { groupID: s2, groupAttributes: o2 } = e2, { remoteMainSequence: t2, avChatRoomKey: r2 } = this._getLocalGroupAttributes(s2), i2 = new Zt("initGroupAttributes"); - return i2.setMessage(`groupID:${s2} avChatRoomKey:${r2} mainSequence:` + t2), this._grpM.req({ P: Ts, data: { groupID: s2, avChatRoomKey: r2, mainSequence: t2, groupAttributeList: this._transformGroupAttributes(o2) } }).then((e3) => { - ct.l(this._n + ".initGroupAttributes ok. groupID:" + s2); - var { mainSequence: e3, groupAttributeList: t3 } = e3.data, t3 = [...t3]; - return t3.forEach((e4) => { - e4.value = o2[e4.key]; - }), this._groupAttributesCopy = this._getCachedAttributes({ groupID: s2 }), this._refreshCachedGroupAttributes({ groupID: s2, remoteMainSequence: e3, groupAttributeList: t3, operationType: Io }), this._emitGroupAttributesUpdated(s2), i2.end(), ht({ groupAttributes: o2 }); - }).catch((e3) => (i2.setError(e3).end(), Kt(e3))); - } - setGroupAttributes(e2) { - const s2 = this._n + ".setGroupAttributes", { groupID: o2, groupAttributes: r2 } = e2, { remoteMainSequence: t2, avChatRoomKey: i2, attributes: n2 } = this._getLocalGroupAttributes(o2), a2 = this._transformGroupAttributes(r2), u2 = (a2.forEach((e3) => { - var t3 = e3["key"]; - e3.sequence = 0, n2.has(t3) && (e3.sequence = n2.get(t3).sequence); - }), new Zt("setGroupAttributes")); - return u2.setMessage(`groupID:${o2} groupAttributes:` + JSON.stringify(r2)), ct.l(s2 + `. groupID:${o2} mainSequence:` + t2), this._grpM.req({ P: Ss, data: { groupID: o2, avChatRoomKey: i2, mainSequence: t2, groupAttributeList: a2 } }).then((e3) => { - ct.l(s2 + " ok."); - var { mainSequence: e3, groupAttributeList: t3 } = e3.data, t3 = [...t3]; - return t3.forEach((e4) => { - e4.value = r2[e4.key]; - }), this._groupAttributesCopy = this._getCachedAttributes({ groupID: o2 }), this._refreshCachedGroupAttributes({ groupID: o2, remoteMainSequence: e3, groupAttributeList: t3, operationType: yo }), this._emitGroupAttributesUpdated(o2), u2.end(), ht({ groupAttributes: r2 }); - }).catch((e3) => (u2.setError(e3).end(), Kt(e3))); - } - deleteGroupAttributes(e2) { - const { groupID: t2, keyList: s2 = [] } = e2, { remoteMainSequence: o2, avChatRoomKey: r2, attributes: i2 } = this._getLocalGroupAttributes(t2); - let n2 = [...i2.keys()], a2 = Ps, u2 = Do; - const p2 = { groupID: t2, avChatRoomKey: r2, mainSequence: o2 }, l2 = [], h2 = (0 < s2.length && (n2 = [], a2 = vs, u2 = Lo, s2.forEach((e3) => { - let t3 = 0; - i2.has(e3) && (t3 = i2.get(e3).sequence, n2.push(e3)), l2.push({ key: e3, sequence: t3 }); - }), p2.groupAttributeList = l2), new Zt("deleteGroupAttributes")); - return h2.setMessage(`groupID:${t2} mainSequence:${o2} keyList:${s2} proto:` + a2), this._grpM.req({ P: a2, data: p2 }).then((e3) => { - ct.l(this._n + ".deleteGroupAttributes ok. groupID:" + t2); - e3 = e3.data.mainSequence; - return this._groupAttributesCopy = this._getCachedAttributes({ groupID: t2 }), this._refreshCachedGroupAttributes({ groupID: t2, remoteMainSequence: e3, groupAttributeList: l2, operationType: u2 }), this._emitGroupAttributesUpdated(t2), h2.end(), ht({ keyList: n2 }); - }).catch((e3) => (h2.setError(e3).end(), Kt(e3))); - } - getGroupAttributes(t2) { - const s2 = this._n + ".getGroupAttributes", o2 = t2["groupID"], { avChatRoomKey: e2, lastUpdateTime: r2, localMainSequence: i2, remoteMainSequence: n2 } = this._getLocalGroupAttributes(o2), a2 = new Zt("getGroupAttributes"); - if (a2.setMessage(`groupID:${o2} localMainSequence:${i2} remoteMainSequence:${n2} keyList:` + t2.keyList), Date.now() - r2 >= this.CACHE_EXPIRE_TIME || i2 < n2) - return this._getGroupAttributes({ groupID: o2, avChatRoomKey: e2 }).then((e3) => { - a2.setMoreMessage("get attributes from remote. count:" + e3.length).end(), ct.l(s2 + " from remote. groupID:" + o2); - e3 = this._getCachedAttributes(t2); - return ht({ groupAttributes: e3 }); - }).catch((e3) => (a2.setError(e3).end(), Kt(e3))); - a2.setMoreMessage("get attributes from cache").end(), ct.l(s2 + " from cache. groupID:" + o2); - var u2 = this._getCachedAttributes(t2); - return jt({ groupAttributes: u2 }); - } - _getGroupAttributes(o2) { - let e2 = 0; - return Ke(o2.avChatRoomKey) || (e2 = 1), this._grpM.req({ P: Rs, data: { ...o2, groupType: e2 } }).then((e3) => { - ct.l(this._n + "._getGroupAttributes ok. groupID:" + o2.groupID); - var { mainSequence: e3, groupAttributeList: t2 } = e3.data, s2 = [...t2]; - return Ke(e3) || this._refreshCachedGroupAttributes({ groupID: o2.groupID, remoteMainSequence: e3, groupAttributeList: s2, operationType: Co }), t2; - }).catch((e3) => Kt(e3)); - } - _refreshCachedGroupAttributes(e2) { - var { groupID: t2, remoteMainSequence: s2, groupAttributeList: o2, operationType: r2 } = e2; - if (this._hasLocalGroupAttributes(t2)) { - const e3 = this._getLocalGroupAttributes(t2), i2 = e3["localMainSequence"]; - if (r2 === Co || s2 - i2 == 1) - e3.remoteMainSequence = s2, e3.localMainSequence = s2, e3.lastUpdateTime = Date.now(), this._updateCachedAttributes({ groupAttributes: e3, groupAttributeList: o2, operationType: r2 }); - else { - if (i2 === s2) - return; - e3.remoteMainSequence = s2; - } - this._groupAttributesMap.set(t2, e3); - o2 = `operationType:${r2} localMainSequence:${i2} remoteMainSequence:` + s2; - ct.l(this._n + "._refreshCachedGroupAttributes. " + o2); - } - } - _getCachedAttributes(t2) { - const { groupID: e2, keyList: s2 = [] } = t2, o2 = {}; - if (this._hasLocalGroupAttributes(e2)) { - const t3 = this._getLocalGroupAttributes(e2)["attributes"]; - if (0 < s2.length) - s2.forEach((e3) => { - t3.has(e3) && (o2[e3] = t3.get(e3).value); - }); - else - for (const e3 of t3.keys()) - o2[e3] = t3.get(e3).value; - } - return o2; - } - _updateCachedAttributes(e2) { - const { groupAttributes: o2, groupAttributeList: t2, operationType: s2 } = e2; - s2 !== Do ? s2 !== Lo ? (s2 === Io && o2.attributes.clear(), t2.forEach((e3) => { - var { key: e3, value: t3, sequence: s3 } = e3; - o2.attributes.set(e3, { value: t3, sequence: s3 }); - })) : t2.forEach((e3) => { - o2.attributes.delete(e3.key); - }) : o2.attributes.clear(); - } - _hasLocalGroupAttributes(e2) { - return this._groupAttributesMap.has(e2); - } - _getLocalGroupAttributes(e2) { - return this._hasLocalGroupAttributes(e2) || this.initGroupAttributesCache({ groupID: e2 }), this._groupAttributesMap.get(e2); - } - _transformGroupAttributes(t2) { - const s2 = []; - return Object.keys(t2).forEach((e2) => { - s2.push({ key: e2, value: t2[e2] }); - }), s2; - } - _emitGroupAttributesUpdated(e2) { - var t2 = this._getCachedAttributes({ groupID: e2 }), { updatedKeyList: s2, deletedKeyList: o2 } = this._computeAttrChangedInfo(t2); - ct.l(`${this._n}._emitGroupAttributesUpdated update:${s2.length}, delete:` + o2.length), 0 === s2.length && 0 === o2.length || this._grpM.emitOEvt(Ot, { groupID: e2, groupAttributes: t2, updatedKeyList: s2, deletedKeyList: o2 }); - } - _computeAttrChangedInfo(t2) { - const s2 = [], o2 = []; - return Object.keys(t2).forEach((e2) => { - t2[e2] !== this._groupAttributesCopy[e2] && s2.push(e2); - }), Object.keys(this._groupAttributesCopy).forEach((e2) => { - Ke(t2[e2]) && o2.push(e2); - }), this._groupAttributesCopy = {}, { updatedKeyList: s2, deletedKeyList: o2 }; - } - deleteLocalGroupAttributes(e2) { - this._hasLocalGroupAttributes(e2) && this._groupAttributesMap.delete(e2); - } - reset() { - this._groupAttributesMap.clear(), this._groupAttributesCopy = {}, this.CACHE_EXPIRE_TIME = 3e4; - } -}; -var bo = "Set"; -var Ao = "Increase"; -var To = "Decrease"; -var So = class { - constructor(e2) { - this._grpM = e2, this._n = "GroupCountersHandler", this._groupCountersMap = /* @__PURE__ */ new Map(), this.EXPIRE_TIME = 3e4, this._grpM.getIEmitInst().on(Bt.CLOUD_CONFIG, this._onCloudConfig, this); - } - _onCloudConfig() { - var e2 = this._grpM.getCloudConfig("grp_counter_expire_time"); - Ke(e2) || (this.EXPIRE_TIME = Number(e2)); - } - isGroupCountersNotice(e2) { - var { to: e2, elements: { groupCounterInfo: t2 } } = e2; - let s2 = false; - return qe(t2) || (this._onGroupCountersUpdated({ groupID: e2, groupCounterInfo: t2 }), s2 = true), s2; - } - _onGroupCountersUpdated(e2) { - const { groupID: o2, groupCounterInfo: t2 } = e2; - t2.forEach((e3) => { - var { type: e3, groupCounterSeq: t3, counterList: s2 = [] } = e3; - 0 !== e3 && 2 !== e3 || (this._updateLocalGroupCounters({ groupID: o2, groupCounterSeq: t3, counterList: s2 }), s2.forEach((e4) => { - this._grpM.emitOEvt(Ft, { groupID: o2, key: e4.key, value: e4.value }); - })), 1 === e3 && this._deleteLocalGroupCounters({ groupID: o2, groupCounterSeq: t3, counterList: s2 }); - }), ct.l(this._n + "._onGroupCountersUpdated groupID:" + o2); - } - initGroupCountersCache(e2) { - var { groupID: e2, avChatRoomKey: t2 } = e2; - this._groupCountersMap.set(e2, { lastUpdateTime: 0, groupCounterSeq: 0, counters: /* @__PURE__ */ new Map(), avChatRoomKey: t2 }), ct.l(this._n + `.initGroupCountersCache groupID:${e2} avChatRoomKey:` + t2); - } - setGroupCounters(e2) { - if (!this._grpM.canIUse(I.GRP_COUNTER)) - return this._grpM.noUse("setGroupCounters"); - const t2 = this._n + ".setGroupCounters", { groupID: s2, counters: o2 } = e2, r2 = this._convertObjectToList(o2), i2 = this._getLocalGroupCounters(s2)["avChatRoomKey"], n2 = `groupID:${s2} count:` + r2.length, a2 = new Zt("setGroupCounters"); - return a2.setMessage(n2), ct.l(t2 + ". " + n2), this._updateGroupCounters({ groupID: s2, counterList: r2, avChatRoomKey: i2, mode: bo }).then((e3) => (a2.end(), ct.l(t2 + " ok."), ht({ counters: e3 }))).catch((e3) => (a2.setError(e3).end(), ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - increaseGroupCounter(e2) { - var t2 = "increaseGroupCounter"; - if (!this._grpM.canIUse(I.GRP_COUNTER)) - return this._grpM.noUse(t2); - const s2 = this._n + "." + t2, { groupID: o2, key: r2, value: i2 } = e2, n2 = this._getLocalGroupCounters(o2)["avChatRoomKey"], a2 = `groupID:${o2} key:${r2} value:` + i2, u2 = new Zt(t2); - return u2.setMessage(a2), ct.l(s2 + ". " + a2), this._updateGroupCounters({ groupID: o2, counterList: [{ key: r2, value: i2 }], avChatRoomKey: n2, mode: Ao }).then((e3) => (u2.end(), ct.l(s2 + " ok."), ht({ counters: e3 }))).catch((e3) => (u2.setError(e3).end(), ct.e(s2 + " failed. error:", e3), Kt(e3))); - } - decreaseGroupCounter(e2) { - var t2 = "decreaseGroupCounter"; - if (!this._grpM.canIUse(I.GRP_COUNTER)) - return this._grpM.noUse(t2); - const s2 = this._n + "." + t2, { groupID: o2, key: r2, value: i2 } = e2, n2 = this._getLocalGroupCounters(o2)["avChatRoomKey"], a2 = `groupID:${o2} key:${r2} value:` + i2, u2 = new Zt(t2); - return u2.setMessage(a2), ct.l(s2 + ". " + a2), this._updateGroupCounters({ groupID: o2, counterList: [{ key: r2, value: i2 }], avChatRoomKey: n2, mode: To }).then((e3) => (u2.end(), ct.l(s2 + " ok."), ht({ counters: e3 }))).catch((e3) => (u2.setError(e3).end(), ct.e(s2 + " failed. error:", e3), Kt(e3))); - } - getGroupCounters(e2) { - if (!this._grpM.canIUse(I.GRP_COUNTER)) - return this._grpM.noUse("getGroupCounters"); - const t2 = this._n + ".getGroupCounters", { groupID: s2, keyList: o2 = [] } = e2, { avChatRoomKey: r2, lastUpdateTime: i2 } = this._getLocalGroupCounters(s2), n2 = new Zt("getGroupCounters"); - if (n2.setMessage("groupID:" + s2), Date.now() - i2 >= this.EXPIRE_TIME) - return this._getRemoteGroupCounters({ groupID: s2, avChatRoomKey: r2 }).then((e3) => { - n2.setMoreMessage("from remote. count:" + e3.length).end(), ct.l(t2 + " from remote. groupID:" + s2); - e3 = this._getLocalCounters(s2, o2); - return ht({ counters: e3 }); - }).catch((e3) => (n2.setError(e3).end(), Kt(e3))); - n2.setMoreMessage("from cache").end(), ct.l(t2 + " from cache. groupID:" + s2); - e2 = this._getLocalCounters(s2, o2); - return jt({ counters: e2 }); - } - _getRemoteGroupCounters(s2) { - return this._grpM.req({ P: Ns, data: { ...s2 } }).then((e2) => { - var { counterList: e2 = [], groupCounterSeq: t2 } = e2.data; - return this._updateLocalGroupCounters({ groupID: s2.groupID, counterList: e2, groupCounterSeq: t2 }), ct.l(this._n + "._getRemoteGroupCounters ok. groupID:" + s2.groupID), e2; - }).catch((e2) => Kt(e2)); - } - _convertObjectToList(t2) { - const s2 = []; - return Object.keys(t2).forEach((e2) => { - s2.push({ key: e2, value: t2[e2] }); - }), s2; - } - _updateGroupCounters(e2) { - const o2 = this._n + "._updateGroupCounters", { groupID: t2, avChatRoomKey: s2, mode: r2 } = e2; - return ct.l(o2 + `. groupID:${t2} avChatRoomKey:${s2} mode:` + r2), this._grpM.req({ P: Us, data: { ...e2 } }).then((e3) => { - ct.l(o2 + " ok."); - const { counterList: t3 = [] } = e3.data, s3 = {}; - return t3.forEach((e4) => { - var { key: e4, value: t4 } = e4; - s3[e4] = t4; - }), s3; - }).catch((e3) => Kt(e3)); - } - _hasLocalGroupCounters(e2) { - return this._groupCountersMap.has(e2); - } - _getLocalGroupCounters(e2) { - return this._hasLocalGroupCounters(e2) || this.initGroupCountersCache({ groupID: e2 }), this._groupCountersMap.get(e2); - } - _updateLocalGroupCounters(s2) { - var { groupID: e2, counterList: t2 = [], groupCounterSeq: o2 } = s2; - if (this._hasLocalGroupCounters(e2)) { - const { counters: s3, avChatRoomKey: r2, groupCounterSeq: i2 } = this._getLocalGroupCounters(e2); - 0 < o2 && o2 < i2 || (t2.forEach((e3) => { - var { key: e3, value: t3 } = e3; - s3.set(e3, t3); - }), this._groupCountersMap.set(e2, { lastUpdateTime: Date.now(), groupCounterSeq: o2, counters: s3, avChatRoomKey: r2 })); - } - } - _deleteLocalGroupCounters(t2) { - var { groupID: e2, counterList: s2 = [], groupCounterSeq: o2 } = t2; - if (this._hasLocalGroupCounters(e2)) { - const { counters: t3, avChatRoomKey: r2 } = this._getLocalGroupCounters(e2); - s2.forEach((e3) => { - t3.delete(e3.key); - }), this._groupCountersMap.set(e2, { lastUpdateTime: Date.now(), groupCounterSeq: o2, counters: t3, avChatRoomKey: r2 }); - } - } - _getLocalCounters(e2, t2) { - const s2 = {}; - if (this._hasLocalGroupCounters(e2)) { - const o2 = this._getLocalGroupCounters(e2)["counters"]; - if (0 < t2.length) - t2.forEach((e3) => { - o2.has(e3) && (s2[e3] = o2.get(e3)); - }); - else - for (const r2 of o2.keys()) - s2[r2] = o2.get(r2); - } - return s2; - } - reset() { - this._groupCountersMap.clear(), this.EXPIRE_TIME = 3e4; - } -}; -var vo = class { - constructor(e2) { - var { manager: e2, groupID: t2, onInit: s2, onSuccess: o2, onFail: r2 } = e2; - this._n = "Polling", this._manager = e2, this._grpM = e2._grpM, this._onInit = s2, this._onSuccess = o2, this._onFail = r2, this._groupID = t2, this._timeoutID = -1, this._isRunning = false, this._proto = Ls; - } - start() { - var e2 = this._grpM.isLoggedIn(); - e2 || (this._proto = Cs), ct.l(`${this._n}.start pollingInterval:${this._manager.getPollingInterval()} isLoggedIn:` + e2), this._isRunning = true, this._request(); - } - isRunning() { - return this._isRunning; - } - _request() { - var e2 = this._onInit(this._groupID); - this._grpM.req({ P: this._proto, data: e2 }).then((e3) => { - this._onSuccess(this._groupID, e3), this.isRunning() && (clearTimeout(this._timeoutID), this._timeoutID = setTimeout(this._request.bind(this), this._manager.getPollingInterval())); - }).catch((e3) => { - this._onFail(this._groupID, e3), this.isRunning() && (clearTimeout(this._timeoutID), this._timeoutID = setTimeout(this._request.bind(this), this._manager.MAX_POLLING_INTERVAL)); - }); - } - stop() { - ct.l(this._n + ".stop"), 0 < this._timeoutID && (clearTimeout(this._timeoutID), this._timeoutID = -1), this._isRunning = false; - } - getPollingTimerID() { - return this._timeoutID; - } -}; -var Po = class { - constructor(e2) { - this.MAX_LENGTH = e2, this.map = /* @__PURE__ */ new Map(); - } - set(e2) { - if (this.map.size >= this.MAX_LENGTH) { - const e3 = this.map.entries().next().value[0]; - this.map.delete(e3); - } - this.map.set(e2, 1); - } - has(e2) { - return this.map.has(e2); - } - delete(e2) { - this.has(e2) && this.map.delete(e2); - } - reset() { - this.map.clear(); - } -}; -var Ro = ["groupID", "name", "avatar", "type", "introduction", "notification", "ownerID", "selfInfo", "createTime", "infoSequence", "lastInfoTime", "lastMessage", "nextMessageSeq", "memberNum", "maxMemberNum", "memberList", "joinOption", "groupCustomField", "muteAllMembers", "isSupportTopic", "inviteOption", "_lastRevokedTime"]; -var $o = class { - constructor(e2) { - this.groupID = "", this.name = "", this.avatar = "", this.type = "", this.introduction = "", this.notification = "", this.ownerID = "", this.createTime = "", this.infoSequence = "", this.lastInfoTime = "", this.selfInfo = { messageRemindType: "", joinTime: "", nameCard: "", role: "", userID: "", memberCustomField: void 0, readedSequence: 0, excludedUnreadSequenceList: void 0 }, this.lastMessage = { lastTime: "", lastSequence: "", fromAccount: "", messageForShow: "" }, this.nextMessageSeq = "", this.memberNum = "", this.memberCount = "", this.maxMemberNum = "", this.maxMemberCount = "", this.joinOption = "", this.inviteOption = "", this.groupCustomField = [], this.muteAllMembers = false, this.isSupportTopic = false, this._lastRevokedTime = 0, this._initGroup(e2); - } - set memberNum(e2) { - } - set maxMemberNum(e2) { - } - get memberNum() { - return this.memberCount; - } - get maxMemberNum() { - return this.maxMemberCount; - } - _initGroup(e2) { - for (const t2 in e2) - Ro.indexOf(t2) < 0 || ("selfInfo" !== t2 ? ("memberNum" === t2 && (this.memberCount = e2[t2]), "maxMemberNum" === t2 && (this.maxMemberCount = e2[t2]), "isSupportTopic" !== t2 ? this[t2] = e2[t2] : this.isSupportTopic = 1 === e2[t2]) : this.updateSelfInfo(e2[t2])); - } - updateGroup(e2) { - e2.appid = void 0, e2.grossTopicNextMsgSeq = void 0, e2.selfInfo && (e2.selfInfo.grossTopicReadSeq = void 0); - e2 = JSON.parse(JSON.stringify(e2)); - e2.lastMsgTime && (this.lastMessage.lastTime = e2.lastMsgTime), Ke(e2.muteAllMembers) || ("On" === e2.muteAllMembers ? e2.muteAllMembers = true : e2.muteAllMembers = false), e2.groupCustomField && Qe(this.groupCustomField, e2.groupCustomField), Ke(e2.memberNum) || (this.memberCount = e2.memberNum), Ke(e2.maxMemberNum) || (this.maxMemberCount = e2.maxMemberNum), Ke(e2.isSupportTopic) || (this.isSupportTopic = xe(e2.isSupportTopic) ? 1 === e2.isSupportTopic : e2.isSupportTopic), We(this, e2, ["members", "errorCode", "lastMsgTime", "groupCustomField", "memberNum", "maxMemberNum", "isSupportTopic"]), je(e2.members) && 0 < e2.members.length && e2.members.forEach((e3) => { - e3.userID === this.selfInfo.userID && We(this.selfInfo, e3, ["sequence"]); - }); - } - updateSelfInfo({ nameCard: e2, joinTime: t2, role: s2, messageRemindType: o2, readedSequence: r2, excludedUnreadSequenceList: i2 }) { - e2 = { nameCard: e2, joinTime: t2, role: s2, messageRemindType: o2, readedSequence: r2, excludedUnreadSequenceList: i2 }; - We(this.selfInfo, { ...e2 }, [], ["", null, void 0, 0, NaN]); - } - setSelfNameCard(e2) { - this.selfInfo.nameCard = e2; - } -}; -var Eo = { 3: true, 4: true, 5: true, 6: true, 17: true, 20: true, 21: true, 100: true }; -var wo = class { - constructor(e2) { - this._grpM = e2, this._n = "AVChatRoomHandler", this._joinedGroupMap = /* @__PURE__ */ new Map(), this._pollingRequestInfoMap = /* @__PURE__ */ new Map(), this._pollingInstanceMap = /* @__PURE__ */ new Map(), this._seqSll = new Po(200), this._IDSll = new Po(100), this._reportMessageStackedCount = 0, this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this.DEFAULT_EXPIRE_TIME = 60, this.DEFAULT_POLLING_INTERVAL = 300, this.MAX_POLLING_INTERVAL = 2e3, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0, this._startBroadcastSeq = 1, this._broadcastMessageIDMap = /* @__PURE__ */ new Map(), this.DEFAULT_POLLING_SIMPLIFIED_MSG = 0; - } - hasJoinedAVChatRoom() { - let e2 = []; - return 0 < (e2 = 0 < this._joinedGroupMap.size ? [...this._joinedGroupMap.values()].filter((e3) => e3.type === me) : e2).length; - } - getJoinedLiveList() { - let e2 = []; - return e2 = 0 < this._joinedGroupMap.size ? [...this._joinedGroupMap.values()].filter((e3) => e3.type === fe) : e2; - } - checkJoinedAVChatRoomByID(e2) { - return this._joinedGroupMap.has(e2); - } - getJoinedAVChatRoom() { - return 0 < this._joinedGroupMap.size ? [...this._joinedGroupMap.keys()] : []; - } - _updatedata(e2) { - var t2 = this._pollingRequestInfoMap.get(e2); - return e2 === [...this._pollingInstanceMap.keys()][0] ? { ...t2, startBroadcastSeq: this._startBroadcastSeq, simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG } : { ...t2, simplifiedMessage: this.DEFAULT_POLLING_SIMPLIFIED_MSG }; - } - _handleSuccess(e2, t2) { - const { key: s2, nextSeq: o2, rspMsgList: r2, errorCode: i2, nextBroadcastSeq: n2, broadcastMessageList: a2 } = t2.data; - if (0 !== i2) { - const s3 = this._pollingRequestInfoMap.get(e2), o3 = new Zt("longPollingAVError"), r3 = s3 ? s3.key + "-" + s3.startSeq : "requestInfo is undefined"; - o3.setMessage(`${e2}-${r3}-` + t2.errorInfo).setCode(t2.errorCode).end(true); - } else - this.checkJoinedAVChatRoomByID(e2) && (Ve(s2) && xe(o2) && this._pollingRequestInfoMap.set(e2, { key: s2, startSeq: o2 }), xe(n2) && n2 > this._startBroadcastSeq && (this._startBroadcastSeq = n2), je(r2) && 0 < r2.length ? (r2.forEach((e3) => { - e3.to = e3.groupID; - }), this.onMessage(r2, e2)) : (this._pollingNoMessageCount += 1, this._pollingNoMessageCount === this.DEFAULT_POLLING_NO_MESSAGE_COUNT && (this._pollingInterval = this.DEFAULT_POLLING_INTERVAL + this.DEFAULT_POLLING_INTERVAL_PLUS)), this._onBroadcastMessage(a2)); - } - _handleFailure(e2, t2) { - } - onMessage(i2, n2) { - if (je(i2) && 0 !== i2.length) { - let t2 = this._n + ".onMessage"; - n2 && (t2 += " groupID:" + n2), 0 !== this._pollingNoMessageCount && (this._pollingNoMessageCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL); - var a2 = null, u2 = [], l2 = this._get(o), h2 = this._get(p), c2 = i2.length, m2 = (1 < c2 && i2.sort((e2, t3) => e2.sequence - t3.sequence), this._get(r).isUnlimitedAVChatRoom()); - let s2 = false; - if (ct.getLevel() <= 0) { - const n3 = i2.map((e2) => e2.sequence); - ct.l(`${t2} count:${n3.length} sequenceList:` + n3), n3.length = 0; - } - for (let e2 = 0; e2 < c2; e2++) { - const n3 = this.restoreMessageFromSimplified(i2[e2]); - if (Eo[n3.event]) { - if (6 === n3.event) { - if (this._grpM.isGroupAttributesUpdatedNotice(n3)) - continue; - if (this._grpM.isGroupCountersNotice(n3)) - continue; - } - if (20 === n3.event) - this.handleMessageRevokedNotice(n3); - else if (21 === n3.event) - this._get(g).onMessageReactionNotify({ event: 21, dataList: n3.elements.messageReactionNotifyList }); - else if (100 === n3.event) - this.onRoomCustomData(n3); - else { - a2 = this.packMessage(n3, n3.event); - const r2 = 1 === n3.isModified; - if (s2 = 1 === n3.isHistoryMessage, !m2) { - if (this._seqSll.has(a2.sequence)) - continue; - this._seqSll.set(a2.sequence); - } - const p2 = this._IDSll.has(a2.ID); - if (p2) - ct.w(`${t2} ID:${a2.ID} has:` + p2); - else { - this._IDSll.set(a2.ID); - let e3 = false; - if (!s2 && this._isMessageSentByCurrentInstance(a2) ? r2 && (e3 = true, a2.isModified = r2, l2.updateMsgIsModifiedProp(a2)) : e3 = true, e3) { - if (a2.conversationType === le && 5 === a2.payload.operationType && this._onGroupDismissed(a2.payload.groupProfile.groupID), !s2 && a2.conversationType !== le) { - const i3 = a2.conversationID.replace(ue, ""); - this._pollingInstanceMap.has(i3) ? this._grpM.isLoggedIn() && h2.addMessageSequence({ key: zt, message: a2 }) : (a2.type !== Z && 0 < a2.clientTime && h2.addMessageDelay(a2.clientTime), h2.addMessageSequence({ key: Wt, message: a2 })); - } - u2.push(a2); - } - } - } - } else - ct.w(t2 + ". unknown event:" + n3.event); - } - if (0 !== u2.length) { - n2 = Ze(u2); - if (0 < n2.length && this._grpM.emitOEvt(Nt, n2), !s2) { - const i3 = this.packConversationOption(u2); - 0 < i3.length && l2.onNewMessage({ conversationOptionsList: i3, isInstantMessage: true }); - } - this._checkMessageStacked(u2); - n2 = et(u2); - 0 < n2.length && this._grpM.emitOEvt(Ut, n2), u2.length = 0; - } - } - } - handleMessageRevokedNotice(e2) { - const { groupID: r2, elements: { revokeMsgList: t2 }, revokerInfo: i2 } = e2, n2 = []; - t2.forEach((e3) => { - var { tinyID: e3, clientTime: t3, random: s2, sequence: o2 } = e3, e3 = { conversationID: "" + ue + r2, ID: e3 + `-${t3}-` + s2, revoker: i2.revoker, revokeReason: i2.reason || "", revokerInfo: { userID: i2.revoker, nick: "", avatar: "" }, sequence: o2 }; - n2.push(e3); - }), 0 !== n2.length && this._get(o).updateRevokerInfo(n2).then((e3) => { - this._grpM.emitOEvt(qt, e3); - }); - } - isBroadcastOrNormal(e2) { - return 3 === e2 || 17 === e2; - } - isGroupTip(e2) { - return 4 === e2 || 6 === e2; - } - isGroupSystemNotice(e2) { - return 5 === e2; - } - restoreGroupTipElements(e2 = {}) { - var { operatorInfo: t2 = {}, operatorID: s2, userIDList: o2 = [], operationType: r2 } = e2, { userID: r2 = s2, avatar: t2 = "", nick: s2 = "" } = (xe(e2.groupJoinType) || 1 !== r2 && 2 !== r2 || (e2.groupJoinType = 2 === r2 ? 0 : 1), t2), r2 = (e2.operatorInfo = { userID: r2, avatar: t2, nick: s2 }, o2.map((e3) => ({ userID: e3 }))); - return e2.memberInfoList = e2.memberInfoList || r2, e2; - } - restoreMessageFromSimplified(s2) { - const e2 = s2["event"]; - if (this.isBroadcastOrNormal(e2) && (s2.cloudCustomData = s2.cloudCustomData || "", s2.elements = s2.elements.map((e3) => { - var t2; - return e3.type === te && ({ content: t2 = {} } = e3, e3.content = { data: "", description: "", extension: "", ...t2 }), e3; - })), (this.isGroupTip(e2) || this.isGroupSystemNotice(e2)) && (s2.from = s2.from || "@TIM#SYSTEM"), this.isGroupTip(e2)) { - s2.elements = this.restoreGroupTipElements(s2.elements); - const { elements: e3 = {} } = s2, { operationType: t2, operatorInfo: r2 = {} } = e3; - if (1 === t2) { - const s3 = [{ userID: r2.userID }]; - e3.memberInfoList = e3.memberInfoList || s3; - } - } - if (this.isGroupSystemNotice(e2)) { - let { memberInfoList: e3, operatorInfo: t2 = {} } = s2.elements; - e3 = e3 || t2, s2.elements.memberInfoList = { userID: s2.elements.operatorID, avatar: "", nick: "", ...e3 }, s2.elements = { authentication: "", remarkInfo: "", messageKey: 1e3 * s2.time, ...s2.elements }; - var o2 = Object.keys(s2.elements).filter((e4) => "operatorInfo" !== e4).reduce((e4, t3) => ({ ...e4, [t3]: s2.elements[t3] }), {}); - s2.elements = o2; - } - return s2; - } - _onGroupDismissed(e2) { - ct.l(this._n + "._onGroupDismissed groupID:" + e2), this._grpM.deleteLocalGroupAndConversation(e2), this.reset(e2); - } - _checkMessageStacked(e2) { - var t2 = "MessageStacked", e2 = e2.length; - 100 <= e2 && (this._grpM.warn(t2, e2), this._reportMessageStackedCount < 5) && (new Zt(t2).setMessage(`count:${e2} groupID:` + [...this._joinedGroupMap.keys()]).setLevel("warning").end(), this._reportMessageStackedCount += 1); - } - _isMessageSentByCurrentInstance(e2) { - return !!this._get(o).isMessageSentByCurrentInstance(e2); - } - packMessage(e2, t2) { - e2.currentUser = this._grpM.getMyUserID(), e2.conversationType = 5 === t2 ? le : ue, e2.isSystemMessage = !!e2.isSystemMessage; - var s2 = new _o(e2), e2 = this.packElements(e2, t2), t2 = this._grpM.getFileDownloadProxy(), o2 = this._grpM.getDowloadFileAuthKey(), r2 = this._get(n).getFileDNList(); - return s2.setElement(e2, t2, o2, r2), s2; - } - packElements(e2, t2) { - return 4 === t2 || 6 === t2 ? (this._updateMemberCountByGroupTips(e2), { type: Z, content: { ...e2.elements, groupProfile: e2.groupProfile } }) : 5 === t2 ? { type: ee, content: { ...e2.elements, groupProfile: { ...e2.groupProfile, groupID: e2.groupID } } } : e2.elements; - } - packConversationOption(t2) { - var s2 = /* @__PURE__ */ new Map(); - for (let e2 = 0; e2 < t2.length; e2++) { - var o2 = t2[e2], r2 = o2.conversationID; - if (s2.has(r2)) { - const t3 = s2.get(r2); - "in" === (t3.lastMessage = o2).flow && t3.unreadCount++; - } else - s2.set(r2, { conversationID: o2.conversationID, unreadCount: "out" === o2.flow ? 0 : 1, type: o2.conversationType, subType: o2.conversationSubType, lastMessage: o2 }); - } - return [...s2.values()]; - } - _updateMemberCountByGroupTips(e2) { - var t2, s2, o2, { groupProfile: { groupID: e2 }, elements: { onlineMemberInfo: r2 } } = e2; - qe(r2) || ({ onlineMemberNum: r2 = 0, expireTime: t2 = this.DEFAULT_EXPIRE_TIME } = r2, s2 = this._onlineMemberCountMap.get(e2) || {}, o2 = Date.now(), qe(s2) ? Object.assign(s2, { lastReqTime: 0, lastSyncTime: 0, latestUpdateTime: o2, memberCount: r2, expireTime: t2 }) : (s2.latestUpdateTime = o2, s2.memberCount = r2), this._onlineMemberCountMap.set(e2, s2)); - } - _onBroadcastMessage(t2) { - if (!qe(t2)) { - const o2 = [], r2 = t2.length; - var s2 = null; - for (let e2 = 0; e2 < r2; e2++) { - const r3 = this.restoreMessageFromSimplified(t2[e2]); - Eo[r3.event] ? ((s2 = this.packMessage(r3, r3.event)).isBroadcastMessage = true, this._broadcastMessageIDMap.has(s2.ID) || (o2.push(s2), this._broadcastMessageIDMap.set(s2.ID, 1))) : ct.w(this._n + "._onBroadcastMessage unknown event:" + r3.event); - } - 0 < o2.length && this._grpM.emitOEvt(Ut, o2); - } - } - start(e2) { - if (this._pollingInstanceMap.has(e2)) { - const t2 = this._pollingInstanceMap.get(e2); - void (t2.isRunning() || t2.start()); - } else { - const t2 = new vo({ manager: this, groupID: e2, onInit: this._updatedata.bind(this), onSuccess: this._handleSuccess.bind(this), onFail: this._handleFailure.bind(this) }); - t2.start(), this._pollingInstanceMap.set(e2, t2), ct.l(this._n + ".start groupID:" + e2); - } - } - handleJoinResult(o2) { - return this._preCheck(o2.group).then(() => { - var { longPollingKey: e2, group: t2 } = o2, s2 = t2.groupID; - return this._joinedGroupMap.set(s2, t2), this._grpM.updateGroupMap([t2]), this._grpM.deleteUnjoinedAVChatRoom(s2), this._grpM.emitGroupListUpdate(true, false), Ke(e2) ? jt({ status: $e, group: t2 }) : Promise.resolve(); - }); - } - startRunLoop(r2) { - return this.handleJoinResult(r2).then(() => { - var { longPollingKey: e2, group: t2, startSeq: s2 = 0 } = r2, o2 = t2.groupID; - return this._pollingRequestInfoMap.set(o2, { key: e2, startSeq: s2 }), this.start(o2), this._grpM.isLoggedIn() ? jt({ status: $e, group: t2 }) : jt({ status: $e }); - }); - } - _preCheck(e2) { - if (!this._get(r).isUnlimitedAVChatRoom() && this.hasJoinedAVChatRoom() && e2.type !== fe) { - var [e2, t2] = this._joinedGroupMap.entries().next().value; - if (this._grpM.isLoggedIn() && t2.selfInfo.role !== Me && t2.ownerID !== this._grpM.getMyUserID()) - return this._grpM.quitGroup(e2); - this._grpM.deleteLocalGroupAndConversation(e2), this.reset(e2); - } - return Promise.resolve(); - } - joinWithoutAuth(e2) { - const s2 = e2["groupID"], r2 = this._n + ".joinWithoutAuth", n2 = new Zt("joinWithoutAuth"); - return this._grpM.req({ P: as, data: e2 }).then(({ data: { longPollingKey: e3 } }) => { - if (n2.setMessage(`groupID:${s2} longPollingKey:` + e3).end(true), Ke(e3)) - return Kt({ code: Gt }); - ct.l(r2 + " ok. groupID:" + s2), this._get(o).setCompleted("" + ue + s2); - var t2 = new $o({ groupID: s2 }); - return this.startRunLoop({ group: t2, longPollingKey: e3 }), ht({ status: $e }); - }).catch((e3) => (ct.e(r2 + ` failed. groupID:${s2} error:`, e3), n2.setError(e3).setMessage("groupID:" + s2).end(true), Kt(e3))).finally(() => { - this._grpM.get(i).reportAtOnce(); - }); - } - getGroupOnlineMemberCount(e2) { - var t2 = this._onlineMemberCountMap.get(e2) || {}, s2 = Date.now(); - return qe(t2) || s2 - t2.lastSyncTime > 1e3 * t2.expireTime && 1e4 < s2 - t2.latestUpdateTime && 3e3 < s2 - t2.lastReqTime ? (t2.lastReqTime = s2, this._onlineMemberCountMap.set(e2, t2), this._getGroupOnlineMemberCount(e2).then((e3) => ht({ memberCount: e3.memberCount })).catch((e3) => Kt(e3))) : jt({ memberCount: t2.memberCount }); - } - _getGroupOnlineMemberCount(r2) { - const i2 = this._n + "._getGroupOnlineMemberCount", t2 = new Zt("_getGroupOnlineMemberCount"); - return this._grpM.requestOnlineCount(r2).then((e2) => { - var t3 = this._onlineMemberCountMap.get(r2) || {}, { memberCount: e2 = 0, expireTime: s2 = this.DEFAULT_EXPIRE_TIME } = e2.data, o2 = (ct.l(i2 + ` ok. groupID:${r2} memberCount:${e2} expireTime:` + s2), Date.now()); - return qe(t3) && (t3.lastReqTime = o2), this._onlineMemberCountMap.set(r2, Object.assign(t3, { lastSyncTime: o2, latestUpdateTime: o2, memberCount: e2, expireTime: s2 })), { memberCount: e2 }; - }).catch((e2) => (ct.w(i2 + " failed. error:", e2), t2.setCode(e2.code).setMessage(`groupID:${r2} error:` + JSON.stringify(e2)).end(), Promise.reject(e2))); - } - _get(e2) { - return this._grpM.get(e2); - } - setPollingInterval(e2) { - Ke(e2) || (xe(e2) ? this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = e2 : this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = parseInt(e2, 10)); - } - setPollingIntervalPlus(e2) { - Ke(e2) || (xe(e2) ? this.DEFAULT_POLLING_INTERVAL_PLUS = e2 : this.DEFAULT_POLLING_INTERVAL_PLUS = parseInt(e2, 10)); - } - setPollingNoMessageCount(e2) { - Ke(e2) || (xe(e2) ? this.DEFAULT_POLLING_NO_MESSAGE_COUNT = e2 : this.DEFAULT_POLLING_NO_MESSAGE_COUNT = parseInt(e2, 10)); - } - setPollingSimplifiedMessage(e2) { - Ke(e2) || "0" !== e2 && "1" !== e2 || (this.DEFAULT_POLLING_SIMPLIFIED_MSG = parseInt(e2, 10)); - } - getPollingInterval() { - return this._pollingInterval; - } - onAVChatRoomMemberBanned(e2) { - e2 = e2.payload.groupProfile.groupID; - ct.l(this._n + ".onAVChatRoomMemberBanned groupID:" + e2), this._grpM.deleteLocalGroupAndConversation(e2), this.reset(e2); - } - restartPolling() { - ct.l(this._n + ".restartPolling count:" + this._pollingInstanceMap.size); - for (const e2 of this._pollingInstanceMap.values()) - e2.stop(), e2.start(); - } - getPollingTimerID(e2) { - var t2; - return this._pollingInstanceMap.has(e2) ? (t2 = this._pollingInstanceMap.get(e2).getPollingTimerID(), ct.l(this._n + `.getPollingTimerID groupID:${e2} timerID:` + t2), t2) : -1; - } - hasPollingInstance(e2) { - return this._pollingInstanceMap.has(e2); - } - onRoomCustomData(e2) { - var { groupID: e2, sequence: t2, time: s2, elements: o2 } = e2, o2 = o2 && o2.content; - this._get(h).onRoomCustomDataReceived(o2), ct.l(this._n + `.onRoomCustomData groupID:${e2} sequence:${t2} time:${s2} data:` + o2); - } - reset(e2) { - if (e2) { - ct.l(this._n + ".reset groupID:" + e2); - var t2 = this._pollingInstanceMap.get(e2); - t2 && t2.stop(), this._pollingInstanceMap.delete(e2), this._joinedGroupMap.delete(e2), this._pollingRequestInfoMap.delete(e2), this._onlineMemberCountMap.delete(e2); - } else { - ct.l(this._n + ".reset all"); - for (const e3 of this._pollingInstanceMap.values()) - e3.stop(); - this._pollingInstanceMap.clear(), this._joinedGroupMap.clear(), this._pollingRequestInfoMap.clear(), this._onlineMemberCountMap.clear(), this._broadcastMessageIDMap.clear(); - } - this._seqSll.reset(), this._IDSll.reset(), this._reportMessageStackedCount = 0, this._pollingInterval = this.DEFAULT_POLLING_INTERVAL = 300, this.DEFAULT_POLLING_NO_MESSAGE_COUNT = 20, this.DEFAULT_POLLING_INTERVAL_PLUS = 2e3, this._pollingNoMessageCount = 0; - } -}; -var Uo = class { - constructor(e2) { - this.userID = "", this.avatar = "", this.nick = "", this.role = "", this.joinTime = "", this.lastSendMsgTime = "", this.nameCard = "", this.muteUntil = 0, this.memberCustomField = [], this.isOnline = false, this.updateMember(e2); - } - updateMember(e2) { - Ke(e2.onlineStatus) || (this.isOnline = "Online" === e2.onlineStatus); - var t2 = [null, void 0, "", 0, NaN]; - e2.memberCustomField && Qe(this.memberCustomField, e2.memberCustomField), We(this, e2, ["memberCustomField", "marks", "onlineStatus"], t2); - } - updateRole(e2) { - ["Owner", "Admin", "Member"].indexOf(e2) < 0 || (this.role = e2); - } - updateMuteUntil(e2) { - Ke(e2) || (this.muteUntil = Math.floor((Date.now() + 1e3 * e2) / 1e3)); - } - updateNameCard(e2) { - Ke(e2) || (this.nameCard = e2); - } - updateMemberCustomField(e2) { - e2 && Qe(this.memberCustomField, e2); - } -}; -var No = class { - constructor(e2) { - this._grpM = e2, this._n = "GroupMemberHandler", this.groupMemberListMap = /* @__PURE__ */ new Map(), this.DEFAULT_MEMBER_INFO_FILTER = ["Role", "JoinTime", "NameCard", "ShutUpUntil", "OnlineStatus"], this._grpM.getIEmitInst().on(Bt.PROFILE_UPDATED, this._onProfileUpdated, this); - } - _onProfileUpdated({ data: t2 }) { - for (let e2 = 0; e2 < t2.length; e2++) { - const s2 = t2[e2]; - this.groupMemberListMap.forEach((e3) => { - e3.has(s2.userID) && e3.get(s2.userID).updateMember({ nick: s2.nick, avatar: s2.avatar }); - }); - } - } - deleteGroupMemberList(e2) { - this.groupMemberListMap.delete(e2); - } - getGroupMemberList({ groupID: r2, role: e2, offset: s2 = 0, count: o2 = 15, filter: i2 }) { - const n2 = this._n + ".getGroupMemberList", a2 = this._grpM.hasLocalGroup(r2); - if (ct.l(n2 + ` groupID:${r2} role:${e2} offset:${s2} count:${o2} hasLocalGroup:` + a2), !a2) - return jt({ memberList: [], offset: 0 }); - if (this._grpM.getLocalGroupProfile(r2).type === me) { - if (this._grpM.canIUse(I.AV_MBR_LIST)) - return this._getAVChatRoomMemberList({ groupID: r2, offset: s2, filter: i2 }); - this._grpM.warn("LiveOnlineMember"); - } - let u2; - e2 !== Ie && e2 !== Me && e2 !== ye || (u2 = e2); - const p2 = new Zt("getGroupMemberList"); - let l2 = 0; - i2 = { groupID: r2, limit: 100 < o2 ? 100 : o2, memberRoleFilter: u2 ? [u2] : void 0, memberInfoFilter: this.DEFAULT_MEMBER_INFO_FILTER }; - ot({ groupID: r2 }) ? i2.next = "" + s2 : (i2.offset = s2, l2 = s2 + o2); - let h2 = []; - return this._grpM.req({ P: qs, data: i2 }).then(({ data: { members: e3, memberNum: s3, next: o3 } }) => (Ke(o3) || (l2 = qe(o3) ? 0 : o3), je(e3) && 0 !== e3.length ? (this._grpM.hasLocalGroup(r2) && (this._grpM.getLocalGroupProfile(r2).memberNum = s3), h2 = this._updateLocalGroupMemberMap(r2, e3), this._grpM.get(t).getUserProfile({ userIDList: e3.map((e4) => e4.userID), tagList: [Re.NICK, Re.AVATAR] })) : (l2 = 0, Promise.resolve([])))).then((e3) => { - var e3 = e3["data"]; - return je(e3) && 0 !== e3.length ? (e3 = e3.map((e4) => ({ userID: e4.userID, nick: e4.nick, avatar: e4.avatar })), this._updateLocalGroupMemberMap(r2, e3), h2.length < o2 && (l2 = 0), p2.setMessage(`groupID:${r2} offset:${s2} count:` + o2).end(), ct.l(n2 + " ok."), ht({ memberList: h2, offset: l2 })) : jt({ memberList: [], offset: l2 }); - }).catch((e3) => (p2.setError(e3).end(), ct.e(n2 + " failed. error:", e3), Kt(e3))); - } - _getAVChatRoomMemberList({ groupID: s2, offset: e2, filter: t2 }) { - const o2 = this._n + "._getAVChatRoomMemberList", r2 = new Zt("_getAVChatRoomMemberList"); - return r2.setMessage(`groupID:${s2} offset:${e2} filter:` + t2), this._grpM.req({ P: ks, data: { groupID: s2, offset: e2, filter: t2 } }).then((e3) => { - var { memberList: e3 = [], offset: t3 = 0 } = e3.data, e3 = (r2.end(), ct.l(o2 + ` ok. member count:${e3.length}, next request timestamp:` + t3), e3.map((e4) => ({ ...e4, onlineStatus: "Online" }))), e3 = this._updateLocalGroupMemberMap(s2, e3); - return ht({ memberList: e3, offset: t3 }); - }).catch((e3) => (r2.setError(e3).end(), ct.e(o2 + " failed. error:", e3), Kt(e3))); - } - getGroupMemberProfile(e2) { - var s2 = "getGroupMemberProfile", o2 = this._n + "." + s2; - let r2 = "groupID:" + e2.groupID; - 5 < e2.userIDList.length ? r2 += " userIDList.length:" + e2.userIDList.length : r2 += " userIDList:" + e2.userIDList, ct.l(o2 + " " + r2), 50 < e2.userIDList.length && (e2.userIDList = e2.userIDList.slice(0, 50)); - const { groupID: i2, userIDList: n2 } = e2, a2 = this._grpM.getLocalGroupProfile(i2); - if (a2 && st(a2.type)) { - const e3 = Pt; - return Kt({ code: e3, message: this._grpM.getErrMsg(e3, s2) }); - } - const u2 = new Zt(s2); - return u2.setMessage(r2), this._getGroupMemberProfileAdvance({ ...e2, userIDList: n2 }).then((e3) => { - e3 = e3.data.members; - return je(e3) && 0 !== e3.length ? (this._updateLocalGroupMemberMap(i2, e3), this._grpM.get(t).getUserProfile({ userIDList: e3.map(({ userID: e4 }) => e4), tagList: [Re.NICK, Re.AVATAR] })) : jt([]); - }).then((e3) => { - e3 = e3.data.map(({ userID: e4, nick: t2, avatar: s3 }) => ({ userID: e4, nick: t2, avatar: s3 })), this._updateLocalGroupMemberMap(i2, e3), e3 = n2.filter((e4) => this.hasLocalGroupMember(i2, e4)).map((e4) => this.getLocalGroupMemberInfo(i2, e4)); - return u2.end(), ht({ memberList: e3 }); - }); - } - addGroupMember(i2) { - const n2 = this._n + ".addGroupMember", e2 = i2["groupID"], a2 = this._grpM.getLocalGroupProfile(e2), t2 = a2["type"], u2 = new Zt("addGroupMember"); - if (u2.setMessage(`groupID:${e2} groupType:` + t2), st(t2)) { - const i3 = new gt({ code: Ct }); - return u2.setError(i3).end(), Kt(i3); - } - return i2.userIDList = i2.userIDList.map((e3) => ({ userID: e3 })), ct.l(n2 + " groupID:" + e2), this._grpM.req({ P: Fs, data: i2 }).then(({ data: { members: e3 } }) => { - ct.l(n2 + " ok"); - var t3 = e3.filter((e4) => 1 === e4.result).map((e4) => e4.userID), s2 = e3.filter((e4) => 0 === e4.result).map((e4) => e4.userID), o2 = e3.filter((e4) => 2 === e4.result).map((e4) => e4.userID), e3 = e3.filter((e4) => 4 === e4.result).map((e4) => e4.userID), r2 = `groupID:${i2.groupID}, successUserIDList:${t3}, failureUserIDList:${s2}, existedUserIDList:${o2}, overLimitUserIDList:` + e3; - return u2.setMoreMessage(r2).end(), 0 === t3.length ? ht({ successUserIDList: t3, failureUserIDList: s2, existedUserIDList: o2, overLimitUserIDList: e3 }) : (this._updateConvGroupProfile(a2), ht({ successUserIDList: t3, failureUserIDList: s2, existedUserIDList: o2, overLimitUserIDList: e3, group: a2 })); - }).catch((e3) => (u2.setError(e3).end(), ct.e(n2 + " failed. error:", e3), Kt(e3))); - } - deleteGroupMember(e2) { - const t2 = this._n + ".deleteGroupMember", { groupID: s2, userIDList: o2 } = e2, r2 = this._grpM.getLocalGroupProfile(s2); - if (Ke(r2)) - return Kt({ code: Mt }); - if (st(r2.type)) - return this._grpM.canIUse(I.AV_BAN_MBR) ? this._banAVChatRoomMember(e2) : this._grpM.noUse("deleteGroupMember"); - var i2 = `groupID:${s2} ` + (5 < o2.length ? "userIDList.length:" + o2.length : "userIDList:" + o2); - ct.l(t2 + ` groupID:${s2} userIDList:`, o2); - const n2 = new Zt("deleteGroupMember"); - return n2.setMessage(i2), this._grpM.req({ P: xs, data: e2 }).then(() => (n2.end(), ct.l(t2 + " ok"), this._updateConvGroupProfile(r2), this.deleteLocalGroupMembers(s2, o2), ht({ group: r2, userIDList: o2 }))).catch((e3) => (n2.setError(e3).end(), ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - _updateConvGroupProfile(e2) { - this._grpM.get(o).updateConvGroupProfile([e2]); - } - _banAVChatRoomMember(e2) { - const t2 = this._n + "._banAVChatRoomMember", { groupID: s2, userIDList: o2 } = e2, r2 = `groupID:${s2} ` + (5 < o2.length ? "userIDList.length:" + o2.length : "userIDList:" + o2), i2 = new Zt("_banAVChatRoomMember"), n2 = (i2.setMessage(r2), ct.l(t2 + ` groupID:${s2} userIDList:`, o2), this._grpM.getLocalGroupProfile(s2)); - return Ke(e2.duration) || 0 === e2.duration ? Kt({ code: vt }) : this._grpM.req({ P: Vs, data: e2 }).then(() => (i2.end(), ct.l(t2 + " ok"), this.deleteLocalGroupMembers(s2, o2), ht({ group: n2, userIDList: o2 }))).catch((e3) => (i2.setError(e3).end(), ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - setGroupMemberMuteTime(e2) { - const { groupID: s2, userID: t2, muteTime: o2 } = e2, r2 = this._n + ".setGroupMemberMuteTime"; - if (t2 === this._grpM.getMyUserID()) - return Kt({ code: St }); - e2 = `groupID:${s2} userID:${t2} muteTime:` + o2; - ct.l(r2 + " " + e2); - const i2 = new Zt("setGroupMemberMuteTime"); - return i2.setMessage(e2), this.modifyGroupMemberInfo({ groupID: s2, userID: t2, muteTime: o2 }).then((e3) => { - i2.end(), ct.l(r2 + " ok"); - var t3 = this._grpM.getLocalGroupProfile(s2); - return ht({ group: t3, member: e3 }); - }).catch((e3) => (i2.setError(e3).end(), ct.e(r2 + " failed. error:", e3), Kt(e3))); - } - setGroupMemberRole(e2) { - const t2 = this._n + ".setGroupMemberRole", { groupID: s2, userID: o2, role: r2 } = e2, i2 = `groupID:${s2} userID:${o2} role:` + r2, n2 = this._grpM.getLocalGroupProfile(s2); - if (n2 && n2.selfInfo.role !== Me) - return Kt({ code: bt }); - e2 = [Ie, ye]; - if (ot({ groupID: s2 }) && e2.push(De), e2.indexOf(r2) < 0) - return Kt({ code: At }); - if (o2 === this._grpM.getMyUserID()) - return Kt({ code: Tt }); - const a2 = new Zt("setGroupMemberRole"); - return a2.setMessage(i2), ct.l(t2 + " " + i2), this.modifyGroupMemberInfo({ groupID: s2, userID: o2, role: r2 }).then((e3) => (a2.end(), ct.l(t2 + " ok"), ht({ group: n2, member: e3 }))).catch((e3) => (a2.setError(e3).end(), ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - _filterProfanity(e2, t2) { - var s2, o2 = this._grpM.get(c); - return !o2 || ({ isAllowedToSend: o2, modifiedText: s2 } = o2.filterText(t2[e2], D), true === o2 && (t2[e2] = s2, true)); - } - setGroupMemberNameCard(e2) { - const t2 = "setGroupMemberNameCard", s2 = this._n + "." + t2; - if (e2.nameCard && false === this._filterProfanity("nameCard", e2)) - return Kt({ code: wt }); - const { groupID: o2, userID: r2 = this._grpM.getMyUserID(), nameCard: i2 } = e2, n2 = `groupID:${o2} userID:${r2} nameCard:` + i2; - ct.l(s2 + " " + n2); - e2 = this._grpM.getLocalGroupProfile(o2); - if (e2 && st(e2.type)) { - const e3 = Pt; - return Kt({ code: e3, message: this._grpM.getErrMsg(e3, t2) }); - } - const a2 = new Zt(t2); - return a2.setMessage(n2), this.modifyGroupMemberInfo({ groupID: o2, userID: r2, nameCard: i2 }).then((e3) => { - ct.l(s2 + " ok"), a2.end(); - var t3 = this._grpM.getLocalGroupProfile(o2); - return r2 === this._grpM.getMyUserID() && t3 && t3.setSelfNameCard(i2), ht({ group: t3, member: e3 }); - }).catch((e3) => (a2.setError(e3).end(), ct.e(s2 + " failed. error:", e3), Kt(e3))); - } - setGroupMemberCustomField(e2) { - const t2 = "setGroupMemberCustomField", s2 = this._n + "." + t2, { groupID: o2, userID: r2 = this._grpM.getMyUserID(), memberCustomField: i2 } = e2, n2 = `groupID:${o2} userID:${r2} memberCustomField:` + JSON.stringify(i2); - ct.l(s2 + " " + n2); - e2 = this._grpM.getLocalGroupProfile(o2); - if (e2 && st(e2.type)) { - const e3 = Pt; - return Kt({ code: e3, message: this._grpM.getErrMsg(e3, t2) }); - } - const a2 = new Zt(t2); - return a2.setMessage(n2), this.modifyGroupMemberInfo({ groupID: o2, userID: r2, memberCustomField: i2 }).then((e3) => { - a2.end(), ct.l(s2 + " ok"); - var t3 = this._grpM.getLocalGroupProfile(o2); - return ht({ group: t3, member: e3 }); - }).catch((e3) => (a2.setError(e3).end(), ct.e(s2 + " failed. error:", e3), Kt(e3))); - } - modifyGroupMemberInfo(t2) { - let { groupID: s2, userID: o2 } = t2, e2 = void 0; - return rt(s2) && (s2 = it(e2 = s2)), this._grpM.req({ P: Hs, data: { ...t2, groupID: s2, topicID: e2 } }).then(() => { - if (this.hasLocalGroupMember(s2, o2)) { - const e4 = this.getLocalGroupMemberInfo(s2, o2); - return Ke(t2.muteTime) || e4.updateMuteUntil(t2.muteTime), Ke(t2.role) || e4.updateRole(t2.role), Ke(t2.nameCard) || e4.updateNameCard(t2.nameCard), Ke(t2.memberCustomField) || e4.updateMemberCustomField(t2.memberCustomField), e4; - } - const e3 = this._grpM.getLocalGroupProfile(s2); - if (e3 && !st(e3.type)) - return this.getGroupMemberProfile({ groupID: s2, userIDList: [o2] }).then(({ data: { memberList: [e4] } }) => e4); - }); - } - markGroupMemberList(e2) { - const r2 = this._n + ".markGroupMemberList", { groupID: t2, markType: s2, enableMark: o2, userIDList: i2 = [] } = e2, n2 = `groupID:${t2} markType:${s2} enableMark:${o2} userIDList count:` + i2.length; - ct.l(r2 + " " + n2); - let a2 = 2; - const u2 = []; - true === o2 && (a2 = 1); - let p2 = [...i2]; - 500 < i2.length && (p2 = i2.slice(0, 500), ct.w(r2 + " the length of userIDList cannot exceed 500")), p2.forEach((e3) => { - u2.push({ userID: e3, markType: [s2] }); - }), p2 = null; - const l2 = new Zt("markGroupMemberList"); - return l2.setMessage(n2), this._grpM.req({ P: js, data: { groupID: t2, operationType: a2, memberList: u2 } }).then((e3) => { - const { memberList: t3 = [] } = e3.data, s3 = [], o3 = []; - t3.length === i2.length ? s3.push(...i2) : (t3.forEach((e4) => { - s3.push(e4.userID); - }), i2.forEach((e4) => { - s3.includes(e4) || o3.push(e4); - })); - e3 = `success count:${s3.length} fail count:` + o3.length; - return l2.setMessage(e3).end(), ct.l(r2 + " ok. " + e3), ht({ successUserIDList: s3, failureUserIDList: o3 }); - }).catch((e3) => (l2.setError(e3).end(), ct.e(r2 + " failed. error:", e3), Kt(e3))); - } - _getGroupMemberProfileAdvance(e2) { - return this._grpM.req({ P: Os, data: { ...e2, memberInfoFilter: e2.memberInfoFilter || this.DEFAULT_MEMBER_INFO_FILTER } }); - } - _updateLocalGroupMemberMap(t2, e2) { - return je(e2) && 0 !== e2.length ? e2.map((e3) => (this.hasLocalGroupMember(t2, e3.userID) ? this.getLocalGroupMemberInfo(t2, e3.userID).updateMember(e3) : this.setLocalGroupMember(t2, new Uo(e3)), this.getLocalGroupMemberInfo(t2, e3.userID))) : []; - } - deleteLocalGroupMembers(e2, t2) { - const s2 = this.groupMemberListMap.get(e2); - s2 && t2.forEach((e3) => { - s2.delete(e3); - }); - } - getLocalGroupMemberInfo(e2, t2) { - return this.groupMemberListMap.has(e2) ? this.groupMemberListMap.get(e2).get(t2) : null; - } - setLocalGroupMember(e2, t2) { - this.groupMemberListMap.has(e2) ? this.groupMemberListMap.get(e2).set(t2.userID, t2) : (t2 = (/* @__PURE__ */ new Map()).set(t2.userID, t2), this.groupMemberListMap.set(e2, t2)); - } - getLocalGroupMemberList(e2) { - return this.groupMemberListMap.get(e2); - } - hasLocalGroupMember(e2, t2) { - return this.groupMemberListMap.has(e2) && this.groupMemberListMap.get(e2).has(t2); - } - hasLocalGroupMemberMap(e2) { - return this.groupMemberListMap.has(e2); - } - reset() { - this.groupMemberListMap.clear(); - } -}; -function qo(e2) { - var t2 = e2.lastIndexOf("."); - return -1 === t2 ? e2 : e2.slice(0, t2); -} -function ko(e2) { - var { androidInfo: e2 = {}, androidOPPOChannelID: t2 = "" } = e2, t2 = e2.OPPOChannelID || t2; - return { ...e2, Sound: qo(e2.sound || ""), OPPOChannelID: t2, GoogleChannelID: e2.FCMChannelID || "" }; -} -function Oo(e2) { - var { apnsInfo: e2 = {}, ignoreIOSBadge: t2 = false, disableVoipPush: s2 } = e2, t2 = true === e2.ignoreIOSBadge || true === t2 ? 1 : 0; - let o2 = void 0; - return Ke(s2) || (o2 = false === s2 ? 1 : 0), Ke(e2.disableVoipPush) || (o2 = false === e2.disableVoipPush ? 1 : 0), { ...e2, badgeMode: t2, isVoipPush: o2 }; -} -function Fo(e2) { - if (He(e2)) - return { pushFlag: true === e2.disablePush ? 1 : 0, title: e2.title || "", desc: e2.description || "", ext: e2.extension || "", apnsInfo: Oo(e2), androidInfo: ko(e2) }; -} -var xo = 1; -var Vo = 15; -var Ho = [17, 18, 20]; -var jo = class { - constructor(e2) { - this._grpM = e2, this._n = "GroupSystemNoticeHandler", this.pendencyMap = /* @__PURE__ */ new Map(); - } - onNewGroupSystemNotice(e2) { - var { dataList: e2, isSyncingEnded: t2, isInstantMessage: s2 } = e2, { eventDataList: e2, result: r2 } = (ct.d(this._n + ".onReceiveSystemNotice count:" + e2.length), this._assembly({ notifiesList: e2, isInstantMessage: s2 })); - 0 < e2.length && (this._grpM.get(o).onNewMessage({ conversationOptionsList: e2, isInstantMessage: s2 }), this._onReceivedGroupSystemNotice({ result: r2, isInstantMessage: s2 })), s2 ? 0 < r2.length && this._grpM.emitOEvt(Ut, r2) : true === t2 && this._clearGroupSystemNotice(); - } - _assembly({ notifiesList: e2, isInstantMessage: t2 }) { - var s2 = null; - const r2 = e2.length; - let i2 = 0; - var n2 = [], a2 = { conversationID: le, unreadCount: 0, type: le, subType: null, lastMessage: null }; - for (i2 = 0; i2 < r2; i2++) { - const r3 = e2[i2], { groupProfile: { communityType: u2 = 0, topicID: p2 }, elements: { topicIDList: l2, operationType: h2 } } = r3; - if (!(2 !== u2 || qe(p2) && qe(l2))) { - if (Ho.includes(h2)) { - this._handleTopicSystemNotice(r3); - continue; - } - qe(p2) || (r3.to = p2); - } - r3.elements.operationType !== Vo && (r3.currentUser = this._grpM.getMyUserID(), r3.conversationType = le, r3.conversationID = le, (s2 = new _o(r3)).setElement({ type: ee, content: { ...r3.elements, groupProfile: { ...r3.groupProfile } } }), s2.isSystemMessage = true, (1 === s2.sequence && 1 === s2.random || 2 === s2.sequence && 2 === s2.random) && (s2.sequence = ze(), s2.random = ze(), s2.generateMessageID(), ct.l(this._n + "._assembly regenerate ID:" + s2.ID)), this._grpM.get(o).pushIntoNoticeResult(n2, s2)) && (t2 ? a2.unreadCount++ : s2.setIsRead(true), a2.subType = s2.conversationSubType); - } - return a2.lastMessage = n2[n2.length - 1], { eventDataList: 0 < n2.length ? [a2] : [], result: n2 }; - } - _clearGroupSystemNotice() { - this._getPendencyList().then((e2) => { - e2.forEach((e3) => { - this.pendencyMap.set(`${e3.from}_${e3.groupID}_` + e3.to, e3); - }); - const t2 = this._grpM.get(o).getLocalMessageList(le), i2 = []; - t2.forEach((e3) => { - const { operatorID: t3, operationType: s2, groupProfile: o2 } = e3.payload; - if (s2 === xo) { - const s3 = `${t3}_${o2.groupID}_` + o2.to, r2 = this.pendencyMap.get(s3); - r2 && xe(r2.handled) && 0 !== r2.handled && i2.push(e3); - } - }), this.deleteGroupSystemNotice({ messageList: i2 }); - }); - } - deleteGroupSystemNotice(e2) { - const s2 = this._n + ".deleteGroupSystemNotice"; - return je(e2.messageList) && 0 !== e2.messageList.length ? (ct.l(s2 + " " + e2.messageList.map((e3) => e3.ID)), this._grpM.req({ P: Ds, data: { messageListToDelete: e2.messageList.map((e3) => ({ from: le, messageSeq: e3.clientSequence, messageRandom: e3.random })) } }).then(() => { - ct.l(s2 + " ok"); - const t2 = this._grpM.get(o); - return e2.messageList.forEach((e3) => { - t2.deleteLocalMessage(e3); - }), ht(); - }).catch((e3) => (ct.e(s2 + " error:", e3), Kt(e3)))) : jt(); - } - _getPendencyList(e2 = {}) { - var { type: e2, startTime: t2 = 0, limit: s2 = 20 } = e2; - return this._grpM.req({ P: ys, data: { type: e2, startTime: t2, limit: s2, handleAccount: this._grpM.getMyUserID() } }).then((e3) => { - const t3 = e3.data.pendencyList; - return 0 !== e3.data.nextStartTime ? this._getPendencyList({ startTime: e3.data.nextStartTime }).then((e4) => [...t3, ...e4]) : t3; - }); - } - getGroupApplicationList() { - return this._getPendencyList().then((t2) => this._getPendencyList({ type: de }).then((e2) => (t2.push(...e2), this._handlePendencyResult(t2))).catch((e2) => this._handlePendencyResult(t2))); - } - _handlePendencyResult(e2) { - const t2 = []; - return e2.forEach((e3) => { - this.pendencyMap.set(`${e3.from}_${e3.groupID}_` + e3.to, e3), 0 === e3.handled && t2.push({ applicant: e3.from, applicantNick: e3.fromUserNickName, groupName: e3.groupName, groupID: e3.groupID, authentication: e3.authentication, messageKey: e3.time, applicationType: e3.applicationType, userID: e3.userID, note: e3.note }); - }), jt({ applicationList: t2 }); - } - _onReceivedGroupSystemNotice({ result: e2, isInstantMessage: t2 }) { - t2 && e2.forEach((e3) => { - switch (e3.payload.operationType) { - case 1: - break; - case 2: - this._onApplyJoinGroup(e3); - break; - case 3: - break; - case 4: - this._onMemberKicked(e3); - break; - case 5: - this._onGroupDismissed(e3); - break; - case 6: - break; - case 7: - this._onInviteGroup(e3); - break; - case 8: - this._onQuitGroup(e3); - break; - case 9: - this._onSetManager(e3); - break; - case 10: - this._onDeleteManager(e3); - break; - case 11: - case 12: - case 15: - break; - case 20: - this._onMessageRemindTypeSynced(e3); - break; - case 21: - this._grpM.onAVChatRoomMemberBanned(e3); - } - }); - } - _onApplyJoinGroup(e2) { - var { groupID: e2, groupType: t2 } = e2.payload.groupProfile, s2 = this._grpM.hasLocalGroup(e2); - ct.l(this._n + `._onApplyJoinGroup groupID:${e2} groupType:${t2} hasGroup:` + s2), s2 || st(t2) || this._grpM.getGroupProfile({ groupID: e2 }).then(({ data: { group: e3 } }) => { - e3 && (this._grpM.updateGroupMap([e3]), e3 = !e3.isSupportTopic, this._grpM.emitGroupListUpdate(true, e3)); - }); - } - _onMemberKicked(e2) { - e2 = e2.payload.groupProfile.groupID; - this._grpM.hasLocalGroup(e2) && this._grpM.deleteLocalGroupAndConversation(e2); - } - _onGroupDismissed(e2) { - var e2 = e2.payload.groupProfile.groupID, t2 = (this._grpM.hasLocalGroup(e2) && this._grpM.deleteLocalGroupAndConversation(e2), this._grpM)["_AVChatRoomHandler"]; - t2 && t2.checkJoinedAVChatRoomByID(e2) && t2.reset(e2); - } - _onInviteGroup(e2) { - const t2 = e2.payload.groupProfile.groupID, s2 = this._grpM.hasLocalGroup(t2); - ct.l(`${this._n}._onInviteGroup groupID:${t2} hasGroup:` + s2), this._grpM.getGroupProfile({ groupID: t2 }).then(() => { - this._grpM.emitGroupListUpdate(), this._grpM.get(o).pullMsgOnInvite("" + ue + t2); - }); - } - _onQuitGroup(e2) { - var { groupID: e2, groupType: t2 } = e2.payload.groupProfile, s2 = this._grpM.hasLocalGroup(e2); - ct.l(this._n + `._onQuitGroup groupID:${e2} groupType:${t2} hasGroup:` + s2), s2 && this._grpM.deleteLocalGroupAndConversation(e2); - } - _onSetManager(e2) { - var { to: e2, groupID: t2 } = e2.payload.groupProfile, t2 = this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(t2, e2); - t2 && t2.updateRole(Ie); - } - _onDeleteManager(e2) { - var { to: e2, groupID: t2 } = e2.payload.groupProfile, t2 = this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(t2, e2); - t2 && t2.updateRole(ye); - } - _onMessageRemindTypeSynced(e2) { - var t2 = e2.payload.groupProfile["groupID"], e2 = e2.payload.messageRemindType; - this._grpM.get(o).onGroupMsgRemindTypeUpdated({ groupID: t2, messageRemindType: e2 }); - } - _handleTopicSystemNotice(e2) { - var { groupProfile: { groupID: e2, topicID: t2 }, elements: { operationType: o2, topicIDList: r2, messageRemindType: i2 } } = e2, n2 = this._grpM.get(s); - 17 === o2 ? n2.onTopicCreated({ groupID: e2, topicID: t2 }) : 18 === o2 ? n2.onTopicDeleted({ groupID: e2, topicIDList: r2 }) : 20 === o2 && n2.onMessageRemindTypeUpdated({ groupID: e2, topicID: t2, messageRemindType: i2 }); - } - reset() { - this.pendencyMap.clear(); - } -}; -var Ko = class extends class { - constructor(e2) { - this._m = e2, this._n = ""; - } - isLoggedIn() { - return this._m.get(r).isLoggedIn(); - } - isOversea() { - return this._m.get(r).isOversea(); - } - isPrivateNetWork() { - var e2 = this._m.get(r); - return e2.isPrivateNetWork() && !e2.getFileDownloadProxy(); - } - getFileDownloadProxy() { - return this._m.get(r).getFileDownloadProxy(); - } - getDowloadFileAuthKey() { - return this._m.get(r).getDowloadFileAuthKey(); - } - getMyUserID() { - return this._m.get(r).getUserID(); - } - getMyTinyID() { - return this._m.get(r).getTinyID(); - } - getSDKAppID() { - return this._m.get(r).getSDKAppID(); - } - isIntl() { - return this._m.get(r).isIntl(); - } - isUsingChatCore() { - return this._m.get(r).isUsingChatCore(); - } - isDevMode() { - return this._m.get(r).isDevMode(); - } - get(e2) { - return this._m.get(e2); - } - getPlatform() { - return k; - } - getCloudConfig(e2) { - return this._m.get(u).getCloudConfig(e2); - } - emitOEvt(e2, t2) { - this._m.getOEmitInst().emit(e2, t2); - } - emitIEvt(e2, t2) { - this._m.getIEmitInst().emit(e2, t2); - } - getIEmitInst() { - return this._m.getIEmitInst(); - } - req(e2) { - return this._m.get(a).req(e2); - } - canIUse(e2) { - return this._m.get(l).canIUse(e2); - } - getErrMsg(e2, t2, s2) { - return this._m.getErrMsg(e2, t2, s2); - } - warn(e2, t2, s2) { - e2 = this.getErrMsg(e2, t2, s2); - e2 && ct.w(e2); - } - noUse(e2) { - var t2 = Et; - return Kt({ code: t2, message: this.getErrMsg(t2, e2) }); - } -} { - constructor(e2) { - super(e2), this._n = "GroupModule", this._commonGroupHandler = new Mo(this), this._groupAttributesHandler = new Go(this), this._groupCountersHandler = new So(this), this._AVChatRoomHandler = new wo(this), this._groupTipsHandler = new fo(this), this._groupSystemNoticeHandler = new jo(this), this._groupMemberHandler = new No(this), this.groupMap = /* @__PURE__ */ new Map(), this._unjoinedAVChatRoomList = /* @__PURE__ */ new Map(), this._receiptDetailCompleteMap = /* @__PURE__ */ new Map(), this._onlineMemberCountMap = /* @__PURE__ */ new Map(), this._timeoutIDs = [], this.getIEmitInst().on(Bt.CLOUD_CONFIG, this._onCloudConfig, this); - } - _onCloudConfig() { - var e2 = this.getCloudConfig("polling_interval"), t2 = this.getCloudConfig("polling_interval_plus"), s2 = this.getCloudConfig("polling_no_msg_count"), o2 = this.getCloudConfig("polling_simplified_msg"), r2 = this.getCloudConfig("paging_grp_count"); - ct.l(this._n + `._onCloudConfig pollingInterval:${e2} pollingIntervalPlus:${t2} pollingNoMessageCount:${s2} pollingSimplifiedMessage:${o2} pagingGroupCount:` + r2), this._AVChatRoomHandler.setPollingInterval(e2), this._AVChatRoomHandler.setPollingIntervalPlus(t2), this._AVChatRoomHandler.setPollingNoMessageCount(s2), this._AVChatRoomHandler.setPollingSimplifiedMessage(o2), this._commonGroupHandler.setPagingGroupCount(r2); - } - onCheckTimer(e2) { - this.isLoggedIn() && (this._commonGroupHandler.onCheckTimer(e2), this._groupTipsHandler.onCheckTimer(e2)); - } - guardForAVChatRoom(t2) { - if (t2.conversationType !== ue) - return jt(); - { - const s2 = rt(t2.to) ? it(t2.to) : t2.to; - return this.hasLocalGroup(s2) ? jt() : this.getGroupProfile({ groupID: s2 }).then((e2) => { - e2 = e2.data.group.type; - if (ct.l(`${this._n}.guardForAVChatRoom. groupID:${s2} type:` + e2), e2 !== me) - return jt(); - { - const e3 = mt; - return Kt(new gt({ code: e3, message: this.getErrMsg(e3, t2.from, s2), data: { message: t2 } })); - } - }); - } - } - checkJoinedAVChatRoomByID(e2) { - return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e2); - } - onNewMessage(e2) { - this._commonGroupHandler.onNewMessage(e2); - } - updateNextMessageSeq(e2) { - if (je(e2)) { - const o2 = this.get(s); - e2.forEach((e3) => { - var t2 = e3.conversationID.replace(ue, ""); - rt(t2) && o2.updateUnreadCountAndLastMsg(t2, e3.lastMessage), this.groupMap.has(t2) && (this.groupMap.get(t2).nextMessageSeq = e3.lastMessage.sequence + 1); - }); - } - } - onNewGroupTips(e2) { - this._groupTipsHandler.onNewGroupTips(e2); - } - onMsgRevoked(e2, t2 = true) { - this._commonGroupHandler.onMsgRevoked(e2, t2); - } - onNewGroupSystemNotice(e2) { - this._groupSystemNoticeHandler.onNewGroupSystemNotice(e2); - } - onMsgReadNotice(e2) { - e2.dataList.forEach((i2) => { - var e3 = i2.elements["groupMessageReadNotice"]; - if (!Ke(e3)) { - const i3 = this.get(o); - e3.forEach((e4) => { - var { groupID: e4, topicID: t2, lastMessageSeq: s2 } = e4; - ct.l(this._n + `.onMsgReadNotice groupID:${e4} lastMessageSeq:` + s2); - let o2 = "" + ue + e4, r2 = true; - qe(t2) || (o2 = "" + ue + t2, r2 = false), i3.updateIsReadAfterReadReport({ conversationID: o2, lastMessageSeq: s2 }), i3.updateUnreadCount(o2, r2), i3.clearGroupAtInfoList(o2, r2); - }); - } - }); - } - onReadReceiptList(e2) { - ct.l(this._n + ".onReadReceiptList options:", e2), e2.dataList.forEach((e3) => { - var { groupProfile: e3, elements: t2 } = e3, e3 = e3["groupID"], t2 = t2["readReceiptList"]; - this.get(o).updateReadReceiptInfo({ groupID: e3, readReceiptList: t2 }); - }); - } - onMsgModified(e2) { - ct.l(this._n + ".onMsgModified options:", e2); - const t2 = this.get(o); - e2.dataList.forEach((e3) => { - t2.onMessageModified({ ...e3, conversationType: ue, to: e3.topicID || e3.groupID }); - }); - } - deleteGroupSystemNotice(e2) { - this._groupSystemNoticeHandler.deleteGroupSystemNotice(e2); - } - initGroupMap(e2) { - this.groupMap.set(e2.groupID, new $o(e2)); - } - clearGroupMap() { - this.groupMap.clear(); - } - deleteGroup(e2) { - this.groupMap.delete(e2); - } - updateGroupMap(e2) { - const t2 = this.get(o); - let s2; - e2.forEach((e3) => { - s2 = e3.groupID, this.groupMap.has(s2) ? this.groupMap.get(s2).updateGroup(e3) : (this.groupMap.set(s2, new $o(e3)), t2.deleteGroupRoamingInfo(s2)); - }); - var r2 = this.getMyUserID(); - for (const [, o2] of this.groupMap) - o2.selfInfo.userID = r2, "Owner" === o2.selfInfo.role && (o2.ownerID = r2); - } - getGroupMap() { - return this.groupMap; - } - getLocalGroupList() { - return [...this.groupMap.values()].filter((e2) => e2.type !== _e && e2.type !== fe); - } - getLocalGroupProfile(e2) { - return this.groupMap.get(e2); - } - sortLocalGroupList() { - var e2 = [...this.groupMap].filter(([, e3]) => !qe(e3.lastMessage)); - e2.sort((e3, t2) => t2[1].lastMessage.lastTime - e3[1].lastMessage.lastTime), this.groupMap = new Map([...e2]); - } - updateGroupLastMessage(e2) { - this._commonGroupHandler.updateLastMsg(e2); - } - emitGroupListUpdate(e2 = true, t2 = true) { - var s2 = this.getLocalGroupList(); - if (e2 && this.emitOEvt(kt), t2) { - const e3 = JSON.parse(JSON.stringify(s2)); - this.get(o).updateConvGroupProfile(e3); - } - } - getMyNameCardByGroupID(e2) { - e2 = this.getLocalGroupProfile(e2); - return e2 ? e2.selfInfo.nameCard : ""; - } - isPagingGetCompleted() { - return this._commonGroupHandler.isPagingGetCompleted(); - } - getMsgRemindType(e2) { - return !je(e2) || 0 === e2.length || 0 === (e2 = e2.filter((e3) => !st(this.getLocalGroupProfile(e3).type))).length ? Promise.resolve() : (ct.l(this._n + ".getMsgRemindType groupIDList:" + e2), this.getGroupProfileAdvance({ groupIDList: e2, responseFilter: { memberInfoFilter: ["MsgFlag"] } }).then((e3) => { - const t2 = e3.data["successGroupList"], s2 = this.get(o); - t2.forEach((e4) => { - s2.onGroupMsgRemindTypeUpdated({ groupID: e4.groupID, messageRemindType: je(e4.members) ? e4.members[0].messageRemindType : "" }); - }); - })); - } - getGroupList() { - return this._commonGroupHandler.getGroupList(); - } - syncCommunityWithTopic() { - return this._commonGroupHandler.syncGroupList(true); - } - getGroupProfile(t2) { - const r2 = this._n + ".getGroupProfile", i2 = new Zt("getGroupProfile"), { groupID: n2, groupCustomFieldFilter: e2 } = t2; - ct.l(r2 + " groupID:" + n2); - var s2 = { groupIDList: [n2], responseFilter: { groupBaseInfoFilter: [...L], groupCustomFieldFilter: e2, memberInfoFilter: [...C, "NameCard"] } }; - return this.getGroupProfileAdvance(s2).then(({ data: { successGroupList: e3, failureGroupList: t3 } }) => { - if (ct.l(r2 + " ok"), 0 < t3.length) - return Kt(t3[0]); - let s3; - return (s3 = st(e3[0].type) && !this.hasLocalGroup(n2) ? new $o(e3[0]) : (this.updateGroupMap(e3), this.getLocalGroupProfile(n2))).isSupportTopic || this.get(o).updateConvGroupProfile([s3]), i2.setMessage(`groupID:${n2} type:${s3.type} muteAllMembers:${s3.muteAllMembers} ownerID:` + s3.ownerID).end(), ht({ group: s3 }); - }).catch((e3) => (i2.setError(e3).setMessage("groupID:" + t2.groupID).end(), ct.e(r2 + " failed. error:", e3), Kt(e3))); - } - getGroupProfileAdvance(e2) { - const t2 = this._n + ".getGroupProfileAdvance", s2 = e2["groupIDList"], o2 = (je(s2) && 50 < s2.length && (this.warn("GetGroupProfileLimit"), s2.length = 50), []), r2 = []; - s2.forEach((e3) => { - (ot({ groupID: e3 }) ? r2 : o2).push(e3); - }); - var i2 = []; - if (0 < o2.length) { - const t3 = this._getGroupProfileAdvance({ ...e2, groupIDList: o2 }); - i2.push(t3); - } - if (0 < r2.length) { - const t3 = this._getGroupProfileAdvance({ ...e2, groupIDList: r2, relayFlag: 0 < o2.length }); - i2.push(t3); - } - return Promise.all(i2).then((e3) => { - const t3 = [], s3 = []; - return e3.forEach((e4) => { - t3.push(...e4.successGroupList), s3.push(...e4.failureGroupList); - }), ht({ successGroupList: t3, failureGroupList: s3 }); - }).catch((e3) => (ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - _getGroupProfileAdvance(t2) { - const { relayFlag: s2 = false, ...o2 } = t2; - return this.req({ P: ss, data: o2 }).then((e2) => { - ct.l(this._n + "._getGroupProfileAdvance ok. options:", o2); - e2 = e2.data.groups; - return { successGroupList: e2.filter((e3) => Ke(e3.errorCode) || 0 === e3.errorCode), failureGroupList: e2.filter((e3) => e3.errorCode && 0 !== e3.errorCode).map((e3) => new gt({ code: e3.errorCode, message: e3.errorInfo, data: { groupID: e3.groupID } })) }; - }).catch((e2) => s2 && ot({ groupID: t2.groupIDList[0] }) ? { successGroupList: [], failureGroupList: [] } : Kt(e2)); - } - createGroup(u2) { - const s2 = [he, ce, ge, me, de], o2 = this._n + ".createGroup", { type: r2, groupID: i2 } = u2; - if (u2.name && false === this._filterProfanity("name", u2)) - return Kt({ code: wt }); - if (u2.introduction && false === this._filterProfanity("introduction", u2)) - return Kt({ code: wt }); - if (u2.notification && false === this._filterProfanity("notification", u2)) - return Kt({ code: wt }); - if (!s2.includes(r2)) - return Kt({ code: _t }); - if (!ot({ type: r2 })) { - if (!qe(i2) && ot({ groupID: i2 })) - return Kt({ code: ft }); - u2.isSupportTopic = void 0; - } - if (st(r2) && !Ke(u2.memberList) && 0 < u2.memberList.length && (u2.memberList = void 0), this._canIUseJoinOption(r2) || Ke(u2.joinOption) || (u2.joinOption = void 0), ot({ type: r2 })) { - if (!qe(i2) && !ot({ groupID: i2 })) - return Kt({ code: ft }); - u2.isSupportTopic = true === u2.isSupportTopic ? 1 : 0; - } - const p2 = new Zt("createGroup"); - ct.l(o2 + " options:", u2); - let l2 = null, h2 = []; - return this.req({ P: os, data: { ...u2, ownerID: this.getMyUserID(), webPushFlag: 1 } }).then((r3) => { - const { groupID: i3, overLimitUserIDList: n2 = [] } = r3.data; - l2 = i3, h2 = n2; - r3 = `groupType:${u2.type} groupID:${i3} overLimitUserIDList:` + n2; - if (p2.setMessage(r3).end(), ct.l(o2 + " ok. " + r3), u2.type !== me && (u2.type !== de || 1 !== u2.isSupportTopic)) { - qe(u2.memberList) || qe(n2) || (u2.memberList = u2.memberList.filter((e2) => -1 === n2.indexOf(e2.userID))), this.updateGroupMap([{ ...u2, groupID: i3 }]); - r3 = this.get(e); - let s3 = "", o3 = 0; - u2.type === de ? (s3 = this.isIntl() ? "Create Community" : "创建社群", o3 = 1) : s3 = this.isIntl() ? "Create Group" : "创建群组"; - var a2 = this.get(t).getMyNick(), a2 = r3.createCustomMessage({ to: i3, conversationType: ue, payload: { data: JSON.stringify({ businessID: "group_create", content: s3, cmd: o3, opUser: a2 || this.getMyUserID(), version: 4 }) } }); - r3.sendMessageInstance(a2), this.emitGroupListUpdate(); - } - return this.getGroupProfile({ groupID: i3 }); - }).then((e2) => { - var e2 = e2.data["group"], { nameCard: t2, joinTime: s3 } = e2.selfInfo; - return e2.updateSelfInfo({ nameCard: t2, joinTime: s3, messageRemindType: Ae, role: Me }), ht({ group: e2, overLimitUserIDList: h2 }); - }).catch((e2) => { - var t2; - return p2.setMessage("groupType:" + u2.type).setError(e2).end(), 10010 === e2.code || 10007 === e2.code ? (this._silentlyGetGroupProfile(e2.code, l2), this.updateGroupMap([{ ...u2, groupID: l2 }]), (t2 = this.getLocalGroupProfile(l2)).selfInfo.role = Me, ht({ group: t2, overLimitUserIDList: h2 })) : (ct.e(o2 + " failed. error:", e2), Kt(e2)); - }); - } - dismissGroup(e2) { - const t2 = this._n + ".dismissGroup", s2 = "groupID:" + e2, o2 = new Zt("dismissGroup"); - return o2.setMessage(s2), ct.l(t2 + " " + s2), this.req({ P: rs, data: { groupID: e2 } }).then(() => (o2.end(), ct.l(t2 + " ok"), this.deleteLocalGroupAndConversation(e2), this.checkJoinedAVChatRoomByID(e2) && this._AVChatRoomHandler.reset(e2), this._groupAttributesHandler.deleteLocalGroupAttributes(e2), ht({ groupID: e2 }))).catch((e3) => (o2.setError(e3).end(), ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - updateGroupProfile(e2) { - const t2 = this._n + ".updateGroupProfile"; - if (this.hasLocalGroup(e2.groupID)) { - const s3 = this.getLocalGroupProfile(e2.groupID).type; - this._canIUseJoinOption(s3) || Ke(e2.joinOption) || (ct.w(t2 + " joinOption is unavailable for Work/Meeting/AVChatRoom"), e2.joinOption = void 0); - } - if (Ke(e2.muteAllMembers) || (e2.muteAllMembers ? e2.muteAllMembers = "On" : e2.muteAllMembers = "Off"), e2.name && false === this._filterProfanity("name", e2)) - return Kt({ code: wt }); - if (e2.introduction && false === this._filterProfanity("introduction", e2)) - return Kt({ code: wt }); - if (e2.notification && false === this._filterProfanity("notification", e2)) - return Kt({ code: wt }); - const s2 = new Zt("updateGroupProfile"); - return s2.setMessage(JSON.stringify(e2)), ct.l(t2 + " groupID:" + e2.groupID), this.req({ P: is, data: e2 }).then(() => (s2.end(), ct.l(t2 + " ok"), this.hasLocalGroup(e2.groupID) && this.groupMap.get(e2.groupID).updateGroup(e2), ht({ group: this.groupMap.get(e2.groupID) }))).catch((e3) => (s2.setError(e3).end(), ct.l(t2 + " failed. error:", e3), Kt(e3))); - } - _filterProfanity(e2, t2) { - var s2, o2 = this.get(c); - return !o2 || ({ isAllowedToSend: o2, modifiedText: s2 } = o2.filterText(t2[e2], y), true === o2 && (t2[e2] = s2, true)); - } - joinGroup(t2) { - const s2 = t2["groupID"], o2 = this._n + ".joinGroup"; - if (this.deleteUnjoinedAVChatRoom(s2), this.hasLocalGroup(s2)) { - if (!this.isLoggedIn()) - return jt({ status: Te }); - const r2 = new Zt("applyJoinGroup"); - return this.getGroupProfile({ groupID: s2 }).then(() => (r2.setMessage(`groupID:${s2} joinedStatus:` + Te).end(), jt({ status: Te }))).catch((e2) => (r2.setMessage(`groupID:${s2} unjoined`).end(), ct.w(o2 + ` ${s2} was unjoined, now join!`), this.groupMap.delete(s2), this.applyJoinGroup(t2))); - } - return ct.l(o2 + " groupID:" + s2), this.isLoggedIn() ? this.applyJoinGroup(t2) : this._AVChatRoomHandler.joinWithoutAuth(t2); - } - applyJoinGroup(e2) { - const a2 = this._n + ".applyJoinGroup", { groupID: u2, applyMessage: t2 } = e2; - if (!qe(t2) && false === this._filterProfanity("applyMessage", e2)) - return Kt({ code: wt }); - const p2 = new Zt("applyJoinGroup"), s2 = { ...e2 }, l2 = this.canIUse(I.AV_HISTORY_MSG); - return l2 && (s2.historyMessageFlag = 1), this.get(o).deleteTopicRoamingInfo(u2), this.req({ P: ns, data: s2 }).then(({ data: { joinedStatus: e3, longPollingKey: t3, startSeq: s3, avChatRoomFlag: o2, avChatRoomKey: r2, messageList: i2 } }) => { - var n2 = `groupID:${u2} joinedStatus:${e3} longPollingKey:${t3} startSeq:${s3} avChatRoomFlag:${o2} canGetAVChatRoomHistoryMsg:${l2}, historyMsgCount:` + (qe(i2) ? 0 : i2.length); - switch (p2.setMessage(n2).end(), ct.l(a2 + " ok. " + n2), e3) { - case Ee: - return ht({ status: Ee }); - case $e: - return this.getGroupProfile({ groupID: u2 }).then(({ data: { group: e4 } }) => this._handleJoinResult({ group: e4, avChatRoomFlag: o2, longPollingKey: t3, startSeq: s3, avChatRoomKey: r2, messageList: i2 })).catch((e4) => { - if (10010 !== e4.code && 10007 !== e4.code) - return ct.e(a2 + " failed. error:", e4), Kt(e4); - { - this._silentlyGetGroupProfile(e4.code, u2); - const a3 = new $o({ groupID: u2 }); - return this.updateGroupMap([a3]), this._handleJoinResult({ group: a3, avChatRoomFlag: o2, longPollingKey: t3, startSeq: s3, avChatRoomKey: r2, messageList: i2 }); - } - }); - default: { - const e4 = new gt({ code: Lt }); - return ct.e(a2 + " failed. error:", e4), Kt(e4); - } - } - }).catch((e3) => (p2.setMessage("groupID:" + u2).setError(e3).end(), ct.e(a2 + " failed. error:", e3), Kt(e3))); - } - _handleJoinResult(e2) { - const { group: t2, avChatRoomFlag: s2, longPollingKey: r2, startSeq: i2, avChatRoomKey: n2, messageList: a2 } = e2, u2 = t2["groupID"]; - return 1 === s2 ? (this.get(o).setCompleted("" + ue + u2), this._groupAttributesHandler.initGroupAttributesCache({ groupID: u2, avChatRoomKey: n2 }), this._groupCountersHandler.initGroupCountersCache({ groupID: u2, avChatRoomKey: n2 }), (e2 = Ke(r2) ? this._AVChatRoomHandler.handleJoinResult({ group: t2 }) : this._AVChatRoomHandler.startRunLoop({ group: t2, longPollingKey: r2, startSeq: i2 })).then(() => { - this._onAVChatRoomHistoryMessage(a2, u2); - }), e2) : (this.emitGroupListUpdate(true, false), ht({ status: $e, group: t2 })); - } - quitGroup(e2) { - const t2 = this._n + ".quitGroup", s2 = "groupID:" + e2, o2 = (ct.l(t2 + " " + s2), this.checkJoinedAVChatRoomByID(e2)); - if (!o2 && !this.hasLocalGroup(e2)) - return Kt({ code: Dt }); - if (o2 && !this.isLoggedIn()) - return ct.l(t2 + " anonymously ok. " + s2), this.deleteLocalGroupAndConversation(e2), this._AVChatRoomHandler.reset(e2), jt({ groupID: e2 }); - const r2 = new Zt("quitGroup"); - return r2.setMessage(s2), this.req({ P: us, data: { groupID: e2 } }).then(() => (r2.end(), ct.l(t2 + " ok"), this.deleteLocalGroupAndConversation(e2), o2 && this._AVChatRoomHandler.reset(e2), this._groupAttributesHandler.deleteLocalGroupAttributes(e2), ht({ groupID: e2 }))).catch((e3) => (r2.setError(e3).end(), ct.e(t2 + " failed. error:", e3), Kt(e3))); - } - searchGroupByID(e2) { - const t2 = this._n + ".searchGroupByID", s2 = { groupIDList: [e2] }, o2 = new Zt("searchGroupByID"); - return o2.setMessage("groupID:" + e2), ct.l(t2 + " groupID:" + e2), this.req({ P: ps, data: s2 }).then(({ data: { groupProfile: e3 } }) => { - if (0 !== e3[0].errorCode) - throw new gt({ code: e3[0].errorCode, message: e3[0].errorInfo }); - return o2.end(), ct.l(t2 + " ok"), ht({ group: new $o(e3[0]) }); - }).catch((e3) => (o2.setError(e3).end(), ct.w(t2 + " failed. error:", e3), Kt(e3))); - } - changeGroupOwner(o2) { - const r2 = this._n + ".changeGroupOwner"; - if (this.hasLocalGroup(o2.groupID) && this.getLocalGroupProfile(o2.groupID).type === me) - return Kt({ code: It }); - if (o2.newOwnerID === this.getMyUserID()) - return Kt({ code: yt }); - const i2 = new Zt("changeGroupOwner"); - return i2.setMessage(`groupID:${o2.groupID} newOwnerID:` + o2.newOwnerID), ct.l(r2 + " groupID:" + o2.groupID), this.req({ P: ls, data: o2 }).then(() => { - i2.end(), ct.l(r2 + " ok"); - var { groupID: e2, newOwnerID: t2 } = o2, s2 = (this.groupMap.get(e2).ownerID = t2, this._groupMemberHandler.getLocalGroupMemberList(e2)); - if (s2 instanceof Map) { - const o3 = s2.get(this.getMyUserID()), r3 = (Ke(o3) || (o3.updateRole("Member"), this.groupMap.get(e2).selfInfo.role = "Member"), s2.get(t2)); - Ke(r3) || r3.updateRole("Owner"); - } - return this.emitGroupListUpdate(true, false), ht({ group: this.groupMap.get(e2) }); - }).catch((e2) => (i2.setError(e2).end(), ct.e(r2 + " failed. error:", e2), Kt(e2))); - } - getGroupApplicationList() { - return this._groupSystemNoticeHandler.getGroupApplicationList(); - } - handleGroupApplication(e2) { - const t2 = this._n + ".handleGroupApplication", { handleAction: s2, handleMessage: o2, message: r2, application: i2 } = e2; - let n2, a2, u2, p2, l2, h2 = (r2 ? (n2 = r2.payload.operatorID, a2 = r2.payload.groupProfile.groupID, u2 = r2.payload.authentication, p2 = r2.payload.messageKey) : i2 && (n2 = i2.applicant, a2 = i2.groupID, u2 = i2.authentication, p2 = i2.messageKey), cs); - i2 && 2 === i2.applicationType && (h2 = hs, l2 = i2.userID); - const c2 = new Zt("handleGroupApplication"); - return c2.setMessage("groupID:" + a2), ct.l(t2 + " groupID:" + a2), this.req({ P: h2, data: { handleAction: s2, handleMessage: o2, applicant: n2, invitee: l2, groupID: a2, authentication: u2, messageKey: p2 } }).then(() => (c2.end(), ct.l(t2 + " ok"), r2 && this._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e2.message] }), ht({ group: this.getLocalGroupProfile(a2) }))).catch((e3) => (c2.setError(e3).end(), ct.e(t2 + " failed. error", e3), Kt(e3))); - } - handleGroupInvitation(e2) { - const t2 = this._n + ".handleGroupInvitation", { groupProfile: { groupID: s2 }, authentication: o2, messageKey: r2, operatorID: i2 } = e2.message.payload, n2 = e2["handleAction"], a2 = new Zt("handleGroupInvitation"); - return a2.setMessage(`groupID:${s2} inviter:${i2} handleAction:` + n2), ct.l(t2 + ` groupID:${s2} inviter:${i2} handleAction:` + n2), this.req({ P: gs, data: { ...e2, inviter: i2, groupID: s2, authentication: o2, messageKey: r2 } }).then(() => (a2.end(), ct.l(t2 + " ok"), this._groupSystemNoticeHandler.deleteGroupSystemNotice({ messageList: [e2.message] }), ht({ group: this.getLocalGroupProfile(s2) }))).catch((e3) => (a2.setError(e3).end(), ct.e(t2 + " failed. error", e3), Kt(e3))); - } - getGroupOnlineMemberCount(t2) { - const s2 = this._n + ".getGroupOnlineMemberCount", e2 = this._AVChatRoomHandler.checkJoinedAVChatRoomByID(t2), o2 = this.hasLocalGroup(t2); - if (ct.l(s2 + ` groupID:${t2} isAVChatRoom:${e2} has:` + o2), e2) - return this._AVChatRoomHandler.getGroupOnlineMemberCount(t2); - if (!o2) - return jt({ memberCount: 0 }); - var r2 = Date.now(); - if (this._onlineMemberCountMap.has(t2)) { - const s3 = this._onlineMemberCountMap.get(t2); - if (r2 - s3.lastReqTime <= 6e4) - return jt({ memberCount: s3.memberCount }); - s3.lastReqTime = r2; - } - return this.requestOnlineCount(t2).then((e3) => { - var { memberCount: e3 = 0 } = e3.data; - return this._onlineMemberCountMap.set(t2, { lastReqTime: Date.now(), memberCount: e3 }), ct.l(s2 + ` ok. groupID:${t2} memberCount:` + e3), jt({ memberCount: e3 }); - }).catch((e3) => (ct.w(s2 + " failed. error:", e3), Promise.reject(e3))); - } - requestOnlineCount(e2) { - return this.req({ P: Gs, data: { groupID: e2 } }); - } - hasLocalGroup(e2) { - return this.groupMap.has(e2); - } - deleteLocalGroupAndConversation(e2) { - const t2 = this.checkJoinedAVChatRoomByID(e2); - ct.l(this._n + `.deleteLocalGroupAndConversation groupID:${e2} isJoinedAVChatRoom:` + t2); - var r2 = this.get(o), i2 = "" + ue + e2; - if (t2 && (this.stopMessageLongPolling({ groupID: e2 }), r2.deleteLocalConv(i2)), ot({ groupID: e2 })) { - const t3 = this.getLocalGroupProfile(e2); - t3 && true === t3.isSupportTopic && this.get(s).deleteTopicListInCommunity(e2); - } - r2.clearUnreadCount(i2), r2.setCompleted(i2), this._deleteLocalGroup(e2), this._onlineMemberCountMap.delete(e2), this.emitGroupListUpdate(true, false); - } - _deleteLocalGroup(e2) { - this.groupMap.delete(e2), this._groupMemberHandler.deleteGroupMemberList(e2); - } - sendMessage(e2, t2) { - return je(e2._receiverList) && 0 < e2._receiverList.length && !this.canIUse(I.MSG_TO_SPECIFIED_GRP_MBR) ? this.noUse("Targeted Group Message") : (e2 = this.createGroupMessagePack(e2, t2), this.req(e2)); - } - createGroupMessagePack(e2, t2) { - let s2 = null, o2 = (t2 && t2.offlinePushInfo && (s2 = t2.offlinePushInfo), ""); - Ve(e2.cloudCustomData) && 0 < e2.cloudCustomData.length && (o2 = e2.cloudCustomData); - var r2 = []; - if (He(t2) && He(t2.messageControlInfo)) { - const { excludedFromUnreadCount: e3, excludedFromLastMessage: s3, excludedFromContentModeration: o3 } = t2.messageControlInfo; - true === e3 && r2.push("NoUnread"), true === s3 && r2.push("NoLastMsg"), true === o3 && r2.push("NoMsgCheck"); - } - let i2 = void 0; - je(e2._receiverList) && 0 < e2._receiverList.length && (i2 = e2._receiverList, 50 < e2._receiverList.length) && (i2 = e2._receiverList.slice(0, 50), this.warn("ReceiverListLimit")); - var t2 = this.isOnlineMessage(e2, t2) ? 1 : 0, a2 = JSON.parse(JSON.stringify(e2.getElements())), u2 = this.get(n).getFileDNList(), p2 = e2.getGroupAtInfoList(), a2 = { fromAccount: this.getMyUserID(), groupID: e2.to, msgBody: Qs(e2.type, a2, u2), cloudCustomData: o2, random: e2.random, priority: e2.priority, clientSequence: e2.clientSequence, groupAtInfo: e2.type !== B || qe(p2) ? void 0 : p2, onlineOnlyFlag: t2, clientTime: e2.clientTime, offlinePushInfo: Fo(s2), messageControlInfo: 0 == t2 ? r2 : void 0, needReadReceipt: true !== e2.needReadReceipt || this.isMessageFromOrToAVChatroom(e2.to) ? 0 : 1, receiverList: i2, isSupportExtension: true === e2.isSupportExtension ? 1 : 0, isRelayMessage: true === e2._relayFlag ? 1 : 0, cmConfigID: e2._cmConfigID }; - return rt(e2.to) && (a2.groupID = it(e2.to), a2.topicID = e2.to), { P: es, data: a2 }; - } - revokeMessage(e2) { - var t2 = { groupID: e2.to, msgSeqList: [{ msgSeq: e2.sequence }] }; - return rt(e2.to) && (t2.groupID = it(e2.to), t2.topicID = e2.to), this.req({ P: ms, data: t2 }); - } - deleteMessage(e2) { - var { to: e2, keyList: t2 } = e2, t2 = (ct.l(this._n + `.deleteMessage groupID:${e2} count:` + t2.length), { groupID: e2, deleter: this.getMyUserID(), keyList: t2 }); - return rt(e2) && (t2.groupID = it(e2), t2.topicID = e2), this.req({ P: bs, data: t2 }); - } - modifyRemoteMessage(e2) { - var { to: e2, sequence: t2, payload: s2, type: o2, version: r2 = 0, cloudCustomData: i2, _elements: n2 } = e2; - let a2 = e2, u2 = void 0, p2 = (rt(e2) && (a2 = it(e2), u2 = e2), void 0); - return (e2 = o2) !== B && e2 !== te && e2 !== Q && e2 !== X || (1 < n2.length && n2.splice(0, 1, { type: o2, content: s2 }), p2 = n2), this.req({ P: As, data: { groupID: a2, topicID: u2, sequence: t2, version: r2, elements: p2, cloudCustomData: i2 } }); - } - getRoamingMessage(e2) { - const u2 = this._n + ".getRoamingMessage"; - let { conversationID: p2, groupID: l2, sequence: t2 } = e2; - const h2 = new Zt("getRoamingMessage"); - let c2 = 0, g2 = void 0; - return rt(l2) && (l2 = it(g2 = l2)), this._computeLastSequence({ groupID: l2, topicID: g2, sequence: t2 }).then((e3) => (c2 = e3, ct.l(u2 + ` groupID:${l2} startSequence:` + c2), this.req({ P: _s, data: { groupID: l2, count: 21, sequence: c2, topicID: g2 } }))).then((e3) => { - var { messageList: t3, complete: s2, invisibleSequenceList: r2 = [] } = e3.data; - let { nextSequence: i2 = 0 } = e3.data; - Ke(t3) ? ct.l(u2 + ` ok. complete:${s2} nextSequence:${i2} but messageList is undefined!`) : ct.l(u2 + ` ok. complete:${s2} nextSequence:${i2} count:` + t3.length), h2.setMessage(`groupID:${l2} topicID:${g2} startSequence:${c2} complete:${s2} nextSequence:` + i2).end(); - e3 = this.get(o); - let n2 = []; - var a2 = [], t3 = (qe(t3) || (n2 = e3.onRoamingMessage(t3, p2, true, a2), e3.updateIsRead(p2), e3.patchConvLastMessage(p2)), 2 === s2 || i2 < 1); - return t3 && (e3.setCompleted(p2), i2 = ""), ct.l(u2 + ` isPullingCompleted:${t3} nextReqID:${i2} storedMsgCount:${n2.length} invisibleSeqCount:` + r2.length), { nextReqID: i2 + "", storedMessageList: n2, assembledMessageList: a2, isPullingCompleted: t3 }; - }).catch((e3) => (h2.setError(e3).setMessage(`groupID:${l2} topicID:${g2} startSequence:` + c2).end(), ct.w(u2 + " failed. error:", e3), Kt(e3))); - } - _getGroupIDOfMessage(e2) { - return e2.conversationID.replace(ue, ""); - } - getReadReceiptList(s2) { - const t2 = this._n + ".getReadReceiptList", e2 = this._getGroupIDOfMessage(s2[0]), o2 = this.getMyUserID(), r2 = s2.filter((e3) => e3.from === o2 && true === e3.needReadReceipt).map((e3) => ({ sequence: e3.sequence })); - if (ct.l(t2 + ` groupID:${e2} sequenceList:` + JSON.stringify(r2)), 0 === r2.length) - return jt({ messageList: s2 }); - const i2 = new Zt("getReadReceiptList"); - return i2.setMessage("groupID:" + e2), this.req({ P: fs, data: { groupID: e2, sequenceList: r2 } }).then((e3) => { - i2.end(), ct.l(t2 + " ok"); - e3 = e3.data.readReceiptList; - return je(e3) && e3.forEach((t3) => { - s2.forEach((e4) => { - 0 === t3.code && t3.sequence === e4.sequence && (e4.readReceiptInfo.readCount = t3.readCount, e4.readReceiptInfo.unreadCount = t3.unreadCount); - }); - }), ht({ messageList: s2 }); - }).catch((e3) => (i2.setError(e3).end(), ct.w(t2 + " failed. error:", e3), Kt(e3))); - } - sendReadReceipt(e2) { - const t2 = this._n + ".sendReadReceipt", s2 = this._getGroupIDOfMessage(e2[0]), o2 = new Zt("sendReadReceipt"), r2 = (o2.setMessage("groupID:" + s2), this.getMyUserID()), i2 = e2.filter((e3) => e3.from !== r2 && true === e3.needReadReceipt).map((e3) => ({ sequence: e3.sequence })); - return 0 === i2.length ? Kt({ code: dt }) : (ct.l(t2 + ". sequenceList:" + JSON.stringify(i2)), this.req({ P: Ms, data: { groupID: s2, sequenceList: i2 } }).then((e3) => (o2.end(), ct.l(t2 + " ok"), ht())).catch((e3) => (o2.setError(e3).end(), ct.w(t2 + " failed. error:", e3), Kt(e3)))); - } - getReadReceiptDetail(e2) { - const { message: t2, filter: s2, cursor: o2, count: r2 } = e2, i2 = this._getGroupIDOfMessage(t2), n2 = t2.ID, a2 = t2.sequence, u2 = this._n + ".getReadReceiptDetail", p2 = this._receiptDetailCompleteMap.get(n2) || false, l2 = 0 !== s2 && 1 !== s2 ? 0 : s2, h2 = Ve(o2) ? o2 : "", c2 = !xe(r2) || r2 <= 0 || 100 <= r2 ? 100 : r2, g2 = `groupID:${i2} sequence:${a2} cursor:${h2} filter:${l2} completeFlag:` + p2, m2 = (ct.l(u2 + " " + g2), { cursor: "", isCompleted: false, messageID: n2, unreadUserIDList: [], readUserIDList: [] }), d2 = new Zt("getReadReceiptDetail"); - return d2.setMessage(g2), this.req({ P: Is, data: { groupID: i2, sequence: a2, flag: l2, cursor: h2, count: c2 } }).then((e3) => { - d2.end(); - var { cursor: e3, isCompleted: t3, unreadUserIDList: s3, readUserIDList: o3 } = e3.data; - return m2.cursor = e3, 1 === t3 && (m2.isCompleted = true, this._receiptDetailCompleteMap.set(n2, true)), 0 === l2 ? m2.readUserIDList = o3.map((e4) => e4.userID) : 1 === l2 && (m2.unreadUserIDList = s3.map((e4) => e4.userID)), ct.l(u2 + " ok"), ht(m2); - }).catch((e3) => (d2.setError(e3).end(), ct.w(u2 + " failed. error:", e3), Kt(e3))); - } - getRoamingMessagesHopping(p2) { - const l2 = this._n + ".getRoamingMessagesHopping"; - let { groupID: t2, count: s2, sequence: h2, direction: c2 } = p2, r2 = void 0; - return Ke(h2) && 1 === c2 ? jt({ messageList: [], isCompleted: true, nextMessageSeq: "" }) : (rt(t2) && (t2 = it(r2 = t2)), this._computeReqSeqHopping({ groupID: t2, topicID: r2, sequence: h2 }).then((e2) => { - Ke(h2) || 1 !== c2 || (e2 = h2 + s2 - 1); - const a2 = `${r2 ? "topicID:" + r2 : "groupID:" + t2} sequence:${h2} reqSeq:${e2} direction:` + c2, u2 = (ct.l(l2 + " " + a2), new Zt("getRoamingMessagesHopping")); - return this.req({ P: _s, data: { groupID: t2, topicID: r2, count: s2, sequence: e2 } }).then((e3) => { - var { messageList: e3 = [], complete: t3, nextSequence: s3 = 0, invisibleSequenceList: r3 = [] } = e3.data, i2 = `complete:${t3} nextSequence:${s3} remoteMsgCount:${e3.length} invisibleSequenceList:` + r3, i2 = (u2.setMessage(a2 + " " + i2).end(), ct.l(l2 + " ok. " + i2), "" + ue + p2.groupID), n2 = this.get(o), i2 = n2.onRoamingMessage(e3, i2, false), e3 = this._computeResult({ groupID: p2.groupID, direction: c2, sequence: h2, remoteMessageList: e3, processedMessageList: i2, complete: t3, nextSequence: s3, invisibleSequenceList: r3 }); - return n2.storeHoppingMessageList(e3.messageList), ht(e3); - }).catch((e3) => (u2.setError(e3).setMessage(`groupID:${t2} sequence:${h2} count:` + s2).end(), ct.w(l2 + " failed. error:", e3), Kt(e3))); - })); - } - _computeReqSeqHopping(e2) { - const { groupID: s2, topicID: t2, sequence: o2 } = e2; - return 0 < o2 ? Promise.resolve(o2) : Ke(t2) ? this.getGroupProfileAdvance({ groupIDList: [s2], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }).then(({ data: { successGroupList: e3 } }) => { - let t3 = 0; - return qe(e3) || (t3 = e3[0].nextMessageSeq - 1), ct.l(`${this._n}._computeReqSeqHopping groupID:${s2} lastSequence:${t3} from remote`), t3; - }).catch((e3) => Kt(e3)) : Promise.resolve(0); - } - _computeResult(e2) { - const t2 = { messageList: [], isCompleted: false, nextMessageSeq: "" }, { groupID: s2, direction: o2, sequence: r2, remoteMessageList: i2 = [], processedMessageList: n2 = [], complete: a2, nextSequence: u2, invisibleSequenceList: p2 } = e2; - if (0 === o2) - return t2.nextMessageSeq = u2, (2 === a2 || u2 < 1) && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2.messageList = n2, t2; - if (1 === o2) { - if (qe(i2)) { - if (qe(p2)) - return t2.isCompleted = true, t2.nextMessageSeq = "", t2; - t2.nextMessageSeq = p2[0] + 1; - } else { - const e3 = i2[0].sequence, s3 = p2[0] || 0; - t2.nextMessageSeq = e3 > s3 ? e3 + 1 : s3 + 1; - } - return n2.forEach((e3) => { - e3.sequence >= r2 && t2.messageList.push(e3); - }), (ot({ groupID: s2 }) || rt(s2)) && 0 === t2.messageList.length && i2[0].sequence < r2 && (t2.isCompleted = true, t2.nextMessageSeq = ""), t2; - } - } - setMessageRead({ conversationID: r2, lastMessageSeq: i2 }) { - const n2 = this._n + ".setMessageRead", e2 = `convID:${r2} lastMessageSeq:` + i2, a2 = (ct.l(n2 + " " + e2), xe(i2) || this.warn("DoNotModifyLastSeq"), new Zt("setMessageRead")); - a2.setMessage(e2); - let u2 = r2.replace(ue, ""), p2 = void 0; - return rt(u2) && (u2 = it(p2 = u2)), this.req({ P: ds, data: { groupID: u2, topicID: p2, messageReadSeq: i2 } }).then(() => { - a2.end(), ct.l(n2 + " ok"); - var e3 = this.get(o); - e3.updateIsReadAfterReadReport({ conversationID: r2, lastMessageSeq: i2 }); - let t2 = true; - if (!Ke(p2)) { - t2 = false; - const r3 = this.get(s).getLocalTopic(u2, p2); - r3 && r3.updateSelfInfo({ readedSequence: i2 }); - } - return e3.updateUnreadCount(r2, t2), ht(); - }).catch((e3) => (a2.setError(e3).end(), ct.l(n2 + " failed. error:", e3), Kt(e3))); - } - _computeLastSequence(e2) { - var { groupID: e2, topicID: t2, sequence: s2 } = e2; - return 0 < s2 ? Promise.resolve(s2) : Ke(t2) ? this.getGroupLastSequence(e2) : Promise.resolve(0); - } - getGroupLastSequence(e2) { - const t2 = this._n + ".getGroupLastSequence", s2 = new Zt("getGroupLastSequence"); - let r2 = 0, i2 = ""; - const n2 = "groupID:" + e2; - if (this.hasLocalGroup(e2)) { - const o2 = this.getLocalGroupProfile(e2), a3 = o2.lastMessage; - if (0 < a3.lastSequence && false === a3.onlineOnlyFlag) - return r2 = a3.lastSequence, i2 = n2 + `, ${r2} from group.lastMessage.lastSequence`, ct.l(t2 + " " + i2), s2.setMessage(i2).end(), Promise.resolve(r2); - if (1 < o2.nextMessageSeq) - return r2 = o2.nextMessageSeq - 1, i2 = n2 + `, ${r2} from group.nextMessageSeq`, ct.l(t2 + " " + i2), s2.setMessage(i2).end(), Promise.resolve(r2); - } - const a2 = this.get(o).getLocalConversation("GROUP" + e2); - return a2 && a2.lastMessage.lastSequence && false === a2.lastMessage.onlineOnlyFlag ? (r2 = a2.lastMessage.lastSequence, i2 = n2 + `, ${r2} from conversation.lastMessage.lastSequence`, ct.l(t2 + " " + i2), s2.setMessage(i2).end(), Promise.resolve(r2)) : this.getGroupProfileAdvance({ groupIDList: [e2], responseFilter: { groupBaseInfoFilter: ["NextMsgSeq"] } }).then(({ data: { successGroupList: e3 } }) => (qe(e3) ? ct.w(t2 + ` ${n2}, empty successGroupList`) : (r2 = e3[0].nextMessageSeq - 1, i2 = n2 + `, ${r2} from remote`, ct.l(t2 + " " + i2)), s2.setMessage(i2).end(), r2)).catch((e3) => (s2.setError(e3).setMessage(n2).end(), ct.w(t2 + " failed. error:", e3), Kt(e3))); - } - isMessageFromOrToAVChatroom(e2) { - return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e2); - } - hasJoinedAVChatRoom() { - return this._AVChatRoomHandler.hasJoinedAVChatRoom(); - } - getJoinedAVChatRoom() { - return this._AVChatRoomHandler.getJoinedAVChatRoom(); - } - getGroupRemoteLastSeq(e2) { - e2 = this.getLocalGroupProfile(e2); - return e2 ? e2.nextMessageSeq - 1 : 1; - } - isOnlineMessage(e2, t2) { - return !(!this._canIUseOnlineOnlyFlag(e2) || !t2 || true !== t2.onlineUserOnly); - } - _canIUseOnlineOnlyFlag(e2) { - var t2 = this.getJoinedAVChatRoom(); - return !t2 || !t2.includes(e2.to) || e2.conversationType !== ue; - } - _onAVChatRoomHistoryMessage(e2, t2) { - if (!qe(e2)) { - ct.l(this._n + `._onAVChatRoomHistoryMessage groupID:${t2} count:` + e2.length); - const s2 = []; - e2.forEach((e3) => { - s2.push({ ...e3, isHistoryMessage: 1 }); - }), this.onAVChatRoomMessage(s2, t2); - } - } - onAVChatRoomMessage(e2, t2 = "") { - this._AVChatRoomHandler.onMessage(e2, t2); - } - onAVChatRoomMemberBanned(e2) { - this._AVChatRoomHandler.onAVChatRoomMemberBanned(e2); - } - setUnjoinedAVChatRoom(e2) { - this._unjoinedAVChatRoomList.set(e2, 1); - } - deleteUnjoinedAVChatRoom(e2) { - this._unjoinedAVChatRoomList.has(e2) && this._unjoinedAVChatRoomList.delete(e2); - } - isUnjoinedAVChatRoom(e2) { - return this._unjoinedAVChatRoomList.has(e2); - } - isGroupAttributesUpdatedNotice(e2) { - return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e2); - } - updateLocalMainSequenceOnReconnected() { - this._groupAttributesHandler.updateLocalMainSequenceOnReconnected(); - } - initGroupAttributes(e2) { - return this._groupAttributesHandler.initGroupAttributes(e2); - } - setGroupAttributes(e2) { - return this._groupAttributesHandler.setGroupAttributes(e2); - } - deleteGroupAttributes(e2) { - return this._groupAttributesHandler.deleteGroupAttributes(e2); - } - getGroupAttributes(e2) { - return this._groupAttributesHandler.getGroupAttributes(e2); - } - isMessageFromTopic(e2, t2) { - return 2 === e2 && !qe(t2); - } - isMessageFromCommunityOfTopic(e2, t2) { - return 2 === e2 && qe(t2); - } - getMessageExtensions(e2, t2) { - return ct.l(this._n + ".getMessageExtensions startSequence:" + t2), this.req({ P: Es, data: { groupID: e2.to, messageSequence: e2.sequence, startSequence: t2 } }); - } - modifyMsgExts(e2, t2, s2 = 1) { - return ct.l(this._n + ".modifyMsgExts operateType:" + s2), this.req({ P: $s, data: { groupID: e2.to, messageSequence: e2.sequence, extensionList: t2, operateType: s2 } }); - } - _genNotifyReqList(s2) { - var o2, r2, i2, n2, a2 = []; - for (let e2 = 0, t2 = s2.length; e2 < t2; e2++) - o2 = s2[e2], n2 = this.getLocalGroupProfile(o2).type, r2 = this._getGroupLastRevokedTime(o2), i2 = 1e3 * ve(), n2 = { notifyType: 1, limit: 20, type: ot({ type: n2, groupID: o2 }) ? de : void 0, groupID: o2, beginTime: r2, endTime: i2 }, a2.push(n2); - return a2; - } - getNotice(e2) { - const t2 = this._n + ".getNotice", s2 = e2.filter((e3) => { - var t3; - return !!this.hasLocalGroup(e3) && ({ type: e3, isSupportTopic: t3 } = this.getLocalGroupProfile(e3), !st(e3)) && !t3; - }); - 0 !== s2.length && (ct.l(t2 + " list:" + s2), this.req({ P: ws, data: { notifyReqList: this._genNotifyReqList(s2) } }).then((i2) => { - const e3 = i2.data["notifyRspList"], n2 = []; - if (je(e3)) { - const i3 = { dataList: [] }; - let r2 = t2 + " ok."; - e3.forEach((e4) => { - var { nextRevokedTime: t3, groupID: s3, notifyList: o2 } = e4; - r2 += ` groupID:${s3} nextRevokedTime:${t3} count:${o2.length} -`, i3.dataList.push({ elements: { revokedInfos: this._genRevokedInfos(e4) } }), 0 !== t3 ? (this._setGroupLastRevokedTime(s3, t3), n2.push(s3)) : this._setGroupLastRevokedTime(s3, 1e3 * ve()); - }), ct.l(r2), this.onMsgRevoked(i3, false); - } - 0 < n2.length && this.getNotice(n2); - }).catch((e3) => { - ct.e(t2 + " failed. error:", e3); - })); - } - _genRevokedInfos(e2) { - const { notifyList: t2, groupID: s2 } = e2, o2 = []; - return je(t2) && t2.forEach((e3) => { - o2.push({ groupID: s2, sequence: e3.sequence, random: e3.random, revokerInfo: { ...e3.revokerInfo } }); - }), o2; - } - _getGroupLastRevokedTime(e2) { - return this.hasLocalGroup(e2) ? this.getLocalGroupProfile(e2)._lastRevokedTime : 0; - } - _setGroupLastRevokedTime(e2, t2) { - this.hasLocalGroup(e2) && (this.getLocalGroupProfile(e2)._lastRevokedTime = t2); - } - isGroupCountersNotice(e2) { - return this._groupCountersHandler.isGroupCountersNotice(e2); - } - setGroupCounters(e2) { - return this._groupCountersHandler.setGroupCounters(e2); - } - increaseGroupCounter(e2) { - return this._groupCountersHandler.increaseGroupCounter(e2); - } - decreaseGroupCounter(e2) { - return this._groupCountersHandler.decreaseGroupCounter(e2); - } - getGroupCounters(e2) { - return this._groupCountersHandler.getGroupCounters(e2); - } - getGroupMemberHandler() { - return this._groupMemberHandler; - } - getGroupMemberList(e2) { - return this._groupMemberHandler.getGroupMemberList(e2); - } - getGroupMemberProfile(e2) { - return this._groupMemberHandler.getGroupMemberProfile(e2); - } - addGroupMember(e2) { - return this._groupMemberHandler.addGroupMember(e2); - } - deleteGroupMember(e2) { - return this._groupMemberHandler.deleteGroupMember(e2); - } - setGroupMemberMuteTime(e2) { - return this._groupMemberHandler.setGroupMemberMuteTime(e2); - } - setGroupMemberRole(e2) { - return this._groupMemberHandler.setGroupMemberRole(e2); - } - setGroupMemberNameCard(e2) { - return this._groupMemberHandler.setGroupMemberNameCard(e2); - } - setGroupMemberCustomField(e2) { - return this._groupMemberHandler.setGroupMemberCustomField(e2); - } - markGroupMemberList(e2) { - return this._groupMemberHandler.markGroupMemberList(e2); - } - modifyGroupMemberInfo(e2) { - return this._groupMemberHandler.modifyGroupMemberInfo(e2); - } - restartPolling() { - this._AVChatRoomHandler.restartPolling(); - } - getPollingTimerID(e2) { - var t2; - return e2 && (t2 = this.getLocalGroupProfile(e2)) && st(t2.type) ? this._AVChatRoomHandler.getPollingTimerID(e2) : -1; - } - _canIUseJoinOption(e2) { - return e2 === he || ot({ type: e2 }); - } - _silentlyGetGroupProfile(e2, t2) { - var s2 = setTimeout(this.getGroupProfile.bind(this, { groupID: t2 }), 3e3); - this._timeoutIDs.push(s2), ct.l(this._n + `._silentlyGetGroupProfile errorCode:${e2} groupID:${t2} timeoutIDs:` + this._timeoutIDs); - } - _clearTimeoutIDs() { - this._timeoutIDs.forEach((e2) => { - clearTimeout(e2); - }), this._timeoutIDs = []; - } - startMessageLongPolling(e2) { - var { groupID: e2, longPollingKey: t2, longPollingSequence: s2 = 1 } = e2, o2 = this.get(r).isUnlimitedAVChatRoom(), i2 = (this._AVChatRoomHandler.hasPollingInstance(e2) && this.stopMessageLongPolling({ groupID: e2 }), this._AVChatRoomHandler.getJoinedLiveList()), o2 = (!o2 && 0 < i2.length && this.stopMessageLongPolling({ groupID: i2[0] }), new $o({ groupID: e2, type: fe })); - return ct.l(this._n + `.startMessageLongPolling groupID:${e2} longPollingKey:${t2} longPollingSequence:` + s2), this._AVChatRoomHandler.startRunLoop({ group: o2, longPollingKey: t2, startSeq: s2 }); - } - stopMessageLongPolling(e2) { - var e2 = e2["groupID"], t2 = this.get(o); - return this._AVChatRoomHandler.reset(e2), this._deleteLocalGroup(e2), t2.deleteLocalConv("" + ue + e2), ct.l(this._n + ".stopMessageLongPolling ok, groupID:" + e2), jt({ groupID: e2 }); - } - reset() { - this.groupMap.clear(), this._unjoinedAVChatRoomList.clear(), this._receiptDetailCompleteMap.clear(), this._onlineMemberCountMap.clear(), this._commonGroupHandler.reset(), this._groupSystemNoticeHandler.reset(), this._groupTipsHandler.reset(), this._groupAttributesHandler.reset(), this._groupCountersHandler.reset(), this._AVChatRoomHandler.reset(), this._groupMemberHandler.reset(), this._clearTimeoutIDs(); - } -}; -export { - Ko as default -}; -//# sourceMappingURL=@tencentcloud_chat_modules_group-module__js.js.map diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat_modules_group-module__js.js.map b/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat_modules_group-module__js.js.map deleted file mode 100644 index 1c60a267..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/@tencentcloud_chat_modules_group-module__js.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../../node_modules/@tencentcloud/chat/modules/group-module.js"], - "sourcesContent": ["\"use strict\";const e=2,t=4,s=10,o=11,r=12,i=14,n=17,a=20,u=23,p=26,l=27,c=29,h=30,g=34;class m{constructor(e=0,t=0){this.high=e,this.low=t}equal(e){return null!==e&&this.low===e.low&&this.high===e.high}toString(){var e=Number(this.high).toString(16);let t=Number(this.low).toString(16);if(t.length<8){let e=8-t.length;for(;e;)t=\"0\"+t,e--}return e+t}}const d={TEST:{CHINA:{DEFAULT:\"wss://wss-dev.tim.qq.com\"},OVERSEA:{DEFAULT:\"wss://wss-dev.tim.qq.com\"},SINGAPORE:{DEFAULT:\"wss://wsssgp-dev.im.qcloud.com\"},KOREA:{DEFAULT:\"wss://wsskr-dev.im.qcloud.com\"},GERMANY:{DEFAULT:\"wss://wssger-dev.im.qcloud.com\"},IND:{DEFAULT:\"wss://wssind-dev.im.qcloud.com\"},JPN:{DEFAULT:\"wss://wssjpn-dev.im.qcloud.com\"},USA:{DEFAULT:\"wss://wssusa-dev.im.qcloud.com\"},INDONESIA:{DEFAULT:\"wss://wssidn-dev.im.qcloud.com\"}},PRODUCTION:{CHINA:{DEFAULT0:\"wss://*w4c.my-imcloud.com\",DEFAULT:\"wss://wss.im.qcloud.com\",BACKUP:\"wss://wss.tim.qq.com\",STAT:\"https://events.im.qcloud.com\",ANYCAST:\"wss://162.14.13.203\"},OVERSEA:{DEFAULT0:\"wss://*w4c.my-imcloud.com\",DEFAULT:\"wss://wss.im.qcloud.com\",BACKUP:\"wss://wss.my-imcloud.com\",STAT:\"https://api.my-imcloud.com\"},SINGAPORE:{DEFAULT0:\"wss://*w4s.my-imcloud.com\",DEFAULT:\"wss://wsssgp.im.qcloud.com\",BACKUP:\"wss://wsssgp.my-imcloud.com\",STAT:\"https://apisgp.my-imcloud.com\",ANYCAST:\"wss://162.14.19.159\"},KOREA:{DEFAULT0:\"wss://*w4k.my-imcloud.com\",DEFAULT:\"wss://wsskr.im.qcloud.com\",BACKUP:\"wss://wsskr.my-imcloud.com\",STAT:\"https://apikr.my-imcloud.com\",ANYCAST:\"wss://162.14.13.104\"},GERMANY:{DEFAULT0:\"wss://*w4g.my-imcloud.com\",DEFAULT:\"wss://wssger.im.qcloud.com\",BACKUP:\"wss://wssger.my-imcloud.com\",STAT:\"https://apiger.my-imcloud.com\",ANYCAST:\"wss://162.14.3.17\"},IND:{DEFAULT0:\"wss://*w4i.my-imcloud.com\",DEFAULT:\"wss://wssind.my-imcloud.com\",BACKUP:\"wss://wssind.im.qcloud.com\",STAT:\"https://apiind.my-imcloud.com\",ANYCAST:\"wss://162.14.18.188\"},JPN:{DEFAULT0:\"wss://*w4j.my-imcloud.com\",DEFAULT:\"wss://wssjpn.im.qcloud.com\",BACKUP:\"wss://wssjpn.my-imcloud.com\",STAT:\"https://apijpn.my-imcloud.com\"},USA:{DEFAULT0:\"wss://*w4u.my-imcloud.com\",DEFAULT:\"wss://wssusa.im.qcloud.com\",BACKUP:\"wss://wssusa.my-imcloud.com\",STAT:\"https://apiusa.my-imcloud.com\",ANYCAST:\"wss://162.14.10.42\"},INDONESIA:{DEFAULT0:\"wss://*w4y.my-imcloud.com\",DEFAULT:\"wss://wssidn.im.qcloud.com\",BACKUP:\"wss://wssidn.my-imcloud.com\",STAT:\"https://apiidn.my-imcloud.com\",ANYCAST:\"wss://43.129.34.169\"}}},_={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15,DONUT_NATIVE_APP:19,NS_NATIVE_APP:20,RN_NATIVE_APP:21},f=\"CHINA\",M={HOST:{CURRENT:{DEFAULT:\"wss://wss.im.qcloud.com\",STAT:\"https://events.im.qcloud.com\"},setCurrent(e=f){this.CURRENT=d.PRODUCTION[e]}},NAME:{OPEN_IM:\"openim\",OPEN_IM_MSG_EXT:\"openim_msg_ext_http_svc\",GRP:\"group_open_http_svc\",GRP_AV:\"group_open_avchatroom_http_svc\",GRP_COMMUNITY:\"million_group_open_http_svc\",GRP_ATTR:\"group_open_attr_http_svc\",FD:\"sns\",PROFILE:\"profile\",RECENT_CONTACT:\"recentcontact\",PIC:\"openpic\",BIG_GRP_NO_AUTH:\"group_open_http_noauth_svc\",BIG_GRP_POLLING:\"group_open_long_polling_http_svc\",BIG_GRP_POLLING_NO_AUTH:\"group_open_long_polling_http_noauth_svc\",IM_OPEN_STAT:\"imopenstat\",WEB_IM:\"webim\",IM_COS_SIGN:\"im_cos_sign_svr\",CUSTOM_UPLOAD:\"im_cos_msg\",HEARTBEAT:\"heartbeat\",IM_OPEN_PUSH:\"im_open_push\",IM_OPEN_STATUS:\"im_open_status\",IM_LONG_MSG:\"im_long_msg\",IM_CONFIG_MANAGER:\"im_sdk_config_mgr\",STAT_SERVICE:\"StatSvc\",OVERLOAD_PUSH:\"OverLoadPush\",IM_MSG_AUDIT_MGR:\"im_msg_audit_mgr\",TUIROOM_SVR:\"tui_room_svr\",IM_OPEN_TRANSLATE:\"im_open_translate\",IM_OPEN_SPEECH:\"im_open_speech\",MSG_SEARCH:\"message_search\",FOLLOW:\"follow\",OFFLINE_PUSH_REPORT:\"offline_push_report\",IM_MSG_LOGIC:\"im_msg_db_logic\"}},I={SEARCH_GRP_SNS:new m(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new m(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new m(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new m(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new m(0,Math.pow(2,6)).toString(),USER_STATUS:new m(0,Math.pow(2,7)).toString(),CONV_MARK:new m(0,Math.pow(2,9)).toString(),CONV_GROUP:new m(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new m(0,Math.pow(2,11)).toString(),MSG_EXT:new m(0,Math.pow(2,13)).toString(),GRP_COUNTER:new m(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new m(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new m(Math.pow(2,7)).toString(),PLUGIN_CS:new m(Math.pow(2,8)).toString(),PLUGIN_PUSH:new m(Math.pow(2,9)).toString(),PLUGIN_BOT:new m(Math.pow(2,10)).toString(),MSG_REACTION:new m(Math.pow(2,16)).toString(),FOLLOW:new m(Math.pow(2,20)).toString()},y=\"group_profile\",D=\"group_member_profile\",L=[\"Type\",\"Name\",\"Introduction\",\"Notification\",\"FaceUrl\",\"Owner_Account\",\"CreateTime\",\"InfoSeq\",\"LastInfoTime\",\"LastMsgTime\",\"MemberNum\",\"MaxMemberNum\",\"ApplyJoinOption\",\"NextMsgSeq\",\"ShutUpAllMember\",\"InviteJoinOption\"],C=[\"Role\",\"JoinTime\",\"MsgSeq\",\"MsgFlag\"],G=(M.HOST.setCurrent(f),\"undefined\"!=typeof wx&&\"function\"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting)),b=(G&&wx.createGamePortal,\"undefined\"!=typeof qq&&\"function\"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting)),A=\"undefined\"!=typeof tt&&\"function\"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),T=\"undefined\"!=typeof swan&&\"function\"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),S=\"undefined\"!=typeof my&&\"function\"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),v=\"undefined\"!=typeof jd&&\"function\"==typeof jd.getSystemInfoSync,P=\"undefined\"!=typeof uni&&\"undefined\"==typeof window&&\"function\"==typeof uni.requireNativePlugin,R=G&&\"object\"==typeof wx.miniapp,$=G||b||A||T||S||P||v,E=\"undefined\"==typeof window&&!$&&\"undefined\"!=typeof global&&void 0!==global.NativeScriptGlobals,w=\"undefined\"!=typeof global&&(void 0!==global.nativeModuleProxy||void 0!==global.ReactNative),U=\"undefined\"!=typeof uni?!$:\"undefined\"!=typeof window&&!$&&!w,N=(b?qq:A?tt:T?swan:S?my:G?wx:P?uni:v&&jd,U&&window&&window.navigator&&window.navigator.userAgent||\"\"),q=/(micromessenger|webbrowser)/i.test(N),k=function(){let e=\"WEB\";return q?e=\"WEB\":b?e=\"QQ_MP\":A?e=\"TT_MP\":T?e=\"BAIDU_MP\":S?e=\"ALI_MP\":G?e=R?\"DONUT_NATIVE_APP\":\"WX_MP\":P?e=\"UNI_NATIVE_APP\":E?e=\"NS_NATIVE_APP\":w&&(e=\"RN_NATIVE_APP\"),_[e]}(),O=(!function(){var e=N.match(/OS (\\d+)_/i);e&&e[1]&&e[1]}(),function(){var e,t,s=N.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);s&&(e=s[1]&&parseFloat(s[1]),t=s[2]&&parseFloat(s[2]),e)&&t&&parseFloat(s[1]+\".\"+s[2])}(),/MSIE/.test(N)||-1{var s=o.find(e=>e.key===t);s?s.value!==e&&(s.value=e,r=!0):(o.push({key:t,value:e}),r=!0)}),r}function Ze(e){return qe(e)?[]:e.filter(e=>!0===e.isModified)}function et(e){return qe(e)?[]:e.filter(e=>!1===e.isModified)}const st=e=>e===me,ot=({type:e,groupID:t})=>e===de||(\"\"+t).startsWith(we)&&!(\"\"+t).includes(Ue),rt=e=>(\"\"+e).startsWith(we)&&(\"\"+e).includes(Ue);function it(e){return e.split(Ue)[0]}function nt(){return!O&&!$}function at(e,t=!0,s=!0){var o=Date.now();return t?s?o-e+\" ms\":Math.round((o-e)/1e3)+\" s\":s?o-e:Math.round((o-e)/1e3)}let ut=0;function pt(){return nt()?\"%c Chat %c\":\"Chat\"}function lt(){(e=new Date).setTime(ve());var e;return e.toLocaleTimeString(\"en-US\",{hour12:!1})+\".\"+function(e){let t;switch(e.toString().length){case 1:t=\"00\"+e;break;case 2:t=\"0\"+e;break;default:t=e}return t}(e.getMilliseconds())}const ct={arguments2String(s){let o=\"\";if(1===s.length)o=s[0];else for(let e=0,t=s.length;e{this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)},0)}}setError(t){if(t instanceof Error){if(!this._sentFlag){let e=!0;if(e=this._netMonitorModule?this._netMonitorModule.isOnline():e)t.code&&this.setCode(t.code),t.message&&this.setMoreMessage(t.message);else{const t=Rt;this.setCode(t)}this.setLevel(\"error\")}}else ct.w(this._n+\".setError value not instanceof Error, please check!\");return this}setCode(e){return Ke(e)||this._sentFlag||(\"ECONNABORTED\"===e&&(this.code=103),xe(e)?this.code=e:ct.w(this._n+\".setCode value not a number, please check!\",e,typeof e)),this}setMessage(e){return Ke(e)||this._sentFlag||(xe(e)&&(this.message=e.toString()),Ve(e)&&(this.message=e)),this}setCostTime(e){return this.costTime=e,this}setLevel(e){return Ke(e)||this._sentFlag||(this.level=Xt[e]),this}setMoreMessage(e){return qe(this.moreMessage)?this.moreMessage=\"\"+e:this.moreMessage+=\" \"+e,this}setNetworkType(e){return Ke(e)?ct.w(this._n+\".setNetworkType value is undefined, please check!\"):(e=Yt[e.toLowerCase()],Ke(e)||(this.networkType=e)),this}getStartTs(){return this._startts}setUIPlatform(e){return this.uiPlatform=e,this}setExtension(e){return this.extension=e,this}setEventType(e){return this.eventType=e,this}}const es=\"send_group_msg\",ts=\"get_joined_group_list\",ss=\"get_group_self_member_info\",os=\"create_group\",rs=\"destroy_group\",is=\"modify_group_base_info\",ns=\"apply_join_group\",as=\"apply_join_group_noauth\",us=\"quit_group\",ps=\"get_group_public_info\",ls=\"change_group_owner\",cs=\"handle_apply_join_group\",hs=\"handle_invite_join_permission_group\",gs=\"handle_invite_join_group\",ms=\"group_msg_recall\",ds=\"msg_read_report\",_s=\"group_msg_get\",fs=\"get_group_msg_receipt\",Ms=\"group_msg_receipt\",Is=\"get_group_msg_receipt_detail\",ys=\"get_pendency\",Ds=\"deletemsg\",Ls=\"get_msg\",Cs=\"get_msg_noauth\",Gs=\"get_online_member_num\",bs=\"delete_group_ramble_msg_by_seq\",As=\"modify_group_msg\",Ts=\"set_group_attr\",Ss=\"modify_group_attr\",vs=\"delete_group_attr\",Ps=\"clear_group_attr\",Rs=\"get_group_attr\",$s=\"group_set_key_values\",Es=\"group_get_key_values\",ws=\"batch_get_group_notify\",Us=\"update_group_counter\",Ns=\"get_group_counter\",qs=\"get_group_member_info\",ks=\"get_members\",Os=\"get_specified_group_member_info\",Fs=\"add_group_member\",xs=\"delete_group_member\",Vs=\"ban_group_member\",Hs=\"modify_group_member_info\",js=\"modify_user_info\",Ks=\"unSend\",Bs=\"success\",Js=\"notStart\",Ws=\"resolved\",zs=\"rejected\";class Xs{constructor(e){this.type=B,this.content={text:e.text||\"\"}}setText(e){this.content.text=e}sendable(){return 0!==this.content.text.length}}function Ys(t,s,o,r=[]){if(t){let e=t;return s&&(t.startsWith(\"http://\")?e=t.replace(/^http:\\/\\/[^/]+/,s):t.startsWith(\"https://\")&&(e=t.replace(/^https:\\/\\/[^/]+/,s))),e=o&&-1===e.indexOf(\"authKey=\")&&eo(e,r)?-1{Qs(e.messageBody[0].type,e.messageBody)})}return t}function Zs(e){if(!e)return e;if(-1===e.indexOf(\"authKey=\"))return e;var e=e.split(\"?\"),t=e[1].split(\"&\");let s=0;for(let e=0;e{switch(e){case\"remarkInfo\":break;case\"groupProfile\":this.content.groupProfile={},this._initGroupProfile(t[e]);break;case\"operatorInfo\":this.content.operatorInfo={},this._initOperatorInfo(t[e]);break;case\"memberInfoList\":case\"msgMemberInfo\":this._updateMemberList(t[e]);break;case\"memberExtraInfo\":case\"onlineMemberInfo\":break;case\"memberNum\":this.content[e]=t[e],this.content.memberCount=t[e];break;case\"newGroupProfile\":this.content.newGroupProfile={},this._initNewGroupProfile(t[e]);break;default:this.content[e]=t[e]}}),this.content.userIDList||(this.content.userIDList=[this.content.operatorID])}_initGroupProfile(t){var s=Object.keys(t);for(let e=0;e{e.forEach(e=>{t.userID===e.userID&&Object.assign(t,e)})})}_initNewGroupProfile(t){var s=Object.keys(t);for(let e=0;e{switch(e){case\"memberInfoList\":break;case\"remarkInfo\":this.content.handleMessage=t[e];break;case\"groupProfile\":this.content.groupProfile={},this._initGroupProfile(t[e]);break;default:this.content[e]=t[e]}})}_initGroupProfile(t){var s=Object.keys(t);for(let e=0;e{!e.imageUrl&&e.url&&(e.imageUrl=e.url,e.sizeType=e.type,1===e.type?e.type=0:3===e.type&&(e.type=1))}):e===Y?!t.remoteVideoUrl&&t.videoUrl&&(t.remoteVideoUrl=t.videoUrl):e===W?!t.remoteAudioUrl&&t.url&&(t.remoteAudioUrl=t.url):e===z&&!t.fileUrl&&t.url&&(t.fileUrl=t.url,t.url=void 0)}_updateRichMediaDownloadUrl(e,t,s,o,r){(s||o)&&(e===J?t.imageInfoArray.forEach(e=>{e.url=Ys(e.url,s,o,r)}):e===Y?(t.videoUrl=Ys(t.videoUrl,s,o,r),t.snapshotUrl=Ys(t.thumbUrl,s,o,r),t.snapshotHeight=t.thumbHeight,t.snapshotWidth=t.thumbWidth):e===W?t.url=Ys(t.url,s,o,r):e===z&&(t.fileUrl=Ys(t.fileUrl,s,o,r)))}}var go=class{constructor(e,t,s,o){if(this.type=se,this.content={downloadKey:\"\",pbDownloadKey:\"\",messageList:[],title:\"\",abstractList:[],compatibleText:\"\",version:0,layersOverLimit:!1},e.downloadKey){const{downloadKey:t,pbDownloadKey:s,title:o,abstractList:r,compatibleText:i,version:n}=e;this.content.downloadKey=t,this.content.pbDownloadKey=s,this.content.title=o,this.content.abstractList=r,this.content.compatibleText=i,this.content.version=n||0}else if(qe(e.messageList))1===e.layersOverLimit&&(this.content.layersOverLimit=!0);else{const{messageList:a,title:u,abstractList:p,compatibleText:l,version:h}=e,c=[];a.forEach(e=>{qe(e)||(e=new ho(e,t,s,o),c.push(e))}),this.content.messageList=c,this.content.title=u,this.content.abstractList=p,this.content.compatibleText=l,this.content.version=h||0}}sendable(){return!qe(this.content.messageList)||!qe(this.content.downloadKey)}};const mo={1:oe,2:re,3:ie,4:ne};class _o{constructor(e){this.ID=\"\",this.conversationID=e.conversationID||null,this.conversationType=e.conversationType||ae,this.conversationSubType=e.conversationSubType,this.time=e.time||Math.ceil(Date.now()/1e3),this.sequence=e.sequence||0,this.clientSequence=e.clientSequence||e.sequence||0,this.random=e.random||0===e.random?e.random:ze(),this.priority=this._computePriority(e.priority),this.nick=e.nick||\"\",this.avatar=e.avatar||\"\",this.isPeerRead=!1,this.nameCard=\"\",this.hasRiskContent=function(e){let t=e&&1{e!==Se?(this._groupAtInfoList.push({groupAtAllFlag:0,groupAtUserID:e}),this.atUserList.push(e)):(this._groupAtInfoList.push({groupAtAllFlag:1}),this.atUserList.push(Se))}),je(e.groupAtInfo)&&e.groupAtInfo.forEach(e=>{0===e.groupAtAllFlag?this.atUserList.push(e.groupAtUserID):1===e.groupAtAllFlag&&this.atUserList.push(Se)})}getGroupAtInfoList(){return this._groupAtInfoList}_initProxy(){this._elements[0]&&(this.payload=this._elements[0].content,this.type=this._elements[0].type)}reInitialize(e){e&&(this.status=this.from?Bs:Ks,!this.from)&&(this.from=e),this._initFlow(e),this._initSequence(e),this._concatConversationID(e),this.generateMessageID()}isSendable(){return 0!==this._elements.length&&(!0===this._relayFlag||\"function\"==typeof this._elements[0].sendable&&this._elements[0].sendable())}_initTo(e){this.conversationType===ue&&(this.to=e.groupID)}_initSequence(e){0===this.clientSequence&&e&&(this.clientSequence=function(o){if(!o)return!1;if(void 0===Xe[o]){var r=new Date;let e=(\"3\"+r.getHours()).slice(-2),t=(\"0\"+r.getMinutes()).slice(-2),s=(\"0\"+r.getSeconds()).slice(-2);Xe[o]=parseInt([e,t,s,\"0001\"].join(\"\")),e=null,t=null,s=null,ct.l(\"autoIncrementIndex start index:\"+Xe[o])}return Xe[o]++}(e)),0===this.sequence&&this.conversationType===ae&&(this.sequence=this.clientSequence)}generateMessageID(){this.from===le&&(this.senderTinyID=\"144115198244471703\"),this.ID=`${this.senderTinyID}-${this.clientTime}-`+this.random}_initFlow(e){\"\"!==e&&(e===this.from?(this.flow=\"out\",this.isRead=!0):this.flow=\"in\")}_concatConversationID(e){var t=this[\"to\"],s=this.conversationType;s!==le?(e=s===ae?e===this.from?t:this.from:this.to,this.conversationID=e?\"\"+s+e:null):this.conversationID=le}isElement(e){return e instanceof Xs||e instanceof to||e instanceof so||e instanceof oo||e instanceof uo||e instanceof lo||e instanceof io||e instanceof ao||e instanceof po||e instanceof co||e instanceof go}setElement(t,s,o,r){if(this.isElement(t))this._elements=[t];else{var i=e=>{if(e.type&&e.content)switch(e.type){case B:this.setTextElement(e.content);break;case J:this.setImageElement(e.content,s,o,r);break;case W:this.setAudioElement(e.content,s,o,r);break;case z:this.setFileElement(e.content,s,o,r);break;case Y:this.setVideoElement(e.content,s,o,r);break;case te:this.setCustomElement(e.content);break;case Q:this.setLocationElement(e.content);break;case Z:this.setGroupTipElement(e.content);break;case ee:this.setGroupSystemNoticeElement(e.content);break;case X:this.setFaceElement(e.content);break;case se:this.setMergerElement(e.content,s,o,r)}};if(je(t))for(let e=0;e{e.reason=t})}var{nick:s,avatar:o}=t,s=(Ve(s)&&(this.nick=s),Ve(o)&&(this.avatar=o),new io(e));this._elements.push(s)}setGroupSystemNoticeElement(e){e=new ao(e);this._elements.push(e)}setFaceElement(e){e=new so(e);this._elements.push(e)}setMergerElement(e,t,s,o){e=new go(e,t,s,o);this._elements.push(e)}setIsRead(e){this.isRead=e}setRelayFlag(e){this._relayFlag=e}_computePriority(e){if(!Ke(e)){if(Ve(e)&&-1!==Object.values(mo).indexOf(e))return e;if(xe(e)){e=\"\"+e;if(-1!==Object.keys(mo).indexOf(e))return mo[e]}}return re}setNickAndAvatar(e){var{nick:e,avatar:t}=e;Ve(e)&&(this.nick=e),Ve(t)&&(this.avatar=t)}setNameCard(e){Ve(e)&&(this.nameCard=e)}initC2CReadReceiptInfo(e){var{readReceiptSentByPeer:e,timestamp:t=0}=e;this.conversationType===ae&&!0===this.needReadReceipt&&(this.readReceiptInfo.isPeerRead=1===e,this.readReceiptInfo.timestamp=t)}}class fo{constructor(e){this._grpM=e,this._n=\"GroupTipsHandler\",this._cachedGroupTipsMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4}onCheckTimer(e){e%1==0&&0{var s=this._checkCountMap.get(t),o=this._grpM.hasLocalGroup(t);ct.l(this._n+`._check groupID:${t} hasLocalGroup:${o} checkCount:`+s),o?(this._notifyCachedGroupTips(t),this._checkCountMap.delete(t),this._grpM.deleteUnjoinedAVChatRoom(t)):s>=this.MAX_CHECK_COUNT?(this._deleteCachedGroupTips(t),this._checkCountMap.delete(t)):this._checkCountMap.set(t,++s)})}onNewGroupTips(e){ct.l(this._n+\".onNewGroupTips options:\"+JSON.stringify(e.dataList));var{eventDataList:e,result:t,AVChatRoomMessageList:s}=this._assembly(e);0{switch(e.payload.operationType){case 1:this._onNewMemberComeIn(e);break;case 2:this._onMemberQuit(e);break;case 3:this._onMemberKickedOut(e);break;case 4:this._onMemberSetAdmin(e);break;case 5:this._onMemberCancelledAdmin(e);break;case 6:this._onGroupProfileModified(e);break;case 7:this._onMemberInfoModified(e);break;case 8:this._onTopicProfileUpdated(e);break;default:ct.w(this._n+\"._handleTips unknown operationType:\"+e.payload.operationType)}})}_onNewMemberComeIn(e){var{memberNum:e,groupProfile:{groupID:t}}=e.payload,t=this._grpM.getLocalGroupProfile(t);t&&xe(e)&&t.memberCount!==e&&(t.memberCount=e,this._updateConvGroupProfile(t))}_onMemberQuit(e){var{memberNum:t,groupProfile:{groupID:s}}=e.payload,o=this._grpM.getLocalGroupProfile(s);o&&xe(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(s,e.payload.userIDList)}_onMemberKickedOut(e){var{memberNum:t,groupProfile:{groupID:s}}=e.payload,o=this._grpM.getLocalGroupProfile(s);o&&xe(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(s,e.payload.userIDList)}_updateConvGroupProfile(e){this._grpM.get(o).updateConvGroupProfile([e])}_onMemberSetAdmin(e){const t=e.payload.groupProfile.groupID,s=e.payload.userIDList,o=this._grpM.getGroupMemberHandler();s.forEach(e=>{e=o.getLocalGroupMemberInfo(t,e);e&&e.updateRole(Ie)})}_onMemberCancelledAdmin(e){const t=e.payload.groupProfile.groupID,s=e.payload.userIDList,o=this._grpM.getGroupMemberHandler();s.forEach(e=>{e=o.getLocalGroupMemberInfo(t,e);e&&e.updateRole(ye)})}_onGroupProfileModified(e){const{newGroupProfile:t,groupProfile:s,operatorInfo:o}=e.payload,r=s[\"groupID\"],i=this._grpM.getLocalGroupProfile(r);Object.keys(t).forEach(e=>{switch(e){case\"ownerID\":this._ownerChanged(i,t);break;case\"groupName\":i.name=t[e];break;default:i[e]=t[e]}}),Ke(o)||Object.keys(o).forEach(e=>{\"nameCard\"===e?i.updateSelfInfo({nameCard:o[e]}):\"role\"===e&&i.updateSelfInfo({role:o[e]})});e=!i.isSupportTopic;this._grpM.emitGroupListUpdate(!0,e)}_ownerChanged({groupID:e},t){var s=this._grpM.getLocalGroupProfile(e),o=this._grpM.getMyUserID();if(o===t.ownerID){s.updateGroup({selfInfo:{role:Me}});const t=this._grpM.getGroupMemberHandler(),r=t.getLocalGroupMemberInfo(e,o),i=this._grpM.getLocalGroupProfile(e).ownerID,n=t.getLocalGroupMemberInfo(e,i);r&&r.updateRole(Me),n&&n.updateRole(ye)}}_onMemberInfoModified(e){const{to:t,payload:{groupProfile:s,memberList:o}}=e,r=s.groupID,i=(rt(t)&&this._updateTopicMuteTime(e),this._grpM.getGroupMemberHandler());o.forEach(e=>{var t=i.getLocalGroupMemberInfo(r,e.userID);t&&xe(e.muteTime)&&t.updateMuteUntil(e.muteTime)})}_updateTopicMuteTime(e){var{to:e,payload:{groupProfile:o,memberList:r=[]}}=e,o=o[\"groupID\"],i=this._grpM.get(s).getLocalTopic(o,e);if(i){let t=!1;for(let e=0;e{this.onNewGroupTips(e)}),this._deleteCachedGroupTips(e)}_cacheAndCompare(e){var{groupID:e,event:t,item:s,groupType:o}=e,t=(ct.l(this._n+`._cacheAndCompare groupID:${e} groupType:`+o),this._cacheGroupTips(e,{event:t,dataList:[s]}),{groupID:e,type:o});o===me?this._grpM.hasLocalGroup(e)?this._notifyCachedGroupTips(e,o):this._grpM.setUnjoinedAVChatRoom(e):(this._grpM.updateGroupMap([t]),this._notifyCachedGroupTips(e,o)),this._checkCountMap.has(e)||this._checkCountMap.set(e,0)}reset(){this._cachedGroupTipsMap.clear(),this._checkCountMap.clear()}}class Mo{constructor(e){this._grpM=e,this._n=\"CommonGroupHandler\",this.tempConversationList=null,this._cachedGroupMessageMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4,this.PAGING_GRP_COUNT_LIMIT=200,this._pagingStatus=Js,this._pagingGetCostList=[],e.getIEmitInst().on(Bt.A2KEY_AND_TINYID_UPDATED,this.syncGroupList,this)}onCheckTimer(e){e%1==0&&0{var s=this._checkCountMap.get(t),o=this._grpM.hasLocalGroup(t);ct.l(this._n+`._check groupID:${t} hasLocalGroup:${o} checkCount:`+s),o?(this._notifyCachedGroupMessage(t),this._checkCountMap.delete(t),this._grpM.deleteUnjoinedAVChatRoom(t)):s>=this.MAX_CHECK_COUNT?(this._deleteCachedGroupMessage(t),this._checkCountMap.delete(t)):this._checkCountMap.set(t,++s)})}updateLastMsg(i){var e=this._n+\".updateLastMsg\";if(0===this._grpM.getGroupMap().size)this.tempConversationList=i;else{let t,s,o,r=!1;var n,a,u=i.length;for(let e=0;ee.sequence-t.sequence);var M=this._grpM.get(o),I=this._grpM.get(t);for(let r=0;r{const t=e.elements[\"revokedInfos\"],{revokerInfo:n,groupProfile:a}=e;let u=!1;a&&(u=ot({groupID:a.groupID})||!qe(a.topicID)),Ke(t)||t.forEach(e=>{var t=qe(e.topicID)?\"GROUP\"+e.groupID:\"GROUP\"+e.topicID,s=p.getLocalConversation(t),o=e.revokerInfo&&e.revokerInfo.revoker||n&&n.revoker,r=n&&n.reason||\"\";let i;if(s&&st(s.type))i={conversationID:t,sequence:e.sequence,ID:`${e.tinyID}-${e.clientTime}-`+e.random};else{const n=p.revoke(t,e.sequence,e.random);n?i=n:(i={conversationID:t,sequence:e.sequence},e.tinyID&&e.clientTime&&e.random&&(i.ID=`${e.tinyID}-${e.clientTime}-`+e.random),e.time&&(i.time=e.time))}i&&(i.revoker=o,i.revokeReason=r,i.revokerInfo={userID:o,nick:\"\",avatar:\"\"},(u?(i.revokerInfo.nick=a.nick,i.revokerInfo.avatar=a.avatar,l):h).push(i))})}),0===h.length&&0===l.length||(p.onMessageRevoked([...l,...h],t),0{this._grpM.emitOEvt(qt,e)}))}_groupListTreeShaking(s){const o=new Map([...this._grpM.getGroupMap()]);for(let e=0,t=s.length;e{o.delete(e)}),this._grpM.getGroupMap().forEach((e,t)=>{e.isSupportTopic&&o.delete(t)});var r=[...o.keys()];for(let e=0,t=r.length;e{var e=function(e){if(je(e)&&0!==e.length){let t=0;return e.forEach(e=>{t+=e}),(t/e.length).toFixed(0)}}(this._pagingGetCostList),t=function(e){if(je(e)&&0!==e.length){let t=0;return e.forEach(e=>{t+=e}),t.toFixed(0)}}(this._pagingGetCostList),t=(this._pagingGetCostList.length=0,this._pagingStatus=Ws,this._groupListTreeShaking(o),this._grpM.updateGroupMap(o),`count:${this._grpM.getLocalGroupList().length} sum:${t} avg:`+e);return ct.l(r+\" ok. \"+t),i.setMessage(t).end(),this.tempConversationList&&(this.updateLastMsg(this.tempConversationList),this.tempConversationList=null),this._grpM.emitGroupListUpdate(!0,!0),ht({groupList:this._grpM.getLocalGroupList()})}).catch(e=>(this._pagingStatus=zs,i.setError(e).end(),ct.e(r+\" failed. error:\",e),Kt(e)))}getGroupList(){const t=this._n+\".getGroupList\";var e;return ct.l(t+\" pagingStatus:\"+this._pagingStatus),this._pagingStatus===zs||this._pagingStatus===Js?this.syncGroupList().then(()=>{var e=this._grpM.getLocalGroupList();return ht({groupList:e,isSyncCompleted:this.isPagingGetCompleted()})}).catch(e=>(ct.e(t+\" failed. error:\",e),Kt(e))):(e=this._grpM.getLocalGroupList(),ct.l(t+\". returned group count:\"+e.length),jt({groupList:e,isSyncCompleted:this.isPagingGetCompleted()}))}isPagingGetCompleted(){return this._pagingStatus===Ws}_pagingGetGroupList(e){const o=this._n+\"._pagingGetGroupList\";let{isCommunityRelay:r=!1,limit:i,offset:n,groupBaseInfoFilter:a,groupList:u}=e;const p=Date.now();return this._grpM.req({P:ts,data:{type:r?de:void 0,memberAccount:this._grpM.getMyUserID(),limit:i,offset:n,responseFilter:{groupBaseInfoFilter:a,selfInfoFilter:[\"Role\",\"JoinTime\",\"MsgFlag\",\"MsgSeq\"]}}}).then(e=>{var{groups:e=[],totalCount:t}=e.data,e=(u.push(...e),this._handleGroupAtInfoWithoutTopic(r,e),n+i),s=!(e10018===e.code?(ct.w(this.logPrefix+\" response size exceeds the limit, request count:\"+i),i=50,this._pagingGetGroupList({limit:i,offset:n,groupBaseInfoFilter:a,groupList:u,isCommunityRelay:r})):r?(11e3===e.code&&ct.l(o+\" ok. community unavailable\"),jt({groupList:u})):Kt(e))}_pagingGetGroupListWithTopic(e){const o=this._n+\"._pagingGetGroupListWithTopic\";let{limit:r,offset:i,groupBaseInfoFilter:n,groupList:a}=e;const u=Date.now();return this._grpM.req({P:ts,data:{type:de,memberAccount:this._grpM.getMyUserID(),limit:r,offset:i,responseFilter:{groupBaseInfoFilter:n,selfInfoFilter:[...C]},isSupportTopic:1,needAppDefineData:1}}).then(e=>{var{groups:e=[],totalCount:t}=e.data,e=(a.push(...e),i+r),s=!(e!0===e.isSupportTopic);return ht({groupList:t})}).catch(e=>10018===e.code?(ct.w(this.logPrefix+\" response size exceeds the limit, request count:\"+r),r=50,this._pagingGetGroupListWithTopic({limit:r,offset:i,groupBaseInfoFilter:n,groupList:a})):Kt(e))}_cacheGroupMessage(e,t){this._cachedGroupMessageMap.has(e)||this._cachedGroupMessageMap.set(e,[]),this._cachedGroupMessageMap.get(e).push(t)}_deleteCachedGroupMessage(e){this._cachedGroupMessageMap.has(e)&&this._cachedGroupMessageMap.delete(e)}_notifyCachedGroupMessage(e,t){var s=this._cachedGroupMessageMap.get(e)||[];ct.l(this._n+`._notifyCachedGroupMessage groupID:${e} groupType:${t} count:`+s.length),s.forEach(e=>{this.onNewMessage(e)}),this._deleteCachedGroupMessage(e)}_cacheAndCompare(e){var{groupID:e,event:t,item:s,groupType:o}=e,t=(ct.l(this._n+`._cacheAndCompare groupID:${e} groupType:`+o),this._cacheGroupMessage(e,{event:t,dataList:[s]}),{groupID:e,type:o});o===me?this._grpM.hasLocalGroup(e)?this._notifyCachedGroupMessage(e,o):this._grpM.setUnjoinedAVChatRoom(e):(this._grpM.updateGroupMap([t]),this._notifyCachedGroupMessage(e,o)),this._checkCountMap.has(e)||this._checkCountMap.set(e,0)}_handleGroupAtInfoWithoutTopic(e,t){e&&0!==t.length&&t.forEach(e=>{const{groupID:t,groupAtInfoList:s}=e,r=[];Ke(s)||(s.forEach(e=>{r.push({...e,groupID:t})}),this._grpM.get(o).onNewGroupAtTips({dataList:r}))})}setPagingGroupCount(e){Ke(e)||(this.PAGING_GRP_COUNT_LIMIT=parseInt(e,10))}reset(){this.PAGING_GRP_COUNT_LIMIT=200,this._cachedGroupMessageMap.clear(),this._checkCountMap.clear(),this._pagingStatus=Js,this._pagingGetCostList=[]}}const Io=1,yo=2,Do=3,Lo=4,Co=5;class Go{constructor(e){this._grpM=e,this._n=\"GroupAttributesHandler\",this._groupAttributesMap=new Map,this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(Bt.CLOUD_CONFIG,this._onCloudConfig,this)}_onCloudConfig(){var e=this._grpM.getCloudConfig(\"grp_attr_cache_time\");Ke(e)||(this.CACHE_EXPIRE_TIME=Number(e))}updateLocalMainSequenceOnReconnected(){this._groupAttributesMap.forEach(e=>{e.localMainSequence=0})}isGroupAttributesUpdatedNotice(e){var{to:e,elements:{newGroupProfile:t}}=e,s=!Ke(t)&&!qe(t.groupAttributeOption);return s&&this._onGroupAttributesUpdated({groupID:e,groupAttributeOption:t.groupAttributeOption}),s}_onGroupAttributesUpdated(e){const{groupID:t,groupAttributeOption:s}=e,{mainSequence:o,isWithChangedAttributeInfo:r,groupAttributeList:i=[],operationType:n}=s;if(ct.l(this._n+\".onGroupAttributesUpdated. \"+`groupID:${t} isWithChangedAttributeInfo:${r} operationType:`+n),!Ke(n)){this._groupAttributesCopy=this._getCachedAttributes({groupID:t});e=this._getLocalGroupAttributes(t)[\"localMainSequence\"],e=o-e;if(0!=e)if(1===r&&1==e)this._refreshCachedGroupAttributes({groupID:t,remoteMainSequence:o,groupAttributeList:i,operationType:n}),this._emitGroupAttributesUpdated(t);else if(this._hasLocalGroupAttributes(t)){const e=this._getLocalGroupAttributes(t)[\"avChatRoomKey\"];this._getGroupAttributes({groupID:t,avChatRoomKey:e}).then(()=>{this._emitGroupAttributesUpdated(t)})}}}initGroupAttributesCache(e){var{groupID:e,avChatRoomKey:t}=e;this._groupAttributesMap.set(e,{lastUpdateTime:0,localMainSequence:0,remoteMainSequence:0,attributes:new Map,avChatRoomKey:t}),ct.l(this._n+`.initGroupAttributesCache groupID:${e} avChatRoomKey:`+t)}initGroupAttributes(e){const{groupID:s,groupAttributes:o}=e,{remoteMainSequence:t,avChatRoomKey:r}=this._getLocalGroupAttributes(s),i=new Zt(\"initGroupAttributes\");return i.setMessage(`groupID:${s} avChatRoomKey:${r} mainSequence:`+t),this._grpM.req({P:Ts,data:{groupID:s,avChatRoomKey:r,mainSequence:t,groupAttributeList:this._transformGroupAttributes(o)}}).then(e=>{ct.l(this._n+\".initGroupAttributes ok. groupID:\"+s);var{mainSequence:e,groupAttributeList:t}=e.data,t=[...t];return t.forEach(e=>{e.value=o[e.key]}),this._groupAttributesCopy=this._getCachedAttributes({groupID:s}),this._refreshCachedGroupAttributes({groupID:s,remoteMainSequence:e,groupAttributeList:t,operationType:Io}),this._emitGroupAttributesUpdated(s),i.end(),ht({groupAttributes:o})}).catch(e=>(i.setError(e).end(),Kt(e)))}setGroupAttributes(e){const s=this._n+\".setGroupAttributes\",{groupID:o,groupAttributes:r}=e,{remoteMainSequence:t,avChatRoomKey:i,attributes:n}=this._getLocalGroupAttributes(o),a=this._transformGroupAttributes(r),u=(a.forEach(e=>{var t=e[\"key\"];e.sequence=0,n.has(t)&&(e.sequence=n.get(t).sequence)}),new Zt(\"setGroupAttributes\"));return u.setMessage(`groupID:${o} groupAttributes:`+JSON.stringify(r)),ct.l(s+`. groupID:${o} mainSequence:`+t),this._grpM.req({P:Ss,data:{groupID:o,avChatRoomKey:i,mainSequence:t,groupAttributeList:a}}).then(e=>{ct.l(s+\" ok.\");var{mainSequence:e,groupAttributeList:t}=e.data,t=[...t];return t.forEach(e=>{e.value=r[e.key]}),this._groupAttributesCopy=this._getCachedAttributes({groupID:o}),this._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:e,groupAttributeList:t,operationType:yo}),this._emitGroupAttributesUpdated(o),u.end(),ht({groupAttributes:r})}).catch(e=>(u.setError(e).end(),Kt(e)))}deleteGroupAttributes(e){const{groupID:t,keyList:s=[]}=e,{remoteMainSequence:o,avChatRoomKey:r,attributes:i}=this._getLocalGroupAttributes(t);let n=[...i.keys()],a=Ps,u=Do;const p={groupID:t,avChatRoomKey:r,mainSequence:o},l=[],h=(0{let t=0;i.has(e)&&(t=i.get(e).sequence,n.push(e)),l.push({key:e,sequence:t})}),p.groupAttributeList=l),new Zt(\"deleteGroupAttributes\"));return h.setMessage(`groupID:${t} mainSequence:${o} keyList:${s} proto:`+a),this._grpM.req({P:a,data:p}).then(e=>{ct.l(this._n+\".deleteGroupAttributes ok. groupID:\"+t);e=e.data.mainSequence;return this._groupAttributesCopy=this._getCachedAttributes({groupID:t}),this._refreshCachedGroupAttributes({groupID:t,remoteMainSequence:e,groupAttributeList:l,operationType:u}),this._emitGroupAttributesUpdated(t),h.end(),ht({keyList:n})}).catch(e=>(h.setError(e).end(),Kt(e)))}getGroupAttributes(t){const s=this._n+\".getGroupAttributes\",o=t[\"groupID\"],{avChatRoomKey:e,lastUpdateTime:r,localMainSequence:i,remoteMainSequence:n}=this._getLocalGroupAttributes(o),a=new Zt(\"getGroupAttributes\");if(a.setMessage(`groupID:${o} localMainSequence:${i} remoteMainSequence:${n} keyList:`+t.keyList),Date.now()-r>=this.CACHE_EXPIRE_TIME||i{a.setMoreMessage(\"get attributes from remote. count:\"+e.length).end(),ct.l(s+\" from remote. groupID:\"+o);e=this._getCachedAttributes(t);return ht({groupAttributes:e})}).catch(e=>(a.setError(e).end(),Kt(e)));a.setMoreMessage(\"get attributes from cache\").end(),ct.l(s+\" from cache. groupID:\"+o);var u=this._getCachedAttributes(t);return jt({groupAttributes:u})}_getGroupAttributes(o){let e=0;return Ke(o.avChatRoomKey)||(e=1),this._grpM.req({P:Rs,data:{...o,groupType:e}}).then(e=>{ct.l(this._n+\"._getGroupAttributes ok. groupID:\"+o.groupID);var{mainSequence:e,groupAttributeList:t}=e.data,s=[...t];return Ke(e)||this._refreshCachedGroupAttributes({groupID:o.groupID,remoteMainSequence:e,groupAttributeList:s,operationType:Co}),t}).catch(e=>Kt(e))}_refreshCachedGroupAttributes(e){var{groupID:t,remoteMainSequence:s,groupAttributeList:o,operationType:r}=e;if(this._hasLocalGroupAttributes(t)){const e=this._getLocalGroupAttributes(t),i=e[\"localMainSequence\"];if(r===Co||s-i==1)e.remoteMainSequence=s,e.localMainSequence=s,e.lastUpdateTime=Date.now(),this._updateCachedAttributes({groupAttributes:e,groupAttributeList:o,operationType:r});else{if(i===s)return;e.remoteMainSequence=s}this._groupAttributesMap.set(t,e);o=`operationType:${r} localMainSequence:${i} remoteMainSequence:`+s;ct.l(this._n+\"._refreshCachedGroupAttributes. \"+o)}}_getCachedAttributes(t){const{groupID:e,keyList:s=[]}=t,o={};if(this._hasLocalGroupAttributes(e)){const t=this._getLocalGroupAttributes(e)[\"attributes\"];if(0{t.has(e)&&(o[e]=t.get(e).value)});else for(const e of t.keys())o[e]=t.get(e).value}return o}_updateCachedAttributes(e){const{groupAttributes:o,groupAttributeList:t,operationType:s}=e;s!==Do?s!==Lo?(s===Io&&o.attributes.clear(),t.forEach(e=>{var{key:e,value:t,sequence:s}=e;o.attributes.set(e,{value:t,sequence:s})})):t.forEach(e=>{o.attributes.delete(e.key)}):o.attributes.clear()}_hasLocalGroupAttributes(e){return this._groupAttributesMap.has(e)}_getLocalGroupAttributes(e){return this._hasLocalGroupAttributes(e)||this.initGroupAttributesCache({groupID:e}),this._groupAttributesMap.get(e)}_transformGroupAttributes(t){const s=[];return Object.keys(t).forEach(e=>{s.push({key:e,value:t[e]})}),s}_emitGroupAttributesUpdated(e){var t=this._getCachedAttributes({groupID:e}),{updatedKeyList:s,deletedKeyList:o}=this._computeAttrChangedInfo(t);ct.l(`${this._n}._emitGroupAttributesUpdated update:${s.length}, delete:`+o.length),0===s.length&&0===o.length||this._grpM.emitOEvt(Ot,{groupID:e,groupAttributes:t,updatedKeyList:s,deletedKeyList:o})}_computeAttrChangedInfo(t){const s=[],o=[];return Object.keys(t).forEach(e=>{t[e]!==this._groupAttributesCopy[e]&&s.push(e)}),Object.keys(this._groupAttributesCopy).forEach(e=>{Ke(t[e])&&o.push(e)}),this._groupAttributesCopy={},{updatedKeyList:s,deletedKeyList:o}}deleteLocalGroupAttributes(e){this._hasLocalGroupAttributes(e)&&this._groupAttributesMap.delete(e)}reset(){this._groupAttributesMap.clear(),this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4}}const bo=\"Set\",Ao=\"Increase\",To=\"Decrease\";class So{constructor(e){this._grpM=e,this._n=\"GroupCountersHandler\",this._groupCountersMap=new Map,this.EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(Bt.CLOUD_CONFIG,this._onCloudConfig,this)}_onCloudConfig(){var e=this._grpM.getCloudConfig(\"grp_counter_expire_time\");Ke(e)||(this.EXPIRE_TIME=Number(e))}isGroupCountersNotice(e){var{to:e,elements:{groupCounterInfo:t}}=e;let s=!1;return qe(t)||(this._onGroupCountersUpdated({groupID:e,groupCounterInfo:t}),s=!0),s}_onGroupCountersUpdated(e){const{groupID:o,groupCounterInfo:t}=e;t.forEach(e=>{var{type:e,groupCounterSeq:t,counterList:s=[]}=e;0!==e&&2!==e||(this._updateLocalGroupCounters({groupID:o,groupCounterSeq:t,counterList:s}),s.forEach(e=>{this._grpM.emitOEvt(Ft,{groupID:o,key:e.key,value:e.value})})),1===e&&this._deleteLocalGroupCounters({groupID:o,groupCounterSeq:t,counterList:s})}),ct.l(this._n+\"._onGroupCountersUpdated groupID:\"+o)}initGroupCountersCache(e){var{groupID:e,avChatRoomKey:t}=e;this._groupCountersMap.set(e,{lastUpdateTime:0,groupCounterSeq:0,counters:new Map,avChatRoomKey:t}),ct.l(this._n+`.initGroupCountersCache groupID:${e} avChatRoomKey:`+t)}setGroupCounters(e){if(!this._grpM.canIUse(I.GRP_COUNTER))return this._grpM.noUse(\"setGroupCounters\");const t=this._n+\".setGroupCounters\",{groupID:s,counters:o}=e,r=this._convertObjectToList(o),i=this._getLocalGroupCounters(s)[\"avChatRoomKey\"],n=`groupID:${s} count:`+r.length,a=new Zt(\"setGroupCounters\");return a.setMessage(n),ct.l(t+\". \"+n),this._updateGroupCounters({groupID:s,counterList:r,avChatRoomKey:i,mode:bo}).then(e=>(a.end(),ct.l(t+\" ok.\"),ht({counters:e}))).catch(e=>(a.setError(e).end(),ct.e(t+\" failed. error:\",e),Kt(e)))}increaseGroupCounter(e){var t=\"increaseGroupCounter\";if(!this._grpM.canIUse(I.GRP_COUNTER))return this._grpM.noUse(t);const s=this._n+\".\"+t,{groupID:o,key:r,value:i}=e,n=this._getLocalGroupCounters(o)[\"avChatRoomKey\"],a=`groupID:${o} key:${r} value:`+i,u=new Zt(t);return u.setMessage(a),ct.l(s+\". \"+a),this._updateGroupCounters({groupID:o,counterList:[{key:r,value:i}],avChatRoomKey:n,mode:Ao}).then(e=>(u.end(),ct.l(s+\" ok.\"),ht({counters:e}))).catch(e=>(u.setError(e).end(),ct.e(s+\" failed. error:\",e),Kt(e)))}decreaseGroupCounter(e){var t=\"decreaseGroupCounter\";if(!this._grpM.canIUse(I.GRP_COUNTER))return this._grpM.noUse(t);const s=this._n+\".\"+t,{groupID:o,key:r,value:i}=e,n=this._getLocalGroupCounters(o)[\"avChatRoomKey\"],a=`groupID:${o} key:${r} value:`+i,u=new Zt(t);return u.setMessage(a),ct.l(s+\". \"+a),this._updateGroupCounters({groupID:o,counterList:[{key:r,value:i}],avChatRoomKey:n,mode:To}).then(e=>(u.end(),ct.l(s+\" ok.\"),ht({counters:e}))).catch(e=>(u.setError(e).end(),ct.e(s+\" failed. error:\",e),Kt(e)))}getGroupCounters(e){if(!this._grpM.canIUse(I.GRP_COUNTER))return this._grpM.noUse(\"getGroupCounters\");const t=this._n+\".getGroupCounters\",{groupID:s,keyList:o=[]}=e,{avChatRoomKey:r,lastUpdateTime:i}=this._getLocalGroupCounters(s),n=new Zt(\"getGroupCounters\");if(n.setMessage(\"groupID:\"+s),Date.now()-i>=this.EXPIRE_TIME)return this._getRemoteGroupCounters({groupID:s,avChatRoomKey:r}).then(e=>{n.setMoreMessage(\"from remote. count:\"+e.length).end(),ct.l(t+\" from remote. groupID:\"+s);e=this._getLocalCounters(s,o);return ht({counters:e})}).catch(e=>(n.setError(e).end(),Kt(e)));n.setMoreMessage(\"from cache\").end(),ct.l(t+\" from cache. groupID:\"+s);e=this._getLocalCounters(s,o);return jt({counters:e})}_getRemoteGroupCounters(s){return this._grpM.req({P:Ns,data:{...s}}).then(e=>{var{counterList:e=[],groupCounterSeq:t}=e.data;return this._updateLocalGroupCounters({groupID:s.groupID,counterList:e,groupCounterSeq:t}),ct.l(this._n+\"._getRemoteGroupCounters ok. groupID:\"+s.groupID),e}).catch(e=>Kt(e))}_convertObjectToList(t){const s=[];return Object.keys(t).forEach(e=>{s.push({key:e,value:t[e]})}),s}_updateGroupCounters(e){const o=this._n+\"._updateGroupCounters\",{groupID:t,avChatRoomKey:s,mode:r}=e;return ct.l(o+`. groupID:${t} avChatRoomKey:${s} mode:`+r),this._grpM.req({P:Us,data:{...e}}).then(e=>{ct.l(o+\" ok.\");const{counterList:t=[]}=e.data,s={};return t.forEach(e=>{var{key:e,value:t}=e;s[e]=t}),s}).catch(e=>Kt(e))}_hasLocalGroupCounters(e){return this._groupCountersMap.has(e)}_getLocalGroupCounters(e){return this._hasLocalGroupCounters(e)||this.initGroupCountersCache({groupID:e}),this._groupCountersMap.get(e)}_updateLocalGroupCounters(s){var{groupID:e,counterList:t=[],groupCounterSeq:o}=s;if(this._hasLocalGroupCounters(e)){const{counters:s,avChatRoomKey:r,groupCounterSeq:i}=this._getLocalGroupCounters(e);0{var{key:e,value:t}=e;s.set(e,t)}),this._groupCountersMap.set(e,{lastUpdateTime:Date.now(),groupCounterSeq:o,counters:s,avChatRoomKey:r}))}}_deleteLocalGroupCounters(t){var{groupID:e,counterList:s=[],groupCounterSeq:o}=t;if(this._hasLocalGroupCounters(e)){const{counters:t,avChatRoomKey:r}=this._getLocalGroupCounters(e);s.forEach(e=>{t.delete(e.key)}),this._groupCountersMap.set(e,{lastUpdateTime:Date.now(),groupCounterSeq:o,counters:t,avChatRoomKey:r})}}_getLocalCounters(e,t){const s={};if(this._hasLocalGroupCounters(e)){const o=this._getLocalGroupCounters(e)[\"counters\"];if(0{o.has(e)&&(s[e]=o.get(e))});else for(const r of o.keys())s[r]=o.get(r)}return s}reset(){this._groupCountersMap.clear(),this.EXPIRE_TIME=3e4}}class vo{constructor(e){var{manager:e,groupID:t,onInit:s,onSuccess:o,onFail:r}=e;this._n=\"Polling\",this._manager=e,this._grpM=e._grpM,this._onInit=s,this._onSuccess=o,this._onFail=r,this._groupID=t,this._timeoutID=-1,this._isRunning=!1,this._proto=Ls}start(){var e=this._grpM.isLoggedIn();e||(this._proto=Cs),ct.l(`${this._n}.start pollingInterval:${this._manager.getPollingInterval()} isLoggedIn:`+e),this._isRunning=!0,this._request()}isRunning(){return this._isRunning}_request(){var e=this._onInit(this._groupID);this._grpM.req({P:this._proto,data:e}).then(e=>{this._onSuccess(this._groupID,e),this.isRunning()&&(clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this._request.bind(this),this._manager.getPollingInterval()))}).catch(e=>{this._onFail(this._groupID,e),this.isRunning()&&(clearTimeout(this._timeoutID),this._timeoutID=setTimeout(this._request.bind(this),this._manager.MAX_POLLING_INTERVAL))})}stop(){ct.l(this._n+\".stop\"),0=this.MAX_LENGTH){const e=this.map.entries().next().value[0];this.map.delete(e)}this.map.set(e,1)}has(e){return this.map.has(e)}delete(e){this.has(e)&&this.map.delete(e)}reset(){this.map.clear()}}const Ro=[\"groupID\",\"name\",\"avatar\",\"type\",\"introduction\",\"notification\",\"ownerID\",\"selfInfo\",\"createTime\",\"infoSequence\",\"lastInfoTime\",\"lastMessage\",\"nextMessageSeq\",\"memberNum\",\"maxMemberNum\",\"memberList\",\"joinOption\",\"groupCustomField\",\"muteAllMembers\",\"isSupportTopic\",\"inviteOption\",\"_lastRevokedTime\"];class $o{constructor(e){this.groupID=\"\",this.name=\"\",this.avatar=\"\",this.type=\"\",this.introduction=\"\",this.notification=\"\",this.ownerID=\"\",this.createTime=\"\",this.infoSequence=\"\",this.lastInfoTime=\"\",this.selfInfo={messageRemindType:\"\",joinTime:\"\",nameCard:\"\",role:\"\",userID:\"\",memberCustomField:void 0,readedSequence:0,excludedUnreadSequenceList:void 0},this.lastMessage={lastTime:\"\",lastSequence:\"\",fromAccount:\"\",messageForShow:\"\"},this.nextMessageSeq=\"\",this.memberNum=\"\",this.memberCount=\"\",this.maxMemberNum=\"\",this.maxMemberCount=\"\",this.joinOption=\"\",this.inviteOption=\"\",this.groupCustomField=[],this.muteAllMembers=!1,this.isSupportTopic=!1,this._lastRevokedTime=0,this._initGroup(e)}set memberNum(e){}set maxMemberNum(e){}get memberNum(){return this.memberCount}get maxMemberNum(){return this.maxMemberCount}_initGroup(e){for(const t in e)Ro.indexOf(t)<0||(\"selfInfo\"!==t?(\"memberNum\"===t&&(this.memberCount=e[t]),\"maxMemberNum\"===t&&(this.maxMemberCount=e[t]),\"isSupportTopic\"!==t?this[t]=e[t]:this.isSupportTopic=1===e[t]):this.updateSelfInfo(e[t]))}updateGroup(e){e.appid=void 0,e.grossTopicNextMsgSeq=void 0,e.selfInfo&&(e.selfInfo.grossTopicReadSeq=void 0);e=JSON.parse(JSON.stringify(e));e.lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),Ke(e.muteAllMembers)||(\"On\"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&Qe(this.groupCustomField,e.groupCustomField),Ke(e.memberNum)||(this.memberCount=e.memberNum),Ke(e.maxMemberNum)||(this.maxMemberCount=e.maxMemberNum),Ke(e.isSupportTopic)||(this.isSupportTopic=xe(e.isSupportTopic)?1===e.isSupportTopic:e.isSupportTopic),We(this,e,[\"members\",\"errorCode\",\"lastMsgTime\",\"groupCustomField\",\"memberNum\",\"maxMemberNum\",\"isSupportTopic\"]),je(e.members)&&0{e.userID===this.selfInfo.userID&&We(this.selfInfo,e,[\"sequence\"])})}updateSelfInfo({nameCard:e,joinTime:t,role:s,messageRemindType:o,readedSequence:r,excludedUnreadSequenceList:i}){e={nameCard:e,joinTime:t,role:s,messageRemindType:o,readedSequence:r,excludedUnreadSequenceList:i};We(this.selfInfo,{...e},[],[\"\",null,void 0,0,NaN])}setSelfNameCard(e){this.selfInfo.nameCard=e}}const Eo={3:!0,4:!0,5:!0,6:!0,17:!0,20:!0,21:!0,100:!0};class wo{constructor(e){this._grpM=e,this._n=\"AVChatRoomHandler\",this._joinedGroupMap=new Map,this._pollingRequestInfoMap=new Map,this._pollingInstanceMap=new Map,this._seqSll=new Po(200),this._IDSll=new Po(100),this._reportMessageStackedCount=0,this._onlineMemberCountMap=new Map,this.DEFAULT_EXPIRE_TIME=60,this.DEFAULT_POLLING_INTERVAL=300,this.MAX_POLLING_INTERVAL=2e3,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0,this._startBroadcastSeq=1,this._broadcastMessageIDMap=new Map,this.DEFAULT_POLLING_SIMPLIFIED_MSG=0}hasJoinedAVChatRoom(){let e=[];return 0<(e=0e.type===me):e).length}getJoinedLiveList(){let e=[];return e=0e.type===fe):e}checkJoinedAVChatRoomByID(e){return this._joinedGroupMap.has(e)}getJoinedAVChatRoom(){return 0this._startBroadcastSeq&&(this._startBroadcastSeq=n),je(r)&&0{e.to=e.groupID}),this.onMessage(r,e)):(this._pollingNoMessageCount+=1,this._pollingNoMessageCount===this.DEFAULT_POLLING_NO_MESSAGE_COUNT&&(this._pollingInterval=this.DEFAULT_POLLING_INTERVAL+this.DEFAULT_POLLING_INTERVAL_PLUS)),this._onBroadcastMessage(a))}_handleFailure(e,t){}onMessage(i,n){if(je(i)&&0!==i.length){let t=this._n+\".onMessage\";n&&(t+=\" groupID:\"+n),0!==this._pollingNoMessageCount&&(this._pollingNoMessageCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL);var a=null,u=[],l=this._get(o),h=this._get(p),c=i.length,m=(1e.sequence-t.sequence),this._get(r).isUnlimitedAVChatRoom());let s=!1;if(ct.getLevel()<=0){const n=i.map(e=>e.sequence);ct.l(`${t} count:${n.length} sequenceList:`+n),n.length=0}for(let e=0;e{var{tinyID:e,clientTime:t,random:s,sequence:o}=e,e={conversationID:\"\"+ue+r,ID:e+`-${t}-`+s,revoker:i.revoker,revokeReason:i.reason||\"\",revokerInfo:{userID:i.revoker,nick:\"\",avatar:\"\"},sequence:o};n.push(e)}),0!==n.length&&this._get(o).updateRevokerInfo(n).then(e=>{this._grpM.emitOEvt(qt,e)})}isBroadcastOrNormal(e){return 3===e||17===e}isGroupTip(e){return 4===e||6===e}isGroupSystemNotice(e){return 5===e}restoreGroupTipElements(e={}){var{operatorInfo:t={},operatorID:s,userIDList:o=[],operationType:r}=e,{userID:r=s,avatar:t=\"\",nick:s=\"\"}=(xe(e.groupJoinType)||1!==r&&2!==r||(e.groupJoinType=2===r?0:1),t),r=(e.operatorInfo={userID:r,avatar:t,nick:s},o.map(e=>({userID:e})));return e.memberInfoList=e.memberInfoList||r,e}restoreMessageFromSimplified(s){const e=s[\"event\"];if(this.isBroadcastOrNormal(e)&&(s.cloudCustomData=s.cloudCustomData||\"\",s.elements=s.elements.map(e=>{var t;return e.type===te&&({content:t={}}=e,e.content={data:\"\",description:\"\",extension:\"\",...t}),e})),(this.isGroupTip(e)||this.isGroupSystemNotice(e))&&(s.from=s.from||\"@TIM#SYSTEM\"),this.isGroupTip(e)){s.elements=this.restoreGroupTipElements(s.elements);const{elements:e={}}=s,{operationType:t,operatorInfo:r={}}=e;if(1===t){const s=[{userID:r.userID}];e.memberInfoList=e.memberInfoList||s}}if(this.isGroupSystemNotice(e)){let{memberInfoList:e,operatorInfo:t={}}=s.elements;e=e||t,s.elements.memberInfoList={userID:s.elements.operatorID,avatar:\"\",nick:\"\",...e},s.elements={authentication:\"\",remarkInfo:\"\",messageKey:1e3*s.time,...s.elements};var o=Object.keys(s.elements).filter(e=>\"operatorInfo\"!==e).reduce((e,t)=>({...e,[t]:s.elements[t]}),{});s.elements=o}return s}_onGroupDismissed(e){ct.l(this._n+\"._onGroupDismissed groupID:\"+e),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}_checkMessageStacked(e){var t=\"MessageStacked\",e=e.length;100<=e&&(this._grpM.warn(t,e),this._reportMessageStackedCount<5)&&(new Zt(t).setMessage(`count:${e} groupID:`+[...this._joinedGroupMap.keys()]).setLevel(\"warning\").end(),this._reportMessageStackedCount+=1)}_isMessageSentByCurrentInstance(e){return!!this._get(o).isMessageSentByCurrentInstance(e)}packMessage(e,t){e.currentUser=this._grpM.getMyUserID(),e.conversationType=5===t?le:ue,e.isSystemMessage=!!e.isSystemMessage;var s=new _o(e),e=this.packElements(e,t),t=this._grpM.getFileDownloadProxy(),o=this._grpM.getDowloadFileAuthKey(),r=this._get(n).getFileDNList();return s.setElement(e,t,o,r),s}packElements(e,t){return 4===t||6===t?(this._updateMemberCountByGroupTips(e),{type:Z,content:{...e.elements,groupProfile:e.groupProfile}}):5===t?{type:ee,content:{...e.elements,groupProfile:{...e.groupProfile,groupID:e.groupID}}}:e.elements}packConversationOption(t){var s=new Map;for(let e=0;e{var{longPollingKey:e,group:t}=o,s=t.groupID;return this._joinedGroupMap.set(s,t),this._grpM.updateGroupMap([t]),this._grpM.deleteUnjoinedAVChatRoom(s),this._grpM.emitGroupListUpdate(!0,!1),Ke(e)?jt({status:$e,group:t}):Promise.resolve()})}startRunLoop(r){return this.handleJoinResult(r).then(()=>{var{longPollingKey:e,group:t,startSeq:s=0}=r,o=t.groupID;return this._pollingRequestInfoMap.set(o,{key:e,startSeq:s}),this.start(o),this._grpM.isLoggedIn()?jt({status:$e,group:t}):jt({status:$e})})}_preCheck(e){if(!this._get(r).isUnlimitedAVChatRoom()&&this.hasJoinedAVChatRoom()&&e.type!==fe){var[e,t]=this._joinedGroupMap.entries().next().value;if(this._grpM.isLoggedIn()&&t.selfInfo.role!==Me&&t.ownerID!==this._grpM.getMyUserID())return this._grpM.quitGroup(e);this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}return Promise.resolve()}joinWithoutAuth(e){const s=e[\"groupID\"],r=this._n+\".joinWithoutAuth\",n=new Zt(\"joinWithoutAuth\");return this._grpM.req({P:as,data:e}).then(({data:{longPollingKey:e}})=>{if(n.setMessage(`groupID:${s} longPollingKey:`+e).end(!0),Ke(e))return Kt({code:Gt});ct.l(r+\" ok. groupID:\"+s),this._get(o).setCompleted(\"\"+ue+s);var t=new $o({groupID:s});return this.startRunLoop({group:t,longPollingKey:e}),ht({status:$e})}).catch(e=>(ct.e(r+` failed. groupID:${s} error:`,e),n.setError(e).setMessage(\"groupID:\"+s).end(!0),Kt(e))).finally(()=>{this._grpM.get(i).reportAtOnce()})}getGroupOnlineMemberCount(e){var t=this._onlineMemberCountMap.get(e)||{},s=Date.now();return qe(t)||s-t.lastSyncTime>1e3*t.expireTime&&1e4ht({memberCount:e.memberCount})).catch(e=>Kt(e))):jt({memberCount:t.memberCount})}_getGroupOnlineMemberCount(r){const i=this._n+\"._getGroupOnlineMemberCount\",t=new Zt(\"_getGroupOnlineMemberCount\");return this._grpM.requestOnlineCount(r).then(e=>{var t=this._onlineMemberCountMap.get(r)||{},{memberCount:e=0,expireTime:s=this.DEFAULT_EXPIRE_TIME}=e.data,o=(ct.l(i+` ok. groupID:${r} memberCount:${e} expireTime:`+s),Date.now());return qe(t)&&(t.lastReqTime=o),this._onlineMemberCountMap.set(r,Object.assign(t,{lastSyncTime:o,latestUpdateTime:o,memberCount:e,expireTime:s})),{memberCount:e}}).catch(e=>(ct.w(i+\" failed. error:\",e),t.setCode(e.code).setMessage(`groupID:${r} error:`+JSON.stringify(e)).end(),Promise.reject(e)))}_get(e){return this._grpM.get(e)}setPollingInterval(e){Ke(e)||(xe(e)?this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=e:this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=parseInt(e,10))}setPollingIntervalPlus(e){Ke(e)||(xe(e)?this.DEFAULT_POLLING_INTERVAL_PLUS=e:this.DEFAULT_POLLING_INTERVAL_PLUS=parseInt(e,10))}setPollingNoMessageCount(e){Ke(e)||(xe(e)?this.DEFAULT_POLLING_NO_MESSAGE_COUNT=e:this.DEFAULT_POLLING_NO_MESSAGE_COUNT=parseInt(e,10))}setPollingSimplifiedMessage(e){Ke(e)||\"0\"!==e&&\"1\"!==e||(this.DEFAULT_POLLING_SIMPLIFIED_MSG=parseInt(e,10))}getPollingInterval(){return this._pollingInterval}onAVChatRoomMemberBanned(e){e=e.payload.groupProfile.groupID;ct.l(this._n+\".onAVChatRoomMemberBanned groupID:\"+e),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}restartPolling(){ct.l(this._n+\".restartPolling count:\"+this._pollingInstanceMap.size);for(const e of this._pollingInstanceMap.values())e.stop(),e.start()}getPollingTimerID(e){var t;return this._pollingInstanceMap.has(e)?(t=this._pollingInstanceMap.get(e).getPollingTimerID(),ct.l(this._n+`.getPollingTimerID groupID:${e} timerID:`+t),t):-1}hasPollingInstance(e){return this._pollingInstanceMap.has(e)}onRoomCustomData(e){var{groupID:e,sequence:t,time:s,elements:o}=e,o=o&&o.content;this._get(h).onRoomCustomDataReceived(o),ct.l(this._n+`.onRoomCustomData groupID:${e} sequence:${t} time:${s} data:`+o)}reset(e){if(e){ct.l(this._n+\".reset groupID:\"+e);var t=this._pollingInstanceMap.get(e);t&&t.stop(),this._pollingInstanceMap.delete(e),this._joinedGroupMap.delete(e),this._pollingRequestInfoMap.delete(e),this._onlineMemberCountMap.delete(e)}else{ct.l(this._n+\".reset all\");for(const e of this._pollingInstanceMap.values())e.stop();this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear(),this._onlineMemberCountMap.clear(),this._broadcastMessageIDMap.clear()}this._seqSll.reset(),this._IDSll.reset(),this._reportMessageStackedCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=300,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0}}class Uo{constructor(e){this.userID=\"\",this.avatar=\"\",this.nick=\"\",this.role=\"\",this.joinTime=\"\",this.lastSendMsgTime=\"\",this.nameCard=\"\",this.muteUntil=0,this.memberCustomField=[],this.isOnline=!1,this.updateMember(e)}updateMember(e){Ke(e.onlineStatus)||(this.isOnline=\"Online\"===e.onlineStatus);var t=[null,void 0,\"\",0,NaN];e.memberCustomField&&Qe(this.memberCustomField,e.memberCustomField),We(this,e,[\"memberCustomField\",\"marks\",\"onlineStatus\"],t)}updateRole(e){[\"Owner\",\"Admin\",\"Member\"].indexOf(e)<0||(this.role=e)}updateMuteUntil(e){Ke(e)||(this.muteUntil=Math.floor((Date.now()+1e3*e)/1e3))}updateNameCard(e){Ke(e)||(this.nameCard=e)}updateMemberCustomField(e){e&&Qe(this.memberCustomField,e)}}class No{constructor(e){this._grpM=e,this._n=\"GroupMemberHandler\",this.groupMemberListMap=new Map,this.DEFAULT_MEMBER_INFO_FILTER=[\"Role\",\"JoinTime\",\"NameCard\",\"ShutUpUntil\",\"OnlineStatus\"],this._grpM.getIEmitInst().on(Bt.PROFILE_UPDATED,this._onProfileUpdated,this)}_onProfileUpdated({data:t}){for(let e=0;e{e.has(s.userID)&&e.get(s.userID).updateMember({nick:s.nick,avatar:s.avatar})})}}deleteGroupMemberList(e){this.groupMemberListMap.delete(e)}getGroupMemberList({groupID:r,role:e,offset:s=0,count:o=15,filter:i}){const n=this._n+\".getGroupMemberList\",a=this._grpM.hasLocalGroup(r);if(ct.l(n+` groupID:${r} role:${e} offset:${s} count:${o} hasLocalGroup:`+a),!a)return jt({memberList:[],offset:0});if(this._grpM.getLocalGroupProfile(r).type===me){if(this._grpM.canIUse(I.AV_MBR_LIST))return this._getAVChatRoomMemberList({groupID:r,offset:s,filter:i});this._grpM.warn(\"LiveOnlineMember\")}let u;e!==Ie&&e!==Me&&e!==ye||(u=e);const p=new Zt(\"getGroupMemberList\");let l=0;i={groupID:r,limit:100(Ke(o)||(l=qe(o)?0:o),je(e)&&0!==e.length?(this._grpM.hasLocalGroup(r)&&(this._grpM.getLocalGroupProfile(r).memberNum=s),h=this._updateLocalGroupMemberMap(r,e),this._grpM.get(t).getUserProfile({userIDList:e.map(e=>e.userID),tagList:[Re.NICK,Re.AVATAR]})):(l=0,Promise.resolve([])))).then(e=>{var e=e[\"data\"];return je(e)&&0!==e.length?(e=e.map(e=>({userID:e.userID,nick:e.nick,avatar:e.avatar})),this._updateLocalGroupMemberMap(r,e),h.length(p.setError(e).end(),ct.e(n+\" failed. error:\",e),Kt(e)))}_getAVChatRoomMemberList({groupID:s,offset:e,filter:t}){const o=this._n+\"._getAVChatRoomMemberList\",r=new Zt(\"_getAVChatRoomMemberList\");return r.setMessage(`groupID:${s} offset:${e} filter:`+t),this._grpM.req({P:ks,data:{groupID:s,offset:e,filter:t}}).then(e=>{var{memberList:e=[],offset:t=0}=e.data,e=(r.end(),ct.l(o+` ok. member count:${e.length}, next request timestamp:`+t),e.map(e=>({...e,onlineStatus:\"Online\"}))),e=this._updateLocalGroupMemberMap(s,e);return ht({memberList:e,offset:t})}).catch(e=>(r.setError(e).end(),ct.e(o+\" failed. error:\",e),Kt(e)))}getGroupMemberProfile(e){var s=\"getGroupMemberProfile\",o=this._n+\".\"+s;let r=\"groupID:\"+e.groupID;5{e=e.data.members;return je(e)&&0!==e.length?(this._updateLocalGroupMemberMap(i,e),this._grpM.get(t).getUserProfile({userIDList:e.map(({userID:e})=>e),tagList:[Re.NICK,Re.AVATAR]})):jt([])}).then(e=>{e=e.data.map(({userID:e,nick:t,avatar:s})=>({userID:e,nick:t,avatar:s})),this._updateLocalGroupMemberMap(i,e),e=n.filter(e=>this.hasLocalGroupMember(i,e)).map(e=>this.getLocalGroupMemberInfo(i,e));return u.end(),ht({memberList:e})})}addGroupMember(i){const n=this._n+\".addGroupMember\",e=i[\"groupID\"],a=this._grpM.getLocalGroupProfile(e),t=a[\"type\"],u=new Zt(\"addGroupMember\");if(u.setMessage(`groupID:${e} groupType:`+t),st(t)){const i=new gt({code:Ct});return u.setError(i).end(),Kt(i)}return i.userIDList=i.userIDList.map(e=>({userID:e})),ct.l(n+\" groupID:\"+e),this._grpM.req({P:Fs,data:i}).then(({data:{members:e}})=>{ct.l(n+\" ok\");var t=e.filter(e=>1===e.result).map(e=>e.userID),s=e.filter(e=>0===e.result).map(e=>e.userID),o=e.filter(e=>2===e.result).map(e=>e.userID),e=e.filter(e=>4===e.result).map(e=>e.userID),r=`groupID:${i.groupID}, successUserIDList:${t}, failureUserIDList:${s}, existedUserIDList:${o}, overLimitUserIDList:`+e;return u.setMoreMessage(r).end(),0===t.length?ht({successUserIDList:t,failureUserIDList:s,existedUserIDList:o,overLimitUserIDList:e}):(this._updateConvGroupProfile(a),ht({successUserIDList:t,failureUserIDList:s,existedUserIDList:o,overLimitUserIDList:e,group:a}))}).catch(e=>(u.setError(e).end(),ct.e(n+\" failed. error:\",e),Kt(e)))}deleteGroupMember(e){const t=this._n+\".deleteGroupMember\",{groupID:s,userIDList:o}=e,r=this._grpM.getLocalGroupProfile(s);if(Ke(r))return Kt({code:Mt});if(st(r.type))return this._grpM.canIUse(I.AV_BAN_MBR)?this._banAVChatRoomMember(e):this._grpM.noUse(\"deleteGroupMember\");var i=`groupID:${s} `+(5(n.end(),ct.l(t+\" ok\"),this._updateConvGroupProfile(r),this.deleteLocalGroupMembers(s,o),ht({group:r,userIDList:o}))).catch(e=>(n.setError(e).end(),ct.e(t+\" failed. error:\",e),Kt(e)))}_updateConvGroupProfile(e){this._grpM.get(o).updateConvGroupProfile([e])}_banAVChatRoomMember(e){const t=this._n+\"._banAVChatRoomMember\",{groupID:s,userIDList:o}=e,r=`groupID:${s} `+(5(i.end(),ct.l(t+\" ok\"),this.deleteLocalGroupMembers(s,o),ht({group:n,userIDList:o}))).catch(e=>(i.setError(e).end(),ct.e(t+\" failed. error:\",e),Kt(e)))}setGroupMemberMuteTime(e){const{groupID:s,userID:t,muteTime:o}=e,r=this._n+\".setGroupMemberMuteTime\";if(t===this._grpM.getMyUserID())return Kt({code:St});e=`groupID:${s} userID:${t} muteTime:`+o;ct.l(r+\" \"+e);const i=new Zt(\"setGroupMemberMuteTime\");return i.setMessage(e),this.modifyGroupMemberInfo({groupID:s,userID:t,muteTime:o}).then(e=>{i.end(),ct.l(r+\" ok\");var t=this._grpM.getLocalGroupProfile(s);return ht({group:t,member:e})}).catch(e=>(i.setError(e).end(),ct.e(r+\" failed. error:\",e),Kt(e)))}setGroupMemberRole(e){const t=this._n+\".setGroupMemberRole\",{groupID:s,userID:o,role:r}=e,i=`groupID:${s} userID:${o} role:`+r,n=this._grpM.getLocalGroupProfile(s);if(n&&n.selfInfo.role!==Me)return Kt({code:bt});e=[Ie,ye];if(ot({groupID:s})&&e.push(De),e.indexOf(r)<0)return Kt({code:At});if(o===this._grpM.getMyUserID())return Kt({code:Tt});const a=new Zt(\"setGroupMemberRole\");return a.setMessage(i),ct.l(t+\" \"+i),this.modifyGroupMemberInfo({groupID:s,userID:o,role:r}).then(e=>(a.end(),ct.l(t+\" ok\"),ht({group:n,member:e}))).catch(e=>(a.setError(e).end(),ct.e(t+\" failed. error:\",e),Kt(e)))}_filterProfanity(e,t){var s,o=this._grpM.get(c);return!o||({isAllowedToSend:o,modifiedText:s}=o.filterText(t[e],D),!0===o&&(t[e]=s,!0))}setGroupMemberNameCard(e){const t=\"setGroupMemberNameCard\",s=this._n+\".\"+t;if(e.nameCard&&!1===this._filterProfanity(\"nameCard\",e))return Kt({code:wt});const{groupID:o,userID:r=this._grpM.getMyUserID(),nameCard:i}=e,n=`groupID:${o} userID:${r} nameCard:`+i;ct.l(s+\" \"+n);e=this._grpM.getLocalGroupProfile(o);if(e&&st(e.type)){const e=Pt;return Kt({code:e,message:this._grpM.getErrMsg(e,t)})}const a=new Zt(t);return a.setMessage(n),this.modifyGroupMemberInfo({groupID:o,userID:r,nameCard:i}).then(e=>{ct.l(s+\" ok\"),a.end();var t=this._grpM.getLocalGroupProfile(o);return r===this._grpM.getMyUserID()&&t&&t.setSelfNameCard(i),ht({group:t,member:e})}).catch(e=>(a.setError(e).end(),ct.e(s+\" failed. error:\",e),Kt(e)))}setGroupMemberCustomField(e){const t=\"setGroupMemberCustomField\",s=this._n+\".\"+t,{groupID:o,userID:r=this._grpM.getMyUserID(),memberCustomField:i}=e,n=`groupID:${o} userID:${r} memberCustomField:`+JSON.stringify(i);ct.l(s+\" \"+n);e=this._grpM.getLocalGroupProfile(o);if(e&&st(e.type)){const e=Pt;return Kt({code:e,message:this._grpM.getErrMsg(e,t)})}const a=new Zt(t);return a.setMessage(n),this.modifyGroupMemberInfo({groupID:o,userID:r,memberCustomField:i}).then(e=>{a.end(),ct.l(s+\" ok\");var t=this._grpM.getLocalGroupProfile(o);return ht({group:t,member:e})}).catch(e=>(a.setError(e).end(),ct.e(s+\" failed. error:\",e),Kt(e)))}modifyGroupMemberInfo(t){let{groupID:s,userID:o}=t,e=void 0;return rt(s)&&(s=it(e=s)),this._grpM.req({P:Hs,data:{...t,groupID:s,topicID:e}}).then(()=>{if(this.hasLocalGroupMember(s,o)){const e=this.getLocalGroupMemberInfo(s,o);return Ke(t.muteTime)||e.updateMuteUntil(t.muteTime),Ke(t.role)||e.updateRole(t.role),Ke(t.nameCard)||e.updateNameCard(t.nameCard),Ke(t.memberCustomField)||e.updateMemberCustomField(t.memberCustomField),e}const e=this._grpM.getLocalGroupProfile(s);if(e&&!st(e.type))return this.getGroupMemberProfile({groupID:s,userIDList:[o]}).then(({data:{memberList:[e]}})=>e)})}markGroupMemberList(e){const r=this._n+\".markGroupMemberList\",{groupID:t,markType:s,enableMark:o,userIDList:i=[]}=e,n=`groupID:${t} markType:${s} enableMark:${o} userIDList count:`+i.length;ct.l(r+\" \"+n);let a=2;const u=[];!0===o&&(a=1);let p=[...i];500{u.push({userID:e,markType:[s]})}),p=null;const l=new Zt(\"markGroupMemberList\");return l.setMessage(n),this._grpM.req({P:js,data:{groupID:t,operationType:a,memberList:u}}).then(e=>{const{memberList:t=[]}=e.data,s=[],o=[];t.length===i.length?s.push(...i):(t.forEach(e=>{s.push(e.userID)}),i.forEach(e=>{s.includes(e)||o.push(e)}));e=`success count:${s.length} fail count:`+o.length;return l.setMessage(e).end(),ct.l(r+\" ok. \"+e),ht({successUserIDList:s,failureUserIDList:o})}).catch(e=>(l.setError(e).end(),ct.e(r+\" failed. error:\",e),Kt(e)))}_getGroupMemberProfileAdvance(e){return this._grpM.req({P:Os,data:{...e,memberInfoFilter:e.memberInfoFilter||this.DEFAULT_MEMBER_INFO_FILTER}})}_updateLocalGroupMemberMap(t,e){return je(e)&&0!==e.length?e.map(e=>(this.hasLocalGroupMember(t,e.userID)?this.getLocalGroupMemberInfo(t,e.userID).updateMember(e):this.setLocalGroupMember(t,new Uo(e)),this.getLocalGroupMemberInfo(t,e.userID))):[]}deleteLocalGroupMembers(e,t){const s=this.groupMemberListMap.get(e);s&&t.forEach(e=>{s.delete(e)})}getLocalGroupMemberInfo(e,t){return this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).get(t):null}setLocalGroupMember(e,t){this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).set(t.userID,t):(t=(new Map).set(t.userID,t),this.groupMemberListMap.set(e,t))}getLocalGroupMemberList(e){return this.groupMemberListMap.get(e)}hasLocalGroupMember(e,t){return this.groupMemberListMap.has(e)&&this.groupMemberListMap.get(e).has(t)}hasLocalGroupMemberMap(e){return this.groupMemberListMap.has(e)}reset(){this.groupMemberListMap.clear()}}function qo(e){var t=e.lastIndexOf(\".\");return-1===t?e:e.slice(0,t)}function ko(e){var{androidInfo:e={},androidOPPOChannelID:t=\"\"}=e,t=e.OPPOChannelID||t;return{...e,Sound:qo(e.sound||\"\"),OPPOChannelID:t,GoogleChannelID:e.FCMChannelID||\"\"}}function Oo(e){var{apnsInfo:e={},ignoreIOSBadge:t=!1,disableVoipPush:s}=e,t=!0===e.ignoreIOSBadge||!0===t?1:0;let o=void 0;return Ke(s)||(o=!1===s?1:0),Ke(e.disableVoipPush)||(o=!1===e.disableVoipPush?1:0),{...e,badgeMode:t,isVoipPush:o}}function Fo(e){if(He(e))return{pushFlag:!0===e.disablePush?1:0,title:e.title||\"\",desc:e.description||\"\",ext:e.extension||\"\",apnsInfo:Oo(e),androidInfo:ko(e)}}const xo=1,Vo=15,Ho=[17,18,20];class jo{constructor(e){this._grpM=e,this._n=\"GroupSystemNoticeHandler\",this.pendencyMap=new Map}onNewGroupSystemNotice(e){var{dataList:e,isSyncingEnded:t,isInstantMessage:s}=e,{eventDataList:e,result:r}=(ct.d(this._n+\".onReceiveSystemNotice count:\"+e.length),this._assembly({notifiesList:e,isInstantMessage:s}));0{e.forEach(e=>{this.pendencyMap.set(`${e.from}_${e.groupID}_`+e.to,e)});const t=this._grpM.get(o).getLocalMessageList(le),i=[];t.forEach(e=>{const{operatorID:t,operationType:s,groupProfile:o}=e.payload;if(s===xo){const s=`${t}_${o.groupID}_`+o.to,r=this.pendencyMap.get(s);r&&xe(r.handled)&&0!==r.handled&&i.push(e)}}),this.deleteGroupSystemNotice({messageList:i})})}deleteGroupSystemNotice(e){const s=this._n+\".deleteGroupSystemNotice\";return je(e.messageList)&&0!==e.messageList.length?(ct.l(s+\" \"+e.messageList.map(e=>e.ID)),this._grpM.req({P:Ds,data:{messageListToDelete:e.messageList.map(e=>({from:le,messageSeq:e.clientSequence,messageRandom:e.random}))}}).then(()=>{ct.l(s+\" ok\");const t=this._grpM.get(o);return e.messageList.forEach(e=>{t.deleteLocalMessage(e)}),ht()}).catch(e=>(ct.e(s+\" error:\",e),Kt(e)))):jt()}_getPendencyList(e={}){var{type:e,startTime:t=0,limit:s=20}=e;return this._grpM.req({P:ys,data:{type:e,startTime:t,limit:s,handleAccount:this._grpM.getMyUserID()}}).then(e=>{const t=e.data.pendencyList;return 0!==e.data.nextStartTime?this._getPendencyList({startTime:e.data.nextStartTime}).then(e=>[...t,...e]):t})}getGroupApplicationList(){return this._getPendencyList().then(t=>this._getPendencyList({type:de}).then(e=>(t.push(...e),this._handlePendencyResult(t))).catch(e=>this._handlePendencyResult(t)))}_handlePendencyResult(e){const t=[];return e.forEach(e=>{this.pendencyMap.set(`${e.from}_${e.groupID}_`+e.to,e),0===e.handled&&t.push({applicant:e.from,applicantNick:e.fromUserNickName,groupName:e.groupName,groupID:e.groupID,authentication:e.authentication,messageKey:e.time,applicationType:e.applicationType,userID:e.userID,note:e.note})}),jt({applicationList:t})}_onReceivedGroupSystemNotice({result:e,isInstantMessage:t}){t&&e.forEach(e=>{switch(e.payload.operationType){case 1:break;case 2:this._onApplyJoinGroup(e);break;case 3:break;case 4:this._onMemberKicked(e);break;case 5:this._onGroupDismissed(e);break;case 6:break;case 7:this._onInviteGroup(e);break;case 8:this._onQuitGroup(e);break;case 9:this._onSetManager(e);break;case 10:this._onDeleteManager(e);break;case 11:case 12:case 15:break;case 20:this._onMessageRemindTypeSynced(e);break;case 21:this._grpM.onAVChatRoomMemberBanned(e)}})}_onApplyJoinGroup(e){var{groupID:e,groupType:t}=e.payload.groupProfile,s=this._grpM.hasLocalGroup(e);ct.l(this._n+`._onApplyJoinGroup groupID:${e} groupType:${t} hasGroup:`+s),s||st(t)||this._grpM.getGroupProfile({groupID:e}).then(({data:{group:e}})=>{e&&(this._grpM.updateGroupMap([e]),e=!e.isSupportTopic,this._grpM.emitGroupListUpdate(!0,e))})}_onMemberKicked(e){e=e.payload.groupProfile.groupID;this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e)}_onGroupDismissed(e){var e=e.payload.groupProfile.groupID,t=(this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e),this._grpM)[\"_AVChatRoomHandler\"];t&&t.checkJoinedAVChatRoomByID(e)&&t.reset(e)}_onInviteGroup(e){const t=e.payload.groupProfile.groupID,s=this._grpM.hasLocalGroup(t);ct.l(`${this._n}._onInviteGroup groupID:${t} hasGroup:`+s),this._grpM.getGroupProfile({groupID:t}).then(()=>{this._grpM.emitGroupListUpdate(),this._grpM.get(o).pullMsgOnInvite(\"\"+ue+t)})}_onQuitGroup(e){var{groupID:e,groupType:t}=e.payload.groupProfile,s=this._grpM.hasLocalGroup(e);ct.l(this._n+`._onQuitGroup groupID:${e} groupType:${t} hasGroup:`+s),s&&this._grpM.deleteLocalGroupAndConversation(e)}_onSetManager(e){var{to:e,groupID:t}=e.payload.groupProfile,t=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(t,e);t&&t.updateRole(Ie)}_onDeleteManager(e){var{to:e,groupID:t}=e.payload.groupProfile,t=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(t,e);t&&t.updateRole(ye)}_onMessageRemindTypeSynced(e){var t=e.payload.groupProfile[\"groupID\"],e=e.payload.messageRemindType;this._grpM.get(o).onGroupMsgRemindTypeUpdated({groupID:t,messageRemindType:e})}_handleTopicSystemNotice(e){var{groupProfile:{groupID:e,topicID:t},elements:{operationType:o,topicIDList:r,messageRemindType:i}}=e,n=this._grpM.get(s);17===o?n.onTopicCreated({groupID:e,topicID:t}):18===o?n.onTopicDeleted({groupID:e,topicIDList:r}):20===o&&n.onMessageRemindTypeUpdated({groupID:e,topicID:t,messageRemindType:i})}reset(){this.pendencyMap.clear()}}class Ko extends class{constructor(e){this._m=e,this._n=\"\"}isLoggedIn(){return this._m.get(r).isLoggedIn()}isOversea(){return this._m.get(r).isOversea()}isPrivateNetWork(){var e=this._m.get(r);return e.isPrivateNetWork()&&!e.getFileDownloadProxy()}getFileDownloadProxy(){return this._m.get(r).getFileDownloadProxy()}getDowloadFileAuthKey(){return this._m.get(r).getDowloadFileAuthKey()}getMyUserID(){return this._m.get(r).getUserID()}getMyTinyID(){return this._m.get(r).getTinyID()}getSDKAppID(){return this._m.get(r).getSDKAppID()}isIntl(){return this._m.get(r).isIntl()}isUsingChatCore(){return this._m.get(r).isUsingChatCore()}isDevMode(){return this._m.get(r).isDevMode()}get(e){return this._m.get(e)}getPlatform(){return k}getCloudConfig(e){return this._m.get(u).getCloudConfig(e)}emitOEvt(e,t){this._m.getOEmitInst().emit(e,t)}emitIEvt(e,t){this._m.getIEmitInst().emit(e,t)}getIEmitInst(){return this._m.getIEmitInst()}req(e){return this._m.get(a).req(e)}canIUse(e){return this._m.get(l).canIUse(e)}getErrMsg(e,t,s){return this._m.getErrMsg(e,t,s)}warn(e,t,s){e=this.getErrMsg(e,t,s);e&&ct.w(e)}noUse(e){var t=Et;return Kt({code:t,message:this.getErrMsg(t,e)})}}{constructor(e){super(e),this._n=\"GroupModule\",this._commonGroupHandler=new Mo(this),this._groupAttributesHandler=new Go(this),this._groupCountersHandler=new So(this),this._AVChatRoomHandler=new wo(this),this._groupTipsHandler=new fo(this),this._groupSystemNoticeHandler=new jo(this),this._groupMemberHandler=new No(this),this.groupMap=new Map,this._unjoinedAVChatRoomList=new Map,this._receiptDetailCompleteMap=new Map,this._onlineMemberCountMap=new Map,this._timeoutIDs=[],this.getIEmitInst().on(Bt.CLOUD_CONFIG,this._onCloudConfig,this)}_onCloudConfig(){var e=this.getCloudConfig(\"polling_interval\"),t=this.getCloudConfig(\"polling_interval_plus\"),s=this.getCloudConfig(\"polling_no_msg_count\"),o=this.getCloudConfig(\"polling_simplified_msg\"),r=this.getCloudConfig(\"paging_grp_count\");ct.l(this._n+`._onCloudConfig pollingInterval:${e} pollingIntervalPlus:${t} pollingNoMessageCount:${s} pollingSimplifiedMessage:${o} pagingGroupCount:`+r),this._AVChatRoomHandler.setPollingInterval(e),this._AVChatRoomHandler.setPollingIntervalPlus(t),this._AVChatRoomHandler.setPollingNoMessageCount(s),this._AVChatRoomHandler.setPollingSimplifiedMessage(o),this._commonGroupHandler.setPagingGroupCount(r)}onCheckTimer(e){this.isLoggedIn()&&(this._commonGroupHandler.onCheckTimer(e),this._groupTipsHandler.onCheckTimer(e))}guardForAVChatRoom(t){if(t.conversationType!==ue)return jt();{const s=rt(t.to)?it(t.to):t.to;return this.hasLocalGroup(s)?jt():this.getGroupProfile({groupID:s}).then(e=>{e=e.data.group.type;if(ct.l(`${this._n}.guardForAVChatRoom. groupID:${s} type:`+e),e!==me)return jt();{const e=mt;return Kt(new gt({code:e,message:this.getErrMsg(e,t.from,s),data:{message:t}}))}})}}checkJoinedAVChatRoomByID(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}onNewMessage(e){this._commonGroupHandler.onNewMessage(e)}updateNextMessageSeq(e){if(je(e)){const o=this.get(s);e.forEach(e=>{var t=e.conversationID.replace(ue,\"\");rt(t)&&o.updateUnreadCountAndLastMsg(t,e.lastMessage),this.groupMap.has(t)&&(this.groupMap.get(t).nextMessageSeq=e.lastMessage.sequence+1)})}}onNewGroupTips(e){this._groupTipsHandler.onNewGroupTips(e)}onMsgRevoked(e,t=!0){this._commonGroupHandler.onMsgRevoked(e,t)}onNewGroupSystemNotice(e){this._groupSystemNoticeHandler.onNewGroupSystemNotice(e)}onMsgReadNotice(e){e.dataList.forEach(i=>{var e=i.elements[\"groupMessageReadNotice\"];if(!Ke(e)){const i=this.get(o);e.forEach(e=>{var{groupID:e,topicID:t,lastMessageSeq:s}=e;ct.l(this._n+`.onMsgReadNotice groupID:${e} lastMessageSeq:`+s);let o=\"\"+ue+e,r=!0;qe(t)||(o=\"\"+ue+t,r=!1),i.updateIsReadAfterReadReport({conversationID:o,lastMessageSeq:s}),i.updateUnreadCount(o,r),i.clearGroupAtInfoList(o,r)})}})}onReadReceiptList(e){ct.l(this._n+\".onReadReceiptList options:\",e),e.dataList.forEach(e=>{var{groupProfile:e,elements:t}=e,e=e[\"groupID\"],t=t[\"readReceiptList\"];this.get(o).updateReadReceiptInfo({groupID:e,readReceiptList:t})})}onMsgModified(e){ct.l(this._n+\".onMsgModified options:\",e);const t=this.get(o);e.dataList.forEach(e=>{t.onMessageModified({...e,conversationType:ue,to:e.topicID||e.groupID})})}deleteGroupSystemNotice(e){this._groupSystemNoticeHandler.deleteGroupSystemNotice(e)}initGroupMap(e){this.groupMap.set(e.groupID,new $o(e))}clearGroupMap(){this.groupMap.clear()}deleteGroup(e){this.groupMap.delete(e)}updateGroupMap(e){const t=this.get(o);let s;e.forEach(e=>{s=e.groupID,this.groupMap.has(s)?this.groupMap.get(s).updateGroup(e):(this.groupMap.set(s,new $o(e)),t.deleteGroupRoamingInfo(s))});var r=this.getMyUserID();for(const[,o]of this.groupMap)o.selfInfo.userID=r,\"Owner\"===o.selfInfo.role&&(o.ownerID=r)}getGroupMap(){return this.groupMap}getLocalGroupList(){return[...this.groupMap.values()].filter(e=>e.type!==_e&&e.type!==fe)}getLocalGroupProfile(e){return this.groupMap.get(e)}sortLocalGroupList(){var e=[...this.groupMap].filter(([,e])=>!qe(e.lastMessage));e.sort((e,t)=>t[1].lastMessage.lastTime-e[1].lastMessage.lastTime),this.groupMap=new Map([...e])}updateGroupLastMessage(e){this._commonGroupHandler.updateLastMsg(e)}emitGroupListUpdate(e=!0,t=!0){var s=this.getLocalGroupList();if(e&&this.emitOEvt(kt),t){const e=JSON.parse(JSON.stringify(s));this.get(o).updateConvGroupProfile(e)}}getMyNameCardByGroupID(e){e=this.getLocalGroupProfile(e);return e?e.selfInfo.nameCard:\"\"}isPagingGetCompleted(){return this._commonGroupHandler.isPagingGetCompleted()}getMsgRemindType(e){return!je(e)||0===e.length||0===(e=e.filter(e=>!st(this.getLocalGroupProfile(e).type))).length?Promise.resolve():(ct.l(this._n+\".getMsgRemindType groupIDList:\"+e),this.getGroupProfileAdvance({groupIDList:e,responseFilter:{memberInfoFilter:[\"MsgFlag\"]}}).then(e=>{const t=e.data[\"successGroupList\"],s=this.get(o);t.forEach(e=>{s.onGroupMsgRemindTypeUpdated({groupID:e.groupID,messageRemindType:je(e.members)?e.members[0].messageRemindType:\"\"})})}))}getGroupList(){return this._commonGroupHandler.getGroupList()}syncCommunityWithTopic(){return this._commonGroupHandler.syncGroupList(!0)}getGroupProfile(t){const r=this._n+\".getGroupProfile\",i=new Zt(\"getGroupProfile\"),{groupID:n,groupCustomFieldFilter:e}=t;ct.l(r+\" groupID:\"+n);var s={groupIDList:[n],responseFilter:{groupBaseInfoFilter:[...L],groupCustomFieldFilter:e,memberInfoFilter:[...C,\"NameCard\"]}};return this.getGroupProfileAdvance(s).then(({data:{successGroupList:e,failureGroupList:t}})=>{if(ct.l(r+\" ok\"),0(i.setError(e).setMessage(\"groupID:\"+t.groupID).end(),ct.e(r+\" failed. error:\",e),Kt(e)))}getGroupProfileAdvance(e){const t=this._n+\".getGroupProfileAdvance\",s=e[\"groupIDList\"],o=(je(s)&&50{(ot({groupID:e})?r:o).push(e)});var i=[];if(0{const t=[],s=[];return e.forEach(e=>{t.push(...e.successGroupList),s.push(...e.failureGroupList)}),ht({successGroupList:t,failureGroupList:s})}).catch(e=>(ct.e(t+\" failed. error:\",e),Kt(e)))}_getGroupProfileAdvance(t){const{relayFlag:s=!1,...o}=t;return this.req({P:ss,data:o}).then(e=>{ct.l(this._n+\"._getGroupProfileAdvance ok. options:\",o);e=e.data.groups;return{successGroupList:e.filter(e=>Ke(e.errorCode)||0===e.errorCode),failureGroupList:e.filter(e=>e.errorCode&&0!==e.errorCode).map(e=>new gt({code:e.errorCode,message:e.errorInfo,data:{groupID:e.groupID}}))}}).catch(e=>s&&ot({groupID:t.groupIDList[0]})?{successGroupList:[],failureGroupList:[]}:Kt(e))}createGroup(u){const s=[he,ce,ge,me,de],o=this._n+\".createGroup\",{type:r,groupID:i}=u;if(u.name&&!1===this._filterProfanity(\"name\",u))return Kt({code:wt});if(u.introduction&&!1===this._filterProfanity(\"introduction\",u))return Kt({code:wt});if(u.notification&&!1===this._filterProfanity(\"notification\",u))return Kt({code:wt});if(!s.includes(r))return Kt({code:_t});if(!ot({type:r})){if(!qe(i)&&ot({groupID:i}))return Kt({code:ft});u.isSupportTopic=void 0}if(st(r)&&!Ke(u.memberList)&&0{const{groupID:i,overLimitUserIDList:n=[]}=r.data;l=i,h=n;r=`groupType:${u.type} groupID:${i} overLimitUserIDList:`+n;if(p.setMessage(r).end(),ct.l(o+\" ok. \"+r),u.type!==me&&(u.type!==de||1!==u.isSupportTopic)){qe(u.memberList)||qe(n)||(u.memberList=u.memberList.filter(e=>-1===n.indexOf(e.userID))),this.updateGroupMap([{...u,groupID:i}]);r=this.get(e);let s=\"\",o=0;u.type===de?(s=this.isIntl()?\"Create Community\":\"创建社群\",o=1):s=this.isIntl()?\"Create Group\":\"创建群组\";var a=this.get(t).getMyNick(),a=r.createCustomMessage({to:i,conversationType:ue,payload:{data:JSON.stringify({businessID:\"group_create\",content:s,cmd:o,opUser:a||this.getMyUserID(),version:4})}});r.sendMessageInstance(a),this.emitGroupListUpdate()}return this.getGroupProfile({groupID:i})}).then(e=>{var e=e.data[\"group\"],{nameCard:t,joinTime:s}=e.selfInfo;return e.updateSelfInfo({nameCard:t,joinTime:s,messageRemindType:Ae,role:Me}),ht({group:e,overLimitUserIDList:h})}).catch(e=>{var t;return p.setMessage(\"groupType:\"+u.type).setError(e).end(),10010===e.code||10007===e.code?(this._silentlyGetGroupProfile(e.code,l),this.updateGroupMap([{...u,groupID:l}]),(t=this.getLocalGroupProfile(l)).selfInfo.role=Me,ht({group:t,overLimitUserIDList:h})):(ct.e(o+\" failed. error:\",e),Kt(e))})}dismissGroup(e){const t=this._n+\".dismissGroup\",s=\"groupID:\"+e,o=new Zt(\"dismissGroup\");return o.setMessage(s),ct.l(t+\" \"+s),this.req({P:rs,data:{groupID:e}}).then(()=>(o.end(),ct.l(t+\" ok\"),this.deleteLocalGroupAndConversation(e),this.checkJoinedAVChatRoomByID(e)&&this._AVChatRoomHandler.reset(e),this._groupAttributesHandler.deleteLocalGroupAttributes(e),ht({groupID:e}))).catch(e=>(o.setError(e).end(),ct.e(t+\" failed. error:\",e),Kt(e)))}updateGroupProfile(e){const t=this._n+\".updateGroupProfile\";if(this.hasLocalGroup(e.groupID)){const s=this.getLocalGroupProfile(e.groupID).type;this._canIUseJoinOption(s)||Ke(e.joinOption)||(ct.w(t+\" joinOption is unavailable for Work/Meeting/AVChatRoom\"),e.joinOption=void 0)}if(Ke(e.muteAllMembers)||(e.muteAllMembers?e.muteAllMembers=\"On\":e.muteAllMembers=\"Off\"),e.name&&!1===this._filterProfanity(\"name\",e))return Kt({code:wt});if(e.introduction&&!1===this._filterProfanity(\"introduction\",e))return Kt({code:wt});if(e.notification&&!1===this._filterProfanity(\"notification\",e))return Kt({code:wt});const s=new Zt(\"updateGroupProfile\");return s.setMessage(JSON.stringify(e)),ct.l(t+\" groupID:\"+e.groupID),this.req({P:is,data:e}).then(()=>(s.end(),ct.l(t+\" ok\"),this.hasLocalGroup(e.groupID)&&this.groupMap.get(e.groupID).updateGroup(e),ht({group:this.groupMap.get(e.groupID)}))).catch(e=>(s.setError(e).end(),ct.l(t+\" failed. error:\",e),Kt(e)))}_filterProfanity(e,t){var s,o=this.get(c);return!o||({isAllowedToSend:o,modifiedText:s}=o.filterText(t[e],y),!0===o&&(t[e]=s,!0))}joinGroup(t){const s=t[\"groupID\"],o=this._n+\".joinGroup\";if(this.deleteUnjoinedAVChatRoom(s),this.hasLocalGroup(s)){if(!this.isLoggedIn())return jt({status:Te});const r=new Zt(\"applyJoinGroup\");return this.getGroupProfile({groupID:s}).then(()=>(r.setMessage(`groupID:${s} joinedStatus:`+Te).end(),jt({status:Te}))).catch(e=>(r.setMessage(`groupID:${s} unjoined`).end(),ct.w(o+` ${s} was unjoined, now join!`),this.groupMap.delete(s),this.applyJoinGroup(t)))}return ct.l(o+\" groupID:\"+s),this.isLoggedIn()?this.applyJoinGroup(t):this._AVChatRoomHandler.joinWithoutAuth(t)}applyJoinGroup(e){const a=this._n+\".applyJoinGroup\",{groupID:u,applyMessage:t}=e;if(!qe(t)&&!1===this._filterProfanity(\"applyMessage\",e))return Kt({code:wt});const p=new Zt(\"applyJoinGroup\"),s={...e},l=this.canIUse(I.AV_HISTORY_MSG);return l&&(s.historyMessageFlag=1),this.get(o).deleteTopicRoamingInfo(u),this.req({P:ns,data:s}).then(({data:{joinedStatus:e,longPollingKey:t,startSeq:s,avChatRoomFlag:o,avChatRoomKey:r,messageList:i}})=>{var n=`groupID:${u} joinedStatus:${e} longPollingKey:${t} startSeq:${s} avChatRoomFlag:${o} canGetAVChatRoomHistoryMsg:${l}, historyMsgCount:`+(qe(i)?0:i.length);switch(p.setMessage(n).end(),ct.l(a+\" ok. \"+n),e){case Ee:return ht({status:Ee});case $e:return this.getGroupProfile({groupID:u}).then(({data:{group:e}})=>this._handleJoinResult({group:e,avChatRoomFlag:o,longPollingKey:t,startSeq:s,avChatRoomKey:r,messageList:i})).catch(e=>{if(10010!==e.code&&10007!==e.code)return ct.e(a+\" failed. error:\",e),Kt(e);{this._silentlyGetGroupProfile(e.code,u);const a=new $o({groupID:u});return this.updateGroupMap([a]),this._handleJoinResult({group:a,avChatRoomFlag:o,longPollingKey:t,startSeq:s,avChatRoomKey:r,messageList:i})}});default:{const e=new gt({code:Lt});return ct.e(a+\" failed. error:\",e),Kt(e)}}}).catch(e=>(p.setMessage(\"groupID:\"+u).setError(e).end(),ct.e(a+\" failed. error:\",e),Kt(e)))}_handleJoinResult(e){const{group:t,avChatRoomFlag:s,longPollingKey:r,startSeq:i,avChatRoomKey:n,messageList:a}=e,u=t[\"groupID\"];return 1===s?(this.get(o).setCompleted(\"\"+ue+u),this._groupAttributesHandler.initGroupAttributesCache({groupID:u,avChatRoomKey:n}),this._groupCountersHandler.initGroupCountersCache({groupID:u,avChatRoomKey:n}),(e=Ke(r)?this._AVChatRoomHandler.handleJoinResult({group:t}):this._AVChatRoomHandler.startRunLoop({group:t,longPollingKey:r,startSeq:i})).then(()=>{this._onAVChatRoomHistoryMessage(a,u)}),e):(this.emitGroupListUpdate(!0,!1),ht({status:$e,group:t}))}quitGroup(e){const t=this._n+\".quitGroup\",s=\"groupID:\"+e,o=(ct.l(t+\" \"+s),this.checkJoinedAVChatRoomByID(e));if(!o&&!this.hasLocalGroup(e))return Kt({code:Dt});if(o&&!this.isLoggedIn())return ct.l(t+\" anonymously ok. \"+s),this.deleteLocalGroupAndConversation(e),this._AVChatRoomHandler.reset(e),jt({groupID:e});const r=new Zt(\"quitGroup\");return r.setMessage(s),this.req({P:us,data:{groupID:e}}).then(()=>(r.end(),ct.l(t+\" ok\"),this.deleteLocalGroupAndConversation(e),o&&this._AVChatRoomHandler.reset(e),this._groupAttributesHandler.deleteLocalGroupAttributes(e),ht({groupID:e}))).catch(e=>(r.setError(e).end(),ct.e(t+\" failed. error:\",e),Kt(e)))}searchGroupByID(e){const t=this._n+\".searchGroupByID\",s={groupIDList:[e]},o=new Zt(\"searchGroupByID\");return o.setMessage(\"groupID:\"+e),ct.l(t+\" groupID:\"+e),this.req({P:ps,data:s}).then(({data:{groupProfile:e}})=>{if(0!==e[0].errorCode)throw new gt({code:e[0].errorCode,message:e[0].errorInfo});return o.end(),ct.l(t+\" ok\"),ht({group:new $o(e[0])})}).catch(e=>(o.setError(e).end(),ct.w(t+\" failed. error:\",e),Kt(e)))}changeGroupOwner(o){const r=this._n+\".changeGroupOwner\";if(this.hasLocalGroup(o.groupID)&&this.getLocalGroupProfile(o.groupID).type===me)return Kt({code:It});if(o.newOwnerID===this.getMyUserID())return Kt({code:yt});const i=new Zt(\"changeGroupOwner\");return i.setMessage(`groupID:${o.groupID} newOwnerID:`+o.newOwnerID),ct.l(r+\" groupID:\"+o.groupID),this.req({P:ls,data:o}).then(()=>{i.end(),ct.l(r+\" ok\");var{groupID:e,newOwnerID:t}=o,s=(this.groupMap.get(e).ownerID=t,this._groupMemberHandler.getLocalGroupMemberList(e));if(s instanceof Map){const o=s.get(this.getMyUserID()),r=(Ke(o)||(o.updateRole(\"Member\"),this.groupMap.get(e).selfInfo.role=\"Member\"),s.get(t));Ke(r)||r.updateRole(\"Owner\")}return this.emitGroupListUpdate(!0,!1),ht({group:this.groupMap.get(e)})}).catch(e=>(i.setError(e).end(),ct.e(r+\" failed. error:\",e),Kt(e)))}getGroupApplicationList(){return this._groupSystemNoticeHandler.getGroupApplicationList()}handleGroupApplication(e){const t=this._n+\".handleGroupApplication\",{handleAction:s,handleMessage:o,message:r,application:i}=e;let n,a,u,p,l,h=(r?(n=r.payload.operatorID,a=r.payload.groupProfile.groupID,u=r.payload.authentication,p=r.payload.messageKey):i&&(n=i.applicant,a=i.groupID,u=i.authentication,p=i.messageKey),cs);i&&2===i.applicationType&&(h=hs,l=i.userID);const c=new Zt(\"handleGroupApplication\");return c.setMessage(\"groupID:\"+a),ct.l(t+\" groupID:\"+a),this.req({P:h,data:{handleAction:s,handleMessage:o,applicant:n,invitee:l,groupID:a,authentication:u,messageKey:p}}).then(()=>(c.end(),ct.l(t+\" ok\"),r&&this._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),ht({group:this.getLocalGroupProfile(a)}))).catch(e=>(c.setError(e).end(),ct.e(t+\" failed. error\",e),Kt(e)))}handleGroupInvitation(e){const t=this._n+\".handleGroupInvitation\",{groupProfile:{groupID:s},authentication:o,messageKey:r,operatorID:i}=e.message.payload,n=e[\"handleAction\"],a=new Zt(\"handleGroupInvitation\");return a.setMessage(`groupID:${s} inviter:${i} handleAction:`+n),ct.l(t+` groupID:${s} inviter:${i} handleAction:`+n),this.req({P:gs,data:{...e,inviter:i,groupID:s,authentication:o,messageKey:r}}).then(()=>(a.end(),ct.l(t+\" ok\"),this._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),ht({group:this.getLocalGroupProfile(s)}))).catch(e=>(a.setError(e).end(),ct.e(t+\" failed. error\",e),Kt(e)))}getGroupOnlineMemberCount(t){const s=this._n+\".getGroupOnlineMemberCount\",e=this._AVChatRoomHandler.checkJoinedAVChatRoomByID(t),o=this.hasLocalGroup(t);if(ct.l(s+` groupID:${t} isAVChatRoom:${e} has:`+o),e)return this._AVChatRoomHandler.getGroupOnlineMemberCount(t);if(!o)return jt({memberCount:0});var r=Date.now();if(this._onlineMemberCountMap.has(t)){const s=this._onlineMemberCountMap.get(t);if(r-s.lastReqTime<=6e4)return jt({memberCount:s.memberCount});s.lastReqTime=r}return this.requestOnlineCount(t).then(e=>{var{memberCount:e=0}=e.data;return this._onlineMemberCountMap.set(t,{lastReqTime:Date.now(),memberCount:e}),ct.l(s+` ok. groupID:${t} memberCount:`+e),jt({memberCount:e})}).catch(e=>(ct.w(s+\" failed. error:\",e),Promise.reject(e)))}requestOnlineCount(e){return this.req({P:Gs,data:{groupID:e}})}hasLocalGroup(e){return this.groupMap.has(e)}deleteLocalGroupAndConversation(e){const t=this.checkJoinedAVChatRoomByID(e);ct.l(this._n+`.deleteLocalGroupAndConversation groupID:${e} isJoinedAVChatRoom:`+t);var r=this.get(o),i=\"\"+ue+e;if(t&&(this.stopMessageLongPolling({groupID:e}),r.deleteLocalConv(i)),ot({groupID:e})){const t=this.getLocalGroupProfile(e);t&&!0===t.isSupportTopic&&this.get(s).deleteTopicListInCommunity(e)}r.clearUnreadCount(i),r.setCompleted(i),this._deleteLocalGroup(e),this._onlineMemberCountMap.delete(e),this.emitGroupListUpdate(!0,!1)}_deleteLocalGroup(e){this.groupMap.delete(e),this._groupMemberHandler.deleteGroupMemberList(e)}sendMessage(e,t){return je(e._receiverList)&&0(c=e,ct.l(u+` groupID:${l} startSequence:`+c),this.req({P:_s,data:{groupID:l,count:21,sequence:c,topicID:g}}))).then(e=>{var{messageList:t,complete:s,invisibleSequenceList:r=[]}=e.data;let{nextSequence:i=0}=e.data;Ke(t)?ct.l(u+` ok. complete:${s} nextSequence:${i} but messageList is undefined!`):ct.l(u+` ok. complete:${s} nextSequence:${i} count:`+t.length),h.setMessage(`groupID:${l} topicID:${g} startSequence:${c} complete:${s} nextSequence:`+i).end();e=this.get(o);let n=[];var a=[],t=(qe(t)||(n=e.onRoamingMessage(t,p,!0,a),e.updateIsRead(p),e.patchConvLastMessage(p)),2===s||i<1);return t&&(e.setCompleted(p),i=\"\"),ct.l(u+` isPullingCompleted:${t} nextReqID:${i} storedMsgCount:${n.length} invisibleSeqCount:`+r.length),{nextReqID:i+\"\",storedMessageList:n,assembledMessageList:a,isPullingCompleted:t}}).catch(e=>(h.setError(e).setMessage(`groupID:${l} topicID:${g} startSequence:`+c).end(),ct.w(u+\" failed. error:\",e),Kt(e)))}_getGroupIDOfMessage(e){return e.conversationID.replace(ue,\"\")}getReadReceiptList(s){const t=this._n+\".getReadReceiptList\",e=this._getGroupIDOfMessage(s[0]),o=this.getMyUserID(),r=s.filter(e=>e.from===o&&!0===e.needReadReceipt).map(e=>({sequence:e.sequence}));if(ct.l(t+` groupID:${e} sequenceList:`+JSON.stringify(r)),0===r.length)return jt({messageList:s});const i=new Zt(\"getReadReceiptList\");return i.setMessage(\"groupID:\"+e),this.req({P:fs,data:{groupID:e,sequenceList:r}}).then(e=>{i.end(),ct.l(t+\" ok\");e=e.data.readReceiptList;return je(e)&&e.forEach(t=>{s.forEach(e=>{0===t.code&&t.sequence===e.sequence&&(e.readReceiptInfo.readCount=t.readCount,e.readReceiptInfo.unreadCount=t.unreadCount)})}),ht({messageList:s})}).catch(e=>(i.setError(e).end(),ct.w(t+\" failed. error:\",e),Kt(e)))}sendReadReceipt(e){const t=this._n+\".sendReadReceipt\",s=this._getGroupIDOfMessage(e[0]),o=new Zt(\"sendReadReceipt\"),r=(o.setMessage(\"groupID:\"+s),this.getMyUserID()),i=e.filter(e=>e.from!==r&&!0===e.needReadReceipt).map(e=>({sequence:e.sequence}));return 0===i.length?Kt({code:dt}):(ct.l(t+\". sequenceList:\"+JSON.stringify(i)),this.req({P:Ms,data:{groupID:s,sequenceList:i}}).then(e=>(o.end(),ct.l(t+\" ok\"),ht())).catch(e=>(o.setError(e).end(),ct.w(t+\" failed. error:\",e),Kt(e))))}getReadReceiptDetail(e){const{message:t,filter:s,cursor:o,count:r}=e,i=this._getGroupIDOfMessage(t),n=t.ID,a=t.sequence,u=this._n+\".getReadReceiptDetail\",p=this._receiptDetailCompleteMap.get(n)||!1,l=0!==s&&1!==s?0:s,h=Ve(o)?o:\"\",c=!xe(r)||r<=0||100<=r?100:r,g=`groupID:${i} sequence:${a} cursor:${h} filter:${l} completeFlag:`+p,m=(ct.l(u+\" \"+g),{cursor:\"\",isCompleted:!1,messageID:n,unreadUserIDList:[],readUserIDList:[]}),d=new Zt(\"getReadReceiptDetail\");return d.setMessage(g),this.req({P:Is,data:{groupID:i,sequence:a,flag:l,cursor:h,count:c}}).then(e=>{d.end();var{cursor:e,isCompleted:t,unreadUserIDList:s,readUserIDList:o}=e.data;return m.cursor=e,1===t&&(m.isCompleted=!0,this._receiptDetailCompleteMap.set(n,!0)),0===l?m.readUserIDList=o.map(e=>e.userID):1===l&&(m.unreadUserIDList=s.map(e=>e.userID)),ct.l(u+\" ok\"),ht(m)}).catch(e=>(d.setError(e).end(),ct.w(u+\" failed. error:\",e),Kt(e)))}getRoamingMessagesHopping(p){const l=this._n+\".getRoamingMessagesHopping\";let{groupID:t,count:s,sequence:h,direction:c}=p,r=void 0;return Ke(h)&&1===c?jt({messageList:[],isCompleted:!0,nextMessageSeq:\"\"}):(rt(t)&&(t=it(r=t)),this._computeReqSeqHopping({groupID:t,topicID:r,sequence:h}).then(e=>{Ke(h)||1!==c||(e=h+s-1);const a=`${r?\"topicID:\"+r:\"groupID:\"+t} sequence:${h} reqSeq:${e} direction:`+c,u=(ct.l(l+\" \"+a),new Zt(\"getRoamingMessagesHopping\"));return this.req({P:_s,data:{groupID:t,topicID:r,count:s,sequence:e}}).then(e=>{var{messageList:e=[],complete:t,nextSequence:s=0,invisibleSequenceList:r=[]}=e.data,i=`complete:${t} nextSequence:${s} remoteMsgCount:${e.length} invisibleSequenceList:`+r,i=(u.setMessage(a+\" \"+i).end(),ct.l(l+\" ok. \"+i),\"\"+ue+p.groupID),n=this.get(o),i=n.onRoamingMessage(e,i,!1),e=this._computeResult({groupID:p.groupID,direction:c,sequence:h,remoteMessageList:e,processedMessageList:i,complete:t,nextSequence:s,invisibleSequenceList:r});return n.storeHoppingMessageList(e.messageList),ht(e)}).catch(e=>(u.setError(e).setMessage(`groupID:${t} sequence:${h} count:`+s).end(),ct.w(l+\" failed. error:\",e),Kt(e)))}))}_computeReqSeqHopping(e){const{groupID:s,topicID:t,sequence:o}=e;return 0{let t=0;return qe(e)||(t=e[0].nextMessageSeq-1),ct.l(`${this._n}._computeReqSeqHopping groupID:${s} lastSequence:${t} from remote`),t}).catch(e=>Kt(e)):Promise.resolve(0)}_computeResult(e){const t={messageList:[],isCompleted:!1,nextMessageSeq:\"\"},{groupID:s,direction:o,sequence:r,remoteMessageList:i=[],processedMessageList:n=[],complete:a,nextSequence:u,invisibleSequenceList:p}=e;if(0===o)return t.nextMessageSeq=u,(2===a||u<1)&&(t.isCompleted=!0,t.nextMessageSeq=\"\"),t.messageList=n,t;if(1===o){if(qe(i)){if(qe(p))return t.isCompleted=!0,t.nextMessageSeq=\"\",t;t.nextMessageSeq=p[0]+1}else{const e=i[0].sequence,s=p[0]||0;t.nextMessageSeq=e>s?e+1:s+1}return n.forEach(e=>{e.sequence>=r&&t.messageList.push(e)}),(ot({groupID:s})||rt(s))&&0===t.messageList.length&&i[0].sequence{a.end(),ct.l(n+\" ok\");var e=this.get(o);e.updateIsReadAfterReadReport({conversationID:r,lastMessageSeq:i});let t=!0;if(!Ke(p)){t=!1;const r=this.get(s).getLocalTopic(u,p);r&&r.updateSelfInfo({readedSequence:i})}return e.updateUnreadCount(r,t),ht()}).catch(e=>(a.setError(e).end(),ct.l(n+\" failed. error:\",e),Kt(e)))}_computeLastSequence(e){var{groupID:e,topicID:t,sequence:s}=e;return 0(qe(e)?ct.w(t+` ${n}, empty successGroupList`):(r=e[0].nextMessageSeq-1,i=n+`, ${r} from remote`,ct.l(t+\" \"+i)),s.setMessage(i).end(),r)).catch(e=>(s.setError(e).setMessage(n).end(),ct.w(t+\" failed. error:\",e),Kt(e)))}isMessageFromOrToAVChatroom(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}hasJoinedAVChatRoom(){return this._AVChatRoomHandler.hasJoinedAVChatRoom()}getJoinedAVChatRoom(){return this._AVChatRoomHandler.getJoinedAVChatRoom()}getGroupRemoteLastSeq(e){e=this.getLocalGroupProfile(e);return e?e.nextMessageSeq-1:1}isOnlineMessage(e,t){return!(!this._canIUseOnlineOnlyFlag(e)||!t||!0!==t.onlineUserOnly)}_canIUseOnlineOnlyFlag(e){var t=this.getJoinedAVChatRoom();return!t||!t.includes(e.to)||e.conversationType!==ue}_onAVChatRoomHistoryMessage(e,t){if(!qe(e)){ct.l(this._n+`._onAVChatRoomHistoryMessage groupID:${t} count:`+e.length);const s=[];e.forEach(e=>{s.push({...e,isHistoryMessage:1})}),this.onAVChatRoomMessage(s,t)}}onAVChatRoomMessage(e,t=\"\"){this._AVChatRoomHandler.onMessage(e,t)}onAVChatRoomMemberBanned(e){this._AVChatRoomHandler.onAVChatRoomMemberBanned(e)}setUnjoinedAVChatRoom(e){this._unjoinedAVChatRoomList.set(e,1)}deleteUnjoinedAVChatRoom(e){this._unjoinedAVChatRoomList.has(e)&&this._unjoinedAVChatRoomList.delete(e)}isUnjoinedAVChatRoom(e){return this._unjoinedAVChatRoomList.has(e)}isGroupAttributesUpdatedNotice(e){return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e)}updateLocalMainSequenceOnReconnected(){this._groupAttributesHandler.updateLocalMainSequenceOnReconnected()}initGroupAttributes(e){return this._groupAttributesHandler.initGroupAttributes(e)}setGroupAttributes(e){return this._groupAttributesHandler.setGroupAttributes(e)}deleteGroupAttributes(e){return this._groupAttributesHandler.deleteGroupAttributes(e)}getGroupAttributes(e){return this._groupAttributesHandler.getGroupAttributes(e)}isMessageFromTopic(e,t){return 2===e&&!qe(t)}isMessageFromCommunityOfTopic(e,t){return 2===e&&qe(t)}getMessageExtensions(e,t){return ct.l(this._n+\".getMessageExtensions startSequence:\"+t),this.req({P:Es,data:{groupID:e.to,messageSequence:e.sequence,startSequence:t}})}modifyMsgExts(e,t,s=1){return ct.l(this._n+\".modifyMsgExts operateType:\"+s),this.req({P:$s,data:{groupID:e.to,messageSequence:e.sequence,extensionList:t,operateType:s}})}_genNotifyReqList(s){var o,r,i,n,a=[];for(let e=0,t=s.length;e{var t;return!!this.hasLocalGroup(e)&&({type:e,isSupportTopic:t}=this.getLocalGroupProfile(e),!st(e))&&!t});0!==s.length&&(ct.l(t+\" list:\"+s),this.req({P:ws,data:{notifyReqList:this._genNotifyReqList(s)}}).then(i=>{const e=i.data[\"notifyRspList\"],n=[];if(je(e)){const i={dataList:[]};let r=t+\" ok.\";e.forEach(e=>{var{nextRevokedTime:t,groupID:s,notifyList:o}=e;r+=` groupID:${s} nextRevokedTime:${t} count:${o.length}\n`,i.dataList.push({elements:{revokedInfos:this._genRevokedInfos(e)}}),0!==t?(this._setGroupLastRevokedTime(s,t),n.push(s)):this._setGroupLastRevokedTime(s,1e3*ve())}),ct.l(r),this.onMsgRevoked(i,!1)}0{ct.e(t+\" failed. error:\",e)}))}_genRevokedInfos(e){const{notifyList:t,groupID:s}=e,o=[];return je(t)&&t.forEach(e=>{o.push({groupID:s,sequence:e.sequence,random:e.random,revokerInfo:{...e.revokerInfo}})}),o}_getGroupLastRevokedTime(e){return this.hasLocalGroup(e)?this.getLocalGroupProfile(e)._lastRevokedTime:0}_setGroupLastRevokedTime(e,t){this.hasLocalGroup(e)&&(this.getLocalGroupProfile(e)._lastRevokedTime=t)}isGroupCountersNotice(e){return this._groupCountersHandler.isGroupCountersNotice(e)}setGroupCounters(e){return this._groupCountersHandler.setGroupCounters(e)}increaseGroupCounter(e){return this._groupCountersHandler.increaseGroupCounter(e)}decreaseGroupCounter(e){return this._groupCountersHandler.decreaseGroupCounter(e)}getGroupCounters(e){return this._groupCountersHandler.getGroupCounters(e)}getGroupMemberHandler(){return this._groupMemberHandler}getGroupMemberList(e){return this._groupMemberHandler.getGroupMemberList(e)}getGroupMemberProfile(e){return this._groupMemberHandler.getGroupMemberProfile(e)}addGroupMember(e){return this._groupMemberHandler.addGroupMember(e)}deleteGroupMember(e){return this._groupMemberHandler.deleteGroupMember(e)}setGroupMemberMuteTime(e){return this._groupMemberHandler.setGroupMemberMuteTime(e)}setGroupMemberRole(e){return this._groupMemberHandler.setGroupMemberRole(e)}setGroupMemberNameCard(e){return this._groupMemberHandler.setGroupMemberNameCard(e)}setGroupMemberCustomField(e){return this._groupMemberHandler.setGroupMemberCustomField(e)}markGroupMemberList(e){return this._groupMemberHandler.markGroupMemberList(e)}modifyGroupMemberInfo(e){return this._groupMemberHandler.modifyGroupMemberInfo(e)}restartPolling(){this._AVChatRoomHandler.restartPolling()}getPollingTimerID(e){var t;return e&&(t=this.getLocalGroupProfile(e))&&st(t.type)?this._AVChatRoomHandler.getPollingTimerID(e):-1}_canIUseJoinOption(e){return e===he||ot({type:e})}_silentlyGetGroupProfile(e,t){var s=setTimeout(this.getGroupProfile.bind(this,{groupID:t}),3e3);this._timeoutIDs.push(s),ct.l(this._n+`._silentlyGetGroupProfile errorCode:${e} groupID:${t} timeoutIDs:`+this._timeoutIDs)}_clearTimeoutIDs(){this._timeoutIDs.forEach(e=>{clearTimeout(e)}),this._timeoutIDs=[]}startMessageLongPolling(e){var{groupID:e,longPollingKey:t,longPollingSequence:s=1}=e,o=this.get(r).isUnlimitedAVChatRoom(),i=(this._AVChatRoomHandler.hasPollingInstance(e)&&this.stopMessageLongPolling({groupID:e}),this._AVChatRoomHandler.getJoinedLiveList()),o=(!o&&0 typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { - get: (a, b) => (typeof require !== "undefined" ? require : a)[b] -}) : x)(function(x) { - if (typeof require !== "undefined") - return require.apply(this, arguments); - throw Error('Dynamic require of "' + x + '" is not supported'); -}); -var __commonJS = (cb, mod) => function __require2() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; - -export { - __require, - __commonJS -}; -//# sourceMappingURL=chunk-TDUMLE5V.js.map diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/chunk-TDUMLE5V.js.map b/jiuyi2/unpackage/dist/cache/.vite/deps/chunk-TDUMLE5V.js.map deleted file mode 100644 index 98652118..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/chunk-TDUMLE5V.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": [], - "sourcesContent": [], - "mappings": "", - "names": [] -} diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js b/jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js deleted file mode 100644 index a1345a10..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js +++ /dev/null @@ -1,6591 +0,0 @@ -import { - __commonJS, - __require -} from "./chunk-TDUMLE5V.js"; - -// browser-external:crypto -var require_crypto = __commonJS({ - "browser-external:crypto"(exports, module) { - module.exports = Object.create(new Proxy({}, { - get(_, key) { - if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") { - console.warn(`Module "crypto" has been externalized for browser compatibility. Cannot access "crypto.${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`); - } - } - })); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/core.js -var require_core = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/core.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(); - } else if (typeof define === "function" && define.amd) { - define([], factory); - } else { - root.CryptoJS = factory(); - } - })(exports, function() { - var CryptoJS = CryptoJS || function(Math2, undefined2) { - var crypto; - if (typeof window !== "undefined" && window.crypto) { - crypto = window.crypto; - } - if (typeof self !== "undefined" && self.crypto) { - crypto = self.crypto; - } - if (typeof globalThis !== "undefined" && globalThis.crypto) { - crypto = globalThis.crypto; - } - if (!crypto && typeof window !== "undefined" && window.msCrypto) { - crypto = window.msCrypto; - } - if (!crypto && typeof global !== "undefined" && global.crypto) { - crypto = global.crypto; - } - if (!crypto && typeof __require === "function") { - try { - crypto = require_crypto(); - } catch (err) { - } - } - var cryptoSecureRandomInt = function() { - if (crypto) { - if (typeof crypto.getRandomValues === "function") { - try { - return crypto.getRandomValues(new Uint32Array(1))[0]; - } catch (err) { - } - } - if (typeof crypto.randomBytes === "function") { - try { - return crypto.randomBytes(4).readInt32LE(); - } catch (err) { - } - } - } - throw new Error("Native crypto module could not be used to get secure random number."); - }; - var create = Object.create || /* @__PURE__ */ function() { - function F() { - } - return function(obj) { - var subtype; - F.prototype = obj; - subtype = new F(); - F.prototype = null; - return subtype; - }; - }(); - var C = {}; - var C_lib = C.lib = {}; - var Base = C_lib.Base = /* @__PURE__ */ function() { - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function(overrides) { - var subtype = create(this); - if (overrides) { - subtype.mixIn(overrides); - } - if (!subtype.hasOwnProperty("init") || this.init === subtype.init) { - subtype.init = function() { - subtype.$super.init.apply(this, arguments); - }; - } - subtype.init.prototype = subtype; - subtype.$super = this; - return subtype; - }, - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function() { - var instance = this.extend(); - instance.init.apply(instance, arguments); - return instance; - }, - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function() { - }, - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function(properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - if (properties.hasOwnProperty("toString")) { - this.toString = properties.toString; - } - }, - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function() { - return this.init.prototype.extend(this); - } - }; - }(); - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function(words, sigBytes) { - words = this.words = words || []; - if (sigBytes != undefined2) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function(encoder) { - return (encoder || Hex).stringify(this); - }, - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function(wordArray) { - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - this.clamp(); - if (thisSigBytes % 4) { - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255; - thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; - } - } else { - for (var j = 0; j < thatSigBytes; j += 4) { - thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2]; - } - } - this.sigBytes += thatSigBytes; - return this; - }, - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function() { - var words = this.words; - var sigBytes = this.sigBytes; - words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8; - words.length = Math2.ceil(sigBytes / 4); - }, - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function() { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); - return clone; - }, - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function(nBytes) { - var words = []; - for (var i = 0; i < nBytes; i += 4) { - words.push(cryptoSecureRandomInt()); - } - return new WordArray.init(words, nBytes); - } - }); - var C_enc = C.enc = {}; - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 15).toString(16)); - } - return hexChars.join(""); - }, - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function(hexStr) { - var hexStrLength = hexStr.length; - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; - } - return new WordArray.init(words, hexStrLength / 2); - } - }; - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - latin1Chars.push(String.fromCharCode(bite)); - } - return latin1Chars.join(""); - }, - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function(latin1Str) { - var latin1StrLength = latin1Str.length; - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8; - } - return new WordArray.init(words, latin1StrLength); - } - }; - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function(wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error("Malformed UTF-8 data"); - } - }, - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function(utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function() { - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function(data) { - if (typeof data == "string") { - data = Utf8.parse(data); - } - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function(doFlush) { - var processedWords; - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math2.ceil(nBlocksReady); - } else { - nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - var nWordsReady = nBlocksReady * blockSize; - var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes); - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - this._doProcessBlock(dataWords, offset); - } - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - return new WordArray.init(processedWords, nBytesReady); - }, - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function() { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); - return clone; - }, - _minBufferSize: 0 - }); - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function(cfg) { - this.cfg = this.cfg.extend(cfg); - this.reset(); - }, - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function() { - BufferedBlockAlgorithm.reset.call(this); - this._doReset(); - }, - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function(messageUpdate) { - this._append(messageUpdate); - this._process(); - return this; - }, - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function(messageUpdate) { - if (messageUpdate) { - this._append(messageUpdate); - } - var hash = this._doFinalize(); - return hash; - }, - blockSize: 512 / 32, - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function(hasher) { - return function(message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function(hasher) { - return function(message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; - } - }); - var C_algo = C.algo = {}; - return C; - }(Math); - return CryptoJS; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/x64-core.js -var require_x64_core = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/x64-core.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(undefined2) { - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - var C_x64 = C.x64 = {}; - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function(high, low) { - this.high = high; - this.low = low; - } - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - // return X64Word.create(high, low); - // }, - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - // return X64Word.create(high, low); - // }, - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - // return X64Word.create(high, low); - // }, - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - // return X64Word.create(high, low); - // }, - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - // return X64Word.create(high, low); - // }, - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - // return X64Word.create(high, low); - // }, - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - // return X64Word.create(high, low); - // } - }); - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function(words, sigBytes) { - words = this.words = words || []; - if (sigBytes != undefined2) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function() { - var x64Words = this.words; - var x64WordsLength = x64Words.length; - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - return X32WordArray.create(x32Words, this.sigBytes); - }, - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function() { - var clone = Base.clone.call(this); - var words = clone.words = this.words.slice(0); - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - return clone; - } - }); - })(); - return CryptoJS; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/lib-typedarrays.js -var require_lib_typedarrays = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/lib-typedarrays.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - if (typeof ArrayBuffer != "function") { - return; - } - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var superInit = WordArray.init; - var subInit = WordArray.init = function(typedArray) { - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } - if (typedArray instanceof Uint8Array) { - var typedArrayByteLength = typedArray.byteLength; - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8; - } - superInit.call(this, words, typedArrayByteLength); - } else { - superInit.apply(this, arguments); - } - }; - subInit.prototype = WordArray; - })(); - return CryptoJS.lib.WordArray; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/enc-utf16.js -var require_enc_utf16 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/enc-utf16.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 65535; - utf16Chars.push(String.fromCharCode(codePoint)); - } - return utf16Chars.join(""); - }, - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function(utf16Str) { - var utf16StrLength = utf16Str.length; - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16; - } - return WordArray.create(words, utf16StrLength * 2); - } - }; - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 65535); - utf16Chars.push(String.fromCharCode(codePoint)); - } - return utf16Chars.join(""); - }, - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function(utf16Str) { - var utf16StrLength = utf16Str.length; - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16); - } - return WordArray.create(words, utf16StrLength * 2); - } - }; - function swapEndian(word) { - return word << 8 & 4278255360 | word >>> 8 & 16711935; - } - })(); - return CryptoJS.enc.Utf16; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/enc-base64.js -var require_enc_base64 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/enc-base64.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function(wordArray) { - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - wordArray.clamp(); - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255; - var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255; - var triplet = byte1 << 16 | byte2 << 8 | byte3; - for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) { - base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63)); - } - } - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - return base64Chars.join(""); - }, - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function(base64Str) { - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - return parseLoop(base64Str, base64StrLength, reverseMap); - }, - _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" - }; - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2; - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2; - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - })(); - return CryptoJS.enc.Base64; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/enc-base64url.js -var require_enc_base64url = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/enc-base64url.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - var Base64url = C_enc.Base64url = { - /** - * Converts a word array to a Base64url string. - * - * @param {WordArray} wordArray The word array. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {string} The Base64url string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); - */ - stringify: function(wordArray, urlSafe) { - if (urlSafe === void 0) { - urlSafe = true; - } - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = urlSafe ? this._safe_map : this._map; - wordArray.clamp(); - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255; - var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255; - var triplet = byte1 << 16 | byte2 << 8 | byte3; - for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) { - base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63)); - } - } - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - return base64Chars.join(""); - }, - /** - * Converts a Base64url string to a word array. - * - * @param {string} base64Str The Base64url string. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64url.parse(base64String); - */ - parse: function(base64Str, urlSafe) { - if (urlSafe === void 0) { - urlSafe = true; - } - var base64StrLength = base64Str.length; - var map = urlSafe ? this._safe_map : this._map; - var reverseMap = this._reverseMap; - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - return parseLoop(base64Str, base64StrLength, reverseMap); - }, - _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", - _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" - }; - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2; - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2; - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - })(); - return CryptoJS.enc.Base64url; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/md5.js -var require_md5 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/md5.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(Math2) { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - var T = []; - (function() { - for (var i = 0; i < 64; i++) { - T[i] = Math2.abs(Math2.sin(i + 1)) * 4294967296 | 0; - } - })(); - var MD5 = C_algo.MD5 = Hasher.extend({ - _doReset: function() { - this._hash = new WordArray.init([ - 1732584193, - 4023233417, - 2562383102, - 271733878 - ]); - }, - _doProcessBlock: function(M, offset) { - for (var i = 0; i < 16; i++) { - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360; - } - var H = this._hash.words; - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - H[0] = H[0] + a | 0; - H[1] = H[1] + b | 0; - H[2] = H[2] + c | 0; - H[3] = H[3] + d | 0; - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296); - var nBitsTotalL = nBitsTotal; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360; - data.sigBytes = (dataWords.length + 1) * 4; - this._process(); - var hash = this._hash; - var H = hash.words; - for (var i = 0; i < 4; i++) { - var H_i = H[i]; - H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360; - } - return hash; - }, - clone: function() { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } - }); - function FF(a, b, c, d, x, s, t) { - var n = a + (b & c | ~b & d) + x + t; - return (n << s | n >>> 32 - s) + b; - } - function GG(a, b, c, d, x, s, t) { - var n = a + (b & d | c & ~d) + x + t; - return (n << s | n >>> 32 - s) + b; - } - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return (n << s | n >>> 32 - s) + b; - } - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return (n << s | n >>> 32 - s) + b; - } - C.MD5 = Hasher._createHelper(MD5); - C.HmacMD5 = Hasher._createHmacHelper(MD5); - })(Math); - return CryptoJS.MD5; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha1.js -var require_sha1 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha1.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - var W = []; - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function() { - this._hash = new WordArray.init([ - 1732584193, - 4023233417, - 2562383102, - 271733878, - 3285377520 - ]); - }, - _doProcessBlock: function(M, offset) { - var H = this._hash.words; - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = n << 1 | n >>> 31; - } - var t = (a << 5 | a >>> 27) + e + W[i]; - if (i < 20) { - t += (b & c | ~b & d) + 1518500249; - } else if (i < 40) { - t += (b ^ c ^ d) + 1859775393; - } else if (i < 60) { - t += (b & c | b & d | c & d) - 1894007588; - } else { - t += (b ^ c ^ d) - 899497514; - } - e = d; - d = c; - c = b << 30 | b >>> 2; - b = a; - a = t; - } - H[0] = H[0] + a | 0; - H[1] = H[1] + b | 0; - H[2] = H[2] + c | 0; - H[3] = H[3] + d | 0; - H[4] = H[4] + e | 0; - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - return this._hash; - }, - clone: function() { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } - }); - C.SHA1 = Hasher._createHelper(SHA1); - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - })(); - return CryptoJS.SHA1; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha256.js -var require_sha256 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha256.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(Math2) { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - var H = []; - var K = []; - (function() { - function isPrime(n2) { - var sqrtN = Math2.sqrt(n2); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n2 % factor)) { - return false; - } - } - return true; - } - function getFractionalBits(n2) { - return (n2 - (n2 | 0)) * 4294967296 | 0; - } - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3)); - nPrime++; - } - n++; - } - })(); - var W = []; - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function() { - this._hash = new WordArray.init(H.slice(0)); - }, - _doProcessBlock: function(M, offset) { - var H2 = this._hash.words; - var a = H2[0]; - var b = H2[1]; - var c = H2[2]; - var d = H2[3]; - var e = H2[4]; - var f = H2[5]; - var g = H2[6]; - var h = H2[7]; - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3; - var gamma1x = W[i - 2]; - var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10; - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - var ch = e & f ^ ~e & g; - var maj = a & b ^ a & c ^ b & c; - var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22); - var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25); - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - h = g; - g = f; - f = e; - e = d + t1 | 0; - d = c; - c = b; - b = a; - a = t1 + t2 | 0; - } - H2[0] = H2[0] + a | 0; - H2[1] = H2[1] + b | 0; - H2[2] = H2[2] + c | 0; - H2[3] = H2[3] + d | 0; - H2[4] = H2[4] + e | 0; - H2[5] = H2[5] + f | 0; - H2[6] = H2[6] + g | 0; - H2[7] = H2[7] + h | 0; - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - return this._hash; - }, - clone: function() { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } - }); - C.SHA256 = Hasher._createHelper(SHA256); - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - })(Math); - return CryptoJS.SHA256; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha224.js -var require_sha224 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha224.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_sha256()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./sha256"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function() { - this._hash = new WordArray.init([ - 3238371032, - 914150663, - 812702999, - 4144912697, - 4290775857, - 1750603025, - 1694076839, - 3204075428 - ]); - }, - _doFinalize: function() { - var hash = SHA256._doFinalize.call(this); - hash.sigBytes -= 4; - return hash; - } - }); - C.SHA224 = SHA256._createHelper(SHA224); - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - })(); - return CryptoJS.SHA224; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha512.js -var require_sha512 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha512.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_x64_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./x64-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - var K = [ - X64Word_create(1116352408, 3609767458), - X64Word_create(1899447441, 602891725), - X64Word_create(3049323471, 3964484399), - X64Word_create(3921009573, 2173295548), - X64Word_create(961987163, 4081628472), - X64Word_create(1508970993, 3053834265), - X64Word_create(2453635748, 2937671579), - X64Word_create(2870763221, 3664609560), - X64Word_create(3624381080, 2734883394), - X64Word_create(310598401, 1164996542), - X64Word_create(607225278, 1323610764), - X64Word_create(1426881987, 3590304994), - X64Word_create(1925078388, 4068182383), - X64Word_create(2162078206, 991336113), - X64Word_create(2614888103, 633803317), - X64Word_create(3248222580, 3479774868), - X64Word_create(3835390401, 2666613458), - X64Word_create(4022224774, 944711139), - X64Word_create(264347078, 2341262773), - X64Word_create(604807628, 2007800933), - X64Word_create(770255983, 1495990901), - X64Word_create(1249150122, 1856431235), - X64Word_create(1555081692, 3175218132), - X64Word_create(1996064986, 2198950837), - X64Word_create(2554220882, 3999719339), - X64Word_create(2821834349, 766784016), - X64Word_create(2952996808, 2566594879), - X64Word_create(3210313671, 3203337956), - X64Word_create(3336571891, 1034457026), - X64Word_create(3584528711, 2466948901), - X64Word_create(113926993, 3758326383), - X64Word_create(338241895, 168717936), - X64Word_create(666307205, 1188179964), - X64Word_create(773529912, 1546045734), - X64Word_create(1294757372, 1522805485), - X64Word_create(1396182291, 2643833823), - X64Word_create(1695183700, 2343527390), - X64Word_create(1986661051, 1014477480), - X64Word_create(2177026350, 1206759142), - X64Word_create(2456956037, 344077627), - X64Word_create(2730485921, 1290863460), - X64Word_create(2820302411, 3158454273), - X64Word_create(3259730800, 3505952657), - X64Word_create(3345764771, 106217008), - X64Word_create(3516065817, 3606008344), - X64Word_create(3600352804, 1432725776), - X64Word_create(4094571909, 1467031594), - X64Word_create(275423344, 851169720), - X64Word_create(430227734, 3100823752), - X64Word_create(506948616, 1363258195), - X64Word_create(659060556, 3750685593), - X64Word_create(883997877, 3785050280), - X64Word_create(958139571, 3318307427), - X64Word_create(1322822218, 3812723403), - X64Word_create(1537002063, 2003034995), - X64Word_create(1747873779, 3602036899), - X64Word_create(1955562222, 1575990012), - X64Word_create(2024104815, 1125592928), - X64Word_create(2227730452, 2716904306), - X64Word_create(2361852424, 442776044), - X64Word_create(2428436474, 593698344), - X64Word_create(2756734187, 3733110249), - X64Word_create(3204031479, 2999351573), - X64Word_create(3329325298, 3815920427), - X64Word_create(3391569614, 3928383900), - X64Word_create(3515267271, 566280711), - X64Word_create(3940187606, 3454069534), - X64Word_create(4118630271, 4000239992), - X64Word_create(116418474, 1914138554), - X64Word_create(174292421, 2731055270), - X64Word_create(289380356, 3203993006), - X64Word_create(460393269, 320620315), - X64Word_create(685471733, 587496836), - X64Word_create(852142971, 1086792851), - X64Word_create(1017036298, 365543100), - X64Word_create(1126000580, 2618297676), - X64Word_create(1288033470, 3409855158), - X64Word_create(1501505948, 4234509866), - X64Word_create(1607167915, 987167468), - X64Word_create(1816402316, 1246189591) - ]; - var W = []; - (function() { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - })(); - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function() { - this._hash = new X64WordArray.init([ - new X64Word.init(1779033703, 4089235720), - new X64Word.init(3144134277, 2227873595), - new X64Word.init(1013904242, 4271175723), - new X64Word.init(2773480762, 1595750129), - new X64Word.init(1359893119, 2917565137), - new X64Word.init(2600822924, 725511199), - new X64Word.init(528734635, 4215389547), - new X64Word.init(1541459225, 327033209) - ]); - }, - _doProcessBlock: function(M, offset) { - var H = this._hash.words; - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - for (var i = 0; i < 80; i++) { - var Wil; - var Wih; - var Wi = W[i]; - if (i < 16) { - Wih = Wi.high = M[offset + i * 2] | 0; - Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7; - var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25); - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6; - var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26); - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - Wil = gamma0l + Wi7l; - Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0); - Wil = Wil + gamma1l; - Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0); - Wil = Wil + Wi16l; - Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0); - Wi.high = Wih; - Wi.low = Wil; - } - var chh = eh & fh ^ ~eh & gh; - var chl = el & fl ^ ~el & gl; - var majh = ah & bh ^ ah & ch ^ bh & ch; - var majl = al & bl ^ al & cl ^ bl & cl; - var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7); - var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7); - var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9); - var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9); - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0); - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0); - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = dl + t1l | 0; - eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = t1l + t2l | 0; - ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0; - } - H0l = H0.low = H0l + al; - H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0); - H1l = H1.low = H1l + bl; - H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0); - H2l = H2.low = H2l + cl; - H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0); - H3l = H3.low = H3l + dl; - H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0); - H4l = H4.low = H4l + el; - H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0); - H5l = H5.low = H5l + fl; - H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0); - H6l = H6.low = H6l + gl; - H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0); - H7l = H7.low = H7l + hl; - H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0); - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - var hash = this._hash.toX32(); - return hash; - }, - clone: function() { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - }, - blockSize: 1024 / 32 - }); - C.SHA512 = Hasher._createHelper(SHA512); - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - })(); - return CryptoJS.SHA512; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha384.js -var require_sha384 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha384.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_x64_core(), require_sha512()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./x64-core", "./sha512"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function() { - this._hash = new X64WordArray.init([ - new X64Word.init(3418070365, 3238371032), - new X64Word.init(1654270250, 914150663), - new X64Word.init(2438529370, 812702999), - new X64Word.init(355462360, 4144912697), - new X64Word.init(1731405415, 4290775857), - new X64Word.init(2394180231, 1750603025), - new X64Word.init(3675008525, 1694076839), - new X64Word.init(1203062813, 3204075428) - ]); - }, - _doFinalize: function() { - var hash = SHA512._doFinalize.call(this); - hash.sigBytes -= 16; - return hash; - } - }); - C.SHA384 = SHA512._createHelper(SHA384); - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - })(); - return CryptoJS.SHA384; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha3.js -var require_sha3 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/sha3.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_x64_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./x64-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(Math2) { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - (function() { - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64; - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5; - } - } - var LFSR = 1; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - for (var j = 0; j < 7; j++) { - if (LFSR & 1) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else { - roundConstantMsw ^= 1 << bitPosition - 32; - } - } - if (LFSR & 128) { - LFSR = LFSR << 1 ^ 113; - } else { - LFSR <<= 1; - } - } - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - })(); - var T = []; - (function() { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - })(); - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - _doReset: function() { - var state = this._state = []; - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - _doProcessBlock: function(M, offset) { - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - for (var i = 0; i < nBlockSizeLanes; i++) { - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360; - M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360; - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - for (var round = 0; round < 24; round++) { - for (var x = 0; x < 5; x++) { - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31); - var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - var tMsw; - var tLsw; - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - if (rhoOffset < 32) { - tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset; - tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset; - } else { - tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset; - tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset; - } - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[(x + 1) % 5 + 5 * y]; - var Tx2Lane = T[(x + 2) % 5 + 5 * y]; - lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high; - lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low; - } - } - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low; - } - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32; - dataWords[(Math2.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128; - data.sigBytes = dataWords.length * 4; - this._process(); - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360; - laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360; - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - return new WordArray.init(hashWords, outputLengthBytes); - }, - clone: function() { - var clone = Hasher.clone.call(this); - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - return clone; - } - }); - C.SHA3 = Hasher._createHelper(SHA3); - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - })(Math); - return CryptoJS.SHA3; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/ripemd160.js -var require_ripemd160 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/ripemd160.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(Math2) { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - var _zl = WordArray.create([ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 7, - 4, - 13, - 1, - 10, - 6, - 15, - 3, - 12, - 0, - 9, - 5, - 2, - 14, - 11, - 8, - 3, - 10, - 14, - 4, - 9, - 15, - 8, - 1, - 2, - 7, - 0, - 6, - 13, - 11, - 5, - 12, - 1, - 9, - 11, - 10, - 0, - 8, - 12, - 4, - 13, - 3, - 7, - 15, - 14, - 5, - 6, - 2, - 4, - 0, - 5, - 9, - 7, - 12, - 2, - 10, - 14, - 1, - 3, - 8, - 11, - 6, - 15, - 13 - ]); - var _zr = WordArray.create([ - 5, - 14, - 7, - 0, - 9, - 2, - 11, - 4, - 13, - 6, - 15, - 8, - 1, - 10, - 3, - 12, - 6, - 11, - 3, - 7, - 0, - 13, - 5, - 10, - 14, - 15, - 8, - 12, - 4, - 9, - 1, - 2, - 15, - 5, - 1, - 3, - 7, - 14, - 6, - 9, - 11, - 8, - 12, - 2, - 10, - 0, - 4, - 13, - 8, - 6, - 4, - 1, - 3, - 11, - 15, - 0, - 5, - 12, - 2, - 13, - 9, - 7, - 10, - 14, - 12, - 15, - 10, - 4, - 1, - 5, - 8, - 7, - 6, - 2, - 13, - 14, - 0, - 3, - 9, - 11 - ]); - var _sl = WordArray.create([ - 11, - 14, - 15, - 12, - 5, - 8, - 7, - 9, - 11, - 13, - 14, - 15, - 6, - 7, - 9, - 8, - 7, - 6, - 8, - 13, - 11, - 9, - 7, - 15, - 7, - 12, - 15, - 9, - 11, - 7, - 13, - 12, - 11, - 13, - 6, - 7, - 14, - 9, - 13, - 15, - 14, - 8, - 13, - 6, - 5, - 12, - 7, - 5, - 11, - 12, - 14, - 15, - 14, - 15, - 9, - 8, - 9, - 14, - 5, - 6, - 8, - 6, - 5, - 12, - 9, - 15, - 5, - 11, - 6, - 8, - 13, - 12, - 5, - 12, - 13, - 14, - 11, - 8, - 5, - 6 - ]); - var _sr = WordArray.create([ - 8, - 9, - 9, - 11, - 13, - 15, - 15, - 5, - 7, - 7, - 8, - 11, - 14, - 14, - 12, - 6, - 9, - 13, - 15, - 7, - 12, - 8, - 9, - 11, - 7, - 7, - 12, - 7, - 6, - 15, - 13, - 11, - 9, - 7, - 15, - 11, - 8, - 6, - 6, - 14, - 12, - 13, - 5, - 14, - 13, - 13, - 7, - 5, - 15, - 5, - 8, - 11, - 14, - 14, - 6, - 14, - 6, - 9, - 12, - 9, - 12, - 5, - 15, - 8, - 8, - 5, - 12, - 9, - 12, - 5, - 14, - 6, - 8, - 13, - 6, - 5, - 15, - 13, - 11, - 11 - ]); - var _hl = WordArray.create([0, 1518500249, 1859775393, 2400959708, 2840853838]); - var _hr = WordArray.create([1352829926, 1548603684, 1836072691, 2053994217, 0]); - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function() { - this._hash = WordArray.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); - }, - _doProcessBlock: function(M, offset) { - for (var i = 0; i < 16; i++) { - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360; - } - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - var t; - for (var i = 0; i < 80; i += 1) { - t = al + M[offset + zl[i]] | 0; - if (i < 16) { - t += f1(bl, cl, dl) + hl[0]; - } else if (i < 32) { - t += f2(bl, cl, dl) + hl[1]; - } else if (i < 48) { - t += f3(bl, cl, dl) + hl[2]; - } else if (i < 64) { - t += f4(bl, cl, dl) + hl[3]; - } else { - t += f5(bl, cl, dl) + hl[4]; - } - t = t | 0; - t = rotl(t, sl[i]); - t = t + el | 0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - t = ar + M[offset + zr[i]] | 0; - if (i < 16) { - t += f5(br, cr, dr) + hr[0]; - } else if (i < 32) { - t += f4(br, cr, dr) + hr[1]; - } else if (i < 48) { - t += f3(br, cr, dr) + hr[2]; - } else if (i < 64) { - t += f2(br, cr, dr) + hr[3]; - } else { - t += f1(br, cr, dr) + hr[4]; - } - t = t | 0; - t = rotl(t, sr[i]); - t = t + er | 0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - t = H[1] + cl + dr | 0; - H[1] = H[2] + dl + er | 0; - H[2] = H[3] + el + ar | 0; - H[3] = H[4] + al + br | 0; - H[4] = H[0] + bl + cr | 0; - H[0] = t; - }, - _doFinalize: function() { - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360; - data.sigBytes = (dataWords.length + 1) * 4; - this._process(); - var hash = this._hash; - var H = hash.words; - for (var i = 0; i < 5; i++) { - var H_i = H[i]; - H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360; - } - return hash; - }, - clone: function() { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } - }); - function f1(x, y, z) { - return x ^ y ^ z; - } - function f2(x, y, z) { - return x & y | ~x & z; - } - function f3(x, y, z) { - return (x | ~y) ^ z; - } - function f4(x, y, z) { - return x & z | y & ~z; - } - function f5(x, y, z) { - return x ^ (y | ~z); - } - function rotl(x, n) { - return x << n | x >>> 32 - n; - } - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - })(Math); - return CryptoJS.RIPEMD160; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/hmac.js -var require_hmac = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/hmac.js"(exports, module) { - (function(root, factory) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; - var HMAC = C_algo.HMAC = Base.extend({ - /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example - * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); - */ - init: function(hasher, key) { - hasher = this._hasher = new hasher.init(); - if (typeof key == "string") { - key = Utf8.parse(key); - } - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); - } - key.clamp(); - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 1549556828; - iKeyWords[i] ^= 909522486; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; - this.reset(); - }, - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function() { - var hasher = this._hasher; - hasher.reset(); - hasher.update(this._iKey); - }, - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function(messageUpdate) { - this._hasher.update(messageUpdate); - return this; - }, - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function(messageUpdate) { - var hasher = this._hasher; - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - return hmac; - } - }); - })(); - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pbkdf2.js -var require_pbkdf2 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pbkdf2.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_sha256(), require_hmac()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./sha256", "./hmac"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - var HMAC = C_algo.HMAC; - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA256 - * @property {number} iterations The number of iterations to perform. Default: 250000 - */ - cfg: Base.extend({ - keySize: 128 / 32, - hasher: SHA256, - iterations: 25e4 - }), - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function(cfg) { - this.cfg = this.cfg.extend(cfg); - }, - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function(password, salt) { - var cfg = this.cfg; - var hmac = HMAC.create(cfg.hasher, password); - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([1]); - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - var blockWords = block.words; - var blockWordsLength = blockWords.length; - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - var intermediateWords = intermediate.words; - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } - } - derivedKey.concat(block); - blockIndexWords[0]++; - } - derivedKey.sigBytes = keySize * 4; - return derivedKey; - } - }); - C.PBKDF2 = function(password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - })(); - return CryptoJS.PBKDF2; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/evpkdf.js -var require_evpkdf = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/evpkdf.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_sha1(), require_hmac()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./sha1", "./hmac"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128 / 32, - hasher: MD5, - iterations: 1 - }), - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function(cfg) { - this.cfg = this.cfg.extend(cfg); - }, - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function(password, salt) { - var block; - var cfg = this.cfg; - var hasher = cfg.hasher.create(); - var derivedKey = WordArray.create(); - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } - block = hasher.update(password).finalize(salt); - hasher.reset(); - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - return derivedKey; - } - }); - C.EvpKDF = function(password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - })(); - return CryptoJS.EvpKDF; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/cipher-core.js -var require_cipher_core = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/cipher-core.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_evpkdf()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./evpkdf"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.lib.Cipher || function(undefined2) { - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function(key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function(key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function(xformMode, key, cfg) { - this.cfg = this.cfg.extend(cfg); - this._xformMode = xformMode; - this._key = key; - this.reset(); - }, - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function() { - BufferedBlockAlgorithm.reset.call(this); - this._doReset(); - }, - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function(dataUpdate) { - this._append(dataUpdate); - return this._process(); - }, - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function(dataUpdate) { - if (dataUpdate) { - this._append(dataUpdate); - } - var finalProcessedData = this._doFinalize(); - return finalProcessedData; - }, - keySize: 128 / 32, - ivSize: 128 / 32, - _ENC_XFORM_MODE: 1, - _DEC_XFORM_MODE: 2, - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: /* @__PURE__ */ function() { - function selectCipherStrategy(key) { - if (typeof key == "string") { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } - return function(cipher) { - return { - encrypt: function(message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - decrypt: function(ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }() - }); - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function() { - var finalProcessedBlocks = this._process(true); - return finalProcessedBlocks; - }, - blockSize: 1 - }); - var C_mode = C.mode = {}; - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function(cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function(cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function(cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); - var CBC = C_mode.CBC = function() { - var CBC2 = BlockCipherMode.extend(); - CBC2.Encryptor = CBC2.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - CBC2.Decryptor = CBC2.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - var thisBlock = words.slice(offset, offset + blockSize); - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - this._prevBlock = thisBlock; - } - }); - function xorBlock(words, offset, blockSize) { - var block; - var iv = this._iv; - if (iv) { - block = iv; - this._iv = undefined2; - } else { - block = this._prevBlock; - } - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } - return CBC2; - }(); - var C_pad = C.pad = {}; - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function(data, blockSize) { - var blockSizeBytes = blockSize * 4; - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes; - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); - data.concat(padding); - }, - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function(data) { - var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; - data.sigBytes -= nPaddingBytes; - } - }; - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), - reset: function() { - var modeCreator; - Cipher.reset.call(this); - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; - if (this._xformMode == this._ENC_XFORM_MODE) { - modeCreator = mode.createEncryptor; - } else { - modeCreator = mode.createDecryptor; - this._minBufferSize = 1; - } - if (this._mode && this._mode.__creator == modeCreator) { - this._mode.init(this, iv && iv.words); - } else { - this._mode = modeCreator.call(mode, this, iv && iv.words); - this._mode.__creator = modeCreator; - } - }, - _doProcessBlock: function(words, offset) { - this._mode.processBlock(words, offset); - }, - _doFinalize: function() { - var finalProcessedBlocks; - var padding = this.cfg.padding; - if (this._xformMode == this._ENC_XFORM_MODE) { - padding.pad(this._data, this.blockSize); - finalProcessedBlocks = this._process(true); - } else { - finalProcessedBlocks = this._process(true); - padding.unpad(finalProcessedBlocks); - } - return finalProcessedBlocks; - }, - blockSize: 128 / 32 - }); - var CipherParams = C_lib.CipherParams = Base.extend({ - /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example - * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); - */ - init: function(cipherParams) { - this.mixIn(cipherParams); - }, - /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. - * - * @throws Error If neither the formatter nor the default formatter is set. - * - * @example - * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); - */ - toString: function(formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - var C_format = C.format = {}; - var OpenSSLFormatter = C_format.OpenSSL = { - /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The OpenSSL-compatible string. - * - * @static - * - * @example - * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); - */ - stringify: function(cipherParams) { - var wordArray; - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; - if (salt) { - wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext); - } else { - wordArray = ciphertext; - } - return wordArray.toString(Base64); - }, - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function(openSSLStr) { - var salt; - var ciphertext = Base64.parse(openSSLStr); - var ciphertextWords = ciphertext.words; - if (ciphertextWords[0] == 1398893684 && ciphertextWords[1] == 1701076831) { - salt = WordArray.create(ciphertextWords.slice(2, 4)); - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - return CipherParams.create({ ciphertext, salt }); - } - }; - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function(cipher, message, key, cfg) { - cfg = this.cfg.extend(cfg); - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - var cipherCfg = encryptor.cfg; - return CipherParams.create({ - ciphertext, - key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function(cipher, ciphertext, key, cfg) { - cfg = this.cfg.extend(cfg); - ciphertext = this._parse(ciphertext, cfg.format); - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); - return plaintext; - }, - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function(ciphertext, format) { - if (typeof ciphertext == "string") { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); - var C_kdf = C.kdf = {}; - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function(password, keySize, ivSize, salt, hasher) { - if (!salt) { - salt = WordArray.random(64 / 8); - } - if (!hasher) { - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); - } else { - var key = EvpKDF.create({ keySize: keySize + ivSize, hasher }).compute(password, salt); - } - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - return CipherParams.create({ key, iv, salt }); - } - }; - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function(cipher, message, password, cfg) { - cfg = this.cfg.extend(cfg); - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); - cfg.iv = derivedParams.iv; - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); - ciphertext.mixIn(derivedParams); - return ciphertext; - }, - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function(cipher, ciphertext, password, cfg) { - cfg = this.cfg.extend(cfg); - ciphertext = this._parse(ciphertext, cfg.format); - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); - cfg.iv = derivedParams.iv; - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); - return plaintext; - } - }); - }(); - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-cfb.js -var require_mode_cfb = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-cfb.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.mode.CFB = function() { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - CFB.Encryptor = CFB.extend({ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - CFB.Decryptor = CFB.extend({ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - var thisBlock = words.slice(offset, offset + blockSize); - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - this._prevBlock = thisBlock; - } - }); - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - var keystream; - var iv = this._iv; - if (iv) { - keystream = iv.slice(0); - this._iv = void 0; - } else { - keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - return CFB; - }(); - return CryptoJS.mode.CFB; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ctr.js -var require_mode_ctr = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ctr.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.mode.CTR = function() { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - if (iv) { - counter = this._counter = iv.slice(0); - this._iv = void 0; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0; - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - CTR.Decryptor = Encryptor; - return CTR; - }(); - return CryptoJS.mode.CTR; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ctr-gladman.js -var require_mode_ctr_gladman = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ctr-gladman.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.mode.CTRGladman = function() { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - function incWord(word) { - if ((word >> 24 & 255) === 255) { - var b1 = word >> 16 & 255; - var b2 = word >> 8 & 255; - var b3 = word & 255; - if (b1 === 255) { - b1 = 0; - if (b2 === 255) { - b2 = 0; - if (b3 === 255) { - b3 = 0; - } else { - ++b3; - } - } else { - ++b2; - } - } else { - ++b1; - } - word = 0; - word += b1 << 16; - word += b2 << 8; - word += b3; - } else { - word += 1 << 24; - } - return word; - } - function incCounter(counter) { - if ((counter[0] = incWord(counter[0])) === 0) { - counter[1] = incWord(counter[1]); - } - return counter; - } - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - if (iv) { - counter = this._counter = iv.slice(0); - this._iv = void 0; - } - incCounter(counter); - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - CTRGladman.Decryptor = Encryptor; - return CTRGladman; - }(); - return CryptoJS.mode.CTRGladman; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ofb.js -var require_mode_ofb = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ofb.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.mode.OFB = function() { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function(words, offset) { - var cipher = this._cipher; - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - if (iv) { - keystream = this._keystream = iv.slice(0); - this._iv = void 0; - } - cipher.encryptBlock(keystream, 0); - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - OFB.Decryptor = Encryptor; - return OFB; - }(); - return CryptoJS.mode.OFB; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ecb.js -var require_mode_ecb = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/mode-ecb.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.mode.ECB = function() { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - ECB.Encryptor = ECB.extend({ - processBlock: function(words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - ECB.Decryptor = ECB.extend({ - processBlock: function(words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - return ECB; - }(); - return CryptoJS.mode.ECB; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-ansix923.js -var require_pad_ansix923 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-ansix923.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.pad.AnsiX923 = { - pad: function(data, blockSize) { - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8; - data.sigBytes += nPaddingBytes; - }, - unpad: function(data) { - var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; - data.sigBytes -= nPaddingBytes; - } - }; - return CryptoJS.pad.Ansix923; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-iso10126.js -var require_pad_iso10126 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-iso10126.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.pad.Iso10126 = { - pad: function(data, blockSize) { - var blockSizeBytes = blockSize * 4; - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - unpad: function(data) { - var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; - data.sigBytes -= nPaddingBytes; - } - }; - return CryptoJS.pad.Iso10126; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-iso97971.js -var require_pad_iso97971 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-iso97971.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.pad.Iso97971 = { - pad: function(data, blockSize) { - data.concat(CryptoJS.lib.WordArray.create([2147483648], 1)); - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - unpad: function(data) { - CryptoJS.pad.ZeroPadding.unpad(data); - data.sigBytes--; - } - }; - return CryptoJS.pad.Iso97971; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-zeropadding.js -var require_pad_zeropadding = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-zeropadding.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.pad.ZeroPadding = { - pad: function(data, blockSize) { - var blockSizeBytes = blockSize * 4; - data.clamp(); - data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes); - }, - unpad: function(data) { - var dataWords = data.words; - var i = data.sigBytes - 1; - for (var i = data.sigBytes - 1; i >= 0; i--) { - if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) { - data.sigBytes = i + 1; - break; - } - } - } - }; - return CryptoJS.pad.ZeroPadding; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-nopadding.js -var require_pad_nopadding = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/pad-nopadding.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - CryptoJS.pad.NoPadding = { - pad: function() { - }, - unpad: function() { - } - }; - return CryptoJS.pad.NoPadding; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/format-hex.js -var require_format_hex = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/format-hex.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function(undefined2) { - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function(cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function(input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext }); - } - }; - })(); - return CryptoJS.format.Hex; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/aes.js -var require_aes = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/aes.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - (function() { - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = i << 1 ^ 283; - } - } - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4; - sx = sx >>> 8 ^ sx & 255 ^ 99; - SBOX[x] = sx; - INV_SBOX[sx] = x; - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - var t = d[sx] * 257 ^ sx * 16843008; - SUB_MIX_0[x] = t << 24 | t >>> 8; - SUB_MIX_1[x] = t << 16 | t >>> 16; - SUB_MIX_2[x] = t << 8 | t >>> 24; - SUB_MIX_3[x] = t; - var t = x8 * 16843009 ^ x4 * 65537 ^ x2 * 257 ^ x * 16843008; - INV_SUB_MIX_0[sx] = t << 24 | t >>> 8; - INV_SUB_MIX_1[sx] = t << 16 | t >>> 16; - INV_SUB_MIX_2[sx] = t << 8 | t >>> 24; - INV_SUB_MIX_3[sx] = t; - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - })(); - var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function() { - var t; - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - var nRounds = this._nRounds = keySize + 6; - var ksRows = (nRounds + 1) * 4; - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - t = keySchedule[ksRow - 1]; - if (!(ksRow % keySize)) { - t = t << 8 | t >>> 24; - t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255]; - t ^= RCON[ksRow / keySize | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255]; - } - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 255]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 255]] ^ INV_SUB_MIX_3[SBOX[t & 255]]; - } - } - }, - encryptBlock: function(M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - decryptBlock: function(M, offset) { - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - _doCryptBlock: function(M, offset, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) { - var nRounds = this._nRounds; - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - var ksRow = 4; - for (var round = 1; round < nRounds; round++) { - var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_02[s1 >>> 24] ^ SUB_MIX_12[s2 >>> 16 & 255] ^ SUB_MIX_22[s3 >>> 8 & 255] ^ SUB_MIX_32[s0 & 255] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_02[s2 >>> 24] ^ SUB_MIX_12[s3 >>> 16 & 255] ^ SUB_MIX_22[s0 >>> 8 & 255] ^ SUB_MIX_32[s1 & 255] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_02[s3 >>> 24] ^ SUB_MIX_12[s0 >>> 16 & 255] ^ SUB_MIX_22[s1 >>> 8 & 255] ^ SUB_MIX_32[s2 & 255] ^ keySchedule[ksRow++]; - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - var t0 = (SBOX2[s0 >>> 24] << 24 | SBOX2[s1 >>> 16 & 255] << 16 | SBOX2[s2 >>> 8 & 255] << 8 | SBOX2[s3 & 255]) ^ keySchedule[ksRow++]; - var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++]; - var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++]; - var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++]; - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - keySize: 256 / 32 - }); - C.AES = BlockCipher._createHelper(AES); - })(); - return CryptoJS.AES; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/tripledes.js -var require_tripledes = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/tripledes.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - var PC1 = [ - 57, - 49, - 41, - 33, - 25, - 17, - 9, - 1, - 58, - 50, - 42, - 34, - 26, - 18, - 10, - 2, - 59, - 51, - 43, - 35, - 27, - 19, - 11, - 3, - 60, - 52, - 44, - 36, - 63, - 55, - 47, - 39, - 31, - 23, - 15, - 7, - 62, - 54, - 46, - 38, - 30, - 22, - 14, - 6, - 61, - 53, - 45, - 37, - 29, - 21, - 13, - 5, - 28, - 20, - 12, - 4 - ]; - var PC2 = [ - 14, - 17, - 11, - 24, - 1, - 5, - 3, - 28, - 15, - 6, - 21, - 10, - 23, - 19, - 12, - 4, - 26, - 8, - 16, - 7, - 27, - 20, - 13, - 2, - 41, - 52, - 31, - 37, - 47, - 55, - 30, - 40, - 51, - 45, - 33, - 48, - 44, - 49, - 39, - 56, - 34, - 53, - 46, - 42, - 50, - 36, - 29, - 32 - ]; - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - var SBOX_P = [ - { - 0: 8421888, - 268435456: 32768, - 536870912: 8421378, - 805306368: 2, - 1073741824: 512, - 1342177280: 8421890, - 1610612736: 8389122, - 1879048192: 8388608, - 2147483648: 514, - 2415919104: 8389120, - 2684354560: 33280, - 2952790016: 8421376, - 3221225472: 32770, - 3489660928: 8388610, - 3758096384: 0, - 4026531840: 33282, - 134217728: 0, - 402653184: 8421890, - 671088640: 33282, - 939524096: 32768, - 1207959552: 8421888, - 1476395008: 512, - 1744830464: 8421378, - 2013265920: 2, - 2281701376: 8389120, - 2550136832: 33280, - 2818572288: 8421376, - 3087007744: 8389122, - 3355443200: 8388610, - 3623878656: 32770, - 3892314112: 514, - 4160749568: 8388608, - 1: 32768, - 268435457: 2, - 536870913: 8421888, - 805306369: 8388608, - 1073741825: 8421378, - 1342177281: 33280, - 1610612737: 512, - 1879048193: 8389122, - 2147483649: 8421890, - 2415919105: 8421376, - 2684354561: 8388610, - 2952790017: 33282, - 3221225473: 514, - 3489660929: 8389120, - 3758096385: 32770, - 4026531841: 0, - 134217729: 8421890, - 402653185: 8421376, - 671088641: 8388608, - 939524097: 512, - 1207959553: 32768, - 1476395009: 8388610, - 1744830465: 2, - 2013265921: 33282, - 2281701377: 32770, - 2550136833: 8389122, - 2818572289: 514, - 3087007745: 8421888, - 3355443201: 8389120, - 3623878657: 0, - 3892314113: 33280, - 4160749569: 8421378 - }, - { - 0: 1074282512, - 16777216: 16384, - 33554432: 524288, - 50331648: 1074266128, - 67108864: 1073741840, - 83886080: 1074282496, - 100663296: 1073758208, - 117440512: 16, - 134217728: 540672, - 150994944: 1073758224, - 167772160: 1073741824, - 184549376: 540688, - 201326592: 524304, - 218103808: 0, - 234881024: 16400, - 251658240: 1074266112, - 8388608: 1073758208, - 25165824: 540688, - 41943040: 16, - 58720256: 1073758224, - 75497472: 1074282512, - 92274688: 1073741824, - 109051904: 524288, - 125829120: 1074266128, - 142606336: 524304, - 159383552: 0, - 176160768: 16384, - 192937984: 1074266112, - 209715200: 1073741840, - 226492416: 540672, - 243269632: 1074282496, - 260046848: 16400, - 268435456: 0, - 285212672: 1074266128, - 301989888: 1073758224, - 318767104: 1074282496, - 335544320: 1074266112, - 352321536: 16, - 369098752: 540688, - 385875968: 16384, - 402653184: 16400, - 419430400: 524288, - 436207616: 524304, - 452984832: 1073741840, - 469762048: 540672, - 486539264: 1073758208, - 503316480: 1073741824, - 520093696: 1074282512, - 276824064: 540688, - 293601280: 524288, - 310378496: 1074266112, - 327155712: 16384, - 343932928: 1073758208, - 360710144: 1074282512, - 377487360: 16, - 394264576: 1073741824, - 411041792: 1074282496, - 427819008: 1073741840, - 444596224: 1073758224, - 461373440: 524304, - 478150656: 0, - 494927872: 16400, - 511705088: 1074266128, - 528482304: 540672 - }, - { - 0: 260, - 1048576: 0, - 2097152: 67109120, - 3145728: 65796, - 4194304: 65540, - 5242880: 67108868, - 6291456: 67174660, - 7340032: 67174400, - 8388608: 67108864, - 9437184: 67174656, - 10485760: 65792, - 11534336: 67174404, - 12582912: 67109124, - 13631488: 65536, - 14680064: 4, - 15728640: 256, - 524288: 67174656, - 1572864: 67174404, - 2621440: 0, - 3670016: 67109120, - 4718592: 67108868, - 5767168: 65536, - 6815744: 65540, - 7864320: 260, - 8912896: 4, - 9961472: 256, - 11010048: 67174400, - 12058624: 65796, - 13107200: 65792, - 14155776: 67109124, - 15204352: 67174660, - 16252928: 67108864, - 16777216: 67174656, - 17825792: 65540, - 18874368: 65536, - 19922944: 67109120, - 20971520: 256, - 22020096: 67174660, - 23068672: 67108868, - 24117248: 0, - 25165824: 67109124, - 26214400: 67108864, - 27262976: 4, - 28311552: 65792, - 29360128: 67174400, - 30408704: 260, - 31457280: 65796, - 32505856: 67174404, - 17301504: 67108864, - 18350080: 260, - 19398656: 67174656, - 20447232: 0, - 21495808: 65540, - 22544384: 67109120, - 23592960: 256, - 24641536: 67174404, - 25690112: 65536, - 26738688: 67174660, - 27787264: 65796, - 28835840: 67108868, - 29884416: 67109124, - 30932992: 67174400, - 31981568: 4, - 33030144: 65792 - }, - { - 0: 2151682048, - 65536: 2147487808, - 131072: 4198464, - 196608: 2151677952, - 262144: 0, - 327680: 4198400, - 393216: 2147483712, - 458752: 4194368, - 524288: 2147483648, - 589824: 4194304, - 655360: 64, - 720896: 2147487744, - 786432: 2151678016, - 851968: 4160, - 917504: 4096, - 983040: 2151682112, - 32768: 2147487808, - 98304: 64, - 163840: 2151678016, - 229376: 2147487744, - 294912: 4198400, - 360448: 2151682112, - 425984: 0, - 491520: 2151677952, - 557056: 4096, - 622592: 2151682048, - 688128: 4194304, - 753664: 4160, - 819200: 2147483648, - 884736: 4194368, - 950272: 4198464, - 1015808: 2147483712, - 1048576: 4194368, - 1114112: 4198400, - 1179648: 2147483712, - 1245184: 0, - 1310720: 4160, - 1376256: 2151678016, - 1441792: 2151682048, - 1507328: 2147487808, - 1572864: 2151682112, - 1638400: 2147483648, - 1703936: 2151677952, - 1769472: 4198464, - 1835008: 2147487744, - 1900544: 4194304, - 1966080: 64, - 2031616: 4096, - 1081344: 2151677952, - 1146880: 2151682112, - 1212416: 0, - 1277952: 4198400, - 1343488: 4194368, - 1409024: 2147483648, - 1474560: 2147487808, - 1540096: 64, - 1605632: 2147483712, - 1671168: 4096, - 1736704: 2147487744, - 1802240: 2151678016, - 1867776: 4160, - 1933312: 2151682048, - 1998848: 4194304, - 2064384: 4198464 - }, - { - 0: 128, - 4096: 17039360, - 8192: 262144, - 12288: 536870912, - 16384: 537133184, - 20480: 16777344, - 24576: 553648256, - 28672: 262272, - 32768: 16777216, - 36864: 537133056, - 40960: 536871040, - 45056: 553910400, - 49152: 553910272, - 53248: 0, - 57344: 17039488, - 61440: 553648128, - 2048: 17039488, - 6144: 553648256, - 10240: 128, - 14336: 17039360, - 18432: 262144, - 22528: 537133184, - 26624: 553910272, - 30720: 536870912, - 34816: 537133056, - 38912: 0, - 43008: 553910400, - 47104: 16777344, - 51200: 536871040, - 55296: 553648128, - 59392: 16777216, - 63488: 262272, - 65536: 262144, - 69632: 128, - 73728: 536870912, - 77824: 553648256, - 81920: 16777344, - 86016: 553910272, - 90112: 537133184, - 94208: 16777216, - 98304: 553910400, - 102400: 553648128, - 106496: 17039360, - 110592: 537133056, - 114688: 262272, - 118784: 536871040, - 122880: 0, - 126976: 17039488, - 67584: 553648256, - 71680: 16777216, - 75776: 17039360, - 79872: 537133184, - 83968: 536870912, - 88064: 17039488, - 92160: 128, - 96256: 553910272, - 100352: 262272, - 104448: 553910400, - 108544: 0, - 112640: 553648128, - 116736: 16777344, - 120832: 262144, - 124928: 537133056, - 129024: 536871040 - }, - { - 0: 268435464, - 256: 8192, - 512: 270532608, - 768: 270540808, - 1024: 268443648, - 1280: 2097152, - 1536: 2097160, - 1792: 268435456, - 2048: 0, - 2304: 268443656, - 2560: 2105344, - 2816: 8, - 3072: 270532616, - 3328: 2105352, - 3584: 8200, - 3840: 270540800, - 128: 270532608, - 384: 270540808, - 640: 8, - 896: 2097152, - 1152: 2105352, - 1408: 268435464, - 1664: 268443648, - 1920: 8200, - 2176: 2097160, - 2432: 8192, - 2688: 268443656, - 2944: 270532616, - 3200: 0, - 3456: 270540800, - 3712: 2105344, - 3968: 268435456, - 4096: 268443648, - 4352: 270532616, - 4608: 270540808, - 4864: 8200, - 5120: 2097152, - 5376: 268435456, - 5632: 268435464, - 5888: 2105344, - 6144: 2105352, - 6400: 0, - 6656: 8, - 6912: 270532608, - 7168: 8192, - 7424: 268443656, - 7680: 270540800, - 7936: 2097160, - 4224: 8, - 4480: 2105344, - 4736: 2097152, - 4992: 268435464, - 5248: 268443648, - 5504: 8200, - 5760: 270540808, - 6016: 270532608, - 6272: 270540800, - 6528: 270532616, - 6784: 8192, - 7040: 2105352, - 7296: 2097160, - 7552: 0, - 7808: 268435456, - 8064: 268443656 - }, - { - 0: 1048576, - 16: 33555457, - 32: 1024, - 48: 1049601, - 64: 34604033, - 80: 0, - 96: 1, - 112: 34603009, - 128: 33555456, - 144: 1048577, - 160: 33554433, - 176: 34604032, - 192: 34603008, - 208: 1025, - 224: 1049600, - 240: 33554432, - 8: 34603009, - 24: 0, - 40: 33555457, - 56: 34604032, - 72: 1048576, - 88: 33554433, - 104: 33554432, - 120: 1025, - 136: 1049601, - 152: 33555456, - 168: 34603008, - 184: 1048577, - 200: 1024, - 216: 34604033, - 232: 1, - 248: 1049600, - 256: 33554432, - 272: 1048576, - 288: 33555457, - 304: 34603009, - 320: 1048577, - 336: 33555456, - 352: 34604032, - 368: 1049601, - 384: 1025, - 400: 34604033, - 416: 1049600, - 432: 1, - 448: 0, - 464: 34603008, - 480: 33554433, - 496: 1024, - 264: 1049600, - 280: 33555457, - 296: 34603009, - 312: 1, - 328: 33554432, - 344: 1048576, - 360: 1025, - 376: 34604032, - 392: 33554433, - 408: 34603008, - 424: 0, - 440: 34604033, - 456: 1049601, - 472: 1024, - 488: 33555456, - 504: 1048577 - }, - { - 0: 134219808, - 1: 131072, - 2: 134217728, - 3: 32, - 4: 131104, - 5: 134350880, - 6: 134350848, - 7: 2048, - 8: 134348800, - 9: 134219776, - 10: 133120, - 11: 134348832, - 12: 2080, - 13: 0, - 14: 134217760, - 15: 133152, - 2147483648: 2048, - 2147483649: 134350880, - 2147483650: 134219808, - 2147483651: 134217728, - 2147483652: 134348800, - 2147483653: 133120, - 2147483654: 133152, - 2147483655: 32, - 2147483656: 134217760, - 2147483657: 2080, - 2147483658: 131104, - 2147483659: 134350848, - 2147483660: 0, - 2147483661: 134348832, - 2147483662: 134219776, - 2147483663: 131072, - 16: 133152, - 17: 134350848, - 18: 32, - 19: 2048, - 20: 134219776, - 21: 134217760, - 22: 134348832, - 23: 131072, - 24: 0, - 25: 131104, - 26: 134348800, - 27: 134219808, - 28: 134350880, - 29: 133120, - 30: 2080, - 31: 134217728, - 2147483664: 131072, - 2147483665: 2048, - 2147483666: 134348832, - 2147483667: 133152, - 2147483668: 32, - 2147483669: 134348800, - 2147483670: 134217728, - 2147483671: 134219808, - 2147483672: 134350880, - 2147483673: 134217760, - 2147483674: 134219776, - 2147483675: 0, - 2147483676: 133120, - 2147483677: 2080, - 2147483678: 131104, - 2147483679: 134350848 - } - ]; - var SBOX_MASK = [ - 4160749569, - 528482304, - 33030144, - 2064384, - 129024, - 8064, - 504, - 2147483679 - ]; - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function() { - var key = this._key; - var keyWords = key.words; - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1; - } - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - var subKey = subKeys[nSubKey] = []; - var bitShift = BIT_SHIFTS[nSubKey]; - for (var i = 0; i < 24; i++) { - subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6; - subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6; - } - subKey[0] = subKey[0] << 1 | subKey[0] >>> 31; - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> (i - 1) * 4 + 3; - } - subKey[7] = subKey[7] << 5 | subKey[7] >>> 27; - } - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - encryptBlock: function(M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - decryptBlock: function(M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - _doCryptBlock: function(M, offset, subKeys) { - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - exchangeLR.call(this, 4, 252645135); - exchangeLR.call(this, 16, 65535); - exchangeRL.call(this, 2, 858993459); - exchangeRL.call(this, 8, 16711935); - exchangeLR.call(this, 1, 1431655765); - for (var round = 0; round < 16; round++) { - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - exchangeLR.call(this, 1, 1431655765); - exchangeRL.call(this, 8, 16711935); - exchangeRL.call(this, 2, 858993459); - exchangeLR.call(this, 16, 65535); - exchangeLR.call(this, 4, 252645135); - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - keySize: 64 / 32, - ivSize: 64 / 32, - blockSize: 64 / 32 - }); - function exchangeLR(offset, mask) { - var t = (this._lBlock >>> offset ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - function exchangeRL(offset, mask) { - var t = (this._rBlock >>> offset ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - C.DES = BlockCipher._createHelper(DES); - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function() { - var key = this._key; - var keyWords = key.words; - if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { - throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); - } - var key1 = keyWords.slice(0, 2); - var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); - var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); - this._des1 = DES.createEncryptor(WordArray.create(key1)); - this._des2 = DES.createEncryptor(WordArray.create(key2)); - this._des3 = DES.createEncryptor(WordArray.create(key3)); - }, - encryptBlock: function(M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - decryptBlock: function(M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - keySize: 192 / 32, - ivSize: 64 / 32, - blockSize: 64 / 32 - }); - C.TripleDES = BlockCipher._createHelper(TripleDES); - })(); - return CryptoJS.TripleDES; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/rc4.js -var require_rc4 = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/rc4.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function() { - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255; - j = (j + S[i] + keyByte) % 256; - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - this._i = this._j = 0; - }, - _doProcessBlock: function(M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - keySize: 256 / 32, - ivSize: 0 - }); - function generateKeystreamWord() { - var S = this._S; - var i = this._i; - var j = this._j; - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - var t = S[i]; - S[i] = S[j]; - S[j] = t; - keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8; - } - this._i = i; - this._j = j; - return keystreamWord; - } - C.RC4 = StreamCipher._createHelper(RC4); - var RC4Drop = C_algo.RC4Drop = RC4.extend({ - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - cfg: RC4.cfg.extend({ - drop: 192 - }), - _doReset: function() { - RC4._doReset.call(this); - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - })(); - return CryptoJS.RC4; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/rabbit.js -var require_rabbit = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/rabbit.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - var S = []; - var C_ = []; - var G = []; - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ - _doReset: function() { - var K = this._key.words; - var iv = this.cfg.iv; - for (var i = 0; i < 4; i++) { - K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360; - } - var X = this._X = [ - K[0], - K[3] << 16 | K[2] >>> 16, - K[1], - K[0] << 16 | K[3] >>> 16, - K[2], - K[1] << 16 | K[0] >>> 16, - K[3], - K[2] << 16 | K[1] >>> 16 - ]; - var C2 = this._C = [ - K[2] << 16 | K[2] >>> 16, - K[0] & 4294901760 | K[1] & 65535, - K[3] << 16 | K[3] >>> 16, - K[1] & 4294901760 | K[2] & 65535, - K[0] << 16 | K[0] >>> 16, - K[2] & 4294901760 | K[3] & 65535, - K[1] << 16 | K[1] >>> 16, - K[3] & 4294901760 | K[0] & 65535 - ]; - this._b = 0; - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - for (var i = 0; i < 8; i++) { - C2[i] ^= X[i + 4 & 7]; - } - if (iv) { - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360; - var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360; - var i1 = i0 >>> 16 | i2 & 4294901760; - var i3 = i2 << 16 | i0 & 65535; - C2[0] ^= i0; - C2[1] ^= i1; - C2[2] ^= i2; - C2[3] ^= i3; - C2[4] ^= i0; - C2[5] ^= i1; - C2[6] ^= i2; - C2[7] ^= i3; - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - _doProcessBlock: function(M, offset) { - var X = this._X; - nextState.call(this); - S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; - S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; - S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; - S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; - for (var i = 0; i < 4; i++) { - S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360; - M[offset + i] ^= S[i]; - } - }, - blockSize: 128 / 32, - ivSize: 64 / 32 - }); - function nextState() { - var X = this._X; - var C2 = this._C; - for (var i = 0; i < 8; i++) { - C_[i] = C2[i]; - } - C2[0] = C2[0] + 1295307597 + this._b | 0; - C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; - C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; - C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; - C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; - C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; - C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; - C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; - this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; - for (var i = 0; i < 8; i++) { - var gx = X[i] + C2[i]; - var ga = gx & 65535; - var gb = gx >>> 16; - var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; - var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); - G[i] = gh ^ gl; - } - X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; - X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; - X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; - X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; - X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; - X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; - X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; - X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; - } - C.Rabbit = StreamCipher._createHelper(Rabbit); - })(); - return CryptoJS.Rabbit; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/rabbit-legacy.js -var require_rabbit_legacy = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/rabbit-legacy.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - var S = []; - var C_ = []; - var G = []; - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function() { - var K = this._key.words; - var iv = this.cfg.iv; - var X = this._X = [ - K[0], - K[3] << 16 | K[2] >>> 16, - K[1], - K[0] << 16 | K[3] >>> 16, - K[2], - K[1] << 16 | K[0] >>> 16, - K[3], - K[2] << 16 | K[1] >>> 16 - ]; - var C2 = this._C = [ - K[2] << 16 | K[2] >>> 16, - K[0] & 4294901760 | K[1] & 65535, - K[3] << 16 | K[3] >>> 16, - K[1] & 4294901760 | K[2] & 65535, - K[0] << 16 | K[0] >>> 16, - K[2] & 4294901760 | K[3] & 65535, - K[1] << 16 | K[1] >>> 16, - K[3] & 4294901760 | K[0] & 65535 - ]; - this._b = 0; - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - for (var i = 0; i < 8; i++) { - C2[i] ^= X[i + 4 & 7]; - } - if (iv) { - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360; - var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360; - var i1 = i0 >>> 16 | i2 & 4294901760; - var i3 = i2 << 16 | i0 & 65535; - C2[0] ^= i0; - C2[1] ^= i1; - C2[2] ^= i2; - C2[3] ^= i3; - C2[4] ^= i0; - C2[5] ^= i1; - C2[6] ^= i2; - C2[7] ^= i3; - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - _doProcessBlock: function(M, offset) { - var X = this._X; - nextState.call(this); - S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; - S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; - S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; - S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; - for (var i = 0; i < 4; i++) { - S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360; - M[offset + i] ^= S[i]; - } - }, - blockSize: 128 / 32, - ivSize: 64 / 32 - }); - function nextState() { - var X = this._X; - var C2 = this._C; - for (var i = 0; i < 8; i++) { - C_[i] = C2[i]; - } - C2[0] = C2[0] + 1295307597 + this._b | 0; - C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; - C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; - C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; - C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; - C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; - C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; - C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; - this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; - for (var i = 0; i < 8; i++) { - var gx = X[i] + C2[i]; - var ga = gx & 65535; - var gb = gx >>> 16; - var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; - var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); - G[i] = gh ^ gl; - } - X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; - X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; - X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; - X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; - X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; - X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; - X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; - X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; - } - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - })(); - return CryptoJS.RabbitLegacy; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/blowfish.js -var require_blowfish = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/blowfish.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); - } else { - factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - (function() { - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - const N = 16; - const ORIG_P = [ - 608135816, - 2242054355, - 320440878, - 57701188, - 2752067618, - 698298832, - 137296536, - 3964562569, - 1160258022, - 953160567, - 3193202383, - 887688300, - 3232508343, - 3380367581, - 1065670069, - 3041331479, - 2450970073, - 2306472731 - ]; - const ORIG_S = [ - [ - 3509652390, - 2564797868, - 805139163, - 3491422135, - 3101798381, - 1780907670, - 3128725573, - 4046225305, - 614570311, - 3012652279, - 134345442, - 2240740374, - 1667834072, - 1901547113, - 2757295779, - 4103290238, - 227898511, - 1921955416, - 1904987480, - 2182433518, - 2069144605, - 3260701109, - 2620446009, - 720527379, - 3318853667, - 677414384, - 3393288472, - 3101374703, - 2390351024, - 1614419982, - 1822297739, - 2954791486, - 3608508353, - 3174124327, - 2024746970, - 1432378464, - 3864339955, - 2857741204, - 1464375394, - 1676153920, - 1439316330, - 715854006, - 3033291828, - 289532110, - 2706671279, - 2087905683, - 3018724369, - 1668267050, - 732546397, - 1947742710, - 3462151702, - 2609353502, - 2950085171, - 1814351708, - 2050118529, - 680887927, - 999245976, - 1800124847, - 3300911131, - 1713906067, - 1641548236, - 4213287313, - 1216130144, - 1575780402, - 4018429277, - 3917837745, - 3693486850, - 3949271944, - 596196993, - 3549867205, - 258830323, - 2213823033, - 772490370, - 2760122372, - 1774776394, - 2652871518, - 566650946, - 4142492826, - 1728879713, - 2882767088, - 1783734482, - 3629395816, - 2517608232, - 2874225571, - 1861159788, - 326777828, - 3124490320, - 2130389656, - 2716951837, - 967770486, - 1724537150, - 2185432712, - 2364442137, - 1164943284, - 2105845187, - 998989502, - 3765401048, - 2244026483, - 1075463327, - 1455516326, - 1322494562, - 910128902, - 469688178, - 1117454909, - 936433444, - 3490320968, - 3675253459, - 1240580251, - 122909385, - 2157517691, - 634681816, - 4142456567, - 3825094682, - 3061402683, - 2540495037, - 79693498, - 3249098678, - 1084186820, - 1583128258, - 426386531, - 1761308591, - 1047286709, - 322548459, - 995290223, - 1845252383, - 2603652396, - 3431023940, - 2942221577, - 3202600964, - 3727903485, - 1712269319, - 422464435, - 3234572375, - 1170764815, - 3523960633, - 3117677531, - 1434042557, - 442511882, - 3600875718, - 1076654713, - 1738483198, - 4213154764, - 2393238008, - 3677496056, - 1014306527, - 4251020053, - 793779912, - 2902807211, - 842905082, - 4246964064, - 1395751752, - 1040244610, - 2656851899, - 3396308128, - 445077038, - 3742853595, - 3577915638, - 679411651, - 2892444358, - 2354009459, - 1767581616, - 3150600392, - 3791627101, - 3102740896, - 284835224, - 4246832056, - 1258075500, - 768725851, - 2589189241, - 3069724005, - 3532540348, - 1274779536, - 3789419226, - 2764799539, - 1660621633, - 3471099624, - 4011903706, - 913787905, - 3497959166, - 737222580, - 2514213453, - 2928710040, - 3937242737, - 1804850592, - 3499020752, - 2949064160, - 2386320175, - 2390070455, - 2415321851, - 4061277028, - 2290661394, - 2416832540, - 1336762016, - 1754252060, - 3520065937, - 3014181293, - 791618072, - 3188594551, - 3933548030, - 2332172193, - 3852520463, - 3043980520, - 413987798, - 3465142937, - 3030929376, - 4245938359, - 2093235073, - 3534596313, - 375366246, - 2157278981, - 2479649556, - 555357303, - 3870105701, - 2008414854, - 3344188149, - 4221384143, - 3956125452, - 2067696032, - 3594591187, - 2921233993, - 2428461, - 544322398, - 577241275, - 1471733935, - 610547355, - 4027169054, - 1432588573, - 1507829418, - 2025931657, - 3646575487, - 545086370, - 48609733, - 2200306550, - 1653985193, - 298326376, - 1316178497, - 3007786442, - 2064951626, - 458293330, - 2589141269, - 3591329599, - 3164325604, - 727753846, - 2179363840, - 146436021, - 1461446943, - 4069977195, - 705550613, - 3059967265, - 3887724982, - 4281599278, - 3313849956, - 1404054877, - 2845806497, - 146425753, - 1854211946 - ], - [ - 1266315497, - 3048417604, - 3681880366, - 3289982499, - 290971e4, - 1235738493, - 2632868024, - 2414719590, - 3970600049, - 1771706367, - 1449415276, - 3266420449, - 422970021, - 1963543593, - 2690192192, - 3826793022, - 1062508698, - 1531092325, - 1804592342, - 2583117782, - 2714934279, - 4024971509, - 1294809318, - 4028980673, - 1289560198, - 2221992742, - 1669523910, - 35572830, - 157838143, - 1052438473, - 1016535060, - 1802137761, - 1753167236, - 1386275462, - 3080475397, - 2857371447, - 1040679964, - 2145300060, - 2390574316, - 1461121720, - 2956646967, - 4031777805, - 4028374788, - 33600511, - 2920084762, - 1018524850, - 629373528, - 3691585981, - 3515945977, - 2091462646, - 2486323059, - 586499841, - 988145025, - 935516892, - 3367335476, - 2599673255, - 2839830854, - 265290510, - 3972581182, - 2759138881, - 3795373465, - 1005194799, - 847297441, - 406762289, - 1314163512, - 1332590856, - 1866599683, - 4127851711, - 750260880, - 613907577, - 1450815602, - 3165620655, - 3734664991, - 3650291728, - 3012275730, - 3704569646, - 1427272223, - 778793252, - 1343938022, - 2676280711, - 2052605720, - 1946737175, - 3164576444, - 3914038668, - 3967478842, - 3682934266, - 1661551462, - 3294938066, - 4011595847, - 840292616, - 3712170807, - 616741398, - 312560963, - 711312465, - 1351876610, - 322626781, - 1910503582, - 271666773, - 2175563734, - 1594956187, - 70604529, - 3617834859, - 1007753275, - 1495573769, - 4069517037, - 2549218298, - 2663038764, - 504708206, - 2263041392, - 3941167025, - 2249088522, - 1514023603, - 1998579484, - 1312622330, - 694541497, - 2582060303, - 2151582166, - 1382467621, - 776784248, - 2618340202, - 3323268794, - 2497899128, - 2784771155, - 503983604, - 4076293799, - 907881277, - 423175695, - 432175456, - 1378068232, - 4145222326, - 3954048622, - 3938656102, - 3820766613, - 2793130115, - 2977904593, - 26017576, - 3274890735, - 3194772133, - 1700274565, - 1756076034, - 4006520079, - 3677328699, - 720338349, - 1533947780, - 354530856, - 688349552, - 3973924725, - 1637815568, - 332179504, - 3949051286, - 53804574, - 2852348879, - 3044236432, - 1282449977, - 3583942155, - 3416972820, - 4006381244, - 1617046695, - 2628476075, - 3002303598, - 1686838959, - 431878346, - 2686675385, - 1700445008, - 1080580658, - 1009431731, - 832498133, - 3223435511, - 2605976345, - 2271191193, - 2516031870, - 1648197032, - 4164389018, - 2548247927, - 300782431, - 375919233, - 238389289, - 3353747414, - 2531188641, - 2019080857, - 1475708069, - 455242339, - 2609103871, - 448939670, - 3451063019, - 1395535956, - 2413381860, - 1841049896, - 1491858159, - 885456874, - 4264095073, - 4001119347, - 1565136089, - 3898914787, - 1108368660, - 540939232, - 1173283510, - 2745871338, - 3681308437, - 4207628240, - 3343053890, - 4016749493, - 1699691293, - 1103962373, - 3625875870, - 2256883143, - 3830138730, - 1031889488, - 3479347698, - 1535977030, - 4236805024, - 3251091107, - 2132092099, - 1774941330, - 1199868427, - 1452454533, - 157007616, - 2904115357, - 342012276, - 595725824, - 1480756522, - 206960106, - 497939518, - 591360097, - 863170706, - 2375253569, - 3596610801, - 1814182875, - 2094937945, - 3421402208, - 1082520231, - 3463918190, - 2785509508, - 435703966, - 3908032597, - 1641649973, - 2842273706, - 3305899714, - 1510255612, - 2148256476, - 2655287854, - 3276092548, - 4258621189, - 236887753, - 3681803219, - 274041037, - 1734335097, - 3815195456, - 3317970021, - 1899903192, - 1026095262, - 4050517792, - 356393447, - 2410691914, - 3873677099, - 3682840055 - ], - [ - 3913112168, - 2491498743, - 4132185628, - 2489919796, - 1091903735, - 1979897079, - 3170134830, - 3567386728, - 3557303409, - 857797738, - 1136121015, - 1342202287, - 507115054, - 2535736646, - 337727348, - 3213592640, - 1301675037, - 2528481711, - 1895095763, - 1721773893, - 3216771564, - 62756741, - 2142006736, - 835421444, - 2531993523, - 1442658625, - 3659876326, - 2882144922, - 676362277, - 1392781812, - 170690266, - 3921047035, - 1759253602, - 3611846912, - 1745797284, - 664899054, - 1329594018, - 3901205900, - 3045908486, - 2062866102, - 2865634940, - 3543621612, - 3464012697, - 1080764994, - 553557557, - 3656615353, - 3996768171, - 991055499, - 499776247, - 1265440854, - 648242737, - 3940784050, - 980351604, - 3713745714, - 1749149687, - 3396870395, - 4211799374, - 3640570775, - 1161844396, - 3125318951, - 1431517754, - 545492359, - 4268468663, - 3499529547, - 1437099964, - 2702547544, - 3433638243, - 2581715763, - 2787789398, - 1060185593, - 1593081372, - 2418618748, - 4260947970, - 69676912, - 2159744348, - 86519011, - 2512459080, - 3838209314, - 1220612927, - 3339683548, - 133810670, - 1090789135, - 1078426020, - 1569222167, - 845107691, - 3583754449, - 4072456591, - 1091646820, - 628848692, - 1613405280, - 3757631651, - 526609435, - 236106946, - 48312990, - 2942717905, - 3402727701, - 1797494240, - 859738849, - 992217954, - 4005476642, - 2243076622, - 3870952857, - 3732016268, - 765654824, - 3490871365, - 2511836413, - 1685915746, - 3888969200, - 1414112111, - 2273134842, - 3281911079, - 4080962846, - 172450625, - 2569994100, - 980381355, - 4109958455, - 2819808352, - 2716589560, - 2568741196, - 3681446669, - 3329971472, - 1835478071, - 660984891, - 3704678404, - 4045999559, - 3422617507, - 3040415634, - 1762651403, - 1719377915, - 3470491036, - 2693910283, - 3642056355, - 3138596744, - 1364962596, - 2073328063, - 1983633131, - 926494387, - 3423689081, - 2150032023, - 4096667949, - 1749200295, - 3328846651, - 309677260, - 2016342300, - 1779581495, - 3079819751, - 111262694, - 1274766160, - 443224088, - 298511866, - 1025883608, - 3806446537, - 1145181785, - 168956806, - 3641502830, - 3584813610, - 1689216846, - 3666258015, - 3200248200, - 1692713982, - 2646376535, - 4042768518, - 1618508792, - 1610833997, - 3523052358, - 4130873264, - 2001055236, - 3610705100, - 2202168115, - 4028541809, - 2961195399, - 1006657119, - 2006996926, - 3186142756, - 1430667929, - 3210227297, - 1314452623, - 4074634658, - 4101304120, - 2273951170, - 1399257539, - 3367210612, - 3027628629, - 1190975929, - 2062231137, - 2333990788, - 2221543033, - 2438960610, - 1181637006, - 548689776, - 2362791313, - 3372408396, - 3104550113, - 3145860560, - 296247880, - 1970579870, - 3078560182, - 3769228297, - 1714227617, - 3291629107, - 3898220290, - 166772364, - 1251581989, - 493813264, - 448347421, - 195405023, - 2709975567, - 677966185, - 3703036547, - 1463355134, - 2715995803, - 1338867538, - 1343315457, - 2802222074, - 2684532164, - 233230375, - 2599980071, - 2000651841, - 3277868038, - 1638401717, - 4028070440, - 3237316320, - 6314154, - 819756386, - 300326615, - 590932579, - 1405279636, - 3267499572, - 3150704214, - 2428286686, - 3959192993, - 3461946742, - 1862657033, - 1266418056, - 963775037, - 2089974820, - 2263052895, - 1917689273, - 448879540, - 3550394620, - 3981727096, - 150775221, - 3627908307, - 1303187396, - 508620638, - 2975983352, - 2726630617, - 1817252668, - 1876281319, - 1457606340, - 908771278, - 3720792119, - 3617206836, - 2455994898, - 1729034894, - 1080033504 - ], - [ - 976866871, - 3556439503, - 2881648439, - 1522871579, - 1555064734, - 1336096578, - 3548522304, - 2579274686, - 3574697629, - 3205460757, - 3593280638, - 3338716283, - 3079412587, - 564236357, - 2993598910, - 1781952180, - 1464380207, - 3163844217, - 3332601554, - 1699332808, - 1393555694, - 1183702653, - 3581086237, - 1288719814, - 691649499, - 2847557200, - 2895455976, - 3193889540, - 2717570544, - 1781354906, - 1676643554, - 2592534050, - 3230253752, - 1126444790, - 2770207658, - 2633158820, - 2210423226, - 2615765581, - 2414155088, - 3127139286, - 673620729, - 2805611233, - 1269405062, - 4015350505, - 3341807571, - 4149409754, - 1057255273, - 2012875353, - 2162469141, - 2276492801, - 2601117357, - 993977747, - 3918593370, - 2654263191, - 753973209, - 36408145, - 2530585658, - 25011837, - 3520020182, - 2088578344, - 530523599, - 2918365339, - 1524020338, - 1518925132, - 3760827505, - 3759777254, - 1202760957, - 3985898139, - 3906192525, - 674977740, - 4174734889, - 2031300136, - 2019492241, - 3983892565, - 4153806404, - 3822280332, - 352677332, - 2297720250, - 60907813, - 90501309, - 3286998549, - 1016092578, - 2535922412, - 2839152426, - 457141659, - 509813237, - 4120667899, - 652014361, - 1966332200, - 2975202805, - 55981186, - 2327461051, - 676427537, - 3255491064, - 2882294119, - 3433927263, - 1307055953, - 942726286, - 933058658, - 2468411793, - 3933900994, - 4215176142, - 1361170020, - 2001714738, - 2830558078, - 3274259782, - 1222529897, - 1679025792, - 2729314320, - 3714953764, - 1770335741, - 151462246, - 3013232138, - 1682292957, - 1483529935, - 471910574, - 1539241949, - 458788160, - 3436315007, - 1807016891, - 3718408830, - 978976581, - 1043663428, - 3165965781, - 1927990952, - 4200891579, - 2372276910, - 3208408903, - 3533431907, - 1412390302, - 2931980059, - 4132332400, - 1947078029, - 3881505623, - 4168226417, - 2941484381, - 1077988104, - 1320477388, - 886195818, - 18198404, - 3786409e3, - 2509781533, - 112762804, - 3463356488, - 1866414978, - 891333506, - 18488651, - 661792760, - 1628790961, - 3885187036, - 3141171499, - 876946877, - 2693282273, - 1372485963, - 791857591, - 2686433993, - 3759982718, - 3167212022, - 3472953795, - 2716379847, - 445679433, - 3561995674, - 3504004811, - 3574258232, - 54117162, - 3331405415, - 2381918588, - 3769707343, - 4154350007, - 1140177722, - 4074052095, - 668550556, - 3214352940, - 367459370, - 261225585, - 2610173221, - 4209349473, - 3468074219, - 3265815641, - 314222801, - 3066103646, - 3808782860, - 282218597, - 3406013506, - 3773591054, - 379116347, - 1285071038, - 846784868, - 2669647154, - 3771962079, - 3550491691, - 2305946142, - 453669953, - 1268987020, - 3317592352, - 3279303384, - 3744833421, - 2610507566, - 3859509063, - 266596637, - 3847019092, - 517658769, - 3462560207, - 3443424879, - 370717030, - 4247526661, - 2224018117, - 4143653529, - 4112773975, - 2788324899, - 2477274417, - 1456262402, - 2901442914, - 1517677493, - 1846949527, - 2295493580, - 3734397586, - 2176403920, - 1280348187, - 1908823572, - 3871786941, - 846861322, - 1172426758, - 3287448474, - 3383383037, - 1655181056, - 3139813346, - 901632758, - 1897031941, - 2986607138, - 3066810236, - 3447102507, - 1393639104, - 373351379, - 950779232, - 625454576, - 3124240540, - 4148612726, - 2007998917, - 544563296, - 2244738638, - 2330496472, - 2058025392, - 1291430526, - 424198748, - 50039436, - 29584100, - 3605783033, - 2429876329, - 2791104160, - 1057563949, - 3255363231, - 3075367218, - 3463963227, - 1469046755, - 985887462 - ] - ]; - var BLOWFISH_CTX = { - pbox: [], - sbox: [] - }; - function F(ctx, x) { - let a = x >> 24 & 255; - let b = x >> 16 & 255; - let c = x >> 8 & 255; - let d = x & 255; - let y = ctx.sbox[0][a] + ctx.sbox[1][b]; - y = y ^ ctx.sbox[2][c]; - y = y + ctx.sbox[3][d]; - return y; - } - function BlowFish_Encrypt(ctx, left, right) { - let Xl = left; - let Xr = right; - let temp; - for (let i = 0; i < N; ++i) { - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - temp = Xl; - Xl = Xr; - Xr = temp; - } - temp = Xl; - Xl = Xr; - Xr = temp; - Xr = Xr ^ ctx.pbox[N]; - Xl = Xl ^ ctx.pbox[N + 1]; - return { left: Xl, right: Xr }; - } - function BlowFish_Decrypt(ctx, left, right) { - let Xl = left; - let Xr = right; - let temp; - for (let i = N + 1; i > 1; --i) { - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - temp = Xl; - Xl = Xr; - Xr = temp; - } - temp = Xl; - Xl = Xr; - Xr = temp; - Xr = Xr ^ ctx.pbox[1]; - Xl = Xl ^ ctx.pbox[0]; - return { left: Xl, right: Xr }; - } - function BlowFishInit(ctx, key, keysize) { - for (let Row = 0; Row < 4; Row++) { - ctx.sbox[Row] = []; - for (let Col = 0; Col < 256; Col++) { - ctx.sbox[Row][Col] = ORIG_S[Row][Col]; - } - } - let keyIndex = 0; - for (let index = 0; index < N + 2; index++) { - ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; - keyIndex++; - if (keyIndex >= keysize) { - keyIndex = 0; - } - } - let Data1 = 0; - let Data2 = 0; - let res = 0; - for (let i = 0; i < N + 2; i += 2) { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.pbox[i] = Data1; - ctx.pbox[i + 1] = Data2; - } - for (let i = 0; i < 4; i++) { - for (let j = 0; j < 256; j += 2) { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.sbox[i][j] = Data1; - ctx.sbox[i][j + 1] = Data2; - } - } - return true; - } - var Blowfish = C_algo.Blowfish = BlockCipher.extend({ - _doReset: function() { - if (this._keyPriorReset === this._key) { - return; - } - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - BlowFishInit(BLOWFISH_CTX, keyWords, keySize); - }, - encryptBlock: function(M, offset) { - var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - decryptBlock: function(M, offset) { - var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - blockSize: 64 / 32, - keySize: 128 / 32, - ivSize: 64 / 32 - }); - C.Blowfish = BlockCipher._createHelper(Blowfish); - })(); - return CryptoJS.Blowfish; - }); - } -}); - -// ../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/index.js -var require_crypto_js = __commonJS({ - "../../../../document/九亿商城/jy/jiuyi2/node_modules/crypto-js/index.js"(exports, module) { - (function(root, factory, undef) { - if (typeof exports === "object") { - module.exports = exports = factory(require_core(), require_x64_core(), require_lib_typedarrays(), require_enc_utf16(), require_enc_base64(), require_enc_base64url(), require_md5(), require_sha1(), require_sha256(), require_sha224(), require_sha512(), require_sha384(), require_sha3(), require_ripemd160(), require_hmac(), require_pbkdf2(), require_evpkdf(), require_cipher_core(), require_mode_cfb(), require_mode_ctr(), require_mode_ctr_gladman(), require_mode_ofb(), require_mode_ecb(), require_pad_ansix923(), require_pad_iso10126(), require_pad_iso97971(), require_pad_zeropadding(), require_pad_nopadding(), require_format_hex(), require_aes(), require_tripledes(), require_rc4(), require_rabbit(), require_rabbit_legacy(), require_blowfish()); - } else if (typeof define === "function" && define.amd) { - define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./enc-base64url", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy", "./blowfish"], factory); - } else { - root.CryptoJS = factory(root.CryptoJS); - } - })(exports, function(CryptoJS) { - return CryptoJS; - }); - } -}); -export default require_crypto_js(); -/*! Bundled license information: - -crypto-js/ripemd160.js: - (** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *) - -crypto-js/mode-ctr-gladman.js: - (** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - *) -*/ -//# sourceMappingURL=crypto-js.js.map diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js.map b/jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js.map deleted file mode 100644 index e49d916a..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["browser-external:crypto", "../../../../../node_modules/crypto-js/core.js", "../../../../../node_modules/crypto-js/x64-core.js", "../../../../../node_modules/crypto-js/lib-typedarrays.js", "../../../../../node_modules/crypto-js/enc-utf16.js", "../../../../../node_modules/crypto-js/enc-base64.js", "../../../../../node_modules/crypto-js/enc-base64url.js", "../../../../../node_modules/crypto-js/md5.js", "../../../../../node_modules/crypto-js/sha1.js", "../../../../../node_modules/crypto-js/sha256.js", "../../../../../node_modules/crypto-js/sha224.js", "../../../../../node_modules/crypto-js/sha512.js", "../../../../../node_modules/crypto-js/sha384.js", "../../../../../node_modules/crypto-js/sha3.js", "../../../../../node_modules/crypto-js/ripemd160.js", "../../../../../node_modules/crypto-js/hmac.js", "../../../../../node_modules/crypto-js/pbkdf2.js", "../../../../../node_modules/crypto-js/evpkdf.js", "../../../../../node_modules/crypto-js/cipher-core.js", "../../../../../node_modules/crypto-js/mode-cfb.js", "../../../../../node_modules/crypto-js/mode-ctr.js", "../../../../../node_modules/crypto-js/mode-ctr-gladman.js", "../../../../../node_modules/crypto-js/mode-ofb.js", "../../../../../node_modules/crypto-js/mode-ecb.js", "../../../../../node_modules/crypto-js/pad-ansix923.js", "../../../../../node_modules/crypto-js/pad-iso10126.js", "../../../../../node_modules/crypto-js/pad-iso97971.js", "../../../../../node_modules/crypto-js/pad-zeropadding.js", "../../../../../node_modules/crypto-js/pad-nopadding.js", "../../../../../node_modules/crypto-js/format-hex.js", "../../../../../node_modules/crypto-js/aes.js", "../../../../../node_modules/crypto-js/tripledes.js", "../../../../../node_modules/crypto-js/rc4.js", "../../../../../node_modules/crypto-js/rabbit.js", "../../../../../node_modules/crypto-js/rabbit-legacy.js", "../../../../../node_modules/crypto-js/blowfish.js", "../../../../../node_modules/crypto-js/index.js"], - "sourcesContent": ["module.exports = Object.create(new Proxy({}, {\n get(_, key) {\n if (\n key !== '__esModule' &&\n key !== '__proto__' &&\n key !== 'constructor' &&\n key !== 'splice'\n ) {\n console.warn(`Module \"crypto\" has been externalized for browser compatibility. Cannot access \"crypto.${key}\" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)\n }\n }\n}))", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64url encoding strategy.\n\t */\n\t var Base64url = C_enc.Base64url = {\n\t /**\n\t * Converts a word array to a Base64url string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {string} The Base64url string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);\n\t */\n\t stringify: function (wordArray, urlSafe) {\n\t if (urlSafe === undefined) {\n\t urlSafe = true\n\t }\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = urlSafe ? this._safe_map : this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64url string to a word array.\n\t *\n\t * @param {string} base64Str The Base64url string.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64url.parse(base64String);\n\t */\n\t parse: function (base64Str, urlSafe) {\n\t if (urlSafe === undefined) {\n\t urlSafe = true\n\t }\n\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = urlSafe ? this._safe_map : this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n\t _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64url;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t var Wil;\n\t var Wih;\n\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t Wih = Wi.high = M[offset + i * 2] | 0;\n\t Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t Wil = gamma0l + Wi7l;\n\t Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t Wil = Wil + gamma1l;\n\t Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t Wil = Wil + Wi16l;\n\t Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./sha512\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./sha512\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t var tMsw;\n\t var tLsw;\n\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));", ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA256\n\t * @property {number} iterations The number of iterations to perform. Default: 250000\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA256,\n\t iterations: 250000\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t var block;\n\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./evpkdf\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./evpkdf\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t var block;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t var modeCreator;\n\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t modeCreator = mode.createDecryptor;\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\n\t if (this._mode && this._mode.__creator == modeCreator) {\n\t this._mode.init(this, iv && iv.words);\n\t } else {\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t this._mode.__creator = modeCreator;\n\t }\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t var finalProcessedBlocks;\n\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t var wordArray;\n\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t var salt;\n\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt, hasher) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t if (!hasher) {\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\t } else {\n\t var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt);\n\t }\n\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t var keystream;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t for (var i = data.sigBytes - 1; i >= 0; i--) {\n\t if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t data.sigBytes = i + 1;\n\t break;\n\t }\n\t }\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t var t;\n\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t // Make sure the key length is valid (64, 128 or >= 192 bit)\n\t if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {\n\t throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');\n\t }\n\n\t // Extend the key according to the keying options defined in 3DES standard\n\t var key1 = keyWords.slice(0, 2);\n\t var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);\n\t var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(key1));\n\t this._des2 = DES.createEncryptor(WordArray.create(key2));\n\t this._des3 = DES.createEncryptor(WordArray.create(key3));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t const N = 16;\n\n\t //Origin pbox and sbox, derived from PI\n\t const ORIG_P = [\n\t 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,\n\t 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,\n\t 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,\n\t 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,\n\t 0x9216D5D9, 0x8979FB1B\n\t ];\n\n\t const ORIG_S = [\n\t [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7,\n\t 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99,\n\t 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,\n\t 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E,\n\t 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE,\n\t 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,\n\t 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF,\n\t 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E,\n\t 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60,\n\t 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440,\n\t 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE,\n\t 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A,\n\t 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E,\n\t 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677,\n\t 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193,\n\t 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032,\n\t 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88,\n\t 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239,\n\t 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E,\n\t 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0,\n\t 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3,\n\t 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98,\n\t 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88,\n\t 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE,\n\t 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6,\n\t 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D,\n\t 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B,\n\t 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7,\n\t 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA,\n\t 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463,\n\t 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F,\n\t 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09,\n\t 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3,\n\t 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB,\n\t 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279,\n\t 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8,\n\t 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB,\n\t 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82,\n\t 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB,\n\t 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573,\n\t 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0,\n\t 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B,\n\t 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790,\n\t 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8,\n\t 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4,\n\t 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0,\n\t 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7,\n\t 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C,\n\t 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD,\n\t 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1,\n\t 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299,\n\t 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9,\n\t 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477,\n\t 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF,\n\t 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49,\n\t 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF,\n\t 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA,\n\t 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5,\n\t 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41,\n\t 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915,\n\t 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400,\n\t 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915,\n\t 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664,\n\t 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ],\n\t [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623,\n\t 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266,\n\t 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1,\n\t 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E,\n\t 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6,\n\t 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1,\n\t 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E,\n\t 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1,\n\t 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737,\n\t 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8,\n\t 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF,\n\t 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD,\n\t 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701,\n\t 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7,\n\t 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41,\n\t 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331,\n\t 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF,\n\t 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF,\n\t 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E,\n\t 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87,\n\t 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C,\n\t 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2,\n\t 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16,\n\t 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD,\n\t 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B,\n\t 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509,\n\t 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E,\n\t 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3,\n\t 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F,\n\t 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A,\n\t 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4,\n\t 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960,\n\t 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66,\n\t 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28,\n\t 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802,\n\t 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84,\n\t 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510,\n\t 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF,\n\t 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14,\n\t 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E,\n\t 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50,\n\t 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7,\n\t 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8,\n\t 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281,\n\t 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99,\n\t 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696,\n\t 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128,\n\t 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73,\n\t 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0,\n\t 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0,\n\t 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105,\n\t 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250,\n\t 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3,\n\t 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285,\n\t 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00,\n\t 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061,\n\t 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB,\n\t 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E,\n\t 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735,\n\t 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC,\n\t 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9,\n\t 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340,\n\t 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20,\n\t 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ],\n\t [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934,\n\t 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068,\n\t 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF,\n\t 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840,\n\t 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45,\n\t 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504,\n\t 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A,\n\t 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB,\n\t 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE,\n\t 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6,\n\t 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42,\n\t 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B,\n\t 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2,\n\t 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB,\n\t 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527,\n\t 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B,\n\t 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33,\n\t 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C,\n\t 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3,\n\t 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC,\n\t 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17,\n\t 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564,\n\t 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B,\n\t 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115,\n\t 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922,\n\t 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728,\n\t 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0,\n\t 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E,\n\t 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37,\n\t 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D,\n\t 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804,\n\t 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B,\n\t 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3,\n\t 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB,\n\t 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D,\n\t 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C,\n\t 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350,\n\t 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9,\n\t 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A,\n\t 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE,\n\t 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D,\n\t 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC,\n\t 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F,\n\t 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61,\n\t 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2,\n\t 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9,\n\t 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2,\n\t 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C,\n\t 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E,\n\t 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633,\n\t 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10,\n\t 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169,\n\t 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52,\n\t 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027,\n\t 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5,\n\t 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62,\n\t 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634,\n\t 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76,\n\t 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24,\n\t 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC,\n\t 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4,\n\t 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C,\n\t 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837,\n\t 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ],\n\t [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B,\n\t 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE,\n\t 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B,\n\t 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4,\n\t 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8,\n\t 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6,\n\t 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304,\n\t 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22,\n\t 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4,\n\t 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6,\n\t 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9,\n\t 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59,\n\t 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593,\n\t 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51,\n\t 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28,\n\t 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C,\n\t 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B,\n\t 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28,\n\t 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C,\n\t 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD,\n\t 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A,\n\t 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319,\n\t 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB,\n\t 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F,\n\t 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991,\n\t 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32,\n\t 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680,\n\t 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166,\n\t 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE,\n\t 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB,\n\t 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5,\n\t 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47,\n\t 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370,\n\t 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D,\n\t 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84,\n\t 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048,\n\t 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8,\n\t 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD,\n\t 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9,\n\t 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7,\n\t 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38,\n\t 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F,\n\t 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C,\n\t 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525,\n\t 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1,\n\t 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442,\n\t 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964,\n\t 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E,\n\t 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8,\n\t 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D,\n\t 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F,\n\t 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299,\n\t 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02,\n\t 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC,\n\t 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614,\n\t 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A,\n\t 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6,\n\t 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B,\n\t 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0,\n\t 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060,\n\t 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E,\n\t 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9,\n\t 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F,\n\t 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ]\n\t ];\n\n\t var BLOWFISH_CTX = {\n\t pbox: [],\n\t sbox: []\n\t }\n\n\t function F(ctx, x){\n\t let a = (x >> 24) & 0xFF;\n\t let b = (x >> 16) & 0xFF;\n\t let c = (x >> 8) & 0xFF;\n\t let d = x & 0xFF;\n\n\t let y = ctx.sbox[0][a] + ctx.sbox[1][b];\n\t y = y ^ ctx.sbox[2][c];\n\t y = y + ctx.sbox[3][d];\n\n\t return y;\n\t }\n\n\t function BlowFish_Encrypt(ctx, left, right){\n\t let Xl = left;\n\t let Xr = right;\n\t let temp;\n\n\t for(let i = 0; i < N; ++i){\n\t Xl = Xl ^ ctx.pbox[i];\n\t Xr = F(ctx, Xl) ^ Xr;\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\t }\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\n\t Xr = Xr ^ ctx.pbox[N];\n\t Xl = Xl ^ ctx.pbox[N + 1];\n\n\t return {left: Xl, right: Xr};\n\t }\n\n\t function BlowFish_Decrypt(ctx, left, right){\n\t let Xl = left;\n\t let Xr = right;\n\t let temp;\n\n\t for(let i = N + 1; i > 1; --i){\n\t Xl = Xl ^ ctx.pbox[i];\n\t Xr = F(ctx, Xl) ^ Xr;\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\t }\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\n\t Xr = Xr ^ ctx.pbox[1];\n\t Xl = Xl ^ ctx.pbox[0];\n\n\t return {left: Xl, right: Xr};\n\t }\n\n\t /**\n\t * Initialization ctx's pbox and sbox.\n\t *\n\t * @param {Object} ctx The object has pbox and sbox.\n\t * @param {Array} key An array of 32-bit words.\n\t * @param {int} keysize The length of the key.\n\t *\n\t * @example\n\t *\n\t * BlowFishInit(BLOWFISH_CTX, key, 128/32);\n\t */\n\t function BlowFishInit(ctx, key, keysize)\n\t {\n\t for(let Row = 0; Row < 4; Row++)\n\t {\n\t ctx.sbox[Row] = [];\n\t for(let Col = 0; Col < 256; Col++)\n\t {\n\t ctx.sbox[Row][Col] = ORIG_S[Row][Col];\n\t }\n\t }\n\n\t let keyIndex = 0;\n\t for(let index = 0; index < N + 2; index++)\n\t {\n\t ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex];\n\t keyIndex++;\n\t if(keyIndex >= keysize)\n\t {\n\t keyIndex = 0;\n\t }\n\t }\n\n\t let Data1 = 0;\n\t let Data2 = 0;\n\t let res = 0;\n\t for(let i = 0; i < N + 2; i += 2)\n\t {\n\t res = BlowFish_Encrypt(ctx, Data1, Data2);\n\t Data1 = res.left;\n\t Data2 = res.right;\n\t ctx.pbox[i] = Data1;\n\t ctx.pbox[i + 1] = Data2;\n\t }\n\n\t for(let i = 0; i < 4; i++)\n\t {\n\t for(let j = 0; j < 256; j += 2)\n\t {\n\t res = BlowFish_Encrypt(ctx, Data1, Data2);\n\t Data1 = res.left;\n\t Data2 = res.right;\n\t ctx.sbox[i][j] = Data1;\n\t ctx.sbox[i][j + 1] = Data2;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t /**\n\t * Blowfish block cipher algorithm.\n\t */\n\t var Blowfish = C_algo.Blowfish = BlockCipher.extend({\n\t _doReset: function () {\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t //Initialization pbox and sbox\n\t BlowFishInit(BLOWFISH_CTX, keyWords, keySize);\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);\n\t M[offset] = res.left;\n\t M[offset + 1] = res.right;\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);\n\t M[offset] = res.left;\n\t M[offset + 1] = res.right;\n\t },\n\n\t blockSize: 64/32,\n\n\t keySize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Blowfish = BlockCipher._createHelper(Blowfish);\n\t}());\n\n\n\treturn CryptoJS.Blowfish;\n\n}));", ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./lib-typedarrays\"), require(\"./enc-utf16\"), require(\"./enc-base64\"), require(\"./enc-base64url\"), require(\"./md5\"), require(\"./sha1\"), require(\"./sha256\"), require(\"./sha224\"), require(\"./sha512\"), require(\"./sha384\"), require(\"./sha3\"), require(\"./ripemd160\"), require(\"./hmac\"), require(\"./pbkdf2\"), require(\"./evpkdf\"), require(\"./cipher-core\"), require(\"./mode-cfb\"), require(\"./mode-ctr\"), require(\"./mode-ctr-gladman\"), require(\"./mode-ofb\"), require(\"./mode-ecb\"), require(\"./pad-ansix923\"), require(\"./pad-iso10126\"), require(\"./pad-iso97971\"), require(\"./pad-zeropadding\"), require(\"./pad-nopadding\"), require(\"./format-hex\"), require(\"./aes\"), require(\"./tripledes\"), require(\"./rc4\"), require(\"./rabbit\"), require(\"./rabbit-legacy\"), require(\"./blowfish\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./lib-typedarrays\", \"./enc-utf16\", \"./enc-base64\", \"./enc-base64url\", \"./md5\", \"./sha1\", \"./sha256\", \"./sha224\", \"./sha512\", \"./sha384\", \"./sha3\", \"./ripemd160\", \"./hmac\", \"./pbkdf2\", \"./evpkdf\", \"./cipher-core\", \"./mode-cfb\", \"./mode-ctr\", \"./mode-ctr-gladman\", \"./mode-ofb\", \"./mode-ecb\", \"./pad-ansix923\", \"./pad-iso10126\", \"./pad-iso97971\", \"./pad-zeropadding\", \"./pad-nopadding\", \"./format-hex\", \"./aes\", \"./tripledes\", \"./rc4\", \"./rabbit\", \"./rabbit-legacy\", \"./blowfish\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));"], - "mappings": ";;;;;;AAAA;AAAA;AAAA,WAAO,UAAU,OAAO,OAAO,IAAI,MAAM,CAAC,GAAG;AAAA,MAC3C,IAAI,GAAG,KAAK;AACV,YACE,QAAQ,gBACR,QAAQ,eACR,QAAQ,iBACR,QAAQ,UACR;AACA,kBAAQ,KAAK,0FAA0F,GAAG,qIAAqI;AAAA,QACjP;AAAA,MACF;AAAA,IACF,CAAC,CAAC;AAAA;AAAA;;;ACXF;AAAA;AAAC,KAAC,SAAU,MAAM,SAAS;AAC1B,UAAI,OAAO,YAAY,UAAU;AAEhC,eAAO,UAAU,UAAU,QAAQ;AAAA,MACpC,WACS,OAAO,WAAW,cAAc,OAAO,KAAK;AAEpD,eAAO,CAAC,GAAG,OAAO;AAAA,MACnB,OACK;AAEJ,aAAK,WAAW,QAAQ;AAAA,MACzB;AAAA,IACD,GAAE,SAAM,WAAY;AAOnB,UAAI,WAAW,YAAa,SAAUA,OAAMC,YAAW;AAEnD,YAAI;AAGJ,YAAI,OAAO,WAAW,eAAe,OAAO,QAAQ;AAChD,mBAAS,OAAO;AAAA,QACpB;AAGA,YAAI,OAAO,SAAS,eAAe,KAAK,QAAQ;AAC5C,mBAAS,KAAK;AAAA,QAClB;AAGA,YAAI,OAAO,eAAe,eAAe,WAAW,QAAQ;AACxD,mBAAS,WAAW;AAAA,QACxB;AAGA,YAAI,CAAC,UAAU,OAAO,WAAW,eAAe,OAAO,UAAU;AAC7D,mBAAS,OAAO;AAAA,QACpB;AAGA,YAAI,CAAC,UAAU,OAAO,WAAW,eAAe,OAAO,QAAQ;AAC3D,mBAAS,OAAO;AAAA,QACpB;AAGA,YAAI,CAAC,UAAU,O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B,4BAA+B,oBAAuB,oBAAuB,wBAA2B,wBAA2B,wBAA2B,2BAA8B,yBAA4B,sBAAyB,eAAkB,qBAAwB,eAAkB,kBAAqB,yBAA4B,kBAAqB;AAAA,MACr1B,WACS,OAAO,WAAW,cAAc,OAAO,KAAK;AAEpD,eAAO,CAAC,UAAU,cAAc,qBAAqB,eAAe,gBAAgB,mBAAmB,SAAS,UAAU,YAAY,YAAY,YAAY,YAAY,UAAU,eAAe,UAAU,YAAY,YAAY,iBAAiB,cAAc,cAAc,sBAAsB,cAAc,cAAc,kBAAkB,kBAAkB,kBAAkB,qBAAqB,mBAAmB,gBAAgB,SAAS,eAAe,SAAS,YAAY,mBAAmB,YAAY,GAAG,OAAO;AAAA,MACzgB,OACK;AAEJ,aAAK,WAAW,QAAQ,KAAK,QAAQ;AAAA,MACtC;AAAA,IACD,GAAE,SAAM,SAAU,UAAU;AAE3B,aAAO;AAAA,IAER,CAAC;AAAA;AAAA;", - "names": ["Math", "undefined", "undefined", "Math", "Math", "n", "H", "Math", "Math", "undefined", "CBC", "undefined", "SUB_MIX_0", "SUB_MIX_1", "SUB_MIX_2", "SUB_MIX_3", "SBOX", "C", "C"] -} diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js b/jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js deleted file mode 100644 index 7cc50d2b..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js +++ /dev/null @@ -1,947 +0,0 @@ -import { - __commonJS -} from "./chunk-TDUMLE5V.js"; - -// ../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/js-pinyin/dist/pinyin.js -var require_pinyin = __commonJS({ - "../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/js-pinyin/dist/pinyin.js"(exports, module) { - "use strict"; - var _createClass = /* @__PURE__ */ function() { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) - descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - return function(Constructor, protoProps, staticProps) { - if (protoProps) - defineProperties(Constructor.prototype, protoProps); - if (staticProps) - defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - var Pinyin = function() { - function Pinyin2(options) { - _classCallCheck(this, Pinyin2); - this.setOptions(options); - this.initialize(); - } - _createClass(Pinyin2, [{ - key: "setOptions", - value: function setOptions(options) { - options = options || {}; - this.options = Object.assign({ checkPolyphone: false, charCase: 0 }, options); - } - /** - * 初始化数据 - */ - }, { - key: "initialize", - value: function initialize() { - this.char_dict = "YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYFZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWF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ZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY"; - this.full_dict = { - "a": "啊阿锕", - "ai": "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭", - "an": "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯", - "ang": "肮昂盎", - "ao": "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖", - "ba": "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃", - "bai": "白柏百摆佰败拜稗薜掰鞴", - "ban": "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨", - "bang": "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃", - "bao": "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅", - "bo": "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛", - "bei": "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾", - "ben": "奔苯本笨畚坌锛", - "beng": "崩绷甭泵蹦迸唪嘣甏", - "bi": "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀", - "bian": "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊", - "biao": "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔", - "bie": "鳖憋别瘪蹩鳘", - "bin": "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓", - "bing": "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹", - "bu": "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭", - "ca": "擦嚓礤", - "cai": "猜裁材才财睬踩采彩菜蔡", - "can": "餐参蚕残惭惨灿骖璨粲黪", - "cang": "苍舱仓沧藏伧", - "cao": "操糙槽曹草艹嘈漕螬艚", - "ce": "厕策侧册测刂帻恻", - "ceng": "层蹭噌", - "cha": "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩", - "chai": "拆柴豺侪茈瘥虿龇", - "chan": "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔", - "chang": "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳", - "chao": "超抄钞朝嘲潮巢吵炒怊绉晁耖", - "che": "车扯撤掣彻澈坼屮砗", - "chen": "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀", - "cheng": "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲", - "chi": "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑", - "chong": "充冲虫崇宠茺忡憧铳艟", - "chou": "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋", - "chu": "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜", - "chuan": "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡", - "chuang": "疮窗幢床闯创怆", - "chui": "吹炊捶锤垂陲棰槌", - "chun": "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽", - "chuo": "戳绰蔟辶辍镞踔龊", - "ci": "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑", - "cong": "聪葱囱匆从丛偬苁淙骢琮璁枞", - "cou": "薮楱辏腠", - "cu": "凑粗醋簇猝殂蹙", - "cuan": "蹿篡窜汆撺爨", - "cui": "摧崔催脆瘁粹淬翠萃悴璀榱隹", - "cun": "村存寸磋忖皴", - "cuo": "撮搓措挫错厝脞锉矬痤鹾蹉躜", - "chuai": "嘬膪踹", - "cen": "岑涔", - "da": "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑", - "dai": "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛", - "dan": "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪", - "dang": "当挡党荡档谠凼菪宕砀铛裆", - "dao": "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛", - "de": "德得的锝", - "deng": "蹬灯登等瞪凳邓噔嶝戥磴镫簦", - "di": "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶", - "dia": "嗲", - "dian": "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮", - "diao": "碉叼雕凋刁掉吊钓调轺铞蜩粜貂", - "die": "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎", - "ding": "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊", - "dong": "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫", - "dou": "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡", - "du": "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩", - "duan": "端短锻段断缎彖椴煅簖", - "dui": "堆兑队对怼憝碓", - "dun": "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸", - "duo": "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱", - "e": "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄", - "en": "恩蒽摁唔嗯", - "er": "而儿耳尔饵洱二贰迩珥铒鸸鲕", - "fa": "发罚筏伐乏阀法珐垡砝", - "fan": "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯", - "fang": "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂", - "fei": "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱", - "fen": "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢", - "feng": "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜", - "fo": "佛仏坲梻仸", - "fou": "缶", - "fu": "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆", - "ga": "噶嘎蛤尬呷尕尜旮钆", - "gai": "该改概钙盖溉丐陔垓戤赅胲", - "gan": "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐", - "gang": "冈刚钢缸肛纲岗港戆罡颃筻", - "gong": "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥", - "gao": "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆", - "ge": "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂", - "gei": "给", - "gen": "根跟亘茛哏艮", - "geng": "耕更庚羹埂耿梗哽赓鲠", - "gou": "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲", - "gu": "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘", - "gua": "刮瓜剐寡挂褂卦诖呱栝鸹", - "guai": "乖拐怪哙", - "guan": "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏", - "guang": "光广逛犷桄胱疒", - "gui": "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜", - "gun": "辊滚棍丨衮绲磙鲧", - "guo": "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈", - "ha": "哈", - "hai": "骸孩海氦亥害骇咴嗨颏醢", - "han": "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾", - "hen": "夯痕很狠恨", - "hang": "杭航沆绗珩桁", - "hao": "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝", - "he": "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮", - "hei": "嘿黑", - "heng": "哼亨横衡恒訇蘅", - "hong": "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓", - "hou": "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺", - "hu": "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛", - "hua": "花哗华猾滑画划化话劐浍骅桦铧稞", - "huai": "槐徊怀淮坏还踝", - "huan": "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟", - "huang": "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇", - "hui": "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾", - "hun": "荤昏婚魂浑混诨馄阍溷缗", - "huo": "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖", - "ji": "击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂", - "jia": "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏", - "jian": "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯", - "jiang": "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇", - "jiao": "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛", - "jie": "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫", - "jin": "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜", - "jing": "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌", - "jiong": "炯窘冂迥扃", - "jiu": "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏", - "ju": "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫", - "juan": "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽", - "jue": "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖", - "jun": "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇", - "ka": "喀咖卡佧咔胩", - "ke": "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁", - "kai": "开揩楷凯慨剀垲蒈忾恺铠锎", - "kan": "刊堪勘坎砍看侃凵莰莶戡龛瞰", - "kang": "康慷糠扛抗亢炕坑伉闶钪", - "kao": "考拷烤靠尻栲犒铐", - "ken": "肯啃垦恳垠裉颀", - "keng": "吭忐铿", - "kong": "空恐孔控倥崆箜", - "kou": "抠口扣寇芤蔻叩眍筘", - "ku": "枯哭窟苦酷库裤刳堀喾绔骷", - "kua": "夸垮挎跨胯侉", - "kuai": "块筷侩快蒯郐蒉狯脍", - "kuan": "宽款髋", - "kuang": "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶", - "kui": "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬", - "kun": "坤昆捆困悃阃琨锟醌鲲髡", - "kuo": "括扩廓阔蛞", - "la": "垃拉喇蜡腊辣啦剌摺邋旯砬瘌", - "lai": "莱来赖崃徕涞濑赉睐铼癞籁", - "lan": "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴", - "lang": "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂", - "lao": "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪", - "le": "勒乐肋仂叻嘞泐鳓", - "lei": "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹", - "ling": "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮", - "leng": "楞愣", - "li": "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧", - "lian": "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢", - "liang": "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉", - "liao": "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢", - "lie": "列裂烈劣猎冽埒洌趔躐鬣", - "lin": "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟", - "liu": "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏", - "long": "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃", - "lou": "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅", - "lu": "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈", - "lv": "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛", - "luan": "峦孪滦卵乱栾鸾銮", - "lue": "掠略锊", - "lun": "轮伦仑沦纶论囵", - "luo": "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒", - "ma": "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽", - "mai": "埋买麦卖迈脉劢荬咪霾", - "man": "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔", - "mang": "芒茫盲忙莽邙漭朦硭蟒", - "meng": "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾", - "miao": "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱", - "mao": "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦", - "me": "么", - "mei": "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅", - "men": "门闷们扪玟焖懑钔", - "mi": "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋", - "mian": "棉眠绵冕免勉娩缅面沔湎腼眄", - "mie": "蔑灭咩蠛篾", - "min": "民抿皿敏悯闽苠岷闵泯珉", - "ming": "明螟鸣铭名命冥茗溟暝瞑酩", - "miu": "谬", - "mo": "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘", - "mou": "谋牟某厶哞婺眸鍪", - "mu": "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼", - "na": "拿哪呐钠那娜纳内捺肭镎衲箬", - "nai": "氖乃奶耐奈鼐艿萘柰", - "nan": "南男难囊喃囡楠腩蝻赧", - "nang": "攮哝囔馕曩", - "nao": "挠脑恼闹孬垴猱瑙硇铙蛲", - "ne": "淖呢讷", - "nei": "馁", - "nen": "嫩能枘恁", - "ni": "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵", - "nian": "蔫拈年碾撵捻念廿辇黏鲇鲶", - "niang": "娘酿", - "niao": "鸟尿茑嬲脲袅", - "nie": "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑", - "nin": "您柠", - "ning": "狞凝宁拧泞佞蓥咛甯聍", - "niu": "牛扭钮纽狃忸妞蚴", - "nong": "脓浓农侬", - "nu": "奴努怒呶帑弩胬孥驽", - "nv": "女恧钕衄", - "nuan": "暖", - "nuenue": "虐", - "nue": "疟谑", - "nuo": "挪懦糯诺傩搦喏锘", - "o": "喔", - "ou": "哦欧鸥殴藕呕偶沤怄瓯耦", - "pa": "啪趴爬帕怕琶葩筢", - "pai": "拍排牌徘湃派俳蒎", - "pan": "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒", - "pang": "乓庞旁耪胖滂逄", - "pao": "抛咆刨炮袍跑泡匏狍庖脬疱", - "pei": "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈", - "pen": "喷盆湓", - "peng": "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛", - "pi": "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔", - "pian": "篇偏片骗谝骈犏胼褊翩蹁", - "piao": "飘漂瓢票剽嘌嫖缥殍瞟螵", - "pie": "撇瞥丿苤氕", - "pin": "拼频贫品聘拚姘嫔榀牝颦", - "ping": "乒坪苹萍平凭瓶评屏俜娉枰鲆", - "po": "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸", - "pou": "剖裒踣", - "pu": "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼", - "qi": "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒", - "qia": "掐恰洽葜", - "qian": "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝", - "qiang": "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄", - "qiao": "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒", - "qie": "切茄且怯窃郄唼惬妾挈锲箧", - "qin": "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾", - "qing": "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥", - "qiong": "琼穷邛茕穹筇銎", - "qiu": "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽", - "qu": "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢", - "quan": "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈", - "que": "缺炔瘸却鹊榷确雀阙悫", - "qun": "裙群逡", - "ran": "然燃冉染苒髯", - "rang": "瓤壤攘嚷让禳穰", - "rao": "饶扰绕荛娆桡", - "ruo": "惹若弱", - "re": "热偌", - "ren": "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽", - "reng": "扔仍", - "ri": "日", - "rong": "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾", - "rou": "揉柔肉糅蹂鞣", - "ru": "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥", - "ruan": "软阮朊", - "rui": "蕊瑞锐芮蕤睿蚋", - "run": "闰润", - "sa": "撒洒萨卅仨挲飒", - "sai": "腮鳃塞赛噻", - "san": "三叁伞散彡馓氵毵糁霰", - "sang": "桑嗓丧搡磉颡", - "sao": "搔骚扫嫂埽臊瘙鳋", - "se": "瑟色涩啬铩铯穑", - "sen": "森", - "seng": "僧", - "sha": "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨", - "shai": "筛晒酾", - "shan": "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝", - "shang": "墒伤商赏晌上尚裳垧绱殇熵觞", - "shao": "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄", - "she": "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝", - "shen": "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃", - "sheng": "声生甥牲升绳省盛剩胜圣丞渑媵眚笙", - "shi": "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈铊螫舐筮豕鲥鲺", - "shou": "收手首守寿授售受瘦兽扌狩绶艏", - "shu": "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬", - "shua": "刷耍唰涮", - "shuai": "摔衰甩帅蟀", - "shuan": "栓拴闩", - "shuang": "霜双爽孀", - "shui": "谁水睡税", - "shun": "吮瞬顺舜恂", - "shuo": "说硕朔烁蒴搠嗍濯妁槊铄", - "si": "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥", - "song": "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦", - "sou": "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋", - "su": "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣", - "suan": "酸蒜算", - "sui": "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢", - "sun": "孙损笋荪狲飧榫跣隼", - "suo": "梭唆缩琐索锁所唢嗦娑桫睃羧", - "ta": "塌他它她塔獭挞蹋踏闼溻遢榻沓", - "tai": "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐", - "tan": "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃", - "tang": "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣", - "thang": "倘躺淌", - "theng": "趟烫", - "tao": "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕", - "te": "特", - "teng": "藤腾疼誊滕", - "ti": "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍", - "tian": "天添填田甜恬舔腆掭忝阗殄畋钿蚺", - "tiao": "条迢眺跳佻祧铫窕龆鲦", - "tie": "贴铁帖萜餮", - "ting": "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆", - "tong": "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼", - "tou": "偷投头透亠", - "tu": "凸秃突图徒途涂屠土吐兔堍荼菟钍酴凃", - "tuan": "湍团疃", - "tui": "推颓腿蜕褪退忒煺", - "tun": "吞屯臀饨暾豚窀", - "tuo": "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍", - "wa": "挖哇蛙洼娃瓦袜佤娲腽", - "wai": "歪外", - "wan": "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢", - "wang": "汪王亡枉网往旺望忘妄罔尢惘辋魍", - "wei": "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔", - "wen": "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯", - "weng": "嗡翁瓮蓊蕹", - "wo": "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌", - "wu": "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯", - "xi": "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷", - "xia": "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠", - "xian": "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹", - "xiang": "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨", - "xiao": "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈", - "xie": "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞", - "xin": "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫昕", - "xing": "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎", - "xiong": "兄凶胸匈汹雄熊芎", - "xiu": "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹", - "xu": "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑", - "xuan": "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃", - "xue": "靴薛学穴雪血噱泶鳕", - "xun": "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟", - "ya": "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖", - "yan": "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹", - "yang": "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅", - "yao": "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐", - "ye": "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘", - "yi": "一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟", - "yin": "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈", - "ying": "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂", - "yo": "哟唷", - "yong": "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔", - "you": "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬", - "yu": "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉", - "yuan": "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋", - "yue": "曰约越跃钥岳粤月悦阅龠樾刖钺", - "yun": "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲", - "za": "匝砸杂拶咂", - "zai": "栽哉灾宰载再在咱崽甾", - "zan": "攒暂赞瓒昝簪糌趱錾", - "zang": "赃脏葬奘戕臧", - "zao": "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫", - "ze": "责择则泽仄赜啧迮昃笮箦舴", - "zei": "贼", - "zen": "怎谮", - "zeng": "增憎曾赠缯甑罾锃", - "zha": "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄", - "zhai": "摘斋宅窄债寨砦", - "zhan": "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃", - "zhang": "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑", - "zhao": "招昭找沼赵照罩兆肇召爪诏棹钊笊", - "zhe": "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭", - "zhen": "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩", - "zheng": "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝", - "zhi": "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯", - "zhong": "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵", - "zhou": "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷", - "zhu": "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈", - "zhua": "抓", - "zhuai": "拽", - "zhuan": "专砖转撰赚篆抟啭颛", - "zhuang": "桩庄装妆撞壮状丬", - "zhui": "椎锥追赘坠缀萑骓缒", - "zhun": "谆准", - "zhuo": "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫", - "zi": "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭", - "zong": "鬃棕踪宗综总纵腙粽", - "zou": "邹走奏揍鄹鲰", - "zu": "租足卒族祖诅阻组俎菹啐徂驵蹴", - "zuan": "钻纂攥缵", - "zui": "嘴醉最罪", - "zun": "尊遵撙樽鳟", - "zuo": "昨左佐柞做作坐座阝阼胙祚酢", - "diu": "铥", - "nou": "耨", - "bia": "髟" - }; - this.polyphone = { - "19969": "DZ", - "19975": "WM", - "19988": "QJ", - "20048": "YL", - "20056": "SC", - "20060": "NM", - "20094": "QG", - "20127": "QJ", - "20167": "QC", - "20193": "YG", - "20250": "KH", - "20256": "ZC", - "20282": "SC", - "20285": "QJG", - "20291": "TD", - "20314": "YD", - "20340": "NE", - "20375": "TD", - "20389": "YJ", - "20391": "CZ", - "20415": "PB", - "20446": "YS", - "20447": "SQ", - "20504": "TC", - "20608": "KG", - "20854": "QJ", - "20857": "ZC", - "20911": "PF", - "20985": "AW", - "21032": "PB", - "21048": "XQ", - "21049": "SC", - "21089": "YS", - "21119": "JC", - "21242": "SB", - "21273": "SC", - "21305": "YP", - "21306": "QO", - "21330": "ZC", - "21333": "SDC", - "21345": "QK", - "21378": "CA", - "21397": "SC", - "21414": "XS", - "21442": "SC", - "21477": "JG", - "21480": "TD", - "21484": "ZS", - "21494": "YX", - "21505": "YX", - "21512": "HG", - "21523": "XH", - "21537": "PB", - "21542": "PF", - "21549": "KH", - "21571": "E", - "21574": "DA", - "21588": "TD", - "21589": "O", - "21618": "ZC", - "21621": "KHA", - "21632": "ZJ", - "21654": "KG", - "21679": "LKG", - "21683": "KH", - "21710": "A", - "21719": "YH", - "21734": "WOE", - "21769": "A", - "21780": "WN", - "21804": "XH", - "21834": "A", - "21899": "ZD", - "21903": "RN", - "21908": "WO", - "21939": "ZC", - "21956": "SA", - "21964": "YA", - "21970": "TD", - "22003": "A", - "22031": "JG", - "22040": "XS", - "22060": "ZC", - "22066": "ZC", - "22079": "MH", - "22129": "XJ", - "22179": "XA", - "22237": "NJ", - "22244": "TD", - "22280": "JQ", - "22300": "YH", - "22313": "XW", - "22331": "YQ", - "22343": "YJ", - "22351": "PH", - "22395": "DC", - "22412": "TD", - "22484": "PB", - "22500": "PB", - "22534": "ZD", - "22549": "DH", - "22561": "PB", - "22612": "TD", - "22771": "KQ", - "22831": "HB", - "22841": "JG", - "22855": "QJ", - "22865": "XQ", - "23013": "ML", - "23081": "WM", - "23487": "SX", - "23558": "QJ", - "23561": "YW", - "23586": "YW", - "23614": "YW", - "23615": "SN", - "23631": "PB", - "23646": "ZS", - "23663": "ZT", - "23673": "YG", - "23762": "TD", - "23769": "ZS", - "23780": "QJ", - "23884": "QK", - "24055": "XH", - "24113": "DC", - "24162": "ZC", - "24191": "GA", - "24273": "QJ", - "24324": "NL", - "24377": "TD", - "24378": "QJ", - "24439": "PF", - "24554": "ZS", - "24683": "TD", - "24694": "WE", - "24733": "LK", - "24925": "TN", - "25094": "ZG", - "25100": "XQ", - "25103": "XH", - "25153": "PB", - "25170": "PB", - "25179": "KG", - "25203": "PB", - "25240": "ZS", - "25282": "FB", - "25303": "NA", - "25324": "KG", - "25341": "ZY", - "25373": "WZ", - "25375": "XJ", - "25384": "A", - "25457": "A", - "25528": "SD", - "25530": "SC", - "25552": "TD", - "25774": "ZC", - "25874": "ZC", - "26044": "YW", - "26080": "WM", - "26292": "PB", - "26333": "PB", - "26355": "ZY", - "26366": "CZ", - "26397": "ZC", - "26399": "QJ", - "26415": "ZS", - "26451": "SB", - "26526": "ZC", - "26552": "JG", - "26561": "TD", - "26588": "JG", - "26597": "CZ", - "26629": "ZS", - "26638": "YL", - "26646": "XQ", - "26653": "KG", - "26657": "XJ", - "26727": "HG", - "26894": "ZC", - "26937": "ZS", - "26946": "ZC", - "26999": "KJ", - "27099": "KJ", - "27449": "YQ", - "27481": "XS", - "27542": "ZS", - "27663": "ZS", - "27748": "TS", - "27784": "SC", - "27788": "ZD", - "27795": "TD", - "27812": "O", - "27850": "PB", - "27852": "MB", - "27895": "SL", - "27898": "PL", - "27973": "QJ", - "27981": "KH", - "27986": "HX", - "27994": "XJ", - "28044": "YC", - "28065": "WG", - "28177": "SM", - "28267": "QJ", - "28291": "KH", - "28337": "ZQ", - "28463": "TL", - "28548": "DC", - "28601": "TD", - "28689": "PB", - "28805": "JG", - "28820": "QG", - "28846": "PB", - "28952": "TD", - "28975": "ZC", - "29100": "A", - "29325": "QJ", - "29575": "SL", - "29602": "FB", - "30010": "TD", - "30044": "CX", - "30058": "PF", - "30091": "YSP", - "30111": "YN", - "30229": "XJ", - "30427": "SC", - "30465": "SX", - "30631": "YQ", - "30655": "QJ", - "30684": "QJG", - "30707": "SD", - "30729": "XH", - "30796": "LG", - "30917": "PB", - "31074": "NM", - "31085": "JZ", - "31109": "SC", - "31181": "ZC", - "31192": "MLB", - "31293": "JQ", - "31400": "YX", - "31584": "YJ", - "31896": "ZN", - "31909": "ZY", - "31995": "XJ", - "32321": "PF", - "32327": "ZY", - "32418": "HG", - "32420": "XQ", - "32421": "HG", - "32438": "LG", - "32473": "GJ", - "32488": "TD", - "32521": "QJ", - "32527": "PB", - "32562": "ZSQ", - "32564": "JZ", - "32735": "ZD", - "32793": "PB", - "33071": "PF", - "33098": "XL", - "33100": "YA", - "33152": "PB", - "33261": "CX", - "33324": "BP", - "33333": "TD", - "33406": "YA", - "33426": "WM", - "33432": "PB", - "33445": "JG", - "33486": "ZN", - "33493": "TS", - "33507": "QJ", - "33540": "QJ", - "33544": "ZC", - "33564": "XQ", - "33617": "YT", - "33632": "QJ", - "33636": "XH", - "33637": "YX", - "33694": "WG", - "33705": "PF", - "33728": "YW", - "33882": "SR", - "34067": "WM", - "34074": "YW", - "34121": "QJ", - "34255": "ZC", - "34259": "XL", - "34425": "JH", - "34430": "XH", - "34485": "KH", - "34503": "YS", - "34532": "HG", - "34552": "XS", - "34558": "YE", - "34593": "ZL", - "34660": "YQ", - "34892": "XH", - "34928": "SC", - "34999": "QJ", - "35048": "PB", - "35059": "SC", - "35098": "ZC", - "35203": "TQ", - "35265": "JX", - "35299": "JX", - "35782": "SZ", - "35828": "YS", - "35830": "E", - "35843": "TD", - "35895": "YG", - "35977": "MH", - "36158": "JG", - "36228": "QJ", - "36426": "XQ", - "36466": "DC", - "36710": "JC", - "36711": "ZYG", - "36767": "PB", - "36866": "SK", - "36951": "YW", - "37034": "YX", - "37063": "XH", - "37218": "ZC", - "37325": "ZC", - "38063": "PB", - "38079": "TD", - "38085": "QY", - "38107": "DC", - "38116": "TD", - "38123": "YD", - "38224": "HG", - "38241": "XTC", - "38271": "ZC", - "38415": "YE", - "38426": "KH", - "38461": "YD", - "38463": "AE", - "38466": "PB", - "38477": "XJ", - "38518": "YT", - "38551": "WK", - "38585": "ZC", - "38704": "XS", - "38739": "LJ", - "38761": "GJ", - "38808": "SQ", - "39048": "JG", - "39049": "XJ", - "39052": "HG", - "39076": "CZ", - "39271": "XT", - "39534": "TD", - "39552": "TD", - "39584": "PB", - "39647": "SB", - "39730": "LG", - "39748": "TPB", - "40109": "ZQ", - "40479": "ND", - "40516": "HG", - "40536": "HG", - "40583": "QJ", - "40765": "YQ", - "40784": "QJ", - "40840": "YK", - "40863": "QJG" - }; - } - /** - * 获取拼音首字母 - * @param {String} str 输入的中文字符串 - */ - }, { - key: "getCamelChars", - value: function getCamelChars(str) { - if (typeof str != "string") - throw new Error(-1, "函数getCamelChars需要字符串类型参数!"); - var chars = new Array(); - for (var i = 0, len = str.length; i < len; i++) { - var ch = str.charAt(i); - chars.push(this._getChar(ch)); - } - var result = this._getResult(chars); - this.options.charCase === 1 ? result = result.toLowerCase() : this.options.charCase === 2 ? result = result.toUpperCase() : {}; - return result; - } - /** - * 获取拼音 - * @param {String} str 输入的中文字符串 - */ - }, { - key: "getFullChars", - value: function getFullChars(str) { - var len = str.length; - var result = ""; - var reg = new RegExp("[a-zA-Z0-9- ]"); - for (var i = 0; i < len; i++) { - var ch = str.substr(i, 1); - var unicode = ch.charCodeAt(0); - if (unicode > 40869 || unicode < 19968) { - result += ch; - } else { - var name = this._getFullChar(ch); - if (name !== false) { - result += name; - } - } - } - this.options.charCase === 1 ? result = result.toLowerCase() : this.options.charCase === 2 ? result = result.toUpperCase() : {}; - return result; - } - }, { - key: "_getFullChar", - value: function _getFullChar(ch) { - for (var key in this.full_dict) { - if (this.full_dict[key].indexOf(ch) != -1) { - return this._capitalize(key); - break; - } - } - return false; - } - /** - * 首字母大写 - */ - }, { - key: "_capitalize", - value: function _capitalize(str) { - if (str.length > 0) { - var first = str.substr(0, 1).toUpperCase(); - var spare = str.substr(1, str.length); - return first + spare; - } - } - }, { - key: "_getChar", - value: function _getChar(ch) { - var unicode = ch.charCodeAt(0); - if (unicode > 40869 || unicode < 19968) - return ch; - if (!this.options.checkPolyphone) - return this.char_dict.charAt(unicode - 19968); - return this.polyphone[unicode] ? this.polyphone[unicode] : this.char_dict.charAt(unicode - 19968); - } - }, { - key: "_getResult", - value: function _getResult(chars) { - if (!this.options.checkPolyphone) - return chars.join(""); - var result = [""]; - for (var i = 0, len = chars.length; i < len; i++) { - var str = chars[i]; - var strLen = str.length; - if (strLen == 1) { - for (var j = 0; j < result.length; j++) { - result[j] += str; - } - } else { - var swap1 = result.slice(0); - result = []; - for (var _j = 0; _j < strLen; _j++) { - var swap2 = swap1.slice(0); - for (var k = 0; k < swap2.length; k++) { - swap2[k] += str.charAt(_j); - } - result = result.concat(swap2); - } - } - } - return result; - } - }]); - return Pinyin2; - }(); - module.exports = Pinyin; - } -}); - -// ../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/js-pinyin/index.js -var require_js_pinyin = __commonJS({ - "../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/js-pinyin/index.js"(exports, module) { - var pinyin = new (require_pinyin())({ charCase: 0 }); - module.exports = pinyin; - } -}); -export default require_js_pinyin(); -//# sourceMappingURL=js-pinyin.js.map diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js.map b/jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js.map deleted file mode 100644 index 83645d54..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/js-pinyin.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../../node_modules/js-pinyin/dist/pinyin.js", "../../../../../node_modules/js-pinyin/index.js"], - "sourcesContent": ["/**\r\n * @fileOverview 汉字拼音转换主题功能\r\n * @author waterchestnut 2017/3/13\r\n * @module\r\n */\r\n'use strict';\r\n\r\n/**\r\n * @typedef Option\r\n * @type Object\r\n * @property {Boolean} [checkPolyphone=false] 是否检查多音字\r\n * @property {Number} [charCase=0] 输出拼音的大小写模式,0-首字母大写;1-全小写;2-全大写\r\n */\r\n\r\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\r\n\r\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\r\n\r\nvar Pinyin = function () {\r\n /**\r\n * 构造函数,设置参数并初始化数据\r\n * @param {Option} [options] 参数对象\r\n */\r\n function Pinyin(options) {\r\n _classCallCheck(this, Pinyin);\r\n\r\n this.setOptions(options);\r\n this.initialize();\r\n }\r\n\r\n /**\r\n * 设置参数\r\n * @param {Option} [options] 参数对象\r\n */\r\n\r\n\r\n _createClass(Pinyin, [{\r\n key: \"setOptions\",\r\n value: function setOptions(options) {\r\n options = options || {};\r\n this.options = Object.assign({ checkPolyphone: false, charCase: 0 }, options);\r\n }\r\n\r\n /**\r\n * 初始化数据\r\n */\r\n\r\n }, {\r\n key: \"initialize\",\r\n value: function initialize() {\r\n this.char_dict = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYFZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZY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KMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY\";\r\n this.full_dict = {\r\n \"a\": \"\\u554A\\u963F\\u9515\",\r\n \"ai\": \"\\u57C3\\u6328\\u54CE\\u5509\\u54C0\\u7691\\u764C\\u853C\\u77EE\\u827E\\u788D\\u7231\\u9698\\u8BF6\\u6371\\u55F3\\u55CC\\u5AD2\\u7477\\u66A7\\u7839\\u953F\\u972D\",\r\n \"an\": \"\\u978D\\u6C28\\u5B89\\u4FFA\\u6309\\u6697\\u5CB8\\u80FA\\u6848\\u8C19\\u57EF\\u63DE\\u72B4\\u5EB5\\u6849\\u94F5\\u9E4C\\u9878\\u9EEF\",\r\n \"ang\": \"\\u80AE\\u6602\\u76CE\",\r\n \"ao\": \"\\u51F9\\u6556\\u71AC\\u7FF1\\u8884\\u50B2\\u5965\\u61CA\\u6FB3\\u5773\\u62D7\\u55F7\\u5662\\u5C99\\u5ED2\\u9068\\u5AAA\\u9A9C\\u8071\\u87AF\\u93CA\\u9CCC\\u93D6\",\r\n \"ba\": \"\\u82AD\\u634C\\u6252\\u53ED\\u5427\\u7B06\\u516B\\u75A4\\u5DF4\\u62D4\\u8DCB\\u9776\\u628A\\u8019\\u575D\\u9738\\u7F62\\u7238\\u8307\\u83DD\\u8406\\u636D\\u5C9C\\u705E\\u6777\\u94AF\\u7C91\\u9C85\\u9B43\",\r\n \"bai\": \"\\u767D\\u67CF\\u767E\\u6446\\u4F70\\u8D25\\u62DC\\u7A17\\u859C\\u63B0\\u97B4\",\r\n \"ban\": \"\\u6591\\u73ED\\u642C\\u6273\\u822C\\u9881\\u677F\\u7248\\u626E\\u62CC\\u4F34\\u74E3\\u534A\\u529E\\u7ECA\\u962A\\u5742\\u8C73\\u94A3\\u7622\\u764D\\u8228\",\r\n \"bang\": \"\\u90A6\\u5E2E\\u6886\\u699C\\u8180\\u7ED1\\u68D2\\u78C5\\u868C\\u9551\\u508D\\u8C24\\u84A1\\u8783\",\r\n \"bao\": \"\\u82DE\\u80DE\\u5305\\u8912\\u96F9\\u4FDD\\u5821\\u9971\\u5B9D\\u62B1\\u62A5\\u66B4\\u8C79\\u9C8D\\u7206\\u52F9\\u8446\\u5B80\\u5B62\\u7172\\u9E28\\u8913\\u8DB5\\u9F85\",\r\n \"bo\": \"\\u5265\\u8584\\u73BB\\u83E0\\u64AD\\u62E8\\u94B5\\u6CE2\\u535A\\u52C3\\u640F\\u94C2\\u7B94\\u4F2F\\u5E1B\\u8236\\u8116\\u818A\\u6E24\\u6CCA\\u9A73\\u4EB3\\u8543\\u5575\\u997D\\u6A97\\u64D8\\u7934\\u94B9\\u9E41\\u7C38\\u8DDB\",\r\n \"bei\": \"\\u676F\\u7891\\u60B2\\u5351\\u5317\\u8F88\\u80CC\\u8D1D\\u94A1\\u500D\\u72C8\\u5907\\u60EB\\u7119\\u88AB\\u5B5B\\u9642\\u90B6\\u57E4\\u84D3\\u5457\\u602B\\u6096\\u789A\\u9E4E\\u8919\\u943E\",\r\n \"ben\": \"\\u5954\\u82EF\\u672C\\u7B28\\u755A\\u574C\\u951B\",\r\n \"beng\": \"\\u5D29\\u7EF7\\u752D\\u6CF5\\u8E66\\u8FF8\\u552A\\u5623\\u750F\",\r\n \"bi\": \"\\u903C\\u9F3B\\u6BD4\\u9119\\u7B14\\u5F7C\\u78A7\\u84D6\\u853D\\u6BD5\\u6BD9\\u6BD6\\u5E01\\u5E87\\u75F9\\u95ED\\u655D\\u5F0A\\u5FC5\\u8F9F\\u58C1\\u81C2\\u907F\\u965B\\u5315\\u4EF3\\u4FFE\\u8298\\u835C\\u8378\\u5421\\u54D4\\u72F4\\u5EB3\\u610E\\u6ED7\\u6FDE\\u5F3C\\u59A3\\u5A62\\u5B16\\u74A7\\u8D32\\u7540\\u94CB\\u79D5\\u88E8\\u7B5A\\u7B85\\u7BE6\\u822D\\u895E\\u8DF8\\u9AC0\",\r\n \"bian\": \"\\u97AD\\u8FB9\\u7F16\\u8D2C\\u6241\\u4FBF\\u53D8\\u535E\\u8FA8\\u8FA9\\u8FAB\\u904D\\u533E\\u5F01\\u82C4\\u5FED\\u6C74\\u7F0F\\u7178\\u782D\\u78A5\\u7A39\\u7A86\\u8759\\u7B3E\\u9CCA\",\r\n \"biao\": \"\\u6807\\u5F6A\\u8198\\u8868\\u5A4A\\u9AA0\\u98D1\\u98D9\\u98DA\\u706C\\u9556\\u9573\\u762D\\u88F1\\u9CD4\",\r\n \"bie\": \"\\u9CD6\\u618B\\u522B\\u762A\\u8E69\\u9CD8\",\r\n \"bin\": \"\\u5F6C\\u658C\\u6FD2\\u6EE8\\u5BBE\\u6448\\u50A7\\u6D5C\\u7F24\\u73A2\\u6BA1\\u8191\\u9554\\u9ACC\\u9B13\",\r\n \"bing\": \"\\u5175\\u51B0\\u67C4\\u4E19\\u79C9\\u997C\\u70B3\\u75C5\\u5E76\\u7980\\u90B4\\u6452\\u7EE0\\u678B\\u69DF\\u71F9\",\r\n \"bu\": \"\\u6355\\u535C\\u54FA\\u8865\\u57E0\\u4E0D\\u5E03\\u6B65\\u7C3F\\u90E8\\u6016\\u62CA\\u535F\\u900B\\u74FF\\u6661\\u949A\\u91AD\",\r\n \"ca\": \"\\u64E6\\u5693\\u7924\",\r\n \"cai\": \"\\u731C\\u88C1\\u6750\\u624D\\u8D22\\u776C\\u8E29\\u91C7\\u5F69\\u83DC\\u8521\",\r\n \"can\": \"\\u9910\\u53C2\\u8695\\u6B8B\\u60ED\\u60E8\\u707F\\u9A96\\u74A8\\u7CB2\\u9EEA\",\r\n \"cang\": \"\\u82CD\\u8231\\u4ED3\\u6CA7\\u85CF\\u4F27\",\r\n \"cao\": \"\\u64CD\\u7CD9\\u69FD\\u66F9\\u8349\\u8279\\u5608\\u6F15\\u87AC\\u825A\",\r\n \"ce\": \"\\u5395\\u7B56\\u4FA7\\u518C\\u6D4B\\u5202\\u5E3B\\u607B\",\r\n \"ceng\": \"\\u5C42\\u8E6D\\u564C\",\r\n \"cha\": \"\\u63D2\\u53C9\\u832C\\u8336\\u67E5\\u78B4\\u643D\\u5BDF\\u5C94\\u5DEE\\u8BE7\\u7339\\u9987\\u6C4A\\u59F9\\u6748\\u6942\\u69CE\\u6AAB\\u9497\\u9538\\u9572\\u8869\",\r\n \"chai\": \"\\u62C6\\u67F4\\u8C7A\\u4FAA\\u8308\\u7625\\u867F\\u9F87\",\r\n \"chan\": \"\\u6400\\u63BA\\u8749\\u998B\\u8C17\\u7F20\\u94F2\\u4EA7\\u9610\\u98A4\\u5181\\u8C04\\u8C36\\u8487\\u5EDB\\u5FCF\\u6F7A\\u6FB6\\u5B71\\u7FBC\\u5A75\\u5B17\\u9AA3\\u89C7\\u7985\\u9561\\u88E3\\u87FE\\u8E94\",\r\n \"chang\": \"\\u660C\\u7316\\u573A\\u5C1D\\u5E38\\u957F\\u507F\\u80A0\\u5382\\u655E\\u7545\\u5531\\u5021\\u4F25\\u9B2F\\u82CC\\u83D6\\u5F9C\\u6005\\u60DD\\u960A\\u5A3C\\u5AE6\\u6636\\u6C05\\u9CB3\",\r\n \"chao\": \"\\u8D85\\u6284\\u949E\\u671D\\u5632\\u6F6E\\u5DE2\\u5435\\u7092\\u600A\\u7EC9\\u6641\\u8016\",\r\n \"che\": \"\\u8F66\\u626F\\u64A4\\u63A3\\u5F7B\\u6F88\\u577C\\u5C6E\\u7817\",\r\n \"chen\": \"\\u90F4\\u81E3\\u8FB0\\u5C18\\u6668\\u5FF1\\u6C89\\u9648\\u8D81\\u886C\\u79F0\\u8C0C\\u62BB\\u55D4\\u5BB8\\u741B\\u6987\\u809C\\u80C2\\u789C\\u9F80\",\r\n \"cheng\": \"\\u6491\\u57CE\\u6A59\\u6210\\u5448\\u4E58\\u7A0B\\u60E9\\u6F84\\u8BDA\\u627F\\u901E\\u9A8B\\u79E4\\u57D5\\u5D4A\\u5FB5\\u6D48\\u67A8\\u67FD\\u6A18\\u665F\\u584D\\u77A0\\u94D6\\u88CE\\u86CF\\u9172\",\r\n \"chi\": \"\\u5403\\u75F4\\u6301\\u5319\\u6C60\\u8FDF\\u5F1B\\u9A70\\u803B\\u9F7F\\u4F88\\u5C3A\\u8D64\\u7FC5\\u65A5\\u70BD\\u50BA\\u5880\\u82AA\\u830C\\u640B\\u53F1\\u54E7\\u557B\\u55E4\\u5F73\\u996C\\u6CB2\\u5AB8\\u6555\\u80DD\\u7719\\u7735\\u9E31\\u761B\\u892B\\u86A9\\u87AD\\u7B1E\\u7BEA\\u8C49\\u8E05\\u8E1F\\u9B51\",\r\n \"chong\": \"\\u5145\\u51B2\\u866B\\u5D07\\u5BA0\\u833A\\u5FE1\\u61A7\\u94F3\\u825F\",\r\n \"chou\": \"\\u62BD\\u916C\\u7574\\u8E0C\\u7A20\\u6101\\u7B79\\u4EC7\\u7EF8\\u7785\\u4E11\\u4FE6\\u5733\\u5E31\\u60C6\\u6EB4\\u59AF\\u7633\\u96E0\\u9C8B\",\r\n \"chu\": \"\\u81ED\\u521D\\u51FA\\u6A71\\u53A8\\u8E87\\u9504\\u96CF\\u6EC1\\u9664\\u695A\\u7840\\u50A8\\u77D7\\u6410\\u89E6\\u5904\\u4E8D\\u520D\\u61B7\\u7ECC\\u6775\\u696E\\u6A17\\u870D\\u8E70\\u9EDC\",\r\n \"chuan\": \"\\u63E3\\u5DDD\\u7A7F\\u693D\\u4F20\\u8239\\u5598\\u4E32\\u63BE\\u821B\\u60F4\\u9044\\u5DDB\\u6C1A\\u948F\\u9569\\u8221\",\r\n \"chuang\": \"\\u75AE\\u7A97\\u5E62\\u5E8A\\u95EF\\u521B\\u6006\",\r\n \"chui\": \"\\u5439\\u708A\\u6376\\u9524\\u5782\\u9672\\u68F0\\u69CC\",\r\n \"chun\": \"\\u6625\\u693F\\u9187\\u5507\\u6DF3\\u7EAF\\u8822\\u4FC3\\u83BC\\u6C8C\\u80AB\\u6710\\u9E51\\u877D\",\r\n \"chuo\": \"\\u6233\\u7EF0\\u851F\\u8FB6\\u8F8D\\u955E\\u8E14\\u9F8A\",\r\n \"ci\": \"\\u75B5\\u8328\\u78C1\\u96CC\\u8F9E\\u6148\\u74F7\\u8BCD\\u6B64\\u523A\\u8D50\\u6B21\\u8360\\u5472\\u5D6F\\u9E5A\\u8785\\u7CCD\\u8D91\",\r\n \"cong\": \"\\u806A\\u8471\\u56F1\\u5306\\u4ECE\\u4E1B\\u506C\\u82C1\\u6DD9\\u9AA2\\u742E\\u7481\\u679E\",\r\n \"cou\": \"\\u85AE\\u6971\\u8F8F\\u8160\",\r\n \"cu\": \"\\u51D1\\u7C97\\u918B\\u7C07\\u731D\\u6B82\\u8E59\",\r\n \"cuan\": \"\\u8E7F\\u7BE1\\u7A9C\\u6C46\\u64BA\\u7228\",\r\n \"cui\": \"\\u6467\\u5D14\\u50AC\\u8106\\u7601\\u7CB9\\u6DEC\\u7FE0\\u8403\\u60B4\\u7480\\u69B1\\u96B9\",\r\n \"cun\": \"\\u6751\\u5B58\\u5BF8\\u78CB\\u5FD6\\u76B4\",\r\n \"cuo\": \"\\u64AE\\u6413\\u63AA\\u632B\\u9519\\u539D\\u811E\\u9509\\u77EC\\u75E4\\u9E7E\\u8E49\\u8E9C\",\r\n \"chuai\": \"\\u562C\\u81AA\\u8E39\",\r\n \"cen\": \"\\u5C91\\u6D94\",\r\n \"da\": \"\\u642D\\u8FBE\\u7B54\\u7629\\u6253\\u5927\\u8037\\u54D2\\u55D2\\u601B\\u59B2\\u75B8\\u8921\\u7B2A\\u977C\\u9791\",\r\n \"dai\": \"\\u5446\\u6B79\\u50A3\\u6234\\u5E26\\u6B86\\u4EE3\\u8D37\\u888B\\u5F85\\u902E\\u6020\\u57ED\\u7519\\u5454\\u5CB1\\u8FE8\\u902F\\u9A80\\u7ED0\\u73B3\\u9EDB\",\r\n \"dan\": \"\\u803D\\u62C5\\u4E39\\u5355\\u90F8\\u63B8\\u80C6\\u65E6\\u6C2E\\u4F46\\u60EE\\u6DE1\\u8BDE\\u5F39\\u86CB\\u4EBB\\u510B\\u5369\\u840F\\u5556\\u6FB9\\u6A90\\u6B9A\\u8D55\\u7708\\u7605\\u8043\\u7BAA\",\r\n \"dang\": \"\\u5F53\\u6321\\u515A\\u8361\\u6863\\u8C20\\u51FC\\u83EA\\u5B95\\u7800\\u94DB\\u88C6\",\r\n \"dao\": \"\\u5200\\u6363\\u8E48\\u5012\\u5C9B\\u7977\\u5BFC\\u5230\\u7A3B\\u60BC\\u9053\\u76D7\\u53E8\\u5541\\u5FC9\\u6D2E\\u6C18\\u7118\\u5FD1\\u7E9B\",\r\n \"de\": \"\\u5FB7\\u5F97\\u7684\\u951D\",\r\n \"deng\": \"\\u8E6C\\u706F\\u767B\\u7B49\\u77AA\\u51F3\\u9093\\u5654\\u5D9D\\u6225\\u78F4\\u956B\\u7C26\",\r\n \"di\": \"\\u5824\\u4F4E\\u6EF4\\u8FEA\\u654C\\u7B1B\\u72C4\\u6DA4\\u7FDF\\u5AE1\\u62B5\\u5E95\\u5730\\u8482\\u7B2C\\u5E1D\\u5F1F\\u9012\\u7F14\\u6C10\\u7C74\\u8BCB\\u8C1B\\u90B8\\u577B\\u839C\\u837B\\u5600\\u5A23\\u67E2\\u68E3\\u89CC\\u7825\\u78B2\\u7747\\u955D\\u7F9D\\u9AB6\",\r\n \"dia\": \"\\u55F2\",\r\n \"dian\": \"\\u98A0\\u6382\\u6EC7\\u7898\\u70B9\\u5178\\u975B\\u57AB\\u7535\\u4F43\\u7538\\u5E97\\u60E6\\u5960\\u6DC0\\u6BBF\\u4E36\\u963D\\u576B\\u57DD\\u5DC5\\u73B7\\u765C\\u766B\\u7C1F\\u8E2E\",\r\n \"diao\": \"\\u7889\\u53FC\\u96D5\\u51CB\\u5201\\u6389\\u540A\\u9493\\u8C03\\u8F7A\\u94DE\\u8729\\u7C9C\\u8C82\",\r\n \"die\": \"\\u8DCC\\u7239\\u789F\\u8776\\u8FED\\u8C0D\\u53E0\\u4F5A\\u57A4\\u581E\\u63F2\\u558B\\u6E2B\\u8F76\\u7252\\u74DE\\u8936\\u800B\\u8E40\\u9CBD\\u9CCE\",\r\n \"ding\": \"\\u4E01\\u76EF\\u53EE\\u9489\\u9876\\u9F0E\\u952D\\u5B9A\\u8BA2\\u4E22\\u4EC3\\u5576\\u738E\\u815A\\u7887\\u753A\\u94E4\\u7594\\u8035\\u914A\",\r\n \"dong\": \"\\u4E1C\\u51AC\\u8463\\u61C2\\u52A8\\u680B\\u4F97\\u606B\\u51BB\\u6D1E\\u578C\\u549A\\u5CBD\\u5CD2\\u5902\\u6C21\\u80E8\\u80F4\\u7850\\u9E2B\",\r\n \"dou\": \"\\u515C\\u6296\\u6597\\u9661\\u8C46\\u9017\\u75D8\\u8538\\u94AD\\u7AA6\\u7AAC\\u86AA\\u7BFC\\u9161\",\r\n \"du\": \"\\u90FD\\u7763\\u6BD2\\u728A\\u72EC\\u8BFB\\u5835\\u7779\\u8D4C\\u675C\\u9540\\u809A\\u5EA6\\u6E21\\u5992\\u828F\\u561F\\u6E0E\\u691F\\u6A50\\u724D\\u8839\\u7B03\\u9AD1\\u9EE9\",\r\n \"duan\": \"\\u7AEF\\u77ED\\u953B\\u6BB5\\u65AD\\u7F0E\\u5F56\\u6934\\u7145\\u7C16\",\r\n \"dui\": \"\\u5806\\u5151\\u961F\\u5BF9\\u603C\\u619D\\u7893\",\r\n \"dun\": \"\\u58A9\\u5428\\u8E72\\u6566\\u987F\\u56E4\\u949D\\u76FE\\u9041\\u7096\\u7818\\u7905\\u76F9\\u9566\\u8DB8\",\r\n \"duo\": \"\\u6387\\u54C6\\u591A\\u593A\\u579B\\u8EB2\\u6735\\u8DFA\\u8235\\u5241\\u60F0\\u5815\\u5484\\u54DA\\u7F0D\\u67C1\\u94CE\\u88F0\\u8E31\",\r\n \"e\": \"\\u86FE\\u5CE8\\u9E45\\u4FC4\\u989D\\u8BB9\\u5A25\\u6076\\u5384\\u627C\\u904F\\u9102\\u997F\\u5669\\u8C14\\u57A9\\u57AD\\u82CA\\u83AA\\u843C\\u5443\\u6115\\u5C59\\u5A40\\u8F6D\\u66F7\\u816D\\u786A\\u9507\\u9537\\u9E57\\u989A\\u9CC4\",\r\n \"en\": \"\\u6069\\u84BD\\u6441\\u5514\\u55EF\",\r\n \"er\": \"\\u800C\\u513F\\u8033\\u5C14\\u9975\\u6D31\\u4E8C\\u8D30\\u8FE9\\u73E5\\u94D2\\u9E38\\u9C95\",\r\n \"fa\": \"\\u53D1\\u7F5A\\u7B4F\\u4F10\\u4E4F\\u9600\\u6CD5\\u73D0\\u57A1\\u781D\",\r\n \"fan\": \"\\u85E9\\u5E06\\u756A\\u7FFB\\u6A0A\\u77FE\\u9492\\u7E41\\u51E1\\u70E6\\u53CD\\u8FD4\\u8303\\u8D29\\u72AF\\u996D\\u6CDB\\u8629\\u5E61\\u72AD\\u68B5\\u6535\\u71D4\\u7548\\u8E6F\",\r\n \"fang\": \"\\u574A\\u82B3\\u65B9\\u80AA\\u623F\\u9632\\u59A8\\u4EFF\\u8BBF\\u7EBA\\u653E\\u531A\\u90A1\\u5F77\\u94AB\\u822B\\u9C82\",\r\n \"fei\": \"\\u83F2\\u975E\\u5561\\u98DE\\u80A5\\u532A\\u8BFD\\u5420\\u80BA\\u5E9F\\u6CB8\\u8D39\\u82BE\\u72D2\\u60B1\\u6DDD\\u5983\\u7ECB\\u7EEF\\u69A7\\u8153\\u6590\\u6249\\u7953\\u7829\\u9544\\u75F1\\u871A\\u7BDA\\u7FE1\\u970F\\u9CB1\",\r\n \"fen\": \"\\u82AC\\u915A\\u5429\\u6C1B\\u5206\\u7EB7\\u575F\\u711A\\u6C7E\\u7C89\\u594B\\u4EFD\\u5FFF\\u6124\\u7CAA\\u507E\\u7035\\u68FC\\u610D\\u9CBC\\u9F22\",\r\n \"feng\": \"\\u4E30\\u5C01\\u67AB\\u8702\\u5CF0\\u950B\\u98CE\\u75AF\\u70FD\\u9022\\u51AF\\u7F1D\\u8BBD\\u5949\\u51E4\\u4FF8\\u9146\\u8451\\u6CA3\\u781C\",\r\n \"fo\": \"\\u4F5B\\u4ECF\\u5772\\u68BB\\u4EF8\",\r\n \"fou\": \"\\u7F36\",\r\n \"fu\": \"\\u4F5B\\u5426\\u592B\\u6577\\u80A4\\u5B75\\u6276\\u62C2\\u8F90\\u5E45\\u6C1F\\u7B26\\u4F0F\\u4FD8\\u670D\\u6D6E\\u6DAA\\u798F\\u88B1\\u5F17\\u752B\\u629A\\u8F85\\u4FEF\\u91DC\\u65A7\\u812F\\u8151\\u5E9C\\u8150\\u8D74\\u526F\\u8986\\u8D4B\\u590D\\u5085\\u4ED8\\u961C\\u7236\\u8179\\u8D1F\\u5BCC\\u8BA3\\u9644\\u5987\\u7F1A\\u5490\\u5310\\u51EB\\u90DB\\u8299\\u82FB\\u832F\\u83A9\\u83D4\\u544B\\u5E5E\\u6ECF\\u8274\\u5B5A\\u9A78\\u7EC2\\u6874\\u8D59\\u9EFB\\u9EFC\\u7F58\\u7A03\\u99A5\\u864D\\u86A8\\u8709\\u8760\\u876E\\u9EB8\\u8DBA\\u8DD7\\u9CC6\",\r\n \"ga\": \"\\u5676\\u560E\\u86E4\\u5C2C\\u5477\\u5C15\\u5C1C\\u65EE\\u9486\",\r\n \"gai\": \"\\u8BE5\\u6539\\u6982\\u9499\\u76D6\\u6E89\\u4E10\\u9654\\u5793\\u6224\\u8D45\\u80F2\",\r\n \"gan\": \"\\u5E72\\u7518\\u6746\\u67D1\\u7AFF\\u809D\\u8D76\\u611F\\u79C6\\u6562\\u8D63\\u5769\\u82F7\\u5C34\\u64C0\\u6CD4\\u6DE6\\u6F89\\u7EC0\\u6A44\\u65F0\\u77F8\\u75B3\\u9150\",\r\n \"gang\": \"\\u5188\\u521A\\u94A2\\u7F38\\u809B\\u7EB2\\u5C97\\u6E2F\\u6206\\u7F61\\u9883\\u7B7B\",\r\n \"gong\": \"\\u6760\\u5DE5\\u653B\\u529F\\u606D\\u9F9A\\u4F9B\\u8EAC\\u516C\\u5BAB\\u5F13\\u5DE9\\u6C5E\\u62F1\\u8D21\\u5171\\u857B\\u5EFE\\u54A3\\u73D9\\u80B1\\u86A3\\u86E9\\u89E5\",\r\n \"gao\": \"\\u7BD9\\u768B\\u9AD8\\u818F\\u7F94\\u7CD5\\u641E\\u9550\\u7A3F\\u544A\\u777E\\u8BF0\\u90DC\\u84BF\\u85C1\\u7F1F\\u69D4\\u69C1\\u6772\\u9506\",\r\n \"ge\": \"\\u54E5\\u6B4C\\u6401\\u6208\\u9E3D\\u80F3\\u7599\\u5272\\u9769\\u845B\\u683C\\u9601\\u9694\\u94EC\\u4E2A\\u5404\\u9B32\\u4EE1\\u54FF\\u5865\\u55DD\\u7EA5\\u643F\\u8188\\u784C\\u94EA\\u9549\\u88BC\\u988C\\u867C\\u8238\\u9ABC\\u9AC2\",\r\n \"gei\": \"\\u7ED9\",\r\n \"gen\": \"\\u6839\\u8DDF\\u4E98\\u831B\\u54CF\\u826E\",\r\n \"geng\": \"\\u8015\\u66F4\\u5E9A\\u7FB9\\u57C2\\u803F\\u6897\\u54FD\\u8D53\\u9CA0\",\r\n \"gou\": \"\\u94A9\\u52FE\\u6C9F\\u82DF\\u72D7\\u57A2\\u6784\\u8D2D\\u591F\\u4F5D\\u8BDF\\u5CA3\\u9058\\u5ABE\\u7F11\\u89CF\\u5F40\\u9E32\\u7B31\\u7BDD\\u97B2\",\r\n \"gu\": \"\\u8F9C\\u83C7\\u5495\\u7B8D\\u4F30\\u6CBD\\u5B64\\u59D1\\u9F13\\u53E4\\u86CA\\u9AA8\\u8C37\\u80A1\\u6545\\u987E\\u56FA\\u96C7\\u560F\\u8BC2\\u83F0\\u54CC\\u5D2E\\u6C69\\u688F\\u8F71\\u726F\\u727F\\u80CD\\u81CC\\u6BC2\\u77BD\\u7F5F\\u94B4\\u9522\\u74E0\\u9E2A\\u9E44\\u75FC\\u86C4\\u9164\\u89DA\\u9CB4\\u9AB0\\u9E58\",\r\n \"gua\": \"\\u522E\\u74DC\\u5250\\u5BE1\\u6302\\u8902\\u5366\\u8BD6\\u5471\\u681D\\u9E39\",\r\n \"guai\": \"\\u4E56\\u62D0\\u602A\\u54D9\",\r\n \"guan\": \"\\u68FA\\u5173\\u5B98\\u51A0\\u89C2\\u7BA1\\u9986\\u7F50\\u60EF\\u704C\\u8D2F\\u500C\\u839E\\u63BC\\u6DAB\\u76E5\\u9E73\\u9CCF\",\r\n \"guang\": \"\\u5149\\u5E7F\\u901B\\u72B7\\u6844\\u80F1\\u7592\",\r\n \"gui\": \"\\u7470\\u89C4\\u572D\\u7845\\u5F52\\u9F9F\\u95FA\\u8F68\\u9B3C\\u8BE1\\u7678\\u6842\\u67DC\\u8DEA\\u8D35\\u523D\\u5326\\u523F\\u5E8B\\u5B84\\u59AB\\u6867\\u7085\\u6677\\u7688\\u7C0B\\u9C91\\u9CDC\",\r\n \"gun\": \"\\u8F8A\\u6EDA\\u68CD\\u4E28\\u886E\\u7EF2\\u78D9\\u9CA7\",\r\n \"guo\": \"\\u9505\\u90ED\\u56FD\\u679C\\u88F9\\u8FC7\\u9998\\u8803\\u57DA\\u63B4\\u5459\\u56D7\\u5E3C\\u5D1E\\u7313\\u6901\\u8662\\u951E\\u8052\\u872E\\u873E\\u8748\",\r\n \"ha\": \"\\u54C8\",\r\n \"hai\": \"\\u9AB8\\u5B69\\u6D77\\u6C26\\u4EA5\\u5BB3\\u9A87\\u54B4\\u55E8\\u988F\\u91A2\",\r\n \"han\": \"\\u9163\\u61A8\\u90AF\\u97E9\\u542B\\u6DB5\\u5BD2\\u51FD\\u558A\\u7F55\\u7FF0\\u64BC\\u634D\\u65F1\\u61BE\\u608D\\u710A\\u6C57\\u6C49\\u9097\\u83E1\\u6496\\u961A\\u701A\\u6657\\u7113\\u9894\\u86B6\\u9F3E\",\r\n \"hen\": \"\\u592F\\u75D5\\u5F88\\u72E0\\u6068\",\r\n \"hang\": \"\\u676D\\u822A\\u6C86\\u7ED7\\u73E9\\u6841\",\r\n \"hao\": \"\\u58D5\\u568E\\u8C6A\\u6BEB\\u90DD\\u597D\\u8017\\u53F7\\u6D69\\u8585\\u55E5\\u5686\\u6FE0\\u704F\\u660A\\u7693\\u98A2\\u869D\",\r\n \"he\": \"\\u5475\\u559D\\u8377\\u83CF\\u6838\\u79BE\\u548C\\u4F55\\u5408\\u76D2\\u8C89\\u9602\\u6CB3\\u6DB8\\u8D6B\\u8910\\u9E64\\u8D3A\\u8BC3\\u52BE\\u58D1\\u85FF\\u55D1\\u55EC\\u9616\\u76CD\\u86B5\\u7FEE\",\r\n \"hei\": \"\\u563F\\u9ED1\",\r\n \"heng\": \"\\u54FC\\u4EA8\\u6A2A\\u8861\\u6052\\u8A07\\u8605\",\r\n \"hong\": \"\\u8F70\\u54C4\\u70D8\\u8679\\u9E3F\\u6D2A\\u5B8F\\u5F18\\u7EA2\\u9EC9\\u8BA7\\u836D\\u85A8\\u95F3\\u6CD3\",\r\n \"hou\": \"\\u5589\\u4FAF\\u7334\\u543C\\u539A\\u5019\\u540E\\u5820\\u5F8C\\u9005\\u760A\\u7BCC\\u7CC7\\u9C8E\\u9ABA\",\r\n \"hu\": \"\\u547C\\u4E4E\\u5FFD\\u745A\\u58F6\\u846B\\u80E1\\u8774\\u72D0\\u7CCA\\u6E56\\u5F27\\u864E\\u552C\\u62A4\\u4E92\\u6CAA\\u6237\\u51B1\\u553F\\u56EB\\u5CB5\\u7322\\u6019\\u60DA\\u6D52\\u6EF9\\u7425\\u69F2\\u8F77\\u89F3\\u70C0\\u7173\\u623D\\u6248\\u795C\\u9E55\\u9E71\\u7B0F\\u9190\\u659B\",\r\n \"hua\": \"\\u82B1\\u54D7\\u534E\\u733E\\u6ED1\\u753B\\u5212\\u5316\\u8BDD\\u5290\\u6D4D\\u9A85\\u6866\\u94E7\\u7A1E\",\r\n \"huai\": \"\\u69D0\\u5F8A\\u6000\\u6DEE\\u574F\\u8FD8\\u8E1D\",\r\n \"huan\": \"\\u6B22\\u73AF\\u6853\\u7F13\\u6362\\u60A3\\u5524\\u75EA\\u8C62\\u7115\\u6DA3\\u5BA6\\u5E7B\\u90C7\\u5942\\u57B8\\u64D0\\u571C\\u6D39\\u6D63\\u6F36\\u5BF0\\u902D\\u7F33\\u953E\\u9CA9\\u9B1F\",\r\n \"huang\": \"\\u8352\\u614C\\u9EC4\\u78FA\\u8757\\u7C27\\u7687\\u51F0\\u60F6\\u714C\\u6643\\u5E4C\\u604D\\u8C0E\\u968D\\u5FA8\\u6E5F\\u6F62\\u9051\\u749C\\u8093\\u7640\\u87E5\\u7BC1\\u9CC7\",\r\n \"hui\": \"\\u7070\\u6325\\u8F89\\u5FBD\\u6062\\u86D4\\u56DE\\u6BC1\\u6094\\u6167\\u5349\\u60E0\\u6666\\u8D3F\\u79FD\\u4F1A\\u70E9\\u6C47\\u8BB3\\u8BF2\\u7ED8\\u8BD9\\u8334\\u835F\\u8559\\u54D5\\u5599\\u96B3\\u6D04\\u5F57\\u7F0B\\u73F2\\u6656\\u605A\\u867A\\u87EA\\u9EBE\",\r\n \"hun\": \"\\u8364\\u660F\\u5A5A\\u9B42\\u6D51\\u6DF7\\u8BE8\\u9984\\u960D\\u6EB7\\u7F17\",\r\n \"huo\": \"\\u8C41\\u6D3B\\u4F19\\u706B\\u83B7\\u6216\\u60D1\\u970D\\u8D27\\u7978\\u6509\\u56AF\\u5925\\u94AC\\u952A\\u956C\\u8020\\u8816\",\r\n \"ji\": \"\\u51FB\\u573E\\u57FA\\u673A\\u7578\\u7A3D\\u79EF\\u7B95\\u808C\\u9965\\u8FF9\\u6FC0\\u8BA5\\u9E21\\u59EC\\u7EE9\\u7F09\\u5409\\u6781\\u68D8\\u8F91\\u7C4D\\u96C6\\u53CA\\u6025\\u75BE\\u6C72\\u5373\\u5AC9\\u7EA7\\u6324\\u51E0\\u810A\\u5DF1\\u84DF\\u6280\\u5180\\u5B63\\u4F0E\\u796D\\u5242\\u60B8\\u6D4E\\u5BC4\\u5BC2\\u8BA1\\u8BB0\\u65E2\\u5FCC\\u9645\\u5993\\u7EE7\\u7EAA\\u5C45\\u4E0C\\u4E69\\u525E\\u4F76\\u4F74\\u8114\\u58BC\\u82A8\\u82B0\\u8401\\u84BA\\u857A\\u638E\\u53FD\\u54AD\\u54DC\\u5527\\u5C8C\\u5D74\\u6D0E\\u5F50\\u5C50\\u9AA5\\u757F\\u7391\\u696B\\u6B9B\\u621F\\u6222\\u8D4D\\u89CA\\u7284\\u9F51\\u77F6\\u7F81\\u5D47\\u7A37\\u7620\\u7635\\u866E\\u7B08\\u7B04\\u66A8\\u8DFB\\u8DFD\\u9701\\u9C9A\\u9CAB\\u9AFB\\u9E82\",\r\n \"jia\": \"\\u5609\\u67B7\\u5939\\u4F73\\u5BB6\\u52A0\\u835A\\u988A\\u8D3E\\u7532\\u94BE\\u5047\\u7A3C\\u4EF7\\u67B6\\u9A7E\\u5AC1\\u4F3D\\u90CF\\u62EE\\u5CAC\\u6D43\\u8FE6\\u73C8\\u621B\\u80DB\\u605D\\u94D7\\u9553\\u75C2\\u86F1\\u7B33\\u8888\\u8DCF\",\r\n \"jian\": \"\\u6B7C\\u76D1\\u575A\\u5C16\\u7B3A\\u95F4\\u714E\\u517C\\u80A9\\u8270\\u5978\\u7F04\\u8327\\u68C0\\u67EC\\u78B1\\u7877\\u62E3\\u6361\\u7B80\\u4FED\\u526A\\u51CF\\u8350\\u69DB\\u9274\\u8DF5\\u8D31\\u89C1\\u952E\\u7BAD\\u4EF6\\u5065\\u8230\\u5251\\u996F\\u6E10\\u6E85\\u6DA7\\u5EFA\\u50ED\\u8C0F\\u8C2B\\u83C5\\u84B9\\u641B\\u56DD\\u6E54\\u8E47\\u8B07\\u7F23\\u67A7\\u67D9\\u6957\\u620B\\u622C\\u726E\\u728D\\u6BFD\\u8171\\u7751\\u950F\\u9E63\\u88E5\\u7B15\\u7BB4\\u7FE6\\u8DBC\\u8E3A\\u9CA3\\u97AF\",\r\n \"jiang\": \"\\u50F5\\u59DC\\u5C06\\u6D46\\u6C5F\\u7586\\u848B\\u6868\\u5956\\u8BB2\\u5320\\u9171\\u964D\\u8333\\u6D1A\\u7EDB\\u7F30\\u729F\\u7913\\u8029\\u7CE8\\u8C47\",\r\n \"jiao\": \"\\u8549\\u6912\\u7901\\u7126\\u80F6\\u4EA4\\u90CA\\u6D47\\u9A84\\u5A07\\u56BC\\u6405\\u94F0\\u77EB\\u4FA5\\u811A\\u72E1\\u89D2\\u997A\\u7F34\\u7EDE\\u527F\\u6559\\u9175\\u8F7F\\u8F83\\u53EB\\u4F7C\\u50EC\\u832D\\u6322\\u564D\\u5CE4\\u5FBC\\u59E3\\u7E9F\\u656B\\u768E\\u9E6A\\u86DF\\u91AE\\u8DE4\\u9C9B\",\r\n \"jie\": \"\\u7A96\\u63ED\\u63A5\\u7686\\u79F8\\u8857\\u9636\\u622A\\u52AB\\u8282\\u6854\\u6770\\u6377\\u776B\\u7AED\\u6D01\\u7ED3\\u89E3\\u59D0\\u6212\\u85C9\\u82A5\\u754C\\u501F\\u4ECB\\u75A5\\u8BEB\\u5C4A\\u5048\\u8BA6\\u8BD8\\u5588\\u55DF\\u736C\\u5A55\\u5B51\\u6840\\u7352\\u78A3\\u9534\\u7596\\u88B7\\u9889\\u86A7\\u7FAF\\u9C92\\u9AB1\\u9AEB\",\r\n \"jin\": \"\\u5DFE\\u7B4B\\u65A4\\u91D1\\u4ECA\\u6D25\\u895F\\u7D27\\u9526\\u4EC5\\u8C28\\u8FDB\\u9773\\u664B\\u7981\\u8FD1\\u70EC\\u6D78\\u5C3D\\u537A\\u8369\\u5807\\u5664\\u9991\\u5ED1\\u5997\\u7F19\\u747E\\u69FF\\u8D46\\u89D0\\u9485\\u9513\\u887F\\u77DC\",\r\n \"jing\": \"\\u52B2\\u8346\\u5162\\u830E\\u775B\\u6676\\u9CB8\\u4EAC\\u60CA\\u7CBE\\u7CB3\\u7ECF\\u4E95\\u8B66\\u666F\\u9888\\u9759\\u5883\\u656C\\u955C\\u5F84\\u75C9\\u9756\\u7ADF\\u7ADE\\u51C0\\u522D\\u5106\\u9631\\u83C1\\u734D\\u61AC\\u6CFE\\u8FF3\\u5F2A\\u5A67\\u80BC\\u80EB\\u8148\\u65CC\",\r\n \"jiong\": \"\\u70AF\\u7A98\\u5182\\u8FE5\\u6243\",\r\n \"jiu\": \"\\u63EA\\u7A76\\u7EA0\\u7396\\u97ED\\u4E45\\u7078\\u4E5D\\u9152\\u53A9\\u6551\\u65E7\\u81FC\\u8205\\u548E\\u5C31\\u759A\\u50E6\\u557E\\u9604\\u67E9\\u6855\\u9E6B\\u8D73\\u9B0F\",\r\n \"ju\": \"\\u97A0\\u62D8\\u72D9\\u75BD\\u9A79\\u83CA\\u5C40\\u5480\\u77E9\\u4E3E\\u6CAE\\u805A\\u62D2\\u636E\\u5DE8\\u5177\\u8DDD\\u8E1E\\u952F\\u4FF1\\u53E5\\u60E7\\u70AC\\u5267\\u5028\\u8BB5\\u82E3\\u82F4\\u8392\\u63AC\\u907D\\u5C66\\u741A\\u67B8\\u6910\\u6998\\u6989\\u6A58\\u728B\\u98D3\\u949C\\u9514\\u7AAD\\u88FE\\u8D84\\u91B5\\u8E3D\\u9F83\\u96CE\\u97AB\",\r\n \"juan\": \"\\u6350\\u9E43\\u5A1F\\u5026\\u7737\\u5377\\u7EE2\\u9104\\u72F7\\u6D93\\u684A\\u8832\\u9529\\u954C\\u96BD\",\r\n \"jue\": \"\\u6485\\u652B\\u6289\\u6398\\u5014\\u7235\\u89C9\\u51B3\\u8BC0\\u7EDD\\u53A5\\u5282\\u8C32\\u77CD\\u8568\\u5658\\u5D1B\\u7357\\u5B53\\u73CF\\u6877\\u6A5B\\u721D\\u9562\\u8E76\\u89D6\",\r\n \"jun\": \"\\u5747\\u83CC\\u94A7\\u519B\\u541B\\u5CFB\\u4FCA\\u7AE3\\u6D5A\\u90E1\\u9A8F\\u6343\\u72FB\\u76B2\\u7B60\\u9E87\",\r\n \"ka\": \"\\u5580\\u5496\\u5361\\u4F67\\u5494\\u80E9\",\r\n \"ke\": \"\\u54AF\\u5777\\u82DB\\u67EF\\u68F5\\u78D5\\u9897\\u79D1\\u58F3\\u54B3\\u53EF\\u6E34\\u514B\\u523B\\u5BA2\\u8BFE\\u5CA2\\u606A\\u6E98\\u9A92\\u7F02\\u73C2\\u8F72\\u6C2A\\u778C\\u94B6\\u75B4\\u7AA0\\u874C\\u9AC1\",\r\n \"kai\": \"\\u5F00\\u63E9\\u6977\\u51EF\\u6168\\u5240\\u57B2\\u8488\\u5FFE\\u607A\\u94E0\\u950E\",\r\n \"kan\": \"\\u520A\\u582A\\u52D8\\u574E\\u780D\\u770B\\u4F83\\u51F5\\u83B0\\u83B6\\u6221\\u9F9B\\u77B0\",\r\n \"kang\": \"\\u5EB7\\u6177\\u7CE0\\u625B\\u6297\\u4EA2\\u7095\\u5751\\u4F09\\u95F6\\u94AA\",\r\n \"kao\": \"\\u8003\\u62F7\\u70E4\\u9760\\u5C3B\\u6832\\u7292\\u94D0\",\r\n \"ken\": \"\\u80AF\\u5543\\u57A6\\u6073\\u57A0\\u88C9\\u9880\",\r\n \"keng\": \"\\u542D\\u5FD0\\u94FF\",\r\n \"kong\": \"\\u7A7A\\u6050\\u5B54\\u63A7\\u5025\\u5D06\\u7B9C\",\r\n \"kou\": \"\\u62A0\\u53E3\\u6263\\u5BC7\\u82A4\\u853B\\u53E9\\u770D\\u7B58\",\r\n \"ku\": \"\\u67AF\\u54ED\\u7A9F\\u82E6\\u9177\\u5E93\\u88E4\\u5233\\u5800\\u55BE\\u7ED4\\u9AB7\",\r\n \"kua\": \"\\u5938\\u57AE\\u630E\\u8DE8\\u80EF\\u4F89\",\r\n \"kuai\": \"\\u5757\\u7B77\\u4FA9\\u5FEB\\u84AF\\u90D0\\u8489\\u72EF\\u810D\",\r\n \"kuan\": \"\\u5BBD\\u6B3E\\u9ACB\",\r\n \"kuang\": \"\\u5321\\u7B50\\u72C2\\u6846\\u77FF\\u7736\\u65F7\\u51B5\\u8BD3\\u8BF3\\u909D\\u5739\\u593C\\u54D0\\u7EA9\\u8D36\",\r\n \"kui\": \"\\u4E8F\\u76D4\\u5CBF\\u7AA5\\u8475\\u594E\\u9B41\\u5080\\u9988\\u6127\\u6E83\\u9997\\u532E\\u5914\\u9697\\u63C6\\u55B9\\u559F\\u609D\\u6126\\u9615\\u9035\\u668C\\u777D\\u8069\\u8770\\u7BD1\\u81FE\\u8DEC\",\r\n \"kun\": \"\\u5764\\u6606\\u6346\\u56F0\\u6083\\u9603\\u7428\\u951F\\u918C\\u9CB2\\u9AE1\",\r\n \"kuo\": \"\\u62EC\\u6269\\u5ED3\\u9614\\u86DE\",\r\n \"la\": \"\\u5783\\u62C9\\u5587\\u8721\\u814A\\u8FA3\\u5566\\u524C\\u647A\\u908B\\u65EF\\u782C\\u760C\",\r\n \"lai\": \"\\u83B1\\u6765\\u8D56\\u5D03\\u5F95\\u6D9E\\u6FD1\\u8D49\\u7750\\u94FC\\u765E\\u7C41\",\r\n \"lan\": \"\\u84DD\\u5A6A\\u680F\\u62E6\\u7BEE\\u9611\\u5170\\u6F9C\\u8C30\\u63FD\\u89C8\\u61D2\\u7F06\\u70C2\\u6EE5\\u5549\\u5C9A\\u61D4\\u6F24\\u6984\\u6593\\u7F71\\u9567\\u8934\",\r\n \"lang\": \"\\u7405\\u6994\\u72FC\\u5ECA\\u90CE\\u6717\\u6D6A\\u83A8\\u8497\\u5577\\u9606\\u9512\\u7A02\\u8782\",\r\n \"lao\": \"\\u635E\\u52B3\\u7262\\u8001\\u4F6C\\u59E5\\u916A\\u70D9\\u6D9D\\u5520\\u5D02\\u6833\\u94D1\\u94F9\\u75E8\\u91AA\",\r\n \"le\": \"\\u52D2\\u4E50\\u808B\\u4EC2\\u53FB\\u561E\\u6CD0\\u9CD3\",\r\n \"lei\": \"\\u96F7\\u956D\\u857E\\u78CA\\u7D2F\\u5121\\u5792\\u64C2\\u7C7B\\u6CEA\\u7FB8\\u8BD4\\u837D\\u54A7\\u6F2F\\u5AD8\\u7F27\\u6A91\\u8012\\u9179\",\r\n \"ling\": \"\\u68F1\\u51B7\\u62CE\\u73B2\\u83F1\\u96F6\\u9F84\\u94C3\\u4F36\\u7F9A\\u51CC\\u7075\\u9675\\u5CAD\\u9886\\u53E6\\u4EE4\\u9143\\u5844\\u82D3\\u5464\\u56F9\\u6CE0\\u7EEB\\u67C3\\u68C2\\u74F4\\u8046\\u86C9\\u7FCE\\u9CAE\",\r\n \"leng\": \"\\u695E\\u6123\",\r\n \"li\": \"\\u5398\\u68A8\\u7281\\u9ECE\\u7BF1\\u72F8\\u79BB\\u6F13\\u7406\\u674E\\u91CC\\u9CA4\\u793C\\u8389\\u8354\\u540F\\u6817\\u4E3D\\u5389\\u52B1\\u783E\\u5386\\u5229\\u5088\\u4F8B\\u4FD0\\u75E2\\u7ACB\\u7C92\\u6CA5\\u96B6\\u529B\\u7483\\u54E9\\u4FEA\\u4FDA\\u90E6\\u575C\\u82C8\\u8385\\u84E0\\u85DC\\u6369\\u5456\\u5533\\u55B1\\u7301\\u6EA7\\u6FA7\\u9026\\u5A0C\\u5AE0\\u9A8A\\u7F21\\u73DE\\u67A5\\u680E\\u8F79\\u623E\\u783A\\u8A48\\u7F79\\u9502\\u9E42\\u75A0\\u75AC\\u86CE\\u870A\\u8821\\u7B20\\u7BE5\\u7C9D\\u91B4\\u8DDE\\u96F3\\u9CA1\\u9CE2\\u9EE7\",\r\n \"lian\": \"\\u4FE9\\u8054\\u83B2\\u8FDE\\u9570\\u5EC9\\u601C\\u6D9F\\u5E18\\u655B\\u8138\\u94FE\\u604B\\u70BC\\u7EC3\\u631B\\u8539\\u5941\\u6F4B\\u6FC2\\u5A08\\u740F\\u695D\\u6B93\\u81C1\\u81A6\\u88E2\\u880A\\u9CA2\",\r\n \"liang\": \"\\u7CAE\\u51C9\\u6881\\u7CB1\\u826F\\u4E24\\u8F86\\u91CF\\u667E\\u4EAE\\u8C05\\u589A\\u690B\\u8E09\\u9753\\u9B49\",\r\n \"liao\": \"\\u64A9\\u804A\\u50DA\\u7597\\u71CE\\u5BE5\\u8FBD\\u6F66\\u4E86\\u6482\\u9563\\u5ED6\\u6599\\u84FC\\u5C25\\u5639\\u7360\\u5BEE\\u7F2D\\u948C\\u9E69\\u8022\",\r\n \"lie\": \"\\u5217\\u88C2\\u70C8\\u52A3\\u730E\\u51BD\\u57D2\\u6D0C\\u8D94\\u8E90\\u9B23\",\r\n \"lin\": \"\\u7433\\u6797\\u78F7\\u9716\\u4E34\\u90BB\\u9CDE\\u6DCB\\u51DB\\u8D41\\u541D\\u853A\\u5D99\\u5EEA\\u9074\\u6AA9\\u8F9A\\u77B5\\u7CBC\\u8E8F\\u9E9F\",\r\n \"liu\": \"\\u6E9C\\u7409\\u69B4\\u786B\\u998F\\u7559\\u5218\\u7624\\u6D41\\u67F3\\u516D\\u62A1\\u507B\\u848C\\u6CD6\\u6D4F\\u905B\\u9A9D\\u7EFA\\u65D2\\u7198\\u950D\\u954F\\u9E68\\u938F\",\r\n \"long\": \"\\u9F99\\u804B\\u5499\\u7B3C\\u7ABF\\u9686\\u5784\\u62E2\\u9647\\u5F04\\u5785\\u830F\\u6CF7\\u73D1\\u680A\\u80E7\\u783B\\u7643\",\r\n \"lou\": \"\\u697C\\u5A04\\u6402\\u7BD3\\u6F0F\\u964B\\u55BD\\u5D5D\\u9542\\u7618\\u8027\\u877C\\u9AC5\",\r\n \"lu\": \"\\u82A6\\u5362\\u9885\\u5E90\\u7089\\u63B3\\u5364\\u864F\\u9C81\\u9E93\\u788C\\u9732\\u8DEF\\u8D42\\u9E7F\\u6F5E\\u7984\\u5F55\\u9646\\u622E\\u5786\\u6445\\u64B8\\u565C\\u6CF8\\u6E0C\\u6F09\\u7490\\u680C\\u6A79\\u8F73\\u8F82\\u8F98\\u6C07\\u80EA\\u9565\\u9E2C\\u9E6D\\u7C0F\\u823B\\u9C88\",\r\n \"lv\": \"\\u9A74\\u5415\\u94DD\\u4FA3\\u65C5\\u5C65\\u5C61\\u7F15\\u8651\\u6C2F\\u5F8B\\u7387\\u6EE4\\u7EFF\\u634B\\u95FE\\u6988\\u8182\\u7A06\\u891B\",\r\n \"luan\": \"\\u5CE6\\u5B6A\\u6EE6\\u5375\\u4E71\\u683E\\u9E3E\\u92AE\",\r\n \"lue\": \"\\u63A0\\u7565\\u950A\",\r\n \"lun\": \"\\u8F6E\\u4F26\\u4ED1\\u6CA6\\u7EB6\\u8BBA\\u56F5\",\r\n \"luo\": \"\\u841D\\u87BA\\u7F57\\u903B\\u9523\\u7BA9\\u9AA1\\u88F8\\u843D\\u6D1B\\u9A86\\u7EDC\\u502E\\u8366\\u645E\\u7321\\u6CFA\\u6924\\u8136\\u9559\\u7630\\u96D2\",\r\n \"ma\": \"\\u5988\\u9EBB\\u739B\\u7801\\u8682\\u9A6C\\u9A82\\u561B\\u5417\\u551B\\u72B8\\u5B37\\u6769\\u9EBD\",\r\n \"mai\": \"\\u57CB\\u4E70\\u9EA6\\u5356\\u8FC8\\u8109\\u52A2\\u836C\\u54AA\\u973E\",\r\n \"man\": \"\\u7792\\u9992\\u86EE\\u6EE1\\u8513\\u66FC\\u6162\\u6F2B\\u8C29\\u5881\\u5E54\\u7F26\\u71B3\\u9558\\u989F\\u87A8\\u9CD7\\u9794\",\r\n \"mang\": \"\\u8292\\u832B\\u76F2\\u5FD9\\u83BD\\u9099\\u6F2D\\u6726\\u786D\\u87D2\",\r\n \"meng\": \"\\u6C13\\u840C\\u8499\\u6AAC\\u76DF\\u9530\\u731B\\u68A6\\u5B5F\\u52D0\\u750D\\u77A2\\u61F5\\u791E\\u867B\\u8722\\u8813\\u824B\\u8268\\u9EFE\",\r\n \"miao\": \"\\u732B\\u82D7\\u63CF\\u7784\\u85D0\\u79D2\\u6E3A\\u5E99\\u5999\\u55B5\\u9088\\u7F08\\u7F2A\\u676A\\u6DFC\\u7707\\u9E4B\\u8731\",\r\n \"mao\": \"\\u8305\\u951A\\u6BDB\\u77DB\\u94C6\\u536F\\u8302\\u5192\\u5E3D\\u8C8C\\u8D38\\u4F94\\u88A4\\u52D6\\u8306\\u5CC1\\u7441\\u6634\\u7266\\u8004\\u65C4\\u61CB\\u7780\\u86D1\\u8765\\u87CA\\u9AE6\",\r\n \"me\": \"\\u4E48\",\r\n \"mei\": \"\\u73AB\\u679A\\u6885\\u9176\\u9709\\u7164\\u6CA1\\u7709\\u5A92\\u9541\\u6BCF\\u7F8E\\u6627\\u5BD0\\u59B9\\u5A9A\\u5776\\u8393\\u5D4B\\u7338\\u6D7C\\u6E44\\u6963\\u9545\\u9E5B\\u8882\\u9B45\",\r\n \"men\": \"\\u95E8\\u95F7\\u4EEC\\u626A\\u739F\\u7116\\u61D1\\u9494\",\r\n \"mi\": \"\\u772F\\u919A\\u9761\\u7CDC\\u8FF7\\u8C1C\\u5F25\\u7C73\\u79D8\\u89C5\\u6CCC\\u871C\\u5BC6\\u5E42\\u8288\\u5196\\u8C27\\u863C\\u5627\\u7315\\u736F\\u6C68\\u5B93\\u5F2D\\u8112\\u6549\\u7CF8\\u7E3B\\u9E8B\",\r\n \"mian\": \"\\u68C9\\u7720\\u7EF5\\u5195\\u514D\\u52C9\\u5A29\\u7F05\\u9762\\u6C94\\u6E4E\\u817C\\u7704\",\r\n \"mie\": \"\\u8511\\u706D\\u54A9\\u881B\\u7BFE\",\r\n \"min\": \"\\u6C11\\u62BF\\u76BF\\u654F\\u60AF\\u95FD\\u82E0\\u5CB7\\u95F5\\u6CEF\\u73C9\",\r\n \"ming\": \"\\u660E\\u879F\\u9E23\\u94ED\\u540D\\u547D\\u51A5\\u8317\\u6E9F\\u669D\\u7791\\u9169\",\r\n \"miu\": \"\\u8C2C\",\r\n \"mo\": \"\\u6478\\u6479\\u8611\\u6A21\\u819C\\u78E8\\u6469\\u9B54\\u62B9\\u672B\\u83AB\\u58A8\\u9ED8\\u6CAB\\u6F20\\u5BDE\\u964C\\u8C1F\\u8309\\u84E6\\u998D\\u5AEB\\u9546\\u79E3\\u763C\\u8031\\u87C6\\u8C8A\\u8C98\",\r\n \"mou\": \"\\u8C0B\\u725F\\u67D0\\u53B6\\u54DE\\u5A7A\\u7738\\u936A\",\r\n \"mu\": \"\\u62C7\\u7261\\u4EA9\\u59C6\\u6BCD\\u5893\\u66AE\\u5E55\\u52DF\\u6155\\u6728\\u76EE\\u7766\\u7267\\u7A46\\u4EEB\\u82DC\\u5452\\u6C90\\u6BEA\\u94BC\",\r\n \"na\": \"\\u62FF\\u54EA\\u5450\\u94A0\\u90A3\\u5A1C\\u7EB3\\u5185\\u637A\\u80AD\\u954E\\u8872\\u7BAC\",\r\n \"nai\": \"\\u6C16\\u4E43\\u5976\\u8010\\u5948\\u9F10\\u827F\\u8418\\u67F0\",\r\n \"nan\": \"\\u5357\\u7537\\u96BE\\u56CA\\u5583\\u56E1\\u6960\\u8169\\u877B\\u8D67\",\r\n \"nang\": \"\\u652E\\u54DD\\u56D4\\u9995\\u66E9\",\r\n \"nao\": \"\\u6320\\u8111\\u607C\\u95F9\\u5B6C\\u57B4\\u7331\\u7459\\u7847\\u94D9\\u86F2\",\r\n \"ne\": \"\\u6DD6\\u5462\\u8BB7\",\r\n \"nei\": \"\\u9981\",\r\n \"nen\": \"\\u5AE9\\u80FD\\u6798\\u6041\",\r\n \"ni\": \"\\u59AE\\u9713\\u502A\\u6CE5\\u5C3C\\u62DF\\u4F60\\u533F\\u817B\\u9006\\u6EBA\\u4F32\\u576D\\u730A\\u6029\\u6EE0\\u6635\\u65CE\\u7962\\u615D\\u7768\\u94CC\\u9CB5\",\r\n \"nian\": \"\\u852B\\u62C8\\u5E74\\u78BE\\u64B5\\u637B\\u5FF5\\u5EFF\\u8F87\\u9ECF\\u9C87\\u9CB6\",\r\n \"niang\": \"\\u5A18\\u917F\",\r\n \"niao\": \"\\u9E1F\\u5C3F\\u8311\\u5B32\\u8132\\u8885\",\r\n \"nie\": \"\\u634F\\u8042\\u5B7D\\u556E\\u954A\\u954D\\u6D85\\u4E5C\\u9667\\u8616\\u55EB\\u8080\\u989E\\u81EC\\u8E51\",\r\n \"nin\": \"\\u60A8\\u67E0\",\r\n \"ning\": \"\\u72DE\\u51DD\\u5B81\\u62E7\\u6CDE\\u4F5E\\u84E5\\u549B\\u752F\\u804D\",\r\n \"niu\": \"\\u725B\\u626D\\u94AE\\u7EBD\\u72C3\\u5FF8\\u599E\\u86B4\",\r\n \"nong\": \"\\u8113\\u6D53\\u519C\\u4FAC\",\r\n \"nu\": \"\\u5974\\u52AA\\u6012\\u5476\\u5E11\\u5F29\\u80EC\\u5B65\\u9A7D\",\r\n \"nv\": \"\\u5973\\u6067\\u9495\\u8844\",\r\n \"nuan\": \"\\u6696\",\r\n \"nuenue\": \"\\u8650\",\r\n \"nue\": \"\\u759F\\u8C11\",\r\n \"nuo\": \"\\u632A\\u61E6\\u7CEF\\u8BFA\\u50A9\\u6426\\u558F\\u9518\",\r\n \"o\": \"\\u5594\",\r\n \"ou\": \"\\u54E6\\u6B27\\u9E25\\u6BB4\\u85D5\\u5455\\u5076\\u6CA4\\u6004\\u74EF\\u8026\",\r\n \"pa\": \"\\u556A\\u8DB4\\u722C\\u5E15\\u6015\\u7436\\u8469\\u7B62\",\r\n \"pai\": \"\\u62CD\\u6392\\u724C\\u5F98\\u6E43\\u6D3E\\u4FF3\\u848E\",\r\n \"pan\": \"\\u6500\\u6F58\\u76D8\\u78D0\\u76FC\\u7554\\u5224\\u53DB\\u723F\\u6CEE\\u88A2\\u897B\\u87E0\\u8E52\",\r\n \"pang\": \"\\u4E53\\u5E9E\\u65C1\\u802A\\u80D6\\u6EC2\\u9004\",\r\n \"pao\": \"\\u629B\\u5486\\u5228\\u70AE\\u888D\\u8DD1\\u6CE1\\u530F\\u72CD\\u5E96\\u812C\\u75B1\",\r\n \"pei\": \"\\u5478\\u80DA\\u57F9\\u88F4\\u8D54\\u966A\\u914D\\u4F69\\u6C9B\\u638A\\u8F94\\u5E14\\u6DE0\\u65C6\\u952B\\u9185\\u9708\",\r\n \"pen\": \"\\u55B7\\u76C6\\u6E53\",\r\n \"peng\": \"\\u7830\\u62A8\\u70F9\\u6F8E\\u5F6D\\u84EC\\u68DA\\u787C\\u7BF7\\u81A8\\u670B\\u9E4F\\u6367\\u78B0\\u576F\\u580B\\u562D\\u6026\\u87DB\",\r\n \"pi\": \"\\u7812\\u9739\\u6279\\u62AB\\u5288\\u7435\\u6BD7\\u5564\\u813E\\u75B2\\u76AE\\u5339\\u75DE\\u50FB\\u5C41\\u8B6C\\u4E15\\u9674\\u90B3\\u90EB\\u572E\\u9F19\\u64D7\\u567C\\u5E80\\u5AB2\\u7EB0\\u6787\\u7513\\u7765\\u7F74\\u94CD\\u75E6\\u7656\\u758B\\u868D\\u8C94\",\r\n \"pian\": \"\\u7BC7\\u504F\\u7247\\u9A97\\u8C1D\\u9A88\\u728F\\u80FC\\u890A\\u7FE9\\u8E41\",\r\n \"piao\": \"\\u98D8\\u6F02\\u74E2\\u7968\\u527D\\u560C\\u5AD6\\u7F25\\u6B8D\\u779F\\u87B5\",\r\n \"pie\": \"\\u6487\\u77A5\\u4E3F\\u82E4\\u6C15\",\r\n \"pin\": \"\\u62FC\\u9891\\u8D2B\\u54C1\\u8058\\u62DA\\u59D8\\u5AD4\\u6980\\u725D\\u98A6\",\r\n \"ping\": \"\\u4E52\\u576A\\u82F9\\u840D\\u5E73\\u51ED\\u74F6\\u8BC4\\u5C4F\\u4FDC\\u5A09\\u67B0\\u9C86\",\r\n \"po\": \"\\u5761\\u6CFC\\u9887\\u5A46\\u7834\\u9B44\\u8FEB\\u7C95\\u53F5\\u9131\\u6EA5\\u73C0\\u948B\\u94B7\\u76A4\\u7B38\",\r\n \"pou\": \"\\u5256\\u88D2\\u8E23\",\r\n \"pu\": \"\\u6251\\u94FA\\u4EC6\\u8386\\u8461\\u83E9\\u84B2\\u57D4\\u6734\\u5703\\u666E\\u6D66\\u8C31\\u66DD\\u7011\\u530D\\u5657\\u6FEE\\u749E\\u6C06\\u9564\\u9568\\u8E7C\",\r\n \"qi\": \"\\u671F\\u6B3A\\u6816\\u621A\\u59BB\\u4E03\\u51C4\\u6F06\\u67D2\\u6C8F\\u5176\\u68CB\\u5947\\u6B67\\u7566\\u5D0E\\u8110\\u9F50\\u65D7\\u7948\\u7941\\u9A91\\u8D77\\u5C82\\u4E5E\\u4F01\\u542F\\u5951\\u780C\\u5668\\u6C14\\u8FC4\\u5F03\\u6C7D\\u6CE3\\u8BAB\\u4E9F\\u4E93\\u573B\\u8291\\u840B\\u847A\\u5601\\u5C7A\\u5C90\\u6C54\\u6DC7\\u9A90\\u7EEE\\u742A\\u7426\\u675E\\u6864\\u69ED\\u6B39\\u797A\\u61A9\\u789B\\u86F4\\u871E\\u7DA6\\u7DAE\\u8DBF\\u8E4A\\u9CCD\\u9E92\",\r\n \"qia\": \"\\u6390\\u6070\\u6D3D\\u845C\",\r\n \"qian\": \"\\u7275\\u6266\\u948E\\u94C5\\u5343\\u8FC1\\u7B7E\\u4EDF\\u8C26\\u4E7E\\u9ED4\\u94B1\\u94B3\\u524D\\u6F5C\\u9063\\u6D45\\u8C34\\u5811\\u5D4C\\u6B20\\u6B49\\u4F65\\u9621\\u828A\\u82A1\\u8368\\u63AE\\u5C8D\\u60AD\\u614A\\u9A9E\\u6434\\u8930\\u7F31\\u6920\\u80B7\\u6106\\u94A4\\u8654\\u7B9D\",\r\n \"qiang\": \"\\u67AA\\u545B\\u8154\\u7F8C\\u5899\\u8537\\u5F3A\\u62A2\\u5AF1\\u6A2F\\u6217\\u709D\\u9516\\u9535\\u956A\\u8941\\u8723\\u7F9F\\u8DEB\\u8DC4\",\r\n \"qiao\": \"\\u6A47\\u9539\\u6572\\u6084\\u6865\\u77A7\\u4E54\\u4FA8\\u5DE7\\u9798\\u64AC\\u7FD8\\u5CED\\u4FCF\\u7A8D\\u5281\\u8BEE\\u8C2F\\u835E\\u6100\\u6194\\u7F32\\u6A35\\u6BF3\\u7857\\u8DF7\\u9792\",\r\n \"qie\": \"\\u5207\\u8304\\u4E14\\u602F\\u7A83\\u90C4\\u553C\\u60EC\\u59BE\\u6308\\u9532\\u7BA7\",\r\n \"qin\": \"\\u94A6\\u4FB5\\u4EB2\\u79E6\\u7434\\u52E4\\u82B9\\u64D2\\u79BD\\u5BDD\\u6C81\\u82A9\\u84C1\\u8572\\u63FF\\u5423\\u55EA\\u5659\\u6EB1\\u6A8E\\u8793\\u887E\",\r\n \"qing\": \"\\u9752\\u8F7B\\u6C22\\u503E\\u537F\\u6E05\\u64CE\\u6674\\u6C30\\u60C5\\u9877\\u8BF7\\u5E86\\u5029\\u82D8\\u570A\\u6AA0\\u78EC\\u873B\\u7F44\\u7B90\\u8B26\\u9CAD\\u9EE5\",\r\n \"qiong\": \"\\u743C\\u7A77\\u909B\\u8315\\u7A79\\u7B47\\u928E\",\r\n \"qiu\": \"\\u79CB\\u4E18\\u90B1\\u7403\\u6C42\\u56DA\\u914B\\u6CC5\\u4FC5\\u6C3D\\u5DEF\\u827D\\u72B0\\u6E6B\\u9011\\u9052\\u6978\\u8D47\\u9E20\\u866C\\u86AF\\u8764\\u88D8\\u7CD7\\u9CC5\\u9F3D\",\r\n \"qu\": \"\\u8D8B\\u533A\\u86C6\\u66F2\\u8EAF\\u5C48\\u9A71\\u6E20\\u53D6\\u5A36\\u9F8B\\u8DA3\\u53BB\\u8BCE\\u52AC\\u8556\\u8627\\u5C96\\u8862\\u9612\\u74A9\\u89D1\\u6C0D\\u795B\\u78F2\\u766F\\u86D0\\u883C\\u9EB4\\u77BF\\u9EE2\",\r\n \"quan\": \"\\u5708\\u98A7\\u6743\\u919B\\u6CC9\\u5168\\u75CA\\u62F3\\u72AC\\u5238\\u529D\\u8BE0\\u8343\\u737E\\u609B\\u7EFB\\u8F81\\u754E\\u94E8\\u8737\\u7B4C\\u9B08\",\r\n \"que\": \"\\u7F3A\\u7094\\u7638\\u5374\\u9E4A\\u69B7\\u786E\\u96C0\\u9619\\u60AB\",\r\n \"qun\": \"\\u88D9\\u7FA4\\u9021\",\r\n \"ran\": \"\\u7136\\u71C3\\u5189\\u67D3\\u82D2\\u9AEF\",\r\n \"rang\": \"\\u74E4\\u58E4\\u6518\\u56B7\\u8BA9\\u79B3\\u7A70\",\r\n \"rao\": \"\\u9976\\u6270\\u7ED5\\u835B\\u5A06\\u6861\",\r\n \"ruo\": \"\\u60F9\\u82E5\\u5F31\",\r\n \"re\": \"\\u70ED\\u504C\",\r\n \"ren\": \"\\u58EC\\u4EC1\\u4EBA\\u5FCD\\u97E7\\u4EFB\\u8BA4\\u5203\\u598A\\u7EAB\\u4EDE\\u834F\\u845A\\u996A\\u8F6B\\u7A14\\u887D\",\r\n \"reng\": \"\\u6254\\u4ECD\",\r\n \"ri\": \"\\u65E5\",\r\n \"rong\": \"\\u620E\\u8338\\u84C9\\u8363\\u878D\\u7194\\u6EB6\\u5BB9\\u7ED2\\u5197\\u5D58\\u72E8\\u7F1B\\u6995\\u877E\",\r\n \"rou\": \"\\u63C9\\u67D4\\u8089\\u7CC5\\u8E42\\u97A3\",\r\n \"ru\": \"\\u8339\\u8815\\u5112\\u5B7A\\u5982\\u8FB1\\u4E73\\u6C5D\\u5165\\u8925\\u84D0\\u85B7\\u5685\\u6D33\\u6EBD\\u6FE1\\u94F7\\u8966\\u98A5\",\r\n \"ruan\": \"\\u8F6F\\u962E\\u670A\",\r\n \"rui\": \"\\u854A\\u745E\\u9510\\u82AE\\u8564\\u777F\\u868B\",\r\n \"run\": \"\\u95F0\\u6DA6\",\r\n \"sa\": \"\\u6492\\u6D12\\u8428\\u5345\\u4EE8\\u6332\\u98D2\",\r\n \"sai\": \"\\u816E\\u9CC3\\u585E\\u8D5B\\u567B\",\r\n \"san\": \"\\u4E09\\u53C1\\u4F1E\\u6563\\u5F61\\u9993\\u6C35\\u6BF5\\u7CC1\\u9730\",\r\n \"sang\": \"\\u6851\\u55D3\\u4E27\\u6421\\u78C9\\u98A1\",\r\n \"sao\": \"\\u6414\\u9A9A\\u626B\\u5AC2\\u57FD\\u81CA\\u7619\\u9CCB\",\r\n \"se\": \"\\u745F\\u8272\\u6DA9\\u556C\\u94E9\\u94EF\\u7A51\",\r\n \"sen\": \"\\u68EE\",\r\n \"seng\": \"\\u50E7\",\r\n \"sha\": \"\\u838E\\u7802\\u6740\\u5239\\u6C99\\u7EB1\\u50BB\\u5565\\u715E\\u810E\\u6B43\\u75E7\\u88DF\\u970E\\u9CA8\",\r\n \"shai\": \"\\u7B5B\\u6652\\u917E\",\r\n \"shan\": \"\\u73CA\\u82EB\\u6749\\u5C71\\u5220\\u717D\\u886B\\u95EA\\u9655\\u64C5\\u8D61\\u81B3\\u5584\\u6C55\\u6247\\u7F2E\\u5261\\u8BAA\\u912F\\u57CF\\u829F\\u6F78\\u59D7\\u9A9F\\u81BB\\u9490\\u759D\\u87EE\\u8222\\u8DDA\\u9CDD\",\r\n \"shang\": \"\\u5892\\u4F24\\u5546\\u8D4F\\u664C\\u4E0A\\u5C1A\\u88F3\\u57A7\\u7EF1\\u6B87\\u71B5\\u89DE\",\r\n \"shao\": \"\\u68A2\\u634E\\u7A0D\\u70E7\\u828D\\u52FA\\u97F6\\u5C11\\u54E8\\u90B5\\u7ECD\\u52AD\\u82D5\\u6F72\\u86F8\\u7B24\\u7B72\\u8244\",\r\n \"she\": \"\\u5962\\u8D4A\\u86C7\\u820C\\u820D\\u8D66\\u6444\\u5C04\\u6151\\u6D89\\u793E\\u8BBE\\u538D\\u4F58\\u731E\\u7572\\u9E9D\",\r\n \"shen\": \"\\u7837\\u7533\\u547B\\u4F38\\u8EAB\\u6DF1\\u5A20\\u7EC5\\u795E\\u6C88\\u5BA1\\u5A76\\u751A\\u80BE\\u614E\\u6E17\\u8BDC\\u8C02\\u5432\\u54C2\\u6E16\\u6939\\u77E7\\u8703\",\r\n \"sheng\": \"\\u58F0\\u751F\\u7525\\u7272\\u5347\\u7EF3\\u7701\\u76DB\\u5269\\u80DC\\u5723\\u4E1E\\u6E11\\u5AB5\\u771A\\u7B19\",\r\n \"shi\": \"\\u5E08\\u5931\\u72EE\\u65BD\\u6E7F\\u8BD7\\u5C38\\u8671\\u5341\\u77F3\\u62FE\\u65F6\\u4EC0\\u98DF\\u8680\\u5B9E\\u8BC6\\u53F2\\u77E2\\u4F7F\\u5C4E\\u9A76\\u59CB\\u5F0F\\u793A\\u58EB\\u4E16\\u67FF\\u4E8B\\u62ED\\u8A93\\u901D\\u52BF\\u662F\\u55DC\\u566C\\u9002\\u4ED5\\u4F8D\\u91CA\\u9970\\u6C0F\\u5E02\\u6043\\u5BA4\\u89C6\\u8BD5\\u8C25\\u57D8\\u83B3\\u84CD\\u5F11\\u5511\\u9963\\u8F7C\\u8006\\u8D33\\u70BB\\u793B\\u94C8\\u94CA\\u87AB\\u8210\\u7B6E\\u8C55\\u9CA5\\u9CBA\",\r\n \"shou\": \"\\u6536\\u624B\\u9996\\u5B88\\u5BFF\\u6388\\u552E\\u53D7\\u7626\\u517D\\u624C\\u72E9\\u7EF6\\u824F\",\r\n \"shu\": \"\\u852C\\u67A2\\u68B3\\u6B8A\\u6292\\u8F93\\u53D4\\u8212\\u6DD1\\u758F\\u4E66\\u8D4E\\u5B70\\u719F\\u85AF\\u6691\\u66D9\\u7F72\\u8700\\u9ECD\\u9F20\\u5C5E\\u672F\\u8FF0\\u6811\\u675F\\u620D\\u7AD6\\u5885\\u5EB6\\u6570\\u6F31\\u6055\\u500F\\u587E\\u83FD\\u5FC4\\u6CAD\\u6D91\\u6F8D\\u59DD\\u7EBE\\u6BF9\\u8167\\u6BB3\\u956F\\u79EB\\u9E6C\",\r\n \"shua\": \"\\u5237\\u800D\\u5530\\u6DAE\",\r\n \"shuai\": \"\\u6454\\u8870\\u7529\\u5E05\\u87C0\",\r\n \"shuan\": \"\\u6813\\u62F4\\u95E9\",\r\n \"shuang\": \"\\u971C\\u53CC\\u723D\\u5B40\",\r\n \"shui\": \"\\u8C01\\u6C34\\u7761\\u7A0E\",\r\n \"shun\": \"\\u542E\\u77AC\\u987A\\u821C\\u6042\",\r\n \"shuo\": \"\\u8BF4\\u7855\\u6714\\u70C1\\u84B4\\u6420\\u55CD\\u6FEF\\u5981\\u69CA\\u94C4\",\r\n \"si\": \"\\u65AF\\u6495\\u5636\\u601D\\u79C1\\u53F8\\u4E1D\\u6B7B\\u8086\\u5BFA\\u55E3\\u56DB\\u4F3A\\u4F3C\\u9972\\u5DF3\\u53AE\\u4FDF\\u5155\\u83E5\\u549D\\u6C5C\\u6CD7\\u6F8C\\u59D2\\u9A77\\u7F0C\\u7940\\u7960\\u9536\\u9E36\\u801C\\u86F3\\u7B25\",\r\n \"song\": \"\\u677E\\u8038\\u6002\\u9882\\u9001\\u5B8B\\u8BBC\\u8BF5\\u51C7\\u83D8\\u5D27\\u5D69\\u5FEA\\u609A\\u6DDE\\u7AE6\",\r\n \"sou\": \"\\u641C\\u8258\\u64DE\\u55FD\\u53DF\\u55D6\\u55FE\\u998A\\u6EB2\\u98D5\\u778D\\u953C\\u878B\",\r\n \"su\": \"\\u82CF\\u9165\\u4FD7\\u7D20\\u901F\\u7C9F\\u50F3\\u5851\\u6EAF\\u5BBF\\u8BC9\\u8083\\u5919\\u8C21\\u850C\\u55C9\\u612B\\u7C0C\\u89EB\\u7A23\",\r\n \"suan\": \"\\u9178\\u849C\\u7B97\",\r\n \"sui\": \"\\u867D\\u968B\\u968F\\u7EE5\\u9AD3\\u788E\\u5C81\\u7A57\\u9042\\u96A7\\u795F\\u84D1\\u51AB\\u8C07\\u6FC9\\u9083\\u71E7\\u772D\\u7762\",\r\n \"sun\": \"\\u5B59\\u635F\\u7B0B\\u836A\\u72F2\\u98E7\\u69AB\\u8DE3\\u96BC\",\r\n \"suo\": \"\\u68AD\\u5506\\u7F29\\u7410\\u7D22\\u9501\\u6240\\u5522\\u55E6\\u5A11\\u686B\\u7743\\u7FA7\",\r\n \"ta\": \"\\u584C\\u4ED6\\u5B83\\u5979\\u5854\\u736D\\u631E\\u8E4B\\u8E0F\\u95FC\\u6EBB\\u9062\\u69BB\\u6C93\",\r\n \"tai\": \"\\u80CE\\u82D4\\u62AC\\u53F0\\u6CF0\\u915E\\u592A\\u6001\\u6C70\\u90B0\\u85B9\\u80BD\\u70B1\\u949B\\u8DC6\\u9C90\",\r\n \"tan\": \"\\u574D\\u644A\\u8D2A\\u762B\\u6EE9\\u575B\\u6A80\\u75F0\\u6F6D\\u8C2D\\u8C08\\u5766\\u6BEF\\u8892\\u78B3\\u63A2\\u53F9\\u70AD\\u90EF\\u8548\\u6619\\u94BD\\u952C\\u8983\",\r\n \"tang\": \"\\u6C64\\u5858\\u642A\\u5802\\u68E0\\u819B\\u5510\\u7CD6\\u50A5\\u9967\\u6E8F\\u746D\\u94F4\\u9557\\u8025\\u8797\\u87B3\\u7FB0\\u91A3\",\r\n \"thang\": \"\\u5018\\u8EBA\\u6DCC\",\r\n \"theng\": \"\\u8D9F\\u70EB\",\r\n \"tao\": \"\\u638F\\u6D9B\\u6ED4\\u7EE6\\u8404\\u6843\\u9003\\u6DD8\\u9676\\u8BA8\\u5957\\u6311\\u9F17\\u5555\\u97EC\\u9955\",\r\n \"te\": \"\\u7279\",\r\n \"teng\": \"\\u85E4\\u817E\\u75BC\\u8A8A\\u6ED5\",\r\n \"ti\": \"\\u68AF\\u5254\\u8E22\\u9511\\u63D0\\u9898\\u8E44\\u557C\\u4F53\\u66FF\\u568F\\u60D5\\u6D95\\u5243\\u5C49\\u8351\\u608C\\u9016\\u7EE8\\u7F07\\u9E48\\u88FC\\u918D\",\r\n \"tian\": \"\\u5929\\u6DFB\\u586B\\u7530\\u751C\\u606C\\u8214\\u8146\\u63AD\\u5FDD\\u9617\\u6B84\\u754B\\u94BF\\u86BA\",\r\n \"tiao\": \"\\u6761\\u8FE2\\u773A\\u8DF3\\u4F7B\\u7967\\u94EB\\u7A95\\u9F86\\u9CA6\",\r\n \"tie\": \"\\u8D34\\u94C1\\u5E16\\u841C\\u992E\",\r\n \"ting\": \"\\u5385\\u542C\\u70C3\\u6C40\\u5EF7\\u505C\\u4EAD\\u5EAD\\u633A\\u8247\\u839B\\u8476\\u5A77\\u6883\\u8713\\u9706\",\r\n \"tong\": \"\\u901A\\u6850\\u916E\\u77B3\\u540C\\u94DC\\u5F64\\u7AE5\\u6876\\u6345\\u7B52\\u7EDF\\u75DB\\u4F5F\\u50EE\\u4EDD\\u833C\\u55F5\\u6078\\u6F7C\\u783C\",\r\n \"tou\": \"\\u5077\\u6295\\u5934\\u900F\\u4EA0\",\r\n \"tu\": \"\\u51F8\\u79C3\\u7A81\\u56FE\\u5F92\\u9014\\u6D82\\u5C60\\u571F\\u5410\\u5154\\u580D\\u837C\\u83DF\\u948D\\u9174\\u51C3\",\r\n \"tuan\": \"\\u6E4D\\u56E2\\u7583\",\r\n \"tui\": \"\\u63A8\\u9893\\u817F\\u8715\\u892A\\u9000\\u5FD2\\u717A\",\r\n \"tun\": \"\\u541E\\u5C6F\\u81C0\\u9968\\u66BE\\u8C5A\\u7A80\",\r\n \"tuo\": \"\\u62D6\\u6258\\u8131\\u9E35\\u9640\\u9A6E\\u9A7C\\u692D\\u59A5\\u62D3\\u553E\\u4E47\\u4F57\\u5768\\u5EB9\\u6CB1\\u67DD\\u7823\\u7BA8\\u8204\\u8DCE\\u9F0D\",\r\n \"wa\": \"\\u6316\\u54C7\\u86D9\\u6D3C\\u5A03\\u74E6\\u889C\\u4F64\\u5A32\\u817D\",\r\n \"wai\": \"\\u6B6A\\u5916\",\r\n \"wan\": \"\\u8C4C\\u5F2F\\u6E7E\\u73A9\\u987D\\u4E38\\u70F7\\u5B8C\\u7897\\u633D\\u665A\\u7696\\u60CB\\u5B9B\\u5A49\\u4E07\\u8155\\u525C\\u8284\\u82CB\\u83C0\\u7EA8\\u7EFE\\u742C\\u8118\\u7579\\u873F\\u7BA2\",\r\n \"wang\": \"\\u6C6A\\u738B\\u4EA1\\u6789\\u7F51\\u5F80\\u65FA\\u671B\\u5FD8\\u5984\\u7F54\\u5C22\\u60D8\\u8F8B\\u9B4D\",\r\n \"wei\": \"\\u5A01\\u5DCD\\u5FAE\\u5371\\u97E6\\u8FDD\\u6845\\u56F4\\u552F\\u60DF\\u4E3A\\u6F4D\\u7EF4\\u82C7\\u840E\\u59D4\\u4F1F\\u4F2A\\u5C3E\\u7EAC\\u672A\\u851A\\u5473\\u754F\\u80C3\\u5582\\u9B4F\\u4F4D\\u6E2D\\u8C13\\u5C09\\u6170\\u536B\\u502D\\u504E\\u8BFF\\u9688\\u8473\\u8587\\u5E0F\\u5E37\\u5D34\\u5D6C\\u7325\\u732C\\u95F1\\u6CA9\\u6D27\\u6DA0\\u9036\\u5A13\\u73AE\\u97EA\\u8ECE\\u709C\\u7168\\u71A8\\u75FF\\u8249\\u9C94\",\r\n \"wen\": \"\\u761F\\u6E29\\u868A\\u6587\\u95FB\\u7EB9\\u543B\\u7A33\\u7D0A\\u95EE\\u520E\\u6120\\u960C\\u6C76\\u74BA\\u97EB\\u6B81\\u96EF\",\r\n \"weng\": \"\\u55E1\\u7FC1\\u74EE\\u84CA\\u8579\",\r\n \"wo\": \"\\u631D\\u8717\\u6DA1\\u7A9D\\u6211\\u65A1\\u5367\\u63E1\\u6C83\\u83B4\\u5E44\\u6E25\\u674C\\u809F\\u9F8C\",\r\n \"wu\": \"\\u5DEB\\u545C\\u94A8\\u4E4C\\u6C61\\u8BEC\\u5C4B\\u65E0\\u829C\\u68A7\\u543E\\u5434\\u6BCB\\u6B66\\u4E94\\u6342\\u5348\\u821E\\u4F0D\\u4FAE\\u575E\\u620A\\u96FE\\u6664\\u7269\\u52FF\\u52A1\\u609F\\u8BEF\\u5140\\u4EF5\\u9622\\u90AC\\u572C\\u82B4\\u5E91\\u6003\\u5FE4\\u6D6F\\u5BE4\\u8FD5\\u59A9\\u9A9B\\u727E\\u7110\\u9E49\\u9E5C\\u8708\\u92C8\\u9F2F\",\r\n \"xi\": \"\\u6614\\u7199\\u6790\\u897F\\u7852\\u77FD\\u6670\\u563B\\u5438\\u9521\\u727A\\u7A00\\u606F\\u5E0C\\u6089\\u819D\\u5915\\u60DC\\u7184\\u70EF\\u6EAA\\u6C50\\u7280\\u6A84\\u88AD\\u5E2D\\u4E60\\u5AB3\\u559C\\u94E3\\u6D17\\u7CFB\\u9699\\u620F\\u7EC6\\u50D6\\u516E\\u96B0\\u90D7\\u831C\\u8478\\u84F0\\u595A\\u550F\\u5F99\\u9969\\u960B\\u6D60\\u6DC5\\u5C63\\u5B09\\u73BA\\u6A28\\u66E6\\u89CB\\u6B37\\u71B9\\u798A\\u79A7\\u94B8\\u7699\\u7A78\\u8725\\u87CB\\u823E\\u7FB2\\u7C9E\\u7FD5\\u91AF\\u9F37\",\r\n \"xia\": \"\\u778E\\u867E\\u5323\\u971E\\u8F96\\u6687\\u5CE1\\u4FA0\\u72ED\\u4E0B\\u53A6\\u590F\\u5413\\u6380\\u846D\\u55C4\\u72CE\\u9050\\u7455\\u7856\\u7615\\u7F45\\u9EE0\",\r\n \"xian\": \"\\u9528\\u5148\\u4ED9\\u9C9C\\u7EA4\\u54B8\\u8D24\\u8854\\u8237\\u95F2\\u6D8E\\u5F26\\u5ACC\\u663E\\u9669\\u73B0\\u732E\\u53BF\\u817A\\u9985\\u7FA1\\u5BAA\\u9677\\u9650\\u7EBF\\u51BC\\u85D3\\u5C98\\u7303\\u66B9\\u5A34\\u6C19\\u7946\\u9E47\\u75EB\\u86AC\\u7B45\\u7C7C\\u9170\\u8DF9\",\r\n \"xiang\": \"\\u76F8\\u53A2\\u9576\\u9999\\u7BB1\\u8944\\u6E58\\u4E61\\u7FD4\\u7965\\u8BE6\\u60F3\\u54CD\\u4EAB\\u9879\\u5DF7\\u6A61\\u50CF\\u5411\\u8C61\\u8297\\u8459\\u9977\\u5EA0\\u9AA7\\u7F03\\u87D3\\u9C9E\\u98E8\",\r\n \"xiao\": \"\\u8427\\u785D\\u9704\\u524A\\u54EE\\u56A3\\u9500\\u6D88\\u5BB5\\u6DC6\\u6653\\u5C0F\\u5B5D\\u6821\\u8096\\u5578\\u7B11\\u6548\\u54D3\\u54BB\\u5D24\\u6F47\\u900D\\u9A81\\u7EE1\\u67AD\\u67B5\\u7B71\\u7BAB\\u9B48\",\r\n \"xie\": \"\\u6954\\u4E9B\\u6B47\\u874E\\u978B\\u534F\\u631F\\u643A\\u90AA\\u659C\\u80C1\\u8C10\\u5199\\u68B0\\u5378\\u87F9\\u61C8\\u6CC4\\u6CFB\\u8C22\\u5C51\\u5055\\u4EB5\\u52F0\\u71EE\\u85A4\\u64B7\\u5EE8\\u7023\\u9082\\u7EC1\\u7F2C\\u69AD\\u698D\\u6B59\\u8E9E\",\r\n \"xin\": \"\\u85AA\\u82AF\\u950C\\u6B23\\u8F9B\\u65B0\\u5FFB\\u5FC3\\u4FE1\\u8845\\u56DF\\u99A8\\u8398\\u6B46\\u94FD\\u946B\\u6615\",\r\n \"xing\": \"\\u661F\\u8165\\u7329\\u60FA\\u5174\\u5211\\u578B\\u5F62\\u90A2\\u884C\\u9192\\u5E78\\u674F\\u6027\\u59D3\\u9649\\u8347\\u8365\\u64E4\\u60BB\\u784E\",\r\n \"xiong\": \"\\u5144\\u51F6\\u80F8\\u5308\\u6C79\\u96C4\\u718A\\u828E\",\r\n \"xiu\": \"\\u4F11\\u4FEE\\u7F9E\\u673D\\u55C5\\u9508\\u79C0\\u8896\\u7EE3\\u83A0\\u5CAB\\u9990\\u5EA5\\u9E3A\\u8C85\\u9AF9\",\r\n \"xu\": \"\\u589F\\u620C\\u9700\\u865A\\u5618\\u987B\\u5F90\\u8BB8\\u84C4\\u9157\\u53D9\\u65ED\\u5E8F\\u755C\\u6064\\u7D6E\\u5A7F\\u7EEA\\u7EED\\u8BB4\\u8BE9\\u5729\\u84FF\\u6035\\u6D2B\\u6E86\\u987C\\u6829\\u7166\\u7809\\u76F1\\u80E5\\u7CC8\\u9191\",\r\n \"xuan\": \"\\u8F69\\u55A7\\u5BA3\\u60AC\\u65CB\\u7384\\u9009\\u7663\\u7729\\u7EDA\\u5107\\u8C16\\u8431\\u63CE\\u9994\\u6CEB\\u6D35\\u6E32\\u6F29\\u7487\\u6966\\u6684\\u70AB\\u714A\\u78B9\\u94C9\\u955F\\u75C3\",\r\n \"xue\": \"\\u9774\\u859B\\u5B66\\u7A74\\u96EA\\u8840\\u5671\\u6CF6\\u9CD5\",\r\n \"xun\": \"\\u52CB\\u718F\\u5FAA\\u65EC\\u8BE2\\u5BFB\\u9A6F\\u5DE1\\u6B89\\u6C5B\\u8BAD\\u8BAF\\u900A\\u8FC5\\u5DFD\\u57D9\\u8340\\u85B0\\u5CCB\\u5F87\\u6D54\\u66DB\\u7AA8\\u91BA\\u9C9F\",\r\n \"ya\": \"\\u538B\\u62BC\\u9E26\\u9E2D\\u5440\\u4E2B\\u82BD\\u7259\\u869C\\u5D16\\u8859\\u6DAF\\u96C5\\u54D1\\u4E9A\\u8BB6\\u4F22\\u63E0\\u5416\\u5C88\\u8FD3\\u5A05\\u740A\\u6860\\u6C29\\u7811\\u775A\\u75D6\",\r\n \"yan\": \"\\u7109\\u54BD\\u9609\\u70DF\\u6DF9\\u76D0\\u4E25\\u7814\\u8712\\u5CA9\\u5EF6\\u8A00\\u989C\\u960E\\u708E\\u6CBF\\u5944\\u63A9\\u773C\\u884D\\u6F14\\u8273\\u5830\\u71D5\\u538C\\u781A\\u96C1\\u5501\\u5F66\\u7130\\u5BB4\\u8C1A\\u9A8C\\u53A3\\u9765\\u8D5D\\u4FE8\\u5043\\u5156\\u8BA0\\u8C33\\u90FE\\u9122\\u82AB\\u83F8\\u5D26\\u6079\\u95EB\\u960F\\u6D07\\u6E6E\\u6EDF\\u598D\\u5AE3\\u7430\\u664F\\u80ED\\u814C\\u7131\\u7F68\\u7B75\\u917D\\u9B47\\u990D\\u9F39\",\r\n \"yang\": \"\\u6B83\\u592E\\u9E2F\\u79E7\\u6768\\u626C\\u4F6F\\u75A1\\u7F8A\\u6D0B\\u9633\\u6C27\\u4EF0\\u75D2\\u517B\\u6837\\u6F3E\\u5F89\\u600F\\u6CF1\\u7080\\u70CA\\u6059\\u86D8\\u9785\",\r\n \"yao\": \"\\u9080\\u8170\\u5996\\u7476\\u6447\\u5C27\\u9065\\u7A91\\u8C23\\u59DA\\u54AC\\u8200\\u836F\\u8981\\u8000\\u592D\\u723B\\u5406\\u5D3E\\u5FAD\\u7039\\u5E7A\\u73E7\\u6773\\u66DC\\u80B4\\u9E5E\\u7A88\\u7E47\\u9CD0\",\r\n \"ye\": \"\\u6930\\u564E\\u8036\\u7237\\u91CE\\u51B6\\u4E5F\\u9875\\u6396\\u4E1A\\u53F6\\u66F3\\u814B\\u591C\\u6DB2\\u8C12\\u90BA\\u63F6\\u9980\\u6654\\u70E8\\u94D8\",\r\n \"yi\": \"\\u4E00\\u58F9\\u533B\\u63D6\\u94F1\\u4F9D\\u4F0A\\u8863\\u9890\\u5937\\u9057\\u79FB\\u4EEA\\u80F0\\u7591\\u6C82\\u5B9C\\u59E8\\u5F5D\\u6905\\u8681\\u501A\\u5DF2\\u4E59\\u77E3\\u4EE5\\u827A\\u6291\\u6613\\u9091\\u5C79\\u4EBF\\u5F79\\u81C6\\u9038\\u8084\\u75AB\\u4EA6\\u88D4\\u610F\\u6BC5\\u5FC6\\u4E49\\u76CA\\u6EA2\\u8BE3\\u8BAE\\u8C0A\\u8BD1\\u5F02\\u7FFC\\u7FCC\\u7ECE\\u5208\\u5293\\u4F7E\\u8BD2\\u572A\\u572F\\u57F8\\u61FF\\u82E1\\u858F\\u5F08\\u5955\\u6339\\u5F0B\\u5453\\u54A6\\u54BF\\u566B\\u5CC4\\u5DB7\\u7317\\u9974\\u603F\\u6021\\u6092\\u6F2A\\u8FE4\\u9A7F\\u7F22\\u6BAA\\u8D3B\\u65D6\\u71A0\\u9487\\u9552\\u9571\\u75CD\\u7617\\u7654\\u7FCA\\u8864\\u8734\\u8223\\u7FBF\\u7FF3\\u914F\\u9EDF\",\r\n \"yin\": \"\\u8335\\u836B\\u56E0\\u6BB7\\u97F3\\u9634\\u59FB\\u541F\\u94F6\\u6DEB\\u5BC5\\u996E\\u5C39\\u5F15\\u9690\\u5370\\u80E4\\u911E\\u5819\\u831A\\u5591\\u72FA\\u5924\\u6C24\\u94DF\\u763E\\u8693\\u972A\\u9F88\",\r\n \"ying\": \"\\u82F1\\u6A31\\u5A74\\u9E70\\u5E94\\u7F28\\u83B9\\u8424\\u8425\\u8367\\u8747\\u8FCE\\u8D62\\u76C8\\u5F71\\u9896\\u786C\\u6620\\u5B34\\u90E2\\u8314\\u83BA\\u8426\\u6484\\u5624\\u81BA\\u6EE2\\u6F46\\u701B\\u745B\\u748E\\u6979\\u9E66\\u763F\\u988D\\u7F42\",\r\n \"yo\": \"\\u54DF\\u5537\",\r\n \"yong\": \"\\u62E5\\u4F63\\u81C3\\u75C8\\u5EB8\\u96CD\\u8E0A\\u86F9\\u548F\\u6CF3\\u6D8C\\u6C38\\u607F\\u52C7\\u7528\\u4FD1\\u58C5\\u5889\\u6175\\u9095\\u955B\\u752C\\u9CD9\\u9954\",\r\n \"you\": \"\\u5E7D\\u4F18\\u60A0\\u5FE7\\u5C24\\u7531\\u90AE\\u94C0\\u72B9\\u6CB9\\u6E38\\u9149\\u6709\\u53CB\\u53F3\\u4F51\\u91C9\\u8BF1\\u53C8\\u5E7C\\u5363\\u6538\\u4F91\\u83B8\\u5466\\u56FF\\u5BA5\\u67DA\\u7337\\u7256\\u94D5\\u75A3\\u8763\\u9C7F\\u9EDD\\u9F2C\",\r\n \"yu\": \"\\u8FC2\\u6DE4\\u4E8E\\u76C2\\u6986\\u865E\\u611A\\u8206\\u4F59\\u4FDE\\u903E\\u9C7C\\u6109\\u6E1D\\u6E14\\u9685\\u4E88\\u5A31\\u96E8\\u4E0E\\u5C7F\\u79B9\\u5B87\\u8BED\\u7FBD\\u7389\\u57DF\\u828B\\u90C1\\u5401\\u9047\\u55BB\\u5CEA\\u5FA1\\u6108\\u6B32\\u72F1\\u80B2\\u8A89\\u6D74\\u5BD3\\u88D5\\u9884\\u8C6B\\u9A6D\\u79BA\\u6BD3\\u4F1B\\u4FE3\\u8C00\\u8C15\\u8438\\u84E3\\u63C4\\u5581\\u5704\\u5709\\u5D5B\\u72F3\\u996B\\u5EBE\\u9608\\u59AA\\u59A4\\u7EA1\\u745C\\u6631\\u89CE\\u8174\\u6B24\\u65BC\\u715C\\u71E0\\u807F\\u94B0\\u9E46\\u7610\\u7600\\u7AB3\\u8753\\u7AFD\\u8201\\u96E9\\u9F89\",\r\n \"yuan\": \"\\u9E33\\u6E0A\\u51A4\\u5143\\u57A3\\u8881\\u539F\\u63F4\\u8F95\\u56ED\\u5458\\u5706\\u733F\\u6E90\\u7F18\\u8FDC\\u82D1\\u613F\\u6028\\u9662\\u586C\\u6C85\\u5A9B\\u7457\\u6A7C\\u7230\\u7722\\u9E22\\u8788\\u9F0B\",\r\n \"yue\": \"\\u66F0\\u7EA6\\u8D8A\\u8DC3\\u94A5\\u5CB3\\u7CA4\\u6708\\u60A6\\u9605\\u9FA0\\u6A3E\\u5216\\u94BA\",\r\n \"yun\": \"\\u8018\\u4E91\\u90E7\\u5300\\u9668\\u5141\\u8FD0\\u8574\\u915D\\u6655\\u97F5\\u5B55\\u90D3\\u82B8\\u72C1\\u607D\\u7EAD\\u6B92\\u6600\\u6C32\",\r\n \"za\": \"\\u531D\\u7838\\u6742\\u62F6\\u5482\",\r\n \"zai\": \"\\u683D\\u54C9\\u707E\\u5BB0\\u8F7D\\u518D\\u5728\\u54B1\\u5D3D\\u753E\",\r\n \"zan\": \"\\u6512\\u6682\\u8D5E\\u74D2\\u661D\\u7C2A\\u7CCC\\u8DB1\\u933E\",\r\n \"zang\": \"\\u8D43\\u810F\\u846C\\u5958\\u6215\\u81E7\",\r\n \"zao\": \"\\u906D\\u7CDF\\u51FF\\u85FB\\u67A3\\u65E9\\u6FA1\\u86A4\\u8E81\\u566A\\u9020\\u7682\\u7076\\u71E5\\u5523\\u7F2B\",\r\n \"ze\": \"\\u8D23\\u62E9\\u5219\\u6CFD\\u4EC4\\u8D5C\\u5567\\u8FEE\\u6603\\u7B2E\\u7BA6\\u8234\",\r\n \"zei\": \"\\u8D3C\",\r\n \"zen\": \"\\u600E\\u8C2E\",\r\n \"zeng\": \"\\u589E\\u618E\\u66FE\\u8D60\\u7F2F\\u7511\\u7F7E\\u9503\",\r\n \"zha\": \"\\u624E\\u55B3\\u6E23\\u672D\\u8F67\\u94E1\\u95F8\\u7728\\u6805\\u69A8\\u548B\\u4E4D\\u70B8\\u8BC8\\u63F8\\u5412\\u54A4\\u54F3\\u600D\\u781F\\u75C4\\u86B1\\u9F44\",\r\n \"zhai\": \"\\u6458\\u658B\\u5B85\\u7A84\\u503A\\u5BE8\\u7826\",\r\n \"zhan\": \"\\u77BB\\u6BE1\\u8A79\\u7C98\\u6CBE\\u76CF\\u65A9\\u8F97\\u5D2D\\u5C55\\u8638\\u6808\\u5360\\u6218\\u7AD9\\u6E5B\\u7EFD\\u8C35\\u640C\\u65C3\",\r\n \"zhang\": \"\\u6A1F\\u7AE0\\u5F70\\u6F33\\u5F20\\u638C\\u6DA8\\u6756\\u4E08\\u5E10\\u8D26\\u4ED7\\u80C0\\u7634\\u969C\\u4EC9\\u9123\\u5E5B\\u5D82\\u7350\\u5ADC\\u748B\\u87D1\",\r\n \"zhao\": \"\\u62DB\\u662D\\u627E\\u6CBC\\u8D75\\u7167\\u7F69\\u5146\\u8087\\u53EC\\u722A\\u8BCF\\u68F9\\u948A\\u7B0A\",\r\n \"zhe\": \"\\u906E\\u6298\\u54F2\\u86F0\\u8F99\\u8005\\u9517\\u8517\\u8FD9\\u6D59\\u8C2A\\u966C\\u67D8\\u8F84\\u78D4\\u9E67\\u891A\\u8707\\u8D6D\",\r\n \"zhen\": \"\\u73CD\\u659F\\u771F\\u7504\\u7827\\u81FB\\u8D1E\\u9488\\u4FA6\\u6795\\u75B9\\u8BCA\\u9707\\u632F\\u9547\\u9635\\u7F1C\\u6862\\u699B\\u8F78\\u8D48\\u80D7\\u6715\\u796F\\u755B\\u9E29\",\r\n \"zheng\": \"\\u84B8\\u6323\\u7741\\u5F81\\u72F0\\u4E89\\u6014\\u6574\\u62EF\\u6B63\\u653F\\u5E27\\u75C7\\u90D1\\u8BC1\\u8BE4\\u5CE5\\u94B2\\u94EE\\u7B5D\",\r\n \"zhi\": \"\\u829D\\u679D\\u652F\\u5431\\u8718\\u77E5\\u80A2\\u8102\\u6C41\\u4E4B\\u7EC7\\u804C\\u76F4\\u690D\\u6B96\\u6267\\u503C\\u4F84\\u5740\\u6307\\u6B62\\u8DBE\\u53EA\\u65E8\\u7EB8\\u5FD7\\u631A\\u63B7\\u81F3\\u81F4\\u7F6E\\u5E1C\\u5CD9\\u5236\\u667A\\u79E9\\u7A1A\\u8D28\\u7099\\u75D4\\u6EDE\\u6CBB\\u7A92\\u536E\\u965F\\u90C5\\u57F4\\u82B7\\u646D\\u5E19\\u5FEE\\u5F58\\u54AB\\u9A98\\u6809\\u67B3\\u6800\\u684E\\u8F75\\u8F7E\\u6534\\u8D3D\\u81A3\\u7949\\u7957\\u9EF9\\u96C9\\u9E37\\u75E3\\u86ED\\u7D77\\u916F\\u8DD6\\u8E2C\\u8E2F\\u8C78\\u89EF\",\r\n \"zhong\": \"\\u4E2D\\u76C5\\u5FE0\\u949F\\u8877\\u7EC8\\u79CD\\u80BF\\u91CD\\u4EF2\\u4F17\\u51A2\\u953A\\u87BD\\u8202\\u822F\\u8E35\",\r\n \"zhou\": \"\\u821F\\u5468\\u5DDE\\u6D32\\u8BCC\\u7CA5\\u8F74\\u8098\\u5E1A\\u5492\\u76B1\\u5B99\\u663C\\u9AA4\\u5544\\u7740\\u501C\\u8BF9\\u836E\\u9B3B\\u7EA3\\u80C4\\u78A1\\u7C40\\u8233\\u914E\\u9CB7\",\r\n \"zhu\": \"\\u73E0\\u682A\\u86DB\\u6731\\u732A\\u8BF8\\u8BDB\\u9010\\u7AF9\\u70DB\\u716E\\u62C4\\u77A9\\u5631\\u4E3B\\u8457\\u67F1\\u52A9\\u86C0\\u8D2E\\u94F8\\u7B51\\u4F4F\\u6CE8\\u795D\\u9A7B\\u4F2B\\u4F8F\\u90BE\\u82CE\\u8331\\u6D19\\u6E1A\\u6F74\\u9A7A\\u677C\\u69E0\\u6A65\\u70B7\\u94E2\\u75B0\\u7603\\u86B0\\u7AFA\\u7BB8\\u7FE5\\u8E85\\u9E88\",\r\n \"zhua\": \"\\u6293\",\r\n \"zhuai\": \"\\u62FD\",\r\n \"zhuan\": \"\\u4E13\\u7816\\u8F6C\\u64B0\\u8D5A\\u7BC6\\u629F\\u556D\\u989B\",\r\n \"zhuang\": \"\\u6869\\u5E84\\u88C5\\u5986\\u649E\\u58EE\\u72B6\\u4E2C\",\r\n \"zhui\": \"\\u690E\\u9525\\u8FFD\\u8D58\\u5760\\u7F00\\u8411\\u9A93\\u7F12\",\r\n \"zhun\": \"\\u8C06\\u51C6\",\r\n \"zhuo\": \"\\u6349\\u62D9\\u5353\\u684C\\u7422\\u8301\\u914C\\u707C\\u6D4A\\u502C\\u8BFC\\u5EF4\\u855E\\u64E2\\u555C\\u6D5E\\u6DBF\\u6753\\u712F\\u799A\\u65AB\",\r\n \"zi\": \"\\u5179\\u54A8\\u8D44\\u59FF\\u6ECB\\u6DC4\\u5B5C\\u7D2B\\u4ED4\\u7C7D\\u6ED3\\u5B50\\u81EA\\u6E0D\\u5B57\\u8C18\\u5D6B\\u59CA\\u5B73\\u7F01\\u6893\\u8F8E\\u8D40\\u6063\\u7726\\u9531\\u79ED\\u8014\\u7B2B\\u7CA2\\u89DC\\u8A3E\\u9CBB\\u9AED\",\r\n \"zong\": \"\\u9B03\\u68D5\\u8E2A\\u5B97\\u7EFC\\u603B\\u7EB5\\u8159\\u7CBD\",\r\n \"zou\": \"\\u90B9\\u8D70\\u594F\\u63CD\\u9139\\u9CB0\",\r\n \"zu\": \"\\u79DF\\u8DB3\\u5352\\u65CF\\u7956\\u8BC5\\u963B\\u7EC4\\u4FCE\\u83F9\\u5550\\u5F82\\u9A75\\u8E74\",\r\n \"zuan\": \"\\u94BB\\u7E82\\u6525\\u7F35\",\r\n \"zui\": \"\\u5634\\u9189\\u6700\\u7F6A\",\r\n \"zun\": \"\\u5C0A\\u9075\\u6499\\u6A3D\\u9CDF\",\r\n \"zuo\": \"\\u6628\\u5DE6\\u4F50\\u67DE\\u505A\\u4F5C\\u5750\\u5EA7\\u961D\\u963C\\u80D9\\u795A\\u9162\",\r\n \"diu\": \"\\u94E5\",\r\n \"nou\": \"\\u8028\",\r\n \"bia\": \"\\u9ADF\"\r\n };\r\n this.polyphone = {\r\n \"19969\": \"DZ\",\r\n \"19975\": \"WM\",\r\n \"19988\": \"QJ\",\r\n \"20048\": \"YL\",\r\n \"20056\": \"SC\",\r\n \"20060\": \"NM\",\r\n \"20094\": \"QG\",\r\n \"20127\": \"QJ\",\r\n \"20167\": \"QC\",\r\n \"20193\": \"YG\",\r\n \"20250\": \"KH\",\r\n \"20256\": \"ZC\",\r\n \"20282\": \"SC\",\r\n \"20285\": \"QJG\",\r\n \"20291\": \"TD\",\r\n \"20314\": \"YD\",\r\n \"20340\": \"NE\",\r\n \"20375\": \"TD\",\r\n \"20389\": \"YJ\",\r\n \"20391\": \"CZ\",\r\n \"20415\": \"PB\",\r\n \"20446\": \"YS\",\r\n \"20447\": \"SQ\",\r\n \"20504\": \"TC\",\r\n \"20608\": \"KG\",\r\n \"20854\": \"QJ\",\r\n \"20857\": \"ZC\",\r\n \"20911\": \"PF\",\r\n \"20985\": \"AW\",\r\n \"21032\": \"PB\",\r\n \"21048\": \"XQ\",\r\n \"21049\": \"SC\",\r\n \"21089\": \"YS\",\r\n \"21119\": \"JC\",\r\n \"21242\": \"SB\",\r\n \"21273\": \"SC\",\r\n \"21305\": \"YP\",\r\n \"21306\": \"QO\",\r\n \"21330\": \"ZC\",\r\n \"21333\": \"SDC\",\r\n \"21345\": \"QK\",\r\n \"21378\": \"CA\",\r\n \"21397\": \"SC\",\r\n \"21414\": \"XS\",\r\n \"21442\": \"SC\",\r\n \"21477\": \"JG\",\r\n \"21480\": \"TD\",\r\n \"21484\": \"ZS\",\r\n \"21494\": \"YX\",\r\n \"21505\": \"YX\",\r\n \"21512\": \"HG\",\r\n \"21523\": \"XH\",\r\n \"21537\": \"PB\",\r\n \"21542\": \"PF\",\r\n \"21549\": \"KH\",\r\n \"21571\": \"E\",\r\n \"21574\": \"DA\",\r\n \"21588\": \"TD\",\r\n \"21589\": \"O\",\r\n \"21618\": \"ZC\",\r\n \"21621\": \"KHA\",\r\n \"21632\": \"ZJ\",\r\n \"21654\": \"KG\",\r\n \"21679\": \"LKG\",\r\n \"21683\": \"KH\",\r\n \"21710\": \"A\",\r\n \"21719\": \"YH\",\r\n \"21734\": \"WOE\",\r\n \"21769\": \"A\",\r\n \"21780\": \"WN\",\r\n \"21804\": \"XH\",\r\n \"21834\": \"A\",\r\n \"21899\": \"ZD\",\r\n \"21903\": \"RN\",\r\n \"21908\": \"WO\",\r\n \"21939\": \"ZC\",\r\n \"21956\": \"SA\",\r\n \"21964\": \"YA\",\r\n \"21970\": \"TD\",\r\n \"22003\": \"A\",\r\n \"22031\": \"JG\",\r\n \"22040\": \"XS\",\r\n \"22060\": \"ZC\",\r\n \"22066\": \"ZC\",\r\n \"22079\": \"MH\",\r\n \"22129\": \"XJ\",\r\n \"22179\": \"XA\",\r\n \"22237\": \"NJ\",\r\n \"22244\": \"TD\",\r\n \"22280\": \"JQ\",\r\n \"22300\": \"YH\",\r\n \"22313\": \"XW\",\r\n \"22331\": \"YQ\",\r\n \"22343\": \"YJ\",\r\n \"22351\": \"PH\",\r\n \"22395\": \"DC\",\r\n \"22412\": \"TD\",\r\n \"22484\": \"PB\",\r\n \"22500\": \"PB\",\r\n \"22534\": \"ZD\",\r\n \"22549\": \"DH\",\r\n \"22561\": \"PB\",\r\n \"22612\": \"TD\",\r\n \"22771\": \"KQ\",\r\n \"22831\": \"HB\",\r\n \"22841\": \"JG\",\r\n \"22855\": \"QJ\",\r\n \"22865\": \"XQ\",\r\n \"23013\": \"ML\",\r\n \"23081\": \"WM\",\r\n \"23487\": \"SX\",\r\n \"23558\": \"QJ\",\r\n \"23561\": \"YW\",\r\n \"23586\": \"YW\",\r\n \"23614\": \"YW\",\r\n \"23615\": \"SN\",\r\n \"23631\": \"PB\",\r\n \"23646\": \"ZS\",\r\n \"23663\": \"ZT\",\r\n \"23673\": \"YG\",\r\n \"23762\": \"TD\",\r\n \"23769\": \"ZS\",\r\n \"23780\": \"QJ\",\r\n \"23884\": \"QK\",\r\n \"24055\": \"XH\",\r\n \"24113\": \"DC\",\r\n \"24162\": \"ZC\",\r\n \"24191\": \"GA\",\r\n \"24273\": \"QJ\",\r\n \"24324\": \"NL\",\r\n \"24377\": \"TD\",\r\n \"24378\": \"QJ\",\r\n \"24439\": \"PF\",\r\n \"24554\": \"ZS\",\r\n \"24683\": \"TD\",\r\n \"24694\": \"WE\",\r\n \"24733\": \"LK\",\r\n \"24925\": \"TN\",\r\n \"25094\": \"ZG\",\r\n \"25100\": \"XQ\",\r\n \"25103\": \"XH\",\r\n \"25153\": \"PB\",\r\n \"25170\": \"PB\",\r\n \"25179\": \"KG\",\r\n \"25203\": \"PB\",\r\n \"25240\": \"ZS\",\r\n \"25282\": \"FB\",\r\n \"25303\": \"NA\",\r\n \"25324\": \"KG\",\r\n \"25341\": \"ZY\",\r\n \"25373\": \"WZ\",\r\n \"25375\": \"XJ\",\r\n \"25384\": \"A\",\r\n \"25457\": \"A\",\r\n \"25528\": \"SD\",\r\n \"25530\": \"SC\",\r\n \"25552\": \"TD\",\r\n \"25774\": \"ZC\",\r\n \"25874\": \"ZC\",\r\n \"26044\": \"YW\",\r\n \"26080\": \"WM\",\r\n \"26292\": \"PB\",\r\n \"26333\": \"PB\",\r\n \"26355\": \"ZY\",\r\n \"26366\": \"CZ\",\r\n \"26397\": \"ZC\",\r\n \"26399\": \"QJ\",\r\n \"26415\": \"ZS\",\r\n \"26451\": \"SB\",\r\n \"26526\": \"ZC\",\r\n \"26552\": \"JG\",\r\n \"26561\": \"TD\",\r\n \"26588\": \"JG\",\r\n \"26597\": \"CZ\",\r\n \"26629\": \"ZS\",\r\n \"26638\": \"YL\",\r\n \"26646\": \"XQ\",\r\n \"26653\": \"KG\",\r\n \"26657\": \"XJ\",\r\n \"26727\": \"HG\",\r\n \"26894\": \"ZC\",\r\n \"26937\": \"ZS\",\r\n \"26946\": \"ZC\",\r\n \"26999\": \"KJ\",\r\n \"27099\": \"KJ\",\r\n \"27449\": \"YQ\",\r\n \"27481\": \"XS\",\r\n \"27542\": \"ZS\",\r\n \"27663\": \"ZS\",\r\n \"27748\": \"TS\",\r\n \"27784\": \"SC\",\r\n \"27788\": \"ZD\",\r\n \"27795\": \"TD\",\r\n \"27812\": \"O\",\r\n \"27850\": \"PB\",\r\n \"27852\": \"MB\",\r\n \"27895\": \"SL\",\r\n \"27898\": \"PL\",\r\n \"27973\": \"QJ\",\r\n \"27981\": \"KH\",\r\n \"27986\": \"HX\",\r\n \"27994\": \"XJ\",\r\n \"28044\": \"YC\",\r\n \"28065\": \"WG\",\r\n \"28177\": \"SM\",\r\n \"28267\": \"QJ\",\r\n \"28291\": \"KH\",\r\n \"28337\": \"ZQ\",\r\n \"28463\": \"TL\",\r\n \"28548\": \"DC\",\r\n \"28601\": \"TD\",\r\n \"28689\": \"PB\",\r\n \"28805\": \"JG\",\r\n \"28820\": \"QG\",\r\n \"28846\": \"PB\",\r\n \"28952\": \"TD\",\r\n \"28975\": \"ZC\",\r\n \"29100\": \"A\",\r\n \"29325\": \"QJ\",\r\n \"29575\": \"SL\",\r\n \"29602\": \"FB\",\r\n \"30010\": \"TD\",\r\n \"30044\": \"CX\",\r\n \"30058\": \"PF\",\r\n \"30091\": \"YSP\",\r\n \"30111\": \"YN\",\r\n \"30229\": \"XJ\",\r\n \"30427\": \"SC\",\r\n \"30465\": \"SX\",\r\n \"30631\": \"YQ\",\r\n \"30655\": \"QJ\",\r\n \"30684\": \"QJG\",\r\n \"30707\": \"SD\",\r\n \"30729\": \"XH\",\r\n \"30796\": \"LG\",\r\n \"30917\": \"PB\",\r\n \"31074\": \"NM\",\r\n \"31085\": \"JZ\",\r\n \"31109\": \"SC\",\r\n \"31181\": \"ZC\",\r\n \"31192\": \"MLB\",\r\n \"31293\": \"JQ\",\r\n \"31400\": \"YX\",\r\n \"31584\": \"YJ\",\r\n \"31896\": \"ZN\",\r\n \"31909\": \"ZY\",\r\n \"31995\": \"XJ\",\r\n \"32321\": \"PF\",\r\n \"32327\": \"ZY\",\r\n \"32418\": \"HG\",\r\n \"32420\": \"XQ\",\r\n \"32421\": \"HG\",\r\n \"32438\": \"LG\",\r\n \"32473\": \"GJ\",\r\n \"32488\": \"TD\",\r\n \"32521\": \"QJ\",\r\n \"32527\": \"PB\",\r\n \"32562\": \"ZSQ\",\r\n \"32564\": \"JZ\",\r\n \"32735\": \"ZD\",\r\n \"32793\": \"PB\",\r\n \"33071\": \"PF\",\r\n \"33098\": \"XL\",\r\n \"33100\": \"YA\",\r\n \"33152\": \"PB\",\r\n \"33261\": \"CX\",\r\n \"33324\": \"BP\",\r\n \"33333\": \"TD\",\r\n \"33406\": \"YA\",\r\n \"33426\": \"WM\",\r\n \"33432\": \"PB\",\r\n \"33445\": \"JG\",\r\n \"33486\": \"ZN\",\r\n \"33493\": \"TS\",\r\n \"33507\": \"QJ\",\r\n \"33540\": \"QJ\",\r\n \"33544\": \"ZC\",\r\n \"33564\": \"XQ\",\r\n \"33617\": \"YT\",\r\n \"33632\": \"QJ\",\r\n \"33636\": \"XH\",\r\n \"33637\": \"YX\",\r\n \"33694\": \"WG\",\r\n \"33705\": \"PF\",\r\n \"33728\": \"YW\",\r\n \"33882\": \"SR\",\r\n \"34067\": \"WM\",\r\n \"34074\": \"YW\",\r\n \"34121\": \"QJ\",\r\n \"34255\": \"ZC\",\r\n \"34259\": \"XL\",\r\n \"34425\": \"JH\",\r\n \"34430\": \"XH\",\r\n \"34485\": \"KH\",\r\n \"34503\": \"YS\",\r\n \"34532\": \"HG\",\r\n \"34552\": \"XS\",\r\n \"34558\": \"YE\",\r\n \"34593\": \"ZL\",\r\n \"34660\": \"YQ\",\r\n \"34892\": \"XH\",\r\n \"34928\": \"SC\",\r\n \"34999\": \"QJ\",\r\n \"35048\": \"PB\",\r\n \"35059\": \"SC\",\r\n \"35098\": \"ZC\",\r\n \"35203\": \"TQ\",\r\n \"35265\": \"JX\",\r\n \"35299\": \"JX\",\r\n \"35782\": \"SZ\",\r\n \"35828\": \"YS\",\r\n \"35830\": \"E\",\r\n \"35843\": \"TD\",\r\n \"35895\": \"YG\",\r\n \"35977\": \"MH\",\r\n \"36158\": \"JG\",\r\n \"36228\": \"QJ\",\r\n \"36426\": \"XQ\",\r\n \"36466\": \"DC\",\r\n \"36710\": \"JC\",\r\n \"36711\": \"ZYG\",\r\n \"36767\": \"PB\",\r\n \"36866\": \"SK\",\r\n \"36951\": \"YW\",\r\n \"37034\": \"YX\",\r\n \"37063\": \"XH\",\r\n \"37218\": \"ZC\",\r\n \"37325\": \"ZC\",\r\n \"38063\": \"PB\",\r\n \"38079\": \"TD\",\r\n \"38085\": \"QY\",\r\n \"38107\": \"DC\",\r\n \"38116\": \"TD\",\r\n \"38123\": \"YD\",\r\n \"38224\": \"HG\",\r\n \"38241\": \"XTC\",\r\n \"38271\": \"ZC\",\r\n \"38415\": \"YE\",\r\n \"38426\": \"KH\",\r\n \"38461\": \"YD\",\r\n \"38463\": \"AE\",\r\n \"38466\": \"PB\",\r\n \"38477\": \"XJ\",\r\n \"38518\": \"YT\",\r\n \"38551\": \"WK\",\r\n \"38585\": \"ZC\",\r\n \"38704\": \"XS\",\r\n \"38739\": \"LJ\",\r\n \"38761\": \"GJ\",\r\n \"38808\": \"SQ\",\r\n \"39048\": \"JG\",\r\n \"39049\": \"XJ\",\r\n \"39052\": \"HG\",\r\n \"39076\": \"CZ\",\r\n \"39271\": \"XT\",\r\n \"39534\": \"TD\",\r\n \"39552\": \"TD\",\r\n \"39584\": \"PB\",\r\n \"39647\": \"SB\",\r\n \"39730\": \"LG\",\r\n \"39748\": \"TPB\",\r\n \"40109\": \"ZQ\",\r\n \"40479\": \"ND\",\r\n \"40516\": \"HG\",\r\n \"40536\": \"HG\",\r\n \"40583\": \"QJ\",\r\n \"40765\": \"YQ\",\r\n \"40784\": \"QJ\",\r\n \"40840\": \"YK\",\r\n \"40863\": \"QJG\"\r\n };\r\n }\r\n\r\n /**\r\n * 获取拼音首字母\r\n * @param {String} str 输入的中文字符串\r\n */\r\n\r\n }, {\r\n key: \"getCamelChars\",\r\n value: function getCamelChars(str) {\r\n if (typeof str != \"string\") throw new Error(-1, \"函数getCamelChars需要字符串类型参数!\");\r\n var chars = new Array(); //保存中间结果的数组\r\n for (var i = 0, len = str.length; i < len; i++) {\r\n //获得unicode码\r\n var ch = str.charAt(i);\r\n //检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理\r\n chars.push(this._getChar(ch));\r\n }\r\n //处理arrResult,返回所有可能的拼音首字母串数组\r\n var result = this._getResult(chars);\r\n\r\n this.options.charCase === 1 ? result = result.toLowerCase() : this.options.charCase === 2 ? result = result.toUpperCase() : {};\r\n return result;\r\n }\r\n\r\n /**\r\n * 获取拼音\r\n * @param {String} str 输入的中文字符串\r\n */\r\n\r\n }, {\r\n key: \"getFullChars\",\r\n value: function getFullChars(str) {\r\n var len = str.length;\r\n var result = \"\";\r\n var reg = new RegExp('[a-zA-Z0-9\\- ]');\r\n for (var i = 0; i < len; i++) {\r\n var ch = str.substr(i, 1);\r\n var unicode = ch.charCodeAt(0);\r\n //如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数\r\n if (unicode > 40869 || unicode < 19968) {\r\n result += ch;\r\n } else {\r\n var name = this._getFullChar(ch);\r\n if (name !== false) {\r\n result += name;\r\n }\r\n }\r\n }\r\n\r\n this.options.charCase === 1 ? result = result.toLowerCase() : this.options.charCase === 2 ? result = result.toUpperCase() : {};\r\n return result;\r\n }\r\n }, {\r\n key: \"_getFullChar\",\r\n value: function _getFullChar(ch) {\r\n for (var key in this.full_dict) {\r\n if (this.full_dict[key].indexOf(ch) != -1) {\r\n return this._capitalize(key);\r\n break;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * 首字母大写\r\n */\r\n\r\n }, {\r\n key: \"_capitalize\",\r\n value: function _capitalize(str) {\r\n if (str.length > 0) {\r\n var first = str.substr(0, 1).toUpperCase();\r\n var spare = str.substr(1, str.length);\r\n return first + spare;\r\n }\r\n }\r\n }, {\r\n key: \"_getChar\",\r\n value: function _getChar(ch) {\r\n var unicode = ch.charCodeAt(0);\r\n //如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数\r\n if (unicode > 40869 || unicode < 19968) return ch; //dealWithOthers(ch);\r\n //检查是否是多音字,是按多音字处理,不是就直接在strChineseFirstPY字符串中找对应的首字母\r\n if (!this.options.checkPolyphone) return this.char_dict.charAt(unicode - 19968);\r\n return this.polyphone[unicode] ? this.polyphone[unicode] : this.char_dict.charAt(unicode - 19968);\r\n }\r\n }, {\r\n key: \"_getResult\",\r\n value: function _getResult(chars) {\r\n if (!this.options.checkPolyphone) return chars.join('');\r\n var result = [''];\r\n for (var i = 0, len = chars.length; i < len; i++) {\r\n var str = chars[i];\r\n var strLen = str.length;\r\n if (strLen == 1) {\r\n for (var j = 0; j < result.length; j++) {\r\n result[j] += str;\r\n }\r\n } else {\r\n var swap1 = result.slice(0);\r\n result = [];\r\n for (var _j = 0; _j < strLen; _j++) {\r\n //复制一个相同的arrResult\r\n var swap2 = swap1.slice(0);\r\n //把当前字符str[k]添加到每个元素末尾\r\n for (var k = 0; k < swap2.length; k++) {\r\n swap2[k] += str.charAt(_j);\r\n }\r\n //把复制并修改后的数组连接到arrResult上\r\n result = result.concat(swap2);\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n }]);\r\n\r\n return Pinyin;\r\n}();\r\n\r\nmodule.exports = Pinyin;", "/**\r\n * @fileOverview 导出默认的实例\r\n * @author waterchestnut 2017/3/13\r\n * @module\r\n */\r\n'use strict';\r\n\r\nlet pinyin = new (require('./dist/pinyin'))({charCase:0});\r\n/*pinyin.setOptions({checkPolyphone: true, charCase: 0});\r\nconsole.log(pinyin.getFullChars('管理员'))\r\nconsole.log(pinyin.getCamelChars('管理员'))\r\nconsole.log(pinyin.getCamelChars('1234'))\r\nconsole.log(pinyin.getCamelChars('english'))\r\nconsole.log(pinyin.getCamelChars('昕'))\r\nconsole.log(pinyin.getCamelChars('佛'))\r\nconsole.log(pinyin.getFullChars('佛'))\r\nconsole.log(pinyin.getFullChars('凃一二'))\r\nconsole.log(pinyin.getCamelChars('凃一二'))*/\r\nmodule.exports = pinyin;"], - "mappings": ";;;;;AAAA;AAAA;AAAA;AAcA,QAAI,eAAe,2BAAY;AAAE,eAAS,iBAAiB,QAAQ,OAAO;AAAE,iBAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AAAE,cAAI,aAAa,MAAM,CAAC;AAAG,qBAAW,aAAa,WAAW,cAAc;AAAO,qBAAW,eAAe;AAAM,cAAI,WAAW;AAAY,uBAAW,WAAW;AAAM,iBAAO,eAAe,QAAQ,WAAW,KAAK,UAAU;AAAA,QAAG;AAAA,MAAE;AAAE,aAAO,SAAU,aAAa,YAAY,aAAa;AAAE,YAAI;AAAY,2BAAiB,YAAY,WAAW,UAAU;AAAG,YAAI;AAAa,2BAAiB,aAAa,WAA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AAK,KAAK;AAC9C,gBAAI,MAAM,MAAM,CAAC;AACjB,gBAAI,SAAS,IAAI;AACjB,gBAAI,UAAU,GAAG;AACb,uBAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACpC,uBAAO,CAAC,KAAK;AAAA,cACjB;AAAA,YACJ,OAAO;AACH,kBAAI,QAAQ,OAAO,MAAM,CAAC;AAC1B,uBAAS,CAAC;AACV,uBAAS,KAAK,GAAG,KAAK,QAAQ,MAAM;AAEhC,oBAAI,QAAQ,MAAM,MAAM,CAAC;AAEzB,yBAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,wBAAM,CAAC,KAAK,IAAI,OAAO,EAAE;AAAA,gBAC7B;AAEA,yBAAS,OAAO,OAAO,KAAK;AAAA,cAChC;AAAA,YACJ;AAAA,UACJ;AACA,iBAAO;AAAA,QACX;AAAA,MACJ,CAAC,CAAC;AAEF,aAAOA;AAAA,IACX,EAAE;AAEF,WAAO,UAAU;AAAA;AAAA;;;ACr7BjB;AAAA;AAOA,QAAI,SAAS,IAAK,mBAA0B,EAAC,UAAS,EAAC,CAAC;AAWxD,WAAO,UAAU;AAAA;AAAA;", - "names": ["Pinyin"] -} diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js b/jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js deleted file mode 100644 index d8bceff2..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js +++ /dev/null @@ -1,5497 +0,0 @@ -import { - __commonJS -} from "./chunk-TDUMLE5V.js"; - -// ../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/lodash/lodash.js -var require_lodash = __commonJS({ - "../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/lodash/lodash.js"(exports, module) { - (function() { - var undefined; - var VERSION = "4.17.21"; - var LARGE_ARRAY_SIZE = 200; - var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - var MAX_MEMOIZE_SIZE = 500; - var PLACEHOLDER = "__lodash_placeholder__"; - var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; - var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; - var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; - var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "..."; - var HOT_COUNT = 800, HOT_SPAN = 16; - var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; - var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0; - var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - var wrapFlags = [ - ["ary", WRAP_ARY_FLAG], - ["bind", WRAP_BIND_FLAG], - ["bindKey", WRAP_BIND_KEY_FLAG], - ["curry", WRAP_CURRY_FLAG], - ["curryRight", WRAP_CURRY_RIGHT_FLAG], - ["flip", WRAP_FLIP_FLAG], - ["partial", WRAP_PARTIAL_FLAG], - ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], - ["rearg", WRAP_REARG_FLAG] - ]; - var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]"; - var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; - var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); - var reTrimStart = /^\s+/; - var reWhitespace = /\s/; - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; - var reEscapeChar = /\\(\\)?/g; - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - var reFlags = /\w*$/; - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - var reIsBinary = /^0b[01]+$/i; - var reIsHostCtor = /^\[object .+?Constructor\]$/; - var reIsOctal = /^0o[0-7]+$/i; - var reIsUint = /^(?:0|[1-9]\d*)$/; - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; - var reNoMatch = /($^)/; - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; - var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; - var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d"; - var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; - var reApos = RegExp(rsApos, "g"); - var reComboMark = RegExp(rsCombo, "g"); - var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); - var reUnicodeWord = RegExp([ - rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", - rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")", - rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower, - rsUpper + "+" + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join("|"), "g"); - var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; - var contextProps = [ - "Array", - "Buffer", - "DataView", - "Date", - "Error", - "Float32Array", - "Float64Array", - "Function", - "Int8Array", - "Int16Array", - "Int32Array", - "Map", - "Math", - "Object", - "Promise", - "RegExp", - "Set", - "String", - "Symbol", - "TypeError", - "Uint8Array", - "Uint8ClampedArray", - "Uint16Array", - "Uint32Array", - "WeakMap", - "_", - "clearTimeout", - "isFinite", - "parseInt", - "setTimeout" - ]; - var templateCounter = -1; - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; - var deburredLetters = { - // Latin-1 Supplement block. - "À": "A", - "Á": "A", - "Â": "A", - "Ã": "A", - "Ä": "A", - "Å": "A", - "à": "a", - "á": "a", - "â": "a", - "ã": "a", - "ä": "a", - "å": "a", - "Ç": "C", - "ç": "c", - "Ð": "D", - "ð": "d", - "È": "E", - "É": "E", - "Ê": "E", - "Ë": "E", - "è": "e", - "é": "e", - "ê": "e", - "ë": "e", - "Ì": "I", - "Í": "I", - "Î": "I", - "Ï": "I", - "ì": "i", - "í": "i", - "î": "i", - "ï": "i", - "Ñ": "N", - "ñ": "n", - "Ò": "O", - "Ó": "O", - "Ô": "O", - "Õ": "O", - "Ö": "O", - "Ø": "O", - "ò": "o", - "ó": "o", - "ô": "o", - "õ": "o", - "ö": "o", - "ø": "o", - "Ù": "U", - "Ú": "U", - "Û": "U", - "Ü": "U", - "ù": "u", - "ú": "u", - "û": "u", - "ü": "u", - "Ý": "Y", - "ý": "y", - "ÿ": "y", - "Æ": "Ae", - "æ": "ae", - "Þ": "Th", - "þ": "th", - "ß": "ss", - // Latin Extended-A block. - "Ā": "A", - "Ă": "A", - "Ą": "A", - "ā": "a", - "ă": "a", - "ą": "a", - "Ć": "C", - "Ĉ": "C", - "Ċ": "C", - "Č": "C", - "ć": "c", - "ĉ": "c", - "ċ": "c", - "č": "c", - "Ď": "D", - "Đ": "D", - "ď": "d", - "đ": "d", - "Ē": "E", - "Ĕ": "E", - "Ė": "E", - "Ę": "E", - "Ě": "E", - "ē": "e", - "ĕ": "e", - "ė": "e", - "ę": "e", - "ě": "e", - "Ĝ": "G", - "Ğ": "G", - "Ġ": "G", - "Ģ": "G", - "ĝ": "g", - "ğ": "g", - "ġ": "g", - "ģ": "g", - "Ĥ": "H", - "Ħ": "H", - "ĥ": "h", - "ħ": "h", - "Ĩ": "I", - "Ī": "I", - "Ĭ": "I", - "Į": "I", - "İ": "I", - "ĩ": "i", - "ī": "i", - "ĭ": "i", - "į": "i", - "ı": "i", - "Ĵ": "J", - "ĵ": "j", - "Ķ": "K", - "ķ": "k", - "ĸ": "k", - "Ĺ": "L", - "Ļ": "L", - "Ľ": "L", - "Ŀ": "L", - "Ł": "L", - "ĺ": "l", - "ļ": "l", - "ľ": "l", - "ŀ": "l", - "ł": "l", - "Ń": "N", - "Ņ": "N", - "Ň": "N", - "Ŋ": "N", - "ń": "n", - "ņ": "n", - "ň": "n", - "ŋ": "n", - "Ō": "O", - "Ŏ": "O", - "Ő": "O", - "ō": "o", - "ŏ": "o", - "ő": "o", - "Ŕ": "R", - "Ŗ": "R", - "Ř": "R", - "ŕ": "r", - "ŗ": "r", - "ř": "r", - "Ś": "S", - "Ŝ": "S", - "Ş": "S", - "Š": "S", - "ś": "s", - "ŝ": "s", - "ş": "s", - "š": "s", - "Ţ": "T", - "Ť": "T", - "Ŧ": "T", - "ţ": "t", - "ť": "t", - "ŧ": "t", - "Ũ": "U", - "Ū": "U", - "Ŭ": "U", - "Ů": "U", - "Ű": "U", - "Ų": "U", - "ũ": "u", - "ū": "u", - "ŭ": "u", - "ů": "u", - "ű": "u", - "ų": "u", - "Ŵ": "W", - "ŵ": "w", - "Ŷ": "Y", - "ŷ": "y", - "Ÿ": "Y", - "Ź": "Z", - "Ż": "Z", - "Ž": "Z", - "ź": "z", - "ż": "z", - "ž": "z", - "IJ": "IJ", - "ij": "ij", - "Œ": "Oe", - "œ": "oe", - "ʼn": "'n", - "ſ": "s" - }; - var htmlEscapes = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'" - }; - var htmlUnescapes = { - "&": "&", - "<": "<", - ">": ">", - """: '"', - "'": "'" - }; - var stringEscapes = { - "\\": "\\", - "'": "'", - "\n": "n", - "\r": "r", - "\u2028": "u2028", - "\u2029": "u2029" - }; - var freeParseFloat = parseFloat, freeParseInt = parseInt; - var freeGlobal = typeof global == "object" && global && global.Object === Object && global; - var freeSelf = typeof self == "object" && self && self.Object === Object && self; - var root = freeGlobal || freeSelf || Function("return this")(); - var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports; - var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module; - var moduleExports = freeModule && freeModule.exports === freeExports; - var freeProcess = moduleExports && freeGlobal.process; - var nodeUtil = function() { - try { - var types = freeModule && freeModule.require && freeModule.require("util").types; - if (types) { - return types; - } - return freeProcess && freeProcess.binding && freeProcess.binding("util"); - } catch (e) { - } - }(); - var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - function apply(func, thisArg, args) { - switch (args.length) { - case 0: - return func.call(thisArg); - case 1: - return func.call(thisArg, args[0]); - case 2: - return func.call(thisArg, args[0], args[1]); - case 3: - return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); - } - function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); - } - return accumulator; - } - function arrayEach(array, iteratee) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; - } - function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; - } - } - return array; - } - function arrayEvery(array, predicate) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; - } - function arrayFilter(array, predicate) { - var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; - } - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } - function arrayIncludesWith(array, value, comparator) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; - } - function arrayMap(array, iteratee) { - var index = -1, length = array == null ? 0 : array.length, result = Array(length); - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - function arrayPush(array, values) { - var index = -1, length = values.length, offset = array.length; - while (++index < length) { - array[offset + index] = values[index]; - } - return array; - } - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; - } - function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; - } - function arraySome(array, predicate) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; - } - var asciiSize = baseProperty("length"); - function asciiToArray(string) { - return string.split(""); - } - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } - function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection2) { - if (predicate(value, key, collection2)) { - result = key; - return false; - } - }); - return result; - } - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, index = fromIndex + (fromRight ? 1 : -1); - while (fromRight ? index-- : ++index < length) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - function baseIndexOf(array, value, fromIndex) { - return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); - } - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, length = array.length; - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; - } - function baseIsNaN(value) { - return value !== value; - } - function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? baseSum(array, iteratee) / length : NAN; - } - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection2) { - accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2); - }); - return accumulator; - } - function baseSortBy(array, comparer) { - var length = array.length; - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; - } - function baseSum(array, iteratee) { - var result, index = -1, length = array.length; - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : result + current; - } - } - return result; - } - function baseTimes(n, iteratee) { - var index = -1, result = Array(n); - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); - } - function baseTrim(string) { - return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; - } - function baseUnary(func) { - return function(value) { - return func(value); - }; - } - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); - } - function cacheHas(cache, key) { - return cache.has(key); - } - function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, length = strSymbols.length; - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { - } - return index; - } - function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { - } - return index; - } - function countHolders(array, placeholder) { - var length = array.length, result = 0; - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; - } - var deburrLetter = basePropertyOf(deburredLetters); - var escapeHtmlChar = basePropertyOf(htmlEscapes); - function escapeStringChar(chr) { - return "\\" + stringEscapes[chr]; - } - function getValue(object, key) { - return object == null ? undefined : object[key]; - } - function hasUnicode(string) { - return reHasUnicode.test(string); - } - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); - } - function iteratorToArray(iterator) { - var data, result = []; - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; - } - function mapToArray(map) { - var index = -1, result = Array(map.size); - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; - } - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - function replaceHolders(array, placeholder) { - var index = -1, length = array.length, resIndex = 0, result = []; - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; - } - function setToArray(set) { - var index = -1, result = Array(set.size); - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } - function setToPairs(set) { - var index = -1, result = Array(set.size); - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; - } - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, length = array.length; - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; - } - } - return index; - } - function stringSize(string) { - return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); - } - function stringToArray(string) { - return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); - } - function trimmedEndIndex(string) { - var index = string.length; - while (index-- && reWhitespace.test(string.charAt(index))) { - } - return index; - } - var unescapeHtmlChar = basePropertyOf(htmlUnescapes); - function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; - } - function unicodeToArray(string) { - return string.match(reUnicode) || []; - } - function unicodeWords(string) { - return string.match(reUnicodeWord) || []; - } - var runInContext = function runInContext2(context) { - context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); - var Array2 = context.Array, Date = context.Date, Error = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError; - var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype; - var coreJsData = context["__core-js_shared__"]; - var funcToString = funcProto.toString; - var hasOwnProperty = objectProto.hasOwnProperty; - var idCounter = 0; - var maskSrcKey = function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); - return uid ? "Symbol(src)_1." + uid : ""; - }(); - var nativeObjectToString = objectProto.toString; - var objectCtorString = funcToString.call(Object2); - var oldDash = root._; - var reIsNative = RegExp2( - "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" - ); - var Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined; - var defineProperty = function() { - try { - var func = getNative(Object2, "defineProperty"); - func({}, "", {}); - return func; - } catch (e) { - } - }(); - var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; - var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse; - var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create"); - var metaMap = WeakMap && new WeakMap(); - var realNames = {}; - var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); - var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, "__wrapped__")) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); - } - var baseCreate = /* @__PURE__ */ function() { - function object() { - } - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result2 = new object(); - object.prototype = undefined; - return result2; - }; - }(); - function baseLodash() { - } - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; - } - lodash.templateSettings = { - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - "escape": reEscape, - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - "evaluate": reEvaluate, - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - "interpolate": reInterpolate, - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type {string} - */ - "variable": "", - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type {Object} - */ - "imports": { - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type {Function} - */ - "_": lodash - } - }; - lodash.prototype = baseLodash.prototype; - lodash.prototype.constructor = lodash; - LodashWrapper.prototype = baseCreate(baseLodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; - } - function lazyClone() { - var result2 = new LazyWrapper(this.__wrapped__); - result2.__actions__ = copyArray(this.__actions__); - result2.__dir__ = this.__dir__; - result2.__filtered__ = this.__filtered__; - result2.__iteratees__ = copyArray(this.__iteratees__); - result2.__takeCount__ = this.__takeCount__; - result2.__views__ = copyArray(this.__views__); - return result2; - } - function lazyReverse() { - if (this.__filtered__) { - var result2 = new LazyWrapper(this); - result2.__dir__ = -1; - result2.__filtered__ = true; - } else { - result2 = this.clone(); - result2.__dir__ *= -1; - } - return result2; - } - function lazyValue() { - var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); - if (!isArr || !isRight && arrLength == length && takeCount == length) { - return baseWrapperValue(array, this.__actions__); - } - var result2 = []; - outer: - while (length-- && resIndex < takeCount) { - index += dir; - var iterIndex = -1, value = array[index]; - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value); - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result2[resIndex++] = value; - } - return result2; - } - LazyWrapper.prototype = baseCreate(baseLodash.prototype); - LazyWrapper.prototype.constructor = LazyWrapper; - function Hash(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; - } - function hashDelete(key) { - var result2 = this.has(key) && delete this.__data__[key]; - this.size -= result2 ? 1 : 0; - return result2; - } - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result2 = data[key]; - return result2 === HASH_UNDEFINED ? undefined : result2; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); - } - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } - Hash.prototype.clear = hashClear; - Hash.prototype["delete"] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - function ListCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } - function listCacheDelete(key) { - var data = this.__data__, index = assocIndexOf(data, key); - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; - } - function listCacheGet(key) { - var data = this.__data__, index = assocIndexOf(data, key); - return index < 0 ? undefined : data[index][1]; - } - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - function listCacheSet(key, value) { - var data = this.__data__, index = assocIndexOf(data, key); - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } - ListCache.prototype.clear = listCacheClear; - ListCache.prototype["delete"] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - function MapCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - function mapCacheClear() { - this.size = 0; - this.__data__ = { - "hash": new Hash(), - "map": new (Map || ListCache)(), - "string": new Hash() - }; - } - function mapCacheDelete(key) { - var result2 = getMapData(this, key)["delete"](key); - this.size -= result2 ? 1 : 0; - return result2; - } - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } - function mapCacheSet(key, value) { - var data = getMapData(this, key), size2 = data.size; - data.set(key, value); - this.size += data.size == size2 ? 0 : 1; - return this; - } - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype["delete"] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - function SetCache(values2) { - var index = -1, length = values2 == null ? 0 : values2.length; - this.__data__ = new MapCache(); - while (++index < length) { - this.add(values2[index]); - } - } - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; - } - function setCacheHas(value) { - return this.__data__.has(value); - } - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; - } - function stackClear() { - this.__data__ = new ListCache(); - this.size = 0; - } - function stackDelete(key) { - var data = this.__data__, result2 = data["delete"](key); - this.size = data.size; - return result2; - } - function stackGet(key) { - return this.__data__.get(key); - } - function stackHas(key) { - return this.__data__.has(key); - } - function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; - } - Stack.prototype.clear = stackClear; - Stack.prototype["delete"] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String) : [], length = result2.length; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. - (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. - isIndex(key, length)))) { - result2.push(key); - } - } - return result2; - } - function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; - } - function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); - } - function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); - } - function assignMergeValue(object, key, value) { - if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) { - baseAssignValue(object, key, value); - } - } - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) { - baseAssignValue(object, key, value); - } - } - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } - function baseAggregator(collection, setter, iteratee2, accumulator) { - baseEach(collection, function(value, key, collection2) { - setter(accumulator, value, iteratee2(value), collection2); - }); - return accumulator; - } - function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); - } - function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); - } - function baseAssignValue(object, key, value) { - if (key == "__proto__" && defineProperty) { - defineProperty(object, key, { - "configurable": true, - "enumerable": true, - "value": value, - "writable": true - }); - } else { - object[key] = value; - } - } - function baseAt(object, paths) { - var index = -1, length = paths.length, result2 = Array2(length), skip = object == null; - while (++index < length) { - result2[index] = skip ? undefined : get(object, paths[index]); - } - return result2; - } - function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; - } - } - return number; - } - function baseClone(value, bitmask, customizer, key, object, stack) { - var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; - if (customizer) { - result2 = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result2 !== undefined) { - return result2; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result2 = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result2); - } - } else { - var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || isFunc && !object) { - result2 = isFlat || isFunc ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result2 = initCloneByTag(value, tag, isDeep); - } - } - stack || (stack = new Stack()); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result2); - if (isSet(value)) { - value.forEach(function(subValue) { - result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key2) { - result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); - }); - } - var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key2) { - if (props) { - key2 = subValue; - subValue = value[key2]; - } - assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); - }); - return result2; - } - function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; - } - function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object2(object); - while (length--) { - var key = props[length], predicate = source[key], value = object[key]; - if (value === undefined && !(key in object) || !predicate(value)) { - return false; - } - } - return true; - } - function baseDelay(func, wait, args) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { - func.apply(undefined, args); - }, wait); - } - function baseDifference(array, values2, iteratee2, comparator) { - var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length; - if (!length) { - return result2; - } - if (iteratee2) { - values2 = arrayMap(values2, baseUnary(iteratee2)); - } - if (comparator) { - includes2 = arrayIncludesWith; - isCommon = false; - } else if (values2.length >= LARGE_ARRAY_SIZE) { - includes2 = cacheHas; - isCommon = false; - values2 = new SetCache(values2); - } - outer: - while (++index < length) { - var value = array[index], computed = iteratee2 == null ? value : iteratee2(value); - value = comparator || value !== 0 ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values2[valuesIndex] === computed) { - continue outer; - } - } - result2.push(value); - } else if (!includes2(values2, computed, comparator)) { - result2.push(value); - } - } - return result2; - } - var baseEach = createBaseEach(baseForOwn); - var baseEachRight = createBaseEach(baseForOwnRight, true); - function baseEvery(collection, predicate) { - var result2 = true; - baseEach(collection, function(value, index, collection2) { - result2 = !!predicate(value, index, collection2); - return result2; - }); - return result2; - } - function baseExtremum(array, iteratee2, comparator) { - var index = -1, length = array.length; - while (++index < length) { - var value = array[index], current = iteratee2(value); - if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) { - var computed = current, result2 = value; - } - } - return result2; - } - function baseFill(array, value, start, end) { - var length = array.length; - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : length + start; - } - end = end === undefined || end > length ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; - } - return array; - } - function baseFilter(collection, predicate) { - var result2 = []; - baseEach(collection, function(value, index, collection2) { - if (predicate(value, index, collection2)) { - result2.push(value); - } - }); - return result2; - } - function baseFlatten(array, depth, predicate, isStrict, result2) { - var index = -1, length = array.length; - predicate || (predicate = isFlattenable); - result2 || (result2 = []); - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - baseFlatten(value, depth - 1, predicate, isStrict, result2); - } else { - arrayPush(result2, value); - } - } else if (!isStrict) { - result2[result2.length] = value; - } - } - return result2; - } - var baseFor = createBaseFor(); - var baseForRight = createBaseFor(true); - function baseForOwn(object, iteratee2) { - return object && baseFor(object, iteratee2, keys); - } - function baseForOwnRight(object, iteratee2) { - return object && baseForRight(object, iteratee2, keys); - } - function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); - } - function baseGet(object, path) { - path = castPath(path, object); - var index = 0, length = path.length; - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return index && index == length ? object : undefined; - } - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result2 = keysFunc(object); - return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object)); - } - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value); - } - function baseGt(value, other) { - return value > other; - } - function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); - } - function baseHasIn(object, key) { - return object != null && key in Object2(object); - } - function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); - } - function baseIntersection(arrays, iteratee2, comparator) { - var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = []; - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee2) { - array = arrayMap(array, baseUnary(iteratee2)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined; - } - array = arrays[0]; - var index = -1, seen = caches[0]; - outer: - while (++index < length && result2.length < maxLength) { - var value = array[index], computed = iteratee2 ? iteratee2(value) : value; - value = comparator || value !== 0 ? value : 0; - if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result2.push(value); - } - } - return result2; - } - function baseInverter(object, setter, iteratee2, accumulator) { - baseForOwn(object, function(value, key, object2) { - setter(accumulator, iteratee2(value), key, object2); - }); - return accumulator; - } - function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); - } - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } - function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; - } - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); - } - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack()); - return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; - stack || (stack = new Stack()); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack()); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); - } - function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; - } - function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, length = index, noCustomizer = !customizer; - if (object == null) { - return !length; - } - object = Object2(object); - while (index--) { - var data = matchData[index]; - if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], objValue = object[key], srcValue = data[1]; - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack(); - if (customizer) { - var result2 = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result2 === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) { - return false; - } - } - } - return true; - } - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } - function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; - } - function baseIsTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; - } - function baseIteratee(value) { - if (typeof value == "function") { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == "object") { - return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); - } - return property(value); - } - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result2 = []; - for (var key in Object2(object)) { - if (hasOwnProperty.call(object, key) && key != "constructor") { - result2.push(key); - } - } - return result2; - } - function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), result2 = []; - for (var key in object) { - if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { - result2.push(key); - } - } - return result2; - } - function baseLt(value, other) { - return value < other; - } - function baseMap(collection, iteratee2) { - var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : []; - baseEach(collection, function(value, key, collection2) { - result2[++index] = iteratee2(value, key, collection2); - }); - return result2; - } - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; - } - function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; - } - function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack()); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } else { - var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined; - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); - } - function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined; - var isCommon = newValue === undefined; - if (isCommon) { - var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } else { - newValue = []; - } - } else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } else { - isCommon = false; - } - } - if (isCommon) { - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack["delete"](srcValue); - } - assignMergeValue(object, key, newValue); - } - function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; - } - function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee2) { - if (isArray(iteratee2)) { - return function(value) { - return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2); - }; - } - return iteratee2; - }); - } else { - iteratees = [identity]; - } - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - var result2 = baseMap(collection, function(value, key, collection2) { - var criteria = arrayMap(iteratees, function(iteratee2) { - return iteratee2(value); - }); - return { "criteria": criteria, "index": ++index, "value": value }; - }); - return baseSortBy(result2, function(object, other) { - return compareMultiple(object, other, orders); - }); - } - function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); - } - function basePickBy(object, paths, predicate) { - var index = -1, length = paths.length, result2 = {}; - while (++index < length) { - var path = paths[index], value = baseGet(object, path); - if (predicate(value, path)) { - baseSet(result2, castPath(path, object), value); - } - } - return result2; - } - function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; - } - function basePullAll(array, values2, iteratee2, comparator) { - var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array; - if (array === values2) { - values2 = copyArray(values2); - } - if (iteratee2) { - seen = arrayMap(array, baseUnary(iteratee2)); - } - while (++index < length) { - var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value; - while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; - } - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, lastIndex = length - 1; - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } - } - return array; - } - function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); - } - function baseRange(start, end, step, fromRight) { - var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length); - while (length--) { - result2[fromRight ? length : ++index] = start; - start += step; - } - return result2; - } - function baseRepeat(string, n) { - var result2 = ""; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result2; - } - do { - if (n % 2) { - result2 += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - return result2; - } - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ""); - } - function baseSample(collection) { - return arraySample(values(collection)); - } - function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); - } - function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - var index = -1, length = path.length, lastIndex = length - 1, nested = object; - while (nested != null && ++index < length) { - var key = toKey(path[index]), newValue = value; - if (key === "__proto__" || key === "constructor" || key === "prototype") { - return object; - } - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; - } - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; - var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, "toString", { - "configurable": true, - "enumerable": false, - "value": constant(string), - "writable": true - }); - }; - function baseShuffle(collection) { - return shuffleSelf(values(collection)); - } - function baseSlice(array, start, end) { - var index = -1, length = array.length; - if (start < 0) { - start = -start > length ? 0 : length + start; - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : end - start >>> 0; - start >>>= 0; - var result2 = Array2(length); - while (++index < length) { - result2[index] = array[index + start]; - } - return result2; - } - function baseSome(collection, predicate) { - var result2; - baseEach(collection, function(value, index, collection2) { - result2 = predicate(value, index, collection2); - return !result2; - }); - return !!result2; - } - function baseSortedIndex(array, value, retHighest) { - var low = 0, high = array == null ? low : array.length; - if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = low + high >>> 1, computed = array[mid]; - if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy(array, value, identity, retHighest); - } - function baseSortedIndexBy(array, value, iteratee2, retHighest) { - var low = 0, high = array == null ? 0 : array.length; - if (high === 0) { - return 0; - } - value = iteratee2(value); - var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; - while (low < high) { - var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed); - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? computed <= value : computed < value; - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); - } - function baseSortedUniq(array, iteratee2) { - var index = -1, length = array.length, resIndex = 0, result2 = []; - while (++index < length) { - var value = array[index], computed = iteratee2 ? iteratee2(value) : value; - if (!index || !eq(computed, seen)) { - var seen = computed; - result2[resIndex++] = value === 0 ? 0 : value; - } - } - return result2; - } - function baseToNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; - } - function baseToString(value) { - if (typeof value == "string") { - return value; - } - if (isArray(value)) { - return arrayMap(value, baseToString) + ""; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ""; - } - var result2 = value + ""; - return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; - } - function baseUniq(array, iteratee2, comparator) { - var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2; - if (comparator) { - isCommon = false; - includes2 = arrayIncludesWith; - } else if (length >= LARGE_ARRAY_SIZE) { - var set2 = iteratee2 ? null : createSet(array); - if (set2) { - return setToArray(set2); - } - isCommon = false; - includes2 = cacheHas; - seen = new SetCache(); - } else { - seen = iteratee2 ? [] : result2; - } - outer: - while (++index < length) { - var value = array[index], computed = iteratee2 ? iteratee2(value) : value; - value = comparator || value !== 0 ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee2) { - seen.push(computed); - } - result2.push(value); - } else if (!includes2(seen, computed, comparator)) { - if (seen !== result2) { - seen.push(computed); - } - result2.push(value); - } - } - return result2; - } - function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; - } - function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); - } - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, index = fromRight ? length : -1; - while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) { - } - return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); - } - function baseWrapperValue(value, actions) { - var result2 = value; - if (result2 instanceof LazyWrapper) { - result2 = result2.value(); - } - return arrayReduce(actions, function(result3, action) { - return action.func.apply(action.thisArg, arrayPush([result3], action.args)); - }, result2); - } - function baseXor(arrays, iteratee2, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, result2 = Array2(length); - while (++index < length) { - var array = arrays[index], othIndex = -1; - while (++othIndex < length) { - if (othIndex != index) { - result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator); - } - } - } - return baseUniq(baseFlatten(result2, 1), iteratee2, comparator); - } - function baseZipObject(props, values2, assignFunc) { - var index = -1, length = props.length, valsLength = values2.length, result2 = {}; - while (++index < length) { - var value = index < valsLength ? values2[index] : undefined; - assignFunc(result2, props[index], value); - } - return result2; - } - function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; - } - function castFunction(value) { - return typeof value == "function" ? value : identity; - } - function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); - } - var castRest = baseRest; - function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return !start && end >= length ? array : baseSlice(array, start, end); - } - var clearTimeout = ctxClearTimeout || function(id) { - return root.clearTimeout(id); - }; - function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - buffer.copy(result2); - return result2; - } - function cloneArrayBuffer(arrayBuffer) { - var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result2).set(new Uint8Array(arrayBuffer)); - return result2; - } - function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); - } - function cloneRegExp(regexp) { - var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result2.lastIndex = regexp.lastIndex; - return result2; - } - function cloneSymbol(symbol) { - return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {}; - } - function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); - } - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); - var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); - if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { - return 1; - } - if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { - return -1; - } - } - return 0; - } - function compareMultiple(object, other, orders) { - var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; - while (++index < length) { - var result2 = compareAscending(objCriteria[index], othCriteria[index]); - if (result2) { - if (index >= ordersLength) { - return result2; - } - var order = orders[index]; - return result2 * (order == "desc" ? -1 : 1); - } - } - return object.index - other.index; - } - function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried; - while (++leftIndex < leftLength) { - result2[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result2[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result2[leftIndex++] = args[argsIndex++]; - } - return result2; - } - function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried; - while (++argsIndex < rangeLength) { - result2[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result2[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result2[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result2; - } - function copyArray(source, array) { - var index = -1, length = source.length; - array || (array = Array2(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; - } - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - var index = -1, length = props.length; - while (++index < length) { - var key = props[index]; - var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; - } - function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); - } - function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); - } - function createAggregator(setter, initializer) { - return function(collection, iteratee2) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; - return func(collection, setter, getIteratee(iteratee2, 2), accumulator); - }; - } - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined; - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object2(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); - } - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee2) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee2); - } - var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection); - while (fromRight ? index-- : ++index < length) { - if (iteratee2(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; - } - function createBaseFor(fromRight) { - return function(object, iteratee2, keysFunc) { - var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length; - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee2(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; - } - function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); - function wrapper() { - var fn = this && this !== root && this instanceof wrapper ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; - } - function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; - var chr = strSymbols ? strSymbols[0] : string.charAt(0); - var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1); - return chr[methodName]() + trailing; - }; - } - function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, "")), callback, ""); - }; - } - function createCtor(Ctor) { - return function() { - var args = arguments; - switch (args.length) { - case 0: - return new Ctor(); - case 1: - return new Ctor(args[0]); - case 2: - return new Ctor(args[0], args[1]); - case 3: - return new Ctor(args[0], args[1], args[2]); - case 4: - return new Ctor(args[0], args[1], args[2], args[3]); - case 5: - return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: - return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: - return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args); - return isObject(result2) ? result2 : thisBinding; - }; - } - function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - function wrapper() { - var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper); - while (index--) { - args[index] = arguments[index]; - } - var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder); - length -= holders.length; - if (length < arity) { - return createRecurry( - func, - bitmask, - createHybrid, - wrapper.placeholder, - undefined, - args, - holders, - undefined, - undefined, - arity - length - ); - } - var fn = this && this !== root && this instanceof wrapper ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; - } - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object2(collection); - if (!isArrayLike(collection)) { - var iteratee2 = getIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { - return iteratee2(iterable[key], key, iterable); - }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined; - }; - } - function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == "wrapper") { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined; - if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); - } - } - return function() { - var args = arguments, value = args[0]; - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value; - while (++index2 < length) { - result2 = funcs[index2].call(this, result2); - } - return result2; - }; - }); - } - function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func); - function wrapper() { - var length = arguments.length, args = Array2(length), index = length; - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, - bitmask, - createHybrid, - wrapper.placeholder, - thisArg, - args, - newHolders, - argPos, - ary2, - arity - length - ); - } - var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary2 < length) { - args.length = ary2; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; - } - function createInverter(setter, toIteratee) { - return function(object, iteratee2) { - return baseInverter(object, setter, toIteratee(iteratee2), {}); - }; - } - function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result2; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result2 = value; - } - if (other !== undefined) { - if (result2 === undefined) { - return other; - } - if (typeof value == "string" || typeof other == "string") { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result2 = operator(value, other); - } - return result2; - }; - } - function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee2) { - return apply(iteratee2, thisArg, args); - }); - }); - }); - } - function createPadding(length, chars) { - chars = chars === undefined ? " " : baseToString(chars); - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length); - } - function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); - function wrapper() { - var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func; - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; - } - function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != "number" && isIterateeCall(start, end, step)) { - end = step = undefined; - } - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? start < end ? 1 : -1 : toFinite(step); - return baseRange(start, end, step, fromRight); - }; - } - function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == "string" && typeof other == "string")) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; - } - function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; - bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, - bitmask, - thisArg, - newPartials, - newHolders, - newPartialsRight, - newHoldersRight, - argPos, - ary2, - arity - ]; - var result2 = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result2, newData); - } - result2.placeholder = placeholder; - return setWrapToString(result2, func, bitmask); - } - function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision && nativeIsFinite(number)) { - var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision)); - pair = (toString(value) + "e").split("e"); - return +(pair[0] + "e" + (+pair[1] - precision)); - } - return func(number); - }; - } - var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) { - return new Set(values2); - }; - function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); - } - return baseToPairs(object, keysFunc(object)); - }; - } - function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary2 = ary2 === undefined ? ary2 : nativeMax(toInteger(ary2), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, holdersRight = holders; - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - var newData = [ - func, - bitmask, - thisArg, - partials, - holders, - partialsRight, - holdersRight, - argPos, - ary2, - arity - ]; - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0); - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result2 = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result2 = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result2 = createPartial(func, bitmask, thisArg, partials); - } else { - result2 = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result2, newData), func, bitmask); - } - function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { - return srcValue; - } - return objValue; - } - function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack["delete"](srcValue); - } - return objValue; - } - function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; - } - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined; - stack.set(array, other); - stack.set(other, array); - while (++index < arrLength) { - var arrValue = array[index], othValue = other[index]; - if (customizer) { - var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result2 = false; - break; - } - if (seen) { - if (!arraySome(other, function(othValue2, othIndex) { - if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result2 = false; - break; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - result2 = false; - break; - } - } - stack["delete"](array); - stack["delete"](other); - return result2; - } - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { - return false; - } - object = object.buffer; - other = other.buffer; - case arrayBufferTag: - if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - case boolTag: - case dateTag: - case numberTag: - return eq(+object, +other); - case errorTag: - return object.name == other.name && object.message == other.message; - case regexpTag: - case stringTag: - return object == other + ""; - case mapTag: - var convert = mapToArray; - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - if (object.size != other.size && !isPartial) { - return false; - } - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - stack.set(object, other); - var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack["delete"](object); - return result2; - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; - } - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result2 = true; - stack.set(object, other); - stack.set(other, object); - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], othValue = other[key]; - if (customizer) { - var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); - } - if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { - result2 = false; - break; - } - skipCtor || (skipCtor = key == "constructor"); - } - if (result2 && !skipCtor) { - var objCtor = object.constructor, othCtor = other.constructor; - if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { - result2 = false; - } - } - stack["delete"](object); - stack["delete"](other); - return result2; - } - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ""); - } - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); - } - function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); - } - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; - function getFuncName(func) { - var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0; - while (length--) { - var data = array[length], otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result2; - } - function getHolder(func) { - var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func; - return object.placeholder; - } - function getIteratee() { - var result2 = lodash.iteratee || iteratee; - result2 = result2 === iteratee ? baseIteratee : result2; - return arguments.length ? result2(arguments[0], arguments[1]) : result2; - } - function getMapData(map2, key) { - var data = map2.__data__; - return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; - } - function getMatchData(object) { - var result2 = keys(object), length = result2.length; - while (length--) { - var key = result2[length], value = object[key]; - result2[length] = [key, value, isStrictComparable(value)]; - } - return result2; - } - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) { - } - var result2 = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result2; - } - var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object2(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); - }; - var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result2 = []; - while (object) { - arrayPush(result2, getSymbols(object)); - object = getPrototype(object); - } - return result2; - }; - var getTag = baseGetTag; - if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { - getTag = function(value) { - var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ""; - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: - return dataViewTag; - case mapCtorString: - return mapTag; - case promiseCtorString: - return promiseTag; - case setCtorString: - return setTag; - case weakMapCtorString: - return weakMapTag; - } - } - return result2; - }; - } - function getView(start, end, transforms) { - var index = -1, length = transforms.length; - while (++index < length) { - var data = transforms[index], size2 = data.size; - switch (data.type) { - case "drop": - start += size2; - break; - case "dropRight": - end -= size2; - break; - case "take": - end = nativeMin(end, start + size2); - break; - case "takeRight": - start = nativeMax(start, end - size2); - break; - } - } - return { "start": start, "end": end }; - } - function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; - } - function hasPath(object, path, hasFunc) { - path = castPath(path, object); - var index = -1, length = path.length, result2 = false; - while (++index < length) { - var key = toKey(path[index]); - if (!(result2 = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result2 || ++index != length) { - return result2; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); - } - function initCloneArray(array) { - var length = array.length, result2 = new array.constructor(length); - if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { - result2.index = array.index; - result2.input = array.input; - } - return result2; - } - function initCloneObject(object) { - return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; - } - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - case boolTag: - case dateTag: - return new Ctor(+object); - case dataViewTag: - return cloneDataView(object, isDeep); - case float32Tag: - case float64Tag: - case int8Tag: - case int16Tag: - case int32Tag: - case uint8Tag: - case uint8ClampedTag: - case uint16Tag: - case uint32Tag: - return cloneTypedArray(object, isDeep); - case mapTag: - return new Ctor(); - case numberTag: - case stringTag: - return new Ctor(object); - case regexpTag: - return cloneRegExp(object); - case setTag: - return new Ctor(); - case symbolTag: - return cloneSymbol(object); - } - } - function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; - details = details.join(length > 2 ? ", " : " "); - return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); - } - function isFlattenable(value) { - return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); - } - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); - } - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { - return eq(object[index], value); - } - return false; - } - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object); - } - function isKeyable(value) { - var type = typeof value; - return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; - } - function isLaziable(func) { - var funcName = getFuncName(func), other = lodash[funcName]; - if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; - } - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } - var isMaskable = coreJsData ? isFunction : stubFalse; - function isPrototype(value) { - var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; - return value === proto; - } - function isStrictComparable(value) { - return value === value && !isObject(value); - } - function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && (srcValue !== undefined || key in Object2(object)); - }; - } - function memoizeCapped(func) { - var result2 = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - var cache = result2.cache; - return result2; - } - function mergeData(data, source) { - var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG; - if (!(isCommon || isCombo)) { - return data; - } - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - value = source[7]; - if (value) { - data[7] = value; - } - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - if (data[9] == null) { - data[9] = source[9]; - } - data[0] = source[0]; - data[1] = newBitmask; - return data; - } - function nativeKeysIn(object) { - var result2 = []; - if (object != null) { - for (var key in Object2(object)) { - result2.push(key); - } - } - return result2; - } - function objectToString(value) { - return nativeObjectToString.call(value); - } - function overRest(func, start, transform2) { - start = nativeMax(start === undefined ? func.length - 1 : start, 0); - return function() { - var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length); - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array2(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform2(array); - return apply(func, this, otherArgs); - }; - } - function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); - } - function reorder(array, indexes) { - var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; - } - function safeGet(object, key) { - if (key === "constructor" && typeof object[key] === "function") { - return; - } - if (key == "__proto__") { - return; - } - return object[key]; - } - var setData = shortOut(baseSetData); - var setTimeout = ctxSetTimeout || function(func, wait) { - return root.setTimeout(func, wait); - }; - var setToString = shortOut(baseSetToString); - function setWrapToString(wrapper, reference, bitmask) { - var source = reference + ""; - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); - } - function shortOut(func) { - var count = 0, lastCalled = 0; - return function() { - var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; - } - function shuffleSelf(array, size2) { - var index = -1, length = array.length, lastIndex = length - 1; - size2 = size2 === undefined ? length : size2; - while (++index < size2) { - var rand = baseRandom(index, lastIndex), value = array[rand]; - array[rand] = array[index]; - array[index] = value; - } - array.length = size2; - return array; - } - var stringToPath = memoizeCapped(function(string) { - var result2 = []; - if (string.charCodeAt(0) === 46) { - result2.push(""); - } - string.replace(rePropName, function(match, number, quote, subString) { - result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); - }); - return result2; - }); - function toKey(value) { - if (typeof value == "string" || isSymbol(value)) { - return value; - } - var result2 = value + ""; - return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; - } - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) { - } - try { - return func + ""; - } catch (e) { - } - } - return ""; - } - function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = "_." + pair[0]; - if (bitmask & pair[1] && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); - } - function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result2.__actions__ = copyArray(wrapper.__actions__); - result2.__index__ = wrapper.__index__; - result2.__values__ = wrapper.__values__; - return result2; - } - function chunk(array, size2, guard) { - if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined) { - size2 = 1; - } else { - size2 = nativeMax(toInteger(size2), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size2 < 1) { - return []; - } - var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2)); - while (index < length) { - result2[resIndex++] = baseSlice(array, index, index += size2); - } - return result2; - } - function compact(array) { - var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = []; - while (++index < length) { - var value = array[index]; - if (value) { - result2[resIndex++] = value; - } - } - return result2; - } - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array2(length - 1), array = arguments[0], index = length; - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); - } - var difference = baseRest(function(array, values2) { - return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : []; - }); - var differenceBy = baseRest(function(array, values2) { - var iteratee2 = last(values2); - if (isArrayLikeObject(iteratee2)) { - iteratee2 = undefined; - } - return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : []; - }); - var differenceWith = baseRest(function(array, values2) { - var comparator = last(values2); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined, comparator) : []; - }); - function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = guard || n === undefined ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); - } - function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = guard || n === undefined ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); - } - function dropRightWhile(array, predicate) { - return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; - } - function dropWhile(array, predicate) { - return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; - } - function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != "number" && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); - } - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, getIteratee(predicate, 3), index); - } - function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return baseFindIndex(array, getIteratee(predicate, 3), index, true); - } - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } - function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); - } - function fromPairs(pairs) { - var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {}; - while (++index < length) { - var pair = pairs[index]; - result2[pair[0]] = pair[1]; - } - return result2; - } - function head(array) { - return array && array.length ? array[0] : undefined; - } - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); - } - function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; - } - var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; - }); - var intersectionBy = baseRest(function(arrays) { - var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); - if (iteratee2 === last(mapped)) { - iteratee2 = undefined; - } else { - mapped.pop(); - } - return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : []; - }); - var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); - comparator = typeof comparator == "function" ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined, comparator) : []; - }); - function join(array, separator) { - return array == null ? "" : nativeJoin.call(array, separator); - } - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; - } - function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); - } - return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true); - } - function nth(array, n) { - return array && array.length ? baseNth(array, toInteger(n)) : undefined; - } - var pull = baseRest(pullAll); - function pullAll(array, values2) { - return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array; - } - function pullAllBy(array, values2, iteratee2) { - return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array; - } - function pullAllWith(array, values2, comparator) { - return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined, comparator) : array; - } - var pullAt = flatRest(function(array, indexes) { - var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes); - basePullAt(array, arrayMap(indexes, function(index) { - return isIndex(index, length) ? +index : index; - }).sort(compareAscending)); - return result2; - }); - function remove(array, predicate) { - var result2 = []; - if (!(array && array.length)) { - return result2; - } - var index = -1, indexes = [], length = array.length; - predicate = getIteratee(predicate, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result2.push(value); - indexes.push(index); - } - } - basePullAt(array, indexes); - return result2; - } - function reverse(array) { - return array == null ? array : nativeReverse.call(array); - } - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (end && typeof end != "number" && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - } - return baseSlice(array, start, end); - } - function sortedIndex(array, value) { - return baseSortedIndex(array, value); - } - function sortedIndexBy(array, value, iteratee2) { - return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2)); - } - function sortedIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value); - if (index < length && eq(array[index], value)) { - return index; - } - } - return -1; - } - function sortedLastIndex(array, value) { - return baseSortedIndex(array, value, true); - } - function sortedLastIndexBy(array, value, iteratee2) { - return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true); - } - function sortedLastIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value, true) - 1; - if (eq(array[index], value)) { - return index; - } - } - return -1; - } - function sortedUniq(array) { - return array && array.length ? baseSortedUniq(array) : []; - } - function sortedUniqBy(array, iteratee2) { - return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : []; - } - function tail(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 1, length) : []; - } - function take(array, n, guard) { - if (!(array && array.length)) { - return []; - } - n = guard || n === undefined ? 1 : toInteger(n); - return baseSlice(array, 0, n < 0 ? 0 : n); - } - function takeRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = guard || n === undefined ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, n < 0 ? 0 : n, length); - } - function takeRightWhile(array, predicate) { - return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; - } - function takeWhile(array, predicate) { - return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; - } - var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); - }); - var unionBy = baseRest(function(arrays) { - var iteratee2 = last(arrays); - if (isArrayLikeObject(iteratee2)) { - iteratee2 = undefined; - } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)); - }); - var unionWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == "function" ? comparator : undefined; - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); - }); - function uniq(array) { - return array && array.length ? baseUniq(array) : []; - } - function uniqBy(array, iteratee2) { - return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : []; - } - function uniqWith(array, comparator) { - comparator = typeof comparator == "function" ? comparator : undefined; - return array && array.length ? baseUniq(array, undefined, comparator) : []; - } - function unzip(array) { - if (!(array && array.length)) { - return []; - } - var length = 0; - array = arrayFilter(array, function(group) { - if (isArrayLikeObject(group)) { - length = nativeMax(group.length, length); - return true; - } - }); - return baseTimes(length, function(index) { - return arrayMap(array, baseProperty(index)); - }); - } - function unzipWith(array, iteratee2) { - if (!(array && array.length)) { - return []; - } - var result2 = unzip(array); - if (iteratee2 == null) { - return result2; - } - return arrayMap(result2, function(group) { - return apply(iteratee2, undefined, group); - }); - } - var without = baseRest(function(array, values2) { - return isArrayLikeObject(array) ? baseDifference(array, values2) : []; - }); - var xor = baseRest(function(arrays) { - return baseXor(arrayFilter(arrays, isArrayLikeObject)); - }); - var xorBy = baseRest(function(arrays) { - var iteratee2 = last(arrays); - if (isArrayLikeObject(iteratee2)) { - iteratee2 = undefined; - } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2)); - }); - var xorWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == "function" ? comparator : undefined; - return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); - }); - var zip = baseRest(unzip); - function zipObject(props, values2) { - return baseZipObject(props || [], values2 || [], assignValue); - } - function zipObjectDeep(props, values2) { - return baseZipObject(props || [], values2 || [], baseSet); - } - var zipWith = baseRest(function(arrays) { - var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined; - iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined; - return unzipWith(arrays, iteratee2); - }); - function chain(value) { - var result2 = lodash(value); - result2.__chain__ = true; - return result2; - } - function tap(value, interceptor) { - interceptor(value); - return value; - } - function thru(value, interceptor) { - return interceptor(value); - } - var wrapperAt = flatRest(function(paths) { - var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) { - return baseAt(object, paths); - }; - if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) { - return this.thru(interceptor); - } - value = value.slice(start, +start + (length ? 1 : 0)); - value.__actions__.push({ - "func": thru, - "args": [interceptor], - "thisArg": undefined - }); - return new LodashWrapper(value, this.__chain__).thru(function(array) { - if (length && !array.length) { - array.push(undefined); - } - return array; - }); - }); - function wrapperChain() { - return chain(this); - } - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); - } - function wrapperNext() { - if (this.__values__ === undefined) { - this.__values__ = toArray(this.value()); - } - var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++]; - return { "done": done, "value": value }; - } - function wrapperToIterator() { - return this; - } - function wrapperPlant(value) { - var result2, parent2 = this; - while (parent2 instanceof baseLodash) { - var clone2 = wrapperClone(parent2); - clone2.__index__ = 0; - clone2.__values__ = undefined; - if (result2) { - previous.__wrapped__ = clone2; - } else { - result2 = clone2; - } - var previous = clone2; - parent2 = parent2.__wrapped__; - } - previous.__wrapped__ = value; - return result2; - } - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - var wrapped = value; - if (this.__actions__.length) { - wrapped = new LazyWrapper(this); - } - wrapped = wrapped.reverse(); - wrapped.__actions__.push({ - "func": thru, - "args": [reverse], - "thisArg": undefined - }); - return new LodashWrapper(wrapped, this.__chain__); - } - return this.thru(reverse); - } - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - var countBy = createAggregator(function(result2, value, key) { - if (hasOwnProperty.call(result2, key)) { - ++result2[key]; - } else { - baseAssignValue(result2, key, 1); - } - }); - function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } - function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, getIteratee(predicate, 3)); - } - var find = createFind(findIndex); - var findLast = createFind(findLastIndex); - function flatMap(collection, iteratee2) { - return baseFlatten(map(collection, iteratee2), 1); - } - function flatMapDeep(collection, iteratee2) { - return baseFlatten(map(collection, iteratee2), INFINITY); - } - function flatMapDepth(collection, iteratee2, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee2), depth); - } - function forEach(collection, iteratee2) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, getIteratee(iteratee2, 3)); - } - function forEachRight(collection, iteratee2) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, getIteratee(iteratee2, 3)); - } - var groupBy = createAggregator(function(result2, value, key) { - if (hasOwnProperty.call(result2, key)) { - result2[key].push(value); - } else { - baseAssignValue(result2, key, [value]); - } - }); - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; - } - var invokeMap = baseRest(function(collection, path, args) { - var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : []; - baseEach(collection, function(value) { - result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result2; - }); - var keyBy = createAggregator(function(result2, value, key) { - baseAssignValue(result2, key, value); - }); - function map(collection, iteratee2) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, getIteratee(iteratee2, 3)); - } - function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - orders = guard ? undefined : orders; - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseOrderBy(collection, iteratees, orders); - } - var partition = createAggregator(function(result2, value, key) { - result2[key ? 0 : 1].push(value); - }, function() { - return [[], []]; - }); - function reduce(collection, iteratee2, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; - return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach); - } - function reduceRight(collection, iteratee2, accumulator) { - var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; - return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight); - } - function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(getIteratee(predicate, 3))); - } - function sample(collection) { - var func = isArray(collection) ? arraySample : baseSample; - return func(collection); - } - function sampleSize(collection, n, guard) { - if (guard ? isIterateeCall(collection, n, guard) : n === undefined) { - n = 1; - } else { - n = toInteger(n); - } - var func = isArray(collection) ? arraySampleSize : baseSampleSize; - return func(collection, n); - } - function shuffle(collection) { - var func = isArray(collection) ? arrayShuffle : baseShuffle; - return func(collection); - } - function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; - } - function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } - var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); - }); - var now = ctxNow || function() { - return root.Date.now(); - }; - function after(n, func) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - function ary(func, n, guard) { - n = guard ? undefined : n; - n = func && n == null ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); - } - function before(n, func) { - var result2; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result2 = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result2; - }; - } - var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); - }); - var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); - }); - function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result2.placeholder = curry.placeholder; - return result2; - } - function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result2.placeholder = curryRight.placeholder; - return result2; - } - function debounce(func, wait, options) { - var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = "maxWait" in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = "trailing" in options ? !!options.trailing : trailing; - } - function invokeFunc(time) { - var args = lastArgs, thisArg = lastThis; - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result2 = func.apply(thisArg, args); - return result2; - } - function leadingEdge(time) { - lastInvokeTime = time; - timerId = setTimeout(timerExpired, wait); - return leading ? invokeFunc(time) : result2; - } - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; - return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; - } - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; - return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; - } - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - timerId = setTimeout(timerExpired, remainingWait(time)); - } - function trailingEdge(time) { - timerId = undefined; - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result2; - } - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - function flush() { - return timerId === undefined ? result2 : trailingEdge(now()); - } - function debounced() { - var time = now(), isInvoking = shouldInvoke(time); - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result2; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; - } - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); - function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); - } - function memoize(func, resolver) { - if (typeof func != "function" || resolver != null && typeof resolver != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; - if (cache.has(key)) { - return cache.get(key); - } - var result2 = func.apply(this, args); - memoized.cache = cache.set(key, result2) || cache; - return result2; - }; - memoized.cache = new (memoize.Cache || MapCache)(); - return memoized; - } - memoize.Cache = MapCache; - function negate(predicate) { - if (typeof predicate != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: - return !predicate.call(this); - case 1: - return !predicate.call(this, args[0]); - case 2: - return !predicate.call(this, args[0], args[1]); - case 3: - return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; - } - function once(func) { - return before(2, func); - } - var overArgs = castRest(function(func, transforms) { - transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); - var funcsLength = transforms.length; - return baseRest(function(args) { - var index = -1, length = nativeMin(args.length, funcsLength); - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); - } - return apply(func, this, args); - }); - }); - var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); - }); - var partialRight = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); - }); - var rearg = flatRest(function(func, indexes) { - return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); - }); - function rest(func, start) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start === undefined ? start : toInteger(start); - return baseRest(func, start); - } - function spread(func, start) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start == null ? 0 : nativeMax(toInteger(start), 0); - return baseRest(function(args) { - var array = args[start], otherArgs = castSlice(args, 0, start); - if (array) { - arrayPush(otherArgs, array); - } - return apply(func, this, otherArgs); - }); - } - function throttle(func, wait, options) { - var leading = true, trailing = true; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (isObject(options)) { - leading = "leading" in options ? !!options.leading : leading; - trailing = "trailing" in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { - "leading": leading, - "maxWait": wait, - "trailing": trailing - }); - } - function unary(func) { - return ary(func, 1); - } - function wrap(value, wrapper) { - return partial(castFunction(wrapper), value); - } - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; - } - function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); - } - function cloneWith(value, customizer) { - customizer = typeof customizer == "function" ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); - } - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); - } - function cloneDeepWith(value, customizer) { - customizer = typeof customizer == "function" ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); - } - function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); - } - function eq(value, other) { - return value === other || value !== value && other !== other; - } - var gt = createRelationalOperation(baseGt); - var gte = createRelationalOperation(function(value, other) { - return value >= other; - }); - var isArguments = baseIsArguments(/* @__PURE__ */ function() { - return arguments; - }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); - }; - var isArray = Array2.isArray; - var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); - } - function isBoolean(value) { - return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; - } - var isBuffer = nativeIsBuffer || stubFalse; - var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; - function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); - } - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; - } - function isEqual(value, other) { - return baseIsEqual(value, other); - } - function isEqualWith(value, other, customizer) { - customizer = typeof customizer == "function" ? customizer : undefined; - var result2 = customizer ? customizer(value, other) : undefined; - return result2 === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result2; - } - function isError(value) { - if (!isObjectLike(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value); - } - function isFinite(value) { - return typeof value == "number" && nativeIsFinite(value); - } - function isFunction(value) { - if (!isObject(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - function isInteger(value) { - return typeof value == "number" && value == toInteger(value); - } - function isLength(value) { - return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - function isObject(value) { - var type = typeof value; - return value != null && (type == "object" || type == "function"); - } - function isObjectLike(value) { - return value != null && typeof value == "object"; - } - var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); - } - function isMatchWith(object, source, customizer) { - customizer = typeof customizer == "function" ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); - } - function isNaN(value) { - return isNumber(value) && value != +value; - } - function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); - } - function isNull(value) { - return value === null; - } - function isNil(value) { - return value == null; - } - function isNumber(value) { - return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; - } - function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; - } - var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; - } - var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - function isString(value) { - return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; - } - function isSymbol(value) { - return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; - } - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - function isUndefined(value) { - return value === undefined; - } - function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; - } - function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; - } - var lt = createRelationalOperation(baseLt); - var lte = createRelationalOperation(function(value, other) { - return value <= other; - }); - function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray(value[symIterator]()); - } - var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; - return func(value); - } - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - function toInteger(value) { - var result2 = toFinite(value), remainder = result2 % 1; - return result2 === result2 ? remainder ? result2 - remainder : result2 : 0; - } - function toLength(value) { - return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; - } - function toNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == "function" ? value.valueOf() : value; - value = isObject(other) ? other + "" : other; - } - if (typeof value != "string") { - return value === 0 ? value : +value; - } - value = baseTrim(value); - var isBinary = reIsBinary.test(value); - return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; - } - function toPlainObject(value) { - return copyObject(value, keysIn(value)); - } - function toSafeInteger(value) { - return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0; - } - function toString(value) { - return value == null ? "" : baseToString(value); - } - var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } - }); - var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); - }); - var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); - }); - var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); - }); - var at = flatRest(baseAt); - function create(prototype, properties) { - var result2 = baseCreate(prototype); - return properties == null ? result2 : baseAssign(result2, properties); - } - var defaults = baseRest(function(object, sources) { - object = Object2(object); - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { - object[key] = source[key]; - } - } - } - return object; - }); - var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); - }); - function findKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); - } - function findLastKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); - } - function forIn(object, iteratee2) { - return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn); - } - function forInRight(object, iteratee2) { - return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn); - } - function forOwn(object, iteratee2) { - return object && baseForOwn(object, getIteratee(iteratee2, 3)); - } - function forOwnRight(object, iteratee2) { - return object && baseForOwnRight(object, getIteratee(iteratee2, 3)); - } - function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); - } - function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); - } - function get(object, path, defaultValue) { - var result2 = object == null ? undefined : baseGet(object, path); - return result2 === undefined ? defaultValue : result2; - } - function has(object, path) { - return object != null && hasPath(object, path, baseHas); - } - function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); - } - var invert = createInverter(function(result2, value, key) { - if (value != null && typeof value.toString != "function") { - value = nativeObjectToString.call(value); - } - result2[value] = key; - }, constant(identity)); - var invertBy = createInverter(function(result2, value, key) { - if (value != null && typeof value.toString != "function") { - value = nativeObjectToString.call(value); - } - if (hasOwnProperty.call(result2, value)) { - result2[value].push(key); - } else { - result2[value] = [key]; - } - }, getIteratee); - var invoke = baseRest(baseInvoke); - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); - } - function mapKeys(object, iteratee2) { - var result2 = {}; - iteratee2 = getIteratee(iteratee2, 3); - baseForOwn(object, function(value, key, object2) { - baseAssignValue(result2, iteratee2(value, key, object2), value); - }); - return result2; - } - function mapValues(object, iteratee2) { - var result2 = {}; - iteratee2 = getIteratee(iteratee2, 3); - baseForOwn(object, function(value, key, object2) { - baseAssignValue(result2, key, iteratee2(value, key, object2)); - }); - return result2; - } - var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); - }); - var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); - }); - var omit = flatRest(function(object, paths) { - var result2 = {}; - if (object == null) { - return result2; - } - var isDeep = false; - paths = arrayMap(paths, function(path) { - path = castPath(path, object); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject(object, getAllKeysIn(object), result2); - if (isDeep) { - result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); - } - var length = paths.length; - while (length--) { - baseUnset(result2, paths[length]); - } - return result2; - }); - function omitBy(object, predicate) { - return pickBy(object, negate(getIteratee(predicate))); - } - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); - function pickBy(object, predicate) { - if (object == null) { - return {}; - } - var props = arrayMap(getAllKeysIn(object), function(prop) { - return [prop]; - }); - predicate = getIteratee(predicate); - return basePickBy(object, props, function(value, path) { - return predicate(value, path[0]); - }); - } - function result(object, path, defaultValue) { - path = castPath(path, object); - var index = -1, length = path.length; - if (!length) { - length = 1; - object = undefined; - } - while (++index < length) { - var value = object == null ? undefined : object[toKey(path[index])]; - if (value === undefined) { - index = length; - value = defaultValue; - } - object = isFunction(value) ? value.call(object) : value; - } - return object; - } - function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); - } - function setWith(object, path, value, customizer) { - customizer = typeof customizer == "function" ? customizer : undefined; - return object == null ? object : baseSet(object, path, value, customizer); - } - var toPairs = createToPairs(keys); - var toPairsIn = createToPairs(keysIn); - function transform(object, iteratee2, accumulator) { - var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); - iteratee2 = getIteratee(iteratee2, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor() : []; - } else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) { - return iteratee2(accumulator, value, index, object2); - }); - return accumulator; - } - function unset(object, path) { - return object == null ? true : baseUnset(object, path); - } - function update(object, path, updater) { - return object == null ? object : baseUpdate(object, path, castFunction(updater)); - } - function updateWith(object, path, updater, customizer) { - customizer = typeof customizer == "function" ? customizer : undefined; - return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); - } - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); - } - function valuesIn(object) { - return object == null ? [] : baseValues(object, keysIn(object)); - } - function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp(toNumber(number), lower, upper); - } - function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - number = toNumber(number); - return baseInRange(number, start, end); - } - function random(lower, upper, floating) { - if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) { - upper = floating = undefined; - } - if (floating === undefined) { - if (typeof upper == "boolean") { - floating = upper; - upper = undefined; - } else if (typeof lower == "boolean") { - floating = lower; - lower = undefined; - } - } - if (lower === undefined && upper === undefined) { - lower = 0; - upper = 1; - } else { - lower = toFinite(lower); - if (upper === undefined) { - upper = lower; - lower = 0; - } else { - upper = toFinite(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom(); - return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper); - } - return baseRandom(lower, upper); - } - var camelCase = createCompounder(function(result2, word, index) { - word = word.toLowerCase(); - return result2 + (index ? capitalize(word) : word); - }); - function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); - } - function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); - } - function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - var length = string.length; - position = position === undefined ? length : baseClamp(toInteger(position), 0, length); - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; - } - function escape(string) { - string = toString(string); - return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; - } - function escapeRegExp(string) { - string = toString(string); - return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; - } - var kebabCase = createCompounder(function(result2, word, index) { - return result2 + (index ? "-" : "") + word.toLowerCase(); - }); - var lowerCase = createCompounder(function(result2, word, index) { - return result2 + (index ? " " : "") + word.toLowerCase(); - }); - var lowerFirst = createCaseFirst("toLowerCase"); - function pad(string, length, chars) { - string = toString(string); - length = toInteger(length); - var strLength = length ? stringSize(string) : 0; - if (!length || strLength >= length) { - return string; - } - var mid = (length - strLength) / 2; - return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); - } - function padEnd(string, length, chars) { - string = toString(string); - length = toInteger(length); - var strLength = length ? stringSize(string) : 0; - return length && strLength < length ? string + createPadding(length - strLength, chars) : string; - } - function padStart(string, length, chars) { - string = toString(string); - length = toInteger(length); - var strLength = length ? stringSize(string) : 0; - return length && strLength < length ? createPadding(length - strLength, chars) + string : string; - } - function parseInt2(string, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0); - } - function repeat(string, n, guard) { - if (guard ? isIterateeCall(string, n, guard) : n === undefined) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); - } - function replace() { - var args = arguments, string = toString(args[0]); - return args.length < 3 ? string : string.replace(args[1], args[2]); - } - var snakeCase = createCompounder(function(result2, word, index) { - return result2 + (index ? "_" : "") + word.toLowerCase(); - }); - function split(string, separator, limit) { - if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) { - separator = limit = undefined; - } - limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; - if (!limit) { - return []; - } - string = toString(string); - if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) { - separator = baseToString(separator); - if (!separator && hasUnicode(string)) { - return castSlice(stringToArray(string), 0, limit); - } - } - return string.split(separator, limit); - } - var startCase = createCompounder(function(result2, word, index) { - return result2 + (index ? " " : "") + upperFirst(word); - }); - function startsWith(string, target, position) { - string = toString(string); - position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); - target = baseToString(target); - return string.slice(position, position + target.length) == target; - } - function template(string, options, guard) { - var settings = lodash.templateSettings; - if (guard && isIterateeCall(string, options, guard)) { - options = undefined; - } - string = toString(string); - options = assignInWith({}, options, settings, customDefaultsAssignIn); - var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys); - var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '"; - var reDelimiters = RegExp2( - (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", - "g" - ); - var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n"; - string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { - interpolateValue || (interpolateValue = esTemplateValue); - source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); - if (escapeValue) { - isEscaping = true; - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - var variable = hasOwnProperty.call(options, "variable") && options.variable; - if (!variable) { - source = "with (obj) {\n" + source + "\n}\n"; - } else if (reForbiddenIdentifierChars.test(variable)) { - throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); - } - source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"); - source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}"; - var result2 = attempt(function() { - return Function2(importsKeys, sourceURL + "return " + source).apply(undefined, importsValues); - }); - result2.source = source; - if (isError(result2)) { - throw result2; - } - return result2; - } - function toLower(value) { - return toString(value).toLowerCase(); - } - function toUpper(value) { - return toString(value).toUpperCase(); - } - function trim(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return baseTrim(string); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; - return castSlice(strSymbols, start, end).join(""); - } - function trimEnd(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.slice(0, trimmedEndIndex(string) + 1); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; - return castSlice(strSymbols, 0, end).join(""); - } - function trimStart(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.replace(reTrimStart, ""); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars)); - return castSlice(strSymbols, start).join(""); - } - function truncate(string, options) { - var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; - if (isObject(options)) { - var separator = "separator" in options ? options.separator : separator; - length = "length" in options ? toInteger(options.length) : length; - omission = "omission" in options ? baseToString(options.omission) : omission; - } - string = toString(string); - var strLength = string.length; - if (hasUnicode(string)) { - var strSymbols = stringToArray(string); - strLength = strSymbols.length; - } - if (length >= strLength) { - return string; - } - var end = length - stringSize(omission); - if (end < 1) { - return omission; - } - var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); - if (separator === undefined) { - return result2 + omission; - } - if (strSymbols) { - end += result2.length - end; - } - if (isRegExp(separator)) { - if (string.slice(end).search(separator)) { - var match, substring = result2; - if (!separator.global) { - separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g"); - } - separator.lastIndex = 0; - while (match = separator.exec(substring)) { - var newEnd = match.index; - } - result2 = result2.slice(0, newEnd === undefined ? end : newEnd); - } - } else if (string.indexOf(baseToString(separator), end) != end) { - var index = result2.lastIndexOf(separator); - if (index > -1) { - result2 = result2.slice(0, index); - } - } - return result2 + omission; - } - function unescape(string) { - string = toString(string); - return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; - } - var upperCase = createCompounder(function(result2, word, index) { - return result2 + (index ? " " : "") + word.toUpperCase(); - }); - var upperFirst = createCaseFirst("toUpperCase"); - function words(string, pattern, guard) { - string = toString(string); - pattern = guard ? undefined : pattern; - if (pattern === undefined) { - return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); - } - return string.match(pattern) || []; - } - var attempt = baseRest(function(func, args) { - try { - return apply(func, undefined, args); - } catch (e) { - return isError(e) ? e : new Error(e); - } - }); - var bindAll = flatRest(function(object, methodNames) { - arrayEach(methodNames, function(key) { - key = toKey(key); - baseAssignValue(object, key, bind(object[key], object)); - }); - return object; - }); - function cond(pairs) { - var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); - pairs = !length ? [] : arrayMap(pairs, function(pair) { - if (typeof pair[1] != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - return [toIteratee(pair[0]), pair[1]]; - }); - return baseRest(function(args) { - var index = -1; - while (++index < length) { - var pair = pairs[index]; - if (apply(pair[0], this, args)) { - return apply(pair[1], this, args); - } - } - }); - } - function conforms(source) { - return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); - } - function constant(value) { - return function() { - return value; - }; - } - function defaultTo(value, defaultValue) { - return value == null || value !== value ? defaultValue : value; - } - var flow = createFlow(); - var flowRight = createFlow(true); - function identity(value) { - return value; - } - function iteratee(func) { - return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)); - } - function matches(source) { - return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); - } - function matchesProperty(path, srcValue) { - return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); - } - var method = baseRest(function(path, args) { - return function(object) { - return baseInvoke(object, path, args); - }; - }); - var methodOf = baseRest(function(object, args) { - return function(path) { - return baseInvoke(object, path, args); - }; - }); - function mixin(object, source, options) { - var props = keys(source), methodNames = baseFunctions(source, props); - if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { - options = source; - source = object; - object = this; - methodNames = baseFunctions(source, keys(source)); - } - var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object); - arrayEach(methodNames, function(methodName) { - var func = source[methodName]; - object[methodName] = func; - if (isFunc) { - object.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain2 || chainAll) { - var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__); - actions.push({ "func": func, "args": arguments, "thisArg": object }); - result2.__chain__ = chainAll; - return result2; - } - return func.apply(object, arrayPush([this.value()], arguments)); - }; - } - }); - return object; - } - function noConflict() { - if (root._ === this) { - root._ = oldDash; - } - return this; - } - function noop() { - } - function nthArg(n) { - n = toInteger(n); - return baseRest(function(args) { - return baseNth(args, n); - }); - } - var over = createOver(arrayMap); - var overEvery = createOver(arrayEvery); - var overSome = createOver(arraySome); - function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); - } - function propertyOf(object) { - return function(path) { - return object == null ? undefined : baseGet(object, path); - }; - } - var range = createRange(); - var rangeRight = createRange(true); - function stubArray() { - return []; - } - function stubFalse() { - return false; - } - function stubObject() { - return {}; - } - function stubString() { - return ""; - } - function stubTrue() { - return true; - } - function times(n, iteratee2) { - n = toInteger(n); - if (n < 1 || n > MAX_SAFE_INTEGER) { - return []; - } - var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); - iteratee2 = getIteratee(iteratee2); - n -= MAX_ARRAY_LENGTH; - var result2 = baseTimes(length, iteratee2); - while (++index < n) { - iteratee2(index); - } - return result2; - } - function toPath(value) { - if (isArray(value)) { - return arrayMap(value, toKey); - } - return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); - } - function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; - } - var add = createMathOperation(function(augend, addend) { - return augend + addend; - }, 0); - var ceil = createRound("ceil"); - var divide = createMathOperation(function(dividend, divisor) { - return dividend / divisor; - }, 1); - var floor = createRound("floor"); - function max(array) { - return array && array.length ? baseExtremum(array, identity, baseGt) : undefined; - } - function maxBy(array, iteratee2) { - return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined; - } - function mean(array) { - return baseMean(array, identity); - } - function meanBy(array, iteratee2) { - return baseMean(array, getIteratee(iteratee2, 2)); - } - function min(array) { - return array && array.length ? baseExtremum(array, identity, baseLt) : undefined; - } - function minBy(array, iteratee2) { - return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined; - } - var multiply = createMathOperation(function(multiplier, multiplicand) { - return multiplier * multiplicand; - }, 1); - var round = createRound("round"); - var subtract = createMathOperation(function(minuend, subtrahend) { - return minuend - subtrahend; - }, 0); - function sum(array) { - return array && array.length ? baseSum(array, identity) : 0; - } - function sumBy(array, iteratee2) { - return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0; - } - lodash.after = after; - lodash.ary = ary; - lodash.assign = assign; - lodash.assignIn = assignIn; - lodash.assignInWith = assignInWith; - lodash.assignWith = assignWith; - lodash.at = at; - lodash.before = before; - lodash.bind = bind; - lodash.bindAll = bindAll; - lodash.bindKey = bindKey; - lodash.castArray = castArray; - lodash.chain = chain; - lodash.chunk = chunk; - lodash.compact = compact; - lodash.concat = concat; - lodash.cond = cond; - lodash.conforms = conforms; - lodash.constant = constant; - lodash.countBy = countBy; - lodash.create = create; - lodash.curry = curry; - lodash.curryRight = curryRight; - lodash.debounce = debounce; - lodash.defaults = defaults; - lodash.defaultsDeep = defaultsDeep; - lodash.defer = defer; - lodash.delay = delay; - lodash.difference = difference; - lodash.differenceBy = differenceBy; - lodash.differenceWith = differenceWith; - lodash.drop = drop; - lodash.dropRight = dropRight; - lodash.dropRightWhile = dropRightWhile; - lodash.dropWhile = dropWhile; - lodash.fill = fill; - lodash.filter = filter; - lodash.flatMap = flatMap; - lodash.flatMapDeep = flatMapDeep; - lodash.flatMapDepth = flatMapDepth; - lodash.flatten = flatten; - lodash.flattenDeep = flattenDeep; - lodash.flattenDepth = flattenDepth; - lodash.flip = flip; - lodash.flow = flow; - lodash.flowRight = flowRight; - lodash.fromPairs = fromPairs; - lodash.functions = functions; - lodash.functionsIn = functionsIn; - lodash.groupBy = groupBy; - lodash.initial = initial; - lodash.intersection = intersection; - lodash.intersectionBy = intersectionBy; - lodash.intersectionWith = intersectionWith; - lodash.invert = invert; - lodash.invertBy = invertBy; - lodash.invokeMap = invokeMap; - lodash.iteratee = iteratee; - lodash.keyBy = keyBy; - lodash.keys = keys; - lodash.keysIn = keysIn; - lodash.map = map; - lodash.mapKeys = mapKeys; - lodash.mapValues = mapValues; - lodash.matches = matches; - lodash.matchesProperty = matchesProperty; - lodash.memoize = memoize; - lodash.merge = merge; - lodash.mergeWith = mergeWith; - lodash.method = method; - lodash.methodOf = methodOf; - lodash.mixin = mixin; - lodash.negate = negate; - lodash.nthArg = nthArg; - lodash.omit = omit; - lodash.omitBy = omitBy; - lodash.once = once; - lodash.orderBy = orderBy; - lodash.over = over; - lodash.overArgs = overArgs; - lodash.overEvery = overEvery; - lodash.overSome = overSome; - lodash.partial = partial; - lodash.partialRight = partialRight; - lodash.partition = partition; - lodash.pick = pick; - lodash.pickBy = pickBy; - lodash.property = property; - lodash.propertyOf = propertyOf; - lodash.pull = pull; - lodash.pullAll = pullAll; - lodash.pullAllBy = pullAllBy; - lodash.pullAllWith = pullAllWith; - lodash.pullAt = pullAt; - lodash.range = range; - lodash.rangeRight = rangeRight; - lodash.rearg = rearg; - lodash.reject = reject; - lodash.remove = remove; - lodash.rest = rest; - lodash.reverse = reverse; - lodash.sampleSize = sampleSize; - lodash.set = set; - lodash.setWith = setWith; - lodash.shuffle = shuffle; - lodash.slice = slice; - lodash.sortBy = sortBy; - lodash.sortedUniq = sortedUniq; - lodash.sortedUniqBy = sortedUniqBy; - lodash.split = split; - lodash.spread = spread; - lodash.tail = tail; - lodash.take = take; - lodash.takeRight = takeRight; - lodash.takeRightWhile = takeRightWhile; - lodash.takeWhile = takeWhile; - lodash.tap = tap; - lodash.throttle = throttle; - lodash.thru = thru; - lodash.toArray = toArray; - lodash.toPairs = toPairs; - lodash.toPairsIn = toPairsIn; - lodash.toPath = toPath; - lodash.toPlainObject = toPlainObject; - lodash.transform = transform; - lodash.unary = unary; - lodash.union = union; - lodash.unionBy = unionBy; - lodash.unionWith = unionWith; - lodash.uniq = uniq; - lodash.uniqBy = uniqBy; - lodash.uniqWith = uniqWith; - lodash.unset = unset; - lodash.unzip = unzip; - lodash.unzipWith = unzipWith; - lodash.update = update; - lodash.updateWith = updateWith; - lodash.values = values; - lodash.valuesIn = valuesIn; - lodash.without = without; - lodash.words = words; - lodash.wrap = wrap; - lodash.xor = xor; - lodash.xorBy = xorBy; - lodash.xorWith = xorWith; - lodash.zip = zip; - lodash.zipObject = zipObject; - lodash.zipObjectDeep = zipObjectDeep; - lodash.zipWith = zipWith; - lodash.entries = toPairs; - lodash.entriesIn = toPairsIn; - lodash.extend = assignIn; - lodash.extendWith = assignInWith; - mixin(lodash, lodash); - lodash.add = add; - lodash.attempt = attempt; - lodash.camelCase = camelCase; - lodash.capitalize = capitalize; - lodash.ceil = ceil; - lodash.clamp = clamp; - lodash.clone = clone; - lodash.cloneDeep = cloneDeep; - lodash.cloneDeepWith = cloneDeepWith; - lodash.cloneWith = cloneWith; - lodash.conformsTo = conformsTo; - lodash.deburr = deburr; - lodash.defaultTo = defaultTo; - lodash.divide = divide; - lodash.endsWith = endsWith; - lodash.eq = eq; - lodash.escape = escape; - lodash.escapeRegExp = escapeRegExp; - lodash.every = every; - lodash.find = find; - lodash.findIndex = findIndex; - lodash.findKey = findKey; - lodash.findLast = findLast; - lodash.findLastIndex = findLastIndex; - lodash.findLastKey = findLastKey; - lodash.floor = floor; - lodash.forEach = forEach; - lodash.forEachRight = forEachRight; - lodash.forIn = forIn; - lodash.forInRight = forInRight; - lodash.forOwn = forOwn; - lodash.forOwnRight = forOwnRight; - lodash.get = get; - lodash.gt = gt; - lodash.gte = gte; - lodash.has = has; - lodash.hasIn = hasIn; - lodash.head = head; - lodash.identity = identity; - lodash.includes = includes; - lodash.indexOf = indexOf; - lodash.inRange = inRange; - lodash.invoke = invoke; - lodash.isArguments = isArguments; - lodash.isArray = isArray; - lodash.isArrayBuffer = isArrayBuffer; - lodash.isArrayLike = isArrayLike; - lodash.isArrayLikeObject = isArrayLikeObject; - lodash.isBoolean = isBoolean; - lodash.isBuffer = isBuffer; - lodash.isDate = isDate; - lodash.isElement = isElement; - lodash.isEmpty = isEmpty; - lodash.isEqual = isEqual; - lodash.isEqualWith = isEqualWith; - lodash.isError = isError; - lodash.isFinite = isFinite; - lodash.isFunction = isFunction; - lodash.isInteger = isInteger; - lodash.isLength = isLength; - lodash.isMap = isMap; - lodash.isMatch = isMatch; - lodash.isMatchWith = isMatchWith; - lodash.isNaN = isNaN; - lodash.isNative = isNative; - lodash.isNil = isNil; - lodash.isNull = isNull; - lodash.isNumber = isNumber; - lodash.isObject = isObject; - lodash.isObjectLike = isObjectLike; - lodash.isPlainObject = isPlainObject; - lodash.isRegExp = isRegExp; - lodash.isSafeInteger = isSafeInteger; - lodash.isSet = isSet; - lodash.isString = isString; - lodash.isSymbol = isSymbol; - lodash.isTypedArray = isTypedArray; - lodash.isUndefined = isUndefined; - lodash.isWeakMap = isWeakMap; - lodash.isWeakSet = isWeakSet; - lodash.join = join; - lodash.kebabCase = kebabCase; - lodash.last = last; - lodash.lastIndexOf = lastIndexOf; - lodash.lowerCase = lowerCase; - lodash.lowerFirst = lowerFirst; - lodash.lt = lt; - lodash.lte = lte; - lodash.max = max; - lodash.maxBy = maxBy; - lodash.mean = mean; - lodash.meanBy = meanBy; - lodash.min = min; - lodash.minBy = minBy; - lodash.stubArray = stubArray; - lodash.stubFalse = stubFalse; - lodash.stubObject = stubObject; - lodash.stubString = stubString; - lodash.stubTrue = stubTrue; - lodash.multiply = multiply; - lodash.nth = nth; - lodash.noConflict = noConflict; - lodash.noop = noop; - lodash.now = now; - lodash.pad = pad; - lodash.padEnd = padEnd; - lodash.padStart = padStart; - lodash.parseInt = parseInt2; - lodash.random = random; - lodash.reduce = reduce; - lodash.reduceRight = reduceRight; - lodash.repeat = repeat; - lodash.replace = replace; - lodash.result = result; - lodash.round = round; - lodash.runInContext = runInContext2; - lodash.sample = sample; - lodash.size = size; - lodash.snakeCase = snakeCase; - lodash.some = some; - lodash.sortedIndex = sortedIndex; - lodash.sortedIndexBy = sortedIndexBy; - lodash.sortedIndexOf = sortedIndexOf; - lodash.sortedLastIndex = sortedLastIndex; - lodash.sortedLastIndexBy = sortedLastIndexBy; - lodash.sortedLastIndexOf = sortedLastIndexOf; - lodash.startCase = startCase; - lodash.startsWith = startsWith; - lodash.subtract = subtract; - lodash.sum = sum; - lodash.sumBy = sumBy; - lodash.template = template; - lodash.times = times; - lodash.toFinite = toFinite; - lodash.toInteger = toInteger; - lodash.toLength = toLength; - lodash.toLower = toLower; - lodash.toNumber = toNumber; - lodash.toSafeInteger = toSafeInteger; - lodash.toString = toString; - lodash.toUpper = toUpper; - lodash.trim = trim; - lodash.trimEnd = trimEnd; - lodash.trimStart = trimStart; - lodash.truncate = truncate; - lodash.unescape = unescape; - lodash.uniqueId = uniqueId; - lodash.upperCase = upperCase; - lodash.upperFirst = upperFirst; - lodash.each = forEach; - lodash.eachRight = forEachRight; - lodash.first = head; - mixin(lodash, function() { - var source = {}; - baseForOwn(lodash, function(func, methodName) { - if (!hasOwnProperty.call(lodash.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; - }(), { "chain": false }); - lodash.VERSION = VERSION; - arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) { - lodash[methodName].placeholder = lodash; - }); - arrayEach(["drop", "take"], function(methodName, index) { - LazyWrapper.prototype[methodName] = function(n) { - n = n === undefined ? 1 : nativeMax(toInteger(n), 0); - var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); - if (result2.__filtered__) { - result2.__takeCount__ = nativeMin(n, result2.__takeCount__); - } else { - result2.__views__.push({ - "size": nativeMin(n, MAX_ARRAY_LENGTH), - "type": methodName + (result2.__dir__ < 0 ? "Right" : "") - }); - } - return result2; - }; - LazyWrapper.prototype[methodName + "Right"] = function(n) { - return this.reverse()[methodName](n).reverse(); - }; - }); - arrayEach(["filter", "map", "takeWhile"], function(methodName, index) { - var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; - LazyWrapper.prototype[methodName] = function(iteratee2) { - var result2 = this.clone(); - result2.__iteratees__.push({ - "iteratee": getIteratee(iteratee2, 3), - "type": type - }); - result2.__filtered__ = result2.__filtered__ || isFilter; - return result2; - }; - }); - arrayEach(["head", "last"], function(methodName, index) { - var takeName = "take" + (index ? "Right" : ""); - LazyWrapper.prototype[methodName] = function() { - return this[takeName](1).value()[0]; - }; - }); - arrayEach(["initial", "tail"], function(methodName, index) { - var dropName = "drop" + (index ? "" : "Right"); - LazyWrapper.prototype[methodName] = function() { - return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); - }; - }); - LazyWrapper.prototype.compact = function() { - return this.filter(identity); - }; - LazyWrapper.prototype.find = function(predicate) { - return this.filter(predicate).head(); - }; - LazyWrapper.prototype.findLast = function(predicate) { - return this.reverse().find(predicate); - }; - LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { - if (typeof path == "function") { - return new LazyWrapper(this); - } - return this.map(function(value) { - return baseInvoke(value, path, args); - }); - }); - LazyWrapper.prototype.reject = function(predicate) { - return this.filter(negate(getIteratee(predicate))); - }; - LazyWrapper.prototype.slice = function(start, end) { - start = toInteger(start); - var result2 = this; - if (result2.__filtered__ && (start > 0 || end < 0)) { - return new LazyWrapper(result2); - } - if (start < 0) { - result2 = result2.takeRight(-start); - } else if (start) { - result2 = result2.drop(start); - } - if (end !== undefined) { - end = toInteger(end); - result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start); - } - return result2; - }; - LazyWrapper.prototype.takeRightWhile = function(predicate) { - return this.reverse().takeWhile(predicate).reverse(); - }; - LazyWrapper.prototype.toArray = function() { - return this.take(MAX_ARRAY_LENGTH); - }; - baseForOwn(LazyWrapper.prototype, function(func, methodName) { - var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName); - if (!lodashFunc) { - return; - } - lodash.prototype[methodName] = function() { - var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value); - var interceptor = function(value2) { - var result3 = lodashFunc.apply(lodash, arrayPush([value2], args)); - return isTaker && chainAll ? result3[0] : result3; - }; - if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) { - isLazy = useLazy = false; - } - var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; - if (!retUnwrapped && useLazy) { - value = onlyLazy ? value : new LazyWrapper(this); - var result2 = func.apply(value, args); - result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined }); - return new LodashWrapper(result2, chainAll); - } - if (isUnwrapped && onlyLazy) { - return func.apply(this, args); - } - result2 = this.thru(interceptor); - return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2; - }; - }); - arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) { - var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName); - lodash.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray(value) ? value : [], args); - } - return this[chainName](function(value2) { - return func.apply(isArray(value2) ? value2 : [], args); - }); - }; - }); - baseForOwn(LazyWrapper.prototype, function(func, methodName) { - var lodashFunc = lodash[methodName]; - if (lodashFunc) { - var key = lodashFunc.name + ""; - if (!hasOwnProperty.call(realNames, key)) { - realNames[key] = []; - } - realNames[key].push({ "name": methodName, "func": lodashFunc }); - } - }); - realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ - "name": "wrapper", - "func": undefined - }]; - LazyWrapper.prototype.clone = lazyClone; - LazyWrapper.prototype.reverse = lazyReverse; - LazyWrapper.prototype.value = lazyValue; - lodash.prototype.at = wrapperAt; - lodash.prototype.chain = wrapperChain; - lodash.prototype.commit = wrapperCommit; - lodash.prototype.next = wrapperNext; - lodash.prototype.plant = wrapperPlant; - lodash.prototype.reverse = wrapperReverse; - lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - lodash.prototype.first = lodash.prototype.head; - if (symIterator) { - lodash.prototype[symIterator] = wrapperToIterator; - } - return lodash; - }; - var _ = runInContext(); - if (typeof define == "function" && typeof define.amd == "object" && define.amd) { - root._ = _; - define(function() { - return _; - }); - } else if (freeModule) { - (freeModule.exports = _)._ = _; - freeExports._ = _; - } else { - root._ = _; - } - }).call(exports); - } -}); -export default require_lodash(); -/*! Bundled license information: - -lodash/lodash.js: - (** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - *) -*/ -//# sourceMappingURL=lodash.js.map diff --git a/jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js.map b/jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js.map deleted file mode 100644 index 49fcafae..00000000 --- a/jiuyi2/unpackage/dist/cache/.vite/deps/lodash.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../../node_modules/lodash/lodash.js"], - "sourcesContent": ["/**\r\n * @license\r\n * Lodash \r\n * Copyright OpenJS Foundation and other contributors \r\n * Released under MIT license \r\n * Based on Underscore.js 1.8.3 \r\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\r\n */\r\n;(function() {\r\n\r\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\r\n var undefined;\r\n\r\n /** Used as the semantic version number. */\r\n var VERSION = '4.17.21';\r\n\r\n /** Used as the size to enable large array optimizations. */\r\n var LARGE_ARRAY_SIZE = 200;\r\n\r\n /** Error message constants. */\r\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\r\n FUNC_ERROR_TEXT = 'Expected a function',\r\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\r\n\r\n /** Used to stand-in for `undefined` hash values. */\r\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\r\n\r\n /** Used as the maximum memoize cache size. */\r\n var MAX_MEMOIZE_SIZE = 500;\r\n\r\n /** Used as the internal argument placeholder. */\r\n var PLACEHOLDER = '__lodash_placeholder__';\r\n\r\n /** Used to compose bitmasks for cloning. */\r\n var CLONE_DEEP_FLAG = 1,\r\n CLONE_FLAT_FLAG = 2,\r\n CLONE_SYMBOLS_FLAG = 4;\r\n\r\n /** Used to compose bitmasks for value comparisons. */\r\n var COMPARE_PARTIAL_FLAG = 1,\r\n COMPARE_UNORDERED_FLAG = 2;\r\n\r\n /** Used to compose bitmasks for function metadata. */\r\n var WRAP_BIND_FLAG = 1,\r\n WRAP_BIND_KEY_FLAG = 2,\r\n WRAP_CURRY_BOUND_FLAG = 4,\r\n WRAP_CURRY_FLAG = 8,\r\n WRAP_CURRY_RIGHT_FLAG = 16,\r\n WRAP_PARTIAL_FLAG = 32,\r\n WRAP_PARTIAL_RIGHT_FLAG = 64,\r\n WRAP_ARY_FLAG = 128,\r\n WRAP_REARG_FLAG = 256,\r\n WRAP_FLIP_FLAG = 512;\r\n\r\n /** Used as default options for `_.truncate`. */\r\n var DEFAULT_TRUNC_LENGTH = 30,\r\n DEFAULT_TRUNC_OMISSION = '...';\r\n\r\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\r\n var HOT_COUNT = 800,\r\n HOT_SPAN = 16;\r\n\r\n /** Used to indicate the type of lazy iteratees. */\r\n var LAZY_FILTER_FLAG = 1,\r\n LAZY_MAP_FLAG = 2,\r\n LAZY_WHILE_FLAG = 3;\r\n\r\n /** Used as references for various `Number` constants. */\r\n var INFINITY = 1 / 0,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_INTEGER = 1.7976931348623157e+308,\r\n NAN = 0 / 0;\r\n\r\n /** Used as references for the maximum length and index of an array. */\r\n var MAX_ARRAY_LENGTH = 4294967295,\r\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\r\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\r\n\r\n /** Used to associate wrap methods with their bit flags. */\r\n var wrapFlags = [\r\n ['ary', WRAP_ARY_FLAG],\r\n ['bind', WRAP_BIND_FLAG],\r\n ['bindKey', WRAP_BIND_KEY_FLAG],\r\n ['curry', WRAP_CURRY_FLAG],\r\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\r\n ['flip', WRAP_FLIP_FLAG],\r\n ['partial', WRAP_PARTIAL_FLAG],\r\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\r\n ['rearg', WRAP_REARG_FLAG]\r\n ];\r\n\r\n /** `Object#toString` result references. */\r\n var argsTag = '[object Arguments]',\r\n arrayTag = '[object Array]',\r\n asyncTag = '[object AsyncFunction]',\r\n boolTag = '[object Boolean]',\r\n dateTag = '[object Date]',\r\n domExcTag = '[object DOMException]',\r\n errorTag = '[object Error]',\r\n funcTag = '[object Function]',\r\n genTag = '[object GeneratorFunction]',\r\n mapTag = '[object Map]',\r\n numberTag = '[object Number]',\r\n nullTag = '[object Null]',\r\n objectTag = '[object Object]',\r\n promiseTag = '[object Promise]',\r\n proxyTag = '[object Proxy]',\r\n regexpTag = '[object RegExp]',\r\n setTag = '[object Set]',\r\n stringTag = '[object String]',\r\n symbolTag = '[object Symbol]',\r\n undefinedTag = '[object Undefined]',\r\n weakMapTag = '[object WeakMap]',\r\n weakSetTag = '[object WeakSet]';\r\n\r\n var arrayBufferTag = '[object ArrayBuffer]',\r\n dataViewTag = '[object DataView]',\r\n float32Tag = '[object Float32Array]',\r\n float64Tag = '[object Float64Array]',\r\n int8Tag = '[object Int8Array]',\r\n int16Tag = '[object Int16Array]',\r\n int32Tag = '[object Int32Array]',\r\n uint8Tag = '[object Uint8Array]',\r\n uint8ClampedTag = '[object Uint8ClampedArray]',\r\n uint16Tag = '[object Uint16Array]',\r\n uint32Tag = '[object Uint32Array]';\r\n\r\n /** Used to match empty string literals in compiled template source. */\r\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\r\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\r\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\r\n\r\n /** Used to match HTML entities and HTML characters. */\r\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\r\n reUnescapedHtml = /[&<>\"']/g,\r\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\r\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\r\n\r\n /** Used to match template delimiters. */\r\n var reEscape = /<%-([\\s\\S]+?)%>/g,\r\n reEvaluate = /<%([\\s\\S]+?)%>/g,\r\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\r\n\r\n /** Used to match property names within property paths. */\r\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\r\n reIsPlainProp = /^\\w*$/,\r\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\r\n\r\n /**\r\n * Used to match `RegExp`\r\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\r\n */\r\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\r\n reHasRegExpChar = RegExp(reRegExpChar.source);\r\n\r\n /** Used to match leading whitespace. */\r\n var reTrimStart = /^\\s+/;\r\n\r\n /** Used to match a single whitespace character. */\r\n var reWhitespace = /\\s/;\r\n\r\n /** Used to match wrap detail comments. */\r\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\r\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\r\n reSplitDetails = /,? & /;\r\n\r\n /** Used to match words composed of alphanumeric characters. */\r\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\r\n\r\n /**\r\n * Used to validate the `validate` option in `_.template` variable.\r\n *\r\n * Forbids characters which could potentially change the meaning of the function argument definition:\r\n * - \"(),\" (modification of function parameters)\r\n * - \"=\" (default value)\r\n * - \"[]{}\" (destructuring of function parameters)\r\n * - \"/\" (beginning of a comment)\r\n * - whitespace\r\n */\r\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\r\n\r\n /** Used to match backslashes in property paths. */\r\n var reEscapeChar = /\\\\(\\\\)?/g;\r\n\r\n /**\r\n * Used to match\r\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\r\n */\r\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\r\n\r\n /** Used to match `RegExp` flags from their coerced string values. */\r\n var reFlags = /\\w*$/;\r\n\r\n /** Used to detect bad signed hexadecimal string values. */\r\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\r\n\r\n /** Used to detect binary string values. */\r\n var reIsBinary = /^0b[01]+$/i;\r\n\r\n /** Used to detect host constructors (Safari). */\r\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\r\n\r\n /** Used to detect octal string values. */\r\n var reIsOctal = /^0o[0-7]+$/i;\r\n\r\n /** Used to detect unsigned integer values. */\r\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\r\n\r\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\r\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\r\n\r\n /** Used to ensure capturing order of template delimiters. */\r\n var reNoMatch = /($^)/;\r\n\r\n /** Used to match unescaped characters in compiled string literals. */\r\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\r\n\r\n /** Used to compose unicode character classes. */\r\n var rsAstralRange = '\\\\ud800-\\\\udfff',\r\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\r\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\r\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\r\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\r\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\r\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\r\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\r\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\r\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\r\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\r\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\r\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\r\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\r\n\r\n /** Used to compose unicode capture groups. */\r\n var rsApos = \"['\\u2019]\",\r\n rsAstral = '[' + rsAstralRange + ']',\r\n rsBreak = '[' + rsBreakRange + ']',\r\n rsCombo = '[' + rsComboRange + ']',\r\n rsDigits = '\\\\d+',\r\n rsDingbat = '[' + rsDingbatRange + ']',\r\n rsLower = '[' + rsLowerRange + ']',\r\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\r\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\r\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\r\n rsNonAstral = '[^' + rsAstralRange + ']',\r\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\r\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\r\n rsUpper = '[' + rsUpperRange + ']',\r\n rsZWJ = '\\\\u200d';\r\n\r\n /** Used to compose unicode regexes. */\r\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\r\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\r\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\r\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\r\n reOptMod = rsModifier + '?',\r\n rsOptVar = '[' + rsVarRange + ']?',\r\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\r\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\r\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\r\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\r\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\r\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\r\n\r\n /** Used to match apostrophes. */\r\n var reApos = RegExp(rsApos, 'g');\r\n\r\n /**\r\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\r\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\r\n */\r\n var reComboMark = RegExp(rsCombo, 'g');\r\n\r\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\r\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\r\n\r\n /** Used to match complex or compound words. */\r\n var reUnicodeWord = RegExp([\r\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\r\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\r\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\r\n rsUpper + '+' + rsOptContrUpper,\r\n rsOrdUpper,\r\n rsOrdLower,\r\n rsDigits,\r\n rsEmoji\r\n ].join('|'), 'g');\r\n\r\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\r\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\r\n\r\n /** Used to detect strings that need a more robust regexp to match words. */\r\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\r\n\r\n /** Used to assign default `context` object properties. */\r\n var contextProps = [\r\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\r\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\r\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\r\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\r\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\r\n ];\r\n\r\n /** Used to make template sourceURLs easier to identify. */\r\n var templateCounter = -1;\r\n\r\n /** Used to identify `toStringTag` values of typed arrays. */\r\n var typedArrayTags = {};\r\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\r\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\r\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\r\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\r\n typedArrayTags[uint32Tag] = true;\r\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\r\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\r\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\r\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\r\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\r\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\r\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\r\n typedArrayTags[weakMapTag] = false;\r\n\r\n /** Used to identify `toStringTag` values supported by `_.clone`. */\r\n var cloneableTags = {};\r\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\r\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\r\n cloneableTags[boolTag] = cloneableTags[dateTag] =\r\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\r\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\r\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\r\n cloneableTags[numberTag] = cloneableTags[objectTag] =\r\n cloneableTags[regexpTag] = cloneableTags[setTag] =\r\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\r\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\r\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\r\n cloneableTags[errorTag] = cloneableTags[funcTag] =\r\n cloneableTags[weakMapTag] = false;\r\n\r\n /** Used to map Latin Unicode letters to basic Latin letters. */\r\n var deburredLetters = {\r\n // Latin-1 Supplement block.\r\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\r\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\r\n '\\xc7': 'C', '\\xe7': 'c',\r\n '\\xd0': 'D', '\\xf0': 'd',\r\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\r\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\r\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\r\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\r\n '\\xd1': 'N', '\\xf1': 'n',\r\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\r\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\r\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\r\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\r\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\r\n '\\xc6': 'Ae', '\\xe6': 'ae',\r\n '\\xde': 'Th', '\\xfe': 'th',\r\n '\\xdf': 'ss',\r\n // Latin Extended-A block.\r\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\r\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\r\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\r\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\r\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\r\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\r\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\r\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\r\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\r\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\r\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\r\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\r\n '\\u0134': 'J', '\\u0135': 'j',\r\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\r\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\r\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\r\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\r\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\r\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\r\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\r\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\r\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\r\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\r\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\r\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\r\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\r\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\r\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\r\n '\\u0174': 'W', '\\u0175': 'w',\r\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\r\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\r\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\r\n '\\u0132': 'IJ', '\\u0133': 'ij',\r\n '\\u0152': 'Oe', '\\u0153': 'oe',\r\n '\\u0149': \"'n\", '\\u017f': 's'\r\n };\r\n\r\n /** Used to map characters to HTML entities. */\r\n var htmlEscapes = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": '''\r\n };\r\n\r\n /** Used to map HTML entities to characters. */\r\n var htmlUnescapes = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '"': '\"',\r\n ''': \"'\"\r\n };\r\n\r\n /** Used to escape characters for inclusion in compiled string literals. */\r\n var stringEscapes = {\r\n '\\\\': '\\\\',\r\n \"'\": \"'\",\r\n '\\n': 'n',\r\n '\\r': 'r',\r\n '\\u2028': 'u2028',\r\n '\\u2029': 'u2029'\r\n };\r\n\r\n /** Built-in method references without a dependency on `root`. */\r\n var freeParseFloat = parseFloat,\r\n freeParseInt = parseInt;\r\n\r\n /** Detect free variable `global` from Node.js. */\r\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\r\n\r\n /** Detect free variable `self`. */\r\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\r\n\r\n /** Used as a reference to the global object. */\r\n var root = freeGlobal || freeSelf || Function('return this')();\r\n\r\n /** Detect free variable `exports`. */\r\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\r\n\r\n /** Detect free variable `module`. */\r\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\r\n\r\n /** Detect the popular CommonJS extension `module.exports`. */\r\n var moduleExports = freeModule && freeModule.exports === freeExports;\r\n\r\n /** Detect free variable `process` from Node.js. */\r\n var freeProcess = moduleExports && freeGlobal.process;\r\n\r\n /** Used to access faster Node.js helpers. */\r\n var nodeUtil = (function() {\r\n try {\r\n // Use `util.types` for Node.js 10+.\r\n var types = freeModule && freeModule.require && freeModule.require('util').types;\r\n\r\n if (types) {\r\n return types;\r\n }\r\n\r\n // Legacy `process.binding('util')` for Node.js < 10.\r\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\r\n } catch (e) {}\r\n }());\r\n\r\n /* Node.js helper references. */\r\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\r\n nodeIsDate = nodeUtil && nodeUtil.isDate,\r\n nodeIsMap = nodeUtil && nodeUtil.isMap,\r\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\r\n nodeIsSet = nodeUtil && nodeUtil.isSet,\r\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /**\r\n * A faster alternative to `Function#apply`, this function invokes `func`\r\n * with the `this` binding of `thisArg` and the arguments of `args`.\r\n *\r\n * @private\r\n * @param {Function} func The function to invoke.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} args The arguments to invoke `func` with.\r\n * @returns {*} Returns the result of `func`.\r\n */\r\n function apply(func, thisArg, args) {\r\n switch (args.length) {\r\n case 0: return func.call(thisArg);\r\n case 1: return func.call(thisArg, args[0]);\r\n case 2: return func.call(thisArg, args[0], args[1]);\r\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\r\n }\r\n return func.apply(thisArg, args);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseAggregator` for arrays.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function arrayAggregator(array, setter, iteratee, accumulator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n setter(accumulator, value, iteratee(value), array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.forEach` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayEach(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (iteratee(array[index], index, array) === false) {\r\n break;\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.forEachRight` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayEachRight(array, iteratee) {\r\n var length = array == null ? 0 : array.length;\r\n\r\n while (length--) {\r\n if (iteratee(array[length], length, array) === false) {\r\n break;\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.every` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n */\r\n function arrayEvery(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (!predicate(array[index], index, array)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.filter` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function arrayFilter(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (predicate(value, index, array)) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.includes` for arrays without support for\r\n * specifying an index to search from.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludes(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n return !!length && baseIndexOf(array, value, 0) > -1;\r\n }\r\n\r\n /**\r\n * This function is like `arrayIncludes` except that it accepts a comparator.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @param {Function} comparator The comparator invoked per element.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludesWith(array, value, comparator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (comparator(value, array[index])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.map` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function arrayMap(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n result = Array(length);\r\n\r\n while (++index < length) {\r\n result[index] = iteratee(array[index], index, array);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Appends the elements of `values` to `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to append.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayPush(array, values) {\r\n var index = -1,\r\n length = values.length,\r\n offset = array.length;\r\n\r\n while (++index < length) {\r\n array[offset + index] = values[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.reduce` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @param {boolean} [initAccum] Specify using the first element of `array` as\r\n * the initial value.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function arrayReduce(array, iteratee, accumulator, initAccum) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n if (initAccum && length) {\r\n accumulator = array[++index];\r\n }\r\n while (++index < length) {\r\n accumulator = iteratee(accumulator, array[index], index, array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.reduceRight` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @param {boolean} [initAccum] Specify using the last element of `array` as\r\n * the initial value.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\r\n var length = array == null ? 0 : array.length;\r\n if (initAccum && length) {\r\n accumulator = array[--length];\r\n }\r\n while (length--) {\r\n accumulator = iteratee(accumulator, array[length], length, array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.some` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function arraySome(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (predicate(array[index], index, array)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the size of an ASCII `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n var asciiSize = baseProperty('length');\r\n\r\n /**\r\n * Converts an ASCII `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function asciiToArray(string) {\r\n return string.split('');\r\n }\r\n\r\n /**\r\n * Splits an ASCII `string` into an array of its words.\r\n *\r\n * @private\r\n * @param {string} The string to inspect.\r\n * @returns {Array} Returns the words of `string`.\r\n */\r\n function asciiWords(string) {\r\n return string.match(reAsciiWord) || [];\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\r\n * without support for iteratee shorthands, which iterates over `collection`\r\n * using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the found element or its key, else `undefined`.\r\n */\r\n function baseFindKey(collection, predicate, eachFunc) {\r\n var result;\r\n eachFunc(collection, function(value, key, collection) {\r\n if (predicate(value, key, collection)) {\r\n result = key;\r\n return false;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\r\n * support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {number} fromIndex The index to search from.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\r\n var length = array.length,\r\n index = fromIndex + (fromRight ? 1 : -1);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (predicate(array[index], index, array)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseIndexOf(array, value, fromIndex) {\r\n return value === value\r\n ? strictIndexOf(array, value, fromIndex)\r\n : baseFindIndex(array, baseIsNaN, fromIndex);\r\n }\r\n\r\n /**\r\n * This function is like `baseIndexOf` except that it accepts a comparator.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @param {Function} comparator The comparator invoked per element.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseIndexOfWith(array, value, fromIndex, comparator) {\r\n var index = fromIndex - 1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n if (comparator(array[index], value)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNaN` without support for number objects.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n */\r\n function baseIsNaN(value) {\r\n return value !== value;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.mean` and `_.meanBy` without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {number} Returns the mean.\r\n */\r\n function baseMean(array, iteratee) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? (baseSum(array, iteratee) / length) : NAN;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.property` without support for deep paths.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function baseProperty(key) {\r\n return function(object) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.propertyOf` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyOf(object) {\r\n return function(key) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\r\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} accumulator The initial value.\r\n * @param {boolean} initAccum Specify using the first or last element of\r\n * `collection` as the initial value.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\r\n eachFunc(collection, function(value, index, collection) {\r\n accumulator = initAccum\r\n ? (initAccum = false, value)\r\n : iteratee(accumulator, value, index, collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortBy` which uses `comparer` to define the\r\n * sort order of `array` and replaces criteria objects with their corresponding\r\n * values.\r\n *\r\n * @private\r\n * @param {Array} array The array to sort.\r\n * @param {Function} comparer The function to define sort order.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function baseSortBy(array, comparer) {\r\n var length = array.length;\r\n\r\n array.sort(comparer);\r\n while (length--) {\r\n array[length] = array[length].value;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sum` and `_.sumBy` without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {number} Returns the sum.\r\n */\r\n function baseSum(array, iteratee) {\r\n var result,\r\n index = -1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n var current = iteratee(array[index]);\r\n if (current !== undefined) {\r\n result = result === undefined ? current : (result + current);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.times` without support for iteratee shorthands\r\n * or max array length checks.\r\n *\r\n * @private\r\n * @param {number} n The number of times to invoke `iteratee`.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the array of results.\r\n */\r\n function baseTimes(n, iteratee) {\r\n var index = -1,\r\n result = Array(n);\r\n\r\n while (++index < n) {\r\n result[index] = iteratee(index);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\r\n * of key-value pairs for `object` corresponding to the property names of `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} props The property names to get values for.\r\n * @returns {Object} Returns the key-value pairs.\r\n */\r\n function baseToPairs(object, props) {\r\n return arrayMap(props, function(key) {\r\n return [key, object[key]];\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.trim`.\r\n *\r\n * @private\r\n * @param {string} string The string to trim.\r\n * @returns {string} Returns the trimmed string.\r\n */\r\n function baseTrim(string) {\r\n return string\r\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\r\n : string;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unary` without support for storing metadata.\r\n *\r\n * @private\r\n * @param {Function} func The function to cap arguments for.\r\n * @returns {Function} Returns the new capped function.\r\n */\r\n function baseUnary(func) {\r\n return function(value) {\r\n return func(value);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.values` and `_.valuesIn` which creates an\r\n * array of `object` property values corresponding to the property names\r\n * of `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} props The property names to get values for.\r\n * @returns {Object} Returns the array of property values.\r\n */\r\n function baseValues(object, props) {\r\n return arrayMap(props, function(key) {\r\n return object[key];\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a `cache` value for `key` exists.\r\n *\r\n * @private\r\n * @param {Object} cache The cache to query.\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function cacheHas(cache, key) {\r\n return cache.has(key);\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the first unmatched string symbol.\r\n */\r\n function charsStartIndex(strSymbols, chrSymbols) {\r\n var index = -1,\r\n length = strSymbols.length;\r\n\r\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the last unmatched string symbol.\r\n */\r\n function charsEndIndex(strSymbols, chrSymbols) {\r\n var index = strSymbols.length;\r\n\r\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Gets the number of `placeholder` occurrences in `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} placeholder The placeholder to search for.\r\n * @returns {number} Returns the placeholder count.\r\n */\r\n function countHolders(array, placeholder) {\r\n var length = array.length,\r\n result = 0;\r\n\r\n while (length--) {\r\n if (array[length] === placeholder) {\r\n ++result;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\r\n * letters to basic Latin letters.\r\n *\r\n * @private\r\n * @param {string} letter The matched letter to deburr.\r\n * @returns {string} Returns the deburred letter.\r\n */\r\n var deburrLetter = basePropertyOf(deburredLetters);\r\n\r\n /**\r\n * Used by `_.escape` to convert characters to HTML entities.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to escape.\r\n * @returns {string} Returns the escaped character.\r\n */\r\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\r\n\r\n /**\r\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to escape.\r\n * @returns {string} Returns the escaped character.\r\n */\r\n function escapeStringChar(chr) {\r\n return '\\\\' + stringEscapes[chr];\r\n }\r\n\r\n /**\r\n * Gets the value at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function getValue(object, key) {\r\n return object == null ? undefined : object[key];\r\n }\r\n\r\n /**\r\n * Checks if `string` contains Unicode symbols.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\r\n */\r\n function hasUnicode(string) {\r\n return reHasUnicode.test(string);\r\n }\r\n\r\n /**\r\n * Checks if `string` contains a word composed of Unicode symbols.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {boolean} Returns `true` if a word is found, else `false`.\r\n */\r\n function hasUnicodeWord(string) {\r\n return reHasUnicodeWord.test(string);\r\n }\r\n\r\n /**\r\n * Converts `iterator` to an array.\r\n *\r\n * @private\r\n * @param {Object} iterator The iterator to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function iteratorToArray(iterator) {\r\n var data,\r\n result = [];\r\n\r\n while (!(data = iterator.next()).done) {\r\n result.push(data.value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `map` to its key-value pairs.\r\n *\r\n * @private\r\n * @param {Object} map The map to convert.\r\n * @returns {Array} Returns the key-value pairs.\r\n */\r\n function mapToArray(map) {\r\n var index = -1,\r\n result = Array(map.size);\r\n\r\n map.forEach(function(value, key) {\r\n result[++index] = [key, value];\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a unary function that invokes `func` with its argument transformed.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {Function} transform The argument transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overArg(func, transform) {\r\n return function(arg) {\r\n return func(transform(arg));\r\n };\r\n }\r\n\r\n /**\r\n * Replaces all `placeholder` elements in `array` with an internal placeholder\r\n * and returns an array of their indexes.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {*} placeholder The placeholder to replace.\r\n * @returns {Array} Returns the new array of placeholder indexes.\r\n */\r\n function replaceHolders(array, placeholder) {\r\n var index = -1,\r\n length = array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value === placeholder || value === PLACEHOLDER) {\r\n array[index] = PLACEHOLDER;\r\n result[resIndex++] = index;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `set` to an array of its values.\r\n *\r\n * @private\r\n * @param {Object} set The set to convert.\r\n * @returns {Array} Returns the values.\r\n */\r\n function setToArray(set) {\r\n var index = -1,\r\n result = Array(set.size);\r\n\r\n set.forEach(function(value) {\r\n result[++index] = value;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `set` to its value-value pairs.\r\n *\r\n * @private\r\n * @param {Object} set The set to convert.\r\n * @returns {Array} Returns the value-value pairs.\r\n */\r\n function setToPairs(set) {\r\n var index = -1,\r\n result = Array(set.size);\r\n\r\n set.forEach(function(value) {\r\n result[++index] = [value, value];\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.indexOf` which performs strict equality\r\n * comparisons of values, i.e. `===`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function strictIndexOf(array, value, fromIndex) {\r\n var index = fromIndex - 1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n if (array[index] === value) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.lastIndexOf` which performs strict equality\r\n * comparisons of values, i.e. `===`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function strictLastIndexOf(array, value, fromIndex) {\r\n var index = fromIndex + 1;\r\n while (index--) {\r\n if (array[index] === value) {\r\n return index;\r\n }\r\n }\r\n return index;\r\n }\r\n\r\n /**\r\n * Gets the number of symbols in `string`.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function stringSize(string) {\r\n return hasUnicode(string)\r\n ? unicodeSize(string)\r\n : asciiSize(string);\r\n }\r\n\r\n /**\r\n * Converts `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function stringToArray(string) {\r\n return hasUnicode(string)\r\n ? unicodeToArray(string)\r\n : asciiToArray(string);\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\r\n * character of `string`.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {number} Returns the index of the last non-whitespace character.\r\n */\r\n function trimmedEndIndex(string) {\r\n var index = string.length;\r\n\r\n while (index-- && reWhitespace.test(string.charAt(index))) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Used by `_.unescape` to convert HTML entities to characters.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to unescape.\r\n * @returns {string} Returns the unescaped character.\r\n */\r\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\r\n\r\n /**\r\n * Gets the size of a Unicode `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function unicodeSize(string) {\r\n var result = reUnicode.lastIndex = 0;\r\n while (reUnicode.test(string)) {\r\n ++result;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts a Unicode `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function unicodeToArray(string) {\r\n return string.match(reUnicode) || [];\r\n }\r\n\r\n /**\r\n * Splits a Unicode `string` into an array of its words.\r\n *\r\n * @private\r\n * @param {string} The string to inspect.\r\n * @returns {Array} Returns the words of `string`.\r\n */\r\n function unicodeWords(string) {\r\n return string.match(reUnicodeWord) || [];\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Create a new pristine `lodash` function using the `context` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Util\r\n * @param {Object} [context=root] The context object.\r\n * @returns {Function} Returns a new `lodash` function.\r\n * @example\r\n *\r\n * _.mixin({ 'foo': _.constant('foo') });\r\n *\r\n * var lodash = _.runInContext();\r\n * lodash.mixin({ 'bar': lodash.constant('bar') });\r\n *\r\n * _.isFunction(_.foo);\r\n * // => true\r\n * _.isFunction(_.bar);\r\n * // => false\r\n *\r\n * lodash.isFunction(lodash.foo);\r\n * // => false\r\n * lodash.isFunction(lodash.bar);\r\n * // => true\r\n *\r\n * // Create a suped-up `defer` in Node.js.\r\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\r\n */\r\n var runInContext = (function runInContext(context) {\r\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\r\n\r\n /** Built-in constructor references. */\r\n var Array = context.Array,\r\n Date = context.Date,\r\n Error = context.Error,\r\n Function = context.Function,\r\n Math = context.Math,\r\n Object = context.Object,\r\n RegExp = context.RegExp,\r\n String = context.String,\r\n TypeError = context.TypeError;\r\n\r\n /** Used for built-in method references. */\r\n var arrayProto = Array.prototype,\r\n funcProto = Function.prototype,\r\n objectProto = Object.prototype;\r\n\r\n /** Used to detect overreaching core-js shims. */\r\n var coreJsData = context['__core-js_shared__'];\r\n\r\n /** Used to resolve the decompiled source of functions. */\r\n var funcToString = funcProto.toString;\r\n\r\n /** Used to check objects for own properties. */\r\n var hasOwnProperty = objectProto.hasOwnProperty;\r\n\r\n /** Used to generate unique IDs. */\r\n var idCounter = 0;\r\n\r\n /** Used to detect methods masquerading as native. */\r\n var maskSrcKey = (function() {\r\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\r\n return uid ? ('Symbol(src)_1.' + uid) : '';\r\n }());\r\n\r\n /**\r\n * Used to resolve the\r\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\r\n * of values.\r\n */\r\n var nativeObjectToString = objectProto.toString;\r\n\r\n /** Used to infer the `Object` constructor. */\r\n var objectCtorString = funcToString.call(Object);\r\n\r\n /** Used to restore the original `_` reference in `_.noConflict`. */\r\n var oldDash = root._;\r\n\r\n /** Used to detect if a method is native. */\r\n var reIsNative = RegExp('^' +\r\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\r\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\r\n );\r\n\r\n /** Built-in value references. */\r\n var Buffer = moduleExports ? context.Buffer : undefined,\r\n Symbol = context.Symbol,\r\n Uint8Array = context.Uint8Array,\r\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\r\n getPrototype = overArg(Object.getPrototypeOf, Object),\r\n objectCreate = Object.create,\r\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\r\n splice = arrayProto.splice,\r\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\r\n symIterator = Symbol ? Symbol.iterator : undefined,\r\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\r\n\r\n var defineProperty = (function() {\r\n try {\r\n var func = getNative(Object, 'defineProperty');\r\n func({}, '', {});\r\n return func;\r\n } catch (e) {}\r\n }());\r\n\r\n /** Mocked built-ins. */\r\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\r\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\r\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\r\n\r\n /* Built-in method references for those with the same name as other `lodash` methods. */\r\n var nativeCeil = Math.ceil,\r\n nativeFloor = Math.floor,\r\n nativeGetSymbols = Object.getOwnPropertySymbols,\r\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\r\n nativeIsFinite = context.isFinite,\r\n nativeJoin = arrayProto.join,\r\n nativeKeys = overArg(Object.keys, Object),\r\n nativeMax = Math.max,\r\n nativeMin = Math.min,\r\n nativeNow = Date.now,\r\n nativeParseInt = context.parseInt,\r\n nativeRandom = Math.random,\r\n nativeReverse = arrayProto.reverse;\r\n\r\n /* Built-in method references that are verified to be native. */\r\n var DataView = getNative(context, 'DataView'),\r\n Map = getNative(context, 'Map'),\r\n Promise = getNative(context, 'Promise'),\r\n Set = getNative(context, 'Set'),\r\n WeakMap = getNative(context, 'WeakMap'),\r\n nativeCreate = getNative(Object, 'create');\r\n\r\n /** Used to store function metadata. */\r\n var metaMap = WeakMap && new WeakMap;\r\n\r\n /** Used to lookup unminified function names. */\r\n var realNames = {};\r\n\r\n /** Used to detect maps, sets, and weakmaps. */\r\n var dataViewCtorString = toSource(DataView),\r\n mapCtorString = toSource(Map),\r\n promiseCtorString = toSource(Promise),\r\n setCtorString = toSource(Set),\r\n weakMapCtorString = toSource(WeakMap);\r\n\r\n /** Used to convert symbols to primitives and strings. */\r\n var symbolProto = Symbol ? Symbol.prototype : undefined,\r\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\r\n symbolToString = symbolProto ? symbolProto.toString : undefined;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` object which wraps `value` to enable implicit method\r\n * chain sequences. Methods that operate on and return arrays, collections,\r\n * and functions can be chained together. Methods that retrieve a single value\r\n * or may return a primitive value will automatically end the chain sequence\r\n * and return the unwrapped value. Otherwise, the value must be unwrapped\r\n * with `_#value`.\r\n *\r\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\r\n * enabled using `_.chain`.\r\n *\r\n * The execution of chained methods is lazy, that is, it's deferred until\r\n * `_#value` is implicitly or explicitly called.\r\n *\r\n * Lazy evaluation allows several methods to support shortcut fusion.\r\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\r\n * the creation of intermediate arrays and can greatly reduce the number of\r\n * iteratee executions. Sections of a chain sequence qualify for shortcut\r\n * fusion if the section is applied to an array and iteratees accept only\r\n * one argument. The heuristic for whether a section qualifies for shortcut\r\n * fusion is subject to change.\r\n *\r\n * Chaining is supported in custom builds as long as the `_#value` method is\r\n * directly or indirectly included in the build.\r\n *\r\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\r\n *\r\n * The wrapper `Array` methods are:\r\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\r\n *\r\n * The wrapper `String` methods are:\r\n * `replace` and `split`\r\n *\r\n * The wrapper methods that support shortcut fusion are:\r\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\r\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\r\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\r\n *\r\n * The chainable wrapper methods are:\r\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\r\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\r\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\r\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\r\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\r\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\r\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\r\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\r\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\r\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\r\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\r\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\r\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\r\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\r\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\r\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\r\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\r\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\r\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\r\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\r\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\r\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\r\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\r\n * `zipObject`, `zipObjectDeep`, and `zipWith`\r\n *\r\n * The wrapper methods that are **not** chainable by default are:\r\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\r\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\r\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\r\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\r\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\r\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\r\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\r\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\r\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\r\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\r\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\r\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\r\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\r\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\r\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\r\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\r\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\r\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\r\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\r\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\r\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\r\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\r\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\r\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\r\n * `upperFirst`, `value`, and `words`\r\n *\r\n * @name _\r\n * @constructor\r\n * @category Seq\r\n * @param {*} value The value to wrap in a `lodash` instance.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2, 3]);\r\n *\r\n * // Returns an unwrapped value.\r\n * wrapped.reduce(_.add);\r\n * // => 6\r\n *\r\n * // Returns a wrapped value.\r\n * var squares = wrapped.map(square);\r\n *\r\n * _.isArray(squares);\r\n * // => false\r\n *\r\n * _.isArray(squares.value());\r\n * // => true\r\n */\r\n function lodash(value) {\r\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\r\n if (value instanceof LodashWrapper) {\r\n return value;\r\n }\r\n if (hasOwnProperty.call(value, '__wrapped__')) {\r\n return wrapperClone(value);\r\n }\r\n }\r\n return new LodashWrapper(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.create` without support for assigning\r\n * properties to the created object.\r\n *\r\n * @private\r\n * @param {Object} proto The object to inherit from.\r\n * @returns {Object} Returns the new object.\r\n */\r\n var baseCreate = (function() {\r\n function object() {}\r\n return function(proto) {\r\n if (!isObject(proto)) {\r\n return {};\r\n }\r\n if (objectCreate) {\r\n return objectCreate(proto);\r\n }\r\n object.prototype = proto;\r\n var result = new object;\r\n object.prototype = undefined;\r\n return result;\r\n };\r\n }());\r\n\r\n /**\r\n * The function whose prototype chain sequence wrappers inherit from.\r\n *\r\n * @private\r\n */\r\n function baseLodash() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * The base constructor for creating `lodash` wrapper objects.\r\n *\r\n * @private\r\n * @param {*} value The value to wrap.\r\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\r\n */\r\n function LodashWrapper(value, chainAll) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__chain__ = !!chainAll;\r\n this.__index__ = 0;\r\n this.__values__ = undefined;\r\n }\r\n\r\n /**\r\n * By default, the template delimiters used by lodash are like those in\r\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\r\n * following template settings to use alternative delimiters.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @type {Object}\r\n */\r\n lodash.templateSettings = {\r\n\r\n /**\r\n * Used to detect `data` property values to be HTML-escaped.\r\n *\r\n * @memberOf _.templateSettings\r\n * @type {RegExp}\r\n */\r\n 'escape': reEscape,\r\n\r\n /**\r\n * Used to detect code to be evaluated.\r\n *\r\n * @memberOf _.templateSettings\r\n * @type {RegExp}\r\n */\r\n 'evaluate': reEvaluate,\r\n\r\n /**\r\n * Used to detect `data` property values to inject.\r\n *\r\n * @memberOf _.templateSettings\r\n * @type {RegExp}\r\n */\r\n 'interpolate': reInterpolate,\r\n\r\n /**\r\n * Used to reference the data object in the template text.\r\n *\r\n * @memberOf _.templateSettings\r\n * @type {string}\r\n */\r\n 'variable': '',\r\n\r\n /**\r\n * Used to import variables into the compiled template.\r\n *\r\n * @memberOf _.templateSettings\r\n * @type {Object}\r\n */\r\n 'imports': {\r\n\r\n /**\r\n * A reference to the `lodash` function.\r\n *\r\n * @memberOf _.templateSettings.imports\r\n * @type {Function}\r\n */\r\n '_': lodash\r\n }\r\n };\r\n\r\n // Ensure wrappers are instances of `baseLodash`.\r\n lodash.prototype = baseLodash.prototype;\r\n lodash.prototype.constructor = lodash;\r\n\r\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LodashWrapper.prototype.constructor = LodashWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {*} value The value to wrap.\r\n */\r\n function LazyWrapper(value) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__dir__ = 1;\r\n this.__filtered__ = false;\r\n this.__iteratees__ = [];\r\n this.__takeCount__ = MAX_ARRAY_LENGTH;\r\n this.__views__ = [];\r\n }\r\n\r\n /**\r\n * Creates a clone of the lazy wrapper object.\r\n *\r\n * @private\r\n * @name clone\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the cloned `LazyWrapper` object.\r\n */\r\n function lazyClone() {\r\n var result = new LazyWrapper(this.__wrapped__);\r\n result.__actions__ = copyArray(this.__actions__);\r\n result.__dir__ = this.__dir__;\r\n result.__filtered__ = this.__filtered__;\r\n result.__iteratees__ = copyArray(this.__iteratees__);\r\n result.__takeCount__ = this.__takeCount__;\r\n result.__views__ = copyArray(this.__views__);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reverses the direction of lazy iteration.\r\n *\r\n * @private\r\n * @name reverse\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\r\n */\r\n function lazyReverse() {\r\n if (this.__filtered__) {\r\n var result = new LazyWrapper(this);\r\n result.__dir__ = -1;\r\n result.__filtered__ = true;\r\n } else {\r\n result = this.clone();\r\n result.__dir__ *= -1;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the unwrapped value from its lazy wrapper.\r\n *\r\n * @private\r\n * @name value\r\n * @memberOf LazyWrapper\r\n * @returns {*} Returns the unwrapped value.\r\n */\r\n function lazyValue() {\r\n var array = this.__wrapped__.value(),\r\n dir = this.__dir__,\r\n isArr = isArray(array),\r\n isRight = dir < 0,\r\n arrLength = isArr ? array.length : 0,\r\n view = getView(0, arrLength, this.__views__),\r\n start = view.start,\r\n end = view.end,\r\n length = end - start,\r\n index = isRight ? end : (start - 1),\r\n iteratees = this.__iteratees__,\r\n iterLength = iteratees.length,\r\n resIndex = 0,\r\n takeCount = nativeMin(length, this.__takeCount__);\r\n\r\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\r\n return baseWrapperValue(array, this.__actions__);\r\n }\r\n var result = [];\r\n\r\n outer:\r\n while (length-- && resIndex < takeCount) {\r\n index += dir;\r\n\r\n var iterIndex = -1,\r\n value = array[index];\r\n\r\n while (++iterIndex < iterLength) {\r\n var data = iteratees[iterIndex],\r\n iteratee = data.iteratee,\r\n type = data.type,\r\n computed = iteratee(value);\r\n\r\n if (type == LAZY_MAP_FLAG) {\r\n value = computed;\r\n } else if (!computed) {\r\n if (type == LAZY_FILTER_FLAG) {\r\n continue outer;\r\n } else {\r\n break outer;\r\n }\r\n }\r\n }\r\n result[resIndex++] = value;\r\n }\r\n return result;\r\n }\r\n\r\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\r\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LazyWrapper.prototype.constructor = LazyWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a hash object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Hash(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the hash.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Hash\r\n */\r\n function hashClear() {\r\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the hash.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Hash\r\n * @param {Object} hash The hash to modify.\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function hashDelete(key) {\r\n var result = this.has(key) && delete this.__data__[key];\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the hash value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function hashGet(key) {\r\n var data = this.__data__;\r\n if (nativeCreate) {\r\n var result = data[key];\r\n return result === HASH_UNDEFINED ? undefined : result;\r\n }\r\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\r\n }\r\n\r\n /**\r\n * Checks if a hash value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Hash\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function hashHas(key) {\r\n var data = this.__data__;\r\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\r\n }\r\n\r\n /**\r\n * Sets the hash `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the hash instance.\r\n */\r\n function hashSet(key, value) {\r\n var data = this.__data__;\r\n this.size += this.has(key) ? 0 : 1;\r\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\r\n return this;\r\n }\r\n\r\n // Add methods to `Hash`.\r\n Hash.prototype.clear = hashClear;\r\n Hash.prototype['delete'] = hashDelete;\r\n Hash.prototype.get = hashGet;\r\n Hash.prototype.has = hashHas;\r\n Hash.prototype.set = hashSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an list cache object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function ListCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the list cache.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf ListCache\r\n */\r\n function listCacheClear() {\r\n this.__data__ = [];\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the list cache.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function listCacheDelete(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n return false;\r\n }\r\n var lastIndex = data.length - 1;\r\n if (index == lastIndex) {\r\n data.pop();\r\n } else {\r\n splice.call(data, index, 1);\r\n }\r\n --this.size;\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the list cache value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function listCacheGet(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n return index < 0 ? undefined : data[index][1];\r\n }\r\n\r\n /**\r\n * Checks if a list cache value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf ListCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function listCacheHas(key) {\r\n return assocIndexOf(this.__data__, key) > -1;\r\n }\r\n\r\n /**\r\n * Sets the list cache `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the list cache instance.\r\n */\r\n function listCacheSet(key, value) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n ++this.size;\r\n data.push([key, value]);\r\n } else {\r\n data[index][1] = value;\r\n }\r\n return this;\r\n }\r\n\r\n // Add methods to `ListCache`.\r\n ListCache.prototype.clear = listCacheClear;\r\n ListCache.prototype['delete'] = listCacheDelete;\r\n ListCache.prototype.get = listCacheGet;\r\n ListCache.prototype.has = listCacheHas;\r\n ListCache.prototype.set = listCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a map cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function MapCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the map.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf MapCache\r\n */\r\n function mapCacheClear() {\r\n this.size = 0;\r\n this.__data__ = {\r\n 'hash': new Hash,\r\n 'map': new (Map || ListCache),\r\n 'string': new Hash\r\n };\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the map.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function mapCacheDelete(key) {\r\n var result = getMapData(this, key)['delete'](key);\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the map value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function mapCacheGet(key) {\r\n return getMapData(this, key).get(key);\r\n }\r\n\r\n /**\r\n * Checks if a map value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf MapCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function mapCacheHas(key) {\r\n return getMapData(this, key).has(key);\r\n }\r\n\r\n /**\r\n * Sets the map `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the map cache instance.\r\n */\r\n function mapCacheSet(key, value) {\r\n var data = getMapData(this, key),\r\n size = data.size;\r\n\r\n data.set(key, value);\r\n this.size += data.size == size ? 0 : 1;\r\n return this;\r\n }\r\n\r\n // Add methods to `MapCache`.\r\n MapCache.prototype.clear = mapCacheClear;\r\n MapCache.prototype['delete'] = mapCacheDelete;\r\n MapCache.prototype.get = mapCacheGet;\r\n MapCache.prototype.has = mapCacheHas;\r\n MapCache.prototype.set = mapCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n *\r\n * Creates an array cache object to store unique values.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [values] The values to cache.\r\n */\r\n function SetCache(values) {\r\n var index = -1,\r\n length = values == null ? 0 : values.length;\r\n\r\n this.__data__ = new MapCache;\r\n while (++index < length) {\r\n this.add(values[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Adds `value` to the array cache.\r\n *\r\n * @private\r\n * @name add\r\n * @memberOf SetCache\r\n * @alias push\r\n * @param {*} value The value to cache.\r\n * @returns {Object} Returns the cache instance.\r\n */\r\n function setCacheAdd(value) {\r\n this.__data__.set(value, HASH_UNDEFINED);\r\n return this;\r\n }\r\n\r\n /**\r\n * Checks if `value` is in the array cache.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf SetCache\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns `true` if `value` is found, else `false`.\r\n */\r\n function setCacheHas(value) {\r\n return this.__data__.has(value);\r\n }\r\n\r\n // Add methods to `SetCache`.\r\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\r\n SetCache.prototype.has = setCacheHas;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a stack cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Stack(entries) {\r\n var data = this.__data__ = new ListCache(entries);\r\n this.size = data.size;\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the stack.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Stack\r\n */\r\n function stackClear() {\r\n this.__data__ = new ListCache;\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the stack.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function stackDelete(key) {\r\n var data = this.__data__,\r\n result = data['delete'](key);\r\n\r\n this.size = data.size;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the stack value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function stackGet(key) {\r\n return this.__data__.get(key);\r\n }\r\n\r\n /**\r\n * Checks if a stack value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Stack\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function stackHas(key) {\r\n return this.__data__.has(key);\r\n }\r\n\r\n /**\r\n * Sets the stack `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the stack cache instance.\r\n */\r\n function stackSet(key, value) {\r\n var data = this.__data__;\r\n if (data instanceof ListCache) {\r\n var pairs = data.__data__;\r\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\r\n pairs.push([key, value]);\r\n this.size = ++data.size;\r\n return this;\r\n }\r\n data = this.__data__ = new MapCache(pairs);\r\n }\r\n data.set(key, value);\r\n this.size = data.size;\r\n return this;\r\n }\r\n\r\n // Add methods to `Stack`.\r\n Stack.prototype.clear = stackClear;\r\n Stack.prototype['delete'] = stackDelete;\r\n Stack.prototype.get = stackGet;\r\n Stack.prototype.has = stackHas;\r\n Stack.prototype.set = stackSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array of the enumerable property names of the array-like `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @param {boolean} inherited Specify returning inherited property names.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function arrayLikeKeys(value, inherited) {\r\n var isArr = isArray(value),\r\n isArg = !isArr && isArguments(value),\r\n isBuff = !isArr && !isArg && isBuffer(value),\r\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\r\n skipIndexes = isArr || isArg || isBuff || isType,\r\n result = skipIndexes ? baseTimes(value.length, String) : [],\r\n length = result.length;\r\n\r\n for (var key in value) {\r\n if ((inherited || hasOwnProperty.call(value, key)) &&\r\n !(skipIndexes && (\r\n // Safari 9 has enumerable `arguments.length` in strict mode.\r\n key == 'length' ||\r\n // Node.js 0.10 has enumerable non-index properties on buffers.\r\n (isBuff && (key == 'offset' || key == 'parent')) ||\r\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\r\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\r\n // Skip index properties.\r\n isIndex(key, length)\r\n ))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.sample` for arrays.\r\n *\r\n * @private\r\n * @param {Array} array The array to sample.\r\n * @returns {*} Returns the random element.\r\n */\r\n function arraySample(array) {\r\n var length = array.length;\r\n return length ? array[baseRandom(0, length - 1)] : undefined;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.sampleSize` for arrays.\r\n *\r\n * @private\r\n * @param {Array} array The array to sample.\r\n * @param {number} n The number of elements to sample.\r\n * @returns {Array} Returns the random elements.\r\n */\r\n function arraySampleSize(array, n) {\r\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\r\n }\r\n\r\n /**\r\n * A specialized version of `_.shuffle` for arrays.\r\n *\r\n * @private\r\n * @param {Array} array The array to shuffle.\r\n * @returns {Array} Returns the new shuffled array.\r\n */\r\n function arrayShuffle(array) {\r\n return shuffleSelf(copyArray(array));\r\n }\r\n\r\n /**\r\n * This function is like `assignValue` except that it doesn't assign\r\n * `undefined` values.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignMergeValue(object, key, value) {\r\n if ((value !== undefined && !eq(object[key], value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignValue(object, key, value) {\r\n var objValue = object[key];\r\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the index at which the `key` is found in `array` of key-value pairs.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} key The key to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function assocIndexOf(array, key) {\r\n var length = array.length;\r\n while (length--) {\r\n if (eq(array[length][0], key)) {\r\n return length;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Aggregates elements of `collection` on `accumulator` with keys transformed\r\n * by `iteratee` and values set by `setter`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseAggregator(collection, setter, iteratee, accumulator) {\r\n baseEach(collection, function(value, key, collection) {\r\n setter(accumulator, value, iteratee(value), collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assign` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssign(object, source) {\r\n return object && copyObject(source, keys(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assignIn` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssignIn(object, source) {\r\n return object && copyObject(source, keysIn(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `assignValue` and `assignMergeValue` without\r\n * value checks.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function baseAssignValue(object, key, value) {\r\n if (key == '__proto__' && defineProperty) {\r\n defineProperty(object, key, {\r\n 'configurable': true,\r\n 'enumerable': true,\r\n 'value': value,\r\n 'writable': true\r\n });\r\n } else {\r\n object[key] = value;\r\n }\r\n }\r\n\r\n /**\r\n * The base implementation of `_.at` without support for individual paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Array} Returns the picked elements.\r\n */\r\n function baseAt(object, paths) {\r\n var index = -1,\r\n length = paths.length,\r\n result = Array(length),\r\n skip = object == null;\r\n\r\n while (++index < length) {\r\n result[index] = skip ? undefined : get(object, paths[index]);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clamp` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n */\r\n function baseClamp(number, lower, upper) {\r\n if (number === number) {\r\n if (upper !== undefined) {\r\n number = number <= upper ? number : upper;\r\n }\r\n if (lower !== undefined) {\r\n number = number >= lower ? number : lower;\r\n }\r\n }\r\n return number;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\r\n * traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to clone.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Deep clone\r\n * 2 - Flatten inherited properties\r\n * 4 - Clone symbols\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @param {string} [key] The key of `value`.\r\n * @param {Object} [object] The parent object of `value`.\r\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\r\n * @returns {*} Returns the cloned value.\r\n */\r\n function baseClone(value, bitmask, customizer, key, object, stack) {\r\n var result,\r\n isDeep = bitmask & CLONE_DEEP_FLAG,\r\n isFlat = bitmask & CLONE_FLAT_FLAG,\r\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\r\n\r\n if (customizer) {\r\n result = object ? customizer(value, key, object, stack) : customizer(value);\r\n }\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n if (!isObject(value)) {\r\n return value;\r\n }\r\n var isArr = isArray(value);\r\n if (isArr) {\r\n result = initCloneArray(value);\r\n if (!isDeep) {\r\n return copyArray(value, result);\r\n }\r\n } else {\r\n var tag = getTag(value),\r\n isFunc = tag == funcTag || tag == genTag;\r\n\r\n if (isBuffer(value)) {\r\n return cloneBuffer(value, isDeep);\r\n }\r\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\r\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\r\n if (!isDeep) {\r\n return isFlat\r\n ? copySymbolsIn(value, baseAssignIn(result, value))\r\n : copySymbols(value, baseAssign(result, value));\r\n }\r\n } else {\r\n if (!cloneableTags[tag]) {\r\n return object ? value : {};\r\n }\r\n result = initCloneByTag(value, tag, isDeep);\r\n }\r\n }\r\n // Check for circular references and return its corresponding clone.\r\n stack || (stack = new Stack);\r\n var stacked = stack.get(value);\r\n if (stacked) {\r\n return stacked;\r\n }\r\n stack.set(value, result);\r\n\r\n if (isSet(value)) {\r\n value.forEach(function(subValue) {\r\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\r\n });\r\n } else if (isMap(value)) {\r\n value.forEach(function(subValue, key) {\r\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n }\r\n\r\n var keysFunc = isFull\r\n ? (isFlat ? getAllKeysIn : getAllKeys)\r\n : (isFlat ? keysIn : keys);\r\n\r\n var props = isArr ? undefined : keysFunc(value);\r\n arrayEach(props || value, function(subValue, key) {\r\n if (props) {\r\n key = subValue;\r\n subValue = value[key];\r\n }\r\n // Recursively populate clone (susceptible to call stack limits).\r\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.conforms` which doesn't clone `source`.\r\n *\r\n * @private\r\n * @param {Object} source The object of property predicates to conform to.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseConforms(source) {\r\n var props = keys(source);\r\n return function(object) {\r\n return baseConformsTo(object, source, props);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.conformsTo` which accepts `props` to check.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property predicates to conform to.\r\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\r\n */\r\n function baseConformsTo(object, source, props) {\r\n var length = props.length;\r\n if (object == null) {\r\n return !length;\r\n }\r\n object = Object(object);\r\n while (length--) {\r\n var key = props[length],\r\n predicate = source[key],\r\n value = object[key];\r\n\r\n if ((value === undefined && !(key in object)) || !predicate(value)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\r\n * to provide to `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {Array} args The arguments to provide to `func`.\r\n * @returns {number|Object} Returns the timer id or timeout object.\r\n */\r\n function baseDelay(func, wait, args) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return setTimeout(function() { func.apply(undefined, args); }, wait);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.difference` without support\r\n * for excluding multiple arrays or iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Array} values The values to exclude.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n */\r\n function baseDifference(array, values, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n isCommon = true,\r\n length = array.length,\r\n result = [],\r\n valuesLength = values.length;\r\n\r\n if (!length) {\r\n return result;\r\n }\r\n if (iteratee) {\r\n values = arrayMap(values, baseUnary(iteratee));\r\n }\r\n if (comparator) {\r\n includes = arrayIncludesWith;\r\n isCommon = false;\r\n }\r\n else if (values.length >= LARGE_ARRAY_SIZE) {\r\n includes = cacheHas;\r\n isCommon = false;\r\n values = new SetCache(values);\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee == null ? value : iteratee(value);\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var valuesIndex = valuesLength;\r\n while (valuesIndex--) {\r\n if (values[valuesIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(values, computed, comparator)) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forEach` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n */\r\n var baseEach = createBaseEach(baseForOwn);\r\n\r\n /**\r\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n */\r\n var baseEachRight = createBaseEach(baseForOwnRight, true);\r\n\r\n /**\r\n * The base implementation of `_.every` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`\r\n */\r\n function baseEvery(collection, predicate) {\r\n var result = true;\r\n baseEach(collection, function(value, index, collection) {\r\n result = !!predicate(value, index, collection);\r\n return result;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.max` and `_.min` which accepts a\r\n * `comparator` to determine the extremum value.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The iteratee invoked per iteration.\r\n * @param {Function} comparator The comparator used to compare values.\r\n * @returns {*} Returns the extremum value.\r\n */\r\n function baseExtremum(array, iteratee, comparator) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index],\r\n current = iteratee(value);\r\n\r\n if (current != null && (computed === undefined\r\n ? (current === current && !isSymbol(current))\r\n : comparator(current, computed)\r\n )) {\r\n var computed = current,\r\n result = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.fill` without an iteratee call guard.\r\n *\r\n * @private\r\n * @param {Array} array The array to fill.\r\n * @param {*} value The value to fill `array` with.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function baseFill(array, value, start, end) {\r\n var length = array.length;\r\n\r\n start = toInteger(start);\r\n if (start < 0) {\r\n start = -start > length ? 0 : (length + start);\r\n }\r\n end = (end === undefined || end > length) ? length : toInteger(end);\r\n if (end < 0) {\r\n end += length;\r\n }\r\n end = start > end ? 0 : toLength(end);\r\n while (start < end) {\r\n array[start++] = value;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.filter` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function baseFilter(collection, predicate) {\r\n var result = [];\r\n baseEach(collection, function(value, index, collection) {\r\n if (predicate(value, index, collection)) {\r\n result.push(value);\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.flatten` with support for restricting flattening.\r\n *\r\n * @private\r\n * @param {Array} array The array to flatten.\r\n * @param {number} depth The maximum recursion depth.\r\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\r\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\r\n * @param {Array} [result=[]] The initial result value.\r\n * @returns {Array} Returns the new flattened array.\r\n */\r\n function baseFlatten(array, depth, predicate, isStrict, result) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n predicate || (predicate = isFlattenable);\r\n result || (result = []);\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (depth > 0 && predicate(value)) {\r\n if (depth > 1) {\r\n // Recursively flatten arrays (susceptible to call stack limits).\r\n baseFlatten(value, depth - 1, predicate, isStrict, result);\r\n } else {\r\n arrayPush(result, value);\r\n }\r\n } else if (!isStrict) {\r\n result[result.length] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `baseForOwn` which iterates over `object`\r\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseFor = createBaseFor();\r\n\r\n /**\r\n * This function is like `baseFor` except that it iterates over properties\r\n * in the opposite order.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseForRight = createBaseFor(true);\r\n\r\n /**\r\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwn(object, iteratee) {\r\n return object && baseFor(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwnRight(object, iteratee) {\r\n return object && baseForRight(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.functions` which creates an array of\r\n * `object` function property names filtered from `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Array} props The property names to filter.\r\n * @returns {Array} Returns the function names.\r\n */\r\n function baseFunctions(object, props) {\r\n return arrayFilter(props, function(key) {\r\n return isFunction(object[key]);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.get` without support for default values.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseGet(object, path) {\r\n path = castPath(path, object);\r\n\r\n var index = 0,\r\n length = path.length;\r\n\r\n while (object != null && index < length) {\r\n object = object[toKey(path[index++])];\r\n }\r\n return (index && index == length) ? object : undefined;\r\n }\r\n\r\n /**\r\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\r\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\r\n var result = keysFunc(object);\r\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\r\n }\r\n\r\n /**\r\n * The base implementation of `getTag` without fallbacks for buggy environments.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n function baseGetTag(value) {\r\n if (value == null) {\r\n return value === undefined ? undefinedTag : nullTag;\r\n }\r\n return (symToStringTag && symToStringTag in Object(value))\r\n ? getRawTag(value)\r\n : objectToString(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.gt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\r\n * else `false`.\r\n */\r\n function baseGt(value, other) {\r\n return value > other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.has` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHas(object, key) {\r\n return object != null && hasOwnProperty.call(object, key);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.hasIn` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHasIn(object, key) {\r\n return object != null && key in Object(object);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.inRange` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {number} number The number to check.\r\n * @param {number} start The start of the range.\r\n * @param {number} end The end of the range.\r\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\r\n */\r\n function baseInRange(number, start, end) {\r\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.intersection`, without support\r\n * for iteratee shorthands, that accepts an array of arrays to inspect.\r\n *\r\n * @private\r\n * @param {Array} arrays The arrays to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of shared values.\r\n */\r\n function baseIntersection(arrays, iteratee, comparator) {\r\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\r\n length = arrays[0].length,\r\n othLength = arrays.length,\r\n othIndex = othLength,\r\n caches = Array(othLength),\r\n maxLength = Infinity,\r\n result = [];\r\n\r\n while (othIndex--) {\r\n var array = arrays[othIndex];\r\n if (othIndex && iteratee) {\r\n array = arrayMap(array, baseUnary(iteratee));\r\n }\r\n maxLength = nativeMin(array.length, maxLength);\r\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\r\n ? new SetCache(othIndex && array)\r\n : undefined;\r\n }\r\n array = arrays[0];\r\n\r\n var index = -1,\r\n seen = caches[0];\r\n\r\n outer:\r\n while (++index < length && result.length < maxLength) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (!(seen\r\n ? cacheHas(seen, computed)\r\n : includes(result, computed, comparator)\r\n )) {\r\n othIndex = othLength;\r\n while (--othIndex) {\r\n var cache = caches[othIndex];\r\n if (!(cache\r\n ? cacheHas(cache, computed)\r\n : includes(arrays[othIndex], computed, comparator))\r\n ) {\r\n continue outer;\r\n }\r\n }\r\n if (seen) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invert` and `_.invertBy` which inverts\r\n * `object` with values transformed by `iteratee` and set by `setter`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform values.\r\n * @param {Object} accumulator The initial inverted object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseInverter(object, setter, iteratee, accumulator) {\r\n baseForOwn(object, function(value, key, object) {\r\n setter(accumulator, iteratee(value), key, object);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invoke` without support for individual\r\n * method arguments.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the method to invoke.\r\n * @param {Array} args The arguments to invoke the method with.\r\n * @returns {*} Returns the result of the invoked method.\r\n */\r\n function baseInvoke(object, path, args) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n var func = object == null ? object : object[toKey(last(path))];\r\n return func == null ? undefined : apply(func, object, args);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isArguments`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n */\r\n function baseIsArguments(value) {\r\n return isObjectLike(value) && baseGetTag(value) == argsTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\r\n */\r\n function baseIsArrayBuffer(value) {\r\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isDate` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n */\r\n function baseIsDate(value) {\r\n return isObjectLike(value) && baseGetTag(value) == dateTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isEqual` which supports partial comparisons\r\n * and tracks traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Unordered comparison\r\n * 2 - Partial comparison\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n */\r\n function baseIsEqual(value, other, bitmask, customizer, stack) {\r\n if (value === other) {\r\n return true;\r\n }\r\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\r\n return value !== value && other !== other;\r\n }\r\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqual` for arrays and objects which performs\r\n * deep comparisons and tracks traversed objects enabling objects with circular\r\n * references to be compared.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\r\n var objIsArr = isArray(object),\r\n othIsArr = isArray(other),\r\n objTag = objIsArr ? arrayTag : getTag(object),\r\n othTag = othIsArr ? arrayTag : getTag(other);\r\n\r\n objTag = objTag == argsTag ? objectTag : objTag;\r\n othTag = othTag == argsTag ? objectTag : othTag;\r\n\r\n var objIsObj = objTag == objectTag,\r\n othIsObj = othTag == objectTag,\r\n isSameTag = objTag == othTag;\r\n\r\n if (isSameTag && isBuffer(object)) {\r\n if (!isBuffer(other)) {\r\n return false;\r\n }\r\n objIsArr = true;\r\n objIsObj = false;\r\n }\r\n if (isSameTag && !objIsObj) {\r\n stack || (stack = new Stack);\r\n return (objIsArr || isTypedArray(object))\r\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\r\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\r\n }\r\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\r\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\r\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\r\n\r\n if (objIsWrapped || othIsWrapped) {\r\n var objUnwrapped = objIsWrapped ? object.value() : object,\r\n othUnwrapped = othIsWrapped ? other.value() : other;\r\n\r\n stack || (stack = new Stack);\r\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\r\n }\r\n }\r\n if (!isSameTag) {\r\n return false;\r\n }\r\n stack || (stack = new Stack);\r\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMap` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n */\r\n function baseIsMap(value) {\r\n return isObjectLike(value) && getTag(value) == mapTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @param {Array} matchData The property names, values, and compare flags to match.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n */\r\n function baseIsMatch(object, source, matchData, customizer) {\r\n var index = matchData.length,\r\n length = index,\r\n noCustomizer = !customizer;\r\n\r\n if (object == null) {\r\n return !length;\r\n }\r\n object = Object(object);\r\n while (index--) {\r\n var data = matchData[index];\r\n if ((noCustomizer && data[2])\r\n ? data[1] !== object[data[0]]\r\n : !(data[0] in object)\r\n ) {\r\n return false;\r\n }\r\n }\r\n while (++index < length) {\r\n data = matchData[index];\r\n var key = data[0],\r\n objValue = object[key],\r\n srcValue = data[1];\r\n\r\n if (noCustomizer && data[2]) {\r\n if (objValue === undefined && !(key in object)) {\r\n return false;\r\n }\r\n } else {\r\n var stack = new Stack;\r\n if (customizer) {\r\n var result = customizer(objValue, srcValue, key, object, source, stack);\r\n }\r\n if (!(result === undefined\r\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\r\n : result\r\n )) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNative` without bad shim checks.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a native function,\r\n * else `false`.\r\n */\r\n function baseIsNative(value) {\r\n if (!isObject(value) || isMasked(value)) {\r\n return false;\r\n }\r\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\r\n return pattern.test(toSource(value));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isRegExp` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n */\r\n function baseIsRegExp(value) {\r\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isSet` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n */\r\n function baseIsSet(value) {\r\n return isObjectLike(value) && getTag(value) == setTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n */\r\n function baseIsTypedArray(value) {\r\n return isObjectLike(value) &&\r\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\r\n }\r\n\r\n /**\r\n * The base implementation of `_.iteratee`.\r\n *\r\n * @private\r\n * @param {*} [value=_.identity] The value to convert to an iteratee.\r\n * @returns {Function} Returns the iteratee.\r\n */\r\n function baseIteratee(value) {\r\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\r\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\r\n if (typeof value == 'function') {\r\n return value;\r\n }\r\n if (value == null) {\r\n return identity;\r\n }\r\n if (typeof value == 'object') {\r\n return isArray(value)\r\n ? baseMatchesProperty(value[0], value[1])\r\n : baseMatches(value);\r\n }\r\n return property(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeys(object) {\r\n if (!isPrototype(object)) {\r\n return nativeKeys(object);\r\n }\r\n var result = [];\r\n for (var key in Object(object)) {\r\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeysIn(object) {\r\n if (!isObject(object)) {\r\n return nativeKeysIn(object);\r\n }\r\n var isProto = isPrototype(object),\r\n result = [];\r\n\r\n for (var key in object) {\r\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.lt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than `other`,\r\n * else `false`.\r\n */\r\n function baseLt(value, other) {\r\n return value < other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.map` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function baseMap(collection, iteratee) {\r\n var index = -1,\r\n result = isArrayLike(collection) ? Array(collection.length) : [];\r\n\r\n baseEach(collection, function(value, key, collection) {\r\n result[++index] = iteratee(value, key, collection);\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matches` which doesn't clone `source`.\r\n *\r\n * @private\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatches(source) {\r\n var matchData = getMatchData(source);\r\n if (matchData.length == 1 && matchData[0][2]) {\r\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\r\n }\r\n return function(object) {\r\n return object === source || baseIsMatch(object, source, matchData);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\r\n *\r\n * @private\r\n * @param {string} path The path of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatchesProperty(path, srcValue) {\r\n if (isKey(path) && isStrictComparable(srcValue)) {\r\n return matchesStrictComparable(toKey(path), srcValue);\r\n }\r\n return function(object) {\r\n var objValue = get(object, path);\r\n return (objValue === undefined && objValue === srcValue)\r\n ? hasIn(object, path)\r\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.merge` without support for multiple sources.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} [customizer] The function to customize merged values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMerge(object, source, srcIndex, customizer, stack) {\r\n if (object === source) {\r\n return;\r\n }\r\n baseFor(source, function(srcValue, key) {\r\n stack || (stack = new Stack);\r\n if (isObject(srcValue)) {\r\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\r\n }\r\n else {\r\n var newValue = customizer\r\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = srcValue;\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n }, keysIn);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseMerge` for arrays and objects which performs\r\n * deep merges and tracks traversed objects enabling objects with circular\r\n * references to be merged.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {string} key The key of the value to merge.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} mergeFunc The function to merge values.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\r\n var objValue = safeGet(object, key),\r\n srcValue = safeGet(source, key),\r\n stacked = stack.get(srcValue);\r\n\r\n if (stacked) {\r\n assignMergeValue(object, key, stacked);\r\n return;\r\n }\r\n var newValue = customizer\r\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n var isCommon = newValue === undefined;\r\n\r\n if (isCommon) {\r\n var isArr = isArray(srcValue),\r\n isBuff = !isArr && isBuffer(srcValue),\r\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\r\n\r\n newValue = srcValue;\r\n if (isArr || isBuff || isTyped) {\r\n if (isArray(objValue)) {\r\n newValue = objValue;\r\n }\r\n else if (isArrayLikeObject(objValue)) {\r\n newValue = copyArray(objValue);\r\n }\r\n else if (isBuff) {\r\n isCommon = false;\r\n newValue = cloneBuffer(srcValue, true);\r\n }\r\n else if (isTyped) {\r\n isCommon = false;\r\n newValue = cloneTypedArray(srcValue, true);\r\n }\r\n else {\r\n newValue = [];\r\n }\r\n }\r\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\r\n newValue = objValue;\r\n if (isArguments(objValue)) {\r\n newValue = toPlainObject(objValue);\r\n }\r\n else if (!isObject(objValue) || isFunction(objValue)) {\r\n newValue = initCloneObject(srcValue);\r\n }\r\n }\r\n else {\r\n isCommon = false;\r\n }\r\n }\r\n if (isCommon) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, newValue);\r\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\r\n stack['delete'](srcValue);\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.nth` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {Array} array The array to query.\r\n * @param {number} n The index of the element to return.\r\n * @returns {*} Returns the nth element of `array`.\r\n */\r\n function baseNth(array, n) {\r\n var length = array.length;\r\n if (!length) {\r\n return;\r\n }\r\n n += n < 0 ? length : 0;\r\n return isIndex(n, length) ? array[n] : undefined;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.orderBy` without param guards.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\r\n * @param {string[]} orders The sort orders of `iteratees`.\r\n * @returns {Array} Returns the new sorted array.\r\n */\r\n function baseOrderBy(collection, iteratees, orders) {\r\n if (iteratees.length) {\r\n iteratees = arrayMap(iteratees, function(iteratee) {\r\n if (isArray(iteratee)) {\r\n return function(value) {\r\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\r\n }\r\n }\r\n return iteratee;\r\n });\r\n } else {\r\n iteratees = [identity];\r\n }\r\n\r\n var index = -1;\r\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\r\n\r\n var result = baseMap(collection, function(value, key, collection) {\r\n var criteria = arrayMap(iteratees, function(iteratee) {\r\n return iteratee(value);\r\n });\r\n return { 'criteria': criteria, 'index': ++index, 'value': value };\r\n });\r\n\r\n return baseSortBy(result, function(object, other) {\r\n return compareMultiple(object, other, orders);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pick` without support for individual\r\n * property identifiers.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePick(object, paths) {\r\n return basePickBy(object, paths, function(value, path) {\r\n return hasIn(object, path);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @param {Function} predicate The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePickBy(object, paths, predicate) {\r\n var index = -1,\r\n length = paths.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var path = paths[index],\r\n value = baseGet(object, path);\r\n\r\n if (predicate(value, path)) {\r\n baseSet(result, castPath(path, object), value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseProperty` which supports deep paths.\r\n *\r\n * @private\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyDeep(path) {\r\n return function(object) {\r\n return baseGet(object, path);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pullAllBy` without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to remove.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function basePullAll(array, values, iteratee, comparator) {\r\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\r\n index = -1,\r\n length = values.length,\r\n seen = array;\r\n\r\n if (array === values) {\r\n values = copyArray(values);\r\n }\r\n if (iteratee) {\r\n seen = arrayMap(array, baseUnary(iteratee));\r\n }\r\n while (++index < length) {\r\n var fromIndex = 0,\r\n value = values[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\r\n if (seen !== array) {\r\n splice.call(seen, fromIndex, 1);\r\n }\r\n splice.call(array, fromIndex, 1);\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pullAt` without support for individual\r\n * indexes or capturing the removed elements.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {number[]} indexes The indexes of elements to remove.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function basePullAt(array, indexes) {\r\n var length = array ? indexes.length : 0,\r\n lastIndex = length - 1;\r\n\r\n while (length--) {\r\n var index = indexes[length];\r\n if (length == lastIndex || index !== previous) {\r\n var previous = index;\r\n if (isIndex(index)) {\r\n splice.call(array, index, 1);\r\n } else {\r\n baseUnset(array, index);\r\n }\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.random` without support for returning\r\n * floating-point numbers.\r\n *\r\n * @private\r\n * @param {number} lower The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the random number.\r\n */\r\n function baseRandom(lower, upper) {\r\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\r\n * coerce arguments.\r\n *\r\n * @private\r\n * @param {number} start The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} step The value to increment or decrement by.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Array} Returns the range of numbers.\r\n */\r\n function baseRange(start, end, step, fromRight) {\r\n var index = -1,\r\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\r\n result = Array(length);\r\n\r\n while (length--) {\r\n result[fromRight ? length : ++index] = start;\r\n start += step;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.repeat` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {string} string The string to repeat.\r\n * @param {number} n The number of times to repeat the string.\r\n * @returns {string} Returns the repeated string.\r\n */\r\n function baseRepeat(string, n) {\r\n var result = '';\r\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\r\n return result;\r\n }\r\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\r\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\r\n do {\r\n if (n % 2) {\r\n result += string;\r\n }\r\n n = nativeFloor(n / 2);\r\n if (n) {\r\n string += string;\r\n }\r\n } while (n);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function baseRest(func, start) {\r\n return setToString(overRest(func, start, identity), func + '');\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sample`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to sample.\r\n * @returns {*} Returns the random element.\r\n */\r\n function baseSample(collection) {\r\n return arraySample(values(collection));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sampleSize` without param guards.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to sample.\r\n * @param {number} n The number of elements to sample.\r\n * @returns {Array} Returns the random elements.\r\n */\r\n function baseSampleSize(collection, n) {\r\n var array = values(collection);\r\n return shuffleSelf(array, baseClamp(n, 0, array.length));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.set`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @param {Function} [customizer] The function to customize path creation.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseSet(object, path, value, customizer) {\r\n if (!isObject(object)) {\r\n return object;\r\n }\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n lastIndex = length - 1,\r\n nested = object;\r\n\r\n while (nested != null && ++index < length) {\r\n var key = toKey(path[index]),\r\n newValue = value;\r\n\r\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\r\n return object;\r\n }\r\n\r\n if (index != lastIndex) {\r\n var objValue = nested[key];\r\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\r\n if (newValue === undefined) {\r\n newValue = isObject(objValue)\r\n ? objValue\r\n : (isIndex(path[index + 1]) ? [] : {});\r\n }\r\n }\r\n assignValue(nested, key, newValue);\r\n nested = nested[key];\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * The base implementation of `setData` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetData = !metaMap ? identity : function(func, data) {\r\n metaMap.set(func, data);\r\n return func;\r\n };\r\n\r\n /**\r\n * The base implementation of `setToString` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetToString = !defineProperty ? identity : function(func, string) {\r\n return defineProperty(func, 'toString', {\r\n 'configurable': true,\r\n 'enumerable': false,\r\n 'value': constant(string),\r\n 'writable': true\r\n });\r\n };\r\n\r\n /**\r\n * The base implementation of `_.shuffle`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to shuffle.\r\n * @returns {Array} Returns the new shuffled array.\r\n */\r\n function baseShuffle(collection) {\r\n return shuffleSelf(values(collection));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.slice` without an iteratee call guard.\r\n *\r\n * @private\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function baseSlice(array, start, end) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n if (start < 0) {\r\n start = -start > length ? 0 : (length + start);\r\n }\r\n end = end > length ? length : end;\r\n if (end < 0) {\r\n end += length;\r\n }\r\n length = start > end ? 0 : ((end - start) >>> 0);\r\n start >>>= 0;\r\n\r\n var result = Array(length);\r\n while (++index < length) {\r\n result[index] = array[index + start];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.some` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function baseSome(collection, predicate) {\r\n var result;\r\n\r\n baseEach(collection, function(value, index, collection) {\r\n result = predicate(value, index, collection);\r\n return !result;\r\n });\r\n return !!result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\r\n * performs a binary search of `array` to determine the index at which `value`\r\n * should be inserted into `array` in order to maintain its sort order.\r\n *\r\n * @private\r\n * @param {Array} array The sorted array to inspect.\r\n * @param {*} value The value to evaluate.\r\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\r\n * @returns {number} Returns the index at which `value` should be inserted\r\n * into `array`.\r\n */\r\n function baseSortedIndex(array, value, retHighest) {\r\n var low = 0,\r\n high = array == null ? low : array.length;\r\n\r\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\r\n while (low < high) {\r\n var mid = (low + high) >>> 1,\r\n computed = array[mid];\r\n\r\n if (computed !== null && !isSymbol(computed) &&\r\n (retHighest ? (computed <= value) : (computed < value))) {\r\n low = mid + 1;\r\n } else {\r\n high = mid;\r\n }\r\n }\r\n return high;\r\n }\r\n return baseSortedIndexBy(array, value, identity, retHighest);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\r\n * which invokes `iteratee` for `value` and each element of `array` to compute\r\n * their sort ranking. The iteratee is invoked with one argument; (value).\r\n *\r\n * @private\r\n * @param {Array} array The sorted array to inspect.\r\n * @param {*} value The value to evaluate.\r\n * @param {Function} iteratee The iteratee invoked per element.\r\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\r\n * @returns {number} Returns the index at which `value` should be inserted\r\n * into `array`.\r\n */\r\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\r\n var low = 0,\r\n high = array == null ? 0 : array.length;\r\n if (high === 0) {\r\n return 0;\r\n }\r\n\r\n value = iteratee(value);\r\n var valIsNaN = value !== value,\r\n valIsNull = value === null,\r\n valIsSymbol = isSymbol(value),\r\n valIsUndefined = value === undefined;\r\n\r\n while (low < high) {\r\n var mid = nativeFloor((low + high) / 2),\r\n computed = iteratee(array[mid]),\r\n othIsDefined = computed !== undefined,\r\n othIsNull = computed === null,\r\n othIsReflexive = computed === computed,\r\n othIsSymbol = isSymbol(computed);\r\n\r\n if (valIsNaN) {\r\n var setLow = retHighest || othIsReflexive;\r\n } else if (valIsUndefined) {\r\n setLow = othIsReflexive && (retHighest || othIsDefined);\r\n } else if (valIsNull) {\r\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\r\n } else if (valIsSymbol) {\r\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\r\n } else if (othIsNull || othIsSymbol) {\r\n setLow = false;\r\n } else {\r\n setLow = retHighest ? (computed <= value) : (computed < value);\r\n }\r\n if (setLow) {\r\n low = mid + 1;\r\n } else {\r\n high = mid;\r\n }\r\n }\r\n return nativeMin(high, MAX_ARRAY_INDEX);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\r\n * support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n */\r\n function baseSortedUniq(array, iteratee) {\r\n var index = -1,\r\n length = array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n if (!index || !eq(computed, seen)) {\r\n var seen = computed;\r\n result[resIndex++] = value === 0 ? 0 : value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toNumber` which doesn't ensure correct\r\n * conversions of binary, hexadecimal, or octal string values.\r\n *\r\n * @private\r\n * @param {*} value The value to process.\r\n * @returns {number} Returns the number.\r\n */\r\n function baseToNumber(value) {\r\n if (typeof value == 'number') {\r\n return value;\r\n }\r\n if (isSymbol(value)) {\r\n return NAN;\r\n }\r\n return +value;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toString` which doesn't convert nullish\r\n * values to empty strings.\r\n *\r\n * @private\r\n * @param {*} value The value to process.\r\n * @returns {string} Returns the string.\r\n */\r\n function baseToString(value) {\r\n // Exit early for strings to avoid a performance hit in some environments.\r\n if (typeof value == 'string') {\r\n return value;\r\n }\r\n if (isArray(value)) {\r\n // Recursively convert values (susceptible to call stack limits).\r\n return arrayMap(value, baseToString) + '';\r\n }\r\n if (isSymbol(value)) {\r\n return symbolToString ? symbolToString.call(value) : '';\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n */\r\n function baseUniq(array, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n length = array.length,\r\n isCommon = true,\r\n result = [],\r\n seen = result;\r\n\r\n if (comparator) {\r\n isCommon = false;\r\n includes = arrayIncludesWith;\r\n }\r\n else if (length >= LARGE_ARRAY_SIZE) {\r\n var set = iteratee ? null : createSet(array);\r\n if (set) {\r\n return setToArray(set);\r\n }\r\n isCommon = false;\r\n includes = cacheHas;\r\n seen = new SetCache;\r\n }\r\n else {\r\n seen = iteratee ? [] : result;\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var seenIndex = seen.length;\r\n while (seenIndex--) {\r\n if (seen[seenIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n if (iteratee) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(seen, computed, comparator)) {\r\n if (seen !== result) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unset`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The property path to unset.\r\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\r\n */\r\n function baseUnset(object, path) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n return object == null || delete object[toKey(last(path))];\r\n }\r\n\r\n /**\r\n * The base implementation of `_.update`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to update.\r\n * @param {Function} updater The function to produce the updated value.\r\n * @param {Function} [customizer] The function to customize path creation.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseUpdate(object, path, updater, customizer) {\r\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\r\n * without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to query.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function baseWhile(array, predicate, isDrop, fromRight) {\r\n var length = array.length,\r\n index = fromRight ? length : -1;\r\n\r\n while ((fromRight ? index-- : ++index < length) &&\r\n predicate(array[index], index, array)) {}\r\n\r\n return isDrop\r\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\r\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\r\n }\r\n\r\n /**\r\n * The base implementation of `wrapperValue` which returns the result of\r\n * performing a sequence of actions on the unwrapped `value`, where each\r\n * successive action is supplied the return value of the previous.\r\n *\r\n * @private\r\n * @param {*} value The unwrapped value.\r\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseWrapperValue(value, actions) {\r\n var result = value;\r\n if (result instanceof LazyWrapper) {\r\n result = result.value();\r\n }\r\n return arrayReduce(actions, function(result, action) {\r\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\r\n }, result);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.xor`, without support for\r\n * iteratee shorthands, that accepts an array of arrays to inspect.\r\n *\r\n * @private\r\n * @param {Array} arrays The arrays to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of values.\r\n */\r\n function baseXor(arrays, iteratee, comparator) {\r\n var length = arrays.length;\r\n if (length < 2) {\r\n return length ? baseUniq(arrays[0]) : [];\r\n }\r\n var index = -1,\r\n result = Array(length);\r\n\r\n while (++index < length) {\r\n var array = arrays[index],\r\n othIndex = -1;\r\n\r\n while (++othIndex < length) {\r\n if (othIndex != index) {\r\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\r\n }\r\n }\r\n }\r\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\r\n }\r\n\r\n /**\r\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\r\n *\r\n * @private\r\n * @param {Array} props The property identifiers.\r\n * @param {Array} values The property values.\r\n * @param {Function} assignFunc The function to assign values.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function baseZipObject(props, values, assignFunc) {\r\n var index = -1,\r\n length = props.length,\r\n valsLength = values.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var value = index < valsLength ? values[index] : undefined;\r\n assignFunc(result, props[index], value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Casts `value` to an empty array if it's not an array like object.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {Array|Object} Returns the cast array-like object.\r\n */\r\n function castArrayLikeObject(value) {\r\n return isArrayLikeObject(value) ? value : [];\r\n }\r\n\r\n /**\r\n * Casts `value` to `identity` if it's not a function.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {Function} Returns cast function.\r\n */\r\n function castFunction(value) {\r\n return typeof value == 'function' ? value : identity;\r\n }\r\n\r\n /**\r\n * Casts `value` to a path array if it's not one.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {Array} Returns the cast property path array.\r\n */\r\n function castPath(value, object) {\r\n if (isArray(value)) {\r\n return value;\r\n }\r\n return isKey(value, object) ? [value] : stringToPath(toString(value));\r\n }\r\n\r\n /**\r\n * A `baseRest` alias which can be replaced with `identity` by module\r\n * replacement plugins.\r\n *\r\n * @private\r\n * @type {Function}\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @returns {Function} Returns the new function.\r\n */\r\n var castRest = baseRest;\r\n\r\n /**\r\n * Casts `array` to a slice if it's needed.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {number} start The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the cast slice.\r\n */\r\n function castSlice(array, start, end) {\r\n var length = array.length;\r\n end = end === undefined ? length : end;\r\n return (!start && end >= length) ? array : baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\r\n *\r\n * @private\r\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\r\n */\r\n var clearTimeout = ctxClearTimeout || function(id) {\r\n return root.clearTimeout(id);\r\n };\r\n\r\n /**\r\n * Creates a clone of `buffer`.\r\n *\r\n * @private\r\n * @param {Buffer} buffer The buffer to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Buffer} Returns the cloned buffer.\r\n */\r\n function cloneBuffer(buffer, isDeep) {\r\n if (isDeep) {\r\n return buffer.slice();\r\n }\r\n var length = buffer.length,\r\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\r\n\r\n buffer.copy(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `arrayBuffer`.\r\n *\r\n * @private\r\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\r\n * @returns {ArrayBuffer} Returns the cloned array buffer.\r\n */\r\n function cloneArrayBuffer(arrayBuffer) {\r\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\r\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `dataView`.\r\n *\r\n * @private\r\n * @param {Object} dataView The data view to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned data view.\r\n */\r\n function cloneDataView(dataView, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\r\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n\r\n /**\r\n * Creates a clone of `regexp`.\r\n *\r\n * @private\r\n * @param {Object} regexp The regexp to clone.\r\n * @returns {Object} Returns the cloned regexp.\r\n */\r\n function cloneRegExp(regexp) {\r\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\r\n result.lastIndex = regexp.lastIndex;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of the `symbol` object.\r\n *\r\n * @private\r\n * @param {Object} symbol The symbol object to clone.\r\n * @returns {Object} Returns the cloned symbol object.\r\n */\r\n function cloneSymbol(symbol) {\r\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\r\n }\r\n\r\n /**\r\n * Creates a clone of `typedArray`.\r\n *\r\n * @private\r\n * @param {Object} typedArray The typed array to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned typed array.\r\n */\r\n function cloneTypedArray(typedArray, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\r\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\r\n }\r\n\r\n /**\r\n * Compares values to sort them in ascending order.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {number} Returns the sort order indicator for `value`.\r\n */\r\n function compareAscending(value, other) {\r\n if (value !== other) {\r\n var valIsDefined = value !== undefined,\r\n valIsNull = value === null,\r\n valIsReflexive = value === value,\r\n valIsSymbol = isSymbol(value);\r\n\r\n var othIsDefined = other !== undefined,\r\n othIsNull = other === null,\r\n othIsReflexive = other === other,\r\n othIsSymbol = isSymbol(other);\r\n\r\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\r\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\r\n (valIsNull && othIsDefined && othIsReflexive) ||\r\n (!valIsDefined && othIsReflexive) ||\r\n !valIsReflexive) {\r\n return 1;\r\n }\r\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\r\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\r\n (othIsNull && valIsDefined && valIsReflexive) ||\r\n (!othIsDefined && valIsReflexive) ||\r\n !othIsReflexive) {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Used by `_.orderBy` to compare multiple properties of a value to another\r\n * and stable sort them.\r\n *\r\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\r\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\r\n * of corresponding values.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {boolean[]|string[]} orders The order to sort by for each property.\r\n * @returns {number} Returns the sort order indicator for `object`.\r\n */\r\n function compareMultiple(object, other, orders) {\r\n var index = -1,\r\n objCriteria = object.criteria,\r\n othCriteria = other.criteria,\r\n length = objCriteria.length,\r\n ordersLength = orders.length;\r\n\r\n while (++index < length) {\r\n var result = compareAscending(objCriteria[index], othCriteria[index]);\r\n if (result) {\r\n if (index >= ordersLength) {\r\n return result;\r\n }\r\n var order = orders[index];\r\n return result * (order == 'desc' ? -1 : 1);\r\n }\r\n }\r\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\r\n // that causes it, under certain circumstances, to provide the same value for\r\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\r\n // for more details.\r\n //\r\n // This also ensures a stable sort in V8 and other engines.\r\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\r\n return object.index - other.index;\r\n }\r\n\r\n /**\r\n * Creates an array that is the composition of partially applied arguments,\r\n * placeholders, and provided arguments into a single array of arguments.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to prepend to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgs(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersLength = holders.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(leftLength + rangeLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++leftIndex < leftLength) {\r\n result[leftIndex] = partials[leftIndex];\r\n }\r\n while (++argsIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[holders[argsIndex]] = args[argsIndex];\r\n }\r\n }\r\n while (rangeLength--) {\r\n result[leftIndex++] = args[argsIndex++];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `composeArgs` except that the arguments composition\r\n * is tailored for `_.partialRight`.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to append to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgsRight(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersIndex = -1,\r\n holdersLength = holders.length,\r\n rightIndex = -1,\r\n rightLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(rangeLength + rightLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++argsIndex < rangeLength) {\r\n result[argsIndex] = args[argsIndex];\r\n }\r\n var offset = argsIndex;\r\n while (++rightIndex < rightLength) {\r\n result[offset + rightIndex] = partials[rightIndex];\r\n }\r\n while (++holdersIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[offset + holders[holdersIndex]] = args[argsIndex++];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Copies the values of `source` to `array`.\r\n *\r\n * @private\r\n * @param {Array} source The array to copy values from.\r\n * @param {Array} [array=[]] The array to copy values to.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function copyArray(source, array) {\r\n var index = -1,\r\n length = source.length;\r\n\r\n array || (array = Array(length));\r\n while (++index < length) {\r\n array[index] = source[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Copies properties of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy properties from.\r\n * @param {Array} props The property identifiers to copy.\r\n * @param {Object} [object={}] The object to copy properties to.\r\n * @param {Function} [customizer] The function to customize copied values.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copyObject(source, props, object, customizer) {\r\n var isNew = !object;\r\n object || (object = {});\r\n\r\n var index = -1,\r\n length = props.length;\r\n\r\n while (++index < length) {\r\n var key = props[index];\r\n\r\n var newValue = customizer\r\n ? customizer(object[key], source[key], key, object, source)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = source[key];\r\n }\r\n if (isNew) {\r\n baseAssignValue(object, key, newValue);\r\n } else {\r\n assignValue(object, key, newValue);\r\n }\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Copies own symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbols(source, object) {\r\n return copyObject(source, getSymbols(source), object);\r\n }\r\n\r\n /**\r\n * Copies own and inherited symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbolsIn(source, object) {\r\n return copyObject(source, getSymbolsIn(source), object);\r\n }\r\n\r\n /**\r\n * Creates a function like `_.groupBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} [initializer] The accumulator object initializer.\r\n * @returns {Function} Returns the new aggregator function.\r\n */\r\n function createAggregator(setter, initializer) {\r\n return function(collection, iteratee) {\r\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\r\n accumulator = initializer ? initializer() : {};\r\n\r\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.assign`.\r\n *\r\n * @private\r\n * @param {Function} assigner The function to assign values.\r\n * @returns {Function} Returns the new assigner function.\r\n */\r\n function createAssigner(assigner) {\r\n return baseRest(function(object, sources) {\r\n var index = -1,\r\n length = sources.length,\r\n customizer = length > 1 ? sources[length - 1] : undefined,\r\n guard = length > 2 ? sources[2] : undefined;\r\n\r\n customizer = (assigner.length > 3 && typeof customizer == 'function')\r\n ? (length--, customizer)\r\n : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n customizer = length < 3 ? undefined : customizer;\r\n length = 1;\r\n }\r\n object = Object(object);\r\n while (++index < length) {\r\n var source = sources[index];\r\n if (source) {\r\n assigner(object, source, index, customizer);\r\n }\r\n }\r\n return object;\r\n });\r\n }\r\n\r\n /**\r\n * Creates a `baseEach` or `baseEachRight` function.\r\n *\r\n * @private\r\n * @param {Function} eachFunc The function to iterate over a collection.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseEach(eachFunc, fromRight) {\r\n return function(collection, iteratee) {\r\n if (collection == null) {\r\n return collection;\r\n }\r\n if (!isArrayLike(collection)) {\r\n return eachFunc(collection, iteratee);\r\n }\r\n var length = collection.length,\r\n index = fromRight ? length : -1,\r\n iterable = Object(collection);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (iteratee(iterable[index], index, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return collection;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseFor(fromRight) {\r\n return function(object, iteratee, keysFunc) {\r\n var index = -1,\r\n iterable = Object(object),\r\n props = keysFunc(object),\r\n length = props.length;\r\n\r\n while (length--) {\r\n var key = props[fromRight ? length : ++index];\r\n if (iteratee(iterable[key], key, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return object;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the optional `this`\r\n * binding of `thisArg`.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createBind(func, bitmask, thisArg) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return fn.apply(isBind ? thisArg : this, arguments);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function like `_.lowerFirst`.\r\n *\r\n * @private\r\n * @param {string} methodName The name of the `String` case method to use.\r\n * @returns {Function} Returns the new case function.\r\n */\r\n function createCaseFirst(methodName) {\r\n return function(string) {\r\n string = toString(string);\r\n\r\n var strSymbols = hasUnicode(string)\r\n ? stringToArray(string)\r\n : undefined;\r\n\r\n var chr = strSymbols\r\n ? strSymbols[0]\r\n : string.charAt(0);\r\n\r\n var trailing = strSymbols\r\n ? castSlice(strSymbols, 1).join('')\r\n : string.slice(1);\r\n\r\n return chr[methodName]() + trailing;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.camelCase`.\r\n *\r\n * @private\r\n * @param {Function} callback The function to combine each word.\r\n * @returns {Function} Returns the new compounder function.\r\n */\r\n function createCompounder(callback) {\r\n return function(string) {\r\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that produces an instance of `Ctor` regardless of\r\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\r\n *\r\n * @private\r\n * @param {Function} Ctor The constructor to wrap.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCtor(Ctor) {\r\n return function() {\r\n // Use a `switch` statement to work with class constructors. See\r\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\r\n // for more details.\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return new Ctor;\r\n case 1: return new Ctor(args[0]);\r\n case 2: return new Ctor(args[0], args[1]);\r\n case 3: return new Ctor(args[0], args[1], args[2]);\r\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\r\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\r\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n }\r\n var thisBinding = baseCreate(Ctor.prototype),\r\n result = Ctor.apply(thisBinding, args);\r\n\r\n // Mimic the constructor's `return` behavior.\r\n // See https://es5.github.io/#x13.2.2 for more details.\r\n return isObject(result) ? result : thisBinding;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to enable currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {number} arity The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCurry(func, bitmask, arity) {\r\n var Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length,\r\n placeholder = getHolder(wrapper);\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\r\n ? []\r\n : replaceHolders(args, placeholder);\r\n\r\n length -= holders.length;\r\n if (length < arity) {\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\r\n args, holders, undefined, undefined, arity - length);\r\n }\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return apply(fn, this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.find` or `_.findLast` function.\r\n *\r\n * @private\r\n * @param {Function} findIndexFunc The function to find the collection index.\r\n * @returns {Function} Returns the new find function.\r\n */\r\n function createFind(findIndexFunc) {\r\n return function(collection, predicate, fromIndex) {\r\n var iterable = Object(collection);\r\n if (!isArrayLike(collection)) {\r\n var iteratee = getIteratee(predicate, 3);\r\n collection = keys(collection);\r\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\r\n }\r\n var index = findIndexFunc(collection, predicate, fromIndex);\r\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a `_.flow` or `_.flowRight` function.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new flow function.\r\n */\r\n function createFlow(fromRight) {\r\n return flatRest(function(funcs) {\r\n var length = funcs.length,\r\n index = length,\r\n prereq = LodashWrapper.prototype.thru;\r\n\r\n if (fromRight) {\r\n funcs.reverse();\r\n }\r\n while (index--) {\r\n var func = funcs[index];\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\r\n var wrapper = new LodashWrapper([], true);\r\n }\r\n }\r\n index = wrapper ? index : length;\r\n while (++index < length) {\r\n func = funcs[index];\r\n\r\n var funcName = getFuncName(func),\r\n data = funcName == 'wrapper' ? getData(func) : undefined;\r\n\r\n if (data && isLaziable(data[0]) &&\r\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\r\n !data[4].length && data[9] == 1\r\n ) {\r\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\r\n } else {\r\n wrapper = (func.length == 1 && isLaziable(func))\r\n ? wrapper[funcName]()\r\n : wrapper.thru(func);\r\n }\r\n }\r\n return function() {\r\n var args = arguments,\r\n value = args[0];\r\n\r\n if (wrapper && args.length == 1 && isArray(value)) {\r\n return wrapper.plant(value).value();\r\n }\r\n var index = 0,\r\n result = length ? funcs[index].apply(this, args) : value;\r\n\r\n while (++index < length) {\r\n result = funcs[index].call(this, result);\r\n }\r\n return result;\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with optional `this`\r\n * binding of `thisArg`, partial application, and currying.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [partialsRight] The arguments to append to those provided\r\n * to the new function.\r\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\r\n var isAry = bitmask & WRAP_ARY_FLAG,\r\n isBind = bitmask & WRAP_BIND_FLAG,\r\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\r\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\r\n isFlip = bitmask & WRAP_FLIP_FLAG,\r\n Ctor = isBindKey ? undefined : createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length;\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n if (isCurried) {\r\n var placeholder = getHolder(wrapper),\r\n holdersCount = countHolders(args, placeholder);\r\n }\r\n if (partials) {\r\n args = composeArgs(args, partials, holders, isCurried);\r\n }\r\n if (partialsRight) {\r\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\r\n }\r\n length -= holdersCount;\r\n if (isCurried && length < arity) {\r\n var newHolders = replaceHolders(args, placeholder);\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\r\n args, newHolders, argPos, ary, arity - length\r\n );\r\n }\r\n var thisBinding = isBind ? thisArg : this,\r\n fn = isBindKey ? thisBinding[func] : func;\r\n\r\n length = args.length;\r\n if (argPos) {\r\n args = reorder(args, argPos);\r\n } else if (isFlip && length > 1) {\r\n args.reverse();\r\n }\r\n if (isAry && ary < length) {\r\n args.length = ary;\r\n }\r\n if (this && this !== root && this instanceof wrapper) {\r\n fn = Ctor || createCtor(fn);\r\n }\r\n return fn.apply(thisBinding, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function like `_.invertBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} toIteratee The function to resolve iteratees.\r\n * @returns {Function} Returns the new inverter function.\r\n */\r\n function createInverter(setter, toIteratee) {\r\n return function(object, iteratee) {\r\n return baseInverter(object, setter, toIteratee(iteratee), {});\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that performs a mathematical operation on two values.\r\n *\r\n * @private\r\n * @param {Function} operator The function to perform the operation.\r\n * @param {number} [defaultValue] The value used for `undefined` arguments.\r\n * @returns {Function} Returns the new mathematical operation function.\r\n */\r\n function createMathOperation(operator, defaultValue) {\r\n return function(value, other) {\r\n var result;\r\n if (value === undefined && other === undefined) {\r\n return defaultValue;\r\n }\r\n if (value !== undefined) {\r\n result = value;\r\n }\r\n if (other !== undefined) {\r\n if (result === undefined) {\r\n return other;\r\n }\r\n if (typeof value == 'string' || typeof other == 'string') {\r\n value = baseToString(value);\r\n other = baseToString(other);\r\n } else {\r\n value = baseToNumber(value);\r\n other = baseToNumber(other);\r\n }\r\n result = operator(value, other);\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.over`.\r\n *\r\n * @private\r\n * @param {Function} arrayFunc The function to iterate over iteratees.\r\n * @returns {Function} Returns the new over function.\r\n */\r\n function createOver(arrayFunc) {\r\n return flatRest(function(iteratees) {\r\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\r\n return baseRest(function(args) {\r\n var thisArg = this;\r\n return arrayFunc(iteratees, function(iteratee) {\r\n return apply(iteratee, thisArg, args);\r\n });\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Creates the padding for `string` based on `length`. The `chars` string\r\n * is truncated if the number of characters exceeds `length`.\r\n *\r\n * @private\r\n * @param {number} length The padding length.\r\n * @param {string} [chars=' '] The string used as padding.\r\n * @returns {string} Returns the padding for `string`.\r\n */\r\n function createPadding(length, chars) {\r\n chars = chars === undefined ? ' ' : baseToString(chars);\r\n\r\n var charsLength = chars.length;\r\n if (charsLength < 2) {\r\n return charsLength ? baseRepeat(chars, length) : chars;\r\n }\r\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\r\n return hasUnicode(chars)\r\n ? castSlice(stringToArray(result), 0, length).join('')\r\n : result.slice(0, length);\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the `this` binding\r\n * of `thisArg` and `partials` prepended to the arguments it receives.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} partials The arguments to prepend to those provided to\r\n * the new function.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createPartial(func, bitmask, thisArg, partials) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var argsIndex = -1,\r\n argsLength = arguments.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n args = Array(leftLength + argsLength),\r\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n\r\n while (++leftIndex < leftLength) {\r\n args[leftIndex] = partials[leftIndex];\r\n }\r\n while (argsLength--) {\r\n args[leftIndex++] = arguments[++argsIndex];\r\n }\r\n return apply(fn, isBind ? thisArg : this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.range` or `_.rangeRight` function.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new range function.\r\n */\r\n function createRange(fromRight) {\r\n return function(start, end, step) {\r\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\r\n end = step = undefined;\r\n }\r\n // Ensure the sign of `-0` is preserved.\r\n start = toFinite(start);\r\n if (end === undefined) {\r\n end = start;\r\n start = 0;\r\n } else {\r\n end = toFinite(end);\r\n }\r\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\r\n return baseRange(start, end, step, fromRight);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that performs a relational operation on two values.\r\n *\r\n * @private\r\n * @param {Function} operator The function to perform the operation.\r\n * @returns {Function} Returns the new relational operation function.\r\n */\r\n function createRelationalOperation(operator) {\r\n return function(value, other) {\r\n if (!(typeof value == 'string' && typeof other == 'string')) {\r\n value = toNumber(value);\r\n other = toNumber(other);\r\n }\r\n return operator(value, other);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to continue currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {Function} wrapFunc The function to create the `func` wrapper.\r\n * @param {*} placeholder The placeholder value.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\r\n var isCurry = bitmask & WRAP_CURRY_FLAG,\r\n newHolders = isCurry ? holders : undefined,\r\n newHoldersRight = isCurry ? undefined : holders,\r\n newPartials = isCurry ? partials : undefined,\r\n newPartialsRight = isCurry ? undefined : partials;\r\n\r\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\r\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\r\n\r\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\r\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\r\n }\r\n var newData = [\r\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\r\n newHoldersRight, argPos, ary, arity\r\n ];\r\n\r\n var result = wrapFunc.apply(undefined, newData);\r\n if (isLaziable(func)) {\r\n setData(result, newData);\r\n }\r\n result.placeholder = placeholder;\r\n return setWrapToString(result, func, bitmask);\r\n }\r\n\r\n /**\r\n * Creates a function like `_.round`.\r\n *\r\n * @private\r\n * @param {string} methodName The name of the `Math` method to use when rounding.\r\n * @returns {Function} Returns the new round function.\r\n */\r\n function createRound(methodName) {\r\n var func = Math[methodName];\r\n return function(number, precision) {\r\n number = toNumber(number);\r\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\r\n if (precision && nativeIsFinite(number)) {\r\n // Shift with exponential notation to avoid floating-point issues.\r\n // See [MDN](https://mdn.io/round#Examples) for more details.\r\n var pair = (toString(number) + 'e').split('e'),\r\n value = func(pair[0] + 'e' + (+pair[1] + precision));\r\n\r\n pair = (toString(value) + 'e').split('e');\r\n return +(pair[0] + 'e' + (+pair[1] - precision));\r\n }\r\n return func(number);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a set object of `values`.\r\n *\r\n * @private\r\n * @param {Array} values The values to add to the set.\r\n * @returns {Object} Returns the new set.\r\n */\r\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\r\n return new Set(values);\r\n };\r\n\r\n /**\r\n * Creates a `_.toPairs` or `_.toPairsIn` function.\r\n *\r\n * @private\r\n * @param {Function} keysFunc The function to get the keys of a given object.\r\n * @returns {Function} Returns the new pairs function.\r\n */\r\n function createToPairs(keysFunc) {\r\n return function(object) {\r\n var tag = getTag(object);\r\n if (tag == mapTag) {\r\n return mapToArray(object);\r\n }\r\n if (tag == setTag) {\r\n return setToPairs(object);\r\n }\r\n return baseToPairs(object, keysFunc(object));\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that either curries or invokes `func` with optional\r\n * `this` binding and partially applied arguments.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags.\r\n * 1 - `_.bind`\r\n * 2 - `_.bindKey`\r\n * 4 - `_.curry` or `_.curryRight` of a bound function\r\n * 8 - `_.curry`\r\n * 16 - `_.curryRight`\r\n * 32 - `_.partial`\r\n * 64 - `_.partialRight`\r\n * 128 - `_.rearg`\r\n * 256 - `_.ary`\r\n * 512 - `_.flip`\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to be partially applied.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\r\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\r\n if (!isBindKey && typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var length = partials ? partials.length : 0;\r\n if (!length) {\r\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\r\n partials = holders = undefined;\r\n }\r\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\r\n arity = arity === undefined ? arity : toInteger(arity);\r\n length -= holders ? holders.length : 0;\r\n\r\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\r\n var partialsRight = partials,\r\n holdersRight = holders;\r\n\r\n partials = holders = undefined;\r\n }\r\n var data = isBindKey ? undefined : getData(func);\r\n\r\n var newData = [\r\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\r\n argPos, ary, arity\r\n ];\r\n\r\n if (data) {\r\n mergeData(newData, data);\r\n }\r\n func = newData[0];\r\n bitmask = newData[1];\r\n thisArg = newData[2];\r\n partials = newData[3];\r\n holders = newData[4];\r\n arity = newData[9] = newData[9] === undefined\r\n ? (isBindKey ? 0 : func.length)\r\n : nativeMax(newData[9] - length, 0);\r\n\r\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\r\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\r\n }\r\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\r\n var result = createBind(func, bitmask, thisArg);\r\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\r\n result = createCurry(func, bitmask, arity);\r\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\r\n result = createPartial(func, bitmask, thisArg, partials);\r\n } else {\r\n result = createHybrid.apply(undefined, newData);\r\n }\r\n var setter = data ? baseSetData : setData;\r\n return setWrapToString(setter(result, newData), func, bitmask);\r\n }\r\n\r\n /**\r\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\r\n * of source objects to the destination object for all destination properties\r\n * that resolve to `undefined`.\r\n *\r\n * @private\r\n * @param {*} objValue The destination value.\r\n * @param {*} srcValue The source value.\r\n * @param {string} key The key of the property to assign.\r\n * @param {Object} object The parent object of `objValue`.\r\n * @returns {*} Returns the value to assign.\r\n */\r\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\r\n if (objValue === undefined ||\r\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\r\n return srcValue;\r\n }\r\n return objValue;\r\n }\r\n\r\n /**\r\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\r\n * objects into destination objects that are passed thru.\r\n *\r\n * @private\r\n * @param {*} objValue The destination value.\r\n * @param {*} srcValue The source value.\r\n * @param {string} key The key of the property to merge.\r\n * @param {Object} object The parent object of `objValue`.\r\n * @param {Object} source The parent object of `srcValue`.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n * @returns {*} Returns the value to assign.\r\n */\r\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\r\n if (isObject(objValue) && isObject(srcValue)) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, objValue);\r\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\r\n stack['delete'](srcValue);\r\n }\r\n return objValue;\r\n }\r\n\r\n /**\r\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\r\n * objects.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {string} key The key of the property to inspect.\r\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\r\n */\r\n function customOmitClone(value) {\r\n return isPlainObject(value) ? undefined : value;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for arrays with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Array} array The array to compare.\r\n * @param {Array} other The other array to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `array` and `other` objects.\r\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\r\n */\r\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n arrLength = array.length,\r\n othLength = other.length;\r\n\r\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\r\n return false;\r\n }\r\n // Check that cyclic values are equal.\r\n var arrStacked = stack.get(array);\r\n var othStacked = stack.get(other);\r\n if (arrStacked && othStacked) {\r\n return arrStacked == other && othStacked == array;\r\n }\r\n var index = -1,\r\n result = true,\r\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\r\n\r\n stack.set(array, other);\r\n stack.set(other, array);\r\n\r\n // Ignore non-index properties.\r\n while (++index < arrLength) {\r\n var arrValue = array[index],\r\n othValue = other[index];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, arrValue, index, other, array, stack)\r\n : customizer(arrValue, othValue, index, array, other, stack);\r\n }\r\n if (compared !== undefined) {\r\n if (compared) {\r\n continue;\r\n }\r\n result = false;\r\n break;\r\n }\r\n // Recursively compare arrays (susceptible to call stack limits).\r\n if (seen) {\r\n if (!arraySome(other, function(othValue, othIndex) {\r\n if (!cacheHas(seen, othIndex) &&\r\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\r\n return seen.push(othIndex);\r\n }\r\n })) {\r\n result = false;\r\n break;\r\n }\r\n } else if (!(\r\n arrValue === othValue ||\r\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n }\r\n stack['delete'](array);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for comparing objects of\r\n * the same `toStringTag`.\r\n *\r\n * **Note:** This function only supports comparing values with tags of\r\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {string} tag The `toStringTag` of the objects to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\r\n switch (tag) {\r\n case dataViewTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n (object.byteOffset != other.byteOffset)) {\r\n return false;\r\n }\r\n object = object.buffer;\r\n other = other.buffer;\r\n\r\n case arrayBufferTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\r\n return false;\r\n }\r\n return true;\r\n\r\n case boolTag:\r\n case dateTag:\r\n case numberTag:\r\n // Coerce booleans to `1` or `0` and dates to milliseconds.\r\n // Invalid dates are coerced to `NaN`.\r\n return eq(+object, +other);\r\n\r\n case errorTag:\r\n return object.name == other.name && object.message == other.message;\r\n\r\n case regexpTag:\r\n case stringTag:\r\n // Coerce regexes to strings and treat strings, primitives and objects,\r\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\r\n // for more details.\r\n return object == (other + '');\r\n\r\n case mapTag:\r\n var convert = mapToArray;\r\n\r\n case setTag:\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\r\n convert || (convert = setToArray);\r\n\r\n if (object.size != other.size && !isPartial) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked) {\r\n return stacked == other;\r\n }\r\n bitmask |= COMPARE_UNORDERED_FLAG;\r\n\r\n // Recursively compare objects (susceptible to call stack limits).\r\n stack.set(object, other);\r\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\r\n stack['delete'](object);\r\n return result;\r\n\r\n case symbolTag:\r\n if (symbolValueOf) {\r\n return symbolValueOf.call(object) == symbolValueOf.call(other);\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for objects with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n objProps = getAllKeys(object),\r\n objLength = objProps.length,\r\n othProps = getAllKeys(other),\r\n othLength = othProps.length;\r\n\r\n if (objLength != othLength && !isPartial) {\r\n return false;\r\n }\r\n var index = objLength;\r\n while (index--) {\r\n var key = objProps[index];\r\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\r\n return false;\r\n }\r\n }\r\n // Check that cyclic values are equal.\r\n var objStacked = stack.get(object);\r\n var othStacked = stack.get(other);\r\n if (objStacked && othStacked) {\r\n return objStacked == other && othStacked == object;\r\n }\r\n var result = true;\r\n stack.set(object, other);\r\n stack.set(other, object);\r\n\r\n var skipCtor = isPartial;\r\n while (++index < objLength) {\r\n key = objProps[index];\r\n var objValue = object[key],\r\n othValue = other[key];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, objValue, key, other, object, stack)\r\n : customizer(objValue, othValue, key, object, other, stack);\r\n }\r\n // Recursively compare objects (susceptible to call stack limits).\r\n if (!(compared === undefined\r\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\r\n : compared\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n skipCtor || (skipCtor = key == 'constructor');\r\n }\r\n if (result && !skipCtor) {\r\n var objCtor = object.constructor,\r\n othCtor = other.constructor;\r\n\r\n // Non `Object` object instances with different constructors are not equal.\r\n if (objCtor != othCtor &&\r\n ('constructor' in object && 'constructor' in other) &&\r\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\r\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\r\n result = false;\r\n }\r\n }\r\n stack['delete'](object);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which flattens the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function flatRest(func) {\r\n return setToString(overRest(func, undefined, flatten), func + '');\r\n }\r\n\r\n /**\r\n * Creates an array of own enumerable property names and symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeys(object) {\r\n return baseGetAllKeys(object, keys, getSymbols);\r\n }\r\n\r\n /**\r\n * Creates an array of own and inherited enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeysIn(object) {\r\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\r\n }\r\n\r\n /**\r\n * Gets metadata for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {*} Returns the metadata for `func`.\r\n */\r\n var getData = !metaMap ? noop : function(func) {\r\n return metaMap.get(func);\r\n };\r\n\r\n /**\r\n * Gets the name of `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {string} Returns the function name.\r\n */\r\n function getFuncName(func) {\r\n var result = (func.name + ''),\r\n array = realNames[result],\r\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\r\n\r\n while (length--) {\r\n var data = array[length],\r\n otherFunc = data.func;\r\n if (otherFunc == null || otherFunc == func) {\r\n return data.name;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the argument placeholder value for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to inspect.\r\n * @returns {*} Returns the placeholder value.\r\n */\r\n function getHolder(func) {\r\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\r\n return object.placeholder;\r\n }\r\n\r\n /**\r\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\r\n * this function returns the custom method, otherwise it returns `baseIteratee`.\r\n * If arguments are provided, the chosen function is invoked with them and\r\n * its result is returned.\r\n *\r\n * @private\r\n * @param {*} [value] The value to convert to an iteratee.\r\n * @param {number} [arity] The arity of the created iteratee.\r\n * @returns {Function} Returns the chosen function or its result.\r\n */\r\n function getIteratee() {\r\n var result = lodash.iteratee || iteratee;\r\n result = result === iteratee ? baseIteratee : result;\r\n return arguments.length ? result(arguments[0], arguments[1]) : result;\r\n }\r\n\r\n /**\r\n * Gets the data for `map`.\r\n *\r\n * @private\r\n * @param {Object} map The map to query.\r\n * @param {string} key The reference key.\r\n * @returns {*} Returns the map data.\r\n */\r\n function getMapData(map, key) {\r\n var data = map.__data__;\r\n return isKeyable(key)\r\n ? data[typeof key == 'string' ? 'string' : 'hash']\r\n : data.map;\r\n }\r\n\r\n /**\r\n * Gets the property names, values, and compare flags of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the match data of `object`.\r\n */\r\n function getMatchData(object) {\r\n var result = keys(object),\r\n length = result.length;\r\n\r\n while (length--) {\r\n var key = result[length],\r\n value = object[key];\r\n\r\n result[length] = [key, value, isStrictComparable(value)];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the native function at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the method to get.\r\n * @returns {*} Returns the function if it's native, else `undefined`.\r\n */\r\n function getNative(object, key) {\r\n var value = getValue(object, key);\r\n return baseIsNative(value) ? value : undefined;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the raw `toStringTag`.\r\n */\r\n function getRawTag(value) {\r\n var isOwn = hasOwnProperty.call(value, symToStringTag),\r\n tag = value[symToStringTag];\r\n\r\n try {\r\n value[symToStringTag] = undefined;\r\n var unmasked = true;\r\n } catch (e) {}\r\n\r\n var result = nativeObjectToString.call(value);\r\n if (unmasked) {\r\n if (isOwn) {\r\n value[symToStringTag] = tag;\r\n } else {\r\n delete value[symToStringTag];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\r\n if (object == null) {\r\n return [];\r\n }\r\n object = Object(object);\r\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\r\n return propertyIsEnumerable.call(object, symbol);\r\n });\r\n };\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\r\n var result = [];\r\n while (object) {\r\n arrayPush(result, getSymbols(object));\r\n object = getPrototype(object);\r\n }\r\n return result;\r\n };\r\n\r\n /**\r\n * Gets the `toStringTag` of `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n var getTag = baseGetTag;\r\n\r\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\r\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\r\n (Map && getTag(new Map) != mapTag) ||\r\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\r\n (Set && getTag(new Set) != setTag) ||\r\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\r\n getTag = function(value) {\r\n var result = baseGetTag(value),\r\n Ctor = result == objectTag ? value.constructor : undefined,\r\n ctorString = Ctor ? toSource(Ctor) : '';\r\n\r\n if (ctorString) {\r\n switch (ctorString) {\r\n case dataViewCtorString: return dataViewTag;\r\n case mapCtorString: return mapTag;\r\n case promiseCtorString: return promiseTag;\r\n case setCtorString: return setTag;\r\n case weakMapCtorString: return weakMapTag;\r\n }\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\r\n *\r\n * @private\r\n * @param {number} start The start of the view.\r\n * @param {number} end The end of the view.\r\n * @param {Array} transforms The transformations to apply to the view.\r\n * @returns {Object} Returns an object containing the `start` and `end`\r\n * positions of the view.\r\n */\r\n function getView(start, end, transforms) {\r\n var index = -1,\r\n length = transforms.length;\r\n\r\n while (++index < length) {\r\n var data = transforms[index],\r\n size = data.size;\r\n\r\n switch (data.type) {\r\n case 'drop': start += size; break;\r\n case 'dropRight': end -= size; break;\r\n case 'take': end = nativeMin(end, start + size); break;\r\n case 'takeRight': start = nativeMax(start, end - size); break;\r\n }\r\n }\r\n return { 'start': start, 'end': end };\r\n }\r\n\r\n /**\r\n * Extracts wrapper details from the `source` body comment.\r\n *\r\n * @private\r\n * @param {string} source The source to inspect.\r\n * @returns {Array} Returns the wrapper details.\r\n */\r\n function getWrapDetails(source) {\r\n var match = source.match(reWrapDetails);\r\n return match ? match[1].split(reSplitDetails) : [];\r\n }\r\n\r\n /**\r\n * Checks if `path` exists on `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @param {Function} hasFunc The function to check properties.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n */\r\n function hasPath(object, path, hasFunc) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n result = false;\r\n\r\n while (++index < length) {\r\n var key = toKey(path[index]);\r\n if (!(result = object != null && hasFunc(object, key))) {\r\n break;\r\n }\r\n object = object[key];\r\n }\r\n if (result || ++index != length) {\r\n return result;\r\n }\r\n length = object == null ? 0 : object.length;\r\n return !!length && isLength(length) && isIndex(key, length) &&\r\n (isArray(object) || isArguments(object));\r\n }\r\n\r\n /**\r\n * Initializes an array clone.\r\n *\r\n * @private\r\n * @param {Array} array The array to clone.\r\n * @returns {Array} Returns the initialized clone.\r\n */\r\n function initCloneArray(array) {\r\n var length = array.length,\r\n result = new array.constructor(length);\r\n\r\n // Add properties assigned by `RegExp#exec`.\r\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\r\n result.index = array.index;\r\n result.input = array.input;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes an object clone.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneObject(object) {\r\n return (typeof object.constructor == 'function' && !isPrototype(object))\r\n ? baseCreate(getPrototype(object))\r\n : {};\r\n }\r\n\r\n /**\r\n * Initializes an object clone based on its `toStringTag`.\r\n *\r\n * **Note:** This function only supports cloning values with tags of\r\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @param {string} tag The `toStringTag` of the object to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneByTag(object, tag, isDeep) {\r\n var Ctor = object.constructor;\r\n switch (tag) {\r\n case arrayBufferTag:\r\n return cloneArrayBuffer(object);\r\n\r\n case boolTag:\r\n case dateTag:\r\n return new Ctor(+object);\r\n\r\n case dataViewTag:\r\n return cloneDataView(object, isDeep);\r\n\r\n case float32Tag: case float64Tag:\r\n case int8Tag: case int16Tag: case int32Tag:\r\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\r\n return cloneTypedArray(object, isDeep);\r\n\r\n case mapTag:\r\n return new Ctor;\r\n\r\n case numberTag:\r\n case stringTag:\r\n return new Ctor(object);\r\n\r\n case regexpTag:\r\n return cloneRegExp(object);\r\n\r\n case setTag:\r\n return new Ctor;\r\n\r\n case symbolTag:\r\n return cloneSymbol(object);\r\n }\r\n }\r\n\r\n /**\r\n * Inserts wrapper `details` in a comment at the top of the `source` body.\r\n *\r\n * @private\r\n * @param {string} source The source to modify.\r\n * @returns {Array} details The details to insert.\r\n * @returns {string} Returns the modified source.\r\n */\r\n function insertWrapDetails(source, details) {\r\n var length = details.length;\r\n if (!length) {\r\n return source;\r\n }\r\n var lastIndex = length - 1;\r\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\r\n details = details.join(length > 2 ? ', ' : ' ');\r\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\r\n }\r\n\r\n /**\r\n * Checks if `value` is a flattenable `arguments` object or array.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\r\n */\r\n function isFlattenable(value) {\r\n return isArray(value) || isArguments(value) ||\r\n !!(spreadableSymbol && value && value[spreadableSymbol]);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like index.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\r\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\r\n */\r\n function isIndex(value, length) {\r\n var type = typeof value;\r\n length = length == null ? MAX_SAFE_INTEGER : length;\r\n\r\n return !!length &&\r\n (type == 'number' ||\r\n (type != 'symbol' && reIsUint.test(value))) &&\r\n (value > -1 && value % 1 == 0 && value < length);\r\n }\r\n\r\n /**\r\n * Checks if the given arguments are from an iteratee call.\r\n *\r\n * @private\r\n * @param {*} value The potential iteratee value argument.\r\n * @param {*} index The potential iteratee index or key argument.\r\n * @param {*} object The potential iteratee object argument.\r\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\r\n * else `false`.\r\n */\r\n function isIterateeCall(value, index, object) {\r\n if (!isObject(object)) {\r\n return false;\r\n }\r\n var type = typeof index;\r\n if (type == 'number'\r\n ? (isArrayLike(object) && isIndex(index, object.length))\r\n : (type == 'string' && index in object)\r\n ) {\r\n return eq(object[index], value);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a property name and not a property path.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\r\n */\r\n function isKey(value, object) {\r\n if (isArray(value)) {\r\n return false;\r\n }\r\n var type = typeof value;\r\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\r\n value == null || isSymbol(value)) {\r\n return true;\r\n }\r\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\r\n (object != null && value in Object(object));\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for use as unique object key.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\r\n */\r\n function isKeyable(value) {\r\n var type = typeof value;\r\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\r\n ? (value !== '__proto__')\r\n : (value === null);\r\n }\r\n\r\n /**\r\n * Checks if `func` has a lazy counterpart.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\r\n * else `false`.\r\n */\r\n function isLaziable(func) {\r\n var funcName = getFuncName(func),\r\n other = lodash[funcName];\r\n\r\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\r\n return false;\r\n }\r\n if (func === other) {\r\n return true;\r\n }\r\n var data = getData(other);\r\n return !!data && func === data[0];\r\n }\r\n\r\n /**\r\n * Checks if `func` has its source masked.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\r\n */\r\n function isMasked(func) {\r\n return !!maskSrcKey && (maskSrcKey in func);\r\n }\r\n\r\n /**\r\n * Checks if `func` is capable of being masked.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\r\n */\r\n var isMaskable = coreJsData ? isFunction : stubFalse;\r\n\r\n /**\r\n * Checks if `value` is likely a prototype object.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\r\n */\r\n function isPrototype(value) {\r\n var Ctor = value && value.constructor,\r\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\r\n\r\n return value === proto;\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` if suitable for strict\r\n * equality comparisons, else `false`.\r\n */\r\n function isStrictComparable(value) {\r\n return value === value && !isObject(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `matchesProperty` for source values suitable\r\n * for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function matchesStrictComparable(key, srcValue) {\r\n return function(object) {\r\n if (object == null) {\r\n return false;\r\n }\r\n return object[key] === srcValue &&\r\n (srcValue !== undefined || (key in Object(object)));\r\n };\r\n }\r\n\r\n /**\r\n * A specialized version of `_.memoize` which clears the memoized function's\r\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\r\n *\r\n * @private\r\n * @param {Function} func The function to have its output memoized.\r\n * @returns {Function} Returns the new memoized function.\r\n */\r\n function memoizeCapped(func) {\r\n var result = memoize(func, function(key) {\r\n if (cache.size === MAX_MEMOIZE_SIZE) {\r\n cache.clear();\r\n }\r\n return key;\r\n });\r\n\r\n var cache = result.cache;\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the function metadata of `source` into `data`.\r\n *\r\n * Merging metadata reduces the number of wrappers used to invoke a function.\r\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\r\n * may be applied regardless of execution order. Methods like `_.ary` and\r\n * `_.rearg` modify function arguments, making the order in which they are\r\n * executed important, preventing the merging of metadata. However, we make\r\n * an exception for a safe combined case where curried functions have `_.ary`\r\n * and or `_.rearg` applied.\r\n *\r\n * @private\r\n * @param {Array} data The destination metadata.\r\n * @param {Array} source The source metadata.\r\n * @returns {Array} Returns `data`.\r\n */\r\n function mergeData(data, source) {\r\n var bitmask = data[1],\r\n srcBitmask = source[1],\r\n newBitmask = bitmask | srcBitmask,\r\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\r\n\r\n var isCombo =\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\r\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\r\n\r\n // Exit early if metadata can't be merged.\r\n if (!(isCommon || isCombo)) {\r\n return data;\r\n }\r\n // Use source `thisArg` if available.\r\n if (srcBitmask & WRAP_BIND_FLAG) {\r\n data[2] = source[2];\r\n // Set when currying a bound function.\r\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\r\n }\r\n // Compose partial arguments.\r\n var value = source[3];\r\n if (value) {\r\n var partials = data[3];\r\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\r\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\r\n }\r\n // Compose partial right arguments.\r\n value = source[5];\r\n if (value) {\r\n partials = data[5];\r\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\r\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\r\n }\r\n // Use source `argPos` if available.\r\n value = source[7];\r\n if (value) {\r\n data[7] = value;\r\n }\r\n // Use source `ary` if it's smaller.\r\n if (srcBitmask & WRAP_ARY_FLAG) {\r\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\r\n }\r\n // Use source `arity` if one is not provided.\r\n if (data[9] == null) {\r\n data[9] = source[9];\r\n }\r\n // Use source `func` and merge bitmasks.\r\n data[0] = source[0];\r\n data[1] = newBitmask;\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * This function is like\r\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * except that it includes inherited enumerable properties.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function nativeKeysIn(object) {\r\n var result = [];\r\n if (object != null) {\r\n for (var key in Object(object)) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `value` to a string using `Object.prototype.toString`.\r\n *\r\n * @private\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n */\r\n function objectToString(value) {\r\n return nativeObjectToString.call(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which transforms the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @param {Function} transform The rest array transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overRest(func, start, transform) {\r\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\r\n return function() {\r\n var args = arguments,\r\n index = -1,\r\n length = nativeMax(args.length - start, 0),\r\n array = Array(length);\r\n\r\n while (++index < length) {\r\n array[index] = args[start + index];\r\n }\r\n index = -1;\r\n var otherArgs = Array(start + 1);\r\n while (++index < start) {\r\n otherArgs[index] = args[index];\r\n }\r\n otherArgs[start] = transform(array);\r\n return apply(func, this, otherArgs);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the parent value at `path` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} path The path to get the parent value of.\r\n * @returns {*} Returns the parent value.\r\n */\r\n function parent(object, path) {\r\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\r\n }\r\n\r\n /**\r\n * Reorder `array` according to the specified indexes where the element at\r\n * the first index is assigned as the first element, the element at\r\n * the second index is assigned as the second element, and so on.\r\n *\r\n * @private\r\n * @param {Array} array The array to reorder.\r\n * @param {Array} indexes The arranged array indexes.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function reorder(array, indexes) {\r\n var arrLength = array.length,\r\n length = nativeMin(indexes.length, arrLength),\r\n oldArray = copyArray(array);\r\n\r\n while (length--) {\r\n var index = indexes[length];\r\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function safeGet(object, key) {\r\n if (key === 'constructor' && typeof object[key] === 'function') {\r\n return;\r\n }\r\n\r\n if (key == '__proto__') {\r\n return;\r\n }\r\n\r\n return object[key];\r\n }\r\n\r\n /**\r\n * Sets metadata for `func`.\r\n *\r\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\r\n * period of time, it will trip its breaker and transition to an identity\r\n * function to avoid garbage collection pauses in V8. See\r\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\r\n * for more details.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setData = shortOut(baseSetData);\r\n\r\n /**\r\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\r\n *\r\n * @private\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @returns {number|Object} Returns the timer id or timeout object.\r\n */\r\n var setTimeout = ctxSetTimeout || function(func, wait) {\r\n return root.setTimeout(func, wait);\r\n };\r\n\r\n /**\r\n * Sets the `toString` method of `func` to return `string`.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setToString = shortOut(baseSetToString);\r\n\r\n /**\r\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\r\n * with wrapper details in a comment at the top of the source body.\r\n *\r\n * @private\r\n * @param {Function} wrapper The function to modify.\r\n * @param {Function} reference The reference function.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Function} Returns `wrapper`.\r\n */\r\n function setWrapToString(wrapper, reference, bitmask) {\r\n var source = (reference + '');\r\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\r\n }\r\n\r\n /**\r\n * Creates a function that'll short out and invoke `identity` instead\r\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\r\n * milliseconds.\r\n *\r\n * @private\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new shortable function.\r\n */\r\n function shortOut(func) {\r\n var count = 0,\r\n lastCalled = 0;\r\n\r\n return function() {\r\n var stamp = nativeNow(),\r\n remaining = HOT_SPAN - (stamp - lastCalled);\r\n\r\n lastCalled = stamp;\r\n if (remaining > 0) {\r\n if (++count >= HOT_COUNT) {\r\n return arguments[0];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n return func.apply(undefined, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to shuffle.\r\n * @param {number} [size=array.length] The size of `array`.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function shuffleSelf(array, size) {\r\n var index = -1,\r\n length = array.length,\r\n lastIndex = length - 1;\r\n\r\n size = size === undefined ? length : size;\r\n while (++index < size) {\r\n var rand = baseRandom(index, lastIndex),\r\n value = array[rand];\r\n\r\n array[rand] = array[index];\r\n array[index] = value;\r\n }\r\n array.length = size;\r\n return array;\r\n }\r\n\r\n /**\r\n * Converts `string` to a property path array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the property path array.\r\n */\r\n var stringToPath = memoizeCapped(function(string) {\r\n var result = [];\r\n if (string.charCodeAt(0) === 46 /* . */) {\r\n result.push('');\r\n }\r\n string.replace(rePropName, function(match, number, quote, subString) {\r\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\r\n });\r\n return result;\r\n });\r\n\r\n /**\r\n * Converts `value` to a string key if it's not a string or symbol.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {string|symbol} Returns the key.\r\n */\r\n function toKey(value) {\r\n if (typeof value == 'string' || isSymbol(value)) {\r\n return value;\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * Converts `func` to its source code.\r\n *\r\n * @private\r\n * @param {Function} func The function to convert.\r\n * @returns {string} Returns the source code.\r\n */\r\n function toSource(func) {\r\n if (func != null) {\r\n try {\r\n return funcToString.call(func);\r\n } catch (e) {}\r\n try {\r\n return (func + '');\r\n } catch (e) {}\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Updates wrapper `details` based on `bitmask` flags.\r\n *\r\n * @private\r\n * @returns {Array} details The details to modify.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Array} Returns `details`.\r\n */\r\n function updateWrapDetails(details, bitmask) {\r\n arrayEach(wrapFlags, function(pair) {\r\n var value = '_.' + pair[0];\r\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\r\n details.push(value);\r\n }\r\n });\r\n return details.sort();\r\n }\r\n\r\n /**\r\n * Creates a clone of `wrapper`.\r\n *\r\n * @private\r\n * @param {Object} wrapper The wrapper to clone.\r\n * @returns {Object} Returns the cloned wrapper.\r\n */\r\n function wrapperClone(wrapper) {\r\n if (wrapper instanceof LazyWrapper) {\r\n return wrapper.clone();\r\n }\r\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\r\n result.__actions__ = copyArray(wrapper.__actions__);\r\n result.__index__ = wrapper.__index__;\r\n result.__values__ = wrapper.__values__;\r\n return result;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array of elements split into groups the length of `size`.\r\n * If `array` can't be split evenly, the final chunk will be the remaining\r\n * elements.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to process.\r\n * @param {number} [size=1] The length of each chunk\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the new array of chunks.\r\n * @example\r\n *\r\n * _.chunk(['a', 'b', 'c', 'd'], 2);\r\n * // => [['a', 'b'], ['c', 'd']]\r\n *\r\n * _.chunk(['a', 'b', 'c', 'd'], 3);\r\n * // => [['a', 'b', 'c'], ['d']]\r\n */\r\n function chunk(array, size, guard) {\r\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\r\n size = 1;\r\n } else {\r\n size = nativeMax(toInteger(size), 0);\r\n }\r\n var length = array == null ? 0 : array.length;\r\n if (!length || size < 1) {\r\n return [];\r\n }\r\n var index = 0,\r\n resIndex = 0,\r\n result = Array(nativeCeil(length / size));\r\n\r\n while (index < length) {\r\n result[resIndex++] = baseSlice(array, index, (index += size));\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an array with all falsey values removed. The values `false`, `null`,\r\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to compact.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.compact([0, 1, false, 2, '', 3]);\r\n * // => [1, 2, 3]\r\n */\r\n function compact(array) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new array concatenating `array` with any additional arrays\r\n * and/or values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to concatenate.\r\n * @param {...*} [values] The values to concatenate.\r\n * @returns {Array} Returns the new concatenated array.\r\n * @example\r\n *\r\n * var array = [1];\r\n * var other = _.concat(array, 2, [3], [[4]]);\r\n *\r\n * console.log(other);\r\n * // => [1, 2, 3, [4]]\r\n *\r\n * console.log(array);\r\n * // => [1]\r\n */\r\n function concat() {\r\n var length = arguments.length;\r\n if (!length) {\r\n return [];\r\n }\r\n var args = Array(length - 1),\r\n array = arguments[0],\r\n index = length;\r\n\r\n while (index--) {\r\n args[index - 1] = arguments[index];\r\n }\r\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\r\n }\r\n\r\n /**\r\n * Creates an array of `array` values not included in the other given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.without, _.xor\r\n * @example\r\n *\r\n * _.difference([2, 1], [2, 3]);\r\n * // => [1]\r\n */\r\n var difference = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\r\n : [];\r\n });\r\n\r\n /**\r\n * This method is like `_.difference` except that it accepts `iteratee` which\r\n * is invoked for each element of `array` and `values` to generate the criterion\r\n * by which they're compared. The order and references of result values are\r\n * determined by the first array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\r\n * // => [1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\r\n * // => [{ 'x': 2 }]\r\n */\r\n var differenceBy = baseRest(function(array, values) {\r\n var iteratee = last(values);\r\n if (isArrayLikeObject(iteratee)) {\r\n iteratee = undefined;\r\n }\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\r\n : [];\r\n });\r\n\r\n /**\r\n * This method is like `_.difference` except that it accepts `comparator`\r\n * which is invoked to compare elements of `array` to `values`. The order and\r\n * references of result values are determined by the first array. The comparator\r\n * is invoked with two arguments: (arrVal, othVal).\r\n *\r\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\r\n *\r\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\r\n * // => [{ 'x': 2, 'y': 1 }]\r\n */\r\n var differenceWith = baseRest(function(array, values) {\r\n var comparator = last(values);\r\n if (isArrayLikeObject(comparator)) {\r\n comparator = undefined;\r\n }\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements dropped from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to drop.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.drop([1, 2, 3]);\r\n * // => [2, 3]\r\n *\r\n * _.drop([1, 2, 3], 2);\r\n * // => [3]\r\n *\r\n * _.drop([1, 2, 3], 5);\r\n * // => []\r\n *\r\n * _.drop([1, 2, 3], 0);\r\n * // => [1, 2, 3]\r\n */\r\n function drop(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements dropped from the end.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to drop.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.dropRight([1, 2, 3]);\r\n * // => [1, 2]\r\n *\r\n * _.dropRight([1, 2, 3], 2);\r\n * // => [1]\r\n *\r\n * _.dropRight([1, 2, 3], 5);\r\n * // => []\r\n *\r\n * _.dropRight([1, 2, 3], 0);\r\n * // => [1, 2, 3]\r\n */\r\n function dropRight(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n n = length - n;\r\n return baseSlice(array, 0, n < 0 ? 0 : n);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` excluding elements dropped from the end.\r\n * Elements are dropped until `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index, array).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.dropRightWhile(users, function(o) { return !o.active; });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\r\n * // => objects for ['barney', 'fred']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.dropRightWhile(users, ['active', false]);\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.dropRightWhile(users, 'active');\r\n * // => objects for ['barney', 'fred', 'pebbles']\r\n */\r\n function dropRightWhile(array, predicate) {\r\n return (array && array.length)\r\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\r\n : [];\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` excluding elements dropped from the beginning.\r\n * Elements are dropped until `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index, array).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.dropWhile(users, function(o) { return !o.active; });\r\n * // => objects for ['pebbles']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\r\n * // => objects for ['fred', 'pebbles']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.dropWhile(users, ['active', false]);\r\n * // => objects for ['pebbles']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.dropWhile(users, 'active');\r\n * // => objects for ['barney', 'fred', 'pebbles']\r\n */\r\n function dropWhile(array, predicate) {\r\n return (array && array.length)\r\n ? baseWhile(array, getIteratee(predicate, 3), true)\r\n : [];\r\n }\r\n\r\n /**\r\n * Fills elements of `array` with `value` from `start` up to, but not\r\n * including, `end`.\r\n *\r\n * **Note:** This method mutates `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Array\r\n * @param {Array} array The array to fill.\r\n * @param {*} value The value to fill `array` with.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _.fill(array, 'a');\r\n * console.log(array);\r\n * // => ['a', 'a', 'a']\r\n *\r\n * _.fill(Array(3), 2);\r\n * // => [2, 2, 2]\r\n *\r\n * _.fill([4, 6, 8, 10], '*', 1, 3);\r\n * // => [4, '*', '*', 10]\r\n */\r\n function fill(array, value, start, end) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\r\n start = 0;\r\n end = length;\r\n }\r\n return baseFill(array, value, start, end);\r\n }\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the index of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\r\n * // => 0\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findIndex(users, { 'user': 'fred', 'active': false });\r\n * // => 1\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findIndex(users, ['active', false]);\r\n * // => 0\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findIndex(users, 'active');\r\n * // => 2\r\n */\r\n function findIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseFindIndex(array, getIteratee(predicate, 3), index);\r\n }\r\n\r\n /**\r\n * This method is like `_.findIndex` except that it iterates over elements\r\n * of `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=array.length-1] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\r\n * // => 2\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\r\n * // => 0\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastIndex(users, ['active', false]);\r\n * // => 2\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastIndex(users, 'active');\r\n * // => 0\r\n */\r\n function findLastIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = length - 1;\r\n if (fromIndex !== undefined) {\r\n index = toInteger(fromIndex);\r\n index = fromIndex < 0\r\n ? nativeMax(length + index, 0)\r\n : nativeMin(index, length - 1);\r\n }\r\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\r\n }\r\n\r\n /**\r\n * Flattens `array` a single level deep.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flatten([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, [3, [4]], 5]\r\n */\r\n function flatten(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, 1) : [];\r\n }\r\n\r\n /**\r\n * Recursively flattens `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, 3, 4, 5]\r\n */\r\n function flattenDeep(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, INFINITY) : [];\r\n }\r\n\r\n /**\r\n * Recursively flatten `array` up to `depth` times.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.4.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @param {number} [depth=1] The maximum recursion depth.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * var array = [1, [2, [3, [4]], 5]];\r\n *\r\n * _.flattenDepth(array, 1);\r\n * // => [1, 2, [3, [4]], 5]\r\n *\r\n * _.flattenDepth(array, 2);\r\n * // => [1, 2, 3, [4], 5]\r\n */\r\n function flattenDepth(array, depth) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n depth = depth === undefined ? 1 : toInteger(depth);\r\n return baseFlatten(array, depth);\r\n }\r\n\r\n /**\r\n * The inverse of `_.toPairs`; this method returns an object composed\r\n * from key-value `pairs`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} pairs The key-value pairs.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.fromPairs([['a', 1], ['b', 2]]);\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n function fromPairs(pairs) {\r\n var index = -1,\r\n length = pairs == null ? 0 : pairs.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var pair = pairs[index];\r\n result[pair[0]] = pair[1];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the first element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias first\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the first element of `array`.\r\n * @example\r\n *\r\n * _.head([1, 2, 3]);\r\n * // => 1\r\n *\r\n * _.head([]);\r\n * // => undefined\r\n */\r\n function head(array) {\r\n return (array && array.length) ? array[0] : undefined;\r\n }\r\n\r\n /**\r\n * Gets the index at which the first occurrence of `value` is found in `array`\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. If `fromIndex` is negative, it's used as the\r\n * offset from the end of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.indexOf([1, 2, 1, 2], 2);\r\n * // => 1\r\n *\r\n * // Search from the `fromIndex`.\r\n * _.indexOf([1, 2, 1, 2], 2, 2);\r\n * // => 3\r\n */\r\n function indexOf(array, value, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseIndexOf(array, value, index);\r\n }\r\n\r\n /**\r\n * Gets all but the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.initial([1, 2, 3]);\r\n * // => [1, 2]\r\n */\r\n function initial(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseSlice(array, 0, -1) : [];\r\n }\r\n\r\n /**\r\n * Creates an array of unique values that are included in all given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * _.intersection([2, 1], [2, 3]);\r\n * // => [2]\r\n */\r\n var intersection = baseRest(function(arrays) {\r\n var mapped = arrayMap(arrays, castArrayLikeObject);\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped)\r\n : [];\r\n });\r\n\r\n /**\r\n * This method is like `_.intersection` except that it accepts `iteratee`\r\n * which is invoked for each element of each `arrays` to generate the criterion\r\n * by which they're compared. The order and references of result values are\r\n * determined by the first array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\r\n * // => [2.1]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }]\r\n */\r\n var intersectionBy = baseRest(function(arrays) {\r\n var iteratee = last(arrays),\r\n mapped = arrayMap(arrays, castArrayLikeObject);\r\n\r\n if (iteratee === last(mapped)) {\r\n iteratee = undefined;\r\n } else {\r\n mapped.pop();\r\n }\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\r\n : [];\r\n });\r\n\r\n /**\r\n * This method is like `_.intersection` except that it accepts `comparator`\r\n * which is invoked to compare elements of `arrays`. The order and references\r\n * of result values are determined by the first array. The comparator is\r\n * invoked with two arguments: (arrVal, othVal).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\r\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\r\n *\r\n * _.intersectionWith(objects, others, _.isEqual);\r\n * // => [{ 'x': 1, 'y': 2 }]\r\n */\r\n var intersectionWith = baseRest(function(arrays) {\r\n var comparator = last(arrays),\r\n mapped = arrayMap(arrays, castArrayLikeObject);\r\n\r\n comparator = typeof comparator == 'function' ? comparator : undefined;\r\n if (comparator) {\r\n mapped.pop();\r\n }\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped, undefined, comparator)\r\n : [];\r\n });\r\n\r\n /**\r\n * Converts all elements in `array` into a string separated by `separator`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to convert.\r\n * @param {string} [separator=','] The element separator.\r\n * @returns {string} Returns the joined string.\r\n * @example\r\n *\r\n * _.join(['a', 'b', 'c'], '~');\r\n * // => 'a~b~c'\r\n */\r\n function join(array, separator) {\r\n return array == null ? '' : nativeJoin.call(array, separator);\r\n }\r\n\r\n /**\r\n * Gets the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the last element of `array`.\r\n * @example\r\n *\r\n * _.last([1, 2, 3]);\r\n * // => 3\r\n */\r\n function last(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? array[length - 1] : undefined;\r\n }\r\n\r\n /**\r\n * This method is like `_.indexOf` except that it iterates over elements of\r\n * `array` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=array.length-1] The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.lastIndexOf([1, 2, 1, 2], 2);\r\n * // => 3\r\n *\r\n * // Search from the `fromIndex`.\r\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\r\n * // => 1\r\n */\r\n function lastIndexOf(array, value, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = length;\r\n if (fromIndex !== undefined) {\r\n index = toInteger(fromIndex);\r\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\r\n }\r\n return value === value\r\n ? strictLastIndexOf(array, value, index)\r\n : baseFindIndex(array, baseIsNaN, index, true);\r\n }\r\n\r\n /**\r\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\r\n * element from the end is returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.11.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=0] The index of the element to return.\r\n * @returns {*} Returns the nth element of `array`.\r\n * @example\r\n *\r\n * var array = ['a', 'b', 'c', 'd'];\r\n *\r\n * _.nth(array, 1);\r\n * // => 'b'\r\n *\r\n * _.nth(array, -2);\r\n * // => 'c';\r\n */\r\n function nth(array, n) {\r\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\r\n }\r\n\r\n /**\r\n * Removes all given values from `array` using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\r\n * to remove elements from an array by predicate.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @param {...*} [values] The values to remove.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\r\n *\r\n * _.pull(array, 'a', 'c');\r\n * console.log(array);\r\n * // => ['b', 'b']\r\n */\r\n var pull = baseRest(pullAll);\r\n\r\n /**\r\n * This method is like `_.pull` except that it accepts an array of values to remove.\r\n *\r\n * **Note:** Unlike `_.difference`, this method mutates `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to remove.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\r\n *\r\n * _.pullAll(array, ['a', 'c']);\r\n * console.log(array);\r\n * // => ['b', 'b']\r\n */\r\n function pullAll(array, values) {\r\n return (array && array.length && values && values.length)\r\n ? basePullAll(array, values)\r\n : array;\r\n }\r\n\r\n /**\r\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\r\n * invoked for each element of `array` and `values` to generate the criterion\r\n * by which they're compared. The iteratee is invoked with one argument: (value).\r\n *\r\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to remove.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\r\n *\r\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\r\n * console.log(array);\r\n * // => [{ 'x': 2 }]\r\n */\r\n function pullAllBy(array, values, iteratee) {\r\n return (array && array.length && values && values.length)\r\n ? basePullAll(array, values, getIteratee(iteratee, 2))\r\n : array;\r\n }\r\n\r\n /**\r\n * This method is like `_.pullAll` except that it accepts `comparator` which\r\n * is invoked to compare elements of `array` to `values`. The comparator is\r\n * invoked with two arguments: (arrVal, othVal).\r\n *\r\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.6.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to remove.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\r\n *\r\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\r\n * console.log(array);\r\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\r\n */\r\n function pullAllWith(array, values, comparator) {\r\n return (array && array.length && values && values.length)\r\n ? basePullAll(array, values, undefined, comparator)\r\n : array;\r\n }\r\n\r\n /**\r\n * Removes elements from `array` corresponding to `indexes` and returns an\r\n * array of removed elements.\r\n *\r\n * **Note:** Unlike `_.at`, this method mutates `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\r\n * @returns {Array} Returns the new array of removed elements.\r\n * @example\r\n *\r\n * var array = ['a', 'b', 'c', 'd'];\r\n * var pulled = _.pullAt(array, [1, 3]);\r\n *\r\n * console.log(array);\r\n * // => ['a', 'c']\r\n *\r\n * console.log(pulled);\r\n * // => ['b', 'd']\r\n */\r\n var pullAt = flatRest(function(array, indexes) {\r\n var length = array == null ? 0 : array.length,\r\n result = baseAt(array, indexes);\r\n\r\n basePullAt(array, arrayMap(indexes, function(index) {\r\n return isIndex(index, length) ? +index : index;\r\n }).sort(compareAscending));\r\n\r\n return result;\r\n });\r\n\r\n /**\r\n * Removes all elements from `array` that `predicate` returns truthy for\r\n * and returns an array of the removed elements. The predicate is invoked\r\n * with three arguments: (value, index, array).\r\n *\r\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\r\n * to pull elements from an array by value.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new array of removed elements.\r\n * @example\r\n *\r\n * var array = [1, 2, 3, 4];\r\n * var evens = _.remove(array, function(n) {\r\n * return n % 2 == 0;\r\n * });\r\n *\r\n * console.log(array);\r\n * // => [1, 3]\r\n *\r\n * console.log(evens);\r\n * // => [2, 4]\r\n */\r\n function remove(array, predicate) {\r\n var result = [];\r\n if (!(array && array.length)) {\r\n return result;\r\n }\r\n var index = -1,\r\n indexes = [],\r\n length = array.length;\r\n\r\n predicate = getIteratee(predicate, 3);\r\n while (++index < length) {\r\n var value = array[index];\r\n if (predicate(value, index, array)) {\r\n result.push(value);\r\n indexes.push(index);\r\n }\r\n }\r\n basePullAt(array, indexes);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reverses `array` so that the first element becomes the last, the second\r\n * element becomes the second to last, and so on.\r\n *\r\n * **Note:** This method mutates `array` and is based on\r\n * [`Array#reverse`](https://mdn.io/Array/reverse).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _.reverse(array);\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function reverse(array) {\r\n return array == null ? array : nativeReverse.call(array);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` from `start` up to, but not including, `end`.\r\n *\r\n * **Note:** This method is used instead of\r\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\r\n * returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function slice(array, start, end) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\r\n start = 0;\r\n end = length;\r\n }\r\n else {\r\n start = start == null ? 0 : toInteger(start);\r\n end = end === undefined ? length : toInteger(end);\r\n }\r\n return baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Uses a binary search to determine the lowest index at which `value`\r\n * should be inserted into `array` in order to maintain its sort order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The sorted array to inspect.\r\n * @param {*} value The value to evaluate.\r\n * @returns {number} Returns the index at which `value` should be inserted\r\n * into `array`.\r\n * @example\r\n *\r\n * _.sortedIndex([30, 50], 40);\r\n * // => 1\r\n */\r\n function sortedIndex(array, value) {\r\n return baseSortedIndex(array, value);\r\n }\r\n\r\n /**\r\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\r\n * which is invoked for `value` and each element of `array` to compute their\r\n * sort ranking. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The sorted array to inspect.\r\n * @param {*} value The value to evaluate.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {number} Returns the index at which `value` should be inserted\r\n * into `array`.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\r\n *\r\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\r\n * // => 0\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\r\n * // => 0\r\n */\r\n function sortedIndexBy(array, value, iteratee) {\r\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\r\n }\r\n\r\n /**\r\n * This method is like `_.indexOf` except that it performs a binary\r\n * search on a sorted `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\r\n * // => 1\r\n */\r\n function sortedIndexOf(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n if (length) {\r\n var index = baseSortedIndex(array, value);\r\n if (index < length && eq(array[index], value)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * This method is like `_.sortedIndex` except that it returns the highest\r\n * index at which `value` should be inserted into `array` in order to\r\n * maintain its sort order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The sorted array to inspect.\r\n * @param {*} value The value to evaluate.\r\n * @returns {number} Returns the index at which `value` should be inserted\r\n * into `array`.\r\n * @example\r\n *\r\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\r\n * // => 4\r\n */\r\n function sortedLastIndex(array, value) {\r\n return baseSortedIndex(array, value, true);\r\n }\r\n\r\n /**\r\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\r\n * which is invoked for `value` and each element of `array` to compute their\r\n * sort ranking. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The sorted array to inspect.\r\n * @param {*} value The value to evaluate.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {number} Returns the index at which `value` should be inserted\r\n * into `array`.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\r\n *\r\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\r\n * // => 1\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\r\n * // => 1\r\n */\r\n function sortedLastIndexBy(array, value, iteratee) {\r\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\r\n }\r\n\r\n /**\r\n * This method is like `_.lastIndexOf` except that it performs a binary\r\n * search on a sorted `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\r\n * // => 3\r\n */\r\n function sortedLastIndexOf(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n if (length) {\r\n var index = baseSortedIndex(array, value, true) - 1;\r\n if (eq(array[index], value)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it's designed and optimized\r\n * for sorted arrays.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.sortedUniq([1, 1, 2]);\r\n * // => [1, 2]\r\n */\r\n function sortedUniq(array) {\r\n return (array && array.length)\r\n ? baseSortedUniq(array)\r\n : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniqBy` except that it's designed and optimized\r\n * for sorted arrays.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\r\n * // => [1.1, 2.3]\r\n */\r\n function sortedUniqBy(array, iteratee) {\r\n return (array && array.length)\r\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\r\n : [];\r\n }\r\n\r\n /**\r\n * Gets all but the first element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.tail([1, 2, 3]);\r\n * // => [2, 3]\r\n */\r\n function tail(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseSlice(array, 1, length) : [];\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.take([1, 2, 3]);\r\n * // => [1]\r\n *\r\n * _.take([1, 2, 3], 2);\r\n * // => [1, 2]\r\n *\r\n * _.take([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.take([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function take(array, n, guard) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, 0, n < 0 ? 0 : n);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the end.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.takeRight([1, 2, 3]);\r\n * // => [3]\r\n *\r\n * _.takeRight([1, 2, 3], 2);\r\n * // => [2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function takeRight(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n n = length - n;\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with elements taken from the end. Elements are\r\n * taken until `predicate` returns falsey. The predicate is invoked with\r\n * three arguments: (value, index, array).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.takeRightWhile(users, function(o) { return !o.active; });\r\n * // => objects for ['fred', 'pebbles']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\r\n * // => objects for ['pebbles']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.takeRightWhile(users, ['active', false]);\r\n * // => objects for ['fred', 'pebbles']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.takeRightWhile(users, 'active');\r\n * // => []\r\n */\r\n function takeRightWhile(array, predicate) {\r\n return (array && array.length)\r\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\r\n : [];\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with elements taken from the beginning. Elements\r\n * are taken until `predicate` returns falsey. The predicate is invoked with\r\n * three arguments: (value, index, array).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.takeWhile(users, function(o) { return !o.active; });\r\n * // => objects for ['barney', 'fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.takeWhile(users, ['active', false]);\r\n * // => objects for ['barney', 'fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.takeWhile(users, 'active');\r\n * // => []\r\n */\r\n function takeWhile(array, predicate) {\r\n return (array && array.length)\r\n ? baseWhile(array, getIteratee(predicate, 3))\r\n : [];\r\n }\r\n\r\n /**\r\n * Creates an array of unique values, in order, from all given arrays using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * _.union([2], [1, 2]);\r\n * // => [2, 1]\r\n */\r\n var union = baseRest(function(arrays) {\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\r\n });\r\n\r\n /**\r\n * This method is like `_.union` except that it accepts `iteratee` which is\r\n * invoked for each element of each `arrays` to generate the criterion by\r\n * which uniqueness is computed. Result values are chosen from the first\r\n * array in which the value occurs. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\r\n * // => [2.1, 1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }, { 'x': 2 }]\r\n */\r\n var unionBy = baseRest(function(arrays) {\r\n var iteratee = last(arrays);\r\n if (isArrayLikeObject(iteratee)) {\r\n iteratee = undefined;\r\n }\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\r\n });\r\n\r\n /**\r\n * This method is like `_.union` except that it accepts `comparator` which\r\n * is invoked to compare elements of `arrays`. Result values are chosen from\r\n * the first array in which the value occurs. The comparator is invoked\r\n * with two arguments: (arrVal, othVal).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\r\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\r\n *\r\n * _.unionWith(objects, others, _.isEqual);\r\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\r\n */\r\n var unionWith = baseRest(function(arrays) {\r\n var comparator = last(arrays);\r\n comparator = typeof comparator == 'function' ? comparator : undefined;\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\r\n });\r\n\r\n /**\r\n * Creates a duplicate-free version of an array, using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons, in which only the first occurrence of each element\r\n * is kept. The order of result values is determined by the order they occur\r\n * in the array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniq([2, 1, 2]);\r\n * // => [2, 1]\r\n */\r\n function uniq(array) {\r\n return (array && array.length) ? baseUniq(array) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it accepts `iteratee` which is\r\n * invoked for each element in `array` to generate the criterion by which\r\n * uniqueness is computed. The order of result values is determined by the\r\n * order they occur in the array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\r\n * // => [2.1, 1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }, { 'x': 2 }]\r\n */\r\n function uniqBy(array, iteratee) {\r\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it accepts `comparator` which\r\n * is invoked to compare elements of `array`. The order of result values is\r\n * determined by the order they occur in the array.The comparator is invoked\r\n * with two arguments: (arrVal, othVal).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\r\n *\r\n * _.uniqWith(objects, _.isEqual);\r\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\r\n */\r\n function uniqWith(array, comparator) {\r\n comparator = typeof comparator == 'function' ? comparator : undefined;\r\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.zip` except that it accepts an array of grouped\r\n * elements and creates an array regrouping the elements to their pre-zip\r\n * configuration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.2.0\r\n * @category Array\r\n * @param {Array} array The array of grouped elements to process.\r\n * @returns {Array} Returns the new array of regrouped elements.\r\n * @example\r\n *\r\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n *\r\n * _.unzip(zipped);\r\n * // => [['a', 'b'], [1, 2], [true, false]]\r\n */\r\n function unzip(array) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n var length = 0;\r\n array = arrayFilter(array, function(group) {\r\n if (isArrayLikeObject(group)) {\r\n length = nativeMax(group.length, length);\r\n return true;\r\n }\r\n });\r\n return baseTimes(length, function(index) {\r\n return arrayMap(array, baseProperty(index));\r\n });\r\n }\r\n\r\n /**\r\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\r\n * how regrouped values should be combined. The iteratee is invoked with the\r\n * elements of each group: (...group).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.8.0\r\n * @category Array\r\n * @param {Array} array The array of grouped elements to process.\r\n * @param {Function} [iteratee=_.identity] The function to combine\r\n * regrouped values.\r\n * @returns {Array} Returns the new array of regrouped elements.\r\n * @example\r\n *\r\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\r\n * // => [[1, 10, 100], [2, 20, 200]]\r\n *\r\n * _.unzipWith(zipped, _.add);\r\n * // => [3, 30, 300]\r\n */\r\n function unzipWith(array, iteratee) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n var result = unzip(array);\r\n if (iteratee == null) {\r\n return result;\r\n }\r\n return arrayMap(result, function(group) {\r\n return apply(iteratee, undefined, group);\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array excluding all given values using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * **Note:** Unlike `_.pull`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...*} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.difference, _.xor\r\n * @example\r\n *\r\n * _.without([2, 1, 2, 3], 1, 2);\r\n * // => [3]\r\n */\r\n var without = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, values)\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates an array of unique values that is the\r\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\r\n * of the given arrays. The order of result values is determined by the order\r\n * they occur in the arrays.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.difference, _.without\r\n * @example\r\n *\r\n * _.xor([2, 1], [2, 3]);\r\n * // => [1, 3]\r\n */\r\n var xor = baseRest(function(arrays) {\r\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\r\n });\r\n\r\n /**\r\n * This method is like `_.xor` except that it accepts `iteratee` which is\r\n * invoked for each element of each `arrays` to generate the criterion by\r\n * which by which they're compared. The order of result values is determined\r\n * by the order they occur in the arrays. The iteratee is invoked with one\r\n * argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\r\n * // => [1.2, 3.4]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 2 }]\r\n */\r\n var xorBy = baseRest(function(arrays) {\r\n var iteratee = last(arrays);\r\n if (isArrayLikeObject(iteratee)) {\r\n iteratee = undefined;\r\n }\r\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\r\n });\r\n\r\n /**\r\n * This method is like `_.xor` except that it accepts `comparator` which is\r\n * invoked to compare elements of `arrays`. The order of result values is\r\n * determined by the order they occur in the arrays. The comparator is invoked\r\n * with two arguments: (arrVal, othVal).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\r\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\r\n *\r\n * _.xorWith(objects, others, _.isEqual);\r\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\r\n */\r\n var xorWith = baseRest(function(arrays) {\r\n var comparator = last(arrays);\r\n comparator = typeof comparator == 'function' ? comparator : undefined;\r\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\r\n });\r\n\r\n /**\r\n * Creates an array of grouped elements, the first of which contains the\r\n * first elements of the given arrays, the second of which contains the\r\n * second elements of the given arrays, and so on.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to process.\r\n * @returns {Array} Returns the new array of grouped elements.\r\n * @example\r\n *\r\n * _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n */\r\n var zip = baseRest(unzip);\r\n\r\n /**\r\n * This method is like `_.fromPairs` except that it accepts two arrays,\r\n * one of property identifiers and one of corresponding values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.4.0\r\n * @category Array\r\n * @param {Array} [props=[]] The property identifiers.\r\n * @param {Array} [values=[]] The property values.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.zipObject(['a', 'b'], [1, 2]);\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n function zipObject(props, values) {\r\n return baseZipObject(props || [], values || [], assignValue);\r\n }\r\n\r\n /**\r\n * This method is like `_.zipObject` except that it supports property paths.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.1.0\r\n * @category Array\r\n * @param {Array} [props=[]] The property identifiers.\r\n * @param {Array} [values=[]] The property values.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\r\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\r\n */\r\n function zipObjectDeep(props, values) {\r\n return baseZipObject(props || [], values || [], baseSet);\r\n }\r\n\r\n /**\r\n * This method is like `_.zip` except that it accepts `iteratee` to specify\r\n * how grouped values should be combined. The iteratee is invoked with the\r\n * elements of each group: (...group).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.8.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to process.\r\n * @param {Function} [iteratee=_.identity] The function to combine\r\n * grouped values.\r\n * @returns {Array} Returns the new array of grouped elements.\r\n * @example\r\n *\r\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\r\n * return a + b + c;\r\n * });\r\n * // => [111, 222]\r\n */\r\n var zipWith = baseRest(function(arrays) {\r\n var length = arrays.length,\r\n iteratee = length > 1 ? arrays[length - 1] : undefined;\r\n\r\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\r\n return unzipWith(arrays, iteratee);\r\n });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\r\n * chain sequences enabled. The result of such sequences must be unwrapped\r\n * with `_#value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.3.0\r\n * @category Seq\r\n * @param {*} value The value to wrap.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'pebbles', 'age': 1 }\r\n * ];\r\n *\r\n * var youngest = _\r\n * .chain(users)\r\n * .sortBy('age')\r\n * .map(function(o) {\r\n * return o.user + ' is ' + o.age;\r\n * })\r\n * .head()\r\n * .value();\r\n * // => 'pebbles is 1'\r\n */\r\n function chain(value) {\r\n var result = lodash(value);\r\n result.__chain__ = true;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method invokes `interceptor` and returns `value`. The interceptor\r\n * is invoked with one argument; (value). The purpose of this method is to\r\n * \"tap into\" a method chain sequence in order to modify intermediate results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * _([1, 2, 3])\r\n * .tap(function(array) {\r\n * // Mutate input array.\r\n * array.pop();\r\n * })\r\n * .reverse()\r\n * .value();\r\n * // => [2, 1]\r\n */\r\n function tap(value, interceptor) {\r\n interceptor(value);\r\n return value;\r\n }\r\n\r\n /**\r\n * This method is like `_.tap` except that it returns the result of `interceptor`.\r\n * The purpose of this method is to \"pass thru\" values replacing intermediate\r\n * results in a method chain sequence.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns the result of `interceptor`.\r\n * @example\r\n *\r\n * _(' abc ')\r\n * .chain()\r\n * .trim()\r\n * .thru(function(value) {\r\n * return [value];\r\n * })\r\n * .value();\r\n * // => ['abc']\r\n */\r\n function thru(value, interceptor) {\r\n return interceptor(value);\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.at`.\r\n *\r\n * @name at\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Seq\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\r\n *\r\n * _(object).at(['a[0].b.c', 'a[1]']).value();\r\n * // => [3, 4]\r\n */\r\n var wrapperAt = flatRest(function(paths) {\r\n var length = paths.length,\r\n start = length ? paths[0] : 0,\r\n value = this.__wrapped__,\r\n interceptor = function(object) { return baseAt(object, paths); };\r\n\r\n if (length > 1 || this.__actions__.length ||\r\n !(value instanceof LazyWrapper) || !isIndex(start)) {\r\n return this.thru(interceptor);\r\n }\r\n value = value.slice(start, +start + (length ? 1 : 0));\r\n value.__actions__.push({\r\n 'func': thru,\r\n 'args': [interceptor],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\r\n if (length && !array.length) {\r\n array.push(undefined);\r\n }\r\n return array;\r\n });\r\n });\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\r\n *\r\n * @name chain\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 }\r\n * ];\r\n *\r\n * // A sequence without explicit chaining.\r\n * _(users).head();\r\n * // => { 'user': 'barney', 'age': 36 }\r\n *\r\n * // A sequence with explicit chaining.\r\n * _(users)\r\n * .chain()\r\n * .head()\r\n * .pick('user')\r\n * .value();\r\n * // => { 'user': 'barney' }\r\n */\r\n function wrapperChain() {\r\n return chain(this);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence and returns the wrapped result.\r\n *\r\n * @name commit\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2];\r\n * var wrapped = _(array).push(3);\r\n *\r\n * console.log(array);\r\n * // => [1, 2]\r\n *\r\n * wrapped = wrapped.commit();\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n *\r\n * wrapped.last();\r\n * // => 3\r\n *\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperCommit() {\r\n return new LodashWrapper(this.value(), this.__chain__);\r\n }\r\n\r\n /**\r\n * Gets the next value on a wrapped object following the\r\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\r\n *\r\n * @name next\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the next iterator value.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 1 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 2 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': true, 'value': undefined }\r\n */\r\n function wrapperNext() {\r\n if (this.__values__ === undefined) {\r\n this.__values__ = toArray(this.value());\r\n }\r\n var done = this.__index__ >= this.__values__.length,\r\n value = done ? undefined : this.__values__[this.__index__++];\r\n\r\n return { 'done': done, 'value': value };\r\n }\r\n\r\n /**\r\n * Enables the wrapper to be iterable.\r\n *\r\n * @name Symbol.iterator\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the wrapper object.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped[Symbol.iterator]() === wrapped;\r\n * // => true\r\n *\r\n * Array.from(wrapped);\r\n * // => [1, 2]\r\n */\r\n function wrapperToIterator() {\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\r\n *\r\n * @name plant\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @param {*} value The value to plant.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2]).map(square);\r\n * var other = wrapped.plant([3, 4]);\r\n *\r\n * other.value();\r\n * // => [9, 16]\r\n *\r\n * wrapped.value();\r\n * // => [1, 4]\r\n */\r\n function wrapperPlant(value) {\r\n var result,\r\n parent = this;\r\n\r\n while (parent instanceof baseLodash) {\r\n var clone = wrapperClone(parent);\r\n clone.__index__ = 0;\r\n clone.__values__ = undefined;\r\n if (result) {\r\n previous.__wrapped__ = clone;\r\n } else {\r\n result = clone;\r\n }\r\n var previous = clone;\r\n parent = parent.__wrapped__;\r\n }\r\n previous.__wrapped__ = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.reverse`.\r\n *\r\n * **Note:** This method mutates the wrapped array.\r\n *\r\n * @name reverse\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _(array).reverse().value()\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function wrapperReverse() {\r\n var value = this.__wrapped__;\r\n if (value instanceof LazyWrapper) {\r\n var wrapped = value;\r\n if (this.__actions__.length) {\r\n wrapped = new LazyWrapper(this);\r\n }\r\n wrapped = wrapped.reverse();\r\n wrapped.__actions__.push({\r\n 'func': thru,\r\n 'args': [reverse],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(wrapped, this.__chain__);\r\n }\r\n return this.thru(reverse);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence to resolve the unwrapped value.\r\n *\r\n * @name value\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias toJSON, valueOf\r\n * @category Seq\r\n * @returns {*} Returns the resolved unwrapped value.\r\n * @example\r\n *\r\n * _([1, 2, 3]).value();\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperValue() {\r\n return baseWrapperValue(this.__wrapped__, this.__actions__);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The corresponding value of\r\n * each key is the number of times the key was returned by `iteratee`. The\r\n * iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': 1, '6': 2 }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.countBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': 2, '5': 1 }\r\n */\r\n var countBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n ++result[key];\r\n } else {\r\n baseAssignValue(result, key, 1);\r\n }\r\n });\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\r\n * Iteration is stopped once `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * **Note:** This method returns `true` for\r\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\r\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\r\n * elements of empty collections.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.every([true, 1, null, 'yes'], Boolean);\r\n * // => false\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.every(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.every(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.every(users, 'active');\r\n * // => false\r\n */\r\n function every(collection, predicate, guard) {\r\n var func = isArray(collection) ? arrayEvery : baseEvery;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, getIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning an array of all elements\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * **Note:** Unlike `_.remove`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.reject\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * _.filter(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, { 'age': 36, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.filter(users, 'active');\r\n * // => objects for ['barney']\r\n *\r\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\r\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\r\n * // => objects for ['fred', 'barney']\r\n */\r\n function filter(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, getIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning the first element\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {*} Returns the matched element, else `undefined`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false },\r\n * { 'user': 'pebbles', 'age': 1, 'active': true }\r\n * ];\r\n *\r\n * _.find(users, function(o) { return o.age < 40; });\r\n * // => object for 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.find(users, { 'age': 1, 'active': true });\r\n * // => object for 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.find(users, ['active', false]);\r\n * // => object for 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.find(users, 'active');\r\n * // => object for 'barney'\r\n */\r\n var find = createFind(findIndex);\r\n\r\n /**\r\n * This method is like `_.find` except that it iterates over elements of\r\n * `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=collection.length-1] The index to search from.\r\n * @returns {*} Returns the matched element, else `undefined`.\r\n * @example\r\n *\r\n * _.findLast([1, 2, 3, 4], function(n) {\r\n * return n % 2 == 1;\r\n * });\r\n * // => 3\r\n */\r\n var findLast = createFind(findLastIndex);\r\n\r\n /**\r\n * Creates a flattened array of values by running each element in `collection`\r\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\r\n * with three arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * function duplicate(n) {\r\n * return [n, n];\r\n * }\r\n *\r\n * _.flatMap([1, 2], duplicate);\r\n * // => [1, 1, 2, 2]\r\n */\r\n function flatMap(collection, iteratee) {\r\n return baseFlatten(map(collection, iteratee), 1);\r\n }\r\n\r\n /**\r\n * This method is like `_.flatMap` except that it recursively flattens the\r\n * mapped results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.7.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * function duplicate(n) {\r\n * return [[[n, n]]];\r\n * }\r\n *\r\n * _.flatMapDeep([1, 2], duplicate);\r\n * // => [1, 1, 2, 2]\r\n */\r\n function flatMapDeep(collection, iteratee) {\r\n return baseFlatten(map(collection, iteratee), INFINITY);\r\n }\r\n\r\n /**\r\n * This method is like `_.flatMap` except that it recursively flattens the\r\n * mapped results up to `depth` times.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.7.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {number} [depth=1] The maximum recursion depth.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * function duplicate(n) {\r\n * return [[[n, n]]];\r\n * }\r\n *\r\n * _.flatMapDepth([1, 2], duplicate, 2);\r\n * // => [[1, 1], [2, 2]]\r\n */\r\n function flatMapDepth(collection, iteratee, depth) {\r\n depth = depth === undefined ? 1 : toInteger(depth);\r\n return baseFlatten(map(collection, iteratee), depth);\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\r\n * The iteratee is invoked with three arguments: (value, index|key, collection).\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\r\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\r\n * or `_.forOwn` for object iteration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias each\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n * @see _.forEachRight\r\n * @example\r\n *\r\n * _.forEach([1, 2], function(value) {\r\n * console.log(value);\r\n * });\r\n * // => Logs `1` then `2`.\r\n *\r\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\r\n */\r\n function forEach(collection, iteratee) {\r\n var func = isArray(collection) ? arrayEach : baseEach;\r\n return func(collection, getIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * This method is like `_.forEach` except that it iterates over elements of\r\n * `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @alias eachRight\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n * @see _.forEach\r\n * @example\r\n *\r\n * _.forEachRight([1, 2], function(value) {\r\n * console.log(value);\r\n * });\r\n * // => Logs `2` then `1`.\r\n */\r\n function forEachRight(collection, iteratee) {\r\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\r\n return func(collection, getIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The order of grouped values\r\n * is determined by the order they occur in `collection`. The corresponding\r\n * value of each key is an array of elements responsible for generating the\r\n * key. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': [4.2], '6': [6.1, 6.3] }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.groupBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': ['one', 'two'], '5': ['three'] }\r\n */\r\n var groupBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n result[key].push(value);\r\n } else {\r\n baseAssignValue(result, key, [value]);\r\n }\r\n });\r\n\r\n /**\r\n * Checks if `value` is in `collection`. If `collection` is a string, it's\r\n * checked for a substring of `value`, otherwise\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\r\n * the offset from the end of `collection`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object|string} collection The collection to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\r\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\r\n * @example\r\n *\r\n * _.includes([1, 2, 3], 1);\r\n * // => true\r\n *\r\n * _.includes([1, 2, 3], 1, 2);\r\n * // => false\r\n *\r\n * _.includes({ 'a': 1, 'b': 2 }, 1);\r\n * // => true\r\n *\r\n * _.includes('abcd', 'bc');\r\n * // => true\r\n */\r\n function includes(collection, value, fromIndex, guard) {\r\n collection = isArrayLike(collection) ? collection : values(collection);\r\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\r\n\r\n var length = collection.length;\r\n if (fromIndex < 0) {\r\n fromIndex = nativeMax(length + fromIndex, 0);\r\n }\r\n return isString(collection)\r\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\r\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\r\n }\r\n\r\n /**\r\n * Invokes the method at `path` of each element in `collection`, returning\r\n * an array of the results of each invoked method. Any additional arguments\r\n * are provided to each invoked method. If `path` is a function, it's invoked\r\n * for, and `this` bound to, each element in `collection`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Array|Function|string} path The path of the method to invoke or\r\n * the function invoked per iteration.\r\n * @param {...*} [args] The arguments to invoke each method with.\r\n * @returns {Array} Returns the array of results.\r\n * @example\r\n *\r\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\r\n * // => [[1, 5, 7], [1, 2, 3]]\r\n *\r\n * _.invokeMap([123, 456], String.prototype.split, '');\r\n * // => [['1', '2', '3'], ['4', '5', '6']]\r\n */\r\n var invokeMap = baseRest(function(collection, path, args) {\r\n var index = -1,\r\n isFunc = typeof path == 'function',\r\n result = isArrayLike(collection) ? Array(collection.length) : [];\r\n\r\n baseEach(collection, function(value) {\r\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\r\n });\r\n return result;\r\n });\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The corresponding value of\r\n * each key is the last element responsible for generating the key. The\r\n * iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * var array = [\r\n * { 'dir': 'left', 'code': 97 },\r\n * { 'dir': 'right', 'code': 100 }\r\n * ];\r\n *\r\n * _.keyBy(array, function(o) {\r\n * return String.fromCharCode(o.code);\r\n * });\r\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\r\n *\r\n * _.keyBy(array, 'dir');\r\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\r\n */\r\n var keyBy = createAggregator(function(result, value, key) {\r\n baseAssignValue(result, key, value);\r\n });\r\n\r\n /**\r\n * Creates an array of values by running each element in `collection` thru\r\n * `iteratee`. The iteratee is invoked with three arguments:\r\n * (value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\r\n *\r\n * The guarded methods are:\r\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\r\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\r\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\r\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * _.map([4, 8], square);\r\n * // => [16, 64]\r\n *\r\n * _.map({ 'a': 4, 'b': 8 }, square);\r\n * // => [16, 64] (iteration order is not guaranteed)\r\n *\r\n * var users = [\r\n * { 'user': 'barney' },\r\n * { 'user': 'fred' }\r\n * ];\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, 'user');\r\n * // => ['barney', 'fred']\r\n */\r\n function map(collection, iteratee) {\r\n var func = isArray(collection) ? arrayMap : baseMap;\r\n return func(collection, getIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * This method is like `_.sortBy` except that it allows specifying the sort\r\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\r\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\r\n * descending or \"asc\" for ascending sort order of corresponding values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\r\n * The iteratees to sort by.\r\n * @param {string[]} [orders] The sort orders of `iteratees`.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\r\n * @returns {Array} Returns the new sorted array.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'fred', 'age': 48 },\r\n * { 'user': 'barney', 'age': 34 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'barney', 'age': 36 }\r\n * ];\r\n *\r\n * // Sort by `user` in ascending order and by `age` in descending order.\r\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\r\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\r\n */\r\n function orderBy(collection, iteratees, orders, guard) {\r\n if (collection == null) {\r\n return [];\r\n }\r\n if (!isArray(iteratees)) {\r\n iteratees = iteratees == null ? [] : [iteratees];\r\n }\r\n orders = guard ? undefined : orders;\r\n if (!isArray(orders)) {\r\n orders = orders == null ? [] : [orders];\r\n }\r\n return baseOrderBy(collection, iteratees, orders);\r\n }\r\n\r\n /**\r\n * Creates an array of elements split into two groups, the first of which\r\n * contains elements `predicate` returns truthy for, the second of which\r\n * contains elements `predicate` returns falsey for. The predicate is\r\n * invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the array of grouped elements.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': true },\r\n * { 'user': 'pebbles', 'age': 1, 'active': false }\r\n * ];\r\n *\r\n * _.partition(users, function(o) { return o.active; });\r\n * // => objects for [['fred'], ['barney', 'pebbles']]\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.partition(users, { 'age': 1, 'active': false });\r\n * // => objects for [['pebbles'], ['barney', 'fred']]\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.partition(users, ['active', false]);\r\n * // => objects for [['barney', 'pebbles'], ['fred']]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.partition(users, 'active');\r\n * // => objects for [['fred'], ['barney', 'pebbles']]\r\n */\r\n var partition = createAggregator(function(result, value, key) {\r\n result[key ? 0 : 1].push(value);\r\n }, function() { return [[], []]; });\r\n\r\n /**\r\n * Reduces `collection` to a value which is the accumulated result of running\r\n * each element in `collection` thru `iteratee`, where each successive\r\n * invocation is supplied the return value of the previous. If `accumulator`\r\n * is not given, the first element of `collection` is used as the initial\r\n * value. The iteratee is invoked with four arguments:\r\n * (accumulator, value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\r\n *\r\n * The guarded methods are:\r\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\r\n * and `sortBy`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @returns {*} Returns the accumulated value.\r\n * @see _.reduceRight\r\n * @example\r\n *\r\n * _.reduce([1, 2], function(sum, n) {\r\n * return sum + n;\r\n * }, 0);\r\n * // => 3\r\n *\r\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\r\n * (result[value] || (result[value] = [])).push(key);\r\n * return result;\r\n * }, {});\r\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\r\n */\r\n function reduce(collection, iteratee, accumulator) {\r\n var func = isArray(collection) ? arrayReduce : baseReduce,\r\n initAccum = arguments.length < 3;\r\n\r\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\r\n }\r\n\r\n /**\r\n * This method is like `_.reduce` except that it iterates over elements of\r\n * `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @returns {*} Returns the accumulated value.\r\n * @see _.reduce\r\n * @example\r\n *\r\n * var array = [[0, 1], [2, 3], [4, 5]];\r\n *\r\n * _.reduceRight(array, function(flattened, other) {\r\n * return flattened.concat(other);\r\n * }, []);\r\n * // => [4, 5, 2, 3, 0, 1]\r\n */\r\n function reduceRight(collection, iteratee, accumulator) {\r\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\r\n initAccum = arguments.length < 3;\r\n\r\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\r\n }\r\n\r\n /**\r\n * The opposite of `_.filter`; this method returns the elements of `collection`\r\n * that `predicate` does **not** return truthy for.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.filter\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': true }\r\n * ];\r\n *\r\n * _.reject(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.reject(users, { 'age': 40, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.reject(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.reject(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function reject(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, negate(getIteratee(predicate, 3)));\r\n }\r\n\r\n /**\r\n * Gets a random element from `collection`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to sample.\r\n * @returns {*} Returns the random element.\r\n * @example\r\n *\r\n * _.sample([1, 2, 3, 4]);\r\n * // => 2\r\n */\r\n function sample(collection) {\r\n var func = isArray(collection) ? arraySample : baseSample;\r\n return func(collection);\r\n }\r\n\r\n /**\r\n * Gets `n` random elements at unique keys from `collection` up to the\r\n * size of `collection`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to sample.\r\n * @param {number} [n=1] The number of elements to sample.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the random elements.\r\n * @example\r\n *\r\n * _.sampleSize([1, 2, 3], 2);\r\n * // => [3, 1]\r\n *\r\n * _.sampleSize([1, 2, 3], 4);\r\n * // => [2, 3, 1]\r\n */\r\n function sampleSize(collection, n, guard) {\r\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\r\n n = 1;\r\n } else {\r\n n = toInteger(n);\r\n }\r\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\r\n return func(collection, n);\r\n }\r\n\r\n /**\r\n * Creates an array of shuffled values, using a version of the\r\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to shuffle.\r\n * @returns {Array} Returns the new shuffled array.\r\n * @example\r\n *\r\n * _.shuffle([1, 2, 3, 4]);\r\n * // => [4, 1, 3, 2]\r\n */\r\n function shuffle(collection) {\r\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\r\n return func(collection);\r\n }\r\n\r\n /**\r\n * Gets the size of `collection` by returning its length for array-like\r\n * values or the number of own enumerable string keyed properties for objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object|string} collection The collection to inspect.\r\n * @returns {number} Returns the collection size.\r\n * @example\r\n *\r\n * _.size([1, 2, 3]);\r\n * // => 3\r\n *\r\n * _.size({ 'a': 1, 'b': 2 });\r\n * // => 2\r\n *\r\n * _.size('pebbles');\r\n * // => 7\r\n */\r\n function size(collection) {\r\n if (collection == null) {\r\n return 0;\r\n }\r\n if (isArrayLike(collection)) {\r\n return isString(collection) ? stringSize(collection) : collection.length;\r\n }\r\n var tag = getTag(collection);\r\n if (tag == mapTag || tag == setTag) {\r\n return collection.size;\r\n }\r\n return baseKeys(collection).length;\r\n }\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **any** element of `collection`.\r\n * Iteration is stopped once `predicate` returns truthy. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.some([null, 0, 'yes', false], Boolean);\r\n * // => true\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.some(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.some(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.some(users, 'active');\r\n * // => true\r\n */\r\n function some(collection, predicate, guard) {\r\n var func = isArray(collection) ? arraySome : baseSome;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, getIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Creates an array of elements, sorted in ascending order by the results of\r\n * running each element in a collection thru each iteratee. This method\r\n * performs a stable sort, that is, it preserves the original sort order of\r\n * equal elements. The iteratees are invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\r\n * The iteratees to sort by.\r\n * @returns {Array} Returns the new sorted array.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'fred', 'age': 48 },\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 30 },\r\n * { 'user': 'barney', 'age': 34 }\r\n * ];\r\n *\r\n * _.sortBy(users, [function(o) { return o.user; }]);\r\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\r\n *\r\n * _.sortBy(users, ['user', 'age']);\r\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\r\n */\r\n var sortBy = baseRest(function(collection, iteratees) {\r\n if (collection == null) {\r\n return [];\r\n }\r\n var length = iteratees.length;\r\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\r\n iteratees = [];\r\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\r\n iteratees = [iteratees[0]];\r\n }\r\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\r\n });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Gets the timestamp of the number of milliseconds that have elapsed since\r\n * the Unix epoch (1 January 1970 00:00:00 UTC).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Date\r\n * @returns {number} Returns the timestamp.\r\n * @example\r\n *\r\n * _.defer(function(stamp) {\r\n * console.log(_.now() - stamp);\r\n * }, _.now());\r\n * // => Logs the number of milliseconds it took for the deferred invocation.\r\n */\r\n var now = ctxNow || function() {\r\n return root.Date.now();\r\n };\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The opposite of `_.before`; this method creates a function that invokes\r\n * `func` once it's called `n` or more times.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {number} n The number of calls before `func` is invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var saves = ['profile', 'settings'];\r\n *\r\n * var done = _.after(saves.length, function() {\r\n * console.log('done saving!');\r\n * });\r\n *\r\n * _.forEach(saves, function(type) {\r\n * asyncSave({ 'type': type, 'complete': done });\r\n * });\r\n * // => Logs 'done saving!' after the two async saves have completed.\r\n */\r\n function after(n, func) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n < 1) {\r\n return func.apply(this, arguments);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func`, with up to `n` arguments,\r\n * ignoring any additional arguments.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} func The function to cap arguments for.\r\n * @param {number} [n=func.length] The arity cap.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Function} Returns the new capped function.\r\n * @example\r\n *\r\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\r\n * // => [6, 8, 10]\r\n */\r\n function ary(func, n, guard) {\r\n n = guard ? undefined : n;\r\n n = (func && n == null) ? func.length : n;\r\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func`, with the `this` binding and arguments\r\n * of the created function, while it's called less than `n` times. Subsequent\r\n * calls to the created function return the result of the last `func` invocation.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {number} n The number of calls at which `func` is no longer invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * jQuery(element).on('click', _.before(5, addContactToList));\r\n * // => Allows adding up to 4 contacts to the list.\r\n */\r\n function before(n, func) {\r\n var result;\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n > 0) {\r\n result = func.apply(this, arguments);\r\n }\r\n if (n <= 1) {\r\n func = undefined;\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\r\n * and `partials` prepended to the arguments it receives.\r\n *\r\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\r\n * may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\r\n * property of bound functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to bind.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new bound function.\r\n * @example\r\n *\r\n * function greet(greeting, punctuation) {\r\n * return greeting + ' ' + this.user + punctuation;\r\n * }\r\n *\r\n * var object = { 'user': 'fred' };\r\n *\r\n * var bound = _.bind(greet, object, 'hi');\r\n * bound('!');\r\n * // => 'hi fred!'\r\n *\r\n * // Bound with placeholders.\r\n * var bound = _.bind(greet, object, _, '!');\r\n * bound('hi');\r\n * // => 'hi fred!'\r\n */\r\n var bind = baseRest(function(func, thisArg, partials) {\r\n var bitmask = WRAP_BIND_FLAG;\r\n if (partials.length) {\r\n var holders = replaceHolders(partials, getHolder(bind));\r\n bitmask |= WRAP_PARTIAL_FLAG;\r\n }\r\n return createWrap(func, bitmask, thisArg, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a function that invokes the method at `object[key]` with `partials`\r\n * prepended to the arguments it receives.\r\n *\r\n * This method differs from `_.bind` by allowing bound functions to reference\r\n * methods that may be redefined or don't yet exist. See\r\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\r\n * for more details.\r\n *\r\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\r\n * builds, may be used as a placeholder for partially applied arguments.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.10.0\r\n * @category Function\r\n * @param {Object} object The object to invoke the method on.\r\n * @param {string} key The key of the method.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new bound function.\r\n * @example\r\n *\r\n * var object = {\r\n * 'user': 'fred',\r\n * 'greet': function(greeting, punctuation) {\r\n * return greeting + ' ' + this.user + punctuation;\r\n * }\r\n * };\r\n *\r\n * var bound = _.bindKey(object, 'greet', 'hi');\r\n * bound('!');\r\n * // => 'hi fred!'\r\n *\r\n * object.greet = function(greeting, punctuation) {\r\n * return greeting + 'ya ' + this.user + punctuation;\r\n * };\r\n *\r\n * bound('!');\r\n * // => 'hiya fred!'\r\n *\r\n * // Bound with placeholders.\r\n * var bound = _.bindKey(object, 'greet', _, '!');\r\n * bound('hi');\r\n * // => 'hiya fred!'\r\n */\r\n var bindKey = baseRest(function(object, key, partials) {\r\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\r\n if (partials.length) {\r\n var holders = replaceHolders(partials, getHolder(bindKey));\r\n bitmask |= WRAP_PARTIAL_FLAG;\r\n }\r\n return createWrap(key, bitmask, object, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a function that accepts arguments of `func` and either invokes\r\n * `func` returning its result, if at least `arity` number of arguments have\r\n * been provided, or returns a function that accepts the remaining `func`\r\n * arguments, and so on. The arity of `func` may be specified if `func.length`\r\n * is not sufficient.\r\n *\r\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\r\n * may be used as a placeholder for provided arguments.\r\n *\r\n * **Note:** This method doesn't set the \"length\" property of curried functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Function\r\n * @param {Function} func The function to curry.\r\n * @param {number} [arity=func.length] The arity of `func`.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Function} Returns the new curried function.\r\n * @example\r\n *\r\n * var abc = function(a, b, c) {\r\n * return [a, b, c];\r\n * };\r\n *\r\n * var curried = _.curry(abc);\r\n *\r\n * curried(1)(2)(3);\r\n * // => [1, 2, 3]\r\n *\r\n * curried(1, 2)(3);\r\n * // => [1, 2, 3]\r\n *\r\n * curried(1, 2, 3);\r\n * // => [1, 2, 3]\r\n *\r\n * // Curried with placeholders.\r\n * curried(1)(_, 3)(2);\r\n * // => [1, 2, 3]\r\n */\r\n function curry(func, arity, guard) {\r\n arity = guard ? undefined : arity;\r\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\r\n result.placeholder = curry.placeholder;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is like `_.curry` except that arguments are applied to `func`\r\n * in the manner of `_.partialRight` instead of `_.partial`.\r\n *\r\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\r\n * builds, may be used as a placeholder for provided arguments.\r\n *\r\n * **Note:** This method doesn't set the \"length\" property of curried functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} func The function to curry.\r\n * @param {number} [arity=func.length] The arity of `func`.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Function} Returns the new curried function.\r\n * @example\r\n *\r\n * var abc = function(a, b, c) {\r\n * return [a, b, c];\r\n * };\r\n *\r\n * var curried = _.curryRight(abc);\r\n *\r\n * curried(3)(2)(1);\r\n * // => [1, 2, 3]\r\n *\r\n * curried(2, 3)(1);\r\n * // => [1, 2, 3]\r\n *\r\n * curried(1, 2, 3);\r\n * // => [1, 2, 3]\r\n *\r\n * // Curried with placeholders.\r\n * curried(3)(1, _)(2);\r\n * // => [1, 2, 3]\r\n */\r\n function curryRight(func, arity, guard) {\r\n arity = guard ? undefined : arity;\r\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\r\n result.placeholder = curryRight.placeholder;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a debounced function that delays invoking `func` until after `wait`\r\n * milliseconds have elapsed since the last time the debounced function was\r\n * invoked. The debounced function comes with a `cancel` method to cancel\r\n * delayed `func` invocations and a `flush` method to immediately invoke them.\r\n * Provide `options` to indicate whether `func` should be invoked on the\r\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\r\n * with the last arguments provided to the debounced function. Subsequent\r\n * calls to the debounced function return the result of the last `func`\r\n * invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the debounced function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.debounce` and `_.throttle`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to debounce.\r\n * @param {number} [wait=0] The number of milliseconds to delay.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=false]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {number} [options.maxWait]\r\n * The maximum time `func` is allowed to be delayed before it's invoked.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new debounced function.\r\n * @example\r\n *\r\n * // Avoid costly calculations while the window size is in flux.\r\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\r\n *\r\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\r\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\r\n * 'leading': true,\r\n * 'trailing': false\r\n * }));\r\n *\r\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\r\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\r\n * var source = new EventSource('/stream');\r\n * jQuery(source).on('message', debounced);\r\n *\r\n * // Cancel the trailing debounced invocation.\r\n * jQuery(window).on('popstate', debounced.cancel);\r\n */\r\n function debounce(func, wait, options) {\r\n var lastArgs,\r\n lastThis,\r\n maxWait,\r\n result,\r\n timerId,\r\n lastCallTime,\r\n lastInvokeTime = 0,\r\n leading = false,\r\n maxing = false,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n wait = toNumber(wait) || 0;\r\n if (isObject(options)) {\r\n leading = !!options.leading;\r\n maxing = 'maxWait' in options;\r\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n\r\n function invokeFunc(time) {\r\n var args = lastArgs,\r\n thisArg = lastThis;\r\n\r\n lastArgs = lastThis = undefined;\r\n lastInvokeTime = time;\r\n result = func.apply(thisArg, args);\r\n return result;\r\n }\r\n\r\n function leadingEdge(time) {\r\n // Reset any `maxWait` timer.\r\n lastInvokeTime = time;\r\n // Start the timer for the trailing edge.\r\n timerId = setTimeout(timerExpired, wait);\r\n // Invoke the leading edge.\r\n return leading ? invokeFunc(time) : result;\r\n }\r\n\r\n function remainingWait(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime,\r\n timeWaiting = wait - timeSinceLastCall;\r\n\r\n return maxing\r\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\r\n : timeWaiting;\r\n }\r\n\r\n function shouldInvoke(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime;\r\n\r\n // Either this is the first call, activity has stopped and we're at the\r\n // trailing edge, the system time has gone backwards and we're treating\r\n // it as the trailing edge, or we've hit the `maxWait` limit.\r\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\r\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\r\n }\r\n\r\n function timerExpired() {\r\n var time = now();\r\n if (shouldInvoke(time)) {\r\n return trailingEdge(time);\r\n }\r\n // Restart the timer.\r\n timerId = setTimeout(timerExpired, remainingWait(time));\r\n }\r\n\r\n function trailingEdge(time) {\r\n timerId = undefined;\r\n\r\n // Only invoke if we have `lastArgs` which means `func` has been\r\n // debounced at least once.\r\n if (trailing && lastArgs) {\r\n return invokeFunc(time);\r\n }\r\n lastArgs = lastThis = undefined;\r\n return result;\r\n }\r\n\r\n function cancel() {\r\n if (timerId !== undefined) {\r\n clearTimeout(timerId);\r\n }\r\n lastInvokeTime = 0;\r\n lastArgs = lastCallTime = lastThis = timerId = undefined;\r\n }\r\n\r\n function flush() {\r\n return timerId === undefined ? result : trailingEdge(now());\r\n }\r\n\r\n function debounced() {\r\n var time = now(),\r\n isInvoking = shouldInvoke(time);\r\n\r\n lastArgs = arguments;\r\n lastThis = this;\r\n lastCallTime = time;\r\n\r\n if (isInvoking) {\r\n if (timerId === undefined) {\r\n return leadingEdge(lastCallTime);\r\n }\r\n if (maxing) {\r\n // Handle invocations in a tight loop.\r\n clearTimeout(timerId);\r\n timerId = setTimeout(timerExpired, wait);\r\n return invokeFunc(lastCallTime);\r\n }\r\n }\r\n if (timerId === undefined) {\r\n timerId = setTimeout(timerExpired, wait);\r\n }\r\n return result;\r\n }\r\n debounced.cancel = cancel;\r\n debounced.flush = flush;\r\n return debounced;\r\n }\r\n\r\n /**\r\n * Defers invoking the `func` until the current call stack has cleared. Any\r\n * additional arguments are provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to defer.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.defer(function(text) {\r\n * console.log(text);\r\n * }, 'deferred');\r\n * // => Logs 'deferred' after one millisecond.\r\n */\r\n var defer = baseRest(function(func, args) {\r\n return baseDelay(func, 1, args);\r\n });\r\n\r\n /**\r\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\r\n * provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.delay(function(text) {\r\n * console.log(text);\r\n * }, 1000, 'later');\r\n * // => Logs 'later' after one second.\r\n */\r\n var delay = baseRest(function(func, wait, args) {\r\n return baseDelay(func, toNumber(wait) || 0, args);\r\n });\r\n\r\n /**\r\n * Creates a function that invokes `func` with arguments reversed.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to flip arguments for.\r\n * @returns {Function} Returns the new flipped function.\r\n * @example\r\n *\r\n * var flipped = _.flip(function() {\r\n * return _.toArray(arguments);\r\n * });\r\n *\r\n * flipped('a', 'b', 'c', 'd');\r\n * // => ['d', 'c', 'b', 'a']\r\n */\r\n function flip(func) {\r\n return createWrap(func, WRAP_FLIP_FLAG);\r\n }\r\n\r\n /**\r\n * Creates a function that memoizes the result of `func`. If `resolver` is\r\n * provided, it determines the cache key for storing the result based on the\r\n * arguments provided to the memoized function. By default, the first argument\r\n * provided to the memoized function is used as the map cache key. The `func`\r\n * is invoked with the `this` binding of the memoized function.\r\n *\r\n * **Note:** The cache is exposed as the `cache` property on the memoized\r\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\r\n * constructor with one whose instances implement the\r\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\r\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to have its output memoized.\r\n * @param {Function} [resolver] The function to resolve the cache key.\r\n * @returns {Function} Returns the new memoized function.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n * var other = { 'c': 3, 'd': 4 };\r\n *\r\n * var values = _.memoize(_.values);\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * values(other);\r\n * // => [3, 4]\r\n *\r\n * object.a = 2;\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * // Modify the result cache.\r\n * values.cache.set(object, ['a', 'b']);\r\n * values(object);\r\n * // => ['a', 'b']\r\n *\r\n * // Replace `_.memoize.Cache`.\r\n * _.memoize.Cache = WeakMap;\r\n */\r\n function memoize(func, resolver) {\r\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var memoized = function() {\r\n var args = arguments,\r\n key = resolver ? resolver.apply(this, args) : args[0],\r\n cache = memoized.cache;\r\n\r\n if (cache.has(key)) {\r\n return cache.get(key);\r\n }\r\n var result = func.apply(this, args);\r\n memoized.cache = cache.set(key, result) || cache;\r\n return result;\r\n };\r\n memoized.cache = new (memoize.Cache || MapCache);\r\n return memoized;\r\n }\r\n\r\n // Expose `MapCache`.\r\n memoize.Cache = MapCache;\r\n\r\n /**\r\n * Creates a function that negates the result of the predicate `func`. The\r\n * `func` predicate is invoked with the `this` binding and arguments of the\r\n * created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} predicate The predicate to negate.\r\n * @returns {Function} Returns the new negated function.\r\n * @example\r\n *\r\n * function isEven(n) {\r\n * return n % 2 == 0;\r\n * }\r\n *\r\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\r\n * // => [1, 3, 5]\r\n */\r\n function negate(predicate) {\r\n if (typeof predicate != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return function() {\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return !predicate.call(this);\r\n case 1: return !predicate.call(this, args[0]);\r\n case 2: return !predicate.call(this, args[0], args[1]);\r\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\r\n }\r\n return !predicate.apply(this, args);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that is restricted to invoking `func` once. Repeat calls\r\n * to the function return the value of the first invocation. The `func` is\r\n * invoked with the `this` binding and arguments of the created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var initialize = _.once(createApplication);\r\n * initialize();\r\n * initialize();\r\n * // => `createApplication` is invoked once\r\n */\r\n function once(func) {\r\n return before(2, func);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with its arguments transformed.\r\n *\r\n * @static\r\n * @since 4.0.0\r\n * @memberOf _\r\n * @category Function\r\n * @param {Function} func The function to wrap.\r\n * @param {...(Function|Function[])} [transforms=[_.identity]]\r\n * The argument transforms.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * function doubled(n) {\r\n * return n * 2;\r\n * }\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var func = _.overArgs(function(x, y) {\r\n * return [x, y];\r\n * }, [square, doubled]);\r\n *\r\n * func(9, 3);\r\n * // => [81, 6]\r\n *\r\n * func(10, 5);\r\n * // => [100, 10]\r\n */\r\n var overArgs = castRest(function(func, transforms) {\r\n transforms = (transforms.length == 1 && isArray(transforms[0]))\r\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\r\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\r\n\r\n var funcsLength = transforms.length;\r\n return baseRest(function(args) {\r\n var index = -1,\r\n length = nativeMin(args.length, funcsLength);\r\n\r\n while (++index < length) {\r\n args[index] = transforms[index].call(this, args[index]);\r\n }\r\n return apply(func, this, args);\r\n });\r\n });\r\n\r\n /**\r\n * Creates a function that invokes `func` with `partials` prepended to the\r\n * arguments it receives. This method is like `_.bind` except it does **not**\r\n * alter the `this` binding.\r\n *\r\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\r\n * builds, may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** This method doesn't set the \"length\" property of partially\r\n * applied functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.2.0\r\n * @category Function\r\n * @param {Function} func The function to partially apply arguments to.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new partially applied function.\r\n * @example\r\n *\r\n * function greet(greeting, name) {\r\n * return greeting + ' ' + name;\r\n * }\r\n *\r\n * var sayHelloTo = _.partial(greet, 'hello');\r\n * sayHelloTo('fred');\r\n * // => 'hello fred'\r\n *\r\n * // Partially applied with placeholders.\r\n * var greetFred = _.partial(greet, _, 'fred');\r\n * greetFred('hi');\r\n * // => 'hi fred'\r\n */\r\n var partial = baseRest(function(func, partials) {\r\n var holders = replaceHolders(partials, getHolder(partial));\r\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\r\n });\r\n\r\n /**\r\n * This method is like `_.partial` except that partially applied arguments\r\n * are appended to the arguments it receives.\r\n *\r\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\r\n * builds, may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** This method doesn't set the \"length\" property of partially\r\n * applied functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Function\r\n * @param {Function} func The function to partially apply arguments to.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new partially applied function.\r\n * @example\r\n *\r\n * function greet(greeting, name) {\r\n * return greeting + ' ' + name;\r\n * }\r\n *\r\n * var greetFred = _.partialRight(greet, 'fred');\r\n * greetFred('hi');\r\n * // => 'hi fred'\r\n *\r\n * // Partially applied with placeholders.\r\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\r\n * sayHelloTo('fred');\r\n * // => 'hello fred'\r\n */\r\n var partialRight = baseRest(function(func, partials) {\r\n var holders = replaceHolders(partials, getHolder(partialRight));\r\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a function that invokes `func` with arguments arranged according\r\n * to the specified `indexes` where the argument value at the first index is\r\n * provided as the first argument, the argument value at the second index is\r\n * provided as the second argument, and so on.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} func The function to rearrange arguments for.\r\n * @param {...(number|number[])} indexes The arranged argument indexes.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var rearged = _.rearg(function(a, b, c) {\r\n * return [a, b, c];\r\n * }, [2, 0, 1]);\r\n *\r\n * rearged('b', 'c', 'a')\r\n * // => ['a', 'b', 'c']\r\n */\r\n var rearg = flatRest(function(func, indexes) {\r\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\r\n });\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of the\r\n * created function and arguments from `start` and beyond provided as\r\n * an array.\r\n *\r\n * **Note:** This method is based on the\r\n * [rest parameter](https://mdn.io/rest_parameters).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var say = _.rest(function(what, names) {\r\n * return what + ' ' + _.initial(names).join(', ') +\r\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\r\n * });\r\n *\r\n * say('hello', 'fred', 'barney', 'pebbles');\r\n * // => 'hello fred, barney, & pebbles'\r\n */\r\n function rest(func, start) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n start = start === undefined ? start : toInteger(start);\r\n return baseRest(func, start);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of the\r\n * create function and an array of arguments much like\r\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\r\n *\r\n * **Note:** This method is based on the\r\n * [spread operator](https://mdn.io/spread_operator).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Function\r\n * @param {Function} func The function to spread arguments over.\r\n * @param {number} [start=0] The start position of the spread.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var say = _.spread(function(who, what) {\r\n * return who + ' says ' + what;\r\n * });\r\n *\r\n * say(['fred', 'hello']);\r\n * // => 'fred says hello'\r\n *\r\n * var numbers = Promise.all([\r\n * Promise.resolve(40),\r\n * Promise.resolve(36)\r\n * ]);\r\n *\r\n * numbers.then(_.spread(function(x, y) {\r\n * return x + y;\r\n * }));\r\n * // => a Promise of 76\r\n */\r\n function spread(func, start) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\r\n return baseRest(function(args) {\r\n var array = args[start],\r\n otherArgs = castSlice(args, 0, start);\r\n\r\n if (array) {\r\n arrayPush(otherArgs, array);\r\n }\r\n return apply(func, this, otherArgs);\r\n });\r\n }\r\n\r\n /**\r\n * Creates a throttled function that only invokes `func` at most once per\r\n * every `wait` milliseconds. The throttled function comes with a `cancel`\r\n * method to cancel delayed `func` invocations and a `flush` method to\r\n * immediately invoke them. Provide `options` to indicate whether `func`\r\n * should be invoked on the leading and/or trailing edge of the `wait`\r\n * timeout. The `func` is invoked with the last arguments provided to the\r\n * throttled function. Subsequent calls to the throttled function return the\r\n * result of the last `func` invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the throttled function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.throttle` and `_.debounce`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to throttle.\r\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=true]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new throttled function.\r\n * @example\r\n *\r\n * // Avoid excessively updating the position while scrolling.\r\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\r\n *\r\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\r\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\r\n * jQuery(element).on('click', throttled);\r\n *\r\n * // Cancel the trailing throttled invocation.\r\n * jQuery(window).on('popstate', throttled.cancel);\r\n */\r\n function throttle(func, wait, options) {\r\n var leading = true,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n if (isObject(options)) {\r\n leading = 'leading' in options ? !!options.leading : leading;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n return debounce(func, wait, {\r\n 'leading': leading,\r\n 'maxWait': wait,\r\n 'trailing': trailing\r\n });\r\n }\r\n\r\n /**\r\n * Creates a function that accepts up to one argument, ignoring any\r\n * additional arguments.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to cap arguments for.\r\n * @returns {Function} Returns the new capped function.\r\n * @example\r\n *\r\n * _.map(['6', '8', '10'], _.unary(parseInt));\r\n * // => [6, 8, 10]\r\n */\r\n function unary(func) {\r\n return ary(func, 1);\r\n }\r\n\r\n /**\r\n * Creates a function that provides `value` to `wrapper` as its first\r\n * argument. Any additional arguments provided to the function are appended\r\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\r\n * binding of the created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {*} value The value to wrap.\r\n * @param {Function} [wrapper=identity] The wrapper function.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var p = _.wrap(_.escape, function(func, text) {\r\n * return '

' + func(text) + '

';\r\n * });\r\n *\r\n * p('fred, barney, & pebbles');\r\n * // => '

fred, barney, & pebbles

'\r\n */\r\n function wrap(value, wrapper) {\r\n return partial(castFunction(wrapper), value);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Casts `value` as an array if it's not one.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.4.0\r\n * @category Lang\r\n * @param {*} value The value to inspect.\r\n * @returns {Array} Returns the cast array.\r\n * @example\r\n *\r\n * _.castArray(1);\r\n * // => [1]\r\n *\r\n * _.castArray({ 'a': 1 });\r\n * // => [{ 'a': 1 }]\r\n *\r\n * _.castArray('abc');\r\n * // => ['abc']\r\n *\r\n * _.castArray(null);\r\n * // => [null]\r\n *\r\n * _.castArray(undefined);\r\n * // => [undefined]\r\n *\r\n * _.castArray();\r\n * // => []\r\n *\r\n * var array = [1, 2, 3];\r\n * console.log(_.castArray(array) === array);\r\n * // => true\r\n */\r\n function castArray() {\r\n if (!arguments.length) {\r\n return [];\r\n }\r\n var value = arguments[0];\r\n return isArray(value) ? value : [value];\r\n }\r\n\r\n /**\r\n * Creates a shallow clone of `value`.\r\n *\r\n * **Note:** This method is loosely based on the\r\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\r\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\r\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\r\n * arrays. The own enumerable properties of `arguments` objects are cloned\r\n * as plain objects. An empty object is returned for uncloneable values such\r\n * as error objects, functions, DOM nodes, and WeakMaps.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to clone.\r\n * @returns {*} Returns the cloned value.\r\n * @see _.cloneDeep\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var shallow = _.clone(objects);\r\n * console.log(shallow[0] === objects[0]);\r\n * // => true\r\n */\r\n function clone(value) {\r\n return baseClone(value, CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * This method is like `_.clone` except that it accepts `customizer` which\r\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\r\n * cloning is handled by the method instead. The `customizer` is invoked with\r\n * up to four arguments; (value [, index|key, object, stack]).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to clone.\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @returns {*} Returns the cloned value.\r\n * @see _.cloneDeepWith\r\n * @example\r\n *\r\n * function customizer(value) {\r\n * if (_.isElement(value)) {\r\n * return value.cloneNode(false);\r\n * }\r\n * }\r\n *\r\n * var el = _.cloneWith(document.body, customizer);\r\n *\r\n * console.log(el === document.body);\r\n * // => false\r\n * console.log(el.nodeName);\r\n * // => 'BODY'\r\n * console.log(el.childNodes.length);\r\n * // => 0\r\n */\r\n function cloneWith(value, customizer) {\r\n customizer = typeof customizer == 'function' ? customizer : undefined;\r\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\r\n }\r\n\r\n /**\r\n * This method is like `_.clone` except that it recursively clones `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Lang\r\n * @param {*} value The value to recursively clone.\r\n * @returns {*} Returns the deep cloned value.\r\n * @see _.clone\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var deep = _.cloneDeep(objects);\r\n * console.log(deep[0] === objects[0]);\r\n * // => false\r\n */\r\n function cloneDeep(value) {\r\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * This method is like `_.cloneWith` except that it recursively clones `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to recursively clone.\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @returns {*} Returns the deep cloned value.\r\n * @see _.cloneWith\r\n * @example\r\n *\r\n * function customizer(value) {\r\n * if (_.isElement(value)) {\r\n * return value.cloneNode(true);\r\n * }\r\n * }\r\n *\r\n * var el = _.cloneDeepWith(document.body, customizer);\r\n *\r\n * console.log(el === document.body);\r\n * // => false\r\n * console.log(el.nodeName);\r\n * // => 'BODY'\r\n * console.log(el.childNodes.length);\r\n * // => 20\r\n */\r\n function cloneDeepWith(value, customizer) {\r\n customizer = typeof customizer == 'function' ? customizer : undefined;\r\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\r\n }\r\n\r\n /**\r\n * Checks if `object` conforms to `source` by invoking the predicate\r\n * properties of `source` with the corresponding property values of `object`.\r\n *\r\n * **Note:** This method is equivalent to `_.conforms` when `source` is\r\n * partially applied.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.14.0\r\n * @category Lang\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property predicates to conform to.\r\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n *\r\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\r\n * // => true\r\n *\r\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\r\n * // => false\r\n */\r\n function conformsTo(object, source) {\r\n return source == null || baseConformsTo(object, source, keys(source));\r\n }\r\n\r\n /**\r\n * Performs a\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * comparison between two values to determine if they are equivalent.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.eq(object, object);\r\n * // => true\r\n *\r\n * _.eq(object, other);\r\n * // => false\r\n *\r\n * _.eq('a', 'a');\r\n * // => true\r\n *\r\n * _.eq('a', Object('a'));\r\n * // => false\r\n *\r\n * _.eq(NaN, NaN);\r\n * // => true\r\n */\r\n function eq(value, other) {\r\n return value === other || (value !== value && other !== other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is greater than `other`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.9.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\r\n * else `false`.\r\n * @see _.lt\r\n * @example\r\n *\r\n * _.gt(3, 1);\r\n * // => true\r\n *\r\n * _.gt(3, 3);\r\n * // => false\r\n *\r\n * _.gt(1, 3);\r\n * // => false\r\n */\r\n var gt = createRelationalOperation(baseGt);\r\n\r\n /**\r\n * Checks if `value` is greater than or equal to `other`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.9.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\r\n * `other`, else `false`.\r\n * @see _.lte\r\n * @example\r\n *\r\n * _.gte(3, 1);\r\n * // => true\r\n *\r\n * _.gte(3, 3);\r\n * // => true\r\n *\r\n * _.gte(1, 3);\r\n * // => false\r\n */\r\n var gte = createRelationalOperation(function(value, other) {\r\n return value >= other;\r\n });\r\n\r\n /**\r\n * Checks if `value` is likely an `arguments` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArguments(function() { return arguments; }());\r\n * // => true\r\n *\r\n * _.isArguments([1, 2, 3]);\r\n * // => false\r\n */\r\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\r\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\r\n !propertyIsEnumerable.call(value, 'callee');\r\n };\r\n\r\n /**\r\n * Checks if `value` is classified as an `Array` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\r\n * @example\r\n *\r\n * _.isArray([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArray(document.body.children);\r\n * // => false\r\n *\r\n * _.isArray('abc');\r\n * // => false\r\n *\r\n * _.isArray(_.noop);\r\n * // => false\r\n */\r\n var isArray = Array.isArray;\r\n\r\n /**\r\n * Checks if `value` is classified as an `ArrayBuffer` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\r\n * @example\r\n *\r\n * _.isArrayBuffer(new ArrayBuffer(2));\r\n * // => true\r\n *\r\n * _.isArrayBuffer(new Array(2));\r\n * // => false\r\n */\r\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\r\n\r\n /**\r\n * Checks if `value` is array-like. A value is considered array-like if it's\r\n * not a function and has a `value.length` that's an integer greater than or\r\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\r\n * @example\r\n *\r\n * _.isArrayLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLike(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLike('abc');\r\n * // => true\r\n *\r\n * _.isArrayLike(_.noop);\r\n * // => false\r\n */\r\n function isArrayLike(value) {\r\n return value != null && isLength(value.length) && !isFunction(value);\r\n }\r\n\r\n /**\r\n * This method is like `_.isArrayLike` except that it also checks if `value`\r\n * is an object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array-like object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArrayLikeObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject('abc');\r\n * // => false\r\n *\r\n * _.isArrayLikeObject(_.noop);\r\n * // => false\r\n */\r\n function isArrayLikeObject(value) {\r\n return isObjectLike(value) && isArrayLike(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a boolean primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\r\n * @example\r\n *\r\n * _.isBoolean(false);\r\n * // => true\r\n *\r\n * _.isBoolean(null);\r\n * // => false\r\n */\r\n function isBoolean(value) {\r\n return value === true || value === false ||\r\n (isObjectLike(value) && baseGetTag(value) == boolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a buffer.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\r\n * @example\r\n *\r\n * _.isBuffer(new Buffer(2));\r\n * // => true\r\n *\r\n * _.isBuffer(new Uint8Array(2));\r\n * // => false\r\n */\r\n var isBuffer = nativeIsBuffer || stubFalse;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Date` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n * @example\r\n *\r\n * _.isDate(new Date);\r\n * // => true\r\n *\r\n * _.isDate('Mon April 23 2012');\r\n * // => false\r\n */\r\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\r\n\r\n /**\r\n * Checks if `value` is likely a DOM element.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\r\n * @example\r\n *\r\n * _.isElement(document.body);\r\n * // => true\r\n *\r\n * _.isElement('');\r\n * // => false\r\n */\r\n function isElement(value) {\r\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is an empty object, collection, map, or set.\r\n *\r\n * Objects are considered empty if they have no own enumerable string keyed\r\n * properties.\r\n *\r\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\r\n * jQuery-like collections are considered empty if they have a `length` of `0`.\r\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\r\n * @example\r\n *\r\n * _.isEmpty(null);\r\n * // => true\r\n *\r\n * _.isEmpty(true);\r\n * // => true\r\n *\r\n * _.isEmpty(1);\r\n * // => true\r\n *\r\n * _.isEmpty([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isEmpty({ 'a': 1 });\r\n * // => false\r\n */\r\n function isEmpty(value) {\r\n if (value == null) {\r\n return true;\r\n }\r\n if (isArrayLike(value) &&\r\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\r\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\r\n return !value.length;\r\n }\r\n var tag = getTag(value);\r\n if (tag == mapTag || tag == setTag) {\r\n return !value.size;\r\n }\r\n if (isPrototype(value)) {\r\n return !baseKeys(value).length;\r\n }\r\n for (var key in value) {\r\n if (hasOwnProperty.call(value, key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Performs a deep comparison between two values to determine if they are\r\n * equivalent.\r\n *\r\n * **Note:** This method supports comparing arrays, array buffers, booleans,\r\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\r\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\r\n * by their own, not inherited, enumerable properties. Functions and DOM\r\n * nodes are compared by strict equality, i.e. `===`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.isEqual(object, other);\r\n * // => true\r\n *\r\n * object === other;\r\n * // => false\r\n */\r\n function isEqual(value, other) {\r\n return baseIsEqual(value, other);\r\n }\r\n\r\n /**\r\n * This method is like `_.isEqual` except that it accepts `customizer` which\r\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\r\n * are handled by the method instead. The `customizer` is invoked with up to\r\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * function isGreeting(value) {\r\n * return /^h(?:i|ello)$/.test(value);\r\n * }\r\n *\r\n * function customizer(objValue, othValue) {\r\n * if (isGreeting(objValue) && isGreeting(othValue)) {\r\n * return true;\r\n * }\r\n * }\r\n *\r\n * var array = ['hello', 'goodbye'];\r\n * var other = ['hi', 'goodbye'];\r\n *\r\n * _.isEqualWith(array, other, customizer);\r\n * // => true\r\n */\r\n function isEqualWith(value, other, customizer) {\r\n customizer = typeof customizer == 'function' ? customizer : undefined;\r\n var result = customizer ? customizer(value, other) : undefined;\r\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\r\n }\r\n\r\n /**\r\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\r\n * `SyntaxError`, `TypeError`, or `URIError` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\r\n * @example\r\n *\r\n * _.isError(new Error);\r\n * // => true\r\n *\r\n * _.isError(Error);\r\n * // => false\r\n */\r\n function isError(value) {\r\n if (!isObjectLike(value)) {\r\n return false;\r\n }\r\n var tag = baseGetTag(value);\r\n return tag == errorTag || tag == domExcTag ||\r\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\r\n }\r\n\r\n /**\r\n * Checks if `value` is a finite primitive number.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\r\n * @example\r\n *\r\n * _.isFinite(3);\r\n * // => true\r\n *\r\n * _.isFinite(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isFinite(Infinity);\r\n * // => false\r\n *\r\n * _.isFinite('3');\r\n * // => false\r\n */\r\n function isFinite(value) {\r\n return typeof value == 'number' && nativeIsFinite(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Function` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\r\n * @example\r\n *\r\n * _.isFunction(_);\r\n * // => true\r\n *\r\n * _.isFunction(/abc/);\r\n * // => false\r\n */\r\n function isFunction(value) {\r\n if (!isObject(value)) {\r\n return false;\r\n }\r\n // The use of `Object#toString` avoids issues with the `typeof` operator\r\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\r\n var tag = baseGetTag(value);\r\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is an integer.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\r\n * @example\r\n *\r\n * _.isInteger(3);\r\n * // => true\r\n *\r\n * _.isInteger(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isInteger(Infinity);\r\n * // => false\r\n *\r\n * _.isInteger('3');\r\n * // => false\r\n */\r\n function isInteger(value) {\r\n return typeof value == 'number' && value == toInteger(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like length.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\r\n * @example\r\n *\r\n * _.isLength(3);\r\n * // => true\r\n *\r\n * _.isLength(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isLength(Infinity);\r\n * // => false\r\n *\r\n * _.isLength('3');\r\n * // => false\r\n */\r\n function isLength(value) {\r\n return typeof value == 'number' &&\r\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Checks if `value` is the\r\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\r\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\r\n * @example\r\n *\r\n * _.isObject({});\r\n * // => true\r\n *\r\n * _.isObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObject(_.noop);\r\n * // => true\r\n *\r\n * _.isObject(null);\r\n * // => false\r\n */\r\n function isObject(value) {\r\n var type = typeof value;\r\n return value != null && (type == 'object' || type == 'function');\r\n }\r\n\r\n /**\r\n * Checks if `value` is object-like. A value is object-like if it's not `null`\r\n * and has a `typeof` result of \"object\".\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r\n * @example\r\n *\r\n * _.isObjectLike({});\r\n * // => true\r\n *\r\n * _.isObjectLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObjectLike(_.noop);\r\n * // => false\r\n *\r\n * _.isObjectLike(null);\r\n * // => false\r\n */\r\n function isObjectLike(value) {\r\n return value != null && typeof value == 'object';\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Map` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n * @example\r\n *\r\n * _.isMap(new Map);\r\n * // => true\r\n *\r\n * _.isMap(new WeakMap);\r\n * // => false\r\n */\r\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\r\n\r\n /**\r\n * Performs a partial deep comparison between `object` and `source` to\r\n * determine if `object` contains equivalent property values.\r\n *\r\n * **Note:** This method is equivalent to `_.matches` when `source` is\r\n * partially applied.\r\n *\r\n * Partial comparisons will match empty array and empty object `source`\r\n * values against any array or object value, respectively. See `_.isEqual`\r\n * for a list of supported value comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n *\r\n * _.isMatch(object, { 'b': 2 });\r\n * // => true\r\n *\r\n * _.isMatch(object, { 'b': 1 });\r\n * // => false\r\n */\r\n function isMatch(object, source) {\r\n return object === source || baseIsMatch(object, source, getMatchData(source));\r\n }\r\n\r\n /**\r\n * This method is like `_.isMatch` except that it accepts `customizer` which\r\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\r\n * are handled by the method instead. The `customizer` is invoked with five\r\n * arguments: (objValue, srcValue, index|key, object, source).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n * @example\r\n *\r\n * function isGreeting(value) {\r\n * return /^h(?:i|ello)$/.test(value);\r\n * }\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\r\n * return true;\r\n * }\r\n * }\r\n *\r\n * var object = { 'greeting': 'hello' };\r\n * var source = { 'greeting': 'hi' };\r\n *\r\n * _.isMatchWith(object, source, customizer);\r\n * // => true\r\n */\r\n function isMatchWith(object, source, customizer) {\r\n customizer = typeof customizer == 'function' ? customizer : undefined;\r\n return baseIsMatch(object, source, getMatchData(source), customizer);\r\n }\r\n\r\n /**\r\n * Checks if `value` is `NaN`.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\r\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\r\n * `undefined` and other non-number values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n * @example\r\n *\r\n * _.isNaN(NaN);\r\n * // => true\r\n *\r\n * _.isNaN(new Number(NaN));\r\n * // => true\r\n *\r\n * isNaN(undefined);\r\n * // => true\r\n *\r\n * _.isNaN(undefined);\r\n * // => false\r\n */\r\n function isNaN(value) {\r\n // An `NaN` primitive is the only value that is not equal to itself.\r\n // Perform the `toStringTag` check first to avoid errors with some\r\n // ActiveX objects in IE.\r\n return isNumber(value) && value != +value;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a pristine native function.\r\n *\r\n * **Note:** This method can't reliably detect native functions in the presence\r\n * of the core-js package because core-js circumvents this kind of detection.\r\n * Despite multiple requests, the core-js maintainer has made it clear: any\r\n * attempt to fix the detection will be obstructed. As a result, we're left\r\n * with little choice but to throw an error. Unfortunately, this also affects\r\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\r\n * which rely on core-js.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a native function,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isNative(Array.prototype.push);\r\n * // => true\r\n *\r\n * _.isNative(_);\r\n * // => false\r\n */\r\n function isNative(value) {\r\n if (isMaskable(value)) {\r\n throw new Error(CORE_ERROR_TEXT);\r\n }\r\n return baseIsNative(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\r\n * @example\r\n *\r\n * _.isNull(null);\r\n * // => true\r\n *\r\n * _.isNull(void 0);\r\n * // => false\r\n */\r\n function isNull(value) {\r\n return value === null;\r\n }\r\n\r\n /**\r\n * Checks if `value` is `null` or `undefined`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\r\n * @example\r\n *\r\n * _.isNil(null);\r\n * // => true\r\n *\r\n * _.isNil(void 0);\r\n * // => true\r\n *\r\n * _.isNil(NaN);\r\n * // => false\r\n */\r\n function isNil(value) {\r\n return value == null;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Number` primitive or object.\r\n *\r\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\r\n * classified as numbers, use the `_.isFinite` method.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\r\n * @example\r\n *\r\n * _.isNumber(3);\r\n * // => true\r\n *\r\n * _.isNumber(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isNumber(Infinity);\r\n * // => true\r\n *\r\n * _.isNumber('3');\r\n * // => false\r\n */\r\n function isNumber(value) {\r\n return typeof value == 'number' ||\r\n (isObjectLike(value) && baseGetTag(value) == numberTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a plain object, that is, an object created by the\r\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.8.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * _.isPlainObject(new Foo);\r\n * // => false\r\n *\r\n * _.isPlainObject([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isPlainObject({ 'x': 0, 'y': 0 });\r\n * // => true\r\n *\r\n * _.isPlainObject(Object.create(null));\r\n * // => true\r\n */\r\n function isPlainObject(value) {\r\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\r\n return false;\r\n }\r\n var proto = getPrototype(value);\r\n if (proto === null) {\r\n return true;\r\n }\r\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\r\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\r\n funcToString.call(Ctor) == objectCtorString;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `RegExp` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n * @example\r\n *\r\n * _.isRegExp(/abc/);\r\n * // => true\r\n *\r\n * _.isRegExp('/abc/');\r\n * // => false\r\n */\r\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\r\n\r\n /**\r\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\r\n * double precision number which isn't the result of a rounded unsafe integer.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\r\n * @example\r\n *\r\n * _.isSafeInteger(3);\r\n * // => true\r\n *\r\n * _.isSafeInteger(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isSafeInteger(Infinity);\r\n * // => false\r\n *\r\n * _.isSafeInteger('3');\r\n * // => false\r\n */\r\n function isSafeInteger(value) {\r\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Set` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n * @example\r\n *\r\n * _.isSet(new Set);\r\n * // => true\r\n *\r\n * _.isSet(new WeakSet);\r\n * // => false\r\n */\r\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\r\n\r\n /**\r\n * Checks if `value` is classified as a `String` primitive or object.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\r\n * @example\r\n *\r\n * _.isString('abc');\r\n * // => true\r\n *\r\n * _.isString(1);\r\n * // => false\r\n */\r\n function isString(value) {\r\n return typeof value == 'string' ||\r\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Symbol` primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\r\n * @example\r\n *\r\n * _.isSymbol(Symbol.iterator);\r\n * // => true\r\n *\r\n * _.isSymbol('abc');\r\n * // => false\r\n */\r\n function isSymbol(value) {\r\n return typeof value == 'symbol' ||\r\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a typed array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n * @example\r\n *\r\n * _.isTypedArray(new Uint8Array);\r\n * // => true\r\n *\r\n * _.isTypedArray([]);\r\n * // => false\r\n */\r\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\r\n\r\n /**\r\n * Checks if `value` is `undefined`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\r\n * @example\r\n *\r\n * _.isUndefined(void 0);\r\n * // => true\r\n *\r\n * _.isUndefined(null);\r\n * // => false\r\n */\r\n function isUndefined(value) {\r\n return value === undefined;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `WeakMap` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\r\n * @example\r\n *\r\n * _.isWeakMap(new WeakMap);\r\n * // => true\r\n *\r\n * _.isWeakMap(new Map);\r\n * // => false\r\n */\r\n function isWeakMap(value) {\r\n return isObjectLike(value) && getTag(value) == weakMapTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `WeakSet` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\r\n * @example\r\n *\r\n * _.isWeakSet(new WeakSet);\r\n * // => true\r\n *\r\n * _.isWeakSet(new Set);\r\n * // => false\r\n */\r\n function isWeakSet(value) {\r\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is less than `other`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.9.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than `other`,\r\n * else `false`.\r\n * @see _.gt\r\n * @example\r\n *\r\n * _.lt(1, 3);\r\n * // => true\r\n *\r\n * _.lt(3, 3);\r\n * // => false\r\n *\r\n * _.lt(3, 1);\r\n * // => false\r\n */\r\n var lt = createRelationalOperation(baseLt);\r\n\r\n /**\r\n * Checks if `value` is less than or equal to `other`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.9.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than or equal to\r\n * `other`, else `false`.\r\n * @see _.gte\r\n * @example\r\n *\r\n * _.lte(1, 3);\r\n * // => true\r\n *\r\n * _.lte(3, 3);\r\n * // => true\r\n *\r\n * _.lte(3, 1);\r\n * // => false\r\n */\r\n var lte = createRelationalOperation(function(value, other) {\r\n return value <= other;\r\n });\r\n\r\n /**\r\n * Converts `value` to an array.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Array} Returns the converted array.\r\n * @example\r\n *\r\n * _.toArray({ 'a': 1, 'b': 2 });\r\n * // => [1, 2]\r\n *\r\n * _.toArray('abc');\r\n * // => ['a', 'b', 'c']\r\n *\r\n * _.toArray(1);\r\n * // => []\r\n *\r\n * _.toArray(null);\r\n * // => []\r\n */\r\n function toArray(value) {\r\n if (!value) {\r\n return [];\r\n }\r\n if (isArrayLike(value)) {\r\n return isString(value) ? stringToArray(value) : copyArray(value);\r\n }\r\n if (symIterator && value[symIterator]) {\r\n return iteratorToArray(value[symIterator]());\r\n }\r\n var tag = getTag(value),\r\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\r\n\r\n return func(value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a finite number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.12.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted number.\r\n * @example\r\n *\r\n * _.toFinite(3.2);\r\n * // => 3.2\r\n *\r\n * _.toFinite(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toFinite(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toFinite('3.2');\r\n * // => 3.2\r\n */\r\n function toFinite(value) {\r\n if (!value) {\r\n return value === 0 ? value : 0;\r\n }\r\n value = toNumber(value);\r\n if (value === INFINITY || value === -INFINITY) {\r\n var sign = (value < 0 ? -1 : 1);\r\n return sign * MAX_INTEGER;\r\n }\r\n return value === value ? value : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to an integer.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toInteger(3.2);\r\n * // => 3\r\n *\r\n * _.toInteger(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toInteger(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toInteger('3.2');\r\n * // => 3\r\n */\r\n function toInteger(value) {\r\n var result = toFinite(value),\r\n remainder = result % 1;\r\n\r\n return result === result ? (remainder ? result - remainder : result) : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to an integer suitable for use as the length of an\r\n * array-like object.\r\n *\r\n * **Note:** This method is based on\r\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toLength(3.2);\r\n * // => 3\r\n *\r\n * _.toLength(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toLength(Infinity);\r\n * // => 4294967295\r\n *\r\n * _.toLength('3.2');\r\n * // => 3\r\n */\r\n function toLength(value) {\r\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to a number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to process.\r\n * @returns {number} Returns the number.\r\n * @example\r\n *\r\n * _.toNumber(3.2);\r\n * // => 3.2\r\n *\r\n * _.toNumber(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toNumber(Infinity);\r\n * // => Infinity\r\n *\r\n * _.toNumber('3.2');\r\n * // => 3.2\r\n */\r\n function toNumber(value) {\r\n if (typeof value == 'number') {\r\n return value;\r\n }\r\n if (isSymbol(value)) {\r\n return NAN;\r\n }\r\n if (isObject(value)) {\r\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\r\n value = isObject(other) ? (other + '') : other;\r\n }\r\n if (typeof value != 'string') {\r\n return value === 0 ? value : +value;\r\n }\r\n value = baseTrim(value);\r\n var isBinary = reIsBinary.test(value);\r\n return (isBinary || reIsOctal.test(value))\r\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\r\n : (reIsBadHex.test(value) ? NAN : +value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a plain object flattening inherited enumerable string\r\n * keyed properties of `value` to own properties of the plain object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Object} Returns the converted plain object.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.assign({ 'a': 1 }, new Foo);\r\n * // => { 'a': 1, 'b': 2 }\r\n *\r\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\r\n * // => { 'a': 1, 'b': 2, 'c': 3 }\r\n */\r\n function toPlainObject(value) {\r\n return copyObject(value, keysIn(value));\r\n }\r\n\r\n /**\r\n * Converts `value` to a safe integer. A safe integer can be compared and\r\n * represented correctly.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toSafeInteger(3.2);\r\n * // => 3\r\n *\r\n * _.toSafeInteger(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toSafeInteger(Infinity);\r\n * // => 9007199254740991\r\n *\r\n * _.toSafeInteger('3.2');\r\n * // => 3\r\n */\r\n function toSafeInteger(value) {\r\n return value\r\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\r\n : (value === 0 ? value : 0);\r\n }\r\n\r\n /**\r\n * Converts `value` to a string. An empty string is returned for `null`\r\n * and `undefined` values. The sign of `-0` is preserved.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n * @example\r\n *\r\n * _.toString(null);\r\n * // => ''\r\n *\r\n * _.toString(-0);\r\n * // => '-0'\r\n *\r\n * _.toString([1, 2, 3]);\r\n * // => '1,2,3'\r\n */\r\n function toString(value) {\r\n return value == null ? '' : baseToString(value);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Assigns own enumerable string keyed properties of source objects to the\r\n * destination object. Source objects are applied from left to right.\r\n * Subsequent sources overwrite property assignments of previous sources.\r\n *\r\n * **Note:** This method mutates `object` and is loosely based on\r\n * [`Object.assign`](https://mdn.io/Object/assign).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assignIn\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * function Bar() {\r\n * this.c = 3;\r\n * }\r\n *\r\n * Foo.prototype.b = 2;\r\n * Bar.prototype.d = 4;\r\n *\r\n * _.assign({ 'a': 0 }, new Foo, new Bar);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n var assign = createAssigner(function(object, source) {\r\n if (isPrototype(source) || isArrayLike(source)) {\r\n copyObject(source, keys(source), object);\r\n return;\r\n }\r\n for (var key in source) {\r\n if (hasOwnProperty.call(source, key)) {\r\n assignValue(object, key, source[key]);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * This method is like `_.assign` except that it iterates over own and\r\n * inherited source properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias extend\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assign\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * function Bar() {\r\n * this.c = 3;\r\n * }\r\n *\r\n * Foo.prototype.b = 2;\r\n * Bar.prototype.d = 4;\r\n *\r\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\r\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\r\n */\r\n var assignIn = createAssigner(function(object, source) {\r\n copyObject(source, keysIn(source), object);\r\n });\r\n\r\n /**\r\n * This method is like `_.assignIn` except that it accepts `customizer`\r\n * which is invoked to produce the assigned values. If `customizer` returns\r\n * `undefined`, assignment is handled by the method instead. The `customizer`\r\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias extendWith\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assignWith\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * return _.isUndefined(objValue) ? srcValue : objValue;\r\n * }\r\n *\r\n * var defaults = _.partialRight(_.assignInWith, customizer);\r\n *\r\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n copyObject(source, keysIn(source), object, customizer);\r\n });\r\n\r\n /**\r\n * This method is like `_.assign` except that it accepts `customizer`\r\n * which is invoked to produce the assigned values. If `customizer` returns\r\n * `undefined`, assignment is handled by the method instead. The `customizer`\r\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assignInWith\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * return _.isUndefined(objValue) ? srcValue : objValue;\r\n * }\r\n *\r\n * var defaults = _.partialRight(_.assignWith, customizer);\r\n *\r\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n copyObject(source, keys(source), object, customizer);\r\n });\r\n\r\n /**\r\n * Creates an array of values corresponding to `paths` of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Array} Returns the picked values.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\r\n *\r\n * _.at(object, ['a[0].b.c', 'a[1]']);\r\n * // => [3, 4]\r\n */\r\n var at = flatRest(baseAt);\r\n\r\n /**\r\n * Creates an object that inherits from the `prototype` object. If a\r\n * `properties` object is given, its own enumerable string keyed properties\r\n * are assigned to the created object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Object\r\n * @param {Object} prototype The object to inherit from.\r\n * @param {Object} [properties] The properties to assign to the object.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * function Shape() {\r\n * this.x = 0;\r\n * this.y = 0;\r\n * }\r\n *\r\n * function Circle() {\r\n * Shape.call(this);\r\n * }\r\n *\r\n * Circle.prototype = _.create(Shape.prototype, {\r\n * 'constructor': Circle\r\n * });\r\n *\r\n * var circle = new Circle;\r\n * circle instanceof Circle;\r\n * // => true\r\n *\r\n * circle instanceof Shape;\r\n * // => true\r\n */\r\n function create(prototype, properties) {\r\n var result = baseCreate(prototype);\r\n return properties == null ? result : baseAssign(result, properties);\r\n }\r\n\r\n /**\r\n * Assigns own and inherited enumerable string keyed properties of source\r\n * objects to the destination object for all destination properties that\r\n * resolve to `undefined`. Source objects are applied from left to right.\r\n * Once a property is set, additional values of the same property are ignored.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaultsDeep\r\n * @example\r\n *\r\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var defaults = baseRest(function(object, sources) {\r\n object = Object(object);\r\n\r\n var index = -1;\r\n var length = sources.length;\r\n var guard = length > 2 ? sources[2] : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n length = 1;\r\n }\r\n\r\n while (++index < length) {\r\n var source = sources[index];\r\n var props = keysIn(source);\r\n var propsIndex = -1;\r\n var propsLength = props.length;\r\n\r\n while (++propsIndex < propsLength) {\r\n var key = props[propsIndex];\r\n var value = object[key];\r\n\r\n if (value === undefined ||\r\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\r\n object[key] = source[key];\r\n }\r\n }\r\n }\r\n\r\n return object;\r\n });\r\n\r\n /**\r\n * This method is like `_.defaults` except that it recursively assigns\r\n * default properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaults\r\n * @example\r\n *\r\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\r\n * // => { 'a': { 'b': 2, 'c': 3 } }\r\n */\r\n var defaultsDeep = baseRest(function(args) {\r\n args.push(undefined, customDefaultsMerge);\r\n return apply(mergeWith, undefined, args);\r\n });\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the key of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findKey(users, function(o) { return o.age < 40; });\r\n * // => 'barney' (iteration order is not guaranteed)\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findKey(users, { 'age': 1, 'active': true });\r\n * // => 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findKey(users, 'active');\r\n * // => 'barney'\r\n */\r\n function findKey(object, predicate) {\r\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\r\n }\r\n\r\n /**\r\n * This method is like `_.findKey` except that it iterates over elements of\r\n * a collection in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findLastKey(users, function(o) { return o.age < 40; });\r\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastKey(users, { 'age': 36, 'active': true });\r\n * // => 'barney'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastKey(users, 'active');\r\n * // => 'pebbles'\r\n */\r\n function findLastKey(object, predicate) {\r\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\r\n }\r\n\r\n /**\r\n * Iterates over own and inherited enumerable string keyed properties of an\r\n * object and invokes `iteratee` for each property. The iteratee is invoked\r\n * with three arguments: (value, key, object). Iteratee functions may exit\r\n * iteration early by explicitly returning `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.3.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n * @see _.forInRight\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.forIn(new Foo, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\r\n */\r\n function forIn(object, iteratee) {\r\n return object == null\r\n ? object\r\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\r\n }\r\n\r\n /**\r\n * This method is like `_.forIn` except that it iterates over properties of\r\n * `object` in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n * @see _.forIn\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.forInRight(new Foo, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\r\n */\r\n function forInRight(object, iteratee) {\r\n return object == null\r\n ? object\r\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\r\n }\r\n\r\n /**\r\n * Iterates over own enumerable string keyed properties of an object and\r\n * invokes `iteratee` for each property. The iteratee is invoked with three\r\n * arguments: (value, key, object). Iteratee functions may exit iteration\r\n * early by explicitly returning `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.3.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n * @see _.forOwnRight\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.forOwn(new Foo, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\r\n */\r\n function forOwn(object, iteratee) {\r\n return object && baseForOwn(object, getIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * This method is like `_.forOwn` except that it iterates over properties of\r\n * `object` in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n * @see _.forOwn\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.forOwnRight(new Foo, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\r\n */\r\n function forOwnRight(object, iteratee) {\r\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Creates an array of function property names from own enumerable properties\r\n * of `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @returns {Array} Returns the function names.\r\n * @see _.functionsIn\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = _.constant('a');\r\n * this.b = _.constant('b');\r\n * }\r\n *\r\n * Foo.prototype.c = _.constant('c');\r\n *\r\n * _.functions(new Foo);\r\n * // => ['a', 'b']\r\n */\r\n function functions(object) {\r\n return object == null ? [] : baseFunctions(object, keys(object));\r\n }\r\n\r\n /**\r\n * Creates an array of function property names from own and inherited\r\n * enumerable properties of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @returns {Array} Returns the function names.\r\n * @see _.functions\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = _.constant('a');\r\n * this.b = _.constant('b');\r\n * }\r\n *\r\n * Foo.prototype.c = _.constant('c');\r\n *\r\n * _.functionsIn(new Foo);\r\n * // => ['a', 'b', 'c']\r\n */\r\n function functionsIn(object) {\r\n return object == null ? [] : baseFunctions(object, keysIn(object));\r\n }\r\n\r\n /**\r\n * Gets the value at `path` of `object`. If the resolved value is\r\n * `undefined`, the `defaultValue` is returned in its place.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.get(object, 'a[0].b.c');\r\n * // => 3\r\n *\r\n * _.get(object, ['a', '0', 'b', 'c']);\r\n * // => 3\r\n *\r\n * _.get(object, 'a.b.c', 'default');\r\n * // => 'default'\r\n */\r\n function get(object, path, defaultValue) {\r\n var result = object == null ? undefined : baseGet(object, path);\r\n return result === undefined ? defaultValue : result;\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct property of `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': { 'b': 2 } };\r\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.has(object, 'a');\r\n * // => true\r\n *\r\n * _.has(object, 'a.b');\r\n * // => true\r\n *\r\n * _.has(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.has(other, 'a');\r\n * // => false\r\n */\r\n function has(object, path) {\r\n return object != null && hasPath(object, path, baseHas);\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct or inherited property of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.hasIn(object, 'a');\r\n * // => true\r\n *\r\n * _.hasIn(object, 'a.b');\r\n * // => true\r\n *\r\n * _.hasIn(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.hasIn(object, 'b');\r\n * // => false\r\n */\r\n function hasIn(object, path) {\r\n return object != null && hasPath(object, path, baseHasIn);\r\n }\r\n\r\n /**\r\n * Creates an object composed of the inverted keys and values of `object`.\r\n * If `object` contains duplicate values, subsequent values overwrite\r\n * property assignments of previous values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invert(object);\r\n * // => { '1': 'c', '2': 'b' }\r\n */\r\n var invert = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n result[value] = key;\r\n }, constant(identity));\r\n\r\n /**\r\n * This method is like `_.invert` except that the inverted object is generated\r\n * from the results of running each element of `object` thru `iteratee`. The\r\n * corresponding inverted value of each inverted key is an array of keys\r\n * responsible for generating the inverted value. The iteratee is invoked\r\n * with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.1.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invertBy(object);\r\n * // => { '1': ['a', 'c'], '2': ['b'] }\r\n *\r\n * _.invertBy(object, function(value) {\r\n * return 'group' + value;\r\n * });\r\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\r\n */\r\n var invertBy = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n if (hasOwnProperty.call(result, value)) {\r\n result[value].push(key);\r\n } else {\r\n result[value] = [key];\r\n }\r\n }, getIteratee);\r\n\r\n /**\r\n * Invokes the method at `path` of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the method to invoke.\r\n * @param {...*} [args] The arguments to invoke the method with.\r\n * @returns {*} Returns the result of the invoked method.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\r\n *\r\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\r\n * // => [2, 3]\r\n */\r\n var invoke = baseRest(baseInvoke);\r\n\r\n /**\r\n * Creates an array of the own enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects. See the\r\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * for more details.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keys(new Foo);\r\n * // => ['a', 'b'] (iteration order is not guaranteed)\r\n *\r\n * _.keys('hi');\r\n * // => ['0', '1']\r\n */\r\n function keys(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\r\n }\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keysIn(new Foo);\r\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\r\n */\r\n function keysIn(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\r\n }\r\n\r\n /**\r\n * The opposite of `_.mapValues`; this method creates an object with the\r\n * same values as `object` and keys generated by running each own enumerable\r\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\r\n * with three arguments: (value, key, object).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.8.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Object} Returns the new mapped object.\r\n * @see _.mapValues\r\n * @example\r\n *\r\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\r\n * return key + value;\r\n * });\r\n * // => { 'a1': 1, 'b2': 2 }\r\n */\r\n function mapKeys(object, iteratee) {\r\n var result = {};\r\n iteratee = getIteratee(iteratee, 3);\r\n\r\n baseForOwn(object, function(value, key, object) {\r\n baseAssignValue(result, iteratee(value, key, object), value);\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an object with the same keys as `object` and values generated\r\n * by running each own enumerable string keyed property of `object` thru\r\n * `iteratee`. The iteratee is invoked with three arguments:\r\n * (value, key, object).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Object} Returns the new mapped object.\r\n * @see _.mapKeys\r\n * @example\r\n *\r\n * var users = {\r\n * 'fred': { 'user': 'fred', 'age': 40 },\r\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\r\n * };\r\n *\r\n * _.mapValues(users, function(o) { return o.age; });\r\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.mapValues(users, 'age');\r\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\r\n */\r\n function mapValues(object, iteratee) {\r\n var result = {};\r\n iteratee = getIteratee(iteratee, 3);\r\n\r\n baseForOwn(object, function(value, key, object) {\r\n baseAssignValue(result, key, iteratee(value, key, object));\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is like `_.assign` except that it recursively merges own and\r\n * inherited enumerable string keyed properties of source objects into the\r\n * destination object. Source properties that resolve to `undefined` are\r\n * skipped if a destination value exists. Array and plain object properties\r\n * are merged recursively. Other objects and value types are overridden by\r\n * assignment. Source objects are applied from left to right. Subsequent\r\n * sources overwrite property assignments of previous sources.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {\r\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\r\n * };\r\n *\r\n * var other = {\r\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\r\n * };\r\n *\r\n * _.merge(object, other);\r\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\r\n */\r\n var merge = createAssigner(function(object, source, srcIndex) {\r\n baseMerge(object, source, srcIndex);\r\n });\r\n\r\n /**\r\n * This method is like `_.merge` except that it accepts `customizer` which\r\n * is invoked to produce the merged values of the destination and source\r\n * properties. If `customizer` returns `undefined`, merging is handled by the\r\n * method instead. The `customizer` is invoked with six arguments:\r\n * (objValue, srcValue, key, object, source, stack).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} customizer The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * if (_.isArray(objValue)) {\r\n * return objValue.concat(srcValue);\r\n * }\r\n * }\r\n *\r\n * var object = { 'a': [1], 'b': [2] };\r\n * var other = { 'a': [3], 'b': [4] };\r\n *\r\n * _.mergeWith(object, other, customizer);\r\n * // => { 'a': [1, 3], 'b': [2, 4] }\r\n */\r\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n baseMerge(object, source, srcIndex, customizer);\r\n });\r\n\r\n /**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable property paths of `object` that are not omitted.\r\n *\r\n * **Note:** This method is considerably slower than `_.pick`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to omit.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omit(object, ['a', 'c']);\r\n * // => { 'b': '2' }\r\n */\r\n var omit = flatRest(function(object, paths) {\r\n var result = {};\r\n if (object == null) {\r\n return result;\r\n }\r\n var isDeep = false;\r\n paths = arrayMap(paths, function(path) {\r\n path = castPath(path, object);\r\n isDeep || (isDeep = path.length > 1);\r\n return path;\r\n });\r\n copyObject(object, getAllKeysIn(object), result);\r\n if (isDeep) {\r\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\r\n }\r\n var length = paths.length;\r\n while (length--) {\r\n baseUnset(result, paths[length]);\r\n }\r\n return result;\r\n });\r\n\r\n /**\r\n * The opposite of `_.pickBy`; this method creates an object composed of\r\n * the own and inherited enumerable string keyed properties of `object` that\r\n * `predicate` doesn't return truthy for. The predicate is invoked with two\r\n * arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omitBy(object, _.isNumber);\r\n * // => { 'b': '2' }\r\n */\r\n function omitBy(object, predicate) {\r\n return pickBy(object, negate(getIteratee(predicate)));\r\n }\r\n\r\n /**\r\n * Creates an object composed of the picked `object` properties.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pick(object, ['a', 'c']);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n var pick = flatRest(function(object, paths) {\r\n return object == null ? {} : basePick(object, paths);\r\n });\r\n\r\n /**\r\n * Creates an object composed of the `object` properties `predicate` returns\r\n * truthy for. The predicate is invoked with two arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pickBy(object, _.isNumber);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n function pickBy(object, predicate) {\r\n if (object == null) {\r\n return {};\r\n }\r\n var props = arrayMap(getAllKeysIn(object), function(prop) {\r\n return [prop];\r\n });\r\n predicate = getIteratee(predicate);\r\n return basePickBy(object, props, function(value, path) {\r\n return predicate(value, path[0]);\r\n });\r\n }\r\n\r\n /**\r\n * This method is like `_.get` except that if the resolved value is a\r\n * function it's invoked with the `this` binding of its parent object and\r\n * its result is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to resolve.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\r\n *\r\n * _.result(object, 'a[0].b.c1');\r\n * // => 3\r\n *\r\n * _.result(object, 'a[0].b.c2');\r\n * // => 4\r\n *\r\n * _.result(object, 'a[0].b.c3', 'default');\r\n * // => 'default'\r\n *\r\n * _.result(object, 'a[0].b.c3', _.constant('default'));\r\n * // => 'default'\r\n */\r\n function result(object, path, defaultValue) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length;\r\n\r\n // Ensure the loop is entered when path is empty.\r\n if (!length) {\r\n length = 1;\r\n object = undefined;\r\n }\r\n while (++index < length) {\r\n var value = object == null ? undefined : object[toKey(path[index])];\r\n if (value === undefined) {\r\n index = length;\r\n value = defaultValue;\r\n }\r\n object = isFunction(value) ? value.call(object) : value;\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\r\n * it's created. Arrays are created for missing index properties while objects\r\n * are created for all other missing properties. Use `_.setWith` to customize\r\n * `path` creation.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.set(object, 'a[0].b.c', 4);\r\n * console.log(object.a[0].b.c);\r\n * // => 4\r\n *\r\n * _.set(object, ['x', '0', 'y', 'z'], 5);\r\n * console.log(object.x[0].y.z);\r\n * // => 5\r\n */\r\n function set(object, path, value) {\r\n return object == null ? object : baseSet(object, path, value);\r\n }\r\n\r\n /**\r\n * This method is like `_.set` except that it accepts `customizer` which is\r\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\r\n * path creation is handled by the method instead. The `customizer` is invoked\r\n * with three arguments: (nsValue, key, nsObject).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {};\r\n *\r\n * _.setWith(object, '[0][1]', 'a', Object);\r\n * // => { '0': { '1': 'a' } }\r\n */\r\n function setWith(object, path, value, customizer) {\r\n customizer = typeof customizer == 'function' ? customizer : undefined;\r\n return object == null ? object : baseSet(object, path, value, customizer);\r\n }\r\n\r\n /**\r\n * Creates an array of own enumerable string keyed-value pairs for `object`\r\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\r\n * entries are returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias entries\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the key-value pairs.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.toPairs(new Foo);\r\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\r\n */\r\n var toPairs = createToPairs(keys);\r\n\r\n /**\r\n * Creates an array of own and inherited enumerable string keyed-value pairs\r\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\r\n * or set, its entries are returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias entriesIn\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the key-value pairs.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.toPairsIn(new Foo);\r\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\r\n */\r\n var toPairsIn = createToPairs(keysIn);\r\n\r\n /**\r\n * An alternative to `_.reduce`; this method transforms `object` to a new\r\n * `accumulator` object which is the result of running each of its own\r\n * enumerable string keyed properties thru `iteratee`, with each invocation\r\n * potentially mutating the `accumulator` object. If `accumulator` is not\r\n * provided, a new object with the same `[[Prototype]]` will be used. The\r\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.3.0\r\n * @category Object\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The custom accumulator value.\r\n * @returns {*} Returns the accumulated value.\r\n * @example\r\n *\r\n * _.transform([2, 3, 4], function(result, n) {\r\n * result.push(n *= n);\r\n * return n % 2 == 0;\r\n * }, []);\r\n * // => [4, 9]\r\n *\r\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\r\n * (result[value] || (result[value] = [])).push(key);\r\n * }, {});\r\n * // => { '1': ['a', 'c'], '2': ['b'] }\r\n */\r\n function transform(object, iteratee, accumulator) {\r\n var isArr = isArray(object),\r\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\r\n\r\n iteratee = getIteratee(iteratee, 4);\r\n if (accumulator == null) {\r\n var Ctor = object && object.constructor;\r\n if (isArrLike) {\r\n accumulator = isArr ? new Ctor : [];\r\n }\r\n else if (isObject(object)) {\r\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\r\n }\r\n else {\r\n accumulator = {};\r\n }\r\n }\r\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\r\n return iteratee(accumulator, value, index, object);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * Removes the property at `path` of `object`.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to unset.\r\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\r\n * _.unset(object, 'a[0].b.c');\r\n * // => true\r\n *\r\n * console.log(object);\r\n * // => { 'a': [{ 'b': {} }] };\r\n *\r\n * _.unset(object, ['a', '0', 'b', 'c']);\r\n * // => true\r\n *\r\n * console.log(object);\r\n * // => { 'a': [{ 'b': {} }] };\r\n */\r\n function unset(object, path) {\r\n return object == null ? true : baseUnset(object, path);\r\n }\r\n\r\n /**\r\n * This method is like `_.set` except that accepts `updater` to produce the\r\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\r\n * is invoked with one argument: (value).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.6.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {Function} updater The function to produce the updated value.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\r\n * console.log(object.a[0].b.c);\r\n * // => 9\r\n *\r\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\r\n * console.log(object.x[0].y.z);\r\n * // => 0\r\n */\r\n function update(object, path, updater) {\r\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\r\n }\r\n\r\n /**\r\n * This method is like `_.update` except that it accepts `customizer` which is\r\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\r\n * path creation is handled by the method instead. The `customizer` is invoked\r\n * with three arguments: (nsValue, key, nsObject).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.6.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {Function} updater The function to produce the updated value.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {};\r\n *\r\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\r\n * // => { '0': { '1': 'a' } }\r\n */\r\n function updateWith(object, path, updater, customizer) {\r\n customizer = typeof customizer == 'function' ? customizer : undefined;\r\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable string keyed property values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.values(new Foo);\r\n * // => [1, 2] (iteration order is not guaranteed)\r\n *\r\n * _.values('hi');\r\n * // => ['h', 'i']\r\n */\r\n function values(object) {\r\n return object == null ? [] : baseValues(object, keys(object));\r\n }\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable string keyed property\r\n * values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.valuesIn(new Foo);\r\n * // => [1, 2, 3] (iteration order is not guaranteed)\r\n */\r\n function valuesIn(object) {\r\n return object == null ? [] : baseValues(object, keysIn(object));\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Number\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n * @example\r\n *\r\n * _.clamp(-10, -5, 5);\r\n * // => -5\r\n *\r\n * _.clamp(10, -5, 5);\r\n * // => 5\r\n */\r\n function clamp(number, lower, upper) {\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = undefined;\r\n }\r\n if (upper !== undefined) {\r\n upper = toNumber(upper);\r\n upper = upper === upper ? upper : 0;\r\n }\r\n if (lower !== undefined) {\r\n lower = toNumber(lower);\r\n lower = lower === lower ? lower : 0;\r\n }\r\n return baseClamp(toNumber(number), lower, upper);\r\n }\r\n\r\n /**\r\n * Checks if `n` is between `start` and up to, but not including, `end`. If\r\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\r\n * If `start` is greater than `end` the params are swapped to support\r\n * negative ranges.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.3.0\r\n * @category Number\r\n * @param {number} number The number to check.\r\n * @param {number} [start=0] The start of the range.\r\n * @param {number} end The end of the range.\r\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\r\n * @see _.range, _.rangeRight\r\n * @example\r\n *\r\n * _.inRange(3, 2, 4);\r\n * // => true\r\n *\r\n * _.inRange(4, 8);\r\n * // => true\r\n *\r\n * _.inRange(4, 2);\r\n * // => false\r\n *\r\n * _.inRange(2, 2);\r\n * // => false\r\n *\r\n * _.inRange(1.2, 2);\r\n * // => true\r\n *\r\n * _.inRange(5.2, 4);\r\n * // => false\r\n *\r\n * _.inRange(-3, -2, -6);\r\n * // => true\r\n */\r\n function inRange(number, start, end) {\r\n start = toFinite(start);\r\n if (end === undefined) {\r\n end = start;\r\n start = 0;\r\n } else {\r\n end = toFinite(end);\r\n }\r\n number = toNumber(number);\r\n return baseInRange(number, start, end);\r\n }\r\n\r\n /**\r\n * Produces a random number between the inclusive `lower` and `upper` bounds.\r\n * If only one argument is provided a number between `0` and the given number\r\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\r\n * floats, a floating-point number is returned instead of an integer.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Number\r\n * @param {number} [lower=0] The lower bound.\r\n * @param {number} [upper=1] The upper bound.\r\n * @param {boolean} [floating] Specify returning a floating-point number.\r\n * @returns {number} Returns the random number.\r\n * @example\r\n *\r\n * _.random(0, 5);\r\n * // => an integer between 0 and 5\r\n *\r\n * _.random(5);\r\n * // => also an integer between 0 and 5\r\n *\r\n * _.random(5, true);\r\n * // => a floating-point number between 0 and 5\r\n *\r\n * _.random(1.2, 5.2);\r\n * // => a floating-point number between 1.2 and 5.2\r\n */\r\n function random(lower, upper, floating) {\r\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\r\n upper = floating = undefined;\r\n }\r\n if (floating === undefined) {\r\n if (typeof upper == 'boolean') {\r\n floating = upper;\r\n upper = undefined;\r\n }\r\n else if (typeof lower == 'boolean') {\r\n floating = lower;\r\n lower = undefined;\r\n }\r\n }\r\n if (lower === undefined && upper === undefined) {\r\n lower = 0;\r\n upper = 1;\r\n }\r\n else {\r\n lower = toFinite(lower);\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = 0;\r\n } else {\r\n upper = toFinite(upper);\r\n }\r\n }\r\n if (lower > upper) {\r\n var temp = lower;\r\n lower = upper;\r\n upper = temp;\r\n }\r\n if (floating || lower % 1 || upper % 1) {\r\n var rand = nativeRandom();\r\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\r\n }\r\n return baseRandom(lower, upper);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the camel cased string.\r\n * @example\r\n *\r\n * _.camelCase('Foo Bar');\r\n * // => 'fooBar'\r\n *\r\n * _.camelCase('--foo-bar--');\r\n * // => 'fooBar'\r\n *\r\n * _.camelCase('__FOO_BAR__');\r\n * // => 'fooBar'\r\n */\r\n var camelCase = createCompounder(function(result, word, index) {\r\n word = word.toLowerCase();\r\n return result + (index ? capitalize(word) : word);\r\n });\r\n\r\n /**\r\n * Converts the first character of `string` to upper case and the remaining\r\n * to lower case.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to capitalize.\r\n * @returns {string} Returns the capitalized string.\r\n * @example\r\n *\r\n * _.capitalize('FRED');\r\n * // => 'Fred'\r\n */\r\n function capitalize(string) {\r\n return upperFirst(toString(string).toLowerCase());\r\n }\r\n\r\n /**\r\n * Deburrs `string` by converting\r\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\r\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\r\n * letters to basic Latin letters and removing\r\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to deburr.\r\n * @returns {string} Returns the deburred string.\r\n * @example\r\n *\r\n * _.deburr('déjà vu');\r\n * // => 'deja vu'\r\n */\r\n function deburr(string) {\r\n string = toString(string);\r\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\r\n }\r\n\r\n /**\r\n * Checks if `string` ends with the given target string.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to inspect.\r\n * @param {string} [target] The string to search for.\r\n * @param {number} [position=string.length] The position to search up to.\r\n * @returns {boolean} Returns `true` if `string` ends with `target`,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.endsWith('abc', 'c');\r\n * // => true\r\n *\r\n * _.endsWith('abc', 'b');\r\n * // => false\r\n *\r\n * _.endsWith('abc', 'b', 2);\r\n * // => true\r\n */\r\n function endsWith(string, target, position) {\r\n string = toString(string);\r\n target = baseToString(target);\r\n\r\n var length = string.length;\r\n position = position === undefined\r\n ? length\r\n : baseClamp(toInteger(position), 0, length);\r\n\r\n var end = position;\r\n position -= target.length;\r\n return position >= 0 && string.slice(position, end) == target;\r\n }\r\n\r\n /**\r\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\r\n * corresponding HTML entities.\r\n *\r\n * **Note:** No other characters are escaped. To escape additional\r\n * characters use a third-party library like [_he_](https://mths.be/he).\r\n *\r\n * Though the \">\" character is escaped for symmetry, characters like\r\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\r\n * unless they're part of a tag or unquoted attribute value. See\r\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\r\n * (under \"semi-related fun fact\") for more details.\r\n *\r\n * When working with HTML you should always\r\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\r\n * XSS vectors.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category String\r\n * @param {string} [string=''] The string to escape.\r\n * @returns {string} Returns the escaped string.\r\n * @example\r\n *\r\n * _.escape('fred, barney, & pebbles');\r\n * // => 'fred, barney, & pebbles'\r\n */\r\n function escape(string) {\r\n string = toString(string);\r\n return (string && reHasUnescapedHtml.test(string))\r\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\r\n : string;\r\n }\r\n\r\n /**\r\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\r\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to escape.\r\n * @returns {string} Returns the escaped string.\r\n * @example\r\n *\r\n * _.escapeRegExp('[lodash](https://lodash.com/)');\r\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\r\n */\r\n function escapeRegExp(string) {\r\n string = toString(string);\r\n return (string && reHasRegExpChar.test(string))\r\n ? string.replace(reRegExpChar, '\\\\$&')\r\n : string;\r\n }\r\n\r\n /**\r\n * Converts `string` to\r\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the kebab cased string.\r\n * @example\r\n *\r\n * _.kebabCase('Foo Bar');\r\n * // => 'foo-bar'\r\n *\r\n * _.kebabCase('fooBar');\r\n * // => 'foo-bar'\r\n *\r\n * _.kebabCase('__FOO_BAR__');\r\n * // => 'foo-bar'\r\n */\r\n var kebabCase = createCompounder(function(result, word, index) {\r\n return result + (index ? '-' : '') + word.toLowerCase();\r\n });\r\n\r\n /**\r\n * Converts `string`, as space separated words, to lower case.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the lower cased string.\r\n * @example\r\n *\r\n * _.lowerCase('--Foo-Bar--');\r\n * // => 'foo bar'\r\n *\r\n * _.lowerCase('fooBar');\r\n * // => 'foo bar'\r\n *\r\n * _.lowerCase('__FOO_BAR__');\r\n * // => 'foo bar'\r\n */\r\n var lowerCase = createCompounder(function(result, word, index) {\r\n return result + (index ? ' ' : '') + word.toLowerCase();\r\n });\r\n\r\n /**\r\n * Converts the first character of `string` to lower case.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the converted string.\r\n * @example\r\n *\r\n * _.lowerFirst('Fred');\r\n * // => 'fred'\r\n *\r\n * _.lowerFirst('FRED');\r\n * // => 'fRED'\r\n */\r\n var lowerFirst = createCaseFirst('toLowerCase');\r\n\r\n /**\r\n * Pads `string` on the left and right sides if it's shorter than `length`.\r\n * Padding characters are truncated if they can't be evenly divided by `length`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to pad.\r\n * @param {number} [length=0] The padding length.\r\n * @param {string} [chars=' '] The string used as padding.\r\n * @returns {string} Returns the padded string.\r\n * @example\r\n *\r\n * _.pad('abc', 8);\r\n * // => ' abc '\r\n *\r\n * _.pad('abc', 8, '_-');\r\n * // => '_-abc_-_'\r\n *\r\n * _.pad('abc', 3);\r\n * // => 'abc'\r\n */\r\n function pad(string, length, chars) {\r\n string = toString(string);\r\n length = toInteger(length);\r\n\r\n var strLength = length ? stringSize(string) : 0;\r\n if (!length || strLength >= length) {\r\n return string;\r\n }\r\n var mid = (length - strLength) / 2;\r\n return (\r\n createPadding(nativeFloor(mid), chars) +\r\n string +\r\n createPadding(nativeCeil(mid), chars)\r\n );\r\n }\r\n\r\n /**\r\n * Pads `string` on the right side if it's shorter than `length`. Padding\r\n * characters are truncated if they exceed `length`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to pad.\r\n * @param {number} [length=0] The padding length.\r\n * @param {string} [chars=' '] The string used as padding.\r\n * @returns {string} Returns the padded string.\r\n * @example\r\n *\r\n * _.padEnd('abc', 6);\r\n * // => 'abc '\r\n *\r\n * _.padEnd('abc', 6, '_-');\r\n * // => 'abc_-_'\r\n *\r\n * _.padEnd('abc', 3);\r\n * // => 'abc'\r\n */\r\n function padEnd(string, length, chars) {\r\n string = toString(string);\r\n length = toInteger(length);\r\n\r\n var strLength = length ? stringSize(string) : 0;\r\n return (length && strLength < length)\r\n ? (string + createPadding(length - strLength, chars))\r\n : string;\r\n }\r\n\r\n /**\r\n * Pads `string` on the left side if it's shorter than `length`. Padding\r\n * characters are truncated if they exceed `length`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to pad.\r\n * @param {number} [length=0] The padding length.\r\n * @param {string} [chars=' '] The string used as padding.\r\n * @returns {string} Returns the padded string.\r\n * @example\r\n *\r\n * _.padStart('abc', 6);\r\n * // => ' abc'\r\n *\r\n * _.padStart('abc', 6, '_-');\r\n * // => '_-_abc'\r\n *\r\n * _.padStart('abc', 3);\r\n * // => 'abc'\r\n */\r\n function padStart(string, length, chars) {\r\n string = toString(string);\r\n length = toInteger(length);\r\n\r\n var strLength = length ? stringSize(string) : 0;\r\n return (length && strLength < length)\r\n ? (createPadding(length - strLength, chars) + string)\r\n : string;\r\n }\r\n\r\n /**\r\n * Converts `string` to an integer of the specified radix. If `radix` is\r\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\r\n * hexadecimal, in which case a `radix` of `16` is used.\r\n *\r\n * **Note:** This method aligns with the\r\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category String\r\n * @param {string} string The string to convert.\r\n * @param {number} [radix=10] The radix to interpret `value` by.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.parseInt('08');\r\n * // => 8\r\n *\r\n * _.map(['6', '08', '10'], _.parseInt);\r\n * // => [6, 8, 10]\r\n */\r\n function parseInt(string, radix, guard) {\r\n if (guard || radix == null) {\r\n radix = 0;\r\n } else if (radix) {\r\n radix = +radix;\r\n }\r\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\r\n }\r\n\r\n /**\r\n * Repeats the given string `n` times.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to repeat.\r\n * @param {number} [n=1] The number of times to repeat the string.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {string} Returns the repeated string.\r\n * @example\r\n *\r\n * _.repeat('*', 3);\r\n * // => '***'\r\n *\r\n * _.repeat('abc', 2);\r\n * // => 'abcabc'\r\n *\r\n * _.repeat('abc', 0);\r\n * // => ''\r\n */\r\n function repeat(string, n, guard) {\r\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\r\n n = 1;\r\n } else {\r\n n = toInteger(n);\r\n }\r\n return baseRepeat(toString(string), n);\r\n }\r\n\r\n /**\r\n * Replaces matches for `pattern` in `string` with `replacement`.\r\n *\r\n * **Note:** This method is based on\r\n * [`String#replace`](https://mdn.io/String/replace).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to modify.\r\n * @param {RegExp|string} pattern The pattern to replace.\r\n * @param {Function|string} replacement The match replacement.\r\n * @returns {string} Returns the modified string.\r\n * @example\r\n *\r\n * _.replace('Hi Fred', 'Fred', 'Barney');\r\n * // => 'Hi Barney'\r\n */\r\n function replace() {\r\n var args = arguments,\r\n string = toString(args[0]);\r\n\r\n return args.length < 3 ? string : string.replace(args[1], args[2]);\r\n }\r\n\r\n /**\r\n * Converts `string` to\r\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the snake cased string.\r\n * @example\r\n *\r\n * _.snakeCase('Foo Bar');\r\n * // => 'foo_bar'\r\n *\r\n * _.snakeCase('fooBar');\r\n * // => 'foo_bar'\r\n *\r\n * _.snakeCase('--FOO-BAR--');\r\n * // => 'foo_bar'\r\n */\r\n var snakeCase = createCompounder(function(result, word, index) {\r\n return result + (index ? '_' : '') + word.toLowerCase();\r\n });\r\n\r\n /**\r\n * Splits `string` by `separator`.\r\n *\r\n * **Note:** This method is based on\r\n * [`String#split`](https://mdn.io/String/split).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to split.\r\n * @param {RegExp|string} separator The separator pattern to split by.\r\n * @param {number} [limit] The length to truncate results to.\r\n * @returns {Array} Returns the string segments.\r\n * @example\r\n *\r\n * _.split('a-b-c', '-', 2);\r\n * // => ['a', 'b']\r\n */\r\n function split(string, separator, limit) {\r\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\r\n separator = limit = undefined;\r\n }\r\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\r\n if (!limit) {\r\n return [];\r\n }\r\n string = toString(string);\r\n if (string && (\r\n typeof separator == 'string' ||\r\n (separator != null && !isRegExp(separator))\r\n )) {\r\n separator = baseToString(separator);\r\n if (!separator && hasUnicode(string)) {\r\n return castSlice(stringToArray(string), 0, limit);\r\n }\r\n }\r\n return string.split(separator, limit);\r\n }\r\n\r\n /**\r\n * Converts `string` to\r\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.1.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the start cased string.\r\n * @example\r\n *\r\n * _.startCase('--foo-bar--');\r\n * // => 'Foo Bar'\r\n *\r\n * _.startCase('fooBar');\r\n * // => 'Foo Bar'\r\n *\r\n * _.startCase('__FOO_BAR__');\r\n * // => 'FOO BAR'\r\n */\r\n var startCase = createCompounder(function(result, word, index) {\r\n return result + (index ? ' ' : '') + upperFirst(word);\r\n });\r\n\r\n /**\r\n * Checks if `string` starts with the given target string.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to inspect.\r\n * @param {string} [target] The string to search for.\r\n * @param {number} [position=0] The position to search from.\r\n * @returns {boolean} Returns `true` if `string` starts with `target`,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.startsWith('abc', 'a');\r\n * // => true\r\n *\r\n * _.startsWith('abc', 'b');\r\n * // => false\r\n *\r\n * _.startsWith('abc', 'b', 1);\r\n * // => true\r\n */\r\n function startsWith(string, target, position) {\r\n string = toString(string);\r\n position = position == null\r\n ? 0\r\n : baseClamp(toInteger(position), 0, string.length);\r\n\r\n target = baseToString(target);\r\n return string.slice(position, position + target.length) == target;\r\n }\r\n\r\n /**\r\n * Creates a compiled template function that can interpolate data properties\r\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\r\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\r\n * properties may be accessed as free variables in the template. If a setting\r\n * object is given, it takes precedence over `_.templateSettings` values.\r\n *\r\n * **Note:** In the development build `_.template` utilizes\r\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\r\n * for easier debugging.\r\n *\r\n * For more information on precompiling templates see\r\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\r\n *\r\n * For more information on Chrome extension sandboxes see\r\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category String\r\n * @param {string} [string=''] The template string.\r\n * @param {Object} [options={}] The options object.\r\n * @param {RegExp} [options.escape=_.templateSettings.escape]\r\n * The HTML \"escape\" delimiter.\r\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\r\n * The \"evaluate\" delimiter.\r\n * @param {Object} [options.imports=_.templateSettings.imports]\r\n * An object to import into the template as free variables.\r\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\r\n * The \"interpolate\" delimiter.\r\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\r\n * The sourceURL of the compiled template.\r\n * @param {string} [options.variable='obj']\r\n * The data object variable name.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Function} Returns the compiled template function.\r\n * @example\r\n *\r\n * // Use the \"interpolate\" delimiter to create a compiled template.\r\n * var compiled = _.template('hello <%= user %>!');\r\n * compiled({ 'user': 'fred' });\r\n * // => 'hello fred!'\r\n *\r\n * // Use the HTML \"escape\" delimiter to escape data property values.\r\n * var compiled = _.template('<%- value %>');\r\n * compiled({ 'value': '