@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506081606 → 0.8.0-nightly.202506101607

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x21325b=_0x46a9;(function(_0x2aeb16,_0x2f1503){const _0x36ae43=_0x46a9,_0x2672b6=_0x2aeb16();while(!![]){try{const _0x225948=parseInt(_0x36ae43(0xf3))/0x1*(-parseInt(_0x36ae43(0xf1))/0x2)+-parseInt(_0x36ae43(0x159))/0x3*(parseInt(_0x36ae43(0x161))/0x4)+-parseInt(_0x36ae43(0x13b))/0x5+-parseInt(_0x36ae43(0x14b))/0x6+parseInt(_0x36ae43(0x141))/0x7+parseInt(_0x36ae43(0xe7))/0x8*(-parseInt(_0x36ae43(0xea))/0x9)+parseInt(_0x36ae43(0x14d))/0xa;if(_0x225948===_0x2f1503)break;else _0x2672b6['push'](_0x2672b6['shift']());}catch(_0x2bcbd7){_0x2672b6['push'](_0x2672b6['shift']());}}}(_0x4f79,0x9327b));function _0x4f79(){const _0x335382=['pluginName','Module','userID','thread-comment-data-source.config','reply','UniverInstanceType','rxjs','resolveComment','_sessionService','requireSession','listComments','2616745xHiQZv','merge','error','Unknown','getMemberID','/add','6903617xGnvno','addComment','bufferTime','delete','getCurrentUser','_configService','UserManagerService','IThreadCommentDataSourceService','_commentService','_injector','4496202aoWWdE','replies','33274430SOKhvH','_userService','post','CustomRangeType','parentId','get','createTimestamp','forEach','disposeWithMe','/reply','format','parse','370338uOGoKl','_threadCommentDataSource','onStarting','_config','user','/solved','UNIVER_UNKNOWN','pipe','12ftLPBM','Injector','filter','rangeId','content','Reply','8iVyMbT','getOwnPropertyDescriptor','subscribe','8823537dyVyfG','Delete','UniverCollaborationClientPlugin','root','_init','payload','YYYY/MM/DD\x20HH:mm','8PUebRv','replyId','271870pmIyvw','@univerjs/network','defineProperty','userId','_initDataSource','threadId','toStringTag','users','_threadCommentModel','length','/universer-api/user/list','size','UNRECOGNIZED','@univerjs/thread-comment-ui','/list','getComment','addUser','ThreadCommentModel','customRanges','HTTPService','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','code','OpenOrReOpen','@univerjs/core','IConfigService','Disposable','symbol','UniverLicensePlugin','Plugin','dayjs','UniverThreadCommentUIPlugin','CollaborationSessionService','Solved','stringify','@univerjs/thread-comment','_httpService','solved','deleteComment','COMMENT','body','Add','rangeType','unitId','ref','values','Inject','commentUpdate$','comment','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','getUnit','personId','map','Edit','find','add','Solve','type'];_0x4f79=function(){return _0x335382;};return _0x4f79();}Object[_0x21325b(0xf5)](exports,Symbol[_0x21325b(0xf9)],{'value':_0x21325b(0x131)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x21325b(0x10c)),j=require(_0x21325b(0x100)),M=require(_0x21325b(0x117)),w=require(_0x21325b(0x136)),P=require(_0x21325b(0xf4)),U=_0x21325b(0x126);var I=(_0x4e2ac=>(_0x4e2ac[_0x4e2ac[_0x21325b(0x10b)]=0x0]=_0x21325b(0x10b),_0x4e2ac[_0x4e2ac[_0x21325b(0x115)]=0x1]='Solved',_0x4e2ac[_0x4e2ac[_0x21325b(0xff)]=-0x1]=_0x21325b(0xff),_0x4e2ac))(I||{}),v=(_0x1abbec=>(_0x1abbec[_0x1abbec[_0x21325b(0x13e)]=0x0]=_0x21325b(0x13e),_0x1abbec[_0x1abbec['Add']=0x1]=_0x21325b(0x11d),_0x1abbec[_0x1abbec[_0x21325b(0xe6)]=0x2]=_0x21325b(0xe6),_0x1abbec[_0x1abbec[_0x21325b(0x12b)]=0x3]=_0x21325b(0x12b),_0x1abbec[_0x1abbec['Delete']=0x4]='Delete',_0x1abbec[_0x1abbec[_0x21325b(0x12e)]=0x5]=_0x21325b(0x12e),_0x1abbec[_0x1abbec[_0x21325b(0xff)]=-0x1]=_0x21325b(0xff),_0x1abbec))(v||{});const f=_0x252afa=>c['dayjs'](new Date(+_0x252afa))[_0x21325b(0x157)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x4905b5,_0x3207c3)=>{const _0x54b041=_0x21325b,_0x144cea=_0x4905b5['get'](c[_0x54b041(0x147)]),_0x479df8=_0x4905b5[_0x54b041(0x152)](P[_0x54b041(0x106)]);_0x3207c3[_0x54b041(0x154)](_0x803e65=>{const _0x5e33f6=_0x54b041;_0x144cea['getUser'](_0x803e65)&&_0x3207c3[_0x5e33f6(0x144)](_0x803e65);}),_0x3207c3[_0x54b041(0xfe)]&&(await _0x479df8[_0x54b041(0x152)](_0x54b041(0xfd),{'params':{'userIDs':[..._0x3207c3]}}))[_0x54b041(0x11c)][_0x54b041(0xfa)][_0x54b041(0x154)](_0x4baf69=>{const _0x51a572=_0x54b041;_0x4baf69&&_0x144cea[_0x51a572(0x103)](_0x4baf69);});};function _0x46a9(_0x55db11,_0x45e520){const _0x4f7938=_0x4f79();return _0x46a9=function(_0x46a9ae,_0x18998e){_0x46a9ae=_0x46a9ae-0xe4;let _0x2d6e04=_0x4f7938[_0x46a9ae];return _0x2d6e04;},_0x46a9(_0x55db11,_0x45e520);}var $=Object[_0x21325b(0xe8)],E=(_0x4d0469,_0x5ad803,_0x38006e,_0x5bbc6c)=>{const _0x429d04=_0x21325b;for(var _0x22aac3=_0x5bbc6c>0x1?void 0x0:_0x5bbc6c?$(_0x5ad803,_0x38006e):_0x5ad803,_0x3cadf6=_0x4d0469[_0x429d04(0xfc)]-0x1,_0x5190e9;_0x3cadf6>=0x0;_0x3cadf6--)(_0x5190e9=_0x4d0469[_0x3cadf6])&&(_0x22aac3=_0x5190e9(_0x22aac3)||_0x22aac3);return _0x22aac3;},S=(_0x596189,_0x2a103c)=>(_0x3f9362,_0x2a7b61)=>_0x2a103c(_0x3f9362,_0x2a7b61,_0x596189);let p=class extends c[_0x21325b(0x10e)]{constructor(_0x1342a6,_0x498522,_0x1589c8,_0x4c3b06){const _0x26f142=_0x21325b;super(),this[_0x26f142(0x149)]=_0x1342a6,this[_0x26f142(0xfb)]=_0x498522,this[_0x26f142(0x14e)]=_0x1589c8,this[_0x26f142(0x14a)]=_0x4c3b06,this[_0x26f142(0xee)](),this['_initUserSync']();}[_0x21325b(0x125)](){const _0x58bfe4=_0x21325b;this[_0x58bfe4(0x155)](this['_threadCommentModel'][_0x58bfe4(0x123)][_0x58bfe4(0x160)](w[_0x58bfe4(0x143)](0x10))['subscribe'](_0x114c04=>{const _0x5ce6d7=_0x58bfe4,_0x2e92f0=new Set();_0x114c04[_0x5ce6d7(0x154)](_0x28c10b=>{const _0x302a8d=_0x5ce6d7;switch(_0x28c10b['type']){case _0x302a8d(0x12d):{const _0x1ac7a8=_0x28c10b[_0x302a8d(0xef)][_0x302a8d(0x129)];_0x2e92f0[_0x302a8d(0x12d)](_0x1ac7a8);break;}}}),R(this[_0x5ce6d7(0x14a)],_0x2e92f0);}));}[_0x21325b(0xee)](){const _0x3c5e9b=_0x21325b;this['disposeWithMe'](this[_0x3c5e9b(0x149)][_0x3c5e9b(0x123)][_0x3c5e9b(0xe9)](async _0x50e4db=>{const _0x3c3319=_0x3c5e9b;var _0x14e0ab,_0x68a8ce,_0xf89c,_0x1e7009;const _0x345019=(_0x14e0ab=this[_0x3c3319(0xfb)][_0x3c3319(0x128)](_0x50e4db[_0x3c3319(0x11f)])[_0x3c3319(0x12c)](_0x129791=>_0x129791[_0x3c3319(0xf8)]===_0x50e4db[_0x3c3319(0xf8)]))==null?void 0x0:_0x14e0ab[_0x3c3319(0xed)];if(!_0x345019)return;const {unitId:_0x49b96b,subUnitId:_0x28c2b1}=_0x345019;switch(_0x50e4db[_0x3c3319(0x15d)]&&this['_userService'][_0x3c3319(0x103)](_0x50e4db[_0x3c3319(0x15d)]),_0x50e4db['type']){case v[_0x3c3319(0x11d)]:break;case v[_0x3c3319(0xe6)]:{this[_0x3c3319(0xfb)][_0x3c3319(0x142)](_0x49b96b,_0x28c2b1,{'unitId':_0x49b96b,'subUnitId':_0x28c2b1,'ref':'','id':_0x50e4db['replyId'],'dT':f(+_0x50e4db[_0x3c3319(0x153)]),'threadId':_0x50e4db['threadId'],'personId':(_0xf89c=(_0x68a8ce=_0x50e4db[_0x3c3319(0x15d)])==null?void 0x0:_0x68a8ce[_0x3c3319(0x132)])!=null?_0xf89c:_0x50e4db[_0x3c3319(0xf6)],'text':JSON['parse'](_0x50e4db[_0x3c3319(0xe5)]),'parentId':_0x345019['id']});break;}case v[_0x3c3319(0xeb)]:{const _0x4e84df=this['_threadCommentModel'][_0x3c3319(0x102)](_0x49b96b,_0x28c2b1,_0x50e4db[_0x3c3319(0xf2)]);_0x4e84df&&_0x4e84df[_0x3c3319(0x151)]&&this['_threadCommentModel'][_0x3c3319(0x11a)](_0x49b96b,_0x28c2b1,_0x50e4db[_0x3c3319(0xf2)]);break;}case v['Edit']:{this[_0x3c3319(0xfb)]['updateComment'](_0x49b96b,_0x28c2b1,{'commentId':_0x50e4db[_0x3c3319(0xf2)],'text':JSON['parse'](_0x50e4db[_0x3c3319(0xe5)])});break;}case v[_0x3c3319(0x12e)]:{const _0x4c53f9=(_0x1e7009=this[_0x3c3319(0xfb)]['getUnit'](_0x50e4db[_0x3c3319(0x11f)])['find'](_0x1e57b1=>_0x1e57b1[_0x3c3319(0xf8)]===_0x50e4db[_0x3c3319(0xf8)]))==null?void 0x0:_0x1e7009[_0x3c3319(0xed)];_0x4c53f9&&this['_threadCommentModel']['resolveComment'](_0x49b96b,_0x28c2b1,_0x4c53f9['id'],_0x50e4db[_0x3c3319(0x119)]===I[_0x3c3319(0x115)]);break;}}}));}};p=E([S(0x0,c[_0x21325b(0x122)](b['CommentService'])),S(0x1,c[_0x21325b(0x122)](M[_0x21325b(0x104)])),S(0x2,c[_0x21325b(0x122)](c[_0x21325b(0x147)])),S(0x3,c['Inject'](c[_0x21325b(0x162)]))],p);const q=_0x21325b(0x133),D={};var A=Object[_0x21325b(0xe8)],x=(_0x441b03,_0x5edd81,_0x4afd58,_0xed62a8)=>{for(var _0x36c987=_0xed62a8>0x1?void 0x0:_0xed62a8?A(_0x5edd81,_0x4afd58):_0x5edd81,_0x2c9aea=_0x441b03['length']-0x1,_0x5d265a;_0x2c9aea>=0x0;_0x2c9aea--)(_0x5d265a=_0x441b03[_0x2c9aea])&&(_0x36c987=_0x5d265a(_0x36c987)||_0x36c987);return _0x36c987;},_=(_0x1ea148,_0x72ad5e)=>(_0x4a30c9,_0x5d9588)=>_0x72ad5e(_0x4a30c9,_0x5d9588,_0x1ea148);function Y(_0x4e99c3,_0x19091f){const _0x30078b=_0x21325b,_0x29ce43=_0x4e99c3[_0x30078b(0x14c)][0x0];return{..._0x19091f,'id':_0x29ce43['replyId'],'resolved':_0x4e99c3[_0x30078b(0x119)]===0x1,'dT':f(_0x29ce43[_0x30078b(0x153)]),'personId':_0x29ce43[_0x30078b(0xf6)],'threadId':_0x29ce43['threadId']};}function G(_0x1363aa,_0x1e09b2,_0x4cfe0d){const _0x477480=_0x21325b;var _0x3c6b64,_0x1cca4e;if(((_0x1cca4e=(_0x3c6b64=_0x1363aa==null?void 0x0:_0x1363aa[_0x477480(0x14c)])==null?void 0x0:_0x3c6b64[_0x477480(0xfc)])!=null?_0x1cca4e:0x0)>0x0){const _0x11a92d=(_0x4cd4b9,_0x399fe0)=>({'id':_0x4cd4b9['replyId'],'threadId':_0x4cd4b9[_0x477480(0xf8)],'dT':f(_0x4cd4b9['createTimestamp']),'personId':_0x4cd4b9[_0x477480(0xf6)],'resolved':_0x1363aa[_0x477480(0x119)]===I[_0x477480(0x115)],'unitId':_0x1e09b2,'subUnitId':_0x4cfe0d,'text':JSON[_0x477480(0x158)](_0x4cd4b9[_0x477480(0xe5)]),'parentId':_0x399fe0}),_0x592814=_0x11a92d(_0x1363aa[_0x477480(0x14c)][0x0]);return{..._0x592814,'children':_0x1363aa[_0x477480(0x14c)][_0x477480(0x127)](0x1)['map'](_0x40069c=>_0x11a92d(_0x40069c,_0x592814['id']))};}return null;}let g=class{constructor(_0x3fa6b6,_0x38107c,_0x4d3000,_0x5931f1){const _0x223fc0=_0x21325b;this[_0x223fc0(0x118)]=_0x3fa6b6,this['_userService']=_0x38107c,this[_0x223fc0(0x138)]=_0x4d3000,this[_0x223fc0(0x14a)]=_0x5931f1;}async['addComment'](_0xc7a085){const _0x35fede=_0x21325b;var _0x18c24e,_0x99a67f;const {parentId:_0x35969b,unitId:_0x103b37,text:_0xf6d774,threadId:_0x28fd81}=_0xc7a085,_0x2e373d=(_0x99a67f=(_0x18c24e=_0xf6d774[_0x35fede(0x105)])==null?void 0x0:_0x18c24e['filter'](_0x432964=>_0x432964[_0x35fede(0x11e)]===c[_0x35fede(0x150)]['COMMENT'])[_0x35fede(0x12a)](_0x8f8577=>_0x8f8577[_0x35fede(0xe4)]))!=null?_0x99a67f:[],_0x5bcadb=JSON['stringify'](_0xf6d774),_0x3a9495=(await this[_0x35fede(0x138)][_0x35fede(0x139)](_0x103b37))[_0x35fede(0x13f)]();if(_0x35969b){const _0x532d6e={'memberId':_0x3a9495,'unitId':_0x103b37,'content':_0x5bcadb,'mention':_0x2e373d,'threadId':_0x28fd81},_0x5000e9=(await this[_0x35fede(0x118)][_0x35fede(0x14f)](_0x35fede(0x109)+_0x103b37+_0x35fede(0x156),{'body':_0x532d6e}))[_0x35fede(0x11c)][_0x35fede(0x134)];return{..._0xc7a085,'id':_0x5000e9[_0x35fede(0xf2)],'dT':c[_0x35fede(0x112)](+_0x5000e9[_0x35fede(0x153)])[_0x35fede(0x157)](_0x35fede(0xf0)),'personId':_0x5000e9[_0x35fede(0xf6)]};}else{const _0x1ca4c5={'memberId':_0x3a9495,'unitId':_0x103b37,'content':_0x5bcadb,'mention':_0x2e373d},_0x4bc4c8=await this[_0x35fede(0x118)]['post'](_0x35fede(0x109)+_0x103b37+_0x35fede(0x140),{'body':_0x1ca4c5});return Y(_0x4bc4c8[_0x35fede(0x11c)][_0x35fede(0x124)],_0xc7a085);}}async['updateComment'](_0x1e70d6){const _0x556b42=_0x21325b;var _0x5085e3,_0x279bf6;const {text:_0x14fc6b,unitId:_0x2e1c0b}=_0x1e70d6,_0x573b1a=(_0x279bf6=(_0x5085e3=_0x14fc6b[_0x556b42(0x105)])==null?void 0x0:_0x5085e3[_0x556b42(0x163)](_0x319de6=>_0x319de6[_0x556b42(0x11e)]===c[_0x556b42(0x150)][_0x556b42(0x11b)])[_0x556b42(0x12a)](_0x5c8459=>_0x5c8459[_0x556b42(0xe4)]))!=null?_0x279bf6:[],_0x355146=JSON[_0x556b42(0x116)](_0x14fc6b),_0x27a64b=_0x1e70d6[_0x556b42(0xf8)],_0x16af89=_0x1e70d6['id'],_0x4a932a={'memberId':(await this['_sessionService'][_0x556b42(0x139)](_0x2e1c0b))[_0x556b42(0x13f)](),'unitId':_0x2e1c0b,'threadId':_0x27a64b,'mention':_0x573b1a,'content':_0x355146,'replyId':_0x16af89},_0x2ac193=await this[_0x556b42(0x118)]['post'](_0x556b42(0x109)+_0x2e1c0b+'/edit',{'body':_0x4a932a});return!_0x2ac193[_0x556b42(0x11c)][_0x556b42(0x13d)]||_0x2ac193[_0x556b42(0x11c)][_0x556b42(0x13d)][_0x556b42(0x10a)]===0x1;}async[_0x21325b(0x137)](_0x5aab2f){const _0x91a5a1=_0x21325b,{unitId:_0x573e02}=_0x5aab2f,_0x7967dc=_0x5aab2f['threadId'],_0x43d23d={'memberId':this[_0x91a5a1(0x14e)][_0x91a5a1(0x145)]()[_0x91a5a1(0x132)],'unitId':_0x573e02,'threadId':_0x7967dc,'solved':_0x5aab2f['resolved']?I['Solved']:I[_0x91a5a1(0x10b)]},_0x376f94=await this[_0x91a5a1(0x118)][_0x91a5a1(0x14f)](_0x91a5a1(0x109)+_0x573e02+_0x91a5a1(0x15e),{'body':_0x43d23d});return!_0x376f94[_0x91a5a1(0x11c)][_0x91a5a1(0x13d)]||_0x376f94[_0x91a5a1(0x11c)]['error'][_0x91a5a1(0x10a)]===0x1;}async[_0x21325b(0x11a)](_0x3c8435,_0x17ee20,_0x5c4dac,_0x54d7f4){const _0xc81f88=_0x21325b,_0xaadcc={'memberId':(await this[_0xc81f88(0x138)][_0xc81f88(0x139)](_0x3c8435))[_0xc81f88(0x13f)](),'threadId':_0x5c4dac,'replyId':_0x54d7f4,'unitId':_0x3c8435},_0x59cedd=await this[_0xc81f88(0x118)][_0xc81f88(0x14f)](_0xc81f88(0x109)+_0x3c8435+'/delete',{'body':_0xaadcc});return!_0x59cedd[_0xc81f88(0x11c)][_0xc81f88(0x13d)]||_0x59cedd['body'][_0xc81f88(0x13d)][_0xc81f88(0x10a)]===0x1;}async[_0x21325b(0x13a)](_0x4214f0,_0xdd3913,_0x21bba4){const _0x472bac=_0x21325b,_0x10b300={'unitId':_0x4214f0,'threadId':_0x21bba4},_0x5739f2=await this[_0x472bac(0x118)][_0x472bac(0x14f)](_0x472bac(0x109)+_0x4214f0+_0x472bac(0x101),{'body':_0x10b300}),_0x139bf9=_0x21bba4[_0x472bac(0x12a)](_0x1a25b4=>G(_0x5739f2[_0x472bac(0x11c)]['comments'][_0x1a25b4],_0x4214f0,_0xdd3913))[_0x472bac(0x163)](Boolean);return Object[_0x472bac(0x121)](_0x5739f2['body'][_0x472bac(0xfa)])[_0x472bac(0x154)](_0x3031b4=>{const _0x47505d=_0x472bac;this[_0x47505d(0x14e)][_0x47505d(0x103)](_0x3031b4);}),_0x139bf9;}['saveCommentToSnapshot'](_0x34a0ae){const _0x36e751=_0x21325b;return{'id':_0x34a0ae['id'],'threadId':_0x34a0ae['threadId'],'ref':_0x34a0ae[_0x36e751(0x120)]};}};g=x([_(0x0,c[_0x21325b(0x122)](P[_0x21325b(0x106)])),_(0x1,c[_0x21325b(0x122)](c['UserManagerService'])),_(0x2,c[_0x21325b(0x122)](b[_0x21325b(0x114)])),_(0x3,c[_0x21325b(0x122)](c[_0x21325b(0x162)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x32f5d6,_0x4077cc,_0x179f8c,_0x59b948)=>{const _0x398eb4=_0x21325b;for(var _0x22879f=_0x59b948>0x1?void 0x0:_0x59b948?H(_0x4077cc,_0x179f8c):_0x4077cc,_0x25c3e0=_0x32f5d6[_0x398eb4(0xfc)]-0x1,_0x4c5ab7;_0x25c3e0>=0x0;_0x25c3e0--)(_0x4c5ab7=_0x32f5d6[_0x25c3e0])&&(_0x22879f=_0x4c5ab7(_0x22879f)||_0x22879f);return _0x22879f;},y=(_0x54b555,_0xbbd3fc)=>(_0x3d706c,_0x56415a)=>_0xbbd3fc(_0x3d706c,_0x56415a,_0x54b555);let C=class extends c[_0x21325b(0x10e)]{constructor(_0x39f347,_0x2e6910){const _0x4f2ce6=_0x21325b;super(),this['_threadCommentDataSourceService']=_0x39f347,this[_0x4f2ce6(0x15a)]=_0x2e6910,this[_0x4f2ce6(0xf7)]();}[_0x21325b(0xf7)](){const _0xda75b8=_0x21325b;this[_0xda75b8(0x107)]['dataSource']=this[_0xda75b8(0x15a)],this[_0xda75b8(0x107)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x21325b(0x148)]),y(0x1,c[_0x21325b(0x122)](g))],C);var F=Object[_0x21325b(0xf5)],L=Object[_0x21325b(0xe8)],Z=(_0x1da269,_0x10da19,_0x29adf9)=>_0x10da19 in _0x1da269?F(_0x1da269,_0x10da19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29adf9}):_0x1da269[_0x10da19]=_0x29adf9,W=(_0x5b09ab,_0x35c451,_0x1030c7,_0x27fea2)=>{const _0x49d702=_0x21325b;for(var _0x478d68=_0x27fea2>0x1?void 0x0:_0x27fea2?L(_0x35c451,_0x1030c7):_0x35c451,_0x45d431=_0x5b09ab[_0x49d702(0xfc)]-0x1,_0x1858d4;_0x45d431>=0x0;_0x45d431--)(_0x1858d4=_0x5b09ab[_0x45d431])&&(_0x478d68=_0x1858d4(_0x478d68)||_0x478d68);return _0x478d68;},O=(_0x31212d,_0x27426f)=>(_0x2e5695,_0x2d1c0a)=>_0x27426f(_0x2e5695,_0x2d1c0a,_0x31212d),N=(_0xd0aa7f,_0x49024d,_0x456771)=>Z(_0xd0aa7f,typeof _0x49024d!=_0x21325b(0x10f)?_0x49024d+'':_0x49024d,_0x456771);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x21325b(0x111)]{constructor(_0xe0722c=D,_0x351257,_0x21f43b){const _0x119606=_0x21325b;super(),this[_0x119606(0x15c)]=_0xe0722c,this[_0x119606(0x14a)]=_0x351257,this['_configService']=_0x21f43b;const {..._0x45c58e}=c[_0x119606(0x13c)]({},D,this[_0x119606(0x15c)]);this[_0x119606(0x146)]['setConfig'](q,_0x45c58e);}[_0x21325b(0x15b)](){const _0x13b2ad=_0x21325b;[[g],[C],[p]][_0x13b2ad(0x154)](_0x4468da=>{const _0x4a0306=_0x13b2ad;this[_0x4a0306(0x14a)][_0x4a0306(0x12d)](_0x4468da);});}['onReady'](){const _0x376b38=_0x21325b;this[_0x376b38(0x14a)][_0x376b38(0x152)](C),this[_0x376b38(0x14a)][_0x376b38(0x152)](p);}},N(exports[_0x21325b(0x108)],_0x21325b(0x130),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x21325b(0x12f),c[_0x21325b(0x135)][_0x21325b(0x15f)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x21325b(0x113)],b[_0x21325b(0xec)],T[_0x21325b(0x110)]),O(0x1,c[_0x21325b(0x122)](c['Injector'])),O(0x2,c[_0x21325b(0x10d)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0xc4cba8=_0x4577;(function(_0x5676a5,_0x2fd5c0){const _0x3ac769=_0x4577,_0x1eec18=_0x5676a5();while(!![]){try{const _0x2cd39e=-parseInt(_0x3ac769(0x1cf))/0x1+parseInt(_0x3ac769(0x1df))/0x2*(parseInt(_0x3ac769(0x1dd))/0x3)+parseInt(_0x3ac769(0x1c4))/0x4+parseInt(_0x3ac769(0x1b1))/0x5*(-parseInt(_0x3ac769(0x1ce))/0x6)+-parseInt(_0x3ac769(0x1c3))/0x7*(-parseInt(_0x3ac769(0x18b))/0x8)+-parseInt(_0x3ac769(0x1da))/0x9*(parseInt(_0x3ac769(0x1d3))/0xa)+-parseInt(_0x3ac769(0x1d6))/0xb*(-parseInt(_0x3ac769(0x1c1))/0xc);if(_0x2cd39e===_0x2fd5c0)break;else _0x1eec18['push'](_0x1eec18['shift']());}catch(_0x1bc8cd){_0x1eec18['push'](_0x1eec18['shift']());}}}(_0x4c7c,0xcde42));Object[_0xc4cba8(0x1aa)](exports,Symbol['toStringTag'],{'value':_0xc4cba8(0x1d9)});const b=require(_0xc4cba8(0x17d)),T=require(_0xc4cba8(0x1b6)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0xc4cba8(0x1a7)),w=require('rxjs'),P=require(_0xc4cba8(0x1cd)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2d0a55=>(_0x2d0a55[_0x2d0a55[_0xc4cba8(0x1d8)]=0x0]=_0xc4cba8(0x1d8),_0x2d0a55[_0x2d0a55['Solved']=0x1]=_0xc4cba8(0x1cc),_0x2d0a55[_0x2d0a55[_0xc4cba8(0x1a6)]=-0x1]=_0xc4cba8(0x1a6),_0x2d0a55))(I||{}),v=(_0x16ab1b=>(_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1be)]=0x0]='Unknown',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1ba)]=0x1]='Add',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x19d)]=0x2]='Reply',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1b4)]=0x3]=_0xc4cba8(0x1b4),_0x16ab1b[_0x16ab1b['Delete']=0x4]='Delete',_0x16ab1b[_0x16ab1b[_0xc4cba8(0x18e)]=0x5]=_0xc4cba8(0x18e),_0x16ab1b[_0x16ab1b[_0xc4cba8(0x1a6)]=-0x1]=_0xc4cba8(0x1a6),_0x16ab1b))(v||{});const f=_0x12c774=>c['dayjs'](new Date(+_0x12c774))[_0xc4cba8(0x1b0)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x572715,_0x5c2ead)=>{const _0x3836fc=_0xc4cba8,_0x5b13e4=_0x572715[_0x3836fc(0x1a5)](c[_0x3836fc(0x1bf)]),_0xc57886=_0x572715[_0x3836fc(0x1a5)](P[_0x3836fc(0x195)]);_0x5c2ead[_0x3836fc(0x193)](_0x4b5e1f=>{const _0x781974=_0x3836fc;_0x5b13e4[_0x781974(0x1bc)](_0x4b5e1f)&&_0x5c2ead['delete'](_0x4b5e1f);}),_0x5c2ead[_0x3836fc(0x1cb)]&&(await _0xc57886[_0x3836fc(0x1a5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c2ead]}}))[_0x3836fc(0x19c)][_0x3836fc(0x1a8)]['forEach'](_0x515360=>{const _0x5c978d=_0x3836fc;_0x515360&&_0x5b13e4[_0x5c978d(0x194)](_0x515360);});};var $=Object[_0xc4cba8(0x1d0)],E=(_0x42dc96,_0x54ffe3,_0x3201b7,_0x318f39)=>{const _0x490b2d=_0xc4cba8;for(var _0x183de8=_0x318f39>0x1?void 0x0:_0x318f39?$(_0x54ffe3,_0x3201b7):_0x54ffe3,_0x53d414=_0x42dc96[_0x490b2d(0x188)]-0x1,_0x41e315;_0x53d414>=0x0;_0x53d414--)(_0x41e315=_0x42dc96[_0x53d414])&&(_0x183de8=_0x41e315(_0x183de8)||_0x183de8);return _0x183de8;},S=(_0xc232f8,_0x5f2f51)=>(_0x57641c,_0x4cccaa)=>_0x5f2f51(_0x57641c,_0x4cccaa,_0xc232f8);let p=class extends c['Disposable']{constructor(_0x14a443,_0x3dd47f,_0x188029,_0x16e356){const _0x154097=_0xc4cba8;super(),this[_0x154097(0x180)]=_0x14a443,this[_0x154097(0x187)]=_0x3dd47f,this[_0x154097(0x190)]=_0x188029,this[_0x154097(0x1d1)]=_0x16e356,this[_0x154097(0x18c)](),this[_0x154097(0x1c8)]();}['_initUserSync'](){const _0x596ccd=_0xc4cba8;this['disposeWithMe'](this[_0x596ccd(0x187)]['commentUpdate$'][_0x596ccd(0x1e3)](w['bufferTime'](0x10))[_0x596ccd(0x19e)](_0x3db895=>{const _0x2db8a1=_0x596ccd,_0x14e597=new Set();_0x3db895[_0x2db8a1(0x193)](_0x3cfee7=>{const _0x2678f0=_0x2db8a1;switch(_0x3cfee7[_0x2678f0(0x177)]){case _0x2678f0(0x198):{const _0x1e4c52=_0x3cfee7[_0x2678f0(0x186)][_0x2678f0(0x185)];_0x14e597[_0x2678f0(0x198)](_0x1e4c52);break;}}}),R(this['_injector'],_0x14e597);}));}[_0xc4cba8(0x18c)](){const _0x2c81d1=_0xc4cba8;this['disposeWithMe'](this[_0x2c81d1(0x180)][_0x2c81d1(0x1c2)]['subscribe'](async _0x5cd385=>{const _0x22b832=_0x2c81d1;var _0x22a00a,_0x3ed4d5,_0x570550,_0xa46408;const _0x249ff3=(_0x22a00a=this[_0x22b832(0x187)][_0x22b832(0x174)](_0x5cd385[_0x22b832(0x1c0)])[_0x22b832(0x18f)](_0x823f21=>_0x823f21[_0x22b832(0x17e)]===_0x5cd385['threadId']))==null?void 0x0:_0x22a00a[_0x22b832(0x179)];if(!_0x249ff3)return;const {unitId:_0x5af4c3,subUnitId:_0x460d6c}=_0x249ff3;switch(_0x5cd385[_0x22b832(0x1b8)]&&this['_userService'][_0x22b832(0x194)](_0x5cd385['user']),_0x5cd385[_0x22b832(0x177)]){case v[_0x22b832(0x1ba)]:break;case v[_0x22b832(0x19d)]:{this[_0x22b832(0x187)][_0x22b832(0x183)](_0x5af4c3,_0x460d6c,{'unitId':_0x5af4c3,'subUnitId':_0x460d6c,'ref':'','id':_0x5cd385[_0x22b832(0x1ab)],'dT':f(+_0x5cd385['createTimestamp']),'threadId':_0x5cd385[_0x22b832(0x17e)],'personId':(_0x570550=(_0x3ed4d5=_0x5cd385[_0x22b832(0x1b8)])==null?void 0x0:_0x3ed4d5[_0x22b832(0x17c)])!=null?_0x570550:_0x5cd385[_0x22b832(0x1a4)],'text':JSON[_0x22b832(0x1ca)](_0x5cd385[_0x22b832(0x1ae)]),'parentId':_0x249ff3['id']});break;}case v[_0x22b832(0x1e0)]:{const _0x3c42ec=this[_0x22b832(0x187)]['getComment'](_0x5af4c3,_0x460d6c,_0x5cd385[_0x22b832(0x1ab)]);_0x3c42ec&&_0x3c42ec['parentId']&&this[_0x22b832(0x187)][_0x22b832(0x1b3)](_0x5af4c3,_0x460d6c,_0x5cd385[_0x22b832(0x1ab)]);break;}case v['Edit']:{this[_0x22b832(0x187)][_0x22b832(0x197)](_0x5af4c3,_0x460d6c,{'commentId':_0x5cd385[_0x22b832(0x1ab)],'text':JSON['parse'](_0x5cd385[_0x22b832(0x1ae)])});break;}case v[_0x22b832(0x18e)]:{const _0x2704f3=(_0xa46408=this[_0x22b832(0x187)]['getUnit'](_0x5cd385[_0x22b832(0x1c0)])['find'](_0x51f0d5=>_0x51f0d5[_0x22b832(0x17e)]===_0x5cd385['threadId']))==null?void 0x0:_0xa46408[_0x22b832(0x179)];_0x2704f3&&this[_0x22b832(0x187)]['resolveComment'](_0x5af4c3,_0x460d6c,_0x2704f3['id'],_0x5cd385['solved']===I[_0x22b832(0x1cc)]);break;}}}));}};p=E([S(0x0,c[_0xc4cba8(0x19b)](b['CommentService'])),S(0x1,c[_0xc4cba8(0x19b)](M['ThreadCommentModel'])),S(0x2,c[_0xc4cba8(0x19b)](c[_0xc4cba8(0x1bf)])),S(0x3,c['Inject'](c[_0xc4cba8(0x1a2)]))],p);const q=_0xc4cba8(0x1c5),D={};function _0x4577(_0x5d1307,_0x2b7568){const _0x4c7c70=_0x4c7c();return _0x4577=function(_0x4577a4,_0x25193d){_0x4577a4=_0x4577a4-0x172;let _0x4cbf15=_0x4c7c70[_0x4577a4];return _0x4cbf15;},_0x4577(_0x5d1307,_0x2b7568);}var A=Object[_0xc4cba8(0x1d0)],x=(_0x1ef5d3,_0x227c59,_0x4983a2,_0x5eb824)=>{const _0x3c0aba=_0xc4cba8;for(var _0xc1e694=_0x5eb824>0x1?void 0x0:_0x5eb824?A(_0x227c59,_0x4983a2):_0x227c59,_0x3d9242=_0x1ef5d3[_0x3c0aba(0x188)]-0x1,_0x29f294;_0x3d9242>=0x0;_0x3d9242--)(_0x29f294=_0x1ef5d3[_0x3d9242])&&(_0xc1e694=_0x29f294(_0xc1e694)||_0xc1e694);return _0xc1e694;},_=(_0xe24f19,_0x1bf003)=>(_0x3d6e95,_0x50432a)=>_0x1bf003(_0x3d6e95,_0x50432a,_0xe24f19);function _0x4c7c(){const _0x5eb80f=['content','IConfigService','format','385zMIaic','CustomRangeType','deleteComment','Edit','error','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','user','listComments','Add','comments','getUser','syncUpdateMutationToColla','Unknown','UserManagerService','unitId','4647696vDFmZc','commentUpdate$','980xSZXWA','6125192bwpKgu','thread-comment-data-source.config','slice','UniverCollaborationClientPlugin','_initUserSync','ref','parse','size','Solved','@univerjs/network','119118qyljzd','235993tLyBGa','getOwnPropertyDescriptor','_injector','getCurrentUser','24370Ksqryc','/universer-api/comment/unit/','DependentOn','11iALerT','solved','OpenOrReOpen','Module','3420fWRbVr','requireSession','/add','9ECMNVU','_httpService','269732yrNJMi','Delete','filter','resolved','pipe','replies','map','getUnit','_initDataSource','stringify','type','_configService','root','rangeId','customRanges','userID','@univerjs-pro/collaboration-client','threadId','pluginName','_commentService','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUIPlugin','addComment','post','personId','payload','_threadCommentModel','length','_config','dataSource','69192iRLZuo','_init','/list','Solve','find','_userService','/delete','saveCommentToSnapshot','forEach','addUser','HTTPService','CollaborationSessionService','updateComment','add','code','getMemberID','Inject','body','Reply','subscribe','dayjs','_threadCommentDataSourceService','createTimestamp','Injector','UniverInstanceType','userId','get','UNRECOGNIZED','@univerjs/thread-comment','users','_sessionService','defineProperty','replyId','resolveComment','_threadCommentDataSource'];_0x4c7c=function(){return _0x5eb80f;};return _0x4c7c();}function Y(_0x103d11,_0x2fa658){const _0x2d22c9=_0xc4cba8,_0x3a9afa=_0x103d11[_0x2d22c9(0x172)][0x0];return{..._0x2fa658,'id':_0x3a9afa[_0x2d22c9(0x1ab)],'resolved':_0x103d11[_0x2d22c9(0x1d7)]===0x1,'dT':f(_0x3a9afa['createTimestamp']),'personId':_0x3a9afa[_0x2d22c9(0x1a4)],'threadId':_0x3a9afa[_0x2d22c9(0x17e)]};}function G(_0x3bdc0a,_0x2d5801,_0x2f3730){const _0x9539f1=_0xc4cba8;var _0x2f914b,_0x19202c;if(((_0x19202c=(_0x2f914b=_0x3bdc0a==null?void 0x0:_0x3bdc0a['replies'])==null?void 0x0:_0x2f914b[_0x9539f1(0x188)])!=null?_0x19202c:0x0)>0x0){const _0x5a684d=(_0x2fe36e,_0x4d6b09)=>({'id':_0x2fe36e[_0x9539f1(0x1ab)],'threadId':_0x2fe36e[_0x9539f1(0x17e)],'dT':f(_0x2fe36e[_0x9539f1(0x1a1)]),'personId':_0x2fe36e['userId'],'resolved':_0x3bdc0a['solved']===I[_0x9539f1(0x1cc)],'unitId':_0x2d5801,'subUnitId':_0x2f3730,'text':JSON[_0x9539f1(0x1ca)](_0x2fe36e[_0x9539f1(0x1ae)]),'parentId':_0x4d6b09}),_0x264a82=_0x5a684d(_0x3bdc0a['replies'][0x0]);return{..._0x264a82,'children':_0x3bdc0a['replies'][_0x9539f1(0x1c6)](0x1)[_0x9539f1(0x173)](_0x4fcf09=>_0x5a684d(_0x4fcf09,_0x264a82['id']))};}return null;}let g=class{constructor(_0x337d34,_0x509f7e,_0x24c47b,_0x4c46a6){const _0x147f5f=_0xc4cba8;this['_httpService']=_0x337d34,this[_0x147f5f(0x190)]=_0x509f7e,this[_0x147f5f(0x1a9)]=_0x24c47b,this['_injector']=_0x4c46a6;}async[_0xc4cba8(0x183)](_0x54b5f4){const _0x4132ed=_0xc4cba8;var _0x476669,_0x2285aa;const {parentId:_0x239ebf,unitId:_0x3ae9ec,text:_0x3d105a,threadId:_0x1d7fe0}=_0x54b5f4,_0x2097b8=(_0x2285aa=(_0x476669=_0x3d105a[_0x4132ed(0x17b)])==null?void 0x0:_0x476669['filter'](_0x1f7862=>_0x1f7862['rangeType']===c[_0x4132ed(0x1b2)]['COMMENT'])[_0x4132ed(0x173)](_0xfc58b=>_0xfc58b[_0x4132ed(0x17a)]))!=null?_0x2285aa:[],_0x124ff3=JSON[_0x4132ed(0x176)](_0x3d105a),_0x154320=(await this[_0x4132ed(0x1a9)]['requireSession'](_0x3ae9ec))[_0x4132ed(0x19a)]();if(_0x239ebf){const _0x28ec0b={'memberId':_0x154320,'unitId':_0x3ae9ec,'content':_0x124ff3,'mention':_0x2097b8,'threadId':_0x1d7fe0},_0x211892=(await this['_httpService'][_0x4132ed(0x184)](_0x4132ed(0x1d4)+_0x3ae9ec+'/reply',{'body':_0x28ec0b}))[_0x4132ed(0x19c)]['reply'];return{..._0x54b5f4,'id':_0x211892[_0x4132ed(0x1ab)],'dT':c[_0x4132ed(0x19f)](+_0x211892[_0x4132ed(0x1a1)])['format'](_0x4132ed(0x181)),'personId':_0x211892[_0x4132ed(0x1a4)]};}else{const _0x57ae89={'memberId':_0x154320,'unitId':_0x3ae9ec,'content':_0x124ff3,'mention':_0x2097b8},_0xe8fae=await this[_0x4132ed(0x1de)]['post']('/universer-api/comment/unit/'+_0x3ae9ec+_0x4132ed(0x1dc),{'body':_0x57ae89});return Y(_0xe8fae[_0x4132ed(0x19c)]['comment'],_0x54b5f4);}}async[_0xc4cba8(0x197)](_0xbe636a){const _0x494d6d=_0xc4cba8;var _0x45add5,_0x672e8;const {text:_0x1e2bd0,unitId:_0x2c0d25}=_0xbe636a,_0x5e279e=(_0x672e8=(_0x45add5=_0x1e2bd0['customRanges'])==null?void 0x0:_0x45add5[_0x494d6d(0x1e1)](_0x50faec=>_0x50faec['rangeType']===c[_0x494d6d(0x1b2)]['COMMENT'])[_0x494d6d(0x173)](_0x3c2181=>_0x3c2181[_0x494d6d(0x17a)]))!=null?_0x672e8:[],_0x2aaf89=JSON[_0x494d6d(0x176)](_0x1e2bd0),_0x514214=_0xbe636a['threadId'],_0xee1bd8=_0xbe636a['id'],_0x2162ce={'memberId':(await this[_0x494d6d(0x1a9)][_0x494d6d(0x1db)](_0x2c0d25))[_0x494d6d(0x19a)](),'unitId':_0x2c0d25,'threadId':_0x514214,'mention':_0x5e279e,'content':_0x2aaf89,'replyId':_0xee1bd8},_0x5ac3dc=await this['_httpService'][_0x494d6d(0x184)](_0x494d6d(0x1d4)+_0x2c0d25+'/edit',{'body':_0x2162ce});return!_0x5ac3dc[_0x494d6d(0x19c)][_0x494d6d(0x1b5)]||_0x5ac3dc[_0x494d6d(0x19c)][_0x494d6d(0x1b5)][_0x494d6d(0x199)]===0x1;}async[_0xc4cba8(0x1ac)](_0x4fd942){const _0x2002c0=_0xc4cba8,{unitId:_0x5e96ed}=_0x4fd942,_0x407aa5=_0x4fd942[_0x2002c0(0x17e)],_0x11047a={'memberId':this[_0x2002c0(0x190)][_0x2002c0(0x1d2)]()[_0x2002c0(0x17c)],'unitId':_0x5e96ed,'threadId':_0x407aa5,'solved':_0x4fd942[_0x2002c0(0x1e2)]?I[_0x2002c0(0x1cc)]:I[_0x2002c0(0x1d8)]},_0x4b7a69=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5e96ed+'/solved',{'body':_0x11047a});return!_0x4b7a69['body'][_0x2002c0(0x1b5)]||_0x4b7a69[_0x2002c0(0x19c)][_0x2002c0(0x1b5)]['code']===0x1;}async[_0xc4cba8(0x1b3)](_0x374676,_0x38568a,_0x29009b,_0x11ea73){const _0x42b961=_0xc4cba8,_0x42dc65={'memberId':(await this[_0x42b961(0x1a9)][_0x42b961(0x1db)](_0x374676))[_0x42b961(0x19a)](),'threadId':_0x29009b,'replyId':_0x11ea73,'unitId':_0x374676},_0x52fdd0=await this[_0x42b961(0x1de)][_0x42b961(0x184)](_0x42b961(0x1d4)+_0x374676+_0x42b961(0x191),{'body':_0x42dc65});return!_0x52fdd0['body']['error']||_0x52fdd0[_0x42b961(0x19c)][_0x42b961(0x1b5)][_0x42b961(0x199)]===0x1;}async[_0xc4cba8(0x1b9)](_0xc8e034,_0x1b8f50,_0xdfc69a){const _0x4864a9=_0xc4cba8,_0x191c85={'unitId':_0xc8e034,'threadId':_0xdfc69a},_0x132fc9=await this[_0x4864a9(0x1de)][_0x4864a9(0x184)](_0x4864a9(0x1d4)+_0xc8e034+_0x4864a9(0x18d),{'body':_0x191c85}),_0x578c82=_0xdfc69a['map'](_0x5636b8=>G(_0x132fc9[_0x4864a9(0x19c)][_0x4864a9(0x1bb)][_0x5636b8],_0xc8e034,_0x1b8f50))[_0x4864a9(0x1e1)](Boolean);return Object['values'](_0x132fc9['body'][_0x4864a9(0x1a8)])[_0x4864a9(0x193)](_0x8f16=>{const _0x1cf2dd=_0x4864a9;this[_0x1cf2dd(0x190)]['addUser'](_0x8f16);}),_0x578c82;}[_0xc4cba8(0x192)](_0x23a00c){const _0x4aa716=_0xc4cba8;return{'id':_0x23a00c['id'],'threadId':_0x23a00c[_0x4aa716(0x17e)],'ref':_0x23a00c[_0x4aa716(0x1c9)]};}};g=x([_(0x0,c[_0xc4cba8(0x19b)](P['HTTPService'])),_(0x1,c[_0xc4cba8(0x19b)](c[_0xc4cba8(0x1bf)])),_(0x2,c[_0xc4cba8(0x19b)](b[_0xc4cba8(0x196)])),_(0x3,c['Inject'](c[_0xc4cba8(0x1a2)]))],g);var H=Object[_0xc4cba8(0x1d0)],J=(_0x4a10c3,_0x1fb755,_0x1ea2c8,_0x2986ff)=>{const _0x55c2f0=_0xc4cba8;for(var _0x1da4df=_0x2986ff>0x1?void 0x0:_0x2986ff?H(_0x1fb755,_0x1ea2c8):_0x1fb755,_0x60a24=_0x4a10c3[_0x55c2f0(0x188)]-0x1,_0x160099;_0x60a24>=0x0;_0x60a24--)(_0x160099=_0x4a10c3[_0x60a24])&&(_0x1da4df=_0x160099(_0x1da4df)||_0x1da4df);return _0x1da4df;},y=(_0x2be8e7,_0x62e726)=>(_0x177171,_0x5a071f)=>_0x62e726(_0x177171,_0x5a071f,_0x2be8e7);let C=class extends c['Disposable']{constructor(_0x10239a,_0xb43348){const _0xbdaafc=_0xc4cba8;super(),this[_0xbdaafc(0x1a0)]=_0x10239a,this[_0xbdaafc(0x1ad)]=_0xb43348,this['_initDataSource']();}[_0xc4cba8(0x175)](){const _0x40cf31=_0xc4cba8;this[_0x40cf31(0x1a0)][_0x40cf31(0x18a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x40cf31(0x1bd)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xc4cba8(0x19b)](g))],C);var F=Object[_0xc4cba8(0x1aa)],L=Object['getOwnPropertyDescriptor'],Z=(_0xcaf893,_0x584b1c,_0x540636)=>_0x584b1c in _0xcaf893?F(_0xcaf893,_0x584b1c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x540636}):_0xcaf893[_0x584b1c]=_0x540636,W=(_0xc49152,_0x528958,_0x5c7b16,_0x49186c)=>{const _0x19f838=_0xc4cba8;for(var _0x149ab=_0x49186c>0x1?void 0x0:_0x49186c?L(_0x528958,_0x5c7b16):_0x528958,_0xec637f=_0xc49152[_0x19f838(0x188)]-0x1,_0x37792f;_0xec637f>=0x0;_0xec637f--)(_0x37792f=_0xc49152[_0xec637f])&&(_0x149ab=_0x37792f(_0x149ab)||_0x149ab);return _0x149ab;},O=(_0x178d38,_0x222d7f)=>(_0x13cad7,_0x3204c0)=>_0x222d7f(_0x13cad7,_0x3204c0,_0x178d38),N=(_0x4ac73c,_0x37ab73,_0x2472cb)=>Z(_0x4ac73c,typeof _0x37ab73!='symbol'?_0x37ab73+'':_0x37ab73,_0x2472cb);exports[_0xc4cba8(0x1b7)]=class extends c['Plugin']{constructor(_0x5ca669=D,_0x1eec29,_0x2ddfd0){const _0x2d68ef=_0xc4cba8;super(),this[_0x2d68ef(0x189)]=_0x5ca669,this[_0x2d68ef(0x1d1)]=_0x1eec29,this[_0x2d68ef(0x178)]=_0x2ddfd0;const {..._0x10e1f8}=c['merge']({},D,this[_0x2d68ef(0x189)]);this[_0x2d68ef(0x178)]['setConfig'](q,_0x10e1f8);}['onStarting'](){const _0x4354b8=_0xc4cba8;[[g],[C],[p]][_0x4354b8(0x193)](_0x3d8323=>{const _0x1cdb04=_0x4354b8;this[_0x1cdb04(0x1d1)][_0x1cdb04(0x198)](_0x3d8323);});}['onReady'](){const _0x3b168f=_0xc4cba8;this[_0x3b168f(0x1d1)]['get'](C),this[_0x3b168f(0x1d1)][_0x3b168f(0x1a5)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xc4cba8(0x17f),U),N(exports[_0xc4cba8(0x1b7)],_0xc4cba8(0x177),c[_0xc4cba8(0x1a3)]['UNIVER_UNKNOWN']),exports[_0xc4cba8(0x1b7)]=W([c[_0xc4cba8(0x1d5)](j[_0xc4cba8(0x182)],b[_0xc4cba8(0x1c7)],T['UniverLicensePlugin']),O(0x1,c[_0xc4cba8(0x19b)](c['Injector'])),O(0x2,c[_0xc4cba8(0x1af)])],exports[_0xc4cba8(0x1b7)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xd7710b=_0x1d47;function _0x1d47(_0x42c727,_0x5bfbe4){const _0x5b7d2a=_0x5b7d();return _0x1d47=function(_0x1d4756,_0x19f082){_0x1d4756=_0x1d4756-0xd7;let _0x2956af=_0x5b7d2a[_0x1d4756];return _0x2956af;},_0x1d47(_0x42c727,_0x5bfbe4);}(function(_0x438eff,_0x43a904){const _0x149fad=_0x1d47,_0x56e657=_0x438eff();while(!![]){try{const _0x45cd28=parseInt(_0x149fad(0xfa))/0x1+-parseInt(_0x149fad(0x120))/0x2*(-parseInt(_0x149fad(0x10e))/0x3)+parseInt(_0x149fad(0x128))/0x4*(-parseInt(_0x149fad(0x126))/0x5)+-parseInt(_0x149fad(0x134))/0x6+-parseInt(_0x149fad(0xe0))/0x7*(parseInt(_0x149fad(0xec))/0x8)+parseInt(_0x149fad(0x114))/0x9*(-parseInt(_0x149fad(0xd9))/0xa)+parseInt(_0x149fad(0xfe))/0xb;if(_0x45cd28===_0x43a904)break;else _0x56e657['push'](_0x56e657['shift']());}catch(_0x32d357){_0x56e657['push'](_0x56e657['shift']());}}}(_0x5b7d,0x65113));function _0x5b7d(){const _0x4b29e0=['forEach','YYYY/MM/DD\x20HH:mm','_httpService','user','585jbeixQ','getComment','onStarting','threadId','Solve','type','format','saveCommentToSnapshot','users','getUnit','resolveComment','updateComment','23468mMnySj','UNIVER_UNKNOWN','/universer-api/comment/unit/','_threadCommentDataSourceService','setConfig','map','5jyrQIZ','comments','2336444KLSkJH','requireSession','slice','getOwnPropertyDescriptor','replies','_injector','onReady','addUser','UNRECOGNIZED','error','_initUserSync','_sessionService','364824iVylat','post','/reply','Reply','find','rangeId','/delete','Add','_threadCommentDataSource','29570BRvUdm','get','rangeType','/add','Unknown','userID','_commentService','7BanChc','_config','code','Delete','root','getMemberID','userId','subscribe','length','Edit','_init','/edit','5753544WzaNCj','reply','OpenOrReOpen','createTimestamp','_configService','/solved','add','addComment','_userService','_threadCommentModel','size','deleteComment','unitId','replyId','559453mDbYvO','Solved','personId','comment','14744697uGXjLN','_initDataSource','content','body','parse','parentId','disposeWithMe','payload','COMMENT','dataSource','filter','customRanges','solved','getCurrentUser','delete','values','18qbnfNh','stringify'];_0x5b7d=function(){return _0x4b29e0;};return _0x5b7d();}import{CommentService as _0x16caf3,CollaborationSessionService as _0x457475,UniverCollaborationClientPlugin as _0x1937c0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d8b63}from'@univerjs-pro/license';import{dayjs as _0x2f02a1,UserManagerService as _0x464d0b,Inject as _0x1eb853,Injector as _0x47d469,Disposable as _0xad8c05,CustomRangeType as _0x4ee5e9,UniverInstanceType as _0x11d5ed,DependentOn as _0x836a12,IConfigService as _0x37892c,Plugin as _0x1a8cdb,merge as _0x3392b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4818f8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x31a474,IThreadCommentDataSourceService as _0x1f6f34}from'@univerjs/thread-comment';import{bufferTime as _0x59cf22}from'rxjs';import{HTTPService as _0xd74d41}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2c5ed3=>(_0x2c5ed3[_0x2c5ed3['OpenOrReOpen']=0x0]=_0xd7710b(0xee),_0x2c5ed3[_0x2c5ed3[_0xd7710b(0xfb)]=0x1]='Solved',_0x2c5ed3[_0x2c5ed3[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x2c5ed3))(I||{}),v=(_0x5f4b1e=>(_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xdd)]=0x0]=_0xd7710b(0xdd),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xd7)]=0x1]=_0xd7710b(0xd7),_0x5f4b1e[_0x5f4b1e['Reply']=0x2]='Reply',_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe9)]=0x3]=_0xd7710b(0xe9),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe3)]=0x4]=_0xd7710b(0xe3),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x118)]=0x5]=_0xd7710b(0x118),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x5f4b1e))(v||{});const D=_0x19b0b3=>_0x2f02a1(new Date(+_0x19b0b3))[_0xd7710b(0x11a)](_0xd7710b(0x111)),B=async(_0x424b12,_0x5a9223)=>{const _0x3ea08c=_0xd7710b,_0x4c325b=_0x424b12[_0x3ea08c(0xda)](_0x464d0b),_0x3cce24=_0x424b12[_0x3ea08c(0xda)](_0xd74d41);_0x5a9223['forEach'](_0x3eb237=>{const _0x46390a=_0x3ea08c;_0x4c325b['getUser'](_0x3eb237)&&_0x5a9223[_0x46390a(0x10c)](_0x3eb237);}),_0x5a9223[_0x3ea08c(0xf6)]&&(await _0x3cce24[_0x3ea08c(0xda)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5a9223]}}))[_0x3ea08c(0x101)][_0x3ea08c(0x11c)][_0x3ea08c(0x110)](_0x556b4c=>{_0x556b4c&&_0x4c325b['addUser'](_0x556b4c);});};var K=Object[_0xd7710b(0x12b)],V=(_0x49d2f3,_0x5a3556,_0x57b034,_0x1fa525)=>{for(var _0x14cab0=_0x1fa525>0x1?void 0x0:_0x1fa525?K(_0x5a3556,_0x57b034):_0x5a3556,_0x3fd46f=_0x49d2f3['length']-0x1,_0x14647d;_0x3fd46f>=0x0;_0x3fd46f--)(_0x14647d=_0x49d2f3[_0x3fd46f])&&(_0x14cab0=_0x14647d(_0x14cab0)||_0x14cab0);return _0x14cab0;},p=(_0x4aa503,_0x5c9c3c)=>(_0x39ca9f,_0x5446c1)=>_0x5c9c3c(_0x39ca9f,_0x5446c1,_0x4aa503);let S=class extends _0xad8c05{constructor(_0x347bfe,_0x46e80a,_0x337dc7,_0x41d25c){const _0x25b102=_0xd7710b;super(),this[_0x25b102(0xdf)]=_0x347bfe,this[_0x25b102(0xf5)]=_0x46e80a,this[_0x25b102(0xf4)]=_0x337dc7,this[_0x25b102(0x12d)]=_0x41d25c,this[_0x25b102(0xea)](),this[_0x25b102(0x132)]();}[_0xd7710b(0x132)](){const _0x589ad9=_0xd7710b;this[_0x589ad9(0x104)](this[_0x589ad9(0xf5)]['commentUpdate$']['pipe'](_0x59cf22(0x10))[_0x589ad9(0xe7)](_0x4c4e76=>{const _0x2a3a67=_0x589ad9,_0x538fd7=new Set();_0x4c4e76[_0x2a3a67(0x110)](_0x5a6288=>{const _0x5a3d76=_0x2a3a67;switch(_0x5a6288[_0x5a3d76(0x119)]){case'add':{const _0x2e9161=_0x5a6288[_0x5a3d76(0x105)][_0x5a3d76(0xfc)];_0x538fd7[_0x5a3d76(0xf2)](_0x2e9161);break;}}}),B(this[_0x2a3a67(0x12d)],_0x538fd7);}));}[_0xd7710b(0xea)](){const _0xb2c303=_0xd7710b;this['disposeWithMe'](this[_0xb2c303(0xdf)]['commentUpdate$'][_0xb2c303(0xe7)](async _0x16b2ab=>{const _0x4f1cd9=_0xb2c303;var _0x32b6ac,_0x11dbb8,_0x4728f3,_0x211002;const _0x2462e4=(_0x32b6ac=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab[_0x4f1cd9(0xf8)])[_0x4f1cd9(0x138)](_0x2ad9b7=>_0x2ad9b7[_0x4f1cd9(0x117)]===_0x16b2ab['threadId']))==null?void 0x0:_0x32b6ac[_0x4f1cd9(0xe4)];if(!_0x2462e4)return;const {unitId:_0x4e2219,subUnitId:_0xa856f1}=_0x2462e4;switch(_0x16b2ab['user']&&this[_0x4f1cd9(0xf4)][_0x4f1cd9(0x12f)](_0x16b2ab[_0x4f1cd9(0x113)]),_0x16b2ab[_0x4f1cd9(0x119)]){case v[_0x4f1cd9(0xd7)]:break;case v[_0x4f1cd9(0x137)]:{this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf3)](_0x4e2219,_0xa856f1,{'unitId':_0x4e2219,'subUnitId':_0xa856f1,'ref':'','id':_0x16b2ab[_0x4f1cd9(0xf9)],'dT':D(+_0x16b2ab[_0x4f1cd9(0xef)]),'threadId':_0x16b2ab['threadId'],'personId':(_0x4728f3=(_0x11dbb8=_0x16b2ab['user'])==null?void 0x0:_0x11dbb8['userID'])!=null?_0x4728f3:_0x16b2ab['userId'],'text':JSON['parse'](_0x16b2ab[_0x4f1cd9(0x100)]),'parentId':_0x2462e4['id']});break;}case v[_0x4f1cd9(0xe3)]:{const _0x103231=this['_threadCommentModel'][_0x4f1cd9(0x115)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);_0x103231&&_0x103231[_0x4f1cd9(0x103)]&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf7)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);break;}case v[_0x4f1cd9(0xe9)]:{this['_threadCommentModel'][_0x4f1cd9(0x11f)](_0x4e2219,_0xa856f1,{'commentId':_0x16b2ab[_0x4f1cd9(0xf9)],'text':JSON[_0x4f1cd9(0x102)](_0x16b2ab[_0x4f1cd9(0x100)])});break;}case v[_0x4f1cd9(0x118)]:{const _0x2512c3=(_0x211002=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab['unitId'])[_0x4f1cd9(0x138)](_0x466030=>_0x466030[_0x4f1cd9(0x117)]===_0x16b2ab[_0x4f1cd9(0x117)]))==null?void 0x0:_0x211002['root'];_0x2512c3&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11e)](_0x4e2219,_0xa856f1,_0x2512c3['id'],_0x16b2ab[_0x4f1cd9(0x10a)]===I[_0x4f1cd9(0xfb)]);break;}}}));}};S=V([p(0x0,_0x1eb853(_0x16caf3)),p(0x1,_0x1eb853(_0x31a474)),p(0x2,_0x1eb853(_0x464d0b)),p(0x3,_0x1eb853(_0x47d469))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2ca295,_0x1d698b,_0x17c709,_0x5bd19f)=>{const _0x54f459=_0xd7710b;for(var _0x30752a=_0x5bd19f>0x1?void 0x0:_0x5bd19f?k(_0x1d698b,_0x17c709):_0x1d698b,_0x2d17a7=_0x2ca295[_0x54f459(0xe8)]-0x1,_0x49259e;_0x2d17a7>=0x0;_0x2d17a7--)(_0x49259e=_0x2ca295[_0x2d17a7])&&(_0x30752a=_0x49259e(_0x30752a)||_0x30752a);return _0x30752a;},_=(_0x4a285a,_0x4f5511)=>(_0x4a5bad,_0xbe27a3)=>_0x4f5511(_0x4a5bad,_0xbe27a3,_0x4a285a);function X(_0x3dbcd6,_0x2c83d5){const _0x52b9a0=_0xd7710b,_0x1d3100=_0x3dbcd6[_0x52b9a0(0x12c)][0x0];return{..._0x2c83d5,'id':_0x1d3100[_0x52b9a0(0xf9)],'resolved':_0x3dbcd6[_0x52b9a0(0x10a)]===0x1,'dT':D(_0x1d3100['createTimestamp']),'personId':_0x1d3100['userId'],'threadId':_0x1d3100[_0x52b9a0(0x117)]};}function ee(_0x34d1ed,_0x30a5ce,_0x41fbef){const _0x32f5e7=_0xd7710b;var _0x3fe4ec,_0x348b5a;if(((_0x348b5a=(_0x3fe4ec=_0x34d1ed==null?void 0x0:_0x34d1ed[_0x32f5e7(0x12c)])==null?void 0x0:_0x3fe4ec[_0x32f5e7(0xe8)])!=null?_0x348b5a:0x0)>0x0){const _0x36779e=(_0x9313bd,_0x479468)=>({'id':_0x9313bd[_0x32f5e7(0xf9)],'threadId':_0x9313bd[_0x32f5e7(0x117)],'dT':D(_0x9313bd['createTimestamp']),'personId':_0x9313bd[_0x32f5e7(0xe6)],'resolved':_0x34d1ed['solved']===I[_0x32f5e7(0xfb)],'unitId':_0x30a5ce,'subUnitId':_0x41fbef,'text':JSON[_0x32f5e7(0x102)](_0x9313bd['content']),'parentId':_0x479468}),_0xa46b0c=_0x36779e(_0x34d1ed[_0x32f5e7(0x12c)][0x0]);return{..._0xa46b0c,'children':_0x34d1ed[_0x32f5e7(0x12c)][_0x32f5e7(0x12a)](0x1)['map'](_0x3f1e85=>_0x36779e(_0x3f1e85,_0xa46b0c['id']))};}return null;}let f=class{constructor(_0x3bc38f,_0x28ef09,_0x366ffe,_0x44b4f0){const _0x188712=_0xd7710b;this[_0x188712(0x112)]=_0x3bc38f,this[_0x188712(0xf4)]=_0x28ef09,this[_0x188712(0x133)]=_0x366ffe,this[_0x188712(0x12d)]=_0x44b4f0;}async['addComment'](_0x4f79e6){const _0x53c2b7=_0xd7710b;var _0x7220b9,_0x2587f3;const {parentId:_0x5c30bb,unitId:_0x1a906e,text:_0x10c847,threadId:_0x3bfbc1}=_0x4f79e6,_0x1e5cbd=(_0x2587f3=(_0x7220b9=_0x10c847[_0x53c2b7(0x109)])==null?void 0x0:_0x7220b9[_0x53c2b7(0x108)](_0xed1617=>_0xed1617[_0x53c2b7(0xdb)]===_0x4ee5e9[_0x53c2b7(0x106)])[_0x53c2b7(0x125)](_0x51b76a=>_0x51b76a[_0x53c2b7(0x139)]))!=null?_0x2587f3:[],_0x27e53b=JSON['stringify'](_0x10c847),_0x488780=(await this[_0x53c2b7(0x133)][_0x53c2b7(0x129)](_0x1a906e))[_0x53c2b7(0xe5)]();if(_0x5c30bb){const _0x1d30a0={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd,'threadId':_0x3bfbc1},_0x43c0ea=(await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)](_0x53c2b7(0x122)+_0x1a906e+_0x53c2b7(0x136),{'body':_0x1d30a0}))[_0x53c2b7(0x101)][_0x53c2b7(0xed)];return{..._0x4f79e6,'id':_0x43c0ea['replyId'],'dT':_0x2f02a1(+_0x43c0ea[_0x53c2b7(0xef)])['format'](_0x53c2b7(0x111)),'personId':_0x43c0ea['userId']};}else{const _0x36f390={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd},_0x484bcc=await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)]('/universer-api/comment/unit/'+_0x1a906e+_0x53c2b7(0xdc),{'body':_0x36f390});return X(_0x484bcc[_0x53c2b7(0x101)][_0x53c2b7(0xfd)],_0x4f79e6);}}async[_0xd7710b(0x11f)](_0x1f8a5a){const _0x5e4f97=_0xd7710b;var _0x323766,_0x288817;const {text:_0x4bf748,unitId:_0x3b66a5}=_0x1f8a5a,_0x40dd43=(_0x288817=(_0x323766=_0x4bf748[_0x5e4f97(0x109)])==null?void 0x0:_0x323766[_0x5e4f97(0x108)](_0x88f52f=>_0x88f52f['rangeType']===_0x4ee5e9['COMMENT'])[_0x5e4f97(0x125)](_0x2de504=>_0x2de504['rangeId']))!=null?_0x288817:[],_0x37a1f6=JSON[_0x5e4f97(0x10f)](_0x4bf748),_0x426190=_0x1f8a5a[_0x5e4f97(0x117)],_0x5ecd9b=_0x1f8a5a['id'],_0x48fa59={'memberId':(await this['_sessionService'][_0x5e4f97(0x129)](_0x3b66a5))[_0x5e4f97(0xe5)](),'unitId':_0x3b66a5,'threadId':_0x426190,'mention':_0x40dd43,'content':_0x37a1f6,'replyId':_0x5ecd9b},_0x3836ad=await this[_0x5e4f97(0x112)][_0x5e4f97(0x135)](_0x5e4f97(0x122)+_0x3b66a5+_0x5e4f97(0xeb),{'body':_0x48fa59});return!_0x3836ad['body'][_0x5e4f97(0x131)]||_0x3836ad[_0x5e4f97(0x101)][_0x5e4f97(0x131)][_0x5e4f97(0xe2)]===0x1;}async['resolveComment'](_0x5a30b1){const _0x2e2cde=_0xd7710b,{unitId:_0x1d38c4}=_0x5a30b1,_0x38f42b=_0x5a30b1['threadId'],_0x3e12dc={'memberId':this[_0x2e2cde(0xf4)][_0x2e2cde(0x10b)]()[_0x2e2cde(0xde)],'unitId':_0x1d38c4,'threadId':_0x38f42b,'solved':_0x5a30b1['resolved']?I['Solved']:I[_0x2e2cde(0xee)]},_0x4cc3ff=await this['_httpService']['post'](_0x2e2cde(0x122)+_0x1d38c4+_0x2e2cde(0xf1),{'body':_0x3e12dc});return!_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]||_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]['code']===0x1;}async['deleteComment'](_0x3cc431,_0x1619c0,_0x48c0b3,_0x5b4297){const _0x4cb6a6=_0xd7710b,_0x3f27dc={'memberId':(await this[_0x4cb6a6(0x133)][_0x4cb6a6(0x129)](_0x3cc431))['getMemberID'](),'threadId':_0x48c0b3,'replyId':_0x5b4297,'unitId':_0x3cc431},_0x5a2009=await this[_0x4cb6a6(0x112)]['post'](_0x4cb6a6(0x122)+_0x3cc431+_0x4cb6a6(0x13a),{'body':_0x3f27dc});return!_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]||_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]['code']===0x1;}async['listComments'](_0x3b959e,_0x3db547,_0x215cc6){const _0x2a6c4b=_0xd7710b,_0x216491={'unitId':_0x3b959e,'threadId':_0x215cc6},_0x51eba8=await this[_0x2a6c4b(0x112)][_0x2a6c4b(0x135)]('/universer-api/comment/unit/'+_0x3b959e+'/list',{'body':_0x216491}),_0x552a57=_0x215cc6[_0x2a6c4b(0x125)](_0x1625f7=>ee(_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x127)][_0x1625f7],_0x3b959e,_0x3db547))['filter'](Boolean);return Object[_0x2a6c4b(0x10d)](_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x11c)])[_0x2a6c4b(0x110)](_0x491622=>{const _0x3ea6dd=_0x2a6c4b;this[_0x3ea6dd(0xf4)]['addUser'](_0x491622);}),_0x552a57;}[_0xd7710b(0x11b)](_0xb8f4d){const _0x195ed9=_0xd7710b;return{'id':_0xb8f4d['id'],'threadId':_0xb8f4d[_0x195ed9(0x117)],'ref':_0xb8f4d['ref']};}};f=Q([_(0x0,_0x1eb853(_0xd74d41)),_(0x1,_0x1eb853(_0x464d0b)),_(0x2,_0x1eb853(_0x457475)),_(0x3,_0x1eb853(_0x47d469))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x270747,_0x203b13,_0x177d9f,_0x345a49)=>{const _0x4a256b=_0xd7710b;for(var _0x2a5226=_0x345a49>0x1?void 0x0:_0x345a49?re(_0x203b13,_0x177d9f):_0x203b13,_0xd62d08=_0x270747[_0x4a256b(0xe8)]-0x1,_0x166336;_0xd62d08>=0x0;_0xd62d08--)(_0x166336=_0x270747[_0xd62d08])&&(_0x2a5226=_0x166336(_0x2a5226)||_0x2a5226);return _0x2a5226;},N=(_0x27cf96,_0x28a9e9)=>(_0x3f4182,_0x4e1379)=>_0x28a9e9(_0x3f4182,_0x4e1379,_0x27cf96);let g=class extends _0xad8c05{constructor(_0x4a0fbf,_0x3605c0){const _0x643c7a=_0xd7710b;super(),this['_threadCommentDataSourceService']=_0x4a0fbf,this['_threadCommentDataSource']=_0x3605c0,this[_0x643c7a(0xff)]();}['_initDataSource'](){const _0x8ef8d7=_0xd7710b;this[_0x8ef8d7(0x123)][_0x8ef8d7(0x107)]=this[_0x8ef8d7(0xd8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x1f6f34),N(0x1,_0x1eb853(f))],g);var se=Object['defineProperty'],oe=Object[_0xd7710b(0x12b)],ne=(_0x4eb572,_0x5db4db,_0xa0053a)=>_0x5db4db in _0x4eb572?se(_0x4eb572,_0x5db4db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa0053a}):_0x4eb572[_0x5db4db]=_0xa0053a,ie=(_0x4606c9,_0x285985,_0x5f12c3,_0x3e4c41)=>{const _0x146fb5=_0xd7710b;for(var _0x279174=_0x3e4c41>0x1?void 0x0:_0x3e4c41?oe(_0x285985,_0x5f12c3):_0x285985,_0x2b574c=_0x4606c9[_0x146fb5(0xe8)]-0x1,_0x4b1dee;_0x2b574c>=0x0;_0x2b574c--)(_0x4b1dee=_0x4606c9[_0x2b574c])&&(_0x279174=_0x4b1dee(_0x279174)||_0x279174);return _0x279174;},w=(_0x3775cc,_0x21372)=>(_0x28b495,_0x41fd76)=>_0x21372(_0x28b495,_0x41fd76,_0x3775cc),$=(_0x381115,_0x5e3ba6,_0x53b04e)=>ne(_0x381115,typeof _0x5e3ba6!='symbol'?_0x5e3ba6+'':_0x5e3ba6,_0x53b04e);let b=class extends _0x1a8cdb{constructor(_0x582d38=M,_0x1484d7,_0x2431de){const _0x5a5f93=_0xd7710b;super(),this['_config']=_0x582d38,this[_0x5a5f93(0x12d)]=_0x1484d7,this[_0x5a5f93(0xf0)]=_0x2431de;const {..._0x17c7c5}=_0x3392b3({},M,this[_0x5a5f93(0xe1)]);this[_0x5a5f93(0xf0)][_0x5a5f93(0x124)](z,_0x17c7c5);}[_0xd7710b(0x116)](){const _0x5a42bf=_0xd7710b;[[f],[g],[S]][_0x5a42bf(0x110)](_0x1d372=>{const _0x57ca00=_0x5a42bf;this['_injector'][_0x57ca00(0xf2)](_0x1d372);});}[_0xd7710b(0x12e)](){const _0x571be7=_0xd7710b;this[_0x571be7(0x12d)][_0x571be7(0xda)](g),this[_0x571be7(0x12d)][_0x571be7(0xda)](S);}};$(b,'pluginName',W),$(b,'type',_0x11d5ed[_0xd7710b(0x121)]),b=ie([_0x836a12(_0x4818f8,_0x1937c0,_0x5d8b63),w(0x1,_0x1eb853(_0x47d469)),w(0x2,_0x37892c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4f9315=_0x1093;function _0x96a8(){const _0x11c432=['addUser','Solved','ref','content','getOwnPropertyDescriptor','setConfig','resolved','/edit','784YKkfsJ','UNRECOGNIZED','_initUserSync','syncUpdateMutationToColla','saveCommentToSnapshot','_injector','error','map','onReady','listComments','/universer-api/user/list','rangeType','_httpService','YYYY/MM/DD\x20HH:mm','/solved','size','userId','symbol','addComment','getMemberID','commentUpdate$','code','Edit','getComment','parentId','stringify','filter','unitId','resolveComment','rangeId','Solve','replyId','_userService','UNIVER_UNKNOWN','deleteComment','dataSource','payload','90oqcliU','solved','comment','6747856yDIypc','pluginName','comments','length','body','_commentService','root','_sessionService','replies','getCurrentUser','users','_threadCommentModel','defineProperty','getUnit','OpenOrReOpen','9627366ZMmpjv','type','slice','1870196FQApxT','/add','/universer-api/comment/unit/','COMMENT','_configService','user','818010nTJToR','4831821BlKIdG','9228hdXaxi','add','thread-comment-data-source.config','Reply','delete','_initDataSource','get','Unknown','format','disposeWithMe','createTimestamp','642795vzmxvy','_threadCommentDataSource','pipe','/list','find','_init','_threadCommentDataSourceService','threadId','post','forEach','30HBAqxF','values','updateComment','userID','parse','Delete','requireSession','Add','customRanges'];_0x96a8=function(){return _0x11c432;};return _0x96a8();}(function(_0x2b693b,_0x563364){const _0x58350a=_0x1093,_0x48d822=_0x2b693b();while(!![]){try{const _0x33833c=-parseInt(_0x58350a(0xe4))/0x1+-parseInt(_0x58350a(0xde))/0x2+-parseInt(_0x58350a(0xe6))/0x3*(-parseInt(_0x58350a(0x10c))/0x4)+parseInt(_0x58350a(0xf1))/0x5*(-parseInt(_0x58350a(0xfb))/0x6)+-parseInt(_0x58350a(0xdb))/0x7+-parseInt(_0x58350a(0x134))/0x8+parseInt(_0x58350a(0xe5))/0x9*(parseInt(_0x58350a(0x131))/0xa);if(_0x33833c===_0x563364)break;else _0x48d822['push'](_0x48d822['shift']());}catch(_0x42f4b5){_0x48d822['push'](_0x48d822['shift']());}}}(_0x96a8,0xc831a));import{CommentService as _0x3ab801,CollaborationSessionService as _0x243c30,UniverCollaborationClientPlugin as _0x589b09}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x10820f}from'@univerjs-pro/license';import{dayjs as _0x113944,UserManagerService as _0x3bc288,Inject as _0x4395a5,Injector as _0x3849c5,Disposable as _0x3f16eb,CustomRangeType as _0x1fdbdf,UniverInstanceType as _0x1d95eb,DependentOn as _0x4b6a7b,IConfigService as _0xd35145,Plugin as _0x290c01,merge as _0x5aa3a4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x8ab5ff}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x26caec,IThreadCommentDataSourceService as _0xd47b4}from'@univerjs/thread-comment';import{bufferTime as _0x745818}from'rxjs';import{HTTPService as _0x495cf5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2cea32=>(_0x2cea32[_0x2cea32[_0x4f9315(0xda)]=0x0]=_0x4f9315(0xda),_0x2cea32[_0x2cea32[_0x4f9315(0x105)]=0x1]=_0x4f9315(0x105),_0x2cea32[_0x2cea32[_0x4f9315(0x10d)]=-0x1]=_0x4f9315(0x10d),_0x2cea32))(I||{}),v=(_0x14b3a7=>(_0x14b3a7[_0x14b3a7[_0x4f9315(0xed)]=0x0]=_0x4f9315(0xed),_0x14b3a7[_0x14b3a7[_0x4f9315(0x102)]=0x1]='Add',_0x14b3a7[_0x14b3a7[_0x4f9315(0xe9)]=0x2]=_0x4f9315(0xe9),_0x14b3a7[_0x14b3a7[_0x4f9315(0x122)]=0x3]=_0x4f9315(0x122),_0x14b3a7[_0x14b3a7['Delete']=0x4]=_0x4f9315(0x100),_0x14b3a7[_0x14b3a7[_0x4f9315(0x12a)]=0x5]=_0x4f9315(0x12a),_0x14b3a7[_0x14b3a7[_0x4f9315(0x10d)]=-0x1]='UNRECOGNIZED',_0x14b3a7))(v||{});const D=_0x4a736c=>_0x113944(new Date(+_0x4a736c))[_0x4f9315(0xee)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x45e369,_0x42f827)=>{const _0x4f2171=_0x4f9315,_0x141c32=_0x45e369[_0x4f2171(0xec)](_0x3bc288),_0x19cdba=_0x45e369[_0x4f2171(0xec)](_0x495cf5);_0x42f827[_0x4f2171(0xfa)](_0x3e7421=>{const _0x58b955=_0x4f2171;_0x141c32['getUser'](_0x3e7421)&&_0x42f827[_0x58b955(0xea)](_0x3e7421);}),_0x42f827[_0x4f2171(0x11b)]&&(await _0x19cdba[_0x4f2171(0xec)](_0x4f2171(0x116),{'params':{'userIDs':[..._0x42f827]}}))[_0x4f2171(0xd0)][_0x4f2171(0xd6)][_0x4f2171(0xfa)](_0x1fb079=>{const _0x7fd648=_0x4f2171;_0x1fb079&&_0x141c32[_0x7fd648(0x104)](_0x1fb079);});};var K=Object[_0x4f9315(0x108)],V=(_0x20f58a,_0x277ff2,_0x355b37,_0x12fa46)=>{const _0x568e55=_0x4f9315;for(var _0x272374=_0x12fa46>0x1?void 0x0:_0x12fa46?K(_0x277ff2,_0x355b37):_0x277ff2,_0x2aee80=_0x20f58a[_0x568e55(0xcf)]-0x1,_0x2a85c6;_0x2aee80>=0x0;_0x2aee80--)(_0x2a85c6=_0x20f58a[_0x2aee80])&&(_0x272374=_0x2a85c6(_0x272374)||_0x272374);return _0x272374;},p=(_0x43598d,_0xd8f65e)=>(_0x3d172e,_0x23861c)=>_0xd8f65e(_0x3d172e,_0x23861c,_0x43598d);let S=class extends _0x3f16eb{constructor(_0x5499df,_0x3d1d0e,_0x4ffe7a,_0x1a9d47){const _0x31b1d5=_0x4f9315;super(),this[_0x31b1d5(0xd1)]=_0x5499df,this[_0x31b1d5(0xd7)]=_0x3d1d0e,this['_userService']=_0x4ffe7a,this[_0x31b1d5(0x111)]=_0x1a9d47,this[_0x31b1d5(0xf6)](),this[_0x31b1d5(0x10e)]();}[_0x4f9315(0x10e)](){const _0x42caf8=_0x4f9315;this[_0x42caf8(0xef)](this[_0x42caf8(0xd7)][_0x42caf8(0x120)][_0x42caf8(0xf3)](_0x745818(0x10))['subscribe'](_0x20ab19=>{const _0x468743=_0x42caf8,_0x2c0254=new Set();_0x20ab19[_0x468743(0xfa)](_0x475f55=>{const _0x2a4489=_0x468743;switch(_0x475f55[_0x2a4489(0xdc)]){case'add':{const _0x27eb33=_0x475f55[_0x2a4489(0x130)]['personId'];_0x2c0254['add'](_0x27eb33);break;}}}),B(this['_injector'],_0x2c0254);}));}['_init'](){const _0x55fee9=_0x4f9315;this[_0x55fee9(0xef)](this['_commentService'][_0x55fee9(0x120)]['subscribe'](async _0x44860e=>{const _0x3a6bb7=_0x55fee9;var _0x4979be,_0x205623,_0x561492,_0x5100bc;const _0x2e4dcf=(_0x4979be=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e['unitId'])['find'](_0x1b0661=>_0x1b0661[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x4979be['root'];if(!_0x2e4dcf)return;const {unitId:_0x2b5af0,subUnitId:_0x59b6b2}=_0x2e4dcf;switch(_0x44860e[_0x3a6bb7(0xe3)]&&this['_userService'][_0x3a6bb7(0x104)](_0x44860e[_0x3a6bb7(0xe3)]),_0x44860e[_0x3a6bb7(0xdc)]){case v[_0x3a6bb7(0x102)]:break;case v[_0x3a6bb7(0xe9)]:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x11e)](_0x2b5af0,_0x59b6b2,{'unitId':_0x2b5af0,'subUnitId':_0x59b6b2,'ref':'','id':_0x44860e[_0x3a6bb7(0x12b)],'dT':D(+_0x44860e[_0x3a6bb7(0xf0)]),'threadId':_0x44860e[_0x3a6bb7(0xf8)],'personId':(_0x561492=(_0x205623=_0x44860e[_0x3a6bb7(0xe3)])==null?void 0x0:_0x205623[_0x3a6bb7(0xfe)])!=null?_0x561492:_0x44860e[_0x3a6bb7(0x11c)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e[_0x3a6bb7(0x107)]),'parentId':_0x2e4dcf['id']});break;}case v[_0x3a6bb7(0x100)]:{const _0x2c1f36=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x123)](_0x2b5af0,_0x59b6b2,_0x44860e['replyId']);_0x2c1f36&&_0x2c1f36[_0x3a6bb7(0x124)]&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x12e)](_0x2b5af0,_0x59b6b2,_0x44860e[_0x3a6bb7(0x12b)]);break;}case v['Edit']:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xfd)](_0x2b5af0,_0x59b6b2,{'commentId':_0x44860e[_0x3a6bb7(0x12b)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e['content'])});break;}case v[_0x3a6bb7(0x12a)]:{const _0x36f6c0=(_0x5100bc=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e[_0x3a6bb7(0x127)])[_0x3a6bb7(0xf5)](_0x33056c=>_0x33056c[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x5100bc[_0x3a6bb7(0xd2)];_0x36f6c0&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x128)](_0x2b5af0,_0x59b6b2,_0x36f6c0['id'],_0x44860e[_0x3a6bb7(0x132)]===I[_0x3a6bb7(0x105)]);break;}}}));}};function _0x1093(_0x3857f5,_0x4fd443){const _0x96a8bd=_0x96a8();return _0x1093=function(_0x109304,_0x485c03){_0x109304=_0x109304-0xce;let _0x298a36=_0x96a8bd[_0x109304];return _0x298a36;},_0x1093(_0x3857f5,_0x4fd443);}S=V([p(0x0,_0x4395a5(_0x3ab801)),p(0x1,_0x4395a5(_0x26caec)),p(0x2,_0x4395a5(_0x3bc288)),p(0x3,_0x4395a5(_0x3849c5))],S);const z=_0x4f9315(0xe8),M={};var k=Object[_0x4f9315(0x108)],Q=(_0x1bd5c6,_0x49c3ef,_0x14bbf8,_0x33aeee)=>{const _0x1768b1=_0x4f9315;for(var _0xb3d02=_0x33aeee>0x1?void 0x0:_0x33aeee?k(_0x49c3ef,_0x14bbf8):_0x49c3ef,_0x4a1d54=_0x1bd5c6[_0x1768b1(0xcf)]-0x1,_0x40768f;_0x4a1d54>=0x0;_0x4a1d54--)(_0x40768f=_0x1bd5c6[_0x4a1d54])&&(_0xb3d02=_0x40768f(_0xb3d02)||_0xb3d02);return _0xb3d02;},_=(_0x164b37,_0x3de780)=>(_0x4d7120,_0x39bfb0)=>_0x3de780(_0x4d7120,_0x39bfb0,_0x164b37);function X(_0x40d8b3,_0x3dfea5){const _0x38d0f5=_0x4f9315,_0x3485c1=_0x40d8b3[_0x38d0f5(0xd4)][0x0];return{..._0x3dfea5,'id':_0x3485c1[_0x38d0f5(0x12b)],'resolved':_0x40d8b3[_0x38d0f5(0x132)]===0x1,'dT':D(_0x3485c1[_0x38d0f5(0xf0)]),'personId':_0x3485c1['userId'],'threadId':_0x3485c1[_0x38d0f5(0xf8)]};}function ee(_0x14201c,_0x432a39,_0x82ef9c){const _0x2217ea=_0x4f9315;var _0x212383,_0x2550ff;if(((_0x2550ff=(_0x212383=_0x14201c==null?void 0x0:_0x14201c[_0x2217ea(0xd4)])==null?void 0x0:_0x212383[_0x2217ea(0xcf)])!=null?_0x2550ff:0x0)>0x0){const _0x3d64fa=(_0x16db86,_0x361ee9)=>({'id':_0x16db86['replyId'],'threadId':_0x16db86[_0x2217ea(0xf8)],'dT':D(_0x16db86['createTimestamp']),'personId':_0x16db86[_0x2217ea(0x11c)],'resolved':_0x14201c[_0x2217ea(0x132)]===I[_0x2217ea(0x105)],'unitId':_0x432a39,'subUnitId':_0x82ef9c,'text':JSON[_0x2217ea(0xff)](_0x16db86[_0x2217ea(0x107)]),'parentId':_0x361ee9}),_0x1d45fd=_0x3d64fa(_0x14201c['replies'][0x0]);return{..._0x1d45fd,'children':_0x14201c[_0x2217ea(0xd4)][_0x2217ea(0xdd)](0x1)[_0x2217ea(0x113)](_0xec80be=>_0x3d64fa(_0xec80be,_0x1d45fd['id']))};}return null;}let f=class{constructor(_0x5d2b5c,_0x24bb37,_0x17d125,_0x1f9715){const _0xa76332=_0x4f9315;this[_0xa76332(0x118)]=_0x5d2b5c,this[_0xa76332(0x12c)]=_0x24bb37,this['_sessionService']=_0x17d125,this[_0xa76332(0x111)]=_0x1f9715;}async[_0x4f9315(0x11e)](_0x39cff2){const _0x5e6a1a=_0x4f9315;var _0x606ea8,_0x1d8a59;const {parentId:_0x272415,unitId:_0x1dfb4c,text:_0x32f593,threadId:_0x40a64b}=_0x39cff2,_0x37930d=(_0x1d8a59=(_0x606ea8=_0x32f593[_0x5e6a1a(0x103)])==null?void 0x0:_0x606ea8[_0x5e6a1a(0x126)](_0x19b8b9=>_0x19b8b9[_0x5e6a1a(0x117)]===_0x1fdbdf['COMMENT'])[_0x5e6a1a(0x113)](_0x28d214=>_0x28d214['rangeId']))!=null?_0x1d8a59:[],_0x16ea6e=JSON[_0x5e6a1a(0x125)](_0x32f593),_0x41b451=(await this[_0x5e6a1a(0xd3)][_0x5e6a1a(0x101)](_0x1dfb4c))['getMemberID']();if(_0x272415){const _0x3018bc={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d,'threadId':_0x40a64b},_0x3ccac9=(await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)]('/universer-api/comment/unit/'+_0x1dfb4c+'/reply',{'body':_0x3018bc}))[_0x5e6a1a(0xd0)]['reply'];return{..._0x39cff2,'id':_0x3ccac9[_0x5e6a1a(0x12b)],'dT':_0x113944(+_0x3ccac9[_0x5e6a1a(0xf0)])['format'](_0x5e6a1a(0x119)),'personId':_0x3ccac9[_0x5e6a1a(0x11c)]};}else{const _0x11ccd9={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d},_0x15ab40=await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)](_0x5e6a1a(0xe0)+_0x1dfb4c+_0x5e6a1a(0xdf),{'body':_0x11ccd9});return X(_0x15ab40[_0x5e6a1a(0xd0)][_0x5e6a1a(0x133)],_0x39cff2);}}async[_0x4f9315(0xfd)](_0x9f708a){const _0x2e244c=_0x4f9315;var _0x1094ab,_0x9eadb1;const {text:_0x136fb3,unitId:_0x4b119a}=_0x9f708a,_0x8bcd7a=(_0x9eadb1=(_0x1094ab=_0x136fb3[_0x2e244c(0x103)])==null?void 0x0:_0x1094ab[_0x2e244c(0x126)](_0x2bdd51=>_0x2bdd51[_0x2e244c(0x117)]===_0x1fdbdf[_0x2e244c(0xe1)])[_0x2e244c(0x113)](_0x17fd80=>_0x17fd80[_0x2e244c(0x129)]))!=null?_0x9eadb1:[],_0x4292ea=JSON[_0x2e244c(0x125)](_0x136fb3),_0x74ef76=_0x9f708a[_0x2e244c(0xf8)],_0x47b62f=_0x9f708a['id'],_0x4cc6b6={'memberId':(await this['_sessionService'][_0x2e244c(0x101)](_0x4b119a))[_0x2e244c(0x11f)](),'unitId':_0x4b119a,'threadId':_0x74ef76,'mention':_0x8bcd7a,'content':_0x4292ea,'replyId':_0x47b62f},_0x17c92d=await this[_0x2e244c(0x118)][_0x2e244c(0xf9)](_0x2e244c(0xe0)+_0x4b119a+_0x2e244c(0x10b),{'body':_0x4cc6b6});return!_0x17c92d['body']['error']||_0x17c92d[_0x2e244c(0xd0)][_0x2e244c(0x112)][_0x2e244c(0x121)]===0x1;}async[_0x4f9315(0x128)](_0x2ae0aa){const _0xd71b21=_0x4f9315,{unitId:_0x2fa12d}=_0x2ae0aa,_0x398e82=_0x2ae0aa[_0xd71b21(0xf8)],_0x5cf04c={'memberId':this[_0xd71b21(0x12c)][_0xd71b21(0xd5)]()[_0xd71b21(0xfe)],'unitId':_0x2fa12d,'threadId':_0x398e82,'solved':_0x2ae0aa[_0xd71b21(0x10a)]?I['Solved']:I[_0xd71b21(0xda)]},_0x3cbf4b=await this[_0xd71b21(0x118)]['post'](_0xd71b21(0xe0)+_0x2fa12d+_0xd71b21(0x11a),{'body':_0x5cf04c});return!_0x3cbf4b['body'][_0xd71b21(0x112)]||_0x3cbf4b[_0xd71b21(0xd0)][_0xd71b21(0x112)][_0xd71b21(0x121)]===0x1;}async['deleteComment'](_0x35a27e,_0x1c2972,_0x1e2eb7,_0x5d94ad){const _0x1a143c=_0x4f9315,_0x4046a3={'memberId':(await this['_sessionService']['requireSession'](_0x35a27e))['getMemberID'](),'threadId':_0x1e2eb7,'replyId':_0x5d94ad,'unitId':_0x35a27e},_0x1097e9=await this[_0x1a143c(0x118)][_0x1a143c(0xf9)]('/universer-api/comment/unit/'+_0x35a27e+'/delete',{'body':_0x4046a3});return!_0x1097e9[_0x1a143c(0xd0)][_0x1a143c(0x112)]||_0x1097e9['body'][_0x1a143c(0x112)][_0x1a143c(0x121)]===0x1;}async[_0x4f9315(0x115)](_0x1c690d,_0x100e25,_0x249390){const _0x232e38=_0x4f9315,_0x3853ed={'unitId':_0x1c690d,'threadId':_0x249390},_0x4d5586=await this[_0x232e38(0x118)][_0x232e38(0xf9)](_0x232e38(0xe0)+_0x1c690d+_0x232e38(0xf4),{'body':_0x3853ed}),_0x35f3e8=_0x249390[_0x232e38(0x113)](_0x23232c=>ee(_0x4d5586['body'][_0x232e38(0xce)][_0x23232c],_0x1c690d,_0x100e25))[_0x232e38(0x126)](Boolean);return Object[_0x232e38(0xfc)](_0x4d5586[_0x232e38(0xd0)]['users'])['forEach'](_0x545a10=>{const _0x2a8ad9=_0x232e38;this['_userService'][_0x2a8ad9(0x104)](_0x545a10);}),_0x35f3e8;}[_0x4f9315(0x110)](_0x4af4cd){const _0x1c34a4=_0x4f9315;return{'id':_0x4af4cd['id'],'threadId':_0x4af4cd[_0x1c34a4(0xf8)],'ref':_0x4af4cd[_0x1c34a4(0x106)]};}};f=Q([_(0x0,_0x4395a5(_0x495cf5)),_(0x1,_0x4395a5(_0x3bc288)),_(0x2,_0x4395a5(_0x243c30)),_(0x3,_0x4395a5(_0x3849c5))],f);var re=Object[_0x4f9315(0x108)],te=(_0xaad7f3,_0x12e457,_0x427f69,_0x1a4463)=>{const _0x4f402c=_0x4f9315;for(var _0x4bc349=_0x1a4463>0x1?void 0x0:_0x1a4463?re(_0x12e457,_0x427f69):_0x12e457,_0x25fed4=_0xaad7f3[_0x4f402c(0xcf)]-0x1,_0x23bb74;_0x25fed4>=0x0;_0x25fed4--)(_0x23bb74=_0xaad7f3[_0x25fed4])&&(_0x4bc349=_0x23bb74(_0x4bc349)||_0x4bc349);return _0x4bc349;},N=(_0x20abad,_0x3bb62e)=>(_0x14fa97,_0x5215f0)=>_0x3bb62e(_0x14fa97,_0x5215f0,_0x20abad);let g=class extends _0x3f16eb{constructor(_0x1c665d,_0x42355f){const _0x1603bd=_0x4f9315;super(),this[_0x1603bd(0xf7)]=_0x1c665d,this[_0x1603bd(0xf2)]=_0x42355f,this[_0x1603bd(0xeb)]();}['_initDataSource'](){const _0xdbe197=_0x4f9315;this['_threadCommentDataSourceService'][_0xdbe197(0x12f)]=this[_0xdbe197(0xf2)],this[_0xdbe197(0xf7)][_0xdbe197(0x10f)]=!0x1;}};g=te([N(0x0,_0xd47b4),N(0x1,_0x4395a5(f))],g);var se=Object[_0x4f9315(0xd8)],oe=Object[_0x4f9315(0x108)],ne=(_0x3f7ab8,_0x1abd36,_0x58fb5b)=>_0x1abd36 in _0x3f7ab8?se(_0x3f7ab8,_0x1abd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58fb5b}):_0x3f7ab8[_0x1abd36]=_0x58fb5b,ie=(_0x2e71ca,_0x3b0fe0,_0x3084a1,_0x2ba560)=>{const _0x19761b=_0x4f9315;for(var _0x2bea22=_0x2ba560>0x1?void 0x0:_0x2ba560?oe(_0x3b0fe0,_0x3084a1):_0x3b0fe0,_0x49d0fd=_0x2e71ca[_0x19761b(0xcf)]-0x1,_0x28df2d;_0x49d0fd>=0x0;_0x49d0fd--)(_0x28df2d=_0x2e71ca[_0x49d0fd])&&(_0x2bea22=_0x28df2d(_0x2bea22)||_0x2bea22);return _0x2bea22;},w=(_0x7f8c09,_0x2e66c9)=>(_0x404563,_0x5155cc)=>_0x2e66c9(_0x404563,_0x5155cc,_0x7f8c09),$=(_0x479723,_0x4ca56f,_0x42df61)=>ne(_0x479723,typeof _0x4ca56f!=_0x4f9315(0x11d)?_0x4ca56f+'':_0x4ca56f,_0x42df61);let b=class extends _0x290c01{constructor(_0x31c138=M,_0x38c186,_0x4ad6b3){const _0x4ce06d=_0x4f9315;super(),this['_config']=_0x31c138,this[_0x4ce06d(0x111)]=_0x38c186,this['_configService']=_0x4ad6b3;const {..._0x2f3327}=_0x5aa3a4({},M,this['_config']);this[_0x4ce06d(0xe2)][_0x4ce06d(0x109)](z,_0x2f3327);}['onStarting'](){const _0x588261=_0x4f9315;[[f],[g],[S]][_0x588261(0xfa)](_0x47773f=>{const _0x24f831=_0x588261;this[_0x24f831(0x111)][_0x24f831(0xe7)](_0x47773f);});}[_0x4f9315(0x114)](){const _0x3ff83a=_0x4f9315;this[_0x3ff83a(0x111)][_0x3ff83a(0xec)](g),this['_injector'][_0x3ff83a(0xec)](S);}};$(b,_0x4f9315(0x135),W),$(b,_0x4f9315(0xdc),_0x1d95eb[_0x4f9315(0x12d)]),b=ie([_0x4b6a7b(_0x8ab5ff,_0x589b09,_0x10820f),w(0x1,_0x4395a5(_0x3849c5)),w(0x2,_0xd35145)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xd7710b=_0x1d47;function _0x1d47(_0x42c727,_0x5bfbe4){const _0x5b7d2a=_0x5b7d();return _0x1d47=function(_0x1d4756,_0x19f082){_0x1d4756=_0x1d4756-0xd7;let _0x2956af=_0x5b7d2a[_0x1d4756];return _0x2956af;},_0x1d47(_0x42c727,_0x5bfbe4);}(function(_0x438eff,_0x43a904){const _0x149fad=_0x1d47,_0x56e657=_0x438eff();while(!![]){try{const _0x45cd28=parseInt(_0x149fad(0xfa))/0x1+-parseInt(_0x149fad(0x120))/0x2*(-parseInt(_0x149fad(0x10e))/0x3)+parseInt(_0x149fad(0x128))/0x4*(-parseInt(_0x149fad(0x126))/0x5)+-parseInt(_0x149fad(0x134))/0x6+-parseInt(_0x149fad(0xe0))/0x7*(parseInt(_0x149fad(0xec))/0x8)+parseInt(_0x149fad(0x114))/0x9*(-parseInt(_0x149fad(0xd9))/0xa)+parseInt(_0x149fad(0xfe))/0xb;if(_0x45cd28===_0x43a904)break;else _0x56e657['push'](_0x56e657['shift']());}catch(_0x32d357){_0x56e657['push'](_0x56e657['shift']());}}}(_0x5b7d,0x65113));function _0x5b7d(){const _0x4b29e0=['forEach','YYYY/MM/DD\x20HH:mm','_httpService','user','585jbeixQ','getComment','onStarting','threadId','Solve','type','format','saveCommentToSnapshot','users','getUnit','resolveComment','updateComment','23468mMnySj','UNIVER_UNKNOWN','/universer-api/comment/unit/','_threadCommentDataSourceService','setConfig','map','5jyrQIZ','comments','2336444KLSkJH','requireSession','slice','getOwnPropertyDescriptor','replies','_injector','onReady','addUser','UNRECOGNIZED','error','_initUserSync','_sessionService','364824iVylat','post','/reply','Reply','find','rangeId','/delete','Add','_threadCommentDataSource','29570BRvUdm','get','rangeType','/add','Unknown','userID','_commentService','7BanChc','_config','code','Delete','root','getMemberID','userId','subscribe','length','Edit','_init','/edit','5753544WzaNCj','reply','OpenOrReOpen','createTimestamp','_configService','/solved','add','addComment','_userService','_threadCommentModel','size','deleteComment','unitId','replyId','559453mDbYvO','Solved','personId','comment','14744697uGXjLN','_initDataSource','content','body','parse','parentId','disposeWithMe','payload','COMMENT','dataSource','filter','customRanges','solved','getCurrentUser','delete','values','18qbnfNh','stringify'];_0x5b7d=function(){return _0x4b29e0;};return _0x5b7d();}import{CommentService as _0x16caf3,CollaborationSessionService as _0x457475,UniverCollaborationClientPlugin as _0x1937c0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d8b63}from'@univerjs-pro/license';import{dayjs as _0x2f02a1,UserManagerService as _0x464d0b,Inject as _0x1eb853,Injector as _0x47d469,Disposable as _0xad8c05,CustomRangeType as _0x4ee5e9,UniverInstanceType as _0x11d5ed,DependentOn as _0x836a12,IConfigService as _0x37892c,Plugin as _0x1a8cdb,merge as _0x3392b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4818f8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x31a474,IThreadCommentDataSourceService as _0x1f6f34}from'@univerjs/thread-comment';import{bufferTime as _0x59cf22}from'rxjs';import{HTTPService as _0xd74d41}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2c5ed3=>(_0x2c5ed3[_0x2c5ed3['OpenOrReOpen']=0x0]=_0xd7710b(0xee),_0x2c5ed3[_0x2c5ed3[_0xd7710b(0xfb)]=0x1]='Solved',_0x2c5ed3[_0x2c5ed3[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x2c5ed3))(I||{}),v=(_0x5f4b1e=>(_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xdd)]=0x0]=_0xd7710b(0xdd),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xd7)]=0x1]=_0xd7710b(0xd7),_0x5f4b1e[_0x5f4b1e['Reply']=0x2]='Reply',_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe9)]=0x3]=_0xd7710b(0xe9),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe3)]=0x4]=_0xd7710b(0xe3),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x118)]=0x5]=_0xd7710b(0x118),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x5f4b1e))(v||{});const D=_0x19b0b3=>_0x2f02a1(new Date(+_0x19b0b3))[_0xd7710b(0x11a)](_0xd7710b(0x111)),B=async(_0x424b12,_0x5a9223)=>{const _0x3ea08c=_0xd7710b,_0x4c325b=_0x424b12[_0x3ea08c(0xda)](_0x464d0b),_0x3cce24=_0x424b12[_0x3ea08c(0xda)](_0xd74d41);_0x5a9223['forEach'](_0x3eb237=>{const _0x46390a=_0x3ea08c;_0x4c325b['getUser'](_0x3eb237)&&_0x5a9223[_0x46390a(0x10c)](_0x3eb237);}),_0x5a9223[_0x3ea08c(0xf6)]&&(await _0x3cce24[_0x3ea08c(0xda)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5a9223]}}))[_0x3ea08c(0x101)][_0x3ea08c(0x11c)][_0x3ea08c(0x110)](_0x556b4c=>{_0x556b4c&&_0x4c325b['addUser'](_0x556b4c);});};var K=Object[_0xd7710b(0x12b)],V=(_0x49d2f3,_0x5a3556,_0x57b034,_0x1fa525)=>{for(var _0x14cab0=_0x1fa525>0x1?void 0x0:_0x1fa525?K(_0x5a3556,_0x57b034):_0x5a3556,_0x3fd46f=_0x49d2f3['length']-0x1,_0x14647d;_0x3fd46f>=0x0;_0x3fd46f--)(_0x14647d=_0x49d2f3[_0x3fd46f])&&(_0x14cab0=_0x14647d(_0x14cab0)||_0x14cab0);return _0x14cab0;},p=(_0x4aa503,_0x5c9c3c)=>(_0x39ca9f,_0x5446c1)=>_0x5c9c3c(_0x39ca9f,_0x5446c1,_0x4aa503);let S=class extends _0xad8c05{constructor(_0x347bfe,_0x46e80a,_0x337dc7,_0x41d25c){const _0x25b102=_0xd7710b;super(),this[_0x25b102(0xdf)]=_0x347bfe,this[_0x25b102(0xf5)]=_0x46e80a,this[_0x25b102(0xf4)]=_0x337dc7,this[_0x25b102(0x12d)]=_0x41d25c,this[_0x25b102(0xea)](),this[_0x25b102(0x132)]();}[_0xd7710b(0x132)](){const _0x589ad9=_0xd7710b;this[_0x589ad9(0x104)](this[_0x589ad9(0xf5)]['commentUpdate$']['pipe'](_0x59cf22(0x10))[_0x589ad9(0xe7)](_0x4c4e76=>{const _0x2a3a67=_0x589ad9,_0x538fd7=new Set();_0x4c4e76[_0x2a3a67(0x110)](_0x5a6288=>{const _0x5a3d76=_0x2a3a67;switch(_0x5a6288[_0x5a3d76(0x119)]){case'add':{const _0x2e9161=_0x5a6288[_0x5a3d76(0x105)][_0x5a3d76(0xfc)];_0x538fd7[_0x5a3d76(0xf2)](_0x2e9161);break;}}}),B(this[_0x2a3a67(0x12d)],_0x538fd7);}));}[_0xd7710b(0xea)](){const _0xb2c303=_0xd7710b;this['disposeWithMe'](this[_0xb2c303(0xdf)]['commentUpdate$'][_0xb2c303(0xe7)](async _0x16b2ab=>{const _0x4f1cd9=_0xb2c303;var _0x32b6ac,_0x11dbb8,_0x4728f3,_0x211002;const _0x2462e4=(_0x32b6ac=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab[_0x4f1cd9(0xf8)])[_0x4f1cd9(0x138)](_0x2ad9b7=>_0x2ad9b7[_0x4f1cd9(0x117)]===_0x16b2ab['threadId']))==null?void 0x0:_0x32b6ac[_0x4f1cd9(0xe4)];if(!_0x2462e4)return;const {unitId:_0x4e2219,subUnitId:_0xa856f1}=_0x2462e4;switch(_0x16b2ab['user']&&this[_0x4f1cd9(0xf4)][_0x4f1cd9(0x12f)](_0x16b2ab[_0x4f1cd9(0x113)]),_0x16b2ab[_0x4f1cd9(0x119)]){case v[_0x4f1cd9(0xd7)]:break;case v[_0x4f1cd9(0x137)]:{this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf3)](_0x4e2219,_0xa856f1,{'unitId':_0x4e2219,'subUnitId':_0xa856f1,'ref':'','id':_0x16b2ab[_0x4f1cd9(0xf9)],'dT':D(+_0x16b2ab[_0x4f1cd9(0xef)]),'threadId':_0x16b2ab['threadId'],'personId':(_0x4728f3=(_0x11dbb8=_0x16b2ab['user'])==null?void 0x0:_0x11dbb8['userID'])!=null?_0x4728f3:_0x16b2ab['userId'],'text':JSON['parse'](_0x16b2ab[_0x4f1cd9(0x100)]),'parentId':_0x2462e4['id']});break;}case v[_0x4f1cd9(0xe3)]:{const _0x103231=this['_threadCommentModel'][_0x4f1cd9(0x115)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);_0x103231&&_0x103231[_0x4f1cd9(0x103)]&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf7)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);break;}case v[_0x4f1cd9(0xe9)]:{this['_threadCommentModel'][_0x4f1cd9(0x11f)](_0x4e2219,_0xa856f1,{'commentId':_0x16b2ab[_0x4f1cd9(0xf9)],'text':JSON[_0x4f1cd9(0x102)](_0x16b2ab[_0x4f1cd9(0x100)])});break;}case v[_0x4f1cd9(0x118)]:{const _0x2512c3=(_0x211002=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab['unitId'])[_0x4f1cd9(0x138)](_0x466030=>_0x466030[_0x4f1cd9(0x117)]===_0x16b2ab[_0x4f1cd9(0x117)]))==null?void 0x0:_0x211002['root'];_0x2512c3&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11e)](_0x4e2219,_0xa856f1,_0x2512c3['id'],_0x16b2ab[_0x4f1cd9(0x10a)]===I[_0x4f1cd9(0xfb)]);break;}}}));}};S=V([p(0x0,_0x1eb853(_0x16caf3)),p(0x1,_0x1eb853(_0x31a474)),p(0x2,_0x1eb853(_0x464d0b)),p(0x3,_0x1eb853(_0x47d469))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2ca295,_0x1d698b,_0x17c709,_0x5bd19f)=>{const _0x54f459=_0xd7710b;for(var _0x30752a=_0x5bd19f>0x1?void 0x0:_0x5bd19f?k(_0x1d698b,_0x17c709):_0x1d698b,_0x2d17a7=_0x2ca295[_0x54f459(0xe8)]-0x1,_0x49259e;_0x2d17a7>=0x0;_0x2d17a7--)(_0x49259e=_0x2ca295[_0x2d17a7])&&(_0x30752a=_0x49259e(_0x30752a)||_0x30752a);return _0x30752a;},_=(_0x4a285a,_0x4f5511)=>(_0x4a5bad,_0xbe27a3)=>_0x4f5511(_0x4a5bad,_0xbe27a3,_0x4a285a);function X(_0x3dbcd6,_0x2c83d5){const _0x52b9a0=_0xd7710b,_0x1d3100=_0x3dbcd6[_0x52b9a0(0x12c)][0x0];return{..._0x2c83d5,'id':_0x1d3100[_0x52b9a0(0xf9)],'resolved':_0x3dbcd6[_0x52b9a0(0x10a)]===0x1,'dT':D(_0x1d3100['createTimestamp']),'personId':_0x1d3100['userId'],'threadId':_0x1d3100[_0x52b9a0(0x117)]};}function ee(_0x34d1ed,_0x30a5ce,_0x41fbef){const _0x32f5e7=_0xd7710b;var _0x3fe4ec,_0x348b5a;if(((_0x348b5a=(_0x3fe4ec=_0x34d1ed==null?void 0x0:_0x34d1ed[_0x32f5e7(0x12c)])==null?void 0x0:_0x3fe4ec[_0x32f5e7(0xe8)])!=null?_0x348b5a:0x0)>0x0){const _0x36779e=(_0x9313bd,_0x479468)=>({'id':_0x9313bd[_0x32f5e7(0xf9)],'threadId':_0x9313bd[_0x32f5e7(0x117)],'dT':D(_0x9313bd['createTimestamp']),'personId':_0x9313bd[_0x32f5e7(0xe6)],'resolved':_0x34d1ed['solved']===I[_0x32f5e7(0xfb)],'unitId':_0x30a5ce,'subUnitId':_0x41fbef,'text':JSON[_0x32f5e7(0x102)](_0x9313bd['content']),'parentId':_0x479468}),_0xa46b0c=_0x36779e(_0x34d1ed[_0x32f5e7(0x12c)][0x0]);return{..._0xa46b0c,'children':_0x34d1ed[_0x32f5e7(0x12c)][_0x32f5e7(0x12a)](0x1)['map'](_0x3f1e85=>_0x36779e(_0x3f1e85,_0xa46b0c['id']))};}return null;}let f=class{constructor(_0x3bc38f,_0x28ef09,_0x366ffe,_0x44b4f0){const _0x188712=_0xd7710b;this[_0x188712(0x112)]=_0x3bc38f,this[_0x188712(0xf4)]=_0x28ef09,this[_0x188712(0x133)]=_0x366ffe,this[_0x188712(0x12d)]=_0x44b4f0;}async['addComment'](_0x4f79e6){const _0x53c2b7=_0xd7710b;var _0x7220b9,_0x2587f3;const {parentId:_0x5c30bb,unitId:_0x1a906e,text:_0x10c847,threadId:_0x3bfbc1}=_0x4f79e6,_0x1e5cbd=(_0x2587f3=(_0x7220b9=_0x10c847[_0x53c2b7(0x109)])==null?void 0x0:_0x7220b9[_0x53c2b7(0x108)](_0xed1617=>_0xed1617[_0x53c2b7(0xdb)]===_0x4ee5e9[_0x53c2b7(0x106)])[_0x53c2b7(0x125)](_0x51b76a=>_0x51b76a[_0x53c2b7(0x139)]))!=null?_0x2587f3:[],_0x27e53b=JSON['stringify'](_0x10c847),_0x488780=(await this[_0x53c2b7(0x133)][_0x53c2b7(0x129)](_0x1a906e))[_0x53c2b7(0xe5)]();if(_0x5c30bb){const _0x1d30a0={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd,'threadId':_0x3bfbc1},_0x43c0ea=(await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)](_0x53c2b7(0x122)+_0x1a906e+_0x53c2b7(0x136),{'body':_0x1d30a0}))[_0x53c2b7(0x101)][_0x53c2b7(0xed)];return{..._0x4f79e6,'id':_0x43c0ea['replyId'],'dT':_0x2f02a1(+_0x43c0ea[_0x53c2b7(0xef)])['format'](_0x53c2b7(0x111)),'personId':_0x43c0ea['userId']};}else{const _0x36f390={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd},_0x484bcc=await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)]('/universer-api/comment/unit/'+_0x1a906e+_0x53c2b7(0xdc),{'body':_0x36f390});return X(_0x484bcc[_0x53c2b7(0x101)][_0x53c2b7(0xfd)],_0x4f79e6);}}async[_0xd7710b(0x11f)](_0x1f8a5a){const _0x5e4f97=_0xd7710b;var _0x323766,_0x288817;const {text:_0x4bf748,unitId:_0x3b66a5}=_0x1f8a5a,_0x40dd43=(_0x288817=(_0x323766=_0x4bf748[_0x5e4f97(0x109)])==null?void 0x0:_0x323766[_0x5e4f97(0x108)](_0x88f52f=>_0x88f52f['rangeType']===_0x4ee5e9['COMMENT'])[_0x5e4f97(0x125)](_0x2de504=>_0x2de504['rangeId']))!=null?_0x288817:[],_0x37a1f6=JSON[_0x5e4f97(0x10f)](_0x4bf748),_0x426190=_0x1f8a5a[_0x5e4f97(0x117)],_0x5ecd9b=_0x1f8a5a['id'],_0x48fa59={'memberId':(await this['_sessionService'][_0x5e4f97(0x129)](_0x3b66a5))[_0x5e4f97(0xe5)](),'unitId':_0x3b66a5,'threadId':_0x426190,'mention':_0x40dd43,'content':_0x37a1f6,'replyId':_0x5ecd9b},_0x3836ad=await this[_0x5e4f97(0x112)][_0x5e4f97(0x135)](_0x5e4f97(0x122)+_0x3b66a5+_0x5e4f97(0xeb),{'body':_0x48fa59});return!_0x3836ad['body'][_0x5e4f97(0x131)]||_0x3836ad[_0x5e4f97(0x101)][_0x5e4f97(0x131)][_0x5e4f97(0xe2)]===0x1;}async['resolveComment'](_0x5a30b1){const _0x2e2cde=_0xd7710b,{unitId:_0x1d38c4}=_0x5a30b1,_0x38f42b=_0x5a30b1['threadId'],_0x3e12dc={'memberId':this[_0x2e2cde(0xf4)][_0x2e2cde(0x10b)]()[_0x2e2cde(0xde)],'unitId':_0x1d38c4,'threadId':_0x38f42b,'solved':_0x5a30b1['resolved']?I['Solved']:I[_0x2e2cde(0xee)]},_0x4cc3ff=await this['_httpService']['post'](_0x2e2cde(0x122)+_0x1d38c4+_0x2e2cde(0xf1),{'body':_0x3e12dc});return!_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]||_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]['code']===0x1;}async['deleteComment'](_0x3cc431,_0x1619c0,_0x48c0b3,_0x5b4297){const _0x4cb6a6=_0xd7710b,_0x3f27dc={'memberId':(await this[_0x4cb6a6(0x133)][_0x4cb6a6(0x129)](_0x3cc431))['getMemberID'](),'threadId':_0x48c0b3,'replyId':_0x5b4297,'unitId':_0x3cc431},_0x5a2009=await this[_0x4cb6a6(0x112)]['post'](_0x4cb6a6(0x122)+_0x3cc431+_0x4cb6a6(0x13a),{'body':_0x3f27dc});return!_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]||_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]['code']===0x1;}async['listComments'](_0x3b959e,_0x3db547,_0x215cc6){const _0x2a6c4b=_0xd7710b,_0x216491={'unitId':_0x3b959e,'threadId':_0x215cc6},_0x51eba8=await this[_0x2a6c4b(0x112)][_0x2a6c4b(0x135)]('/universer-api/comment/unit/'+_0x3b959e+'/list',{'body':_0x216491}),_0x552a57=_0x215cc6[_0x2a6c4b(0x125)](_0x1625f7=>ee(_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x127)][_0x1625f7],_0x3b959e,_0x3db547))['filter'](Boolean);return Object[_0x2a6c4b(0x10d)](_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x11c)])[_0x2a6c4b(0x110)](_0x491622=>{const _0x3ea6dd=_0x2a6c4b;this[_0x3ea6dd(0xf4)]['addUser'](_0x491622);}),_0x552a57;}[_0xd7710b(0x11b)](_0xb8f4d){const _0x195ed9=_0xd7710b;return{'id':_0xb8f4d['id'],'threadId':_0xb8f4d[_0x195ed9(0x117)],'ref':_0xb8f4d['ref']};}};f=Q([_(0x0,_0x1eb853(_0xd74d41)),_(0x1,_0x1eb853(_0x464d0b)),_(0x2,_0x1eb853(_0x457475)),_(0x3,_0x1eb853(_0x47d469))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x270747,_0x203b13,_0x177d9f,_0x345a49)=>{const _0x4a256b=_0xd7710b;for(var _0x2a5226=_0x345a49>0x1?void 0x0:_0x345a49?re(_0x203b13,_0x177d9f):_0x203b13,_0xd62d08=_0x270747[_0x4a256b(0xe8)]-0x1,_0x166336;_0xd62d08>=0x0;_0xd62d08--)(_0x166336=_0x270747[_0xd62d08])&&(_0x2a5226=_0x166336(_0x2a5226)||_0x2a5226);return _0x2a5226;},N=(_0x27cf96,_0x28a9e9)=>(_0x3f4182,_0x4e1379)=>_0x28a9e9(_0x3f4182,_0x4e1379,_0x27cf96);let g=class extends _0xad8c05{constructor(_0x4a0fbf,_0x3605c0){const _0x643c7a=_0xd7710b;super(),this['_threadCommentDataSourceService']=_0x4a0fbf,this['_threadCommentDataSource']=_0x3605c0,this[_0x643c7a(0xff)]();}['_initDataSource'](){const _0x8ef8d7=_0xd7710b;this[_0x8ef8d7(0x123)][_0x8ef8d7(0x107)]=this[_0x8ef8d7(0xd8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x1f6f34),N(0x1,_0x1eb853(f))],g);var se=Object['defineProperty'],oe=Object[_0xd7710b(0x12b)],ne=(_0x4eb572,_0x5db4db,_0xa0053a)=>_0x5db4db in _0x4eb572?se(_0x4eb572,_0x5db4db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa0053a}):_0x4eb572[_0x5db4db]=_0xa0053a,ie=(_0x4606c9,_0x285985,_0x5f12c3,_0x3e4c41)=>{const _0x146fb5=_0xd7710b;for(var _0x279174=_0x3e4c41>0x1?void 0x0:_0x3e4c41?oe(_0x285985,_0x5f12c3):_0x285985,_0x2b574c=_0x4606c9[_0x146fb5(0xe8)]-0x1,_0x4b1dee;_0x2b574c>=0x0;_0x2b574c--)(_0x4b1dee=_0x4606c9[_0x2b574c])&&(_0x279174=_0x4b1dee(_0x279174)||_0x279174);return _0x279174;},w=(_0x3775cc,_0x21372)=>(_0x28b495,_0x41fd76)=>_0x21372(_0x28b495,_0x41fd76,_0x3775cc),$=(_0x381115,_0x5e3ba6,_0x53b04e)=>ne(_0x381115,typeof _0x5e3ba6!='symbol'?_0x5e3ba6+'':_0x5e3ba6,_0x53b04e);let b=class extends _0x1a8cdb{constructor(_0x582d38=M,_0x1484d7,_0x2431de){const _0x5a5f93=_0xd7710b;super(),this['_config']=_0x582d38,this[_0x5a5f93(0x12d)]=_0x1484d7,this[_0x5a5f93(0xf0)]=_0x2431de;const {..._0x17c7c5}=_0x3392b3({},M,this[_0x5a5f93(0xe1)]);this[_0x5a5f93(0xf0)][_0x5a5f93(0x124)](z,_0x17c7c5);}[_0xd7710b(0x116)](){const _0x5a42bf=_0xd7710b;[[f],[g],[S]][_0x5a42bf(0x110)](_0x1d372=>{const _0x57ca00=_0x5a42bf;this['_injector'][_0x57ca00(0xf2)](_0x1d372);});}[_0xd7710b(0x12e)](){const _0x571be7=_0xd7710b;this[_0x571be7(0x12d)][_0x571be7(0xda)](g),this[_0x571be7(0x12d)][_0x571be7(0xda)](S);}};$(b,'pluginName',W),$(b,'type',_0x11d5ed[_0xd7710b(0x121)]),b=ie([_0x836a12(_0x4818f8,_0x1937c0,_0x5d8b63),w(0x1,_0x1eb853(_0x47d469)),w(0x2,_0x37892c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4f9315=_0x1093;function _0x96a8(){const _0x11c432=['addUser','Solved','ref','content','getOwnPropertyDescriptor','setConfig','resolved','/edit','784YKkfsJ','UNRECOGNIZED','_initUserSync','syncUpdateMutationToColla','saveCommentToSnapshot','_injector','error','map','onReady','listComments','/universer-api/user/list','rangeType','_httpService','YYYY/MM/DD\x20HH:mm','/solved','size','userId','symbol','addComment','getMemberID','commentUpdate$','code','Edit','getComment','parentId','stringify','filter','unitId','resolveComment','rangeId','Solve','replyId','_userService','UNIVER_UNKNOWN','deleteComment','dataSource','payload','90oqcliU','solved','comment','6747856yDIypc','pluginName','comments','length','body','_commentService','root','_sessionService','replies','getCurrentUser','users','_threadCommentModel','defineProperty','getUnit','OpenOrReOpen','9627366ZMmpjv','type','slice','1870196FQApxT','/add','/universer-api/comment/unit/','COMMENT','_configService','user','818010nTJToR','4831821BlKIdG','9228hdXaxi','add','thread-comment-data-source.config','Reply','delete','_initDataSource','get','Unknown','format','disposeWithMe','createTimestamp','642795vzmxvy','_threadCommentDataSource','pipe','/list','find','_init','_threadCommentDataSourceService','threadId','post','forEach','30HBAqxF','values','updateComment','userID','parse','Delete','requireSession','Add','customRanges'];_0x96a8=function(){return _0x11c432;};return _0x96a8();}(function(_0x2b693b,_0x563364){const _0x58350a=_0x1093,_0x48d822=_0x2b693b();while(!![]){try{const _0x33833c=-parseInt(_0x58350a(0xe4))/0x1+-parseInt(_0x58350a(0xde))/0x2+-parseInt(_0x58350a(0xe6))/0x3*(-parseInt(_0x58350a(0x10c))/0x4)+parseInt(_0x58350a(0xf1))/0x5*(-parseInt(_0x58350a(0xfb))/0x6)+-parseInt(_0x58350a(0xdb))/0x7+-parseInt(_0x58350a(0x134))/0x8+parseInt(_0x58350a(0xe5))/0x9*(parseInt(_0x58350a(0x131))/0xa);if(_0x33833c===_0x563364)break;else _0x48d822['push'](_0x48d822['shift']());}catch(_0x42f4b5){_0x48d822['push'](_0x48d822['shift']());}}}(_0x96a8,0xc831a));import{CommentService as _0x3ab801,CollaborationSessionService as _0x243c30,UniverCollaborationClientPlugin as _0x589b09}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x10820f}from'@univerjs-pro/license';import{dayjs as _0x113944,UserManagerService as _0x3bc288,Inject as _0x4395a5,Injector as _0x3849c5,Disposable as _0x3f16eb,CustomRangeType as _0x1fdbdf,UniverInstanceType as _0x1d95eb,DependentOn as _0x4b6a7b,IConfigService as _0xd35145,Plugin as _0x290c01,merge as _0x5aa3a4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x8ab5ff}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x26caec,IThreadCommentDataSourceService as _0xd47b4}from'@univerjs/thread-comment';import{bufferTime as _0x745818}from'rxjs';import{HTTPService as _0x495cf5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2cea32=>(_0x2cea32[_0x2cea32[_0x4f9315(0xda)]=0x0]=_0x4f9315(0xda),_0x2cea32[_0x2cea32[_0x4f9315(0x105)]=0x1]=_0x4f9315(0x105),_0x2cea32[_0x2cea32[_0x4f9315(0x10d)]=-0x1]=_0x4f9315(0x10d),_0x2cea32))(I||{}),v=(_0x14b3a7=>(_0x14b3a7[_0x14b3a7[_0x4f9315(0xed)]=0x0]=_0x4f9315(0xed),_0x14b3a7[_0x14b3a7[_0x4f9315(0x102)]=0x1]='Add',_0x14b3a7[_0x14b3a7[_0x4f9315(0xe9)]=0x2]=_0x4f9315(0xe9),_0x14b3a7[_0x14b3a7[_0x4f9315(0x122)]=0x3]=_0x4f9315(0x122),_0x14b3a7[_0x14b3a7['Delete']=0x4]=_0x4f9315(0x100),_0x14b3a7[_0x14b3a7[_0x4f9315(0x12a)]=0x5]=_0x4f9315(0x12a),_0x14b3a7[_0x14b3a7[_0x4f9315(0x10d)]=-0x1]='UNRECOGNIZED',_0x14b3a7))(v||{});const D=_0x4a736c=>_0x113944(new Date(+_0x4a736c))[_0x4f9315(0xee)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x45e369,_0x42f827)=>{const _0x4f2171=_0x4f9315,_0x141c32=_0x45e369[_0x4f2171(0xec)](_0x3bc288),_0x19cdba=_0x45e369[_0x4f2171(0xec)](_0x495cf5);_0x42f827[_0x4f2171(0xfa)](_0x3e7421=>{const _0x58b955=_0x4f2171;_0x141c32['getUser'](_0x3e7421)&&_0x42f827[_0x58b955(0xea)](_0x3e7421);}),_0x42f827[_0x4f2171(0x11b)]&&(await _0x19cdba[_0x4f2171(0xec)](_0x4f2171(0x116),{'params':{'userIDs':[..._0x42f827]}}))[_0x4f2171(0xd0)][_0x4f2171(0xd6)][_0x4f2171(0xfa)](_0x1fb079=>{const _0x7fd648=_0x4f2171;_0x1fb079&&_0x141c32[_0x7fd648(0x104)](_0x1fb079);});};var K=Object[_0x4f9315(0x108)],V=(_0x20f58a,_0x277ff2,_0x355b37,_0x12fa46)=>{const _0x568e55=_0x4f9315;for(var _0x272374=_0x12fa46>0x1?void 0x0:_0x12fa46?K(_0x277ff2,_0x355b37):_0x277ff2,_0x2aee80=_0x20f58a[_0x568e55(0xcf)]-0x1,_0x2a85c6;_0x2aee80>=0x0;_0x2aee80--)(_0x2a85c6=_0x20f58a[_0x2aee80])&&(_0x272374=_0x2a85c6(_0x272374)||_0x272374);return _0x272374;},p=(_0x43598d,_0xd8f65e)=>(_0x3d172e,_0x23861c)=>_0xd8f65e(_0x3d172e,_0x23861c,_0x43598d);let S=class extends _0x3f16eb{constructor(_0x5499df,_0x3d1d0e,_0x4ffe7a,_0x1a9d47){const _0x31b1d5=_0x4f9315;super(),this[_0x31b1d5(0xd1)]=_0x5499df,this[_0x31b1d5(0xd7)]=_0x3d1d0e,this['_userService']=_0x4ffe7a,this[_0x31b1d5(0x111)]=_0x1a9d47,this[_0x31b1d5(0xf6)](),this[_0x31b1d5(0x10e)]();}[_0x4f9315(0x10e)](){const _0x42caf8=_0x4f9315;this[_0x42caf8(0xef)](this[_0x42caf8(0xd7)][_0x42caf8(0x120)][_0x42caf8(0xf3)](_0x745818(0x10))['subscribe'](_0x20ab19=>{const _0x468743=_0x42caf8,_0x2c0254=new Set();_0x20ab19[_0x468743(0xfa)](_0x475f55=>{const _0x2a4489=_0x468743;switch(_0x475f55[_0x2a4489(0xdc)]){case'add':{const _0x27eb33=_0x475f55[_0x2a4489(0x130)]['personId'];_0x2c0254['add'](_0x27eb33);break;}}}),B(this['_injector'],_0x2c0254);}));}['_init'](){const _0x55fee9=_0x4f9315;this[_0x55fee9(0xef)](this['_commentService'][_0x55fee9(0x120)]['subscribe'](async _0x44860e=>{const _0x3a6bb7=_0x55fee9;var _0x4979be,_0x205623,_0x561492,_0x5100bc;const _0x2e4dcf=(_0x4979be=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e['unitId'])['find'](_0x1b0661=>_0x1b0661[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x4979be['root'];if(!_0x2e4dcf)return;const {unitId:_0x2b5af0,subUnitId:_0x59b6b2}=_0x2e4dcf;switch(_0x44860e[_0x3a6bb7(0xe3)]&&this['_userService'][_0x3a6bb7(0x104)](_0x44860e[_0x3a6bb7(0xe3)]),_0x44860e[_0x3a6bb7(0xdc)]){case v[_0x3a6bb7(0x102)]:break;case v[_0x3a6bb7(0xe9)]:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x11e)](_0x2b5af0,_0x59b6b2,{'unitId':_0x2b5af0,'subUnitId':_0x59b6b2,'ref':'','id':_0x44860e[_0x3a6bb7(0x12b)],'dT':D(+_0x44860e[_0x3a6bb7(0xf0)]),'threadId':_0x44860e[_0x3a6bb7(0xf8)],'personId':(_0x561492=(_0x205623=_0x44860e[_0x3a6bb7(0xe3)])==null?void 0x0:_0x205623[_0x3a6bb7(0xfe)])!=null?_0x561492:_0x44860e[_0x3a6bb7(0x11c)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e[_0x3a6bb7(0x107)]),'parentId':_0x2e4dcf['id']});break;}case v[_0x3a6bb7(0x100)]:{const _0x2c1f36=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x123)](_0x2b5af0,_0x59b6b2,_0x44860e['replyId']);_0x2c1f36&&_0x2c1f36[_0x3a6bb7(0x124)]&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x12e)](_0x2b5af0,_0x59b6b2,_0x44860e[_0x3a6bb7(0x12b)]);break;}case v['Edit']:{this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xfd)](_0x2b5af0,_0x59b6b2,{'commentId':_0x44860e[_0x3a6bb7(0x12b)],'text':JSON[_0x3a6bb7(0xff)](_0x44860e['content'])});break;}case v[_0x3a6bb7(0x12a)]:{const _0x36f6c0=(_0x5100bc=this[_0x3a6bb7(0xd7)][_0x3a6bb7(0xd9)](_0x44860e[_0x3a6bb7(0x127)])[_0x3a6bb7(0xf5)](_0x33056c=>_0x33056c[_0x3a6bb7(0xf8)]===_0x44860e[_0x3a6bb7(0xf8)]))==null?void 0x0:_0x5100bc[_0x3a6bb7(0xd2)];_0x36f6c0&&this[_0x3a6bb7(0xd7)][_0x3a6bb7(0x128)](_0x2b5af0,_0x59b6b2,_0x36f6c0['id'],_0x44860e[_0x3a6bb7(0x132)]===I[_0x3a6bb7(0x105)]);break;}}}));}};function _0x1093(_0x3857f5,_0x4fd443){const _0x96a8bd=_0x96a8();return _0x1093=function(_0x109304,_0x485c03){_0x109304=_0x109304-0xce;let _0x298a36=_0x96a8bd[_0x109304];return _0x298a36;},_0x1093(_0x3857f5,_0x4fd443);}S=V([p(0x0,_0x4395a5(_0x3ab801)),p(0x1,_0x4395a5(_0x26caec)),p(0x2,_0x4395a5(_0x3bc288)),p(0x3,_0x4395a5(_0x3849c5))],S);const z=_0x4f9315(0xe8),M={};var k=Object[_0x4f9315(0x108)],Q=(_0x1bd5c6,_0x49c3ef,_0x14bbf8,_0x33aeee)=>{const _0x1768b1=_0x4f9315;for(var _0xb3d02=_0x33aeee>0x1?void 0x0:_0x33aeee?k(_0x49c3ef,_0x14bbf8):_0x49c3ef,_0x4a1d54=_0x1bd5c6[_0x1768b1(0xcf)]-0x1,_0x40768f;_0x4a1d54>=0x0;_0x4a1d54--)(_0x40768f=_0x1bd5c6[_0x4a1d54])&&(_0xb3d02=_0x40768f(_0xb3d02)||_0xb3d02);return _0xb3d02;},_=(_0x164b37,_0x3de780)=>(_0x4d7120,_0x39bfb0)=>_0x3de780(_0x4d7120,_0x39bfb0,_0x164b37);function X(_0x40d8b3,_0x3dfea5){const _0x38d0f5=_0x4f9315,_0x3485c1=_0x40d8b3[_0x38d0f5(0xd4)][0x0];return{..._0x3dfea5,'id':_0x3485c1[_0x38d0f5(0x12b)],'resolved':_0x40d8b3[_0x38d0f5(0x132)]===0x1,'dT':D(_0x3485c1[_0x38d0f5(0xf0)]),'personId':_0x3485c1['userId'],'threadId':_0x3485c1[_0x38d0f5(0xf8)]};}function ee(_0x14201c,_0x432a39,_0x82ef9c){const _0x2217ea=_0x4f9315;var _0x212383,_0x2550ff;if(((_0x2550ff=(_0x212383=_0x14201c==null?void 0x0:_0x14201c[_0x2217ea(0xd4)])==null?void 0x0:_0x212383[_0x2217ea(0xcf)])!=null?_0x2550ff:0x0)>0x0){const _0x3d64fa=(_0x16db86,_0x361ee9)=>({'id':_0x16db86['replyId'],'threadId':_0x16db86[_0x2217ea(0xf8)],'dT':D(_0x16db86['createTimestamp']),'personId':_0x16db86[_0x2217ea(0x11c)],'resolved':_0x14201c[_0x2217ea(0x132)]===I[_0x2217ea(0x105)],'unitId':_0x432a39,'subUnitId':_0x82ef9c,'text':JSON[_0x2217ea(0xff)](_0x16db86[_0x2217ea(0x107)]),'parentId':_0x361ee9}),_0x1d45fd=_0x3d64fa(_0x14201c['replies'][0x0]);return{..._0x1d45fd,'children':_0x14201c[_0x2217ea(0xd4)][_0x2217ea(0xdd)](0x1)[_0x2217ea(0x113)](_0xec80be=>_0x3d64fa(_0xec80be,_0x1d45fd['id']))};}return null;}let f=class{constructor(_0x5d2b5c,_0x24bb37,_0x17d125,_0x1f9715){const _0xa76332=_0x4f9315;this[_0xa76332(0x118)]=_0x5d2b5c,this[_0xa76332(0x12c)]=_0x24bb37,this['_sessionService']=_0x17d125,this[_0xa76332(0x111)]=_0x1f9715;}async[_0x4f9315(0x11e)](_0x39cff2){const _0x5e6a1a=_0x4f9315;var _0x606ea8,_0x1d8a59;const {parentId:_0x272415,unitId:_0x1dfb4c,text:_0x32f593,threadId:_0x40a64b}=_0x39cff2,_0x37930d=(_0x1d8a59=(_0x606ea8=_0x32f593[_0x5e6a1a(0x103)])==null?void 0x0:_0x606ea8[_0x5e6a1a(0x126)](_0x19b8b9=>_0x19b8b9[_0x5e6a1a(0x117)]===_0x1fdbdf['COMMENT'])[_0x5e6a1a(0x113)](_0x28d214=>_0x28d214['rangeId']))!=null?_0x1d8a59:[],_0x16ea6e=JSON[_0x5e6a1a(0x125)](_0x32f593),_0x41b451=(await this[_0x5e6a1a(0xd3)][_0x5e6a1a(0x101)](_0x1dfb4c))['getMemberID']();if(_0x272415){const _0x3018bc={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d,'threadId':_0x40a64b},_0x3ccac9=(await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)]('/universer-api/comment/unit/'+_0x1dfb4c+'/reply',{'body':_0x3018bc}))[_0x5e6a1a(0xd0)]['reply'];return{..._0x39cff2,'id':_0x3ccac9[_0x5e6a1a(0x12b)],'dT':_0x113944(+_0x3ccac9[_0x5e6a1a(0xf0)])['format'](_0x5e6a1a(0x119)),'personId':_0x3ccac9[_0x5e6a1a(0x11c)]};}else{const _0x11ccd9={'memberId':_0x41b451,'unitId':_0x1dfb4c,'content':_0x16ea6e,'mention':_0x37930d},_0x15ab40=await this[_0x5e6a1a(0x118)][_0x5e6a1a(0xf9)](_0x5e6a1a(0xe0)+_0x1dfb4c+_0x5e6a1a(0xdf),{'body':_0x11ccd9});return X(_0x15ab40[_0x5e6a1a(0xd0)][_0x5e6a1a(0x133)],_0x39cff2);}}async[_0x4f9315(0xfd)](_0x9f708a){const _0x2e244c=_0x4f9315;var _0x1094ab,_0x9eadb1;const {text:_0x136fb3,unitId:_0x4b119a}=_0x9f708a,_0x8bcd7a=(_0x9eadb1=(_0x1094ab=_0x136fb3[_0x2e244c(0x103)])==null?void 0x0:_0x1094ab[_0x2e244c(0x126)](_0x2bdd51=>_0x2bdd51[_0x2e244c(0x117)]===_0x1fdbdf[_0x2e244c(0xe1)])[_0x2e244c(0x113)](_0x17fd80=>_0x17fd80[_0x2e244c(0x129)]))!=null?_0x9eadb1:[],_0x4292ea=JSON[_0x2e244c(0x125)](_0x136fb3),_0x74ef76=_0x9f708a[_0x2e244c(0xf8)],_0x47b62f=_0x9f708a['id'],_0x4cc6b6={'memberId':(await this['_sessionService'][_0x2e244c(0x101)](_0x4b119a))[_0x2e244c(0x11f)](),'unitId':_0x4b119a,'threadId':_0x74ef76,'mention':_0x8bcd7a,'content':_0x4292ea,'replyId':_0x47b62f},_0x17c92d=await this[_0x2e244c(0x118)][_0x2e244c(0xf9)](_0x2e244c(0xe0)+_0x4b119a+_0x2e244c(0x10b),{'body':_0x4cc6b6});return!_0x17c92d['body']['error']||_0x17c92d[_0x2e244c(0xd0)][_0x2e244c(0x112)][_0x2e244c(0x121)]===0x1;}async[_0x4f9315(0x128)](_0x2ae0aa){const _0xd71b21=_0x4f9315,{unitId:_0x2fa12d}=_0x2ae0aa,_0x398e82=_0x2ae0aa[_0xd71b21(0xf8)],_0x5cf04c={'memberId':this[_0xd71b21(0x12c)][_0xd71b21(0xd5)]()[_0xd71b21(0xfe)],'unitId':_0x2fa12d,'threadId':_0x398e82,'solved':_0x2ae0aa[_0xd71b21(0x10a)]?I['Solved']:I[_0xd71b21(0xda)]},_0x3cbf4b=await this[_0xd71b21(0x118)]['post'](_0xd71b21(0xe0)+_0x2fa12d+_0xd71b21(0x11a),{'body':_0x5cf04c});return!_0x3cbf4b['body'][_0xd71b21(0x112)]||_0x3cbf4b[_0xd71b21(0xd0)][_0xd71b21(0x112)][_0xd71b21(0x121)]===0x1;}async['deleteComment'](_0x35a27e,_0x1c2972,_0x1e2eb7,_0x5d94ad){const _0x1a143c=_0x4f9315,_0x4046a3={'memberId':(await this['_sessionService']['requireSession'](_0x35a27e))['getMemberID'](),'threadId':_0x1e2eb7,'replyId':_0x5d94ad,'unitId':_0x35a27e},_0x1097e9=await this[_0x1a143c(0x118)][_0x1a143c(0xf9)]('/universer-api/comment/unit/'+_0x35a27e+'/delete',{'body':_0x4046a3});return!_0x1097e9[_0x1a143c(0xd0)][_0x1a143c(0x112)]||_0x1097e9['body'][_0x1a143c(0x112)][_0x1a143c(0x121)]===0x1;}async[_0x4f9315(0x115)](_0x1c690d,_0x100e25,_0x249390){const _0x232e38=_0x4f9315,_0x3853ed={'unitId':_0x1c690d,'threadId':_0x249390},_0x4d5586=await this[_0x232e38(0x118)][_0x232e38(0xf9)](_0x232e38(0xe0)+_0x1c690d+_0x232e38(0xf4),{'body':_0x3853ed}),_0x35f3e8=_0x249390[_0x232e38(0x113)](_0x23232c=>ee(_0x4d5586['body'][_0x232e38(0xce)][_0x23232c],_0x1c690d,_0x100e25))[_0x232e38(0x126)](Boolean);return Object[_0x232e38(0xfc)](_0x4d5586[_0x232e38(0xd0)]['users'])['forEach'](_0x545a10=>{const _0x2a8ad9=_0x232e38;this['_userService'][_0x2a8ad9(0x104)](_0x545a10);}),_0x35f3e8;}[_0x4f9315(0x110)](_0x4af4cd){const _0x1c34a4=_0x4f9315;return{'id':_0x4af4cd['id'],'threadId':_0x4af4cd[_0x1c34a4(0xf8)],'ref':_0x4af4cd[_0x1c34a4(0x106)]};}};f=Q([_(0x0,_0x4395a5(_0x495cf5)),_(0x1,_0x4395a5(_0x3bc288)),_(0x2,_0x4395a5(_0x243c30)),_(0x3,_0x4395a5(_0x3849c5))],f);var re=Object[_0x4f9315(0x108)],te=(_0xaad7f3,_0x12e457,_0x427f69,_0x1a4463)=>{const _0x4f402c=_0x4f9315;for(var _0x4bc349=_0x1a4463>0x1?void 0x0:_0x1a4463?re(_0x12e457,_0x427f69):_0x12e457,_0x25fed4=_0xaad7f3[_0x4f402c(0xcf)]-0x1,_0x23bb74;_0x25fed4>=0x0;_0x25fed4--)(_0x23bb74=_0xaad7f3[_0x25fed4])&&(_0x4bc349=_0x23bb74(_0x4bc349)||_0x4bc349);return _0x4bc349;},N=(_0x20abad,_0x3bb62e)=>(_0x14fa97,_0x5215f0)=>_0x3bb62e(_0x14fa97,_0x5215f0,_0x20abad);let g=class extends _0x3f16eb{constructor(_0x1c665d,_0x42355f){const _0x1603bd=_0x4f9315;super(),this[_0x1603bd(0xf7)]=_0x1c665d,this[_0x1603bd(0xf2)]=_0x42355f,this[_0x1603bd(0xeb)]();}['_initDataSource'](){const _0xdbe197=_0x4f9315;this['_threadCommentDataSourceService'][_0xdbe197(0x12f)]=this[_0xdbe197(0xf2)],this[_0xdbe197(0xf7)][_0xdbe197(0x10f)]=!0x1;}};g=te([N(0x0,_0xd47b4),N(0x1,_0x4395a5(f))],g);var se=Object[_0x4f9315(0xd8)],oe=Object[_0x4f9315(0x108)],ne=(_0x3f7ab8,_0x1abd36,_0x58fb5b)=>_0x1abd36 in _0x3f7ab8?se(_0x3f7ab8,_0x1abd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58fb5b}):_0x3f7ab8[_0x1abd36]=_0x58fb5b,ie=(_0x2e71ca,_0x3b0fe0,_0x3084a1,_0x2ba560)=>{const _0x19761b=_0x4f9315;for(var _0x2bea22=_0x2ba560>0x1?void 0x0:_0x2ba560?oe(_0x3b0fe0,_0x3084a1):_0x3b0fe0,_0x49d0fd=_0x2e71ca[_0x19761b(0xcf)]-0x1,_0x28df2d;_0x49d0fd>=0x0;_0x49d0fd--)(_0x28df2d=_0x2e71ca[_0x49d0fd])&&(_0x2bea22=_0x28df2d(_0x2bea22)||_0x2bea22);return _0x2bea22;},w=(_0x7f8c09,_0x2e66c9)=>(_0x404563,_0x5155cc)=>_0x2e66c9(_0x404563,_0x5155cc,_0x7f8c09),$=(_0x479723,_0x4ca56f,_0x42df61)=>ne(_0x479723,typeof _0x4ca56f!=_0x4f9315(0x11d)?_0x4ca56f+'':_0x4ca56f,_0x42df61);let b=class extends _0x290c01{constructor(_0x31c138=M,_0x38c186,_0x4ad6b3){const _0x4ce06d=_0x4f9315;super(),this['_config']=_0x31c138,this[_0x4ce06d(0x111)]=_0x38c186,this['_configService']=_0x4ad6b3;const {..._0x2f3327}=_0x5aa3a4({},M,this['_config']);this[_0x4ce06d(0xe2)][_0x4ce06d(0x109)](z,_0x2f3327);}['onStarting'](){const _0x588261=_0x4f9315;[[f],[g],[S]][_0x588261(0xfa)](_0x47773f=>{const _0x24f831=_0x588261;this[_0x24f831(0x111)][_0x24f831(0xe7)](_0x47773f);});}[_0x4f9315(0x114)](){const _0x3ff83a=_0x4f9315;this[_0x3ff83a(0x111)][_0x3ff83a(0xec)](g),this['_injector'][_0x3ff83a(0xec)](S);}};$(b,_0x4f9315(0x135),W),$(b,_0x4f9315(0xdc),_0x1d95eb[_0x4f9315(0x12d)]),b=ie([_0x4b6a7b(_0x8ab5ff,_0x589b09,_0x10820f),w(0x1,_0x4395a5(_0x3849c5)),w(0x2,_0xd35145)],b);export{b as UniverThreadCommentDataSourcePlugin};
@@ -1,7 +1,7 @@
1
1
  import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
2
+ import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
2
3
  import { Injector, UserManagerService } from '@univerjs/core';
3
4
  import { HTTPService } from '@univerjs/network';
4
- import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
5
5
  export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
6
6
  private readonly _httpService;
7
7
  private readonly _userService;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4670e0,_0x158f0e){const _0x45bc9d=_0x15a3,_0x2d6c41=_0x4670e0();while(!![]){try{const _0xb96cdf=-parseInt(_0x45bc9d(0x254))/0x1*(parseInt(_0x45bc9d(0x25f))/0x2)+-parseInt(_0x45bc9d(0x21f))/0x3*(-parseInt(_0x45bc9d(0x217))/0x4)+parseInt(_0x45bc9d(0x1df))/0x5+parseInt(_0x45bc9d(0x1fb))/0x6*(parseInt(_0x45bc9d(0x214))/0x7)+-parseInt(_0x45bc9d(0x256))/0x8*(-parseInt(_0x45bc9d(0x233))/0x9)+-parseInt(_0x45bc9d(0x21e))/0xa+parseInt(_0x45bc9d(0x22a))/0xb*(parseInt(_0x45bc9d(0x212))/0xc);if(_0xb96cdf===_0x158f0e)break;else _0x2d6c41['push'](_0x2d6c41['shift']());}catch(_0xcf551f){_0x2d6c41['push'](_0x2d6c41['shift']());}}}(_0x20d6,0x1be5e),function(_0x34df6c,_0x4d28b8){const _0x43fbaa=_0x15a3;typeof exports==_0x43fbaa(0x21b)&&typeof module<'u'?_0x4d28b8(exports,require('@univerjs-pro/collaboration-client'),require(_0x43fbaa(0x257)),require(_0x43fbaa(0x24f)),require('@univerjs/thread-comment-ui'),require(_0x43fbaa(0x22e)),require(_0x43fbaa(0x1e4)),require(_0x43fbaa(0x230))):typeof define==_0x43fbaa(0x207)&&define[_0x43fbaa(0x252)]?define([_0x43fbaa(0x237),'@univerjs-pro/collaboration-client',_0x43fbaa(0x257),_0x43fbaa(0x24f),'@univerjs/thread-comment-ui',_0x43fbaa(0x22e),_0x43fbaa(0x1e4),_0x43fbaa(0x230)],_0x4d28b8):(_0x34df6c=typeof globalThis<'u'?globalThis:_0x34df6c||self,_0x4d28b8(_0x34df6c[_0x43fbaa(0x1e1)]={},_0x34df6c[_0x43fbaa(0x1eb)],_0x34df6c[_0x43fbaa(0x251)],_0x34df6c['UniverCore'],_0x34df6c[_0x43fbaa(0x23c)],_0x34df6c[_0x43fbaa(0x22b)],_0x34df6c[_0x43fbaa(0x1e4)],_0x34df6c[_0x43fbaa(0x236)]));}(this,function(_0x5e69b2,_0x3a27fd,_0x15130b,_0x1d3be7,_0x3741cb,_0x302edf,_0x4c1ac0,_0x133836){'use strict';const _0x4ae833=_0x15a3;const _0x298213=_0x4ae833(0x1ff);var _0x183da8=(_0x44a71d=>(_0x44a71d[_0x44a71d[_0x4ae833(0x224)]=0x0]=_0x4ae833(0x224),_0x44a71d[_0x44a71d[_0x4ae833(0x231)]=0x1]=_0x4ae833(0x231),_0x44a71d[_0x44a71d[_0x4ae833(0x1dd)]=-0x1]=_0x4ae833(0x1dd),_0x44a71d))(_0x183da8||{}),_0x36e997=(_0xb22c32=>(_0xb22c32[_0xb22c32[_0x4ae833(0x25a)]=0x0]=_0x4ae833(0x25a),_0xb22c32[_0xb22c32[_0x4ae833(0x1ea)]=0x1]=_0x4ae833(0x1ea),_0xb22c32[_0xb22c32[_0x4ae833(0x206)]=0x2]=_0x4ae833(0x206),_0xb22c32[_0xb22c32[_0x4ae833(0x1ef)]=0x3]=_0x4ae833(0x1ef),_0xb22c32[_0xb22c32[_0x4ae833(0x25b)]=0x4]=_0x4ae833(0x25b),_0xb22c32[_0xb22c32[_0x4ae833(0x208)]=0x5]=_0x4ae833(0x208),_0xb22c32[_0xb22c32[_0x4ae833(0x1dd)]=-0x1]=_0x4ae833(0x1dd),_0xb22c32))(_0x36e997||{});const _0x578bb4=_0x295b36=>_0x1d3be7['dayjs'](new Date(+_0x295b36))[_0x4ae833(0x201)](_0x4ae833(0x248)),_0x21e6ef=async(_0xfc7a42,_0x1b6f07)=>{const _0x567ac9=_0x4ae833,_0x35ab64=_0xfc7a42[_0x567ac9(0x259)](_0x1d3be7[_0x567ac9(0x218)]),_0x33dde5=_0xfc7a42[_0x567ac9(0x259)](_0x133836['HTTPService']);_0x1b6f07[_0x567ac9(0x24d)](_0x1d210f=>{const _0x14cc0c=_0x567ac9;_0x35ab64['getUser'](_0x1d210f)&&_0x1b6f07[_0x14cc0c(0x202)](_0x1d210f);}),_0x1b6f07[_0x567ac9(0x1f5)]&&(await _0x33dde5['get'](_0x567ac9(0x249),{'params':{'userIDs':[..._0x1b6f07]}}))['body']['users'][_0x567ac9(0x24d)](_0x5896f5=>{const _0x20ac15=_0x567ac9;_0x5896f5&&_0x35ab64[_0x20ac15(0x20e)](_0x5896f5);});};var _0x17c02b=Object[_0x4ae833(0x21d)],_0x3b2ab1=(_0x415553,_0xabf5be,_0x22cbc3,_0x31f1e4)=>{const _0x285188=_0x4ae833;for(var _0x222294=_0x31f1e4>0x1?void 0x0:_0x31f1e4?_0x17c02b(_0xabf5be,_0x22cbc3):_0xabf5be,_0x1680b5=_0x415553[_0x285188(0x23a)]-0x1,_0x395a29;_0x1680b5>=0x0;_0x1680b5--)(_0x395a29=_0x415553[_0x1680b5])&&(_0x222294=_0x395a29(_0x222294)||_0x222294);return _0x222294;},_0x1c19c8=(_0x496eb9,_0x170083)=>(_0x47c363,_0x4c0d08)=>_0x170083(_0x47c363,_0x4c0d08,_0x496eb9);let _0x999c5=class extends _0x1d3be7[_0x4ae833(0x23e)]{constructor(_0x42728f,_0x5e2384,_0x3b1c38,_0x195ed0){const _0x16135a=_0x4ae833;super(),this[_0x16135a(0x1fc)]=_0x42728f,this[_0x16135a(0x23d)]=_0x5e2384,this[_0x16135a(0x258)]=_0x3b1c38,this['_injector']=_0x195ed0,this[_0x16135a(0x247)](),this[_0x16135a(0x1e8)]();}['_initUserSync'](){const _0x77b237=_0x4ae833;this[_0x77b237(0x23b)](this[_0x77b237(0x23d)][_0x77b237(0x255)]['pipe'](_0x4c1ac0['bufferTime'](0x10))[_0x77b237(0x21c)](_0x2fa11d=>{const _0x54334a=_0x77b237,_0x208f59=new Set();_0x2fa11d['forEach'](_0x3b4357=>{const _0x4e1a55=_0x15a3;switch(_0x3b4357[_0x4e1a55(0x245)]){case'add':{const _0x55ac43=_0x3b4357[_0x4e1a55(0x24c)][_0x4e1a55(0x1de)];_0x208f59['add'](_0x55ac43);break;}}}),_0x21e6ef(this[_0x54334a(0x241)],_0x208f59);}));}[_0x4ae833(0x247)](){const _0x4f4d1a=_0x4ae833;this[_0x4f4d1a(0x23b)](this[_0x4f4d1a(0x1fc)]['commentUpdate$']['subscribe'](async _0x119759=>{const _0x22e9dc=_0x4f4d1a;var _0xcdaf04,_0x4f09a2,_0x4b43ed,_0x19a34c;const _0x3aabf0=(_0xcdaf04=this[_0x22e9dc(0x23d)][_0x22e9dc(0x1fe)](_0x119759[_0x22e9dc(0x226)])[_0x22e9dc(0x222)](_0x4624a8=>_0x4624a8[_0x22e9dc(0x229)]===_0x119759[_0x22e9dc(0x229)]))==null?void 0x0:_0xcdaf04[_0x22e9dc(0x26a)];if(!_0x3aabf0)return;const {unitId:_0x3e2383,subUnitId:_0x336f8a}=_0x3aabf0;switch(_0x119759[_0x22e9dc(0x1f8)]&&this[_0x22e9dc(0x258)][_0x22e9dc(0x20e)](_0x119759[_0x22e9dc(0x1f8)]),_0x119759[_0x22e9dc(0x245)]){case _0x36e997[_0x22e9dc(0x1ea)]:break;case _0x36e997[_0x22e9dc(0x206)]:{this['_threadCommentModel']['addComment'](_0x3e2383,_0x336f8a,{'unitId':_0x3e2383,'subUnitId':_0x336f8a,'ref':'','id':_0x119759['replyId'],'dT':_0x578bb4(+_0x119759[_0x22e9dc(0x240)]),'threadId':_0x119759[_0x22e9dc(0x229)],'personId':(_0x4b43ed=(_0x4f09a2=_0x119759[_0x22e9dc(0x1f8)])==null?void 0x0:_0x4f09a2[_0x22e9dc(0x22f)])!=null?_0x4b43ed:_0x119759[_0x22e9dc(0x1e2)],'text':JSON['parse'](_0x119759['content']),'parentId':_0x3aabf0['id']});break;}case _0x36e997[_0x22e9dc(0x25b)]:{const _0x206c77=this[_0x22e9dc(0x23d)][_0x22e9dc(0x23f)](_0x3e2383,_0x336f8a,_0x119759[_0x22e9dc(0x1f3)]);_0x206c77&&_0x206c77[_0x22e9dc(0x265)]&&this['_threadCommentModel'][_0x22e9dc(0x1e5)](_0x3e2383,_0x336f8a,_0x119759[_0x22e9dc(0x1f3)]);break;}case _0x36e997['Edit']:{this['_threadCommentModel'][_0x22e9dc(0x1ed)](_0x3e2383,_0x336f8a,{'commentId':_0x119759[_0x22e9dc(0x1f3)],'text':JSON[_0x22e9dc(0x263)](_0x119759['content'])});break;}case _0x36e997[_0x22e9dc(0x208)]:{const _0x3623ef=(_0x19a34c=this[_0x22e9dc(0x23d)][_0x22e9dc(0x1fe)](_0x119759['unitId'])['find'](_0x4a0886=>_0x4a0886[_0x22e9dc(0x229)]===_0x119759['threadId']))==null?void 0x0:_0x19a34c['root'];_0x3623ef&&this[_0x22e9dc(0x23d)][_0x22e9dc(0x1f4)](_0x3e2383,_0x336f8a,_0x3623ef['id'],_0x119759['solved']===_0x183da8[_0x22e9dc(0x231)]);break;}}}));}};_0x999c5=_0x3b2ab1([_0x1c19c8(0x0,_0x1d3be7[_0x4ae833(0x261)](_0x3a27fd[_0x4ae833(0x264)])),_0x1c19c8(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x302edf[_0x4ae833(0x1e3)])),_0x1c19c8(0x2,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x218)])),_0x1c19c8(0x3,_0x1d3be7['Inject'](_0x1d3be7[_0x4ae833(0x1ec)]))],_0x999c5);const _0x19325d=_0x4ae833(0x221),_0x4420f4={};var _0x5f381f=Object[_0x4ae833(0x21d)],_0x5e721b=(_0x21e780,_0xf71ff2,_0xc11aa5,_0x36c3e4)=>{const _0x5879ed=_0x4ae833;for(var _0x4cc147=_0x36c3e4>0x1?void 0x0:_0x36c3e4?_0x5f381f(_0xf71ff2,_0xc11aa5):_0xf71ff2,_0x1ed963=_0x21e780[_0x5879ed(0x23a)]-0x1,_0x47f79b;_0x1ed963>=0x0;_0x1ed963--)(_0x47f79b=_0x21e780[_0x1ed963])&&(_0x4cc147=_0x47f79b(_0x4cc147)||_0x4cc147);return _0x4cc147;},_0x438d20=(_0x2f06f7,_0x4f3af7)=>(_0xc0af89,_0x35eb6f)=>_0x4f3af7(_0xc0af89,_0x35eb6f,_0x2f06f7);function _0x59e28b(_0x454955,_0x26a893){const _0x4ba9f7=_0x4ae833,_0x28e832=_0x454955[_0x4ba9f7(0x269)][0x0];return{..._0x26a893,'id':_0x28e832[_0x4ba9f7(0x1f3)],'resolved':_0x454955['solved']===0x1,'dT':_0x578bb4(_0x28e832['createTimestamp']),'personId':_0x28e832[_0x4ba9f7(0x1e2)],'threadId':_0x28e832['threadId']};}function _0x2015e1(_0x2e4eb5,_0xb55f21,_0x10f234){const _0x3819f2=_0x4ae833;var _0x316b50,_0x1bb5e4;if(((_0x1bb5e4=(_0x316b50=_0x2e4eb5==null?void 0x0:_0x2e4eb5[_0x3819f2(0x269)])==null?void 0x0:_0x316b50[_0x3819f2(0x23a)])!=null?_0x1bb5e4:0x0)>0x0){const _0x581102=(_0x3fd19f,_0x563517)=>({'id':_0x3fd19f[_0x3819f2(0x1f3)],'threadId':_0x3fd19f[_0x3819f2(0x229)],'dT':_0x578bb4(_0x3fd19f['createTimestamp']),'personId':_0x3fd19f[_0x3819f2(0x1e2)],'resolved':_0x2e4eb5[_0x3819f2(0x213)]===_0x183da8['Solved'],'unitId':_0xb55f21,'subUnitId':_0x10f234,'text':JSON['parse'](_0x3fd19f[_0x3819f2(0x22c)]),'parentId':_0x563517}),_0x6ed6a8=_0x581102(_0x2e4eb5[_0x3819f2(0x269)][0x0]);return{..._0x6ed6a8,'children':_0x2e4eb5['replies'][_0x3819f2(0x24a)](0x1)[_0x3819f2(0x1e6)](_0x2a901f=>_0x581102(_0x2a901f,_0x6ed6a8['id']))};}return null;}let _0x506a75=class{constructor(_0xe333c2,_0x5cb154,_0x34f969,_0x1882f6){const _0x1d7064=_0x4ae833;this['_httpService']=_0xe333c2,this[_0x1d7064(0x258)]=_0x5cb154,this[_0x1d7064(0x239)]=_0x34f969,this[_0x1d7064(0x241)]=_0x1882f6;}async[_0x4ae833(0x20b)](_0x385c7d){const _0x26d027=_0x4ae833;var _0xb58262,_0x3a5fb7;const {parentId:_0x37c29f,unitId:_0x296e65,text:_0x755b9,threadId:_0x3bcf5e}=_0x385c7d,_0x1346fc=(_0x3a5fb7=(_0xb58262=_0x755b9[_0x26d027(0x1fa)])==null?void 0x0:_0xb58262[_0x26d027(0x238)](_0x928071=>_0x928071[_0x26d027(0x219)]===_0x1d3be7[_0x26d027(0x266)][_0x26d027(0x20f)])[_0x26d027(0x1e6)](_0x19c03=>_0x19c03[_0x26d027(0x260)]))!=null?_0x3a5fb7:[],_0x5af5a5=JSON[_0x26d027(0x1e0)](_0x755b9),_0x42f039=(await this[_0x26d027(0x239)][_0x26d027(0x26b)](_0x296e65))[_0x26d027(0x25c)]();if(_0x37c29f){const _0x4b95a3={'memberId':_0x42f039,'unitId':_0x296e65,'content':_0x5af5a5,'mention':_0x1346fc,'threadId':_0x3bcf5e},_0x8f66e8=(await this[_0x26d027(0x20a)][_0x26d027(0x204)](_0x26d027(0x20c)+_0x296e65+'/reply',{'body':_0x4b95a3}))[_0x26d027(0x1ee)][_0x26d027(0x20d)];return{..._0x385c7d,'id':_0x8f66e8[_0x26d027(0x1f3)],'dT':_0x1d3be7[_0x26d027(0x25d)](+_0x8f66e8[_0x26d027(0x240)])[_0x26d027(0x201)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8f66e8['userId']};}else{const _0x378142={'memberId':_0x42f039,'unitId':_0x296e65,'content':_0x5af5a5,'mention':_0x1346fc},_0x432aa3=await this[_0x26d027(0x20a)][_0x26d027(0x204)](_0x26d027(0x20c)+_0x296e65+_0x26d027(0x26c),{'body':_0x378142});return _0x59e28b(_0x432aa3[_0x26d027(0x1ee)][_0x26d027(0x250)],_0x385c7d);}}async[_0x4ae833(0x1ed)](_0x3a3b93){const _0x13ebb7=_0x4ae833;var _0x5650bf,_0x1a0909;const {text:_0x1ed33e,unitId:_0x1735f4}=_0x3a3b93,_0x4030ea=(_0x1a0909=(_0x5650bf=_0x1ed33e[_0x13ebb7(0x1fa)])==null?void 0x0:_0x5650bf[_0x13ebb7(0x238)](_0x165994=>_0x165994[_0x13ebb7(0x219)]===_0x1d3be7[_0x13ebb7(0x266)][_0x13ebb7(0x20f)])[_0x13ebb7(0x1e6)](_0xcbc08a=>_0xcbc08a[_0x13ebb7(0x260)]))!=null?_0x1a0909:[],_0x347153=JSON[_0x13ebb7(0x1e0)](_0x1ed33e),_0x1f4d5b=_0x3a3b93[_0x13ebb7(0x229)],_0x5ac5f1=_0x3a3b93['id'],_0x2a30b3={'memberId':(await this[_0x13ebb7(0x239)][_0x13ebb7(0x26b)](_0x1735f4))[_0x13ebb7(0x25c)](),'unitId':_0x1735f4,'threadId':_0x1f4d5b,'mention':_0x4030ea,'content':_0x347153,'replyId':_0x5ac5f1},_0x5a69b8=await this[_0x13ebb7(0x20a)]['post'](_0x13ebb7(0x20c)+_0x1735f4+_0x13ebb7(0x268),{'body':_0x2a30b3});return!_0x5a69b8['body'][_0x13ebb7(0x243)]||_0x5a69b8['body'][_0x13ebb7(0x243)]['code']===0x1;}async[_0x4ae833(0x1f4)](_0x66b5a9){const _0x18524c=_0x4ae833,{unitId:_0xc72529}=_0x66b5a9,_0x293b76=_0x66b5a9['threadId'],_0x37685c={'memberId':this[_0x18524c(0x258)][_0x18524c(0x205)]()[_0x18524c(0x22f)],'unitId':_0xc72529,'threadId':_0x293b76,'solved':_0x66b5a9[_0x18524c(0x227)]?_0x183da8[_0x18524c(0x231)]:_0x183da8[_0x18524c(0x224)]},_0x34cded=await this['_httpService'][_0x18524c(0x204)](_0x18524c(0x20c)+_0xc72529+_0x18524c(0x262),{'body':_0x37685c});return!_0x34cded[_0x18524c(0x1ee)]['error']||_0x34cded[_0x18524c(0x1ee)][_0x18524c(0x243)][_0x18524c(0x1f9)]===0x1;}async[_0x4ae833(0x1e5)](_0x5eb849,_0x3b0a58,_0x54170a,_0x46de50){const _0x2caad2=_0x4ae833,_0x1084e7={'memberId':(await this[_0x2caad2(0x239)][_0x2caad2(0x26b)](_0x5eb849))['getMemberID'](),'threadId':_0x54170a,'replyId':_0x46de50,'unitId':_0x5eb849},_0x285f49=await this['_httpService'][_0x2caad2(0x204)]('/universer-api/comment/unit/'+_0x5eb849+'/delete',{'body':_0x1084e7});return!_0x285f49[_0x2caad2(0x1ee)][_0x2caad2(0x243)]||_0x285f49[_0x2caad2(0x1ee)]['error'][_0x2caad2(0x1f9)]===0x1;}async[_0x4ae833(0x267)](_0x199e0d,_0x450eed,_0x565e66){const _0x543f07=_0x4ae833,_0x1ffe2d={'unitId':_0x199e0d,'threadId':_0x565e66},_0x1bbcfe=await this[_0x543f07(0x20a)]['post'](_0x543f07(0x20c)+_0x199e0d+_0x543f07(0x223),{'body':_0x1ffe2d}),_0x294408=_0x565e66[_0x543f07(0x1e6)](_0x55c0c4=>_0x2015e1(_0x1bbcfe[_0x543f07(0x1ee)][_0x543f07(0x200)][_0x55c0c4],_0x199e0d,_0x450eed))[_0x543f07(0x238)](Boolean);return Object[_0x543f07(0x1e7)](_0x1bbcfe[_0x543f07(0x1ee)][_0x543f07(0x235)])[_0x543f07(0x24d)](_0x24ca1d=>{const _0x129146=_0x543f07;this[_0x129146(0x258)]['addUser'](_0x24ca1d);}),_0x294408;}[_0x4ae833(0x1fd)](_0x48d7d7){const _0x141dd4=_0x4ae833;return{'id':_0x48d7d7['id'],'threadId':_0x48d7d7[_0x141dd4(0x229)],'ref':_0x48d7d7[_0x141dd4(0x244)]};}};_0x506a75=_0x5e721b([_0x438d20(0x0,_0x1d3be7[_0x4ae833(0x261)](_0x133836[_0x4ae833(0x22d)])),_0x438d20(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x218)])),_0x438d20(0x2,_0x1d3be7['Inject'](_0x3a27fd[_0x4ae833(0x1f0)])),_0x438d20(0x3,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7['Injector']))],_0x506a75);var _0x103519=Object['getOwnPropertyDescriptor'],_0x6c21f5=(_0x5aae94,_0x3667b6,_0x31a57c,_0x32bd)=>{const _0x2a4e06=_0x4ae833;for(var _0x2310eb=_0x32bd>0x1?void 0x0:_0x32bd?_0x103519(_0x3667b6,_0x31a57c):_0x3667b6,_0x6c93d0=_0x5aae94[_0x2a4e06(0x23a)]-0x1,_0x154e6d;_0x6c93d0>=0x0;_0x6c93d0--)(_0x154e6d=_0x5aae94[_0x6c93d0])&&(_0x2310eb=_0x154e6d(_0x2310eb)||_0x2310eb);return _0x2310eb;},_0x38253f=(_0x37da73,_0x32b752)=>(_0x243a3e,_0x3f4cf1)=>_0x32b752(_0x243a3e,_0x3f4cf1,_0x37da73);let _0x540cbc=class extends _0x1d3be7['Disposable']{constructor(_0x2d2468,_0x4a5802){const _0x2b9012=_0x4ae833;super(),this[_0x2b9012(0x209)]=_0x2d2468,this[_0x2b9012(0x1e9)]=_0x4a5802,this[_0x2b9012(0x215)]();}[_0x4ae833(0x215)](){const _0x409bb9=_0x4ae833;this[_0x409bb9(0x209)][_0x409bb9(0x24e)]=this[_0x409bb9(0x1e9)],this[_0x409bb9(0x209)][_0x409bb9(0x232)]=!0x1;}};_0x540cbc=_0x6c21f5([_0x38253f(0x0,_0x302edf[_0x4ae833(0x25e)]),_0x38253f(0x1,_0x1d3be7['Inject'](_0x506a75))],_0x540cbc);var _0x2227e3=Object[_0x4ae833(0x228)],_0x3f5d22=Object[_0x4ae833(0x21d)],_0x35fe5a=(_0x19eaad,_0x467ac5,_0x3fad11)=>_0x467ac5 in _0x19eaad?_0x2227e3(_0x19eaad,_0x467ac5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fad11}):_0x19eaad[_0x467ac5]=_0x3fad11,_0x3ab630=(_0x3d8f52,_0xbb2860,_0x23bb7a,_0x618658)=>{for(var _0xbebbcd=_0x618658>0x1?void 0x0:_0x618658?_0x3f5d22(_0xbb2860,_0x23bb7a):_0xbb2860,_0x1f44cb=_0x3d8f52['length']-0x1,_0xf6fe9f;_0x1f44cb>=0x0;_0x1f44cb--)(_0xf6fe9f=_0x3d8f52[_0x1f44cb])&&(_0xbebbcd=_0xf6fe9f(_0xbebbcd)||_0xbebbcd);return _0xbebbcd;},_0x1173d9=(_0x1a07d4,_0x157b52)=>(_0x56012a,_0xe3581)=>_0x157b52(_0x56012a,_0xe3581,_0x1a07d4),_0x3f14db=(_0x4f5325,_0x1e0ccc,_0x5d3b9c)=>_0x35fe5a(_0x4f5325,typeof _0x1e0ccc!=_0x4ae833(0x216)?_0x1e0ccc+'':_0x1e0ccc,_0x5d3b9c);_0x5e69b2['UniverThreadCommentDataSourcePlugin']=class extends _0x1d3be7[_0x4ae833(0x203)]{constructor(_0x1cd846=_0x4420f4,_0x5a27a7,_0x41d251){const _0x21eec0=_0x4ae833;super(),this[_0x21eec0(0x225)]=_0x1cd846,this[_0x21eec0(0x241)]=_0x5a27a7,this[_0x21eec0(0x211)]=_0x41d251;const {..._0x43ff68}=_0x1d3be7[_0x21eec0(0x21a)]({},_0x4420f4,this[_0x21eec0(0x225)]);this[_0x21eec0(0x211)][_0x21eec0(0x253)](_0x19325d,_0x43ff68);}[_0x4ae833(0x234)](){const _0x4227b2=_0x4ae833;[[_0x506a75],[_0x540cbc],[_0x999c5]][_0x4227b2(0x24d)](_0xdcd20b=>{const _0x1ac5f4=_0x4227b2;this[_0x1ac5f4(0x241)]['add'](_0xdcd20b);});}[_0x4ae833(0x220)](){const _0x39ae2c=_0x4ae833;this[_0x39ae2c(0x241)][_0x39ae2c(0x259)](_0x540cbc),this['_injector'][_0x39ae2c(0x259)](_0x999c5);}},_0x3f14db(_0x5e69b2[_0x4ae833(0x1f6)],_0x4ae833(0x210),_0x298213),_0x3f14db(_0x5e69b2[_0x4ae833(0x1f6)],_0x4ae833(0x245),_0x1d3be7[_0x4ae833(0x1f7)]['UNIVER_UNKNOWN']),_0x5e69b2[_0x4ae833(0x1f6)]=_0x3ab630([_0x1d3be7[_0x4ae833(0x246)](_0x3741cb[_0x4ae833(0x242)],_0x3a27fd[_0x4ae833(0x1f2)],_0x15130b[_0x4ae833(0x1f1)]),_0x1173d9(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x1ec)])),_0x1173d9(0x2,_0x1d3be7['IConfigService'])],_0x5e69b2[_0x4ae833(0x1f6)]),Object[_0x4ae833(0x228)](_0x5e69b2,Symbol[_0x4ae833(0x24b)],{'value':'Module'});}));function _0x15a3(_0x375057,_0x5e13ec){const _0x20d6d3=_0x20d6();return _0x15a3=function(_0x15a3fb,_0xe009ba){_0x15a3fb=_0x15a3fb-0x1dd;let _0x3b8ee0=_0x20d6d3[_0x15a3fb];return _0x3b8ee0;},_0x15a3(_0x375057,_0x5e13ec);}function _0x20d6(){const _0x1c30ae=['UniverInstanceType','user','code','customRanges','948eVUvqS','_commentService','saveCommentToSnapshot','getUnit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','format','delete','Plugin','post','getCurrentUser','Reply','function','Solve','_threadCommentDataSourceService','_httpService','addComment','/universer-api/comment/unit/','reply','addUser','COMMENT','pluginName','_configService','801576wBKbWZ','solved','5572advDKO','_initDataSource','symbol','224860qyNWmt','UserManagerService','rangeType','merge','object','subscribe','getOwnPropertyDescriptor','2007100EcPwaL','6WngzaH','onReady','thread-comment-data-source.config','find','/list','OpenOrReOpen','_config','unitId','resolved','defineProperty','threadId','22veHTne','UniverThreadComment','content','HTTPService','@univerjs/thread-comment','userID','@univerjs/network','Solved','syncUpdateMutationToColla','9GNkVtK','onStarting','users','UniverNetwork','exports','filter','_sessionService','length','disposeWithMe','UniverThreadCommentUi','_threadCommentModel','Disposable','getComment','createTimestamp','_injector','UniverThreadCommentUIPlugin','error','ref','type','DependentOn','_init','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','slice','toStringTag','payload','forEach','dataSource','@univerjs/core','comment','UniverProLicense','amd','setConfig','74883bggImY','commentUpdate$','1074704mysuzN','@univerjs-pro/license','_userService','get','Unknown','Delete','getMemberID','dayjs','IThreadCommentDataSourceService','6WzoMmQ','rangeId','Inject','/solved','parse','CommentService','parentId','CustomRangeType','listComments','/edit','replies','root','requireSession','/add','UNRECOGNIZED','personId','167485BVugSt','stringify','UniverProThreadCommentDatasource','userId','ThreadCommentModel','rxjs','deleteComment','map','values','_initUserSync','_threadCommentDataSource','Add','UniverProCollaborationClient','Injector','updateComment','body','Edit','CollaborationSessionService','UniverLicensePlugin','UniverCollaborationClientPlugin','replyId','resolveComment','size','UniverThreadCommentDataSourcePlugin'];_0x20d6=function(){return _0x1c30ae;};return _0x20d6();}
1
+ function _0x25e2(){const _0x400efd=['getUser','UniverLicensePlugin','bufferTime','11hjSEiI','deleteComment','comment','updateComment','Plugin','_initUserSync','code','679827hdQNzB','stringify','_initDataSource','getComment','Disposable','pipe','2019564qQnUvc','unitId','get','defineProperty','UserManagerService','UniverCore','Module','type','_threadCommentDataSourceService','403725ZiOrWy','error','merge','user','threadId','toStringTag','6326RnoPYy','COMMENT','@univerjs/network','content','subscribe','Delete','UniverNetwork','CollaborationSessionService','HTTPService','_httpService','/list','_commentService','/solved','@univerjs/thread-comment','_threadCommentDataSource','UniverThreadComment','@univerjs/thread-comment-ui','Inject','find','users','/delete','personId','109mbFjuY','comments','requireSession','disposeWithMe','ref','format','ThreadCommentModel','map','10FggShh','filter','_threadCommentModel','3553370qKQfQG','UniverInstanceType','createTimestamp','getCurrentUser','reply','/universer-api/comment/unit/','rxjs','getOwnPropertyDescriptor','addUser','Solve','/add','CustomRangeType','amd','Injector','CommentService','payload','UNRECOGNIZED','post','@univerjs-pro/collaboration-client','UniverProLicense','commentUpdate$','syncUpdateMutationToColla','values','dayjs','_injector','Edit','replyId','getMemberID','Add','OpenOrReOpen','forEach','body','IThreadCommentDataSourceService','DependentOn','_userService','pluginName','UniverThreadCommentDataSourcePlugin','userId','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','/edit','Reply','_sessionService','thread-comment-data-source.config','delete','onStarting','8GNsIlt','parentId','_init','add','_config','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','function','replies','Solved','getUnit','_configService','resolveComment','parse','rangeId','slice','/reply','root','rangeType','Unknown','/universer-api/user/list','67365QWaNgH','471532HZivfh','length','resolved'];_0x25e2=function(){return _0x400efd;};return _0x25e2();}function _0x969c(_0x404604,_0x3f14ea){const _0x25e246=_0x25e2();return _0x969c=function(_0x969c03,_0x29910e){_0x969c03=_0x969c03-0xc5;let _0x12c40f=_0x25e246[_0x969c03];return _0x12c40f;},_0x969c(_0x404604,_0x3f14ea);}(function(_0x5587d8,_0x126045){const _0xb1b5d=_0x969c,_0xf1c6b1=_0x5587d8();while(!![]){try{const _0x2beb92=parseInt(_0xb1b5d(0x119))/0x1*(-parseInt(_0xb1b5d(0x103))/0x2)+parseInt(_0xb1b5d(0xee))/0x3+-parseInt(_0xb1b5d(0xe1))/0x4*(-parseInt(_0xb1b5d(0x121))/0x5)+-parseInt(_0xb1b5d(0xf4))/0x6+parseInt(_0xb1b5d(0xfd))/0x7+parseInt(_0xb1b5d(0xca))/0x8*(-parseInt(_0xb1b5d(0xe0))/0x9)+-parseInt(_0xb1b5d(0x124))/0xa*(-parseInt(_0xb1b5d(0xe7))/0xb);if(_0x2beb92===_0x126045)break;else _0xf1c6b1['push'](_0xf1c6b1['shift']());}catch(_0x30dca1){_0xf1c6b1['push'](_0xf1c6b1['shift']());}}}(_0x25e2,0x2d8ad),function(_0x565a39,_0x1c8ead){const _0x5dee63=_0x969c;typeof exports=='object'&&typeof module<'u'?_0x1c8ead(exports,require(_0x5dee63(0x136)),require(_0x5dee63(0x14b)),require(_0x5dee63(0xd1)),require(_0x5dee63(0x113)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x5dee63(0x105))):typeof define==_0x5dee63(0xd2)&&define[_0x5dee63(0x130)]?define(['exports','@univerjs-pro/collaboration-client',_0x5dee63(0x14b),_0x5dee63(0xd1),_0x5dee63(0x113),_0x5dee63(0x110),_0x5dee63(0x12a),_0x5dee63(0x105)],_0x1c8ead):(_0x565a39=typeof globalThis<'u'?globalThis:_0x565a39||self,_0x1c8ead(_0x565a39['UniverProThreadCommentDatasource']={},_0x565a39['UniverProCollaborationClient'],_0x565a39[_0x5dee63(0x137)],_0x565a39[_0x5dee63(0xf9)],_0x565a39['UniverThreadCommentUi'],_0x565a39[_0x5dee63(0x112)],_0x565a39[_0x5dee63(0x12a)],_0x565a39[_0x5dee63(0x109)]));}(this,function(_0x49da9b,_0x2a6dbd,_0x1f1fb0,_0x1a662a,_0x2eb002,_0x215241,_0x5d3423,_0xf2698a){'use strict';const _0x5ae394=_0x969c;const _0x18e20e=_0x5ae394(0xd0);var _0x48e270=(_0x46cbfd=>(_0x46cbfd[_0x46cbfd[_0x5ae394(0x141)]=0x0]=_0x5ae394(0x141),_0x46cbfd[_0x46cbfd[_0x5ae394(0xd4)]=0x1]=_0x5ae394(0xd4),_0x46cbfd[_0x46cbfd[_0x5ae394(0x134)]=-0x1]=_0x5ae394(0x134),_0x46cbfd))(_0x48e270||{}),_0x257be8=(_0x865118=>(_0x865118[_0x865118[_0x5ae394(0xde)]=0x0]='Unknown',_0x865118[_0x865118[_0x5ae394(0x140)]=0x1]=_0x5ae394(0x140),_0x865118[_0x865118[_0x5ae394(0xc5)]=0x2]='Reply',_0x865118[_0x865118[_0x5ae394(0x13d)]=0x3]='Edit',_0x865118[_0x865118['Delete']=0x4]=_0x5ae394(0x108),_0x865118[_0x865118['Solve']=0x5]=_0x5ae394(0x12d),_0x865118[_0x865118[_0x5ae394(0x134)]=-0x1]=_0x5ae394(0x134),_0x865118))(_0x257be8||{});const _0x28c8ce=_0x45a0cc=>_0x1a662a['dayjs'](new Date(+_0x45a0cc))['format'](_0x5ae394(0x14a)),_0x37279e=async(_0x17d4e5,_0x3dba83)=>{const _0x3f4a4b=_0x5ae394,_0x17ce07=_0x17d4e5[_0x3f4a4b(0xf6)](_0x1a662a[_0x3f4a4b(0xf8)]),_0x2fa6eb=_0x17d4e5[_0x3f4a4b(0xf6)](_0xf2698a[_0x3f4a4b(0x10b)]);_0x3dba83[_0x3f4a4b(0x142)](_0x4b3e1b=>{const _0x571dbc=_0x3f4a4b;_0x17ce07[_0x571dbc(0xe4)](_0x4b3e1b)&&_0x3dba83[_0x571dbc(0xc8)](_0x4b3e1b);}),_0x3dba83['size']&&(await _0x2fa6eb[_0x3f4a4b(0xf6)](_0x3f4a4b(0xdf),{'params':{'userIDs':[..._0x3dba83]}}))[_0x3f4a4b(0x143)][_0x3f4a4b(0x116)][_0x3f4a4b(0x142)](_0x8af7f6=>{_0x8af7f6&&_0x17ce07['addUser'](_0x8af7f6);});};var _0x160436=Object[_0x5ae394(0x12b)],_0x4da777=(_0x4c5e60,_0x534dba,_0x2c6364,_0x4da5c2)=>{const _0xe0b272=_0x5ae394;for(var _0x511ebb=_0x4da5c2>0x1?void 0x0:_0x4da5c2?_0x160436(_0x534dba,_0x2c6364):_0x534dba,_0x7b0fb=_0x4c5e60[_0xe0b272(0xe2)]-0x1,_0x399760;_0x7b0fb>=0x0;_0x7b0fb--)(_0x399760=_0x4c5e60[_0x7b0fb])&&(_0x511ebb=_0x399760(_0x511ebb)||_0x511ebb);return _0x511ebb;},_0x5b11ab=(_0x26e9d4,_0x4c0110)=>(_0x3e9f1b,_0x3f414c)=>_0x4c0110(_0x3e9f1b,_0x3f414c,_0x26e9d4);let _0x4a7b5c=class extends _0x1a662a[_0x5ae394(0xf2)]{constructor(_0x29e9fd,_0x38837a,_0x2a3dd6,_0x35ddda){const _0x2af568=_0x5ae394;super(),this[_0x2af568(0x10e)]=_0x29e9fd,this[_0x2af568(0x123)]=_0x38837a,this[_0x2af568(0x146)]=_0x2a3dd6,this[_0x2af568(0x13c)]=_0x35ddda,this['_init'](),this[_0x2af568(0xec)]();}[_0x5ae394(0xec)](){const _0x5116d8=_0x5ae394;this[_0x5116d8(0x11c)](this[_0x5116d8(0x123)]['commentUpdate$'][_0x5116d8(0xf3)](_0x5d3423[_0x5116d8(0xe6)](0x10))[_0x5116d8(0x107)](_0xe3123c=>{const _0x306f8a=_0x5116d8,_0x4d1482=new Set();_0xe3123c[_0x306f8a(0x142)](_0x51736e=>{const _0x33a4cf=_0x306f8a;switch(_0x51736e['type']){case _0x33a4cf(0xcd):{const _0x144ae3=_0x51736e[_0x33a4cf(0x133)][_0x33a4cf(0x118)];_0x4d1482['add'](_0x144ae3);break;}}}),_0x37279e(this[_0x306f8a(0x13c)],_0x4d1482);}));}[_0x5ae394(0xcc)](){const _0x47bd08=_0x5ae394;this['disposeWithMe'](this[_0x47bd08(0x10e)][_0x47bd08(0x138)][_0x47bd08(0x107)](async _0x3f5ba2=>{const _0xcbda7d=_0x47bd08;var _0x5c73b3,_0x375920,_0xefb171,_0x45834a;const _0xb82980=(_0x5c73b3=this[_0xcbda7d(0x123)]['getUnit'](_0x3f5ba2[_0xcbda7d(0xf5)])[_0xcbda7d(0x115)](_0x1100ba=>_0x1100ba[_0xcbda7d(0x101)]===_0x3f5ba2[_0xcbda7d(0x101)]))==null?void 0x0:_0x5c73b3['root'];if(!_0xb82980)return;const {unitId:_0x137b1a,subUnitId:_0x48ce0d}=_0xb82980;switch(_0x3f5ba2['user']&&this[_0xcbda7d(0x146)][_0xcbda7d(0x12c)](_0x3f5ba2[_0xcbda7d(0x100)]),_0x3f5ba2[_0xcbda7d(0xfb)]){case _0x257be8[_0xcbda7d(0x140)]:break;case _0x257be8['Reply']:{this[_0xcbda7d(0x123)]['addComment'](_0x137b1a,_0x48ce0d,{'unitId':_0x137b1a,'subUnitId':_0x48ce0d,'ref':'','id':_0x3f5ba2[_0xcbda7d(0x13e)],'dT':_0x28c8ce(+_0x3f5ba2[_0xcbda7d(0x126)]),'threadId':_0x3f5ba2[_0xcbda7d(0x101)],'personId':(_0xefb171=(_0x375920=_0x3f5ba2['user'])==null?void 0x0:_0x375920['userID'])!=null?_0xefb171:_0x3f5ba2['userId'],'text':JSON[_0xcbda7d(0xd8)](_0x3f5ba2[_0xcbda7d(0x106)]),'parentId':_0xb82980['id']});break;}case _0x257be8[_0xcbda7d(0x108)]:{const _0x1e508f=this[_0xcbda7d(0x123)][_0xcbda7d(0xf1)](_0x137b1a,_0x48ce0d,_0x3f5ba2[_0xcbda7d(0x13e)]);_0x1e508f&&_0x1e508f[_0xcbda7d(0xcb)]&&this['_threadCommentModel'][_0xcbda7d(0xe8)](_0x137b1a,_0x48ce0d,_0x3f5ba2[_0xcbda7d(0x13e)]);break;}case _0x257be8['Edit']:{this[_0xcbda7d(0x123)][_0xcbda7d(0xea)](_0x137b1a,_0x48ce0d,{'commentId':_0x3f5ba2['replyId'],'text':JSON[_0xcbda7d(0xd8)](_0x3f5ba2['content'])});break;}case _0x257be8[_0xcbda7d(0x12d)]:{const _0x45d6e5=(_0x45834a=this[_0xcbda7d(0x123)][_0xcbda7d(0xd5)](_0x3f5ba2[_0xcbda7d(0xf5)])['find'](_0x2c0132=>_0x2c0132[_0xcbda7d(0x101)]===_0x3f5ba2['threadId']))==null?void 0x0:_0x45834a[_0xcbda7d(0xdc)];_0x45d6e5&&this['_threadCommentModel'][_0xcbda7d(0xd7)](_0x137b1a,_0x48ce0d,_0x45d6e5['id'],_0x3f5ba2['solved']===_0x48e270[_0xcbda7d(0xd4)]);break;}}}));}};_0x4a7b5c=_0x4da777([_0x5b11ab(0x0,_0x1a662a['Inject'](_0x2a6dbd[_0x5ae394(0x132)])),_0x5b11ab(0x1,_0x1a662a['Inject'](_0x215241[_0x5ae394(0x11f)])),_0x5b11ab(0x2,_0x1a662a[_0x5ae394(0x114)](_0x1a662a[_0x5ae394(0xf8)])),_0x5b11ab(0x3,_0x1a662a[_0x5ae394(0x114)](_0x1a662a[_0x5ae394(0x131)]))],_0x4a7b5c);const _0x33ba36=_0x5ae394(0xc7),_0x4c230b={};var _0x4116cf=Object[_0x5ae394(0x12b)],_0x58ee3b=(_0x5e4f34,_0x68c9f1,_0x24c8c5,_0x2d9f12)=>{const _0x4c9b92=_0x5ae394;for(var _0x829725=_0x2d9f12>0x1?void 0x0:_0x2d9f12?_0x4116cf(_0x68c9f1,_0x24c8c5):_0x68c9f1,_0x19cc87=_0x5e4f34[_0x4c9b92(0xe2)]-0x1,_0x4ded57;_0x19cc87>=0x0;_0x19cc87--)(_0x4ded57=_0x5e4f34[_0x19cc87])&&(_0x829725=_0x4ded57(_0x829725)||_0x829725);return _0x829725;},_0x3998b0=(_0x2ac37f,_0xb98011)=>(_0xc91ab6,_0x36e7f6)=>_0xb98011(_0xc91ab6,_0x36e7f6,_0x2ac37f);function _0x1cc6a7(_0xfa3561,_0xf37067){const _0x325eea=_0x5ae394,_0x39fe5f=_0xfa3561[_0x325eea(0xd3)][0x0];return{..._0xf37067,'id':_0x39fe5f[_0x325eea(0x13e)],'resolved':_0xfa3561['solved']===0x1,'dT':_0x28c8ce(_0x39fe5f[_0x325eea(0x126)]),'personId':_0x39fe5f[_0x325eea(0x149)],'threadId':_0x39fe5f[_0x325eea(0x101)]};}function _0x43e166(_0x45ca93,_0x580398,_0x182af3){const _0x22bcf6=_0x5ae394;var _0x4aec7e,_0x447bbe;if(((_0x447bbe=(_0x4aec7e=_0x45ca93==null?void 0x0:_0x45ca93[_0x22bcf6(0xd3)])==null?void 0x0:_0x4aec7e['length'])!=null?_0x447bbe:0x0)>0x0){const _0x5879bc=(_0x142d07,_0x30dea6)=>({'id':_0x142d07[_0x22bcf6(0x13e)],'threadId':_0x142d07[_0x22bcf6(0x101)],'dT':_0x28c8ce(_0x142d07[_0x22bcf6(0x126)]),'personId':_0x142d07[_0x22bcf6(0x149)],'resolved':_0x45ca93['solved']===_0x48e270[_0x22bcf6(0xd4)],'unitId':_0x580398,'subUnitId':_0x182af3,'text':JSON[_0x22bcf6(0xd8)](_0x142d07[_0x22bcf6(0x106)]),'parentId':_0x30dea6}),_0x43bc9b=_0x5879bc(_0x45ca93[_0x22bcf6(0xd3)][0x0]);return{..._0x43bc9b,'children':_0x45ca93[_0x22bcf6(0xd3)][_0x22bcf6(0xda)](0x1)['map'](_0x2bfd2c=>_0x5879bc(_0x2bfd2c,_0x43bc9b['id']))};}return null;}let _0x9f5aa3=class{constructor(_0x51a7b5,_0x39fb9f,_0x1ab626,_0x12953f){const _0x14fef7=_0x5ae394;this[_0x14fef7(0x10c)]=_0x51a7b5,this[_0x14fef7(0x146)]=_0x39fb9f,this[_0x14fef7(0xc6)]=_0x1ab626,this['_injector']=_0x12953f;}async['addComment'](_0x30ab8c){const _0x48998e=_0x5ae394;var _0x443310,_0x3edfa7;const {parentId:_0x52988e,unitId:_0xca6e7e,text:_0x2453ed,threadId:_0x47eec6}=_0x30ab8c,_0x1c1a43=(_0x3edfa7=(_0x443310=_0x2453ed['customRanges'])==null?void 0x0:_0x443310[_0x48998e(0x122)](_0x154a42=>_0x154a42[_0x48998e(0xdd)]===_0x1a662a[_0x48998e(0x12f)][_0x48998e(0x104)])[_0x48998e(0x120)](_0x18ddff=>_0x18ddff[_0x48998e(0xd9)]))!=null?_0x3edfa7:[],_0x4e69ec=JSON[_0x48998e(0xef)](_0x2453ed),_0xab0c67=(await this[_0x48998e(0xc6)][_0x48998e(0x11b)](_0xca6e7e))[_0x48998e(0x13f)]();if(_0x52988e){const _0x219244={'memberId':_0xab0c67,'unitId':_0xca6e7e,'content':_0x4e69ec,'mention':_0x1c1a43,'threadId':_0x47eec6},_0x1f0611=(await this[_0x48998e(0x10c)][_0x48998e(0x135)]('/universer-api/comment/unit/'+_0xca6e7e+_0x48998e(0xdb),{'body':_0x219244}))[_0x48998e(0x143)][_0x48998e(0x128)];return{..._0x30ab8c,'id':_0x1f0611[_0x48998e(0x13e)],'dT':_0x1a662a[_0x48998e(0x13b)](+_0x1f0611['createTimestamp'])[_0x48998e(0x11e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1f0611['userId']};}else{const _0x7daf2d={'memberId':_0xab0c67,'unitId':_0xca6e7e,'content':_0x4e69ec,'mention':_0x1c1a43},_0x3e8dab=await this[_0x48998e(0x10c)][_0x48998e(0x135)](_0x48998e(0x129)+_0xca6e7e+_0x48998e(0x12e),{'body':_0x7daf2d});return _0x1cc6a7(_0x3e8dab[_0x48998e(0x143)][_0x48998e(0xe9)],_0x30ab8c);}}async['updateComment'](_0x1bfce7){const _0xd4bc42=_0x5ae394;var _0x39ba72,_0x1963cf;const {text:_0x19fcef,unitId:_0x10a659}=_0x1bfce7,_0x516816=(_0x1963cf=(_0x39ba72=_0x19fcef['customRanges'])==null?void 0x0:_0x39ba72[_0xd4bc42(0x122)](_0x11a098=>_0x11a098[_0xd4bc42(0xdd)]===_0x1a662a[_0xd4bc42(0x12f)][_0xd4bc42(0x104)])[_0xd4bc42(0x120)](_0x55c45d=>_0x55c45d[_0xd4bc42(0xd9)]))!=null?_0x1963cf:[],_0x5ad9bb=JSON['stringify'](_0x19fcef),_0x38dbf8=_0x1bfce7['threadId'],_0x427cc2=_0x1bfce7['id'],_0x19f67f={'memberId':(await this['_sessionService'][_0xd4bc42(0x11b)](_0x10a659))['getMemberID'](),'unitId':_0x10a659,'threadId':_0x38dbf8,'mention':_0x516816,'content':_0x5ad9bb,'replyId':_0x427cc2},_0x190dc0=await this[_0xd4bc42(0x10c)][_0xd4bc42(0x135)](_0xd4bc42(0x129)+_0x10a659+_0xd4bc42(0x14c),{'body':_0x19f67f});return!_0x190dc0['body']['error']||_0x190dc0['body'][_0xd4bc42(0xfe)][_0xd4bc42(0xed)]===0x1;}async[_0x5ae394(0xd7)](_0x126c9e){const _0x2dc894=_0x5ae394,{unitId:_0x576829}=_0x126c9e,_0x328ca7=_0x126c9e[_0x2dc894(0x101)],_0x116442={'memberId':this[_0x2dc894(0x146)][_0x2dc894(0x127)]()['userID'],'unitId':_0x576829,'threadId':_0x328ca7,'solved':_0x126c9e[_0x2dc894(0xe3)]?_0x48e270['Solved']:_0x48e270[_0x2dc894(0x141)]},_0x4fbe09=await this['_httpService']['post'](_0x2dc894(0x129)+_0x576829+_0x2dc894(0x10f),{'body':_0x116442});return!_0x4fbe09[_0x2dc894(0x143)][_0x2dc894(0xfe)]||_0x4fbe09['body']['error'][_0x2dc894(0xed)]===0x1;}async[_0x5ae394(0xe8)](_0x42be1a,_0x19f0c7,_0x26c36b,_0x303287){const _0x4540c5=_0x5ae394,_0x2ce214={'memberId':(await this['_sessionService'][_0x4540c5(0x11b)](_0x42be1a))[_0x4540c5(0x13f)](),'threadId':_0x26c36b,'replyId':_0x303287,'unitId':_0x42be1a},_0x226697=await this[_0x4540c5(0x10c)][_0x4540c5(0x135)](_0x4540c5(0x129)+_0x42be1a+_0x4540c5(0x117),{'body':_0x2ce214});return!_0x226697['body']['error']||_0x226697[_0x4540c5(0x143)][_0x4540c5(0xfe)][_0x4540c5(0xed)]===0x1;}async['listComments'](_0x40f94a,_0x406dfe,_0x48f4af){const _0x431d78=_0x5ae394,_0x437174={'unitId':_0x40f94a,'threadId':_0x48f4af},_0x4f2114=await this[_0x431d78(0x10c)]['post'](_0x431d78(0x129)+_0x40f94a+_0x431d78(0x10d),{'body':_0x437174}),_0x27bbd3=_0x48f4af['map'](_0xb25f9c=>_0x43e166(_0x4f2114[_0x431d78(0x143)][_0x431d78(0x11a)][_0xb25f9c],_0x40f94a,_0x406dfe))[_0x431d78(0x122)](Boolean);return Object[_0x431d78(0x13a)](_0x4f2114['body'][_0x431d78(0x116)])[_0x431d78(0x142)](_0x5a6a28=>{const _0x145173=_0x431d78;this[_0x145173(0x146)][_0x145173(0x12c)](_0x5a6a28);}),_0x27bbd3;}['saveCommentToSnapshot'](_0x5d54ca){const _0x5a886d=_0x5ae394;return{'id':_0x5d54ca['id'],'threadId':_0x5d54ca[_0x5a886d(0x101)],'ref':_0x5d54ca[_0x5a886d(0x11d)]};}};_0x9f5aa3=_0x58ee3b([_0x3998b0(0x0,_0x1a662a[_0x5ae394(0x114)](_0xf2698a[_0x5ae394(0x10b)])),_0x3998b0(0x1,_0x1a662a[_0x5ae394(0x114)](_0x1a662a[_0x5ae394(0xf8)])),_0x3998b0(0x2,_0x1a662a[_0x5ae394(0x114)](_0x2a6dbd[_0x5ae394(0x10a)])),_0x3998b0(0x3,_0x1a662a[_0x5ae394(0x114)](_0x1a662a['Injector']))],_0x9f5aa3);var _0x2d6343=Object[_0x5ae394(0x12b)],_0x5713cb=(_0x20ba95,_0x243504,_0x5babb4,_0x3fd450)=>{const _0xbffcd3=_0x5ae394;for(var _0x31366b=_0x3fd450>0x1?void 0x0:_0x3fd450?_0x2d6343(_0x243504,_0x5babb4):_0x243504,_0x35a987=_0x20ba95[_0xbffcd3(0xe2)]-0x1,_0x230ad0;_0x35a987>=0x0;_0x35a987--)(_0x230ad0=_0x20ba95[_0x35a987])&&(_0x31366b=_0x230ad0(_0x31366b)||_0x31366b);return _0x31366b;},_0x2e9fc9=(_0x554fc0,_0x1fc07e)=>(_0x471049,_0x14f713)=>_0x1fc07e(_0x471049,_0x14f713,_0x554fc0);let _0x49f62c=class extends _0x1a662a[_0x5ae394(0xf2)]{constructor(_0x3cc777,_0x588969){const _0x449808=_0x5ae394;super(),this[_0x449808(0xfc)]=_0x3cc777,this[_0x449808(0x111)]=_0x588969,this[_0x449808(0xf0)]();}[_0x5ae394(0xf0)](){const _0x29fcb4=_0x5ae394;this[_0x29fcb4(0xfc)]['dataSource']=this[_0x29fcb4(0x111)],this['_threadCommentDataSourceService'][_0x29fcb4(0x139)]=!0x1;}};_0x49f62c=_0x5713cb([_0x2e9fc9(0x0,_0x215241[_0x5ae394(0x144)]),_0x2e9fc9(0x1,_0x1a662a[_0x5ae394(0x114)](_0x9f5aa3))],_0x49f62c);var _0x368519=Object[_0x5ae394(0xf7)],_0x1fb961=Object[_0x5ae394(0x12b)],_0xb735d2=(_0x3e1825,_0x3c268e,_0x5e38bb)=>_0x3c268e in _0x3e1825?_0x368519(_0x3e1825,_0x3c268e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e38bb}):_0x3e1825[_0x3c268e]=_0x5e38bb,_0x363879=(_0x5bcd62,_0x5fccc1,_0x2654c0,_0x1b55da)=>{for(var _0x52d67e=_0x1b55da>0x1?void 0x0:_0x1b55da?_0x1fb961(_0x5fccc1,_0x2654c0):_0x5fccc1,_0x216d73=_0x5bcd62['length']-0x1,_0xb0a9dd;_0x216d73>=0x0;_0x216d73--)(_0xb0a9dd=_0x5bcd62[_0x216d73])&&(_0x52d67e=_0xb0a9dd(_0x52d67e)||_0x52d67e);return _0x52d67e;},_0x30038c=(_0x3ef33b,_0x5c4b20)=>(_0x273266,_0xa42293)=>_0x5c4b20(_0x273266,_0xa42293,_0x3ef33b),_0x33718d=(_0x32c9ba,_0x1931f8,_0x4737b8)=>_0xb735d2(_0x32c9ba,typeof _0x1931f8!=_0x5ae394(0xcf)?_0x1931f8+'':_0x1931f8,_0x4737b8);_0x49da9b[_0x5ae394(0x148)]=class extends _0x1a662a[_0x5ae394(0xeb)]{constructor(_0x342e2f=_0x4c230b,_0xecccaa,_0x297dd9){const _0x3c5257=_0x5ae394;super(),this[_0x3c5257(0xce)]=_0x342e2f,this[_0x3c5257(0x13c)]=_0xecccaa,this[_0x3c5257(0xd6)]=_0x297dd9;const {..._0x37ce60}=_0x1a662a[_0x3c5257(0xff)]({},_0x4c230b,this['_config']);this[_0x3c5257(0xd6)]['setConfig'](_0x33ba36,_0x37ce60);}[_0x5ae394(0xc9)](){[[_0x9f5aa3],[_0x49f62c],[_0x4a7b5c]]['forEach'](_0x1775a5=>{const _0x2763b4=_0x969c;this[_0x2763b4(0x13c)]['add'](_0x1775a5);});}['onReady'](){const _0x449a53=_0x5ae394;this[_0x449a53(0x13c)][_0x449a53(0xf6)](_0x49f62c),this[_0x449a53(0x13c)][_0x449a53(0xf6)](_0x4a7b5c);}},_0x33718d(_0x49da9b[_0x5ae394(0x148)],_0x5ae394(0x147),_0x18e20e),_0x33718d(_0x49da9b['UniverThreadCommentDataSourcePlugin'],'type',_0x1a662a[_0x5ae394(0x125)]['UNIVER_UNKNOWN']),_0x49da9b[_0x5ae394(0x148)]=_0x363879([_0x1a662a[_0x5ae394(0x145)](_0x2eb002['UniverThreadCommentUIPlugin'],_0x2a6dbd['UniverCollaborationClientPlugin'],_0x1f1fb0[_0x5ae394(0xe5)]),_0x30038c(0x1,_0x1a662a[_0x5ae394(0x114)](_0x1a662a['Injector'])),_0x30038c(0x2,_0x1a662a['IConfigService'])],_0x49da9b['UniverThreadCommentDataSourcePlugin']),Object[_0x5ae394(0xf7)](_0x49da9b,Symbol[_0x5ae394(0x102)],{'value':_0x5ae394(0xfa)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.0-nightly.202506081606",
3
+ "version": "0.8.0-nightly.202506101607",
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.8.0-nightly.202506081606",
49
- "@univerjs-pro/license": "0.8.0-nightly.202506081606",
50
- "@univerjs/core": "0.8.0-nightly.202506081606",
51
- "@univerjs/network": "0.8.0-nightly.202506081606",
52
- "@univerjs/thread-comment-ui": "0.8.0-nightly.202506081606",
53
- "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment": "0.8.0-nightly.202506081606"
48
+ "@univerjs-pro/collaboration-client": "0.8.0-nightly.202506101607",
49
+ "@univerjs/core": "0.8.0-nightly.202506101607",
50
+ "@univerjs-pro/license": "0.8.0-nightly.202506101607",
51
+ "@univerjs/thread-comment": "0.8.0-nightly.202506101607",
52
+ "@univerjs/network": "0.8.0-nightly.202506101607",
53
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202506101607",
54
+ "@univerjs/protocol": "0.1.47-alpha.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",