@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506161607 → 0.8.1-nightly.202506171607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x5a7473=_0x5780;(function(_0x2afd33,_0x1cf00a){const _0x3875dc=_0x5780,_0x53334b=_0x2afd33();while(!![]){try{const _0x2915d8=-parseInt(_0x3875dc(0x197))/0x1*(parseInt(_0x3875dc(0x1b1))/0x2)+-parseInt(_0x3875dc(0x175))/0x3*(parseInt(_0x3875dc(0x1ae))/0x4)+-parseInt(_0x3875dc(0x1bc))/0x5+parseInt(_0x3875dc(0x172))/0x6*(-parseInt(_0x3875dc(0x187))/0x7)+parseInt(_0x3875dc(0x18c))/0x8+-parseInt(_0x3875dc(0x159))/0x9*(parseInt(_0x3875dc(0x1bf))/0xa)+parseInt(_0x3875dc(0x192))/0xb;if(_0x2915d8===_0x1cf00a)break;else _0x53334b['push'](_0x53334b['shift']());}catch(_0x2d864b){_0x53334b['push'](_0x53334b['shift']());}}}(_0x46f5,0x41f53));function _0x46f5(){const _0x3a6f17=['_injector','addUser','stringify','UniverCollaborationClientPlugin','comments','CustomRangeType','91TSUspa','type','_userService','@univerjs-pro/license','replies','3741544FVhogi','UNRECOGNIZED','users','OpenOrReOpen','UniverInstanceType','/universer-api/user/list','13349094UDJiZX','delete','merge','symbol','@univerjs/core','13qGUQMK','Solved','post','/delete','body','error','/universer-api/comment/unit/','Disposable','onStarting','payload','_initUserSync','_httpService','requireSession','UserManagerService','replyId','setConfig','pipe','/reply','_threadCommentModel','_config','get','personId','@univerjs/thread-comment','6484obhjnw','content','rangeId','81586sSbQmQ','_configService','@univerjs/thread-comment-ui','syncUpdateMutationToColla','HTTPService','_commentService','Solve','Module','bufferTime','/solved','UNIVER_UNKNOWN','288330japzTy','YYYY/MM/DD\x20HH:mm','unitId','5079490pLCpUZ','/add','size','/list','Plugin','ref','getUser','Injector','@univerjs/network','disposeWithMe','_initDataSource','filter','Inject','UniverLicensePlugin','pluginName','COMMENT','code','rxjs','map','_init','rangeType','customRanges','subscribe','solved','deleteComment','createTimestamp','defineProperty','find','userID','9WIUhPv','addComment','_sessionService','UniverThreadCommentDataSourcePlugin','updateComment','getMemberID','length','parse','threadId','parentId','/edit','resolveComment','root','values','_threadCommentDataSourceService','IConfigService','Add','onReady','DependentOn','getUnit','commentUpdate$','Delete','add','listComments','Edit','123762hjhTzi','dayjs','userId','87UUffLU','format','saveCommentToSnapshot','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Reply','forEach','UniverThreadCommentUIPlugin','CommentService','comment','_threadCommentDataSource'];_0x46f5=function(){return _0x3a6f17;};return _0x46f5();}Object[_0x5a7473(0x156)](exports,Symbol['toStringTag'],{'value':_0x5a7473(0x1b8)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x5a7473(0x18a)),c=require(_0x5a7473(0x196)),j=require(_0x5a7473(0x1b3)),M=require(_0x5a7473(0x1ad)),w=require(_0x5a7473(0x14d)),P=require(_0x5a7473(0x1c7)),U=_0x5a7473(0x179);var I=(_0x4fe93a=>(_0x4fe93a[_0x4fe93a[_0x5a7473(0x18f)]=0x0]='OpenOrReOpen',_0x4fe93a[_0x4fe93a[_0x5a7473(0x198)]=0x1]=_0x5a7473(0x198),_0x4fe93a[_0x4fe93a[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x4fe93a))(I||{}),v=(_0x592765=>(_0x592765[_0x592765['Unknown']=0x0]='Unknown',_0x592765[_0x592765[_0x5a7473(0x169)]=0x1]='Add',_0x592765[_0x592765[_0x5a7473(0x17b)]=0x2]=_0x5a7473(0x17b),_0x592765[_0x592765[_0x5a7473(0x171)]=0x3]='Edit',_0x592765[_0x592765[_0x5a7473(0x16e)]=0x4]=_0x5a7473(0x16e),_0x592765[_0x592765[_0x5a7473(0x1b7)]=0x5]=_0x5a7473(0x1b7),_0x592765[_0x592765[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x592765))(v||{});const f=_0x30aae6=>c['dayjs'](new Date(+_0x30aae6))[_0x5a7473(0x176)](_0x5a7473(0x1bd)),R=async(_0x47cd8b,_0x2a508c)=>{const _0x1acf27=_0x5a7473,_0x5b38f1=_0x47cd8b[_0x1acf27(0x1ab)](c[_0x1acf27(0x1a4)]),_0xeab1c8=_0x47cd8b['get'](P[_0x1acf27(0x1b5)]);_0x2a508c[_0x1acf27(0x17c)](_0x315d9b=>{const _0x4aad08=_0x1acf27;_0x5b38f1[_0x4aad08(0x1c5)](_0x315d9b)&&_0x2a508c[_0x4aad08(0x193)](_0x315d9b);}),_0x2a508c[_0x1acf27(0x1c1)]&&(await _0xeab1c8[_0x1acf27(0x1ab)](_0x1acf27(0x191),{'params':{'userIDs':[..._0x2a508c]}}))['body'][_0x1acf27(0x18e)][_0x1acf27(0x17c)](_0x1179e6=>{_0x1179e6&&_0x5b38f1['addUser'](_0x1179e6);});};var $=Object[_0x5a7473(0x17a)],E=(_0x1be346,_0xc501f9,_0x1eae46,_0x42c049)=>{const _0x2bb034=_0x5a7473;for(var _0x259c94=_0x42c049>0x1?void 0x0:_0x42c049?$(_0xc501f9,_0x1eae46):_0xc501f9,_0x66fdf6=_0x1be346[_0x2bb034(0x15f)]-0x1,_0x320c27;_0x66fdf6>=0x0;_0x66fdf6--)(_0x320c27=_0x1be346[_0x66fdf6])&&(_0x259c94=_0x320c27(_0x259c94)||_0x259c94);return _0x259c94;},S=(_0x52d42c,_0xadaa7d)=>(_0x6cd097,_0x29cf7d)=>_0xadaa7d(_0x6cd097,_0x29cf7d,_0x52d42c);let p=class extends c[_0x5a7473(0x19e)]{constructor(_0xea76ee,_0x57e70d,_0x25275c,_0x10d749){const _0x1945d5=_0x5a7473;super(),this[_0x1945d5(0x1b6)]=_0xea76ee,this['_threadCommentModel']=_0x57e70d,this[_0x1945d5(0x189)]=_0x25275c,this[_0x1945d5(0x181)]=_0x10d749,this[_0x1945d5(0x14f)](),this[_0x1945d5(0x1a1)]();}[_0x5a7473(0x1a1)](){const _0x89d0e3=_0x5a7473;this['disposeWithMe'](this[_0x89d0e3(0x1a9)][_0x89d0e3(0x16d)][_0x89d0e3(0x1a7)](w[_0x89d0e3(0x1b9)](0x10))[_0x89d0e3(0x152)](_0x5ebfac=>{const _0x1d48ee=new Set();_0x5ebfac['forEach'](_0x39326f=>{const _0x593bd=_0x5780;switch(_0x39326f[_0x593bd(0x188)]){case'add':{const _0x540ec6=_0x39326f[_0x593bd(0x1a0)][_0x593bd(0x1ac)];_0x1d48ee['add'](_0x540ec6);break;}}}),R(this['_injector'],_0x1d48ee);}));}[_0x5a7473(0x14f)](){const _0x25366b=_0x5a7473;this[_0x25366b(0x1c8)](this[_0x25366b(0x1b6)][_0x25366b(0x16d)][_0x25366b(0x152)](async _0x4c61c2=>{const _0x366e3b=_0x25366b;var _0x2304d6,_0x32cb6d,_0x115194,_0xb21282;const _0xd2669a=(_0x2304d6=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2[_0x366e3b(0x1be)])[_0x366e3b(0x157)](_0x224dd9=>_0x224dd9[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0x2304d6[_0x366e3b(0x165)];if(!_0xd2669a)return;const {unitId:_0x3fad69,subUnitId:_0x233258}=_0xd2669a;switch(_0x4c61c2['user']&&this[_0x366e3b(0x189)][_0x366e3b(0x182)](_0x4c61c2['user']),_0x4c61c2[_0x366e3b(0x188)]){case v[_0x366e3b(0x169)]:break;case v[_0x366e3b(0x17b)]:{this[_0x366e3b(0x1a9)]['addComment'](_0x3fad69,_0x233258,{'unitId':_0x3fad69,'subUnitId':_0x233258,'ref':'','id':_0x4c61c2['replyId'],'dT':f(+_0x4c61c2['createTimestamp']),'threadId':_0x4c61c2[_0x366e3b(0x161)],'personId':(_0x115194=(_0x32cb6d=_0x4c61c2['user'])==null?void 0x0:_0x32cb6d['userID'])!=null?_0x115194:_0x4c61c2[_0x366e3b(0x174)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2['content']),'parentId':_0xd2669a['id']});break;}case v['Delete']:{const _0x56e54d=this['_threadCommentModel']['getComment'](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);_0x56e54d&&_0x56e54d[_0x366e3b(0x162)]&&this[_0x366e3b(0x1a9)][_0x366e3b(0x154)](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);break;}case v[_0x366e3b(0x171)]:{this[_0x366e3b(0x1a9)][_0x366e3b(0x15d)](_0x3fad69,_0x233258,{'commentId':_0x4c61c2[_0x366e3b(0x1a5)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2[_0x366e3b(0x1af)])});break;}case v['Solve']:{const _0x3f3851=(_0xb21282=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2['unitId'])['find'](_0x1bee86=>_0x1bee86[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0xb21282[_0x366e3b(0x165)];_0x3f3851&&this[_0x366e3b(0x1a9)]['resolveComment'](_0x3fad69,_0x233258,_0x3f3851['id'],_0x4c61c2['solved']===I[_0x366e3b(0x198)]);break;}}}));}};p=E([S(0x0,c[_0x5a7473(0x1cb)](b[_0x5a7473(0x17e)])),S(0x1,c[_0x5a7473(0x1cb)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x5a7473(0x1a4)])),S(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],p);const q=_0x5a7473(0x178),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127a76,_0x254249,_0x5c4d87,_0x17c975)=>{for(var _0x570008=_0x17c975>0x1?void 0x0:_0x17c975?A(_0x254249,_0x5c4d87):_0x254249,_0x5ca767=_0x127a76['length']-0x1,_0x346c03;_0x5ca767>=0x0;_0x5ca767--)(_0x346c03=_0x127a76[_0x5ca767])&&(_0x570008=_0x346c03(_0x570008)||_0x570008);return _0x570008;},_=(_0x20151f,_0x39145d)=>(_0x5b47e3,_0x327454)=>_0x39145d(_0x5b47e3,_0x327454,_0x20151f);function _0x5780(_0x59a013,_0x4391d8){const _0x46f5f8=_0x46f5();return _0x5780=function(_0x578019,_0x5d7ae9){_0x578019=_0x578019-0x149;let _0x302a70=_0x46f5f8[_0x578019];return _0x302a70;},_0x5780(_0x59a013,_0x4391d8);}function Y(_0x9b454f,_0x479504){const _0x5a32ee=_0x5a7473,_0x3e69f6=_0x9b454f[_0x5a32ee(0x18b)][0x0];return{..._0x479504,'id':_0x3e69f6[_0x5a32ee(0x1a5)],'resolved':_0x9b454f[_0x5a32ee(0x153)]===0x1,'dT':f(_0x3e69f6['createTimestamp']),'personId':_0x3e69f6[_0x5a32ee(0x174)],'threadId':_0x3e69f6[_0x5a32ee(0x161)]};}function G(_0x572a91,_0x11e351,_0x40ea76){const _0x319638=_0x5a7473;var _0x379fd2,_0x51bc03;if(((_0x51bc03=(_0x379fd2=_0x572a91==null?void 0x0:_0x572a91[_0x319638(0x18b)])==null?void 0x0:_0x379fd2[_0x319638(0x15f)])!=null?_0x51bc03:0x0)>0x0){const _0x47a41f=(_0x4e0dfd,_0x3ab2ca)=>({'id':_0x4e0dfd[_0x319638(0x1a5)],'threadId':_0x4e0dfd['threadId'],'dT':f(_0x4e0dfd[_0x319638(0x155)]),'personId':_0x4e0dfd[_0x319638(0x174)],'resolved':_0x572a91[_0x319638(0x153)]===I[_0x319638(0x198)],'unitId':_0x11e351,'subUnitId':_0x40ea76,'text':JSON['parse'](_0x4e0dfd['content']),'parentId':_0x3ab2ca}),_0x432f4e=_0x47a41f(_0x572a91[_0x319638(0x18b)][0x0]);return{..._0x432f4e,'children':_0x572a91['replies']['slice'](0x1)[_0x319638(0x14e)](_0x1e6dc6=>_0x47a41f(_0x1e6dc6,_0x432f4e['id']))};}return null;}let g=class{constructor(_0x155ec3,_0x3c08d2,_0x100087,_0x555db4){const _0x2c5e69=_0x5a7473;this['_httpService']=_0x155ec3,this[_0x2c5e69(0x189)]=_0x3c08d2,this[_0x2c5e69(0x15b)]=_0x100087,this['_injector']=_0x555db4;}async[_0x5a7473(0x15a)](_0x575a49){const _0x236c2e=_0x5a7473;var _0x1b13e0,_0x28912a;const {parentId:_0x492cc7,unitId:_0x2c0b64,text:_0x331432,threadId:_0x171957}=_0x575a49,_0x59801d=(_0x28912a=(_0x1b13e0=_0x331432['customRanges'])==null?void 0x0:_0x1b13e0[_0x236c2e(0x1ca)](_0x26b486=>_0x26b486[_0x236c2e(0x150)]===c[_0x236c2e(0x186)][_0x236c2e(0x14b)])[_0x236c2e(0x14e)](_0x322c36=>_0x322c36[_0x236c2e(0x1b0)]))!=null?_0x28912a:[],_0x4f0dc6=JSON['stringify'](_0x331432),_0x48da28=(await this[_0x236c2e(0x15b)][_0x236c2e(0x1a3)](_0x2c0b64))[_0x236c2e(0x15e)]();if(_0x492cc7){const _0x4368ee={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d,'threadId':_0x171957},_0x3eb3f1=(await this['_httpService'][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1a8),{'body':_0x4368ee}))[_0x236c2e(0x19b)]['reply'];return{..._0x575a49,'id':_0x3eb3f1['replyId'],'dT':c[_0x236c2e(0x173)](+_0x3eb3f1[_0x236c2e(0x155)])[_0x236c2e(0x176)](_0x236c2e(0x1bd)),'personId':_0x3eb3f1['userId']};}else{const _0x514090={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d},_0x198edc=await this[_0x236c2e(0x1a2)][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1c0),{'body':_0x514090});return Y(_0x198edc[_0x236c2e(0x19b)][_0x236c2e(0x17f)],_0x575a49);}}async[_0x5a7473(0x15d)](_0x310ffd){const _0x4cb5e4=_0x5a7473;var _0x509d8a,_0x3d089d;const {text:_0x3b811e,unitId:_0x5a1f17}=_0x310ffd,_0x4a5492=(_0x3d089d=(_0x509d8a=_0x3b811e[_0x4cb5e4(0x151)])==null?void 0x0:_0x509d8a['filter'](_0x44b2d5=>_0x44b2d5[_0x4cb5e4(0x150)]===c[_0x4cb5e4(0x186)][_0x4cb5e4(0x14b)])[_0x4cb5e4(0x14e)](_0x4d1f04=>_0x4d1f04[_0x4cb5e4(0x1b0)]))!=null?_0x3d089d:[],_0x381ccb=JSON[_0x4cb5e4(0x183)](_0x3b811e),_0x1c6951=_0x310ffd[_0x4cb5e4(0x161)],_0x55b0cb=_0x310ffd['id'],_0x2706c9={'memberId':(await this['_sessionService'][_0x4cb5e4(0x1a3)](_0x5a1f17))[_0x4cb5e4(0x15e)](),'unitId':_0x5a1f17,'threadId':_0x1c6951,'mention':_0x4a5492,'content':_0x381ccb,'replyId':_0x55b0cb},_0x6ba42a=await this[_0x4cb5e4(0x1a2)][_0x4cb5e4(0x199)](_0x4cb5e4(0x19d)+_0x5a1f17+_0x4cb5e4(0x163),{'body':_0x2706c9});return!_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)]||_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)][_0x4cb5e4(0x14c)]===0x1;}async[_0x5a7473(0x164)](_0x210abf){const _0x4ffef9=_0x5a7473,{unitId:_0x2276f}=_0x210abf,_0x3c4f2a=_0x210abf[_0x4ffef9(0x161)],_0x3864a4={'memberId':this[_0x4ffef9(0x189)]['getCurrentUser']()[_0x4ffef9(0x158)],'unitId':_0x2276f,'threadId':_0x3c4f2a,'solved':_0x210abf['resolved']?I[_0x4ffef9(0x198)]:I[_0x4ffef9(0x18f)]},_0x5055f8=await this['_httpService'][_0x4ffef9(0x199)](_0x4ffef9(0x19d)+_0x2276f+_0x4ffef9(0x1ba),{'body':_0x3864a4});return!_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)]||_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)][_0x4ffef9(0x14c)]===0x1;}async[_0x5a7473(0x154)](_0x2ca6d5,_0x58fff6,_0x3465fb,_0x1ea876){const _0x21a73f=_0x5a7473,_0x1038a7={'memberId':(await this['_sessionService'][_0x21a73f(0x1a3)](_0x2ca6d5))[_0x21a73f(0x15e)](),'threadId':_0x3465fb,'replyId':_0x1ea876,'unitId':_0x2ca6d5},_0x435490=await this['_httpService'][_0x21a73f(0x199)](_0x21a73f(0x19d)+_0x2ca6d5+_0x21a73f(0x19a),{'body':_0x1038a7});return!_0x435490['body'][_0x21a73f(0x19c)]||_0x435490['body'][_0x21a73f(0x19c)][_0x21a73f(0x14c)]===0x1;}async[_0x5a7473(0x170)](_0x4d7d6a,_0x3ca8b1,_0x1cf9a8){const _0x339b66=_0x5a7473,_0x439d9b={'unitId':_0x4d7d6a,'threadId':_0x1cf9a8},_0x50fdf8=await this[_0x339b66(0x1a2)][_0x339b66(0x199)]('/universer-api/comment/unit/'+_0x4d7d6a+_0x339b66(0x1c2),{'body':_0x439d9b}),_0x355970=_0x1cf9a8[_0x339b66(0x14e)](_0x45e947=>G(_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x185)][_0x45e947],_0x4d7d6a,_0x3ca8b1))[_0x339b66(0x1ca)](Boolean);return Object[_0x339b66(0x166)](_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x18e)])['forEach'](_0x217443=>{const _0x3778e9=_0x339b66;this['_userService'][_0x3778e9(0x182)](_0x217443);}),_0x355970;}[_0x5a7473(0x177)](_0x8da89){const _0x1e0221=_0x5a7473;return{'id':_0x8da89['id'],'threadId':_0x8da89[_0x1e0221(0x161)],'ref':_0x8da89[_0x1e0221(0x1c4)]};}};g=x([_(0x0,c[_0x5a7473(0x1cb)](P[_0x5a7473(0x1b5)])),_(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1a4)])),_(0x2,c[_0x5a7473(0x1cb)](b['CollaborationSessionService'])),_(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x593df0,_0x24f3da,_0x18adb8,_0x2f55c6)=>{for(var _0x27c7e1=_0x2f55c6>0x1?void 0x0:_0x2f55c6?H(_0x24f3da,_0x18adb8):_0x24f3da,_0x29084c=_0x593df0['length']-0x1,_0x813ec3;_0x29084c>=0x0;_0x29084c--)(_0x813ec3=_0x593df0[_0x29084c])&&(_0x27c7e1=_0x813ec3(_0x27c7e1)||_0x27c7e1);return _0x27c7e1;},y=(_0x2b4503,_0x259ef1)=>(_0x735b89,_0x2860a4)=>_0x259ef1(_0x735b89,_0x2860a4,_0x2b4503);let C=class extends c['Disposable']{constructor(_0x4a9a88,_0x1c8b98){const _0x1533a9=_0x5a7473;super(),this[_0x1533a9(0x167)]=_0x4a9a88,this[_0x1533a9(0x180)]=_0x1c8b98,this[_0x1533a9(0x1c9)]();}['_initDataSource'](){const _0x1e4e99=_0x5a7473;this[_0x1e4e99(0x167)]['dataSource']=this['_threadCommentDataSource'],this[_0x1e4e99(0x167)][_0x1e4e99(0x1b4)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5a7473(0x1cb)](g))],C);var F=Object[_0x5a7473(0x156)],L=Object['getOwnPropertyDescriptor'],Z=(_0x582bad,_0x3265b1,_0x326366)=>_0x3265b1 in _0x582bad?F(_0x582bad,_0x3265b1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x326366}):_0x582bad[_0x3265b1]=_0x326366,W=(_0x3d980d,_0x4773bb,_0x4c0263,_0x274c71)=>{for(var _0x305f0b=_0x274c71>0x1?void 0x0:_0x274c71?L(_0x4773bb,_0x4c0263):_0x4773bb,_0x510002=_0x3d980d['length']-0x1,_0x4697a2;_0x510002>=0x0;_0x510002--)(_0x4697a2=_0x3d980d[_0x510002])&&(_0x305f0b=_0x4697a2(_0x305f0b)||_0x305f0b);return _0x305f0b;},O=(_0x1c423c,_0x4cd4d8)=>(_0x2aebdc,_0x293456)=>_0x4cd4d8(_0x2aebdc,_0x293456,_0x1c423c),N=(_0x6fea50,_0x795899,_0x338e0f)=>Z(_0x6fea50,typeof _0x795899!=_0x5a7473(0x195)?_0x795899+'':_0x795899,_0x338e0f);exports[_0x5a7473(0x15c)]=class extends c[_0x5a7473(0x1c3)]{constructor(_0x3c5e66=D,_0x12acdb,_0x5e821c){const _0x1c8d6b=_0x5a7473;super(),this[_0x1c8d6b(0x1aa)]=_0x3c5e66,this['_injector']=_0x12acdb,this[_0x1c8d6b(0x1b2)]=_0x5e821c;const {..._0x4b090e}=c[_0x1c8d6b(0x194)]({},D,this[_0x1c8d6b(0x1aa)]);this[_0x1c8d6b(0x1b2)][_0x1c8d6b(0x1a6)](q,_0x4b090e);}[_0x5a7473(0x19f)](){const _0x28e813=_0x5a7473;[[g],[C],[p]][_0x28e813(0x17c)](_0xca3914=>{const _0x40e09f=_0x28e813;this[_0x40e09f(0x181)][_0x40e09f(0x16f)](_0xca3914);});}[_0x5a7473(0x16a)](){const _0x29f794=_0x5a7473;this[_0x29f794(0x181)][_0x29f794(0x1ab)](C),this[_0x29f794(0x181)][_0x29f794(0x1ab)](p);}},N(exports[_0x5a7473(0x15c)],_0x5a7473(0x14a),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5a7473(0x188),c[_0x5a7473(0x190)][_0x5a7473(0x1bb)]),exports[_0x5a7473(0x15c)]=W([c[_0x5a7473(0x16b)](j[_0x5a7473(0x17d)],b[_0x5a7473(0x184)],T[_0x5a7473(0x149)]),O(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)])),O(0x2,c[_0x5a7473(0x168)])],exports[_0x5a7473(0x15c)]);
1
+ 'use strict';const _0x423b2e=_0x50e2;(function(_0x4c442f,_0x243b0a){const _0x16428a=_0x50e2,_0x5baaea=_0x4c442f();while(!![]){try{const _0x3e976a=-parseInt(_0x16428a(0x1e6))/0x1*(parseInt(_0x16428a(0x19e))/0x2)+-parseInt(_0x16428a(0x19c))/0x3*(-parseInt(_0x16428a(0x1eb))/0x4)+-parseInt(_0x16428a(0x1ef))/0x5*(-parseInt(_0x16428a(0x1d4))/0x6)+parseInt(_0x16428a(0x1da))/0x7+parseInt(_0x16428a(0x1c3))/0x8+-parseInt(_0x16428a(0x1b1))/0x9*(parseInt(_0x16428a(0x1c8))/0xa)+-parseInt(_0x16428a(0x1b6))/0xb;if(_0x3e976a===_0x243b0a)break;else _0x5baaea['push'](_0x5baaea['shift']());}catch(_0x39d6f9){_0x5baaea['push'](_0x5baaea['shift']());}}}(_0x295e,0xc03ef));Object[_0x423b2e(0x1d7)](exports,Symbol['toStringTag'],{'value':_0x423b2e(0x200)});const b=require(_0x423b2e(0x198)),T=require(_0x423b2e(0x191)),c=require(_0x423b2e(0x1e5)),j=require(_0x423b2e(0x1c0)),M=require('@univerjs/thread-comment'),w=require(_0x423b2e(0x1f4)),P=require(_0x423b2e(0x1af)),U=_0x423b2e(0x1c4);var I=(_0x69f9b7=>(_0x69f9b7[_0x69f9b7['OpenOrReOpen']=0x0]=_0x423b2e(0x1d6),_0x69f9b7[_0x69f9b7[_0x423b2e(0x1f2)]=0x1]=_0x423b2e(0x1f2),_0x69f9b7[_0x69f9b7[_0x423b2e(0x208)]=-0x1]=_0x423b2e(0x208),_0x69f9b7))(I||{}),v=(_0x3074c7=>(_0x3074c7[_0x3074c7[_0x423b2e(0x1b2)]=0x0]='Unknown',_0x3074c7[_0x3074c7[_0x423b2e(0x1f0)]=0x1]='Add',_0x3074c7[_0x3074c7[_0x423b2e(0x1ac)]=0x2]=_0x423b2e(0x1ac),_0x3074c7[_0x3074c7[_0x423b2e(0x1e1)]=0x3]='Edit',_0x3074c7[_0x3074c7['Delete']=0x4]='Delete',_0x3074c7[_0x3074c7['Solve']=0x5]='Solve',_0x3074c7[_0x3074c7[_0x423b2e(0x208)]=-0x1]=_0x423b2e(0x208),_0x3074c7))(v||{});const f=_0x124e59=>c[_0x423b2e(0x1a0)](new Date(+_0x124e59))[_0x423b2e(0x1e2)](_0x423b2e(0x202)),R=async(_0x2734b5,_0x857f34)=>{const _0x1bfc47=_0x423b2e,_0x11bfaa=_0x2734b5['get'](c[_0x1bfc47(0x196)]),_0x2424ad=_0x2734b5[_0x1bfc47(0x1c9)](P[_0x1bfc47(0x199)]);_0x857f34[_0x1bfc47(0x1ca)](_0x57036b=>{const _0x5707f6=_0x1bfc47;_0x11bfaa[_0x5707f6(0x1f8)](_0x57036b)&&_0x857f34[_0x5707f6(0x1dc)](_0x57036b);}),_0x857f34['size']&&(await _0x2424ad[_0x1bfc47(0x1c9)](_0x1bfc47(0x1db),{'params':{'userIDs':[..._0x857f34]}}))[_0x1bfc47(0x207)][_0x1bfc47(0x19b)][_0x1bfc47(0x1ca)](_0xb070ee=>{_0xb070ee&&_0x11bfaa['addUser'](_0xb070ee);});};function _0x295e(){const _0x3835d1=['unitId','IThreadCommentDataSourceService','values','Delete','symbol','Reply','Plugin','createTimestamp','@univerjs/network','rangeType','2937177KLOhNk','Unknown','getMemberID','find','threadId','4224385vyWEZs','subscribe','rangeId','error','_initUserSync','/list','IConfigService','_config','post','solved','@univerjs/thread-comment-ui','map','content','10000904BOYAVm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','merge','parentId','stringify','30BYVpak','get','forEach','code','_injector','root','commentUpdate$','addComment','Disposable','onReady','replyId','requireSession','1374942qSEtWY','addUser','OpenOrReOpen','defineProperty','userID','reply','10008194HguDWg','/universer-api/user/list','delete','DependentOn','ThreadCommentModel','userId','listComments','Edit','format','personId','_sessionService','@univerjs/core','3OKzvMy','type','syncUpdateMutationToColla','_configService','getOwnPropertyDescriptor','3504Bsbzis','_init','/universer-api/comment/unit/','deleteComment','10KRDzlk','Add','ref','Solved','UNIVER_UNKNOWN','rxjs','COMMENT','updateComment','parse','getUser','Inject','resolveComment','comments','_commentService','filter','UniverInstanceType','UniverThreadCommentDataSourcePlugin','Module','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','customRanges','_threadCommentModel','add','slice','body','UNRECOGNIZED','/edit','disposeWithMe','_threadCommentDataSourceService','_httpService','resolved','getUnit','pluginName','@univerjs-pro/license','_threadCommentDataSource','replies','/solved','Injector','UserManagerService','payload','@univerjs-pro/collaboration-client','HTTPService','UniverLicensePlugin','users','1632sHUkCW','CustomRangeType','976120GhnDjW','length','dayjs','onStarting','CommentService','saveCommentToSnapshot','_userService','user','_initDataSource'];_0x295e=function(){return _0x3835d1;};return _0x295e();}var $=Object['getOwnPropertyDescriptor'],E=(_0x44ee6d,_0x34d3ae,_0x316b06,_0x39c346)=>{for(var _0xce63d0=_0x39c346>0x1?void 0x0:_0x39c346?$(_0x34d3ae,_0x316b06):_0x34d3ae,_0x574781=_0x44ee6d['length']-0x1,_0x375b5e;_0x574781>=0x0;_0x574781--)(_0x375b5e=_0x44ee6d[_0x574781])&&(_0xce63d0=_0x375b5e(_0xce63d0)||_0xce63d0);return _0xce63d0;},S=(_0x312074,_0x5afbe3)=>(_0x5018d0,_0x529bce)=>_0x5afbe3(_0x5018d0,_0x529bce,_0x312074);let p=class extends c[_0x423b2e(0x1d0)]{constructor(_0x13edf3,_0xf8e0c6,_0x1d9b2c,_0x4799f6){const _0x543a13=_0x423b2e;super(),this[_0x543a13(0x1fc)]=_0x13edf3,this['_threadCommentModel']=_0xf8e0c6,this[_0x543a13(0x1a4)]=_0x1d9b2c,this[_0x543a13(0x1cc)]=_0x4799f6,this[_0x543a13(0x1ec)](),this[_0x543a13(0x1ba)]();}[_0x423b2e(0x1ba)](){const _0xacb164=_0x423b2e;this['disposeWithMe'](this[_0xacb164(0x204)][_0xacb164(0x1ce)]['pipe'](w['bufferTime'](0x10))[_0xacb164(0x1b7)](_0x3d47c2=>{const _0x339846=_0xacb164,_0xf71e29=new Set();_0x3d47c2['forEach'](_0xeadd17=>{const _0x261c94=_0x50e2;switch(_0xeadd17[_0x261c94(0x1e7)]){case _0x261c94(0x205):{const _0x57a410=_0xeadd17[_0x261c94(0x197)][_0x261c94(0x1e3)];_0xf71e29['add'](_0x57a410);break;}}}),R(this[_0x339846(0x1cc)],_0xf71e29);}));}[_0x423b2e(0x1ec)](){const _0x4f43c1=_0x423b2e;this[_0x4f43c1(0x20a)](this[_0x4f43c1(0x1fc)][_0x4f43c1(0x1ce)]['subscribe'](async _0x32dbf8=>{const _0xccf069=_0x4f43c1;var _0x2a3379,_0x207ce9,_0xc45812,_0x3e27cb;const _0x186a77=(_0x2a3379=this[_0xccf069(0x204)][_0xccf069(0x18f)](_0x32dbf8[_0xccf069(0x1a7)])['find'](_0x14e1da=>_0x14e1da[_0xccf069(0x1b5)]===_0x32dbf8[_0xccf069(0x1b5)]))==null?void 0x0:_0x2a3379[_0xccf069(0x1cd)];if(!_0x186a77)return;const {unitId:_0x363dac,subUnitId:_0x207ec6}=_0x186a77;switch(_0x32dbf8[_0xccf069(0x1a5)]&&this[_0xccf069(0x1a4)][_0xccf069(0x1d5)](_0x32dbf8[_0xccf069(0x1a5)]),_0x32dbf8['type']){case v['Add']:break;case v['Reply']:{this[_0xccf069(0x204)]['addComment'](_0x363dac,_0x207ec6,{'unitId':_0x363dac,'subUnitId':_0x207ec6,'ref':'','id':_0x32dbf8[_0xccf069(0x1d2)],'dT':f(+_0x32dbf8[_0xccf069(0x1ae)]),'threadId':_0x32dbf8['threadId'],'personId':(_0xc45812=(_0x207ce9=_0x32dbf8[_0xccf069(0x1a5)])==null?void 0x0:_0x207ce9[_0xccf069(0x1d8)])!=null?_0xc45812:_0x32dbf8[_0xccf069(0x1df)],'text':JSON[_0xccf069(0x1f7)](_0x32dbf8[_0xccf069(0x1c2)]),'parentId':_0x186a77['id']});break;}case v[_0xccf069(0x1aa)]:{const _0x146e4a=this[_0xccf069(0x204)]['getComment'](_0x363dac,_0x207ec6,_0x32dbf8[_0xccf069(0x1d2)]);_0x146e4a&&_0x146e4a[_0xccf069(0x1c6)]&&this[_0xccf069(0x204)][_0xccf069(0x1ee)](_0x363dac,_0x207ec6,_0x32dbf8[_0xccf069(0x1d2)]);break;}case v[_0xccf069(0x1e1)]:{this['_threadCommentModel'][_0xccf069(0x1f6)](_0x363dac,_0x207ec6,{'commentId':_0x32dbf8[_0xccf069(0x1d2)],'text':JSON[_0xccf069(0x1f7)](_0x32dbf8[_0xccf069(0x1c2)])});break;}case v['Solve']:{const _0x92f9c0=(_0x3e27cb=this[_0xccf069(0x204)]['getUnit'](_0x32dbf8[_0xccf069(0x1a7)])[_0xccf069(0x1b4)](_0x5bc6e1=>_0x5bc6e1['threadId']===_0x32dbf8['threadId']))==null?void 0x0:_0x3e27cb[_0xccf069(0x1cd)];_0x92f9c0&&this[_0xccf069(0x204)][_0xccf069(0x1fa)](_0x363dac,_0x207ec6,_0x92f9c0['id'],_0x32dbf8[_0xccf069(0x1bf)]===I[_0xccf069(0x1f2)]);break;}}}));}};p=E([S(0x0,c[_0x423b2e(0x1f9)](b[_0x423b2e(0x1a2)])),S(0x1,c[_0x423b2e(0x1f9)](M[_0x423b2e(0x1de)])),S(0x2,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x196)])),S(0x3,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x195)]))],p);const q='thread-comment-data-source.config',D={};function _0x50e2(_0x38f2c0,_0x3bee8b){const _0x295e61=_0x295e();return _0x50e2=function(_0x50e23e,_0xa9261d){_0x50e23e=_0x50e23e-0x18c;let _0xf3efc3=_0x295e61[_0x50e23e];return _0xf3efc3;},_0x50e2(_0x38f2c0,_0x3bee8b);}var A=Object[_0x423b2e(0x1ea)],x=(_0x165d6f,_0x3f9239,_0x113931,_0x2f695a)=>{const _0x2be4b5=_0x423b2e;for(var _0x3d8590=_0x2f695a>0x1?void 0x0:_0x2f695a?A(_0x3f9239,_0x113931):_0x3f9239,_0x49c512=_0x165d6f[_0x2be4b5(0x19f)]-0x1,_0x5a96be;_0x49c512>=0x0;_0x49c512--)(_0x5a96be=_0x165d6f[_0x49c512])&&(_0x3d8590=_0x5a96be(_0x3d8590)||_0x3d8590);return _0x3d8590;},_=(_0x480c3e,_0x49ea83)=>(_0x281878,_0x59c50c)=>_0x49ea83(_0x281878,_0x59c50c,_0x480c3e);function Y(_0x8dcb6b,_0x572c7a){const _0x2c94e6=_0x423b2e,_0x1ec727=_0x8dcb6b[_0x2c94e6(0x193)][0x0];return{..._0x572c7a,'id':_0x1ec727[_0x2c94e6(0x1d2)],'resolved':_0x8dcb6b[_0x2c94e6(0x1bf)]===0x1,'dT':f(_0x1ec727[_0x2c94e6(0x1ae)]),'personId':_0x1ec727[_0x2c94e6(0x1df)],'threadId':_0x1ec727['threadId']};}function G(_0x1219a3,_0x5d08b8,_0x204369){const _0x156f16=_0x423b2e;var _0x3bb440,_0x4d72b8;if(((_0x4d72b8=(_0x3bb440=_0x1219a3==null?void 0x0:_0x1219a3[_0x156f16(0x193)])==null?void 0x0:_0x3bb440[_0x156f16(0x19f)])!=null?_0x4d72b8:0x0)>0x0){const _0xa45b22=(_0x5df743,_0x3114a5)=>({'id':_0x5df743[_0x156f16(0x1d2)],'threadId':_0x5df743[_0x156f16(0x1b5)],'dT':f(_0x5df743['createTimestamp']),'personId':_0x5df743[_0x156f16(0x1df)],'resolved':_0x1219a3[_0x156f16(0x1bf)]===I[_0x156f16(0x1f2)],'unitId':_0x5d08b8,'subUnitId':_0x204369,'text':JSON['parse'](_0x5df743['content']),'parentId':_0x3114a5}),_0xb9ae43=_0xa45b22(_0x1219a3[_0x156f16(0x193)][0x0]);return{..._0xb9ae43,'children':_0x1219a3['replies'][_0x156f16(0x206)](0x1)[_0x156f16(0x1c1)](_0x487edc=>_0xa45b22(_0x487edc,_0xb9ae43['id']))};}return null;}let g=class{constructor(_0x47b7d3,_0x5e8683,_0x1340f3,_0x3bc2a7){const _0x823bbf=_0x423b2e;this['_httpService']=_0x47b7d3,this[_0x823bbf(0x1a4)]=_0x5e8683,this['_sessionService']=_0x1340f3,this[_0x823bbf(0x1cc)]=_0x3bc2a7;}async[_0x423b2e(0x1cf)](_0x5e0822){const _0xf03f13=_0x423b2e;var _0xea50c1,_0x1bdf8e;const {parentId:_0x30c70e,unitId:_0xbab247,text:_0x35a00c,threadId:_0x161729}=_0x5e0822,_0x1d13d3=(_0x1bdf8e=(_0xea50c1=_0x35a00c[_0xf03f13(0x203)])==null?void 0x0:_0xea50c1[_0xf03f13(0x1fd)](_0x3f1b2d=>_0x3f1b2d[_0xf03f13(0x1b0)]===c[_0xf03f13(0x19d)]['COMMENT'])[_0xf03f13(0x1c1)](_0x1c0093=>_0x1c0093['rangeId']))!=null?_0x1bdf8e:[],_0x3d059a=JSON['stringify'](_0x35a00c),_0x193c25=(await this[_0xf03f13(0x1e4)][_0xf03f13(0x1d3)](_0xbab247))[_0xf03f13(0x1b3)]();if(_0x30c70e){const _0x7b4ef1={'memberId':_0x193c25,'unitId':_0xbab247,'content':_0x3d059a,'mention':_0x1d13d3,'threadId':_0x161729},_0x409a37=(await this[_0xf03f13(0x18d)][_0xf03f13(0x1be)](_0xf03f13(0x1ed)+_0xbab247+'/reply',{'body':_0x7b4ef1}))['body'][_0xf03f13(0x1d9)];return{..._0x5e0822,'id':_0x409a37['replyId'],'dT':c['dayjs'](+_0x409a37[_0xf03f13(0x1ae)])['format'](_0xf03f13(0x202)),'personId':_0x409a37[_0xf03f13(0x1df)]};}else{const _0x1e0dc8={'memberId':_0x193c25,'unitId':_0xbab247,'content':_0x3d059a,'mention':_0x1d13d3},_0x2141d5=await this[_0xf03f13(0x18d)][_0xf03f13(0x1be)](_0xf03f13(0x1ed)+_0xbab247+'/add',{'body':_0x1e0dc8});return Y(_0x2141d5[_0xf03f13(0x207)]['comment'],_0x5e0822);}}async[_0x423b2e(0x1f6)](_0x5a545e){const _0x1185ad=_0x423b2e;var _0x1b479f,_0x1a0b18;const {text:_0x9b641f,unitId:_0x5dba18}=_0x5a545e,_0x54c8a8=(_0x1a0b18=(_0x1b479f=_0x9b641f['customRanges'])==null?void 0x0:_0x1b479f[_0x1185ad(0x1fd)](_0x26c5a1=>_0x26c5a1[_0x1185ad(0x1b0)]===c[_0x1185ad(0x19d)][_0x1185ad(0x1f5)])[_0x1185ad(0x1c1)](_0x348e49=>_0x348e49[_0x1185ad(0x1b8)]))!=null?_0x1a0b18:[],_0x2a86b3=JSON[_0x1185ad(0x1c7)](_0x9b641f),_0x2ef3cd=_0x5a545e[_0x1185ad(0x1b5)],_0x262916=_0x5a545e['id'],_0x340ab5={'memberId':(await this[_0x1185ad(0x1e4)][_0x1185ad(0x1d3)](_0x5dba18))[_0x1185ad(0x1b3)](),'unitId':_0x5dba18,'threadId':_0x2ef3cd,'mention':_0x54c8a8,'content':_0x2a86b3,'replyId':_0x262916},_0x41cf37=await this['_httpService'][_0x1185ad(0x1be)](_0x1185ad(0x1ed)+_0x5dba18+_0x1185ad(0x209),{'body':_0x340ab5});return!_0x41cf37[_0x1185ad(0x207)][_0x1185ad(0x1b9)]||_0x41cf37[_0x1185ad(0x207)][_0x1185ad(0x1b9)]['code']===0x1;}async[_0x423b2e(0x1fa)](_0x151f7a){const _0xb5ed5b=_0x423b2e,{unitId:_0x1c1381}=_0x151f7a,_0x23b245=_0x151f7a['threadId'],_0x29f3a4={'memberId':this[_0xb5ed5b(0x1a4)]['getCurrentUser']()[_0xb5ed5b(0x1d8)],'unitId':_0x1c1381,'threadId':_0x23b245,'solved':_0x151f7a[_0xb5ed5b(0x18e)]?I[_0xb5ed5b(0x1f2)]:I[_0xb5ed5b(0x1d6)]},_0x3473a2=await this[_0xb5ed5b(0x18d)][_0xb5ed5b(0x1be)]('/universer-api/comment/unit/'+_0x1c1381+_0xb5ed5b(0x194),{'body':_0x29f3a4});return!_0x3473a2[_0xb5ed5b(0x207)]['error']||_0x3473a2['body'][_0xb5ed5b(0x1b9)][_0xb5ed5b(0x1cb)]===0x1;}async[_0x423b2e(0x1ee)](_0x15c639,_0xdb1752,_0x2cf6c8,_0x341cbd){const _0x2f6242=_0x423b2e,_0x2f3750={'memberId':(await this[_0x2f6242(0x1e4)][_0x2f6242(0x1d3)](_0x15c639))[_0x2f6242(0x1b3)](),'threadId':_0x2cf6c8,'replyId':_0x341cbd,'unitId':_0x15c639},_0xc268a=await this['_httpService'][_0x2f6242(0x1be)](_0x2f6242(0x1ed)+_0x15c639+'/delete',{'body':_0x2f3750});return!_0xc268a[_0x2f6242(0x207)][_0x2f6242(0x1b9)]||_0xc268a['body'][_0x2f6242(0x1b9)]['code']===0x1;}async[_0x423b2e(0x1e0)](_0x2b14ed,_0x40d748,_0x503826){const _0x38e25b=_0x423b2e,_0x3960c1={'unitId':_0x2b14ed,'threadId':_0x503826},_0x18d6b6=await this['_httpService'][_0x38e25b(0x1be)](_0x38e25b(0x1ed)+_0x2b14ed+_0x38e25b(0x1bb),{'body':_0x3960c1}),_0x10a41b=_0x503826[_0x38e25b(0x1c1)](_0x4ae1ee=>G(_0x18d6b6[_0x38e25b(0x207)][_0x38e25b(0x1fb)][_0x4ae1ee],_0x2b14ed,_0x40d748))['filter'](Boolean);return Object[_0x38e25b(0x1a9)](_0x18d6b6[_0x38e25b(0x207)][_0x38e25b(0x19b)])['forEach'](_0x4047fc=>{const _0x22c347=_0x38e25b;this[_0x22c347(0x1a4)]['addUser'](_0x4047fc);}),_0x10a41b;}[_0x423b2e(0x1a3)](_0x5c5174){const _0x1aea9c=_0x423b2e;return{'id':_0x5c5174['id'],'threadId':_0x5c5174[_0x1aea9c(0x1b5)],'ref':_0x5c5174[_0x1aea9c(0x1f1)]};}};g=x([_(0x0,c[_0x423b2e(0x1f9)](P[_0x423b2e(0x199)])),_(0x1,c[_0x423b2e(0x1f9)](c['UserManagerService'])),_(0x2,c[_0x423b2e(0x1f9)](b[_0x423b2e(0x201)])),_(0x3,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x195)]))],g);var H=Object[_0x423b2e(0x1ea)],J=(_0x49b545,_0x4e7f0f,_0x2d384a,_0x2fde4b)=>{const _0x3f4474=_0x423b2e;for(var _0x30472b=_0x2fde4b>0x1?void 0x0:_0x2fde4b?H(_0x4e7f0f,_0x2d384a):_0x4e7f0f,_0x372321=_0x49b545[_0x3f4474(0x19f)]-0x1,_0x3d0178;_0x372321>=0x0;_0x372321--)(_0x3d0178=_0x49b545[_0x372321])&&(_0x30472b=_0x3d0178(_0x30472b)||_0x30472b);return _0x30472b;},y=(_0xe9c683,_0x5da431)=>(_0x41b4c7,_0x32d73f)=>_0x5da431(_0x41b4c7,_0x32d73f,_0xe9c683);let C=class extends c[_0x423b2e(0x1d0)]{constructor(_0x6ec03c,_0x57e70e){const _0x133f5f=_0x423b2e;super(),this['_threadCommentDataSourceService']=_0x6ec03c,this[_0x133f5f(0x192)]=_0x57e70e,this[_0x133f5f(0x1a6)]();}['_initDataSource'](){const _0x476039=_0x423b2e;this[_0x476039(0x18c)]['dataSource']=this[_0x476039(0x192)],this[_0x476039(0x18c)][_0x476039(0x1e8)]=!0x1;}};C=J([y(0x0,M[_0x423b2e(0x1a8)]),y(0x1,c[_0x423b2e(0x1f9)](g))],C);var F=Object[_0x423b2e(0x1d7)],L=Object[_0x423b2e(0x1ea)],Z=(_0x1cd2ff,_0x1a7920,_0x265a07)=>_0x1a7920 in _0x1cd2ff?F(_0x1cd2ff,_0x1a7920,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x265a07}):_0x1cd2ff[_0x1a7920]=_0x265a07,W=(_0x162a3f,_0x4cd38e,_0x5eb2eb,_0x4cba4c)=>{const _0x5c2e4e=_0x423b2e;for(var _0xf6b3fb=_0x4cba4c>0x1?void 0x0:_0x4cba4c?L(_0x4cd38e,_0x5eb2eb):_0x4cd38e,_0x1c0545=_0x162a3f[_0x5c2e4e(0x19f)]-0x1,_0x199f31;_0x1c0545>=0x0;_0x1c0545--)(_0x199f31=_0x162a3f[_0x1c0545])&&(_0xf6b3fb=_0x199f31(_0xf6b3fb)||_0xf6b3fb);return _0xf6b3fb;},O=(_0x1d244e,_0x5e85e2)=>(_0x220a0a,_0x3068a5)=>_0x5e85e2(_0x220a0a,_0x3068a5,_0x1d244e),N=(_0x7f7a20,_0x42b7ac,_0x179dbd)=>Z(_0x7f7a20,typeof _0x42b7ac!=_0x423b2e(0x1ab)?_0x42b7ac+'':_0x42b7ac,_0x179dbd);exports[_0x423b2e(0x1ff)]=class extends c[_0x423b2e(0x1ad)]{constructor(_0x19ba7b=D,_0x2b97da,_0x4e03fc){const _0x28770e=_0x423b2e;super(),this[_0x28770e(0x1bd)]=_0x19ba7b,this[_0x28770e(0x1cc)]=_0x2b97da,this[_0x28770e(0x1e9)]=_0x4e03fc;const {..._0x42fc72}=c[_0x28770e(0x1c5)]({},D,this['_config']);this[_0x28770e(0x1e9)]['setConfig'](q,_0x42fc72);}[_0x423b2e(0x1a1)](){const _0x41369d=_0x423b2e;[[g],[C],[p]][_0x41369d(0x1ca)](_0xa02cfb=>{const _0x5d2c51=_0x41369d;this['_injector'][_0x5d2c51(0x205)](_0xa02cfb);});}[_0x423b2e(0x1d1)](){const _0x43f829=_0x423b2e;this[_0x43f829(0x1cc)][_0x43f829(0x1c9)](C),this['_injector'][_0x43f829(0x1c9)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x423b2e(0x190),U),N(exports[_0x423b2e(0x1ff)],_0x423b2e(0x1e7),c[_0x423b2e(0x1fe)][_0x423b2e(0x1f3)]),exports[_0x423b2e(0x1ff)]=W([c[_0x423b2e(0x1dd)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x423b2e(0x19a)]),O(0x1,c[_0x423b2e(0x1f9)](c['Injector'])),O(0x2,c[_0x423b2e(0x1bc)])],exports[_0x423b2e(0x1ff)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3c5135=_0x3870;(function(_0xf589c2,_0x1e5a0f){const _0x1da3c8=_0x3870,_0x39f498=_0xf589c2();while(!![]){try{const _0x5e72cd=-parseInt(_0x1da3c8(0x1ea))/0x1+-parseInt(_0x1da3c8(0x1df))/0x2+-parseInt(_0x1da3c8(0x20d))/0x3*(-parseInt(_0x1da3c8(0x1e8))/0x4)+parseInt(_0x1da3c8(0x1ec))/0x5*(-parseInt(_0x1da3c8(0x205))/0x6)+-parseInt(_0x1da3c8(0x213))/0x7+-parseInt(_0x1da3c8(0x21d))/0x8*(parseInt(_0x1da3c8(0x1fb))/0x9)+-parseInt(_0x1da3c8(0x1dc))/0xa*(-parseInt(_0x1da3c8(0x239))/0xb);if(_0x5e72cd===_0x1e5a0f)break;else _0x39f498['push'](_0x39f498['shift']());}catch(_0x3ad3c3){_0x39f498['push'](_0x39f498['shift']());}}}(_0x589f,0xbdb36));import{CommentService as _0x88e89,CollaborationSessionService as _0x5838b0,UniverCollaborationClientPlugin as _0x3a92c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x527155}from'@univerjs-pro/license';import{dayjs as _0x4b45c4,UserManagerService as _0x186a88,Inject as _0x32221b,Injector as _0x111326,Disposable as _0x2d16e4,CustomRangeType as _0x59243c,UniverInstanceType as _0x128927,DependentOn as _0xb3f9ba,IConfigService as _0x4900d6,Plugin as _0x56778d,merge as _0x524225}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29173f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x403e63,IThreadCommentDataSourceService as _0x4c88ca}from'@univerjs/thread-comment';import{bufferTime as _0x52175c}from'rxjs';import{HTTPService as _0xaaaee1}from'@univerjs/network';const W=_0x3c5135(0x1f9);var I=(_0x4fa48b=>(_0x4fa48b[_0x4fa48b['OpenOrReOpen']=0x0]=_0x3c5135(0x1e9),_0x4fa48b[_0x4fa48b[_0x3c5135(0x214)]=0x1]='Solved',_0x4fa48b[_0x4fa48b[_0x3c5135(0x20f)]=-0x1]='UNRECOGNIZED',_0x4fa48b))(I||{}),v=(_0x1d24bb=>(_0x1d24bb[_0x1d24bb['Unknown']=0x0]=_0x3c5135(0x233),_0x1d24bb[_0x1d24bb[_0x3c5135(0x228)]=0x1]=_0x3c5135(0x228),_0x1d24bb[_0x1d24bb[_0x3c5135(0x1f7)]=0x2]=_0x3c5135(0x1f7),_0x1d24bb[_0x1d24bb[_0x3c5135(0x21b)]=0x3]=_0x3c5135(0x21b),_0x1d24bb[_0x1d24bb[_0x3c5135(0x235)]=0x4]='Delete',_0x1d24bb[_0x1d24bb[_0x3c5135(0x234)]=0x5]=_0x3c5135(0x234),_0x1d24bb[_0x1d24bb[_0x3c5135(0x20f)]=-0x1]=_0x3c5135(0x20f),_0x1d24bb))(v||{});const D=_0x4f7e37=>_0x4b45c4(new Date(+_0x4f7e37))[_0x3c5135(0x1f5)](_0x3c5135(0x226)),B=async(_0x440d64,_0x4db659)=>{const _0x4d1164=_0x3c5135,_0x24ee7e=_0x440d64[_0x4d1164(0x222)](_0x186a88),_0x126f20=_0x440d64[_0x4d1164(0x222)](_0xaaaee1);_0x4db659[_0x4d1164(0x212)](_0x5c10f8=>{const _0x348397=_0x4d1164;_0x24ee7e['getUser'](_0x5c10f8)&&_0x4db659[_0x348397(0x1fd)](_0x5c10f8);}),_0x4db659[_0x4d1164(0x230)]&&(await _0x126f20[_0x4d1164(0x222)](_0x4d1164(0x215),{'params':{'userIDs':[..._0x4db659]}}))[_0x4d1164(0x238)][_0x4d1164(0x1e6)][_0x4d1164(0x212)](_0x67e1c5=>{_0x67e1c5&&_0x24ee7e['addUser'](_0x67e1c5);});};var K=Object[_0x3c5135(0x1e4)],V=(_0x45df26,_0x3ffa4c,_0x52d654,_0x38ab98)=>{for(var _0x4e462d=_0x38ab98>0x1?void 0x0:_0x38ab98?K(_0x3ffa4c,_0x52d654):_0x3ffa4c,_0x1ae012=_0x45df26['length']-0x1,_0x1d22f1;_0x1ae012>=0x0;_0x1ae012--)(_0x1d22f1=_0x45df26[_0x1ae012])&&(_0x4e462d=_0x1d22f1(_0x4e462d)||_0x4e462d);return _0x4e462d;},p=(_0x21a251,_0x3a5b5e)=>(_0x12860a,_0x1f6bc1)=>_0x3a5b5e(_0x12860a,_0x1f6bc1,_0x21a251);let S=class extends _0x2d16e4{constructor(_0x5aaff0,_0x4b6645,_0x61df03,_0x3a243f){const _0x4ed865=_0x3c5135;super(),this[_0x4ed865(0x1ed)]=_0x5aaff0,this['_threadCommentModel']=_0x4b6645,this['_userService']=_0x61df03,this['_injector']=_0x3a243f,this[_0x4ed865(0x21f)](),this[_0x4ed865(0x20c)]();}[_0x3c5135(0x20c)](){const _0x1fa245=_0x3c5135;this[_0x1fa245(0x223)](this['_threadCommentModel']['commentUpdate$'][_0x1fa245(0x1ff)](_0x52175c(0x10))[_0x1fa245(0x1eb)](_0x564dd8=>{const _0x19e818=_0x1fa245,_0x29f946=new Set();_0x564dd8[_0x19e818(0x212)](_0x29cd07=>{const _0x286ef6=_0x19e818;switch(_0x29cd07[_0x286ef6(0x227)]){case _0x286ef6(0x200):{const _0x43116b=_0x29cd07['payload']['personId'];_0x29f946[_0x286ef6(0x200)](_0x43116b);break;}}}),B(this[_0x19e818(0x1fc)],_0x29f946);}));}[_0x3c5135(0x21f)](){const _0x2ed653=_0x3c5135;this['disposeWithMe'](this[_0x2ed653(0x1ed)][_0x2ed653(0x1f1)][_0x2ed653(0x1eb)](async _0x6c9454=>{const _0x4ef2e9=_0x2ed653;var _0x3c4d5d,_0xe53c3c,_0x2fda70,_0x159ea0;const _0x485b9a=(_0x3c4d5d=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])['find'](_0x210648=>_0x210648[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x3c4d5d[_0x4ef2e9(0x237)];if(!_0x485b9a)return;const {unitId:_0x344f7e,subUnitId:_0x2b07bb}=_0x485b9a;switch(_0x6c9454['user']&&this[_0x4ef2e9(0x217)]['addUser'](_0x6c9454['user']),_0x6c9454[_0x4ef2e9(0x227)]){case v['Add']:break;case v[_0x4ef2e9(0x1f7)]:{this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x232)](_0x344f7e,_0x2b07bb,{'unitId':_0x344f7e,'subUnitId':_0x2b07bb,'ref':'','id':_0x6c9454[_0x4ef2e9(0x219)],'dT':D(+_0x6c9454[_0x4ef2e9(0x22b)]),'threadId':_0x6c9454[_0x4ef2e9(0x21a)],'personId':(_0x2fda70=(_0xe53c3c=_0x6c9454['user'])==null?void 0x0:_0xe53c3c[_0x4ef2e9(0x22f)])!=null?_0x2fda70:_0x6c9454['userId'],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454[_0x4ef2e9(0x22e)]),'parentId':_0x485b9a['id']});break;}case v[_0x4ef2e9(0x235)]:{const _0x153564=this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x1e0)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);_0x153564&&_0x153564[_0x4ef2e9(0x1f3)]&&this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x216)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);break;}case v[_0x4ef2e9(0x21b)]:{this['_threadCommentModel'][_0x4ef2e9(0x23a)](_0x344f7e,_0x2b07bb,{'commentId':_0x6c9454[_0x4ef2e9(0x219)],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454['content'])});break;}case v[_0x4ef2e9(0x234)]:{const _0x51609b=(_0x159ea0=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])[_0x4ef2e9(0x224)](_0x458776=>_0x458776[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x159ea0['root'];_0x51609b&&this[_0x4ef2e9(0x1d9)]['resolveComment'](_0x344f7e,_0x2b07bb,_0x51609b['id'],_0x6c9454[_0x4ef2e9(0x1dd)]===I[_0x4ef2e9(0x214)]);break;}}}));}};S=V([p(0x0,_0x32221b(_0x88e89)),p(0x1,_0x32221b(_0x403e63)),p(0x2,_0x32221b(_0x186a88)),p(0x3,_0x32221b(_0x111326))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3c5135(0x1e4)],Q=(_0x1eb943,_0xfcac3c,_0x2075fe,_0x5ec63c)=>{for(var _0x2407cb=_0x5ec63c>0x1?void 0x0:_0x5ec63c?k(_0xfcac3c,_0x2075fe):_0xfcac3c,_0x8c097d=_0x1eb943['length']-0x1,_0x43c4f3;_0x8c097d>=0x0;_0x8c097d--)(_0x43c4f3=_0x1eb943[_0x8c097d])&&(_0x2407cb=_0x43c4f3(_0x2407cb)||_0x2407cb);return _0x2407cb;},_=(_0x512a06,_0x1144dc)=>(_0x27bd91,_0x29ad3f)=>_0x1144dc(_0x27bd91,_0x29ad3f,_0x512a06);function X(_0x19bf28,_0xab95db){const _0x1888b7=_0x3c5135,_0x15718b=_0x19bf28[_0x1888b7(0x202)][0x0];return{..._0xab95db,'id':_0x15718b[_0x1888b7(0x219)],'resolved':_0x19bf28['solved']===0x1,'dT':D(_0x15718b[_0x1888b7(0x22b)]),'personId':_0x15718b[_0x1888b7(0x1db)],'threadId':_0x15718b[_0x1888b7(0x21a)]};}function ee(_0x284771,_0x1a3f74,_0x4cd71d){const _0x27bb6=_0x3c5135;var _0x9fbd9d,_0x3dd20c;if(((_0x3dd20c=(_0x9fbd9d=_0x284771==null?void 0x0:_0x284771[_0x27bb6(0x202)])==null?void 0x0:_0x9fbd9d[_0x27bb6(0x20b)])!=null?_0x3dd20c:0x0)>0x0){const _0x5bfdfb=(_0x1e7ce7,_0x3d27a4)=>({'id':_0x1e7ce7[_0x27bb6(0x219)],'threadId':_0x1e7ce7[_0x27bb6(0x21a)],'dT':D(_0x1e7ce7[_0x27bb6(0x22b)]),'personId':_0x1e7ce7['userId'],'resolved':_0x284771[_0x27bb6(0x1dd)]===I['Solved'],'unitId':_0x1a3f74,'subUnitId':_0x4cd71d,'text':JSON[_0x27bb6(0x22c)](_0x1e7ce7[_0x27bb6(0x22e)]),'parentId':_0x3d27a4}),_0x40935b=_0x5bfdfb(_0x284771[_0x27bb6(0x202)][0x0]);return{..._0x40935b,'children':_0x284771[_0x27bb6(0x202)][_0x27bb6(0x1de)](0x1)[_0x27bb6(0x1f0)](_0x4d7dd6=>_0x5bfdfb(_0x4d7dd6,_0x40935b['id']))};}return null;}let f=class{constructor(_0x4a253c,_0x365c6d,_0x2feb75,_0x41793b){const _0x307d6a=_0x3c5135;this[_0x307d6a(0x1f4)]=_0x4a253c,this[_0x307d6a(0x217)]=_0x365c6d,this[_0x307d6a(0x1fa)]=_0x2feb75,this[_0x307d6a(0x1fc)]=_0x41793b;}async['addComment'](_0x263d3b){const _0x47d3a1=_0x3c5135;var _0x267c22,_0x2464e8;const {parentId:_0x211f52,unitId:_0x5a4f06,text:_0x11f849,threadId:_0x3ae703}=_0x263d3b,_0x4b0efd=(_0x2464e8=(_0x267c22=_0x11f849[_0x47d3a1(0x208)])==null?void 0x0:_0x267c22[_0x47d3a1(0x220)](_0x3d4fe0=>_0x3d4fe0[_0x47d3a1(0x236)]===_0x59243c['COMMENT'])['map'](_0x27206b=>_0x27206b['rangeId']))!=null?_0x2464e8:[],_0x143abe=JSON[_0x47d3a1(0x221)](_0x11f849),_0x4b3d4e=(await this[_0x47d3a1(0x1fa)][_0x47d3a1(0x1d8)](_0x5a4f06))[_0x47d3a1(0x203)]();if(_0x211f52){const _0x3dee42={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd,'threadId':_0x3ae703},_0x20e76c=(await this[_0x47d3a1(0x1f4)]['post'](_0x47d3a1(0x225)+_0x5a4f06+_0x47d3a1(0x1e3),{'body':_0x3dee42}))['body'][_0x47d3a1(0x1fe)];return{..._0x263d3b,'id':_0x20e76c[_0x47d3a1(0x219)],'dT':_0x4b45c4(+_0x20e76c[_0x47d3a1(0x22b)])[_0x47d3a1(0x1f5)](_0x47d3a1(0x226)),'personId':_0x20e76c[_0x47d3a1(0x1db)]};}else{const _0x34046d={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd},_0x2bb1cb=await this[_0x47d3a1(0x1f4)][_0x47d3a1(0x22d)]('/universer-api/comment/unit/'+_0x5a4f06+_0x47d3a1(0x22a),{'body':_0x34046d});return X(_0x2bb1cb[_0x47d3a1(0x238)][_0x47d3a1(0x1e7)],_0x263d3b);}}async[_0x3c5135(0x23a)](_0x575b70){const _0x16f867=_0x3c5135;var _0xa0702b,_0x14f95a;const {text:_0xa10731,unitId:_0x482b56}=_0x575b70,_0x1bf26e=(_0x14f95a=(_0xa0702b=_0xa10731['customRanges'])==null?void 0x0:_0xa0702b['filter'](_0x1b0ae6=>_0x1b0ae6['rangeType']===_0x59243c[_0x16f867(0x231)])[_0x16f867(0x1f0)](_0x102622=>_0x102622[_0x16f867(0x21e)]))!=null?_0x14f95a:[],_0x2dcc5e=JSON['stringify'](_0xa10731),_0x358060=_0x575b70[_0x16f867(0x21a)],_0x41bce4=_0x575b70['id'],_0x19de1e={'memberId':(await this['_sessionService'][_0x16f867(0x1d8)](_0x482b56))['getMemberID'](),'unitId':_0x482b56,'threadId':_0x358060,'mention':_0x1bf26e,'content':_0x2dcc5e,'replyId':_0x41bce4},_0x38025a=await this[_0x16f867(0x1f4)][_0x16f867(0x22d)](_0x16f867(0x225)+_0x482b56+_0x16f867(0x1f2),{'body':_0x19de1e});return!_0x38025a[_0x16f867(0x238)]['error']||_0x38025a['body'][_0x16f867(0x1f8)][_0x16f867(0x1e2)]===0x1;}async['resolveComment'](_0x3524a5){const _0x6d14be=_0x3c5135,{unitId:_0x550cc3}=_0x3524a5,_0xcc439d=_0x3524a5['threadId'],_0x257b07={'memberId':this['_userService'][_0x6d14be(0x1e5)]()[_0x6d14be(0x22f)],'unitId':_0x550cc3,'threadId':_0xcc439d,'solved':_0x3524a5[_0x6d14be(0x204)]?I[_0x6d14be(0x214)]:I[_0x6d14be(0x1e9)]},_0x1877d0=await this[_0x6d14be(0x1f4)][_0x6d14be(0x22d)](_0x6d14be(0x225)+_0x550cc3+_0x6d14be(0x209),{'body':_0x257b07});return!_0x1877d0[_0x6d14be(0x238)][_0x6d14be(0x1f8)]||_0x1877d0['body'][_0x6d14be(0x1f8)]['code']===0x1;}async[_0x3c5135(0x216)](_0x21826a,_0x5e0e6f,_0x5cc12d,_0x46a834){const _0xe9ab3f=_0x3c5135,_0xa17c5f={'memberId':(await this[_0xe9ab3f(0x1fa)][_0xe9ab3f(0x1d8)](_0x21826a))[_0xe9ab3f(0x203)](),'threadId':_0x5cc12d,'replyId':_0x46a834,'unitId':_0x21826a},_0x2c5599=await this[_0xe9ab3f(0x1f4)]['post'](_0xe9ab3f(0x225)+_0x21826a+_0xe9ab3f(0x20a),{'body':_0xa17c5f});return!_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)]||_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)][_0xe9ab3f(0x1e2)]===0x1;}async['listComments'](_0x2ed9a2,_0x10777e,_0x309b90){const _0x12da2f=_0x3c5135,_0x42c74f={'unitId':_0x2ed9a2,'threadId':_0x309b90},_0x1c353f=await this['_httpService'][_0x12da2f(0x22d)]('/universer-api/comment/unit/'+_0x2ed9a2+'/list',{'body':_0x42c74f}),_0x27dfae=_0x309b90[_0x12da2f(0x1f0)](_0x23c509=>ee(_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x21c)][_0x23c509],_0x2ed9a2,_0x10777e))[_0x12da2f(0x220)](Boolean);return Object[_0x12da2f(0x1e1)](_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x1e6)])[_0x12da2f(0x212)](_0x2b12ba=>{const _0x1cff92=_0x12da2f;this[_0x1cff92(0x217)]['addUser'](_0x2b12ba);}),_0x27dfae;}[_0x3c5135(0x1da)](_0x393ea6){const _0x233567=_0x3c5135;return{'id':_0x393ea6['id'],'threadId':_0x393ea6[_0x233567(0x21a)],'ref':_0x393ea6[_0x233567(0x1ee)]};}};f=Q([_(0x0,_0x32221b(_0xaaaee1)),_(0x1,_0x32221b(_0x186a88)),_(0x2,_0x32221b(_0x5838b0)),_(0x3,_0x32221b(_0x111326))],f);function _0x3870(_0x43a9b4,_0x424a26){const _0x589fd6=_0x589f();return _0x3870=function(_0x387005,_0x2f0107){_0x387005=_0x387005-0x1d8;let _0x3860e3=_0x589fd6[_0x387005];return _0x3860e3;},_0x3870(_0x43a9b4,_0x424a26);}var re=Object[_0x3c5135(0x1e4)],te=(_0xfecb85,_0x46e1d9,_0x2fe99e,_0x271384)=>{const _0xc5a04f=_0x3c5135;for(var _0x4cd31b=_0x271384>0x1?void 0x0:_0x271384?re(_0x46e1d9,_0x2fe99e):_0x46e1d9,_0x4f4796=_0xfecb85[_0xc5a04f(0x20b)]-0x1,_0x209202;_0x4f4796>=0x0;_0x4f4796--)(_0x209202=_0xfecb85[_0x4f4796])&&(_0x4cd31b=_0x209202(_0x4cd31b)||_0x4cd31b);return _0x4cd31b;},N=(_0x54ca7e,_0x35e2d7)=>(_0x36458b,_0x37f854)=>_0x35e2d7(_0x36458b,_0x37f854,_0x54ca7e);function _0x589f(){const _0x5c334a=['_userService','syncUpdateMutationToColla','replyId','threadId','Edit','comments','938104xjftjs','rangeId','_init','filter','stringify','get','disposeWithMe','find','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','type','Add','_initDataSource','/add','createTimestamp','parse','post','content','userID','size','COMMENT','addComment','Unknown','Solve','Delete','rangeType','root','body','979BgLDQe','updateComment','requireSession','_threadCommentModel','saveCommentToSnapshot','userId','537310cGEEAh','solved','slice','2872600lnARKO','getComment','values','code','/reply','getOwnPropertyDescriptor','getCurrentUser','users','comment','17708fVpgfC','OpenOrReOpen','955603zhCTqZ','subscribe','10kmFZmZ','_commentService','ref','UNIVER_UNKNOWN','map','commentUpdate$','/edit','parentId','_httpService','format','_threadCommentDataSourceService','Reply','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','99GPqoOj','_injector','delete','reply','pipe','add','unitId','replies','getMemberID','resolved','1805172nORszm','_config','getUnit','customRanges','/solved','/delete','length','_initUserSync','681FaUQtb','_threadCommentDataSource','UNRECOGNIZED','_configService','defineProperty','forEach','5085178klzQsT','Solved','/universer-api/user/list','deleteComment'];_0x589f=function(){return _0x5c334a;};return _0x589f();}let g=class extends _0x2d16e4{constructor(_0x18ada6,_0x2f1b0a){const _0x50fd59=_0x3c5135;super(),this[_0x50fd59(0x1f6)]=_0x18ada6,this['_threadCommentDataSource']=_0x2f1b0a,this[_0x50fd59(0x229)]();}[_0x3c5135(0x229)](){const _0x2f89fc=_0x3c5135;this[_0x2f89fc(0x1f6)]['dataSource']=this[_0x2f89fc(0x20e)],this['_threadCommentDataSourceService'][_0x2f89fc(0x218)]=!0x1;}};g=te([N(0x0,_0x4c88ca),N(0x1,_0x32221b(f))],g);var se=Object[_0x3c5135(0x211)],oe=Object[_0x3c5135(0x1e4)],ne=(_0x36138f,_0x4a24d2,_0x61eabb)=>_0x4a24d2 in _0x36138f?se(_0x36138f,_0x4a24d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x61eabb}):_0x36138f[_0x4a24d2]=_0x61eabb,ie=(_0x5afa63,_0x3c3311,_0x3ac9ed,_0xb96dba)=>{for(var _0x20b8ba=_0xb96dba>0x1?void 0x0:_0xb96dba?oe(_0x3c3311,_0x3ac9ed):_0x3c3311,_0xf9471=_0x5afa63['length']-0x1,_0x3d76f5;_0xf9471>=0x0;_0xf9471--)(_0x3d76f5=_0x5afa63[_0xf9471])&&(_0x20b8ba=_0x3d76f5(_0x20b8ba)||_0x20b8ba);return _0x20b8ba;},w=(_0x2dc217,_0x2dffd2)=>(_0x3c6bed,_0x4fcfdf)=>_0x2dffd2(_0x3c6bed,_0x4fcfdf,_0x2dc217),$=(_0x4f9efc,_0x3ace6a,_0x2308a6)=>ne(_0x4f9efc,typeof _0x3ace6a!='symbol'?_0x3ace6a+'':_0x3ace6a,_0x2308a6);let b=class extends _0x56778d{constructor(_0x56ec22=M,_0x41831b,_0x274651){const _0x413e0f=_0x3c5135;super(),this[_0x413e0f(0x206)]=_0x56ec22,this[_0x413e0f(0x1fc)]=_0x41831b,this['_configService']=_0x274651;const {..._0x1fb9e8}=_0x524225({},M,this['_config']);this[_0x413e0f(0x210)]['setConfig'](z,_0x1fb9e8);}['onStarting'](){const _0x19186e=_0x3c5135;[[f],[g],[S]][_0x19186e(0x212)](_0x2229ac=>{const _0x58642e=_0x19186e;this[_0x58642e(0x1fc)]['add'](_0x2229ac);});}['onReady'](){const _0x4ed5a4=_0x3c5135;this['_injector'][_0x4ed5a4(0x222)](g),this[_0x4ed5a4(0x1fc)][_0x4ed5a4(0x222)](S);}};$(b,'pluginName',W),$(b,_0x3c5135(0x227),_0x128927[_0x3c5135(0x1ef)]),b=ie([_0xb3f9ba(_0x29173f,_0x3a92c5,_0x527155),w(0x1,_0x32221b(_0x111326)),w(0x2,_0x4900d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3c5135=_0x3870;(function(_0xf589c2,_0x1e5a0f){const _0x1da3c8=_0x3870,_0x39f498=_0xf589c2();while(!![]){try{const _0x5e72cd=-parseInt(_0x1da3c8(0x1ea))/0x1+-parseInt(_0x1da3c8(0x1df))/0x2+-parseInt(_0x1da3c8(0x20d))/0x3*(-parseInt(_0x1da3c8(0x1e8))/0x4)+parseInt(_0x1da3c8(0x1ec))/0x5*(-parseInt(_0x1da3c8(0x205))/0x6)+-parseInt(_0x1da3c8(0x213))/0x7+-parseInt(_0x1da3c8(0x21d))/0x8*(parseInt(_0x1da3c8(0x1fb))/0x9)+-parseInt(_0x1da3c8(0x1dc))/0xa*(-parseInt(_0x1da3c8(0x239))/0xb);if(_0x5e72cd===_0x1e5a0f)break;else _0x39f498['push'](_0x39f498['shift']());}catch(_0x3ad3c3){_0x39f498['push'](_0x39f498['shift']());}}}(_0x589f,0xbdb36));import{CommentService as _0x88e89,CollaborationSessionService as _0x5838b0,UniverCollaborationClientPlugin as _0x3a92c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x527155}from'@univerjs-pro/license';import{dayjs as _0x4b45c4,UserManagerService as _0x186a88,Inject as _0x32221b,Injector as _0x111326,Disposable as _0x2d16e4,CustomRangeType as _0x59243c,UniverInstanceType as _0x128927,DependentOn as _0xb3f9ba,IConfigService as _0x4900d6,Plugin as _0x56778d,merge as _0x524225}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29173f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x403e63,IThreadCommentDataSourceService as _0x4c88ca}from'@univerjs/thread-comment';import{bufferTime as _0x52175c}from'rxjs';import{HTTPService as _0xaaaee1}from'@univerjs/network';const W=_0x3c5135(0x1f9);var I=(_0x4fa48b=>(_0x4fa48b[_0x4fa48b['OpenOrReOpen']=0x0]=_0x3c5135(0x1e9),_0x4fa48b[_0x4fa48b[_0x3c5135(0x214)]=0x1]='Solved',_0x4fa48b[_0x4fa48b[_0x3c5135(0x20f)]=-0x1]='UNRECOGNIZED',_0x4fa48b))(I||{}),v=(_0x1d24bb=>(_0x1d24bb[_0x1d24bb['Unknown']=0x0]=_0x3c5135(0x233),_0x1d24bb[_0x1d24bb[_0x3c5135(0x228)]=0x1]=_0x3c5135(0x228),_0x1d24bb[_0x1d24bb[_0x3c5135(0x1f7)]=0x2]=_0x3c5135(0x1f7),_0x1d24bb[_0x1d24bb[_0x3c5135(0x21b)]=0x3]=_0x3c5135(0x21b),_0x1d24bb[_0x1d24bb[_0x3c5135(0x235)]=0x4]='Delete',_0x1d24bb[_0x1d24bb[_0x3c5135(0x234)]=0x5]=_0x3c5135(0x234),_0x1d24bb[_0x1d24bb[_0x3c5135(0x20f)]=-0x1]=_0x3c5135(0x20f),_0x1d24bb))(v||{});const D=_0x4f7e37=>_0x4b45c4(new Date(+_0x4f7e37))[_0x3c5135(0x1f5)](_0x3c5135(0x226)),B=async(_0x440d64,_0x4db659)=>{const _0x4d1164=_0x3c5135,_0x24ee7e=_0x440d64[_0x4d1164(0x222)](_0x186a88),_0x126f20=_0x440d64[_0x4d1164(0x222)](_0xaaaee1);_0x4db659[_0x4d1164(0x212)](_0x5c10f8=>{const _0x348397=_0x4d1164;_0x24ee7e['getUser'](_0x5c10f8)&&_0x4db659[_0x348397(0x1fd)](_0x5c10f8);}),_0x4db659[_0x4d1164(0x230)]&&(await _0x126f20[_0x4d1164(0x222)](_0x4d1164(0x215),{'params':{'userIDs':[..._0x4db659]}}))[_0x4d1164(0x238)][_0x4d1164(0x1e6)][_0x4d1164(0x212)](_0x67e1c5=>{_0x67e1c5&&_0x24ee7e['addUser'](_0x67e1c5);});};var K=Object[_0x3c5135(0x1e4)],V=(_0x45df26,_0x3ffa4c,_0x52d654,_0x38ab98)=>{for(var _0x4e462d=_0x38ab98>0x1?void 0x0:_0x38ab98?K(_0x3ffa4c,_0x52d654):_0x3ffa4c,_0x1ae012=_0x45df26['length']-0x1,_0x1d22f1;_0x1ae012>=0x0;_0x1ae012--)(_0x1d22f1=_0x45df26[_0x1ae012])&&(_0x4e462d=_0x1d22f1(_0x4e462d)||_0x4e462d);return _0x4e462d;},p=(_0x21a251,_0x3a5b5e)=>(_0x12860a,_0x1f6bc1)=>_0x3a5b5e(_0x12860a,_0x1f6bc1,_0x21a251);let S=class extends _0x2d16e4{constructor(_0x5aaff0,_0x4b6645,_0x61df03,_0x3a243f){const _0x4ed865=_0x3c5135;super(),this[_0x4ed865(0x1ed)]=_0x5aaff0,this['_threadCommentModel']=_0x4b6645,this['_userService']=_0x61df03,this['_injector']=_0x3a243f,this[_0x4ed865(0x21f)](),this[_0x4ed865(0x20c)]();}[_0x3c5135(0x20c)](){const _0x1fa245=_0x3c5135;this[_0x1fa245(0x223)](this['_threadCommentModel']['commentUpdate$'][_0x1fa245(0x1ff)](_0x52175c(0x10))[_0x1fa245(0x1eb)](_0x564dd8=>{const _0x19e818=_0x1fa245,_0x29f946=new Set();_0x564dd8[_0x19e818(0x212)](_0x29cd07=>{const _0x286ef6=_0x19e818;switch(_0x29cd07[_0x286ef6(0x227)]){case _0x286ef6(0x200):{const _0x43116b=_0x29cd07['payload']['personId'];_0x29f946[_0x286ef6(0x200)](_0x43116b);break;}}}),B(this[_0x19e818(0x1fc)],_0x29f946);}));}[_0x3c5135(0x21f)](){const _0x2ed653=_0x3c5135;this['disposeWithMe'](this[_0x2ed653(0x1ed)][_0x2ed653(0x1f1)][_0x2ed653(0x1eb)](async _0x6c9454=>{const _0x4ef2e9=_0x2ed653;var _0x3c4d5d,_0xe53c3c,_0x2fda70,_0x159ea0;const _0x485b9a=(_0x3c4d5d=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])['find'](_0x210648=>_0x210648[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x3c4d5d[_0x4ef2e9(0x237)];if(!_0x485b9a)return;const {unitId:_0x344f7e,subUnitId:_0x2b07bb}=_0x485b9a;switch(_0x6c9454['user']&&this[_0x4ef2e9(0x217)]['addUser'](_0x6c9454['user']),_0x6c9454[_0x4ef2e9(0x227)]){case v['Add']:break;case v[_0x4ef2e9(0x1f7)]:{this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x232)](_0x344f7e,_0x2b07bb,{'unitId':_0x344f7e,'subUnitId':_0x2b07bb,'ref':'','id':_0x6c9454[_0x4ef2e9(0x219)],'dT':D(+_0x6c9454[_0x4ef2e9(0x22b)]),'threadId':_0x6c9454[_0x4ef2e9(0x21a)],'personId':(_0x2fda70=(_0xe53c3c=_0x6c9454['user'])==null?void 0x0:_0xe53c3c[_0x4ef2e9(0x22f)])!=null?_0x2fda70:_0x6c9454['userId'],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454[_0x4ef2e9(0x22e)]),'parentId':_0x485b9a['id']});break;}case v[_0x4ef2e9(0x235)]:{const _0x153564=this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x1e0)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);_0x153564&&_0x153564[_0x4ef2e9(0x1f3)]&&this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x216)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);break;}case v[_0x4ef2e9(0x21b)]:{this['_threadCommentModel'][_0x4ef2e9(0x23a)](_0x344f7e,_0x2b07bb,{'commentId':_0x6c9454[_0x4ef2e9(0x219)],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454['content'])});break;}case v[_0x4ef2e9(0x234)]:{const _0x51609b=(_0x159ea0=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])[_0x4ef2e9(0x224)](_0x458776=>_0x458776[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x159ea0['root'];_0x51609b&&this[_0x4ef2e9(0x1d9)]['resolveComment'](_0x344f7e,_0x2b07bb,_0x51609b['id'],_0x6c9454[_0x4ef2e9(0x1dd)]===I[_0x4ef2e9(0x214)]);break;}}}));}};S=V([p(0x0,_0x32221b(_0x88e89)),p(0x1,_0x32221b(_0x403e63)),p(0x2,_0x32221b(_0x186a88)),p(0x3,_0x32221b(_0x111326))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3c5135(0x1e4)],Q=(_0x1eb943,_0xfcac3c,_0x2075fe,_0x5ec63c)=>{for(var _0x2407cb=_0x5ec63c>0x1?void 0x0:_0x5ec63c?k(_0xfcac3c,_0x2075fe):_0xfcac3c,_0x8c097d=_0x1eb943['length']-0x1,_0x43c4f3;_0x8c097d>=0x0;_0x8c097d--)(_0x43c4f3=_0x1eb943[_0x8c097d])&&(_0x2407cb=_0x43c4f3(_0x2407cb)||_0x2407cb);return _0x2407cb;},_=(_0x512a06,_0x1144dc)=>(_0x27bd91,_0x29ad3f)=>_0x1144dc(_0x27bd91,_0x29ad3f,_0x512a06);function X(_0x19bf28,_0xab95db){const _0x1888b7=_0x3c5135,_0x15718b=_0x19bf28[_0x1888b7(0x202)][0x0];return{..._0xab95db,'id':_0x15718b[_0x1888b7(0x219)],'resolved':_0x19bf28['solved']===0x1,'dT':D(_0x15718b[_0x1888b7(0x22b)]),'personId':_0x15718b[_0x1888b7(0x1db)],'threadId':_0x15718b[_0x1888b7(0x21a)]};}function ee(_0x284771,_0x1a3f74,_0x4cd71d){const _0x27bb6=_0x3c5135;var _0x9fbd9d,_0x3dd20c;if(((_0x3dd20c=(_0x9fbd9d=_0x284771==null?void 0x0:_0x284771[_0x27bb6(0x202)])==null?void 0x0:_0x9fbd9d[_0x27bb6(0x20b)])!=null?_0x3dd20c:0x0)>0x0){const _0x5bfdfb=(_0x1e7ce7,_0x3d27a4)=>({'id':_0x1e7ce7[_0x27bb6(0x219)],'threadId':_0x1e7ce7[_0x27bb6(0x21a)],'dT':D(_0x1e7ce7[_0x27bb6(0x22b)]),'personId':_0x1e7ce7['userId'],'resolved':_0x284771[_0x27bb6(0x1dd)]===I['Solved'],'unitId':_0x1a3f74,'subUnitId':_0x4cd71d,'text':JSON[_0x27bb6(0x22c)](_0x1e7ce7[_0x27bb6(0x22e)]),'parentId':_0x3d27a4}),_0x40935b=_0x5bfdfb(_0x284771[_0x27bb6(0x202)][0x0]);return{..._0x40935b,'children':_0x284771[_0x27bb6(0x202)][_0x27bb6(0x1de)](0x1)[_0x27bb6(0x1f0)](_0x4d7dd6=>_0x5bfdfb(_0x4d7dd6,_0x40935b['id']))};}return null;}let f=class{constructor(_0x4a253c,_0x365c6d,_0x2feb75,_0x41793b){const _0x307d6a=_0x3c5135;this[_0x307d6a(0x1f4)]=_0x4a253c,this[_0x307d6a(0x217)]=_0x365c6d,this[_0x307d6a(0x1fa)]=_0x2feb75,this[_0x307d6a(0x1fc)]=_0x41793b;}async['addComment'](_0x263d3b){const _0x47d3a1=_0x3c5135;var _0x267c22,_0x2464e8;const {parentId:_0x211f52,unitId:_0x5a4f06,text:_0x11f849,threadId:_0x3ae703}=_0x263d3b,_0x4b0efd=(_0x2464e8=(_0x267c22=_0x11f849[_0x47d3a1(0x208)])==null?void 0x0:_0x267c22[_0x47d3a1(0x220)](_0x3d4fe0=>_0x3d4fe0[_0x47d3a1(0x236)]===_0x59243c['COMMENT'])['map'](_0x27206b=>_0x27206b['rangeId']))!=null?_0x2464e8:[],_0x143abe=JSON[_0x47d3a1(0x221)](_0x11f849),_0x4b3d4e=(await this[_0x47d3a1(0x1fa)][_0x47d3a1(0x1d8)](_0x5a4f06))[_0x47d3a1(0x203)]();if(_0x211f52){const _0x3dee42={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd,'threadId':_0x3ae703},_0x20e76c=(await this[_0x47d3a1(0x1f4)]['post'](_0x47d3a1(0x225)+_0x5a4f06+_0x47d3a1(0x1e3),{'body':_0x3dee42}))['body'][_0x47d3a1(0x1fe)];return{..._0x263d3b,'id':_0x20e76c[_0x47d3a1(0x219)],'dT':_0x4b45c4(+_0x20e76c[_0x47d3a1(0x22b)])[_0x47d3a1(0x1f5)](_0x47d3a1(0x226)),'personId':_0x20e76c[_0x47d3a1(0x1db)]};}else{const _0x34046d={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd},_0x2bb1cb=await this[_0x47d3a1(0x1f4)][_0x47d3a1(0x22d)]('/universer-api/comment/unit/'+_0x5a4f06+_0x47d3a1(0x22a),{'body':_0x34046d});return X(_0x2bb1cb[_0x47d3a1(0x238)][_0x47d3a1(0x1e7)],_0x263d3b);}}async[_0x3c5135(0x23a)](_0x575b70){const _0x16f867=_0x3c5135;var _0xa0702b,_0x14f95a;const {text:_0xa10731,unitId:_0x482b56}=_0x575b70,_0x1bf26e=(_0x14f95a=(_0xa0702b=_0xa10731['customRanges'])==null?void 0x0:_0xa0702b['filter'](_0x1b0ae6=>_0x1b0ae6['rangeType']===_0x59243c[_0x16f867(0x231)])[_0x16f867(0x1f0)](_0x102622=>_0x102622[_0x16f867(0x21e)]))!=null?_0x14f95a:[],_0x2dcc5e=JSON['stringify'](_0xa10731),_0x358060=_0x575b70[_0x16f867(0x21a)],_0x41bce4=_0x575b70['id'],_0x19de1e={'memberId':(await this['_sessionService'][_0x16f867(0x1d8)](_0x482b56))['getMemberID'](),'unitId':_0x482b56,'threadId':_0x358060,'mention':_0x1bf26e,'content':_0x2dcc5e,'replyId':_0x41bce4},_0x38025a=await this[_0x16f867(0x1f4)][_0x16f867(0x22d)](_0x16f867(0x225)+_0x482b56+_0x16f867(0x1f2),{'body':_0x19de1e});return!_0x38025a[_0x16f867(0x238)]['error']||_0x38025a['body'][_0x16f867(0x1f8)][_0x16f867(0x1e2)]===0x1;}async['resolveComment'](_0x3524a5){const _0x6d14be=_0x3c5135,{unitId:_0x550cc3}=_0x3524a5,_0xcc439d=_0x3524a5['threadId'],_0x257b07={'memberId':this['_userService'][_0x6d14be(0x1e5)]()[_0x6d14be(0x22f)],'unitId':_0x550cc3,'threadId':_0xcc439d,'solved':_0x3524a5[_0x6d14be(0x204)]?I[_0x6d14be(0x214)]:I[_0x6d14be(0x1e9)]},_0x1877d0=await this[_0x6d14be(0x1f4)][_0x6d14be(0x22d)](_0x6d14be(0x225)+_0x550cc3+_0x6d14be(0x209),{'body':_0x257b07});return!_0x1877d0[_0x6d14be(0x238)][_0x6d14be(0x1f8)]||_0x1877d0['body'][_0x6d14be(0x1f8)]['code']===0x1;}async[_0x3c5135(0x216)](_0x21826a,_0x5e0e6f,_0x5cc12d,_0x46a834){const _0xe9ab3f=_0x3c5135,_0xa17c5f={'memberId':(await this[_0xe9ab3f(0x1fa)][_0xe9ab3f(0x1d8)](_0x21826a))[_0xe9ab3f(0x203)](),'threadId':_0x5cc12d,'replyId':_0x46a834,'unitId':_0x21826a},_0x2c5599=await this[_0xe9ab3f(0x1f4)]['post'](_0xe9ab3f(0x225)+_0x21826a+_0xe9ab3f(0x20a),{'body':_0xa17c5f});return!_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)]||_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)][_0xe9ab3f(0x1e2)]===0x1;}async['listComments'](_0x2ed9a2,_0x10777e,_0x309b90){const _0x12da2f=_0x3c5135,_0x42c74f={'unitId':_0x2ed9a2,'threadId':_0x309b90},_0x1c353f=await this['_httpService'][_0x12da2f(0x22d)]('/universer-api/comment/unit/'+_0x2ed9a2+'/list',{'body':_0x42c74f}),_0x27dfae=_0x309b90[_0x12da2f(0x1f0)](_0x23c509=>ee(_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x21c)][_0x23c509],_0x2ed9a2,_0x10777e))[_0x12da2f(0x220)](Boolean);return Object[_0x12da2f(0x1e1)](_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x1e6)])[_0x12da2f(0x212)](_0x2b12ba=>{const _0x1cff92=_0x12da2f;this[_0x1cff92(0x217)]['addUser'](_0x2b12ba);}),_0x27dfae;}[_0x3c5135(0x1da)](_0x393ea6){const _0x233567=_0x3c5135;return{'id':_0x393ea6['id'],'threadId':_0x393ea6[_0x233567(0x21a)],'ref':_0x393ea6[_0x233567(0x1ee)]};}};f=Q([_(0x0,_0x32221b(_0xaaaee1)),_(0x1,_0x32221b(_0x186a88)),_(0x2,_0x32221b(_0x5838b0)),_(0x3,_0x32221b(_0x111326))],f);function _0x3870(_0x43a9b4,_0x424a26){const _0x589fd6=_0x589f();return _0x3870=function(_0x387005,_0x2f0107){_0x387005=_0x387005-0x1d8;let _0x3860e3=_0x589fd6[_0x387005];return _0x3860e3;},_0x3870(_0x43a9b4,_0x424a26);}var re=Object[_0x3c5135(0x1e4)],te=(_0xfecb85,_0x46e1d9,_0x2fe99e,_0x271384)=>{const _0xc5a04f=_0x3c5135;for(var _0x4cd31b=_0x271384>0x1?void 0x0:_0x271384?re(_0x46e1d9,_0x2fe99e):_0x46e1d9,_0x4f4796=_0xfecb85[_0xc5a04f(0x20b)]-0x1,_0x209202;_0x4f4796>=0x0;_0x4f4796--)(_0x209202=_0xfecb85[_0x4f4796])&&(_0x4cd31b=_0x209202(_0x4cd31b)||_0x4cd31b);return _0x4cd31b;},N=(_0x54ca7e,_0x35e2d7)=>(_0x36458b,_0x37f854)=>_0x35e2d7(_0x36458b,_0x37f854,_0x54ca7e);function _0x589f(){const _0x5c334a=['_userService','syncUpdateMutationToColla','replyId','threadId','Edit','comments','938104xjftjs','rangeId','_init','filter','stringify','get','disposeWithMe','find','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','type','Add','_initDataSource','/add','createTimestamp','parse','post','content','userID','size','COMMENT','addComment','Unknown','Solve','Delete','rangeType','root','body','979BgLDQe','updateComment','requireSession','_threadCommentModel','saveCommentToSnapshot','userId','537310cGEEAh','solved','slice','2872600lnARKO','getComment','values','code','/reply','getOwnPropertyDescriptor','getCurrentUser','users','comment','17708fVpgfC','OpenOrReOpen','955603zhCTqZ','subscribe','10kmFZmZ','_commentService','ref','UNIVER_UNKNOWN','map','commentUpdate$','/edit','parentId','_httpService','format','_threadCommentDataSourceService','Reply','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','99GPqoOj','_injector','delete','reply','pipe','add','unitId','replies','getMemberID','resolved','1805172nORszm','_config','getUnit','customRanges','/solved','/delete','length','_initUserSync','681FaUQtb','_threadCommentDataSource','UNRECOGNIZED','_configService','defineProperty','forEach','5085178klzQsT','Solved','/universer-api/user/list','deleteComment'];_0x589f=function(){return _0x5c334a;};return _0x589f();}let g=class extends _0x2d16e4{constructor(_0x18ada6,_0x2f1b0a){const _0x50fd59=_0x3c5135;super(),this[_0x50fd59(0x1f6)]=_0x18ada6,this['_threadCommentDataSource']=_0x2f1b0a,this[_0x50fd59(0x229)]();}[_0x3c5135(0x229)](){const _0x2f89fc=_0x3c5135;this[_0x2f89fc(0x1f6)]['dataSource']=this[_0x2f89fc(0x20e)],this['_threadCommentDataSourceService'][_0x2f89fc(0x218)]=!0x1;}};g=te([N(0x0,_0x4c88ca),N(0x1,_0x32221b(f))],g);var se=Object[_0x3c5135(0x211)],oe=Object[_0x3c5135(0x1e4)],ne=(_0x36138f,_0x4a24d2,_0x61eabb)=>_0x4a24d2 in _0x36138f?se(_0x36138f,_0x4a24d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x61eabb}):_0x36138f[_0x4a24d2]=_0x61eabb,ie=(_0x5afa63,_0x3c3311,_0x3ac9ed,_0xb96dba)=>{for(var _0x20b8ba=_0xb96dba>0x1?void 0x0:_0xb96dba?oe(_0x3c3311,_0x3ac9ed):_0x3c3311,_0xf9471=_0x5afa63['length']-0x1,_0x3d76f5;_0xf9471>=0x0;_0xf9471--)(_0x3d76f5=_0x5afa63[_0xf9471])&&(_0x20b8ba=_0x3d76f5(_0x20b8ba)||_0x20b8ba);return _0x20b8ba;},w=(_0x2dc217,_0x2dffd2)=>(_0x3c6bed,_0x4fcfdf)=>_0x2dffd2(_0x3c6bed,_0x4fcfdf,_0x2dc217),$=(_0x4f9efc,_0x3ace6a,_0x2308a6)=>ne(_0x4f9efc,typeof _0x3ace6a!='symbol'?_0x3ace6a+'':_0x3ace6a,_0x2308a6);let b=class extends _0x56778d{constructor(_0x56ec22=M,_0x41831b,_0x274651){const _0x413e0f=_0x3c5135;super(),this[_0x413e0f(0x206)]=_0x56ec22,this[_0x413e0f(0x1fc)]=_0x41831b,this['_configService']=_0x274651;const {..._0x1fb9e8}=_0x524225({},M,this['_config']);this[_0x413e0f(0x210)]['setConfig'](z,_0x1fb9e8);}['onStarting'](){const _0x19186e=_0x3c5135;[[f],[g],[S]][_0x19186e(0x212)](_0x2229ac=>{const _0x58642e=_0x19186e;this[_0x58642e(0x1fc)]['add'](_0x2229ac);});}['onReady'](){const _0x4ed5a4=_0x3c5135;this['_injector'][_0x4ed5a4(0x222)](g),this[_0x4ed5a4(0x1fc)][_0x4ed5a4(0x222)](S);}};$(b,'pluginName',W),$(b,_0x3c5135(0x227),_0x128927[_0x3c5135(0x1ef)]),b=ie([_0xb3f9ba(_0x29173f,_0x3a92c5,_0x527155),w(0x1,_0x32221b(_0x111326)),w(0x2,_0x4900d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1a3b(){const _0x5f4946=['22337090QKcsGM','reply','@univerjs/core','parse','_injector','get','@univerjs-pro/collaboration-client','9PJStME','addComment','UniverInstanceType','UniverThreadComment','Inject','pluginName','post','DependentOn','/list','add','find','type','root','@univerjs/thread-comment-ui','amd','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','rxjs','UniverCore','content','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','object','_configService','rangeType','map','31ZngTWj','UniverLicensePlugin','Solve','createTimestamp','setConfig','ThreadCommentModel','Injector','customRanges','_threadCommentModel','_init','onStarting','_sessionService','length','Delete','getComment','8pSHgIR','7731126ylLhFH','/universer-api/comment/unit/','/delete','values','parentId','personId','UniverNetwork','UserManagerService','getOwnPropertyDescriptor','/add','_threadCommentDataSourceService','commentUpdate$','_httpService','error','getMemberID','disposeWithMe','_initUserSync','ref','updateComment','1479948okIVtE','rangeId','_initDataSource','stringify','UNRECOGNIZED','delete','6349912NdYvAp','UniverProThreadCommentDatasource','filter','resolved','Edit','YYYY/MM/DD\x20HH:mm','Add','_commentService','Solved','OpenOrReOpen','IConfigService','getUnit','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','user','listComments','code','UniverThreadCommentUi','CollaborationSessionService','_config','Module','dayjs','8860159wyNqKh','body','CustomRangeType','requireSession','COMMENT','79334iFLXHJ','2155435uxpaYa','Disposable','saveCommentToSnapshot','slice','solved','@univerjs/thread-comment','format','subscribe','threadId','_threadCommentDataSource','forEach','HTTPService','/universer-api/user/list','getUser','comment','pipe','resolveComment','userId','addUser','replies','_userService','deleteComment','Reply','bufferTime','Unknown'];_0x1a3b=function(){return _0x5f4946;};return _0x1a3b();}function _0x3d08(_0xefa884,_0x12b092){const _0x1a3b03=_0x1a3b();return _0x3d08=function(_0x3d08f2,_0x489b3f){_0x3d08f2=_0x3d08f2-0x1da;let _0x185430=_0x1a3b03[_0x3d08f2];return _0x185430;},_0x3d08(_0xefa884,_0x12b092);}(function(_0x352dba,_0x5aba1b){const _0x2c6a1e=_0x3d08,_0x395d72=_0x352dba();while(!![]){try{const _0x9385c1=parseInt(_0x2c6a1e(0x20c))/0x1*(-parseInt(_0x2c6a1e(0x250))/0x2)+-parseInt(_0x2c6a1e(0x22f))/0x3*(-parseInt(_0x2c6a1e(0x21b))/0x4)+parseInt(_0x2c6a1e(0x251))/0x5+-parseInt(_0x2c6a1e(0x21c))/0x6+-parseInt(_0x2c6a1e(0x24b))/0x7+parseInt(_0x2c6a1e(0x235))/0x8+parseInt(_0x2c6a1e(0x1ef))/0x9*(parseInt(_0x2c6a1e(0x1e8))/0xa);if(_0x9385c1===_0x5aba1b)break;else _0x395d72['push'](_0x395d72['shift']());}catch(_0xd39e8a){_0x395d72['push'](_0x395d72['shift']());}}}(_0x1a3b,0xa16f0),function(_0x4f9d2c,_0xa10ccd){const _0x5ad4c7=_0x3d08;typeof exports==_0x5ad4c7(0x208)&&typeof module<'u'?_0xa10ccd(exports,require(_0x5ad4c7(0x1ee)),require(_0x5ad4c7(0x241)),require(_0x5ad4c7(0x1ea)),require(_0x5ad4c7(0x1fc)),require(_0x5ad4c7(0x256)),require('rxjs'),require(_0x5ad4c7(0x200))):typeof define=='function'&&define[_0x5ad4c7(0x1fd)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x5ad4c7(0x1fc),'@univerjs/thread-comment',_0x5ad4c7(0x201),_0x5ad4c7(0x200)],_0xa10ccd):(_0x4f9d2c=typeof globalThis<'u'?globalThis:_0x4f9d2c||self,_0xa10ccd(_0x4f9d2c[_0x5ad4c7(0x236)]={},_0x4f9d2c['UniverProCollaborationClient'],_0x4f9d2c['UniverProLicense'],_0x4f9d2c[_0x5ad4c7(0x202)],_0x4f9d2c[_0x5ad4c7(0x246)],_0x4f9d2c[_0x5ad4c7(0x1f2)],_0x4f9d2c[_0x5ad4c7(0x201)],_0x4f9d2c[_0x5ad4c7(0x222)]));}(this,function(_0x5d58c4,_0x3c22ee,_0x5e75e3,_0x34997e,_0x438e4f,_0x2dc169,_0x1cb9ba,_0x26368c){'use strict';const _0x14e1d3=_0x3d08;const _0x404f18=_0x14e1d3(0x205);var _0x3e00c0=(_0x278d7d=>(_0x278d7d[_0x278d7d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x278d7d[_0x278d7d['Solved']=0x1]='Solved',_0x278d7d[_0x278d7d[_0x14e1d3(0x233)]=-0x1]=_0x14e1d3(0x233),_0x278d7d))(_0x3e00c0||{}),_0x460808=(_0x188360=>(_0x188360[_0x188360[_0x14e1d3(0x1e7)]=0x0]='Unknown',_0x188360[_0x188360[_0x14e1d3(0x23b)]=0x1]='Add',_0x188360[_0x188360['Reply']=0x2]=_0x14e1d3(0x1e5),_0x188360[_0x188360[_0x14e1d3(0x239)]=0x3]=_0x14e1d3(0x239),_0x188360[_0x188360['Delete']=0x4]=_0x14e1d3(0x219),_0x188360[_0x188360[_0x14e1d3(0x20e)]=0x5]='Solve',_0x188360[_0x188360['UNRECOGNIZED']=-0x1]=_0x14e1d3(0x233),_0x188360))(_0x460808||{});const _0x11f57c=_0x8b9dc=>_0x34997e['dayjs'](new Date(+_0x8b9dc))[_0x14e1d3(0x257)](_0x14e1d3(0x23a)),_0x2cb561=async(_0x5850b3,_0xcd6991)=>{const _0xfffec1=_0x14e1d3,_0x42a9ca=_0x5850b3[_0xfffec1(0x1ed)](_0x34997e[_0xfffec1(0x223)]),_0x4913ea=_0x5850b3[_0xfffec1(0x1ed)](_0x26368c[_0xfffec1(0x1da)]);_0xcd6991['forEach'](_0x22a325=>{const _0x15d322=_0xfffec1;_0x42a9ca[_0x15d322(0x1dc)](_0x22a325)&&_0xcd6991[_0x15d322(0x234)](_0x22a325);}),_0xcd6991['size']&&(await _0x4913ea[_0xfffec1(0x1ed)](_0xfffec1(0x1db),{'params':{'userIDs':[..._0xcd6991]}}))[_0xfffec1(0x24c)]['users'][_0xfffec1(0x25b)](_0x27d92b=>{const _0x492d92=_0xfffec1;_0x27d92b&&_0x42a9ca[_0x492d92(0x1e1)](_0x27d92b);});};var _0x4b552b=Object[_0x14e1d3(0x224)],_0x6c0dc8=(_0x3c21ce,_0x2ee4e4,_0x539223,_0x3351cc)=>{const _0x51cfd4=_0x14e1d3;for(var _0x49befa=_0x3351cc>0x1?void 0x0:_0x3351cc?_0x4b552b(_0x2ee4e4,_0x539223):_0x2ee4e4,_0x1ba067=_0x3c21ce[_0x51cfd4(0x218)]-0x1,_0x35ae9f;_0x1ba067>=0x0;_0x1ba067--)(_0x35ae9f=_0x3c21ce[_0x1ba067])&&(_0x49befa=_0x35ae9f(_0x49befa)||_0x49befa);return _0x49befa;},_0x201133=(_0xb23236,_0x221b04)=>(_0xc1eee7,_0x4f0996)=>_0x221b04(_0xc1eee7,_0x4f0996,_0xb23236);let _0x219890=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0xeb6fed,_0x48fcfb,_0xc2573b,_0x46d009){const _0x4fa084=_0x14e1d3;super(),this[_0x4fa084(0x23c)]=_0xeb6fed,this['_threadCommentModel']=_0x48fcfb,this['_userService']=_0xc2573b,this[_0x4fa084(0x1ec)]=_0x46d009,this[_0x4fa084(0x215)](),this[_0x4fa084(0x22c)]();}[_0x14e1d3(0x22c)](){const _0x2a003d=_0x14e1d3;this[_0x2a003d(0x22b)](this['_threadCommentModel'][_0x2a003d(0x227)][_0x2a003d(0x1de)](_0x1cb9ba[_0x2a003d(0x1e6)](0x10))['subscribe'](_0x3e0eb6=>{const _0xa625e5=_0x2a003d,_0x5e0dcc=new Set();_0x3e0eb6[_0xa625e5(0x25b)](_0x438e4c=>{const _0x5e705c=_0xa625e5;switch(_0x438e4c[_0x5e705c(0x1fa)]){case _0x5e705c(0x1f8):{const _0x3fd311=_0x438e4c['payload'][_0x5e705c(0x221)];_0x5e0dcc['add'](_0x3fd311);break;}}}),_0x2cb561(this[_0xa625e5(0x1ec)],_0x5e0dcc);}));}[_0x14e1d3(0x215)](){const _0x2ea736=_0x14e1d3;this['disposeWithMe'](this[_0x2ea736(0x23c)][_0x2ea736(0x227)][_0x2ea736(0x258)](async _0x5e306c=>{const _0x21e224=_0x2ea736;var _0x154bfa,_0x4a0179,_0x56442f,_0x293449;const _0x264373=(_0x154bfa=this['_threadCommentModel'][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x5a07bf=>_0x5a07bf[_0x21e224(0x259)]===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x154bfa[_0x21e224(0x1fb)];if(!_0x264373)return;const {unitId:_0x3f930b,subUnitId:_0x3ec814}=_0x264373;switch(_0x5e306c['user']&&this['_userService']['addUser'](_0x5e306c[_0x21e224(0x243)]),_0x5e306c['type']){case _0x460808[_0x21e224(0x23b)]:break;case _0x460808['Reply']:{this[_0x21e224(0x214)][_0x21e224(0x1f0)](_0x3f930b,_0x3ec814,{'unitId':_0x3f930b,'subUnitId':_0x3ec814,'ref':'','id':_0x5e306c[_0x21e224(0x207)],'dT':_0x11f57c(+_0x5e306c[_0x21e224(0x20f)]),'threadId':_0x5e306c[_0x21e224(0x259)],'personId':(_0x56442f=(_0x4a0179=_0x5e306c[_0x21e224(0x243)])==null?void 0x0:_0x4a0179['userID'])!=null?_0x56442f:_0x5e306c[_0x21e224(0x1e0)],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)]),'parentId':_0x264373['id']});break;}case _0x460808[_0x21e224(0x219)]:{const _0x1e0eba=this[_0x21e224(0x214)][_0x21e224(0x21a)](_0x3f930b,_0x3ec814,_0x5e306c['replyId']);_0x1e0eba&&_0x1e0eba[_0x21e224(0x220)]&&this[_0x21e224(0x214)]['deleteComment'](_0x3f930b,_0x3ec814,_0x5e306c[_0x21e224(0x207)]);break;}case _0x460808['Edit']:{this[_0x21e224(0x214)][_0x21e224(0x22e)](_0x3f930b,_0x3ec814,{'commentId':_0x5e306c['replyId'],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)])});break;}case _0x460808[_0x21e224(0x20e)]:{const _0x1d55bc=(_0x293449=this[_0x21e224(0x214)][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x555cb7=>_0x555cb7['threadId']===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x293449[_0x21e224(0x1fb)];_0x1d55bc&&this['_threadCommentModel'][_0x21e224(0x1df)](_0x3f930b,_0x3ec814,_0x1d55bc['id'],_0x5e306c[_0x21e224(0x255)]===_0x3e00c0['Solved']);break;}}}));}};_0x219890=_0x6c0dc8([_0x201133(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x3c22ee['CommentService'])),_0x201133(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x2dc169[_0x14e1d3(0x211)])),_0x201133(0x2,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x223)])),_0x201133(0x3,_0x34997e['Inject'](_0x34997e[_0x14e1d3(0x212)]))],_0x219890);const _0x219f2d=_0x14e1d3(0x1ff),_0x40e0d1={};var _0x259a8d=Object[_0x14e1d3(0x224)],_0x1fc87a=(_0x2e4dfe,_0x2e753b,_0x26fdfa,_0x64c699)=>{const _0x4b5b39=_0x14e1d3;for(var _0x217336=_0x64c699>0x1?void 0x0:_0x64c699?_0x259a8d(_0x2e753b,_0x26fdfa):_0x2e753b,_0x56aba1=_0x2e4dfe[_0x4b5b39(0x218)]-0x1,_0x4462c0;_0x56aba1>=0x0;_0x56aba1--)(_0x4462c0=_0x2e4dfe[_0x56aba1])&&(_0x217336=_0x4462c0(_0x217336)||_0x217336);return _0x217336;},_0x14f142=(_0x365acf,_0x28d2ee)=>(_0x476f9b,_0x50053e)=>_0x28d2ee(_0x476f9b,_0x50053e,_0x365acf);function _0x349a8f(_0x50a91f,_0x2fceb6){const _0x1334b2=_0x14e1d3,_0x58490e=_0x50a91f[_0x1334b2(0x1e2)][0x0];return{..._0x2fceb6,'id':_0x58490e['replyId'],'resolved':_0x50a91f[_0x1334b2(0x255)]===0x1,'dT':_0x11f57c(_0x58490e[_0x1334b2(0x20f)]),'personId':_0x58490e[_0x1334b2(0x1e0)],'threadId':_0x58490e[_0x1334b2(0x259)]};}function _0x57d166(_0x90ee81,_0x1d4184,_0x477318){const _0x623ddd=_0x14e1d3;var _0x5cc5aa,_0x59d989;if(((_0x59d989=(_0x5cc5aa=_0x90ee81==null?void 0x0:_0x90ee81['replies'])==null?void 0x0:_0x5cc5aa['length'])!=null?_0x59d989:0x0)>0x0){const _0x460214=(_0x69c6fc,_0xe33c6d)=>({'id':_0x69c6fc[_0x623ddd(0x207)],'threadId':_0x69c6fc[_0x623ddd(0x259)],'dT':_0x11f57c(_0x69c6fc[_0x623ddd(0x20f)]),'personId':_0x69c6fc[_0x623ddd(0x1e0)],'resolved':_0x90ee81[_0x623ddd(0x255)]===_0x3e00c0[_0x623ddd(0x23d)],'unitId':_0x1d4184,'subUnitId':_0x477318,'text':JSON[_0x623ddd(0x1eb)](_0x69c6fc[_0x623ddd(0x203)]),'parentId':_0xe33c6d}),_0x4ed3f8=_0x460214(_0x90ee81['replies'][0x0]);return{..._0x4ed3f8,'children':_0x90ee81['replies'][_0x623ddd(0x254)](0x1)[_0x623ddd(0x20b)](_0x2dbc23=>_0x460214(_0x2dbc23,_0x4ed3f8['id']))};}return null;}let _0x3113e2=class{constructor(_0x1aa023,_0x2821d1,_0x30ebb,_0xe8b0c6){const _0x4af897=_0x14e1d3;this[_0x4af897(0x228)]=_0x1aa023,this[_0x4af897(0x1e3)]=_0x2821d1,this[_0x4af897(0x217)]=_0x30ebb,this[_0x4af897(0x1ec)]=_0xe8b0c6;}async[_0x14e1d3(0x1f0)](_0x4a7d34){const _0x353891=_0x14e1d3;var _0x129b13,_0x32791f;const {parentId:_0xb8c2fa,unitId:_0x122e83,text:_0x257e1f,threadId:_0x3e8e77}=_0x4a7d34,_0x20512=(_0x32791f=(_0x129b13=_0x257e1f[_0x353891(0x213)])==null?void 0x0:_0x129b13[_0x353891(0x237)](_0x570a00=>_0x570a00[_0x353891(0x20a)]===_0x34997e[_0x353891(0x24d)]['COMMENT'])[_0x353891(0x20b)](_0x360b48=>_0x360b48['rangeId']))!=null?_0x32791f:[],_0x3dad73=JSON[_0x353891(0x232)](_0x257e1f),_0x14f24f=(await this[_0x353891(0x217)][_0x353891(0x24e)](_0x122e83))[_0x353891(0x22a)]();if(_0xb8c2fa){const _0x3634f0={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512,'threadId':_0x3e8e77},_0x43bb2=(await this['_httpService'][_0x353891(0x1f5)]('/universer-api/comment/unit/'+_0x122e83+'/reply',{'body':_0x3634f0}))['body'][_0x353891(0x1e9)];return{..._0x4a7d34,'id':_0x43bb2[_0x353891(0x207)],'dT':_0x34997e[_0x353891(0x24a)](+_0x43bb2[_0x353891(0x20f)])['format'](_0x353891(0x23a)),'personId':_0x43bb2[_0x353891(0x1e0)]};}else{const _0x5d6317={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512},_0x49e0ee=await this['_httpService'][_0x353891(0x1f5)](_0x353891(0x21d)+_0x122e83+_0x353891(0x225),{'body':_0x5d6317});return _0x349a8f(_0x49e0ee[_0x353891(0x24c)][_0x353891(0x1dd)],_0x4a7d34);}}async[_0x14e1d3(0x22e)](_0x25b942){const _0x5b38b0=_0x14e1d3;var _0x5cd0fe,_0x43496f;const {text:_0x31a95b,unitId:_0x1e2c6c}=_0x25b942,_0x530513=(_0x43496f=(_0x5cd0fe=_0x31a95b[_0x5b38b0(0x213)])==null?void 0x0:_0x5cd0fe[_0x5b38b0(0x237)](_0x2c11be=>_0x2c11be[_0x5b38b0(0x20a)]===_0x34997e[_0x5b38b0(0x24d)][_0x5b38b0(0x24f)])[_0x5b38b0(0x20b)](_0xbd5b15=>_0xbd5b15[_0x5b38b0(0x230)]))!=null?_0x43496f:[],_0x51f19a=JSON['stringify'](_0x31a95b),_0xec6e91=_0x25b942[_0x5b38b0(0x259)],_0x2b1eab=_0x25b942['id'],_0x4691ad={'memberId':(await this['_sessionService'][_0x5b38b0(0x24e)](_0x1e2c6c))[_0x5b38b0(0x22a)](),'unitId':_0x1e2c6c,'threadId':_0xec6e91,'mention':_0x530513,'content':_0x51f19a,'replyId':_0x2b1eab},_0x4b3b78=await this[_0x5b38b0(0x228)][_0x5b38b0(0x1f5)](_0x5b38b0(0x21d)+_0x1e2c6c+'/edit',{'body':_0x4691ad});return!_0x4b3b78['body'][_0x5b38b0(0x229)]||_0x4b3b78['body']['error'][_0x5b38b0(0x245)]===0x1;}async['resolveComment'](_0x1fafcb){const _0x5df248=_0x14e1d3,{unitId:_0x36fcaf}=_0x1fafcb,_0x597812=_0x1fafcb[_0x5df248(0x259)],_0x443a1c={'memberId':this[_0x5df248(0x1e3)]['getCurrentUser']()['userID'],'unitId':_0x36fcaf,'threadId':_0x597812,'solved':_0x1fafcb[_0x5df248(0x238)]?_0x3e00c0[_0x5df248(0x23d)]:_0x3e00c0[_0x5df248(0x23e)]},_0x48fbde=await this['_httpService'][_0x5df248(0x1f5)](_0x5df248(0x21d)+_0x36fcaf+_0x5df248(0x206),{'body':_0x443a1c});return!_0x48fbde['body']['error']||_0x48fbde[_0x5df248(0x24c)][_0x5df248(0x229)][_0x5df248(0x245)]===0x1;}async[_0x14e1d3(0x1e4)](_0x5f1967,_0x51bf3a,_0x390939,_0x31ee6a){const _0x1de6aa=_0x14e1d3,_0x35ca10={'memberId':(await this[_0x1de6aa(0x217)][_0x1de6aa(0x24e)](_0x5f1967))['getMemberID'](),'threadId':_0x390939,'replyId':_0x31ee6a,'unitId':_0x5f1967},_0x1f66e0=await this['_httpService'][_0x1de6aa(0x1f5)](_0x1de6aa(0x21d)+_0x5f1967+_0x1de6aa(0x21e),{'body':_0x35ca10});return!_0x1f66e0[_0x1de6aa(0x24c)][_0x1de6aa(0x229)]||_0x1f66e0[_0x1de6aa(0x24c)]['error']['code']===0x1;}async[_0x14e1d3(0x244)](_0x992956,_0x132549,_0x12a19){const _0x467ac3=_0x14e1d3,_0x429ebc={'unitId':_0x992956,'threadId':_0x12a19},_0x100985=await this[_0x467ac3(0x228)]['post'](_0x467ac3(0x21d)+_0x992956+_0x467ac3(0x1f7),{'body':_0x429ebc}),_0x38c4ca=_0x12a19[_0x467ac3(0x20b)](_0x4a8cf8=>_0x57d166(_0x100985[_0x467ac3(0x24c)]['comments'][_0x4a8cf8],_0x992956,_0x132549))['filter'](Boolean);return Object[_0x467ac3(0x21f)](_0x100985[_0x467ac3(0x24c)]['users'])[_0x467ac3(0x25b)](_0x20cc85=>{const _0x230443=_0x467ac3;this[_0x230443(0x1e3)][_0x230443(0x1e1)](_0x20cc85);}),_0x38c4ca;}[_0x14e1d3(0x253)](_0x9b58d){const _0x9ba0e3=_0x14e1d3;return{'id':_0x9b58d['id'],'threadId':_0x9b58d['threadId'],'ref':_0x9b58d[_0x9ba0e3(0x22d)]};}};_0x3113e2=_0x1fc87a([_0x14f142(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x26368c[_0x14e1d3(0x1da)])),_0x14f142(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['UserManagerService'])),_0x14f142(0x2,_0x34997e['Inject'](_0x3c22ee[_0x14e1d3(0x247)])),_0x14f142(0x3,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['Injector']))],_0x3113e2);var _0x364e8e=Object[_0x14e1d3(0x224)],_0x4c5a77=(_0x4f508b,_0x43710b,_0x53e5e6,_0x552bfd)=>{const _0x528999=_0x14e1d3;for(var _0x5a7ad8=_0x552bfd>0x1?void 0x0:_0x552bfd?_0x364e8e(_0x43710b,_0x53e5e6):_0x43710b,_0xac2530=_0x4f508b[_0x528999(0x218)]-0x1,_0x1c9561;_0xac2530>=0x0;_0xac2530--)(_0x1c9561=_0x4f508b[_0xac2530])&&(_0x5a7ad8=_0x1c9561(_0x5a7ad8)||_0x5a7ad8);return _0x5a7ad8;},_0x1ca1d5=(_0x2d74bc,_0x401883)=>(_0x24d92c,_0x5bf1f7)=>_0x401883(_0x24d92c,_0x5bf1f7,_0x2d74bc);let _0x34c2ef=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0x31f41e,_0x347547){const _0x5b6df8=_0x14e1d3;super(),this[_0x5b6df8(0x226)]=_0x31f41e,this[_0x5b6df8(0x25a)]=_0x347547,this[_0x5b6df8(0x231)]();}[_0x14e1d3(0x231)](){const _0xd44fef=_0x14e1d3;this['_threadCommentDataSourceService']['dataSource']=this[_0xd44fef(0x25a)],this[_0xd44fef(0x226)]['syncUpdateMutationToColla']=!0x1;}};_0x34c2ef=_0x4c5a77([_0x1ca1d5(0x0,_0x2dc169['IThreadCommentDataSourceService']),_0x1ca1d5(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x3113e2))],_0x34c2ef);var _0x5cf7ee=Object['defineProperty'],_0x81077c=Object[_0x14e1d3(0x224)],_0x9ffec6=(_0x2e077f,_0x2a1922,_0x2e6a04)=>_0x2a1922 in _0x2e077f?_0x5cf7ee(_0x2e077f,_0x2a1922,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e6a04}):_0x2e077f[_0x2a1922]=_0x2e6a04,_0xe0623c=(_0x590ebe,_0x19f1d3,_0x461d14,_0x55a07c)=>{const _0x483153=_0x14e1d3;for(var _0x1f7857=_0x55a07c>0x1?void 0x0:_0x55a07c?_0x81077c(_0x19f1d3,_0x461d14):_0x19f1d3,_0x450586=_0x590ebe[_0x483153(0x218)]-0x1,_0x20fd4e;_0x450586>=0x0;_0x450586--)(_0x20fd4e=_0x590ebe[_0x450586])&&(_0x1f7857=_0x20fd4e(_0x1f7857)||_0x1f7857);return _0x1f7857;},_0xc64092=(_0x2dce45,_0x290dec)=>(_0x400ce9,_0x342bfa)=>_0x290dec(_0x400ce9,_0x342bfa,_0x2dce45),_0x53b8cb=(_0x9ad304,_0x64fec3,_0x4ee082)=>_0x9ffec6(_0x9ad304,typeof _0x64fec3!='symbol'?_0x64fec3+'':_0x64fec3,_0x4ee082);_0x5d58c4[_0x14e1d3(0x242)]=class extends _0x34997e['Plugin']{constructor(_0x174c86=_0x40e0d1,_0x362f6b,_0x220d45){const _0x2c32cc=_0x14e1d3;super(),this[_0x2c32cc(0x248)]=_0x174c86,this[_0x2c32cc(0x1ec)]=_0x362f6b,this['_configService']=_0x220d45;const {..._0x36e29b}=_0x34997e[_0x2c32cc(0x204)]({},_0x40e0d1,this[_0x2c32cc(0x248)]);this[_0x2c32cc(0x209)][_0x2c32cc(0x210)](_0x219f2d,_0x36e29b);}[_0x14e1d3(0x216)](){[[_0x3113e2],[_0x34c2ef],[_0x219890]]['forEach'](_0x3f7ca7=>{this['_injector']['add'](_0x3f7ca7);});}['onReady'](){const _0x23ce61=_0x14e1d3;this[_0x23ce61(0x1ec)]['get'](_0x34c2ef),this[_0x23ce61(0x1ec)][_0x23ce61(0x1ed)](_0x219890);}},_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1f4),_0x404f18),_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1fa),_0x34997e[_0x14e1d3(0x1f1)]['UNIVER_UNKNOWN']),_0x5d58c4[_0x14e1d3(0x242)]=_0xe0623c([_0x34997e[_0x14e1d3(0x1f6)](_0x438e4f[_0x14e1d3(0x1fe)],_0x3c22ee['UniverCollaborationClientPlugin'],_0x5e75e3[_0x14e1d3(0x20d)]),_0xc64092(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x212)])),_0xc64092(0x2,_0x34997e[_0x14e1d3(0x23f)])],_0x5d58c4[_0x14e1d3(0x242)]),Object['defineProperty'](_0x5d58c4,Symbol['toStringTag'],{'value':_0x14e1d3(0x249)});}));
1
+ function _0x4ed8(){const _0x39b5c9=['1800189FEZlii','DependentOn','Add','format','47047avbLeC','_sessionService','@univerjs-pro/collaboration-client','rangeId','error','forEach','userId','root','resolveComment','_initUserSync','unitId','2076879dLdPVG','object','/universer-api/user/list','/list','threadId','users','thread-comment-data-source.config','stringify','/solved','dataSource','requireSession','post','_initDataSource','Edit','subscribe','298671OheraZ','length','solved','89228OYDmMC','Disposable','addComment','body','parentId','UniverLicensePlugin','personId','reply','type','/reply','getMemberID','YYYY/MM/DD\x20HH:mm','Solve','CollaborationSessionService','@univerjs-pro/license','Solved','deleteComment','size','@univerjs/thread-comment-ui','8ARuAgR','UserManagerService','UniverInstanceType','1870446JUBfCC','/add','_config','content','code','Delete','UniverCore','OpenOrReOpen','_configService','map','516524QNJctx','_httpService','Module','getCurrentUser','replyId','@univerjs/network','/edit','getOwnPropertyDescriptor','replies','addUser','Injector','_threadCommentDataSourceService','onStarting','commentUpdate$','rangeType','Inject','amd','IThreadCommentDataSourceService','defineProperty','UNRECOGNIZED','syncUpdateMutationToColla','/delete','CustomRangeType','filter','delete','getUnit','find','@univerjs/thread-comment','COMMENT','parse','user','add','HTTPService','_commentService','_threadCommentModel','Plugin','disposeWithMe','listComments','rxjs','65EOTbVL','function','_userService','UniverNetwork','UniverThreadCommentUIPlugin','get','updateComment','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','pluginName','Unknown','createTimestamp','getUser','/universer-api/comment/unit/','comments','exports','UniverThreadComment','IConfigService','UniverProThreadCommentDatasource','dayjs','_init','_injector','bufferTime','UniverThreadCommentDataSourcePlugin'];_0x4ed8=function(){return _0x39b5c9;};return _0x4ed8();}function _0x1d5a(_0x573fae,_0x331d25){const _0x4ed850=_0x4ed8();return _0x1d5a=function(_0x1d5aad,_0x1f48cb){_0x1d5aad=_0x1d5aad-0x9c;let _0xd6ed26=_0x4ed850[_0x1d5aad];return _0xd6ed26;},_0x1d5a(_0x573fae,_0x331d25);}(function(_0x152de4,_0x22dc36){const _0x227d0a=_0x1d5a,_0x467f22=_0x152de4();while(!![]){try{const _0x5d9bde=-parseInt(_0x227d0a(0x114))/0x1+parseInt(_0x227d0a(0xd0))/0x2+parseInt(_0x227d0a(0xad))/0x3+-parseInt(_0x227d0a(0xb0))/0x4*(parseInt(_0x227d0a(0xf7))/0x5)+-parseInt(_0x227d0a(0xc6))/0x6+parseInt(_0x227d0a(0x9e))/0x7*(parseInt(_0x227d0a(0xc3))/0x8)+parseInt(_0x227d0a(0x110))/0x9;if(_0x5d9bde===_0x22dc36)break;else _0x467f22['push'](_0x467f22['shift']());}catch(_0x28d5a3){_0x467f22['push'](_0x467f22['shift']());}}}(_0x4ed8,0x323be),function(_0x25a8e0,_0xbbc4ab){const _0x355418=_0x1d5a;typeof exports==_0x355418(0x9f)&&typeof module<'u'?_0xbbc4ab(exports,require(_0x355418(0x116)),require('@univerjs-pro/license'),require(_0x355418(0x100)),require('@univerjs/thread-comment-ui'),require(_0x355418(0xeb)),require(_0x355418(0xf6)),require(_0x355418(0xd5))):typeof define==_0x355418(0xf8)&&define[_0x355418(0xe0)]?define([_0x355418(0x107),'@univerjs-pro/collaboration-client',_0x355418(0xbe),'@univerjs/core',_0x355418(0xc2),'@univerjs/thread-comment',_0x355418(0xf6),'@univerjs/network'],_0xbbc4ab):(_0x25a8e0=typeof globalThis<'u'?globalThis:_0x25a8e0||self,_0xbbc4ab(_0x25a8e0[_0x355418(0x10a)]={},_0x25a8e0['UniverProCollaborationClient'],_0x25a8e0['UniverProLicense'],_0x25a8e0[_0x355418(0xcc)],_0x25a8e0['UniverThreadCommentUi'],_0x25a8e0[_0x355418(0x108)],_0x25a8e0[_0x355418(0xf6)],_0x25a8e0[_0x355418(0xfa)]));}(this,function(_0x8187aa,_0x1765f4,_0x3d651f,_0x4c4d36,_0x2c95e6,_0x10f783,_0x5166ce,_0x34a951){'use strict';const _0x3f7229=_0x1d5a;const _0x22324a=_0x3f7229(0xff);var _0x13ea5d=(_0x4b79ff=>(_0x4b79ff[_0x4b79ff[_0x3f7229(0xcd)]=0x0]='OpenOrReOpen',_0x4b79ff[_0x4b79ff[_0x3f7229(0xbf)]=0x1]=_0x3f7229(0xbf),_0x4b79ff[_0x4b79ff[_0x3f7229(0xe3)]=-0x1]='UNRECOGNIZED',_0x4b79ff))(_0x13ea5d||{}),_0x3efbb5=(_0x2056be=>(_0x2056be[_0x2056be[_0x3f7229(0x102)]=0x0]=_0x3f7229(0x102),_0x2056be[_0x2056be['Add']=0x1]='Add',_0x2056be[_0x2056be['Reply']=0x2]='Reply',_0x2056be[_0x2056be[_0x3f7229(0xab)]=0x3]=_0x3f7229(0xab),_0x2056be[_0x2056be['Delete']=0x4]=_0x3f7229(0xcb),_0x2056be[_0x2056be[_0x3f7229(0xbc)]=0x5]=_0x3f7229(0xbc),_0x2056be[_0x2056be[_0x3f7229(0xe3)]=-0x1]='UNRECOGNIZED',_0x2056be))(_0x3efbb5||{});const _0x53b4fb=_0x3c34c5=>_0x4c4d36[_0x3f7229(0x10b)](new Date(+_0x3c34c5))[_0x3f7229(0x113)](_0x3f7229(0xbb)),_0x1b0836=async(_0xa086a,_0x6a9cd6)=>{const _0x3b0615=_0x3f7229,_0x2bde16=_0xa086a['get'](_0x4c4d36[_0x3b0615(0xc4)]),_0x4f104d=_0xa086a[_0x3b0615(0xfc)](_0x34a951[_0x3b0615(0xf0)]);_0x6a9cd6['forEach'](_0x2cfee2=>{const _0x2b9e31=_0x3b0615;_0x2bde16[_0x2b9e31(0x104)](_0x2cfee2)&&_0x6a9cd6[_0x2b9e31(0xe8)](_0x2cfee2);}),_0x6a9cd6[_0x3b0615(0xc1)]&&(await _0x4f104d[_0x3b0615(0xfc)](_0x3b0615(0xa0),{'params':{'userIDs':[..._0x6a9cd6]}}))[_0x3b0615(0xb3)][_0x3b0615(0xa3)][_0x3b0615(0x119)](_0xac267e=>{const _0x265049=_0x3b0615;_0xac267e&&_0x2bde16[_0x265049(0xd9)](_0xac267e);});};var _0x3fd38d=Object[_0x3f7229(0xd7)],_0x3a156b=(_0x3f02ed,_0x305ea8,_0x182cbf,_0x522e7b)=>{for(var _0x260381=_0x522e7b>0x1?void 0x0:_0x522e7b?_0x3fd38d(_0x305ea8,_0x182cbf):_0x305ea8,_0x33db2b=_0x3f02ed['length']-0x1,_0x331c40;_0x33db2b>=0x0;_0x33db2b--)(_0x331c40=_0x3f02ed[_0x33db2b])&&(_0x260381=_0x331c40(_0x260381)||_0x260381);return _0x260381;},_0x191102=(_0x566650,_0x34edf3)=>(_0x1ba545,_0x36aaf0)=>_0x34edf3(_0x1ba545,_0x36aaf0,_0x566650);let _0x2c0684=class extends _0x4c4d36[_0x3f7229(0xb1)]{constructor(_0x5dbe4d,_0x4ef742,_0x57b5ee,_0x2e69a8){const _0x9d130f=_0x3f7229;super(),this[_0x9d130f(0xf1)]=_0x5dbe4d,this[_0x9d130f(0xf2)]=_0x4ef742,this['_userService']=_0x57b5ee,this[_0x9d130f(0x10d)]=_0x2e69a8,this[_0x9d130f(0x10c)](),this[_0x9d130f(0x9c)]();}[_0x3f7229(0x9c)](){const _0x56e782=_0x3f7229;this[_0x56e782(0xf4)](this[_0x56e782(0xf2)][_0x56e782(0xdd)]['pipe'](_0x5166ce[_0x56e782(0x10e)](0x10))[_0x56e782(0xac)](_0x3ec44c=>{const _0x5b4e4d=_0x56e782,_0xd43d61=new Set();_0x3ec44c[_0x5b4e4d(0x119)](_0x1da153=>{const _0x506aa9=_0x5b4e4d;switch(_0x1da153[_0x506aa9(0xb8)]){case _0x506aa9(0xef):{const _0x439b3c=_0x1da153['payload'][_0x506aa9(0xb6)];_0xd43d61['add'](_0x439b3c);break;}}}),_0x1b0836(this['_injector'],_0xd43d61);}));}[_0x3f7229(0x10c)](){const _0x2917ab=_0x3f7229;this[_0x2917ab(0xf4)](this[_0x2917ab(0xf1)][_0x2917ab(0xdd)][_0x2917ab(0xac)](async _0x406edf=>{const _0x1e04ce=_0x2917ab;var _0x3de239,_0x36cb99,_0x11621e,_0x263e72;const _0xb27700=(_0x3de239=this[_0x1e04ce(0xf2)][_0x1e04ce(0xe9)](_0x406edf['unitId'])['find'](_0x408560=>_0x408560['threadId']===_0x406edf[_0x1e04ce(0xa2)]))==null?void 0x0:_0x3de239[_0x1e04ce(0x11b)];if(!_0xb27700)return;const {unitId:_0x1eefa5,subUnitId:_0x4db26a}=_0xb27700;switch(_0x406edf[_0x1e04ce(0xee)]&&this[_0x1e04ce(0xf9)][_0x1e04ce(0xd9)](_0x406edf['user']),_0x406edf['type']){case _0x3efbb5[_0x1e04ce(0x112)]:break;case _0x3efbb5['Reply']:{this[_0x1e04ce(0xf2)][_0x1e04ce(0xb2)](_0x1eefa5,_0x4db26a,{'unitId':_0x1eefa5,'subUnitId':_0x4db26a,'ref':'','id':_0x406edf[_0x1e04ce(0xd4)],'dT':_0x53b4fb(+_0x406edf[_0x1e04ce(0x103)]),'threadId':_0x406edf[_0x1e04ce(0xa2)],'personId':(_0x11621e=(_0x36cb99=_0x406edf[_0x1e04ce(0xee)])==null?void 0x0:_0x36cb99['userID'])!=null?_0x11621e:_0x406edf['userId'],'text':JSON[_0x1e04ce(0xed)](_0x406edf['content']),'parentId':_0xb27700['id']});break;}case _0x3efbb5[_0x1e04ce(0xcb)]:{const _0x50b5c6=this[_0x1e04ce(0xf2)]['getComment'](_0x1eefa5,_0x4db26a,_0x406edf[_0x1e04ce(0xd4)]);_0x50b5c6&&_0x50b5c6[_0x1e04ce(0xb4)]&&this[_0x1e04ce(0xf2)][_0x1e04ce(0xc0)](_0x1eefa5,_0x4db26a,_0x406edf[_0x1e04ce(0xd4)]);break;}case _0x3efbb5['Edit']:{this[_0x1e04ce(0xf2)]['updateComment'](_0x1eefa5,_0x4db26a,{'commentId':_0x406edf[_0x1e04ce(0xd4)],'text':JSON[_0x1e04ce(0xed)](_0x406edf[_0x1e04ce(0xc9)])});break;}case _0x3efbb5['Solve']:{const _0x2f6f7a=(_0x263e72=this[_0x1e04ce(0xf2)][_0x1e04ce(0xe9)](_0x406edf[_0x1e04ce(0x9d)])[_0x1e04ce(0xea)](_0x1e5513=>_0x1e5513['threadId']===_0x406edf[_0x1e04ce(0xa2)]))==null?void 0x0:_0x263e72[_0x1e04ce(0x11b)];_0x2f6f7a&&this['_threadCommentModel'][_0x1e04ce(0x11c)](_0x1eefa5,_0x4db26a,_0x2f6f7a['id'],_0x406edf[_0x1e04ce(0xaf)]===_0x13ea5d[_0x1e04ce(0xbf)]);break;}}}));}};_0x2c0684=_0x3a156b([_0x191102(0x0,_0x4c4d36[_0x3f7229(0xdf)](_0x1765f4['CommentService'])),_0x191102(0x1,_0x4c4d36['Inject'](_0x10f783['ThreadCommentModel'])),_0x191102(0x2,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xc4)])),_0x191102(0x3,_0x4c4d36['Inject'](_0x4c4d36['Injector']))],_0x2c0684);const _0xb24609=_0x3f7229(0xa4),_0x57b0be={};var _0x131d39=Object[_0x3f7229(0xd7)],_0x2dae21=(_0x2ec1bd,_0x1a0477,_0x27421d,_0x564929)=>{const _0x2360aa=_0x3f7229;for(var _0x2a6205=_0x564929>0x1?void 0x0:_0x564929?_0x131d39(_0x1a0477,_0x27421d):_0x1a0477,_0x356875=_0x2ec1bd[_0x2360aa(0xae)]-0x1,_0x4c62ed;_0x356875>=0x0;_0x356875--)(_0x4c62ed=_0x2ec1bd[_0x356875])&&(_0x2a6205=_0x4c62ed(_0x2a6205)||_0x2a6205);return _0x2a6205;},_0x232d9f=(_0x50a518,_0x4b852b)=>(_0x3b2823,_0x3e04e3)=>_0x4b852b(_0x3b2823,_0x3e04e3,_0x50a518);function _0x166fc4(_0x30eaa8,_0x5031cb){const _0x5750fd=_0x3f7229,_0x42ac7f=_0x30eaa8[_0x5750fd(0xd8)][0x0];return{..._0x5031cb,'id':_0x42ac7f[_0x5750fd(0xd4)],'resolved':_0x30eaa8[_0x5750fd(0xaf)]===0x1,'dT':_0x53b4fb(_0x42ac7f['createTimestamp']),'personId':_0x42ac7f[_0x5750fd(0x11a)],'threadId':_0x42ac7f['threadId']};}function _0x561575(_0x33f0d,_0x453546,_0x57f832){const _0x2f2b70=_0x3f7229;var _0x112636,_0x5852de;if(((_0x5852de=(_0x112636=_0x33f0d==null?void 0x0:_0x33f0d['replies'])==null?void 0x0:_0x112636[_0x2f2b70(0xae)])!=null?_0x5852de:0x0)>0x0){const _0x1aee37=(_0x12f6ff,_0x18fcb0)=>({'id':_0x12f6ff[_0x2f2b70(0xd4)],'threadId':_0x12f6ff[_0x2f2b70(0xa2)],'dT':_0x53b4fb(_0x12f6ff[_0x2f2b70(0x103)]),'personId':_0x12f6ff[_0x2f2b70(0x11a)],'resolved':_0x33f0d[_0x2f2b70(0xaf)]===_0x13ea5d['Solved'],'unitId':_0x453546,'subUnitId':_0x57f832,'text':JSON['parse'](_0x12f6ff[_0x2f2b70(0xc9)]),'parentId':_0x18fcb0}),_0x3444c4=_0x1aee37(_0x33f0d[_0x2f2b70(0xd8)][0x0]);return{..._0x3444c4,'children':_0x33f0d[_0x2f2b70(0xd8)]['slice'](0x1)[_0x2f2b70(0xcf)](_0x31d5c2=>_0x1aee37(_0x31d5c2,_0x3444c4['id']))};}return null;}let _0xf28e41=class{constructor(_0x44c719,_0x51c78f,_0x168dd0,_0x3baf8c){const _0x1a8909=_0x3f7229;this[_0x1a8909(0xd1)]=_0x44c719,this['_userService']=_0x51c78f,this[_0x1a8909(0x115)]=_0x168dd0,this[_0x1a8909(0x10d)]=_0x3baf8c;}async[_0x3f7229(0xb2)](_0x9084d7){const _0x1db296=_0x3f7229;var _0x551f65,_0x153e21;const {parentId:_0x2bed9a,unitId:_0x341eb0,text:_0x56a5fc,threadId:_0x312e07}=_0x9084d7,_0x596b2c=(_0x153e21=(_0x551f65=_0x56a5fc['customRanges'])==null?void 0x0:_0x551f65[_0x1db296(0xe7)](_0x2ec8a2=>_0x2ec8a2[_0x1db296(0xde)]===_0x4c4d36[_0x1db296(0xe6)][_0x1db296(0xec)])[_0x1db296(0xcf)](_0x247038=>_0x247038['rangeId']))!=null?_0x153e21:[],_0x3dc6de=JSON[_0x1db296(0xa5)](_0x56a5fc),_0x5155e2=(await this[_0x1db296(0x115)][_0x1db296(0xa8)](_0x341eb0))[_0x1db296(0xba)]();if(_0x2bed9a){const _0x13bf60={'memberId':_0x5155e2,'unitId':_0x341eb0,'content':_0x3dc6de,'mention':_0x596b2c,'threadId':_0x312e07},_0x549991=(await this[_0x1db296(0xd1)]['post']('/universer-api/comment/unit/'+_0x341eb0+_0x1db296(0xb9),{'body':_0x13bf60}))[_0x1db296(0xb3)][_0x1db296(0xb7)];return{..._0x9084d7,'id':_0x549991['replyId'],'dT':_0x4c4d36['dayjs'](+_0x549991[_0x1db296(0x103)])[_0x1db296(0x113)](_0x1db296(0xbb)),'personId':_0x549991['userId']};}else{const _0x4458a8={'memberId':_0x5155e2,'unitId':_0x341eb0,'content':_0x3dc6de,'mention':_0x596b2c},_0x53c45f=await this[_0x1db296(0xd1)][_0x1db296(0xa9)](_0x1db296(0x105)+_0x341eb0+_0x1db296(0xc7),{'body':_0x4458a8});return _0x166fc4(_0x53c45f[_0x1db296(0xb3)]['comment'],_0x9084d7);}}async[_0x3f7229(0xfd)](_0x2a8990){const _0x470688=_0x3f7229;var _0x65e54,_0x3563d6;const {text:_0x492357,unitId:_0x59a8b5}=_0x2a8990,_0x448b2b=(_0x3563d6=(_0x65e54=_0x492357['customRanges'])==null?void 0x0:_0x65e54[_0x470688(0xe7)](_0x481427=>_0x481427[_0x470688(0xde)]===_0x4c4d36['CustomRangeType'][_0x470688(0xec)])[_0x470688(0xcf)](_0x298003=>_0x298003[_0x470688(0x117)]))!=null?_0x3563d6:[],_0x2c4a92=JSON['stringify'](_0x492357),_0x4675bc=_0x2a8990[_0x470688(0xa2)],_0x4762b6=_0x2a8990['id'],_0x46a475={'memberId':(await this[_0x470688(0x115)]['requireSession'](_0x59a8b5))[_0x470688(0xba)](),'unitId':_0x59a8b5,'threadId':_0x4675bc,'mention':_0x448b2b,'content':_0x2c4a92,'replyId':_0x4762b6},_0x447809=await this[_0x470688(0xd1)][_0x470688(0xa9)](_0x470688(0x105)+_0x59a8b5+_0x470688(0xd6),{'body':_0x46a475});return!_0x447809[_0x470688(0xb3)][_0x470688(0x118)]||_0x447809[_0x470688(0xb3)]['error']['code']===0x1;}async[_0x3f7229(0x11c)](_0x60059a){const _0x1930c5=_0x3f7229,{unitId:_0x535d43}=_0x60059a,_0x29e50f=_0x60059a[_0x1930c5(0xa2)],_0x4cab42={'memberId':this['_userService'][_0x1930c5(0xd3)]()['userID'],'unitId':_0x535d43,'threadId':_0x29e50f,'solved':_0x60059a['resolved']?_0x13ea5d[_0x1930c5(0xbf)]:_0x13ea5d[_0x1930c5(0xcd)]},_0x472e33=await this[_0x1930c5(0xd1)][_0x1930c5(0xa9)](_0x1930c5(0x105)+_0x535d43+_0x1930c5(0xa6),{'body':_0x4cab42});return!_0x472e33[_0x1930c5(0xb3)]['error']||_0x472e33['body'][_0x1930c5(0x118)][_0x1930c5(0xca)]===0x1;}async[_0x3f7229(0xc0)](_0x4d0f98,_0x4f5041,_0x3222bc,_0x221ae9){const _0x30c071=_0x3f7229,_0x4246a4={'memberId':(await this[_0x30c071(0x115)][_0x30c071(0xa8)](_0x4d0f98))[_0x30c071(0xba)](),'threadId':_0x3222bc,'replyId':_0x221ae9,'unitId':_0x4d0f98},_0x568f9b=await this[_0x30c071(0xd1)][_0x30c071(0xa9)](_0x30c071(0x105)+_0x4d0f98+_0x30c071(0xe5),{'body':_0x4246a4});return!_0x568f9b['body']['error']||_0x568f9b[_0x30c071(0xb3)]['error'][_0x30c071(0xca)]===0x1;}async[_0x3f7229(0xf5)](_0x24671f,_0x403964,_0x4a8658){const _0x14aa00=_0x3f7229,_0x126f17={'unitId':_0x24671f,'threadId':_0x4a8658},_0x42763=await this[_0x14aa00(0xd1)][_0x14aa00(0xa9)](_0x14aa00(0x105)+_0x24671f+_0x14aa00(0xa1),{'body':_0x126f17}),_0x2a1a7f=_0x4a8658['map'](_0x47b5e7=>_0x561575(_0x42763[_0x14aa00(0xb3)][_0x14aa00(0x106)][_0x47b5e7],_0x24671f,_0x403964))[_0x14aa00(0xe7)](Boolean);return Object['values'](_0x42763[_0x14aa00(0xb3)][_0x14aa00(0xa3)])['forEach'](_0x5ae7fe=>{const _0x4607ec=_0x14aa00;this[_0x4607ec(0xf9)][_0x4607ec(0xd9)](_0x5ae7fe);}),_0x2a1a7f;}['saveCommentToSnapshot'](_0x43296c){const _0x63b4d1=_0x3f7229;return{'id':_0x43296c['id'],'threadId':_0x43296c[_0x63b4d1(0xa2)],'ref':_0x43296c['ref']};}};_0xf28e41=_0x2dae21([_0x232d9f(0x0,_0x4c4d36[_0x3f7229(0xdf)](_0x34a951[_0x3f7229(0xf0)])),_0x232d9f(0x1,_0x4c4d36['Inject'](_0x4c4d36['UserManagerService'])),_0x232d9f(0x2,_0x4c4d36[_0x3f7229(0xdf)](_0x1765f4[_0x3f7229(0xbd)])),_0x232d9f(0x3,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xda)]))],_0xf28e41);var _0x5f043c=Object['getOwnPropertyDescriptor'],_0x552284=(_0x4652eb,_0x2e8228,_0x3b8235,_0x48b6a0)=>{for(var _0x334ce3=_0x48b6a0>0x1?void 0x0:_0x48b6a0?_0x5f043c(_0x2e8228,_0x3b8235):_0x2e8228,_0x1cc624=_0x4652eb['length']-0x1,_0x3994a2;_0x1cc624>=0x0;_0x1cc624--)(_0x3994a2=_0x4652eb[_0x1cc624])&&(_0x334ce3=_0x3994a2(_0x334ce3)||_0x334ce3);return _0x334ce3;},_0x5d661f=(_0x1da13e,_0x1c0f52)=>(_0x32feb8,_0x3b907d)=>_0x1c0f52(_0x32feb8,_0x3b907d,_0x1da13e);let _0x308a4a=class extends _0x4c4d36[_0x3f7229(0xb1)]{constructor(_0x643285,_0x490b8d){const _0x1ebc4b=_0x3f7229;super(),this[_0x1ebc4b(0xdb)]=_0x643285,this['_threadCommentDataSource']=_0x490b8d,this[_0x1ebc4b(0xaa)]();}[_0x3f7229(0xaa)](){const _0x3542bf=_0x3f7229;this['_threadCommentDataSourceService'][_0x3542bf(0xa7)]=this['_threadCommentDataSource'],this[_0x3542bf(0xdb)][_0x3542bf(0xe4)]=!0x1;}};_0x308a4a=_0x552284([_0x5d661f(0x0,_0x10f783[_0x3f7229(0xe1)]),_0x5d661f(0x1,_0x4c4d36[_0x3f7229(0xdf)](_0xf28e41))],_0x308a4a);var _0x9edc54=Object[_0x3f7229(0xe2)],_0x549f00=Object['getOwnPropertyDescriptor'],_0xfa7958=(_0x16815e,_0x4157a5,_0x3f521c)=>_0x4157a5 in _0x16815e?_0x9edc54(_0x16815e,_0x4157a5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f521c}):_0x16815e[_0x4157a5]=_0x3f521c,_0x5efc43=(_0x1cb7b4,_0x2f7ad0,_0x26aeb3,_0x545d8b)=>{for(var _0x70cee5=_0x545d8b>0x1?void 0x0:_0x545d8b?_0x549f00(_0x2f7ad0,_0x26aeb3):_0x2f7ad0,_0x4bd5c2=_0x1cb7b4['length']-0x1,_0x2a2ff0;_0x4bd5c2>=0x0;_0x4bd5c2--)(_0x2a2ff0=_0x1cb7b4[_0x4bd5c2])&&(_0x70cee5=_0x2a2ff0(_0x70cee5)||_0x70cee5);return _0x70cee5;},_0x35b380=(_0x567b96,_0xd74ee7)=>(_0x485317,_0x569991)=>_0xd74ee7(_0x485317,_0x569991,_0x567b96),_0x663ba8=(_0x8b9e1b,_0x363f91,_0x1535fb)=>_0xfa7958(_0x8b9e1b,typeof _0x363f91!='symbol'?_0x363f91+'':_0x363f91,_0x1535fb);_0x8187aa[_0x3f7229(0x10f)]=class extends _0x4c4d36[_0x3f7229(0xf3)]{constructor(_0x3b748b=_0x57b0be,_0x294b8d,_0x397a11){const _0x5187a0=_0x3f7229;super(),this[_0x5187a0(0xc8)]=_0x3b748b,this[_0x5187a0(0x10d)]=_0x294b8d,this[_0x5187a0(0xce)]=_0x397a11;const {..._0x5a72b8}=_0x4c4d36['merge']({},_0x57b0be,this[_0x5187a0(0xc8)]);this[_0x5187a0(0xce)]['setConfig'](_0xb24609,_0x5a72b8);}[_0x3f7229(0xdc)](){[[_0xf28e41],[_0x308a4a],[_0x2c0684]]['forEach'](_0x49dce5=>{this['_injector']['add'](_0x49dce5);});}[_0x3f7229(0xfe)](){const _0x150cfa=_0x3f7229;this['_injector']['get'](_0x308a4a),this[_0x150cfa(0x10d)][_0x150cfa(0xfc)](_0x2c0684);}},_0x663ba8(_0x8187aa[_0x3f7229(0x10f)],_0x3f7229(0x101),_0x22324a),_0x663ba8(_0x8187aa[_0x3f7229(0x10f)],'type',_0x4c4d36[_0x3f7229(0xc5)]['UNIVER_UNKNOWN']),_0x8187aa[_0x3f7229(0x10f)]=_0x5efc43([_0x4c4d36[_0x3f7229(0x111)](_0x2c95e6[_0x3f7229(0xfb)],_0x1765f4['UniverCollaborationClientPlugin'],_0x3d651f[_0x3f7229(0xb5)]),_0x35b380(0x1,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xda)])),_0x35b380(0x2,_0x4c4d36[_0x3f7229(0x109)])],_0x8187aa[_0x3f7229(0x10f)]),Object[_0x3f7229(0xe2)](_0x8187aa,Symbol['toStringTag'],{'value':_0x3f7229(0xd2)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.1-nightly.202506161607",
3
+ "version": "0.8.1-nightly.202506171607",
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.1-nightly.202506161607",
49
- "@univerjs-pro/license": "0.8.1-nightly.202506161607",
48
+ "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506171607",
49
+ "@univerjs-pro/license": "0.8.1-nightly.202506171607",
50
+ "@univerjs/network": "0.8.1-nightly.202506171607",
51
+ "@univerjs/core": "0.8.1-nightly.202506171607",
50
52
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/network": "0.8.1-nightly.202506161607",
52
- "@univerjs/core": "0.8.1-nightly.202506161607",
53
- "@univerjs/thread-comment": "0.8.1-nightly.202506161607",
54
- "@univerjs/thread-comment-ui": "0.8.1-nightly.202506161607"
53
+ "@univerjs/thread-comment-ui": "0.8.1-nightly.202506171607",
54
+ "@univerjs/thread-comment": "0.8.1-nightly.202506171607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",