@univerjs-pro/thread-comment-datasource 0.5.5-nightly.202501220324 → 0.5.5
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x528574=_0x11ac;(function(_0x406075,_0x1be1dd){const _0x4fc16b=_0x11ac,_0x2ac74e=_0x406075();while(!![]){try{const _0x5a4126=-parseInt(_0x4fc16b(0x152))/0x1+-parseInt(_0x4fc16b(0x1c2))/0x2+-parseInt(_0x4fc16b(0x158))/0x3+parseInt(_0x4fc16b(0x1a7))/0x4+-parseInt(_0x4fc16b(0x16e))/0x5+parseInt(_0x4fc16b(0x18e))/0x6*(parseInt(_0x4fc16b(0x16c))/0x7)+-parseInt(_0x4fc16b(0x154))/0x8*(-parseInt(_0x4fc16b(0x190))/0x9);if(_0x5a4126===_0x1be1dd)break;else _0x2ac74e['push'](_0x2ac74e['shift']());}catch(_0x5e6798){_0x2ac74e['push'](_0x2ac74e['shift']());}}}(_0x2829,0x7f26c));function _0x11ac(_0x929a48,_0xbbb646){const _0x2829a4=_0x2829();return _0x11ac=function(_0x11ac23,_0x3af6df){_0x11ac23=_0x11ac23-0x152;let _0x87105e=_0x2829a4[_0x11ac23];return _0x87105e;},_0x11ac(_0x929a48,_0xbbb646);}var __defProp=Object[_0x528574(0x174)],__name=(_0x8378d5,_0x8adc48)=>__defProp(_0x8378d5,_0x528574(0x17f),{'value':_0x8adc48,'configurable':!0x0});Object[_0x528574(0x174)](exports,Symbol[_0x528574(0x19f)],{'value':_0x528574(0x173)});const collaborationClient=require(_0x528574(0x1c4)),license=require(_0x528574(0x171)),core=require(_0x528574(0x1a2)),threadCommentUi=require('@univerjs/thread-comment-ui'),threadComment=require('@univerjs/thread-comment'),rxjs=require(_0x528574(0x1cd)),network=require('@univerjs/network'),PLUGIN_NAME=_0x528574(0x1d3);function _0x2829(){const _0x15a90d=['/universer-api/comment/unit/','replies','rxjs','Disposable','DependentOn','createTimestamp','/edit','UniverCollaborationClientPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','Plugin','addComment','UniverThreadCommentDataSourcePlugin','_userService','_init','Solve','__publicField','type','607698zAOUIt','delete','614312XossCi','requireSession','Add','dataSource','1942485EguOSM','map','ref','Unknown','_sessionService','__decorateParam','getMemberID','CollaborationSessionService','getOwnPropertyDescriptor','length','OpenOrReOpen','_initDataSource','parse','UNRECOGNIZED','resolveComment','Solved','content','subscribe','UserManagerService','userId','168ZaeWhU','__decorateParam$3','2774290VZqQgs','mapReply','_threadCommentModel','@univerjs-pro/license','Delete','Module','defineProperty','add','ThreadCommentModel','/list','_threadCommentDataSourceService','symbol','replyId','commentUpdate$','bufferTime','threadId','forEach','name','post','comments','/delete','users','filter','__decorateParam$1','resolved','IConfigService','Edit','_httpService','personId','_initUserSync','_injector','_commentService','173406NmGKwx','Injector','243LDnNMa','body','_threadCommentDataSource','customRanges','get','user','listComments','COMMENT','setConfig','UNIVER_UNKNOWN','find','_config','onReady','format','deleteComment','toStringTag','CustomRangeType','ThreadCommentDataSourceController','@univerjs/core','stringify','UniverThreadCommentUIPlugin','__decorateParam$2','code','724096zSOZmQ','pluginName','saveCommentToSnapshot','Reply','dayjs','/solved','error','UniverLicensePlugin','UniverInstanceType','getUnit','_configService','CommentService','syncUpdateMutationToColla','parentId','getCurrentUser','unitId','IThreadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','addUser','size','HTTPService','syncUsers','rangeId','disposeWithMe','solved','userID','Inject','1234176XxonBO','/reply','@univerjs-pro/collaboration-client','ThreadCommentServerDataSource','getComments','comment','root','updateComment','rangeType'];_0x2829=function(){return _0x15a90d;};return _0x2829();}var CommentUpdate_Status=(_0x7c8f3b=>(_0x7c8f3b[_0x7c8f3b[_0x528574(0x162)]=0x0]=_0x528574(0x162),_0x7c8f3b[_0x7c8f3b[_0x528574(0x167)]=0x1]=_0x528574(0x167),_0x7c8f3b[_0x7c8f3b[_0x528574(0x165)]=-0x1]=_0x528574(0x165),_0x7c8f3b))(CommentUpdate_Status||{}),CommentUpdate_EventType=(_0x50c7db=>(_0x50c7db[_0x50c7db[_0x528574(0x15b)]=0x0]=_0x528574(0x15b),_0x50c7db[_0x50c7db['Add']=0x1]=_0x528574(0x156),_0x50c7db[_0x50c7db[_0x528574(0x1aa)]=0x2]='Reply',_0x50c7db[_0x50c7db[_0x528574(0x188)]=0x3]=_0x528574(0x188),_0x50c7db[_0x50c7db[_0x528574(0x172)]=0x4]=_0x528574(0x172),_0x50c7db[_0x50c7db['Solve']=0x5]=_0x528574(0x1da),_0x50c7db[_0x50c7db[_0x528574(0x165)]=-0x1]='UNRECOGNIZED',_0x50c7db))(CommentUpdate_EventType||{});const stringifyDT=__name(_0x28ef66=>core[_0x528574(0x1ab)](new Date(+_0x28ef66))[_0x528574(0x19d)]('YYYY/MM/DD\x20HH:mm'),'stringifyDT'),syncUsers=__name(async(_0x26493b,_0x221276)=>{const _0x4c2928=_0x528574,_0x410e3d=_0x26493b[_0x4c2928(0x194)](core[_0x4c2928(0x16a)]),_0x3325f9=_0x26493b[_0x4c2928(0x194)](network['HTTPService']);_0x221276[_0x4c2928(0x17e)](_0x47d825=>{const _0x5de0f1=_0x4c2928;_0x410e3d['getUser'](_0x47d825)&&_0x221276[_0x5de0f1(0x153)](_0x47d825);}),_0x221276[_0x4c2928(0x1ba)]&&(await _0x3325f9['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x221276]}}))[_0x4c2928(0x191)]['users'][_0x4c2928(0x17e)](_0x20e39d=>{_0x20e39d&&_0x410e3d['addUser'](_0x20e39d);});},_0x528574(0x1bc));var __defProp$3=Object[_0x528574(0x174)],__getOwnPropDesc$3=Object[_0x528574(0x160)],__decorateClass$3=__name((_0x39b4c1,_0x20d209,_0x35a39d,_0x51f486)=>{const _0x47f629=_0x528574;for(var _0x400879=_0x51f486>0x1?void 0x0:_0x51f486?__getOwnPropDesc$3(_0x20d209,_0x35a39d):_0x20d209,_0x118af8=_0x39b4c1[_0x47f629(0x161)]-0x1,_0x3153d2;_0x118af8>=0x0;_0x118af8--)(_0x3153d2=_0x39b4c1[_0x118af8])&&(_0x400879=(_0x51f486?_0x3153d2(_0x20d209,_0x35a39d,_0x400879):_0x3153d2(_0x400879))||_0x400879);return _0x51f486&&_0x400879&&__defProp$3(_0x20d209,_0x35a39d,_0x400879),_0x400879;},'__decorateClass$3'),__decorateParam$3=__name((_0x1db9ef,_0xb1db63)=>(_0x1b6e52,_0x6b3805)=>_0xb1db63(_0x1b6e52,_0x6b3805,_0x1db9ef),_0x528574(0x16d)),_a;let ThreadCommentCollaUpdateController=(_a=class extends core[_0x528574(0x1ce)]{constructor(_0x41c16b,_0x196838,_0x584041,_0x52fed6){const _0x3466af=_0x528574;super(),this[_0x3466af(0x18d)]=_0x41c16b,this[_0x3466af(0x170)]=_0x196838,this[_0x3466af(0x1d8)]=_0x584041,this[_0x3466af(0x18c)]=_0x52fed6,this[_0x3466af(0x1d9)](),this[_0x3466af(0x18b)]();}[_0x528574(0x18b)](){const _0x257f74=_0x528574;this['disposeWithMe'](this['_threadCommentModel'][_0x257f74(0x17b)]['pipe'](rxjs[_0x257f74(0x17c)](0x10))[_0x257f74(0x169)](_0x4c09b8=>{const _0x3393e5=_0x257f74,_0x29fe3d=new Set();_0x4c09b8['forEach'](_0x423e61=>{const _0x48682b=_0x11ac;switch(_0x423e61[_0x48682b(0x1dc)]){case _0x48682b(0x175):{const _0x5d42a6=_0x423e61['payload'][_0x48682b(0x18a)];_0x29fe3d[_0x48682b(0x175)](_0x5d42a6);break;}}}),syncUsers(this[_0x3393e5(0x18c)],_0x29fe3d);}));}[_0x528574(0x1d9)](){const _0xe4c882=_0x528574;this[_0xe4c882(0x1be)](this[_0xe4c882(0x18d)][_0xe4c882(0x17b)][_0xe4c882(0x169)](async _0xdb000=>{const _0x939a1c=_0xe4c882;var _0x527a7c,_0x5a74c2,_0x438775,_0x11e034;const _0x26c619=(_0x527a7c=this[_0x939a1c(0x170)][_0x939a1c(0x1b0)](_0xdb000[_0x939a1c(0x1b6)])['find'](_0x311ef6=>_0x311ef6[_0x939a1c(0x17d)]===_0xdb000['threadId']))==null?void 0x0:_0x527a7c[_0x939a1c(0x1c8)];if(!_0x26c619)return;const {unitId:_0xc18caf,subUnitId:_0x10ee57}=_0x26c619;switch(_0xdb000[_0x939a1c(0x195)]&&this[_0x939a1c(0x1d8)][_0x939a1c(0x1b9)](_0xdb000['user']),_0xdb000['type']){case CommentUpdate_EventType[_0x939a1c(0x156)]:break;case CommentUpdate_EventType[_0x939a1c(0x1aa)]:{this[_0x939a1c(0x170)]['addComment'](_0xc18caf,_0x10ee57,{'unitId':_0xc18caf,'subUnitId':_0x10ee57,'ref':'','id':_0xdb000[_0x939a1c(0x17a)],'dT':stringifyDT(+_0xdb000[_0x939a1c(0x1d0)]),'threadId':_0xdb000[_0x939a1c(0x17d)],'personId':(_0x438775=(_0x5a74c2=_0xdb000[_0x939a1c(0x195)])==null?void 0x0:_0x5a74c2[_0x939a1c(0x1c0)])!=null?_0x438775:_0xdb000[_0x939a1c(0x16b)],'text':JSON[_0x939a1c(0x164)](_0xdb000[_0x939a1c(0x168)]),'parentId':_0x26c619['id']});break;}case CommentUpdate_EventType['Delete']:{const _0x25d3c4=this[_0x939a1c(0x170)]['getComment'](_0xc18caf,_0x10ee57,_0xdb000['replyId']);_0x25d3c4&&_0x25d3c4[_0x939a1c(0x1b4)]&&this[_0x939a1c(0x170)][_0x939a1c(0x19e)](_0xc18caf,_0x10ee57,_0xdb000['replyId']);break;}case CommentUpdate_EventType['Edit']:{this[_0x939a1c(0x170)][_0x939a1c(0x1c9)](_0xc18caf,_0x10ee57,{'commentId':_0xdb000[_0x939a1c(0x17a)],'text':JSON[_0x939a1c(0x164)](_0xdb000['content'])});break;}case CommentUpdate_EventType[_0x939a1c(0x1da)]:{const _0x450da3=(_0x11e034=this[_0x939a1c(0x170)][_0x939a1c(0x1b0)](_0xdb000['unitId'])[_0x939a1c(0x19a)](_0x3f5885=>_0x3f5885[_0x939a1c(0x17d)]===_0xdb000[_0x939a1c(0x17d)]))==null?void 0x0:_0x11e034[_0x939a1c(0x1c8)];_0x450da3&&this[_0x939a1c(0x170)][_0x939a1c(0x166)](_0xc18caf,_0x10ee57,_0x450da3['id'],_0xdb000['solved']===CommentUpdate_Status[_0x939a1c(0x167)]);break;}}}));}},__name(_a,'ThreadCommentCollaUpdateController'),_a);ThreadCommentCollaUpdateController=__decorateClass$3([__decorateParam$3(0x0,core[_0x528574(0x1c1)](collaborationClient[_0x528574(0x1b2)])),__decorateParam$3(0x1,core[_0x528574(0x1c1)](threadComment[_0x528574(0x176)])),__decorateParam$3(0x2,core[_0x528574(0x1c1)](core['UserManagerService'])),__decorateParam$3(0x3,core[_0x528574(0x1c1)](core[_0x528574(0x18f)]))],ThreadCommentCollaUpdateController);const THREAD_COMMENT_DATA_SOURCE_PLUGIN_CONFIG_KEY='thread-comment-data-source.config',defaultPluginConfig={};var __defProp$2=Object[_0x528574(0x174)],__getOwnPropDesc$2=Object['getOwnPropertyDescriptor'],__decorateClass$2=__name((_0x1c5b64,_0x32b7be,_0x3aa583,_0x41df34)=>{const _0x1f8068=_0x528574;for(var _0x3cf42c=_0x41df34>0x1?void 0x0:_0x41df34?__getOwnPropDesc$2(_0x32b7be,_0x3aa583):_0x32b7be,_0x2d9c7c=_0x1c5b64[_0x1f8068(0x161)]-0x1,_0x4c6cc9;_0x2d9c7c>=0x0;_0x2d9c7c--)(_0x4c6cc9=_0x1c5b64[_0x2d9c7c])&&(_0x3cf42c=(_0x41df34?_0x4c6cc9(_0x32b7be,_0x3aa583,_0x3cf42c):_0x4c6cc9(_0x3cf42c))||_0x3cf42c);return _0x41df34&&_0x3cf42c&&__defProp$2(_0x32b7be,_0x3aa583,_0x3cf42c),_0x3cf42c;},'__decorateClass$2'),__decorateParam$2=__name((_0x5150ed,_0x4b2359)=>(_0x473ffd,_0x5be93d)=>_0x4b2359(_0x473ffd,_0x5be93d,_0x5150ed),_0x528574(0x1a5));function parseServiceComment(_0xf8294b,_0x5a63b5){const _0x1be4b1=_0x528574,_0x217d15=_0xf8294b[_0x1be4b1(0x1cc)][0x0];return{..._0x5a63b5,'id':_0x217d15['replyId'],'resolved':_0xf8294b[_0x1be4b1(0x1bf)]===0x1,'dT':stringifyDT(_0x217d15[_0x1be4b1(0x1d0)]),'personId':_0x217d15[_0x1be4b1(0x16b)],'threadId':_0x217d15[_0x1be4b1(0x17d)]};}__name(parseServiceComment,'parseServiceComment');function getComments(_0x2db2da,_0x36eaaa,_0x4772dd){const _0x3423cd=_0x528574;var _0xc4b22c,_0x2206f3;if(((_0x2206f3=(_0xc4b22c=_0x2db2da==null?void 0x0:_0x2db2da[_0x3423cd(0x1cc)])==null?void 0x0:_0xc4b22c['length'])!=null?_0x2206f3:0x0)>0x0){const _0x3c2c2e=__name((_0x273f3d,_0x418ee5)=>({'id':_0x273f3d['replyId'],'threadId':_0x273f3d[_0x3423cd(0x17d)],'dT':stringifyDT(_0x273f3d[_0x3423cd(0x1d0)]),'personId':_0x273f3d[_0x3423cd(0x16b)],'resolved':_0x2db2da[_0x3423cd(0x1bf)]===CommentUpdate_Status[_0x3423cd(0x167)],'unitId':_0x36eaaa,'subUnitId':_0x4772dd,'text':JSON[_0x3423cd(0x164)](_0x273f3d[_0x3423cd(0x168)]),'parentId':_0x418ee5}),_0x3423cd(0x16f)),_0x1c8133=_0x3c2c2e(_0x2db2da['replies'][0x0]);return{..._0x1c8133,'children':_0x2db2da[_0x3423cd(0x1cc)]['slice'](0x1)[_0x3423cd(0x159)](_0xfd5bbb=>_0x3c2c2e(_0xfd5bbb,_0x1c8133['id']))};}return null;}__name(getComments,_0x528574(0x1c6));var _a2;let ThreadCommentServerDataSource=(_a2=class{constructor(_0x24c57e,_0x4888af,_0x242b74,_0x29f056){const _0x2b3742=_0x528574;this[_0x2b3742(0x189)]=_0x24c57e,this[_0x2b3742(0x1d8)]=_0x4888af,this[_0x2b3742(0x15c)]=_0x242b74,this[_0x2b3742(0x18c)]=_0x29f056;}async[_0x528574(0x1d6)](_0x895822){const _0x2bce58=_0x528574;var _0x4bb0be,_0x3e094f;const {parentId:_0x136629,unitId:_0x552c36,text:_0x300952,threadId:_0x29b479}=_0x895822,_0x597ae1=(_0x3e094f=(_0x4bb0be=_0x300952[_0x2bce58(0x193)])==null?void 0x0:_0x4bb0be[_0x2bce58(0x184)](_0x30fd52=>_0x30fd52[_0x2bce58(0x1ca)]===core[_0x2bce58(0x1a0)][_0x2bce58(0x197)])[_0x2bce58(0x159)](_0x504a90=>_0x504a90[_0x2bce58(0x1bd)]))!=null?_0x3e094f:[],_0x481349=JSON[_0x2bce58(0x1a3)](_0x300952),_0x47223b=(await this['_sessionService'][_0x2bce58(0x155)](_0x552c36))['getMemberID']();if(_0x136629){const _0x1465d7={'memberId':_0x47223b,'unitId':_0x552c36,'content':_0x481349,'mention':_0x597ae1,'threadId':_0x29b479},_0x57bbed=(await this[_0x2bce58(0x189)][_0x2bce58(0x180)](_0x2bce58(0x1cb)+_0x552c36+_0x2bce58(0x1c3),{'body':_0x1465d7}))[_0x2bce58(0x191)]['reply'];return{..._0x895822,'id':_0x57bbed[_0x2bce58(0x17a)],'dT':core[_0x2bce58(0x1ab)](+_0x57bbed[_0x2bce58(0x1d0)])[_0x2bce58(0x19d)](_0x2bce58(0x1b8)),'personId':_0x57bbed[_0x2bce58(0x16b)]};}else{const _0x49b564={'memberId':_0x47223b,'unitId':_0x552c36,'content':_0x481349,'mention':_0x597ae1},_0x255723=await this[_0x2bce58(0x189)][_0x2bce58(0x180)]('/universer-api/comment/unit/'+_0x552c36+'/add',{'body':_0x49b564});return parseServiceComment(_0x255723[_0x2bce58(0x191)][_0x2bce58(0x1c7)],_0x895822);}}async['updateComment'](_0x36c208){const _0x40c2bc=_0x528574;var _0x1f9b8c,_0x3f67dc;const {text:_0x2c9c3c,unitId:_0x5ac4aa}=_0x36c208,_0x5138b0=(_0x3f67dc=(_0x1f9b8c=_0x2c9c3c['customRanges'])==null?void 0x0:_0x1f9b8c[_0x40c2bc(0x184)](_0x3410a4=>_0x3410a4[_0x40c2bc(0x1ca)]===core['CustomRangeType'][_0x40c2bc(0x197)])[_0x40c2bc(0x159)](_0x40713=>_0x40713[_0x40c2bc(0x1bd)]))!=null?_0x3f67dc:[],_0xc9adec=JSON[_0x40c2bc(0x1a3)](_0x2c9c3c),_0x7a0504=_0x36c208[_0x40c2bc(0x17d)],_0x1db70f=_0x36c208['id'],_0x3ff288={'memberId':(await this[_0x40c2bc(0x15c)][_0x40c2bc(0x155)](_0x5ac4aa))[_0x40c2bc(0x15e)](),'unitId':_0x5ac4aa,'threadId':_0x7a0504,'mention':_0x5138b0,'content':_0xc9adec,'replyId':_0x1db70f},_0x2b72c1=await this[_0x40c2bc(0x189)]['post'](_0x40c2bc(0x1cb)+_0x5ac4aa+_0x40c2bc(0x1d1),{'body':_0x3ff288});return!_0x2b72c1['body'][_0x40c2bc(0x1ad)]||_0x2b72c1[_0x40c2bc(0x191)]['error']['code']===0x1;}async[_0x528574(0x166)](_0x4f81cd){const _0x30adee=_0x528574,{unitId:_0x9a2978}=_0x4f81cd,_0x3d8fb7=_0x4f81cd['threadId'],_0x5caa9a={'memberId':this[_0x30adee(0x1d8)][_0x30adee(0x1b5)]()['userID'],'unitId':_0x9a2978,'threadId':_0x3d8fb7,'solved':_0x4f81cd[_0x30adee(0x186)]?CommentUpdate_Status['Solved']:CommentUpdate_Status['OpenOrReOpen']},_0x3dc29b=await this['_httpService'][_0x30adee(0x180)]('/universer-api/comment/unit/'+_0x9a2978+_0x30adee(0x1ac),{'body':_0x5caa9a});return!_0x3dc29b[_0x30adee(0x191)][_0x30adee(0x1ad)]||_0x3dc29b[_0x30adee(0x191)]['error'][_0x30adee(0x1a6)]===0x1;}async[_0x528574(0x19e)](_0x28c071,_0x310f1d,_0xb0395c,_0xf2cc91){const _0x165614=_0x528574,_0x378177={'memberId':(await this['_sessionService'][_0x165614(0x155)](_0x28c071))[_0x165614(0x15e)](),'threadId':_0xb0395c,'replyId':_0xf2cc91,'unitId':_0x28c071},_0xbb3bad=await this[_0x165614(0x189)][_0x165614(0x180)](_0x165614(0x1cb)+_0x28c071+_0x165614(0x182),{'body':_0x378177});return!_0xbb3bad[_0x165614(0x191)][_0x165614(0x1ad)]||_0xbb3bad[_0x165614(0x191)]['error'][_0x165614(0x1a6)]===0x1;}async[_0x528574(0x196)](_0x2074c9,_0x535aa5,_0x517fc2){const _0x4703d0=_0x528574,_0x467edb={'unitId':_0x2074c9,'threadId':_0x517fc2},_0x2e4fbd=await this[_0x4703d0(0x189)]['post'](_0x4703d0(0x1cb)+_0x2074c9+_0x4703d0(0x177),{'body':_0x467edb}),_0x4a8c14=_0x517fc2[_0x4703d0(0x159)](_0x28a837=>getComments(_0x2e4fbd[_0x4703d0(0x191)][_0x4703d0(0x181)][_0x28a837],_0x2074c9,_0x535aa5))['filter'](Boolean);return Object['values'](_0x2e4fbd[_0x4703d0(0x191)][_0x4703d0(0x183)])[_0x4703d0(0x17e)](_0x5021ca=>{const _0x186496=_0x4703d0;this[_0x186496(0x1d8)][_0x186496(0x1b9)](_0x5021ca);}),_0x4a8c14;}[_0x528574(0x1a9)](_0x29ce1f){const _0x3f1775=_0x528574;return{'id':_0x29ce1f['id'],'threadId':_0x29ce1f[_0x3f1775(0x17d)],'ref':_0x29ce1f[_0x3f1775(0x15a)]};}},__name(_a2,_0x528574(0x1c5)),_a2);ThreadCommentServerDataSource=__decorateClass$2([__decorateParam$2(0x0,core[_0x528574(0x1c1)](network[_0x528574(0x1bb)])),__decorateParam$2(0x1,core[_0x528574(0x1c1)](core[_0x528574(0x16a)])),__decorateParam$2(0x2,core['Inject'](collaborationClient[_0x528574(0x15f)])),__decorateParam$2(0x3,core[_0x528574(0x1c1)](core[_0x528574(0x18f)]))],ThreadCommentServerDataSource);var __defProp$1=Object[_0x528574(0x174)],__getOwnPropDesc$1=Object[_0x528574(0x160)],__decorateClass$1=__name((_0x14d981,_0x43a024,_0xd3feed,_0x10c152)=>{const _0x35d62c=_0x528574;for(var _0x5bbd38=_0x10c152>0x1?void 0x0:_0x10c152?__getOwnPropDesc$1(_0x43a024,_0xd3feed):_0x43a024,_0x390c63=_0x14d981[_0x35d62c(0x161)]-0x1,_0x541c50;_0x390c63>=0x0;_0x390c63--)(_0x541c50=_0x14d981[_0x390c63])&&(_0x5bbd38=(_0x10c152?_0x541c50(_0x43a024,_0xd3feed,_0x5bbd38):_0x541c50(_0x5bbd38))||_0x5bbd38);return _0x10c152&&_0x5bbd38&&__defProp$1(_0x43a024,_0xd3feed,_0x5bbd38),_0x5bbd38;},'__decorateClass$1'),__decorateParam$1=__name((_0x1bd699,_0x544ecb)=>(_0x42bf82,_0x5d71ea)=>_0x544ecb(_0x42bf82,_0x5d71ea,_0x1bd699),_0x528574(0x185)),_a3;let ThreadCommentDataSourceController=(_a3=class extends core[_0x528574(0x1ce)]{constructor(_0x3c9b8f,_0x447518){const _0x89af73=_0x528574;super(),this[_0x89af73(0x178)]=_0x3c9b8f,this[_0x89af73(0x192)]=_0x447518,this[_0x89af73(0x163)]();}[_0x528574(0x163)](){const _0x659af8=_0x528574;this[_0x659af8(0x178)][_0x659af8(0x157)]=this[_0x659af8(0x192)],this['_threadCommentDataSourceService'][_0x659af8(0x1b3)]=!0x1;}},__name(_a3,_0x528574(0x1a1)),_a3);ThreadCommentDataSourceController=__decorateClass$1([__decorateParam$1(0x0,threadComment[_0x528574(0x1b7)]),__decorateParam$1(0x1,core[_0x528574(0x1c1)](ThreadCommentServerDataSource))],ThreadCommentDataSourceController);var __defProp2=Object['defineProperty'],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__defNormalProp=__name((_0x49040d,_0x5d2658,_0x3a2847)=>_0x5d2658 in _0x49040d?__defProp2(_0x49040d,_0x5d2658,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a2847}):_0x49040d[_0x5d2658]=_0x3a2847,'__defNormalProp'),__decorateClass=__name((_0x6847dd,_0x46d974,_0x26e77e,_0x290d55)=>{const _0x21cbca=_0x528574;for(var _0x5c319a=_0x290d55>0x1?void 0x0:_0x290d55?__getOwnPropDesc(_0x46d974,_0x26e77e):_0x46d974,_0x207c7d=_0x6847dd[_0x21cbca(0x161)]-0x1,_0x2943de;_0x207c7d>=0x0;_0x207c7d--)(_0x2943de=_0x6847dd[_0x207c7d])&&(_0x5c319a=(_0x290d55?_0x2943de(_0x46d974,_0x26e77e,_0x5c319a):_0x2943de(_0x5c319a))||_0x5c319a);return _0x290d55&&_0x5c319a&&__defProp2(_0x46d974,_0x26e77e,_0x5c319a),_0x5c319a;},'__decorateClass'),__decorateParam=__name((_0x3f9823,_0x3a5d5f)=>(_0x4670f5,_0x32eb8a)=>_0x3a5d5f(_0x4670f5,_0x32eb8a,_0x3f9823),_0x528574(0x15d)),__publicField=__name((_0x40d200,_0x2f8ff5,_0xdb7898)=>__defNormalProp(_0x40d200,typeof _0x2f8ff5!=_0x528574(0x179)?_0x2f8ff5+'':_0x2f8ff5,_0xdb7898),_0x528574(0x1db)),_a4;exports[_0x528574(0x1d7)]=(_a4=class extends core[_0x528574(0x1d5)]{constructor(_0x3a8dfb=defaultPluginConfig,_0x4c4303,_0x2e5d37){const _0x5a323c=_0x528574;super(),this[_0x5a323c(0x19b)]=_0x3a8dfb,this[_0x5a323c(0x18c)]=_0x4c4303,this[_0x5a323c(0x1b1)]=_0x2e5d37;const {..._0x413cd1}=core['merge']({},defaultPluginConfig,this['_config']);this['_configService'][_0x5a323c(0x198)](THREAD_COMMENT_DATA_SOURCE_PLUGIN_CONFIG_KEY,_0x413cd1);}[_0x528574(0x1d4)](){const _0x23fc54=_0x528574;[[ThreadCommentServerDataSource],[ThreadCommentDataSourceController],[ThreadCommentCollaUpdateController]][_0x23fc54(0x17e)](_0x5b01a8=>{const _0x45b60c=_0x23fc54;this[_0x45b60c(0x18c)][_0x45b60c(0x175)](_0x5b01a8);});}[_0x528574(0x19c)](){const _0xa4d60=_0x528574;this[_0xa4d60(0x18c)]['get'](ThreadCommentDataSourceController),this['_injector'][_0xa4d60(0x194)](ThreadCommentCollaUpdateController);}},__name(_a4,'UniverThreadCommentDataSourcePlugin'),_a4),__publicField(exports[_0x528574(0x1d7)],_0x528574(0x1a8),PLUGIN_NAME),__publicField(exports[_0x528574(0x1d7)],_0x528574(0x1dc),core[_0x528574(0x1af)][_0x528574(0x199)]),exports[_0x528574(0x1d7)]=__decorateClass([core[_0x528574(0x1cf)](threadCommentUi[_0x528574(0x1a4)],collaborationClient[_0x528574(0x1d2)],license[_0x528574(0x1ae)]),__decorateParam(0x1,core[_0x528574(0x1c1)](core['Injector'])),__decorateParam(0x2,core[_0x528574(0x187)])],exports[_0x528574(0x1d7)]);
|
|
1
|
+
'use strict';const _0x23f222=_0x4cad;(function(_0x5d823e,_0x517ee6){const _0x56edcb=_0x4cad,_0x3fe19e=_0x5d823e();while(!![]){try{const _0x35cfd5=-parseInt(_0x56edcb(0x1fd))/0x1+parseInt(_0x56edcb(0x20c))/0x2+parseInt(_0x56edcb(0x264))/0x3+-parseInt(_0x56edcb(0x24a))/0x4+-parseInt(_0x56edcb(0x24d))/0x5+parseInt(_0x56edcb(0x215))/0x6+-parseInt(_0x56edcb(0x1f5))/0x7*(-parseInt(_0x56edcb(0x21c))/0x8);if(_0x35cfd5===_0x517ee6)break;else _0x3fe19e['push'](_0x3fe19e['shift']());}catch(_0x25ca21){_0x3fe19e['push'](_0x3fe19e['shift']());}}}(_0x3963,0xd48bd));Object[_0x23f222(0x25d)](exports,Symbol[_0x23f222(0x217)],{'value':_0x23f222(0x241)});const C=require(_0x23f222(0x232)),T=require(_0x23f222(0x212)),c=require(_0x23f222(0x1f4)),w=require(_0x23f222(0x234)),P=require(_0x23f222(0x247)),U=require(_0x23f222(0x254)),M=require(_0x23f222(0x1f6)),R=_0x23f222(0x261);var v=(_0xac695a=>(_0xac695a[_0xac695a[_0x23f222(0x263)]=0x0]='OpenOrReOpen',_0xac695a[_0xac695a[_0x23f222(0x231)]=0x1]=_0x23f222(0x231),_0xac695a[_0xac695a['UNRECOGNIZED']=-0x1]=_0x23f222(0x21d),_0xac695a))(v||{}),I=(_0x1104ff=>(_0x1104ff[_0x1104ff[_0x23f222(0x266)]=0x0]=_0x23f222(0x266),_0x1104ff[_0x1104ff['Add']=0x1]=_0x23f222(0x208),_0x1104ff[_0x1104ff['Reply']=0x2]='Reply',_0x1104ff[_0x1104ff[_0x23f222(0x213)]=0x3]=_0x23f222(0x213),_0x1104ff[_0x1104ff[_0x23f222(0x244)]=0x4]='Delete',_0x1104ff[_0x1104ff[_0x23f222(0x25c)]=0x5]=_0x23f222(0x25c),_0x1104ff[_0x1104ff[_0x23f222(0x21d)]=-0x1]='UNRECOGNIZED',_0x1104ff))(I||{});const g=_0x41ea95=>c[_0x23f222(0x1fb)](new Date(+_0x41ea95))[_0x23f222(0x20d)]('YYYY/MM/DD\x20HH:mm'),$=async(_0x21321e,_0x132f51)=>{const _0x1ee5ad=_0x23f222,_0x12471d=_0x21321e[_0x1ee5ad(0x1fe)](c[_0x1ee5ad(0x20a)]),_0x28dfa8=_0x21321e[_0x1ee5ad(0x1fe)](M[_0x1ee5ad(0x204)]);_0x132f51[_0x1ee5ad(0x236)](_0x217d2f=>{const _0xe7b9ff=_0x1ee5ad;_0x12471d[_0xe7b9ff(0x246)](_0x217d2f)&&_0x132f51[_0xe7b9ff(0x222)](_0x217d2f);}),_0x132f51[_0x1ee5ad(0x233)]&&(await _0x28dfa8[_0x1ee5ad(0x1fe)](_0x1ee5ad(0x225),{'params':{'userIDs':[..._0x132f51]}}))[_0x1ee5ad(0x21e)]['users'][_0x1ee5ad(0x236)](_0x240e1f=>{const _0x3d9557=_0x1ee5ad;_0x240e1f&&_0x12471d[_0x3d9557(0x260)](_0x240e1f);});};var E=Object[_0x23f222(0x25d)],q=Object['getOwnPropertyDescriptor'],A=(_0x4d1f71,_0x457010,_0x432351,_0x4abb65)=>{for(var _0x58d798=_0x4abb65>0x1?void 0x0:_0x4abb65?q(_0x457010,_0x432351):_0x457010,_0x2d4d69=_0x4d1f71['length']-0x1,_0x101ed5;_0x2d4d69>=0x0;_0x2d4d69--)(_0x101ed5=_0x4d1f71[_0x2d4d69])&&(_0x58d798=(_0x4abb65?_0x101ed5(_0x457010,_0x432351,_0x58d798):_0x101ed5(_0x58d798))||_0x58d798);return _0x4abb65&&_0x58d798&&E(_0x457010,_0x432351,_0x58d798),_0x58d798;},_=(_0x16515a,_0x5d62c6)=>(_0x13dc0a,_0x135c17)=>_0x5d62c6(_0x13dc0a,_0x135c17,_0x16515a);let S=class extends c['Disposable']{constructor(_0x57a2ba,_0x4fcbf4,_0x4b069c,_0xc41759){const _0x3c4400=_0x23f222;super(),this[_0x3c4400(0x22a)]=_0x57a2ba,this[_0x3c4400(0x23e)]=_0x4fcbf4,this[_0x3c4400(0x22e)]=_0x4b069c,this[_0x3c4400(0x23d)]=_0xc41759,this[_0x3c4400(0x25b)](),this[_0x3c4400(0x250)]();}[_0x23f222(0x250)](){const _0x34cfc4=_0x23f222;this['disposeWithMe'](this[_0x34cfc4(0x23e)][_0x34cfc4(0x238)]['pipe'](U[_0x34cfc4(0x257)](0x10))['subscribe'](_0x55c9c9=>{const _0x9f5119=_0x34cfc4,_0x1c01e1=new Set();_0x55c9c9[_0x9f5119(0x236)](_0xee1f81=>{const _0x2c9c76=_0x9f5119;switch(_0xee1f81[_0x2c9c76(0x1f9)]){case'add':{const _0xb41739=_0xee1f81[_0x2c9c76(0x223)][_0x2c9c76(0x235)];_0x1c01e1[_0x2c9c76(0x203)](_0xb41739);break;}}}),$(this[_0x9f5119(0x23d)],_0x1c01e1);}));}[_0x23f222(0x25b)](){const _0x3ae9cc=_0x23f222;this['disposeWithMe'](this[_0x3ae9cc(0x22a)][_0x3ae9cc(0x238)][_0x3ae9cc(0x211)](async _0x1c1559=>{const _0x2ee455=_0x3ae9cc;var _0x389901,_0x565ebe,_0x13d573,_0x44662a;const _0x4faf65=(_0x389901=this[_0x2ee455(0x23e)][_0x2ee455(0x242)](_0x1c1559['unitId'])['find'](_0x3c261a=>_0x3c261a['threadId']===_0x1c1559[_0x2ee455(0x20f)]))==null?void 0x0:_0x389901[_0x2ee455(0x21f)];if(!_0x4faf65)return;const {unitId:_0x20ed56,subUnitId:_0x2e91fa}=_0x4faf65;switch(_0x1c1559[_0x2ee455(0x249)]&&this[_0x2ee455(0x22e)]['addUser'](_0x1c1559[_0x2ee455(0x249)]),_0x1c1559[_0x2ee455(0x1f9)]){case I['Add']:break;case I[_0x2ee455(0x22c)]:{this[_0x2ee455(0x23e)][_0x2ee455(0x253)](_0x20ed56,_0x2e91fa,{'unitId':_0x20ed56,'subUnitId':_0x2e91fa,'ref':'','id':_0x1c1559['replyId'],'dT':g(+_0x1c1559[_0x2ee455(0x201)]),'threadId':_0x1c1559[_0x2ee455(0x20f)],'personId':(_0x13d573=(_0x565ebe=_0x1c1559[_0x2ee455(0x249)])==null?void 0x0:_0x565ebe[_0x2ee455(0x21b)])!=null?_0x13d573:_0x1c1559[_0x2ee455(0x200)],'text':JSON['parse'](_0x1c1559[_0x2ee455(0x20b)]),'parentId':_0x4faf65['id']});break;}case I[_0x2ee455(0x244)]:{const _0x279914=this['_threadCommentModel'][_0x2ee455(0x23a)](_0x20ed56,_0x2e91fa,_0x1c1559['replyId']);_0x279914&&_0x279914['parentId']&&this[_0x2ee455(0x23e)]['deleteComment'](_0x20ed56,_0x2e91fa,_0x1c1559['replyId']);break;}case I[_0x2ee455(0x213)]:{this[_0x2ee455(0x23e)][_0x2ee455(0x255)](_0x20ed56,_0x2e91fa,{'commentId':_0x1c1559[_0x2ee455(0x265)],'text':JSON[_0x2ee455(0x259)](_0x1c1559['content'])});break;}case I[_0x2ee455(0x25c)]:{const _0x390a76=(_0x44662a=this[_0x2ee455(0x23e)][_0x2ee455(0x242)](_0x1c1559['unitId'])['find'](_0x42ad21=>_0x42ad21[_0x2ee455(0x20f)]===_0x1c1559[_0x2ee455(0x20f)]))==null?void 0x0:_0x44662a['root'];_0x390a76&&this[_0x2ee455(0x23e)][_0x2ee455(0x207)](_0x20ed56,_0x2e91fa,_0x390a76['id'],_0x1c1559['solved']===v['Solved']);break;}}}));}};S=A([_(0x0,c[_0x23f222(0x221)](C[_0x23f222(0x22b)])),_(0x1,c['Inject'](P[_0x23f222(0x256)])),_(0x2,c[_0x23f222(0x221)](c[_0x23f222(0x20a)])),_(0x3,c[_0x23f222(0x221)](c[_0x23f222(0x209)]))],S);function _0x3963(){const _0x529508=['bufferTime','IConfigService','parse','map','_init','Solve','defineProperty','requireSession','CollaborationSessionService','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','OpenOrReOpen','1872801MgiTPq','replyId','Unknown','_initDataSource','rangeId','replies','values','error','length','UniverThreadCommentDataSourcePlugin','stringify','@univerjs/core','50393hJFxih','@univerjs/network','IThreadCommentDataSourceService','filter','type','_httpService','dayjs','getCurrentUser','1689233xYhJvK','get','DependentOn','userId','createTimestamp','ref','add','HTTPService','Plugin','/delete','resolveComment','Add','Injector','UserManagerService','content','2688076tpDnso','format','/edit','threadId','/universer-api/comment/unit/','subscribe','@univerjs-pro/license','Edit','code','7528446JwCRmM','getOwnPropertyDescriptor','toStringTag','UniverInstanceType','resolved','rangeType','userID','1720LyMGVm','UNRECOGNIZED','body','root','customRanges','Inject','delete','payload','listComments','/universer-api/user/list','post','getMemberID','CustomRangeType','users','_commentService','CommentService','Reply','_config','_userService','solved','/solved','Solved','@univerjs-pro/collaboration-client','size','@univerjs/thread-comment-ui','personId','forEach','UniverLicensePlugin','commentUpdate$','Disposable','getComment','reply','saveCommentToSnapshot','_injector','_threadCommentModel','onStarting','symbol','Module','getUnit','comments','Delete','slice','getUser','@univerjs/thread-comment','comment','user','2348364tZbAAE','_threadCommentDataSource','_sessionService','8119590ainFCB','YYYY/MM/DD\x20HH:mm','deleteComment','_initUserSync','_configService','pluginName','addComment','rxjs','updateComment','ThreadCommentModel'];_0x3963=function(){return _0x529508;};return _0x3963();}const x='thread-comment-data-source.config',D={};function _0x4cad(_0xa095c7,_0x1fffd3){const _0x396398=_0x3963();return _0x4cad=function(_0x4cad9a,_0x1f2de5){_0x4cad9a=_0x4cad9a-0x1f0;let _0xa597e=_0x396398[_0x4cad9a];return _0xa597e;},_0x4cad(_0xa095c7,_0x1fffd3);}var Y=Object[_0x23f222(0x25d)],G=Object[_0x23f222(0x216)],H=(_0x2cd30a,_0x8a917d,_0x55d329,_0x407a9f)=>{const _0x3c709b=_0x23f222;for(var _0x59dec7=_0x407a9f>0x1?void 0x0:_0x407a9f?G(_0x8a917d,_0x55d329):_0x8a917d,_0x777cbe=_0x2cd30a[_0x3c709b(0x1f1)]-0x1,_0x561546;_0x777cbe>=0x0;_0x777cbe--)(_0x561546=_0x2cd30a[_0x777cbe])&&(_0x59dec7=(_0x407a9f?_0x561546(_0x8a917d,_0x55d329,_0x59dec7):_0x561546(_0x59dec7))||_0x59dec7);return _0x407a9f&&_0x59dec7&&Y(_0x8a917d,_0x55d329,_0x59dec7),_0x59dec7;},p=(_0x2ba737,_0x46fd5c)=>(_0x586ccf,_0x482533)=>_0x46fd5c(_0x586ccf,_0x482533,_0x2ba737);function J(_0x1b53bd,_0x209449){const _0x3350bb=_0x23f222,_0x3e7499=_0x1b53bd[_0x3350bb(0x269)][0x0];return{..._0x209449,'id':_0x3e7499[_0x3350bb(0x265)],'resolved':_0x1b53bd['solved']===0x1,'dT':g(_0x3e7499[_0x3350bb(0x201)]),'personId':_0x3e7499[_0x3350bb(0x200)],'threadId':_0x3e7499[_0x3350bb(0x20f)]};}function F(_0x1f0b62,_0x580288,_0x35fd7c){const _0x5aeb6b=_0x23f222;var _0x4c1568,_0x51af6e;if(((_0x51af6e=(_0x4c1568=_0x1f0b62==null?void 0x0:_0x1f0b62[_0x5aeb6b(0x269)])==null?void 0x0:_0x4c1568[_0x5aeb6b(0x1f1)])!=null?_0x51af6e:0x0)>0x0){const _0x44558d=(_0x5736ba,_0x50c718)=>({'id':_0x5736ba[_0x5aeb6b(0x265)],'threadId':_0x5736ba['threadId'],'dT':g(_0x5736ba['createTimestamp']),'personId':_0x5736ba[_0x5aeb6b(0x200)],'resolved':_0x1f0b62[_0x5aeb6b(0x22f)]===v['Solved'],'unitId':_0x580288,'subUnitId':_0x35fd7c,'text':JSON[_0x5aeb6b(0x259)](_0x5736ba[_0x5aeb6b(0x20b)]),'parentId':_0x50c718}),_0x4818dc=_0x44558d(_0x1f0b62[_0x5aeb6b(0x269)][0x0]);return{..._0x4818dc,'children':_0x1f0b62[_0x5aeb6b(0x269)][_0x5aeb6b(0x245)](0x1)['map'](_0x128fe5=>_0x44558d(_0x128fe5,_0x4818dc['id']))};}return null;}let f=class{constructor(_0x2e470e,_0x29b96e,_0x4f7669,_0x2fdc2b){const _0x5e5ccb=_0x23f222;this['_httpService']=_0x2e470e,this[_0x5e5ccb(0x22e)]=_0x29b96e,this[_0x5e5ccb(0x24c)]=_0x4f7669,this[_0x5e5ccb(0x23d)]=_0x2fdc2b;}async[_0x23f222(0x253)](_0x291788){const _0xe441cb=_0x23f222;var _0x89a92a,_0x4eb2df;const {parentId:_0x4f69fc,unitId:_0x434b86,text:_0x3334b2,threadId:_0x548048}=_0x291788,_0x409d32=(_0x4eb2df=(_0x89a92a=_0x3334b2[_0xe441cb(0x220)])==null?void 0x0:_0x89a92a[_0xe441cb(0x1f8)](_0x267df8=>_0x267df8[_0xe441cb(0x21a)]===c[_0xe441cb(0x228)]['COMMENT'])[_0xe441cb(0x25a)](_0x13acdb=>_0x13acdb['rangeId']))!=null?_0x4eb2df:[],_0x592bb7=JSON[_0xe441cb(0x1f3)](_0x3334b2),_0x39c818=(await this['_sessionService'][_0xe441cb(0x25e)](_0x434b86))[_0xe441cb(0x227)]();if(_0x4f69fc){const _0x62c99e={'memberId':_0x39c818,'unitId':_0x434b86,'content':_0x592bb7,'mention':_0x409d32,'threadId':_0x548048},_0x33ad6b=(await this['_httpService'][_0xe441cb(0x226)](_0xe441cb(0x210)+_0x434b86+'/reply',{'body':_0x62c99e}))['body'][_0xe441cb(0x23b)];return{..._0x291788,'id':_0x33ad6b[_0xe441cb(0x265)],'dT':c[_0xe441cb(0x1fb)](+_0x33ad6b[_0xe441cb(0x201)])[_0xe441cb(0x20d)](_0xe441cb(0x24e)),'personId':_0x33ad6b[_0xe441cb(0x200)]};}else{const _0x4d491b={'memberId':_0x39c818,'unitId':_0x434b86,'content':_0x592bb7,'mention':_0x409d32},_0x25b1d6=await this['_httpService'][_0xe441cb(0x226)]('/universer-api/comment/unit/'+_0x434b86+'/add',{'body':_0x4d491b});return J(_0x25b1d6['body'][_0xe441cb(0x248)],_0x291788);}}async[_0x23f222(0x255)](_0x5daa8e){const _0x357736=_0x23f222;var _0x5de41f,_0x4273a5;const {text:_0xde9737,unitId:_0x3f971c}=_0x5daa8e,_0x1ad2b9=(_0x4273a5=(_0x5de41f=_0xde9737[_0x357736(0x220)])==null?void 0x0:_0x5de41f['filter'](_0x3f269c=>_0x3f269c[_0x357736(0x21a)]===c[_0x357736(0x228)]['COMMENT'])[_0x357736(0x25a)](_0x59163b=>_0x59163b[_0x357736(0x268)]))!=null?_0x4273a5:[],_0x2c63b1=JSON[_0x357736(0x1f3)](_0xde9737),_0x117a04=_0x5daa8e[_0x357736(0x20f)],_0x5827db=_0x5daa8e['id'],_0x3cb843={'memberId':(await this[_0x357736(0x24c)][_0x357736(0x25e)](_0x3f971c))[_0x357736(0x227)](),'unitId':_0x3f971c,'threadId':_0x117a04,'mention':_0x1ad2b9,'content':_0x2c63b1,'replyId':_0x5827db},_0x406876=await this[_0x357736(0x1fa)]['post']('/universer-api/comment/unit/'+_0x3f971c+_0x357736(0x20e),{'body':_0x3cb843});return!_0x406876[_0x357736(0x21e)][_0x357736(0x1f0)]||_0x406876[_0x357736(0x21e)][_0x357736(0x1f0)]['code']===0x1;}async['resolveComment'](_0x1850c2){const _0x5c1300=_0x23f222,{unitId:_0x30ddcc}=_0x1850c2,_0xa3325c=_0x1850c2['threadId'],_0x5502d0={'memberId':this[_0x5c1300(0x22e)][_0x5c1300(0x1fc)]()['userID'],'unitId':_0x30ddcc,'threadId':_0xa3325c,'solved':_0x1850c2[_0x5c1300(0x219)]?v[_0x5c1300(0x231)]:v[_0x5c1300(0x263)]},_0x3932a2=await this[_0x5c1300(0x1fa)][_0x5c1300(0x226)](_0x5c1300(0x210)+_0x30ddcc+_0x5c1300(0x230),{'body':_0x5502d0});return!_0x3932a2[_0x5c1300(0x21e)]['error']||_0x3932a2['body'][_0x5c1300(0x1f0)][_0x5c1300(0x214)]===0x1;}async[_0x23f222(0x24f)](_0x46b2f6,_0x39bdac,_0x2ff7ba,_0x4485ed){const _0x52c123=_0x23f222,_0x5a34e3={'memberId':(await this[_0x52c123(0x24c)]['requireSession'](_0x46b2f6))['getMemberID'](),'threadId':_0x2ff7ba,'replyId':_0x4485ed,'unitId':_0x46b2f6},_0x10b26a=await this[_0x52c123(0x1fa)][_0x52c123(0x226)](_0x52c123(0x210)+_0x46b2f6+_0x52c123(0x206),{'body':_0x5a34e3});return!_0x10b26a['body'][_0x52c123(0x1f0)]||_0x10b26a['body'][_0x52c123(0x1f0)][_0x52c123(0x214)]===0x1;}async[_0x23f222(0x224)](_0x2c18b0,_0x47e956,_0x51c00f){const _0x5dd094=_0x23f222,_0x16578c={'unitId':_0x2c18b0,'threadId':_0x51c00f},_0x156eda=await this['_httpService']['post'](_0x5dd094(0x210)+_0x2c18b0+'/list',{'body':_0x16578c}),_0x25967b=_0x51c00f[_0x5dd094(0x25a)](_0x4765b5=>F(_0x156eda[_0x5dd094(0x21e)][_0x5dd094(0x243)][_0x4765b5],_0x2c18b0,_0x47e956))['filter'](Boolean);return Object[_0x5dd094(0x26a)](_0x156eda[_0x5dd094(0x21e)][_0x5dd094(0x229)])[_0x5dd094(0x236)](_0x4a470e=>{const _0x1f26f2=_0x5dd094;this['_userService'][_0x1f26f2(0x260)](_0x4a470e);}),_0x25967b;}[_0x23f222(0x23c)](_0x17e88b){const _0x336d31=_0x23f222;return{'id':_0x17e88b['id'],'threadId':_0x17e88b[_0x336d31(0x20f)],'ref':_0x17e88b[_0x336d31(0x202)]};}};f=H([p(0x0,c[_0x23f222(0x221)](M['HTTPService'])),p(0x1,c[_0x23f222(0x221)](c[_0x23f222(0x20a)])),p(0x2,c['Inject'](C[_0x23f222(0x25f)])),p(0x3,c[_0x23f222(0x221)](c[_0x23f222(0x209)]))],f);var L=Object[_0x23f222(0x25d)],Z=Object[_0x23f222(0x216)],W=(_0x262176,_0x86096f,_0x59b3ba,_0x1d61cb)=>{const _0x1aac28=_0x23f222;for(var _0x5391d9=_0x1d61cb>0x1?void 0x0:_0x1d61cb?Z(_0x86096f,_0x59b3ba):_0x86096f,_0x1a9d36=_0x262176[_0x1aac28(0x1f1)]-0x1,_0x5ac0c9;_0x1a9d36>=0x0;_0x1a9d36--)(_0x5ac0c9=_0x262176[_0x1a9d36])&&(_0x5391d9=(_0x1d61cb?_0x5ac0c9(_0x86096f,_0x59b3ba,_0x5391d9):_0x5ac0c9(_0x5391d9))||_0x5391d9);return _0x1d61cb&&_0x5391d9&&L(_0x86096f,_0x59b3ba,_0x5391d9),_0x5391d9;},O=(_0x1f7cb1,_0x91601)=>(_0x362750,_0x5dd07a)=>_0x91601(_0x362750,_0x5dd07a,_0x1f7cb1);let b=class extends c[_0x23f222(0x239)]{constructor(_0x48cba0,_0x241c41){const _0x1e8da2=_0x23f222;super(),this['_threadCommentDataSourceService']=_0x48cba0,this[_0x1e8da2(0x24b)]=_0x241c41,this[_0x1e8da2(0x267)]();}[_0x23f222(0x267)](){const _0x575531=_0x23f222;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x575531(0x262)]['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P[_0x23f222(0x1f7)]),O(0x1,c[_0x23f222(0x221)](f))],b);var j=Object[_0x23f222(0x25d)],B=Object['getOwnPropertyDescriptor'],K=(_0x3fb40d,_0x5cc5f2,_0x1be52b)=>_0x5cc5f2 in _0x3fb40d?j(_0x3fb40d,_0x5cc5f2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be52b}):_0x3fb40d[_0x5cc5f2]=_0x1be52b,V=(_0x26f67c,_0x258045,_0x5bbefd,_0x4d9542)=>{const _0x22d2d6=_0x23f222;for(var _0x426f37=_0x4d9542>0x1?void 0x0:_0x4d9542?B(_0x258045,_0x5bbefd):_0x258045,_0x12e2fa=_0x26f67c[_0x22d2d6(0x1f1)]-0x1,_0x581590;_0x12e2fa>=0x0;_0x12e2fa--)(_0x581590=_0x26f67c[_0x12e2fa])&&(_0x426f37=(_0x4d9542?_0x581590(_0x258045,_0x5bbefd,_0x426f37):_0x581590(_0x426f37))||_0x426f37);return _0x4d9542&&_0x426f37&&j(_0x258045,_0x5bbefd,_0x426f37),_0x426f37;},y=(_0x137fab,_0x546017)=>(_0x4d3d93,_0x37afb1)=>_0x546017(_0x4d3d93,_0x37afb1,_0x137fab),N=(_0x2c85e1,_0x1227a1,_0x35d17d)=>K(_0x2c85e1,typeof _0x1227a1!=_0x23f222(0x240)?_0x1227a1+'':_0x1227a1,_0x35d17d);exports[_0x23f222(0x1f2)]=class extends c[_0x23f222(0x205)]{constructor(_0x565d39=D,_0x33b868,_0x19ac59){const _0x39beb2=_0x23f222;super(),this[_0x39beb2(0x22d)]=_0x565d39,this[_0x39beb2(0x23d)]=_0x33b868,this[_0x39beb2(0x251)]=_0x19ac59;const {..._0x2034c5}=c['merge']({},D,this[_0x39beb2(0x22d)]);this['_configService']['setConfig'](x,_0x2034c5);}[_0x23f222(0x23f)](){const _0x2100fe=_0x23f222;[[f],[b],[S]][_0x2100fe(0x236)](_0x4ee298=>{const _0x5e4302=_0x2100fe;this['_injector'][_0x5e4302(0x203)](_0x4ee298);});}['onReady'](){const _0x189727=_0x23f222;this[_0x189727(0x23d)][_0x189727(0x1fe)](b),this[_0x189727(0x23d)][_0x189727(0x1fe)](S);}},N(exports[_0x23f222(0x1f2)],_0x23f222(0x252),R),N(exports[_0x23f222(0x1f2)],_0x23f222(0x1f9),c[_0x23f222(0x218)]['UNIVER_UNKNOWN']),exports[_0x23f222(0x1f2)]=V([c[_0x23f222(0x1ff)](w['UniverThreadCommentUIPlugin'],C['UniverCollaborationClientPlugin'],T[_0x23f222(0x237)]),y(0x1,c[_0x23f222(0x221)](c['Injector'])),y(0x2,c[_0x23f222(0x258)])],exports[_0x23f222(0x1f2)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x536eb0=_0x3d0f;(function(_0x59b8fd,_0x2ae7bc){const _0x51e371=_0x3d0f,_0x2654a8=_0x59b8fd();while(!![]){try{const _0x3e9b25=-parseInt(_0x51e371(0x1c4))/0x1+-parseInt(_0x51e371(0x1a1))/0x2*(-parseInt(_0x51e371(0x173))/0x3)+-parseInt(_0x51e371(0x188))/0x4+-parseInt(_0x51e371(0x166))/0x5+parseInt(_0x51e371(0x1ba))/0x6*(parseInt(_0x51e371(0x1b8))/0x7)+-parseInt(_0x51e371(0x16c))/0x8*(-parseInt(_0x51e371(0x190))/0x9)+parseInt(_0x51e371(0x19a))/0xa;if(_0x3e9b25===_0x2ae7bc)break;else _0x2654a8['push'](_0x2654a8['shift']());}catch(_0x527316){_0x2654a8['push'](_0x2654a8['shift']());}}}(_0x1ff6,0x26f83));var __defProp=Object[_0x536eb0(0x164)],__name=(_0x232299,_0x50f931)=>__defProp(_0x232299,_0x536eb0(0x1bd),{'value':_0x50f931,'configurable':!0x0});import{CommentService,CollaborationSessionService,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin}from'@univerjs-pro/license';import{dayjs,UserManagerService,Inject,Injector,Disposable,CustomRangeType,UniverInstanceType,DependentOn,Plugin,merge,IConfigService}from'@univerjs/core';import{UniverThreadCommentUIPlugin}from'@univerjs/thread-comment-ui';import{ThreadCommentModel,IThreadCommentDataSourceService}from'@univerjs/thread-comment';import{bufferTime}from'rxjs';import{HTTPService}from'@univerjs/network';const PLUGIN_NAME=_0x536eb0(0x1b6);var CommentUpdate_Status=(_0x372a3d=>(_0x372a3d[_0x372a3d[_0x536eb0(0x1b1)]=0x0]='OpenOrReOpen',_0x372a3d[_0x372a3d[_0x536eb0(0x178)]=0x1]=_0x536eb0(0x178),_0x372a3d[_0x372a3d[_0x536eb0(0x159)]=-0x1]=_0x536eb0(0x159),_0x372a3d))(CommentUpdate_Status||{}),CommentUpdate_EventType=(_0x3e50c7=>(_0x3e50c7[_0x3e50c7[_0x536eb0(0x182)]=0x0]='Unknown',_0x3e50c7[_0x3e50c7[_0x536eb0(0x15b)]=0x1]=_0x536eb0(0x15b),_0x3e50c7[_0x3e50c7[_0x536eb0(0x1a0)]=0x2]=_0x536eb0(0x1a0),_0x3e50c7[_0x3e50c7[_0x536eb0(0x18b)]=0x3]=_0x536eb0(0x18b),_0x3e50c7[_0x3e50c7[_0x536eb0(0x1c2)]=0x4]=_0x536eb0(0x1c2),_0x3e50c7[_0x3e50c7[_0x536eb0(0x1ab)]=0x5]='Solve',_0x3e50c7[_0x3e50c7['UNRECOGNIZED']=-0x1]=_0x536eb0(0x159),_0x3e50c7))(CommentUpdate_EventType||{});const stringifyDT=__name(_0x41aee3=>dayjs(new Date(+_0x41aee3))[_0x536eb0(0x15a)](_0x536eb0(0x180)),'stringifyDT'),syncUsers=__name(async(_0xda50d0,_0x3af1e3)=>{const _0x483131=_0x536eb0,_0x5c5682=_0xda50d0[_0x483131(0x1b4)](UserManagerService),_0xd8f599=_0xda50d0[_0x483131(0x1b4)](HTTPService);_0x3af1e3['forEach'](_0x5cc640=>{const _0x5dbc77=_0x483131;_0x5c5682[_0x5dbc77(0x198)](_0x5cc640)&&_0x3af1e3[_0x5dbc77(0x15c)](_0x5cc640);}),_0x3af1e3['size']&&(await _0xd8f599[_0x483131(0x1b4)](_0x483131(0x18d),{'params':{'userIDs':[..._0x3af1e3]}}))[_0x483131(0x1a9)]['users']['forEach'](_0x36716c=>{const _0x2c1b2c=_0x483131;_0x36716c&&_0x5c5682[_0x2c1b2c(0x185)](_0x36716c);});},'syncUsers');var __defProp$3=Object[_0x536eb0(0x164)],__getOwnPropDesc$3=Object[_0x536eb0(0x1bf)],__decorateClass$3=__name((_0x39a220,_0x6808ba,_0x3b3e02,_0xa978fb)=>{const _0x3cff08=_0x536eb0;for(var _0x1a2705=_0xa978fb>0x1?void 0x0:_0xa978fb?__getOwnPropDesc$3(_0x6808ba,_0x3b3e02):_0x6808ba,_0x3a8124=_0x39a220[_0x3cff08(0x179)]-0x1,_0x273f0c;_0x3a8124>=0x0;_0x3a8124--)(_0x273f0c=_0x39a220[_0x3a8124])&&(_0x1a2705=(_0xa978fb?_0x273f0c(_0x6808ba,_0x3b3e02,_0x1a2705):_0x273f0c(_0x1a2705))||_0x1a2705);return _0xa978fb&&_0x1a2705&&__defProp$3(_0x6808ba,_0x3b3e02,_0x1a2705),_0x1a2705;},'__decorateClass$3'),__decorateParam$3=__name((_0x147762,_0x450447)=>(_0x209a16,_0x559a40)=>_0x450447(_0x209a16,_0x559a40,_0x147762),'__decorateParam$3'),_a;let ThreadCommentCollaUpdateController=(_a=class extends Disposable{constructor(_0x2fbceb,_0x529564,_0x1ddcd9,_0x2addfd){const _0x5051aa=_0x536eb0;super(),this['_commentService']=_0x2fbceb,this['_threadCommentModel']=_0x529564,this[_0x5051aa(0x1b2)]=_0x1ddcd9,this[_0x5051aa(0x195)]=_0x2addfd,this[_0x5051aa(0x160)](),this['_initUserSync']();}['_initUserSync'](){const _0x365e65=_0x536eb0;this[_0x365e65(0x176)](this['_threadCommentModel'][_0x365e65(0x1b9)][_0x365e65(0x16a)](bufferTime(0x10))['subscribe'](_0x2730b1=>{const _0x338b1a=_0x365e65,_0x115668=new Set();_0x2730b1[_0x338b1a(0x157)](_0x1cb2f0=>{const _0x48bd1b=_0x338b1a;switch(_0x1cb2f0[_0x48bd1b(0x1a7)]){case _0x48bd1b(0x156):{const _0x53d5c9=_0x1cb2f0[_0x48bd1b(0x17f)][_0x48bd1b(0x183)];_0x115668[_0x48bd1b(0x156)](_0x53d5c9);break;}}}),syncUsers(this[_0x338b1a(0x195)],_0x115668);}));}['_init'](){const _0x39f12e=_0x536eb0;this[_0x39f12e(0x176)](this[_0x39f12e(0x1bb)][_0x39f12e(0x1b9)][_0x39f12e(0x15d)](async _0x4fb576=>{const _0x2cb6f9=_0x39f12e;var _0x364733,_0x3cb39b,_0x567abe,_0x4884e3;const _0xc4165e=(_0x364733=this[_0x2cb6f9(0x1c6)][_0x2cb6f9(0x16d)](_0x4fb576[_0x2cb6f9(0x18a)])[_0x2cb6f9(0x196)](_0x383970=>_0x383970[_0x2cb6f9(0x1a4)]===_0x4fb576[_0x2cb6f9(0x1a4)]))==null?void 0x0:_0x364733[_0x2cb6f9(0x1b3)];if(!_0xc4165e)return;const {unitId:_0x566c74,subUnitId:_0x35732e}=_0xc4165e;switch(_0x4fb576[_0x2cb6f9(0x1c8)]&&this[_0x2cb6f9(0x1b2)][_0x2cb6f9(0x185)](_0x4fb576['user']),_0x4fb576[_0x2cb6f9(0x1a7)]){case CommentUpdate_EventType[_0x2cb6f9(0x15b)]:break;case CommentUpdate_EventType[_0x2cb6f9(0x1a0)]:{this[_0x2cb6f9(0x1c6)][_0x2cb6f9(0x154)](_0x566c74,_0x35732e,{'unitId':_0x566c74,'subUnitId':_0x35732e,'ref':'','id':_0x4fb576[_0x2cb6f9(0x1aa)],'dT':stringifyDT(+_0x4fb576[_0x2cb6f9(0x181)]),'threadId':_0x4fb576[_0x2cb6f9(0x1a4)],'personId':(_0x567abe=(_0x3cb39b=_0x4fb576[_0x2cb6f9(0x1c8)])==null?void 0x0:_0x3cb39b['userID'])!=null?_0x567abe:_0x4fb576['userId'],'text':JSON[_0x2cb6f9(0x18c)](_0x4fb576[_0x2cb6f9(0x1ae)]),'parentId':_0xc4165e['id']});break;}case CommentUpdate_EventType[_0x2cb6f9(0x1c2)]:{const _0x17e38a=this[_0x2cb6f9(0x1c6)][_0x2cb6f9(0x17e)](_0x566c74,_0x35732e,_0x4fb576[_0x2cb6f9(0x1aa)]);_0x17e38a&&_0x17e38a[_0x2cb6f9(0x19c)]&&this[_0x2cb6f9(0x1c6)][_0x2cb6f9(0x175)](_0x566c74,_0x35732e,_0x4fb576['replyId']);break;}case CommentUpdate_EventType[_0x2cb6f9(0x18b)]:{this['_threadCommentModel'][_0x2cb6f9(0x194)](_0x566c74,_0x35732e,{'commentId':_0x4fb576[_0x2cb6f9(0x1aa)],'text':JSON[_0x2cb6f9(0x18c)](_0x4fb576[_0x2cb6f9(0x1ae)])});break;}case CommentUpdate_EventType[_0x2cb6f9(0x1ab)]:{const _0x411f1c=(_0x4884e3=this[_0x2cb6f9(0x1c6)][_0x2cb6f9(0x16d)](_0x4fb576[_0x2cb6f9(0x18a)])[_0x2cb6f9(0x196)](_0x44d940=>_0x44d940[_0x2cb6f9(0x1a4)]===_0x4fb576[_0x2cb6f9(0x1a4)]))==null?void 0x0:_0x4884e3[_0x2cb6f9(0x1b3)];_0x411f1c&&this['_threadCommentModel'][_0x2cb6f9(0x1b7)](_0x566c74,_0x35732e,_0x411f1c['id'],_0x4fb576[_0x2cb6f9(0x177)]===CommentUpdate_Status[_0x2cb6f9(0x178)]);break;}}}));}},__name(_a,'ThreadCommentCollaUpdateController'),_a);ThreadCommentCollaUpdateController=__decorateClass$3([__decorateParam$3(0x0,Inject(CommentService)),__decorateParam$3(0x1,Inject(ThreadCommentModel)),__decorateParam$3(0x2,Inject(UserManagerService)),__decorateParam$3(0x3,Inject(Injector))],ThreadCommentCollaUpdateController);const THREAD_COMMENT_DATA_SOURCE_PLUGIN_CONFIG_KEY=_0x536eb0(0x1bc),defaultPluginConfig={};var __defProp$2=Object[_0x536eb0(0x164)],__getOwnPropDesc$2=Object['getOwnPropertyDescriptor'],__decorateClass$2=__name((_0x2e77a8,_0x25292e,_0x3e1fab,_0x43fdb5)=>{const _0x4dbb90=_0x536eb0;for(var _0x5a15ab=_0x43fdb5>0x1?void 0x0:_0x43fdb5?__getOwnPropDesc$2(_0x25292e,_0x3e1fab):_0x25292e,_0x358149=_0x2e77a8[_0x4dbb90(0x179)]-0x1,_0x335233;_0x358149>=0x0;_0x358149--)(_0x335233=_0x2e77a8[_0x358149])&&(_0x5a15ab=(_0x43fdb5?_0x335233(_0x25292e,_0x3e1fab,_0x5a15ab):_0x335233(_0x5a15ab))||_0x5a15ab);return _0x43fdb5&&_0x5a15ab&&__defProp$2(_0x25292e,_0x3e1fab,_0x5a15ab),_0x5a15ab;},_0x536eb0(0x17a)),__decorateParam$2=__name((_0x425e0f,_0x4bb7d3)=>(_0x2518ac,_0xf641b0)=>_0x4bb7d3(_0x2518ac,_0xf641b0,_0x425e0f),_0x536eb0(0x165));function parseServiceComment(_0x352441,_0x525069){const _0x239b45=_0x536eb0,_0x1682cf=_0x352441[_0x239b45(0x167)][0x0];return{..._0x525069,'id':_0x1682cf['replyId'],'resolved':_0x352441[_0x239b45(0x177)]===0x1,'dT':stringifyDT(_0x1682cf[_0x239b45(0x181)]),'personId':_0x1682cf[_0x239b45(0x158)],'threadId':_0x1682cf['threadId']};}__name(parseServiceComment,_0x536eb0(0x15e));function _0x3d0f(_0x4dcbf9,_0x355984){const _0x1ff626=_0x1ff6();return _0x3d0f=function(_0x3d0fa0,_0x3da16a){_0x3d0fa0=_0x3d0fa0-0x152;let _0x42f67b=_0x1ff626[_0x3d0fa0];return _0x42f67b;},_0x3d0f(_0x4dcbf9,_0x355984);}function getComments(_0x45bbd6,_0x4d6ebb,_0x381926){const _0x4cf18b=_0x536eb0;var _0x1b1863,_0x51a7a8;if(((_0x51a7a8=(_0x1b1863=_0x45bbd6==null?void 0x0:_0x45bbd6[_0x4cf18b(0x167)])==null?void 0x0:_0x1b1863['length'])!=null?_0x51a7a8:0x0)>0x0){const _0x3616a5=__name((_0x4a83d3,_0x589735)=>({'id':_0x4a83d3[_0x4cf18b(0x1aa)],'threadId':_0x4a83d3[_0x4cf18b(0x1a4)],'dT':stringifyDT(_0x4a83d3['createTimestamp']),'personId':_0x4a83d3[_0x4cf18b(0x158)],'resolved':_0x45bbd6[_0x4cf18b(0x177)]===CommentUpdate_Status[_0x4cf18b(0x178)],'unitId':_0x4d6ebb,'subUnitId':_0x381926,'text':JSON['parse'](_0x4a83d3[_0x4cf18b(0x1ae)]),'parentId':_0x589735}),'mapReply'),_0x146422=_0x3616a5(_0x45bbd6[_0x4cf18b(0x167)][0x0]);return{..._0x146422,'children':_0x45bbd6[_0x4cf18b(0x167)][_0x4cf18b(0x1af)](0x1)[_0x4cf18b(0x186)](_0x2ddc62=>_0x3616a5(_0x2ddc62,_0x146422['id']))};}return null;}function _0x1ff6(){const _0xd9f7ce=['_sessionService','283815uMiLqo','/edit','_threadCommentModel','rangeType','user','getMemberID','ThreadCommentServerDataSource','addComment','onReady','add','forEach','userId','UNRECOGNIZED','format','Add','delete','subscribe','parseServiceComment','rangeId','_init','dataSource','userID','code','defineProperty','__decorateParam$2','1227225ZnowAf','replies','/solved','_config','pipe','_httpService','39448GKknwI','getUnit','listComments','_threadCommentDataSourceService','error','_threadCommentDataSource','__decorateClass','795714pvoGUx','/delete','deleteComment','disposeWithMe','solved','Solved','length','__decorateClass$2','symbol','ref','__decorateClass$1','getComment','payload','YYYY/MM/DD\x20HH:mm','createTimestamp','Unknown','personId','getComments','addUser','map','/universer-api/comment/unit/','82172shLENu','getCurrentUser','unitId','Edit','parse','/universer-api/user/list','post','setConfig','468ZaRDcE','stringify','/reply','pluginName','updateComment','_injector','find','_configService','getUser','comment','21070MATdTU','requireSession','parentId','filter','COMMENT','customRanges','Reply','2CVHnDa','comments','UNIVER_UNKNOWN','threadId','_initDataSource','resolved','type','__decorateParam','body','replyId','Solve','__publicField','__decorateParam$1','content','slice','/list','OpenOrReOpen','_userService','root','get','ThreadCommentDataSourceController','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolveComment','7wwgenM','commentUpdate$','1113990pFQUkl','_commentService','thread-comment-data-source.config','name','saveCommentToSnapshot','getOwnPropertyDescriptor','/add','users','Delete'];_0x1ff6=function(){return _0xd9f7ce;};return _0x1ff6();}__name(getComments,_0x536eb0(0x184));var _a2;let ThreadCommentServerDataSource=(_a2=class{constructor(_0x4b378f,_0x299659,_0x358cda,_0x13d3dd){const _0x16c082=_0x536eb0;this[_0x16c082(0x16b)]=_0x4b378f,this[_0x16c082(0x1b2)]=_0x299659,this[_0x16c082(0x1c3)]=_0x358cda,this[_0x16c082(0x195)]=_0x13d3dd;}async['addComment'](_0x4af2f1){const _0x310f42=_0x536eb0;var _0xd4802c,_0x2d3405;const {parentId:_0x1e442d,unitId:_0x573dec,text:_0x11ed53,threadId:_0x21fe82}=_0x4af2f1,_0x1b865f=(_0x2d3405=(_0xd4802c=_0x11ed53[_0x310f42(0x19f)])==null?void 0x0:_0xd4802c[_0x310f42(0x19d)](_0x3bc7f2=>_0x3bc7f2[_0x310f42(0x1c7)]===CustomRangeType['COMMENT'])[_0x310f42(0x186)](_0xd7f13=>_0xd7f13[_0x310f42(0x15f)]))!=null?_0x2d3405:[],_0x37b604=JSON[_0x310f42(0x191)](_0x11ed53),_0x4a3f8e=(await this['_sessionService'][_0x310f42(0x19b)](_0x573dec))[_0x310f42(0x152)]();if(_0x1e442d){const _0x3160ef={'memberId':_0x4a3f8e,'unitId':_0x573dec,'content':_0x37b604,'mention':_0x1b865f,'threadId':_0x21fe82},_0x18bfe5=(await this[_0x310f42(0x16b)][_0x310f42(0x18e)](_0x310f42(0x187)+_0x573dec+_0x310f42(0x192),{'body':_0x3160ef}))[_0x310f42(0x1a9)]['reply'];return{..._0x4af2f1,'id':_0x18bfe5[_0x310f42(0x1aa)],'dT':dayjs(+_0x18bfe5[_0x310f42(0x181)])[_0x310f42(0x15a)](_0x310f42(0x180)),'personId':_0x18bfe5[_0x310f42(0x158)]};}else{const _0x154bab={'memberId':_0x4a3f8e,'unitId':_0x573dec,'content':_0x37b604,'mention':_0x1b865f},_0x2f49c7=await this[_0x310f42(0x16b)]['post']('/universer-api/comment/unit/'+_0x573dec+_0x310f42(0x1c0),{'body':_0x154bab});return parseServiceComment(_0x2f49c7['body'][_0x310f42(0x199)],_0x4af2f1);}}async['updateComment'](_0x18ea87){const _0x80ccc5=_0x536eb0;var _0x3feec0,_0x100287;const {text:_0x12d08a,unitId:_0x49b553}=_0x18ea87,_0x14d611=(_0x100287=(_0x3feec0=_0x12d08a[_0x80ccc5(0x19f)])==null?void 0x0:_0x3feec0[_0x80ccc5(0x19d)](_0x330ae9=>_0x330ae9[_0x80ccc5(0x1c7)]===CustomRangeType[_0x80ccc5(0x19e)])['map'](_0x2022e1=>_0x2022e1[_0x80ccc5(0x15f)]))!=null?_0x100287:[],_0x51fcaf=JSON[_0x80ccc5(0x191)](_0x12d08a),_0x3e68ef=_0x18ea87[_0x80ccc5(0x1a4)],_0x26727a=_0x18ea87['id'],_0x10a6c8={'memberId':(await this[_0x80ccc5(0x1c3)][_0x80ccc5(0x19b)](_0x49b553))['getMemberID'](),'unitId':_0x49b553,'threadId':_0x3e68ef,'mention':_0x14d611,'content':_0x51fcaf,'replyId':_0x26727a},_0x25df79=await this['_httpService'][_0x80ccc5(0x18e)](_0x80ccc5(0x187)+_0x49b553+_0x80ccc5(0x1c5),{'body':_0x10a6c8});return!_0x25df79['body'][_0x80ccc5(0x170)]||_0x25df79['body']['error'][_0x80ccc5(0x163)]===0x1;}async['resolveComment'](_0x28189a){const _0x28111e=_0x536eb0,{unitId:_0x767eac}=_0x28189a,_0x61037c=_0x28189a[_0x28111e(0x1a4)],_0xb95c4a={'memberId':this[_0x28111e(0x1b2)][_0x28111e(0x189)]()[_0x28111e(0x162)],'unitId':_0x767eac,'threadId':_0x61037c,'solved':_0x28189a[_0x28111e(0x1a6)]?CommentUpdate_Status[_0x28111e(0x178)]:CommentUpdate_Status[_0x28111e(0x1b1)]},_0x235f9f=await this[_0x28111e(0x16b)]['post'](_0x28111e(0x187)+_0x767eac+_0x28111e(0x168),{'body':_0xb95c4a});return!_0x235f9f[_0x28111e(0x1a9)][_0x28111e(0x170)]||_0x235f9f['body'][_0x28111e(0x170)]['code']===0x1;}async[_0x536eb0(0x175)](_0x170894,_0x1e6b2e,_0x2fc585,_0x1dc3e1){const _0x14033a=_0x536eb0,_0x59be47={'memberId':(await this[_0x14033a(0x1c3)][_0x14033a(0x19b)](_0x170894))['getMemberID'](),'threadId':_0x2fc585,'replyId':_0x1dc3e1,'unitId':_0x170894},_0x24aa8f=await this[_0x14033a(0x16b)][_0x14033a(0x18e)](_0x14033a(0x187)+_0x170894+_0x14033a(0x174),{'body':_0x59be47});return!_0x24aa8f[_0x14033a(0x1a9)]['error']||_0x24aa8f[_0x14033a(0x1a9)][_0x14033a(0x170)]['code']===0x1;}async[_0x536eb0(0x16e)](_0x48529b,_0x1fc908,_0x38b81e){const _0x4910dd=_0x536eb0,_0x26a30e={'unitId':_0x48529b,'threadId':_0x38b81e},_0x5ca99e=await this[_0x4910dd(0x16b)]['post'](_0x4910dd(0x187)+_0x48529b+_0x4910dd(0x1b0),{'body':_0x26a30e}),_0x4189f8=_0x38b81e[_0x4910dd(0x186)](_0x161f7b=>getComments(_0x5ca99e[_0x4910dd(0x1a9)][_0x4910dd(0x1a2)][_0x161f7b],_0x48529b,_0x1fc908))[_0x4910dd(0x19d)](Boolean);return Object['values'](_0x5ca99e[_0x4910dd(0x1a9)][_0x4910dd(0x1c1)])[_0x4910dd(0x157)](_0x341f4d=>{const _0x1fb4fb=_0x4910dd;this['_userService'][_0x1fb4fb(0x185)](_0x341f4d);}),_0x4189f8;}[_0x536eb0(0x1be)](_0xd33d2d){const _0x394756=_0x536eb0;return{'id':_0xd33d2d['id'],'threadId':_0xd33d2d[_0x394756(0x1a4)],'ref':_0xd33d2d[_0x394756(0x17c)]};}},__name(_a2,_0x536eb0(0x153)),_a2);ThreadCommentServerDataSource=__decorateClass$2([__decorateParam$2(0x0,Inject(HTTPService)),__decorateParam$2(0x1,Inject(UserManagerService)),__decorateParam$2(0x2,Inject(CollaborationSessionService)),__decorateParam$2(0x3,Inject(Injector))],ThreadCommentServerDataSource);var __defProp$1=Object['defineProperty'],__getOwnPropDesc$1=Object['getOwnPropertyDescriptor'],__decorateClass$1=__name((_0x2aefcc,_0x30e553,_0x1ece1c,_0x443524)=>{const _0x4c9aec=_0x536eb0;for(var _0x5eeb57=_0x443524>0x1?void 0x0:_0x443524?__getOwnPropDesc$1(_0x30e553,_0x1ece1c):_0x30e553,_0x144ac5=_0x2aefcc[_0x4c9aec(0x179)]-0x1,_0x21bede;_0x144ac5>=0x0;_0x144ac5--)(_0x21bede=_0x2aefcc[_0x144ac5])&&(_0x5eeb57=(_0x443524?_0x21bede(_0x30e553,_0x1ece1c,_0x5eeb57):_0x21bede(_0x5eeb57))||_0x5eeb57);return _0x443524&&_0x5eeb57&&__defProp$1(_0x30e553,_0x1ece1c,_0x5eeb57),_0x5eeb57;},_0x536eb0(0x17d)),__decorateParam$1=__name((_0x24be72,_0x5b9c87)=>(_0x34d058,_0x2317f0)=>_0x5b9c87(_0x34d058,_0x2317f0,_0x24be72),_0x536eb0(0x1ad)),_a3;let ThreadCommentDataSourceController=(_a3=class extends Disposable{constructor(_0x120ce0,_0x41f8b5){const _0x21b420=_0x536eb0;super(),this[_0x21b420(0x16f)]=_0x120ce0,this['_threadCommentDataSource']=_0x41f8b5,this['_initDataSource']();}[_0x536eb0(0x1a5)](){const _0x515991=_0x536eb0;this['_threadCommentDataSourceService'][_0x515991(0x161)]=this[_0x515991(0x171)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}},__name(_a3,_0x536eb0(0x1b5)),_a3);ThreadCommentDataSourceController=__decorateClass$1([__decorateParam$1(0x0,IThreadCommentDataSourceService),__decorateParam$1(0x1,Inject(ThreadCommentServerDataSource))],ThreadCommentDataSourceController);var __defProp2=Object['defineProperty'],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__defNormalProp=__name((_0x501279,_0x2014a1,_0x1a23bd)=>_0x2014a1 in _0x501279?__defProp2(_0x501279,_0x2014a1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a23bd}):_0x501279[_0x2014a1]=_0x1a23bd,'__defNormalProp'),__decorateClass=__name((_0x529ef5,_0x3912ee,_0x27bc83,_0x3fe1c1)=>{const _0x1497a5=_0x536eb0;for(var _0x5b0462=_0x3fe1c1>0x1?void 0x0:_0x3fe1c1?__getOwnPropDesc(_0x3912ee,_0x27bc83):_0x3912ee,_0x3ad27b=_0x529ef5[_0x1497a5(0x179)]-0x1,_0x5a024b;_0x3ad27b>=0x0;_0x3ad27b--)(_0x5a024b=_0x529ef5[_0x3ad27b])&&(_0x5b0462=(_0x3fe1c1?_0x5a024b(_0x3912ee,_0x27bc83,_0x5b0462):_0x5a024b(_0x5b0462))||_0x5b0462);return _0x3fe1c1&&_0x5b0462&&__defProp2(_0x3912ee,_0x27bc83,_0x5b0462),_0x5b0462;},_0x536eb0(0x172)),__decorateParam=__name((_0x519a25,_0x2a4967)=>(_0x57229a,_0x197411)=>_0x2a4967(_0x57229a,_0x197411,_0x519a25),_0x536eb0(0x1a8)),__publicField=__name((_0x2f03f7,_0x56d11a,_0x4d990a)=>__defNormalProp(_0x2f03f7,typeof _0x56d11a!=_0x536eb0(0x17b)?_0x56d11a+'':_0x56d11a,_0x4d990a),_0x536eb0(0x1ac)),_a4;let UniverThreadCommentDataSourcePlugin=(_a4=class extends Plugin{constructor(_0x192fda=defaultPluginConfig,_0x3eebaa,_0x372fc0){const _0x7c3a47=_0x536eb0;super(),this[_0x7c3a47(0x169)]=_0x192fda,this[_0x7c3a47(0x195)]=_0x3eebaa,this[_0x7c3a47(0x197)]=_0x372fc0;const {..._0x3c4651}=merge({},defaultPluginConfig,this['_config']);this[_0x7c3a47(0x197)][_0x7c3a47(0x18f)](THREAD_COMMENT_DATA_SOURCE_PLUGIN_CONFIG_KEY,_0x3c4651);}['onStarting'](){[[ThreadCommentServerDataSource],[ThreadCommentDataSourceController],[ThreadCommentCollaUpdateController]]['forEach'](_0x281616=>{const _0x326559=_0x3d0f;this[_0x326559(0x195)][_0x326559(0x156)](_0x281616);});}[_0x536eb0(0x155)](){const _0x5ec6b4=_0x536eb0;this[_0x5ec6b4(0x195)][_0x5ec6b4(0x1b4)](ThreadCommentDataSourceController),this[_0x5ec6b4(0x195)][_0x5ec6b4(0x1b4)](ThreadCommentCollaUpdateController);}},__name(_a4,'UniverThreadCommentDataSourcePlugin'),_a4);__publicField(UniverThreadCommentDataSourcePlugin,_0x536eb0(0x193),PLUGIN_NAME),__publicField(UniverThreadCommentDataSourcePlugin,_0x536eb0(0x1a7),UniverInstanceType[_0x536eb0(0x1a3)]),UniverThreadCommentDataSourcePlugin=__decorateClass([DependentOn(UniverThreadCommentUIPlugin,UniverCollaborationClientPlugin,UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverThreadCommentDataSourcePlugin);export{UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x261e27=_0x5ae5;(function(_0x28069f,_0x170b09){const _0x43e99f=_0x5ae5,_0x43bd63=_0x28069f();while(!![]){try{const _0x38fbdd=-parseInt(_0x43e99f(0x1dc))/0x1+parseInt(_0x43e99f(0x1c3))/0x2*(-parseInt(_0x43e99f(0x1ff))/0x3)+-parseInt(_0x43e99f(0x209))/0x4+parseInt(_0x43e99f(0x1c1))/0x5*(parseInt(_0x43e99f(0x1bc))/0x6)+-parseInt(_0x43e99f(0x1ea))/0x7+parseInt(_0x43e99f(0x1fd))/0x8+parseInt(_0x43e99f(0x1eb))/0x9;if(_0x38fbdd===_0x170b09)break;else _0x43bd63['push'](_0x43bd63['shift']());}catch(_0x12d112){_0x43bd63['push'](_0x43bd63['shift']());}}}(_0x1df9,0xee287));import{CommentService as _0x214a9b,CollaborationSessionService as _0x530eba,UniverCollaborationClientPlugin as _0x541e65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x47994c}from'@univerjs-pro/license';import{dayjs as _0x13f5be,UserManagerService as _0x5851a2,Inject as _0x3f6240,Injector as _0x1ccb8a,Disposable as _0x34dba8,CustomRangeType as _0x4bfc54,UniverInstanceType as _0x150667,DependentOn as _0x212ca6,Plugin as _0x248539,merge as _0x4ff709,IConfigService as _0x1a65e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x328c2c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x15862a,IThreadCommentDataSourceService as _0x370691}from'@univerjs/thread-comment';import{bufferTime as _0x18c6da}from'rxjs';import{HTTPService as _0x436005}from'@univerjs/network';const B='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _=(_0x119373=>(_0x119373[_0x119373[_0x261e27(0x1be)]=0x0]=_0x261e27(0x1be),_0x119373[_0x119373['Solved']=0x1]=_0x261e27(0x206),_0x119373[_0x119373['UNRECOGNIZED']=-0x1]=_0x261e27(0x1f4),_0x119373))(_||{}),p=(_0x5f4bf0=>(_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1f6)]=0x0]=_0x261e27(0x1f6),_0x5f4bf0[_0x5f4bf0['Add']=0x1]=_0x261e27(0x20f),_0x5f4bf0[_0x5f4bf0['Reply']=0x2]=_0x261e27(0x1f2),_0x5f4bf0[_0x5f4bf0['Edit']=0x3]=_0x261e27(0x1c8),_0x5f4bf0[_0x5f4bf0[_0x261e27(0x200)]=0x4]=_0x261e27(0x200),_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1da)]=0x5]='Solve',_0x5f4bf0[_0x5f4bf0[_0x261e27(0x1f4)]=-0x1]=_0x261e27(0x1f4),_0x5f4bf0))(p||{});const O=_0x35704f=>_0x13f5be(new Date(+_0x35704f))[_0x261e27(0x1c2)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x462260,_0x2da3e7)=>{const _0xe56c3=_0x261e27,_0x48e4b0=_0x462260[_0xe56c3(0x1de)](_0x5851a2),_0x520cdd=_0x462260[_0xe56c3(0x1de)](_0x436005);_0x2da3e7[_0xe56c3(0x1bf)](_0xcd761b=>{const _0x13b4ea=_0xe56c3;_0x48e4b0[_0x13b4ea(0x203)](_0xcd761b)&&_0x2da3e7[_0x13b4ea(0x1c9)](_0xcd761b);}),_0x2da3e7[_0xe56c3(0x1c4)]&&(await _0x520cdd['get'](_0xe56c3(0x1d3),{'params':{'userIDs':[..._0x2da3e7]}}))[_0xe56c3(0x1d1)][_0xe56c3(0x1e1)]['forEach'](_0x56b83b=>{_0x56b83b&&_0x48e4b0['addUser'](_0x56b83b);});};var V=Object[_0x261e27(0x1fe)],z=Object[_0x261e27(0x1f8)],Q=(_0x3ed310,_0x1a5695,_0x1d572e,_0x55fee8)=>{for(var _0x312f3b=_0x55fee8>0x1?void 0x0:_0x55fee8?z(_0x1a5695,_0x1d572e):_0x1a5695,_0x102dd2=_0x3ed310['length']-0x1,_0x7dba8b;_0x102dd2>=0x0;_0x102dd2--)(_0x7dba8b=_0x3ed310[_0x102dd2])&&(_0x312f3b=(_0x55fee8?_0x7dba8b(_0x1a5695,_0x1d572e,_0x312f3b):_0x7dba8b(_0x312f3b))||_0x312f3b);return _0x55fee8&&_0x312f3b&&V(_0x1a5695,_0x1d572e,_0x312f3b),_0x312f3b;},v=(_0x322512,_0x15932d)=>(_0xcc88b3,_0x60ff4)=>_0x15932d(_0xcc88b3,_0x60ff4,_0x322512);let I=class extends _0x34dba8{constructor(_0x2fca3c,_0x14bc14,_0x53ad22,_0x1af711){const _0xa23af2=_0x261e27;super(),this['_commentService']=_0x2fca3c,this['_threadCommentModel']=_0x14bc14,this[_0xa23af2(0x1cd)]=_0x53ad22,this[_0xa23af2(0x212)]=_0x1af711,this['_init'](),this[_0xa23af2(0x1f0)]();}[_0x261e27(0x1f0)](){const _0x27fb17=_0x261e27;this[_0x27fb17(0x20b)](this['_threadCommentModel'][_0x27fb17(0x216)]['pipe'](_0x18c6da(0x10))['subscribe'](_0x39eef9=>{const _0x1debfd=_0x27fb17,_0x376710=new Set();_0x39eef9[_0x1debfd(0x1bf)](_0x5b75c8=>{const _0x43bf02=_0x1debfd;switch(_0x5b75c8['type']){case _0x43bf02(0x1ec):{const _0x269682=_0x5b75c8['payload'][_0x43bf02(0x1fb)];_0x376710[_0x43bf02(0x1ec)](_0x269682);break;}}}),K(this['_injector'],_0x376710);}));}['_init'](){const _0x1d3ee9=_0x261e27;this[_0x1d3ee9(0x20b)](this[_0x1d3ee9(0x1e7)][_0x1d3ee9(0x216)][_0x1d3ee9(0x215)](async _0x3d80c7=>{const _0x545c47=_0x1d3ee9;var _0x2ba4fc,_0x1cc097,_0xe509d8,_0x8692c2;const _0x189507=(_0x2ba4fc=this[_0x545c47(0x20a)]['getUnit'](_0x3d80c7[_0x545c47(0x20d)])[_0x545c47(0x1d8)](_0x463595=>_0x463595[_0x545c47(0x1df)]===_0x3d80c7[_0x545c47(0x1df)]))==null?void 0x0:_0x2ba4fc[_0x545c47(0x1c7)];if(!_0x189507)return;const {unitId:_0xaa40f4,subUnitId:_0x31a9cd}=_0x189507;switch(_0x3d80c7[_0x545c47(0x20e)]&&this['_userService'][_0x545c47(0x1e3)](_0x3d80c7['user']),_0x3d80c7[_0x545c47(0x1cf)]){case p[_0x545c47(0x20f)]:break;case p[_0x545c47(0x1f2)]:{this[_0x545c47(0x20a)][_0x545c47(0x1d7)](_0xaa40f4,_0x31a9cd,{'unitId':_0xaa40f4,'subUnitId':_0x31a9cd,'ref':'','id':_0x3d80c7[_0x545c47(0x1c0)],'dT':O(+_0x3d80c7[_0x545c47(0x1c6)]),'threadId':_0x3d80c7[_0x545c47(0x1df)],'personId':(_0xe509d8=(_0x1cc097=_0x3d80c7[_0x545c47(0x20e)])==null?void 0x0:_0x1cc097['userID'])!=null?_0xe509d8:_0x3d80c7['userId'],'text':JSON['parse'](_0x3d80c7[_0x545c47(0x205)]),'parentId':_0x189507['id']});break;}case p['Delete']:{const _0xa734e3=this[_0x545c47(0x20a)][_0x545c47(0x1e5)](_0xaa40f4,_0x31a9cd,_0x3d80c7[_0x545c47(0x1c0)]);_0xa734e3&&_0xa734e3[_0x545c47(0x208)]&&this[_0x545c47(0x20a)][_0x545c47(0x1f9)](_0xaa40f4,_0x31a9cd,_0x3d80c7[_0x545c47(0x1c0)]);break;}case p['Edit']:{this[_0x545c47(0x20a)][_0x545c47(0x211)](_0xaa40f4,_0x31a9cd,{'commentId':_0x3d80c7[_0x545c47(0x1c0)],'text':JSON[_0x545c47(0x1f3)](_0x3d80c7['content'])});break;}case p[_0x545c47(0x1da)]:{const _0x11c031=(_0x8692c2=this[_0x545c47(0x20a)][_0x545c47(0x1b7)](_0x3d80c7[_0x545c47(0x20d)])['find'](_0x5ab41f=>_0x5ab41f[_0x545c47(0x1df)]===_0x3d80c7['threadId']))==null?void 0x0:_0x8692c2[_0x545c47(0x1c7)];_0x11c031&&this['_threadCommentModel'][_0x545c47(0x1e2)](_0xaa40f4,_0x31a9cd,_0x11c031['id'],_0x3d80c7[_0x545c47(0x1bd)]===_[_0x545c47(0x206)]);break;}}}));}};I=Q([v(0x0,_0x3f6240(_0x214a9b)),v(0x1,_0x3f6240(_0x15862a)),v(0x2,_0x3f6240(_0x5851a2)),v(0x3,_0x3f6240(_0x1ccb8a))],I);const X=_0x261e27(0x1fc),P={};var k=Object[_0x261e27(0x1fe)],ee=Object['getOwnPropertyDescriptor'],re=(_0x1c9595,_0x12ae47,_0x205b56,_0xbb3cd3)=>{const _0x49cbeb=_0x261e27;for(var _0x5dd5f5=_0xbb3cd3>0x1?void 0x0:_0xbb3cd3?ee(_0x12ae47,_0x205b56):_0x12ae47,_0x5b2aad=_0x1c9595[_0x49cbeb(0x1d4)]-0x1,_0x46513f;_0x5b2aad>=0x0;_0x5b2aad--)(_0x46513f=_0x1c9595[_0x5b2aad])&&(_0x5dd5f5=(_0xbb3cd3?_0x46513f(_0x12ae47,_0x205b56,_0x5dd5f5):_0x46513f(_0x5dd5f5))||_0x5dd5f5);return _0xbb3cd3&&_0x5dd5f5&&k(_0x12ae47,_0x205b56,_0x5dd5f5),_0x5dd5f5;},f=(_0xa352e9,_0x26ec19)=>(_0x52eb01,_0x334819)=>_0x26ec19(_0x52eb01,_0x334819,_0xa352e9);function te(_0x554655,_0x3d69ca){const _0x5336de=_0x261e27,_0x141cda=_0x554655[_0x5336de(0x1ed)][0x0];return{..._0x3d69ca,'id':_0x141cda['replyId'],'resolved':_0x554655[_0x5336de(0x1bd)]===0x1,'dT':O(_0x141cda['createTimestamp']),'personId':_0x141cda[_0x5336de(0x1d2)],'threadId':_0x141cda['threadId']};}function se(_0x3d88e4,_0x1c94ba,_0x7d88cc){const _0x12462d=_0x261e27;var _0x44245e,_0x1e18c4;if(((_0x1e18c4=(_0x44245e=_0x3d88e4==null?void 0x0:_0x3d88e4[_0x12462d(0x1ed)])==null?void 0x0:_0x44245e[_0x12462d(0x1d4)])!=null?_0x1e18c4:0x0)>0x0){const _0x3f25f4=(_0xae3a43,_0x40f84f)=>({'id':_0xae3a43[_0x12462d(0x1c0)],'threadId':_0xae3a43[_0x12462d(0x1df)],'dT':O(_0xae3a43[_0x12462d(0x1c6)]),'personId':_0xae3a43[_0x12462d(0x1d2)],'resolved':_0x3d88e4[_0x12462d(0x1bd)]===_[_0x12462d(0x206)],'unitId':_0x1c94ba,'subUnitId':_0x7d88cc,'text':JSON[_0x12462d(0x1f3)](_0xae3a43[_0x12462d(0x205)]),'parentId':_0x40f84f}),_0x5489c2=_0x3f25f4(_0x3d88e4['replies'][0x0]);return{..._0x5489c2,'children':_0x3d88e4[_0x12462d(0x1ed)]['slice'](0x1)[_0x12462d(0x207)](_0x17c027=>_0x3f25f4(_0x17c027,_0x5489c2['id']))};}return null;}let S=class{constructor(_0x36aaad,_0x49e796,_0x1324bc,_0x2b05b9){const _0x479399=_0x261e27;this['_httpService']=_0x36aaad,this[_0x479399(0x1cd)]=_0x49e796,this[_0x479399(0x1e8)]=_0x1324bc,this[_0x479399(0x212)]=_0x2b05b9;}async[_0x261e27(0x1d7)](_0x34f383){const _0x35434a=_0x261e27;var _0xb4847e,_0x4cb071;const {parentId:_0x10bed9,unitId:_0x2d3d2a,text:_0x49d0f3,threadId:_0x5ddf98}=_0x34f383,_0xc0f122=(_0x4cb071=(_0xb4847e=_0x49d0f3[_0x35434a(0x1ce)])==null?void 0x0:_0xb4847e[_0x35434a(0x1b8)](_0x44ab66=>_0x44ab66['rangeType']===_0x4bfc54[_0x35434a(0x201)])[_0x35434a(0x207)](_0x120f4a=>_0x120f4a[_0x35434a(0x1ef)]))!=null?_0x4cb071:[],_0x432f22=JSON[_0x35434a(0x1cc)](_0x49d0f3),_0xe2307d=(await this[_0x35434a(0x1e8)][_0x35434a(0x1f7)](_0x2d3d2a))['getMemberID']();if(_0x10bed9){const _0x142d58={'memberId':_0xe2307d,'unitId':_0x2d3d2a,'content':_0x432f22,'mention':_0xc0f122,'threadId':_0x5ddf98},_0x4a165b=(await this[_0x35434a(0x1ba)][_0x35434a(0x1d9)](_0x35434a(0x1b9)+_0x2d3d2a+_0x35434a(0x204),{'body':_0x142d58}))['body'][_0x35434a(0x1f1)];return{..._0x34f383,'id':_0x4a165b[_0x35434a(0x1c0)],'dT':_0x13f5be(+_0x4a165b[_0x35434a(0x1c6)])[_0x35434a(0x1c2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4a165b[_0x35434a(0x1d2)]};}else{const _0x30704b={'memberId':_0xe2307d,'unitId':_0x2d3d2a,'content':_0x432f22,'mention':_0xc0f122},_0xe21ed0=await this['_httpService'][_0x35434a(0x1d9)](_0x35434a(0x1b9)+_0x2d3d2a+'/add',{'body':_0x30704b});return te(_0xe21ed0[_0x35434a(0x1d1)][_0x35434a(0x1e0)],_0x34f383);}}async['updateComment'](_0x3818d0){const _0x38d53d=_0x261e27;var _0x198a0e,_0x4918be;const {text:_0x5d6aa5,unitId:_0x41a555}=_0x3818d0,_0x5162b9=(_0x4918be=(_0x198a0e=_0x5d6aa5['customRanges'])==null?void 0x0:_0x198a0e[_0x38d53d(0x1b8)](_0x43be30=>_0x43be30[_0x38d53d(0x1b6)]===_0x4bfc54[_0x38d53d(0x201)])[_0x38d53d(0x207)](_0xfca7d3=>_0xfca7d3[_0x38d53d(0x1ef)]))!=null?_0x4918be:[],_0x47d493=JSON['stringify'](_0x5d6aa5),_0x279326=_0x3818d0[_0x38d53d(0x1df)],_0x3b9749=_0x3818d0['id'],_0x4f9a9c={'memberId':(await this['_sessionService']['requireSession'](_0x41a555))['getMemberID'](),'unitId':_0x41a555,'threadId':_0x279326,'mention':_0x5162b9,'content':_0x47d493,'replyId':_0x3b9749},_0x4ec280=await this[_0x38d53d(0x1ba)][_0x38d53d(0x1d9)](_0x38d53d(0x1b9)+_0x41a555+'/edit',{'body':_0x4f9a9c});return!_0x4ec280[_0x38d53d(0x1d1)]['error']||_0x4ec280['body'][_0x38d53d(0x1d5)][_0x38d53d(0x1ca)]===0x1;}async[_0x261e27(0x1e2)](_0x5952c9){const _0x564023=_0x261e27,{unitId:_0x26bcf1}=_0x5952c9,_0x4b8408=_0x5952c9[_0x564023(0x1df)],_0x2d679f={'memberId':this[_0x564023(0x1cd)]['getCurrentUser']()['userID'],'unitId':_0x26bcf1,'threadId':_0x4b8408,'solved':_0x5952c9[_0x564023(0x1e6)]?_[_0x564023(0x206)]:_[_0x564023(0x1be)]},_0x1eff10=await this[_0x564023(0x1ba)][_0x564023(0x1d9)](_0x564023(0x1b9)+_0x26bcf1+_0x564023(0x213),{'body':_0x2d679f});return!_0x1eff10[_0x564023(0x1d1)]['error']||_0x1eff10[_0x564023(0x1d1)][_0x564023(0x1d5)][_0x564023(0x1ca)]===0x1;}async[_0x261e27(0x1f9)](_0x2d7f3f,_0x42c594,_0x10f389,_0x26fa37){const _0x51dadf=_0x261e27,_0x50a15e={'memberId':(await this['_sessionService']['requireSession'](_0x2d7f3f))[_0x51dadf(0x1fa)](),'threadId':_0x10f389,'replyId':_0x26fa37,'unitId':_0x2d7f3f},_0x281e07=await this['_httpService'][_0x51dadf(0x1d9)](_0x51dadf(0x1b9)+_0x2d7f3f+'/delete',{'body':_0x50a15e});return!_0x281e07[_0x51dadf(0x1d1)][_0x51dadf(0x1d5)]||_0x281e07[_0x51dadf(0x1d1)][_0x51dadf(0x1d5)][_0x51dadf(0x1ca)]===0x1;}async[_0x261e27(0x202)](_0x39500e,_0x3548f8,_0x6e359e){const _0x1c3fcf=_0x261e27,_0x1abbda={'unitId':_0x39500e,'threadId':_0x6e359e},_0x55301f=await this[_0x1c3fcf(0x1ba)][_0x1c3fcf(0x1d9)](_0x1c3fcf(0x1b9)+_0x39500e+_0x1c3fcf(0x1ee),{'body':_0x1abbda}),_0xaf6729=_0x6e359e[_0x1c3fcf(0x207)](_0x31990f=>se(_0x55301f['body'][_0x1c3fcf(0x210)][_0x31990f],_0x39500e,_0x3548f8))['filter'](Boolean);return Object[_0x1c3fcf(0x1f5)](_0x55301f[_0x1c3fcf(0x1d1)][_0x1c3fcf(0x1e1)])[_0x1c3fcf(0x1bf)](_0x16435d=>{const _0x3c5a5e=_0x1c3fcf;this['_userService'][_0x3c5a5e(0x1e3)](_0x16435d);}),_0xaf6729;}['saveCommentToSnapshot'](_0x54db61){const _0x52cf28=_0x261e27;return{'id':_0x54db61['id'],'threadId':_0x54db61[_0x52cf28(0x1df)],'ref':_0x54db61['ref']};}};function _0x5ae5(_0x565684,_0x5f16e0){const _0x1df971=_0x1df9();return _0x5ae5=function(_0x5ae5ed,_0x1ddb88){_0x5ae5ed=_0x5ae5ed-0x1b5;let _0x55051e=_0x1df971[_0x5ae5ed];return _0x55051e;},_0x5ae5(_0x565684,_0x5f16e0);}function _0x1df9(){const _0x482137=['_commentService','_sessionService','syncUpdateMutationToColla','7188335tEnOCk','35670762hGKrHi','add','replies','/list','rangeId','_initUserSync','reply','Reply','parse','UNRECOGNIZED','values','Unknown','requireSession','getOwnPropertyDescriptor','deleteComment','getMemberID','personId','thread-comment-data-source.config','5117016UdgBMn','defineProperty','1734534gVKhSW','Delete','COMMENT','listComments','getUser','/reply','content','Solved','map','parentId','3244984kwsTgH','_threadCommentModel','disposeWithMe','_initDataSource','unitId','user','Add','comments','updateComment','_injector','/solved','_configService','subscribe','commentUpdate$','setConfig','rangeType','getUnit','filter','/universer-api/comment/unit/','_httpService','_config','5743902XMjdZG','solved','OpenOrReOpen','forEach','replyId','5lQldFr','format','4PTTkTm','size','onStarting','createTimestamp','root','Edit','delete','code','UNIVER_UNKNOWN','stringify','_userService','customRanges','type','pluginName','body','userId','/universer-api/user/list','length','error','_threadCommentDataSourceService','addComment','find','post','Solve','dataSource','1590360DCWUvn','_threadCommentDataSource','get','threadId','comment','users','resolveComment','addUser','onReady','getComment','resolved'];_0x1df9=function(){return _0x482137;};return _0x1df9();}S=re([f(0x0,_0x3f6240(_0x436005)),f(0x1,_0x3f6240(_0x5851a2)),f(0x2,_0x3f6240(_0x530eba)),f(0x3,_0x3f6240(_0x1ccb8a))],S);var oe=Object[_0x261e27(0x1fe)],ne=Object[_0x261e27(0x1f8)],ie=(_0x4b7345,_0x3e33a6,_0x54feb4,_0x2310a3)=>{for(var _0x58b801=_0x2310a3>0x1?void 0x0:_0x2310a3?ne(_0x3e33a6,_0x54feb4):_0x3e33a6,_0x2aba7a=_0x4b7345['length']-0x1,_0x3ad9c9;_0x2aba7a>=0x0;_0x2aba7a--)(_0x3ad9c9=_0x4b7345[_0x2aba7a])&&(_0x58b801=(_0x2310a3?_0x3ad9c9(_0x3e33a6,_0x54feb4,_0x58b801):_0x3ad9c9(_0x58b801))||_0x58b801);return _0x2310a3&&_0x58b801&&oe(_0x3e33a6,_0x54feb4,_0x58b801),_0x58b801;},M=(_0x50e543,_0x2dc905)=>(_0x15e699,_0x3b4303)=>_0x2dc905(_0x15e699,_0x3b4303,_0x50e543);let b=class extends _0x34dba8{constructor(_0x4c0e5a,_0x45f73c){const _0x17ba29=_0x261e27;super(),this['_threadCommentDataSourceService']=_0x4c0e5a,this['_threadCommentDataSource']=_0x45f73c,this[_0x17ba29(0x20c)]();}[_0x261e27(0x20c)](){const _0x3a3d1d=_0x261e27;this[_0x3a3d1d(0x1d6)][_0x3a3d1d(0x1db)]=this[_0x3a3d1d(0x1dd)],this[_0x3a3d1d(0x1d6)][_0x3a3d1d(0x1e9)]=!0x1;}};b=ie([M(0x0,_0x370691),M(0x1,_0x3f6240(S))],b);var $=Object[_0x261e27(0x1fe)],ce=Object[_0x261e27(0x1f8)],ae=(_0x4c79e9,_0x35e02d,_0x4a5d9d)=>_0x35e02d in _0x4c79e9?$(_0x4c79e9,_0x35e02d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a5d9d}):_0x4c79e9[_0x35e02d]=_0x4a5d9d,de=(_0x1f75c0,_0x421fb0,_0x16f65e,_0x5a8253)=>{const _0x1b56dd=_0x261e27;for(var _0x375b1b=_0x5a8253>0x1?void 0x0:_0x5a8253?ce(_0x421fb0,_0x16f65e):_0x421fb0,_0x113551=_0x1f75c0[_0x1b56dd(0x1d4)]-0x1,_0x2401a9;_0x113551>=0x0;_0x113551--)(_0x2401a9=_0x1f75c0[_0x113551])&&(_0x375b1b=(_0x5a8253?_0x2401a9(_0x421fb0,_0x16f65e,_0x375b1b):_0x2401a9(_0x375b1b))||_0x375b1b);return _0x5a8253&&_0x375b1b&&$(_0x421fb0,_0x16f65e,_0x375b1b),_0x375b1b;},N=(_0x4226f7,_0x30fcf8)=>(_0x3d4f6b,_0x49f92d)=>_0x30fcf8(_0x3d4f6b,_0x49f92d,_0x4226f7),j=(_0x412fa7,_0x5785c2,_0x449334)=>ae(_0x412fa7,typeof _0x5785c2!='symbol'?_0x5785c2+'':_0x5785c2,_0x449334);let C=class extends _0x248539{constructor(_0x8b7fd6=P,_0x24c70c,_0x207a61){const _0x19a3e2=_0x261e27;super(),this[_0x19a3e2(0x1bb)]=_0x8b7fd6,this['_injector']=_0x24c70c,this[_0x19a3e2(0x214)]=_0x207a61;const {..._0x2a012d}=_0x4ff709({},P,this[_0x19a3e2(0x1bb)]);this[_0x19a3e2(0x214)][_0x19a3e2(0x1b5)](X,_0x2a012d);}[_0x261e27(0x1c5)](){const _0x3825d1=_0x261e27;[[S],[b],[I]][_0x3825d1(0x1bf)](_0x291470=>{const _0x238bc6=_0x3825d1;this[_0x238bc6(0x212)][_0x238bc6(0x1ec)](_0x291470);});}[_0x261e27(0x1e4)](){const _0xfe78f4=_0x261e27;this[_0xfe78f4(0x212)][_0xfe78f4(0x1de)](b),this[_0xfe78f4(0x212)]['get'](I);}};j(C,_0x261e27(0x1d0),B),j(C,_0x261e27(0x1cf),_0x150667[_0x261e27(0x1cb)]),C=de([_0x212ca6(_0x328c2c,_0x541e65,_0x47994c),N(0x1,_0x3f6240(_0x1ccb8a)),N(0x2,_0x1a65e)],C);export{C as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x52e3(_0x2a35a7,_0x331c79){const _0x304e01=_0x304e();return _0x52e3=function(_0x52e380,_0xadefc2){_0x52e380=_0x52e380-0x1b5;let _0x2336ef=_0x304e01[_0x52e380];return _0x2336ef;},_0x52e3(_0x2a35a7,_0x331c79);}(function(_0x5844f3,_0xe019df){const _0x43116c=_0x52e3,_0x2b00b1=_0x5844f3();while(!![]){try{const _0x5d490e=-parseInt(_0x43116c(0x1d2))/0x1*(parseInt(_0x43116c(0x1bc))/0x2)+-parseInt(_0x43116c(0x1c1))/0x3+parseInt(_0x43116c(0x1be))/0x4*(parseInt(_0x43116c(0x1b7))/0x5)+-parseInt(_0x43116c(0x1cb))/0x6+-parseInt(_0x43116c(0x1c5))/0x7*(-parseInt(_0x43116c(0x207))/0x8)+-parseInt(_0x43116c(0x1ba))/0x9+parseInt(_0x43116c(0x1eb))/0xa;if(_0x5d490e===_0xe019df)break;else _0x2b00b1['push'](_0x2b00b1['shift']());}catch(_0x25eb28){_0x2b00b1['push'](_0x2b00b1['shift']());}}}(_0x304e,0xa0140),function(_0x45b114,_0x33de06){const _0x215e39=_0x52e3;typeof exports=='object'&&typeof module<'u'?_0x33de06(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x215e39(0x1f8)),require(_0x215e39(0x1c6)),require('@univerjs/thread-comment'),require(_0x215e39(0x1e5)),require(_0x215e39(0x213))):typeof define==_0x215e39(0x21e)&&define[_0x215e39(0x1d6)]?define([_0x215e39(0x1da),_0x215e39(0x20a),_0x215e39(0x1d8),_0x215e39(0x1f8),_0x215e39(0x1c6),'@univerjs/thread-comment','rxjs',_0x215e39(0x213)],_0x33de06):(_0x45b114=typeof globalThis<'u'?globalThis:_0x45b114||self,_0x33de06(_0x45b114['UniverProThreadCommentDatasource']={},_0x45b114[_0x215e39(0x1c4)],_0x45b114[_0x215e39(0x1f3)],_0x45b114[_0x215e39(0x21a)],_0x45b114[_0x215e39(0x23b)],_0x45b114['UniverThreadComment'],_0x45b114['rxjs'],_0x45b114[_0x215e39(0x231)]));}(this,function(_0x30fada,_0x3be785,_0x413200,_0x3c427b,_0x1fe1f6,_0x121604,_0x1d5916,_0x5acb2f){'use strict';const _0x16f38c=_0x52e3;var _0x106842=Object['defineProperty'],_0x40e581=(_0x19f12d,_0x5b2837)=>_0x106842(_0x19f12d,_0x16f38c(0x22f),{'value':_0x5b2837,'configurable':!0x0}),_0x42325d,_0x5f5a95,_0x529270,_0x3a5932;const _0x51a1c9=_0x16f38c(0x1bb);var _0x47e068=(_0x515b45=>(_0x515b45[_0x515b45[_0x16f38c(0x1f6)]=0x0]='OpenOrReOpen',_0x515b45[_0x515b45[_0x16f38c(0x1e0)]=0x1]=_0x16f38c(0x1e0),_0x515b45[_0x515b45['UNRECOGNIZED']=-0x1]=_0x16f38c(0x1de),_0x515b45))(_0x47e068||{}),_0x207c0a=(_0x56bd44=>(_0x56bd44[_0x56bd44[_0x16f38c(0x1e4)]=0x0]=_0x16f38c(0x1e4),_0x56bd44[_0x56bd44['Add']=0x1]=_0x16f38c(0x201),_0x56bd44[_0x56bd44[_0x16f38c(0x20c)]=0x2]=_0x16f38c(0x20c),_0x56bd44[_0x56bd44['Edit']=0x3]=_0x16f38c(0x1f9),_0x56bd44[_0x56bd44[_0x16f38c(0x1fd)]=0x4]=_0x16f38c(0x1fd),_0x56bd44[_0x56bd44[_0x16f38c(0x226)]=0x5]=_0x16f38c(0x226),_0x56bd44[_0x56bd44[_0x16f38c(0x1de)]=-0x1]=_0x16f38c(0x1de),_0x56bd44))(_0x207c0a||{});const _0x21029a=_0x40e581(_0x162cc6=>_0x3c427b[_0x16f38c(0x1b9)](new Date(+_0x162cc6))[_0x16f38c(0x200)](_0x16f38c(0x1b8)),_0x16f38c(0x20b)),_0x1a4706=_0x40e581(async(_0x5480ae,_0x1f905e)=>{const _0x4b869d=_0x16f38c,_0x3dd5e6=_0x5480ae['get'](_0x3c427b[_0x4b869d(0x1e2)]),_0x48dc13=_0x5480ae[_0x4b869d(0x238)](_0x5acb2f['HTTPService']);_0x1f905e[_0x4b869d(0x229)](_0x3f34af=>{const _0x6e6ea6=_0x4b869d;_0x3dd5e6['getUser'](_0x3f34af)&&_0x1f905e[_0x6e6ea6(0x1ed)](_0x3f34af);}),_0x1f905e['size']&&(await _0x48dc13[_0x4b869d(0x238)](_0x4b869d(0x1b5),{'params':{'userIDs':[..._0x1f905e]}}))[_0x4b869d(0x230)][_0x4b869d(0x1ff)][_0x4b869d(0x229)](_0x4d8f7e=>{const _0x1f5b65=_0x4b869d;_0x4d8f7e&&_0x3dd5e6[_0x1f5b65(0x214)](_0x4d8f7e);});},_0x16f38c(0x222));var _0x149d13=Object[_0x16f38c(0x248)],_0xde7b36=Object[_0x16f38c(0x208)],_0x5cca5d=_0x40e581((_0x46c19c,_0x2a0f9e,_0x4b5fdf,_0x4078e0)=>{const _0x3379a0=_0x16f38c;for(var _0x59e5ce=_0x4078e0>0x1?void 0x0:_0x4078e0?_0xde7b36(_0x2a0f9e,_0x4b5fdf):_0x2a0f9e,_0x3eca=_0x46c19c[_0x3379a0(0x1ea)]-0x1,_0x113f6d;_0x3eca>=0x0;_0x3eca--)(_0x113f6d=_0x46c19c[_0x3eca])&&(_0x59e5ce=(_0x4078e0?_0x113f6d(_0x2a0f9e,_0x4b5fdf,_0x59e5ce):_0x113f6d(_0x59e5ce))||_0x59e5ce);return _0x4078e0&&_0x59e5ce&&_0x149d13(_0x2a0f9e,_0x4b5fdf,_0x59e5ce),_0x59e5ce;},'__decorateClass$3'),_0x45fdb0=_0x40e581((_0x36c18c,_0x3695c0)=>(_0x1aec07,_0x175f63)=>_0x3695c0(_0x1aec07,_0x175f63,_0x36c18c),'__decorateParam$3');let _0x4b85bf=(_0x42325d=class extends _0x3c427b[_0x16f38c(0x1f4)]{constructor(_0x3847d5,_0x5e1711,_0x4d0cf0,_0x45d917){const _0x3cdd10=_0x16f38c;super(),this[_0x3cdd10(0x1f1)]=_0x3847d5,this[_0x3cdd10(0x1dc)]=_0x5e1711,this['_userService']=_0x4d0cf0,this[_0x3cdd10(0x23f)]=_0x45d917,this[_0x3cdd10(0x221)](),this[_0x3cdd10(0x22d)]();}[_0x16f38c(0x22d)](){const _0x5e6c1f=_0x16f38c;this[_0x5e6c1f(0x24a)](this[_0x5e6c1f(0x1dc)][_0x5e6c1f(0x235)][_0x5e6c1f(0x217)](_0x1d5916['bufferTime'](0x10))[_0x5e6c1f(0x21b)](_0x36ee6f=>{const _0x40d856=_0x5e6c1f,_0x851ff8=new Set();_0x36ee6f['forEach'](_0x558baa=>{const _0x4ca3b9=_0x52e3;switch(_0x558baa[_0x4ca3b9(0x1c8)]){case _0x4ca3b9(0x244):{const _0x512986=_0x558baa[_0x4ca3b9(0x225)]['personId'];_0x851ff8[_0x4ca3b9(0x244)](_0x512986);break;}}}),_0x1a4706(this[_0x40d856(0x23f)],_0x851ff8);}));}[_0x16f38c(0x221)](){const _0x5fe23e=_0x16f38c;this[_0x5fe23e(0x24a)](this['_commentService']['commentUpdate$'][_0x5fe23e(0x21b)](async _0x24ef22=>{const _0xb26001=_0x5fe23e;var _0x4cd8ae,_0x55e7f2,_0x3feff5,_0x57c22a;const _0x416507=(_0x4cd8ae=this[_0xb26001(0x1dc)][_0xb26001(0x245)](_0x24ef22['unitId'])[_0xb26001(0x22b)](_0x5af80e=>_0x5af80e[_0xb26001(0x237)]===_0x24ef22[_0xb26001(0x237)]))==null?void 0x0:_0x4cd8ae['root'];if(!_0x416507)return;const {unitId:_0x58dc5d,subUnitId:_0x1237e3}=_0x416507;switch(_0x24ef22[_0xb26001(0x228)]&&this[_0xb26001(0x206)][_0xb26001(0x214)](_0x24ef22[_0xb26001(0x228)]),_0x24ef22['type']){case _0x207c0a['Add']:break;case _0x207c0a[_0xb26001(0x20c)]:{this[_0xb26001(0x1dc)]['addComment'](_0x58dc5d,_0x1237e3,{'unitId':_0x58dc5d,'subUnitId':_0x1237e3,'ref':'','id':_0x24ef22['replyId'],'dT':_0x21029a(+_0x24ef22[_0xb26001(0x1cf)]),'threadId':_0x24ef22['threadId'],'personId':(_0x3feff5=(_0x55e7f2=_0x24ef22[_0xb26001(0x228)])==null?void 0x0:_0x55e7f2[_0xb26001(0x24c)])!=null?_0x3feff5:_0x24ef22[_0xb26001(0x1e3)],'text':JSON[_0xb26001(0x216)](_0x24ef22[_0xb26001(0x236)]),'parentId':_0x416507['id']});break;}case _0x207c0a[_0xb26001(0x1fd)]:{const _0x2baed2=this[_0xb26001(0x1dc)]['getComment'](_0x58dc5d,_0x1237e3,_0x24ef22[_0xb26001(0x205)]);_0x2baed2&&_0x2baed2[_0xb26001(0x1dd)]&&this[_0xb26001(0x1dc)][_0xb26001(0x246)](_0x58dc5d,_0x1237e3,_0x24ef22['replyId']);break;}case _0x207c0a[_0xb26001(0x1f9)]:{this[_0xb26001(0x1dc)][_0xb26001(0x1d9)](_0x58dc5d,_0x1237e3,{'commentId':_0x24ef22[_0xb26001(0x205)],'text':JSON['parse'](_0x24ef22[_0xb26001(0x236)])});break;}case _0x207c0a[_0xb26001(0x226)]:{const _0xdc2391=(_0x57c22a=this[_0xb26001(0x1dc)][_0xb26001(0x245)](_0x24ef22[_0xb26001(0x23a)])[_0xb26001(0x22b)](_0x43602b=>_0x43602b[_0xb26001(0x237)]===_0x24ef22[_0xb26001(0x237)]))==null?void 0x0:_0x57c22a[_0xb26001(0x1f2)];_0xdc2391&&this[_0xb26001(0x1dc)][_0xb26001(0x223)](_0x58dc5d,_0x1237e3,_0xdc2391['id'],_0x24ef22[_0xb26001(0x1fc)]===_0x47e068[_0xb26001(0x1e0)]);break;}}}));}},_0x40e581(_0x42325d,'ThreadCommentCollaUpdateController'),_0x42325d);_0x4b85bf=_0x5cca5d([_0x45fdb0(0x0,_0x3c427b['Inject'](_0x3be785[_0x16f38c(0x239)])),_0x45fdb0(0x1,_0x3c427b['Inject'](_0x121604[_0x16f38c(0x1bd)])),_0x45fdb0(0x2,_0x3c427b[_0x16f38c(0x1c2)](_0x3c427b[_0x16f38c(0x1e2)])),_0x45fdb0(0x3,_0x3c427b[_0x16f38c(0x1c2)](_0x3c427b[_0x16f38c(0x1fa)]))],_0x4b85bf);const _0x2d1b28=_0x16f38c(0x204),_0x47be3a={};var _0x97f5d=Object['defineProperty'],_0x11097e=Object[_0x16f38c(0x208)],_0x3a5115=_0x40e581((_0x4d65c2,_0x5a0b49,_0x1bea47,_0x20c84c)=>{const _0xf2642f=_0x16f38c;for(var _0x1f420d=_0x20c84c>0x1?void 0x0:_0x20c84c?_0x11097e(_0x5a0b49,_0x1bea47):_0x5a0b49,_0x1324a4=_0x4d65c2[_0xf2642f(0x1ea)]-0x1,_0x1d4918;_0x1324a4>=0x0;_0x1324a4--)(_0x1d4918=_0x4d65c2[_0x1324a4])&&(_0x1f420d=(_0x20c84c?_0x1d4918(_0x5a0b49,_0x1bea47,_0x1f420d):_0x1d4918(_0x1f420d))||_0x1f420d);return _0x20c84c&&_0x1f420d&&_0x97f5d(_0x5a0b49,_0x1bea47,_0x1f420d),_0x1f420d;},_0x16f38c(0x22c)),_0x155d57=_0x40e581((_0x1f7840,_0x3454b1)=>(_0x2971c6,_0x10dadd)=>_0x3454b1(_0x2971c6,_0x10dadd,_0x1f7840),_0x16f38c(0x20d));function _0x434b8a(_0xde01ad,_0x2b6992){const _0x270e7b=_0x16f38c,_0x39299f=_0xde01ad['replies'][0x0];return{..._0x2b6992,'id':_0x39299f[_0x270e7b(0x205)],'resolved':_0xde01ad[_0x270e7b(0x1fc)]===0x1,'dT':_0x21029a(_0x39299f[_0x270e7b(0x1cf)]),'personId':_0x39299f[_0x270e7b(0x1e3)],'threadId':_0x39299f[_0x270e7b(0x237)]};}_0x40e581(_0x434b8a,'parseServiceComment');function _0x50522f(_0x99df6f,_0x78b1e0,_0x47f03a){const _0x15c0ce=_0x16f38c;var _0x4de5cc,_0x38b7b4;if(((_0x38b7b4=(_0x4de5cc=_0x99df6f==null?void 0x0:_0x99df6f[_0x15c0ce(0x1d4)])==null?void 0x0:_0x4de5cc[_0x15c0ce(0x1ea)])!=null?_0x38b7b4:0x0)>0x0){const _0x17b7e9=_0x40e581((_0x1bc577,_0x2ef4aa)=>({'id':_0x1bc577['replyId'],'threadId':_0x1bc577[_0x15c0ce(0x237)],'dT':_0x21029a(_0x1bc577[_0x15c0ce(0x1cf)]),'personId':_0x1bc577[_0x15c0ce(0x1e3)],'resolved':_0x99df6f[_0x15c0ce(0x1fc)]===_0x47e068[_0x15c0ce(0x1e0)],'unitId':_0x78b1e0,'subUnitId':_0x47f03a,'text':JSON[_0x15c0ce(0x216)](_0x1bc577[_0x15c0ce(0x236)]),'parentId':_0x2ef4aa}),_0x15c0ce(0x23e)),_0x390c3d=_0x17b7e9(_0x99df6f[_0x15c0ce(0x1d4)][0x0]);return{..._0x390c3d,'children':_0x99df6f['replies'][_0x15c0ce(0x1d1)](0x1)[_0x15c0ce(0x22e)](_0x34a5aa=>_0x17b7e9(_0x34a5aa,_0x390c3d['id']))};}return null;}_0x40e581(_0x50522f,_0x16f38c(0x24b));let _0x45a755=(_0x5f5a95=class{constructor(_0x60213b,_0x59939d,_0x59cae3,_0x19994d){const _0x2eda1e=_0x16f38c;this[_0x2eda1e(0x1fe)]=_0x60213b,this[_0x2eda1e(0x206)]=_0x59939d,this['_sessionService']=_0x59cae3,this[_0x2eda1e(0x23f)]=_0x19994d;}async[_0x16f38c(0x23d)](_0x3287dd){const _0x35b684=_0x16f38c;var _0x229c9c,_0x5611fb;const {parentId:_0x2c1c1f,unitId:_0x6a1402,text:_0x258700,threadId:_0x4caac9}=_0x3287dd,_0x2dc95a=(_0x5611fb=(_0x229c9c=_0x258700['customRanges'])==null?void 0x0:_0x229c9c[_0x35b684(0x1ef)](_0x31aa20=>_0x31aa20[_0x35b684(0x224)]===_0x3c427b[_0x35b684(0x233)]['COMMENT'])[_0x35b684(0x22e)](_0x29189b=>_0x29189b['rangeId']))!=null?_0x5611fb:[],_0x4a2b86=JSON[_0x35b684(0x1cd)](_0x258700),_0x20e36d=(await this[_0x35b684(0x1df)][_0x35b684(0x21d)](_0x6a1402))[_0x35b684(0x1f7)]();if(_0x2c1c1f){const _0x723598={'memberId':_0x20e36d,'unitId':_0x6a1402,'content':_0x4a2b86,'mention':_0x2dc95a,'threadId':_0x4caac9},_0x33c6bb=(await this[_0x35b684(0x1fe)][_0x35b684(0x1d7)](_0x35b684(0x240)+_0x6a1402+'/reply',{'body':_0x723598}))['body'][_0x35b684(0x210)];return{..._0x3287dd,'id':_0x33c6bb[_0x35b684(0x205)],'dT':_0x3c427b[_0x35b684(0x1b9)](+_0x33c6bb['createTimestamp'])[_0x35b684(0x200)](_0x35b684(0x1b8)),'personId':_0x33c6bb[_0x35b684(0x1e3)]};}else{const _0x175147={'memberId':_0x20e36d,'unitId':_0x6a1402,'content':_0x4a2b86,'mention':_0x2dc95a},_0x1e2050=await this[_0x35b684(0x1fe)]['post'](_0x35b684(0x240)+_0x6a1402+_0x35b684(0x209),{'body':_0x175147});return _0x434b8a(_0x1e2050[_0x35b684(0x230)]['comment'],_0x3287dd);}}async[_0x16f38c(0x1d9)](_0x1b8ffd){const _0x451206=_0x16f38c;var _0x5ea2e2,_0x2932aa;const {text:_0x107a3c,unitId:_0x57729b}=_0x1b8ffd,_0x520c4b=(_0x2932aa=(_0x5ea2e2=_0x107a3c[_0x451206(0x20f)])==null?void 0x0:_0x5ea2e2[_0x451206(0x1ef)](_0x2ad7fc=>_0x2ad7fc[_0x451206(0x224)]===_0x3c427b[_0x451206(0x233)][_0x451206(0x220)])[_0x451206(0x22e)](_0x56508f=>_0x56508f[_0x451206(0x243)]))!=null?_0x2932aa:[],_0x298bb3=JSON[_0x451206(0x1cd)](_0x107a3c),_0x14f451=_0x1b8ffd[_0x451206(0x237)],_0x471fad=_0x1b8ffd['id'],_0x49bf78={'memberId':(await this[_0x451206(0x1df)][_0x451206(0x21d)](_0x57729b))[_0x451206(0x1f7)](),'unitId':_0x57729b,'threadId':_0x14f451,'mention':_0x520c4b,'content':_0x298bb3,'replyId':_0x471fad},_0x311767=await this['_httpService'][_0x451206(0x1d7)](_0x451206(0x240)+_0x57729b+_0x451206(0x1c3),{'body':_0x49bf78});return!_0x311767['body'][_0x451206(0x1e9)]||_0x311767['body'][_0x451206(0x1e9)]['code']===0x1;}async['resolveComment'](_0x361747){const _0x22a9e0=_0x16f38c,{unitId:_0x45cf45}=_0x361747,_0x3c6bc2=_0x361747[_0x22a9e0(0x237)],_0x5e5f9f={'memberId':this['_userService'][_0x22a9e0(0x218)]()[_0x22a9e0(0x24c)],'unitId':_0x45cf45,'threadId':_0x3c6bc2,'solved':_0x361747[_0x22a9e0(0x1d5)]?_0x47e068['Solved']:_0x47e068['OpenOrReOpen']},_0x5cfb37=await this[_0x22a9e0(0x1fe)][_0x22a9e0(0x1d7)](_0x22a9e0(0x240)+_0x45cf45+_0x22a9e0(0x1ca),{'body':_0x5e5f9f});return!_0x5cfb37['body'][_0x22a9e0(0x1e9)]||_0x5cfb37[_0x22a9e0(0x230)][_0x22a9e0(0x1e9)][_0x22a9e0(0x215)]===0x1;}async[_0x16f38c(0x246)](_0x259442,_0x324fbd,_0x3b48cb,_0x33dad2){const _0x535150=_0x16f38c,_0x4bace8={'memberId':(await this[_0x535150(0x1df)][_0x535150(0x21d)](_0x259442))[_0x535150(0x1f7)](),'threadId':_0x3b48cb,'replyId':_0x33dad2,'unitId':_0x259442},_0x48832e=await this['_httpService'][_0x535150(0x1d7)](_0x535150(0x240)+_0x259442+_0x535150(0x21c),{'body':_0x4bace8});return!_0x48832e[_0x535150(0x230)][_0x535150(0x1e9)]||_0x48832e[_0x535150(0x230)]['error'][_0x535150(0x215)]===0x1;}async[_0x16f38c(0x203)](_0x24a781,_0x556a4d,_0x3d6b0b){const _0x2ff259=_0x16f38c,_0x3a00e9={'unitId':_0x24a781,'threadId':_0x3d6b0b},_0x1f1c10=await this[_0x2ff259(0x1fe)]['post'](_0x2ff259(0x240)+_0x24a781+_0x2ff259(0x1bf),{'body':_0x3a00e9}),_0x1fb9ea=_0x3d6b0b[_0x2ff259(0x22e)](_0x136737=>_0x50522f(_0x1f1c10['body'][_0x2ff259(0x241)][_0x136737],_0x24a781,_0x556a4d))[_0x2ff259(0x1ef)](Boolean);return Object[_0x2ff259(0x211)](_0x1f1c10['body'][_0x2ff259(0x1ff)])['forEach'](_0x34b6b0=>{const _0x11ea7d=_0x2ff259;this[_0x11ea7d(0x206)]['addUser'](_0x34b6b0);}),_0x1fb9ea;}['saveCommentToSnapshot'](_0x1347f7){const _0x4b2aeb=_0x16f38c;return{'id':_0x1347f7['id'],'threadId':_0x1347f7[_0x4b2aeb(0x237)],'ref':_0x1347f7[_0x4b2aeb(0x1e1)]};}},_0x40e581(_0x5f5a95,_0x16f38c(0x247)),_0x5f5a95);_0x45a755=_0x3a5115([_0x155d57(0x0,_0x3c427b[_0x16f38c(0x1c2)](_0x5acb2f[_0x16f38c(0x202)])),_0x155d57(0x1,_0x3c427b[_0x16f38c(0x1c2)](_0x3c427b[_0x16f38c(0x1e2)])),_0x155d57(0x2,_0x3c427b[_0x16f38c(0x1c2)](_0x3be785[_0x16f38c(0x1d0)])),_0x155d57(0x3,_0x3c427b[_0x16f38c(0x1c2)](_0x3c427b[_0x16f38c(0x1fa)]))],_0x45a755);var _0x577e30=Object['defineProperty'],_0x368e4b=Object['getOwnPropertyDescriptor'],_0x5c7c4b=_0x40e581((_0x3b20ea,_0x1b67ff,_0x467131,_0x10878c)=>{for(var _0x9a42d7=_0x10878c>0x1?void 0x0:_0x10878c?_0x368e4b(_0x1b67ff,_0x467131):_0x1b67ff,_0x1313cb=_0x3b20ea['length']-0x1,_0x5a60b4;_0x1313cb>=0x0;_0x1313cb--)(_0x5a60b4=_0x3b20ea[_0x1313cb])&&(_0x9a42d7=(_0x10878c?_0x5a60b4(_0x1b67ff,_0x467131,_0x9a42d7):_0x5a60b4(_0x9a42d7))||_0x9a42d7);return _0x10878c&&_0x9a42d7&&_0x577e30(_0x1b67ff,_0x467131,_0x9a42d7),_0x9a42d7;},_0x16f38c(0x1d3)),_0x5d49a0=_0x40e581((_0x1a1ec8,_0x219d76)=>(_0x311377,_0x4d432f)=>_0x219d76(_0x311377,_0x4d432f,_0x1a1ec8),_0x16f38c(0x1e7));let _0x2dcf7e=(_0x529270=class extends _0x3c427b[_0x16f38c(0x1f4)]{constructor(_0x9dfcfa,_0x1229d9){const _0x5f1d98=_0x16f38c;super(),this[_0x5f1d98(0x1c0)]=_0x9dfcfa,this[_0x5f1d98(0x249)]=_0x1229d9,this['_initDataSource']();}[_0x16f38c(0x1f5)](){const _0x4fa5a8=_0x16f38c;this[_0x4fa5a8(0x1c0)]['dataSource']=this[_0x4fa5a8(0x249)],this['_threadCommentDataSourceService'][_0x4fa5a8(0x232)]=!0x1;}},_0x40e581(_0x529270,'ThreadCommentDataSourceController'),_0x529270);_0x2dcf7e=_0x5c7c4b([_0x5d49a0(0x0,_0x121604['IThreadCommentDataSourceService']),_0x5d49a0(0x1,_0x3c427b[_0x16f38c(0x1c2)](_0x45a755))],_0x2dcf7e);var _0x45e069=Object[_0x16f38c(0x248)],_0xd2ec10=Object['getOwnPropertyDescriptor'],_0x47deda=_0x40e581((_0x223467,_0x59e2b7,_0x2c0ad0)=>_0x59e2b7 in _0x223467?_0x45e069(_0x223467,_0x59e2b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c0ad0}):_0x223467[_0x59e2b7]=_0x2c0ad0,_0x16f38c(0x1ec)),_0x501614=_0x40e581((_0x236c11,_0x59b4fe,_0x50aa81,_0xfe2a07)=>{const _0x6b3fe1=_0x16f38c;for(var _0x4689f1=_0xfe2a07>0x1?void 0x0:_0xfe2a07?_0xd2ec10(_0x59b4fe,_0x50aa81):_0x59b4fe,_0x362df1=_0x236c11[_0x6b3fe1(0x1ea)]-0x1,_0x192a12;_0x362df1>=0x0;_0x362df1--)(_0x192a12=_0x236c11[_0x362df1])&&(_0x4689f1=(_0xfe2a07?_0x192a12(_0x59b4fe,_0x50aa81,_0x4689f1):_0x192a12(_0x4689f1))||_0x4689f1);return _0xfe2a07&&_0x4689f1&&_0x45e069(_0x59b4fe,_0x50aa81,_0x4689f1),_0x4689f1;},_0x16f38c(0x1e8)),_0x576e90=_0x40e581((_0x3a5bdb,_0x1f8fd0)=>(_0xea9b7c,_0x30c6a9)=>_0x1f8fd0(_0xea9b7c,_0x30c6a9,_0x3a5bdb),_0x16f38c(0x1f0)),_0x4c67f8=_0x40e581((_0x2227a,_0x178efb,_0x2d32f7)=>_0x47deda(_0x2227a,typeof _0x178efb!=_0x16f38c(0x1ce)?_0x178efb+'':_0x178efb,_0x2d32f7),_0x16f38c(0x212));_0x30fada['UniverThreadCommentDataSourcePlugin']=(_0x3a5932=class extends _0x3c427b[_0x16f38c(0x1db)]{constructor(_0x567540=_0x47be3a,_0x512f66,_0x3321ea){const _0x2d4ff0=_0x16f38c;super(),this[_0x2d4ff0(0x227)]=_0x567540,this[_0x2d4ff0(0x23f)]=_0x512f66,this[_0x2d4ff0(0x1cc)]=_0x3321ea;const {..._0x11d6d7}=_0x3c427b['merge']({},_0x47be3a,this[_0x2d4ff0(0x227)]);this['_configService'][_0x2d4ff0(0x23c)](_0x2d1b28,_0x11d6d7);}[_0x16f38c(0x1c9)](){const _0x192c6c=_0x16f38c;[[_0x45a755],[_0x2dcf7e],[_0x4b85bf]][_0x192c6c(0x229)](_0x193161=>{const _0x39a187=_0x192c6c;this[_0x39a187(0x23f)]['add'](_0x193161);});}[_0x16f38c(0x1b6)](){const _0x51522d=_0x16f38c;this['_injector'][_0x51522d(0x238)](_0x2dcf7e),this['_injector'][_0x51522d(0x238)](_0x4b85bf);}},_0x40e581(_0x3a5932,_0x16f38c(0x234)),_0x3a5932),_0x4c67f8(_0x30fada[_0x16f38c(0x234)],_0x16f38c(0x1e6),_0x51a1c9),_0x4c67f8(_0x30fada[_0x16f38c(0x234)],_0x16f38c(0x1c8),_0x3c427b[_0x16f38c(0x22a)][_0x16f38c(0x20e)]),_0x30fada[_0x16f38c(0x234)]=_0x501614([_0x3c427b[_0x16f38c(0x1ee)](_0x1fe1f6[_0x16f38c(0x21f)],_0x3be785[_0x16f38c(0x219)],_0x413200['UniverLicensePlugin']),_0x576e90(0x1,_0x3c427b['Inject'](_0x3c427b[_0x16f38c(0x1fa)])),_0x576e90(0x2,_0x3c427b[_0x16f38c(0x1c7)])],_0x30fada[_0x16f38c(0x234)]),Object[_0x16f38c(0x248)](_0x30fada,Symbol[_0x16f38c(0x242)],{'value':_0x16f38c(0x1fb)});}));function _0x304e(){const _0x2d7e0a=['onReady','13835ZmVZck','YYYY/MM/DD\x20HH:mm','dayjs','7183278oXZvQm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2xrrDDf','ThreadCommentModel','212qINnqV','/list','_threadCommentDataSourceService','2348064aPsTrB','Inject','/edit','UniverProCollaborationClient','35giduYr','@univerjs/thread-comment-ui','IConfigService','type','onStarting','/solved','4387716izHaSp','_configService','stringify','symbol','createTimestamp','CollaborationSessionService','slice','273187FpsaTD','__decorateClass$1','replies','resolved','amd','post','@univerjs-pro/license','updateComment','exports','Plugin','_threadCommentModel','parentId','UNRECOGNIZED','_sessionService','Solved','ref','UserManagerService','userId','Unknown','rxjs','pluginName','__decorateParam$1','__decorateClass','error','length','20856270GQVZth','__defNormalProp','delete','DependentOn','filter','__decorateParam','_commentService','root','UniverProLicense','Disposable','_initDataSource','OpenOrReOpen','getMemberID','@univerjs/core','Edit','Injector','Module','solved','Delete','_httpService','users','format','Add','HTTPService','listComments','thread-comment-data-source.config','replyId','_userService','1613928TUrtYo','getOwnPropertyDescriptor','/add','@univerjs-pro/collaboration-client','stringifyDT','Reply','__decorateParam$2','UNIVER_UNKNOWN','customRanges','reply','values','__publicField','@univerjs/network','addUser','code','parse','pipe','getCurrentUser','UniverCollaborationClientPlugin','UniverCore','subscribe','/delete','requireSession','function','UniverThreadCommentUIPlugin','COMMENT','_init','syncUsers','resolveComment','rangeType','payload','Solve','_config','user','forEach','UniverInstanceType','find','__decorateClass$2','_initUserSync','map','name','body','UniverNetwork','syncUpdateMutationToColla','CustomRangeType','UniverThreadCommentDataSourcePlugin','commentUpdate$','content','threadId','get','CommentService','unitId','UniverThreadCommentUi','setConfig','addComment','mapReply','_injector','/universer-api/comment/unit/','comments','toStringTag','rangeId','add','getUnit','deleteComment','ThreadCommentServerDataSource','defineProperty','_threadCommentDataSource','disposeWithMe','getComments','userID','/universer-api/user/list'];_0x304e=function(){return _0x2d7e0a;};return _0x304e();}
|
|
1
|
+
function _0x2b03(_0x16179e,_0x214350){const _0x2e316b=_0x2e31();return _0x2b03=function(_0x2b036d,_0x6af26c){_0x2b036d=_0x2b036d-0x1d7;let _0x2aab7d=_0x2e316b[_0x2b036d];return _0x2aab7d;},_0x2b03(_0x16179e,_0x214350);}function _0x2e31(){const _0x5a25c1=['setConfig','Add','UniverThreadCommentUi','3921720ltNzgB','rangeType','onReady','users','@univerjs/thread-comment-ui','root','UniverLicensePlugin','_commentService','UniverInstanceType','IThreadCommentDataSourceService','stringify','user','CollaborationSessionService','customRanges','format','HTTPService','getUser','UniverProLicense','/universer-api/user/list','1943530OKXjcn','map','5472260ostqbi','@univerjs/network','thread-comment-data-source.config','18mMLcnl','resolveComment','/add','_threadCommentModel','deleteComment','post','threadId','solved','6142276adbdAR','content','_configService','5016148VDpfWN','personId','Injector','userID','forEach','defineProperty','replyId','@univerjs-pro/license','getMemberID','UniverCore','Disposable','replies','_initUserSync','object','type','Solved','COMMENT','UniverNetwork','Inject','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','rxjs','@univerjs/thread-comment','rangeId','UniverProCollaborationClient','function','OpenOrReOpen','toStringTag','@univerjs/core','19852IJpGyR','_userService','_initDataSource','body','UNRECOGNIZED','/delete','50eNilTf','getOwnPropertyDescriptor','CommentService','Unknown','UserManagerService','createTimestamp','pluginName','dayjs','updateComment','DependentOn','pipe','@univerjs-pro/collaboration-client','Module','_injector','CustomRangeType','onStarting','disposeWithMe','getUnit','addComment','Edit','comment','reply','addUser','_sessionService','Delete','requireSession','/universer-api/comment/unit/','subscribe','UniverProThreadCommentDatasource','8766FEMCyv','UniverThreadCommentDataSourcePlugin','listComments','parse','_config','Solve','UniverThreadCommentUIPlugin','exports','6LOyHLb','_httpService','filter','userId','unitId','syncUpdateMutationToColla','commentUpdate$','error','UniverThreadComment','comments','_threadCommentDataSource','values','find','_init','Reply','IConfigService','get','UniverCollaborationClientPlugin','amd','length','add','delete'];_0x2e31=function(){return _0x5a25c1;};return _0x2e31();}(function(_0xbedb78,_0x5b9c83){const _0x62ac10=_0x2b03,_0x58c64a=_0xbedb78();while(!![]){try{const _0xfe6d53=parseInt(_0x62ac10(0x1ff))/0x1*(parseInt(_0x62ac10(0x1f9))/0x2)+-parseInt(_0x62ac10(0x21c))/0x3+parseInt(_0x62ac10(0x1dc))/0x4+-parseInt(_0x62ac10(0x252))/0x5+parseInt(_0x62ac10(0x224))/0x6*(parseInt(_0x62ac10(0x1d9))/0x7)+-parseInt(_0x62ac10(0x23d))/0x8+-parseInt(_0x62ac10(0x255))/0x9*(parseInt(_0x62ac10(0x250))/0xa);if(_0xfe6d53===_0x5b9c83)break;else _0x58c64a['push'](_0x58c64a['shift']());}catch(_0x476393){_0x58c64a['push'](_0x58c64a['shift']());}}}(_0x2e31,0x9f0f6),function(_0x27c0bd,_0x1938c6){const _0x1d5b03=_0x2b03;typeof exports==_0x1d5b03(0x1e9)&&typeof module<'u'?_0x1938c6(exports,require(_0x1d5b03(0x20a)),require('@univerjs-pro/license'),require(_0x1d5b03(0x1f8)),require(_0x1d5b03(0x241)),require(_0x1d5b03(0x1f2)),require('rxjs'),require(_0x1d5b03(0x253))):typeof define==_0x1d5b03(0x1f5)&&define[_0x1d5b03(0x236)]?define([_0x1d5b03(0x223),_0x1d5b03(0x20a),_0x1d5b03(0x1e3),'@univerjs/core',_0x1d5b03(0x241),_0x1d5b03(0x1f2),_0x1d5b03(0x1f1),_0x1d5b03(0x253)],_0x1938c6):(_0x27c0bd=typeof globalThis<'u'?globalThis:_0x27c0bd||self,_0x1938c6(_0x27c0bd[_0x1d5b03(0x21b)]={},_0x27c0bd[_0x1d5b03(0x1f4)],_0x27c0bd[_0x1d5b03(0x24e)],_0x27c0bd[_0x1d5b03(0x1e5)],_0x27c0bd[_0x1d5b03(0x23c)],_0x27c0bd[_0x1d5b03(0x22c)],_0x27c0bd[_0x1d5b03(0x1f1)],_0x27c0bd[_0x1d5b03(0x1ed)]));}(this,function(_0x2718f4,_0x5f5cf2,_0xea7ec2,_0x160b92,_0x160ee0,_0x366c04,_0x470924,_0x519750){'use strict';const _0xba9176=_0x2b03;const _0x522b00='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2d0677=(_0x89c8ee=>(_0x89c8ee[_0x89c8ee[_0xba9176(0x1f6)]=0x0]=_0xba9176(0x1f6),_0x89c8ee[_0x89c8ee[_0xba9176(0x1eb)]=0x1]='Solved',_0x89c8ee[_0x89c8ee[_0xba9176(0x1fd)]=-0x1]=_0xba9176(0x1fd),_0x89c8ee))(_0x2d0677||{}),_0x289780=(_0x977b52=>(_0x977b52[_0x977b52['Unknown']=0x0]=_0xba9176(0x202),_0x977b52[_0x977b52[_0xba9176(0x23b)]=0x1]=_0xba9176(0x23b),_0x977b52[_0x977b52[_0xba9176(0x232)]=0x2]='Reply',_0x977b52[_0x977b52['Edit']=0x3]='Edit',_0x977b52[_0x977b52[_0xba9176(0x217)]=0x4]=_0xba9176(0x217),_0x977b52[_0x977b52[_0xba9176(0x221)]=0x5]=_0xba9176(0x221),_0x977b52[_0x977b52[_0xba9176(0x1fd)]=-0x1]=_0xba9176(0x1fd),_0x977b52))(_0x289780||{});const _0x521e26=_0x2f74f2=>_0x160b92[_0xba9176(0x206)](new Date(+_0x2f74f2))[_0xba9176(0x24b)](_0xba9176(0x1ef)),_0x1d131c=async(_0x1a283f,_0x6393bd)=>{const _0x1edf68=_0xba9176,_0x2840f8=_0x1a283f[_0x1edf68(0x234)](_0x160b92[_0x1edf68(0x203)]),_0x1a2270=_0x1a283f['get'](_0x519750['HTTPService']);_0x6393bd[_0x1edf68(0x1e0)](_0x3966c6=>{const _0x427459=_0x1edf68;_0x2840f8[_0x427459(0x24d)](_0x3966c6)&&_0x6393bd[_0x427459(0x239)](_0x3966c6);}),_0x6393bd['size']&&(await _0x1a2270['get'](_0x1edf68(0x24f),{'params':{'userIDs':[..._0x6393bd]}}))[_0x1edf68(0x1fc)][_0x1edf68(0x240)][_0x1edf68(0x1e0)](_0x2f7f48=>{const _0x454702=_0x1edf68;_0x2f7f48&&_0x2840f8[_0x454702(0x215)](_0x2f7f48);});};var _0x3bfdab=Object['defineProperty'],_0x237784=Object[_0xba9176(0x200)],_0x2b0223=(_0x5b1315,_0x244a40,_0x1ead0a,_0x59f723)=>{const _0x4ae01c=_0xba9176;for(var _0x127385=_0x59f723>0x1?void 0x0:_0x59f723?_0x237784(_0x244a40,_0x1ead0a):_0x244a40,_0x4dd42b=_0x5b1315[_0x4ae01c(0x237)]-0x1,_0x33032a;_0x4dd42b>=0x0;_0x4dd42b--)(_0x33032a=_0x5b1315[_0x4dd42b])&&(_0x127385=(_0x59f723?_0x33032a(_0x244a40,_0x1ead0a,_0x127385):_0x33032a(_0x127385))||_0x127385);return _0x59f723&&_0x127385&&_0x3bfdab(_0x244a40,_0x1ead0a,_0x127385),_0x127385;},_0x49cf6e=(_0x5f4000,_0x22c88c)=>(_0x1d2a20,_0x2013d1)=>_0x22c88c(_0x1d2a20,_0x2013d1,_0x5f4000);let _0x382135=class extends _0x160b92['Disposable']{constructor(_0x754206,_0x524bfc,_0x56a46e,_0x1cd07d){const _0x460fa3=_0xba9176;super(),this[_0x460fa3(0x244)]=_0x754206,this[_0x460fa3(0x258)]=_0x524bfc,this['_userService']=_0x56a46e,this['_injector']=_0x1cd07d,this[_0x460fa3(0x231)](),this[_0x460fa3(0x1e8)]();}['_initUserSync'](){const _0x6ec86d=_0xba9176;this['disposeWithMe'](this[_0x6ec86d(0x258)][_0x6ec86d(0x22a)][_0x6ec86d(0x209)](_0x470924['bufferTime'](0x10))[_0x6ec86d(0x21a)](_0x59de01=>{const _0x3dd07c=_0x6ec86d,_0x26b093=new Set();_0x59de01[_0x3dd07c(0x1e0)](_0x16e668=>{const _0x230003=_0x3dd07c;switch(_0x16e668[_0x230003(0x1ea)]){case _0x230003(0x238):{const _0x33f4d3=_0x16e668['payload'][_0x230003(0x1dd)];_0x26b093[_0x230003(0x238)](_0x33f4d3);break;}}}),_0x1d131c(this[_0x3dd07c(0x20c)],_0x26b093);}));}['_init'](){const _0x5608cf=_0xba9176;this[_0x5608cf(0x20f)](this[_0x5608cf(0x244)][_0x5608cf(0x22a)][_0x5608cf(0x21a)](async _0x3a9dad=>{const _0xe151cc=_0x5608cf;var _0x188823,_0x3a1998,_0x37b7fb,_0x1bc60b;const _0x5d0d36=(_0x188823=this[_0xe151cc(0x258)][_0xe151cc(0x210)](_0x3a9dad[_0xe151cc(0x228)])[_0xe151cc(0x230)](_0x58be47=>_0x58be47[_0xe151cc(0x1d7)]===_0x3a9dad['threadId']))==null?void 0x0:_0x188823[_0xe151cc(0x242)];if(!_0x5d0d36)return;const {unitId:_0x183a32,subUnitId:_0x35ebb4}=_0x5d0d36;switch(_0x3a9dad[_0xe151cc(0x248)]&&this[_0xe151cc(0x1fa)][_0xe151cc(0x215)](_0x3a9dad[_0xe151cc(0x248)]),_0x3a9dad[_0xe151cc(0x1ea)]){case _0x289780[_0xe151cc(0x23b)]:break;case _0x289780[_0xe151cc(0x232)]:{this[_0xe151cc(0x258)][_0xe151cc(0x211)](_0x183a32,_0x35ebb4,{'unitId':_0x183a32,'subUnitId':_0x35ebb4,'ref':'','id':_0x3a9dad['replyId'],'dT':_0x521e26(+_0x3a9dad[_0xe151cc(0x204)]),'threadId':_0x3a9dad[_0xe151cc(0x1d7)],'personId':(_0x37b7fb=(_0x3a1998=_0x3a9dad[_0xe151cc(0x248)])==null?void 0x0:_0x3a1998['userID'])!=null?_0x37b7fb:_0x3a9dad[_0xe151cc(0x227)],'text':JSON[_0xe151cc(0x21f)](_0x3a9dad[_0xe151cc(0x1da)]),'parentId':_0x5d0d36['id']});break;}case _0x289780[_0xe151cc(0x217)]:{const _0x1fd347=this[_0xe151cc(0x258)]['getComment'](_0x183a32,_0x35ebb4,_0x3a9dad['replyId']);_0x1fd347&&_0x1fd347['parentId']&&this['_threadCommentModel'][_0xe151cc(0x259)](_0x183a32,_0x35ebb4,_0x3a9dad[_0xe151cc(0x1e2)]);break;}case _0x289780[_0xe151cc(0x212)]:{this[_0xe151cc(0x258)][_0xe151cc(0x207)](_0x183a32,_0x35ebb4,{'commentId':_0x3a9dad[_0xe151cc(0x1e2)],'text':JSON[_0xe151cc(0x21f)](_0x3a9dad[_0xe151cc(0x1da)])});break;}case _0x289780['Solve']:{const _0x38c57b=(_0x1bc60b=this[_0xe151cc(0x258)]['getUnit'](_0x3a9dad['unitId'])[_0xe151cc(0x230)](_0x26df73=>_0x26df73[_0xe151cc(0x1d7)]===_0x3a9dad[_0xe151cc(0x1d7)]))==null?void 0x0:_0x1bc60b[_0xe151cc(0x242)];_0x38c57b&&this[_0xe151cc(0x258)][_0xe151cc(0x256)](_0x183a32,_0x35ebb4,_0x38c57b['id'],_0x3a9dad[_0xe151cc(0x1d8)]===_0x2d0677['Solved']);break;}}}));}};_0x382135=_0x2b0223([_0x49cf6e(0x0,_0x160b92[_0xba9176(0x1ee)](_0x5f5cf2[_0xba9176(0x201)])),_0x49cf6e(0x1,_0x160b92[_0xba9176(0x1ee)](_0x366c04['ThreadCommentModel'])),_0x49cf6e(0x2,_0x160b92[_0xba9176(0x1ee)](_0x160b92[_0xba9176(0x203)])),_0x49cf6e(0x3,_0x160b92['Inject'](_0x160b92[_0xba9176(0x1de)]))],_0x382135);const _0x332b0e=_0xba9176(0x254),_0x5d8a00={};var _0x4130d3=Object[_0xba9176(0x1e1)],_0x186062=Object[_0xba9176(0x200)],_0x3feb5=(_0x45daef,_0x461100,_0x3fba56,_0x543691)=>{for(var _0x4ff2d6=_0x543691>0x1?void 0x0:_0x543691?_0x186062(_0x461100,_0x3fba56):_0x461100,_0x2edfa8=_0x45daef['length']-0x1,_0xad6cc6;_0x2edfa8>=0x0;_0x2edfa8--)(_0xad6cc6=_0x45daef[_0x2edfa8])&&(_0x4ff2d6=(_0x543691?_0xad6cc6(_0x461100,_0x3fba56,_0x4ff2d6):_0xad6cc6(_0x4ff2d6))||_0x4ff2d6);return _0x543691&&_0x4ff2d6&&_0x4130d3(_0x461100,_0x3fba56,_0x4ff2d6),_0x4ff2d6;},_0x321f5a=(_0x514136,_0x447913)=>(_0xd3a594,_0x5a40e2)=>_0x447913(_0xd3a594,_0x5a40e2,_0x514136);function _0x2c6206(_0x58ce4b,_0x11e8b6){const _0x34c26e=_0xba9176,_0x226b08=_0x58ce4b['replies'][0x0];return{..._0x11e8b6,'id':_0x226b08[_0x34c26e(0x1e2)],'resolved':_0x58ce4b[_0x34c26e(0x1d8)]===0x1,'dT':_0x521e26(_0x226b08[_0x34c26e(0x204)]),'personId':_0x226b08[_0x34c26e(0x227)],'threadId':_0x226b08['threadId']};}function _0x1f7655(_0x3db542,_0x3c5ee4,_0x257556){const _0x1bc28f=_0xba9176;var _0x335db1,_0x5651c1;if(((_0x5651c1=(_0x335db1=_0x3db542==null?void 0x0:_0x3db542[_0x1bc28f(0x1e7)])==null?void 0x0:_0x335db1['length'])!=null?_0x5651c1:0x0)>0x0){const _0x4ac735=(_0x3c4072,_0x31d5bd)=>({'id':_0x3c4072[_0x1bc28f(0x1e2)],'threadId':_0x3c4072[_0x1bc28f(0x1d7)],'dT':_0x521e26(_0x3c4072[_0x1bc28f(0x204)]),'personId':_0x3c4072[_0x1bc28f(0x227)],'resolved':_0x3db542[_0x1bc28f(0x1d8)]===_0x2d0677[_0x1bc28f(0x1eb)],'unitId':_0x3c5ee4,'subUnitId':_0x257556,'text':JSON['parse'](_0x3c4072[_0x1bc28f(0x1da)]),'parentId':_0x31d5bd}),_0x42a1b9=_0x4ac735(_0x3db542[_0x1bc28f(0x1e7)][0x0]);return{..._0x42a1b9,'children':_0x3db542[_0x1bc28f(0x1e7)]['slice'](0x1)[_0x1bc28f(0x251)](_0x3b7baf=>_0x4ac735(_0x3b7baf,_0x42a1b9['id']))};}return null;}let _0x78f03c=class{constructor(_0x55fa8a,_0x3332c8,_0x137940,_0x35ea13){const _0x1162f4=_0xba9176;this[_0x1162f4(0x225)]=_0x55fa8a,this[_0x1162f4(0x1fa)]=_0x3332c8,this[_0x1162f4(0x216)]=_0x137940,this[_0x1162f4(0x20c)]=_0x35ea13;}async[_0xba9176(0x211)](_0x24d7cf){const _0x590d3f=_0xba9176;var _0x5b7fe1,_0x3379aa;const {parentId:_0x29f072,unitId:_0x30385c,text:_0x2e5433,threadId:_0x332a47}=_0x24d7cf,_0x4a5cae=(_0x3379aa=(_0x5b7fe1=_0x2e5433[_0x590d3f(0x24a)])==null?void 0x0:_0x5b7fe1[_0x590d3f(0x226)](_0x423ef9=>_0x423ef9[_0x590d3f(0x23e)]===_0x160b92[_0x590d3f(0x20d)][_0x590d3f(0x1ec)])[_0x590d3f(0x251)](_0x4aafe1=>_0x4aafe1[_0x590d3f(0x1f3)]))!=null?_0x3379aa:[],_0xcb785f=JSON[_0x590d3f(0x247)](_0x2e5433),_0x3121b9=(await this[_0x590d3f(0x216)][_0x590d3f(0x218)](_0x30385c))[_0x590d3f(0x1e4)]();if(_0x29f072){const _0x1faad6={'memberId':_0x3121b9,'unitId':_0x30385c,'content':_0xcb785f,'mention':_0x4a5cae,'threadId':_0x332a47},_0x4e5e34=(await this[_0x590d3f(0x225)][_0x590d3f(0x25a)](_0x590d3f(0x219)+_0x30385c+'/reply',{'body':_0x1faad6}))[_0x590d3f(0x1fc)][_0x590d3f(0x214)];return{..._0x24d7cf,'id':_0x4e5e34[_0x590d3f(0x1e2)],'dT':_0x160b92[_0x590d3f(0x206)](+_0x4e5e34['createTimestamp'])[_0x590d3f(0x24b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4e5e34[_0x590d3f(0x227)]};}else{const _0x4a7f83={'memberId':_0x3121b9,'unitId':_0x30385c,'content':_0xcb785f,'mention':_0x4a5cae},_0x445cac=await this['_httpService'][_0x590d3f(0x25a)](_0x590d3f(0x219)+_0x30385c+_0x590d3f(0x257),{'body':_0x4a7f83});return _0x2c6206(_0x445cac[_0x590d3f(0x1fc)][_0x590d3f(0x213)],_0x24d7cf);}}async['updateComment'](_0x3596f1){const _0x930f31=_0xba9176;var _0x4e5536,_0x679c7a;const {text:_0x492f6c,unitId:_0x3d5329}=_0x3596f1,_0x418d54=(_0x679c7a=(_0x4e5536=_0x492f6c[_0x930f31(0x24a)])==null?void 0x0:_0x4e5536[_0x930f31(0x226)](_0x11527c=>_0x11527c[_0x930f31(0x23e)]===_0x160b92[_0x930f31(0x20d)][_0x930f31(0x1ec)])[_0x930f31(0x251)](_0x13a924=>_0x13a924[_0x930f31(0x1f3)]))!=null?_0x679c7a:[],_0x1f66d5=JSON[_0x930f31(0x247)](_0x492f6c),_0xc45b25=_0x3596f1[_0x930f31(0x1d7)],_0x3be1e3=_0x3596f1['id'],_0x31cff2={'memberId':(await this['_sessionService'][_0x930f31(0x218)](_0x3d5329))[_0x930f31(0x1e4)](),'unitId':_0x3d5329,'threadId':_0xc45b25,'mention':_0x418d54,'content':_0x1f66d5,'replyId':_0x3be1e3},_0x17399e=await this[_0x930f31(0x225)]['post']('/universer-api/comment/unit/'+_0x3d5329+'/edit',{'body':_0x31cff2});return!_0x17399e[_0x930f31(0x1fc)][_0x930f31(0x22b)]||_0x17399e['body'][_0x930f31(0x22b)]['code']===0x1;}async[_0xba9176(0x256)](_0x390846){const _0x368b7e=_0xba9176,{unitId:_0x1e5d98}=_0x390846,_0x3c8678=_0x390846[_0x368b7e(0x1d7)],_0x280b06={'memberId':this[_0x368b7e(0x1fa)]['getCurrentUser']()[_0x368b7e(0x1df)],'unitId':_0x1e5d98,'threadId':_0x3c8678,'solved':_0x390846['resolved']?_0x2d0677['Solved']:_0x2d0677[_0x368b7e(0x1f6)]},_0x2b2438=await this[_0x368b7e(0x225)]['post'](_0x368b7e(0x219)+_0x1e5d98+'/solved',{'body':_0x280b06});return!_0x2b2438['body']['error']||_0x2b2438['body'][_0x368b7e(0x22b)]['code']===0x1;}async['deleteComment'](_0x5df6fd,_0x489a13,_0x237a4e,_0x485348){const _0x251761=_0xba9176,_0x363788={'memberId':(await this[_0x251761(0x216)]['requireSession'](_0x5df6fd))[_0x251761(0x1e4)](),'threadId':_0x237a4e,'replyId':_0x485348,'unitId':_0x5df6fd},_0x1de337=await this[_0x251761(0x225)][_0x251761(0x25a)](_0x251761(0x219)+_0x5df6fd+_0x251761(0x1fe),{'body':_0x363788});return!_0x1de337['body'][_0x251761(0x22b)]||_0x1de337[_0x251761(0x1fc)]['error']['code']===0x1;}async[_0xba9176(0x21e)](_0xaf5c59,_0x390a31,_0x262989){const _0x32a43a=_0xba9176,_0x5cfa6e={'unitId':_0xaf5c59,'threadId':_0x262989},_0x26337d=await this[_0x32a43a(0x225)][_0x32a43a(0x25a)]('/universer-api/comment/unit/'+_0xaf5c59+'/list',{'body':_0x5cfa6e}),_0x306f47=_0x262989[_0x32a43a(0x251)](_0x37264a=>_0x1f7655(_0x26337d[_0x32a43a(0x1fc)][_0x32a43a(0x22d)][_0x37264a],_0xaf5c59,_0x390a31))['filter'](Boolean);return Object[_0x32a43a(0x22f)](_0x26337d[_0x32a43a(0x1fc)][_0x32a43a(0x240)])['forEach'](_0x512c4f=>{const _0x58a42b=_0x32a43a;this[_0x58a42b(0x1fa)]['addUser'](_0x512c4f);}),_0x306f47;}['saveCommentToSnapshot'](_0x1f2f5d){return{'id':_0x1f2f5d['id'],'threadId':_0x1f2f5d['threadId'],'ref':_0x1f2f5d['ref']};}};_0x78f03c=_0x3feb5([_0x321f5a(0x0,_0x160b92[_0xba9176(0x1ee)](_0x519750[_0xba9176(0x24c)])),_0x321f5a(0x1,_0x160b92['Inject'](_0x160b92[_0xba9176(0x203)])),_0x321f5a(0x2,_0x160b92[_0xba9176(0x1ee)](_0x5f5cf2[_0xba9176(0x249)])),_0x321f5a(0x3,_0x160b92[_0xba9176(0x1ee)](_0x160b92['Injector']))],_0x78f03c);var _0x27dfc4=Object['defineProperty'],_0x332892=Object[_0xba9176(0x200)],_0x366438=(_0x4d26d5,_0x372943,_0x4ef713,_0x44f078)=>{const _0x2f3cba=_0xba9176;for(var _0x536a35=_0x44f078>0x1?void 0x0:_0x44f078?_0x332892(_0x372943,_0x4ef713):_0x372943,_0x3cae21=_0x4d26d5[_0x2f3cba(0x237)]-0x1,_0x34910e;_0x3cae21>=0x0;_0x3cae21--)(_0x34910e=_0x4d26d5[_0x3cae21])&&(_0x536a35=(_0x44f078?_0x34910e(_0x372943,_0x4ef713,_0x536a35):_0x34910e(_0x536a35))||_0x536a35);return _0x44f078&&_0x536a35&&_0x27dfc4(_0x372943,_0x4ef713,_0x536a35),_0x536a35;},_0x3b5494=(_0x465311,_0x2c7ca1)=>(_0x9a3ae3,_0x2f64d9)=>_0x2c7ca1(_0x9a3ae3,_0x2f64d9,_0x465311);let _0x1ca896=class extends _0x160b92[_0xba9176(0x1e6)]{constructor(_0x563c8f,_0x1bc32c){const _0x47b52e=_0xba9176;super(),this[_0x47b52e(0x1f0)]=_0x563c8f,this[_0x47b52e(0x22e)]=_0x1bc32c,this[_0x47b52e(0x1fb)]();}['_initDataSource'](){const _0x540ed6=_0xba9176;this['_threadCommentDataSourceService']['dataSource']=this[_0x540ed6(0x22e)],this[_0x540ed6(0x1f0)][_0x540ed6(0x229)]=!0x1;}};_0x1ca896=_0x366438([_0x3b5494(0x0,_0x366c04[_0xba9176(0x246)]),_0x3b5494(0x1,_0x160b92['Inject'](_0x78f03c))],_0x1ca896);var _0x4bcbc0=Object[_0xba9176(0x1e1)],_0x56940d=Object[_0xba9176(0x200)],_0x18e835=(_0xbd2c76,_0x4a449c,_0x23bb9b)=>_0x4a449c in _0xbd2c76?_0x4bcbc0(_0xbd2c76,_0x4a449c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23bb9b}):_0xbd2c76[_0x4a449c]=_0x23bb9b,_0x41b32e=(_0x3547bf,_0x31dea1,_0x11b543,_0x32cd80)=>{const _0x567daf=_0xba9176;for(var _0x3cb2df=_0x32cd80>0x1?void 0x0:_0x32cd80?_0x56940d(_0x31dea1,_0x11b543):_0x31dea1,_0x296d61=_0x3547bf[_0x567daf(0x237)]-0x1,_0x4c21df;_0x296d61>=0x0;_0x296d61--)(_0x4c21df=_0x3547bf[_0x296d61])&&(_0x3cb2df=(_0x32cd80?_0x4c21df(_0x31dea1,_0x11b543,_0x3cb2df):_0x4c21df(_0x3cb2df))||_0x3cb2df);return _0x32cd80&&_0x3cb2df&&_0x4bcbc0(_0x31dea1,_0x11b543,_0x3cb2df),_0x3cb2df;},_0x1c8dbc=(_0xa91c0f,_0x273bbd)=>(_0xb27f7,_0x5e93fa)=>_0x273bbd(_0xb27f7,_0x5e93fa,_0xa91c0f),_0x17247c=(_0x15c3f1,_0x4559d0,_0x40898f)=>_0x18e835(_0x15c3f1,typeof _0x4559d0!='symbol'?_0x4559d0+'':_0x4559d0,_0x40898f);_0x2718f4['UniverThreadCommentDataSourcePlugin']=class extends _0x160b92['Plugin']{constructor(_0x55017a=_0x5d8a00,_0x17a784,_0x566a75){const _0x331f16=_0xba9176;super(),this[_0x331f16(0x220)]=_0x55017a,this[_0x331f16(0x20c)]=_0x17a784,this[_0x331f16(0x1db)]=_0x566a75;const {..._0x8b8f34}=_0x160b92['merge']({},_0x5d8a00,this['_config']);this[_0x331f16(0x1db)][_0x331f16(0x23a)](_0x332b0e,_0x8b8f34);}[_0xba9176(0x20e)](){const _0x39ba51=_0xba9176;[[_0x78f03c],[_0x1ca896],[_0x382135]][_0x39ba51(0x1e0)](_0x2a6f96=>{const _0x5e495c=_0x39ba51;this[_0x5e495c(0x20c)][_0x5e495c(0x238)](_0x2a6f96);});}[_0xba9176(0x23f)](){const _0x2787c4=_0xba9176;this[_0x2787c4(0x20c)][_0x2787c4(0x234)](_0x1ca896),this[_0x2787c4(0x20c)]['get'](_0x382135);}},_0x17247c(_0x2718f4['UniverThreadCommentDataSourcePlugin'],_0xba9176(0x205),_0x522b00),_0x17247c(_0x2718f4['UniverThreadCommentDataSourcePlugin'],_0xba9176(0x1ea),_0x160b92[_0xba9176(0x245)]['UNIVER_UNKNOWN']),_0x2718f4[_0xba9176(0x21d)]=_0x41b32e([_0x160b92[_0xba9176(0x208)](_0x160ee0[_0xba9176(0x222)],_0x5f5cf2[_0xba9176(0x235)],_0xea7ec2[_0xba9176(0x243)]),_0x1c8dbc(0x1,_0x160b92[_0xba9176(0x1ee)](_0x160b92[_0xba9176(0x1de)])),_0x1c8dbc(0x2,_0x160b92[_0xba9176(0x233)])],_0x2718f4[_0xba9176(0x21d)]),Object[_0xba9176(0x1e1)](_0x2718f4,Symbol[_0xba9176(0x1f7)],{'value':_0xba9176(0x20b)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.5.5
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.5.5
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.5.5",
|
|
49
|
+
"@univerjs/core": "0.5.5",
|
|
50
|
+
"@univerjs-pro/license": "0.5.5",
|
|
51
|
+
"@univerjs/network": "0.5.5",
|
|
51
52
|
"@univerjs/protocol": "0.1.42",
|
|
52
|
-
"@univerjs/thread-comment": "0.5.5
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs/core": "0.5.5-nightly.202501220324"
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.5.5",
|
|
54
|
+
"@univerjs/thread-comment": "0.5.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|