@rongcloud/electron-renderer 5.18.0 → 5.20.0-alpha.1

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.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("electron"),e=require("@rongcloud/engine"),n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function r(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))}function i(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function s(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var c,u=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i._handleWrite=r,i}return o(e,t),e}(e.BasicLogger),l=0,p=Date.now(),f=function(t){var e=Date.now();return p!==e&&(p=e,l=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,l++].join("__")};e.VersionManage.add("electron-renderer","5.18.0");var h=function(t){function n(n,o,r){var i=this,l=function(t){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",t)},p=new u(r.appkey,"IMLib","IM",l);return i=t.call(this,n,o,r,p)||this,c.set(i,void 0),i._resolveMaps={},function(t,e,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===o?r.call(t,n):r?r.value=n:e.set(t,n)}(i,c,l,"f"),p.setOutputLevel(r.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var s=o[n];if(s){var c={batchMessage:i._batchMessage.bind(i),onRTCDataChange:i._onRTCDataChange.bind(i),onConnected:i._onConnected.bind(i),onNaviDataChange:i._onNaviDataChange.bind(i)};if(c[n])c[n](r,s);else{var u={onConnecting:e.RCConnectionStatus.CONNECTING,onSuspend:e.RCConnectionStatus.SUSPENDED,onDisconnected:e.RCConnectionStatus.DISCONNECTED};u[n]&&i._setConnectionStatus(u[n]),s(r[0])}}else i.logger.error(e.LogTagId.L_UNSUPPORT_NTF_FROM_MAIN_E,n)})),window.__ContextBridge__.on("__RC_CHANNEL_RESULT_FROM_MAIN__",(function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=i._resolveMaps[e];r&&(delete i._resolveMaps[e],r.apply(void 0,s([],a(n),!1)))})),i._options.httpInMainProcess&&(e.runtime.httpReq=i.sendHTTPRequest.bind(i)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:r.navigators,areaCode:r.areaCode,logServerUrl:r.logServerUrl,environment:r.environment}),i._cache=i._callMainSync("getMainProcessCache"),i}return o(n,t),Object.defineProperty(n.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chat",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dataHosting",{get:function(){return this},enumerable:!1,configurable:!0}),n.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},n.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},n.prototype._onConnected=function(t,e){var n;n=a(t,1),this._cache=n[0],e(void 0)},n.prototype._onNaviDataChange=function(t,e){var n;n=a(t,1),this._cache.naviInfo=n[0],e([t[0]])},n.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},n.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},n.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},n.prototype._callMain=function(t){for(var e=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new Promise((function(o){var r,i=f(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,s(["__RC_CHANNEL_CALL_MAIN__",i,t],a(n),!1))}))},n.prototype._callMain2=function(t){for(var n=this,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return new Promise((function(r){var i,c=f(t);n._resolveMaps[c]=function(t){var n=t.code,o=t.msg,i=t.data;n!==e.ErrorCode.SUCCESS?r(e.fail(n,o,i)):r(e.ok(i))},(i=window.__ContextBridge__).send.apply(i,s(["__RC_CHANNEL_CALL_MAIN__",c,t],a(o),!1))}))},n.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,s(["callExtra",t],a(e),!1))},n.prototype._send2Main=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];(e=window.__ContextBridge__).send.apply(e,s(["__RC_CHANNEL_SEND_2_MAIN__",t],a(n),!1))},n.prototype._callMainSync=function(t){for(var n,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return this.logger.info(e.LogTagId.L_CALL_MAIN_SYNC_O,t),(n=window.__ContextBridge__).sendSync.apply(n,s(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],a(o),!1))},n.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},n.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},n.prototype.createLogger=function(t,e){return new u(this._appkey,t,e,function(t,e,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(t):o?o.value:e.get(t)}(this,c,"f"))},n.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},n.prototype.connect=function(t,e,n,o){return r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},n.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},n.prototype.getConnectedTime=function(){return this._cache.connectedTime},n.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},n.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},n.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},n.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},n.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},n.prototype.recallMsg=function(t,e){return this._callMain2("recallMsg",t,e)},n.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},n.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},n.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},n.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},n.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},n.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},n.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},n.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},n.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},n.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},n.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},n.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},n.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},n.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},n.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},n.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},n.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},n.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},n.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},n.prototype.batchSetConversationStatus=function(t){return this._callMain("batchSetConversationStatus",t)},n.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},n.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},n.prototype.sendMessage=function(t,n,o,r,i){var a=this,s=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return r&&(this._resolveMaps[s]=function(t){try{r(t)}catch(t){a.logger.error(e.LogTagId.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,n,o,s,i)},n.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},n.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},n.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},n.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},n.prototype.batchGetMessageReadReceiptInfoV4=function(t,n){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},n.prototype.disconnect=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},n.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},n.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},n.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},n.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},n.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},n.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},n.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},n.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},n.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},n.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},n.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},n.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},n.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},n.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},n.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},n.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},n.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},n.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},n.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},n.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},n.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},n.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},n.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},n.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},n.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},n.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},n.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},n.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},n.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},n.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},n.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},n.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},n.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},n.prototype.getMessage=function(t){return this._callMain2("getMessage",t)},n.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},n.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},n.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},n.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},n.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},n.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},n.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},n.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},n.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},n.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},n.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},n.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},n.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},n.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},n.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},n.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},n.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},n.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},n.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},n.prototype.getDeviceId=function(){return this._cache.deviceId},n.prototype.getCurrentUserId=function(){return this._cache.crtUserId},n.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},n.prototype.rtcSignaling=function(t,e,n,o){return r(this,void 0,void 0,(function(){var r,a,s,c;return i(this,(function(i){switch(i.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return a=i.sent(),s=a.code,c=a.buffer,[2,{code:s,buffer:c?new Uint8Array(c):c}]}}))}))},n.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},n.prototype.createTag=function(t){return this._callMain("createTag",t)},n.prototype.removeTag=function(t){return this._callMain("removeTag",t)},n.prototype.updateTag=function(t){return this._callMain("updateTag",t)},n.prototype.getTagList=function(){return this._callMain("getTagList")},n.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},n.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},n.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},n.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},n.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},n.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},n.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},n.prototype.clearData=function(){return this._callMain("clearData")},n.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},n.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},n.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},n.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},n.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},n.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},n.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},n.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},n.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},n.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},n.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},n.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},n.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},n.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},n.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},n.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},n.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},n.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},n.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},n.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},n.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},n.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},n.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},n.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},n.prototype.getUltraGroupDefaultNotificationLevel=function(t,n){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getOSInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},n.prototype.getProcessInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,{code:e.ErrorCode.SUCCESS,data:{title:window.__ContextBridge__.getProcessInfo("title"),pid:window.__ContextBridge__.getProcessInfo("pid"),ppid:window.__ContextBridge__.getProcessInfo("ppid"),platform:window.__ContextBridge__.getProcessInfo("platform"),arch:window.__ContextBridge__.getProcessInfo("arch"),uptime:window.__ContextBridge__.callProcessMethod("uptime"),cpuUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),memoryUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),resourceUsage:window.__ContextBridge__.callProcessMethod("cpuUsage")}}]}))}))},n.prototype.getMainProcessInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},n.prototype.setProxy=function(t){return this._callMain("setProxy",t)},n.prototype.getProxy=function(){return this._callMain("getProxy")},n.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},n.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},n.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},n.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},n.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},n.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},n.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},n.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},n.prototype.getConversations=function(t){return this._callMain("getConversations",t)},n.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},n.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},n.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},n.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},n.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},n.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},n.prototype.createGroup=function(t,e,n,o){return r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},n.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},n.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},n.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},n.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},n.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},n.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},n.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},n.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},n.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},n.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},n.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},n.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},n.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},n.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},n.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},n.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},n.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},n.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},n.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},n.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},n.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},n.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},n.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},n.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},n.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},n.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},n.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},n.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},n.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},n.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},n.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},n.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},n.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},n.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},n.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},n.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},n.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},n.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},n.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},n.prototype.setNotificationQuietHoursWithSetting=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},n.prototype.removeNotificationQuietHoursSetting=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},n.prototype.getNotificationQuietHoursSetting=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},n}(e.BasicEngine);c=new WeakMap;var g={on:function(e,n){t.ipcRenderer.on(e,(function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];n.apply(void 0,s([t],a(e),!1))}))},send:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];t.ipcRenderer.send.apply(t.ipcRenderer,s([e],a(n),!1))},sendSync:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return t.ipcRenderer.sendSync.apply(t.ipcRenderer,s([e],a(n),!1))},getProcessInfo:function(t){return process[t]},callProcessMethod:function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return(e=process)[t].apply(e,s([],a(n),!1))}};window&&(window.RCCppEngine=h,window.__ContextBridge__=g);exports.RCCppEngine=h,exports.initContextBridge=function(){t.contextBridge&&t.contextBridge.exposeInMainWorld("__ContextBridge__",g)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("electron"),t=require("@rongcloud/engine"),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)};function n(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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{u(n.next(e))}catch(e){a(e)}}function l(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}u((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function u(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}var c,s,b,p=function(e){function t(t,r,n,o){var a=e.call(this,t,r,n)||this;return Object.defineProperty(a,"_handleWrite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a._handleWrite=o,a}return n(t,e),t}(t.BasicLogger),f=0,g=Date.now(),d=function(e){var t=Date.now();return g!==t&&(g=t,f=0),[e,window.__ContextBridge__.getProcessInfo("pid"),t,f++].join("__")};t.VersionManage.add("electron-renderer","5.20.0-alpha.1");var y=function(e){function r(r,n,o){var a=this,u=function(e){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",e)},b=new p(o.appkey,"IMLib","IM",u);return a=e.call(this,r,n,o,b)||this,c.add(a),Object.defineProperty(a,"_cache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s.set(a,void 0),Object.defineProperty(a,"_resolveMaps",{enumerable:!0,configurable:!0,writable:!0,value:{}}),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(a,s,u,"f"),b.setOutputLevel(o.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(e,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];var l=n[r];if(l){var u={batchMessage:a._batchMessage.bind(a),onRTCDataChange:a._onRTCDataChange.bind(a),onConnected:a._onConnected.bind(a),onNaviDataChange:a._onNaviDataChange.bind(a)};if(u[r])u[r](o,l);else{var c={onConnecting:t.RCConnectionStatus.CONNECTING,onSuspend:t.RCConnectionStatus.SUSPENDED,onDisconnected:t.RCConnectionStatus.DISCONNECTED};c[r]&&a._setConnectionStatus(c[r]),l(o[0])}}else a.logger.error(t.LogTagId.L_UNSUPPORT_NTF_FROM_MAIN_E,r)})),window.__ContextBridge__.on("__RC_CHANNEL_RESULT_FROM_MAIN__",(function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=a._resolveMaps[t];o&&(delete a._resolveMaps[t],o.apply(void 0,l([],i(r),!1)))})),a._options.httpInMainProcess&&(t.runtime.httpReq=a.sendHTTPRequest.bind(a)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:o.navigators,areaCode:o.areaCode,logServerUrl:o.logServerUrl,environment:o.environment}),a._cache=a._callMainSync("getMainProcessCache"),a}return n(r,e),Object.defineProperty(r.prototype,"chat",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"_batchMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e[0].hasMoreMsg;delete e[0].hasMoreMsg,t([e[0]],void 0,r)}}),Object.defineProperty(r.prototype,"_onRTCDataChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e[0];this._receiveRtcKv(new Uint8Array(r))}}),Object.defineProperty(r.prototype,"_onConnected",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r;r=i(e,1),this._cache=r[0],t(void 0)}}),Object.defineProperty(r.prototype,"_onNaviDataChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r;r=i(e,1),this._cache.naviInfo=r[0],t([e[0]])}}),Object.defineProperty(r.prototype,"_setConnectionStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._cache.connectionStatus=e}}),Object.defineProperty(r.prototype,"sendHTTPRequest",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("sendHTTPRequest",e)}}),Object.defineProperty(r.prototype,"setUserStatusListener",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("TODO -> RCCppEngine.setUserStatusListener")}}),Object.defineProperty(r.prototype,"_callMain",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return new Promise((function(n){var o,a=d(e);t._resolveMaps[a]=n,(o=window.__ContextBridge__).send.apply(o,l(["__RC_CHANNEL_CALL_MAIN__",a,e],i(r),!1))}))}}),Object.defineProperty(r.prototype,"callExtra",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return this._callMain.apply(this,l(["callExtra",e],i(t),!1))}}),Object.defineProperty(r.prototype,"_send2Main",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];(t=window.__ContextBridge__).send.apply(t,l(["__RC_CHANNEL_SEND_2_MAIN__",e],i(r),!1))}}),Object.defineProperty(r.prototype,"_callMainSync",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var r,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return this.logger.info(t.LogTagId.L_CALL_MAIN_SYNC_O,e),(r=window.__ContextBridge__).sendSync.apply(r,l(["__RC_CHANNEL_CALL_MAIN_SYNC__",e],i(n),!1))}}),Object.defineProperty(r.prototype,"refetchNaviInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("refetchNaviInfo")}}),Object.defineProperty(r.prototype,"getNaviInfoFromCache",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.naviInfo}}),Object.defineProperty(r.prototype,"createLogger",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return new p(this._appkey,e,t,u(this,s,"f"))}}),Object.defineProperty(r.prototype,"getConnectionStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.connectionStatus}}),Object.defineProperty(r.prototype,"connect",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return o(this,void 0,void 0,(function(){return a(this,(function(o){return[2,this._callMain("connect",e,t,r,n)]}))}))}}),Object.defineProperty(r.prototype,"reportSDKInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._send2Main("reportSDKInfo",e)}}),Object.defineProperty(r.prototype,"getConnectedTime",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.connectedTime}}),Object.defineProperty(r.prototype,"getHistoryMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("getHistoryMessage",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"getMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getMessages",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getContinuousMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getContinuousMessages",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getHistoryMessagesByObjectNames",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("getHistoryMessagesByObjectNames",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"deleteRemoteMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"deleteRemoteMessage",e,t)}}),Object.defineProperty(r.prototype,"recallMsg",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"recallMsg",e,t)}}),Object.defineProperty(r.prototype,"deleteRemoteMessageByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"deleteRemoteMessageByTimestamp",e,t)}}),Object.defineProperty(r.prototype,"getConversationListByFilter",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getConversationListByFilter",e)}}),Object.defineProperty(r.prototype,"getConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getConversation",e,t,r)}}),Object.defineProperty(r.prototype,"removeConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"removeConversation",e)}}),Object.defineProperty(r.prototype,"batchRemoveConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("batchRemoveConversation",e)}}),Object.defineProperty(r.prototype,"getTotalUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getTotalUnreadCount",e,t,r)}}),Object.defineProperty(r.prototype,"getConversationUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getConversationUnreadCount",e,t,r)}}),Object.defineProperty(r.prototype,"getTotalUnreadCountByLevels",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getTotalUnreadCountByLevels",e,t,r)}}),Object.defineProperty(r.prototype,"clearConversationUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("clearConversationUnreadCount",e,t,r)}}),Object.defineProperty(r.prototype,"getFirstUnreadMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getFirstUnreadMessage",e,t,r)}}),Object.defineProperty(r.prototype,"getFirstUnreadMessageInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getFirstUnreadMessageInfo",e,t,r)}}),Object.defineProperty(r.prototype,"saveConversationMessageDraft",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("saveConversationMessageDraft",e,t,r)}}),Object.defineProperty(r.prototype,"getConversationMessageDraft",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getConversationMessageDraft",e,t)}}),Object.defineProperty(r.prototype,"clearConversationMessageDraft",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("clearConversationMessageDraft",e,t)}}),Object.defineProperty(r.prototype,"batchSetConversationToTop",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return u(this,c,"m",b).call(this,"batchSetConversationToTop",e,t,r,n)}}),Object.defineProperty(r.prototype,"batchSetConversationNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"batchSetConversationNotificationLevel",e,t)}}),Object.defineProperty(r.prototype,"sendMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,n,o,a){var i=this,l=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return o&&(this._resolveMaps[l]=function(e){try{o(e)}catch(e){i.logger.error(t.LogTagId.L_CALLBACK_E,JSON.stringify({error:null==e?void 0:e.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",e,r,n,l,a)}}),Object.defineProperty(r.prototype,"sendReadReceiptMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("sendReadReceiptMessage",e,t,r)}}),Object.defineProperty(r.prototype,"getMessageReader",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getMessageReader",e,t,r)}}),Object.defineProperty(r.prototype,"sendReadReceiptMessageV4",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("sendReadReceiptMessageV4",e,t,r)}}),Object.defineProperty(r.prototype,"getMessageReadReceiptV4",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getMessageReadReceiptV4",e,t)}}),Object.defineProperty(r.prototype,"batchGetMessageReadReceiptInfoV4",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"updateConversationReadTime",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("updateConversationReadTime",e,t)}}),Object.defineProperty(r.prototype,"disconnect",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(r){return[2,this._callMain("disconnect",e,t)]}))}))}}),Object.defineProperty(r.prototype,"registerMessageType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._send2Main("registerMessageType",e,t)}}),Object.defineProperty(r.prototype,"joinChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("joinChatroom",e,t,r)}}),Object.defineProperty(r.prototype,"joinExistChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("joinExistChatroom",e,t,r)}}),Object.defineProperty(r.prototype,"quitChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("quitChatroom",e)}}),Object.defineProperty(r.prototype,"getChatroomInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getChatroomInfo",e,t,r)}}),Object.defineProperty(r.prototype,"getChatroomHistoryMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getChatroomHistoryMessages",e,t,r,n)}}),Object.defineProperty(r.prototype,"setChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"setChatroomEntries",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setChatroomEntries",e,t)}}),Object.defineProperty(r.prototype,"forceSetChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("forceSetChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"removeChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"forceRemoveChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("forceRemoveChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"removeChatroomEntries",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeChatroomEntries",e,t)}}),Object.defineProperty(r.prototype,"getChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"getAllChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getAllChatroomEntry",e)}}),Object.defineProperty(r.prototype,"removeChatroomFromCatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._callMain("removeChatroomFromCatch",e)}}),Object.defineProperty(r.prototype,"getFileToken",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getFileToken",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getFileUrl",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getFileUrl",e,t,r,n)}}),Object.defineProperty(r.prototype,"setUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setUserStatus",e)}}),Object.defineProperty(r.prototype,"subscribeUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("subscribeUserStatus",e)}}),Object.defineProperty(r.prototype,"getUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getUserStatus",e)}}),Object.defineProperty(r.prototype,"clearConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("clearConversations",e,t)}}),Object.defineProperty(r.prototype,"addToBlacklist",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("addToBlacklist",e)}}),Object.defineProperty(r.prototype,"removeFromBlacklist",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("removeFromBlacklist",e)}}),Object.defineProperty(r.prototype,"getBlacklist",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getBlacklist")}}),Object.defineProperty(r.prototype,"getBlacklistStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getBlacklistStatus",e)}}),Object.defineProperty(r.prototype,"insertMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("insertMessage",e,t,r)}}),Object.defineProperty(r.prototype,"batchInsertMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("batchInsertMessage",e,t)}}),Object.defineProperty(r.prototype,"getMessageCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getMessageCount",e,t,r)}}),Object.defineProperty(r.prototype,"deleteMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("deleteMessages",e)}}),Object.defineProperty(r.prototype,"deleteMessagesByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o){return this._callMain("deleteMessagesByTimestamp",e,t,r,n,o)}}),Object.defineProperty(r.prototype,"batchClearMessagesByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("batchClearMessagesByTimestamp",e)}}),Object.defineProperty(r.prototype,"batchClearRemoteHistoryMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"batchClearRemoteHistoryMessages",e,t)}}),Object.defineProperty(r.prototype,"clearMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("clearMessages",e,t,r)}}),Object.defineProperty(r.prototype,"getMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getMessage",e)}}),Object.defineProperty(r.prototype,"setMessageContent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setMessageContent",e,t,r)}}),Object.defineProperty(r.prototype,"setMessageSearchField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setMessageSearchField",e,t,r)}}),Object.defineProperty(r.prototype,"searchConversationByContent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return u(this,c,"m",b).call(this,"searchConversationByContent",e,t,r,n)}}),Object.defineProperty(r.prototype,"searchConversationByContentWithAllChannel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("searchConversationByContentWithAllChannel",e,t,r)}}),Object.defineProperty(r.prototype,"searchMessageByContentWithAllChannel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o){return this._callMain("searchMessageByContentWithAllChannel",e,t,r,n,o)}}),Object.defineProperty(r.prototype,"searchMessageByContentInTimeRangeWithAllChannel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"searchMessageByContent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("searchMessageByContent",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"searchMessageByContentAndMessageType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("searchMessageByContentAndMessageType",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"searchMessagesByUser",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("searchMessagesByUser",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getMessagesByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getMatchedMessage",e,t,r,n)}}),Object.defineProperty(r.prototype,"getUnreadMentionedMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMainSync("getUnreadMentionedMessages",e,t,r)}}),Object.defineProperty(r.prototype,"setMessageSentStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setMessageSentStatus",e,t)}}),Object.defineProperty(r.prototype,"setMessageReceivedStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setMessageReceivedStatus",e,t)}}),Object.defineProperty(r.prototype,"updateMessageReceiptStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("updateMessageReceiptStatus",e,t,r,n)}}),Object.defineProperty(r.prototype,"clearUnreadCountByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("clearUnreadCountByTimestamp",e,t,r,n)}}),Object.defineProperty(r.prototype,"clearAllUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,u(this,c,"m",b).call(this,"clearAllUnreadCount")]}))}))}}),Object.defineProperty(r.prototype,"getRemoteHistoryMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getRemoteHistoryMessages",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getServerTime",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Date.now()-this._cache.deltaTime}}),Object.defineProperty(r.prototype,"getDeviceId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.deviceId}}),Object.defineProperty(r.prototype,"setPushConfig",{enumerable:!1,configurable:!0,writable:!0,value:function(e){}}),Object.defineProperty(r.prototype,"getCurrentUserId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.crtUserId}}),Object.defineProperty(r.prototype,"bindRTCRoomForChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("bindRTCRoomForChatroom",e)}}),Object.defineProperty(r.prototype,"rtcSignaling",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return o(this,void 0,void 0,(function(){var o,i,l,u;return a(this,(function(a){switch(a.label){case 0:return o=Array.prototype.slice.call(new Uint8Array(n)),[4,this._callMain("rtcSignaling",e,t,r,o)];case 1:return i=a.sent(),l=i.code,u=i.buffer,[2,{code:l,buffer:u?new Uint8Array(u):u}]}}))}))}}),Object.defineProperty(r.prototype,"rtcPing",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("rtcPing",e,t,r)}}),Object.defineProperty(r.prototype,"createTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("createTag",e)}}),Object.defineProperty(r.prototype,"removeTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("removeTag",e)}}),Object.defineProperty(r.prototype,"updateTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("updateTag",e)}}),Object.defineProperty(r.prototype,"getTagList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getTagList")}}),Object.defineProperty(r.prototype,"addTagForConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("addTagForConversations",e,t)}}),Object.defineProperty(r.prototype,"removeTagForConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeTagForConversations",e,t)}}),Object.defineProperty(r.prototype,"removeTagsForConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeTagsForConversation",e,t)}}),Object.defineProperty(r.prototype,"getConversationListByTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getConversationListByTag",e,t,r,n)}}),Object.defineProperty(r.prototype,"getUnreadCountByTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getUnreadCountByTag",e,t)}}),Object.defineProperty(r.prototype,"setConversationStatusInTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setConversationStatusInTag",e,t,r)}}),Object.defineProperty(r.prototype,"getTagsForConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getTagsForConversation",e)}}),Object.defineProperty(r.prototype,"clearData",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("clearData")}}),Object.defineProperty(r.prototype,"getGroupMessageDeliverList",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getGroupMessageDeliverList",e,t,r)}}),Object.defineProperty(r.prototype,"getPrivateMessageDeliverTime",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getPrivateMessageDeliverTime",e,t)}}),Object.defineProperty(r.prototype,"setCallInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setCallInfo",e,t,r)}}),Object.defineProperty(r.prototype,"getUnreadMentionedCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getAllUnreadMentionedCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getAllUnreadMentionedCount")}}),Object.defineProperty(r.prototype,"getUltraGroupList",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getBlockUltraGroupList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,t.fail(t.ErrorCode.NOT_SUPPORT)]}))}))}}),Object.defineProperty(r.prototype,"clearUltraUnreadcount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadMentionedCountByTargetId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"sendUltraMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"sendUltraGroupTypingStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getUltraGroupMessageListByMessageUId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"expandUltraMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"modifyMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getUltraHistoryMsg",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getConversationNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getConversationNotificationLevel",e)}}),Object.defineProperty(r.prototype,"setConversationTypeNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"setConversationTypeNotificationLevel",e,t)}}),Object.defineProperty(r.prototype,"getConversationTypeNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getConversationTypeNotificationLevel",e)}}),Object.defineProperty(r.prototype,"getUltraGroupDefaultNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getAllUltraGroupUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadCountByTargetId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"setUltraGroupDefaultNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadMentionedMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupFirstUnreadMessageTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadInfoList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getOSInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this._callMain("getOSInfo")]}))}))}}),Object.defineProperty(r.prototype,"getProcessInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,{code:t.ErrorCode.SUCCESS,data:{title:window.__ContextBridge__.getProcessInfo("title"),pid:window.__ContextBridge__.getProcessInfo("pid"),ppid:window.__ContextBridge__.getProcessInfo("ppid"),platform:window.__ContextBridge__.getProcessInfo("platform"),arch:window.__ContextBridge__.getProcessInfo("arch"),uptime:window.__ContextBridge__.callProcessMethod("uptime"),cpuUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),memoryUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),resourceUsage:window.__ContextBridge__.callProcessMethod("cpuUsage")}}]}))}))}}),Object.defineProperty(r.prototype,"getMainProcessInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this._callMain("getMainProcessInfo")]}))}))}}),Object.defineProperty(r.prototype,"setProxy",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setProxy",e)}}),Object.defineProperty(r.prototype,"getProxy",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getProxy")}}),Object.defineProperty(r.prototype,"testProxy",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("testProxy",e,t)}}),Object.defineProperty(r.prototype,"setCheckDuplicateMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("checkDuplicateMessage",e)}}),Object.defineProperty(r.prototype,"setCheckChatRoomDuplicateMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setDuplicateMessageConfig",e)}}),Object.defineProperty(r.prototype,"setNetwork",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._send2Main("setNetwork",e,t)}}),Object.defineProperty(r.prototype,"subscribeUser",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("subscribeUser",e,t,r)}}),Object.defineProperty(r.prototype,"unSubscribeUser",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("unSubscribeUser",e,t)}}),Object.defineProperty(r.prototype,"getSubscribeUserList",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getSubscribeUserList",e,t,r)}}),Object.defineProperty(r.prototype,"getSubscribeUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getSubscribeUserStatus",e,t)}}),Object.defineProperty(r.prototype,"getConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getConversations",e)}}),Object.defineProperty(r.prototype,"updateMyUserProfile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("updateMyUserProfile",e)}}),Object.defineProperty(r.prototype,"getUserProfiles",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getUserProfiles",e)}}),Object.defineProperty(r.prototype,"getMyUserProfile",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getMyUserProfile")}}),Object.defineProperty(r.prototype,"updateMyUserProfileVisibility",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("updateMyUserProfileVisibility",e)}}),Object.defineProperty(r.prototype,"getMyUserProfileVisibility",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getMyUserProfileVisibility")}}),Object.defineProperty(r.prototype,"searchUserProfileByUniqueId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("searchUserProfileByUniqueId",e)}}),Object.defineProperty(r.prototype,"createGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return o(this,void 0,void 0,(function(){return a(this,(function(o){return[2,this._callMain("createGroup",e,t,r,n)]}))}))}}),Object.defineProperty(r.prototype,"updateGroupInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("updateGroupInfo",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupsInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getGroupsInfo",e)}}),Object.defineProperty(r.prototype,"kickGroupMembers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("kickGroupMembers",e,t,r)}}),Object.defineProperty(r.prototype,"quitGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("quitGroup",e,t)}}),Object.defineProperty(r.prototype,"dismissGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("dismissGroup",e)}}),Object.defineProperty(r.prototype,"transferGroupOwner",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("transferGroupOwner",e,t,r,n)}}),Object.defineProperty(r.prototype,"setGroupManagers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setGroupManagers",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupMembersByRole",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getGroupMembersByRole",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupMembers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getGroupMembers",e,t)}}),Object.defineProperty(r.prototype,"setGroupMemberInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("setGroupMemberInfo",e,t,r,n)}}),Object.defineProperty(r.prototype,"searchGroupMembers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("searchGroupMembers",e,t,r)}}),Object.defineProperty(r.prototype,"joinGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("joinGroup",e)}}),Object.defineProperty(r.prototype,"inviteUsersToGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("inviteUsersToGroup",e,t)}}),Object.defineProperty(r.prototype,"memberInviteResponse",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("memberInviteResponse",e)}}),Object.defineProperty(r.prototype,"getGroupApplications",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getGroupApplications",e,t,r)}}),Object.defineProperty(r.prototype,"getJoinedGroupsByRole",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getJoinedGroupsByRole",e,t)}}),Object.defineProperty(r.prototype,"searchJoinedGroups",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("searchJoinedGroups",e,t)}}),Object.defineProperty(r.prototype,"getJoinedGroups",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getJoinedGroups",e)}}),Object.defineProperty(r.prototype,"setGroupRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setGroupRemark",e,t)}}),Object.defineProperty(r.prototype,"setGroupFollows",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setGroupFollows",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupFollows",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getGroupFollows",e)}}),Object.defineProperty(r.prototype,"addFriend",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("addFriend",e,t,r)}}),Object.defineProperty(r.prototype,"deleteFriends",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("deleteFriends",e,t)}}),Object.defineProperty(r.prototype,"acceptFriendApplication",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("acceptFriendApplication",e)}}),Object.defineProperty(r.prototype,"refuseFriendApplication",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("refuseFriendApplication",e,t)}}),Object.defineProperty(r.prototype,"setFriendInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setFriendInfo",e,t,r)}}),Object.defineProperty(r.prototype,"checkFriends",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("checkFriends",e,t)}}),Object.defineProperty(r.prototype,"getFriends",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getFriends",e)}}),Object.defineProperty(r.prototype,"getFriendApplications",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getFriendApplications",e,t,r)}}),Object.defineProperty(r.prototype,"deleteFriendApplication",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("deleteFriendApplication",e,t)}}),Object.defineProperty(r.prototype,"getFriendsInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getFriendsInfo",e)}}),Object.defineProperty(r.prototype,"searchFriendsInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("searchFriendsInfo",e)}}),Object.defineProperty(r.prototype,"setFriendAddPermission",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setFriendAddPermission",e)}}),Object.defineProperty(r.prototype,"getFriendAddPermission",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getFriendAddPermission")}}),Object.defineProperty(r.prototype,"getRealtimeConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getRealtimeConTotalUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"clearRealtimeConUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"removeRealtimeConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getRealtimeConUnreadCounts",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"setNotificationQuietHoursWithSetting",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,u(this,c,"m",b).call(this,"setNotificationQuietHoursWithSetting",e)]}))}))}}),Object.defineProperty(r.prototype,"removeNotificationQuietHoursSetting",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,u(this,c,"m",b).call(this,"removeNotificationQuietHoursSetting")]}))}))}}),Object.defineProperty(r.prototype,"getNotificationQuietHoursSetting",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,u(this,c,"m",b).call(this,"getNotificationQuietHoursSetting")]}))}))}}),Object.defineProperty(r.prototype,"getStatsUrlList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return u(this,c,"m",b).call(this,"getStatsUrlList")}}),Object.defineProperty(r.prototype,"sendReadReceiptResponseV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"sendReadReceiptResponseV5",e,t)}}),Object.defineProperty(r.prototype,"getMessageReadReceiptInfoV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"getMessageReadReceiptInfoV5",e,t)}}),Object.defineProperty(r.prototype,"getMessagesReadReceiptUsersByPageV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getMessagesReadReceiptUsersByPageV5",e,t,r)}}),Object.defineProperty(r.prototype,"getMessagesReadReceiptByUsersV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getMessagesReadReceiptByUsersV5",e,t,r)}}),r}(t.BasicEngine);s=new WeakMap,c=new WeakSet,b=function(e){for(var r=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new Promise((function(o){var a,u=d(e);r._resolveMaps[u]=function(e){var r=e.code,n=e.msg,a=e.data;r!==t.ErrorCode.SUCCESS?o(t.fail(r,n,a)):o(t.ok(a))},(a=window.__ContextBridge__).send.apply(a,l(["__RC_CHANNEL_CALL_MAIN__",u,e],i(n),!1))}))};var h={on:function(t,r){e.ipcRenderer.on(t,(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];r.apply(void 0,l([e],i(t),!1))}))},send:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e.ipcRenderer.send.apply(e.ipcRenderer,l([t],i(r),!1))},sendSync:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.ipcRenderer.sendSync.apply(e.ipcRenderer,l([t],i(r),!1))},getProcessInfo:function(e){return process[e]},callProcessMethod:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(t=process)[e].apply(t,l([],i(r),!1))}};window&&(window.RCCppEngine=y,window.__ContextBridge__=h);exports.RCCppEngine=y,exports.initContextBridge=function(){e.contextBridge&&e.contextBridge.exposeInMainWorld("__ContextBridge__",h)};
package/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("electron"),e=require("@rongcloud/engine"),n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function r(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))}function i(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function s(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var c,u=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i._handleWrite=r,i}return o(e,t),e}(e.BasicLogger),l=0,p=Date.now(),f=function(t){var e=Date.now();return p!==e&&(p=e,l=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,l++].join("__")};e.VersionManage.add("electron-renderer","5.18.0");var h=function(t){function n(n,o,r){var i=this,l=function(t){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",t)},p=new u(r.appkey,"IMLib","IM",l);return i=t.call(this,n,o,r,p)||this,c.set(i,void 0),i._resolveMaps={},function(t,e,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===o?r.call(t,n):r?r.value=n:e.set(t,n)}(i,c,l,"f"),p.setOutputLevel(r.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var s=o[n];if(s){var c={batchMessage:i._batchMessage.bind(i),onRTCDataChange:i._onRTCDataChange.bind(i),onConnected:i._onConnected.bind(i),onNaviDataChange:i._onNaviDataChange.bind(i)};if(c[n])c[n](r,s);else{var u={onConnecting:e.RCConnectionStatus.CONNECTING,onSuspend:e.RCConnectionStatus.SUSPENDED,onDisconnected:e.RCConnectionStatus.DISCONNECTED};u[n]&&i._setConnectionStatus(u[n]),s(r[0])}}else i.logger.error(e.LogTagId.L_UNSUPPORT_NTF_FROM_MAIN_E,n)})),window.__ContextBridge__.on("__RC_CHANNEL_RESULT_FROM_MAIN__",(function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=i._resolveMaps[e];r&&(delete i._resolveMaps[e],r.apply(void 0,s([],a(n),!1)))})),i._options.httpInMainProcess&&(e.runtime.httpReq=i.sendHTTPRequest.bind(i)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:r.navigators,areaCode:r.areaCode,logServerUrl:r.logServerUrl,environment:r.environment}),i._cache=i._callMainSync("getMainProcessCache"),i}return o(n,t),Object.defineProperty(n.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chat",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dataHosting",{get:function(){return this},enumerable:!1,configurable:!0}),n.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},n.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},n.prototype._onConnected=function(t,e){var n;n=a(t,1),this._cache=n[0],e(void 0)},n.prototype._onNaviDataChange=function(t,e){var n;n=a(t,1),this._cache.naviInfo=n[0],e([t[0]])},n.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},n.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},n.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},n.prototype._callMain=function(t){for(var e=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new Promise((function(o){var r,i=f(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,s(["__RC_CHANNEL_CALL_MAIN__",i,t],a(n),!1))}))},n.prototype._callMain2=function(t){for(var n=this,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return new Promise((function(r){var i,c=f(t);n._resolveMaps[c]=function(t){var n=t.code,o=t.msg,i=t.data;n!==e.ErrorCode.SUCCESS?r(e.fail(n,o,i)):r(e.ok(i))},(i=window.__ContextBridge__).send.apply(i,s(["__RC_CHANNEL_CALL_MAIN__",c,t],a(o),!1))}))},n.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,s(["callExtra",t],a(e),!1))},n.prototype._send2Main=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];(e=window.__ContextBridge__).send.apply(e,s(["__RC_CHANNEL_SEND_2_MAIN__",t],a(n),!1))},n.prototype._callMainSync=function(t){for(var n,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return this.logger.info(e.LogTagId.L_CALL_MAIN_SYNC_O,t),(n=window.__ContextBridge__).sendSync.apply(n,s(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],a(o),!1))},n.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},n.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},n.prototype.createLogger=function(t,e){return new u(this._appkey,t,e,function(t,e,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(t):o?o.value:e.get(t)}(this,c,"f"))},n.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},n.prototype.connect=function(t,e,n,o){return r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},n.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},n.prototype.getConnectedTime=function(){return this._cache.connectedTime},n.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},n.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},n.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},n.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},n.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},n.prototype.recallMsg=function(t,e){return this._callMain2("recallMsg",t,e)},n.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},n.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},n.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},n.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},n.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},n.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},n.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},n.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},n.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},n.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},n.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},n.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},n.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},n.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},n.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},n.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},n.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},n.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},n.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},n.prototype.batchSetConversationStatus=function(t){return this._callMain("batchSetConversationStatus",t)},n.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},n.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},n.prototype.sendMessage=function(t,n,o,r,i){var a=this,s=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return r&&(this._resolveMaps[s]=function(t){try{r(t)}catch(t){a.logger.error(e.LogTagId.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,n,o,s,i)},n.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},n.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},n.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},n.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},n.prototype.batchGetMessageReadReceiptInfoV4=function(t,n){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},n.prototype.disconnect=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},n.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},n.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},n.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},n.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},n.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},n.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},n.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},n.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},n.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},n.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},n.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},n.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},n.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},n.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},n.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},n.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},n.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},n.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},n.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},n.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},n.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},n.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},n.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},n.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},n.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},n.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},n.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},n.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},n.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},n.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},n.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},n.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},n.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},n.prototype.getMessage=function(t){return this._callMain2("getMessage",t)},n.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},n.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},n.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},n.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},n.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},n.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},n.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},n.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},n.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},n.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},n.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},n.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},n.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},n.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},n.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},n.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},n.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},n.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},n.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},n.prototype.getDeviceId=function(){return this._cache.deviceId},n.prototype.getCurrentUserId=function(){return this._cache.crtUserId},n.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},n.prototype.rtcSignaling=function(t,e,n,o){return r(this,void 0,void 0,(function(){var r,a,s,c;return i(this,(function(i){switch(i.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return a=i.sent(),s=a.code,c=a.buffer,[2,{code:s,buffer:c?new Uint8Array(c):c}]}}))}))},n.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},n.prototype.createTag=function(t){return this._callMain("createTag",t)},n.prototype.removeTag=function(t){return this._callMain("removeTag",t)},n.prototype.updateTag=function(t){return this._callMain("updateTag",t)},n.prototype.getTagList=function(){return this._callMain("getTagList")},n.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},n.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},n.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},n.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},n.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},n.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},n.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},n.prototype.clearData=function(){return this._callMain("clearData")},n.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},n.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},n.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},n.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},n.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},n.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},n.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},n.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},n.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},n.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},n.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},n.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},n.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},n.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},n.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},n.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},n.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},n.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},n.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},n.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},n.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},n.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},n.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},n.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},n.prototype.getUltraGroupDefaultNotificationLevel=function(t,n){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:e.ErrorCode.NOT_SUPPORT})},n.prototype.getOSInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},n.prototype.getProcessInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,{code:e.ErrorCode.SUCCESS,data:{title:window.__ContextBridge__.getProcessInfo("title"),pid:window.__ContextBridge__.getProcessInfo("pid"),ppid:window.__ContextBridge__.getProcessInfo("ppid"),platform:window.__ContextBridge__.getProcessInfo("platform"),arch:window.__ContextBridge__.getProcessInfo("arch"),uptime:window.__ContextBridge__.callProcessMethod("uptime"),cpuUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),memoryUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),resourceUsage:window.__ContextBridge__.callProcessMethod("cpuUsage")}}]}))}))},n.prototype.getMainProcessInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},n.prototype.setProxy=function(t){return this._callMain("setProxy",t)},n.prototype.getProxy=function(){return this._callMain("getProxy")},n.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},n.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},n.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},n.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},n.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},n.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},n.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},n.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},n.prototype.getConversations=function(t){return this._callMain("getConversations",t)},n.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},n.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},n.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},n.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},n.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},n.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},n.prototype.createGroup=function(t,e,n,o){return r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},n.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},n.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},n.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},n.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},n.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},n.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},n.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},n.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},n.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},n.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},n.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},n.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},n.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},n.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},n.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},n.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},n.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},n.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},n.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},n.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},n.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},n.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},n.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},n.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},n.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},n.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},n.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},n.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},n.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},n.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},n.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},n.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},n.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},n.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},n.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},n.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},n.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},n.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},n.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},n.prototype.setNotificationQuietHoursWithSetting=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},n.prototype.removeNotificationQuietHoursSetting=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},n.prototype.getNotificationQuietHoursSetting=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},n}(e.BasicEngine);c=new WeakMap;var g={on:function(e,n){t.ipcRenderer.on(e,(function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];n.apply(void 0,s([t],a(e),!1))}))},send:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];t.ipcRenderer.send.apply(t.ipcRenderer,s([e],a(n),!1))},sendSync:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return t.ipcRenderer.sendSync.apply(t.ipcRenderer,s([e],a(n),!1))},getProcessInfo:function(t){return process[t]},callProcessMethod:function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return(e=process)[t].apply(e,s([],a(n),!1))}};window&&(window.RCCppEngine=h,window.__ContextBridge__=g);exports.RCCppEngine=h,exports.initContextBridge=function(){t.contextBridge&&t.contextBridge.exposeInMainWorld("__ContextBridge__",g)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("electron"),t=require("@rongcloud/engine"),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)};function n(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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{u(n.next(e))}catch(e){a(e)}}function l(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}u((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function u(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}var c,s,b,p=function(e){function t(t,r,n,o){var a=e.call(this,t,r,n)||this;return Object.defineProperty(a,"_handleWrite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a._handleWrite=o,a}return n(t,e),t}(t.BasicLogger),f=0,g=Date.now(),d=function(e){var t=Date.now();return g!==t&&(g=t,f=0),[e,window.__ContextBridge__.getProcessInfo("pid"),t,f++].join("__")};t.VersionManage.add("electron-renderer","5.20.0-alpha.1");var y=function(e){function r(r,n,o){var a=this,u=function(e){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",e)},b=new p(o.appkey,"IMLib","IM",u);return a=e.call(this,r,n,o,b)||this,c.add(a),Object.defineProperty(a,"_cache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s.set(a,void 0),Object.defineProperty(a,"_resolveMaps",{enumerable:!0,configurable:!0,writable:!0,value:{}}),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(a,s,u,"f"),b.setOutputLevel(o.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(e,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];var l=n[r];if(l){var u={batchMessage:a._batchMessage.bind(a),onRTCDataChange:a._onRTCDataChange.bind(a),onConnected:a._onConnected.bind(a),onNaviDataChange:a._onNaviDataChange.bind(a)};if(u[r])u[r](o,l);else{var c={onConnecting:t.RCConnectionStatus.CONNECTING,onSuspend:t.RCConnectionStatus.SUSPENDED,onDisconnected:t.RCConnectionStatus.DISCONNECTED};c[r]&&a._setConnectionStatus(c[r]),l(o[0])}}else a.logger.error(t.LogTagId.L_UNSUPPORT_NTF_FROM_MAIN_E,r)})),window.__ContextBridge__.on("__RC_CHANNEL_RESULT_FROM_MAIN__",(function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=a._resolveMaps[t];o&&(delete a._resolveMaps[t],o.apply(void 0,l([],i(r),!1)))})),a._options.httpInMainProcess&&(t.runtime.httpReq=a.sendHTTPRequest.bind(a)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:o.navigators,areaCode:o.areaCode,logServerUrl:o.logServerUrl,environment:o.environment}),a._cache=a._callMainSync("getMainProcessCache"),a}return n(r,e),Object.defineProperty(r.prototype,"chat",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"_batchMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e[0].hasMoreMsg;delete e[0].hasMoreMsg,t([e[0]],void 0,r)}}),Object.defineProperty(r.prototype,"_onRTCDataChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e[0];this._receiveRtcKv(new Uint8Array(r))}}),Object.defineProperty(r.prototype,"_onConnected",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r;r=i(e,1),this._cache=r[0],t(void 0)}}),Object.defineProperty(r.prototype,"_onNaviDataChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r;r=i(e,1),this._cache.naviInfo=r[0],t([e[0]])}}),Object.defineProperty(r.prototype,"_setConnectionStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._cache.connectionStatus=e}}),Object.defineProperty(r.prototype,"sendHTTPRequest",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("sendHTTPRequest",e)}}),Object.defineProperty(r.prototype,"setUserStatusListener",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("TODO -> RCCppEngine.setUserStatusListener")}}),Object.defineProperty(r.prototype,"_callMain",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return new Promise((function(n){var o,a=d(e);t._resolveMaps[a]=n,(o=window.__ContextBridge__).send.apply(o,l(["__RC_CHANNEL_CALL_MAIN__",a,e],i(r),!1))}))}}),Object.defineProperty(r.prototype,"callExtra",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return this._callMain.apply(this,l(["callExtra",e],i(t),!1))}}),Object.defineProperty(r.prototype,"_send2Main",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];(t=window.__ContextBridge__).send.apply(t,l(["__RC_CHANNEL_SEND_2_MAIN__",e],i(r),!1))}}),Object.defineProperty(r.prototype,"_callMainSync",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var r,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return this.logger.info(t.LogTagId.L_CALL_MAIN_SYNC_O,e),(r=window.__ContextBridge__).sendSync.apply(r,l(["__RC_CHANNEL_CALL_MAIN_SYNC__",e],i(n),!1))}}),Object.defineProperty(r.prototype,"refetchNaviInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("refetchNaviInfo")}}),Object.defineProperty(r.prototype,"getNaviInfoFromCache",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.naviInfo}}),Object.defineProperty(r.prototype,"createLogger",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return new p(this._appkey,e,t,u(this,s,"f"))}}),Object.defineProperty(r.prototype,"getConnectionStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.connectionStatus}}),Object.defineProperty(r.prototype,"connect",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return o(this,void 0,void 0,(function(){return a(this,(function(o){return[2,this._callMain("connect",e,t,r,n)]}))}))}}),Object.defineProperty(r.prototype,"reportSDKInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._send2Main("reportSDKInfo",e)}}),Object.defineProperty(r.prototype,"getConnectedTime",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.connectedTime}}),Object.defineProperty(r.prototype,"getHistoryMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("getHistoryMessage",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"getMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getMessages",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getContinuousMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getContinuousMessages",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getHistoryMessagesByObjectNames",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("getHistoryMessagesByObjectNames",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"deleteRemoteMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"deleteRemoteMessage",e,t)}}),Object.defineProperty(r.prototype,"recallMsg",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"recallMsg",e,t)}}),Object.defineProperty(r.prototype,"deleteRemoteMessageByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"deleteRemoteMessageByTimestamp",e,t)}}),Object.defineProperty(r.prototype,"getConversationListByFilter",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getConversationListByFilter",e)}}),Object.defineProperty(r.prototype,"getConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getConversation",e,t,r)}}),Object.defineProperty(r.prototype,"removeConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"removeConversation",e)}}),Object.defineProperty(r.prototype,"batchRemoveConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("batchRemoveConversation",e)}}),Object.defineProperty(r.prototype,"getTotalUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getTotalUnreadCount",e,t,r)}}),Object.defineProperty(r.prototype,"getConversationUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getConversationUnreadCount",e,t,r)}}),Object.defineProperty(r.prototype,"getTotalUnreadCountByLevels",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getTotalUnreadCountByLevels",e,t,r)}}),Object.defineProperty(r.prototype,"clearConversationUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("clearConversationUnreadCount",e,t,r)}}),Object.defineProperty(r.prototype,"getFirstUnreadMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getFirstUnreadMessage",e,t,r)}}),Object.defineProperty(r.prototype,"getFirstUnreadMessageInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getFirstUnreadMessageInfo",e,t,r)}}),Object.defineProperty(r.prototype,"saveConversationMessageDraft",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("saveConversationMessageDraft",e,t,r)}}),Object.defineProperty(r.prototype,"getConversationMessageDraft",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getConversationMessageDraft",e,t)}}),Object.defineProperty(r.prototype,"clearConversationMessageDraft",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("clearConversationMessageDraft",e,t)}}),Object.defineProperty(r.prototype,"batchSetConversationToTop",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return u(this,c,"m",b).call(this,"batchSetConversationToTop",e,t,r,n)}}),Object.defineProperty(r.prototype,"batchSetConversationNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"batchSetConversationNotificationLevel",e,t)}}),Object.defineProperty(r.prototype,"sendMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,n,o,a){var i=this,l=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return o&&(this._resolveMaps[l]=function(e){try{o(e)}catch(e){i.logger.error(t.LogTagId.L_CALLBACK_E,JSON.stringify({error:null==e?void 0:e.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",e,r,n,l,a)}}),Object.defineProperty(r.prototype,"sendReadReceiptMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("sendReadReceiptMessage",e,t,r)}}),Object.defineProperty(r.prototype,"getMessageReader",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getMessageReader",e,t,r)}}),Object.defineProperty(r.prototype,"sendReadReceiptMessageV4",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("sendReadReceiptMessageV4",e,t,r)}}),Object.defineProperty(r.prototype,"getMessageReadReceiptV4",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getMessageReadReceiptV4",e,t)}}),Object.defineProperty(r.prototype,"batchGetMessageReadReceiptInfoV4",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"updateConversationReadTime",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("updateConversationReadTime",e,t)}}),Object.defineProperty(r.prototype,"disconnect",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(r){return[2,this._callMain("disconnect",e,t)]}))}))}}),Object.defineProperty(r.prototype,"registerMessageType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._send2Main("registerMessageType",e,t)}}),Object.defineProperty(r.prototype,"joinChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("joinChatroom",e,t,r)}}),Object.defineProperty(r.prototype,"joinExistChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("joinExistChatroom",e,t,r)}}),Object.defineProperty(r.prototype,"quitChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("quitChatroom",e)}}),Object.defineProperty(r.prototype,"getChatroomInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getChatroomInfo",e,t,r)}}),Object.defineProperty(r.prototype,"getChatroomHistoryMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getChatroomHistoryMessages",e,t,r,n)}}),Object.defineProperty(r.prototype,"setChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"setChatroomEntries",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setChatroomEntries",e,t)}}),Object.defineProperty(r.prototype,"forceSetChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("forceSetChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"removeChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"forceRemoveChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("forceRemoveChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"removeChatroomEntries",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeChatroomEntries",e,t)}}),Object.defineProperty(r.prototype,"getChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getChatroomEntry",e,t)}}),Object.defineProperty(r.prototype,"getAllChatroomEntry",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getAllChatroomEntry",e)}}),Object.defineProperty(r.prototype,"removeChatroomFromCatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._callMain("removeChatroomFromCatch",e)}}),Object.defineProperty(r.prototype,"getFileToken",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getFileToken",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getFileUrl",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getFileUrl",e,t,r,n)}}),Object.defineProperty(r.prototype,"setUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setUserStatus",e)}}),Object.defineProperty(r.prototype,"subscribeUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("subscribeUserStatus",e)}}),Object.defineProperty(r.prototype,"getUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getUserStatus",e)}}),Object.defineProperty(r.prototype,"clearConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("clearConversations",e,t)}}),Object.defineProperty(r.prototype,"addToBlacklist",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("addToBlacklist",e)}}),Object.defineProperty(r.prototype,"removeFromBlacklist",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("removeFromBlacklist",e)}}),Object.defineProperty(r.prototype,"getBlacklist",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getBlacklist")}}),Object.defineProperty(r.prototype,"getBlacklistStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getBlacklistStatus",e)}}),Object.defineProperty(r.prototype,"insertMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("insertMessage",e,t,r)}}),Object.defineProperty(r.prototype,"batchInsertMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("batchInsertMessage",e,t)}}),Object.defineProperty(r.prototype,"getMessageCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getMessageCount",e,t,r)}}),Object.defineProperty(r.prototype,"deleteMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("deleteMessages",e)}}),Object.defineProperty(r.prototype,"deleteMessagesByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o){return this._callMain("deleteMessagesByTimestamp",e,t,r,n,o)}}),Object.defineProperty(r.prototype,"batchClearMessagesByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("batchClearMessagesByTimestamp",e)}}),Object.defineProperty(r.prototype,"batchClearRemoteHistoryMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"batchClearRemoteHistoryMessages",e,t)}}),Object.defineProperty(r.prototype,"clearMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("clearMessages",e,t,r)}}),Object.defineProperty(r.prototype,"getMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getMessage",e)}}),Object.defineProperty(r.prototype,"setMessageContent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setMessageContent",e,t,r)}}),Object.defineProperty(r.prototype,"setMessageSearchField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setMessageSearchField",e,t,r)}}),Object.defineProperty(r.prototype,"searchConversationByContent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return u(this,c,"m",b).call(this,"searchConversationByContent",e,t,r,n)}}),Object.defineProperty(r.prototype,"searchConversationByContentWithAllChannel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("searchConversationByContentWithAllChannel",e,t,r)}}),Object.defineProperty(r.prototype,"searchMessageByContentWithAllChannel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o){return this._callMain("searchMessageByContentWithAllChannel",e,t,r,n,o)}}),Object.defineProperty(r.prototype,"searchMessageByContentInTimeRangeWithAllChannel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"searchMessageByContent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("searchMessageByContent",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"searchMessageByContentAndMessageType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a,i){return this._callMain("searchMessageByContentAndMessageType",e,t,r,n,o,a,i)}}),Object.defineProperty(r.prototype,"searchMessagesByUser",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("searchMessagesByUser",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getMessagesByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getMatchedMessage",e,t,r,n)}}),Object.defineProperty(r.prototype,"getUnreadMentionedMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMainSync("getUnreadMentionedMessages",e,t,r)}}),Object.defineProperty(r.prototype,"setMessageSentStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setMessageSentStatus",e,t)}}),Object.defineProperty(r.prototype,"setMessageReceivedStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setMessageReceivedStatus",e,t)}}),Object.defineProperty(r.prototype,"updateMessageReceiptStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("updateMessageReceiptStatus",e,t,r,n)}}),Object.defineProperty(r.prototype,"clearUnreadCountByTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("clearUnreadCountByTimestamp",e,t,r,n)}}),Object.defineProperty(r.prototype,"clearAllUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,u(this,c,"m",b).call(this,"clearAllUnreadCount")]}))}))}}),Object.defineProperty(r.prototype,"getRemoteHistoryMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n,o,a){return this._callMain("getRemoteHistoryMessages",e,t,r,n,o,a)}}),Object.defineProperty(r.prototype,"getServerTime",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Date.now()-this._cache.deltaTime}}),Object.defineProperty(r.prototype,"getDeviceId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.deviceId}}),Object.defineProperty(r.prototype,"setPushConfig",{enumerable:!1,configurable:!0,writable:!0,value:function(e){}}),Object.defineProperty(r.prototype,"getCurrentUserId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._cache.crtUserId}}),Object.defineProperty(r.prototype,"bindRTCRoomForChatroom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("bindRTCRoomForChatroom",e)}}),Object.defineProperty(r.prototype,"rtcSignaling",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return o(this,void 0,void 0,(function(){var o,i,l,u;return a(this,(function(a){switch(a.label){case 0:return o=Array.prototype.slice.call(new Uint8Array(n)),[4,this._callMain("rtcSignaling",e,t,r,o)];case 1:return i=a.sent(),l=i.code,u=i.buffer,[2,{code:l,buffer:u?new Uint8Array(u):u}]}}))}))}}),Object.defineProperty(r.prototype,"rtcPing",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("rtcPing",e,t,r)}}),Object.defineProperty(r.prototype,"createTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("createTag",e)}}),Object.defineProperty(r.prototype,"removeTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("removeTag",e)}}),Object.defineProperty(r.prototype,"updateTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("updateTag",e)}}),Object.defineProperty(r.prototype,"getTagList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getTagList")}}),Object.defineProperty(r.prototype,"addTagForConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("addTagForConversations",e,t)}}),Object.defineProperty(r.prototype,"removeTagForConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeTagForConversations",e,t)}}),Object.defineProperty(r.prototype,"removeTagsForConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("removeTagsForConversation",e,t)}}),Object.defineProperty(r.prototype,"getConversationListByTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("getConversationListByTag",e,t,r,n)}}),Object.defineProperty(r.prototype,"getUnreadCountByTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getUnreadCountByTag",e,t)}}),Object.defineProperty(r.prototype,"setConversationStatusInTag",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setConversationStatusInTag",e,t,r)}}),Object.defineProperty(r.prototype,"getTagsForConversation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getTagsForConversation",e)}}),Object.defineProperty(r.prototype,"clearData",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("clearData")}}),Object.defineProperty(r.prototype,"getGroupMessageDeliverList",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getGroupMessageDeliverList",e,t,r)}}),Object.defineProperty(r.prototype,"getPrivateMessageDeliverTime",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getPrivateMessageDeliverTime",e,t)}}),Object.defineProperty(r.prototype,"setCallInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setCallInfo",e,t,r)}}),Object.defineProperty(r.prototype,"getUnreadMentionedCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getAllUnreadMentionedCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getAllUnreadMentionedCount")}}),Object.defineProperty(r.prototype,"getUltraGroupList",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getBlockUltraGroupList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,t.fail(t.ErrorCode.NOT_SUPPORT)]}))}))}}),Object.defineProperty(r.prototype,"clearUltraUnreadcount",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadMentionedCountByTargetId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"sendUltraMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"sendUltraGroupTypingStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getUltraGroupMessageListByMessageUId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"expandUltraMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"modifyMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getUltraHistoryMsg",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getConversationNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getConversationNotificationLevel",e)}}),Object.defineProperty(r.prototype,"setConversationTypeNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"setConversationTypeNotificationLevel",e,t)}}),Object.defineProperty(r.prototype,"getConversationTypeNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return u(this,c,"m",b).call(this,"getConversationTypeNotificationLevel",e)}}),Object.defineProperty(r.prototype,"getUltraGroupDefaultNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getAllUltraGroupUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadCountByTargetId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"setUltraGroupDefaultNotificationLevel",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadMentionedMessages",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupFirstUnreadMessageTimestamp",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getUltraGroupUnreadInfoList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})}}),Object.defineProperty(r.prototype,"getOSInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this._callMain("getOSInfo")]}))}))}}),Object.defineProperty(r.prototype,"getProcessInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,{code:t.ErrorCode.SUCCESS,data:{title:window.__ContextBridge__.getProcessInfo("title"),pid:window.__ContextBridge__.getProcessInfo("pid"),ppid:window.__ContextBridge__.getProcessInfo("ppid"),platform:window.__ContextBridge__.getProcessInfo("platform"),arch:window.__ContextBridge__.getProcessInfo("arch"),uptime:window.__ContextBridge__.callProcessMethod("uptime"),cpuUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),memoryUsage:window.__ContextBridge__.callProcessMethod("cpuUsage"),resourceUsage:window.__ContextBridge__.callProcessMethod("cpuUsage")}}]}))}))}}),Object.defineProperty(r.prototype,"getMainProcessInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this._callMain("getMainProcessInfo")]}))}))}}),Object.defineProperty(r.prototype,"setProxy",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setProxy",e)}}),Object.defineProperty(r.prototype,"getProxy",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getProxy")}}),Object.defineProperty(r.prototype,"testProxy",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("testProxy",e,t)}}),Object.defineProperty(r.prototype,"setCheckDuplicateMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("checkDuplicateMessage",e)}}),Object.defineProperty(r.prototype,"setCheckChatRoomDuplicateMessage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setDuplicateMessageConfig",e)}}),Object.defineProperty(r.prototype,"setNetwork",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._send2Main("setNetwork",e,t)}}),Object.defineProperty(r.prototype,"subscribeUser",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("subscribeUser",e,t,r)}}),Object.defineProperty(r.prototype,"unSubscribeUser",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("unSubscribeUser",e,t)}}),Object.defineProperty(r.prototype,"getSubscribeUserList",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getSubscribeUserList",e,t,r)}}),Object.defineProperty(r.prototype,"getSubscribeUserStatus",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getSubscribeUserStatus",e,t)}}),Object.defineProperty(r.prototype,"getConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getConversations",e)}}),Object.defineProperty(r.prototype,"updateMyUserProfile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("updateMyUserProfile",e)}}),Object.defineProperty(r.prototype,"getUserProfiles",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getUserProfiles",e)}}),Object.defineProperty(r.prototype,"getMyUserProfile",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getMyUserProfile")}}),Object.defineProperty(r.prototype,"updateMyUserProfileVisibility",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("updateMyUserProfileVisibility",e)}}),Object.defineProperty(r.prototype,"getMyUserProfileVisibility",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getMyUserProfileVisibility")}}),Object.defineProperty(r.prototype,"searchUserProfileByUniqueId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("searchUserProfileByUniqueId",e)}}),Object.defineProperty(r.prototype,"createGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return o(this,void 0,void 0,(function(){return a(this,(function(o){return[2,this._callMain("createGroup",e,t,r,n)]}))}))}}),Object.defineProperty(r.prototype,"updateGroupInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("updateGroupInfo",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupsInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getGroupsInfo",e)}}),Object.defineProperty(r.prototype,"kickGroupMembers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("kickGroupMembers",e,t,r)}}),Object.defineProperty(r.prototype,"quitGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("quitGroup",e,t)}}),Object.defineProperty(r.prototype,"dismissGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("dismissGroup",e)}}),Object.defineProperty(r.prototype,"transferGroupOwner",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("transferGroupOwner",e,t,r,n)}}),Object.defineProperty(r.prototype,"setGroupManagers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setGroupManagers",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupMembersByRole",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getGroupMembersByRole",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupMembers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getGroupMembers",e,t)}}),Object.defineProperty(r.prototype,"setGroupMemberInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._callMain("setGroupMemberInfo",e,t,r,n)}}),Object.defineProperty(r.prototype,"searchGroupMembers",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("searchGroupMembers",e,t,r)}}),Object.defineProperty(r.prototype,"joinGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("joinGroup",e)}}),Object.defineProperty(r.prototype,"inviteUsersToGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("inviteUsersToGroup",e,t)}}),Object.defineProperty(r.prototype,"memberInviteResponse",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("memberInviteResponse",e)}}),Object.defineProperty(r.prototype,"getGroupApplications",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getGroupApplications",e,t,r)}}),Object.defineProperty(r.prototype,"getJoinedGroupsByRole",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getJoinedGroupsByRole",e,t)}}),Object.defineProperty(r.prototype,"searchJoinedGroups",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("searchJoinedGroups",e,t)}}),Object.defineProperty(r.prototype,"getJoinedGroups",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getJoinedGroups",e)}}),Object.defineProperty(r.prototype,"setGroupRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("setGroupRemark",e,t)}}),Object.defineProperty(r.prototype,"setGroupFollows",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setGroupFollows",e,t,r)}}),Object.defineProperty(r.prototype,"getGroupFollows",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getGroupFollows",e)}}),Object.defineProperty(r.prototype,"addFriend",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("addFriend",e,t,r)}}),Object.defineProperty(r.prototype,"deleteFriends",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("deleteFriends",e,t)}}),Object.defineProperty(r.prototype,"acceptFriendApplication",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("acceptFriendApplication",e)}}),Object.defineProperty(r.prototype,"refuseFriendApplication",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("refuseFriendApplication",e,t)}}),Object.defineProperty(r.prototype,"setFriendInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("setFriendInfo",e,t,r)}}),Object.defineProperty(r.prototype,"checkFriends",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("checkFriends",e,t)}}),Object.defineProperty(r.prototype,"getFriends",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("getFriends",e)}}),Object.defineProperty(r.prototype,"getFriendApplications",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return this._callMain("getFriendApplications",e,t,r)}}),Object.defineProperty(r.prototype,"deleteFriendApplication",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._callMain("deleteFriendApplication",e,t)}}),Object.defineProperty(r.prototype,"getFriendsInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("getFriendsInfo",e)}}),Object.defineProperty(r.prototype,"searchFriendsInfo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("searchFriendsInfo",e)}}),Object.defineProperty(r.prototype,"setFriendAddPermission",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._callMain("setFriendAddPermission",e)}}),Object.defineProperty(r.prototype,"getFriendAddPermission",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._callMain("getFriendAddPermission")}}),Object.defineProperty(r.prototype,"getRealtimeConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getRealtimeConTotalUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"clearRealtimeConUnreadCount",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"removeRealtimeConversations",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"getRealtimeConUnreadCounts",{enumerable:!1,configurable:!0,writable:!0,value:function(e){throw new Error("Method not implemented.")}}),Object.defineProperty(r.prototype,"setNotificationQuietHoursWithSetting",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,u(this,c,"m",b).call(this,"setNotificationQuietHoursWithSetting",e)]}))}))}}),Object.defineProperty(r.prototype,"removeNotificationQuietHoursSetting",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,u(this,c,"m",b).call(this,"removeNotificationQuietHoursSetting")]}))}))}}),Object.defineProperty(r.prototype,"getNotificationQuietHoursSetting",{enumerable:!1,configurable:!0,writable:!0,value:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,u(this,c,"m",b).call(this,"getNotificationQuietHoursSetting")]}))}))}}),Object.defineProperty(r.prototype,"getStatsUrlList",{enumerable:!1,configurable:!0,writable:!0,value:function(){return u(this,c,"m",b).call(this,"getStatsUrlList")}}),Object.defineProperty(r.prototype,"sendReadReceiptResponseV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"sendReadReceiptResponseV5",e,t)}}),Object.defineProperty(r.prototype,"getMessageReadReceiptInfoV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return u(this,c,"m",b).call(this,"getMessageReadReceiptInfoV5",e,t)}}),Object.defineProperty(r.prototype,"getMessagesReadReceiptUsersByPageV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getMessagesReadReceiptUsersByPageV5",e,t,r)}}),Object.defineProperty(r.prototype,"getMessagesReadReceiptByUsersV5",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return u(this,c,"m",b).call(this,"getMessagesReadReceiptByUsersV5",e,t,r)}}),r}(t.BasicEngine);s=new WeakMap,c=new WeakSet,b=function(e){for(var r=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new Promise((function(o){var a,u=d(e);r._resolveMaps[u]=function(e){var r=e.code,n=e.msg,a=e.data;r!==t.ErrorCode.SUCCESS?o(t.fail(r,n,a)):o(t.ok(a))},(a=window.__ContextBridge__).send.apply(a,l(["__RC_CHANNEL_CALL_MAIN__",u,e],i(n),!1))}))};var h={on:function(t,r){e.ipcRenderer.on(t,(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];r.apply(void 0,l([e],i(t),!1))}))},send:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e.ipcRenderer.send.apply(e.ipcRenderer,l([t],i(r),!1))},sendSync:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.ipcRenderer.sendSync.apply(e.ipcRenderer,l([t],i(r),!1))},getProcessInfo:function(e){return process[e]},callProcessMethod:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(t=process)[e].apply(t,l([],i(r),!1))}};window&&(window.RCCppEngine=y,window.__ContextBridge__=h);exports.RCCppEngine=y,exports.initContextBridge=function(){e.contextBridge&&e.contextBridge.exposeInMainWorld("__ContextBridge__",h)};
package/index.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- import { BasicEngine, IChatroomModule, IChatModule, IDataHostingModule, Codec, InnerRTCKeyMaps, IEngineWatcher, IAPIContextOption, IExtraMethod, IAsyncRes, IPromiseResult, INaviInfo, LogType, BasicLogger, RCConnectionStatus, ConversationType, IReceivedMessage, MessageDirection, ErrorCode, IConversationOption, IRecallMsgOptions, RCResult, IReceivedConversation, NotificationLevel, IFirstUnreadMessageInfo, IServerConversationStatus, ISetConversationStatusOptions, ISendMsgOptions, IMessageReaderResponse, IMessageReadReceiptV4Response, IGroupReadReceiptData, IChatroomJoinResponse, IChatroomInfo, IChrmKVEntry, IChrmKVEntries, FileType, IUploadAuth, UploadMethod, IInsertMsgOptions, IInsertMessage, IClearMessageOption, NotificationStatus, IRTCRoomBindOption, ITagParam, ITagInfo, IReceivedConversationByTag, ILocalTagStatus, IConversationTag, IBaseConversationInfo, IGroupMessageDeliverInfo, IConversationState, IUltraGroupConversation, OperateStatus, IUltraMsgQueryOptions, IUltraExMsgOptions, IUltraModifyMsgOptions, IGetMsgOption, IOSInfo, IProcessInfo, IProxy, IResponse, INetwork, SubscribeType, ISubscribeUserStatusInfo, IUserProfileInfo, IUpdateMyProfileFail, UserProfileVisibility, IServerGroupBaseInfo, ICreateGroupFail, IErrorKeys, IGroupInfo, IQuitGroupConfig, GroupOperationType, GroupMemberRole, IPagingQueryOption, IPagingQueryResult, IGroupMemberInfo, IProcessCode, GroupOperationRole, GroupOperationStatus, GroupApplicationDirection, GroupApplicationStatus, IGroupApplicationInfo, IFollowsInfo, DirectionType, IFriendRelationInfo, QueryFriendsDirectionType, IFriendInfo, FriendApplicationType, FriendApplicationStatus, IFriendApplicationInfo, FriendAddPermission, IConversationIdentifier, IConversationUnreadCount, INotificationQuietHoursSetting } from '@rongcloud/engine';
1
+ import { BasicEngine, IChatroomModule, IChatModule, IDataHostingModule, Codec, InnerRTCKeyMaps, IEngineWatcher, IAPIContextOption, IExtraMethod, IAsyncRes, IPromiseResult, INaviInfo, LogType, BasicLogger, RCConnectionStatus, ConversationType, IReceivedMessage, IConversationOption, MessageDirection, RCResult, IRecallMsgOptions, ConversationListFilter, GetConversationListResponse, IReceivedConversation, ErrorCode, NotificationLevel, IFirstUnreadMessageInfo, ISendMsgOptions, IMessageReaderResponse, IMessageReadReceiptV4Response, IGroupReadReceiptData, MessageRegisterParams, IChatroomJoinResponse, IChatroomInfo, IChrmKVEntry, IChrmKVEntries, FileType, IUploadAuth, UploadMethod, IInsertMsgOptions, IInsertMessage, IClearMessageOption, IAppPushConfig, IRTCRoomBindOption, ITagParam, ITagInfo, IReceivedConversationByTag, ILocalTagStatus, IConversationTag, IGroupMessageDeliverInfo, IUltraGroupConversation, IBaseConversationInfo, OperateStatus, IUltraMsgQueryOptions, IUltraExMsgOptions, IUltraModifyMsgOptions, IGetMsgOption, IOSInfo, IProcessInfo, IProxy, IResponse, INetwork, SubscribeType, ISubscribeUserStatusInfo, IUserProfileInfo, IUpdateMyProfileFail, UserProfileVisibility, IServerGroupBaseInfo, ICreateGroupFail, IErrorKeys, IGroupInfo, IQuitGroupConfig, GroupOperationType, GroupMemberRole, IPagingQueryOption, IPagingQueryResult, IGroupMemberInfo, IProcessCode, GroupOperationRole, GroupOperationStatus, GroupApplicationDirection, GroupApplicationStatus, IGroupApplicationInfo, IFollowsInfo, DirectionType, IFriendRelationInfo, QueryFriendsDirectionType, IFriendInfo, FriendApplicationType, FriendApplicationStatus, IFriendApplicationInfo, FriendAddPermission, IConversationIdentifier, IConversationUnreadCount, INotificationQuietHoursSetting, ReadReceiptInfoV5, ReadReceiptUsersOption, ReadReceiptUsersResult } from '@rongcloud/engine';
2
2
 
3
3
  declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatModule, IDataHostingModule {
4
4
  #private;
5
5
  private _cache;
6
- get chatroom(): IChatroomModule;
7
6
  get chat(): IChatModule;
8
- get dataHosting(): IDataHostingModule;
9
7
  constructor(codec: Codec<InnerRTCKeyMaps>, watcher: IEngineWatcher, options: IAPIContextOption);
10
8
  private _batchMessage;
11
9
  private _onRTCDataChange;
@@ -25,12 +23,6 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
25
23
  * @deprecated
26
24
  */
27
25
  private _callMain;
28
- /**
29
- * 跨进程调用主进程方法,并返回结果;注意:需要确保主进程方法返回的是 IAsyncRes 数据
30
- * @param method
31
- * @param args
32
- */
33
- private _callMain2;
34
26
  callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
35
27
  private _send2Main;
36
28
  private _callMainSync;
@@ -60,22 +52,18 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
60
52
  list: IReceivedMessage[];
61
53
  hasMore: boolean;
62
54
  }>>;
63
- deleteRemoteMessage(conversationType: ConversationType, targetId: string, messages: {
55
+ deleteRemoteMessage(conversation: IConversationOption, messages: {
64
56
  messageUId: string;
65
57
  sentTime: number;
66
58
  messageDirection: MessageDirection;
67
- }[], channelId: string): Promise<ErrorCode>;
59
+ }[]): Promise<RCResult>;
68
60
  recallMsg(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
69
- deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
70
- getConversationList(count: number, conversationType?: ConversationType, startTime?: number, order?: 0 | 1, channelId?: string): IPromiseResult<IReceivedConversation[]>;
71
- getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string, topPriority: boolean): IPromiseResult<IReceivedConversation[]>;
72
- getUnreadConversationList(conversationTypes: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
73
- getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
74
- getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
75
- getConversation(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedConversation>;
76
- removeConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
61
+ deleteRemoteMessageByTimestamp(conversation: IConversationOption, timestamp: number): Promise<RCResult>;
62
+ getConversationListByFilter(filter: ConversationListFilter): Promise<RCResult<GetConversationListResponse>>;
63
+ getConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<RCResult<IReceivedConversation>>;
64
+ removeConversation(conversation: IConversationOption): Promise<RCResult>;
77
65
  batchRemoveConversation(conversations: IConversationOption[]): Promise<ErrorCode>;
78
- getAllConversationUnreadCount(channelIds: string, conversationTypes: ConversationType[], includeMuted: boolean): IPromiseResult<number>;
66
+ getTotalUnreadCount(channelId: string, conversationTypes: ConversationType[], includeMuted: boolean): Promise<RCResult<number>>;
79
67
  getConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
80
68
  getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<IAsyncRes<number>>;
81
69
  clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
@@ -84,31 +72,29 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
84
72
  saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string): Promise<ErrorCode>;
85
73
  getConversationMessageDraft(conversationType: ConversationType, targetId: string): IPromiseResult<string>;
86
74
  clearConversationMessageDraft(conversationType: ConversationType, targetId: string): Promise<ErrorCode>;
87
- pullConversationStatus(timestamp: number): Promise<IAsyncRes<IServerConversationStatus[]>>;
88
- batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
89
- setConversationToTop(conversationType: ConversationType, targetId: string, isTop: boolean, channelId: string, isUpdateTime: boolean): Promise<ErrorCode>;
90
- batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isCreateConversation?: boolean): Promise<ErrorCode>;
75
+ batchSetConversationToTop(conversations: IConversationOption[], isTop?: boolean, isUpdateTime?: boolean, isCreateConversation?: boolean): Promise<RCResult>;
76
+ batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<RCResult>;
91
77
  sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
92
78
  sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
93
79
  getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
94
80
  /**
95
- * 发送已读回执(V4)
81
+ * 发送已读回执 (V4)
96
82
  */
97
83
  sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
98
84
  /**
99
- * 获取消息已读回执列表, 暂仅支持群聊(V4)
85
+ * 获取消息已读回执列表,暂仅支持群聊 (V4)
100
86
  */
101
87
  getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
102
88
  /**
103
- * 批量获取消息已读回执列表, 暂仅支持群聊(V4)
89
+ * 批量获取消息已读回执列表,暂仅支持群聊 (V4)
104
90
  */
105
91
  batchGetMessageReadReceiptInfoV4(conversation: IConversationOption, messageUIds: string[]): IPromiseResult<IGroupReadReceiptData[]>;
106
92
  /**
107
- * 多端同步会话的已读时间(V4)
93
+ * 多端同步会话的已读时间 (V4)
108
94
  */
109
95
  updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
110
- disconnect(closeDB?: boolean): Promise<void>;
111
- registerMessageType(objectName: string, isPersited: boolean, isCounted: boolean, searchProps: string[], isStatusMessage: boolean): void;
96
+ disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
97
+ registerMessageType(objectName: string, desc: MessageRegisterParams): void;
112
98
  joinChatroom(chatroomId: string, count: number, extra?: string): Promise<ErrorCode>;
113
99
  joinExistChatroom(chatroomId: string, count: number, extra?: string): Promise<IAsyncRes<IChatroomJoinResponse>>;
114
100
  quitChatroom(chatroomId: string): Promise<ErrorCode>;
@@ -154,12 +140,12 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
154
140
  deleteMessages(messageIds: number[]): Promise<ErrorCode>;
155
141
  deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
156
142
  batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
157
- batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<ErrorCode>;
143
+ batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<RCResult>;
158
144
  clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
159
145
  getMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
160
146
  setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
161
147
  setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
162
- searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
148
+ searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
163
149
  searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
164
150
  searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
165
151
  messages: IReceivedMessage[];
@@ -185,14 +171,14 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
185
171
  setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
186
172
  updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
187
173
  clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
188
- clearAllUnreadCount(): Promise<ErrorCode>;
189
- getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
174
+ clearAllUnreadCount(): Promise<RCResult>;
190
175
  getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
191
176
  list: IReceivedMessage[];
192
177
  hasMore: boolean;
193
178
  }>;
194
179
  getServerTime(): number;
195
180
  getDeviceId(): string;
181
+ setPushConfig(config: IAppPushConfig): void;
196
182
  getCurrentUserId(): string;
197
183
  bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
198
184
  rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: ArrayBuffer): Promise<{
@@ -212,20 +198,16 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
212
198
  setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ILocalTagStatus): IPromiseResult;
213
199
  getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
214
200
  clearData(): Promise<IAsyncRes<boolean>>;
215
- getBlockConversationList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
216
201
  getGroupMessageDeliverList(targetId: string, messageUId: string, channelId: string): Promise<IAsyncRes<IGroupMessageDeliverInfo>>;
217
202
  getPrivateMessageDeliverTime(messageUId: string, channelId: string): Promise<IAsyncRes<number>>;
218
203
  setCallInfo(targetId: string, key: string, value: string): Promise<IAsyncRes<{
219
204
  key: string;
220
205
  value: string;
221
206
  }>>;
222
- getTopConversationList(conversationTypes: ConversationType[], channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
223
- getUnreadMentionedCount(conversation: IConversationOption): Promise<IAsyncRes<number>>;
207
+ getUnreadMentionedCount(conversation: IConversationOption): Promise<RCResult<number>>;
224
208
  getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
225
- getAllConversationState(): Promise<IAsyncRes<IConversationState[]>>;
226
209
  getUltraGroupList(): Promise<IAsyncRes<IUltraGroupConversation[]>>;
227
- getBlockUltraGroupList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
228
- getTopUltraGroupList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
210
+ getBlockUltraGroupList(): Promise<RCResult<IBaseConversationInfo[]>>;
229
211
  clearUltraUnreadcount(targetId: string, channelId: string): Promise<ErrorCode>;
230
212
  getUltraGroupUnreadMentionedCountByTargetId(targetId: string, levels?: NotificationLevel[]): Promise<IAsyncRes<number>>;
231
213
  sendUltraMessage(targetId: string, options: ISendMsgOptions, onSendBefore: (messageId: number) => void): Promise<IAsyncRes<IReceivedMessage>>;
@@ -240,11 +222,9 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
240
222
  syncTime: number;
241
223
  hasMore: boolean;
242
224
  }>>;
243
- getConversationNotificationLevel(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
244
- setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel?: NotificationLevel, channelId?: string): Promise<ErrorCode>;
245
- batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<ErrorCode>;
246
- setConversationTypeNotificationLevel(conversationType: ConversationType, level: NotificationLevel): Promise<IAsyncRes<void>>;
247
- getConversationTypeNotificationLevel(conversationType: ConversationType): Promise<IAsyncRes<NotificationLevel>>;
225
+ getConversationNotificationLevel(conversation: IConversationOption): Promise<RCResult<NotificationLevel>>;
226
+ setConversationTypeNotificationLevel(conversationType: ConversationType, level: NotificationLevel): Promise<RCResult>;
227
+ getConversationTypeNotificationLevel(conversationType: ConversationType): Promise<RCResult<NotificationLevel>>;
248
228
  getUltraGroupDefaultNotificationLevel(targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
249
229
  getAllUltraGroupUnreadCount(): Promise<{
250
230
  code: ErrorCode;
@@ -380,6 +360,14 @@ declare class RCCppEngine extends BasicEngine implements IChatroomModule, IChatM
380
360
  setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
381
361
  removeNotificationQuietHoursSetting(): Promise<RCResult>;
382
362
  getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
363
+ /**
364
+ * 获取统计地址
365
+ */
366
+ getStatsUrlList(): Promise<RCResult<string[]>>;
367
+ sendReadReceiptResponseV5(conId: IConversationOption, messageUIdArray: string[]): Promise<RCResult>;
368
+ getMessageReadReceiptInfoV5(conId: IConversationOption, messageUIdArray: Array<string>): Promise<RCResult<ReadReceiptInfoV5[]>>;
369
+ getMessagesReadReceiptUsersByPageV5(conId: IConversationOption, messageUId: string, opt: ReadReceiptUsersOption): Promise<RCResult<ReadReceiptUsersResult>>;
370
+ getMessagesReadReceiptByUsersV5(conId: IConversationOption, messageUId: string, userList: Array<string>): Promise<RCResult<ReadReceiptUsersResult>>;
383
371
  }
384
372
 
385
373
  declare const initContextBridge: () => void;