@rongcloud/electron-renderer 5.14.1 → 5.16.0
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 +1 -0
- package/index.cjs.js +1 -0
- package/index.d.ts +10 -15
- package/index.esm.js +2 -2
- package/index.mjs +15 -0
- package/package.json +19 -5
- package/renderer.cjs.js +15 -0
- package/renderer.esm.js +15 -0
- package/index.js +0 -1
- package/renderer.js +0 -15
package/index.cjs
ADDED
|
@@ -0,0 +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.16.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}),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){var n=t[0].notificationLevel;return e.isUndefined(n)?this._callMain("batchSetConversationStatus",t):Promise.resolve(e.ErrorCode.NOT_SUPPORT)},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.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},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.AEngine);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)};
|
package/index.cjs.js
ADDED
|
@@ -0,0 +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.16.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}),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){var n=t[0].notificationLevel;return e.isUndefined(n)?this._callMain("batchSetConversationStatus",t):Promise.resolve(e.ErrorCode.NOT_SUPPORT)},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.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},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.AEngine);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)};
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AEngine, IChatroomModule, Codec, InnerRTCKeyMaps, IEngineWatcher, IAPIContextOption, IExtraMethod, IAsyncRes, IPromiseResult, INaviInfo, LogType, BasicLogger, RCConnectionStatus, ConversationType, IReceivedMessage, MessageDirection, ErrorCode, IRecallMsgOptions,
|
|
1
|
+
import { AEngine, IChatroomModule, 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, IServerUserSetting, 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';
|
|
2
2
|
|
|
3
3
|
declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
4
|
-
private
|
|
4
|
+
#private;
|
|
5
5
|
private _cache;
|
|
6
6
|
get chatroom(): IChatroomModule;
|
|
7
7
|
constructor(codec: Codec<InnerRTCKeyMaps>, watcher: IEngineWatcher, options: IAPIContextOption);
|
|
@@ -10,12 +10,9 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
10
10
|
private _onConnected;
|
|
11
11
|
private _onNaviDataChange;
|
|
12
12
|
private _setConnectionStatus;
|
|
13
|
-
private waitingLogs;
|
|
14
|
-
private latestSendTimestamp;
|
|
15
13
|
/**
|
|
16
14
|
* 发送日志数据至主进程
|
|
17
15
|
*/
|
|
18
|
-
private check2SendLog;
|
|
19
16
|
private sendHTTPRequest;
|
|
20
17
|
setUserStatusListener(config: {
|
|
21
18
|
userIds: string[];
|
|
@@ -66,7 +63,7 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
66
63
|
sentTime: number;
|
|
67
64
|
messageDirection: MessageDirection;
|
|
68
65
|
}[], channelId: string): Promise<ErrorCode>;
|
|
69
|
-
recallMsg(
|
|
66
|
+
recallMsg(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
|
|
70
67
|
deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
|
|
71
68
|
getConversationList(count: number, conversationType?: ConversationType, startTime?: number, order?: 0 | 1, channelId?: string): IPromiseResult<IReceivedConversation[]>;
|
|
72
69
|
getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string, topPriority: boolean): IPromiseResult<IReceivedConversation[]>;
|
|
@@ -137,7 +134,7 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
137
134
|
}>;
|
|
138
135
|
removeChatroomFromCatch(chatroomId: string): void;
|
|
139
136
|
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string, url?: string, size?: number): Promise<IAsyncRes<IUploadAuth>>;
|
|
140
|
-
getFileUrl(fileType: FileType, uploadMethod: UploadMethod, fileName
|
|
137
|
+
getFileUrl(fileType: FileType, uploadMethod: UploadMethod, fileName: string, originName?: string): IPromiseResult<{
|
|
141
138
|
downloadUrl: string;
|
|
142
139
|
}>;
|
|
143
140
|
setUserStatus(status: number): Promise<ErrorCode>;
|
|
@@ -158,7 +155,7 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
158
155
|
batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
|
|
159
156
|
batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<ErrorCode>;
|
|
160
157
|
clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
161
|
-
getMessage(messageId: number | string):
|
|
158
|
+
getMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
|
|
162
159
|
setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
|
|
163
160
|
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
164
161
|
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
@@ -320,9 +317,7 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
320
317
|
* 批量获取会话
|
|
321
318
|
*/
|
|
322
319
|
getConversations(conversations: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
323
|
-
updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<
|
|
324
|
-
errorKey: string;
|
|
325
|
-
}>>;
|
|
320
|
+
updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
|
|
326
321
|
getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
|
|
327
322
|
getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
|
|
328
323
|
updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
|
|
@@ -330,10 +325,10 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
330
325
|
searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
|
|
331
326
|
createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
332
327
|
[key: string]: string;
|
|
333
|
-
} | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<
|
|
328
|
+
} | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
|
|
334
329
|
updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
335
330
|
[key: string]: string;
|
|
336
|
-
} | undefined): Promise<IAsyncRes<
|
|
331
|
+
} | undefined): Promise<IAsyncRes<IErrorKeys>>;
|
|
337
332
|
getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
|
|
338
333
|
kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
339
334
|
quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
@@ -342,7 +337,7 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
342
337
|
setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
|
|
343
338
|
getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
344
339
|
getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
|
|
345
|
-
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra: string): Promise<IAsyncRes<
|
|
340
|
+
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra: string): Promise<IAsyncRes<IErrorKeys>>;
|
|
346
341
|
searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
347
342
|
joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
|
|
348
343
|
inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
|
|
@@ -367,7 +362,7 @@ declare class RCCppEngine extends AEngine implements IChatroomModule {
|
|
|
367
362
|
refuseFriendApplication(userId: string, reason: string): Promise<IAsyncRes<void>>;
|
|
368
363
|
setFriendInfo(userId: string, remark: string, extProfile: {
|
|
369
364
|
[key: string]: string;
|
|
370
|
-
}): Promise<IAsyncRes<
|
|
365
|
+
}): Promise<IAsyncRes<IErrorKeys>>;
|
|
371
366
|
checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
|
|
372
367
|
getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
|
|
373
368
|
getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ipcRenderer as t,contextBridge as e}from"electron";import{BasicLogger as n,VersionManage as o,
|
|
1
|
+
import{ipcRenderer as t,contextBridge as e}from"electron";import{BasicLogger as n,VersionManage as o,ErrorCode as r,ok as i,fail as a,LogTagId as s,isUndefined as c,RCConnectionStatus as l,runtime as u,AEngine as p}from"@rongcloud/engine";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var h=function(t,e){return h=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])},h(t,e)};function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function g(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 _(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 y(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 M(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 d="logdata",C=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i.emiter=r,i}return f(e,t),e.prototype.flush=function(t){this.emiter.emit(d,t)},e}(n),v=0,m=Date.now(),w=function(t){var e=Date.now();return m!==e&&(m=e,v=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,v++].join("__")};o.add("electron-renderer","5.14.1");var T=function(t){function e(e,n,o){var i=this,a=new c,s=new C(o.appkey,"RC-E","IM",a);return(i=t.call(this,e,n,o,s)||this).waitingLogs=[],i.latestSendTimestamp=0,i._resolveMaps={},a.on(d,(function(t){i.waitingLogs.push(t),i.check2SendLog()})),i._logEmitter=a,s.setOutputLevel(o.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,e){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=n[e];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[e])c[e](o,s);else{var u={onConnecting:l.CONNECTING,onSuspend:l.SUSPENDED,onDisconnected:l.DISCONNECTED};u[e]&&i._setConnectionStatus(u[e]),s(o[0])}}else i.logger.error(r.L_UNSUPPORT_NTF_FROM_MAIN_E,e)})),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,M([],y(n),!1)))})),i._options.httpInMainProcess&&(u.httpReq=i.sendHTTPRequest.bind(i)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:o.navigators,areaCode:o.areaCode,logServerUrl:o.logServerUrl,environment:o.environment}),i._cache=i._callMainSync("getMainProcessCache"),i}return f(e,t),Object.defineProperty(e.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},e.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},e.prototype._onConnected=function(t,e){var n;n=y(t,1),this._cache=n[0],e(void 0)},e.prototype._onNaviDataChange=function(t,e){var n;n=y(t,1),this._cache.naviInfo=n[0],e([t[0]])},e.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},e.prototype.check2SendLog=function(){var t=Date.now();t-this.latestSendTimestamp<1e3||(this.logger.debug(r.T,"send logs 2 main -> ".concat(this.waitingLogs.length)),window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onRendererLogsReceived",this.waitingLogs.splice(0)),this.latestSendTimestamp=t)},e.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},e.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},e.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=w(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,M(["__RC_CHANNEL_CALL_MAIN__",i,t],y(n),!1))}))},e.prototype._callMain2=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,a=w(t);e._resolveMaps[a]=function(t){var e=t.code,n=t.msg,r=t.data;o(i.unknown(e,r,n))},(r=window.__ContextBridge__).send.apply(r,M(["__RC_CHANNEL_CALL_MAIN__",a,t],y(n),!1))}))},e.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,M(["callExtra",t],y(e),!1))},e.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,M(["__RC_CHANNEL_SEND_2_MAIN__",t],y(n),!1))},e.prototype._callMainSync=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return this.logger.info(r.L_CALL_MAIN_SYNC_O,t),(e=window.__ContextBridge__).sendSync.apply(e,M(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],y(n),!1))},e.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},e.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},e.prototype.createLogger=function(t,e){return new C(this._appkey,t,e,this._logEmitter)},e.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},e.prototype.connect=function(t,e,n,o){return g(this,void 0,void 0,(function(){return _(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},e.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},e.prototype.getConnectedTime=function(){return this._cache.connectedTime},e.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},e.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},e.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},e.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},e.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},e.prototype.recallMsg=function(t,e,n,o,r){return this._callMain("recallMsg",t,e,n,o,r)},e.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},e.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},e.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},e.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},e.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},e.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},e.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},e.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},e.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},e.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},e.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},e.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},e.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},e.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},e.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},e.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},e.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},e.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},e.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},e.prototype.batchSetConversationStatus=function(t){var e=t[0].notificationLevel;return a(e)?this._callMain("batchSetConversationStatus",t):Promise.resolve(s.NOT_SUPPORT)},e.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},e.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},e.prototype.sendMessage=function(t,e,n,o,i){var a=this,s=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return o&&(this._resolveMaps[s]=function(t){try{o(t)}catch(t){a.logger.error(r.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,e,n,s,i)},e.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},e.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},e.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},e.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},e.prototype.batchGetMessageReadReceiptInfoV4=function(t,e){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},e.prototype.disconnect=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},e.prototype.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},e.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},e.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},e.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},e.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},e.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},e.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},e.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},e.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},e.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},e.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},e.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},e.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},e.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},e.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},e.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},e.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},e.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},e.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},e.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},e.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},e.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},e.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},e.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},e.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},e.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},e.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},e.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},e.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},e.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},e.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},e.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},e.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},e.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},e.prototype.getMessage=function(t){return this._callMain("getMessage",t)},e.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},e.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},e.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},e.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},e.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},e.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},e.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},e.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},e.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},e.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},e.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},e.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},e.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},e.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},e.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},e.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},e.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},e.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},e.prototype.getDeviceId=function(){return this._cache.deviceId},e.prototype.getCurrentUserId=function(){return this._cache.crtUserId},e.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},e.prototype.rtcSignaling=function(t,e,n,o){return g(this,void 0,void 0,(function(){var r,i,a,s;return _(this,(function(c){switch(c.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return i=c.sent(),a=i.code,s=i.buffer,[2,{code:a,buffer:s?new Uint8Array(s):s}]}}))}))},e.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},e.prototype.createTag=function(t){return this._callMain("createTag",t)},e.prototype.removeTag=function(t){return this._callMain("removeTag",t)},e.prototype.updateTag=function(t){return this._callMain("updateTag",t)},e.prototype.getTagList=function(){return this._callMain("getTagList")},e.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},e.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},e.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},e.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},e.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},e.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},e.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},e.prototype.clearData=function(){return this._callMain("clearData")},e.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},e.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},e.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},e.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},e.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},e.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},e.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},e.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},e.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},e.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},e.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},e.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},e.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},e.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},e.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},e.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},e.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},e.prototype.getUltraGroupDefaultNotificationLevel=function(t,e){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:s.NOT_SUPPORT})},e.prototype.getOSInfo=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},e.prototype.getProcessInfo=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,{code:s.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")}}]}))}))},e.prototype.getMainProcessInfo=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},e.prototype.setProxy=function(t){return this._callMain("setProxy",t)},e.prototype.getProxy=function(){return this._callMain("getProxy")},e.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},e.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},e.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},e.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},e.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},e.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},e.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},e.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},e.prototype.getConversations=function(t){return this._callMain("getConversations",t)},e.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},e.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},e.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},e.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},e.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},e.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},e.prototype.createGroup=function(t,e,n,o){return g(this,void 0,void 0,(function(){return _(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},e.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},e.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},e.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},e.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},e.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},e.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},e.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},e.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},e.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},e.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},e.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},e.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},e.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},e.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},e.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},e.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},e.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},e.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},e.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},e.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},e.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},e.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},e.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},e.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},e.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},e.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},e.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},e.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},e.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},e.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},e.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},e.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},e.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},e.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},e.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},e.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},e.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},e.prototype.setNotificationQuietHoursWithSetting=function(t){return g(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},e.prototype.removeNotificationQuietHoursSetting=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},e.prototype.getNotificationQuietHoursSetting=function(){return g(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},e}(p),U={on:function(e,n){t.on(e,(function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];n.apply(void 0,M([t],y(e),!1))}))},send:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];t.send.apply(t,M([e],y(n),!1))},sendSync:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return t.sendSync.apply(t,M([e],y(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,M([],y(n),!1))}};window&&(window.RCCppEngine=T,window.__ContextBridge__=U);var S=function(){e&&e.exposeInMainWorld("__ContextBridge__",U)};export{T as RCCppEngine,S as initContextBridge};
|
|
15
|
+
***************************************************************************** */var h=function(t,e){return h=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])},h(t,e)};function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function g(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 y(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 _(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 M(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 d,C=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i._handleWrite=r,i}return f(e,t),e}(n),v=0,m=Date.now(),w=function(t){var e=Date.now();return m!==e&&(m=e,v=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,v++].join("__")};o.add("electron-renderer","5.16.0");var T=function(t){function e(e,n,o){var r=this,i=function(t){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",t)},a=new C(o.appkey,"IMLib","IM",i);return r=t.call(this,e,n,o,a)||this,d.set(r,void 0),r._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)}(r,d,i,"f"),a.setOutputLevel(o.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,e){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];var a=n[e];if(a){var c={batchMessage:r._batchMessage.bind(r),onRTCDataChange:r._onRTCDataChange.bind(r),onConnected:r._onConnected.bind(r),onNaviDataChange:r._onNaviDataChange.bind(r)};if(c[e])c[e](o,a);else{var u={onConnecting:l.CONNECTING,onSuspend:l.SUSPENDED,onDisconnected:l.DISCONNECTED};u[e]&&r._setConnectionStatus(u[e]),a(o[0])}}else r.logger.error(s.L_UNSUPPORT_NTF_FROM_MAIN_E,e)})),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 i=r._resolveMaps[e];i&&(delete r._resolveMaps[e],i.apply(void 0,M([],_(n),!1)))})),r._options.httpInMainProcess&&(u.httpReq=r.sendHTTPRequest.bind(r)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:o.navigators,areaCode:o.areaCode,logServerUrl:o.logServerUrl,environment:o.environment}),r._cache=r._callMainSync("getMainProcessCache"),r}return f(e,t),Object.defineProperty(e.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},e.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},e.prototype._onConnected=function(t,e){var n;n=_(t,1),this._cache=n[0],e(void 0)},e.prototype._onNaviDataChange=function(t,e){var n;n=_(t,1),this._cache.naviInfo=n[0],e([t[0]])},e.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},e.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},e.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},e.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=w(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,M(["__RC_CHANNEL_CALL_MAIN__",i,t],_(n),!1))}))},e.prototype._callMain2=function(t){for(var e=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new Promise((function(o){var s,c=w(t);e._resolveMaps[c]=function(t){var e=t.code,n=t.msg,s=t.data;e!==r.SUCCESS?o(a(e,n,s)):o(i(s))},(s=window.__ContextBridge__).send.apply(s,M(["__RC_CHANNEL_CALL_MAIN__",c,t],_(n),!1))}))},e.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,M(["callExtra",t],_(e),!1))},e.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,M(["__RC_CHANNEL_SEND_2_MAIN__",t],_(n),!1))},e.prototype._callMainSync=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return this.logger.info(s.L_CALL_MAIN_SYNC_O,t),(e=window.__ContextBridge__).sendSync.apply(e,M(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],_(n),!1))},e.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},e.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},e.prototype.createLogger=function(t,e){return new C(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,d,"f"))},e.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},e.prototype.connect=function(t,e,n,o){return g(this,void 0,void 0,(function(){return y(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},e.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},e.prototype.getConnectedTime=function(){return this._cache.connectedTime},e.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},e.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},e.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},e.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},e.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},e.prototype.recallMsg=function(t,e){return this._callMain2("recallMsg",t,e)},e.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},e.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},e.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},e.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},e.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},e.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},e.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},e.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},e.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},e.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},e.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},e.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},e.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},e.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},e.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},e.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},e.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},e.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},e.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},e.prototype.batchSetConversationStatus=function(t){var e=t[0].notificationLevel;return c(e)?this._callMain("batchSetConversationStatus",t):Promise.resolve(r.NOT_SUPPORT)},e.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},e.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},e.prototype.sendMessage=function(t,e,n,o,r){var i=this,a=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return o&&(this._resolveMaps[a]=function(t){try{o(t)}catch(t){i.logger.error(s.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,e,n,a,r)},e.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},e.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},e.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},e.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},e.prototype.batchGetMessageReadReceiptInfoV4=function(t,e){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},e.prototype.disconnect=function(t){return g(this,void 0,void 0,(function(){return y(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},e.prototype.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},e.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},e.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},e.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},e.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},e.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},e.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},e.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},e.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},e.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},e.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},e.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},e.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},e.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},e.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},e.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},e.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},e.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},e.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},e.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},e.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},e.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},e.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},e.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},e.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},e.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},e.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},e.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},e.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},e.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},e.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},e.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},e.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},e.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},e.prototype.getMessage=function(t){return this._callMain2("getMessage",t)},e.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},e.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},e.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},e.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},e.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},e.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},e.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},e.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},e.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},e.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},e.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},e.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},e.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},e.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},e.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},e.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},e.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},e.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},e.prototype.getDeviceId=function(){return this._cache.deviceId},e.prototype.getCurrentUserId=function(){return this._cache.crtUserId},e.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},e.prototype.rtcSignaling=function(t,e,n,o){return g(this,void 0,void 0,(function(){var r,i,a,s;return y(this,(function(c){switch(c.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return i=c.sent(),a=i.code,s=i.buffer,[2,{code:a,buffer:s?new Uint8Array(s):s}]}}))}))},e.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},e.prototype.createTag=function(t){return this._callMain("createTag",t)},e.prototype.removeTag=function(t){return this._callMain("removeTag",t)},e.prototype.updateTag=function(t){return this._callMain("updateTag",t)},e.prototype.getTagList=function(){return this._callMain("getTagList")},e.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},e.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},e.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},e.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},e.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},e.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},e.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},e.prototype.clearData=function(){return this._callMain("clearData")},e.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},e.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},e.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},e.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},e.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},e.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},e.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},e.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},e.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},e.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},e.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},e.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},e.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},e.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},e.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},e.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},e.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},e.prototype.getUltraGroupDefaultNotificationLevel=function(t,e){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getOSInfo=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},e.prototype.getProcessInfo=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,{code:r.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")}}]}))}))},e.prototype.getMainProcessInfo=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},e.prototype.setProxy=function(t){return this._callMain("setProxy",t)},e.prototype.getProxy=function(){return this._callMain("getProxy")},e.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},e.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},e.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},e.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},e.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},e.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},e.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},e.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},e.prototype.getConversations=function(t){return this._callMain("getConversations",t)},e.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},e.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},e.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},e.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},e.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},e.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},e.prototype.createGroup=function(t,e,n,o){return g(this,void 0,void 0,(function(){return y(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},e.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},e.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},e.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},e.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},e.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},e.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},e.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},e.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},e.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},e.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},e.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},e.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},e.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},e.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},e.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},e.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},e.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},e.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},e.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},e.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},e.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},e.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},e.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},e.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},e.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},e.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},e.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},e.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},e.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},e.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},e.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},e.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},e.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},e.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},e.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},e.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},e.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},e.prototype.setNotificationQuietHoursWithSetting=function(t){return g(this,void 0,void 0,(function(){return y(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},e.prototype.removeNotificationQuietHoursSetting=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},e.prototype.getNotificationQuietHoursSetting=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},e}(p);d=new WeakMap;var U={on:function(e,n){t.on(e,(function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];n.apply(void 0,M([t],_(e),!1))}))},send:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];t.send.apply(t,M([e],_(n),!1))},sendSync:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return t.sendSync.apply(t,M([e],_(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,M([],_(n),!1))}};window&&(window.RCCppEngine=T,window.__ContextBridge__=U);var S=function(){e&&e.exposeInMainWorld("__ContextBridge__",U)};export{T as RCCppEngine,S as initContextBridge};
|
package/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{ipcRenderer as t,contextBridge as e}from"electron";import{BasicLogger as n,VersionManage as o,ErrorCode as r,ok as i,fail as a,LogTagId as s,isUndefined as c,RCConnectionStatus as l,runtime as u,AEngine as p}from"@rongcloud/engine";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var h=function(t,e){return h=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])},h(t,e)};function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function g(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 y(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 _(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 M(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 d,C=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i._handleWrite=r,i}return f(e,t),e}(n),v=0,m=Date.now(),w=function(t){var e=Date.now();return m!==e&&(m=e,v=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,v++].join("__")};o.add("electron-renderer","5.16.0");var T=function(t){function e(e,n,o){var r=this,i=function(t){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",t)},a=new C(o.appkey,"IMLib","IM",i);return r=t.call(this,e,n,o,a)||this,d.set(r,void 0),r._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)}(r,d,i,"f"),a.setOutputLevel(o.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,e){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];var a=n[e];if(a){var c={batchMessage:r._batchMessage.bind(r),onRTCDataChange:r._onRTCDataChange.bind(r),onConnected:r._onConnected.bind(r),onNaviDataChange:r._onNaviDataChange.bind(r)};if(c[e])c[e](o,a);else{var u={onConnecting:l.CONNECTING,onSuspend:l.SUSPENDED,onDisconnected:l.DISCONNECTED};u[e]&&r._setConnectionStatus(u[e]),a(o[0])}}else r.logger.error(s.L_UNSUPPORT_NTF_FROM_MAIN_E,e)})),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 i=r._resolveMaps[e];i&&(delete r._resolveMaps[e],i.apply(void 0,M([],_(n),!1)))})),r._options.httpInMainProcess&&(u.httpReq=r.sendHTTPRequest.bind(r)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:o.navigators,areaCode:o.areaCode,logServerUrl:o.logServerUrl,environment:o.environment}),r._cache=r._callMainSync("getMainProcessCache"),r}return f(e,t),Object.defineProperty(e.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},e.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},e.prototype._onConnected=function(t,e){var n;n=_(t,1),this._cache=n[0],e(void 0)},e.prototype._onNaviDataChange=function(t,e){var n;n=_(t,1),this._cache.naviInfo=n[0],e([t[0]])},e.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},e.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},e.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},e.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=w(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,M(["__RC_CHANNEL_CALL_MAIN__",i,t],_(n),!1))}))},e.prototype._callMain2=function(t){for(var e=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new Promise((function(o){var s,c=w(t);e._resolveMaps[c]=function(t){var e=t.code,n=t.msg,s=t.data;e!==r.SUCCESS?o(a(e,n,s)):o(i(s))},(s=window.__ContextBridge__).send.apply(s,M(["__RC_CHANNEL_CALL_MAIN__",c,t],_(n),!1))}))},e.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,M(["callExtra",t],_(e),!1))},e.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,M(["__RC_CHANNEL_SEND_2_MAIN__",t],_(n),!1))},e.prototype._callMainSync=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return this.logger.info(s.L_CALL_MAIN_SYNC_O,t),(e=window.__ContextBridge__).sendSync.apply(e,M(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],_(n),!1))},e.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},e.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},e.prototype.createLogger=function(t,e){return new C(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,d,"f"))},e.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},e.prototype.connect=function(t,e,n,o){return g(this,void 0,void 0,(function(){return y(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},e.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},e.prototype.getConnectedTime=function(){return this._cache.connectedTime},e.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},e.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},e.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},e.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},e.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},e.prototype.recallMsg=function(t,e){return this._callMain2("recallMsg",t,e)},e.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},e.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},e.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},e.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},e.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},e.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},e.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},e.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},e.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},e.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},e.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},e.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},e.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},e.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},e.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},e.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},e.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},e.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},e.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},e.prototype.batchSetConversationStatus=function(t){var e=t[0].notificationLevel;return c(e)?this._callMain("batchSetConversationStatus",t):Promise.resolve(r.NOT_SUPPORT)},e.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},e.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},e.prototype.sendMessage=function(t,e,n,o,r){var i=this,a=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return o&&(this._resolveMaps[a]=function(t){try{o(t)}catch(t){i.logger.error(s.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,e,n,a,r)},e.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},e.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},e.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},e.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},e.prototype.batchGetMessageReadReceiptInfoV4=function(t,e){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},e.prototype.disconnect=function(t){return g(this,void 0,void 0,(function(){return y(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},e.prototype.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},e.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},e.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},e.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},e.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},e.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},e.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},e.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},e.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},e.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},e.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},e.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},e.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},e.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},e.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},e.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},e.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},e.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},e.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},e.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},e.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},e.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},e.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},e.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},e.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},e.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},e.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},e.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},e.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},e.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},e.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},e.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},e.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},e.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},e.prototype.getMessage=function(t){return this._callMain2("getMessage",t)},e.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},e.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},e.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},e.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},e.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},e.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},e.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},e.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},e.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},e.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},e.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},e.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},e.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},e.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},e.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},e.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},e.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},e.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},e.prototype.getDeviceId=function(){return this._cache.deviceId},e.prototype.getCurrentUserId=function(){return this._cache.crtUserId},e.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},e.prototype.rtcSignaling=function(t,e,n,o){return g(this,void 0,void 0,(function(){var r,i,a,s;return y(this,(function(c){switch(c.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return i=c.sent(),a=i.code,s=i.buffer,[2,{code:a,buffer:s?new Uint8Array(s):s}]}}))}))},e.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},e.prototype.createTag=function(t){return this._callMain("createTag",t)},e.prototype.removeTag=function(t){return this._callMain("removeTag",t)},e.prototype.updateTag=function(t){return this._callMain("updateTag",t)},e.prototype.getTagList=function(){return this._callMain("getTagList")},e.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},e.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},e.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},e.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},e.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},e.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},e.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},e.prototype.clearData=function(){return this._callMain("clearData")},e.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},e.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},e.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},e.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},e.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},e.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},e.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},e.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},e.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},e.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},e.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},e.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},e.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},e.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},e.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},e.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},e.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},e.prototype.getUltraGroupDefaultNotificationLevel=function(t,e){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:r.NOT_SUPPORT})},e.prototype.getOSInfo=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},e.prototype.getProcessInfo=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,{code:r.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")}}]}))}))},e.prototype.getMainProcessInfo=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},e.prototype.setProxy=function(t){return this._callMain("setProxy",t)},e.prototype.getProxy=function(){return this._callMain("getProxy")},e.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},e.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},e.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},e.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},e.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},e.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},e.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},e.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},e.prototype.getConversations=function(t){return this._callMain("getConversations",t)},e.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},e.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},e.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},e.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},e.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},e.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},e.prototype.createGroup=function(t,e,n,o){return g(this,void 0,void 0,(function(){return y(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},e.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},e.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},e.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},e.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},e.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},e.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},e.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},e.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},e.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},e.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},e.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},e.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},e.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},e.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},e.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},e.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},e.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},e.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},e.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},e.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},e.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},e.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},e.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},e.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},e.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},e.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},e.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},e.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},e.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},e.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},e.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},e.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},e.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},e.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},e.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},e.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},e.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},e.prototype.setNotificationQuietHoursWithSetting=function(t){return g(this,void 0,void 0,(function(){return y(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},e.prototype.removeNotificationQuietHoursSetting=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},e.prototype.getNotificationQuietHoursSetting=function(){return g(this,void 0,void 0,(function(){return y(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},e}(p);d=new WeakMap;var U={on:function(e,n){t.on(e,(function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];n.apply(void 0,M([t],_(e),!1))}))},send:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];t.send.apply(t,M([e],_(n),!1))},sendSync:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return t.sendSync.apply(t,M([e],_(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,M([],_(n),!1))}};window&&(window.RCCppEngine=T,window.__ContextBridge__=U);var S=function(){e&&e.exposeInMainWorld("__ContextBridge__",U)};export{T as RCCppEngine,S as initContextBridge};
|
package/package.json
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rongcloud/electron-renderer",
|
|
3
|
-
"main": "index.js",
|
|
3
|
+
"main": "index.cjs.js",
|
|
4
4
|
"files": [
|
|
5
5
|
"README.md",
|
|
6
6
|
"LICENSE",
|
|
7
|
-
"index.js",
|
|
7
|
+
"index.cjs.js",
|
|
8
8
|
"index.d.ts",
|
|
9
9
|
"index.esm.js",
|
|
10
|
-
"
|
|
10
|
+
"index.cjs",
|
|
11
|
+
"index.mjs",
|
|
12
|
+
"renderer.esm.js",
|
|
13
|
+
"renderer.cjs.js"
|
|
11
14
|
],
|
|
12
15
|
"types": "index.d.ts",
|
|
13
16
|
"module": "index.esm.js",
|
|
14
|
-
"
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"require": "./index.cjs",
|
|
20
|
+
"import": "./index.mjs",
|
|
21
|
+
"types": "./index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./renderer": {
|
|
24
|
+
"require": "./renderer.cjs.js",
|
|
25
|
+
"import": "./renderer.esm.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"version": "5.16.0",
|
|
15
29
|
"author": "pass-web@rongcloud.cn",
|
|
16
30
|
"license": "LGPL 2.1",
|
|
17
31
|
"homepage": "https://www.rongcloud.cn",
|
|
@@ -22,6 +36,6 @@
|
|
|
22
36
|
"globals": "RCCppEngine"
|
|
23
37
|
},
|
|
24
38
|
"peerDependencies": {
|
|
25
|
-
"@rongcloud/engine": "=5.
|
|
39
|
+
"@rongcloud/engine": "=5.16.0"
|
|
26
40
|
}
|
|
27
41
|
}
|
package/renderer.cjs.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@rongcloud/engine"),e=function(t,n){return e=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])},e(t,n)};
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}function o(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 r(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 i(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 a(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 s,c=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i._handleWrite=r,i}return n(e,t),e}(t.BasicLogger),u=0,l=Date.now(),p=function(t){var e=Date.now();return l!==e&&(l=e,u=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,u++].join("__")};t.VersionManage.add("electron-renderer","5.16.0");var h=function(e){function u(n,o,r){var u=this,l=function(t){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",t)},p=new c(r.appkey,"IMLib","IM",l);return u=e.call(this,n,o,r,p)||this,s.set(u,void 0),u._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)}(u,s,l,"f"),p.setOutputLevel(r.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=o[n];if(a){var s={batchMessage:u._batchMessage.bind(u),onRTCDataChange:u._onRTCDataChange.bind(u),onConnected:u._onConnected.bind(u),onNaviDataChange:u._onNaviDataChange.bind(u)};if(s[n])s[n](r,a);else{var c={onConnecting:t.RCConnectionStatus.CONNECTING,onSuspend:t.RCConnectionStatus.SUSPENDED,onDisconnected:t.RCConnectionStatus.DISCONNECTED};c[n]&&u._setConnectionStatus(c[n]),a(r[0])}}else u.logger.error(t.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=u._resolveMaps[e];r&&(delete u._resolveMaps[e],r.apply(void 0,a([],i(n),!1)))})),u._options.httpInMainProcess&&(t.runtime.httpReq=u.sendHTTPRequest.bind(u)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:r.navigators,areaCode:r.areaCode,logServerUrl:r.logServerUrl,environment:r.environment}),u._cache=u._callMainSync("getMainProcessCache"),u}return n(u,e),Object.defineProperty(u.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),u.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},u.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},u.prototype._onConnected=function(t,e){var n;n=i(t,1),this._cache=n[0],e(void 0)},u.prototype._onNaviDataChange=function(t,e){var n;n=i(t,1),this._cache.naviInfo=n[0],e([t[0]])},u.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},u.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},u.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},u.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,s=p(t);e._resolveMaps[s]=o,(r=window.__ContextBridge__).send.apply(r,a(["__RC_CHANNEL_CALL_MAIN__",s,t],i(n),!1))}))},u.prototype._callMain2=function(e){for(var n=this,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return new Promise((function(r){var s,c=p(e);n._resolveMaps[c]=function(e){var n=e.code,o=e.msg,i=e.data;n!==t.ErrorCode.SUCCESS?r(t.fail(n,o,i)):r(t.ok(i))},(s=window.__ContextBridge__).send.apply(s,a(["__RC_CHANNEL_CALL_MAIN__",c,e],i(o),!1))}))},u.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,a(["callExtra",t],i(e),!1))},u.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,a(["__RC_CHANNEL_SEND_2_MAIN__",t],i(n),!1))},u.prototype._callMainSync=function(e){for(var n,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return this.logger.info(t.LogTagId.L_CALL_MAIN_SYNC_O,e),(n=window.__ContextBridge__).sendSync.apply(n,a(["__RC_CHANNEL_CALL_MAIN_SYNC__",e],i(o),!1))},u.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},u.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},u.prototype.createLogger=function(t,e){return new c(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,s,"f"))},u.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},u.prototype.connect=function(t,e,n,i){return o(this,void 0,void 0,(function(){return r(this,(function(o){return[2,this._callMain("connect",t,e,n,i)]}))}))},u.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},u.prototype.getConnectedTime=function(){return this._cache.connectedTime},u.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},u.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},u.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},u.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},u.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},u.prototype.recallMsg=function(t,e){return this._callMain2("recallMsg",t,e)},u.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},u.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},u.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},u.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},u.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},u.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},u.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},u.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},u.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},u.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},u.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},u.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},u.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},u.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},u.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},u.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},u.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},u.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},u.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},u.prototype.batchSetConversationStatus=function(e){var n=e[0].notificationLevel;return t.isUndefined(n)?this._callMain("batchSetConversationStatus",e):Promise.resolve(t.ErrorCode.NOT_SUPPORT)},u.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},u.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},u.prototype.sendMessage=function(e,n,o,r,i){var a=this,s=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return r&&(this._resolveMaps[s]=function(e){try{r(e)}catch(e){a.logger.error(t.LogTagId.A_CALLBACK_E,JSON.stringify({error:null==e?void 0:e.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",e,n,o,s,i)},u.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},u.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},u.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},u.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},u.prototype.batchGetMessageReadReceiptInfoV4=function(e,n){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},u.prototype.disconnect=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},u.prototype.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},u.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},u.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},u.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},u.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},u.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},u.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},u.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},u.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},u.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},u.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},u.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},u.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},u.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},u.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},u.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},u.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},u.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},u.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},u.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},u.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},u.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},u.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},u.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},u.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},u.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},u.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},u.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},u.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},u.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},u.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},u.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},u.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},u.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},u.prototype.getMessage=function(t){return this._callMain2("getMessage",t)},u.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},u.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},u.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},u.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},u.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},u.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},u.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},u.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},u.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},u.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},u.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},u.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},u.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},u.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},u.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},u.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},u.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},u.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},u.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},u.prototype.getDeviceId=function(){return this._cache.deviceId},u.prototype.getCurrentUserId=function(){return this._cache.crtUserId},u.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},u.prototype.rtcSignaling=function(t,e,n,i){return o(this,void 0,void 0,(function(){var o,a,s,c;return r(this,(function(r){switch(r.label){case 0:return o=Array.prototype.slice.call(new Uint8Array(i)),[4,this._callMain("rtcSignaling",t,e,n,o)];case 1:return a=r.sent(),s=a.code,c=a.buffer,[2,{code:s,buffer:c?new Uint8Array(c):c}]}}))}))},u.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},u.prototype.createTag=function(t){return this._callMain("createTag",t)},u.prototype.removeTag=function(t){return this._callMain("removeTag",t)},u.prototype.updateTag=function(t){return this._callMain("updateTag",t)},u.prototype.getTagList=function(){return this._callMain("getTagList")},u.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},u.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},u.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},u.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},u.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},u.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},u.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},u.prototype.clearData=function(){return this._callMain("clearData")},u.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},u.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},u.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},u.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},u.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},u.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},u.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},u.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},u.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},u.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},u.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},u.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},u.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},u.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},u.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},u.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},u.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},u.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},u.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},u.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},u.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},u.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},u.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},u.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},u.prototype.getUltraGroupDefaultNotificationLevel=function(e,n){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:t.ErrorCode.NOT_SUPPORT})},u.prototype.getOSInfo=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},u.prototype.getProcessInfo=function(){return o(this,void 0,void 0,(function(){return r(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")}}]}))}))},u.prototype.getMainProcessInfo=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},u.prototype.setProxy=function(t){return this._callMain("setProxy",t)},u.prototype.getProxy=function(){return this._callMain("getProxy")},u.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},u.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},u.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},u.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},u.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},u.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},u.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},u.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},u.prototype.getConversations=function(t){return this._callMain("getConversations",t)},u.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},u.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},u.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},u.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},u.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},u.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},u.prototype.createGroup=function(t,e,n,i){return o(this,void 0,void 0,(function(){return r(this,(function(o){return[2,this._callMain("createGroup",t,e,n,i)]}))}))},u.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},u.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},u.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},u.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},u.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},u.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},u.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},u.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},u.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},u.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},u.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},u.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},u.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},u.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},u.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},u.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},u.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},u.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},u.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},u.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},u.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},u.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},u.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},u.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},u.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},u.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},u.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},u.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},u.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},u.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},u.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},u.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},u.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},u.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},u.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},u.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},u.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},u.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},u.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},u.prototype.setNotificationQuietHoursWithSetting=function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},u.prototype.removeNotificationQuietHoursSetting=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},u.prototype.getNotificationQuietHoursSetting=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},u}(t.AEngine);s=new WeakMap;exports.initRenderer=function(){window.RCCppEngine=h};
|
package/renderer.esm.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{BasicLogger as t,VersionManage as e,ErrorCode as n,ok as o,fail as r,LogTagId as i,isUndefined as a,RCConnectionStatus as s,runtime as c,AEngine as u}from"@rongcloud/engine";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var l=function(t,e){return l=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])},l(t,e)};function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function h(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 f(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 g(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 y(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 _,M=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i._handleWrite=r,i}return p(e,t),e}(t),d=0,C=Date.now(),v=function(t){var e=Date.now();return C!==e&&(C=e,d=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,d++].join("__")};e.add("electron-renderer","5.16.0");var m=function(t){function e(e,n,o){var r=this,a=function(t){window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onReceiveRendererLog",t)},u=new M(o.appkey,"IMLib","IM",a);return r=t.call(this,e,n,o,u)||this,_.set(r,void 0),r._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)}(r,_,a,"f"),u.setOutputLevel(o.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,e){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var c=n[e];if(c){var u={batchMessage:r._batchMessage.bind(r),onRTCDataChange:r._onRTCDataChange.bind(r),onConnected:r._onConnected.bind(r),onNaviDataChange:r._onNaviDataChange.bind(r)};if(u[e])u[e](o,c);else{var l={onConnecting:s.CONNECTING,onSuspend:s.SUSPENDED,onDisconnected:s.DISCONNECTED};l[e]&&r._setConnectionStatus(l[e]),c(o[0])}}else r.logger.error(i.L_UNSUPPORT_NTF_FROM_MAIN_E,e)})),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 i=r._resolveMaps[e];i&&(delete r._resolveMaps[e],i.apply(void 0,y([],g(n),!1)))})),r._options.httpInMainProcess&&(c.httpReq=r.sendHTTPRequest.bind(r)),window.__ContextBridge__.send("__RC_INNER_COMMAND_INIT__",{navigators:o.navigators,areaCode:o.areaCode,logServerUrl:o.logServerUrl,environment:o.environment}),r._cache=r._callMainSync("getMainProcessCache"),r}return p(e,t),Object.defineProperty(e.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},e.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},e.prototype._onConnected=function(t,e){var n;n=g(t,1),this._cache=n[0],e(void 0)},e.prototype._onNaviDataChange=function(t,e){var n;n=g(t,1),this._cache.naviInfo=n[0],e([t[0]])},e.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},e.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},e.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},e.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=v(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,y(["__RC_CHANNEL_CALL_MAIN__",i,t],g(n),!1))}))},e.prototype._callMain2=function(t){for(var e=this,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return new Promise((function(a){var s,c=v(t);e._resolveMaps[c]=function(t){var e=t.code,i=t.msg,s=t.data;e!==n.SUCCESS?a(r(e,i,s)):a(o(s))},(s=window.__ContextBridge__).send.apply(s,y(["__RC_CHANNEL_CALL_MAIN__",c,t],g(i),!1))}))},e.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,y(["callExtra",t],g(e),!1))},e.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,y(["__RC_CHANNEL_SEND_2_MAIN__",t],g(n),!1))},e.prototype._callMainSync=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return this.logger.info(i.L_CALL_MAIN_SYNC_O,t),(e=window.__ContextBridge__).sendSync.apply(e,y(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],g(n),!1))},e.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},e.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},e.prototype.createLogger=function(t,e){return new M(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,_,"f"))},e.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},e.prototype.connect=function(t,e,n,o){return h(this,void 0,void 0,(function(){return f(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},e.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},e.prototype.getConnectedTime=function(){return this._cache.connectedTime},e.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},e.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},e.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},e.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},e.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},e.prototype.recallMsg=function(t,e){return this._callMain2("recallMsg",t,e)},e.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},e.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},e.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},e.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},e.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},e.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},e.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},e.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},e.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},e.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},e.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},e.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},e.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},e.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},e.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},e.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},e.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},e.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},e.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},e.prototype.batchSetConversationStatus=function(t){var e=t[0].notificationLevel;return a(e)?this._callMain("batchSetConversationStatus",t):Promise.resolve(n.NOT_SUPPORT)},e.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},e.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},e.prototype.sendMessage=function(t,e,n,o,r){var a=this,s=["sendMessageBefore",Date.now(),Math.floor(Math.random()*Date.now())].join("_");return o&&(this._resolveMaps[s]=function(t){try{o(t)}catch(t){a.logger.error(i.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,e,n,s,r)},e.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},e.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},e.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},e.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},e.prototype.batchGetMessageReadReceiptInfoV4=function(t,e){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},e.prototype.disconnect=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},e.prototype.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},e.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},e.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},e.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},e.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},e.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},e.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},e.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},e.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},e.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},e.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},e.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},e.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},e.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},e.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},e.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},e.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},e.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},e.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},e.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},e.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},e.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},e.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},e.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},e.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},e.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},e.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},e.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},e.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},e.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},e.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},e.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},e.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},e.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},e.prototype.getMessage=function(t){return this._callMain2("getMessage",t)},e.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},e.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},e.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},e.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},e.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},e.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},e.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},e.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},e.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},e.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},e.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},e.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},e.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},e.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},e.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},e.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},e.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},e.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},e.prototype.getDeviceId=function(){return this._cache.deviceId},e.prototype.getCurrentUserId=function(){return this._cache.crtUserId},e.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},e.prototype.rtcSignaling=function(t,e,n,o){return h(this,void 0,void 0,(function(){var r,i,a,s;return f(this,(function(c){switch(c.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return i=c.sent(),a=i.code,s=i.buffer,[2,{code:a,buffer:s?new Uint8Array(s):s}]}}))}))},e.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},e.prototype.createTag=function(t){return this._callMain("createTag",t)},e.prototype.removeTag=function(t){return this._callMain("removeTag",t)},e.prototype.updateTag=function(t){return this._callMain("updateTag",t)},e.prototype.getTagList=function(){return this._callMain("getTagList")},e.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},e.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},e.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},e.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},e.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},e.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},e.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},e.prototype.clearData=function(){return this._callMain("clearData")},e.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},e.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},e.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},e.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},e.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},e.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},e.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},e.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},e.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},e.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},e.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},e.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},e.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},e.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},e.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},e.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},e.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},e.prototype.getUltraGroupDefaultNotificationLevel=function(t,e){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:n.NOT_SUPPORT})},e.prototype.getOSInfo=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},e.prototype.getProcessInfo=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,{code:n.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")}}]}))}))},e.prototype.getMainProcessInfo=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},e.prototype.setProxy=function(t){return this._callMain("setProxy",t)},e.prototype.getProxy=function(){return this._callMain("getProxy")},e.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},e.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},e.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},e.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},e.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},e.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},e.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},e.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},e.prototype.getConversations=function(t){return this._callMain("getConversations",t)},e.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},e.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},e.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},e.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},e.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},e.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},e.prototype.createGroup=function(t,e,n,o){return h(this,void 0,void 0,(function(){return f(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},e.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},e.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},e.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},e.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},e.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},e.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},e.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},e.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},e.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},e.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},e.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},e.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},e.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},e.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},e.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},e.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},e.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},e.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},e.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},e.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},e.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},e.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},e.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},e.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},e.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},e.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},e.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},e.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},e.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},e.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},e.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},e.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},e.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},e.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},e.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},e.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},e.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},e.prototype.setNotificationQuietHoursWithSetting=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},e.prototype.removeNotificationQuietHoursSetting=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},e.prototype.getNotificationQuietHoursSetting=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},e}(u);_=new WeakMap;var w=function(){window.RCCppEngine=m};export{w as initRenderer};
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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="logdata",u=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i.emiter=r,i}return o(e,t),e.prototype.flush=function(t){this.emiter.emit(c,t)},e}(e.BasicLogger),l=0,p=Date.now(),h=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.14.1");var f=function(t){function n(n,o,r){var i=this,l=new e.EventEmitter,p=new u(r.appkey,"RC-E","IM",l);return(i=t.call(this,n,o,r,p)||this).waitingLogs=[],i.latestSendTimestamp=0,i._resolveMaps={},l.on(c,(function(t){i.waitingLogs.push(t),i.check2SendLog()})),i._logEmitter=l,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}),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.check2SendLog=function(){var t=Date.now();t-this.latestSendTimestamp<1e3||(this.logger.debug(e.LogTagId.T,"send logs 2 main -> ".concat(this.waitingLogs.length)),window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onRendererLogsReceived",this.waitingLogs.splice(0)),this.latestSendTimestamp=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=h(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=h(t);n._resolveMaps[c]=function(t){var n=t.code,o=t.msg,i=t.data;r(e.RCResult.unknown(n,i,o))},(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,this._logEmitter)},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,n,o,r){return this._callMain("recallMsg",t,e,n,o,r)},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){var n=t[0].notificationLevel;return e.isUndefined(n)?this._callMain("batchSetConversationStatus",t):Promise.resolve(e.ErrorCode.NOT_SUPPORT)},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.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},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._callMain("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.AEngine),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=f,window.__ContextBridge__=g);exports.RCCppEngine=f,exports.initContextBridge=function(){t.contextBridge&&t.contextBridge.exposeInMainWorld("__ContextBridge__",g)};
|
package/renderer.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{BasicLogger as t,VersionManage as e,LogTagId as n,RCResult as o,isUndefined as r,ErrorCode as i,EventEmitter as a,RCConnectionStatus as s,runtime as c,AEngine as l}from"@rongcloud/engine";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var u=function(t,e){return u=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])},u(t,e)};function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function h(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 f(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 g(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 _(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 y="logdata",M=function(t){function e(e,n,o,r){var i=t.call(this,e,n,o)||this;return i.emiter=r,i}return p(e,t),e.prototype.flush=function(t){this.emiter.emit(y,t)},e}(t),d=0,C=Date.now(),v=function(t){var e=Date.now();return C!==e&&(C=e,d=0),[t,window.__ContextBridge__.getProcessInfo("pid"),e,d++].join("__")};e.add("electron-renderer","5.14.1");var m=function(t){function e(e,o,r){var i=this,l=new a,u=new M(r.appkey,"RC-E","IM",l);return(i=t.call(this,e,o,r,u)||this).waitingLogs=[],i.latestSendTimestamp=0,i._resolveMaps={},l.on(y,(function(t){i.waitingLogs.push(t),i.check2SendLog()})),i._logEmitter=l,u.setOutputLevel(r.logOutputLevel),window.__ContextBridge__.on("__RC_CHANNEL_NOTIFICATION_FROM_MAIN__",(function(t,e){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var c=o[e];if(c){var l={batchMessage:i._batchMessage.bind(i),onRTCDataChange:i._onRTCDataChange.bind(i),onConnected:i._onConnected.bind(i),onNaviDataChange:i._onNaviDataChange.bind(i)};if(l[e])l[e](r,c);else{var u={onConnecting:s.CONNECTING,onSuspend:s.SUSPENDED,onDisconnected:s.DISCONNECTED};u[e]&&i._setConnectionStatus(u[e]),c(r[0])}}else i.logger.error(n.L_UNSUPPORT_NTF_FROM_MAIN_E,e)})),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,_([],g(n),!1)))})),i._options.httpInMainProcess&&(c.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 p(e,t),Object.defineProperty(e.prototype,"chatroom",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype._batchMessage=function(t,e){var n=t[0].hasMoreMsg;delete t[0].hasMoreMsg,e([t[0]],void 0,n)},e.prototype._onRTCDataChange=function(t,e){var n=t[0];this._receiveRtcKv(new Uint8Array(n))},e.prototype._onConnected=function(t,e){var n;n=g(t,1),this._cache=n[0],e(void 0)},e.prototype._onNaviDataChange=function(t,e){var n;n=g(t,1),this._cache.naviInfo=n[0],e([t[0]])},e.prototype._setConnectionStatus=function(t){this._cache.connectionStatus=t},e.prototype.check2SendLog=function(){var t=Date.now();t-this.latestSendTimestamp<1e3||(this.logger.debug(n.T,"send logs 2 main -> ".concat(this.waitingLogs.length)),window.__ContextBridge__.send("__RC_CHANNEL_SEND_2_MAIN__","onRendererLogsReceived",this.waitingLogs.splice(0)),this.latestSendTimestamp=t)},e.prototype.sendHTTPRequest=function(t){return this._callMain("sendHTTPRequest",t)},e.prototype.setUserStatusListener=function(t,e){throw new Error("TODO -> RCCppEngine.setUserStatusListener")},e.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=v(t);e._resolveMaps[i]=o,(r=window.__ContextBridge__).send.apply(r,_(["__RC_CHANNEL_CALL_MAIN__",i,t],g(n),!1))}))},e.prototype._callMain2=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return new Promise((function(r){var i,a=v(t);e._resolveMaps[a]=function(t){var e=t.code,n=t.msg,i=t.data;r(o.unknown(e,i,n))},(i=window.__ContextBridge__).send.apply(i,_(["__RC_CHANNEL_CALL_MAIN__",a,t],g(n),!1))}))},e.prototype.callExtra=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this._callMain.apply(this,_(["callExtra",t],g(e),!1))},e.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,_(["__RC_CHANNEL_SEND_2_MAIN__",t],g(n),!1))},e.prototype._callMainSync=function(t){for(var e,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return this.logger.info(n.L_CALL_MAIN_SYNC_O,t),(e=window.__ContextBridge__).sendSync.apply(e,_(["__RC_CHANNEL_CALL_MAIN_SYNC__",t],g(o),!1))},e.prototype.refetchNaviInfo=function(){return this._callMain("refetchNaviInfo")},e.prototype.getNaviInfoFromCache=function(){return this._cache.naviInfo},e.prototype.createLogger=function(t,e){return new M(this._appkey,t,e,this._logEmitter)},e.prototype.getConnectionStatus=function(){return this._cache.connectionStatus},e.prototype.connect=function(t,e,n,o){return h(this,void 0,void 0,(function(){return f(this,(function(r){return[2,this._callMain("connect",t,e,n,o)]}))}))},e.prototype.reportSDKInfo=function(t){this._send2Main("reportSDKInfo",t)},e.prototype.getConnectedTime=function(){return this._cache.connectedTime},e.prototype.getHistoryMessage=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessage",t,e,n,o,r,i,a)},e.prototype.getMessages=function(t,e,n,o,r,i){return this._callMain("getMessages",t,e,n,o,r,i)},e.prototype.getContinuousMessages=function(t,e,n,o,r,i){return this._callMain("getContinuousMessages",t,e,n,o,r,i)},e.prototype.getHistoryMessagesByObjectNames=function(t,e,n,o,r,i,a){return this._callMain("getHistoryMessagesByObjectNames",t,e,n,o,r,i,a)},e.prototype.deleteRemoteMessage=function(t,e,n,o){return this._callMain("deleteRemoteMessage",t,e,n,o)},e.prototype.recallMsg=function(t,e,n,o,r){return this._callMain("recallMsg",t,e,n,o,r)},e.prototype.deleteRemoteMessageByTimestamp=function(t,e,n,o){return this._callMain("deleteRemoteMessageByTimestamp",t,e,n,o)},e.prototype.getConversationList=function(t,e,n,o,r){return this._callMain("getConversationList",t,e,n,o,r)},e.prototype.getConversationsByPage=function(t,e,n,o,r){return this._callMain("getConversationsByPage",t,e,n,o,r)},e.prototype.getUnreadConversationList=function(t){return this._callMain("getUnreadConversationList",t)},e.prototype.getConversationListWithAllChannel=function(){return this._callMain("getConversationListWithAllChannel")},e.prototype.getConversationListWithAllChannelByPage=function(t,e){return this._callMain("getConversationListWithAllChannelByPage",t,e)},e.prototype.getConversation=function(t,e,n){return this._callMain("getConversation",t,e,n)},e.prototype.removeConversation=function(t,e,n){return this._callMain("removeConversation",t,e,n)},e.prototype.batchRemoveConversation=function(t){return this._callMain("batchRemoveConversation",t)},e.prototype.getAllConversationUnreadCount=function(t,e,n){return this._callMain("getAllConversationUnreadCount",t,e,n)},e.prototype.getConversationUnreadCount=function(t,e,n){return this._callMain("getConversationUnreadCount",t,e,n)},e.prototype.getTotalUnreadCountByLevels=function(t,e,n){return this._callMain("getTotalUnreadCountByLevels",t,e,n)},e.prototype.clearConversationUnreadCount=function(t,e,n){return this._callMain("clearConversationUnreadCount",t,e,n)},e.prototype.getFirstUnreadMessage=function(t,e,n){return this._callMain("getFirstUnreadMessage",t,e,n)},e.prototype.getFirstUnreadMessageInfo=function(t,e,n){return this._callMain("getFirstUnreadMessageInfo",t,e,n)},e.prototype.saveConversationMessageDraft=function(t,e,n){return this._callMain("saveConversationMessageDraft",t,e,n)},e.prototype.getConversationMessageDraft=function(t,e){return this._callMain("getConversationMessageDraft",t,e)},e.prototype.clearConversationMessageDraft=function(t,e){return this._callMain("clearConversationMessageDraft",t,e)},e.prototype.pullConversationStatus=function(t){return this._callMain("pullConversationStatus",t)},e.prototype.batchSetConversationStatus=function(t){var e=t[0].notificationLevel;return r(e)?this._callMain("batchSetConversationStatus",t):Promise.resolve(i.NOT_SUPPORT)},e.prototype.setConversationToTop=function(t,e,n,o,r){return this._callMain("setConversationToTop",t,e,n,o,r)},e.prototype.batchSetConversationToTop=function(t,e,n){return this._callMain("batchSetConversationToTop",t,e,n)},e.prototype.sendMessage=function(t,e,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(n.A_CALLBACK_E,JSON.stringify({error:null==t?void 0:t.stack,pos:"sendMsgBefore"}))}}),this._callMain("sendMessage",t,e,o,s,i)},e.prototype.sendReadReceiptMessage=function(t,e,n){return this._callMain("sendReadReceiptMessage",t,e,n)},e.prototype.getMessageReader=function(t,e,n){return this._callMain("getMessageReader",t,e,n)},e.prototype.sendReadReceiptMessageV4=function(t,e,n){return this._callMain("sendReadReceiptMessageV4",t,e,n)},e.prototype.getMessageReadReceiptV4=function(t,e){return this._callMain("getMessageReadReceiptV4",t,e)},e.prototype.batchGetMessageReadReceiptInfoV4=function(t,e){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.updateConversationReadTime=function(t,e){return this._callMain("updateConversationReadTime",t,e)},e.prototype.disconnect=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return this._send2Main("disconnect",t),[2]}))}))},e.prototype.pullUserSettings=function(t){return this._callMain("pullUserSettings",t)},e.prototype.registerMessageType=function(t,e,n,o,r){this._send2Main("registerMessageType",t,e,n,o,r)},e.prototype.joinChatroom=function(t,e,n){return this._callMain("joinChatroom",t,e,n)},e.prototype.joinExistChatroom=function(t,e,n){return this._callMain("joinExistChatroom",t,e,n)},e.prototype.quitChatroom=function(t){return this._callMain("quitChatroom",t)},e.prototype.getChatroomInfo=function(t,e,n){return this._callMain("getChatroomInfo",t,e,n)},e.prototype.getChatroomHistoryMessages=function(t,e,n,o){return this._callMain("getChatroomHistoryMessages",t,e,n,o)},e.prototype.setChatroomEntry=function(t,e){return this._callMain("setChatroomEntry",t,e)},e.prototype.setChatroomEntries=function(t,e){return this._callMain("setChatroomEntries",t,e)},e.prototype.forceSetChatroomEntry=function(t,e){return this._callMain("forceSetChatroomEntry",t,e)},e.prototype.removeChatroomEntry=function(t,e){return this._callMain("removeChatroomEntry",t,e)},e.prototype.forceRemoveChatroomEntry=function(t,e){return this._callMain("forceRemoveChatroomEntry",t,e)},e.prototype.removeChatroomEntries=function(t,e){return this._callMain("removeChatroomEntries",t,e)},e.prototype.getChatroomEntry=function(t,e){return this._callMain("getChatroomEntry",t,e)},e.prototype.getAllChatroomEntry=function(t){return this._callMain("getAllChatroomEntry",t)},e.prototype.removeChatroomFromCatch=function(t){this._callMain("removeChatroomFromCatch",t)},e.prototype.getFileToken=function(t,e,n,o,r,i){return this._callMain("getFileToken",t,e,n,o,r,i)},e.prototype.getFileUrl=function(t,e,n,o){return this._callMain("getFileUrl",t,e,n,o)},e.prototype.setUserStatus=function(t){return this._callMain("setUserStatus",t)},e.prototype.subscribeUserStatus=function(t){return this._callMain("subscribeUserStatus",t)},e.prototype.getUserStatus=function(t){return this._callMain("getUserStatus",t)},e.prototype.clearConversations=function(t,e){return this._callMain("clearConversations",t,e)},e.prototype.addToBlacklist=function(t){return this._callMain("addToBlacklist",t)},e.prototype.removeFromBlacklist=function(t){return this._callMain("removeFromBlacklist",t)},e.prototype.getBlacklist=function(){return this._callMain("getBlacklist")},e.prototype.getBlacklistStatus=function(t){return this._callMain("getBlacklistStatus",t)},e.prototype.insertMessage=function(t,e,n){return this._callMain("insertMessage",t,e,n)},e.prototype.batchInsertMessage=function(t,e){return this._callMain("batchInsertMessage",t,e)},e.prototype.getMessageCount=function(t,e,n){return this._callMain("getMessageCount",t,e,n)},e.prototype.deleteMessages=function(t){return this._callMain("deleteMessages",t)},e.prototype.deleteMessagesByTimestamp=function(t,e,n,o,r){return this._callMain("deleteMessagesByTimestamp",t,e,n,o,r)},e.prototype.batchClearMessagesByTimestamp=function(t){return this._callMain("batchClearMessagesByTimestamp",t)},e.prototype.batchClearRemoteHistoryMessages=function(t,e){return this._callMain("batchClearRemoteHistoryMessages",t,e)},e.prototype.clearMessages=function(t,e,n){return this._callMain("clearMessages",t,e,n)},e.prototype.getMessage=function(t){return this._callMain("getMessage",t)},e.prototype.setMessageContent=function(t,e,n){return this._callMain("setMessageContent",t,e,n)},e.prototype.setMessageSearchField=function(t,e,n){return this._callMain("setMessageSearchField",t,e,n)},e.prototype.searchConversationByContent=function(t,e,n,o){return this._callMain("searchConversationByContent",t,e,n,o)},e.prototype.searchConversationByContentWithAllChannel=function(t,e,n){return this._callMain("searchConversationByContentWithAllChannel",t,e,n)},e.prototype.searchMessageByContentWithAllChannel=function(t,e,n,o,r){return this._callMain("searchMessageByContentWithAllChannel",t,e,n,o,r)},e.prototype.searchMessageByContentInTimeRangeWithAllChannel=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentInTimeRangeWithAllChannel",t,e,n,o,r,i,a)},e.prototype.searchMessageByContent=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContent",t,e,n,o,r,i,a)},e.prototype.searchMessageByContentAndMessageType=function(t,e,n,o,r,i,a){return this._callMain("searchMessageByContentAndMessageType",t,e,n,o,r,i,a)},e.prototype.searchMessagesByUser=function(t,e,n,o,r,i){return this._callMain("searchMessagesByUser",t,e,n,o,r,i)},e.prototype.getMessagesByTimestamp=function(t,e,n,o){return this._callMain("getMatchedMessage",t,e,n,o)},e.prototype.getUnreadMentionedMessages=function(t,e,n){return this._callMainSync("getUnreadMentionedMessages",t,e,n)},e.prototype.setMessageSentStatus=function(t,e){return this._callMain("setMessageSentStatus",t,e)},e.prototype.setMessageReceivedStatus=function(t,e){return this._callMain("setMessageReceivedStatus",t,e)},e.prototype.updateMessageReceiptStatus=function(t,e,n,o){return this._callMain("updateMessageReceiptStatus",t,e,n,o)},e.prototype.clearUnreadCountByTimestamp=function(t,e,n,o){return this._callMain("clearUnreadCountByTimestamp",t,e,n,o)},e.prototype.clearAllUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationStatus=function(t,e,n){return this._callMain("getConversationNotificationStatus",t,e,n)},e.prototype.getRemoteHistoryMessages=function(t,e,n,o,r,i){return this._callMain("getRemoteHistoryMessages",t,e,n,o,r,i)},e.prototype.getServerTime=function(){return Date.now()-this._cache.deltaTime},e.prototype.getDeviceId=function(){return this._cache.deviceId},e.prototype.getCurrentUserId=function(){return this._cache.crtUserId},e.prototype.bindRTCRoomForChatroom=function(t){return this._callMain("bindRTCRoomForChatroom",t)},e.prototype.rtcSignaling=function(t,e,n,o){return h(this,void 0,void 0,(function(){var r,i,a,s;return f(this,(function(c){switch(c.label){case 0:return r=Array.prototype.slice.call(new Uint8Array(o)),[4,this._callMain("rtcSignaling",t,e,n,r)];case 1:return i=c.sent(),a=i.code,s=i.buffer,[2,{code:a,buffer:s?new Uint8Array(s):s}]}}))}))},e.prototype.rtcPing=function(t,e,n){return this._callMain("rtcPing",t,e,n)},e.prototype.createTag=function(t){return this._callMain("createTag",t)},e.prototype.removeTag=function(t){return this._callMain("removeTag",t)},e.prototype.updateTag=function(t){return this._callMain("updateTag",t)},e.prototype.getTagList=function(){return this._callMain("getTagList")},e.prototype.addTagForConversations=function(t,e){return this._callMain("addTagForConversations",t,e)},e.prototype.removeTagForConversations=function(t,e){return this._callMain("removeTagForConversations",t,e)},e.prototype.removeTagsForConversation=function(t,e){return this._callMain("removeTagsForConversation",t,e)},e.prototype.getConversationListByTag=function(t,e,n,o){return this._callMain("getConversationListByTag",t,e,n,o)},e.prototype.getUnreadCountByTag=function(t,e){return this._callMain("getUnreadCountByTag",t,e)},e.prototype.setConversationStatusInTag=function(t,e,n){return this._callMain("setConversationStatusInTag",t,e,n)},e.prototype.getTagsForConversation=function(t){return this._callMain("getTagsForConversation",t)},e.prototype.clearData=function(){return this._callMain("clearData")},e.prototype.getBlockConversationList=function(){throw new Error("Method not implemented.")},e.prototype.getGroupMessageDeliverList=function(t,e,n){return this._callMain("getGroupMessageDeliverList",t,e,n)},e.prototype.getPrivateMessageDeliverTime=function(t,e){return this._callMain("getPrivateMessageDeliverTime",t,e)},e.prototype.setCallInfo=function(t,e,n){return this._callMain("setCallInfo",t,e,n)},e.prototype.getTopConversationList=function(t,e){return this._callMain("getTopConversationList",t,e)},e.prototype.getUnreadMentionedCount=function(t){throw new Error("Method not implemented.")},e.prototype.getAllUnreadMentionedCount=function(){return this._callMain("getAllUnreadMentionedCount")},e.prototype.getAllConversationState=function(){throw new Error("Method not implemented.")},e.prototype.getUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getBlockUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.getTopUltraGroupList=function(){throw new Error("Method not implemented.")},e.prototype.clearUltraUnreadcount=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupUnreadMentionedCountByTargetId=function(t,e){throw new Error("Method not implemented.")},e.prototype.sendUltraMessage=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.sendUltraGroupTypingStatus=function(t,e){throw new Error("Method not implemented.")},e.prototype.getUltraGroupMessageListByMessageUId=function(t){throw new Error("Method not implemented.")},e.prototype.expandUltraMessage=function(t){throw new Error("Method not implemented.")},e.prototype.modifyMessage=function(t){throw new Error("Method not implemented.")},e.prototype.getUltraHistoryMsg=function(t,e){throw new Error("Method not implemented.")},e.prototype.getConversationNotificationLevel=function(t,e,n){return this._callMain("getConversationNotificationLevel",t,e,n)},e.prototype.setConversationNotificationLevel=function(t,e,n,o){return this._callMain("setConversationNotificationLevel",t,e,n,o)},e.prototype.batchSetConversationNotificationLevel=function(t,e){return this._callMain("batchSetConversationNotificationLevel",t,e)},e.prototype.setConversationTypeNotificationLevel=function(t,e){return this._callMain("setConversationTypeNotificationLevel",t,e)},e.prototype.getConversationTypeNotificationLevel=function(t){return this._callMain("getConversationTypeNotificationLevel",t)},e.prototype.getUltraGroupDefaultNotificationLevel=function(t,e){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.getAllUltraGroupUnreadCount=function(){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadCountByTargetId=function(){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.setUltraGroupDefaultNotificationLevel=function(){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadMentionedMessages=function(){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.getUltraGroupFirstUnreadMessageTimestamp=function(){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.getUltraGroupUnreadInfoList=function(){return Promise.resolve({code:i.NOT_SUPPORT})},e.prototype.getOSInfo=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain("getOSInfo")]}))}))},e.prototype.getProcessInfo=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,{code:i.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")}}]}))}))},e.prototype.getMainProcessInfo=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain("getMainProcessInfo")]}))}))},e.prototype.setProxy=function(t){return this._callMain("setProxy",t)},e.prototype.getProxy=function(){return this._callMain("getProxy")},e.prototype.testProxy=function(t,e){return this._callMain("testProxy",t,e)},e.prototype.setCheckDuplicateMessage=function(t){return this._callMain("checkDuplicateMessage",t)},e.prototype.setCheckChatRoomDuplicateMessage=function(t){return this._callMain("setDuplicateMessageConfig",t)},e.prototype.setNetwork=function(t,e){this._send2Main("setNetwork",t,e)},e.prototype.subscribeUser=function(t,e,n){return this._callMain("subscribeUser",t,e,n)},e.prototype.unSubscribeUser=function(t,e){return this._callMain("unSubscribeUser",t,e)},e.prototype.getSubscribeUserList=function(t,e,n){return this._callMain("getSubscribeUserList",t,e,n)},e.prototype.getSubscribeUserStatus=function(t,e){return this._callMain("getSubscribeUserStatus",t,e)},e.prototype.getConversations=function(t){return this._callMain("getConversations",t)},e.prototype.updateMyUserProfile=function(t){return this._callMain("updateMyUserProfile",t)},e.prototype.getUserProfiles=function(t){return this._callMain("getUserProfiles",t)},e.prototype.getMyUserProfile=function(){return this._callMain("getMyUserProfile")},e.prototype.updateMyUserProfileVisibility=function(t){return this._callMain("updateMyUserProfileVisibility",t)},e.prototype.getMyUserProfileVisibility=function(){return this._callMain("getMyUserProfileVisibility")},e.prototype.searchUserProfileByUniqueId=function(t){return this._callMain("searchUserProfileByUniqueId",t)},e.prototype.createGroup=function(t,e,n,o){return h(this,void 0,void 0,(function(){return f(this,(function(r){return[2,this._callMain("createGroup",t,e,n,o)]}))}))},e.prototype.updateGroupInfo=function(t,e,n){return this._callMain("updateGroupInfo",t,e,n)},e.prototype.getGroupsInfo=function(t){return this._callMain("getGroupsInfo",t)},e.prototype.kickGroupMembers=function(t,e,n){return this._callMain("kickGroupMembers",t,e,n)},e.prototype.quitGroup=function(t,e){return this._callMain("quitGroup",t,e)},e.prototype.dismissGroup=function(t){return this._callMain("dismissGroup",t)},e.prototype.transferGroupOwner=function(t,e,n,o){return this._callMain("transferGroupOwner",t,e,n,o)},e.prototype.setGroupManagers=function(t,e,n){return this._callMain("setGroupManagers",t,e,n)},e.prototype.getGroupMembersByRole=function(t,e,n){return this._callMain("getGroupMembersByRole",t,e,n)},e.prototype.getGroupMembers=function(t,e){return this._callMain("getGroupMembers",t,e)},e.prototype.setGroupMemberInfo=function(t,e,n,o){return this._callMain("setGroupMemberInfo",t,e,n,o)},e.prototype.searchGroupMembers=function(t,e,n){return this._callMain("searchGroupMembers",t,e,n)},e.prototype.joinGroup=function(t){return this._callMain("joinGroup",t)},e.prototype.inviteUsersToGroup=function(t,e){return this._callMain("inviteUsersToGroup",t,e)},e.prototype.memberInviteResponse=function(t){return this._callMain("memberInviteResponse",t)},e.prototype.getGroupApplications=function(t,e,n){return this._callMain("getGroupApplications",t,e,n)},e.prototype.getJoinedGroupsByRole=function(t,e){return this._callMain("getJoinedGroupsByRole",t,e)},e.prototype.searchJoinedGroups=function(t,e){return this._callMain("searchJoinedGroups",t,e)},e.prototype.getJoinedGroups=function(t){return this._callMain("getJoinedGroups",t)},e.prototype.setGroupRemark=function(t,e){return this._callMain("setGroupRemark",t,e)},e.prototype.setGroupFollows=function(t,e,n){return this._callMain("setGroupFollows",t,e,n)},e.prototype.getGroupFollows=function(t){return this._callMain("getGroupFollows",t)},e.prototype.addFriend=function(t,e,n){return this._callMain("addFriend",t,e,n)},e.prototype.deleteFriends=function(t,e){return this._callMain("deleteFriends",t,e)},e.prototype.acceptFriendApplication=function(t){return this._callMain("acceptFriendApplication",t)},e.prototype.refuseFriendApplication=function(t,e){return this._callMain("refuseFriendApplication",t,e)},e.prototype.setFriendInfo=function(t,e,n){return this._callMain("setFriendInfo",t,e,n)},e.prototype.checkFriends=function(t,e){return this._callMain("checkFriends",t,e)},e.prototype.getFriends=function(t,e){return this._callMain("getFriends",t)},e.prototype.getFriendApplications=function(t,e,n){return this._callMain("getFriendApplications",t,e,n)},e.prototype.deleteFriendApplication=function(t,e){return this._callMain("deleteFriendApplication",t,e)},e.prototype.getFriendsInfo=function(t){return this._callMain("getFriendsInfo",t)},e.prototype.searchFriendsInfo=function(t){return this._callMain("searchFriendsInfo",t)},e.prototype.setFriendAddPermission=function(t){return this._callMain("setFriendAddPermission",t)},e.prototype.getFriendAddPermission=function(){return this._callMain("getFriendAddPermission")},e.prototype.getRealtimeConversations=function(t,e,n){throw new Error("Method not implemented.")},e.prototype.getRealtimeConTotalUnreadCount=function(){throw new Error("Method not implemented.")},e.prototype.clearRealtimeConUnreadCount=function(t){throw new Error("Method not implemented.")},e.prototype.removeRealtimeConversations=function(t){throw new Error("Method not implemented.")},e.prototype.getRealtimeConUnreadCounts=function(t){throw new Error("Method not implemented.")},e.prototype.setNotificationQuietHoursWithSetting=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return[2,this._callMain2("setNotificationQuietHoursWithSetting",t)]}))}))},e.prototype.removeNotificationQuietHoursSetting=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain2("removeNotificationQuietHoursSetting")]}))}))},e.prototype.getNotificationQuietHoursSetting=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,this._callMain2("getNotificationQuietHoursSetting")]}))}))},e}(l),w=function(){window.RCCppEngine=m};export{w as initRenderer};
|