@rongcloud/imlib-next 5.30.1 → 5.30.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var se=function(e,t){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},se(e,t)};function ce(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}se(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _e=function(){return _e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},_e.apply(this,arguments)};function de(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((i=i.apply(e,t||[])).next())}))}function fe(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function le(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function Ee(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Re(e){return _e(_e({},e),{channelId:e.channelId||""})}function Ae(t){var n=t.conversationType,i=t.targetId,r=t.latestMessage,o=t.unreadMessageCount,a=t.hasMentioned,u=t.mentionedInfo,s=t.lastUnreadTime,c=t.notificationStatus,_=t.notificationLevel,d=t.isTop,f=t.channelId,l=t.unreadMentionedCount,E=t.matchCount,R=t.operationTime,A=t.draft,S=t.translateStrategy,T=t.editedMessageDraft,I={conversationType:n,targetId:i,latestMessage:r&&Re(r),unreadMessageCount:o,hasMentioned:a,mentionedInfo:a?{type:null==u?void 0:u.type,userIdList:null==u?void 0:u.userIdList}:void 0,lastUnreadTime:s,notificationStatus:c,notificationLevel:_,isTop:d,channelId:f,unreadMentionedCount:l,matchCount:E,operationTime:R,draft:A||"",translateStrategy:S,editedMessageDraft:T};return I.conversationType===e.ULTRA_GROUP&&(I.firstUnreadMessage=t.firstUnreadMessage,I.channelType=t.channelType,I.unreadMentionedMeCount=t.unreadMentionedMeCount),I}function Se(e,t){null===console||void 0===console||console.warn("Method '".concat(e,"' is deprecated, please use '").concat(t,"' instead"))}var Te,Ie={groupName:"name",portraitUri:"portraitUrl",introduction:"introduction",notice:"announcement",joinPermission:"joinPerm",removeMemberPermission:"removePerm",invitePermission:"memInvitePerm",inviteHandlePermission:"invitePerm",groupInfoEditPermission:"profilePerm",memberInfoEditPermission:"memProfilePerm"};!function(e){e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.DISCONNECT="DISCONNECT",e.SUSPEND="SUSPEND",e.MESSAGES="MESSAGES",e.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",e.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",e.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",e.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",e.SYNC_READ_STATUS="SYNC_READ_STATUS",e.CONVERSATION="CONVERSATION",e.CHATROOM="CHATROOM",e.EXPANSION="EXPANSION",e.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",e.TAG="TAG",e.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",e.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",e.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",e.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",e.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",e.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",e.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",e.USER_GROUP_STATUS="USER_GROUP_STATUS",e.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",e.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",e.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",e.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",e.GROUP_OPERATION="GROUP_OPERATION",e.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",e.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",e.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",e.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",e.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",e.FRIEND_ADDED="FRIEND_ADDED",e.FRIEND_DELETE="FRIEND_DELETE",e.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",e.FRIEND_CLEARED="FRIEND_CLEARED",e.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",e.DATABASE_OPENED="DATABASE_OPENED",e.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",e.DATABASE_UPGRADING="DATABASE_UPGRADING",e.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",e.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",e.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",e.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",e.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",e.MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED"}(Te||(Te={}));var ve,he={A_ADD_TO_BLACKLIST_T:"A-add_to_blacklist-T",A_ADD_TO_BLACKLIST_R:"A-add_to_blacklist-R",A_REMOVE_FROM_BLACKLIST_T:"A-remove_from_blacklist-T",A_REMOVE_FROM_BLACKLIST_R:"A-remove_from_blacklist-R",A_GET_BLACKLIST_T:"A-get_blacklist-T",A_GET_BLACKLIST_R:"A-get_blacklist-R",A_GET_BLACKLIST_STATUS_T:"A-get_blacklist_status-T",A_GET_BLACKLIST_STATUS_R:"A-get_blacklist_status-R",A_GET_ALL_UNREAD_MENTIONED_COUNT_T:"A-get_all_unread_mentioned_count-T",A_GET_ALL_UNREAD_MENTIONED_COUNT_R:"A-get_all_unread_mentioned_count-R",A_E_SET_MESSAGE_STATUS_TO_READ_T:"A-e_set_message_status_to_read-T",A_E_SET_MESSAGE_STATUS_TO_READ_R:"A-e_set_message_status_to_read-R",A_E_SET_MESSAGE_RECEIVED_STATUS_T:"A-e_set_message_received_status-T",A_E_SET_MESSAGE_RECEIVED_STATUS_R:"A-e_set_message_received_status-R",A_E_SET_MESSAGE_SENT_STATUS_T:"A-e_set_message_sent_status-T",A_E_SET_MESSAGE_SENT_STATUS_R:"A-e_set_message_sent_status-R",A_E_SET_MESSAGE_SENT_STATUS_INFO_T:"A-e_set_message_sent_status_info-T",A_E_SET_MESSAGE_SENT_STATUS_INFO_R:"A-e_set_message_sent_status_info-R",A_E_SET_CHECK_DUPLICATE_MESSAGE_T:"A-e_set_check_duplicate_message-T",A_E_SET_CHECK_DUPLICATE_MESSAGE_R:"A-e_set_check_duplicate_message-R",A_BATCH_SET_CON_NOTIFI_LEVEL_T:"A-batch_set_con_notifi_level-T",A_BATCH_SET_CON_NOTIFI_LEVEL_R:"A-batch_set_con_notifi_level-R",A_BATCH_SET_CON_TO_TOP_T:"A-batch_set_con_to_top-T",A_BATCH_SET_CON_TO_TOP_R:"A-batch_set_con_to_top-R",A_RECALL_MESSAGE_T:"A-recall_message-T",A_RECALL_MESSAGE_R:"A-recall_message-R",A_GET_MESSAGE_READER_T:"A-get_message_reader-T",A_GET_MESSAGE_READER_R:"A-get_message_reader-R",A_GET_UNREAD_MENTIONED_MESSAGES_T:"A-get_unread_mentioned_messages-T",A_GET_UNREAD_MENTIONED_MESSAGES_R:"A-get_unread_mentioned_messages-R",A_SEARCH_CONVERSATION_BY_CONTENT_T:"A-search_conversation_by_content-T",A_SEARCH_CONVERSATION_BY_CONTENT_R:"A-search_conversation_by_content-R",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T:"A-clear_unread_count_by_timestamp-T",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R:"A-clear_unread_count_by_timestamp-R",A_SET_PROXY_T:"A-set_proxy-T",A_SET_PROXY_R:"A-set_proxy-R",A_GET_PROXY_T:"A-get_proxy-T",A_GET_PROXY_R:"A-get_proxy-R",A_TEST_PROXY_T:"A-test_proxy-T",A_TEST_PROXY_R:"A-test_proxy-R",A_SUBSCRIBE_USER_STATUS_T:"A-subscribe_user_status-T",A_SUBSCRIBE_USER_STATUS_R:"A-subscribe_user_status-R",A_UNSUBSCRIBE_USER_STATUS_T:"A-unsubscribe_user_status-T",A_UNSUBSCRIBE_USER_STATUS_R:"A-unsubscribe_user_status-R",A_GET_SUBSCRIBE_USER_STATUS_LIST_T:"A-get_subscribe_user_status_list-T",A_GET_SUBSCRIBE_USER_STATUS_LIST_R:"A-get_subscribe_user_status_list-R",A_UPDATE_MY_USER_PROFILE_T:"A-update_my_user_profile-T",A_UPDATE_MY_USER_PROFILE_R:"A-update_my_user_profile-R",A_GET_MY_USER_PROFILE_T:"A-get_my_user_profile-T",A_GET_MY_USER_PROFILE_R:"A-get_my_user_profile-R",A_UPDATE_MY_USER_PROFILE_VISIBILITY_T:"A-update_my_user_profile_visibility-T",A_UPDATE_MY_USER_PROFILE_VISIBILITY_R:"A-update_my_user_profile_visibility-R",A_GET_MY_USER_PROFILE_VISIBILITY_T:"A-get_my_user_profile_visibility-T",A_GET_MY_USER_PROFILE_VISIBILITY_R:"A-get_my_user_profile_visibility-R",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T:"A-search_user_profile_by_unique_id-T",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R:"A-search_user_profile_by_unique_id-R",A_CREATE_GROUP_T:"A-create_group-T",A_CREATE_GROUP_R:"A-create_group-R",A_UPDATE_GROUP_INFO_T:"A-update_group_info-T",A_UPDATE_GROUP_INFO_R:"A-update_group_info-R",A_GET_GROUPS_INFO_T:"A-get_groups_info-T",A_GET_GROUPS_INFO_R:"A-get_groups_info-R",A_KICK_GROUP_MEMBERS_T:"A-kick_group_members-T",A_KICK_GROUP_MEMBERS_R:"A-kick_group_members-R",A_QUIT_GROUP_T:"A-quit_group-T",A_QUIT_GROUP_R:"A-quit_group-R",A_DISMISS_GROUP_T:"A-dismiss_group-T",A_DISMISS_GROUP_R:"A-dismiss_group-R",A_TRANSFER_GROUP_OWNER_T:"A-transfer_group_owner-T",A_TRANSFER_GROUP_OWNER_R:"A-transfer_group_owner-R",A_ADD_GROUP_MANAGERS_T:"A-add_group_managers-T",A_ADD_GROUP_MANAGERS_R:"A-add_group_managers-R",A_REMOVE_GROUP_MANAGERS_T:"A-remove_group_managers-T",A_REMOVE_GROUP_MANAGERS_R:"A-remove_group_managers-R",A_GET_GROUP_MEMBERS_BY_ROLES_T:"A-get_group_members_by_roles-T",A_GET_GROUP_MEMBERS_BY_ROLES_R:"A-get_group_members_by_roles-R",A_GET_GROUP_MEMBERS_T:"A-get_group_members-T",A_GET_GROUP_MEMBERS_R:"A-get_group_members-R",A_SET_GROUP_MEMBER_INFO_T:"A-set_group_member_info-T",A_SET_GROUP_MEMBER_INFO_R:"A-set_group_member_info-R",A_SEARCH_GROUP_MEMBERS_T:"A-search_group_members-T",A_SEARCH_GROUP_MEMBERS_R:"A-search_group_members-R",A_JOIN_GROUP_T:"A-join_group-T",A_JOIN_GROUP_R:"A-join_group-R",A_INVITE_USERS_TO_GROUP_T:"A-invite_users_to_group-T",A_INVITE_USERS_TO_GROUP_R:"A-invite_users_to_group-R",A_ACCEPT_GROUP_INVITE_T:"A-accept_group_invite-T",A_ACCEPT_GROUP_INVITE_R:"A-accept_group_invite-R",A_REFUSE_GROUP_INVITE_T:"A-refuse_group_invite-T",A_REFUSE_GROUP_INVITE_R:"A-refuse_group_invite-R",A_ACCEPT_GROUP_APPLICATION_T:"A-accept_group_application-T",A_ACCEPT_GROUP_APPLICATION_R:"A-accept_group_application-R",A_REFUSE_GROUP_APPLICATION_T:"A-refuse_group_application-T",A_REFUSE_GROUP_APPLICATION_R:"A-refuse_group_application-R",A_GET_GROUP_APPLICATIONS_T:"A-get_group_applications-T",A_GET_GROUP_APPLICATIONS_R:"A-get_group_applications-R",A_GET_JOINED_GROUPS_BY_ROLES_T:"A-get_joined_groups_by_roles-T",A_GET_JOINED_GROUPS_BY_ROLES_R:"A-get_joined_groups_by_roles-R",A_SEARCH_JOINED_GROUPS_T:"A-search_joined_groups-T",A_SEARCH_JOINED_GROUPS_R:"A-search_joined_groups-R",A_GET_JOINED_GROUPS_T:"A-get_joined_groups-T",A_GET_JOINED_GROUPS_R:"A-get_joined_groups-R",A_SET_GROUP_REMARK_T:"A-set_group_remark-T",A_SET_GROUP_REMARK_R:"A-set_group_remark-R",A_GET_GROUP_REMARK_T:"A-get_group_remark-T",A_GET_GROUP_REMARK_R:"A-get_group_remark-R",A_ADD_GROUP_FOLLOWS_T:"A-add_group_follows-T",A_ADD_GROUP_FOLLOWS_R:"A-add_group_follows-R",A_REMOVE_GROUP_FOLLOWS_T:"A-remove_group_follows-T",A_REMOVE_GROUP_FOLLOWS_R:"A-remove_group_follows-R",A_GET_GROUP_FOLLOWS_T:"A-get_group_follows-T",A_GET_GROUP_FOLLOWS_R:"A-get_group_follows-R",A_ADD_FRIEND_T:"A-add_friend-T",A_ADD_FRIEND_R:"A-add_friend-R",A_DELETE_FRIENDS_T:"A-delete_friends-T",A_DELETE_FRIENDS_R:"A-delete_friends-R",A_ACCEPT_FRIEND_APPLICATION_T:"A-accept_friend_application-T",A_ACCEPT_FRIEND_APPLICATION_R:"A-accept_friend_application-R",A_REFUSE_FRIEND_APPLICATION_T:"A-refuse_friend_application-T",A_REFUSE_FRIEND_APPLICATION_R:"A-refuse_friend_application-R",A_SET_FRIEND_INFO_T:"A-set_friend_info-T",A_SET_FRIEND_INFO_R:"A-set_friend_info-R",A_CHECK_FRIENDS_T:"A-check_friends-T",A_CHECK_FRIENDS_R:"A-check_friends-R",A_GET_FRIENDS_T:"A-get_friends-T",A_GET_FRIENDS_R:"A-get_friends-R",A_GET_FRIEND_APPLICATIONS_T:"A-get_friend_applications-T",A_GET_FRIEND_APPLICATIONS_R:"A-get_friend_applications-R",A_DELETE_FRIEND_APPLICATION_T:"A-delete_friend_application-T",A_DELETE_FRIEND_APPLICATION_R:"A-delete_friend_application-R",A_GET_FRIENDS_INFO_T:"A-get_friends_info-T",A_GET_FRIENDS_INFO_R:"A-get_friends_info-R",A_SEARCH_FRIENDS_INFO_T:"A-search_friends_info-T",A_SEARCH_FRIENDS_INFO_R:"A-search_friends_info-R",A_SET_ADD_FRIEND_PERMISSION_T:"A-set_add_friend_permission-T",A_SET_ADD_FRIEND_PERMISSION_R:"A-set_add_friend_permission-R",A_GET_ADD_FRIEND_PERMISSION_T:"A-get_add_friend_permission-T",A_GET_ADD_FRIEND_PERMISSION_R:"A-get_add_friend_permission-R"};!function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(ve||(ve={}));var Oe=new t,Ne={connection:function(e,t){switch(e){case n.CONNECTED:Oe.emit(Te.CONNECTED);break;case n.CONNECTING:Oe.emit(Te.CONNECTING);break;case n.SUSPENDED:Oe.emit(Te.SUSPEND,t);break;case n.DISCONNECTED:Oe.emit(Te.DISCONNECT,t)}},batchMessage:function(e){Oe.emit(Te.MESSAGES,{messages:e.map((function(e){return Re(e)}))})},typingState:function(e){Oe.emit(Te.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,i){Oe.emit(Te.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:function(e,t,n){Oe.emit(Te.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){Oe.emit(Te.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(t){var n=t.map((function(t){var n=t.conversation,i=t.updatedItems,r=n.conversationType,o=Ae(n);return r===e.ULTRA_GROUP&&(o.versionTime=n.versionTime,o.unreadMessageCount=ge(n.unreadMessageCount||0),o.unreadMentionedCount=ge(n.unreadMentionedCount||0),o.unreadMentionedMeCount=ge(n.unreadMentionedMeCount||0)),{conversation:o,updatedItems:i}}));Oe.emit(Te.CONVERSATION,{conversationList:n})},chatroomState:function(e){Oe.emit(Te.CHATROOM,e)},expansion:function(e){Oe.emit(Te.EXPANSION,e)},pullFinished:function(){Oe.emit(Te.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){Oe.emit(Te.TAG)},userSettingsSynced:function(e){Oe.emit(Te.USER_SETTINGS_SYNCED,e)},userSettingsChanged:function(e){Oe.emit(Te.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:function(e){Oe.emit(Te.CONVERSATIONS_SETTINGS_SYNCED,e)},conversationTagChanged:function(){Oe.emit(Te.CONVERSATION_TAG)},messageBlocked:function(e){Oe.emit(Te.MESSAGE_BLOCKED,e)},ultraGroupEnable:function(){Oe.emit(Te.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(e){Oe.emit(Te.CONVERSATIONS_SYNCED,e)},operateStatus:function(e){Oe.emit(Te.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){Oe.emit(Te.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return Re(e)})))},ultraGroupMessageRecalled:function(e){Oe.emit(Te.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return Re(e)})))},ultraGroupChannelChangeType:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){Oe.emit(Te.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){Oe.emit(Te.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){Oe.emit(Te.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){Oe.emit(Te.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){Oe.emit(Te.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){Oe.emit(Te.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){Oe.emit(Te.OWN_USER_PROFILE_CHANGED,e)},groupOperation:function(e){Oe.emit(Te.GROUP_OPERATION,e)},groupInfoChanged:function(e){Oe.emit(Te.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:function(e){Oe.emit(Te.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:function(e){Oe.emit(Te.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:function(e){Oe.emit(Te.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:function(e){Oe.emit(Te.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:function(e){Oe.emit(Te.FRIEND_ADDED,e)},friendDelete:function(e){Oe.emit(Te.FRIEND_DELETE,e)},friendApplicationStatusChanged:function(e){Oe.emit(Te.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:function(e){Oe.emit(Te.FRIEND_CLEARED,e)},friendInfoChangedSync:function(e){Oe.emit(Te.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:function(e,t){Oe.emit(Te.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:function(){Oe.emit(Te.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){Oe.emit(Te.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){Oe.emit(Te.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:function(e){Oe.emit(Te.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:function(e){Oe.emit(Te.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:function(e){Oe.emit(Te.TRANSLATE_RESPONSE,e)},messagesModified:function(e){Oe.emit(Te.MESSAGE_MODIFIED,e.map((function(e){return Re(e)})))},messageModifiedSyncCompleted:function(){Oe.emit(Te.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function ge(e){return e>999?999:e}i.add("imlib-next","5.30.1");var me=null,Pe=null,pe=null;function Ue(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return me?[4,c.destroy()]:[2];case 1:return e.sent(),Pe=null,me=null,pe=null,[2]}}))}))}function Ce(e){if(!me)throw new Error("Not initialized yet!");return e(me,pe,Pe)}function Me(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return me?[2,e(me,pe,Pe)]:[2,d(f.BIZ_ERROR_CLIENT_NOT_INIT)]}))}))}function Le(){return me?l(me):d(f.BIZ_ERROR_CLIENT_NOT_INIT)}function De(e,t){return Ce((function(n){return n.install(e,t)}))}var Ge={TIMEOUT:{code:-1,msg:"Network timeout"},REJECTED_BY_BLACKLIST:{code:405,msg:"Blacklisted by the other party"},SEND_TOO_FAST:{code:20604,msg:"Sending messages too quickly"},NOT_IN_GROUP:{code:22406,msg:"Not in group"},ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL:{code:f.ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL,msg:"ultra group user not in private channel"},FORBIDDEN_IN_GROUP:{code:22408,msg:"Forbbiden from speaking in the group"},NOT_IN_CHATROOM:{code:23406,msg:"Not in chatRoom"},FORBIDDEN_IN_CHATROOM:{code:23408,msg:"Forbbiden from speaking in the chatRoom"},KICKED_FROM_CHATROOM:{code:23409,msg:"Kicked out and forbbiden from joining the chatRoom"},CHATROOM_NOT_EXIST:{code:23410,msg:"ChatRoom does not exist"},CHATROOM_IS_FULL:{code:23411,msg:"ChatRoom members exceeded"},PARAMETER_INVALID_CHATROOM:{code:23412,msg:"Invalid chatRoom parameters"},ROAMING_SERVICE_UNAVAILABLE_CHATROOM:{code:23414,msg:"ChatRoom message roaming service is not open, Please go to the developer to open this service"},RECALLMESSAGE_PARAMETER_INVALID:{code:25101,msg:"Invalid recall message parameter"},ROAMING_SERVICE_UNAVAILABLE_MESSAGE:{code:25102,msg:"Single group chat roaming service is not open, Please go to the developer to open this service"},PUSHSETTING_PARAMETER_INVALID:{code:26001,msg:"Invalid push parameter"},OPERATION_BLOCKED:{code:20605,msg:"Operation is blocked"},OPERATION_NOT_SUPPORT:{code:20606,msg:"Operation is not supported"},MSG_BLOCKED_SENSITIVE_WORD:{code:21501,msg:"The sent message contains sensitive words"},REPLACED_SENSITIVE_WORD:{code:21502,msg:"Sensitive words in the message have been replaced"},NOT_CONNECTED:{code:30001,msg:"Please connect successfully first"},NAVI_REQUEST_ERROR:{code:30007,msg:"Navigation http request failed"},CMP_REQUEST_ERROR:{code:30010,msg:"CMP sniff http request failed"},CONN_APPKEY_FAKE:{code:31002,msg:"Your appkey is fake"},CONN_MINI_SERVICE_NOT_OPEN:{code:31003,msg:"Mini program service is not open, Please go to the developer to open this service"},CONN_ACK_TIMEOUT:{code:31e3,msg:"Connection ACK timeout"},CONN_TOKEN_INCORRECT:{code:31004,msg:"Your token is not valid or expired"},CONN_NOT_AUTHRORIZED:{code:31005,msg:"AppKey and Token do not match"},CONN_REDIRECTED:{code:31006,msg:"Connection redirection"},CONN_APP_BLOCKED_OR_DELETED:{code:31008,msg:"AppKey is banned or deleted"},CONN_USER_BLOCKED:{code:31009,msg:"User blocked"},CONN_DOMAIN_INCORRECT:{code:31012,msg:"Connect domain error, Please check the set security domain"},ROAMING_SERVICE_UNAVAILABLE:{code:33007,msg:"Roaming service cloud is not open, Please go to the developer to open this service"},RC_CONNECTION_EXIST:{code:34001,msg:"Connection already exists"},CHATROOM_KV_EXCEED:{code:23423,msg:"ChatRoom KV setting exceeds maximum"},CHATROOM_KV_OVERWRITE_INVALID:{code:23424,msg:"ChatRoom KV already exists"},CHATROOM_KV_STORE_NOT_OPEN:{code:23426,msg:"ChatRoom KV storage service is not open, Please go to the developer to open this service"},CHATROOM_KEY_NOT_EXIST:{code:23427,msg:"ChatRoom key does not exist"},MSG_KV_NOT_SUPPORT:{code:34008,msg:"The message cannot be extended"},SEND_MESSAGE_KV_FAIL:{code:34009,msg:"Sending RC expansion message fail"},EXPANSION_LIMIT_EXCEET:{code:34010,msg:"The message expansion size is beyond the limit"},ILLGAL_PARAMS:{code:33003,msg:"Incorrect parameters passed in while calling the interface"},UPLOAD_FILE_FAILED:{code:35020,msg:"File upload failed"},CHATROOM_KV_STORE_NOT_ALL_SUCCESS:{code:23428,msg:"Chatroom kv store not all success"},CHATROOM_KV_STORE_OUT_LIMIT:{code:23429,msg:"Chatroom kv's length is out of limit"},TAG_EXISTS:{code:33101,msg:"The tag already exists"},TAG_NOT_EXIST:{code:33100,msg:"The tag does not exist"},NOT_SUPPORT:{code:f.NOT_SUPPORT,msg:"The method is not supported in a browser!"}},ye={};for(var be in Ge){var we=Ge[be].code;ye[we]=be}var Fe=0,xe=new Map;function Be(e,t){var n=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=[],o=[];Ee([],le(xe.values()),!1).forEach((function(e){var t=le(e,3),i=t[0],a=t[1],u=t[2];i===n&&(o.push(a),u&&r.push(u))})),r.forEach((function(t){e=t(e)}));var a=t.apply(void 0,Ee([],le(e),!1));return o.forEach((function(t){t(e,a)})),a};return Object.defineProperty(n,"original",{value:t,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"monitorable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),n}function Ve(e,t,n){if(!e.monitorable)throw new Error("Not monitorable API: ".concat(e.name));var i=++Fe;return xe.set(i,[e,t,n]),i}function He(e){xe.delete(e)}function Ye(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(E.A_CONNECT_T,E.A_CONNECT_R).validate("token",e,o.STRING,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(E.A_CONNECT_T,JSON.stringify({token:e,reconnectKickEnable:t}),n),[4,i.connect(e,!!t,n)];case 1:return o=u.sent(),a=o.code===f.SUCCESS?"info":"warn",r[a](E.A_CONNECT_R,JSON.stringify({code:o.code,userId:o.userId}),n),o.code===f.SUCCESS?[2,{code:o.code,data:{userId:o.userId}}]:[2,{code:o.code,msg:ye[o.code]}]}}))}))}))]}))}))}var Je=Be("disconnect",(function(e,t){return Ce((function(n,i){return i.info(E.A_DISCONNECT_O),n.disconnect(e,t)}))}));function ke(e,t,n){Oe.on(e,t,n)}function Ke(e,t,n){Oe.once(e,t,n)}function je(e,t,n){Oe.off(e,t,n)}function We(e){Oe.removeAll(e)}function Qe(){Oe.clear()}var Xe=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0),Object.defineProperty(this,"messageType",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"isPersited",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"isCounted",{enumerable:!0,configurable:!0,writable:!0,value:i})},ze=function(e){function t(t,n,i){return e.call(this,t,i,n.isPersited,n.isCounted)||this}return ce(t,e),t}(Xe);var qe,Ze=function(e){function t(t){return e.call(this,A.COMBINE,S(A.COMBINE),t)||this}return ce(t,e),t}(ze),$e=function(e){function t(t){return e.call(this,A.COMBINE_V2,S(A.COMBINE_V2),t)||this}return ce(t,e),t}(ze),et=function(e){function t(t){return e.call(this,"RC:CmdMsg",S("RC:CmdMsg"),t)||this}return ce(t,e),t}(ze),tt=function(e){function t(t){return e.call(this,A.FILE,S(A.FILE),t)||this}return ce(t,e),t}(ze),nt=function(e){function t(t){return e.call(this,A.GIF,S(A.GIF),t)||this}return ce(t,e),t}(ze),it=function(e){function t(t){return e.call(this,"RC:GrpNtf",S("RC:GrpNtf"),t)||this}return ce(t,e),t}(ze),rt=function(e){function t(t){return e.call(this,A.IMAGE,S(A.IMAGE),t)||this}return ce(t,e),t}(ze),ot=function(e){function t(t){return e.call(this,"RC:InfoNtf",S("RC:InfoNtf"),t)||this}return ce(t,e),t}(ze),at=function(e){function t(t){return e.call(this,A.LOCATION,S(A.LOCATION),t)||this}return ce(t,e),t}(ze),ut=function(e){function t(t){return e.call(this,A.REFERENCE,S(A.REFERENCE),t)||this}return ce(t,e),t}(ze),st=function(e){function t(t){return e.call(this,A.RICH_CONTENT,S(A.RICH_CONTENT),t)||this}return ce(t,e),t}(ze),ct=function(e){function t(t){return e.call(this,A.SIGHT,S(A.SIGHT),t)||this}return ce(t,e),t}(ze),_t=function(e){function t(t){return e.call(this,A.TEXT,S(A.TEXT),t)||this}return ce(t,e),t}(ze),dt=function(e){function t(t){return e.call(this,A.HQ_VOICE,S(A.HQ_VOICE),t)||this}return ce(t,e),t}(ze),ft=function(e){function t(t){return e.call(this,A.VOICE,S(A.VOICE),t)||this}return ce(t,e),t}(ze);!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(qe||(qe={}));var lt=function(){function e(e,t,n){Object.defineProperty(this,"_url",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_authInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_getFileToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isAbort",{enumerable:!0,configurable:!0,writable:!0,value:!1})}return Object.defineProperty(e.prototype,"isAbort",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isAbort}}),Object.defineProperty(e.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._isAbort=!0,this._abortHandler()}}),Object.defineProperty(e.prototype,"upload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.file.size>T?Promise.resolve({code:f.UPLOAD_FAIL,msg:"the file size is over 5GB!"}):e.file.size>I&&this.multipartUpload?this.multipartUpload(e):this.commonUpload(e)}}),e}(),Et=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r={},(o=new FormData).set("token",i.token),o.set("key",i.fileName),o.set("file",t),this._promise=h({url:O(this._url),headers:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.QINIU}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),Rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r=O("".concat(i.ossBucketName,".").concat(this._url)),(o=new FormData).set("token",i.token),o.set("OSSAccessKeyId",i.osskeyId),o.set("policy",i.ossPolicy),o.set("Signature",i.ossSign),o.set("success_action_status","200"),o.set("key",i.fileName),o.set("file",t),this._promise=h({url:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.ALI}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt);function At(e){return Math.ceil(e/1024)||0}var St,Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return de(t,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c,_,d,l,E,R,A,S,T;return fe(this,(function(I){switch(I.label){case 0:t=e.file,n=e.fileType,I.label=1;case 1:return I.trys.push([1,3,,4]),[4,this._getFileToken(n,t.name,"POST","uploads",void 0,At(t.size))];case 2:return i=I.sent(),[3,4];case 3:return[2,{code:I.sent()}];case 4:return r=O("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),o=this.getBaseHeaders(t,i,e),this._promise=h({url:"".concat(r,"?uploads"),headers:o,method:"POST"}),[4,this._promise.result()];case 5:return a=I.sent(),u=a.status,s=a.data,this._promise=null,c=null===(T=null==s?void 0:s.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===T?void 0:T[1],200!==u&&204!==u||!c?[2,{code:f.UPLOAD_FAIL,msg:"start upload fail"}]:(_=[],[4,this.requestUploadPart(r,t,c,i.fileName,e,_)]);case 6:if(d=I.sent(),l=d.code,E=d.msg,l!==f.SUCCESS)return[2,{code:l,msg:E}];I.label=7;case 7:return I.trys.push([7,9,,10]),[4,this._getFileToken(n,i.fileName,"POST","uploadId=".concat(c),void 0,At(t.size))];case 8:return i=I.sent(),[3,10];case 9:return[2,{code:I.sent()}];case 10:return R=_.map((function(e,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(e,"</ETag></Part>")})).join(""),R="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(R,"</CompleteMultipartUpload>"),A=this.getBaseHeaders(t,i,e),this._promise=h({url:"".concat(r,"?uploadId=").concat(c),headers:A,method:"POST",body:R,timeout:0}),[4,this._promise.result()];case 11:return S=I.sent().status,this._promise=null,200===S||204===S?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.MINIO}}]:[2,{code:f.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))}}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r=O("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),o=this.getBaseHeaders(t,i,e),this._promise=h({url:r,headers:o,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"PUT",body:t,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.MINIO}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r,o,a,u){return void 0===a&&(a=1),void 0===u&&(u=0),de(this,void 0,void 0,(function(){var s,c,_,d,l,E,R,A,S;return fe(this,(function(T){switch(T.label){case 0:if(u>=5)return[2,{code:f.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];s=(a-1)*I,c=Math.min(I,t.size-s),_="partNumber=".concat(a,"&uploadId=").concat(n),T.label=1;case 1:return T.trys.push([1,3,,4]),[4,this._getFileToken(r.fileType,i,"PUT",_,void 0,At(t.size))];case 2:return d=T.sent(),[3,4];case 3:return[2,{code:T.sent()}];case 4:return l=t.slice(s,a*I),E=this.getBaseHeaders(t,d,r),this._promise=h({url:"".concat(e,"?").concat(_),headers:E,method:"PUT",body:l,timeout:0,onProgress:function(e){var n;return null===(n=null==r?void 0:r.onProgress)||void 0===n?void 0:n.call(r,s+e.loaded,t.size)}}),[4,this._promise.result()];case 5:return R=T.sent(),A=R.status,S=R.xhr,this._promise=null,200===A||204===A?(o.push((null==S?void 0:S.getResponseHeader("ETag"))||""),s+c<t.size?[2,this.requestUploadPart(e,t,n,i,r,o,a+1,0)]:[2,{code:f.SUCCESS}]):[2,this.requestUploadPart(e,t,n,i,r,o,a,u+1)]}}))}))}}),Object.defineProperty(t.prototype,"getBaseHeaders",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=n.contentDisposition||("text/html"===e.type?"inline":"attachment");return{"Content-Disposition":"".concat(i,"; filename=").concat(encodeURIComponent(e.name),";"),Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),It=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return de(t,void 0,void 0,(function(){var t,n,i,r;return fe(this,(function(o){return t=e.file,n=e.onProgress,i=N.gen(),r=this._authInfo,[2,this._requestUploadPart(i,t,r.token,n)]}))}))}}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r={},(o=new FormData).set("token",i.token),o.set("key",i.fileName),o.set("file",t),a=O(this._url),this._promise=h({url:a,headers:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return u=d.sent(),s=u.status,c=u.data,this._promise=null,200!==s&&204!==s||!c?[2,{code:f.UPLOAD_FAIL,msg:s.toString()}]:(_=JSON.parse(c),[2,{code:f.SUCCESS,data:{uniqueName:_.rc_url.file_name,downloadUrl:"".concat(a,"/").concat(_.rc_url.path),uploadMethod:v.QINIU}}])}}))}))}}),Object.defineProperty(t.prototype,"_requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){return void 0===r&&(r=0),de(this,void 0,void 0,(function(){var o,a,u,s,c,_,d,l,E,R;return fe(this,(function(A){switch(A.label){case 0:return o=Math.min(I,t.size-r),a=e+t.name.substring(t.name.lastIndexOf(".")),u={Range:"bytes=".concat(r,"-").concat(r+o),"X-File-TransactionId":a,"X-File-Total-Size":t.size.toString()},s=t.slice(r,r+o),(c=new FormData).set("file",s,t.name),c.set("key",a),c.set("name",a),c.set("token",n),_=O(this._url),this._promise=h({url:_,headers:u,onProgress:function(e){return null==i?void 0:i(r+e.loaded,t.size)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 1:return d=A.sent(),l=d.status,E=d.data,this._promise=null,200===l||204===l?r+o<t.size?[2,this._requestUploadPart(e,t,n,i,r+o)]:(R=JSON.parse(E),[2,{code:f.SUCCESS,data:{uniqueName:R.rc_url.file_name,downloadUrl:"".concat(_,"/").concat(R.rc_url.path),uploadMethod:v.QINIU}}]):[2,{code:f.UPLOAD_FAIL,msg:l.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),vt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return t=e.file,n=e.onProgress,i=e.contentDisposition,r=this._authInfo,o={},a=O("".concat(r.s3BucketName,".").concat(this._url)),u=new FormData,i?u.set("Content-Disposition",i):u.set("Content-Disposition","text/html"===t.type?"inline;":"attachment;"),u.set("Content-Type",t.type),u.set("x-amz-credential",r.s3Credential),u.set("x-amz-algorithm",r.s3Algorithm),u.set("x-amz-date",r.s3Date),u.set("policy",r.s3Policy),u.set("x-amz-signature",r.s3Signature),u.set("key",r.fileName),u.set("file",t),this._promise=h({url:a,headers:o,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:u,timeout:0}),[4,this._promise.result()];case 1:return s=_.sent(),c=s.status,this._promise=null,200===c||204===c?[2,l({uniqueName:r.fileName,uploadMethod:v.AWS})]:[2,d(f.UPLOAD_FAIL,c.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt);var ht=((St={})[qe.QINIU]=Et,St[qe.ALIYUN]=Rt,St[qe.S3]=vt,St[qe.MINIO]=Tt,St[qe.RCX]=It,St);function Ot(e,t,n,i){var r=document.createElement("canvas"),o=r.getContext("2d"),a=new Image;a.onload=function(t){var u=i||{},s=u.maxHeight,c=void 0===s?160:s,_=u.maxWidth,d=void 0===_?160:_,l=u.quality,E=void 0===l?1:l,R=u.scale,A=void 0===R?1:R,S=gt(a.width,a.height,{maxHeight:c,maxWidth:d,scale:A});r.width=Math.min(S.w,d),r.height=Math.min(S.h,c),o.drawImage(a,S.x,S.y,S.w,S.h);var T=Nt(r,E);T=T.replace(/data:image\/[^;]+;base64,/,""),e({code:f.SUCCESS,data:_e(_e({},n),{thumbnail:T,width:Math.ceil(S.w),height:Math.ceil(S.h)})})},a.onerror=function(t){e({code:f.UPLOAD_FAIL,msg:"get image info fail:".concat(JSON.stringify(t))})},a.src=(window.URL||window.webkitURL).createObjectURL(t)}function Nt(e,t){var n=e.toDataURL("image/jpeg",t);return n.length>m-10240?Nt(e,t-.1):n}var gt=function(e,t,n){var i,r,o=n.maxHeight,a=void 0===o?160:o,u=n.maxWidth,s=void 0===u?160:u,c=n.scale,_=e<t,d=0,f=0;return(_?t/e:e/t)>(void 0===c?1:c)?(_?(i=160,(r=t/(e/160))>a&&(f=(r-a)/2)):(r=160,(i=e/(t/160))>s&&(d=(i-s)/2)),{w:i,h:r,x:-d,y:-f}):(_?(r=a,i=e/(t/a)):(i=s,r=t/(e/s)),{w:i,h:r,x:-d,y:-f})},mt=0,Pt=function(){function e(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolve",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:++mt}),this._promise=this._handleUpload(e,t)}return Object.defineProperty(e.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;this._resolve({code:f.UPLOAD_FAIL,msg:"upload abort"}),null===(e=this._client)||void 0===e||e.abort()}}),Object.defineProperty(e.prototype,"_uploadInLoop",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){return void 0===r&&(r=[]),de(this,void 0,void 0,(function(){var o,a,u,s,c,_,d;return fe(this,(function(l){switch(l.label){case 0:o=0,l.label=1;case 1:return o<e.length?(a=e[o],(u=ht[a.type])?(this._client=new u(a.url,n,i),[4,this._client.upload(t)]):(r.push({type:a.type,url:a.url,code:f.UPLOAD_FAIL,msg:"Upload type not supported"}),[3,3])):[3,4];case 2:if(s=l.sent(),c=s.code,_=s.data,d=s.msg,c===f.SUCCESS)return[2,{code:c,data:_}];if(c===f.RC_FILE_SIZE_EXCEED_LIMIT)return[2,{code:c,msg:"File size exceeds the limit"}];if(c===f.INVALID_PARAMETER_SIZE_NOT_FOUND)return[2,{code:c,msg:"File size not found"}];if(this._client.isAbort())return this._client=null,[2,{code:c,data:_,msg:d}];this._client=null,r.push({type:a.type,url:a.url,code:c,msg:d}),l.label=3;case 3:return o++,[3,1];case 4:return[2,{code:f.UPLOAD_FAIL,msg:"Failed to upload all channels, msg: ".concat(JSON.stringify(r))}]}}))}))}}),Object.defineProperty(e.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new Promise((function(i){return de(n,void 0,void 0,(function(){var n,r,o,a,u,s,c,_,d,l,E,R,A,S,T,I,v,h;return fe(this,(function(O){switch(O.label){case 0:return this._resolve=i,n=t.getFileToken,r=t.customDomain,o=t.uploadServer,a=t.ossConfig,u=e.file,s=e.fileType,c=e.thumbnailConfig,[4,n(s,u.name,void 0,void 0,void 0,At(u.size))];case 1:return _=O.sent(),d=function(e,t,n){if(t)return[{type:qe.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:qe.QINIU,url:"",p:""};return Object.keys(e).forEach((function(n){"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort((function(e,t){return e.p-t.p}));var i=[];return n&&i.push({type:qe.QINIU,url:n,p:"1"}),i}(_.ossConfig||a,r,o),0===d.length?(i({code:f.INVALID_PARAMETER_MEDIA_URL,msg:"uploadUrlList is empty"}),[2]):[4,this._uploadInLoop(d,e,_,n)];case 2:return l=O.sent(),E=l.code,R=l.data,A=l.msg,E===f.SUCCESS&&R?(S=R.downloadUrl,T=R.uploadMethod,S?[3,4]:[4,t.getFileUrl(s,R.uniqueName,T,u.name)]):(i({code:E,msg:A}),[2]);case 3:if(!(I=O.sent()).isOk)return i({code:I.code,msg:"Get download url fail"}),[2];S=I.data.downloadUrl,O.label=4;case 4:return S?(v={downloadUrl:S,uniqueName:(null==R?void 0:R.uniqueName)||"",name:u.name,size:u.size,type:u.type},s!==g.AUDIO?[3,6]:[4,u.arrayBuffer()]):(i({code:f.UPLOAD_FAIL,msg:"Get download url fail"}),[2]);case 5:return h=O.sent(),function(e,t,n){new AudioContext({sampleRate:16e3}).decodeAudioData(t,(function(t){var i,r;e({code:f.SUCCESS,data:_e(_e({},n),{duration:t.duration,length:t.length,sampleRate:null!==(i=t.sampleRate)&&void 0!==i?i:void 0,numberOfChannels:null!==(r=t.numberOfChannels)&&void 0!==r?r:void 0})})}),(function(t){e({code:f.UPLOAD_FAIL,msg:"get audio info fail:".concat(JSON.stringify(t))})}))}(i,h,v),[2];case 6:return s===g.IMAGE?(Ot(i,u,v,c),[2]):(i({code:E,data:v}),[2])}}))}))}))]}))}))}}),Object.defineProperty(e.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,this._promise]}))}))}}),e}(),pt={};function Ut(e,t){var n=new Pt(e,t);return function(e){de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return pt[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete pt[e.id],[2]}}))}))}(n),n}function Ct(e){var t=pt[e];return!!t&&(t.abort(),!0)}var Mt=function(e,t){var n=e.getNaviInfoFromCache();return{getFileToken:e.getFileToken.bind(e),getFileUrl:e.getFileUrl.bind(e),customDomain:t||"",ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer}};function Lt(e){return de(this,void 0,void 0,(function(){var t,n,i;return fe(this,(function(r){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new R("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!g[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===g.IMAGE&&!e.type.match(/^image\//))&&!(n===g.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReadySync((function(t,n,i){var r=Ut(e,Mt(t,i.uploadDomain));return{code:f.SUCCESS,data:r}}))]}))}))}function Dt(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,{code:f.SUCCESS,data:Ct(e)}]}))}))}function Gt(e){return de(this,void 0,void 0,(function(){var t,n,i;return fe(this,(function(r){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new R("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!g[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===g.IMAGE&&!e.type.match(/^image\//))&&!(n===g.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReady((function(t,n,i){return function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,new Pt(e,t).awaitResult()]}))}))}(e,Mt(t,i.uploadDomain))}))]}))}))}function yt(e,t,n,i){return Me((function(r){return new Promise((function(o){r.getFileToken(e,t,n,i).then((function(e){o({code:f.SUCCESS,data:e})})).catch((function(e){o({code:e,msg:ye[e]})}))}))}))}function bt(e){return new R("","").validate("mediaUrl",e,o.STRING,!0).ifReady((function(t){return new Promise((function(n){t.getFileToken(1,void 0,void 0,void 0,e).then((function(e){var t=e.token,i=e.downloadAuthInfo,r=e.deadline;n({code:f.SUCCESS,data:{token:t,downloadAuthInfo:i,deadline:r}})})).catch((function(e){n({code:e,msg:ye[e]})}))}))}))}function wt(e,t,n,i,r){return de(this,void 0,void 0,(function(){return fe(this,(function(a){return(null==i?void 0:i.isBosRes)?[2,l(i)]:[2,new R("","").validate("fileType",e,P,!0).validate("filename",t,o.STRING,!0).validate("saveName",n,o.STRING).validate("serverType",r,o.NUMBER).ifReady((function(i){return i.getFileUrl(e,t,r||v.QINIU,n)}))]}))}))}var Ft=rr,xt=Be("sendMessage",(function(t,n,i){return de(void 0,void 0,void 0,(function(){return fe(this,(function(r){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("message",n,(function(){return n instanceof Xe}),!0).validate("message",n,(function(){if(!U(n.content))return!1;if(!(null==i?void 0:i.isMentioned))return!0;var e=n.content.mentionedInfo||{type:null==i?void 0:i.mentionedType,userIdList:null==i?void 0:i.mentionedUserIdList};if(!U(e))return!1;var t=e.type,r=e.userIdList,o=void 0===r?[]:r,u=e.mentionedContent;return!![C.ALL,C.SINGAL].includes(t)&&(("string"==typeof u||void 0===u)&&(a(o)&&o.every((function(e){return M(e)}))))}),!0).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,M,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("isStatusMessage",null==i?void 0:i.isStatusMessage,o.BOOLEAN).validate("disableNotification",null==i?void 0:i.disableNotification,o.BOOLEAN).validate("pushContent",null==i?void 0:i.pushContent,o.STRING).validate("pushData",null==i?void 0:i.pushData,o.STRING).validate("isMentioned",null==i?void 0:i.isMentioned,o.BOOLEAN).validate("mentionedType",null==i?void 0:i.mentionedType,o.NUMBER).validate("mentionedUserIdList",null==i?void 0:i.mentionedUserIdList,L({itemValidator:M})).validate("directionalUserIdList",null==i?void 0:i.directionalUserIdList,L({maxLength:300,itemValidator:M})).validate("isVoipPush",null==i?void 0:i.isVoipPush,o.BOOLEAN).validate("canIncludeExpansion",null==i?void 0:i.canIncludeExpansion,o.BOOLEAN).validate("expansion",null==i?void 0:i.expansion,o.OBJECT).validate("pushConfig",null==i?void 0:i.pushConfig,o.OBJECT).validate("messageId",null==i?void 0:i.messageId,o.NUMBER).validate("disableUpdateLastMessage",null==i?void 0:i.disableUpdateLastMessage,o.BOOLEAN).ifReady((function(r,o){return de(void 0,void 0,void 0,(function(){var a,u,s,c,_,d,l,R,A,S,T,I,v,h,O,N,g,m,P,p,U,C;return fe(this,(function(M){switch(M.label){case 0:return u=(a=i||{}).disableNotification,s=a.isMentioned,c=a.directionalUserIdList,_=a.canIncludeExpansion,d=a.onSendBefore,l=a.expansion,R=a.pushConfig,A=a.isStatusMessage,S=a.disableUpdateLastMessage,T=o.createTraceId(),I=t.conversationType,v=t.targetId,h=t.channelId,c&&c.length>0&&![3,7,8,10].includes(I)?[2,{code:f.RC_DIRECTIONAL_MESSAGE_INVALID_CONVERSATION_TYPE}]:S&&I===e.ULTRA_GROUP?[2,{code:f.INVALID_DISABLE_UPDATE_LAST_MESSAGE}]:(O=function(e,t,n){var i=e.isStatusMessage,r=e.disableNotification,o=e.pushContent,a=e.pushData,u=e.isMentioned,s=e.mentionedType,c=e.mentionedUserIdList,_=e.directionalUserIdList,d=e.isVoipPush,f=e.canIncludeExpansion,l=e.expansion,E=e.isFilerWhiteBlacklist,R=e.pushConfig,A=e.messageId,S=e.disableUpdateLastMessage,T=e.needReceipt,I=n.channelId;return _e({isStatusMessage:i,disableNotification:r,pushContent:o,pushData:a,isMentioned:u,mentionedType:s,mentionedUserIdList:c,directionalUserIdList:_,isVoipPush:d,canIncludeExpansion:f,expansion:l,isFilerWhiteBlacklist:E,pushConfig:R,channelId:I||"",messageId:A,disableUpdateLastMessage:S,needReceipt:T},t)}(i||{},n,t),N={isMentioned:!!s,content:n.content,messageType:n.messageType,isPersited:!!n.isPersited,isCounted:!!n.isCounted,disableNotification:!!u,canIncludeExpansion:!!_,expansion:l||null,conversationType:t.conversationType,targetId:t.targetId,channelId:t.channelId,senderUserId:r.getCurrentUserId(),messageUId:"",messageDirection:D.SEND,receivedTime:0,isStatusMessage:!!A,receivedStatus:G.UNREAD,isOffLineMessage:!1,pushConfig:R,sentStatus:y.SENDING,sentTime:0,directedUserIds:c||[],disableUpdateLastMessage:S},I!==e.ULTRA_GROUP&&(N.isOffLineMessage=!1),g=function(e){N.messageId=e;try{d&&d(Re(N))}catch(e){o.error(E.A_SEND_MSG_T,'Callback method "onSendBefore" execution error.\n'.concat(null==e?void 0:e.stack),T)}},o.info(E.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:I,targetId:v,channelId:h}),T),[4,r.sendMessage(I,v,O,T,g)]);case 1:return m=M.sent(),P=m.code,p=m.data,U=m.msg,P===f.SUCCESS?(o.info(E.A_SEND_MSG_R,JSON.stringify({code:P,messageUId:p.messageUId,messageId:p.messageId}),T),C=Re(p),[2,{code:P,data:C}]):(o.warn(E.A_SEND_MSG_R,JSON.stringify({code:P}),T),N.sentTime=(null==p?void 0:p.sentTime)||0,N.sentStatus=null==p?void 0:p.sentStatus,[2,{code:P,msg:U||ye[P],data:Re(N)}])}}))}))}))]}))}))}));function Bt(e,t,n){var i=new _t(t);return xt(e,i,n)}function Vt(e,t){return function(n,i,r,a){var u;if(!p("sendOptions.contentDisposition",null==a?void 0:a.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return Promise.resolve({code:f.INVALID_PARAMETER_SENDOPTIONS});var s={contentDisposition:null==a?void 0:a.contentDisposition};if(a&&"thumbnailConfig"in a){var c=null===(u=a)||void 0===u?void 0:u.thumbnailConfig;if(!(p("sendOptions.maxHeight",null==c?void 0:c.maxHeight,o.NUMBER)&&p("sendOptions.maxWidth",null==c?void 0:c.maxWidth,o.NUMBER)&&p("sendOptions.quality",null==c?void 0:c.quality,o.NUMBER)&&p("sendOptions.scale",null==c?void 0:c.scale,o.NUMBER)))return Promise.resolve({code:f.INVALID_PARAMETER_SENDOPTIONS});s.thumbnailConfig=c}return Me((function(o,u,c){return new Promise((function(o){var c=u.createTraceId();u.info(E.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:e}),c),Gt({file:i.file,fileType:e,onProgress:function(e,t){var n;null===(n=null==r?void 0:r.onProgress)||void 0===n||n.call(r,Math.floor(e/t*100))},contentDisposition:s.contentDisposition,thumbnailConfig:s.thumbnailConfig}).then((function(e){var s,_=e.code,d=e.data,l=e.msg;if(_===f.SUCCESS&&d){var R=(null===(s=null==r?void 0:r.onComplete)||void 0===s?void 0:s.call(r,_e({url:d.downloadUrl},d)))||t(d,i);return u.info(E.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:d.downloadUrl,code:f.SUCCESS}),c),void xt(n,R,a).then(o)}o({code:_,msg:l})}))}))}))}}var Ht=Vt(g.FILE,(function(e,t){var n,i,r={name:e.name,size:t.file.size,type:(n=e.name,i=n.match(/\.(\w+)$/),i?i[1]:"bin"),fileUrl:e.downloadUrl};return t.user&&(r.user=t.user),t.extra&&(r.extra=t.extra),t.mentionedInfo&&(r.mentionedInfo=t.mentionedInfo),new tt(r)})),Yt=Vt(g.IMAGE,(function(e,t){var n={content:e.thumbnail,imageUri:e.downloadUrl,thumWidth:e.width,thumHeight:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new rt(n)})),Jt=Vt(g.IMAGE,(function(e,t){var n={gifDataSize:e.size,remoteUrl:e.downloadUrl,width:e.width,height:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new nt(n)})),kt=Vt(g.AUDIO,(function(e,t){var n,i={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(i.user=t.user),t.extra&&(i.extra=t.extra),t.mentionedInfo&&(i.mentionedInfo=t.mentionedInfo),t.audit&&(i.audit=t.audit),new dt(i)})),Kt=Vt(g.SIGHT,(function(e,t){var n={sightUrl:e.downloadUrl,content:t.thumbnail,duration:t.duration,size:t.file.size||e.size,name:t.name||e.name};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new ct(n)}));function jt(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getHistoryMessage(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Wt(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getRemoteHistoryMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Qt(t,n,i,r){return de(this,void 0,void 0,(function(){var a=this;return fe(this,(function(u){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("targetId",t,o.STRING,!0).validate("messageUId",n,o.STRING,!0).validate("timestamp",i,(function(e){return b(e)&&e>0}),!0).validate("channelId",r,o.CHANNEL_ID).ifReady((function(o){return de(a,void 0,void 0,(function(){var o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return o={targetId:t,conversationType:e.PRIVATE,channelId:r},a=new Xe("RC:ReadNtf",{messageUId:n,lastMessageSendTime:i,type:1}),[4,xt(o,a)];case 1:return u=_.sent(),s=u.code,c=u.msg,0===s?[2,{code:s}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}function Xt(t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(a){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("targetId",t,o.STRING,!0).validate("messageUId",n,o.STRING,!0).validate("channelId",i,o.CHANNEL_ID).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,o,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r="messageUId:".concat(n,",targetId:").concat(t),a.debug(E.A_SEND_MSG_T,"send read receipt message ->".concat(r)),o=new Xe("RC:RRReqMsg",{messageUId:n}),u={targetId:t,conversationType:e.GROUP,channelId:i},[4,xt(u,o)];case 1:return s=d.sent(),c=s.code,_=s.msg,0===c?[2,{code:c}]:[2,{code:c,msg:_}]}}))}))}))]}))}))}function zt(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))}function qt(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.sendReadReceipt(e,t,n)}))]}))}))}function Zt(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_SYNC_READ_STATUS_T,E.A_SYNC_READ_STATUS_R).validate("timestamp",n,o.NUMBER,!0).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return[e.GROUP,e.PRIVATE,e.APP_PUBLIC_SERVICE,e.PUBLIC_SERVICE,e.SYSTEM].includes(t)}),!0).validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", timestamp:").concat(n),o=r.createTraceId(),r.info(E.A_SYNC_READ_STATUS_T,i,o),1!==(null==(a=e.getNaviInfoFromCache())?void 0:a.sesDriven)?[3,2]:[4,e.updateConversationReadTime(t,n)];case 1:return u=d.sent(),[3,4];case 2:return s=new Xe(A.SYNC_READ_STATUS,{lastMessageSendTime:n}),[4,xt(t,s)];case 3:u=d.sent(),d.label=4;case 4:return c=u.code,_=u.msg,r[c===f.SUCCESS?"info":"warn"](E.A_SYNC_READ_STATUS_R,"code: ".concat(c,", msg: ").concat(_),o),[2,{code:c,msg:_}]}}))}))}))]}))}))}function $t(t,n,i){return void 0===i&&(i=""),de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(a){return[2,new R(E.A_SEND_MESSAGE_READ_RECEIPT_V4_T,E.A_SEND_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP||t===e.PRIVATE}),!0,"It should be ConversationType.GROUP or ConversationType.PRIVATE").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("startMsgUId",i,o.ONLY_STRING,!0).validate("endMsgUId",n,o.STRING,!0).ifReady((function(e,o){return de(r,void 0,void 0,(function(){var r,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r=o.createTraceId(),a="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", startMsgUId:").concat(i,", endMsgUId: ").concat(n),o.info(E.A_SEND_MESSAGE_READ_RECEIPT_V4_T,a,r),3!==(null==(u=e.getNaviInfoFromCache())?void 0:u.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.sendReadReceiptMessageV4(t,i,n)];case 1:return s=d.sent(),c=s.code,_=s.msg,o[c===f.SUCCESS?"info":"warn"](E.A_SEND_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(c,", msg: ").concat(_),r),[2,{code:c,msg:_}]}}))}))}))]}))}))}function en(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_GET_MESSAGE_READ_RECEIPT_V4_T,E.A_GET_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("messageUId",n,o.STRING,!0).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n),o=r.createTraceId(),r.info(E.A_GET_MESSAGE_READ_RECEIPT_V4_T,i,o),3!==(null==(a=e.getNaviInfoFromCache())?void 0:a.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.getMessageReadReceiptV4(t,n)];case 1:return u=d.sent(),s=u.code,c=u.msg,_=u.data,r[s===f.SUCCESS?"info":"warn"](E.A_GET_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(s,", msg: ").concat(c),o),s===f.SUCCESS&&_?[2,{code:s,data:_}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}function tn(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("messageUId",n,(function(e){return!!p("messageUIds",e,o.ARRAY,!0)&&!e.some((function(e){return!w(e)}))}),!0).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n.toString()),o=r.createTraceId(),r.info(E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,i,o),3!==(null==(a=e.getNaviInfoFromCache())?void 0:a.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.batchGetMessageReadReceiptInfoV4(t,n)];case 1:return u=d.sent(),s=u.code,c=u.msg,_=u.data,r[s===f.SUCCESS?"info":"warn"](E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R,"code: ".concat(s,", msg: ").concat(c),o),s===f.SUCCESS?[2,{code:s,data:_}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}Vt(g.COMBINE_HTML,(function(e,t){var n={remoteUrl:e.downloadUrl,nameList:t.nameList,summaryList:t.summaryList,conversationType:t.conversationType};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new Ze(n)}));var nn=Be("recallMessage",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return de(void 0,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,n.recallMessage(e,t)];case 1:return[2,i.sent().trans((function(e){return Re(e)}))]}}))}))}))]}))}))}));function rn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.deleteRemoteMessage(e,t)}))]}))}))}function on(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.deleteRemoteMessageByTimestamp(e,t)}))]}))}))}function an(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchClearRemoteHistoryMessages(e,t)}))]}))}))}function un(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.updateMessageExpansion(e,t)}))]}))}))}function sn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeMessageExpansion(e,t)}))]}))}))}function cn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("conversation",e,o.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,o.STRING,!0).validate("channelId",null==e?void 0:e.channelId,o.CHANNEL_ID).validate("messageType",t,o.STRING,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return n={messageType:"RC:TypSts",content:{typingContentType:t},isStatusMessage:!0,channelId:e.channelId},o=r.createTraceId(),r.info(E.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),o),[4,i.sendMessage(e.conversationType,e.targetId,n,o)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",r[c](E.A_SEND_MSG_R,JSON.stringify({code:u,messageUId:s?s.messageUId:"",messageId:s?s.messageId:""}),o),u===f.SUCCESS?[2,{code:u,data:Re(s)}]:[2,{code:u,msg:ye[u]}]}}))}))}))]}))}))}function _n(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_MESSAGE_READER_T,he.A_GET_MESSAGE_READER_R).validate("messageUId",t,o.STRING,!0).validate("targetId",e,o.STRING,!0).validate("channelId",n,o.CHANNEL_ID).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_MESSAGE_READER_T,JSON.stringify({targetId:e,messageUId:t,channelId:n}),i),[4,r.getMessageReader(e,t,n)];case 1:return a=c.sent(),u=a.code,s=a.data,u===f.SUCCESS?(o.info(he.A_GET_MESSAGE_READER_R,JSON.stringify({code:u,totalMemberCount:null==s?void 0:s.totalMemberCount}),i),[2,{code:u,data:s}]):(o.warn(he.A_GET_MESSAGE_READER_R,JSON.stringify({code:u})),[2,{code:u,msg:ye[u]}])}}))}))}))]}))}))}function dn(e,t,n,i,a){return Ce((function(u,s){return r("messageType",e,o.STRING,!0),r("isPersited",t,o.BOOLEAN,!0),r("isCounted",n,o.BOOLEAN,!0),r("isStatusMessage",a,o.BOOLEAN,!1),r("searchProps",i,o.ARRAY),s.info(E.A_REGTYP_O,JSON.stringify({messageType:e,isCounted:n,isStatusMessage:a,isPersited:t})),u.registerMessageType(e,t,n,i,a),function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),function(i){return new Xe(e,i,t,n)}}(e,t,n)}))}function fn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getFirstUnreadMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return e?Re(e):null}))]}}))}))}function ln(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getFirstUnreadMessageDigest(e)}))]}))}))}function En(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){return fe(this,(function(i){return Se("insertMessage","electronExtension.insertMessage"),[2,tr(e,t,n)]}))}))}function Rn(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")}function An(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){return Se("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,qi(e,t,n,i)]}))}))}function Sn(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return Se("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,er(e,t,n)]}))}))}function Tn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,$i(e)]}))}))}function In(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){return Se("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Xi(e,null!=n?n:[A.TEXT,A.FILE],i,t)]}))}))}function vn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R).validate("conversation",e,o.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,o.STRING,!0).validate("channelId",null==e?void 0:e.channelId,o.CHANNEL_ID).validate("timestamp",t,o.NUMBER).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return n=e.conversationType,o=e.targetId,a=e.channelId,u=void 0===a?"":a,s=r.createTraceId(),r.info(he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,JSON.stringify({conversationType:n,targetId:o,channelId:u,timestamp:t}),s),[4,i.clearUnreadCountByTimestamp(n,o,t,u)];case 1:return c=d.sent(),_=c===f.SUCCESS?"info":"warn",r[_](he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R,JSON.stringify({code:c}),s),c===f.SUCCESS?[2,{code:c}]:[2,{code:c,msg:ye[c]}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))}function hn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Zi(e,t)]}))}))}function On(e){return Le().next((function(t){return t.sse.requestStreamMessageContent(e)}))}function Nn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.sendReadReceiptResponseV5(e,t)]}))}))}))]}))}))}function gn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getMessageReadReceiptInfoV5(e,t)]}))}))}))]}))}))}function mn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getMessageReadReceiptInfoV5ByIdentifiers(e)]}))}))}))]}))}))}function Pn(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){return[2,r.getMessagesReadReceiptUsersByPageV5(e,t,n)]}))}))}))]}))}))}function pn(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){return[2,r.getMessagesReadReceiptByUsersV5(e,t,n)]}))}))}))]}))}))}function Un(e,t){return Le().next((function(n){return n.requestSpeechToTextForMessage(e,t)}))}function Cn(e){return Le().next((function(t){return t.translateMessagesWithParams(e)}))}function Mn(e){return Le().next((function(t){return t.translateTextsWithParams(e)}))}function Ln(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("modifyMessage","modifyMessageWithParams"),[2,Dn({messageUId:null==t?void 0:t.messageUId,messageContent:e,conversation:{conversationType:null==t?void 0:t.conversationType,targetId:null==t?void 0:t.targetId,channelId:null==t?void 0:t.channelId}})]}))}))}function Dn(e){return Le().next((function(t){return t.modifyMessageWithParams(e)}))}function Gn(e){return Le().next((function(t){var n=function(e){return e.map((function(e){return{messageUId:e.messageUId,message:e.message?Re(e.message):void 0,code:e.code}}))};return t.refreshReferenceMessageWithParams(_e(_e({},e),{remoteMessageBlock:function(t){e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:function(t){e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))}function yn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){switch(i.label){case 0:return Se("getConversationList","getConversationListByTimestamp"),[4,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getConversationList({count:(null==e?void 0:e.count)||300,startTime:(null==e?void 0:e.startTime)||0,order:null==e?void 0:e.order,channelId:t})]}))}))}))];case 1:return[2,i.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function bn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getAllConversationList(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function wn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getConversationListByTimestamp(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function Fn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,n.getConversation(e)];case 1:return[2,t.sent().trans((function(e){return Ae(e)}))]}}))}))}))]}))}))}var xn=Be("removeConversation",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeConversation(e,t)}))]}))}))}));function Bn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("batchRemoveConversation","batchDeleteConversations"),[2,Vn({identifiers:e,deleteRemotely:!1,deleteMessages:!1})]}))}))}function Vn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchDeleteConversations(e)}))]}))}))}function Hn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getTextMessageDraft(e)}))]}))}))}function Yn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.saveTextMessageDraft(e,t)}))]}))}))}function Jn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearTextMessageDraft(e)}))]}))}))}function kn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCount(t,e)}))]}))}))}function Kn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCountByLevels(e,t)}))]}))}))}function jn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCountByLevels(e,t,!0)}))]}))}))}function Wn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUnreadCount(e)}))]}))}))}var Qn=Be("clearMessagesUnreadStatus",(function(e){return de(void 0,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearUnreadCount(e)}))]}))}))}));function Xn(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.clearAllUnreadCount()}))]}))}))}var zn=Be("setConversationNotificationLevel",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationNotificationLevel([e],t)}))]}))}))}));function qn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationNotificationLevel(e,t)}))]}))}))}function Zn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationTranslateStrategy(e,t)}))]}))}))}function $n(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){var n;return fe(this,(function(r){return t!==x.CLOSE&&t!==x.OPEN?[2,d(f.INVALID_PARAMETER_NOTIFICATION_LEVEL)]:(n=B(t),[2,i.batchSetConversationNotificationLevel([e],n)])}))}))}))]}))}))}function ei(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getConversationNotificationLevel(e)}))]}))}))}function ti(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,n.getConversationNotificationLevel(e)];case 1:return[2,t.sent().trans((function(e){return V(e)}))]}}))}))}))]}))}))}function ni(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return[4,Le().next((function(e){return e.getBlockedConversationList()}))];case 1:return[2,e.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function ii(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setConversationTypeNotificationLevel(e,t)}))]}))}))}function ri(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getConversationTypeNotificationLevel(e)}))]}))}))}var oi=Be("setConversationToTop",(function(e,t,n,i){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===i&&(i=!1),de(void 0,void 0,void 0,(function(){return fe(this,(function(r){return[2,Le().next((function(r){return r.batchSetConversationToTop([e],!!t,n,i)}))]}))}))}));function ai(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),de(this,void 0,void 0,(function(){return fe(this,(function(r){return[2,Le().next((function(r){return r.batchSetConversationToTop(e,!!t,i,n)}))]}))}))}function ui(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getTopConversationList(e,t)}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function si(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function ci(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUnreadMentionedCount(e)}))]}))}))}function _i(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getAllUnreadMentionedCount()}))]}))}))}function di(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){var n,i,r;return t.getRealtimeConversations(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:30,null!==(i=null==e?void 0:e.startTime)&&void 0!==i?i:0,null!==(r=null==e?void 0:e.order)&&void 0!==r?r:0)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function fi(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getRealtimeConTotalUnreadCount()}))]}))}))}function li(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearRealtimeConUnreadCount(e)}))]}))}))}function Ei(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeRealtimeConversations(e)}))]}))}))}function Ri(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchGetRealtimeConUnreadCount(e)}))]}))}))}function Ai(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadMentionMeConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function Si(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUltraGroupList(e)}))]}))}))}function Ti(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return[4,Le().next((function(e){return e.getBlockedUGList()}))];case 1:return[2,e.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}function Ii(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.sendUltraGroupTypingStatus(e)}))]}))}))}function vi(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){switch(i.label){case 0:return[4,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getUltraGroupMessageListByMessageUId(e,t)]}))}))}))];case 1:return[2,i.sent().trans((function(e){var t={};for(var n in e)t[n]=e[n]?Re(e[n]):void 0;return t}))]}}))}))}function hi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,un(e,t)]}))}))}function Oi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,sn(e,t)]}))}))}function Ni(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeAllMessageExpansion(e)}))]}))}))}function gi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUGUnreadCountForAllChannels(e,!0,t)}))]}))}))}function mi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))]}))}))}function Pi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))]}))}))}function pi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUGUnreadCountForAllChannels(e,!1,t)}))]}))}))}function Ui(){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,Kn([e.ULTRA_GROUP],[])]}))}))}function Ci(){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,jn([e.ULTRA_GROUP],[])]}))}))}function Mi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGUnreadMentionedDigest(e)}))]}))}))}function Li(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGFirstUnreadMessageDigest(e)}))]}))}))}function Di(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGUnreadInfoList(e)}))]}))}))}function Gi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_ADD_TO_BLACKLIST_T,he.A_ADD_TO_BLACKLIST_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_ADD_TO_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.addToBlacklist(e)];case 1:return r=a.sent(),o=r===f.SUCCESS?"info":"warn",i[o](he.A_ADD_TO_BLACKLIST_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function yi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_REMOVE_FROM_BLACKLIST_T,he.A_REMOVE_FROM_BLACKLIST_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_REMOVE_FROM_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.removeFromBlacklist(e)];case 1:return r=a.sent(),o=r===f.SUCCESS?"info":"warn",i[o](he.A_REMOVE_FROM_BLACKLIST_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function bi(){return de(this,void 0,void 0,(function(){var e=this;return fe(this,(function(t){return[2,new R(he.A_GET_BLACKLIST_T,he.A_GET_BLACKLIST_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o;return fe(this,(function(a){switch(a.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_BLACKLIST_T,"getBlacklist -> ",e),[4,t.getBlacklist()];case 1:return i=a.sent(),r=i.code,o=i.data,r===f.SUCCESS&&o?(n.info(he.A_GET_BLACKLIST_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]):(n.warn(he.A_GET_BLACKLIST_R,JSON.stringify({code:r}),e),[2,{code:r}])}}))}))}))]}))}))}function wi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_BLACKLIST_STATUS_T,he.A_GET_BLACKLIST_STATUS_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_BLACKLIST_STATUS_T,JSON.stringify({userId:e}),t),[4,n.getBlacklistStatus(e)];case 1:return r=u.sent(),o=r.code,a=r.data,o===f.SUCCESS?(i.info(he.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:o,data:0===a}),t),[2,{code:o,data:0===a}]):(i.warn(he.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:o}),t),[2,{code:o}])}}))}))}))]}))}))}function Fi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.createTag(e)}))]}))}))}function xi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeTag(e)}))]}))}))}function Bi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.updateTag(e)}))]}))}))}function Vi(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getTagList()}))]}))}))}function Hi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getTagsForConversation(e)}))]}))}))}function Yi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.addTagForConversations(e,t)}))]}))}))}function Ji(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))}function ki(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagsForConversation(e,t)}))]}))}))}function Ki(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))}function ji(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,Le().next((function(i){return i.getConversationListByTag(e,n,t)}))];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return _e(_e({},Ae(t=e)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))}function Wi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUnreadCountByTag(e,t)}))]}))}))}function Qi(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.setConversationStatusInTag(e,t,{isTop:n})}))]}))}))}function Xi(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,Le().next((function(o){return de(r,void 0,void 0,(function(){return fe(this,(function(r){switch(r.label){case 0:return[4,o.searchConversationByContent(e,t,n,i)];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}))]}))}))}function zi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.searchMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.totalMatched,n=e.messages;return e.conditionsMatched,{count:t,messages:n.map((function(e){return Re(e)}))}}))]}}))}))}function qi(e,t,n,i,r){return de(this,void 0,void 0,(function(){return fe(this,(function(o){return Se("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),[2,zi(e,{keyword:t,limit:i||J,order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{objectNames:r}})]}))}))}function Zi(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return console.warn("`setMessageReceivedStatus` has being deprecated, use `setMessageReceivedStatusInfo` instead."),F()?[2,new R(he.A_E_SET_MESSAGE_RECEIVED_STATUS_T,he.A_E_SET_MESSAGE_RECEIVED_STATUS_R).validate("messageId",e,o.NUMBER,!0).validate("receivedStatus",t,(function(e){return!H(G[e])}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o;return fe(this,(function(a){switch(a.label){case 0:return n=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_RECEIVED_STATUS_T,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return o=a.sent(),r.info(he.A_E_SET_MESSAGE_RECEIVED_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))}function $i(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearLocalMessages(e)}))]}))}))}function er(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.deleteLocalMessagesByTimestamp(e,t,n)}))]}))}))}function tr(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){return fe(this,(function(i){return t instanceof Xe?[2,ir(e,t,n)]:[2,nr(e,t,n)]}))}))}function nr(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){var i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return i=!!(null==n?void 0:n.isUnread),r=null==n?void 0:n.searchContent,o=null==n?void 0:n.disableUpdateLastMessage,a={senderUserId:null==t?void 0:t.senderUserId,messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,messageDirection:null==t?void 0:t.messageDirection,readStatus:"object"==typeof(null==t?void 0:t.receivedStatusInfo)?Y(t.receivedStatusInfo):null==t?void 0:t.receivedStatus,sentTime:null==t?void 0:t.sentTime,sentStatus:null==t?void 0:t.sentStatus,searchContent:r,messageUId:"",isUnread:i,disableNotification:null==t?void 0:t.disableNotification,canIncludeExpansion:null==t?void 0:t.canIncludeExpansion,expansion:(null==t?void 0:t.expansion)||void 0,directedUserIds:null==t?void 0:t.directedUserIds,disableUpdateLastMessage:(null==t?void 0:t.disableUpdateLastMessage)||o},[4,Le().next((function(t){return t.insertMessage(e,a)}))];case 1:return[2,u.sent().trans(Re)]}}))}))}function ir(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){var i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return i=!!(null==n?void 0:n.isUnread),r=null==n?void 0:n.searchContent,o=null==n?void 0:n.disableUpdateLastMessage,a={senderUserId:"",messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,searchContent:r,messageDirection:D.SEND,isUnread:i,messageUId:"",disableUpdateLastMessage:o},[4,Le().next((function(t){return t.insertMessage(e,a)}))];case 1:return[2,u.sent().trans(Re)]}}))}))}function rr(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getLocalMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return Re(e)}))]}}))}))}var or=Object.freeze({__proto__:null,getAllConversationList:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("electronExtension.getAllConversationList","getAllConversationList"),[2,bn(e)]}))}))},getConversationList:function(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){switch(o.label){case 0:return Se("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,Le().next((function(o){return de(r,void 0,void 0,(function(){return fe(this,(function(r){return[2,o.getConversationList({startTime:e,count:t,channelId:n,topPriority:i})]}))}))}))];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))},searchConversationByContent:Xi,getConversations:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getConversations(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))},getUntaggedConversationListByPage:function(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,r.getUntaggedConversationListByPage(e,t,n)];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chat.saveEditedMessageDraft(e,t)}))]}))}))},getEditedMessageDraft:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chat.getEditedMessageDraft(e)}))]}))}))},clearEditedMessageDraft:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chat.clearEditedMessageDraft(e)}))]}))}))},searchMessages:qi,searchMessageInTimeRange:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),[2,zi(e,{keyword:null==t?void 0:t.keyword,limit:(null==t?void 0:t.limit)||5,offset:null==t?void 0:t.offset,order:0,timeRange:{startTime:null==t?void 0:t.startTime,endTime:null==t?void 0:t.endTime}})]}))}))},searchMessagesByUser:function(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){switch(r.label){case 0:return Se("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams"),[4,zi(e,{limit:i,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})];case 1:return[2,r.sent().trans((function(e){return{messages:e.messages}}))]}}))}))},getHistoryMessagesByMessageTypes:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getHistoryMessagesByObjectNames(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,i=t.map(Re);return{messages:i,hasMore:n,list:i}}))]}}))}))},getContinuousMessages:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getContinuousMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,i=e.timestamp;return{hasMore:n,list:t.map(Re),timestamp:i}}))]}}))}))},setMessageStatusToRead:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setMessageStatusToRead(e,t)}))]}))}))},setMessageReceivedStatus:Zi,setMessageReceivedStatusInfo:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,he.A_E_SET_MESSAGE_SENT_STATUS_INFO_R).validate("messageId",e,o.NUMBER,!0).validate("receivedStatusInfo",t,o.OBJECT,!0).validate("receivedStatusInfo",null==t?void 0:t.isRead,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isListened,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isDownload,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isRetrieved,o.BOOLEAN).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=Y(t),o=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,JSON.stringify({messageId:e,sentStatus:n}),o),[4,i.setMessageReceivedStatus(e,n)];case 1:return a=u.sent(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_R,JSON.stringify({code:a}),o),[2,{code:a}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setMessageSentStatus:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_E_SET_MESSAGE_SENT_STATUS_T,he.A_E_SET_MESSAGE_SENT_STATUS_T).validate("messageId",e,o.NUMBER,!0).validate("sentStatus",t,(function(e){return b(e)&&!H(y[e])}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o;return fe(this,(function(a){switch(a.label){case 0:return n=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_T,JSON.stringify({messageId:e,sentStatus:t}),n),[4,i.setMessageSentStatus(e,t)];case 1:return o=a.sent(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setMessageContent:function(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.setMessageContent(e,t,n)}))]}))}))},deleteMessages:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.deleteLocalMessages(e)}))]}))}))},clearMessages:$i,deleteMessagesByTimestamp:er,batchClearMessagesByTimestamp:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchClearLocalMessagesByTimestamp(e)}))]}))}))},insertMessage:tr,batchInsertMessage:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchInsertMessage(e,t)}))]}))}))},getMessageCount:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getLocalMessageCount(e)}))]}))}))},setCheckDuplicateMessage:function(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return F()?[2,new R(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,he.A_E_SET_CHECK_DUPLICATE_MESSAGE_R).validate("checkDuplicate",e,o.BOOLEAN).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckDuplicateMessage(!!e)];case 1:return r=u.sent(),o=r.code,a=r.data,i.info(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_R,JSON.stringify({code:o,data:a}),t),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setCheckChatRoomDuplicateMessage:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!e)}))]}))}))},getMessagesAroundTimestamp:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){var i=null==t?void 0:t.timestamp,r=null==t?void 0:t.beforeCount,o=null==t?void 0:t.afterCount;return n.getMessagesAroundTimestamp(e,i,r,o)}))];case 1:return[2,n.sent().trans((function(e){return e.map(Re)}))]}}))}))},getLocalMessage:rr,searchMessagesWithParams:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.searchMessagesWithParams(e)}))];case 1:return[2,t.sent().trans((function(e){e.totalMatched;var t=e.messages;return{count:e.conditionsMatched,messages:t.map((function(e){return Re(e)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(e,t){return Le().next((function(n){return n.setMessageSpeechToTextVisible(e,t)}))},deleteUltraGroupMessagesForAllChannel:function(e,t){return Le().next((function(n){return n.deleteLocalUGMessagesForAllChannel(e,t)}))},getUnreadMentionedMessages:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadMentionedMessages(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Re)}))]}}))}))},clearLocalData:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.clearLocalData()}))]}))}))},enable:function(){return F()}});function ar(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_SET_PROXY_T,he.A_SET_PROXY_R).validate("set.proxy",e,(function(t){return!!(!e||p("proxy.socksHost",e.socksHost,o.STRING,!0)&&p("proxy.socksPort",e.socksPort,o.NUMBER,!0))})).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_SET_PROXY_T,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),t),[4,n.setProxy(e)];case 1:return r=a.sent().code,o=r===f.SUCCESS?"info":"warn",i[o](he.A_SET_PROXY_R,JSON.stringify({code:r}),t),r===f.SUCCESS?[2,{code:r}]:[2,{code:r,msg:ye[r]}]}}))}))}))]}))}))}function ur(){return de(this,void 0,void 0,(function(){var e=this;return fe(this,(function(t){return[2,new R(he.A_GET_PROXY_T,he.A_GET_PROXY_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o;return fe(this,(function(a){switch(a.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_PROXY_T,"",e),[4,t.getProxy()];case 1:return i=a.sent(),r=i.code,o=i.data,r===f.SUCCESS?(n.info(he.A_GET_PROXY_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]):(n.warn(he.A_GET_PROXY_R,JSON.stringify({code:r}),e),[2,{code:r,msg:ye[r]}])}}))}))}))]}))}))}function sr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_TEST_PROXY_T,he.A_TEST_PROXY_R).validate("test.proxy",e,o.OBJECT,!0).validate("test.proxy.socksHost",null==e?void 0:e.socksHost,o.STRING,!0).validate("test.proxy.socksPort",null==e?void 0:e.socksPort,o.NUMBER,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return n=r.createTraceId(),r.info(he.A_TEST_PROXY_T,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),n),[4,i.testProxy(e,t)];case 1:return o=s.sent(),a=o.status,u=o.data,a===f.SUCCESS?[2,{code:a,msg:u}]:(r.warn(he.A_TEST_PROXY_R,JSON.stringify({status:a}),n),[2,{code:a,msg:ye[a]}])}}))}))}))]}))}))}function cr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_SUBSCRIBE_USER_STATUS_T,he.A_SUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,L({maxLength:200,minLength:1,itemValidator:M}),!0).validate("subscribeType",t,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).validate("expiry",n,W({min:60,max:2592e3}),!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_SUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t,expiry:n}),i),[4,r.subscribeUser(e,t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_SUBSCRIBE_USER_STATUS_R,JSON.stringify({code:u,data:s}),i),[2,{code:u,data:s}]}}))}))}))]}))}))}function _r(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_UNSUBSCRIBE_USER_STATUS_T,he.A_UNSUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,L({maxLength:200,minLength:1,itemValidator:M}),!0).validate("subscribeType",t,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_UNSUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t}),n),[4,i.unSubscribeUser(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_UNSUBSCRIBE_USER_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function dr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,he.A_GET_SUBSCRIBE_USER_STATUS_LIST_R).validate("subscribeType",e,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).validate("subscribePageSize",t,W({min:1,max:200}),!0).validate("offset",n,W({min:0}),!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,JSON.stringify({pageSize:t,offset:n}),i),[4,r.getSubscribeUserList(e,t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_SUBSCRIBE_USER_STATUS_LIST_R,JSON.stringify({code:u,data:s}),i),u===f.SUCCESS?[2,{code:u,data:s}]:[2,{code:u}]}}))}))}))]}))}))}function fr(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getSubscribeUserStatus(e,t)}))]}))}))}function lr(e){var t=this;return new R(he.A_UPDATE_MY_USER_PROFILE_T,he.A_UPDATE_MY_USER_PROFILE_R).validate("profile",e,o.OBJECT,!0).validate("profile",e.name,o.ONLY_STRING).validate("profile",e.portraitUri,o.ONLY_STRING).validate("profile",e.email,o.ONLY_STRING).validate("profile",e.birthday,o.ONLY_STRING).validate("profile",e.gender,o.NUMBER).validate("profile",e.location,o.ONLY_STRING).validate("profile",e.role,o.NUMBER).validate("profile",e.level,o.NUMBER).validate("profile",e.extraProfile,o.OBJECT).validate("profile",e.extraProfile,(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"string"!=typeof e[t])return!1;return!0})).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_MY_USER_PROFILE_T,JSON.stringify({profile:e}),t),r=e.extraProfile,o={},["name","portraitUri","email","birthday","gender","location","role","level"].forEach((function(t){H(e[t])||(o[t]=e[t])})),H(r)||(o.extraProfile=_e({},r)),[4,n.updateMyUserProfile(o)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",i[c](he.A_UPDATE_MY_USER_PROFILE_R,JSON.stringify({code:u,data:s}),t),[2,{code:u,data:s}]}}))}))}))}function Er(e){return Le().next((function(t){return t.getUserProfiles(e)}))}function Rr(){var e=this;return new R(he.A_GET_MY_USER_PROFILE_T,he.A_GET_MY_USER_PROFILE_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_MY_USER_PROFILE_T,"",e),[4,t.getMyUserProfile()];case 1:return i=u.sent(),r=i.code,o=i.data,a=r===f.SUCCESS?"info":"warn",n[a](he.A_GET_MY_USER_PROFILE_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]}}))}))}))}function Ar(e){var t=this;return new R(he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R).validate("userProfileVisibility",e,(function(e){return k({value:e,type:K})}),!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,e,t),[4,n.updateMyUserProfileVisibility(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:o,data:a}),t),[2,{code:o,data:a}]}}))}))}))}function Sr(){var e=this;return new R(he.A_GET_MY_USER_PROFILE_VISIBILITY_T,he.A_GET_MY_USER_PROFILE_VISIBILITY_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_MY_USER_PROFILE_VISIBILITY_T,"",e),[4,t.getMyUserProfileVisibility()];case 1:return i=u.sent(),r=i.code,o=i.data,a=r===f.SUCCESS?"info":"warn",n[a](he.A_GET_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]}}))}))}))}function Tr(e){var t=this;return new R(he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R).validate("uniqueId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,e,t),[4,n.searchUserProfileByUniqueId(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R,JSON.stringify({code:o,data:a}),t),[2,{code:o,data:a}]}}))}))}))}function Ir(e){return Le().next((function(t){return t.getSubscribeUsersOnlineStatus(e)}))}var vr=function(e){var t=e.count,n=e.pageToken,i=void 0===n?"":n,r=e.order;return{count:t,pageToken:i,order:void 0!==r&&r}};function hr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_CREATE_GROUP_T,he.A_CREATE_GROUP_R).validateParameters("groupId",e.groupId,Q,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",e.groupName,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("groupInfo.portraitUri",null==e?void 0:e.portraitUri,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==e?void 0:e.introduction,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==e?void 0:e.notice,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,o.OBJECT,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==e?void 0:e.joinPermission,(function(e){return k({value:e,type:z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==e?void 0:e.removeMemberPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==e?void 0:e.invitePermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==e?void 0:e.inviteHandlePermission,(function(e){return k({value:e,type:Z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==e?void 0:e.groupInfoEditPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==e?void 0:e.memberInfoEditPermission,(function(e){return k({value:e,type:$})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("inviteeUserIds",t,L({minLength:0,maxLength:30,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c,_,d,l,E,R;return fe(this,(function(A){switch(A.label){case 0:return n=r.createTraceId(),r.info(he.A_CREATE_GROUP_T,JSON.stringify({groupInfo:e,inviteeUserIds:t}),n),o=e.groupId,a=e.extProfile,u={},s=Object.keys(Ie),Object.keys(e).forEach((function(t){s.includes(t)&&(u[Ie[t]]=e[t])})),[4,i.createGroup(o,u,a,t)];case 1:return c=A.sent(),_=c.code,d=c.msg,l=void 0===d?"":d,E=c.data,R=_===f.SUCCESS?"info":"warn",r[R](he.A_CREATE_GROUP_R,JSON.stringify({code:_}),n),_!==f.SUCCESS?[2,{code:_,msg:l,data:E}]:[2,{code:_,data:E}]}}))}))}))]}))}))}function Or(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_UPDATE_GROUP_INFO_T,he.A_UPDATE_GROUP_INFO_R).validateParameters("groupId",e.groupId,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",e.groupName,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME).validateParameters("groupInfo.portraitUri",null==e?void 0:e.portraitUri,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==e?void 0:e.introduction,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==e?void 0:e.notice,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,o.OBJECT,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==e?void 0:e.joinPermission,(function(e){return k({value:e,type:z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==e?void 0:e.removeMemberPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==e?void 0:e.invitePermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==e?void 0:e.inviteHandlePermission,(function(e){return k({value:e,type:Z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==e?void 0:e.groupInfoEditPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==e?void 0:e.memberInfoEditPermission,(function(e){return k({value:e,type:$})}),f.INVALID_PARAMETER_GROUP_INFO).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u,s,c,_,d,l,E;return fe(this,(function(R){switch(R.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_GROUP_INFO_T,JSON.stringify({groupInfo:e}),t),r=e.groupId,o=e.extProfile,a={},u=Object.keys(Ie),Object.keys(e).forEach((function(t){u.includes(t)&&(a[Ie[t]]=e[t])})),[4,n.updateGroupInfo(r,a,o)];case 1:return s=R.sent(),c=s.code,_=s.msg,d=void 0===_?"":_,l=s.data,E=c===f.SUCCESS?"info":"warn",i[E](he.A_UPDATE_GROUP_INFO_R,JSON.stringify({code:c}),t),c!==f.SUCCESS?[2,{code:c,msg:d,data:l}]:[2,{code:c}]}}))}))}))]}))}))}function Nr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_GROUPS_INFO_T,he.A_GET_GROUPS_INFO_R).validateParameters("groupIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_GROUPS_INFO_T,JSON.stringify({groupIds:e}),t),[4,n.getGroupsInfo(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_GROUPS_INFO_R,JSON.stringify({code:o,data:a}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function gr(e,t,n){return void 0===n&&(n={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_KICK_GROUP_MEMBERS_T,he.A_KICK_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return i=o.createTraceId(),o.info(he.A_KICK_GROUP_MEMBERS_T,JSON.stringify({groupId:e,userIds:t,config:n}),i),[4,r.kickGroupMembers(e,t,n)];case 1:return a=s.sent().code,u=a===f.SUCCESS?"info":"warn",o[u](he.A_KICK_GROUP_MEMBERS_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]}))}))}function mr(e,t){return void 0===t&&(t={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_QUIT_GROUP_T,he.A_QUIT_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_QUIT_GROUP_T,JSON.stringify({groupId:e,config:t}),n),[4,i.quitGroup(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_QUIT_GROUP_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Pr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_DISMISS_GROUP_T,he.A_DISMISS_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_DISMISS_GROUP_T,JSON.stringify({groupId:e}),t),[4,n.dismissGroup(e)];case 1:return r=a.sent().code,o=r===f.SUCCESS?"info":"warn",i[o](he.A_DISMISS_GROUP_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function pr(e,t,n,i){return void 0===n&&(n=!1),void 0===i&&(i={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_TRANSFER_GROUP_OWNER_T,he.A_TRANSFER_GROUP_OWNER_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("newOwnerId",t,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s;return fe(this,(function(c){switch(c.label){case 0:return r=a.createTraceId(),a.info(he.A_TRANSFER_GROUP_OWNER_T,JSON.stringify({groupId:e,newOwnerId:t,quitGroup:n,config:i}),r),[4,o.transferGroupOwner(e,t,i,n)];case 1:return u=c.sent().code,s=u===f.SUCCESS?"info":"warn",a[s](he.A_TRANSFER_GROUP_OWNER_R,JSON.stringify({code:u}),r),[2,{code:u}]}}))}))}))]}))}))}function Ur(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ADD_GROUP_MANAGERS_T,he.A_ADD_GROUP_MANAGERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:10,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ADD_GROUP_MANAGERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.setGroupManagers(1,e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ADD_GROUP_MANAGERS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Cr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_REMOVE_GROUP_MANAGERS_T,he.A_REMOVE_GROUP_MANAGERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:10,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_REMOVE_GROUP_MANAGERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.setGroupManagers(2,e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_REMOVE_GROUP_MANAGERS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Mr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_GROUP_MEMBERS_BY_ROLES_T,he.A_GET_GROUP_MEMBERS_BY_ROLES_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("role",t,(function(e){return k({value:e,type:ee})}),f.INVALID_PARAMETER_GROUP_MEMBER_ROLE,!0).validateParameters("option",n,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_GROUP_MEMBERS_BY_ROLES_T,JSON.stringify({groupId:e,role:t,option:n,formatOption:vr(n)}),i),[4,r.getGroupMembersByRole(e,t,vr(n))];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_GROUP_MEMBERS_BY_ROLES_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Lr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_GET_GROUP_MEMBERS_T,he.A_GET_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_GET_GROUP_MEMBERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.getGroupMembers(e,t)];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_GET_GROUP_MEMBERS_R,JSON.stringify({code:a,data:u}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Dr(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_SET_GROUP_MEMBER_INFO_T,he.A_SET_GROUP_MEMBER_INFO_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("nickname",n,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("extra",i,X({maxLength:128}),f.INVALID_PARAMETER_EXTRA).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r=a.createTraceId(),a.info(he.A_SET_GROUP_MEMBER_INFO_T,JSON.stringify({groupId:e,userId:t,nickname:n,extra:i}),r),[4,o.setGroupMemberInfo(e,t,n,i)];case 1:return u=d.sent(),s=u.code,c=u.data,_=s===f.SUCCESS?"info":"warn",a[_](he.A_SET_GROUP_MEMBER_INFO_R,JSON.stringify({code:s}),r),s===f.SUCCESS?[2,{code:s}]:[2,{code:s,data:c}]}}))}))}))]}))}))}function Gr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_SEARCH_GROUP_MEMBERS_T,he.A_SEARCH_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("name",t,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("option",n,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_SEARCH_GROUP_MEMBERS_T,JSON.stringify({groupId:e,name:t,option:n,formatOption:vr(n)}),i),[4,r.searchGroupMembers(e,t,vr(n))];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_SEARCH_GROUP_MEMBERS_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function yr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_JOIN_GROUP_T,he.A_JOIN_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_JOIN_GROUP_T,JSON.stringify({groupId:e}),t),[4,n.joinGroup(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_JOIN_GROUP_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function br(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_INVITE_USERS_TO_GROUP_T,he.A_INVITE_USERS_TO_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:30,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_INVITE_USERS_TO_GROUP_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.inviteUsersToGroup(e,t)];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_INVITE_USERS_TO_GROUP_R,JSON.stringify({code:a}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function wr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ACCEPT_GROUP_INVITE_T,he.A_ACCEPT_GROUP_INVITE_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",t,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ACCEPT_GROUP_INVITE_T,JSON.stringify({groupId:e,inviterId:t}),n),[4,i.acceptGroupInvite(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ACCEPT_GROUP_INVITE_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Fr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_REFUSE_GROUP_INVITE_T,he.A_REFUSE_GROUP_INVITE_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("reason",n,X({maxLength:128}),f.INVALID_PARAMETER_REASON).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return i=o.createTraceId(),o.info(he.A_REFUSE_GROUP_INVITE_T,JSON.stringify({groupId:e,inviterId:t,reason:n}),i),[4,r.refuseGroupInvite(e,t,null!=n?n:"")];case 1:return a=s.sent().code,u=a===f.SUCCESS?"info":"warn",o[u](he.A_REFUSE_GROUP_INVITE_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]}))}))}function xr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_ACCEPT_GROUP_APPLICATION_T,he.A_ACCEPT_GROUP_APPLICATION_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",n,M,f.INVALID_PARAMETER_USER_ID).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_ACCEPT_GROUP_APPLICATION_T,JSON.stringify({groupId:e,inviterId:n,applicantId:t}),i),[4,r.acceptGroupApplication(e,t,null!=n?n:"")];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_ACCEPT_GROUP_APPLICATION_R,JSON.stringify({code:u}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Br(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_REFUSE_GROUP_APPLICATION_T,he.A_REFUSE_GROUP_APPLICATION_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",n,M,f.INVALID_PARAMETER_USER_ID).validateParameters("reason",i,X({maxLength:128}),f.INVALID_PARAMETER_REASON).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s;return fe(this,(function(c){switch(c.label){case 0:return r=a.createTraceId(),a.info(he.A_REFUSE_GROUP_APPLICATION_T,JSON.stringify({groupId:e,applicantId:t,reason:i}),r),[4,o.refuseGroupApplication(e,t,null!=n?n:"",null!=i?i:"")];case 1:return u=c.sent().code,s=u===f.SUCCESS?"info":"warn",a[s](he.A_REFUSE_GROUP_APPLICATION_R,JSON.stringify({code:u}),r),[2,{code:u}]}}))}))}))]}))}))}function Vr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_GROUP_APPLICATIONS_T,he.A_GET_GROUP_APPLICATIONS_R).validateParameters("option",e,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",e.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==e?void 0:e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==e?void 0:e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("directions",t,L({minLength:1,itemValidator:function(e){return k({value:e,type:te})}}),f.INVALID_PARAMETER_GROUP_APPLICATION_DIRECTION,F()).validateParameters("status",n,L({minLength:1,itemValidator:function(e){return k({value:e,type:ne})}}),f.INVALID_PARAMETER_GROUP_APPLICATION_STATUS,F()).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_GROUP_APPLICATIONS_T,JSON.stringify({status:n,option:e,formatOption:vr(e)}),i),[4,r.getGroupApplications(vr(e),t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_GROUP_APPLICATIONS_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Hr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_GET_JOINED_GROUPS_BY_ROLES_T,he.A_GET_JOINED_GROUPS_BY_ROLES_R).validateParameters("option",e,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",e.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==e?void 0:e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==e?void 0:e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("role",t,(function(e){return k({value:e,type:ee})}),f.INVALID_PARAMETER_GROUP_MEMBER_ROLE).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_GET_JOINED_GROUPS_BY_ROLES_T,JSON.stringify({role:t,option:e,formatOption:vr(e)}),n),[4,i.getJoinedGroupsByRole(t,vr(e))];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_GET_JOINED_GROUPS_BY_ROLES_R,JSON.stringify({code:a,data:u}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Yr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_SEARCH_JOINED_GROUPS_T,he.A_SEARCH_JOINED_GROUPS_R).validateParameters("groupName",e,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("option",t,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",t.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==t?void 0:t.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_SEARCH_JOINED_GROUPS_T,JSON.stringify({groupName:e,option:t,formatOption:vr(t)}),n),[4,i.searchJoinedGroups(e,vr(t))];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_SEARCH_JOINED_GROUPS_R,JSON.stringify({code:a}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Jr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_JOINED_GROUPS_T,he.A_GET_JOINED_GROUPS_R).validateParameters("groupIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_JOINED_GROUPS_T,JSON.stringify({groupIds:e}),t),[4,n.getJoinedGroups(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_JOINED_GROUPS_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function kr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_SET_GROUP_REMARK_T,he.A_SET_GROUP_REMARK_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("remark",t,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_REMARK,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_SET_GROUP_REMARK_T,JSON.stringify({groupId:e,remark:t}),n),[4,i.setGroupRemark(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_SET_GROUP_REMARK_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Kr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ADD_GROUP_FOLLOWS_T,he.A_ADD_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ADD_GROUP_FOLLOWS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.addGroupFollows(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ADD_GROUP_FOLLOWS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function jr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_REMOVE_GROUP_FOLLOWS_T,he.A_REMOVE_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_REMOVE_GROUP_FOLLOWS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.removeGroupFollows(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_REMOVE_GROUP_FOLLOWS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Wr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_GROUP_FOLLOWS_T,he.A_GET_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_GROUP_FOLLOWS_T,JSON.stringify({groupId:e}),t),[4,n.getGroupFollows(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_GROUP_FOLLOWS_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function Qr(e,t,n){var i=this;return new R(he.A_ADD_FRIEND_T,he.A_ADD_FRIEND_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).validateParameters("extra",n,X({maxLength:128}),f.INVALID_PARAMETER_EXTRA).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return o.info(he.A_ADD_FRIEND_T,JSON.stringify({userId:e,directionType:t,extra:n})),[4,r.addFriend(e,t,n||"")];case 1:return i=s.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_ADD_FRIEND_R,a),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))}function Xr(e,t){var n=this;return new R(he.A_DELETE_FRIENDS_T,he.A_DELETE_FRIENDS_R).validateParameters("userIds",e,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n;return fe(this,(function(o){switch(o.label){case 0:return r.info(he.A_DELETE_FRIENDS_T,JSON.stringify({userIds:e,directionType:t})),[4,i.deleteFriends(e,t)];case 1:return n=o.sent().code,r[n===f.SUCCESS?"info":"warn"](he.A_DELETE_FRIENDS_R,n),[2,{code:n}]}}))}))}))}function zr(e){var t=this;return new R(he.A_ACCEPT_FRIEND_APPLICATION_T,he.A_ACCEPT_FRIEND_APPLICATION_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t;return fe(this,(function(r){switch(r.label){case 0:return i.info(he.A_ACCEPT_FRIEND_APPLICATION_T,e),[4,n.acceptFriendApplication(e)];case 1:return t=r.sent().code,i[t===f.SUCCESS?"info":"warn"](he.A_ACCEPT_FRIEND_APPLICATION_R,t),[2,{code:t}]}}))}))}))}function qr(e){var t=this;return new R(he.A_REFUSE_FRIEND_APPLICATION_T,he.A_REFUSE_FRIEND_APPLICATION_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t;return fe(this,(function(r){switch(r.label){case 0:return i.info(he.A_REFUSE_FRIEND_APPLICATION_T,JSON.stringify({userId:e})),[4,n.refuseFriendApplication(e,"")];case 1:return t=r.sent().code,i[t===f.SUCCESS?"info":"warn"](he.A_REFUSE_FRIEND_APPLICATION_R,t),[2,{code:t}]}}))}))}))}function Zr(e,t,n){var i=this;return void 0===t&&(t=""),void 0===n&&(n={}),new R(he.A_SET_FRIEND_INFO_T,he.A_SET_FRIEND_INFO_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("remark",t,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_REMARK).validateParameters("extProfile",n,o.OBJECT,f.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).validateParameters("extProfile",n,(function(e){for(var t in e)if(!w(e[t]))return!1;return!0}),f.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return o.info(he.A_SET_FRIEND_INFO_T,JSON.stringify({userId:e,remark:t,extProfile:n})),[4,r.setFriendInfo(e,t,n)];case 1:return i=s.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_SET_FRIEND_INFO_R,a),[2,{code:a,data:u}]}}))}))}))}function $r(e,t){var n=this;return new R(he.A_CHECK_FRIENDS_T,he.A_CHECK_FRIENDS_R).validateParameters("userIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return r.info(he.A_CHECK_FRIENDS_T,JSON.stringify({userIds:e,directionType:t})),[4,i.checkFriends(e,t)];case 1:return n=u.sent(),o=n.code,a=n.data,r[o===f.SUCCESS?"info":"warn"](he.A_CHECK_FRIENDS_R,JSON.stringify({code:o,data:a})),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))}function eo(e,t){var n=this;return void 0===t&&(t={count:50,pageToken:"",order:!1}),new R(he.A_GET_FRIENDS_T,he.A_GET_FRIENDS_R).validateParameters("directionType",e,(function(e){return k({value:e,type:re})}),f.INVALID_PARAMETER_QUERY_FRIENDS_DIRECTION_TYPE,!0).validateParameters("option.count",null==t?void 0:t.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!F()).validateParameters("option.pageToken",null==t?void 0:t.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return r.info(he.A_GET_FRIENDS_T,JSON.stringify({directionType:e,option:t})),[4,i.getFriends(e,t)];case 1:return n=u.sent(),o=n.code,a=n.data,r[o===f.SUCCESS?"info":"warn"](he.A_GET_FRIENDS_R,JSON.stringify({code:o,data:a})),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))}function to(e,t,n){var i=this;return void 0===e&&(e={count:50,pageToken:"",order:!1}),new R(he.A_GET_FRIEND_APPLICATIONS_T,he.A_GET_FRIEND_APPLICATIONS_R).validateParameters("types",t,L({itemValidator:function(e){return k({value:e,type:oe})}}),f.INVALID_PARAMETER_FRIEND_APPLICATION_TYPE).validateParameters("option.count",e.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("status",n,L({itemValidator:function(e){return k({value:e,type:ae})}}),f.INVALID_PARAMETER_FRIEND_APPLICATION_STATUS).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return o.info(he.A_GET_FRIEND_APPLICATIONS_T,JSON.stringify({types:t,status:n,option:e})),[4,r.getFriendApplications({count:e.count,pageToken:null!==(s=null==e?void 0:e.pageToken)&&void 0!==s?s:"",order:null!==(c=null==e?void 0:e.order)&&void 0!==c&&c},t,n)];case 1:return i=_.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_GET_FRIEND_APPLICATIONS_R,JSON.stringify({code:a,data:u})),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))}function no(e){var t=this;return new R(he.A_GET_FRIENDS_INFO_T,he.A_GET_FRIENDS_INFO_R).validateParameters("userIds",e,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_GET_FRIENDS_INFO_T,JSON.stringify({userIds:e})),[4,n.getFriendsInfo(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_GET_FRIENDS_INFO_R,JSON.stringify({code:r,data:o})),r!==f.SUCCESS?[2,{code:r}]:[2,{code:r,data:o}]}}))}))}))}function io(e){var t=this;return new R(he.A_SEARCH_FRIENDS_INFO_T,he.A_SEARCH_FRIENDS_INFO_R).validateParameters("name",e,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_SEARCH_FRIENDS_INFO_T,JSON.stringify({name:e})),[4,n.searchFriendsInfo(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_SEARCH_FRIENDS_INFO_R,JSON.stringify({code:r,data:o})),[2,{code:r,data:o}]}}))}))}))}function ro(e){var t=this;return new R(he.A_SET_ADD_FRIEND_PERMISSION_T,he.A_SET_ADD_FRIEND_PERMISSION_R).validateParameters("permission",e,(function(e){return k({value:e,type:ue})}),f.INVALID_PARAMETER_FRIEND_ADD_PERMISSION,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_SET_ADD_FRIEND_PERMISSION_T,JSON.stringify(e)),[4,n.setFriendAddPermission(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_SET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:r,data:o})),[2,{code:r}]}}))}))}))}function oo(){var e=this;return new R(he.A_GET_ADD_FRIEND_PERMISSION_T,he.A_GET_ADD_FRIEND_PERMISSION_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r;return fe(this,(function(o){switch(o.label){case 0:return n.info(he.A_GET_ADD_FRIEND_PERMISSION_T),[4,t.getFriendAddPermission()];case 1:return e=o.sent(),i=e.code,r=e.data,n[i===f.SUCCESS?"info":"warn"](he.A_GET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:i,data:r})),i!==f.SUCCESS?[2,{code:i}]:[2,{code:i,data:r}]}}))}))}))}function ao(e){!function(e){var t,n,i;me?pe.warn(E.A_INIT_REPEAT_O):(r("options.appkey",e.appkey,o.STRING,!0),r("options.navigators",e.navigators,(function(e){return a(e)&&(0===e.length||e.every(u))})),r("options.loggerProxy",e.loggerProxy,(function(e){return e instanceof s})),Pe=e,me=c.init({appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(t=e.environment)&&void 0!==t?t:"default",eventLoopBlockingCheck:e.eventLoopBlockingCheck,enableReadReceiptStorage:null===(n=e.enableReadReceiptStorage)||void 0===n||n,useNaviV2:null!==(i=e.useNaviV2)&&void 0!==i&&i,loggerProxy:e.loggerProxy}),pe=me.logger,me.assignWatcher(Ne),_.init(pe),me.sse.on("message",(function(e,t){var n=_e(_e({},t),{message:t.message?Re(t.message):void 0});Oe.emit(Te.STREAM_MESSAGE_RESPONSE,n)})))}(e)}function uo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return Qe(),[2,Ue()]}))}))}function so(){return Ce((function(e){return e.getConnectionStatus()}))}function co(){return Ce((function(e){return e.getServerTime()}))}function _o(){return Ce((function(e){return e.getCurrentUserId()}))}function fo(e,t){i.add(e,t)}function lo(){return Ce((function(e){return e.getDeviceId()}))}function Eo(){var e=Le().tryTrans((function(e){return e.getAppSettings()}));return e.isOk?e.data:null}var Ro={COMET:"_",WEBSOCKET:"_"};function Ao(e){return Le().next((function(t){return t.setNotificationQuietHoursWithSetting(e)}))}function So(){return Le().next((function(e){return e.removeNotificationQuietHoursSetting()}))}function To(){return Le().next((function(e){return e.getNotificationQuietHoursSetting()}))}function Io(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)}))];case 1:return[2,n.sent().wipe()]}}))}))}function vo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))]}))}))}function ho(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.quitChatroom(e,t)}))]}))}))}function Oo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)}))]}))}))}function No(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.setChatroomEntry(e,t,!1)}))]}))}))}function go(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.setChatroomEntries(e,t)}))];case 1:return[2,n.sent().wipe()]}}))}))}function mo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.setChatroomEntry(e,t,!0)}))]}))}))}function Po(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!1)}))]}))}))}function po(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntries(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))]}))}))}function Uo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!0)}))]}))}))}function Co(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.getChatroomEntry(e,t)}))]}))}))}function Mo(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.getAllChatroomEntries(e)}))]}))}))}function Lo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.getChatroomHistoryMessages(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Do(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.bindRTCRoomForChatroom(e)}))]}))}))}function Go(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.setTranslationLanguage(e)}))]}))}))}function yo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getTranslationLanguage()}))]}))}))}function bo(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.setAutoTranslateEnabled(e)}))]}))}))}function wo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getAutoTranslateEnabled()}))]}))}))}export{Xe as BaseMessage,Ze as CombineMessage,$e as CombineV2Message,et as CommandMessage,Ro as ConnectType,Te as Events,tt as FileMessage,nt as GIFMessage,it as GroupNotificationMessage,dt as HQVoiceMessage,rt as ImageMessage,ot as InformationNotificationMessage,at as LocationMessage,ut as ReferenceMessage,st as RichContentMessage,ct as SightMessage,_t as TextMessage,Pt as UploadTask,ft as VoiceMessage,fo as __addSDKVersion,zr as acceptFriendApplication,xr as acceptGroupApplication,wr as acceptGroupInvite,Yi as addConversationsToTag,ke as addEventListener,Qr as addFriend,Kr as addGroupFollows,Ur as addGroupManagers,Ve as addMonitor,Fi as addTag,Gi as addToBlacklist,an as batchClearRemoteHistoryMessages,Vn as batchDeleteConversations,tn as batchGetMessageReadReceiptInfoV4,Bn as batchRemoveConversation,qn as batchSetConversationNotificationLevel,ai as batchSetConversationToTop,Zn as batchSetConversationTranslateStrategy,Do as bindRTCRoomForChatroom,$r as checkFriends,Xn as clearAllMessagesUnreadStatus,Qe as clearEventListeners,on as clearHistoryMessages,Tn as clearMessages,Qn as clearMessagesUnreadStatus,li as clearRealtimeConUnreadCount,Jn as clearTextMessageDraft,vn as clearUnreadCountByTimestamp,Ye as connect,hr as createGroup,Lt as createUploadTask,Xr as deleteFriends,Sn as deleteLocalMessagesByTimestamp,rn as deleteMessages,uo as destroy,Je as disconnect,Pr as dismissGroup,or as electronExtension,Uo as forceRemoveChatRoomEntry,mo as forceSetChatRoomEntry,Mo as getAllChatRoomEntries,bn as getAllConversationList,Ui as getAllUltraGroupUnreadCount,Ci as getAllUltraGroupUnreadMentionedCount,_i as getAllUnreadMentionedCount,Eo as getAppSettings,wo as getAutoTranslateEnabled,bi as getBlacklist,wi as getBlacklistStatus,Ti as getBlockUltraGroupList,ni as getBlockedConversationList,Co as getChatRoomEntry,Oo as getChatRoomInfo,Lo as getChatroomHistoryMessages,so as getConnectionStatus,Fn as getConversation,yn as getConversationList,wn as getConversationListByTimestamp,ei as getConversationNotificationLevel,ti as getConversationNotificationStatus,ri as getConversationTypeNotificationLevel,ji as getConversationsFromTagByPage,_o as getCurrentUserId,lo as getDeviceId,bt as getDownloadAuth,yt as getFileToken,wt as getFileUrl,fn as getFirstUnreadMessage,ln as getFirstUnreadMessageInfo,oo as getFriendAddPermission,to as getFriendApplications,eo as getFriends,no as getFriendsInfo,Vr as getGroupApplications,Wr as getGroupFollows,Lr as getGroupMembers,Mr as getGroupMembersByRole,Nr as getGroupsInfo,jt as getHistoryMessages,Jr as getJoinedGroups,Hr as getJoinedGroupsByRole,Ft as getMessage,gn as getMessageReadReceiptInfoV5,mn as getMessageReadReceiptInfoV5ByIdentifiers,en as getMessageReadReceiptV4,_n as getMessageReader,pn as getMessagesReadReceiptByUsersV5,Pn as getMessagesReadReceiptUsersByPageV5,Rr as getMyUserProfile,Sr as getMyUserProfileVisibility,To as getNotificationQuietHoursSetting,ur as getProxy,fi as getRealtimeConTotalUnreadCount,Ri as getRealtimeConUnreadCounts,di as getRealtimeConversations,Wt as getRemoteHistoryMessages,co as getServerTime,dr as getSubscribeUserList,fr as getSubscribeUserStatus,Ir as getSubscribeUsersOnlineStatus,Vi as getTags,Hi as getTagsFromConversation,Hn as getTextMessageDraft,ui as getTopConversationList,kn as getTotalUnreadCount,Kn as getTotalUnreadCountByLevels,jn as getTotalUnreadMentionedCountByLevels,yo as getTranslationLanguage,mi as getUltraGroupDefaultNotificationLevel,Li as getUltraGroupFirstUnreadMessageTimestamp,Si as getUltraGroupList,vi as getUltraGroupMessageListByMessageUId,pi as getUltraGroupUnreadCountByTargetId,Di as getUltraGroupUnreadInfoList,gi as getUltraGroupUnreadMentionedCountByTargetId,Mi as getUltraGroupUnreadMentionedMessages,si as getUnreadConversationList,Wn as getUnreadCount,Wi as getUnreadCountByTag,Ai as getUnreadMentionMeConversationList,ci as getUnreadMentionedCount,Rn as getUnreadMentionedMessages,Er as getUserProfiles,ao as init,En as insertMessage,De as installPlugin,br as inviteUsersToGroup,Io as joinChatRoom,vo as joinExistChatRoom,yr as joinGroup,gr as kickGroupMembers,Ln as modifyMessage,Dn as modifyMessageWithParams,Ke as onceEventListener,ho as quitChatRoom,mr as quitGroup,nn as recallMessage,Gn as refreshReferenceMessageWithParams,qr as refuseFriendApplication,Br as refuseGroupApplication,Fr as refuseGroupInvite,dn as registerMessageType,Ni as removeAllExpansionForUltraGroupMessage,po as removeChatRoomEntries,Po as removeChatRoomEntry,xn as removeConversation,Ji as removeConversationsFromTag,je as removeEventListener,We as removeEventListeners,Oi as removeExpansionForUltraGroupMessage,yi as removeFromBlacklist,jr as removeGroupFollows,Cr as removeGroupManagers,sn as removeMessageExpansionForKey,He as removeMonitor,So as removeNotificationQuietHoursSetting,Ei as removeRealtimeConversations,xi as removeTag,Ki as removeTagFromConversations,ki as removeTagsFromConversation,Un as requestSpeechToTextForMessage,On as requestStreamMessageContent,Yn as saveTextMessageDraft,In as searchConversationByContent,io as searchFriendsInfo,Gr as searchGroupMembers,Yr as searchJoinedGroups,An as searchMessages,Tr as searchUserProfileByUniqueId,Ht as sendFileMessage,Jt as sendGIFMessage,kt as sendHQVoiceMessage,Yt as sendImageMessage,xt as sendMessage,Qt as sendReadReceiptMessage,$t as sendReadReceiptMessageV4,Xt as sendReadReceiptRequest,zt as sendReadReceiptResponse,qt as sendReadReceiptResponseV2,Nn as sendReadReceiptResponseV5,Kt as sendSightMessage,Zt as sendSyncReadStatusMessage,Bt as sendTextMessage,cn as sendTypingStatusMessage,Ii as sendUltraGroupTypingStatus,bo as setAutoTranslateEnabled,go as setChatRoomEntries,No as setChatRoomEntry,zn as setConversationNotificationLevel,$n as setConversationNotificationStatus,oi as setConversationToTop,Qi as setConversationToTopInTag,ii as setConversationTypeNotificationLevel,ro as setFriendAddPermission,Zr as setFriendInfo,Dr as setGroupMemberInfo,kr as setGroupRemark,hn as setMessageReceivedStatus,Ao as setNotificationQuietHoursWithSetting,ar as setProxy,Go as setTranslationLanguage,Pi as setUltraGroupDefaultNotificationLevel,Dt as stopUploadTask,cr as subscribeUserStatus,sr as testProxy,pr as transferGroupOwner,Cn as translateMessagesWithParams,Mn as translateTextsWithParams,_r as unSubscribeUserStatus,hi as updateExpansionForUltraGroupMessage,Or as updateGroupInfo,un as updateMessageExpansion,lr as updateMyUserProfile,Ar as updateMyUserProfileVisibility,Bi as updateTag,Gt as upload};
15
+ ***************************************************************************** */var se=function(e,t){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},se(e,t)};function ce(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}se(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _e=function(){return _e=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},_e.apply(this,arguments)};function de(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((i=i.apply(e,t||[])).next())}))}function fe(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function le(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function Ee(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Re(e){return _e(_e({},e),{channelId:e.channelId||""})}function Ae(t){var n=t.conversationType,i=t.targetId,r=t.latestMessage,o=t.unreadMessageCount,a=t.hasMentioned,u=t.mentionedInfo,s=t.lastUnreadTime,c=t.notificationStatus,_=t.notificationLevel,d=t.isTop,f=t.channelId,l=t.unreadMentionedCount,E=t.matchCount,R=t.operationTime,A=t.draft,S=t.translateStrategy,T=t.editedMessageDraft,I={conversationType:n,targetId:i,latestMessage:r&&Re(r),unreadMessageCount:o,hasMentioned:a,mentionedInfo:a?{type:null==u?void 0:u.type,userIdList:null==u?void 0:u.userIdList}:void 0,lastUnreadTime:s,notificationStatus:c,notificationLevel:_,isTop:d,channelId:f,unreadMentionedCount:l,matchCount:E,operationTime:R,draft:A||"",translateStrategy:S,editedMessageDraft:T};return I.conversationType===e.ULTRA_GROUP&&(I.firstUnreadMessage=t.firstUnreadMessage,I.channelType=t.channelType,I.unreadMentionedMeCount=t.unreadMentionedMeCount),I}function Se(e,t){null===console||void 0===console||console.warn("Method '".concat(e,"' is deprecated, please use '").concat(t,"' instead"))}var Te,Ie={groupName:"name",portraitUri:"portraitUrl",introduction:"introduction",notice:"announcement",joinPermission:"joinPerm",removeMemberPermission:"removePerm",invitePermission:"memInvitePerm",inviteHandlePermission:"invitePerm",groupInfoEditPermission:"profilePerm",memberInfoEditPermission:"memProfilePerm"};!function(e){e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.DISCONNECT="DISCONNECT",e.SUSPEND="SUSPEND",e.MESSAGES="MESSAGES",e.READ_RECEIPT_RECEIVED="READ_RECEIPT_RECEIVED",e.MESSAGE_RECEIPT_REQUEST="MESSAGE_RECEIPT_REQUEST",e.MESSAGE_RECEIPT_RESPONSE="MESSAGE_RECEIPT_RESPONSE",e.MESSAGE_READ_RECEIPT_V4="MESSAGE_READ_RECEIPT_V4",e.SYNC_READ_STATUS="SYNC_READ_STATUS",e.CONVERSATION="CONVERSATION",e.CHATROOM="CHATROOM",e.EXPANSION="EXPANSION",e.PULL_OFFLINE_MESSAGE_FINISHED="PULL_OFFLINE_MESSAGE_FINISHED",e.TAG="TAG",e.USER_SETTINGS_SYNCED="USER_SETTINGS_SYNCED",e.USER_SETTINGS_CHANGED="USER_SETTINGS_CHANGED",e.CONVERSATIONS_SETTINGS_SYNCED="CONVERSATIONS_SETTINGS_SYNCED",e.CONVERSATION_TAG="CONVERSATION_TAG",e.TYPING_STATUS="TYPING_STATUS",e.MESSAGE_BLOCKED="MESSAGE_BLOCKED",e.ULTRA_GROUP_ENABLE="ULTRA_GROUP_ENABLE",e.CONVERSATIONS_SYNCED="CONVERSATIONS_SYNCED",e.OPERATE_STATUS="OPERATE_STATUS",e.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED="ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",e.ULTRA_GROUP_MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.ULTRA_GROUP_MESSAGE_RECALLED="ULTRA_GROUP_MESSAGE_RECALLED",e.ULTRA_GROUP_CHANNEL_TYPE_CHANGE="ULTRA_GROUP_CHANNEL_TYPE_CHANGE",e.ULTRA_GROUP_CHANNEL_DELETE="ULTRA_GROUP_CHANNEL_DELETE",e.ULTRA_GROUP_CHANNEL_USER_KICKED="ULTRA_GROUP_CHANNEL_USER_KICKED",e.USER_GROUP_STATUS="USER_GROUP_STATUS",e.SUBSCRIBED_USER_STATUS_CHANGE="SUBSCRIBED_USER_STATUS_CHANGE",e.SUBSCRIBED_RELATION_CHANGE="SUBSCRIBED_RELATION_CHANGE",e.SYNC_SUBSCRIBED_USER_STATUS_FINISHED="SYNC_SUBSCRIBED_USER_STATUS_FINISHED",e.OWN_USER_PROFILE_CHANGED="OWN_USER_PROFILE_CHANGED",e.GROUP_OPERATION="GROUP_OPERATION",e.GROUP_INFO_CHANGED="GROUP_INFO_CHANGED",e.GROUP_MEMBER_INFO_CHANGED="GROUP_MEMBER_INFO_CHANGED",e.GROUP_APPLICATION_EVENT="GROUP_APPLICATION_EVENT",e.GROUP_REMARK_CHANGED_SYNC="GROUP_REMARK_CHANGED_SYNC",e.GROUP_FOLLOWS_CHANGED_SYNC="GROUP_FOLLOWS_CHANGED_SYNC",e.FRIEND_ADDED="FRIEND_ADDED",e.FRIEND_DELETE="FRIEND_DELETE",e.FRIEND_APPLICATION_STATUS_CHANGED="FRIEND_APPLICATION_STATUS_CHANGED",e.FRIEND_CLEARED="FRIEND_CLEARED",e.FRIEND_INFO_CHANGED_SYNC="FRIEND_INFO_CHANGED_SYNC",e.DATABASE_OPENED="DATABASE_OPENED",e.DATABASE_UPGRADE_WILL_START="DATABASE_UPGRADE_WILL_START",e.DATABASE_UPGRADING="DATABASE_UPGRADING",e.DATABASE_UPGRADE_DID_COMPLETE="DATABASE_UPGRADE_DID_COMPLETE",e.STREAM_MESSAGE_RESPONSE="STREAM_MESSAGE_RESPONSE",e.MESSAGE_RECEIPT_RESPONSE_V5="MESSAGE_RECEIPT_RESPONSE_V5",e.SPEECH_TO_TEXT_RESPONSE="SPEECH_TO_TEXT_RESPONSE",e.TRANSLATE_RESPONSE="TRANSLATE_RESPONSE",e.MESSAGE_MODIFIED="MESSAGE_MODIFIED",e.MESSAGE_MODIFIED_SYNC_COMPLETED="MESSAGE_MODIFIED_SYNC_COMPLETED"}(Te||(Te={}));var ve,he={A_ADD_TO_BLACKLIST_T:"A-add_to_blacklist-T",A_ADD_TO_BLACKLIST_R:"A-add_to_blacklist-R",A_REMOVE_FROM_BLACKLIST_T:"A-remove_from_blacklist-T",A_REMOVE_FROM_BLACKLIST_R:"A-remove_from_blacklist-R",A_GET_BLACKLIST_T:"A-get_blacklist-T",A_GET_BLACKLIST_R:"A-get_blacklist-R",A_GET_BLACKLIST_STATUS_T:"A-get_blacklist_status-T",A_GET_BLACKLIST_STATUS_R:"A-get_blacklist_status-R",A_GET_ALL_UNREAD_MENTIONED_COUNT_T:"A-get_all_unread_mentioned_count-T",A_GET_ALL_UNREAD_MENTIONED_COUNT_R:"A-get_all_unread_mentioned_count-R",A_E_SET_MESSAGE_STATUS_TO_READ_T:"A-e_set_message_status_to_read-T",A_E_SET_MESSAGE_STATUS_TO_READ_R:"A-e_set_message_status_to_read-R",A_E_SET_MESSAGE_RECEIVED_STATUS_T:"A-e_set_message_received_status-T",A_E_SET_MESSAGE_RECEIVED_STATUS_R:"A-e_set_message_received_status-R",A_E_SET_MESSAGE_SENT_STATUS_T:"A-e_set_message_sent_status-T",A_E_SET_MESSAGE_SENT_STATUS_R:"A-e_set_message_sent_status-R",A_E_SET_MESSAGE_SENT_STATUS_INFO_T:"A-e_set_message_sent_status_info-T",A_E_SET_MESSAGE_SENT_STATUS_INFO_R:"A-e_set_message_sent_status_info-R",A_E_SET_CHECK_DUPLICATE_MESSAGE_T:"A-e_set_check_duplicate_message-T",A_E_SET_CHECK_DUPLICATE_MESSAGE_R:"A-e_set_check_duplicate_message-R",A_BATCH_SET_CON_NOTIFI_LEVEL_T:"A-batch_set_con_notifi_level-T",A_BATCH_SET_CON_NOTIFI_LEVEL_R:"A-batch_set_con_notifi_level-R",A_BATCH_SET_CON_TO_TOP_T:"A-batch_set_con_to_top-T",A_BATCH_SET_CON_TO_TOP_R:"A-batch_set_con_to_top-R",A_RECALL_MESSAGE_T:"A-recall_message-T",A_RECALL_MESSAGE_R:"A-recall_message-R",A_GET_MESSAGE_READER_T:"A-get_message_reader-T",A_GET_MESSAGE_READER_R:"A-get_message_reader-R",A_GET_UNREAD_MENTIONED_MESSAGES_T:"A-get_unread_mentioned_messages-T",A_GET_UNREAD_MENTIONED_MESSAGES_R:"A-get_unread_mentioned_messages-R",A_SEARCH_CONVERSATION_BY_CONTENT_T:"A-search_conversation_by_content-T",A_SEARCH_CONVERSATION_BY_CONTENT_R:"A-search_conversation_by_content-R",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T:"A-clear_unread_count_by_timestamp-T",A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R:"A-clear_unread_count_by_timestamp-R",A_SET_PROXY_T:"A-set_proxy-T",A_SET_PROXY_R:"A-set_proxy-R",A_GET_PROXY_T:"A-get_proxy-T",A_GET_PROXY_R:"A-get_proxy-R",A_TEST_PROXY_T:"A-test_proxy-T",A_TEST_PROXY_R:"A-test_proxy-R",A_SUBSCRIBE_USER_STATUS_T:"A-subscribe_user_status-T",A_SUBSCRIBE_USER_STATUS_R:"A-subscribe_user_status-R",A_UNSUBSCRIBE_USER_STATUS_T:"A-unsubscribe_user_status-T",A_UNSUBSCRIBE_USER_STATUS_R:"A-unsubscribe_user_status-R",A_GET_SUBSCRIBE_USER_STATUS_LIST_T:"A-get_subscribe_user_status_list-T",A_GET_SUBSCRIBE_USER_STATUS_LIST_R:"A-get_subscribe_user_status_list-R",A_UPDATE_MY_USER_PROFILE_T:"A-update_my_user_profile-T",A_UPDATE_MY_USER_PROFILE_R:"A-update_my_user_profile-R",A_GET_MY_USER_PROFILE_T:"A-get_my_user_profile-T",A_GET_MY_USER_PROFILE_R:"A-get_my_user_profile-R",A_UPDATE_MY_USER_PROFILE_VISIBILITY_T:"A-update_my_user_profile_visibility-T",A_UPDATE_MY_USER_PROFILE_VISIBILITY_R:"A-update_my_user_profile_visibility-R",A_GET_MY_USER_PROFILE_VISIBILITY_T:"A-get_my_user_profile_visibility-T",A_GET_MY_USER_PROFILE_VISIBILITY_R:"A-get_my_user_profile_visibility-R",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T:"A-search_user_profile_by_unique_id-T",A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R:"A-search_user_profile_by_unique_id-R",A_CREATE_GROUP_T:"A-create_group-T",A_CREATE_GROUP_R:"A-create_group-R",A_UPDATE_GROUP_INFO_T:"A-update_group_info-T",A_UPDATE_GROUP_INFO_R:"A-update_group_info-R",A_GET_GROUPS_INFO_T:"A-get_groups_info-T",A_GET_GROUPS_INFO_R:"A-get_groups_info-R",A_KICK_GROUP_MEMBERS_T:"A-kick_group_members-T",A_KICK_GROUP_MEMBERS_R:"A-kick_group_members-R",A_QUIT_GROUP_T:"A-quit_group-T",A_QUIT_GROUP_R:"A-quit_group-R",A_DISMISS_GROUP_T:"A-dismiss_group-T",A_DISMISS_GROUP_R:"A-dismiss_group-R",A_TRANSFER_GROUP_OWNER_T:"A-transfer_group_owner-T",A_TRANSFER_GROUP_OWNER_R:"A-transfer_group_owner-R",A_ADD_GROUP_MANAGERS_T:"A-add_group_managers-T",A_ADD_GROUP_MANAGERS_R:"A-add_group_managers-R",A_REMOVE_GROUP_MANAGERS_T:"A-remove_group_managers-T",A_REMOVE_GROUP_MANAGERS_R:"A-remove_group_managers-R",A_GET_GROUP_MEMBERS_BY_ROLES_T:"A-get_group_members_by_roles-T",A_GET_GROUP_MEMBERS_BY_ROLES_R:"A-get_group_members_by_roles-R",A_GET_GROUP_MEMBERS_T:"A-get_group_members-T",A_GET_GROUP_MEMBERS_R:"A-get_group_members-R",A_SET_GROUP_MEMBER_INFO_T:"A-set_group_member_info-T",A_SET_GROUP_MEMBER_INFO_R:"A-set_group_member_info-R",A_SEARCH_GROUP_MEMBERS_T:"A-search_group_members-T",A_SEARCH_GROUP_MEMBERS_R:"A-search_group_members-R",A_JOIN_GROUP_T:"A-join_group-T",A_JOIN_GROUP_R:"A-join_group-R",A_INVITE_USERS_TO_GROUP_T:"A-invite_users_to_group-T",A_INVITE_USERS_TO_GROUP_R:"A-invite_users_to_group-R",A_ACCEPT_GROUP_INVITE_T:"A-accept_group_invite-T",A_ACCEPT_GROUP_INVITE_R:"A-accept_group_invite-R",A_REFUSE_GROUP_INVITE_T:"A-refuse_group_invite-T",A_REFUSE_GROUP_INVITE_R:"A-refuse_group_invite-R",A_ACCEPT_GROUP_APPLICATION_T:"A-accept_group_application-T",A_ACCEPT_GROUP_APPLICATION_R:"A-accept_group_application-R",A_REFUSE_GROUP_APPLICATION_T:"A-refuse_group_application-T",A_REFUSE_GROUP_APPLICATION_R:"A-refuse_group_application-R",A_GET_GROUP_APPLICATIONS_T:"A-get_group_applications-T",A_GET_GROUP_APPLICATIONS_R:"A-get_group_applications-R",A_GET_JOINED_GROUPS_BY_ROLES_T:"A-get_joined_groups_by_roles-T",A_GET_JOINED_GROUPS_BY_ROLES_R:"A-get_joined_groups_by_roles-R",A_SEARCH_JOINED_GROUPS_T:"A-search_joined_groups-T",A_SEARCH_JOINED_GROUPS_R:"A-search_joined_groups-R",A_GET_JOINED_GROUPS_T:"A-get_joined_groups-T",A_GET_JOINED_GROUPS_R:"A-get_joined_groups-R",A_SET_GROUP_REMARK_T:"A-set_group_remark-T",A_SET_GROUP_REMARK_R:"A-set_group_remark-R",A_GET_GROUP_REMARK_T:"A-get_group_remark-T",A_GET_GROUP_REMARK_R:"A-get_group_remark-R",A_ADD_GROUP_FOLLOWS_T:"A-add_group_follows-T",A_ADD_GROUP_FOLLOWS_R:"A-add_group_follows-R",A_REMOVE_GROUP_FOLLOWS_T:"A-remove_group_follows-T",A_REMOVE_GROUP_FOLLOWS_R:"A-remove_group_follows-R",A_GET_GROUP_FOLLOWS_T:"A-get_group_follows-T",A_GET_GROUP_FOLLOWS_R:"A-get_group_follows-R",A_ADD_FRIEND_T:"A-add_friend-T",A_ADD_FRIEND_R:"A-add_friend-R",A_DELETE_FRIENDS_T:"A-delete_friends-T",A_DELETE_FRIENDS_R:"A-delete_friends-R",A_ACCEPT_FRIEND_APPLICATION_T:"A-accept_friend_application-T",A_ACCEPT_FRIEND_APPLICATION_R:"A-accept_friend_application-R",A_REFUSE_FRIEND_APPLICATION_T:"A-refuse_friend_application-T",A_REFUSE_FRIEND_APPLICATION_R:"A-refuse_friend_application-R",A_SET_FRIEND_INFO_T:"A-set_friend_info-T",A_SET_FRIEND_INFO_R:"A-set_friend_info-R",A_CHECK_FRIENDS_T:"A-check_friends-T",A_CHECK_FRIENDS_R:"A-check_friends-R",A_GET_FRIENDS_T:"A-get_friends-T",A_GET_FRIENDS_R:"A-get_friends-R",A_GET_FRIEND_APPLICATIONS_T:"A-get_friend_applications-T",A_GET_FRIEND_APPLICATIONS_R:"A-get_friend_applications-R",A_DELETE_FRIEND_APPLICATION_T:"A-delete_friend_application-T",A_DELETE_FRIEND_APPLICATION_R:"A-delete_friend_application-R",A_GET_FRIENDS_INFO_T:"A-get_friends_info-T",A_GET_FRIENDS_INFO_R:"A-get_friends_info-R",A_SEARCH_FRIENDS_INFO_T:"A-search_friends_info-T",A_SEARCH_FRIENDS_INFO_R:"A-search_friends_info-R",A_SET_ADD_FRIEND_PERMISSION_T:"A-set_add_friend_permission-T",A_SET_ADD_FRIEND_PERMISSION_R:"A-set_add_friend_permission-R",A_GET_ADD_FRIEND_PERMISSION_T:"A-get_add_friend_permission-T",A_GET_ADD_FRIEND_PERMISSION_R:"A-get_add_friend_permission-R"};!function(e){e[e.DISALLOW=0]="DISALLOW",e[e.ALLOW=1]="ALLOW"}(ve||(ve={}));var Oe=new t,Ne={connection:function(e,t){switch(e){case n.CONNECTED:Oe.emit(Te.CONNECTED);break;case n.CONNECTING:Oe.emit(Te.CONNECTING);break;case n.SUSPENDED:Oe.emit(Te.SUSPEND,t);break;case n.DISCONNECTED:Oe.emit(Te.DISCONNECT,t)}},batchMessage:function(e){Oe.emit(Te.MESSAGES,{messages:e.map((function(e){return Re(e)}))})},typingState:function(e){Oe.emit(Te.TYPING_STATUS,{status:e})},readReceiptReceived:function(e,t,n,i){Oe.emit(Te.READ_RECEIPT_RECEIVED,{conversation:e,messageUId:t,sentTime:n,sendUserId:i})},messageReceiptRequest:function(e,t,n){Oe.emit(Te.MESSAGE_RECEIPT_REQUEST,{conversation:e,messageUId:t,senderUserId:n})},messageReceiptResponse:function(e,t,n){Oe.emit(Te.MESSAGE_RECEIPT_RESPONSE,{conversation:e,receivedUserId:t,messageUIdList:n})},conversationState:function(t){var n=t.map((function(t){var n=t.conversation,i=t.updatedItems,r=n.conversationType,o=Ae(n);return r===e.ULTRA_GROUP&&(o.versionTime=n.versionTime,o.unreadMessageCount=ge(n.unreadMessageCount||0),o.unreadMentionedCount=ge(n.unreadMentionedCount||0),o.unreadMentionedMeCount=ge(n.unreadMentionedMeCount||0)),{conversation:o,updatedItems:i}}));Oe.emit(Te.CONVERSATION,{conversationList:n})},chatroomState:function(e){Oe.emit(Te.CHATROOM,e)},expansion:function(e){Oe.emit(Te.EXPANSION,e)},pullFinished:function(){Oe.emit(Te.PULL_OFFLINE_MESSAGE_FINISHED)},tag:function(){Oe.emit(Te.TAG)},userSettingsSynced:function(e){Oe.emit(Te.USER_SETTINGS_SYNCED,e)},userSettingsChanged:function(e){Oe.emit(Te.USER_SETTINGS_CHANGED,e)},conversationStatusSynced:function(e){Oe.emit(Te.CONVERSATIONS_SETTINGS_SYNCED,e)},conversationTagChanged:function(){Oe.emit(Te.CONVERSATION_TAG)},messageBlocked:function(e){Oe.emit(Te.MESSAGE_BLOCKED,e)},ultraGroupEnable:function(){Oe.emit(Te.ULTRA_GROUP_ENABLE)},sgRelationsSynced:function(e){Oe.emit(Te.CONVERSATIONS_SYNCED,e)},operateStatus:function(e){Oe.emit(Te.OPERATE_STATUS,e)},ultraGroupMessageExpansionUpdated:function(e){Oe.emit(Te.ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED,e.map((function(e){return Re(e)})))},ultraGroupMessageRecalled:function(e){Oe.emit(Te.ULTRA_GROUP_MESSAGE_RECALLED,e.map((function(e){return Re(e)})))},ultraGroupChannelChangeType:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_TYPE_CHANGE,e)},ultraGroupChannelUserKicked:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_USER_KICKED,e)},ultraGroupChannelDelete:function(e){Oe.emit(Te.ULTRA_GROUP_CHANNEL_DELETE,e)},userGroupStatus:function(e){Oe.emit(Te.USER_GROUP_STATUS,e)},messageReadReceipt:function(e){Oe.emit(Te.MESSAGE_READ_RECEIPT_V4,e)},syncReadStatus:function(e){Oe.emit(Te.SYNC_READ_STATUS,e)},subscribedUserStatusChange:function(e){Oe.emit(Te.SUBSCRIBED_USER_STATUS_CHANGE,e)},subscribedRelationChange:function(e){Oe.emit(Te.SUBSCRIBED_RELATION_CHANGE,e)},syncSubscribedUserStatusFinished:function(e){Oe.emit(Te.SYNC_SUBSCRIBED_USER_STATUS_FINISHED,e)},ownUserProfileChanged:function(e){Oe.emit(Te.OWN_USER_PROFILE_CHANGED,e)},groupOperation:function(e){Oe.emit(Te.GROUP_OPERATION,e)},groupInfoChanged:function(e){Oe.emit(Te.GROUP_INFO_CHANGED,e)},groupMemberInfoChanged:function(e){Oe.emit(Te.GROUP_MEMBER_INFO_CHANGED,e)},groupApplicationEvent:function(e){Oe.emit(Te.GROUP_APPLICATION_EVENT,e)},groupRemarkChangedSync:function(e){Oe.emit(Te.GROUP_REMARK_CHANGED_SYNC,e)},groupFollowsChangedSync:function(e){Oe.emit(Te.GROUP_FOLLOWS_CHANGED_SYNC,e)},friendAdd:function(e){Oe.emit(Te.FRIEND_ADDED,e)},friendDelete:function(e){Oe.emit(Te.FRIEND_DELETE,e)},friendApplicationStatusChanged:function(e){Oe.emit(Te.FRIEND_APPLICATION_STATUS_CHANGED,e)},friendCleared:function(e){Oe.emit(Te.FRIEND_CLEARED,e)},friendInfoChangedSync:function(e){Oe.emit(Te.FRIEND_INFO_CHANGED_SYNC,e)},databaseOpened:function(e,t){Oe.emit(Te.DATABASE_OPENED,e,t)},databaseUpgradeWillStart:function(){Oe.emit(Te.DATABASE_UPGRADE_WILL_START)},databaseUpgrading:function(e){Oe.emit(Te.DATABASE_UPGRADING,e)},databaseUpgradeDidComplete:function(e){Oe.emit(Te.DATABASE_UPGRADE_DID_COMPLETE,e)},readReceiptResponseV5:function(e){Oe.emit(Te.MESSAGE_RECEIPT_RESPONSE_V5,e)},speechToTextResponse:function(e){Oe.emit(Te.SPEECH_TO_TEXT_RESPONSE,e)},translateResponse:function(e){Oe.emit(Te.TRANSLATE_RESPONSE,e)},messagesModified:function(e){Oe.emit(Te.MESSAGE_MODIFIED,e.map((function(e){return Re(e)})))},messageModifiedSyncCompleted:function(){Oe.emit(Te.MESSAGE_MODIFIED_SYNC_COMPLETED)}};function ge(e){return e>999?999:e}i.add("imlib-next","5.30.2");var me=null,Pe=null,pe=null;function Ue(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return me?[4,c.destroy()]:[2];case 1:return e.sent(),Pe=null,me=null,pe=null,[2]}}))}))}function Ce(e){if(!me)throw new Error("Not initialized yet!");return e(me,pe,Pe)}function Me(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return me?[2,e(me,pe,Pe)]:[2,d(f.BIZ_ERROR_CLIENT_NOT_INIT)]}))}))}function Le(){return me?l(me):d(f.BIZ_ERROR_CLIENT_NOT_INIT)}function De(e,t){return Ce((function(n){return n.install(e,t)}))}var Ge={TIMEOUT:{code:-1,msg:"Network timeout"},REJECTED_BY_BLACKLIST:{code:405,msg:"Blacklisted by the other party"},SEND_TOO_FAST:{code:20604,msg:"Sending messages too quickly"},NOT_IN_GROUP:{code:22406,msg:"Not in group"},ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL:{code:f.ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL,msg:"ultra group user not in private channel"},FORBIDDEN_IN_GROUP:{code:22408,msg:"Forbbiden from speaking in the group"},NOT_IN_CHATROOM:{code:23406,msg:"Not in chatRoom"},FORBIDDEN_IN_CHATROOM:{code:23408,msg:"Forbbiden from speaking in the chatRoom"},KICKED_FROM_CHATROOM:{code:23409,msg:"Kicked out and forbbiden from joining the chatRoom"},CHATROOM_NOT_EXIST:{code:23410,msg:"ChatRoom does not exist"},CHATROOM_IS_FULL:{code:23411,msg:"ChatRoom members exceeded"},PARAMETER_INVALID_CHATROOM:{code:23412,msg:"Invalid chatRoom parameters"},ROAMING_SERVICE_UNAVAILABLE_CHATROOM:{code:23414,msg:"ChatRoom message roaming service is not open, Please go to the developer to open this service"},RECALLMESSAGE_PARAMETER_INVALID:{code:25101,msg:"Invalid recall message parameter"},ROAMING_SERVICE_UNAVAILABLE_MESSAGE:{code:25102,msg:"Single group chat roaming service is not open, Please go to the developer to open this service"},PUSHSETTING_PARAMETER_INVALID:{code:26001,msg:"Invalid push parameter"},OPERATION_BLOCKED:{code:20605,msg:"Operation is blocked"},OPERATION_NOT_SUPPORT:{code:20606,msg:"Operation is not supported"},MSG_BLOCKED_SENSITIVE_WORD:{code:21501,msg:"The sent message contains sensitive words"},REPLACED_SENSITIVE_WORD:{code:21502,msg:"Sensitive words in the message have been replaced"},NOT_CONNECTED:{code:30001,msg:"Please connect successfully first"},NAVI_REQUEST_ERROR:{code:30007,msg:"Navigation http request failed"},CMP_REQUEST_ERROR:{code:30010,msg:"CMP sniff http request failed"},CONN_APPKEY_FAKE:{code:31002,msg:"Your appkey is fake"},CONN_MINI_SERVICE_NOT_OPEN:{code:31003,msg:"Mini program service is not open, Please go to the developer to open this service"},CONN_ACK_TIMEOUT:{code:31e3,msg:"Connection ACK timeout"},CONN_TOKEN_INCORRECT:{code:31004,msg:"Your token is not valid or expired"},CONN_NOT_AUTHRORIZED:{code:31005,msg:"AppKey and Token do not match"},CONN_REDIRECTED:{code:31006,msg:"Connection redirection"},CONN_APP_BLOCKED_OR_DELETED:{code:31008,msg:"AppKey is banned or deleted"},CONN_USER_BLOCKED:{code:31009,msg:"User blocked"},CONN_DOMAIN_INCORRECT:{code:31012,msg:"Connect domain error, Please check the set security domain"},ROAMING_SERVICE_UNAVAILABLE:{code:33007,msg:"Roaming service cloud is not open, Please go to the developer to open this service"},RC_CONNECTION_EXIST:{code:34001,msg:"Connection already exists"},CHATROOM_KV_EXCEED:{code:23423,msg:"ChatRoom KV setting exceeds maximum"},CHATROOM_KV_OVERWRITE_INVALID:{code:23424,msg:"ChatRoom KV already exists"},CHATROOM_KV_STORE_NOT_OPEN:{code:23426,msg:"ChatRoom KV storage service is not open, Please go to the developer to open this service"},CHATROOM_KEY_NOT_EXIST:{code:23427,msg:"ChatRoom key does not exist"},MSG_KV_NOT_SUPPORT:{code:34008,msg:"The message cannot be extended"},SEND_MESSAGE_KV_FAIL:{code:34009,msg:"Sending RC expansion message fail"},EXPANSION_LIMIT_EXCEET:{code:34010,msg:"The message expansion size is beyond the limit"},ILLGAL_PARAMS:{code:33003,msg:"Incorrect parameters passed in while calling the interface"},UPLOAD_FILE_FAILED:{code:35020,msg:"File upload failed"},CHATROOM_KV_STORE_NOT_ALL_SUCCESS:{code:23428,msg:"Chatroom kv store not all success"},CHATROOM_KV_STORE_OUT_LIMIT:{code:23429,msg:"Chatroom kv's length is out of limit"},TAG_EXISTS:{code:33101,msg:"The tag already exists"},TAG_NOT_EXIST:{code:33100,msg:"The tag does not exist"},NOT_SUPPORT:{code:f.NOT_SUPPORT,msg:"The method is not supported in a browser!"}},ye={};for(var be in Ge){var we=Ge[be].code;ye[we]=be}var Fe=0,xe=new Map;function Be(e,t){var n=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r=[],o=[];Ee([],le(xe.values()),!1).forEach((function(e){var t=le(e,3),i=t[0],a=t[1],u=t[2];i===n&&(o.push(a),u&&r.push(u))})),r.forEach((function(t){e=t(e)}));var a=t.apply(void 0,Ee([],le(e),!1));return o.forEach((function(t){t(e,a)})),a};return Object.defineProperty(n,"original",{value:t,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(n,"monitorable",{value:!0,writable:!1,enumerable:!1,configurable:!1}),n}function Ve(e,t,n){if(!e.monitorable)throw new Error("Not monitorable API: ".concat(e.name));var i=++Fe;return xe.set(i,[e,t,n]),i}function He(e){xe.delete(e)}function Ye(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(E.A_CONNECT_T,E.A_CONNECT_R).validate("token",e,o.STRING,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(E.A_CONNECT_T,JSON.stringify({token:e,reconnectKickEnable:t}),n),[4,i.connect(e,!!t,n)];case 1:return o=u.sent(),a=o.code===f.SUCCESS?"info":"warn",r[a](E.A_CONNECT_R,JSON.stringify({code:o.code,userId:o.userId}),n),o.code===f.SUCCESS?[2,{code:o.code,data:{userId:o.userId}}]:[2,{code:o.code,msg:ye[o.code]}]}}))}))}))]}))}))}var Je=Be("disconnect",(function(e,t){return Ce((function(n,i){return i.info(E.A_DISCONNECT_O),n.disconnect(e,t)}))}));function ke(e,t,n){Oe.on(e,t,n)}function Ke(e,t,n){Oe.once(e,t,n)}function je(e,t,n){Oe.off(e,t,n)}function We(e){Oe.removeAll(e)}function Qe(){Oe.clear()}var Xe=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0),Object.defineProperty(this,"messageType",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"isPersited",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"isCounted",{enumerable:!0,configurable:!0,writable:!0,value:i})},ze=function(e){function t(t,n,i){return e.call(this,t,i,n.isPersited,n.isCounted)||this}return ce(t,e),t}(Xe);var qe,Ze=function(e){function t(t){return e.call(this,A.COMBINE,S(A.COMBINE),t)||this}return ce(t,e),t}(ze),$e=function(e){function t(t){return e.call(this,A.COMBINE_V2,S(A.COMBINE_V2),t)||this}return ce(t,e),t}(ze),et=function(e){function t(t){return e.call(this,"RC:CmdMsg",S("RC:CmdMsg"),t)||this}return ce(t,e),t}(ze),tt=function(e){function t(t){return e.call(this,A.FILE,S(A.FILE),t)||this}return ce(t,e),t}(ze),nt=function(e){function t(t){return e.call(this,A.GIF,S(A.GIF),t)||this}return ce(t,e),t}(ze),it=function(e){function t(t){return e.call(this,"RC:GrpNtf",S("RC:GrpNtf"),t)||this}return ce(t,e),t}(ze),rt=function(e){function t(t){return e.call(this,A.IMAGE,S(A.IMAGE),t)||this}return ce(t,e),t}(ze),ot=function(e){function t(t){return e.call(this,"RC:InfoNtf",S("RC:InfoNtf"),t)||this}return ce(t,e),t}(ze),at=function(e){function t(t){return e.call(this,A.LOCATION,S(A.LOCATION),t)||this}return ce(t,e),t}(ze),ut=function(e){function t(t){return e.call(this,A.REFERENCE,S(A.REFERENCE),t)||this}return ce(t,e),t}(ze),st=function(e){function t(t){return e.call(this,A.RICH_CONTENT,S(A.RICH_CONTENT),t)||this}return ce(t,e),t}(ze),ct=function(e){function t(t){return e.call(this,A.SIGHT,S(A.SIGHT),t)||this}return ce(t,e),t}(ze),_t=function(e){function t(t){return e.call(this,A.TEXT,S(A.TEXT),t)||this}return ce(t,e),t}(ze),dt=function(e){function t(t){return e.call(this,A.HQ_VOICE,S(A.HQ_VOICE),t)||this}return ce(t,e),t}(ze),ft=function(e){function t(t){return e.call(this,A.VOICE,S(A.VOICE),t)||this}return ce(t,e),t}(ze);!function(e){e.ALIYUN="aliyun",e.S3="s3",e.MINIO="minio",e.QINIU="qiniu",e.RCX="rcx"}(qe||(qe={}));var lt=function(){function e(e,t,n){Object.defineProperty(this,"_url",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_authInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_getFileToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isAbort",{enumerable:!0,configurable:!0,writable:!0,value:!1})}return Object.defineProperty(e.prototype,"isAbort",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isAbort}}),Object.defineProperty(e.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._isAbort=!0,this._abortHandler()}}),Object.defineProperty(e.prototype,"upload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.file.size>T?Promise.resolve({code:f.UPLOAD_FAIL,msg:"the file size is over 5GB!"}):e.file.size>I&&this.multipartUpload?this.multipartUpload(e):this.commonUpload(e)}}),e}(),Et=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r={},(o=new FormData).set("token",i.token),o.set("key",i.fileName),o.set("file",t),this._promise=h({url:O(this._url),headers:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.QINIU}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),Rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r=O("".concat(i.ossBucketName,".").concat(this._url)),(o=new FormData).set("token",i.token),o.set("OSSAccessKeyId",i.osskeyId),o.set("policy",i.ossPolicy),o.set("Signature",i.ossSign),o.set("success_action_status","200"),o.set("key",i.fileName),o.set("file",t),this._promise=h({url:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.ALI}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt);function At(e){return Math.ceil(e/1024)||0}var St,Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return de(t,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c,_,d,l,E,R,A,S,T;return fe(this,(function(I){switch(I.label){case 0:t=e.file,n=e.fileType,I.label=1;case 1:return I.trys.push([1,3,,4]),[4,this._getFileToken(n,t.name,"POST","uploads",void 0,At(t.size))];case 2:return i=I.sent(),[3,4];case 3:return[2,{code:I.sent()}];case 4:return r=O("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),o=this.getBaseHeaders(t,i,e),this._promise=h({url:"".concat(r,"?uploads"),headers:o,method:"POST"}),[4,this._promise.result()];case 5:return a=I.sent(),u=a.status,s=a.data,this._promise=null,c=null===(T=null==s?void 0:s.match(/(?:<UploadId>)(\S*?)(?:<\/UploadId>)/))||void 0===T?void 0:T[1],200!==u&&204!==u||!c?[2,{code:f.UPLOAD_FAIL,msg:"start upload fail"}]:(_=[],[4,this.requestUploadPart(r,t,c,i.fileName,e,_)]);case 6:if(d=I.sent(),l=d.code,E=d.msg,l!==f.SUCCESS)return[2,{code:l,msg:E}];I.label=7;case 7:return I.trys.push([7,9,,10]),[4,this._getFileToken(n,i.fileName,"POST","uploadId=".concat(c),void 0,At(t.size))];case 8:return i=I.sent(),[3,10];case 9:return[2,{code:I.sent()}];case 10:return R=_.map((function(e,t){return"<Part><PartNumber>".concat(t+1,"</PartNumber><ETag>").concat(e,"</ETag></Part>")})).join(""),R="<CompleteMultipartUpload xmlns='http://s3.amazonaws.com/doc/2006-03-01/'>".concat(R,"</CompleteMultipartUpload>"),A=this.getBaseHeaders(t,i,e),this._promise=h({url:"".concat(r,"?uploadId=").concat(c),headers:A,method:"POST",body:R,timeout:0}),[4,this._promise.result()];case 11:return S=I.sent().status,this._promise=null,200===S||204===S?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.MINIO}}]:[2,{code:f.UPLOAD_FAIL,msg:"end upload fail"}]}}))}))}}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r=O("".concat(this._url,"/").concat(i.minioBucketName,"/").concat(i.fileName)),o=this.getBaseHeaders(t,i,e),this._promise=h({url:r,headers:o,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"PUT",body:t,timeout:0}),[4,this._promise.result()];case 1:return a=u.sent().status,this._promise=null,200===a||204===a?[2,{code:f.SUCCESS,data:{uniqueName:i.fileName,uploadMethod:v.MINIO}}]:[2,{code:f.UPLOAD_FAIL,msg:a.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r,o,a,u){return void 0===a&&(a=1),void 0===u&&(u=0),de(this,void 0,void 0,(function(){var s,c,_,d,l,E,R,A,S;return fe(this,(function(T){switch(T.label){case 0:if(u>=5)return[2,{code:f.UPLOAD_FAIL,msg:"Upload retry times exceeded 5. Procedure"}];s=(a-1)*I,c=Math.min(I,t.size-s),_="partNumber=".concat(a,"&uploadId=").concat(n),T.label=1;case 1:return T.trys.push([1,3,,4]),[4,this._getFileToken(r.fileType,i,"PUT",_,void 0,At(t.size))];case 2:return d=T.sent(),[3,4];case 3:return[2,{code:T.sent()}];case 4:return l=t.slice(s,a*I),E=this.getBaseHeaders(t,d,r),this._promise=h({url:"".concat(e,"?").concat(_),headers:E,method:"PUT",body:l,timeout:0,onProgress:function(e){var n;return null===(n=null==r?void 0:r.onProgress)||void 0===n?void 0:n.call(r,s+e.loaded,t.size)}}),[4,this._promise.result()];case 5:return R=T.sent(),A=R.status,S=R.xhr,this._promise=null,200===A||204===A?(o.push((null==S?void 0:S.getResponseHeader("ETag"))||""),s+c<t.size?[2,this.requestUploadPart(e,t,n,i,r,o,a+1,0)]:[2,{code:f.SUCCESS}]):[2,this.requestUploadPart(e,t,n,i,r,o,a,u+1)]}}))}))}}),Object.defineProperty(t.prototype,"getBaseHeaders",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=n.contentDisposition||("text/html"===e.type?"inline":"attachment");return{"Content-Disposition":"".concat(i,"; filename=").concat(encodeURIComponent(e.name),";"),Authorization:t.minioAuthorization,"x-amz-content-sha256":t.minioContentSha256,"x-amz-date":t.minioDate,"Content-Type":e.type||"text/plain"}}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),It=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"isSupportMultipart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(t,"multipartUpload",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return de(t,void 0,void 0,(function(){var t,n,i,r;return fe(this,(function(o){return t=e.file,n=e.onProgress,i=N.gen(),r=this._authInfo,[2,this._requestUploadPart(i,t,r.token,n)]}))}))}}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return t=e.file,n=e.onProgress,i=this._authInfo,r={},(o=new FormData).set("token",i.token),o.set("key",i.fileName),o.set("file",t),a=O(this._url),this._promise=h({url:a,headers:r,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:o,timeout:0}),[4,this._promise.result()];case 1:return u=d.sent(),s=u.status,c=u.data,this._promise=null,200!==s&&204!==s||!c?[2,{code:f.UPLOAD_FAIL,msg:s.toString()}]:(_=JSON.parse(c),[2,{code:f.SUCCESS,data:{uniqueName:_.rc_url.file_name,downloadUrl:"".concat(a,"/").concat(_.rc_url.path),uploadMethod:v.QINIU}}])}}))}))}}),Object.defineProperty(t.prototype,"_requestUploadPart",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){return void 0===r&&(r=0),de(this,void 0,void 0,(function(){var o,a,u,s,c,_,d,l,E,R;return fe(this,(function(A){switch(A.label){case 0:return o=Math.min(I,t.size-r),a=e+t.name.substring(t.name.lastIndexOf(".")),u={Range:"bytes=".concat(r,"-").concat(r+o),"X-File-TransactionId":a,"X-File-Total-Size":t.size.toString()},s=t.slice(r,r+o),(c=new FormData).set("file",s,t.name),c.set("key",a),c.set("name",a),c.set("token",n),_=O(this._url),this._promise=h({url:_,headers:u,onProgress:function(e){return null==i?void 0:i(r+e.loaded,t.size)},method:"POST",body:c,timeout:0}),[4,this._promise.result()];case 1:return d=A.sent(),l=d.status,E=d.data,this._promise=null,200===l||204===l?r+o<t.size?[2,this._requestUploadPart(e,t,n,i,r+o)]:(R=JSON.parse(E),[2,{code:f.SUCCESS,data:{uniqueName:R.rc_url.file_name,downloadUrl:"".concat(_,"/").concat(R.rc_url.path),uploadMethod:v.QINIU}}]):[2,{code:f.UPLOAD_FAIL,msg:l.toString()}]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt),vt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:null}),t}return ce(t,e),Object.defineProperty(t.prototype,"commonUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return de(this,void 0,void 0,(function(){var t,n,i,r,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return t=e.file,n=e.onProgress,i=e.contentDisposition,r=this._authInfo,o={},a=O("".concat(r.s3BucketName,".").concat(this._url)),u=new FormData,i?u.set("Content-Disposition",i):u.set("Content-Disposition","text/html"===t.type?"inline;":"attachment;"),u.set("Content-Type",t.type),u.set("x-amz-credential",r.s3Credential),u.set("x-amz-algorithm",r.s3Algorithm),u.set("x-amz-date",r.s3Date),u.set("policy",r.s3Policy),u.set("x-amz-signature",r.s3Signature),u.set("key",r.fileName),u.set("file",t),this._promise=h({url:a,headers:o,onProgress:function(e){return null==n?void 0:n(e.loaded,e.total)},method:"POST",body:u,timeout:0}),[4,this._promise.result()];case 1:return s=_.sent(),c=s.status,this._promise=null,200===c||204===c?[2,l({uniqueName:r.fileName,uploadMethod:v.AWS})]:[2,d(f.UPLOAD_FAIL,c.toString())]}}))}))}}),Object.defineProperty(t.prototype,"_abortHandler",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;null===(e=this._promise)||void 0===e||e.abort()}}),t}(lt);var ht=((St={})[qe.QINIU]=Et,St[qe.ALIYUN]=Rt,St[qe.S3]=vt,St[qe.MINIO]=Tt,St[qe.RCX]=It,St);function Ot(e,t,n,i){var r=document.createElement("canvas"),o=r.getContext("2d"),a=new Image;a.onload=function(t){var u=i||{},s=u.maxHeight,c=void 0===s?160:s,_=u.maxWidth,d=void 0===_?160:_,l=u.quality,E=void 0===l?1:l,R=u.scale,A=void 0===R?1:R,S=gt(a.width,a.height,{maxHeight:c,maxWidth:d,scale:A});r.width=Math.min(S.w,d),r.height=Math.min(S.h,c),o.drawImage(a,S.x,S.y,S.w,S.h);var T=Nt(r,E);T=T.replace(/data:image\/[^;]+;base64,/,""),e({code:f.SUCCESS,data:_e(_e({},n),{thumbnail:T,width:Math.ceil(S.w),height:Math.ceil(S.h)})})},a.onerror=function(t){e({code:f.UPLOAD_FAIL,msg:"get image info fail:".concat(JSON.stringify(t))})},a.src=(window.URL||window.webkitURL).createObjectURL(t)}function Nt(e,t){var n=e.toDataURL("image/jpeg",t);return n.length>m-10240?Nt(e,t-.1):n}var gt=function(e,t,n){var i,r,o=n.maxHeight,a=void 0===o?160:o,u=n.maxWidth,s=void 0===u?160:u,c=n.scale,_=e<t,d=0,f=0;return(_?t/e:e/t)>(void 0===c?1:c)?(_?(i=160,(r=t/(e/160))>a&&(f=(r-a)/2)):(r=160,(i=e/(t/160))>s&&(d=(i-s)/2)),{w:i,h:r,x:-d,y:-f}):(_?(r=a,i=e/(t/a)):(i=s,r=t/(e/s)),{w:i,h:r,x:-d,y:-f})},mt=0,Pt=function(){function e(e,t){Object.defineProperty(this,"_promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolve",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:++mt}),this._promise=this._handleUpload(e,t)}return Object.defineProperty(e.prototype,"abort",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;this._resolve({code:f.UPLOAD_FAIL,msg:"upload abort"}),null===(e=this._client)||void 0===e||e.abort()}}),Object.defineProperty(e.prototype,"_uploadInLoop",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i,r){return void 0===r&&(r=[]),de(this,void 0,void 0,(function(){var o,a,u,s,c,_,d;return fe(this,(function(l){switch(l.label){case 0:o=0,l.label=1;case 1:return o<e.length?(a=e[o],(u=ht[a.type])?(this._client=new u(a.url,n,i),[4,this._client.upload(t)]):(r.push({type:a.type,url:a.url,code:f.UPLOAD_FAIL,msg:"Upload type not supported"}),[3,3])):[3,4];case 2:if(s=l.sent(),c=s.code,_=s.data,d=s.msg,c===f.SUCCESS)return[2,{code:c,data:_}];if(c===f.RC_FILE_SIZE_EXCEED_LIMIT)return[2,{code:c,msg:"File size exceeds the limit"}];if(c===f.INVALID_PARAMETER_SIZE_NOT_FOUND)return[2,{code:c,msg:"File size not found"}];if(this._client.isAbort())return this._client=null,[2,{code:c,data:_,msg:d}];this._client=null,r.push({type:a.type,url:a.url,code:c,msg:d}),l.label=3;case 3:return o++,[3,1];case 4:return[2,{code:f.UPLOAD_FAIL,msg:"Failed to upload all channels, msg: ".concat(JSON.stringify(r))}]}}))}))}}),Object.defineProperty(e.prototype,"_handleUpload",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new Promise((function(i){return de(n,void 0,void 0,(function(){var n,r,o,a,u,s,c,_,d,l,E,R,A,S,T,I,v,h;return fe(this,(function(O){switch(O.label){case 0:return this._resolve=i,n=t.getFileToken,r=t.customDomain,o=t.uploadServer,a=t.ossConfig,u=e.file,s=e.fileType,c=e.thumbnailConfig,[4,n(s,u.name,void 0,void 0,void 0,At(u.size))];case 1:return _=O.sent(),d=function(e,t,n){if(t)return[{type:qe.RCX,url:t,p:"1"}];if(e)return JSON.parse(e).map((function(e){var t={type:qe.QINIU,url:"",p:""};return Object.keys(e).forEach((function(n){"p"===n?t.p=e[n]:(t.type=n,t.url=e[n])})),t})).sort((function(e,t){return e.p-t.p}));var i=[];return n&&i.push({type:qe.QINIU,url:n,p:"1"}),i}(_.ossConfig||a,r,o),0===d.length?(i({code:f.INVALID_PARAMETER_MEDIA_URL,msg:"uploadUrlList is empty"}),[2]):[4,this._uploadInLoop(d,e,_,n)];case 2:return l=O.sent(),E=l.code,R=l.data,A=l.msg,E===f.SUCCESS&&R?(S=R.downloadUrl,T=R.uploadMethod,S?[3,4]:[4,t.getFileUrl(s,R.uniqueName,T,u.name)]):(i({code:E,msg:A}),[2]);case 3:if(!(I=O.sent()).isOk)return i({code:I.code,msg:"Get download url fail"}),[2];S=I.data.downloadUrl,O.label=4;case 4:return S?(v={downloadUrl:S,uniqueName:(null==R?void 0:R.uniqueName)||"",name:u.name,size:u.size,type:u.type},s!==g.AUDIO?[3,6]:[4,u.arrayBuffer()]):(i({code:f.UPLOAD_FAIL,msg:"Get download url fail"}),[2]);case 5:return h=O.sent(),function(e,t,n){new AudioContext({sampleRate:16e3}).decodeAudioData(t,(function(t){var i,r;e({code:f.SUCCESS,data:_e(_e({},n),{duration:t.duration,length:t.length,sampleRate:null!==(i=t.sampleRate)&&void 0!==i?i:void 0,numberOfChannels:null!==(r=t.numberOfChannels)&&void 0!==r?r:void 0})})}),(function(t){e({code:f.UPLOAD_FAIL,msg:"get audio info fail:".concat(JSON.stringify(t))})}))}(i,h,v),[2];case 6:return s===g.IMAGE?(Ot(i,u,v,c),[2]):(i({code:E,data:v}),[2])}}))}))}))]}))}))}}),Object.defineProperty(e.prototype,"awaitResult",{enumerable:!1,configurable:!0,writable:!0,value:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,this._promise]}))}))}}),e}(),pt={};function Ut(e,t){var n=new Pt(e,t);return function(e){de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return pt[e.id]=e,[4,e.awaitResult()];case 1:return t.sent(),delete pt[e.id],[2]}}))}))}(n),n}function Ct(e){var t=pt[e];return!!t&&(t.abort(),!0)}var Mt=function(e,t){var n=e.getNaviInfoFromCache();return{getFileToken:e.getFileToken.bind(e),getFileUrl:e.getFileUrl.bind(e),customDomain:t||"",ossConfig:null==n?void 0:n.ossConfig,uploadServer:null==n?void 0:n.uploadServer}};function Lt(e){return de(this,void 0,void 0,(function(){var t,n,i;return fe(this,(function(r){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new R("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!g[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===g.IMAGE&&!e.type.match(/^image\//))&&!(n===g.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReadySync((function(t,n,i){var r=Ut(e,Mt(t,i.uploadDomain));return{code:f.SUCCESS,data:r}}))]}))}))}function Dt(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,{code:f.SUCCESS,data:Ct(e)}]}))}))}function Gt(e){return de(this,void 0,void 0,(function(){var t,n,i;return fe(this,(function(r){return t=e.contentDisposition,n=e.fileType,i=e.file,[2,new R("","").validate("contentDisposition",t,(function(e){return"inline"===e||"attachment"===e}),!1).validate("fileType",n,(function(e){return!!g[e]}),!0).validate("file",i,(function(e){return e instanceof File&&(!(n===g.IMAGE&&!e.type.match(/^image\//))&&!(n===g.AUDIO&&!e.type.match(/^audio\//)))}),!0).ifReady((function(t,n,i){return function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,new Pt(e,t).awaitResult()]}))}))}(e,Mt(t,i.uploadDomain))}))]}))}))}function yt(e,t,n,i){return Me((function(r){return new Promise((function(o){r.getFileToken(e,t,n,i).then((function(e){o({code:f.SUCCESS,data:e})})).catch((function(e){o({code:e,msg:ye[e]})}))}))}))}function bt(e){return new R("","").validate("mediaUrl",e,o.STRING,!0).ifReady((function(t){return new Promise((function(n){t.getFileToken(1,void 0,void 0,void 0,e).then((function(e){var t=e.token,i=e.downloadAuthInfo,r=e.deadline;n({code:f.SUCCESS,data:{token:t,downloadAuthInfo:i,deadline:r}})})).catch((function(e){n({code:e,msg:ye[e]})}))}))}))}function wt(e,t,n,i,r){return de(this,void 0,void 0,(function(){return fe(this,(function(a){return(null==i?void 0:i.isBosRes)?[2,l(i)]:[2,new R("","").validate("fileType",e,P,!0).validate("filename",t,o.STRING,!0).validate("saveName",n,o.STRING).validate("serverType",r,o.NUMBER).ifReady((function(i){return i.getFileUrl(e,t,r||v.QINIU,n)}))]}))}))}var Ft=rr,xt=Be("sendMessage",(function(t,n,i){return de(void 0,void 0,void 0,(function(){return fe(this,(function(r){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("message",n,(function(){return n instanceof Xe}),!0).validate("message",n,(function(){if(!U(n.content))return!1;if(!(null==i?void 0:i.isMentioned))return!0;var e=n.content.mentionedInfo||{type:null==i?void 0:i.mentionedType,userIdList:null==i?void 0:i.mentionedUserIdList};if(!U(e))return!1;var t=e.type,r=e.userIdList,o=void 0===r?[]:r,u=e.mentionedContent;return!![C.ALL,C.SINGAL].includes(t)&&(("string"==typeof u||void 0===u)&&(a(o)&&o.every((function(e){return M(e)}))))}),!0).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==t?void 0:t.targetId,M,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("isStatusMessage",null==i?void 0:i.isStatusMessage,o.BOOLEAN).validate("disableNotification",null==i?void 0:i.disableNotification,o.BOOLEAN).validate("pushContent",null==i?void 0:i.pushContent,o.STRING).validate("pushData",null==i?void 0:i.pushData,o.STRING).validate("isMentioned",null==i?void 0:i.isMentioned,o.BOOLEAN).validate("mentionedType",null==i?void 0:i.mentionedType,o.NUMBER).validate("mentionedUserIdList",null==i?void 0:i.mentionedUserIdList,L({itemValidator:M})).validate("directionalUserIdList",null==i?void 0:i.directionalUserIdList,L({maxLength:300,itemValidator:M})).validate("isVoipPush",null==i?void 0:i.isVoipPush,o.BOOLEAN).validate("canIncludeExpansion",null==i?void 0:i.canIncludeExpansion,o.BOOLEAN).validate("expansion",null==i?void 0:i.expansion,o.OBJECT).validate("pushConfig",null==i?void 0:i.pushConfig,o.OBJECT).validate("messageId",null==i?void 0:i.messageId,o.NUMBER).validate("disableUpdateLastMessage",null==i?void 0:i.disableUpdateLastMessage,o.BOOLEAN).ifReady((function(r,o){return de(void 0,void 0,void 0,(function(){var a,u,s,c,_,d,l,R,A,S,T,I,v,h,O,N,g,m,P,p,U,C;return fe(this,(function(M){switch(M.label){case 0:return u=(a=i||{}).disableNotification,s=a.isMentioned,c=a.directionalUserIdList,_=a.canIncludeExpansion,d=a.onSendBefore,l=a.expansion,R=a.pushConfig,A=a.isStatusMessage,S=a.disableUpdateLastMessage,T=o.createTraceId(),I=t.conversationType,v=t.targetId,h=t.channelId,c&&c.length>0&&![3,7,8,10].includes(I)?[2,{code:f.RC_DIRECTIONAL_MESSAGE_INVALID_CONVERSATION_TYPE}]:S&&I===e.ULTRA_GROUP?[2,{code:f.INVALID_DISABLE_UPDATE_LAST_MESSAGE}]:(O=function(e,t,n){var i=e.isStatusMessage,r=e.disableNotification,o=e.pushContent,a=e.pushData,u=e.isMentioned,s=e.mentionedType,c=e.mentionedUserIdList,_=e.directionalUserIdList,d=e.isVoipPush,f=e.canIncludeExpansion,l=e.expansion,E=e.isFilerWhiteBlacklist,R=e.pushConfig,A=e.messageId,S=e.disableUpdateLastMessage,T=e.needReceipt,I=n.channelId;return _e({isStatusMessage:i,disableNotification:r,pushContent:o,pushData:a,isMentioned:u,mentionedType:s,mentionedUserIdList:c,directionalUserIdList:_,isVoipPush:d,canIncludeExpansion:f,expansion:l,isFilerWhiteBlacklist:E,pushConfig:R,channelId:I||"",messageId:A,disableUpdateLastMessage:S,needReceipt:T},t)}(i||{},n,t),N={isMentioned:!!s,content:n.content,messageType:n.messageType,isPersited:!!n.isPersited,isCounted:!!n.isCounted,disableNotification:!!u,canIncludeExpansion:!!_,expansion:l||null,conversationType:t.conversationType,targetId:t.targetId,channelId:t.channelId,senderUserId:r.getCurrentUserId(),messageUId:"",messageDirection:D.SEND,receivedTime:0,isStatusMessage:!!A,receivedStatus:G.UNREAD,isOffLineMessage:!1,pushConfig:R,sentStatus:y.SENDING,sentTime:0,directedUserIds:c||[],disableUpdateLastMessage:S},I!==e.ULTRA_GROUP&&(N.isOffLineMessage=!1),g=function(e){N.messageId=e;try{d&&d(Re(N))}catch(e){o.error(E.A_SEND_MSG_T,'Callback method "onSendBefore" execution error.\n'.concat(null==e?void 0:e.stack),T)}},o.info(E.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:I,targetId:v,channelId:h}),T),[4,r.sendMessage(I,v,O,T,g)]);case 1:return m=M.sent(),P=m.code,p=m.data,U=m.msg,P===f.SUCCESS?(o.info(E.A_SEND_MSG_R,JSON.stringify({code:P,messageUId:p.messageUId,messageId:p.messageId}),T),C=Re(p),[2,{code:P,data:C}]):(o.warn(E.A_SEND_MSG_R,JSON.stringify({code:P}),T),N.sentTime=(null==p?void 0:p.sentTime)||0,N.sentStatus=null==p?void 0:p.sentStatus,[2,{code:P,msg:U||ye[P],data:Re(N)}])}}))}))}))]}))}))}));function Bt(e,t,n){var i=new _t(t);return xt(e,i,n)}function Vt(e,t){return function(n,i,r,a){var u;if(!p("sendOptions.contentDisposition",null==a?void 0:a.contentDisposition,(function(e){return["inline","attachment"].includes(e)})))return Promise.resolve({code:f.INVALID_PARAMETER_SENDOPTIONS});var s={contentDisposition:null==a?void 0:a.contentDisposition};if(a&&"thumbnailConfig"in a){var c=null===(u=a)||void 0===u?void 0:u.thumbnailConfig;if(!(p("sendOptions.maxHeight",null==c?void 0:c.maxHeight,o.NUMBER)&&p("sendOptions.maxWidth",null==c?void 0:c.maxWidth,o.NUMBER)&&p("sendOptions.quality",null==c?void 0:c.quality,o.NUMBER)&&p("sendOptions.scale",null==c?void 0:c.scale,o.NUMBER)))return Promise.resolve({code:f.INVALID_PARAMETER_SENDOPTIONS});s.thumbnailConfig=c}return Me((function(o,u,c){return new Promise((function(o){var c=u.createTraceId();u.info(E.L_MEDIA_UPLOAD_T,JSON.stringify({filesize:i.file.size,type:e}),c),Gt({file:i.file,fileType:e,onProgress:function(e,t){var n;null===(n=null==r?void 0:r.onProgress)||void 0===n||n.call(r,Math.floor(e/t*100))},contentDisposition:s.contentDisposition,thumbnailConfig:s.thumbnailConfig}).then((function(e){var s,_=e.code,d=e.data,l=e.msg;if(_===f.SUCCESS&&d){var R=(null===(s=null==r?void 0:r.onComplete)||void 0===s?void 0:s.call(r,_e({url:d.downloadUrl},d)))||t(d,i);return u.info(E.L_MEDIA_UPLOAD_R,JSON.stringify({downurl:d.downloadUrl,code:f.SUCCESS}),c),void xt(n,R,a).then(o)}o({code:_,msg:l})}))}))}))}}var Ht=Vt(g.FILE,(function(e,t){var n,i,r={name:e.name,size:t.file.size,type:(n=e.name,i=n.match(/\.(\w+)$/),i?i[1]:"bin"),fileUrl:e.downloadUrl};return t.user&&(r.user=t.user),t.extra&&(r.extra=t.extra),t.mentionedInfo&&(r.mentionedInfo=t.mentionedInfo),new tt(r)})),Yt=Vt(g.IMAGE,(function(e,t){var n={content:e.thumbnail,imageUri:e.downloadUrl,thumWidth:e.width,thumHeight:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new rt(n)})),Jt=Vt(g.IMAGE,(function(e,t){var n={gifDataSize:e.size,remoteUrl:e.downloadUrl,width:e.width,height:e.height};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new nt(n)})),kt=Vt(g.AUDIO,(function(e,t){var n,i={remoteUrl:e.downloadUrl,duration:Math.floor(null!==(n=e.duration)&&void 0!==n?n:0),sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels};return t.user&&(i.user=t.user),t.extra&&(i.extra=t.extra),t.mentionedInfo&&(i.mentionedInfo=t.mentionedInfo),t.audit&&(i.audit=t.audit),new dt(i)})),Kt=Vt(g.SIGHT,(function(e,t){var n={sightUrl:e.downloadUrl,content:t.thumbnail,duration:t.duration,size:t.file.size||e.size,name:t.name||e.name};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),t.audit&&(n.audit=t.audit),new ct(n)}));function jt(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getHistoryMessage(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Wt(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getRemoteHistoryMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Qt(t,n,i,r){return de(this,void 0,void 0,(function(){var a=this;return fe(this,(function(u){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("targetId",t,o.STRING,!0).validate("messageUId",n,o.STRING,!0).validate("timestamp",i,(function(e){return b(e)&&e>0}),!0).validate("channelId",r,o.CHANNEL_ID).ifReady((function(o){return de(a,void 0,void 0,(function(){var o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return o={targetId:t,conversationType:e.PRIVATE,channelId:r},a=new Xe("RC:ReadNtf",{messageUId:n,lastMessageSendTime:i,type:1}),[4,xt(o,a)];case 1:return u=_.sent(),s=u.code,c=u.msg,0===s?[2,{code:s}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}function Xt(t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(a){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("targetId",t,o.STRING,!0).validate("messageUId",n,o.STRING,!0).validate("channelId",i,o.CHANNEL_ID).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,o,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r="messageUId:".concat(n,",targetId:").concat(t),a.debug(E.A_SEND_MSG_T,"send read receipt message ->".concat(r)),o=new Xe("RC:RRReqMsg",{messageUId:n}),u={targetId:t,conversationType:e.GROUP,channelId:i},[4,xt(u,o)];case 1:return s=d.sent(),c=s.code,_=s.msg,0===c?[2,{code:c}]:[2,{code:c,msg:_}]}}))}))}))]}))}))}function zt(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(e){throw new Error("This method is deprecated, please use method sendReadReceiptResponseV2.")}))}))}function qt(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.sendReadReceipt(e,t,n)}))]}))}))}function Zt(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_SYNC_READ_STATUS_T,E.A_SYNC_READ_STATUS_R).validate("timestamp",n,o.NUMBER,!0).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return[e.GROUP,e.PRIVATE,e.APP_PUBLIC_SERVICE,e.PUBLIC_SERVICE,e.SYSTEM].includes(t)}),!0).validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", timestamp:").concat(n),o=r.createTraceId(),r.info(E.A_SYNC_READ_STATUS_T,i,o),1!==(null==(a=e.getNaviInfoFromCache())?void 0:a.sesDriven)?[3,2]:[4,e.updateConversationReadTime(t,n)];case 1:return u=d.sent(),[3,4];case 2:return s=new Xe(A.SYNC_READ_STATUS,{lastMessageSendTime:n}),[4,xt(t,s)];case 3:u=d.sent(),d.label=4;case 4:return c=u.code,_=u.msg,r[c===f.SUCCESS?"info":"warn"](E.A_SYNC_READ_STATUS_R,"code: ".concat(c,", msg: ").concat(_),o),[2,{code:c,msg:_}]}}))}))}))]}))}))}function $t(t,n,i){return void 0===i&&(i=""),de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(a){return[2,new R(E.A_SEND_MESSAGE_READ_RECEIPT_V4_T,E.A_SEND_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP||t===e.PRIVATE}),!0,"It should be ConversationType.GROUP or ConversationType.PRIVATE").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("startMsgUId",i,o.ONLY_STRING,!0).validate("endMsgUId",n,o.STRING,!0).ifReady((function(e,o){return de(r,void 0,void 0,(function(){var r,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r=o.createTraceId(),a="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", startMsgUId:").concat(i,", endMsgUId: ").concat(n),o.info(E.A_SEND_MESSAGE_READ_RECEIPT_V4_T,a,r),3!==(null==(u=e.getNaviInfoFromCache())?void 0:u.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.sendReadReceiptMessageV4(t,i,n)];case 1:return s=d.sent(),c=s.code,_=s.msg,o[c===f.SUCCESS?"info":"warn"](E.A_SEND_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(c,", msg: ").concat(_),r),[2,{code:c,msg:_}]}}))}))}))]}))}))}function en(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_GET_MESSAGE_READ_RECEIPT_V4_T,E.A_GET_MESSAGE_READ_RECEIPT_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("messageUId",n,o.STRING,!0).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n),o=r.createTraceId(),r.info(E.A_GET_MESSAGE_READ_RECEIPT_V4_T,i,o),3!==(null==(a=e.getNaviInfoFromCache())?void 0:a.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.getMessageReadReceiptV4(t,n)];case 1:return u=d.sent(),s=u.code,c=u.msg,_=u.data,r[s===f.SUCCESS?"info":"warn"](E.A_GET_MESSAGE_READ_RECEIPT_V4_R,"code: ".concat(s,", msg: ").concat(c),o),s===f.SUCCESS&&_?[2,{code:s,data:_}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}function tn(t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R).validate("conversation",t,o.OBJECT,!0).validate("conversationType",null==t?void 0:t.conversationType,(function(t){return t===e.GROUP}),!0,"It should be ConversationType.GROUP").validate("targetId",null==t?void 0:t.targetId,o.STRING,!0).validate("channelId",null==t?void 0:t.channelId,o.CHANNEL_ID).validate("messageUId",n,(function(e){return!!p("messageUIds",e,o.ARRAY,!0)&&!e.some((function(e){return!w(e)}))}),!0).ifReady((function(e,r){return de(i,void 0,void 0,(function(){var i,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return i="conversationType:".concat(t.conversationType,",targetId:").concat(t.targetId,",\n channelId: ").concat(t.channelId,", messageUid:").concat(n.toString()),o=r.createTraceId(),r.info(E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T,i,o),3!==(null==(a=e.getNaviInfoFromCache())?void 0:a.grpRRVer)?[2,{code:f.READ_RECEIPT_V4_NOT_SUPPORT}]:[4,e.batchGetMessageReadReceiptInfoV4(t,n)];case 1:return u=d.sent(),s=u.code,c=u.msg,_=u.data,r[s===f.SUCCESS?"info":"warn"](E.A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R,"code: ".concat(s,", msg: ").concat(c),o),s===f.SUCCESS?[2,{code:s,data:_}]:[2,{code:s,msg:c}]}}))}))}))]}))}))}Vt(g.COMBINE_HTML,(function(e,t){var n={remoteUrl:e.downloadUrl,nameList:t.nameList,summaryList:t.summaryList,conversationType:t.conversationType};return t.user&&(n.user=t.user),t.extra&&(n.extra=t.extra),t.mentionedInfo&&(n.mentionedInfo=t.mentionedInfo),new Ze(n)}));var nn=Be("recallMessage",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return de(void 0,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,n.recallMessage(e,t)];case 1:return[2,i.sent().trans((function(e){return Re(e)}))]}}))}))}))]}))}))}));function rn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.deleteRemoteMessage(e,t)}))]}))}))}function on(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.deleteRemoteMessageByTimestamp(e,t)}))]}))}))}function an(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchClearRemoteHistoryMessages(e,t)}))]}))}))}function un(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.updateMessageExpansion(e,t)}))]}))}))}function sn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeMessageExpansion(e,t)}))]}))}))}function cn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(E.A_SEND_MSG_T,E.A_SEND_MSG_R).validate("conversation",e,o.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,o.STRING,!0).validate("channelId",null==e?void 0:e.channelId,o.CHANNEL_ID).validate("messageType",t,o.STRING,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return n={messageType:"RC:TypSts",content:{typingContentType:t},isStatusMessage:!0,channelId:e.channelId},o=r.createTraceId(),r.info(E.A_SEND_MSG_T,JSON.stringify({messageType:n.messageType,conversationType:e.conversationType,targetId:e.targetId,channelId:e.channelId}),o),[4,i.sendMessage(e.conversationType,e.targetId,n,o)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",r[c](E.A_SEND_MSG_R,JSON.stringify({code:u,messageUId:s?s.messageUId:"",messageId:s?s.messageId:""}),o),u===f.SUCCESS?[2,{code:u,data:Re(s)}]:[2,{code:u,msg:ye[u]}]}}))}))}))]}))}))}function _n(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_MESSAGE_READER_T,he.A_GET_MESSAGE_READER_R).validate("messageUId",t,o.STRING,!0).validate("targetId",e,o.STRING,!0).validate("channelId",n,o.CHANNEL_ID).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_MESSAGE_READER_T,JSON.stringify({targetId:e,messageUId:t,channelId:n}),i),[4,r.getMessageReader(e,t,n)];case 1:return a=c.sent(),u=a.code,s=a.data,u===f.SUCCESS?(o.info(he.A_GET_MESSAGE_READER_R,JSON.stringify({code:u,totalMemberCount:null==s?void 0:s.totalMemberCount}),i),[2,{code:u,data:s}]):(o.warn(he.A_GET_MESSAGE_READER_R,JSON.stringify({code:u})),[2,{code:u,msg:ye[u]}])}}))}))}))]}))}))}function dn(e,t,n,i,a){return Ce((function(u,s){return r("messageType",e,o.STRING,!0),r("isPersited",t,o.BOOLEAN,!0),r("isCounted",n,o.BOOLEAN,!0),r("isStatusMessage",a,o.BOOLEAN,!1),r("searchProps",i,o.ARRAY),s.info(E.A_REGTYP_O,JSON.stringify({messageType:e,isCounted:n,isStatusMessage:a,isPersited:t})),u.registerMessageType(e,t,n,i,a),function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),function(i){return new Xe(e,i,t,n)}}(e,t,n)}))}function fn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getFirstUnreadMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return e?Re(e):null}))]}}))}))}function ln(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getFirstUnreadMessageDigest(e)}))]}))}))}function En(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){return fe(this,(function(i){return Se("insertMessage","electronExtension.insertMessage"),[2,tr(e,t,n)]}))}))}function Rn(e){throw new Error("getUnreadMentionedMessages is deprecated, please use electronExtension.getUnreadMentionedMessages instead")}function An(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){return Se("RongIMLib.searchMessages","RongIMLib.ElectronExtension.searchMessagesWithParams"),[2,qi(e,t,n,i)]}))}))}function Sn(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return Se("RongIMLib.deleteLocalMessagesByTimestamp","RongIMLib.electronExtension.deleteMessagesByTimestamp"),[2,er(e,t,n)]}))}))}function Tn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("RongIMLib.clearMessages","RongIMLib.electronExtension.clearMessages"),[2,$i(e)]}))}))}function In(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){return Se("searchConversationByContent","electronExtension.searchConversationByContent"),[2,Xi(e,null!=n?n:[A.TEXT,A.FILE],i,t)]}))}))}function vn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R).validate("conversation",e,o.OBJECT,!0).validate("conversationType",null==e?void 0:e.conversationType,o.CONVERSATION_TYPE,!0).validate("targetId",null==e?void 0:e.targetId,o.STRING,!0).validate("channelId",null==e?void 0:e.channelId,o.CHANNEL_ID).validate("timestamp",t,o.NUMBER).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return n=e.conversationType,o=e.targetId,a=e.channelId,u=void 0===a?"":a,s=r.createTraceId(),r.info(he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_T,JSON.stringify({conversationType:n,targetId:o,channelId:u,timestamp:t}),s),[4,i.clearUnreadCountByTimestamp(n,o,t,u)];case 1:return c=d.sent(),_=c===f.SUCCESS?"info":"warn",r[_](he.A_CLEAR_UNREAD_COUNT_BY_TIMESTAMP_R,JSON.stringify({code:c}),s),c===f.SUCCESS?[2,{code:c}]:[2,{code:c,msg:ye[c]}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))}function hn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Zi(e,t)]}))}))}function On(e){return Le().next((function(t){return t.sse.requestStreamMessageContent(e)}))}function Nn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.sendReadReceiptResponseV5(e,t)]}))}))}))]}))}))}function gn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getMessageReadReceiptInfoV5(e,t)]}))}))}))]}))}))}function mn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getMessageReadReceiptInfoV5ByIdentifiers(e)]}))}))}))]}))}))}function Pn(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){return[2,r.getMessagesReadReceiptUsersByPageV5(e,t,n)]}))}))}))]}))}))}function pn(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){return[2,r.getMessagesReadReceiptByUsersV5(e,t,n)]}))}))}))]}))}))}function Un(e,t){return Le().next((function(n){return n.requestSpeechToTextForMessage(e,t)}))}function Cn(e){return Le().next((function(t){return t.translateMessagesWithParams(e)}))}function Mn(e){return Le().next((function(t){return t.translateTextsWithParams(e)}))}function Ln(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("modifyMessage","modifyMessageWithParams"),[2,Dn({messageUId:null==t?void 0:t.messageUId,messageContent:e,conversation:{conversationType:null==t?void 0:t.conversationType,targetId:null==t?void 0:t.targetId,channelId:null==t?void 0:t.channelId}})]}))}))}function Dn(e){return Le().next((function(t){return t.modifyMessageWithParams(e)}))}function Gn(e){return Le().next((function(t){var n=function(e){return e.map((function(e){return{messageUId:e.messageUId,message:e.message?Re(e.message):void 0,code:e.code}}))};return t.refreshReferenceMessageWithParams(_e(_e({},e),{remoteMessageBlock:function(t){e.remoteMessageBlock&&e.remoteMessageBlock(n(t))},localMessageBlock:function(t){e.localMessageBlock&&e.localMessageBlock(n(t))}}))}))}function yn(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){switch(i.label){case 0:return Se("getConversationList","getConversationListByTimestamp"),[4,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getConversationList({count:(null==e?void 0:e.count)||300,startTime:(null==e?void 0:e.startTime)||0,order:null==e?void 0:e.order,channelId:t})]}))}))}))];case 1:return[2,i.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function bn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getAllConversationList(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function wn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){return[2,n.getConversationListByTimestamp(e)]}))}))}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function Fn(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,n.getConversation(e)];case 1:return[2,t.sent().trans((function(e){return Ae(e)}))]}}))}))}))]}))}))}var xn=Be("removeConversation",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeConversation(e,t)}))]}))}))}));function Bn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("batchRemoveConversation","batchDeleteConversations"),[2,Vn({identifiers:e,deleteRemotely:!1,deleteMessages:!1})]}))}))}function Vn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchDeleteConversations(e)}))]}))}))}function Hn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getTextMessageDraft(e)}))]}))}))}function Yn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.saveTextMessageDraft(e,t)}))]}))}))}function Jn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearTextMessageDraft(e)}))]}))}))}function kn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCount(t,e)}))]}))}))}function Kn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCountByLevels(e,t)}))]}))}))}function jn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getTotalUnreadCountByLevels(e,t,!0)}))]}))}))}function Wn(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUnreadCount(e)}))]}))}))}var Qn=Be("clearMessagesUnreadStatus",(function(e){return de(void 0,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearUnreadCount(e)}))]}))}))}));function Xn(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.clearAllUnreadCount()}))]}))}))}var zn=Be("setConversationNotificationLevel",(function(e,t){return de(void 0,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationNotificationLevel([e],t)}))]}))}))}));function qn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationNotificationLevel(e,t)}))]}))}))}function Zn(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchSetConversationTranslateStrategy(e,t)}))]}))}))}function $n(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,Le().next((function(i){return de(n,void 0,void 0,(function(){var n;return fe(this,(function(r){return t!==x.CLOSE&&t!==x.OPEN?[2,d(f.INVALID_PARAMETER_NOTIFICATION_LEVEL)]:(n=B(t),[2,i.batchSetConversationNotificationLevel([e],n)])}))}))}))]}))}))}function ei(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getConversationNotificationLevel(e)}))]}))}))}function ti(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,Le().next((function(n){return de(t,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,n.getConversationNotificationLevel(e)];case 1:return[2,t.sent().trans((function(e){return V(e)}))]}}))}))}))]}))}))}function ni(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return[4,Le().next((function(e){return e.getBlockedConversationList()}))];case 1:return[2,e.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function ii(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setConversationTypeNotificationLevel(e,t)}))]}))}))}function ri(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getConversationTypeNotificationLevel(e)}))]}))}))}var oi=Be("setConversationToTop",(function(e,t,n,i){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===i&&(i=!1),de(void 0,void 0,void 0,(function(){return fe(this,(function(r){return[2,Le().next((function(r){return r.batchSetConversationToTop([e],!!t,n,i)}))]}))}))}));function ai(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),de(this,void 0,void 0,(function(){return fe(this,(function(r){return[2,Le().next((function(r){return r.batchSetConversationToTop(e,!!t,i,n)}))]}))}))}function ui(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getTopConversationList(e,t)}))];case 1:return[2,n.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function si(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function ci(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUnreadMentionedCount(e)}))]}))}))}function _i(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getAllUnreadMentionedCount()}))]}))}))}function di(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){var n,i,r;return t.getRealtimeConversations(null!==(n=null==e?void 0:e.count)&&void 0!==n?n:30,null!==(i=null==e?void 0:e.startTime)&&void 0!==i?i:0,null!==(r=null==e?void 0:e.order)&&void 0!==r?r:0)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function fi(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getRealtimeConTotalUnreadCount()}))]}))}))}function li(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearRealtimeConUnreadCount(e)}))]}))}))}function Ei(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeRealtimeConversations(e)}))]}))}))}function Ri(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchGetRealtimeConUnreadCount(e)}))]}))}))}function Ai(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadMentionMeConversationList(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))}function Si(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUltraGroupList(e)}))]}))}))}function Ti(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){switch(e.label){case 0:return[4,Le().next((function(e){return e.getBlockedUGList()}))];case 1:return[2,e.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}function Ii(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.sendUltraGroupTypingStatus(e)}))]}))}))}function vi(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){switch(i.label){case 0:return[4,Le().next((function(i){return de(n,void 0,void 0,(function(){return fe(this,(function(n){return[2,i.getUltraGroupMessageListByMessageUId(e,t)]}))}))}))];case 1:return[2,i.sent().trans((function(e){var t={};for(var n in e)t[n]=e[n]?Re(e[n]):void 0;return t}))]}}))}))}function hi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("updateExpansionForUltraGroupMessage","updateMessageExpansion"),[2,un(e,t)]}))}))}function Oi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("removeExpansionForUltraGroupMessage","removeMessageExpansionForKey"),[2,sn(e,t)]}))}))}function Ni(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeAllMessageExpansion(e)}))]}))}))}function gi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUGUnreadCountForAllChannels(e,!0,t)}))]}))}))}function mi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,null==e?void 0:e.channelId)}))]}))}))}function Pi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setUltraGroupDefaultNotificationLevel(null==e?void 0:e.targetId,t,null==e?void 0:e.channelId)}))]}))}))}function pi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUGUnreadCountForAllChannels(e,!1,t)}))]}))}))}function Ui(){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("getAllUltraGroupUnreadCount","getTotalUnreadCountByLevels"),[2,Kn([e.ULTRA_GROUP],[])]}))}))}function Ci(){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("getAllUltraGroupUnreadMentionedCount","getTotalUnreadMentionedCountByLevels"),[2,jn([e.ULTRA_GROUP],[])]}))}))}function Mi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGUnreadMentionedDigest(e)}))]}))}))}function Li(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGFirstUnreadMessageDigest(e)}))]}))}))}function Di(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getUGUnreadInfoList(e)}))]}))}))}function Gi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_ADD_TO_BLACKLIST_T,he.A_ADD_TO_BLACKLIST_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_ADD_TO_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.addToBlacklist(e)];case 1:return r=a.sent(),o=r===f.SUCCESS?"info":"warn",i[o](he.A_ADD_TO_BLACKLIST_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function yi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_REMOVE_FROM_BLACKLIST_T,he.A_REMOVE_FROM_BLACKLIST_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_REMOVE_FROM_BLACKLIST_T,JSON.stringify({userId:e}),t),[4,n.removeFromBlacklist(e)];case 1:return r=a.sent(),o=r===f.SUCCESS?"info":"warn",i[o](he.A_REMOVE_FROM_BLACKLIST_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function bi(){return de(this,void 0,void 0,(function(){var e=this;return fe(this,(function(t){return[2,new R(he.A_GET_BLACKLIST_T,he.A_GET_BLACKLIST_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o;return fe(this,(function(a){switch(a.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_BLACKLIST_T,"getBlacklist -> ",e),[4,t.getBlacklist()];case 1:return i=a.sent(),r=i.code,o=i.data,r===f.SUCCESS&&o?(n.info(he.A_GET_BLACKLIST_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]):(n.warn(he.A_GET_BLACKLIST_R,JSON.stringify({code:r}),e),[2,{code:r}])}}))}))}))]}))}))}function wi(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_BLACKLIST_STATUS_T,he.A_GET_BLACKLIST_STATUS_R).validate("userId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_BLACKLIST_STATUS_T,JSON.stringify({userId:e}),t),[4,n.getBlacklistStatus(e)];case 1:return r=u.sent(),o=r.code,a=r.data,o===f.SUCCESS?(i.info(he.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:o,data:0===a}),t),[2,{code:o,data:0===a}]):(i.warn(he.A_GET_BLACKLIST_STATUS_R,JSON.stringify({code:o}),t),[2,{code:o}])}}))}))}))]}))}))}function Fi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.createTag(e)}))]}))}))}function xi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.removeTag(e)}))]}))}))}function Bi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.updateTag(e)}))]}))}))}function Vi(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getTagList()}))]}))}))}function Hi(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getTagsForConversation(e)}))]}))}))}function Yi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.addTagForConversations(e,t)}))]}))}))}function Ji(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))}function ki(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagsForConversation(e,t)}))]}))}))}function Ki(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.removeTagForConversations(e,t)}))]}))}))}function ji(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,Le().next((function(i){return i.getConversationListByTag(e,n,t)}))];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return _e(_e({},Ae(t=e)),{isTopInTag:t.isTopInTag});var t}))}))]}}))}))}function Wi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getUnreadCountByTag(e,t)}))]}))}))}function Qi(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.setConversationStatusInTag(e,t,{isTop:n})}))]}))}))}function Xi(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,Le().next((function(o){return de(r,void 0,void 0,(function(){return fe(this,(function(r){switch(r.label){case 0:return[4,o.searchConversationByContent(e,t,n,i)];case 1:return[2,r.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}))]}))}))}function zi(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.searchMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.totalMatched,n=e.messages;return e.conditionsMatched,{count:t,messages:n.map((function(e){return Re(e)}))}}))]}}))}))}function qi(e,t,n,i,r){return de(this,void 0,void 0,(function(){return fe(this,(function(o){return Se("RongIMLib.electronExtension.searchMessages","RongIMLib.electronExtension.searchMessagesWithParams"),[2,zi(e,{keyword:t,limit:i||J,order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{objectNames:r}})]}))}))}function Zi(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return console.warn("`setMessageReceivedStatus` has being deprecated, use `setMessageReceivedStatusInfo` instead."),F()?[2,new R(he.A_E_SET_MESSAGE_RECEIVED_STATUS_T,he.A_E_SET_MESSAGE_RECEIVED_STATUS_R).validate("messageId",e,o.NUMBER,!0).validate("receivedStatus",t,(function(e){return!H(G[e])}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o;return fe(this,(function(a){switch(a.label){case 0:return n=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_RECEIVED_STATUS_T,JSON.stringify({messageId:e,receivedStatus:t}),n),[4,i.setMessageReceivedStatus(e,t)];case 1:return o=a.sent(),r.info(he.A_E_SET_MESSAGE_RECEIVED_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))}function $i(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.clearLocalMessages(e)}))]}))}))}function er(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.deleteLocalMessagesByTimestamp(e,t,n)}))]}))}))}function tr(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){return fe(this,(function(i){return t instanceof Xe?[2,ir(e,t,n)]:[2,nr(e,t,n)]}))}))}function nr(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){var i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return i=!!(null==n?void 0:n.isUnread),r=null==n?void 0:n.searchContent,o=null==n?void 0:n.disableUpdateLastMessage,a={senderUserId:null==t?void 0:t.senderUserId,messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,messageDirection:null==t?void 0:t.messageDirection,readStatus:"object"==typeof(null==t?void 0:t.receivedStatusInfo)?Y(t.receivedStatusInfo):null==t?void 0:t.receivedStatus,sentTime:null==t?void 0:t.sentTime,sentStatus:null==t?void 0:t.sentStatus,searchContent:r,messageUId:"",isUnread:i,disableNotification:null==t?void 0:t.disableNotification,canIncludeExpansion:null==t?void 0:t.canIncludeExpansion,expansion:(null==t?void 0:t.expansion)||void 0,directedUserIds:null==t?void 0:t.directedUserIds,disableUpdateLastMessage:(null==t?void 0:t.disableUpdateLastMessage)||o},[4,Le().next((function(t){return t.insertMessage(e,a)}))];case 1:return[2,u.sent().trans(Re)]}}))}))}function ir(e,t,n){return void 0===n&&(n={}),de(this,void 0,void 0,(function(){var i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return i=!!(null==n?void 0:n.isUnread),r=null==n?void 0:n.searchContent,o=null==n?void 0:n.disableUpdateLastMessage,a={senderUserId:"",messageType:null==t?void 0:t.messageType,content:null==t?void 0:t.content,searchContent:r,messageDirection:D.SEND,isUnread:i,messageUId:"",disableUpdateLastMessage:o},[4,Le().next((function(t){return t.insertMessage(e,a)}))];case 1:return[2,u.sent().trans(Re)]}}))}))}function rr(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getLocalMessage(e)}))];case 1:return[2,t.sent().trans((function(e){return Re(e)}))]}}))}))}var or=Object.freeze({__proto__:null,getAllConversationList:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return Se("electronExtension.getAllConversationList","getAllConversationList"),[2,bn(e)]}))}))},getConversationList:function(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){switch(o.label){case 0:return Se("electronExtension.getConversationList","getAllConversationList or getConversationListByTimestamp"),[4,Le().next((function(o){return de(r,void 0,void 0,(function(){return fe(this,(function(r){return[2,o.getConversationList({startTime:e,count:t,channelId:n,topPriority:i})]}))}))}))];case 1:return[2,o.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))},searchConversationByContent:Xi,getConversations:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getConversations(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Ae)}))]}}))}))},getUntaggedConversationListByPage:function(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,Le().next((function(r){return de(i,void 0,void 0,(function(){return fe(this,(function(i){switch(i.label){case 0:return[4,r.getUntaggedConversationListByPage(e,t,n)];case 1:return[2,i.sent().trans((function(e){return e.map((function(e){return Ae(e)}))}))]}}))}))}))]}))}))},getRemoteConversations:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.syncRemoteConversations()}))]}))}))},saveEditedMessageDraft:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chat.saveEditedMessageDraft(e,t)}))]}))}))},getEditedMessageDraft:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chat.getEditedMessageDraft(e)}))]}))}))},clearEditedMessageDraft:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chat.clearEditedMessageDraft(e)}))]}))}))},searchMessages:qi,searchMessageInTimeRange:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return Se("RongIMLib.electronExtension.searchMessageInTimeRange","RongIMLib.electronExtension.searchMessagesWithParams"),[2,zi(e,{keyword:null==t?void 0:t.keyword,limit:(null==t?void 0:t.limit)||5,offset:null==t?void 0:t.offset,order:0,timeRange:{startTime:null==t?void 0:t.startTime,endTime:null==t?void 0:t.endTime}})]}))}))},searchMessagesByUser:function(e,t,n,i){return de(this,void 0,void 0,(function(){return fe(this,(function(r){switch(r.label){case 0:return Se("RongIMLib.electronExtension.searchMessagesByUser","RongIMLib.electronExtension.searchMessagesWithParams"),[4,zi(e,{limit:i,keyword:"",order:0,timeRange:{endTime:n?n-1:n||0},messageFilter:{senderIds:[t]}})];case 1:return[2,r.sent().trans((function(e){return{messages:e.messages}}))]}}))}))},getHistoryMessagesByMessageTypes:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getHistoryMessagesByObjectNames(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,i=t.map(Re);return{messages:i,hasMore:n,list:i}}))]}}))}))},getContinuousMessages:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.getContinuousMessages(e,t)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list,n=e.hasMore,i=e.timestamp;return{hasMore:n,list:t.map(Re),timestamp:i}}))]}}))}))},setMessageStatusToRead:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.setMessageStatusToRead(e,t)}))]}))}))},setMessageReceivedStatus:Zi,setMessageReceivedStatusInfo:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,he.A_E_SET_MESSAGE_SENT_STATUS_INFO_R).validate("messageId",e,o.NUMBER,!0).validate("receivedStatusInfo",t,o.OBJECT,!0).validate("receivedStatusInfo",null==t?void 0:t.isRead,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isListened,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isDownload,o.BOOLEAN).validate("receivedStatusInfo",null==t?void 0:t.isRetrieved,o.BOOLEAN).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=Y(t),o=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_T,JSON.stringify({messageId:e,sentStatus:n}),o),[4,i.setMessageReceivedStatus(e,n)];case 1:return a=u.sent(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_INFO_R,JSON.stringify({code:a}),o),[2,{code:a}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setMessageSentStatus:function(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return F()?[2,new R(he.A_E_SET_MESSAGE_SENT_STATUS_T,he.A_E_SET_MESSAGE_SENT_STATUS_T).validate("messageId",e,o.NUMBER,!0).validate("sentStatus",t,(function(e){return b(e)&&!H(y[e])}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o;return fe(this,(function(a){switch(a.label){case 0:return n=r.createTraceId(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_T,JSON.stringify({messageId:e,sentStatus:t}),n),[4,i.setMessageSentStatus(e,t)];case 1:return o=a.sent(),r.info(he.A_E_SET_MESSAGE_SENT_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setMessageContent:function(e,t,n){return de(this,void 0,void 0,(function(){return fe(this,(function(i){return[2,Le().next((function(i){return i.setMessageContent(e,t,n)}))]}))}))},deleteMessages:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.deleteLocalMessages(e)}))]}))}))},clearMessages:$i,deleteMessagesByTimestamp:er,batchClearMessagesByTimestamp:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.batchClearLocalMessagesByTimestamp(e)}))]}))}))},insertMessage:tr,batchInsertMessage:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.batchInsertMessage(e,t)}))]}))}))},getMessageCount:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.getLocalMessageCount(e)}))]}))}))},setCheckDuplicateMessage:function(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return F()?[2,new R(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,he.A_E_SET_CHECK_DUPLICATE_MESSAGE_R).validate("checkDuplicate",e,o.BOOLEAN).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return t=i.createTraceId(),i.info(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_T,JSON.stringify({checkDuplicate:e}),t),[4,n.setCheckDuplicateMessage(!!e)];case 1:return r=u.sent(),o=r.code,a=r.data,i.info(he.A_E_SET_CHECK_DUPLICATE_MESSAGE_R,JSON.stringify({code:o,data:a}),t),[2,{code:o}]}}))}))}))]:[2,{code:f.NOT_SUPPORT,msg:ye[f.NOT_SUPPORT]}]}))}))},setCheckChatRoomDuplicateMessage:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.setCheckChatRoomDuplicateMessage(!!e)}))]}))}))},getMessagesAroundTimestamp:function(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){var i=null==t?void 0:t.timestamp,r=null==t?void 0:t.beforeCount,o=null==t?void 0:t.afterCount;return n.getMessagesAroundTimestamp(e,i,r,o)}))];case 1:return[2,n.sent().trans((function(e){return e.map(Re)}))]}}))}))},getLocalMessage:rr,searchMessagesWithParams:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.searchMessagesWithParams(e)}))];case 1:return[2,t.sent().trans((function(e){e.totalMatched;var t=e.messages;return{count:e.conditionsMatched,messages:t.map((function(e){return Re(e)}))}}))]}}))}))},setMessageSpeechToTextVisible:function(e,t){return Le().next((function(n){return n.setMessageSpeechToTextVisible(e,t)}))},deleteUltraGroupMessagesForAllChannel:function(e,t){return Le().next((function(n){return n.deleteLocalUGMessagesForAllChannel(e,t)}))},getUnreadMentionedMessages:function(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){switch(t.label){case 0:return[4,Le().next((function(t){return t.getUnreadMentionedMessages(e)}))];case 1:return[2,t.sent().trans((function(e){return e.map(Re)}))]}}))}))},clearLocalData:function(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.clearLocalData()}))]}))}))},enable:function(){return F()}});function ar(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_SET_PROXY_T,he.A_SET_PROXY_R).validate("set.proxy",e,(function(t){return!!(!e||p("proxy.socksHost",e.socksHost,o.STRING,!0)&&p("proxy.socksPort",e.socksPort,o.NUMBER,!0))})).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_SET_PROXY_T,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),t),[4,n.setProxy(e)];case 1:return r=a.sent().code,o=r===f.SUCCESS?"info":"warn",i[o](he.A_SET_PROXY_R,JSON.stringify({code:r}),t),r===f.SUCCESS?[2,{code:r}]:[2,{code:r,msg:ye[r]}]}}))}))}))]}))}))}function ur(){return de(this,void 0,void 0,(function(){var e=this;return fe(this,(function(t){return[2,new R(he.A_GET_PROXY_T,he.A_GET_PROXY_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o;return fe(this,(function(a){switch(a.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_PROXY_T,"",e),[4,t.getProxy()];case 1:return i=a.sent(),r=i.code,o=i.data,r===f.SUCCESS?(n.info(he.A_GET_PROXY_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]):(n.warn(he.A_GET_PROXY_R,JSON.stringify({code:r}),e),[2,{code:r,msg:ye[r]}])}}))}))}))]}))}))}function sr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_TEST_PROXY_T,he.A_TEST_PROXY_R).validate("test.proxy",e,o.OBJECT,!0).validate("test.proxy.socksHost",null==e?void 0:e.socksHost,o.STRING,!0).validate("test.proxy.socksPort",null==e?void 0:e.socksPort,o.NUMBER,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return n=r.createTraceId(),r.info(he.A_TEST_PROXY_T,JSON.stringify({socksHost:null==e?void 0:e.socksHost,socksPort:null==e?void 0:e.socksPort}),n),[4,i.testProxy(e,t)];case 1:return o=s.sent(),a=o.status,u=o.data,a===f.SUCCESS?[2,{code:a,msg:u}]:(r.warn(he.A_TEST_PROXY_R,JSON.stringify({status:a}),n),[2,{code:a,msg:ye[a]}])}}))}))}))]}))}))}function cr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_SUBSCRIBE_USER_STATUS_T,he.A_SUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,L({maxLength:200,minLength:1,itemValidator:M}),!0).validate("subscribeType",t,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).validate("expiry",n,W({min:60,max:2592e3}),!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_SUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t,expiry:n}),i),[4,r.subscribeUser(e,t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_SUBSCRIBE_USER_STATUS_R,JSON.stringify({code:u,data:s}),i),[2,{code:u,data:s}]}}))}))}))]}))}))}function _r(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_UNSUBSCRIBE_USER_STATUS_T,he.A_UNSUBSCRIBE_USER_STATUS_R).validate("subscribeUserIds",e,L({maxLength:200,minLength:1,itemValidator:M}),!0).validate("subscribeType",t,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_UNSUBSCRIBE_USER_STATUS_T,JSON.stringify({userIds:e,subscribeType:t}),n),[4,i.unSubscribeUser(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_UNSUBSCRIBE_USER_STATUS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function dr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,he.A_GET_SUBSCRIBE_USER_STATUS_LIST_R).validate("subscribeType",e,(function(e){return[j.ONLINE_STATUS,j.USER_PROFILE].includes(e)}),!0).validate("subscribePageSize",t,W({min:1,max:200}),!0).validate("offset",n,W({min:0}),!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_SUBSCRIBE_USER_STATUS_LIST_T,JSON.stringify({pageSize:t,offset:n}),i),[4,r.getSubscribeUserList(e,t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_SUBSCRIBE_USER_STATUS_LIST_R,JSON.stringify({code:u,data:s}),i),u===f.SUCCESS?[2,{code:u,data:s}]:[2,{code:u}]}}))}))}))]}))}))}function fr(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.getSubscribeUserStatus(e,t)}))]}))}))}function lr(e){var t=this;return new R(he.A_UPDATE_MY_USER_PROFILE_T,he.A_UPDATE_MY_USER_PROFILE_R).validate("profile",e,o.OBJECT,!0).validate("profile",e.name,o.ONLY_STRING).validate("profile",e.portraitUri,o.ONLY_STRING).validate("profile",e.email,o.ONLY_STRING).validate("profile",e.birthday,o.ONLY_STRING).validate("profile",e.gender,o.NUMBER).validate("profile",e.location,o.ONLY_STRING).validate("profile",e.role,o.NUMBER).validate("profile",e.level,o.NUMBER).validate("profile",e.extraProfile,o.OBJECT).validate("profile",e.extraProfile,(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"string"!=typeof e[t])return!1;return!0})).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_MY_USER_PROFILE_T,JSON.stringify({profile:e}),t),r=e.extraProfile,o={},["name","portraitUri","email","birthday","gender","location","role","level"].forEach((function(t){H(e[t])||(o[t]=e[t])})),H(r)||(o.extraProfile=_e({},r)),[4,n.updateMyUserProfile(o)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",i[c](he.A_UPDATE_MY_USER_PROFILE_R,JSON.stringify({code:u,data:s}),t),[2,{code:u,data:s}]}}))}))}))}function Er(e){return Le().next((function(t){return t.getUserProfiles(e)}))}function Rr(){var e=this;return new R(he.A_GET_MY_USER_PROFILE_T,he.A_GET_MY_USER_PROFILE_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_MY_USER_PROFILE_T,"",e),[4,t.getMyUserProfile()];case 1:return i=u.sent(),r=i.code,o=i.data,a=r===f.SUCCESS?"info":"warn",n[a](he.A_GET_MY_USER_PROFILE_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]}}))}))}))}function Ar(e){var t=this;return new R(he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R).validate("userProfileVisibility",e,(function(e){return k({value:e,type:K})}),!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_T,e,t),[4,n.updateMyUserProfileVisibility(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_UPDATE_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:o,data:a}),t),[2,{code:o,data:a}]}}))}))}))}function Sr(){var e=this;return new R(he.A_GET_MY_USER_PROFILE_VISIBILITY_T,he.A_GET_MY_USER_PROFILE_VISIBILITY_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r,o,a;return fe(this,(function(u){switch(u.label){case 0:return e=n.createTraceId(),n.info(he.A_GET_MY_USER_PROFILE_VISIBILITY_T,"",e),[4,t.getMyUserProfileVisibility()];case 1:return i=u.sent(),r=i.code,o=i.data,a=r===f.SUCCESS?"info":"warn",n[a](he.A_GET_MY_USER_PROFILE_VISIBILITY_R,JSON.stringify({code:r,data:o}),e),[2,{code:r,data:o}]}}))}))}))}function Tr(e){var t=this;return new R(he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R).validate("uniqueId",e,o.STRING,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T,e,t),[4,n.searchUserProfileByUniqueId(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R,JSON.stringify({code:o,data:a}),t),[2,{code:o,data:a}]}}))}))}))}function Ir(e){return Le().next((function(t){return t.getSubscribeUsersOnlineStatus(e)}))}var vr=function(e){var t=e.count,n=e.pageToken,i=void 0===n?"":n,r=e.order;return{count:t,pageToken:i,order:void 0!==r&&r}};function hr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_CREATE_GROUP_T,he.A_CREATE_GROUP_R).validateParameters("groupId",e.groupId,Q,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",e.groupName,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("groupInfo.portraitUri",null==e?void 0:e.portraitUri,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==e?void 0:e.introduction,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==e?void 0:e.notice,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,o.OBJECT,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==e?void 0:e.joinPermission,(function(e){return k({value:e,type:z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==e?void 0:e.removeMemberPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==e?void 0:e.invitePermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==e?void 0:e.inviteHandlePermission,(function(e){return k({value:e,type:Z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==e?void 0:e.groupInfoEditPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==e?void 0:e.memberInfoEditPermission,(function(e){return k({value:e,type:$})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("inviteeUserIds",t,L({minLength:0,maxLength:30,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s,c,_,d,l,E,R;return fe(this,(function(A){switch(A.label){case 0:return n=r.createTraceId(),r.info(he.A_CREATE_GROUP_T,JSON.stringify({groupInfo:e,inviteeUserIds:t}),n),o=e.groupId,a=e.extProfile,u={},s=Object.keys(Ie),Object.keys(e).forEach((function(t){s.includes(t)&&(u[Ie[t]]=e[t])})),[4,i.createGroup(o,u,a,t)];case 1:return c=A.sent(),_=c.code,d=c.msg,l=void 0===d?"":d,E=c.data,R=_===f.SUCCESS?"info":"warn",r[R](he.A_CREATE_GROUP_R,JSON.stringify({code:_}),n),_!==f.SUCCESS?[2,{code:_,msg:l,data:E}]:[2,{code:_,data:E}]}}))}))}))]}))}))}function Or(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_UPDATE_GROUP_INFO_T,he.A_UPDATE_GROUP_INFO_R).validateParameters("groupId",e.groupId,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("groupName",e.groupName,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME).validateParameters("groupInfo.portraitUri",null==e?void 0:e.portraitUri,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.introduction",null==e?void 0:e.introduction,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.notice",null==e?void 0:e.notice,o.ONLY_STRING,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,o.OBJECT,f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.extProfile",null==e?void 0:e.extProfile,(function(e){for(var t in e)if("string"!=typeof e[t])return!1;return!0}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.joinPermission",null==e?void 0:e.joinPermission,(function(e){return k({value:e,type:z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.removeMemberPermission",null==e?void 0:e.removeMemberPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.invitePermission",null==e?void 0:e.invitePermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.inviteHandlePermission",null==e?void 0:e.inviteHandlePermission,(function(e){return k({value:e,type:Z})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.groupInfoEditPermission",null==e?void 0:e.groupInfoEditPermission,(function(e){return k({value:e,type:q})}),f.INVALID_PARAMETER_GROUP_INFO).validateParameters("groupInfo.memberInfoEditPermission",null==e?void 0:e.memberInfoEditPermission,(function(e){return k({value:e,type:$})}),f.INVALID_PARAMETER_GROUP_INFO).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u,s,c,_,d,l,E;return fe(this,(function(R){switch(R.label){case 0:return t=i.createTraceId(),i.info(he.A_UPDATE_GROUP_INFO_T,JSON.stringify({groupInfo:e}),t),r=e.groupId,o=e.extProfile,a={},u=Object.keys(Ie),Object.keys(e).forEach((function(t){u.includes(t)&&(a[Ie[t]]=e[t])})),[4,n.updateGroupInfo(r,a,o)];case 1:return s=R.sent(),c=s.code,_=s.msg,d=void 0===_?"":_,l=s.data,E=c===f.SUCCESS?"info":"warn",i[E](he.A_UPDATE_GROUP_INFO_R,JSON.stringify({code:c}),t),c!==f.SUCCESS?[2,{code:c,msg:d,data:l}]:[2,{code:c}]}}))}))}))]}))}))}function Nr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_GROUPS_INFO_T,he.A_GET_GROUPS_INFO_R).validateParameters("groupIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_GROUPS_INFO_T,JSON.stringify({groupIds:e}),t),[4,n.getGroupsInfo(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_GROUPS_INFO_R,JSON.stringify({code:o,data:a}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function gr(e,t,n){return void 0===n&&(n={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_KICK_GROUP_MEMBERS_T,he.A_KICK_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return i=o.createTraceId(),o.info(he.A_KICK_GROUP_MEMBERS_T,JSON.stringify({groupId:e,userIds:t,config:n}),i),[4,r.kickGroupMembers(e,t,n)];case 1:return a=s.sent().code,u=a===f.SUCCESS?"info":"warn",o[u](he.A_KICK_GROUP_MEMBERS_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]}))}))}function mr(e,t){return void 0===t&&(t={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_QUIT_GROUP_T,he.A_QUIT_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_QUIT_GROUP_T,JSON.stringify({groupId:e,config:t}),n),[4,i.quitGroup(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_QUIT_GROUP_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Pr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_DISMISS_GROUP_T,he.A_DISMISS_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return t=i.createTraceId(),i.info(he.A_DISMISS_GROUP_T,JSON.stringify({groupId:e}),t),[4,n.dismissGroup(e)];case 1:return r=a.sent().code,o=r===f.SUCCESS?"info":"warn",i[o](he.A_DISMISS_GROUP_R,JSON.stringify({code:r}),t),[2,{code:r}]}}))}))}))]}))}))}function pr(e,t,n,i){return void 0===n&&(n=!1),void 0===i&&(i={removeMuteStatus:!0,removeWhiteList:!0,removeFollow:!0}),de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_TRANSFER_GROUP_OWNER_T,he.A_TRANSFER_GROUP_OWNER_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("newOwnerId",t,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s;return fe(this,(function(c){switch(c.label){case 0:return r=a.createTraceId(),a.info(he.A_TRANSFER_GROUP_OWNER_T,JSON.stringify({groupId:e,newOwnerId:t,quitGroup:n,config:i}),r),[4,o.transferGroupOwner(e,t,i,n)];case 1:return u=c.sent().code,s=u===f.SUCCESS?"info":"warn",a[s](he.A_TRANSFER_GROUP_OWNER_R,JSON.stringify({code:u}),r),[2,{code:u}]}}))}))}))]}))}))}function Ur(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ADD_GROUP_MANAGERS_T,he.A_ADD_GROUP_MANAGERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:10,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ADD_GROUP_MANAGERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.setGroupManagers(1,e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ADD_GROUP_MANAGERS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Cr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_REMOVE_GROUP_MANAGERS_T,he.A_REMOVE_GROUP_MANAGERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:10,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_REMOVE_GROUP_MANAGERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.setGroupManagers(2,e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_REMOVE_GROUP_MANAGERS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Mr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_GROUP_MEMBERS_BY_ROLES_T,he.A_GET_GROUP_MEMBERS_BY_ROLES_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("role",t,(function(e){return k({value:e,type:ee})}),f.INVALID_PARAMETER_GROUP_MEMBER_ROLE,!0).validateParameters("option",n,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_GROUP_MEMBERS_BY_ROLES_T,JSON.stringify({groupId:e,role:t,option:n,formatOption:vr(n)}),i),[4,r.getGroupMembersByRole(e,t,vr(n))];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_GROUP_MEMBERS_BY_ROLES_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Lr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_GET_GROUP_MEMBERS_T,he.A_GET_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_GET_GROUP_MEMBERS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.getGroupMembers(e,t)];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_GET_GROUP_MEMBERS_R,JSON.stringify({code:a,data:u}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Dr(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_SET_GROUP_MEMBER_INFO_T,he.A_SET_GROUP_MEMBER_INFO_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("nickname",n,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("extra",i,X({maxLength:128}),f.INVALID_PARAMETER_EXTRA).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s,c,_;return fe(this,(function(d){switch(d.label){case 0:return r=a.createTraceId(),a.info(he.A_SET_GROUP_MEMBER_INFO_T,JSON.stringify({groupId:e,userId:t,nickname:n,extra:i}),r),[4,o.setGroupMemberInfo(e,t,n,i)];case 1:return u=d.sent(),s=u.code,c=u.data,_=s===f.SUCCESS?"info":"warn",a[_](he.A_SET_GROUP_MEMBER_INFO_R,JSON.stringify({code:s}),r),s===f.SUCCESS?[2,{code:s}]:[2,{code:s,data:c}]}}))}))}))]}))}))}function Gr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_SEARCH_GROUP_MEMBERS_T,he.A_SEARCH_GROUP_MEMBERS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("name",t,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).validateParameters("option",n,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",n.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==n?void 0:n.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==n?void 0:n.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_SEARCH_GROUP_MEMBERS_T,JSON.stringify({groupId:e,name:t,option:n,formatOption:vr(n)}),i),[4,r.searchGroupMembers(e,t,vr(n))];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_SEARCH_GROUP_MEMBERS_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function yr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_JOIN_GROUP_T,he.A_JOIN_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_JOIN_GROUP_T,JSON.stringify({groupId:e}),t),[4,n.joinGroup(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_JOIN_GROUP_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function br(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_INVITE_USERS_TO_GROUP_T,he.A_INVITE_USERS_TO_GROUP_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:30,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_INVITE_USERS_TO_GROUP_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.inviteUsersToGroup(e,t)];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_INVITE_USERS_TO_GROUP_R,JSON.stringify({code:a}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function wr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ACCEPT_GROUP_INVITE_T,he.A_ACCEPT_GROUP_INVITE_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",t,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ACCEPT_GROUP_INVITE_T,JSON.stringify({groupId:e,inviterId:t}),n),[4,i.acceptGroupInvite(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ACCEPT_GROUP_INVITE_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Fr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_REFUSE_GROUP_INVITE_T,he.A_REFUSE_GROUP_INVITE_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("inviterId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("reason",n,X({maxLength:128}),f.INVALID_PARAMETER_REASON).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return i=o.createTraceId(),o.info(he.A_REFUSE_GROUP_INVITE_T,JSON.stringify({groupId:e,inviterId:t,reason:n}),i),[4,r.refuseGroupInvite(e,t,null!=n?n:"")];case 1:return a=s.sent().code,u=a===f.SUCCESS?"info":"warn",o[u](he.A_REFUSE_GROUP_INVITE_R,JSON.stringify({code:a}),i),[2,{code:a}]}}))}))}))]}))}))}function xr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_ACCEPT_GROUP_APPLICATION_T,he.A_ACCEPT_GROUP_APPLICATION_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",n,M,f.INVALID_PARAMETER_USER_ID).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_ACCEPT_GROUP_APPLICATION_T,JSON.stringify({groupId:e,inviterId:n,applicantId:t}),i),[4,r.acceptGroupApplication(e,t,null!=n?n:"")];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_ACCEPT_GROUP_APPLICATION_R,JSON.stringify({code:u}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Br(e,t,n,i){return de(this,void 0,void 0,(function(){var r=this;return fe(this,(function(o){return[2,new R(he.A_REFUSE_GROUP_APPLICATION_T,he.A_REFUSE_GROUP_APPLICATION_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("applicantId",t,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("inviterId",n,M,f.INVALID_PARAMETER_USER_ID).validateParameters("reason",i,X({maxLength:128}),f.INVALID_PARAMETER_REASON).ifReady((function(o,a){return de(r,void 0,void 0,(function(){var r,u,s;return fe(this,(function(c){switch(c.label){case 0:return r=a.createTraceId(),a.info(he.A_REFUSE_GROUP_APPLICATION_T,JSON.stringify({groupId:e,applicantId:t,reason:i}),r),[4,o.refuseGroupApplication(e,t,null!=n?n:"",null!=i?i:"")];case 1:return u=c.sent().code,s=u===f.SUCCESS?"info":"warn",a[s](he.A_REFUSE_GROUP_APPLICATION_R,JSON.stringify({code:u}),r),[2,{code:u}]}}))}))}))]}))}))}function Vr(e,t,n){return de(this,void 0,void 0,(function(){var i=this;return fe(this,(function(r){return[2,new R(he.A_GET_GROUP_APPLICATIONS_T,he.A_GET_GROUP_APPLICATIONS_R).validateParameters("option",e,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",e.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==e?void 0:e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==e?void 0:e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("directions",t,L({minLength:1,itemValidator:function(e){return k({value:e,type:te})}}),f.INVALID_PARAMETER_GROUP_APPLICATION_DIRECTION,F()).validateParameters("status",n,L({minLength:1,itemValidator:function(e){return k({value:e,type:ne})}}),f.INVALID_PARAMETER_GROUP_APPLICATION_STATUS,F()).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return i=o.createTraceId(),o.info(he.A_GET_GROUP_APPLICATIONS_T,JSON.stringify({status:n,option:e,formatOption:vr(e)}),i),[4,r.getGroupApplications(vr(e),t,n)];case 1:return a=_.sent(),u=a.code,s=a.data,c=u===f.SUCCESS?"info":"warn",o[c](he.A_GET_GROUP_APPLICATIONS_R,JSON.stringify({code:u,data:s}),i),u!==f.SUCCESS?[2,{code:u}]:[2,{code:u,data:s}]}}))}))}))]}))}))}function Hr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_GET_JOINED_GROUPS_BY_ROLES_T,he.A_GET_JOINED_GROUPS_BY_ROLES_R).validateParameters("option",e,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",e.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==e?void 0:e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==e?void 0:e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("role",t,(function(e){return k({value:e,type:ee})}),f.INVALID_PARAMETER_GROUP_MEMBER_ROLE).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_GET_JOINED_GROUPS_BY_ROLES_T,JSON.stringify({role:t,option:e,formatOption:vr(e)}),n),[4,i.getJoinedGroupsByRole(t,vr(e))];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_GET_JOINED_GROUPS_BY_ROLES_R,JSON.stringify({code:a,data:u}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Yr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_SEARCH_JOINED_GROUPS_T,he.A_SEARCH_JOINED_GROUPS_R).validateParameters("groupName",e,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_GROUP_NAME,!0).validateParameters("option",t,o.OBJECT,f.INVALID_PARAMETER_PAGING_QUERY_OPTION,!0).validateParameters("option.count",t.count,W({min:1,max:200}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",null==t?void 0:t.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a,u,s;return fe(this,(function(c){switch(c.label){case 0:return n=r.createTraceId(),r.info(he.A_SEARCH_JOINED_GROUPS_T,JSON.stringify({groupName:e,option:t,formatOption:vr(t)}),n),[4,i.searchJoinedGroups(e,vr(t))];case 1:return o=c.sent(),a=o.code,u=o.data,s=a===f.SUCCESS?"info":"warn",r[s](he.A_SEARCH_JOINED_GROUPS_R,JSON.stringify({code:a}),n),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))]}))}))}function Jr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_JOINED_GROUPS_T,he.A_GET_JOINED_GROUPS_R).validateParameters("groupIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_GROUP_IDS,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_JOINED_GROUPS_T,JSON.stringify({groupIds:e}),t),[4,n.getJoinedGroups(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_JOINED_GROUPS_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function kr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_SET_GROUP_REMARK_T,he.A_SET_GROUP_REMARK_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("remark",t,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_REMARK,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_SET_GROUP_REMARK_T,JSON.stringify({groupId:e,remark:t}),n),[4,i.setGroupRemark(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_SET_GROUP_REMARK_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Kr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_ADD_GROUP_FOLLOWS_T,he.A_ADD_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_ADD_GROUP_FOLLOWS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.addGroupFollows(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_ADD_GROUP_FOLLOWS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function jr(e,t){return de(this,void 0,void 0,(function(){var n=this;return fe(this,(function(i){return[2,new R(he.A_REMOVE_GROUP_FOLLOWS_T,he.A_REMOVE_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).validateParameters("userIds",t,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return n=r.createTraceId(),r.info(he.A_REMOVE_GROUP_FOLLOWS_T,JSON.stringify({groupId:e,userIds:t}),n),[4,i.removeGroupFollows(e,t)];case 1:return o=u.sent().code,a=o===f.SUCCESS?"info":"warn",r[a](he.A_REMOVE_GROUP_FOLLOWS_R,JSON.stringify({code:o}),n),[2,{code:o}]}}))}))}))]}))}))}function Wr(e){return de(this,void 0,void 0,(function(){var t=this;return fe(this,(function(n){return[2,new R(he.A_GET_GROUP_FOLLOWS_T,he.A_GET_GROUP_FOLLOWS_R).validateParameters("groupId",e,M,f.INVALID_PARAMETER_GROUP_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o,a,u;return fe(this,(function(s){switch(s.label){case 0:return t=i.createTraceId(),i.info(he.A_GET_GROUP_FOLLOWS_T,JSON.stringify({groupId:e}),t),[4,n.getGroupFollows(e)];case 1:return r=s.sent(),o=r.code,a=r.data,u=o===f.SUCCESS?"info":"warn",i[u](he.A_GET_GROUP_FOLLOWS_R,JSON.stringify({code:o}),t),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))]}))}))}function Qr(e,t,n){var i=this;return new R(he.A_ADD_FRIEND_T,he.A_ADD_FRIEND_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).validateParameters("extra",n,X({maxLength:128}),f.INVALID_PARAMETER_EXTRA).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return o.info(he.A_ADD_FRIEND_T,JSON.stringify({userId:e,directionType:t,extra:n})),[4,r.addFriend(e,t,n||"")];case 1:return i=s.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_ADD_FRIEND_R,a),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))}function Xr(e,t){var n=this;return new R(he.A_DELETE_FRIENDS_T,he.A_DELETE_FRIENDS_R).validateParameters("userIds",e,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n;return fe(this,(function(o){switch(o.label){case 0:return r.info(he.A_DELETE_FRIENDS_T,JSON.stringify({userIds:e,directionType:t})),[4,i.deleteFriends(e,t)];case 1:return n=o.sent().code,r[n===f.SUCCESS?"info":"warn"](he.A_DELETE_FRIENDS_R,n),[2,{code:n}]}}))}))}))}function zr(e){var t=this;return new R(he.A_ACCEPT_FRIEND_APPLICATION_T,he.A_ACCEPT_FRIEND_APPLICATION_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t;return fe(this,(function(r){switch(r.label){case 0:return i.info(he.A_ACCEPT_FRIEND_APPLICATION_T,e),[4,n.acceptFriendApplication(e)];case 1:return t=r.sent().code,i[t===f.SUCCESS?"info":"warn"](he.A_ACCEPT_FRIEND_APPLICATION_R,t),[2,{code:t}]}}))}))}))}function qr(e){var t=this;return new R(he.A_REFUSE_FRIEND_APPLICATION_T,he.A_REFUSE_FRIEND_APPLICATION_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t;return fe(this,(function(r){switch(r.label){case 0:return i.info(he.A_REFUSE_FRIEND_APPLICATION_T,JSON.stringify({userId:e})),[4,n.refuseFriendApplication(e,"")];case 1:return t=r.sent().code,i[t===f.SUCCESS?"info":"warn"](he.A_REFUSE_FRIEND_APPLICATION_R,t),[2,{code:t}]}}))}))}))}function Zr(e,t,n){var i=this;return void 0===t&&(t=""),void 0===n&&(n={}),new R(he.A_SET_FRIEND_INFO_T,he.A_SET_FRIEND_INFO_R).validateParameters("userId",e,M,f.INVALID_PARAMETER_USER_ID,!0).validateParameters("remark",t,X({isTrim:!0,maxLength:64}),f.INVALID_PARAMETER_REMARK).validateParameters("extProfile",n,o.OBJECT,f.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).validateParameters("extProfile",n,(function(e){for(var t in e)if(!w(e[t]))return!1;return!0}),f.INVALID_PARAMETER_FRIEND_INFO_EXT_FIELDS).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u;return fe(this,(function(s){switch(s.label){case 0:return o.info(he.A_SET_FRIEND_INFO_T,JSON.stringify({userId:e,remark:t,extProfile:n})),[4,r.setFriendInfo(e,t,n)];case 1:return i=s.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_SET_FRIEND_INFO_R,a),[2,{code:a,data:u}]}}))}))}))}function $r(e,t){var n=this;return new R(he.A_CHECK_FRIENDS_T,he.A_CHECK_FRIENDS_R).validateParameters("userIds",e,L({minLength:1,maxLength:20,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).validateParameters("directionType",t,(function(e){return k({value:e,type:ie})}),f.INVALID_PARAMETER_DIRECTION_TYPE,!0).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return r.info(he.A_CHECK_FRIENDS_T,JSON.stringify({userIds:e,directionType:t})),[4,i.checkFriends(e,t)];case 1:return n=u.sent(),o=n.code,a=n.data,r[o===f.SUCCESS?"info":"warn"](he.A_CHECK_FRIENDS_R,JSON.stringify({code:o,data:a})),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))}function eo(e,t){var n=this;return void 0===t&&(t={count:50,pageToken:"",order:!1}),new R(he.A_GET_FRIENDS_T,he.A_GET_FRIENDS_R).validateParameters("directionType",e,(function(e){return k({value:e,type:re})}),f.INVALID_PARAMETER_QUERY_FRIENDS_DIRECTION_TYPE,!0).validateParameters("option.count",null==t?void 0:t.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!F()).validateParameters("option.pageToken",null==t?void 0:t.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",null==t?void 0:t.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).ifReady((function(i,r){return de(n,void 0,void 0,(function(){var n,o,a;return fe(this,(function(u){switch(u.label){case 0:return r.info(he.A_GET_FRIENDS_T,JSON.stringify({directionType:e,option:t})),[4,i.getFriends(e,t)];case 1:return n=u.sent(),o=n.code,a=n.data,r[o===f.SUCCESS?"info":"warn"](he.A_GET_FRIENDS_R,JSON.stringify({code:o,data:a})),o!==f.SUCCESS?[2,{code:o}]:[2,{code:o,data:a}]}}))}))}))}function to(e,t,n){var i=this;return void 0===e&&(e={count:50,pageToken:"",order:!1}),new R(he.A_GET_FRIEND_APPLICATIONS_T,he.A_GET_FRIEND_APPLICATIONS_R).validateParameters("types",t,L({itemValidator:function(e){return k({value:e,type:oe})}}),f.INVALID_PARAMETER_FRIEND_APPLICATION_TYPE).validateParameters("option.count",e.count,W({min:1,max:100}),f.INVALID_PARAMETER_COUNT,!0).validateParameters("option.pageToken",e.pageToken,o.ONLY_STRING,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("option.order",e.order,o.BOOLEAN,f.INVALID_PARAMETER_PAGING_QUERY_OPTION).validateParameters("status",n,L({itemValidator:function(e){return k({value:e,type:ae})}}),f.INVALID_PARAMETER_FRIEND_APPLICATION_STATUS).ifReady((function(r,o){return de(i,void 0,void 0,(function(){var i,a,u,s,c;return fe(this,(function(_){switch(_.label){case 0:return o.info(he.A_GET_FRIEND_APPLICATIONS_T,JSON.stringify({types:t,status:n,option:e})),[4,r.getFriendApplications({count:e.count,pageToken:null!==(s=null==e?void 0:e.pageToken)&&void 0!==s?s:"",order:null!==(c=null==e?void 0:e.order)&&void 0!==c&&c},t,n)];case 1:return i=_.sent(),a=i.code,u=i.data,o[a===f.SUCCESS?"info":"warn"](he.A_GET_FRIEND_APPLICATIONS_R,JSON.stringify({code:a,data:u})),a!==f.SUCCESS?[2,{code:a}]:[2,{code:a,data:u}]}}))}))}))}function no(e){var t=this;return new R(he.A_GET_FRIENDS_INFO_T,he.A_GET_FRIENDS_INFO_R).validateParameters("userIds",e,L({minLength:1,maxLength:100,itemValidator:M}),f.INVALID_PARAMETER_USERIDLIST,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_GET_FRIENDS_INFO_T,JSON.stringify({userIds:e})),[4,n.getFriendsInfo(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_GET_FRIENDS_INFO_R,JSON.stringify({code:r,data:o})),r!==f.SUCCESS?[2,{code:r}]:[2,{code:r,data:o}]}}))}))}))}function io(e){var t=this;return new R(he.A_SEARCH_FRIENDS_INFO_T,he.A_SEARCH_FRIENDS_INFO_R).validateParameters("name",e,X({isTrim:!0,minLength:1,maxLength:64}),f.INVALID_PARAMETER_NICK_NAME,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_SEARCH_FRIENDS_INFO_T,JSON.stringify({name:e})),[4,n.searchFriendsInfo(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_SEARCH_FRIENDS_INFO_R,JSON.stringify({code:r,data:o})),[2,{code:r,data:o}]}}))}))}))}function ro(e){var t=this;return new R(he.A_SET_ADD_FRIEND_PERMISSION_T,he.A_SET_ADD_FRIEND_PERMISSION_R).validateParameters("permission",e,(function(e){return k({value:e,type:ue})}),f.INVALID_PARAMETER_FRIEND_ADD_PERMISSION,!0).ifReady((function(n,i){return de(t,void 0,void 0,(function(){var t,r,o;return fe(this,(function(a){switch(a.label){case 0:return i.info(he.A_SET_ADD_FRIEND_PERMISSION_T,JSON.stringify(e)),[4,n.setFriendAddPermission(e)];case 1:return t=a.sent(),r=t.code,o=t.data,i[r===f.SUCCESS?"info":"warn"](he.A_SET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:r,data:o})),[2,{code:r}]}}))}))}))}function oo(){var e=this;return new R(he.A_GET_ADD_FRIEND_PERMISSION_T,he.A_GET_ADD_FRIEND_PERMISSION_R).ifReady((function(t,n){return de(e,void 0,void 0,(function(){var e,i,r;return fe(this,(function(o){switch(o.label){case 0:return n.info(he.A_GET_ADD_FRIEND_PERMISSION_T),[4,t.getFriendAddPermission()];case 1:return e=o.sent(),i=e.code,r=e.data,n[i===f.SUCCESS?"info":"warn"](he.A_GET_ADD_FRIEND_PERMISSION_R,JSON.stringify({code:i,data:r})),i!==f.SUCCESS?[2,{code:i}]:[2,{code:i,data:r}]}}))}))}))}function ao(e){!function(e){var t,n,i;me?pe.warn(E.A_INIT_REPEAT_O):(r("options.appkey",e.appkey,o.STRING,!0),r("options.navigators",e.navigators,(function(e){return a(e)&&(0===e.length||e.every(u))})),r("options.loggerProxy",e.loggerProxy,(function(e){return e instanceof s})),Pe=e,me=c.init({appkey:e.appkey,navigators:e.navigators||[],miniCMPProxy:e.customCMP||[],logOutputLevel:e.logOutputLevel,httpInMainProcess:!!e.httpInMainProcess,logExpireTime:e.logExpireTime,areaCode:e.areaCode,logServerUrl:e.logServerUrl,uploadDomain:e.uploadDomain,environment:null!==(t=e.environment)&&void 0!==t?t:"default",eventLoopBlockingCheck:e.eventLoopBlockingCheck,enableReadReceiptStorage:null===(n=e.enableReadReceiptStorage)||void 0===n||n,useNaviV2:null!==(i=e.useNaviV2)&&void 0!==i&&i,loggerProxy:e.loggerProxy}),pe=me.logger,me.assignWatcher(Ne),_.init(pe),me.sse.on("message",(function(e,t){var n=_e(_e({},t),{message:t.message?Re(t.message):void 0});Oe.emit(Te.STREAM_MESSAGE_RESPONSE,n)})))}(e)}function uo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return Qe(),[2,Ue()]}))}))}function so(){return Ce((function(e){return e.getConnectionStatus()}))}function co(){return Ce((function(e){return e.getServerTime()}))}function _o(){return Ce((function(e){return e.getCurrentUserId()}))}function fo(e,t){i.add(e,t)}function lo(){return Ce((function(e){return e.getDeviceId()}))}function Eo(){var e=Le().tryTrans((function(e){return e.getAppSettings()}));return e.isOk?e.data:null}var Ro={COMET:"_",WEBSOCKET:"_"};function Ao(e){return Le().next((function(t){return t.setNotificationQuietHoursWithSetting(e)}))}function So(){return Le().next((function(e){return e.removeNotificationQuietHoursSetting()}))}function To(){return Le().next((function(e){return e.getNotificationQuietHoursSetting()}))}function Io(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!0,null==t?void 0:t.extra)}))];case 1:return[2,n.sent().wipe()]}}))}))}function vo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.joinChatroom(e,null==t?void 0:t.count,!1,null==t?void 0:t.extra)}))]}))}))}function ho(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.quitChatroom(e,t)}))]}))}))}function Oo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.getChatroomInfo(e,null==t?void 0:t.count,null==t?void 0:t.order)}))]}))}))}function No(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.setChatroomEntry(e,t,!1)}))]}))}))}function go(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.setChatroomEntries(e,t)}))];case 1:return[2,n.sent().wipe()]}}))}))}function mo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.setChatroomEntry(e,t,!0)}))]}))}))}function Po(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!1)}))]}))}))}function po(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntries(e,{keys:null==t?void 0:t.entries,notificationExtra:null==t?void 0:t.notificationExtra})}))]}))}))}function Uo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.removeChatroomEntry(e,t,!0)}))]}))}))}function Co(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){return[2,Le().next((function(n){return n.chatroom.getChatroomEntry(e,t)}))]}))}))}function Mo(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.getAllChatroomEntries(e)}))]}))}))}function Lo(e,t){return de(this,void 0,void 0,(function(){return fe(this,(function(n){switch(n.label){case 0:return[4,Le().next((function(n){return n.chatroom.getChatroomHistoryMessages(e,null==t?void 0:t.count,null==t?void 0:t.order,null==t?void 0:t.timestamp)}))];case 1:return[2,n.sent().trans((function(e){var t=e.list;return{hasMore:e.hasMore,list:t.map((function(e){return Re(e)}))}}))]}}))}))}function Do(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.chatroom.bindRTCRoomForChatroom(e)}))]}))}))}function Go(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.setTranslationLanguage(e)}))]}))}))}function yo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getTranslationLanguage()}))]}))}))}function bo(e){return de(this,void 0,void 0,(function(){return fe(this,(function(t){return[2,Le().next((function(t){return t.setAutoTranslateEnabled(e)}))]}))}))}function wo(){return de(this,void 0,void 0,(function(){return fe(this,(function(e){return[2,Le().next((function(e){return e.getAutoTranslateEnabled()}))]}))}))}export{Xe as BaseMessage,Ze as CombineMessage,$e as CombineV2Message,et as CommandMessage,Ro as ConnectType,Te as Events,tt as FileMessage,nt as GIFMessage,it as GroupNotificationMessage,dt as HQVoiceMessage,rt as ImageMessage,ot as InformationNotificationMessage,at as LocationMessage,ut as ReferenceMessage,st as RichContentMessage,ct as SightMessage,_t as TextMessage,Pt as UploadTask,ft as VoiceMessage,fo as __addSDKVersion,zr as acceptFriendApplication,xr as acceptGroupApplication,wr as acceptGroupInvite,Yi as addConversationsToTag,ke as addEventListener,Qr as addFriend,Kr as addGroupFollows,Ur as addGroupManagers,Ve as addMonitor,Fi as addTag,Gi as addToBlacklist,an as batchClearRemoteHistoryMessages,Vn as batchDeleteConversations,tn as batchGetMessageReadReceiptInfoV4,Bn as batchRemoveConversation,qn as batchSetConversationNotificationLevel,ai as batchSetConversationToTop,Zn as batchSetConversationTranslateStrategy,Do as bindRTCRoomForChatroom,$r as checkFriends,Xn as clearAllMessagesUnreadStatus,Qe as clearEventListeners,on as clearHistoryMessages,Tn as clearMessages,Qn as clearMessagesUnreadStatus,li as clearRealtimeConUnreadCount,Jn as clearTextMessageDraft,vn as clearUnreadCountByTimestamp,Ye as connect,hr as createGroup,Lt as createUploadTask,Xr as deleteFriends,Sn as deleteLocalMessagesByTimestamp,rn as deleteMessages,uo as destroy,Je as disconnect,Pr as dismissGroup,or as electronExtension,Uo as forceRemoveChatRoomEntry,mo as forceSetChatRoomEntry,Mo as getAllChatRoomEntries,bn as getAllConversationList,Ui as getAllUltraGroupUnreadCount,Ci as getAllUltraGroupUnreadMentionedCount,_i as getAllUnreadMentionedCount,Eo as getAppSettings,wo as getAutoTranslateEnabled,bi as getBlacklist,wi as getBlacklistStatus,Ti as getBlockUltraGroupList,ni as getBlockedConversationList,Co as getChatRoomEntry,Oo as getChatRoomInfo,Lo as getChatroomHistoryMessages,so as getConnectionStatus,Fn as getConversation,yn as getConversationList,wn as getConversationListByTimestamp,ei as getConversationNotificationLevel,ti as getConversationNotificationStatus,ri as getConversationTypeNotificationLevel,ji as getConversationsFromTagByPage,_o as getCurrentUserId,lo as getDeviceId,bt as getDownloadAuth,yt as getFileToken,wt as getFileUrl,fn as getFirstUnreadMessage,ln as getFirstUnreadMessageInfo,oo as getFriendAddPermission,to as getFriendApplications,eo as getFriends,no as getFriendsInfo,Vr as getGroupApplications,Wr as getGroupFollows,Lr as getGroupMembers,Mr as getGroupMembersByRole,Nr as getGroupsInfo,jt as getHistoryMessages,Jr as getJoinedGroups,Hr as getJoinedGroupsByRole,Ft as getMessage,gn as getMessageReadReceiptInfoV5,mn as getMessageReadReceiptInfoV5ByIdentifiers,en as getMessageReadReceiptV4,_n as getMessageReader,pn as getMessagesReadReceiptByUsersV5,Pn as getMessagesReadReceiptUsersByPageV5,Rr as getMyUserProfile,Sr as getMyUserProfileVisibility,To as getNotificationQuietHoursSetting,ur as getProxy,fi as getRealtimeConTotalUnreadCount,Ri as getRealtimeConUnreadCounts,di as getRealtimeConversations,Wt as getRemoteHistoryMessages,co as getServerTime,dr as getSubscribeUserList,fr as getSubscribeUserStatus,Ir as getSubscribeUsersOnlineStatus,Vi as getTags,Hi as getTagsFromConversation,Hn as getTextMessageDraft,ui as getTopConversationList,kn as getTotalUnreadCount,Kn as getTotalUnreadCountByLevels,jn as getTotalUnreadMentionedCountByLevels,yo as getTranslationLanguage,mi as getUltraGroupDefaultNotificationLevel,Li as getUltraGroupFirstUnreadMessageTimestamp,Si as getUltraGroupList,vi as getUltraGroupMessageListByMessageUId,pi as getUltraGroupUnreadCountByTargetId,Di as getUltraGroupUnreadInfoList,gi as getUltraGroupUnreadMentionedCountByTargetId,Mi as getUltraGroupUnreadMentionedMessages,si as getUnreadConversationList,Wn as getUnreadCount,Wi as getUnreadCountByTag,Ai as getUnreadMentionMeConversationList,ci as getUnreadMentionedCount,Rn as getUnreadMentionedMessages,Er as getUserProfiles,ao as init,En as insertMessage,De as installPlugin,br as inviteUsersToGroup,Io as joinChatRoom,vo as joinExistChatRoom,yr as joinGroup,gr as kickGroupMembers,Ln as modifyMessage,Dn as modifyMessageWithParams,Ke as onceEventListener,ho as quitChatRoom,mr as quitGroup,nn as recallMessage,Gn as refreshReferenceMessageWithParams,qr as refuseFriendApplication,Br as refuseGroupApplication,Fr as refuseGroupInvite,dn as registerMessageType,Ni as removeAllExpansionForUltraGroupMessage,po as removeChatRoomEntries,Po as removeChatRoomEntry,xn as removeConversation,Ji as removeConversationsFromTag,je as removeEventListener,We as removeEventListeners,Oi as removeExpansionForUltraGroupMessage,yi as removeFromBlacklist,jr as removeGroupFollows,Cr as removeGroupManagers,sn as removeMessageExpansionForKey,He as removeMonitor,So as removeNotificationQuietHoursSetting,Ei as removeRealtimeConversations,xi as removeTag,Ki as removeTagFromConversations,ki as removeTagsFromConversation,Un as requestSpeechToTextForMessage,On as requestStreamMessageContent,Yn as saveTextMessageDraft,In as searchConversationByContent,io as searchFriendsInfo,Gr as searchGroupMembers,Yr as searchJoinedGroups,An as searchMessages,Tr as searchUserProfileByUniqueId,Ht as sendFileMessage,Jt as sendGIFMessage,kt as sendHQVoiceMessage,Yt as sendImageMessage,xt as sendMessage,Qt as sendReadReceiptMessage,$t as sendReadReceiptMessageV4,Xt as sendReadReceiptRequest,zt as sendReadReceiptResponse,qt as sendReadReceiptResponseV2,Nn as sendReadReceiptResponseV5,Kt as sendSightMessage,Zt as sendSyncReadStatusMessage,Bt as sendTextMessage,cn as sendTypingStatusMessage,Ii as sendUltraGroupTypingStatus,bo as setAutoTranslateEnabled,go as setChatRoomEntries,No as setChatRoomEntry,zn as setConversationNotificationLevel,$n as setConversationNotificationStatus,oi as setConversationToTop,Qi as setConversationToTopInTag,ii as setConversationTypeNotificationLevel,ro as setFriendAddPermission,Zr as setFriendInfo,Dr as setGroupMemberInfo,kr as setGroupRemark,hn as setMessageReceivedStatus,Ao as setNotificationQuietHoursWithSetting,ar as setProxy,Go as setTranslationLanguage,Pi as setUltraGroupDefaultNotificationLevel,Dt as stopUploadTask,cr as subscribeUserStatus,sr as testProxy,pr as transferGroupOwner,Cn as translateMessagesWithParams,Mn as translateTextsWithParams,_r as unSubscribeUserStatus,hi as updateExpansionForUltraGroupMessage,Or as updateGroupInfo,un as updateMessageExpansion,lr as updateMyUserProfile,Ar as updateMyUserProfileVisibility,Bi as updateTag,Gt as upload};