@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506081606 → 0.8.0-nightly.202506091607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _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 _0x1d7798=_0x3869;(function(_0x177410,_0x5e7d6b){const _0x24a8dc=_0x3869,_0x470920=_0x177410();while(!![]){try{const _0x15e108=-parseInt(_0x24a8dc(0x21a))/0x1*(-parseInt(_0x24a8dc(0x1e4))/0x2)+-parseInt(_0x24a8dc(0x208))/0x3*(-parseInt(_0x24a8dc(0x1ef))/0x4)+-parseInt(_0x24a8dc(0x1db))/0x5+-parseInt(_0x24a8dc(0x244))/0x6*(-parseInt(_0x24a8dc(0x1e9))/0x7)+parseInt(_0x24a8dc(0x23c))/0x8+parseInt(_0x24a8dc(0x1f9))/0x9*(parseInt(_0x24a8dc(0x20c))/0xa)+-parseInt(_0x24a8dc(0x236))/0xb;if(_0x15e108===_0x5e7d6b)break;else _0x470920['push'](_0x470920['shift']());}catch(_0x490fba){_0x470920['push'](_0x470920['shift']());}}}(_0x36c7,0xd175f));Object[_0x1d7798(0x1fd)](exports,Symbol[_0x1d7798(0x225)],{'value':_0x1d7798(0x209)});const b=require(_0x1d7798(0x246)),T=require(_0x1d7798(0x23b)),c=require('@univerjs/core'),j=require(_0x1d7798(0x23f)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1d7798(0x239)),U=_0x1d7798(0x217);var I=(_0x2c36a6=>(_0x2c36a6[_0x2c36a6['OpenOrReOpen']=0x0]=_0x1d7798(0x22e),_0x2c36a6[_0x2c36a6[_0x1d7798(0x1e5)]=0x1]=_0x1d7798(0x1e5),_0x2c36a6[_0x2c36a6['UNRECOGNIZED']=-0x1]=_0x1d7798(0x1f5),_0x2c36a6))(I||{}),v=(_0x3aadaf=>(_0x3aadaf[_0x3aadaf[_0x1d7798(0x201)]=0x0]=_0x1d7798(0x201),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1e6)]=0x1]=_0x1d7798(0x1e6),_0x3aadaf[_0x3aadaf[_0x1d7798(0x221)]=0x2]=_0x1d7798(0x221),_0x3aadaf[_0x3aadaf[_0x1d7798(0x20f)]=0x3]=_0x1d7798(0x20f),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1eb)]=0x4]='Delete',_0x3aadaf[_0x3aadaf[_0x1d7798(0x232)]=0x5]=_0x1d7798(0x232),_0x3aadaf[_0x3aadaf[_0x1d7798(0x1f5)]=-0x1]='UNRECOGNIZED',_0x3aadaf))(v||{});const f=_0x2d48fa=>c[_0x1d7798(0x204)](new Date(+_0x2d48fa))[_0x1d7798(0x226)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5efb1d,_0x44c0b)=>{const _0x5f4044=_0x1d7798,_0x4a739d=_0x5efb1d[_0x5f4044(0x20a)](c['UserManagerService']),_0x18465b=_0x5efb1d[_0x5f4044(0x20a)](P[_0x5f4044(0x1d6)]);_0x44c0b[_0x5f4044(0x1d1)](_0x1d03b1=>{const _0x67974b=_0x5f4044;_0x4a739d[_0x67974b(0x1ec)](_0x1d03b1)&&_0x44c0b[_0x67974b(0x215)](_0x1d03b1);}),_0x44c0b[_0x5f4044(0x1fc)]&&(await _0x18465b[_0x5f4044(0x20a)](_0x5f4044(0x1cb),{'params':{'userIDs':[..._0x44c0b]}}))[_0x5f4044(0x1fa)]['users'][_0x5f4044(0x1d1)](_0xf2eacd=>{const _0x5ce26a=_0x5f4044;_0xf2eacd&&_0x4a739d[_0x5ce26a(0x1ee)](_0xf2eacd);});};var $=Object[_0x1d7798(0x1e2)],E=(_0x1c5e1e,_0x386156,_0x9aa504,_0x5833f2)=>{const _0x5bb9be=_0x1d7798;for(var _0x35fae8=_0x5833f2>0x1?void 0x0:_0x5833f2?$(_0x386156,_0x9aa504):_0x386156,_0x13c441=_0x1c5e1e[_0x5bb9be(0x1d4)]-0x1,_0x382859;_0x13c441>=0x0;_0x13c441--)(_0x382859=_0x1c5e1e[_0x13c441])&&(_0x35fae8=_0x382859(_0x35fae8)||_0x35fae8);return _0x35fae8;},S=(_0x13859a,_0x2bd1a1)=>(_0x1be4e2,_0x3977e2)=>_0x2bd1a1(_0x1be4e2,_0x3977e2,_0x13859a);let p=class extends c[_0x1d7798(0x1f6)]{constructor(_0x2b4ec6,_0x2b2674,_0x253ffe,_0x5a9967){const _0x45225f=_0x1d7798;super(),this[_0x45225f(0x203)]=_0x2b4ec6,this['_threadCommentModel']=_0x2b2674,this[_0x45225f(0x240)]=_0x253ffe,this[_0x45225f(0x202)]=_0x5a9967,this[_0x45225f(0x1f8)](),this[_0x45225f(0x212)]();}[_0x1d7798(0x212)](){const _0x2684cb=_0x1d7798;this['disposeWithMe'](this['_threadCommentModel'][_0x2684cb(0x22f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x41d66c=>{const _0x3e73b1=_0x2684cb,_0x426860=new Set();_0x41d66c[_0x3e73b1(0x1d1)](_0x1b3244=>{const _0x105363=_0x3e73b1;switch(_0x1b3244[_0x105363(0x21d)]){case _0x105363(0x228):{const _0x536d46=_0x1b3244[_0x105363(0x231)]['personId'];_0x426860['add'](_0x536d46);break;}}}),R(this[_0x3e73b1(0x202)],_0x426860);}));}['_init'](){const _0x15ea75=_0x1d7798;this[_0x15ea75(0x1d9)](this[_0x15ea75(0x203)]['commentUpdate$'][_0x15ea75(0x23d)](async _0x4ba01c=>{const _0x5367f9=_0x15ea75;var _0x28c56e,_0x465841,_0x10bba1,_0xd90d2d;const _0x2a6986=(_0x28c56e=this[_0x5367f9(0x1f1)]['getUnit'](_0x4ba01c[_0x5367f9(0x1d8)])[_0x5367f9(0x214)](_0x4dbcb5=>_0x4dbcb5[_0x5367f9(0x245)]===_0x4ba01c[_0x5367f9(0x245)]))==null?void 0x0:_0x28c56e[_0x5367f9(0x22d)];if(!_0x2a6986)return;const {unitId:_0x226590,subUnitId:_0xfd97ba}=_0x2a6986;switch(_0x4ba01c['user']&&this['_userService'][_0x5367f9(0x1ee)](_0x4ba01c['user']),_0x4ba01c[_0x5367f9(0x21d)]){case v[_0x5367f9(0x1e6)]:break;case v[_0x5367f9(0x221)]:{this[_0x5367f9(0x1f1)][_0x5367f9(0x213)](_0x226590,_0xfd97ba,{'unitId':_0x226590,'subUnitId':_0xfd97ba,'ref':'','id':_0x4ba01c[_0x5367f9(0x21b)],'dT':f(+_0x4ba01c[_0x5367f9(0x1f3)]),'threadId':_0x4ba01c[_0x5367f9(0x245)],'personId':(_0x10bba1=(_0x465841=_0x4ba01c[_0x5367f9(0x1d3)])==null?void 0x0:_0x465841[_0x5367f9(0x237)])!=null?_0x10bba1:_0x4ba01c[_0x5367f9(0x1f4)],'text':JSON[_0x5367f9(0x210)](_0x4ba01c[_0x5367f9(0x1fe)]),'parentId':_0x2a6986['id']});break;}case v[_0x5367f9(0x1eb)]:{const _0x2b9f21=this[_0x5367f9(0x1f1)][_0x5367f9(0x1cd)](_0x226590,_0xfd97ba,_0x4ba01c['replyId']);_0x2b9f21&&_0x2b9f21[_0x5367f9(0x230)]&&this[_0x5367f9(0x1f1)][_0x5367f9(0x22b)](_0x226590,_0xfd97ba,_0x4ba01c[_0x5367f9(0x21b)]);break;}case v[_0x5367f9(0x20f)]:{this[_0x5367f9(0x1f1)][_0x5367f9(0x242)](_0x226590,_0xfd97ba,{'commentId':_0x4ba01c[_0x5367f9(0x21b)],'text':JSON[_0x5367f9(0x210)](_0x4ba01c[_0x5367f9(0x1fe)])});break;}case v[_0x5367f9(0x232)]:{const _0x4d225f=(_0xd90d2d=this['_threadCommentModel'][_0x5367f9(0x21e)](_0x4ba01c[_0x5367f9(0x1d8)])[_0x5367f9(0x214)](_0x20ebb5=>_0x20ebb5['threadId']===_0x4ba01c[_0x5367f9(0x245)]))==null?void 0x0:_0xd90d2d['root'];_0x4d225f&&this['_threadCommentModel'][_0x5367f9(0x1fb)](_0x226590,_0xfd97ba,_0x4d225f['id'],_0x4ba01c[_0x5367f9(0x1dc)]===I[_0x5367f9(0x1e5)]);break;}}}));}};p=E([S(0x0,c[_0x1d7798(0x1da)](b[_0x1d7798(0x21f)])),S(0x1,c[_0x1d7798(0x1da)](M[_0x1d7798(0x218)])),S(0x2,c['Inject'](c[_0x1d7798(0x22a)])),S(0x3,c[_0x1d7798(0x1da)](c[_0x1d7798(0x1ed)]))],p);const q=_0x1d7798(0x1cc),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x19dae1,_0x465edc,_0x21955,_0x67b5e8)=>{const _0x462886=_0x1d7798;for(var _0x4a8572=_0x67b5e8>0x1?void 0x0:_0x67b5e8?A(_0x465edc,_0x21955):_0x465edc,_0x5e8654=_0x19dae1[_0x462886(0x1d4)]-0x1,_0x2ef215;_0x5e8654>=0x0;_0x5e8654--)(_0x2ef215=_0x19dae1[_0x5e8654])&&(_0x4a8572=_0x2ef215(_0x4a8572)||_0x4a8572);return _0x4a8572;},_=(_0x113eb9,_0x17a1e5)=>(_0xe82460,_0x2ae5a5)=>_0x17a1e5(_0xe82460,_0x2ae5a5,_0x113eb9);function Y(_0x3958bd,_0x3dc23f){const _0x4748eb=_0x1d7798,_0x86d3e3=_0x3958bd[_0x4748eb(0x219)][0x0];return{..._0x3dc23f,'id':_0x86d3e3[_0x4748eb(0x21b)],'resolved':_0x3958bd[_0x4748eb(0x1dc)]===0x1,'dT':f(_0x86d3e3['createTimestamp']),'personId':_0x86d3e3['userId'],'threadId':_0x86d3e3[_0x4748eb(0x245)]};}function _0x36c7(){const _0x125066=['replyId','dataSource','type','getUnit','CommentService','/universer-api/comment/unit/','Reply','/edit','map','UNIVER_UNKNOWN','toStringTag','format','Plugin','add','UniverLicensePlugin','UserManagerService','deleteComment','DependentOn','root','OpenOrReOpen','commentUpdate$','parentId','payload','Solve','getCurrentUser','listComments','resolved','31775843PeIvIU','userID','requireSession','@univerjs/network','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','4645840sLxlJC','subscribe','_config','@univerjs/thread-comment-ui','_userService','_initDataSource','updateComment','filter','8429838NihfCL','threadId','@univerjs-pro/collaboration-client','rangeType','/universer-api/user/list','thread-comment-data-source.config','getComment','pluginName','customRanges','_sessionService','forEach','UniverInstanceType','user','length','reply','HTTPService','IConfigService','unitId','disposeWithMe','Inject','8152825UqeLBG','solved','values','UniverThreadCommentDataSourcePlugin','setConfig','post','_configService','getOwnPropertyDescriptor','onReady','1258jjMVUF','Solved','Add','users','/delete','7kyljSi','getMemberID','Delete','getUser','Injector','addUser','88jaWDQM','ref','_threadCommentModel','/reply','createTimestamp','userId','UNRECOGNIZED','Disposable','/solved','_init','198MivWYe','body','resolveComment','size','defineProperty','content','saveCommentToSnapshot','CustomRangeType','Unknown','_injector','_commentService','dayjs','COMMENT','_threadCommentDataSourceService','_threadCommentDataSource','192039VGulDp','Module','get','UniverCollaborationClientPlugin','696190kqbWBC','stringify','_httpService','Edit','parse','code','_initUserSync','addComment','find','delete','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','replies','718XpsqxC'];_0x36c7=function(){return _0x125066;};return _0x36c7();}function G(_0x38a823,_0x2f9ee9,_0x25e3cf){const _0x3cd7ee=_0x1d7798;var _0x5c6d11,_0xb98527;if(((_0xb98527=(_0x5c6d11=_0x38a823==null?void 0x0:_0x38a823[_0x3cd7ee(0x219)])==null?void 0x0:_0x5c6d11['length'])!=null?_0xb98527:0x0)>0x0){const _0x1e515c=(_0x8f14c3,_0x395360)=>({'id':_0x8f14c3[_0x3cd7ee(0x21b)],'threadId':_0x8f14c3[_0x3cd7ee(0x245)],'dT':f(_0x8f14c3[_0x3cd7ee(0x1f3)]),'personId':_0x8f14c3[_0x3cd7ee(0x1f4)],'resolved':_0x38a823[_0x3cd7ee(0x1dc)]===I['Solved'],'unitId':_0x2f9ee9,'subUnitId':_0x25e3cf,'text':JSON[_0x3cd7ee(0x210)](_0x8f14c3[_0x3cd7ee(0x1fe)]),'parentId':_0x395360}),_0x4db97a=_0x1e515c(_0x38a823['replies'][0x0]);return{..._0x4db97a,'children':_0x38a823[_0x3cd7ee(0x219)]['slice'](0x1)[_0x3cd7ee(0x223)](_0x211807=>_0x1e515c(_0x211807,_0x4db97a['id']))};}return null;}function _0x3869(_0x1a0ff3,_0x34160b){const _0x36c742=_0x36c7();return _0x3869=function(_0x3869fe,_0x3746f3){_0x3869fe=_0x3869fe-0x1cb;let _0x1caeda=_0x36c742[_0x3869fe];return _0x1caeda;},_0x3869(_0x1a0ff3,_0x34160b);}let g=class{constructor(_0x1df9f8,_0xccd4a1,_0x574912,_0x12003f){const _0x4c3663=_0x1d7798;this[_0x4c3663(0x20e)]=_0x1df9f8,this['_userService']=_0xccd4a1,this[_0x4c3663(0x1d0)]=_0x574912,this[_0x4c3663(0x202)]=_0x12003f;}async[_0x1d7798(0x213)](_0x18e979){const _0x321b35=_0x1d7798;var _0x4c39d6,_0x326874;const {parentId:_0x1a0867,unitId:_0x2424ac,text:_0xafedba,threadId:_0x46a027}=_0x18e979,_0x182b1a=(_0x326874=(_0x4c39d6=_0xafedba[_0x321b35(0x1cf)])==null?void 0x0:_0x4c39d6['filter'](_0x9f7d00=>_0x9f7d00[_0x321b35(0x247)]===c['CustomRangeType'][_0x321b35(0x205)])[_0x321b35(0x223)](_0x1a41ae=>_0x1a41ae['rangeId']))!=null?_0x326874:[],_0x420b87=JSON['stringify'](_0xafedba),_0x2f796d=(await this[_0x321b35(0x1d0)][_0x321b35(0x238)](_0x2424ac))[_0x321b35(0x1ea)]();if(_0x1a0867){const _0x1e1c3a={'memberId':_0x2f796d,'unitId':_0x2424ac,'content':_0x420b87,'mention':_0x182b1a,'threadId':_0x46a027},_0x5dde0b=(await this['_httpService'][_0x321b35(0x1e0)](_0x321b35(0x220)+_0x2424ac+_0x321b35(0x1f2),{'body':_0x1e1c3a}))[_0x321b35(0x1fa)][_0x321b35(0x1d5)];return{..._0x18e979,'id':_0x5dde0b['replyId'],'dT':c['dayjs'](+_0x5dde0b[_0x321b35(0x1f3)])[_0x321b35(0x226)](_0x321b35(0x23a)),'personId':_0x5dde0b['userId']};}else{const _0x4db070={'memberId':_0x2f796d,'unitId':_0x2424ac,'content':_0x420b87,'mention':_0x182b1a},_0x230dca=await this[_0x321b35(0x20e)][_0x321b35(0x1e0)]('/universer-api/comment/unit/'+_0x2424ac+'/add',{'body':_0x4db070});return Y(_0x230dca['body']['comment'],_0x18e979);}}async[_0x1d7798(0x242)](_0x40e904){const _0x16e57b=_0x1d7798;var _0x59fd00,_0x4ca93b;const {text:_0x4a615b,unitId:_0x329d36}=_0x40e904,_0x8d3adc=(_0x4ca93b=(_0x59fd00=_0x4a615b[_0x16e57b(0x1cf)])==null?void 0x0:_0x59fd00[_0x16e57b(0x243)](_0x1bd5e3=>_0x1bd5e3[_0x16e57b(0x247)]===c[_0x16e57b(0x200)][_0x16e57b(0x205)])[_0x16e57b(0x223)](_0x14ab6b=>_0x14ab6b['rangeId']))!=null?_0x4ca93b:[],_0x583526=JSON[_0x16e57b(0x20d)](_0x4a615b),_0x2bcfd3=_0x40e904[_0x16e57b(0x245)],_0x2214c4=_0x40e904['id'],_0x4f34d5={'memberId':(await this[_0x16e57b(0x1d0)][_0x16e57b(0x238)](_0x329d36))[_0x16e57b(0x1ea)](),'unitId':_0x329d36,'threadId':_0x2bcfd3,'mention':_0x8d3adc,'content':_0x583526,'replyId':_0x2214c4},_0x1512b7=await this[_0x16e57b(0x20e)][_0x16e57b(0x1e0)](_0x16e57b(0x220)+_0x329d36+_0x16e57b(0x222),{'body':_0x4f34d5});return!_0x1512b7['body'][_0x16e57b(0x216)]||_0x1512b7[_0x16e57b(0x1fa)]['error'][_0x16e57b(0x211)]===0x1;}async[_0x1d7798(0x1fb)](_0x2faf0e){const _0x4a24ee=_0x1d7798,{unitId:_0x787e5c}=_0x2faf0e,_0x552626=_0x2faf0e[_0x4a24ee(0x245)],_0x1ea417={'memberId':this[_0x4a24ee(0x240)][_0x4a24ee(0x233)]()[_0x4a24ee(0x237)],'unitId':_0x787e5c,'threadId':_0x552626,'solved':_0x2faf0e[_0x4a24ee(0x235)]?I[_0x4a24ee(0x1e5)]:I[_0x4a24ee(0x22e)]},_0x304c64=await this[_0x4a24ee(0x20e)][_0x4a24ee(0x1e0)](_0x4a24ee(0x220)+_0x787e5c+_0x4a24ee(0x1f7),{'body':_0x1ea417});return!_0x304c64['body'][_0x4a24ee(0x216)]||_0x304c64[_0x4a24ee(0x1fa)]['error'][_0x4a24ee(0x211)]===0x1;}async[_0x1d7798(0x22b)](_0x30fe19,_0x541999,_0x3081ff,_0x1e1496){const _0x3e3d3e=_0x1d7798,_0x42d1b6={'memberId':(await this[_0x3e3d3e(0x1d0)][_0x3e3d3e(0x238)](_0x30fe19))[_0x3e3d3e(0x1ea)](),'threadId':_0x3081ff,'replyId':_0x1e1496,'unitId':_0x30fe19},_0x60f175=await this[_0x3e3d3e(0x20e)]['post'](_0x3e3d3e(0x220)+_0x30fe19+_0x3e3d3e(0x1e8),{'body':_0x42d1b6});return!_0x60f175[_0x3e3d3e(0x1fa)][_0x3e3d3e(0x216)]||_0x60f175[_0x3e3d3e(0x1fa)][_0x3e3d3e(0x216)]['code']===0x1;}async[_0x1d7798(0x234)](_0x1f0d32,_0x20a2cb,_0x2847f2){const _0x483069=_0x1d7798,_0xad3a8f={'unitId':_0x1f0d32,'threadId':_0x2847f2},_0x52da4e=await this[_0x483069(0x20e)][_0x483069(0x1e0)](_0x483069(0x220)+_0x1f0d32+'/list',{'body':_0xad3a8f}),_0x36e866=_0x2847f2[_0x483069(0x223)](_0x4efee2=>G(_0x52da4e[_0x483069(0x1fa)]['comments'][_0x4efee2],_0x1f0d32,_0x20a2cb))[_0x483069(0x243)](Boolean);return Object[_0x483069(0x1dd)](_0x52da4e[_0x483069(0x1fa)][_0x483069(0x1e7)])['forEach'](_0x25467a=>{const _0x1ccc5d=_0x483069;this['_userService'][_0x1ccc5d(0x1ee)](_0x25467a);}),_0x36e866;}[_0x1d7798(0x1ff)](_0x12d2d0){const _0x2b7847=_0x1d7798;return{'id':_0x12d2d0['id'],'threadId':_0x12d2d0[_0x2b7847(0x245)],'ref':_0x12d2d0[_0x2b7847(0x1f0)]};}};g=x([_(0x0,c[_0x1d7798(0x1da)](P[_0x1d7798(0x1d6)])),_(0x1,c[_0x1d7798(0x1da)](c['UserManagerService'])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x1d7798(0x1da)](c['Injector']))],g);var H=Object[_0x1d7798(0x1e2)],J=(_0x1ebd56,_0x5ec5b1,_0x2542d3,_0x5a905f)=>{const _0x1699ce=_0x1d7798;for(var _0x5a61b0=_0x5a905f>0x1?void 0x0:_0x5a905f?H(_0x5ec5b1,_0x2542d3):_0x5ec5b1,_0x4e869e=_0x1ebd56[_0x1699ce(0x1d4)]-0x1,_0x4bf1d8;_0x4e869e>=0x0;_0x4e869e--)(_0x4bf1d8=_0x1ebd56[_0x4e869e])&&(_0x5a61b0=_0x4bf1d8(_0x5a61b0)||_0x5a61b0);return _0x5a61b0;},y=(_0x3c8be7,_0x5c218c)=>(_0x32a090,_0x495329)=>_0x5c218c(_0x32a090,_0x495329,_0x3c8be7);let C=class extends c[_0x1d7798(0x1f6)]{constructor(_0x4e8038,_0x21b911){const _0x3eb792=_0x1d7798;super(),this[_0x3eb792(0x206)]=_0x4e8038,this[_0x3eb792(0x207)]=_0x21b911,this['_initDataSource']();}[_0x1d7798(0x241)](){const _0x49ba38=_0x1d7798;this[_0x49ba38(0x206)][_0x49ba38(0x21c)]=this['_threadCommentDataSource'],this[_0x49ba38(0x206)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x1d7798(0x1fd)],L=Object[_0x1d7798(0x1e2)],Z=(_0x443e21,_0x1b356e,_0x74c0fb)=>_0x1b356e in _0x443e21?F(_0x443e21,_0x1b356e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x74c0fb}):_0x443e21[_0x1b356e]=_0x74c0fb,W=(_0xcab3a5,_0xb13cb4,_0x367361,_0x206c69)=>{for(var _0x3c2880=_0x206c69>0x1?void 0x0:_0x206c69?L(_0xb13cb4,_0x367361):_0xb13cb4,_0xa25326=_0xcab3a5['length']-0x1,_0x5c4391;_0xa25326>=0x0;_0xa25326--)(_0x5c4391=_0xcab3a5[_0xa25326])&&(_0x3c2880=_0x5c4391(_0x3c2880)||_0x3c2880);return _0x3c2880;},O=(_0x5dad2b,_0xf7bf78)=>(_0x5bb27d,_0xf894c8)=>_0xf7bf78(_0x5bb27d,_0xf894c8,_0x5dad2b),N=(_0x25d534,_0x4ef787,_0x5da181)=>Z(_0x25d534,typeof _0x4ef787!='symbol'?_0x4ef787+'':_0x4ef787,_0x5da181);exports[_0x1d7798(0x1de)]=class extends c[_0x1d7798(0x227)]{constructor(_0x31b56c=D,_0x503565,_0x50e5c5){const _0x360a15=_0x1d7798;super(),this[_0x360a15(0x23e)]=_0x31b56c,this['_injector']=_0x503565,this[_0x360a15(0x1e1)]=_0x50e5c5;const {..._0x266c6e}=c['merge']({},D,this[_0x360a15(0x23e)]);this[_0x360a15(0x1e1)][_0x360a15(0x1df)](q,_0x266c6e);}['onStarting'](){const _0x4ea53f=_0x1d7798;[[g],[C],[p]][_0x4ea53f(0x1d1)](_0x21939f=>{const _0x8dd500=_0x4ea53f;this[_0x8dd500(0x202)][_0x8dd500(0x228)](_0x21939f);});}[_0x1d7798(0x1e3)](){const _0x1af042=_0x1d7798;this[_0x1af042(0x202)][_0x1af042(0x20a)](C),this[_0x1af042(0x202)][_0x1af042(0x20a)](p);}},N(exports[_0x1d7798(0x1de)],_0x1d7798(0x1ce),U),N(exports[_0x1d7798(0x1de)],'type',c[_0x1d7798(0x1d2)][_0x1d7798(0x224)]),exports[_0x1d7798(0x1de)]=W([c[_0x1d7798(0x22c)](j['UniverThreadCommentUIPlugin'],b[_0x1d7798(0x20b)],T[_0x1d7798(0x229)]),O(0x1,c[_0x1d7798(0x1da)](c[_0x1d7798(0x1ed)])),O(0x2,c[_0x1d7798(0x1d7)])],exports['UniverThreadCommentDataSourcePlugin']);
|
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 _0x23fa6f=_0x50e2;(function(_0x34d748,_0x3b8ba5){const _0x26f94b=_0x50e2,_0x16dbaf=_0x34d748();while(!![]){try{const _0x3c29d6=parseInt(_0x26f94b(0x143))/0x1+parseInt(_0x26f94b(0x18f))/0x2+-parseInt(_0x26f94b(0x151))/0x3+-parseInt(_0x26f94b(0x132))/0x4+parseInt(_0x26f94b(0x159))/0x5+-parseInt(_0x26f94b(0x185))/0x6*(-parseInt(_0x26f94b(0x14a))/0x7)+parseInt(_0x26f94b(0x169))/0x8*(parseInt(_0x26f94b(0x173))/0x9);if(_0x3c29d6===_0x3b8ba5)break;else _0x16dbaf['push'](_0x16dbaf['shift']());}catch(_0x4b36c2){_0x16dbaf['push'](_0x16dbaf['shift']());}}}(_0x232d,0x587c4));import{CommentService as _0x20a661,CollaborationSessionService as _0xea13e3,UniverCollaborationClientPlugin as _0x3dcb68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dbdb7}from'@univerjs-pro/license';import{dayjs as _0x3a9660,UserManagerService as _0x469b81,Inject as _0x3c5570,Injector as _0x375bf6,Disposable as _0x34d19b,CustomRangeType as _0x445314,UniverInstanceType as _0x43fc88,DependentOn as _0x1e041b,IConfigService as _0x1e8b56,Plugin as _0x9156f8,merge as _0x110a0b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b0210}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f0ff,IThreadCommentDataSourceService as _0x2ecb1d}from'@univerjs/thread-comment';import{bufferTime as _0x5b8e83}from'rxjs';import{HTTPService as _0x46056e}from'@univerjs/network';const W=_0x23fa6f(0x166);var I=(_0x48f0cc=>(_0x48f0cc[_0x48f0cc[_0x23fa6f(0x158)]=0x0]=_0x23fa6f(0x158),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x137)]=0x1]=_0x23fa6f(0x137),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x48f0cc))(I||{}),v=(_0x2822d8=>(_0x2822d8[_0x2822d8[_0x23fa6f(0x188)]=0x0]=_0x23fa6f(0x188),_0x2822d8[_0x2822d8['Add']=0x1]='Add',_0x2822d8[_0x2822d8[_0x23fa6f(0x156)]=0x2]='Reply',_0x2822d8[_0x2822d8['Edit']=0x3]='Edit',_0x2822d8[_0x2822d8[_0x23fa6f(0x13d)]=0x4]=_0x23fa6f(0x13d),_0x2822d8[_0x2822d8[_0x23fa6f(0x177)]=0x5]=_0x23fa6f(0x177),_0x2822d8[_0x2822d8[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x2822d8))(v||{});const D=_0x57489c=>_0x3a9660(new Date(+_0x57489c))[_0x23fa6f(0x17f)](_0x23fa6f(0x15e)),B=async(_0x1dd44f,_0x40b698)=>{const _0x7afd01=_0x23fa6f,_0x238c72=_0x1dd44f[_0x7afd01(0x13b)](_0x469b81),_0x315977=_0x1dd44f['get'](_0x46056e);_0x40b698['forEach'](_0x53849b=>{const _0x57666f=_0x7afd01;_0x238c72[_0x57666f(0x164)](_0x53849b)&&_0x40b698[_0x57666f(0x16e)](_0x53849b);}),_0x40b698[_0x7afd01(0x14e)]&&(await _0x315977[_0x7afd01(0x13b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40b698]}}))['body'][_0x7afd01(0x18c)][_0x7afd01(0x193)](_0x2c6970=>{const _0x32f084=_0x7afd01;_0x2c6970&&_0x238c72[_0x32f084(0x138)](_0x2c6970);});};var K=Object[_0x23fa6f(0x191)],V=(_0x240725,_0x301fe1,_0x7f5cca,_0x6aa73)=>{for(var _0x230780=_0x6aa73>0x1?void 0x0:_0x6aa73?K(_0x301fe1,_0x7f5cca):_0x301fe1,_0x2a8a03=_0x240725['length']-0x1,_0x17b4a7;_0x2a8a03>=0x0;_0x2a8a03--)(_0x17b4a7=_0x240725[_0x2a8a03])&&(_0x230780=_0x17b4a7(_0x230780)||_0x230780);return _0x230780;},p=(_0x538cbd,_0x7bae1)=>(_0xa0f7c1,_0x563fe3)=>_0x7bae1(_0xa0f7c1,_0x563fe3,_0x538cbd);let S=class extends _0x34d19b{constructor(_0x6cc892,_0x16fee6,_0x4db590,_0x23de98){const _0x3ffb7d=_0x23fa6f;super(),this[_0x3ffb7d(0x14d)]=_0x6cc892,this['_threadCommentModel']=_0x16fee6,this['_userService']=_0x4db590,this['_injector']=_0x23de98,this['_init'](),this[_0x3ffb7d(0x181)]();}['_initUserSync'](){const _0x19eeb0=_0x23fa6f;this[_0x19eeb0(0x14b)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5b8e83(0x10))[_0x19eeb0(0x135)](_0x3b37b8=>{const _0x282ad1=_0x19eeb0,_0x582357=new Set();_0x3b37b8[_0x282ad1(0x193)](_0x514d50=>{const _0x328e3f=_0x282ad1;switch(_0x514d50[_0x328e3f(0x178)]){case _0x328e3f(0x170):{const _0x1e96c4=_0x514d50[_0x328e3f(0x13e)][_0x328e3f(0x144)];_0x582357['add'](_0x1e96c4);break;}}}),B(this[_0x282ad1(0x140)],_0x582357);}));}['_init'](){const _0x33ec78=_0x23fa6f;this[_0x33ec78(0x14b)](this['_commentService'][_0x33ec78(0x134)][_0x33ec78(0x135)](async _0x2ef939=>{const _0xcfd235=_0x33ec78;var _0x52fc42,_0x55b9ab,_0x18afa9,_0x2f5a17;const _0x58bbe5=(_0x52fc42=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939['unitId'])[_0xcfd235(0x183)](_0x31f112=>_0x31f112[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x52fc42[_0xcfd235(0x17d)];if(!_0x58bbe5)return;const {unitId:_0x468376,subUnitId:_0x48c59b}=_0x58bbe5;switch(_0x2ef939[_0xcfd235(0x155)]&&this['_userService'][_0xcfd235(0x138)](_0x2ef939[_0xcfd235(0x155)]),_0x2ef939[_0xcfd235(0x178)]){case v[_0xcfd235(0x17b)]:break;case v['Reply']:{this[_0xcfd235(0x18d)][_0xcfd235(0x162)](_0x468376,_0x48c59b,{'unitId':_0x468376,'subUnitId':_0x48c59b,'ref':'','id':_0x2ef939[_0xcfd235(0x194)],'dT':D(+_0x2ef939[_0xcfd235(0x13a)]),'threadId':_0x2ef939['threadId'],'personId':(_0x18afa9=(_0x55b9ab=_0x2ef939[_0xcfd235(0x155)])==null?void 0x0:_0x55b9ab[_0xcfd235(0x184)])!=null?_0x18afa9:_0x2ef939[_0xcfd235(0x172)],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)]),'parentId':_0x58bbe5['id']});break;}case v['Delete']:{const _0x49e090=this['_threadCommentModel'][_0xcfd235(0x14f)](_0x468376,_0x48c59b,_0x2ef939[_0xcfd235(0x194)]);_0x49e090&&_0x49e090[_0xcfd235(0x196)]&&this[_0xcfd235(0x18d)][_0xcfd235(0x175)](_0x468376,_0x48c59b,_0x2ef939['replyId']);break;}case v[_0xcfd235(0x131)]:{this[_0xcfd235(0x18d)][_0xcfd235(0x163)](_0x468376,_0x48c59b,{'commentId':_0x2ef939['replyId'],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)])});break;}case v['Solve']:{const _0x9465d2=(_0x2f5a17=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939[_0xcfd235(0x152)])[_0xcfd235(0x183)](_0x55bd72=>_0x55bd72[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x2f5a17[_0xcfd235(0x17d)];_0x9465d2&&this['_threadCommentModel'][_0xcfd235(0x150)](_0x468376,_0x48c59b,_0x9465d2['id'],_0x2ef939['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c5570(_0x20a661)),p(0x1,_0x3c5570(_0x5f0ff)),p(0x2,_0x3c5570(_0x469b81)),p(0x3,_0x3c5570(_0x375bf6))],S);const z=_0x23fa6f(0x16c),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x82b03f,_0x4b6cee,_0x499727,_0x5f1d63)=>{for(var _0x1e114d=_0x5f1d63>0x1?void 0x0:_0x5f1d63?k(_0x4b6cee,_0x499727):_0x4b6cee,_0x3d66e0=_0x82b03f['length']-0x1,_0x467409;_0x3d66e0>=0x0;_0x3d66e0--)(_0x467409=_0x82b03f[_0x3d66e0])&&(_0x1e114d=_0x467409(_0x1e114d)||_0x1e114d);return _0x1e114d;},_=(_0x2ca03f,_0x153acf)=>(_0x988932,_0x25f323)=>_0x153acf(_0x988932,_0x25f323,_0x2ca03f);function X(_0x88b89b,_0x19ffdd){const _0x2ab970=_0x23fa6f,_0x7fee40=_0x88b89b[_0x2ab970(0x15a)][0x0];return{..._0x19ffdd,'id':_0x7fee40[_0x2ab970(0x194)],'resolved':_0x88b89b['solved']===0x1,'dT':D(_0x7fee40[_0x2ab970(0x13a)]),'personId':_0x7fee40[_0x2ab970(0x172)],'threadId':_0x7fee40[_0x2ab970(0x149)]};}function ee(_0x1f58a7,_0x149fdf,_0x153be4){const _0x24b445=_0x23fa6f;var _0x45511a,_0x445262;if(((_0x445262=(_0x45511a=_0x1f58a7==null?void 0x0:_0x1f58a7[_0x24b445(0x15a)])==null?void 0x0:_0x45511a[_0x24b445(0x182)])!=null?_0x445262:0x0)>0x0){const _0xca0303=(_0x48a89e,_0x2e9b24)=>({'id':_0x48a89e[_0x24b445(0x194)],'threadId':_0x48a89e[_0x24b445(0x149)],'dT':D(_0x48a89e['createTimestamp']),'personId':_0x48a89e['userId'],'resolved':_0x1f58a7[_0x24b445(0x15c)]===I[_0x24b445(0x137)],'unitId':_0x149fdf,'subUnitId':_0x153be4,'text':JSON[_0x24b445(0x17a)](_0x48a89e[_0x24b445(0x157)]),'parentId':_0x2e9b24}),_0x45d7e5=_0xca0303(_0x1f58a7[_0x24b445(0x15a)][0x0]);return{..._0x45d7e5,'children':_0x1f58a7[_0x24b445(0x15a)][_0x24b445(0x165)](0x1)[_0x24b445(0x141)](_0x3ded48=>_0xca0303(_0x3ded48,_0x45d7e5['id']))};}return null;}let f=class{constructor(_0x59501d,_0x3353d5,_0x31333c,_0x2b0455){const _0x176980=_0x23fa6f;this[_0x176980(0x16b)]=_0x59501d,this[_0x176980(0x139)]=_0x3353d5,this['_sessionService']=_0x31333c,this[_0x176980(0x140)]=_0x2b0455;}async['addComment'](_0x3369af){const _0x4dfc58=_0x23fa6f;var _0x1f7b0f,_0xdb71e2;const {parentId:_0x1f6c5d,unitId:_0x141d05,text:_0x14ea23,threadId:_0x4de648}=_0x3369af,_0xc577b4=(_0xdb71e2=(_0x1f7b0f=_0x14ea23['customRanges'])==null?void 0x0:_0x1f7b0f[_0x4dfc58(0x13c)](_0x682a48=>_0x682a48[_0x4dfc58(0x154)]===_0x445314[_0x4dfc58(0x15f)])[_0x4dfc58(0x141)](_0x43ddbc=>_0x43ddbc[_0x4dfc58(0x195)]))!=null?_0xdb71e2:[],_0x83fa7b=JSON[_0x4dfc58(0x192)](_0x14ea23),_0x492dcc=(await this[_0x4dfc58(0x186)][_0x4dfc58(0x18a)](_0x141d05))[_0x4dfc58(0x179)]();if(_0x1f6c5d){const _0x55cf12={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4,'threadId':_0x4de648},_0x569c35=(await this['_httpService'][_0x4dfc58(0x133)]('/universer-api/comment/unit/'+_0x141d05+_0x4dfc58(0x17c),{'body':_0x55cf12}))[_0x4dfc58(0x148)]['reply'];return{..._0x3369af,'id':_0x569c35['replyId'],'dT':_0x3a9660(+_0x569c35[_0x4dfc58(0x13a)])[_0x4dfc58(0x17f)](_0x4dfc58(0x15e)),'personId':_0x569c35[_0x4dfc58(0x172)]};}else{const _0x339d43={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4},_0x36639c=await this[_0x4dfc58(0x16b)]['post'](_0x4dfc58(0x146)+_0x141d05+_0x4dfc58(0x190),{'body':_0x339d43});return X(_0x36639c['body'][_0x4dfc58(0x136)],_0x3369af);}}async['updateComment'](_0x2272bb){const _0x4a829a=_0x23fa6f;var _0x4ed306,_0x33f969;const {text:_0x3bff7c,unitId:_0xaa685e}=_0x2272bb,_0x1ef3a8=(_0x33f969=(_0x4ed306=_0x3bff7c[_0x4a829a(0x16f)])==null?void 0x0:_0x4ed306[_0x4a829a(0x13c)](_0x505a42=>_0x505a42[_0x4a829a(0x154)]===_0x445314[_0x4a829a(0x15f)])[_0x4a829a(0x141)](_0xd5023c=>_0xd5023c[_0x4a829a(0x195)]))!=null?_0x33f969:[],_0x495eec=JSON[_0x4a829a(0x192)](_0x3bff7c),_0x396c5d=_0x2272bb[_0x4a829a(0x149)],_0x2dbfc2=_0x2272bb['id'],_0x42711a={'memberId':(await this[_0x4a829a(0x186)][_0x4a829a(0x18a)](_0xaa685e))[_0x4a829a(0x179)](),'unitId':_0xaa685e,'threadId':_0x396c5d,'mention':_0x1ef3a8,'content':_0x495eec,'replyId':_0x2dbfc2},_0x228803=await this[_0x4a829a(0x16b)]['post'](_0x4a829a(0x146)+_0xaa685e+_0x4a829a(0x153),{'body':_0x42711a});return!_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)]||_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)][_0x4a829a(0x187)]===0x1;}async[_0x23fa6f(0x150)](_0x3a102e){const _0x893dad=_0x23fa6f,{unitId:_0x1a4ee8}=_0x3a102e,_0x52948d=_0x3a102e[_0x893dad(0x149)],_0x315da6={'memberId':this[_0x893dad(0x139)][_0x893dad(0x168)]()[_0x893dad(0x184)],'unitId':_0x1a4ee8,'threadId':_0x52948d,'solved':_0x3a102e[_0x893dad(0x180)]?I['Solved']:I[_0x893dad(0x158)]},_0x5daa18=await this[_0x893dad(0x16b)][_0x893dad(0x133)](_0x893dad(0x146)+_0x1a4ee8+'/solved',{'body':_0x315da6});return!_0x5daa18[_0x893dad(0x148)][_0x893dad(0x13f)]||_0x5daa18['body'][_0x893dad(0x13f)]['code']===0x1;}async[_0x23fa6f(0x175)](_0x492fbe,_0x20aa2b,_0x47dc38,_0x43ed9a){const _0x338c77=_0x23fa6f,_0x37979b={'memberId':(await this[_0x338c77(0x186)][_0x338c77(0x18a)](_0x492fbe))[_0x338c77(0x179)](),'threadId':_0x47dc38,'replyId':_0x43ed9a,'unitId':_0x492fbe},_0x2a8e9b=await this[_0x338c77(0x16b)]['post'](_0x338c77(0x146)+_0x492fbe+_0x338c77(0x161),{'body':_0x37979b});return!_0x2a8e9b[_0x338c77(0x148)][_0x338c77(0x13f)]||_0x2a8e9b['body'][_0x338c77(0x13f)]['code']===0x1;}async[_0x23fa6f(0x160)](_0x45031e,_0x5a6ec3,_0x31447f){const _0x1baba2=_0x23fa6f,_0x14c29c={'unitId':_0x45031e,'threadId':_0x31447f},_0x49cb52=await this[_0x1baba2(0x16b)]['post'](_0x1baba2(0x146)+_0x45031e+_0x1baba2(0x189),{'body':_0x14c29c}),_0x2b2ae0=_0x31447f['map'](_0x43a8dc=>ee(_0x49cb52[_0x1baba2(0x148)]['comments'][_0x43a8dc],_0x45031e,_0x5a6ec3))['filter'](Boolean);return Object[_0x1baba2(0x18b)](_0x49cb52[_0x1baba2(0x148)]['users'])[_0x1baba2(0x193)](_0x446848=>{const _0x2db9d7=_0x1baba2;this[_0x2db9d7(0x139)][_0x2db9d7(0x138)](_0x446848);}),_0x2b2ae0;}[_0x23fa6f(0x16a)](_0x5b137d){const _0x42a704=_0x23fa6f;return{'id':_0x5b137d['id'],'threadId':_0x5b137d[_0x42a704(0x149)],'ref':_0x5b137d[_0x42a704(0x17e)]};}};f=Q([_(0x0,_0x3c5570(_0x46056e)),_(0x1,_0x3c5570(_0x469b81)),_(0x2,_0x3c5570(_0xea13e3)),_(0x3,_0x3c5570(_0x375bf6))],f);function _0x232d(){const _0x2cb19f=['UNRECOGNIZED','userId','81fieKZb','_config','deleteComment','_initDataSource','Solve','type','getMemberID','parse','Add','/reply','root','ref','format','resolved','_initUserSync','length','find','userID','1063266tWPabu','_sessionService','code','Unknown','/list','requireSession','values','users','_threadCommentModel','syncUpdateMutationToColla','207964FpCeoe','/add','getOwnPropertyDescriptor','stringify','forEach','replyId','rangeId','parentId','Edit','2124856atNMAs','post','commentUpdate$','subscribe','comment','Solved','addUser','_userService','createTimestamp','get','filter','Delete','payload','error','_injector','map','UNIVER_UNKNOWN','305756dYqwOB','personId','onStarting','/universer-api/comment/unit/','_configService','body','threadId','7WQHcox','disposeWithMe','defineProperty','_commentService','size','getComment','resolveComment','2131896lnGvoZ','unitId','/edit','rangeType','user','Reply','content','OpenOrReOpen','1998990evNXKx','replies','symbol','solved','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','COMMENT','listComments','/delete','addComment','updateComment','getUser','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','getCurrentUser','548920WTNLwF','saveCommentToSnapshot','_httpService','thread-comment-data-source.config','getUnit','delete','customRanges','add'];_0x232d=function(){return _0x2cb19f;};return _0x232d();}var re=Object['getOwnPropertyDescriptor'],te=(_0x4cdb3b,_0x5c6053,_0x306b0a,_0x11af14)=>{const _0xd59cd6=_0x23fa6f;for(var _0x4f0cb9=_0x11af14>0x1?void 0x0:_0x11af14?re(_0x5c6053,_0x306b0a):_0x5c6053,_0x27f433=_0x4cdb3b[_0xd59cd6(0x182)]-0x1,_0x228e1d;_0x27f433>=0x0;_0x27f433--)(_0x228e1d=_0x4cdb3b[_0x27f433])&&(_0x4f0cb9=_0x228e1d(_0x4f0cb9)||_0x4f0cb9);return _0x4f0cb9;},N=(_0x4b1047,_0x40107a)=>(_0x4df5fc,_0x3bbf7b)=>_0x40107a(_0x4df5fc,_0x3bbf7b,_0x4b1047);let g=class extends _0x34d19b{constructor(_0x3a2768,_0x29ad6b){const _0x159e26=_0x23fa6f;super(),this['_threadCommentDataSourceService']=_0x3a2768,this['_threadCommentDataSource']=_0x29ad6b,this[_0x159e26(0x176)]();}[_0x23fa6f(0x176)](){const _0x64a5cc=_0x23fa6f;this[_0x64a5cc(0x15d)]['dataSource']=this['_threadCommentDataSource'],this[_0x64a5cc(0x15d)][_0x64a5cc(0x18e)]=!0x1;}};function _0x50e2(_0x767746,_0x4ac769){const _0x232d80=_0x232d();return _0x50e2=function(_0x50e299,_0x5ddb01){_0x50e299=_0x50e299-0x131;let _0x470b70=_0x232d80[_0x50e299];return _0x470b70;},_0x50e2(_0x767746,_0x4ac769);}g=te([N(0x0,_0x2ecb1d),N(0x1,_0x3c5570(f))],g);var se=Object[_0x23fa6f(0x14c)],oe=Object[_0x23fa6f(0x191)],ne=(_0x467322,_0x45c742,_0x1aff4f)=>_0x45c742 in _0x467322?se(_0x467322,_0x45c742,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aff4f}):_0x467322[_0x45c742]=_0x1aff4f,ie=(_0x3fff74,_0x8420e7,_0x267e03,_0x3404c7)=>{const _0x199b92=_0x23fa6f;for(var _0x538b59=_0x3404c7>0x1?void 0x0:_0x3404c7?oe(_0x8420e7,_0x267e03):_0x8420e7,_0x23f855=_0x3fff74[_0x199b92(0x182)]-0x1,_0x2c5833;_0x23f855>=0x0;_0x23f855--)(_0x2c5833=_0x3fff74[_0x23f855])&&(_0x538b59=_0x2c5833(_0x538b59)||_0x538b59);return _0x538b59;},w=(_0x40970d,_0x4c0f04)=>(_0x30f643,_0x376f4d)=>_0x4c0f04(_0x30f643,_0x376f4d,_0x40970d),$=(_0x33098c,_0x2bf3a0,_0x1592f6)=>ne(_0x33098c,typeof _0x2bf3a0!=_0x23fa6f(0x15b)?_0x2bf3a0+'':_0x2bf3a0,_0x1592f6);let b=class extends _0x9156f8{constructor(_0x4d938c=M,_0x49d268,_0x4636dc){const _0x1bba38=_0x23fa6f;super(),this[_0x1bba38(0x174)]=_0x4d938c,this[_0x1bba38(0x140)]=_0x49d268,this[_0x1bba38(0x147)]=_0x4636dc;const {..._0x3cd3b9}=_0x110a0b({},M,this[_0x1bba38(0x174)]);this['_configService']['setConfig'](z,_0x3cd3b9);}[_0x23fa6f(0x145)](){const _0x50f6a0=_0x23fa6f;[[f],[g],[S]][_0x50f6a0(0x193)](_0x2ea6bc=>{const _0x4837c2=_0x50f6a0;this['_injector'][_0x4837c2(0x170)](_0x2ea6bc);});}['onReady'](){const _0x1fc511=_0x23fa6f;this[_0x1fc511(0x140)][_0x1fc511(0x13b)](g),this[_0x1fc511(0x140)][_0x1fc511(0x13b)](S);}};$(b,_0x23fa6f(0x167),W),$(b,_0x23fa6f(0x178),_0x43fc88[_0x23fa6f(0x142)]),b=ie([_0x1e041b(_0x4b0210,_0x3dcb68,_0x1dbdb7),w(0x1,_0x3c5570(_0x375bf6)),w(0x2,_0x1e8b56)],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 _0x23fa6f=_0x50e2;(function(_0x34d748,_0x3b8ba5){const _0x26f94b=_0x50e2,_0x16dbaf=_0x34d748();while(!![]){try{const _0x3c29d6=parseInt(_0x26f94b(0x143))/0x1+parseInt(_0x26f94b(0x18f))/0x2+-parseInt(_0x26f94b(0x151))/0x3+-parseInt(_0x26f94b(0x132))/0x4+parseInt(_0x26f94b(0x159))/0x5+-parseInt(_0x26f94b(0x185))/0x6*(-parseInt(_0x26f94b(0x14a))/0x7)+parseInt(_0x26f94b(0x169))/0x8*(parseInt(_0x26f94b(0x173))/0x9);if(_0x3c29d6===_0x3b8ba5)break;else _0x16dbaf['push'](_0x16dbaf['shift']());}catch(_0x4b36c2){_0x16dbaf['push'](_0x16dbaf['shift']());}}}(_0x232d,0x587c4));import{CommentService as _0x20a661,CollaborationSessionService as _0xea13e3,UniverCollaborationClientPlugin as _0x3dcb68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dbdb7}from'@univerjs-pro/license';import{dayjs as _0x3a9660,UserManagerService as _0x469b81,Inject as _0x3c5570,Injector as _0x375bf6,Disposable as _0x34d19b,CustomRangeType as _0x445314,UniverInstanceType as _0x43fc88,DependentOn as _0x1e041b,IConfigService as _0x1e8b56,Plugin as _0x9156f8,merge as _0x110a0b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b0210}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f0ff,IThreadCommentDataSourceService as _0x2ecb1d}from'@univerjs/thread-comment';import{bufferTime as _0x5b8e83}from'rxjs';import{HTTPService as _0x46056e}from'@univerjs/network';const W=_0x23fa6f(0x166);var I=(_0x48f0cc=>(_0x48f0cc[_0x48f0cc[_0x23fa6f(0x158)]=0x0]=_0x23fa6f(0x158),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x137)]=0x1]=_0x23fa6f(0x137),_0x48f0cc[_0x48f0cc[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x48f0cc))(I||{}),v=(_0x2822d8=>(_0x2822d8[_0x2822d8[_0x23fa6f(0x188)]=0x0]=_0x23fa6f(0x188),_0x2822d8[_0x2822d8['Add']=0x1]='Add',_0x2822d8[_0x2822d8[_0x23fa6f(0x156)]=0x2]='Reply',_0x2822d8[_0x2822d8['Edit']=0x3]='Edit',_0x2822d8[_0x2822d8[_0x23fa6f(0x13d)]=0x4]=_0x23fa6f(0x13d),_0x2822d8[_0x2822d8[_0x23fa6f(0x177)]=0x5]=_0x23fa6f(0x177),_0x2822d8[_0x2822d8[_0x23fa6f(0x171)]=-0x1]=_0x23fa6f(0x171),_0x2822d8))(v||{});const D=_0x57489c=>_0x3a9660(new Date(+_0x57489c))[_0x23fa6f(0x17f)](_0x23fa6f(0x15e)),B=async(_0x1dd44f,_0x40b698)=>{const _0x7afd01=_0x23fa6f,_0x238c72=_0x1dd44f[_0x7afd01(0x13b)](_0x469b81),_0x315977=_0x1dd44f['get'](_0x46056e);_0x40b698['forEach'](_0x53849b=>{const _0x57666f=_0x7afd01;_0x238c72[_0x57666f(0x164)](_0x53849b)&&_0x40b698[_0x57666f(0x16e)](_0x53849b);}),_0x40b698[_0x7afd01(0x14e)]&&(await _0x315977[_0x7afd01(0x13b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40b698]}}))['body'][_0x7afd01(0x18c)][_0x7afd01(0x193)](_0x2c6970=>{const _0x32f084=_0x7afd01;_0x2c6970&&_0x238c72[_0x32f084(0x138)](_0x2c6970);});};var K=Object[_0x23fa6f(0x191)],V=(_0x240725,_0x301fe1,_0x7f5cca,_0x6aa73)=>{for(var _0x230780=_0x6aa73>0x1?void 0x0:_0x6aa73?K(_0x301fe1,_0x7f5cca):_0x301fe1,_0x2a8a03=_0x240725['length']-0x1,_0x17b4a7;_0x2a8a03>=0x0;_0x2a8a03--)(_0x17b4a7=_0x240725[_0x2a8a03])&&(_0x230780=_0x17b4a7(_0x230780)||_0x230780);return _0x230780;},p=(_0x538cbd,_0x7bae1)=>(_0xa0f7c1,_0x563fe3)=>_0x7bae1(_0xa0f7c1,_0x563fe3,_0x538cbd);let S=class extends _0x34d19b{constructor(_0x6cc892,_0x16fee6,_0x4db590,_0x23de98){const _0x3ffb7d=_0x23fa6f;super(),this[_0x3ffb7d(0x14d)]=_0x6cc892,this['_threadCommentModel']=_0x16fee6,this['_userService']=_0x4db590,this['_injector']=_0x23de98,this['_init'](),this[_0x3ffb7d(0x181)]();}['_initUserSync'](){const _0x19eeb0=_0x23fa6f;this[_0x19eeb0(0x14b)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5b8e83(0x10))[_0x19eeb0(0x135)](_0x3b37b8=>{const _0x282ad1=_0x19eeb0,_0x582357=new Set();_0x3b37b8[_0x282ad1(0x193)](_0x514d50=>{const _0x328e3f=_0x282ad1;switch(_0x514d50[_0x328e3f(0x178)]){case _0x328e3f(0x170):{const _0x1e96c4=_0x514d50[_0x328e3f(0x13e)][_0x328e3f(0x144)];_0x582357['add'](_0x1e96c4);break;}}}),B(this[_0x282ad1(0x140)],_0x582357);}));}['_init'](){const _0x33ec78=_0x23fa6f;this[_0x33ec78(0x14b)](this['_commentService'][_0x33ec78(0x134)][_0x33ec78(0x135)](async _0x2ef939=>{const _0xcfd235=_0x33ec78;var _0x52fc42,_0x55b9ab,_0x18afa9,_0x2f5a17;const _0x58bbe5=(_0x52fc42=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939['unitId'])[_0xcfd235(0x183)](_0x31f112=>_0x31f112[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x52fc42[_0xcfd235(0x17d)];if(!_0x58bbe5)return;const {unitId:_0x468376,subUnitId:_0x48c59b}=_0x58bbe5;switch(_0x2ef939[_0xcfd235(0x155)]&&this['_userService'][_0xcfd235(0x138)](_0x2ef939[_0xcfd235(0x155)]),_0x2ef939[_0xcfd235(0x178)]){case v[_0xcfd235(0x17b)]:break;case v['Reply']:{this[_0xcfd235(0x18d)][_0xcfd235(0x162)](_0x468376,_0x48c59b,{'unitId':_0x468376,'subUnitId':_0x48c59b,'ref':'','id':_0x2ef939[_0xcfd235(0x194)],'dT':D(+_0x2ef939[_0xcfd235(0x13a)]),'threadId':_0x2ef939['threadId'],'personId':(_0x18afa9=(_0x55b9ab=_0x2ef939[_0xcfd235(0x155)])==null?void 0x0:_0x55b9ab[_0xcfd235(0x184)])!=null?_0x18afa9:_0x2ef939[_0xcfd235(0x172)],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)]),'parentId':_0x58bbe5['id']});break;}case v['Delete']:{const _0x49e090=this['_threadCommentModel'][_0xcfd235(0x14f)](_0x468376,_0x48c59b,_0x2ef939[_0xcfd235(0x194)]);_0x49e090&&_0x49e090[_0xcfd235(0x196)]&&this[_0xcfd235(0x18d)][_0xcfd235(0x175)](_0x468376,_0x48c59b,_0x2ef939['replyId']);break;}case v[_0xcfd235(0x131)]:{this[_0xcfd235(0x18d)][_0xcfd235(0x163)](_0x468376,_0x48c59b,{'commentId':_0x2ef939['replyId'],'text':JSON[_0xcfd235(0x17a)](_0x2ef939[_0xcfd235(0x157)])});break;}case v['Solve']:{const _0x9465d2=(_0x2f5a17=this[_0xcfd235(0x18d)][_0xcfd235(0x16d)](_0x2ef939[_0xcfd235(0x152)])[_0xcfd235(0x183)](_0x55bd72=>_0x55bd72[_0xcfd235(0x149)]===_0x2ef939[_0xcfd235(0x149)]))==null?void 0x0:_0x2f5a17[_0xcfd235(0x17d)];_0x9465d2&&this['_threadCommentModel'][_0xcfd235(0x150)](_0x468376,_0x48c59b,_0x9465d2['id'],_0x2ef939['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c5570(_0x20a661)),p(0x1,_0x3c5570(_0x5f0ff)),p(0x2,_0x3c5570(_0x469b81)),p(0x3,_0x3c5570(_0x375bf6))],S);const z=_0x23fa6f(0x16c),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x82b03f,_0x4b6cee,_0x499727,_0x5f1d63)=>{for(var _0x1e114d=_0x5f1d63>0x1?void 0x0:_0x5f1d63?k(_0x4b6cee,_0x499727):_0x4b6cee,_0x3d66e0=_0x82b03f['length']-0x1,_0x467409;_0x3d66e0>=0x0;_0x3d66e0--)(_0x467409=_0x82b03f[_0x3d66e0])&&(_0x1e114d=_0x467409(_0x1e114d)||_0x1e114d);return _0x1e114d;},_=(_0x2ca03f,_0x153acf)=>(_0x988932,_0x25f323)=>_0x153acf(_0x988932,_0x25f323,_0x2ca03f);function X(_0x88b89b,_0x19ffdd){const _0x2ab970=_0x23fa6f,_0x7fee40=_0x88b89b[_0x2ab970(0x15a)][0x0];return{..._0x19ffdd,'id':_0x7fee40[_0x2ab970(0x194)],'resolved':_0x88b89b['solved']===0x1,'dT':D(_0x7fee40[_0x2ab970(0x13a)]),'personId':_0x7fee40[_0x2ab970(0x172)],'threadId':_0x7fee40[_0x2ab970(0x149)]};}function ee(_0x1f58a7,_0x149fdf,_0x153be4){const _0x24b445=_0x23fa6f;var _0x45511a,_0x445262;if(((_0x445262=(_0x45511a=_0x1f58a7==null?void 0x0:_0x1f58a7[_0x24b445(0x15a)])==null?void 0x0:_0x45511a[_0x24b445(0x182)])!=null?_0x445262:0x0)>0x0){const _0xca0303=(_0x48a89e,_0x2e9b24)=>({'id':_0x48a89e[_0x24b445(0x194)],'threadId':_0x48a89e[_0x24b445(0x149)],'dT':D(_0x48a89e['createTimestamp']),'personId':_0x48a89e['userId'],'resolved':_0x1f58a7[_0x24b445(0x15c)]===I[_0x24b445(0x137)],'unitId':_0x149fdf,'subUnitId':_0x153be4,'text':JSON[_0x24b445(0x17a)](_0x48a89e[_0x24b445(0x157)]),'parentId':_0x2e9b24}),_0x45d7e5=_0xca0303(_0x1f58a7[_0x24b445(0x15a)][0x0]);return{..._0x45d7e5,'children':_0x1f58a7[_0x24b445(0x15a)][_0x24b445(0x165)](0x1)[_0x24b445(0x141)](_0x3ded48=>_0xca0303(_0x3ded48,_0x45d7e5['id']))};}return null;}let f=class{constructor(_0x59501d,_0x3353d5,_0x31333c,_0x2b0455){const _0x176980=_0x23fa6f;this[_0x176980(0x16b)]=_0x59501d,this[_0x176980(0x139)]=_0x3353d5,this['_sessionService']=_0x31333c,this[_0x176980(0x140)]=_0x2b0455;}async['addComment'](_0x3369af){const _0x4dfc58=_0x23fa6f;var _0x1f7b0f,_0xdb71e2;const {parentId:_0x1f6c5d,unitId:_0x141d05,text:_0x14ea23,threadId:_0x4de648}=_0x3369af,_0xc577b4=(_0xdb71e2=(_0x1f7b0f=_0x14ea23['customRanges'])==null?void 0x0:_0x1f7b0f[_0x4dfc58(0x13c)](_0x682a48=>_0x682a48[_0x4dfc58(0x154)]===_0x445314[_0x4dfc58(0x15f)])[_0x4dfc58(0x141)](_0x43ddbc=>_0x43ddbc[_0x4dfc58(0x195)]))!=null?_0xdb71e2:[],_0x83fa7b=JSON[_0x4dfc58(0x192)](_0x14ea23),_0x492dcc=(await this[_0x4dfc58(0x186)][_0x4dfc58(0x18a)](_0x141d05))[_0x4dfc58(0x179)]();if(_0x1f6c5d){const _0x55cf12={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4,'threadId':_0x4de648},_0x569c35=(await this['_httpService'][_0x4dfc58(0x133)]('/universer-api/comment/unit/'+_0x141d05+_0x4dfc58(0x17c),{'body':_0x55cf12}))[_0x4dfc58(0x148)]['reply'];return{..._0x3369af,'id':_0x569c35['replyId'],'dT':_0x3a9660(+_0x569c35[_0x4dfc58(0x13a)])[_0x4dfc58(0x17f)](_0x4dfc58(0x15e)),'personId':_0x569c35[_0x4dfc58(0x172)]};}else{const _0x339d43={'memberId':_0x492dcc,'unitId':_0x141d05,'content':_0x83fa7b,'mention':_0xc577b4},_0x36639c=await this[_0x4dfc58(0x16b)]['post'](_0x4dfc58(0x146)+_0x141d05+_0x4dfc58(0x190),{'body':_0x339d43});return X(_0x36639c['body'][_0x4dfc58(0x136)],_0x3369af);}}async['updateComment'](_0x2272bb){const _0x4a829a=_0x23fa6f;var _0x4ed306,_0x33f969;const {text:_0x3bff7c,unitId:_0xaa685e}=_0x2272bb,_0x1ef3a8=(_0x33f969=(_0x4ed306=_0x3bff7c[_0x4a829a(0x16f)])==null?void 0x0:_0x4ed306[_0x4a829a(0x13c)](_0x505a42=>_0x505a42[_0x4a829a(0x154)]===_0x445314[_0x4a829a(0x15f)])[_0x4a829a(0x141)](_0xd5023c=>_0xd5023c[_0x4a829a(0x195)]))!=null?_0x33f969:[],_0x495eec=JSON[_0x4a829a(0x192)](_0x3bff7c),_0x396c5d=_0x2272bb[_0x4a829a(0x149)],_0x2dbfc2=_0x2272bb['id'],_0x42711a={'memberId':(await this[_0x4a829a(0x186)][_0x4a829a(0x18a)](_0xaa685e))[_0x4a829a(0x179)](),'unitId':_0xaa685e,'threadId':_0x396c5d,'mention':_0x1ef3a8,'content':_0x495eec,'replyId':_0x2dbfc2},_0x228803=await this[_0x4a829a(0x16b)]['post'](_0x4a829a(0x146)+_0xaa685e+_0x4a829a(0x153),{'body':_0x42711a});return!_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)]||_0x228803[_0x4a829a(0x148)][_0x4a829a(0x13f)][_0x4a829a(0x187)]===0x1;}async[_0x23fa6f(0x150)](_0x3a102e){const _0x893dad=_0x23fa6f,{unitId:_0x1a4ee8}=_0x3a102e,_0x52948d=_0x3a102e[_0x893dad(0x149)],_0x315da6={'memberId':this[_0x893dad(0x139)][_0x893dad(0x168)]()[_0x893dad(0x184)],'unitId':_0x1a4ee8,'threadId':_0x52948d,'solved':_0x3a102e[_0x893dad(0x180)]?I['Solved']:I[_0x893dad(0x158)]},_0x5daa18=await this[_0x893dad(0x16b)][_0x893dad(0x133)](_0x893dad(0x146)+_0x1a4ee8+'/solved',{'body':_0x315da6});return!_0x5daa18[_0x893dad(0x148)][_0x893dad(0x13f)]||_0x5daa18['body'][_0x893dad(0x13f)]['code']===0x1;}async[_0x23fa6f(0x175)](_0x492fbe,_0x20aa2b,_0x47dc38,_0x43ed9a){const _0x338c77=_0x23fa6f,_0x37979b={'memberId':(await this[_0x338c77(0x186)][_0x338c77(0x18a)](_0x492fbe))[_0x338c77(0x179)](),'threadId':_0x47dc38,'replyId':_0x43ed9a,'unitId':_0x492fbe},_0x2a8e9b=await this[_0x338c77(0x16b)]['post'](_0x338c77(0x146)+_0x492fbe+_0x338c77(0x161),{'body':_0x37979b});return!_0x2a8e9b[_0x338c77(0x148)][_0x338c77(0x13f)]||_0x2a8e9b['body'][_0x338c77(0x13f)]['code']===0x1;}async[_0x23fa6f(0x160)](_0x45031e,_0x5a6ec3,_0x31447f){const _0x1baba2=_0x23fa6f,_0x14c29c={'unitId':_0x45031e,'threadId':_0x31447f},_0x49cb52=await this[_0x1baba2(0x16b)]['post'](_0x1baba2(0x146)+_0x45031e+_0x1baba2(0x189),{'body':_0x14c29c}),_0x2b2ae0=_0x31447f['map'](_0x43a8dc=>ee(_0x49cb52[_0x1baba2(0x148)]['comments'][_0x43a8dc],_0x45031e,_0x5a6ec3))['filter'](Boolean);return Object[_0x1baba2(0x18b)](_0x49cb52[_0x1baba2(0x148)]['users'])[_0x1baba2(0x193)](_0x446848=>{const _0x2db9d7=_0x1baba2;this[_0x2db9d7(0x139)][_0x2db9d7(0x138)](_0x446848);}),_0x2b2ae0;}[_0x23fa6f(0x16a)](_0x5b137d){const _0x42a704=_0x23fa6f;return{'id':_0x5b137d['id'],'threadId':_0x5b137d[_0x42a704(0x149)],'ref':_0x5b137d[_0x42a704(0x17e)]};}};f=Q([_(0x0,_0x3c5570(_0x46056e)),_(0x1,_0x3c5570(_0x469b81)),_(0x2,_0x3c5570(_0xea13e3)),_(0x3,_0x3c5570(_0x375bf6))],f);function _0x232d(){const _0x2cb19f=['UNRECOGNIZED','userId','81fieKZb','_config','deleteComment','_initDataSource','Solve','type','getMemberID','parse','Add','/reply','root','ref','format','resolved','_initUserSync','length','find','userID','1063266tWPabu','_sessionService','code','Unknown','/list','requireSession','values','users','_threadCommentModel','syncUpdateMutationToColla','207964FpCeoe','/add','getOwnPropertyDescriptor','stringify','forEach','replyId','rangeId','parentId','Edit','2124856atNMAs','post','commentUpdate$','subscribe','comment','Solved','addUser','_userService','createTimestamp','get','filter','Delete','payload','error','_injector','map','UNIVER_UNKNOWN','305756dYqwOB','personId','onStarting','/universer-api/comment/unit/','_configService','body','threadId','7WQHcox','disposeWithMe','defineProperty','_commentService','size','getComment','resolveComment','2131896lnGvoZ','unitId','/edit','rangeType','user','Reply','content','OpenOrReOpen','1998990evNXKx','replies','symbol','solved','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','COMMENT','listComments','/delete','addComment','updateComment','getUser','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','getCurrentUser','548920WTNLwF','saveCommentToSnapshot','_httpService','thread-comment-data-source.config','getUnit','delete','customRanges','add'];_0x232d=function(){return _0x2cb19f;};return _0x232d();}var re=Object['getOwnPropertyDescriptor'],te=(_0x4cdb3b,_0x5c6053,_0x306b0a,_0x11af14)=>{const _0xd59cd6=_0x23fa6f;for(var _0x4f0cb9=_0x11af14>0x1?void 0x0:_0x11af14?re(_0x5c6053,_0x306b0a):_0x5c6053,_0x27f433=_0x4cdb3b[_0xd59cd6(0x182)]-0x1,_0x228e1d;_0x27f433>=0x0;_0x27f433--)(_0x228e1d=_0x4cdb3b[_0x27f433])&&(_0x4f0cb9=_0x228e1d(_0x4f0cb9)||_0x4f0cb9);return _0x4f0cb9;},N=(_0x4b1047,_0x40107a)=>(_0x4df5fc,_0x3bbf7b)=>_0x40107a(_0x4df5fc,_0x3bbf7b,_0x4b1047);let g=class extends _0x34d19b{constructor(_0x3a2768,_0x29ad6b){const _0x159e26=_0x23fa6f;super(),this['_threadCommentDataSourceService']=_0x3a2768,this['_threadCommentDataSource']=_0x29ad6b,this[_0x159e26(0x176)]();}[_0x23fa6f(0x176)](){const _0x64a5cc=_0x23fa6f;this[_0x64a5cc(0x15d)]['dataSource']=this['_threadCommentDataSource'],this[_0x64a5cc(0x15d)][_0x64a5cc(0x18e)]=!0x1;}};function _0x50e2(_0x767746,_0x4ac769){const _0x232d80=_0x232d();return _0x50e2=function(_0x50e299,_0x5ddb01){_0x50e299=_0x50e299-0x131;let _0x470b70=_0x232d80[_0x50e299];return _0x470b70;},_0x50e2(_0x767746,_0x4ac769);}g=te([N(0x0,_0x2ecb1d),N(0x1,_0x3c5570(f))],g);var se=Object[_0x23fa6f(0x14c)],oe=Object[_0x23fa6f(0x191)],ne=(_0x467322,_0x45c742,_0x1aff4f)=>_0x45c742 in _0x467322?se(_0x467322,_0x45c742,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1aff4f}):_0x467322[_0x45c742]=_0x1aff4f,ie=(_0x3fff74,_0x8420e7,_0x267e03,_0x3404c7)=>{const _0x199b92=_0x23fa6f;for(var _0x538b59=_0x3404c7>0x1?void 0x0:_0x3404c7?oe(_0x8420e7,_0x267e03):_0x8420e7,_0x23f855=_0x3fff74[_0x199b92(0x182)]-0x1,_0x2c5833;_0x23f855>=0x0;_0x23f855--)(_0x2c5833=_0x3fff74[_0x23f855])&&(_0x538b59=_0x2c5833(_0x538b59)||_0x538b59);return _0x538b59;},w=(_0x40970d,_0x4c0f04)=>(_0x30f643,_0x376f4d)=>_0x4c0f04(_0x30f643,_0x376f4d,_0x40970d),$=(_0x33098c,_0x2bf3a0,_0x1592f6)=>ne(_0x33098c,typeof _0x2bf3a0!=_0x23fa6f(0x15b)?_0x2bf3a0+'':_0x2bf3a0,_0x1592f6);let b=class extends _0x9156f8{constructor(_0x4d938c=M,_0x49d268,_0x4636dc){const _0x1bba38=_0x23fa6f;super(),this[_0x1bba38(0x174)]=_0x4d938c,this[_0x1bba38(0x140)]=_0x49d268,this[_0x1bba38(0x147)]=_0x4636dc;const {..._0x3cd3b9}=_0x110a0b({},M,this[_0x1bba38(0x174)]);this['_configService']['setConfig'](z,_0x3cd3b9);}[_0x23fa6f(0x145)](){const _0x50f6a0=_0x23fa6f;[[f],[g],[S]][_0x50f6a0(0x193)](_0x2ea6bc=>{const _0x4837c2=_0x50f6a0;this['_injector'][_0x4837c2(0x170)](_0x2ea6bc);});}['onReady'](){const _0x1fc511=_0x23fa6f;this[_0x1fc511(0x140)][_0x1fc511(0x13b)](g),this[_0x1fc511(0x140)][_0x1fc511(0x13b)](S);}};$(b,_0x23fa6f(0x167),W),$(b,_0x23fa6f(0x178),_0x43fc88[_0x23fa6f(0x142)]),b=ie([_0x1e041b(_0x4b0210,_0x3dcb68,_0x1dbdb7),w(0x1,_0x3c5570(_0x375bf6)),w(0x2,_0x1e8b56)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
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 _0x484d(_0x31ae11,_0x3f40f5){const _0x2515c7=_0x2515();return _0x484d=function(_0x484db5,_0x3a9436){_0x484db5=_0x484db5-0x179;let _0x2920e0=_0x2515c7[_0x484db5];return _0x2920e0;},_0x484d(_0x31ae11,_0x3f40f5);}function _0x2515(){const _0x16ad8d=['@univerjs-pro/collaboration-client','thread-comment-data-source.config','getComment','@univerjs/core','UniverInstanceType','UserManagerService','619027bbgRGd','UniverThreadCommentDataSourcePlugin','addUser','UniverProCollaborationClient','createTimestamp','function','Add','customRanges','_config','amd','UniverCollaborationClientPlugin','16730YFGOaw','length','getMemberID','2134689PIeWeo','_injector','rangeId','disposeWithMe','forEach','size','_initUserSync','userId','getOwnPropertyDescriptor','UniverCore','commentUpdate$','5093890PsiodC','comments','onStarting','dataSource','UniverProLicense','/edit','Reply','error','@univerjs-pro/license','replies','add','_commentService','rangeType','4hVBuRA','@univerjs/thread-comment-ui','_threadCommentModel','map','OpenOrReOpen','solved','format','UniverThreadCommentUi','10vzcgqS','payload','_threadCommentDataSourceService','root','/list','get','personId','IThreadCommentDataSourceService','addComment','exports','body','post','UNRECOGNIZED','resolveComment','UniverProThreadCommentDatasource','/solved','Edit','getUser','CollaborationSessionService','setConfig','Module','listComments','@univerjs/thread-comment','_configService','getCurrentUser','comment','user','delete','8840227McgQPG','pluginName','dayjs','find','CommentService','defineProperty','_httpService','merge','subscribe','/delete','4wBcLrT','Disposable','Solved','UniverThreadComment','_initDataSource','3787312BJHNXp','slice','updateComment','unitId','_sessionService','YYYY/MM/DD\x20HH:mm','userID','Solve','resolved','CustomRangeType','_threadCommentDataSource','@univerjs/network','parse','_init','Delete','syncUpdateMutationToColla','/universer-api/comment/unit/','requireSession','UNIVER_UNKNOWN','Injector','Plugin','stringify','type','threadId','COMMENT','reply','1398hjoqal','users','Inject','content','object','code','_userService','saveCommentToSnapshot','replyId','getUnit','18CtZiQI','HTTPService','pipe','toStringTag','Unknown','3448464zNrjNd','filter'];_0x2515=function(){return _0x16ad8d;};return _0x2515();}(function(_0x19045f,_0x98417a){const _0x4259e9=_0x484d,_0x40e4f1=_0x19045f();while(!![]){try{const _0x204bd8=-parseInt(_0x4259e9(0x17d))/0x1+parseInt(_0x4259e9(0x1d1))/0x2*(parseInt(_0x4259e9(0x18b))/0x3)+-parseInt(_0x4259e9(0x1a3))/0x4*(parseInt(_0x4259e9(0x196))/0x5)+parseInt(_0x4259e9(0x1f0))/0x6*(parseInt(_0x4259e9(0x188))/0x7)+parseInt(_0x4259e9(0x1d6))/0x8*(parseInt(_0x4259e9(0x1fa))/0x9)+parseInt(_0x4259e9(0x1ab))/0xa*(-parseInt(_0x4259e9(0x1c7))/0xb)+parseInt(_0x4259e9(0x1ff))/0xc;if(_0x204bd8===_0x98417a)break;else _0x40e4f1['push'](_0x40e4f1['shift']());}catch(_0x3866fa){_0x40e4f1['push'](_0x40e4f1['shift']());}}}(_0x2515,0xbca7e),function(_0x40c7e1,_0x555120){const _0x3bb550=_0x484d;typeof exports==_0x3bb550(0x1f4)&&typeof module<'u'?_0x555120(exports,require(_0x3bb550(0x201)),require('@univerjs-pro/license'),require(_0x3bb550(0x17a)),require(_0x3bb550(0x1a4)),require(_0x3bb550(0x1c1)),require('rxjs'),require(_0x3bb550(0x1e1))):typeof define==_0x3bb550(0x182)&&define[_0x3bb550(0x186)]?define([_0x3bb550(0x1b4),_0x3bb550(0x201),_0x3bb550(0x19e),_0x3bb550(0x17a),_0x3bb550(0x1a4),_0x3bb550(0x1c1),'rxjs','@univerjs/network'],_0x555120):(_0x40c7e1=typeof globalThis<'u'?globalThis:_0x40c7e1||self,_0x555120(_0x40c7e1[_0x3bb550(0x1b9)]={},_0x40c7e1[_0x3bb550(0x180)],_0x40c7e1[_0x3bb550(0x19a)],_0x40c7e1[_0x3bb550(0x194)],_0x40c7e1[_0x3bb550(0x1aa)],_0x40c7e1[_0x3bb550(0x1d4)],_0x40c7e1['rxjs'],_0x40c7e1['UniverNetwork']));}(this,function(_0x3fdf36,_0x1bf240,_0x10c06b,_0x34b4ef,_0x54799e,_0x2920d2,_0x3a6403,_0x422bd1){'use strict';const _0x484063=_0x484d;const _0x163e9e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4c4f19=(_0x50523f=>(_0x50523f[_0x50523f['OpenOrReOpen']=0x0]=_0x484063(0x1a7),_0x50523f[_0x50523f[_0x484063(0x1d3)]=0x1]='Solved',_0x50523f[_0x50523f[_0x484063(0x1b7)]=-0x1]=_0x484063(0x1b7),_0x50523f))(_0x4c4f19||{}),_0x150b2e=(_0x33b155=>(_0x33b155[_0x33b155[_0x484063(0x1fe)]=0x0]='Unknown',_0x33b155[_0x33b155['Add']=0x1]=_0x484063(0x183),_0x33b155[_0x33b155['Reply']=0x2]='Reply',_0x33b155[_0x33b155[_0x484063(0x1bb)]=0x3]='Edit',_0x33b155[_0x33b155['Delete']=0x4]='Delete',_0x33b155[_0x33b155[_0x484063(0x1dd)]=0x5]=_0x484063(0x1dd),_0x33b155[_0x33b155['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x33b155))(_0x150b2e||{});const _0x13a113=_0x467e19=>_0x34b4ef[_0x484063(0x1c9)](new Date(+_0x467e19))[_0x484063(0x1a9)](_0x484063(0x1db)),_0x45285c=async(_0x587df8,_0x2ee803)=>{const _0x9b42e1=_0x484063,_0x23dce7=_0x587df8['get'](_0x34b4ef['UserManagerService']),_0xc81ee3=_0x587df8[_0x9b42e1(0x1b0)](_0x422bd1['HTTPService']);_0x2ee803[_0x9b42e1(0x18f)](_0xfe9869=>{const _0x535196=_0x9b42e1;_0x23dce7[_0x535196(0x1bc)](_0xfe9869)&&_0x2ee803[_0x535196(0x1c6)](_0xfe9869);}),_0x2ee803[_0x9b42e1(0x190)]&&(await _0xc81ee3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ee803]}}))[_0x9b42e1(0x1b5)][_0x9b42e1(0x1f1)][_0x9b42e1(0x18f)](_0x193c35=>{const _0x1319ec=_0x9b42e1;_0x193c35&&_0x23dce7[_0x1319ec(0x17f)](_0x193c35);});};var _0x2a5fba=Object[_0x484063(0x193)],_0x5f1d92=(_0x3d6629,_0x65c04a,_0x5a7bf5,_0x4e2486)=>{const _0x2dfb84=_0x484063;for(var _0x23990d=_0x4e2486>0x1?void 0x0:_0x4e2486?_0x2a5fba(_0x65c04a,_0x5a7bf5):_0x65c04a,_0xbc36e3=_0x3d6629[_0x2dfb84(0x189)]-0x1,_0x5f27d8;_0xbc36e3>=0x0;_0xbc36e3--)(_0x5f27d8=_0x3d6629[_0xbc36e3])&&(_0x23990d=_0x5f27d8(_0x23990d)||_0x23990d);return _0x23990d;},_0x415f6f=(_0x279836,_0x11337a)=>(_0x25b53d,_0x91a6c1)=>_0x11337a(_0x25b53d,_0x91a6c1,_0x279836);let _0x4fffe9=class extends _0x34b4ef['Disposable']{constructor(_0x275dd7,_0x3a78a5,_0x4e34a0,_0x2cc8fd){const _0x28cf6d=_0x484063;super(),this[_0x28cf6d(0x1a1)]=_0x275dd7,this['_threadCommentModel']=_0x3a78a5,this[_0x28cf6d(0x1f6)]=_0x4e34a0,this['_injector']=_0x2cc8fd,this[_0x28cf6d(0x1e3)](),this[_0x28cf6d(0x191)]();}['_initUserSync'](){const _0x1ca266=_0x484063;this[_0x1ca266(0x18e)](this[_0x1ca266(0x1a5)][_0x1ca266(0x195)][_0x1ca266(0x1fc)](_0x3a6403['bufferTime'](0x10))[_0x1ca266(0x1cf)](_0x8a30ab=>{const _0x19da2c=_0x1ca266,_0x100427=new Set();_0x8a30ab[_0x19da2c(0x18f)](_0x567032=>{const _0x884667=_0x19da2c;switch(_0x567032[_0x884667(0x1ec)]){case _0x884667(0x1a0):{const _0x4fe343=_0x567032[_0x884667(0x1ac)][_0x884667(0x1b1)];_0x100427[_0x884667(0x1a0)](_0x4fe343);break;}}}),_0x45285c(this['_injector'],_0x100427);}));}[_0x484063(0x1e3)](){const _0x53a94a=_0x484063;this[_0x53a94a(0x18e)](this[_0x53a94a(0x1a1)]['commentUpdate$'][_0x53a94a(0x1cf)](async _0x546594=>{const _0x532c54=_0x53a94a;var _0x28c71a,_0x14b135,_0x5e4969,_0x3fbd9a;const _0x5a949c=(_0x28c71a=this[_0x532c54(0x1a5)][_0x532c54(0x1f9)](_0x546594['unitId'])[_0x532c54(0x1ca)](_0x2f757d=>_0x2f757d['threadId']===_0x546594['threadId']))==null?void 0x0:_0x28c71a[_0x532c54(0x1ae)];if(!_0x5a949c)return;const {unitId:_0x239278,subUnitId:_0x3368fd}=_0x5a949c;switch(_0x546594['user']&&this[_0x532c54(0x1f6)][_0x532c54(0x17f)](_0x546594[_0x532c54(0x1c5)]),_0x546594[_0x532c54(0x1ec)]){case _0x150b2e[_0x532c54(0x183)]:break;case _0x150b2e[_0x532c54(0x19c)]:{this[_0x532c54(0x1a5)][_0x532c54(0x1b3)](_0x239278,_0x3368fd,{'unitId':_0x239278,'subUnitId':_0x3368fd,'ref':'','id':_0x546594[_0x532c54(0x1f8)],'dT':_0x13a113(+_0x546594['createTimestamp']),'threadId':_0x546594['threadId'],'personId':(_0x5e4969=(_0x14b135=_0x546594[_0x532c54(0x1c5)])==null?void 0x0:_0x14b135[_0x532c54(0x1dc)])!=null?_0x5e4969:_0x546594[_0x532c54(0x192)],'text':JSON[_0x532c54(0x1e2)](_0x546594[_0x532c54(0x1f3)]),'parentId':_0x5a949c['id']});break;}case _0x150b2e[_0x532c54(0x1e4)]:{const _0x264636=this[_0x532c54(0x1a5)][_0x532c54(0x179)](_0x239278,_0x3368fd,_0x546594[_0x532c54(0x1f8)]);_0x264636&&_0x264636['parentId']&&this[_0x532c54(0x1a5)]['deleteComment'](_0x239278,_0x3368fd,_0x546594[_0x532c54(0x1f8)]);break;}case _0x150b2e[_0x532c54(0x1bb)]:{this[_0x532c54(0x1a5)][_0x532c54(0x1d8)](_0x239278,_0x3368fd,{'commentId':_0x546594['replyId'],'text':JSON['parse'](_0x546594[_0x532c54(0x1f3)])});break;}case _0x150b2e['Solve']:{const _0x5d830f=(_0x3fbd9a=this[_0x532c54(0x1a5)][_0x532c54(0x1f9)](_0x546594[_0x532c54(0x1d9)])[_0x532c54(0x1ca)](_0x58d7d6=>_0x58d7d6[_0x532c54(0x1ed)]===_0x546594['threadId']))==null?void 0x0:_0x3fbd9a['root'];_0x5d830f&&this[_0x532c54(0x1a5)][_0x532c54(0x1b8)](_0x239278,_0x3368fd,_0x5d830f['id'],_0x546594[_0x532c54(0x1a8)]===_0x4c4f19[_0x532c54(0x1d3)]);break;}}}));}};_0x4fffe9=_0x5f1d92([_0x415f6f(0x0,_0x34b4ef[_0x484063(0x1f2)](_0x1bf240[_0x484063(0x1cb)])),_0x415f6f(0x1,_0x34b4ef[_0x484063(0x1f2)](_0x2920d2['ThreadCommentModel'])),_0x415f6f(0x2,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x17c)])),_0x415f6f(0x3,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x1e9)]))],_0x4fffe9);const _0xbc477f=_0x484063(0x202),_0x1286f6={};var _0x229259=Object[_0x484063(0x193)],_0x5e2b04=(_0x50ea21,_0x5a57e9,_0x1607b4,_0x4b98f1)=>{for(var _0x4126e6=_0x4b98f1>0x1?void 0x0:_0x4b98f1?_0x229259(_0x5a57e9,_0x1607b4):_0x5a57e9,_0x5ce110=_0x50ea21['length']-0x1,_0x5316d3;_0x5ce110>=0x0;_0x5ce110--)(_0x5316d3=_0x50ea21[_0x5ce110])&&(_0x4126e6=_0x5316d3(_0x4126e6)||_0x4126e6);return _0x4126e6;},_0x27daaf=(_0x419c69,_0x46e1be)=>(_0x5d08b2,_0x38e5e0)=>_0x46e1be(_0x5d08b2,_0x38e5e0,_0x419c69);function _0x9cd3d5(_0x1bab5a,_0x4fbd83){const _0x228d76=_0x484063,_0x10a0db=_0x1bab5a[_0x228d76(0x19f)][0x0];return{..._0x4fbd83,'id':_0x10a0db[_0x228d76(0x1f8)],'resolved':_0x1bab5a[_0x228d76(0x1a8)]===0x1,'dT':_0x13a113(_0x10a0db[_0x228d76(0x181)]),'personId':_0x10a0db[_0x228d76(0x192)],'threadId':_0x10a0db[_0x228d76(0x1ed)]};}function _0x5ea313(_0x4c87fa,_0x294f25,_0x1bb164){const _0x455e8c=_0x484063;var _0x3ea11a,_0x1442ba;if(((_0x1442ba=(_0x3ea11a=_0x4c87fa==null?void 0x0:_0x4c87fa['replies'])==null?void 0x0:_0x3ea11a[_0x455e8c(0x189)])!=null?_0x1442ba:0x0)>0x0){const _0x53143c=(_0x255a87,_0x43ee0f)=>({'id':_0x255a87[_0x455e8c(0x1f8)],'threadId':_0x255a87[_0x455e8c(0x1ed)],'dT':_0x13a113(_0x255a87['createTimestamp']),'personId':_0x255a87[_0x455e8c(0x192)],'resolved':_0x4c87fa[_0x455e8c(0x1a8)]===_0x4c4f19[_0x455e8c(0x1d3)],'unitId':_0x294f25,'subUnitId':_0x1bb164,'text':JSON['parse'](_0x255a87[_0x455e8c(0x1f3)]),'parentId':_0x43ee0f}),_0x50a8ad=_0x53143c(_0x4c87fa['replies'][0x0]);return{..._0x50a8ad,'children':_0x4c87fa[_0x455e8c(0x19f)][_0x455e8c(0x1d7)](0x1)['map'](_0x536bd0=>_0x53143c(_0x536bd0,_0x50a8ad['id']))};}return null;}let _0x335a5d=class{constructor(_0x19fca8,_0x5b394a,_0x1a1c21,_0xec7ace){const _0x5403cb=_0x484063;this[_0x5403cb(0x1cd)]=_0x19fca8,this[_0x5403cb(0x1f6)]=_0x5b394a,this[_0x5403cb(0x1da)]=_0x1a1c21,this['_injector']=_0xec7ace;}async['addComment'](_0x1e69ea){const _0x18ff7e=_0x484063;var _0x54122b,_0x200a86;const {parentId:_0x5f4ee4,unitId:_0xed720c,text:_0x2bf2eb,threadId:_0x2ebe4d}=_0x1e69ea,_0x53d79d=(_0x200a86=(_0x54122b=_0x2bf2eb[_0x18ff7e(0x184)])==null?void 0x0:_0x54122b[_0x18ff7e(0x200)](_0x169f20=>_0x169f20[_0x18ff7e(0x1a2)]===_0x34b4ef[_0x18ff7e(0x1df)][_0x18ff7e(0x1ee)])['map'](_0x48f923=>_0x48f923[_0x18ff7e(0x18d)]))!=null?_0x200a86:[],_0x5c042b=JSON[_0x18ff7e(0x1eb)](_0x2bf2eb),_0x1c3874=(await this[_0x18ff7e(0x1da)][_0x18ff7e(0x1e7)](_0xed720c))[_0x18ff7e(0x18a)]();if(_0x5f4ee4){const _0x3b3524={'memberId':_0x1c3874,'unitId':_0xed720c,'content':_0x5c042b,'mention':_0x53d79d,'threadId':_0x2ebe4d},_0x52864d=(await this['_httpService'][_0x18ff7e(0x1b6)](_0x18ff7e(0x1e6)+_0xed720c+'/reply',{'body':_0x3b3524}))[_0x18ff7e(0x1b5)][_0x18ff7e(0x1ef)];return{..._0x1e69ea,'id':_0x52864d['replyId'],'dT':_0x34b4ef[_0x18ff7e(0x1c9)](+_0x52864d[_0x18ff7e(0x181)])[_0x18ff7e(0x1a9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x52864d[_0x18ff7e(0x192)]};}else{const _0x5100fa={'memberId':_0x1c3874,'unitId':_0xed720c,'content':_0x5c042b,'mention':_0x53d79d},_0x36b3ff=await this[_0x18ff7e(0x1cd)][_0x18ff7e(0x1b6)](_0x18ff7e(0x1e6)+_0xed720c+'/add',{'body':_0x5100fa});return _0x9cd3d5(_0x36b3ff[_0x18ff7e(0x1b5)][_0x18ff7e(0x1c4)],_0x1e69ea);}}async[_0x484063(0x1d8)](_0x14c4bd){const _0x26d2c8=_0x484063;var _0x52e7ea,_0xb6f8e5;const {text:_0x24e1cf,unitId:_0x305c20}=_0x14c4bd,_0x3d0bbe=(_0xb6f8e5=(_0x52e7ea=_0x24e1cf[_0x26d2c8(0x184)])==null?void 0x0:_0x52e7ea[_0x26d2c8(0x200)](_0xa5a394=>_0xa5a394['rangeType']===_0x34b4ef[_0x26d2c8(0x1df)][_0x26d2c8(0x1ee)])[_0x26d2c8(0x1a6)](_0x3b1183=>_0x3b1183[_0x26d2c8(0x18d)]))!=null?_0xb6f8e5:[],_0x3453ff=JSON[_0x26d2c8(0x1eb)](_0x24e1cf),_0x19a3de=_0x14c4bd[_0x26d2c8(0x1ed)],_0x4ebf63=_0x14c4bd['id'],_0x11fba4={'memberId':(await this[_0x26d2c8(0x1da)][_0x26d2c8(0x1e7)](_0x305c20))[_0x26d2c8(0x18a)](),'unitId':_0x305c20,'threadId':_0x19a3de,'mention':_0x3d0bbe,'content':_0x3453ff,'replyId':_0x4ebf63},_0xd4fc09=await this[_0x26d2c8(0x1cd)]['post'](_0x26d2c8(0x1e6)+_0x305c20+_0x26d2c8(0x19b),{'body':_0x11fba4});return!_0xd4fc09[_0x26d2c8(0x1b5)][_0x26d2c8(0x19d)]||_0xd4fc09[_0x26d2c8(0x1b5)][_0x26d2c8(0x19d)]['code']===0x1;}async[_0x484063(0x1b8)](_0x16b7a3){const _0x53edf6=_0x484063,{unitId:_0x2259bb}=_0x16b7a3,_0x2e80c9=_0x16b7a3[_0x53edf6(0x1ed)],_0x35fc4e={'memberId':this['_userService'][_0x53edf6(0x1c3)]()[_0x53edf6(0x1dc)],'unitId':_0x2259bb,'threadId':_0x2e80c9,'solved':_0x16b7a3[_0x53edf6(0x1de)]?_0x4c4f19[_0x53edf6(0x1d3)]:_0x4c4f19[_0x53edf6(0x1a7)]},_0x452131=await this[_0x53edf6(0x1cd)]['post']('/universer-api/comment/unit/'+_0x2259bb+_0x53edf6(0x1ba),{'body':_0x35fc4e});return!_0x452131[_0x53edf6(0x1b5)][_0x53edf6(0x19d)]||_0x452131[_0x53edf6(0x1b5)][_0x53edf6(0x19d)][_0x53edf6(0x1f5)]===0x1;}async['deleteComment'](_0x4ef713,_0x5a3777,_0x1a3672,_0x5db3d6){const _0x154aa6=_0x484063,_0xf0e353={'memberId':(await this[_0x154aa6(0x1da)][_0x154aa6(0x1e7)](_0x4ef713))[_0x154aa6(0x18a)](),'threadId':_0x1a3672,'replyId':_0x5db3d6,'unitId':_0x4ef713},_0x464e54=await this['_httpService'][_0x154aa6(0x1b6)](_0x154aa6(0x1e6)+_0x4ef713+_0x154aa6(0x1d0),{'body':_0xf0e353});return!_0x464e54['body']['error']||_0x464e54[_0x154aa6(0x1b5)][_0x154aa6(0x19d)][_0x154aa6(0x1f5)]===0x1;}async[_0x484063(0x1c0)](_0x2ac79d,_0x216714,_0x134451){const _0x1b122e=_0x484063,_0x471fb1={'unitId':_0x2ac79d,'threadId':_0x134451},_0x1afbf7=await this[_0x1b122e(0x1cd)][_0x1b122e(0x1b6)](_0x1b122e(0x1e6)+_0x2ac79d+_0x1b122e(0x1af),{'body':_0x471fb1}),_0x5cb3d3=_0x134451[_0x1b122e(0x1a6)](_0x46b6ba=>_0x5ea313(_0x1afbf7[_0x1b122e(0x1b5)][_0x1b122e(0x197)][_0x46b6ba],_0x2ac79d,_0x216714))[_0x1b122e(0x200)](Boolean);return Object['values'](_0x1afbf7[_0x1b122e(0x1b5)][_0x1b122e(0x1f1)])[_0x1b122e(0x18f)](_0x1b4e30=>{const _0x221933=_0x1b122e;this['_userService'][_0x221933(0x17f)](_0x1b4e30);}),_0x5cb3d3;}[_0x484063(0x1f7)](_0x20f106){return{'id':_0x20f106['id'],'threadId':_0x20f106['threadId'],'ref':_0x20f106['ref']};}};_0x335a5d=_0x5e2b04([_0x27daaf(0x0,_0x34b4ef[_0x484063(0x1f2)](_0x422bd1[_0x484063(0x1fb)])),_0x27daaf(0x1,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x17c)])),_0x27daaf(0x2,_0x34b4ef['Inject'](_0x1bf240[_0x484063(0x1bd)])),_0x27daaf(0x3,_0x34b4ef[_0x484063(0x1f2)](_0x34b4ef[_0x484063(0x1e9)]))],_0x335a5d);var _0x1b68b7=Object[_0x484063(0x193)],_0x205289=(_0x361fac,_0x36b883,_0x1087c8,_0x474f73)=>{const _0xf6e30a=_0x484063;for(var _0x3beea2=_0x474f73>0x1?void 0x0:_0x474f73?_0x1b68b7(_0x36b883,_0x1087c8):_0x36b883,_0xfc7df8=_0x361fac[_0xf6e30a(0x189)]-0x1,_0x4810fe;_0xfc7df8>=0x0;_0xfc7df8--)(_0x4810fe=_0x361fac[_0xfc7df8])&&(_0x3beea2=_0x4810fe(_0x3beea2)||_0x3beea2);return _0x3beea2;},_0x3f38a6=(_0x3c5971,_0x25ed71)=>(_0x1dbe61,_0x1b5c32)=>_0x25ed71(_0x1dbe61,_0x1b5c32,_0x3c5971);let _0x4fcbcf=class extends _0x34b4ef[_0x484063(0x1d2)]{constructor(_0x2bae56,_0x7dc1ce){const _0x4a2acf=_0x484063;super(),this['_threadCommentDataSourceService']=_0x2bae56,this[_0x4a2acf(0x1e0)]=_0x7dc1ce,this[_0x4a2acf(0x1d5)]();}[_0x484063(0x1d5)](){const _0x23eabd=_0x484063;this[_0x23eabd(0x1ad)][_0x23eabd(0x199)]=this['_threadCommentDataSource'],this[_0x23eabd(0x1ad)][_0x23eabd(0x1e5)]=!0x1;}};_0x4fcbcf=_0x205289([_0x3f38a6(0x0,_0x2920d2[_0x484063(0x1b2)]),_0x3f38a6(0x1,_0x34b4ef['Inject'](_0x335a5d))],_0x4fcbcf);var _0x481b92=Object[_0x484063(0x1cc)],_0x8198b4=Object[_0x484063(0x193)],_0x11d010=(_0x107fcc,_0x23ad9c,_0xd32992)=>_0x23ad9c in _0x107fcc?_0x481b92(_0x107fcc,_0x23ad9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd32992}):_0x107fcc[_0x23ad9c]=_0xd32992,_0x5ae950=(_0x3d6166,_0x5a217f,_0x5d8420,_0x51e913)=>{const _0x427bee=_0x484063;for(var _0x2647ca=_0x51e913>0x1?void 0x0:_0x51e913?_0x8198b4(_0x5a217f,_0x5d8420):_0x5a217f,_0x3246b3=_0x3d6166[_0x427bee(0x189)]-0x1,_0x447571;_0x3246b3>=0x0;_0x3246b3--)(_0x447571=_0x3d6166[_0x3246b3])&&(_0x2647ca=_0x447571(_0x2647ca)||_0x2647ca);return _0x2647ca;},_0x1654b8=(_0x36d800,_0xed8a69)=>(_0x51aa90,_0x20ec7a)=>_0xed8a69(_0x51aa90,_0x20ec7a,_0x36d800),_0x481fe2=(_0x146507,_0x153b2f,_0xc93d25)=>_0x11d010(_0x146507,typeof _0x153b2f!='symbol'?_0x153b2f+'':_0x153b2f,_0xc93d25);_0x3fdf36[_0x484063(0x17e)]=class extends _0x34b4ef[_0x484063(0x1ea)]{constructor(_0x2604d8=_0x1286f6,_0x343d21,_0x66e901){const _0x526890=_0x484063;super(),this[_0x526890(0x185)]=_0x2604d8,this[_0x526890(0x18c)]=_0x343d21,this[_0x526890(0x1c2)]=_0x66e901;const {..._0x46caad}=_0x34b4ef[_0x526890(0x1ce)]({},_0x1286f6,this[_0x526890(0x185)]);this[_0x526890(0x1c2)][_0x526890(0x1be)](_0xbc477f,_0x46caad);}[_0x484063(0x198)](){const _0x38d491=_0x484063;[[_0x335a5d],[_0x4fcbcf],[_0x4fffe9]][_0x38d491(0x18f)](_0x1b1235=>{const _0x5c133c=_0x38d491;this[_0x5c133c(0x18c)][_0x5c133c(0x1a0)](_0x1b1235);});}['onReady'](){const _0x2d0175=_0x484063;this[_0x2d0175(0x18c)][_0x2d0175(0x1b0)](_0x4fcbcf),this[_0x2d0175(0x18c)]['get'](_0x4fffe9);}},_0x481fe2(_0x3fdf36[_0x484063(0x17e)],_0x484063(0x1c8),_0x163e9e),_0x481fe2(_0x3fdf36[_0x484063(0x17e)],_0x484063(0x1ec),_0x34b4ef[_0x484063(0x17b)][_0x484063(0x1e8)]),_0x3fdf36[_0x484063(0x17e)]=_0x5ae950([_0x34b4ef['DependentOn'](_0x54799e['UniverThreadCommentUIPlugin'],_0x1bf240[_0x484063(0x187)],_0x10c06b['UniverLicensePlugin']),_0x1654b8(0x1,_0x34b4ef['Inject'](_0x34b4ef[_0x484063(0x1e9)])),_0x1654b8(0x2,_0x34b4ef['IConfigService'])],_0x3fdf36[_0x484063(0x17e)]),Object[_0x484063(0x1cc)](_0x3fdf36,Symbol[_0x484063(0x1fd)],{'value':_0x484063(0x1bf)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202506091607",
|
|
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.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/network": "0.8.0-nightly.
|
|
52
|
-
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506081606",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202506091607",
|
|
49
|
+
"@univerjs/core": "0.8.0-nightly.202506091607",
|
|
50
|
+
"@univerjs-pro/license": "0.8.0-nightly.202506091607",
|
|
51
|
+
"@univerjs/network": "0.8.0-nightly.202506091607",
|
|
53
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
53
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202506091607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506091607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|