@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505231607 → 0.7.0-nightly.202505251606

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 _0xffd7c1=_0x3ffc;(function(_0x1c6cdf,_0x576ab2){const _0xc62552=_0x3ffc,_0x18d830=_0x1c6cdf();while(!![]){try{const _0x1038b0=-parseInt(_0xc62552(0x1f6))/0x1*(-parseInt(_0xc62552(0x1ff))/0x2)+-parseInt(_0xc62552(0x1ca))/0x3*(parseInt(_0xc62552(0x1f2))/0x4)+-parseInt(_0xc62552(0x1da))/0x5*(parseInt(_0xc62552(0x1fa))/0x6)+-parseInt(_0xc62552(0x216))/0x7*(parseInt(_0xc62552(0x1d2))/0x8)+parseInt(_0xc62552(0x208))/0x9+parseInt(_0xc62552(0x205))/0xa+parseInt(_0xc62552(0x1b3))/0xb;if(_0x1038b0===_0x576ab2)break;else _0x18d830['push'](_0x18d830['shift']());}catch(_0x43f9df){_0x18d830['push'](_0x18d830['shift']());}}}(_0x5bde,0xde5bc));Object['defineProperty'](exports,Symbol[_0xffd7c1(0x1e9)],{'value':_0xffd7c1(0x1f7)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0xffd7c1(0x1ec)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0xffd7c1(0x21b)),w=require(_0xffd7c1(0x21e)),P=require(_0xffd7c1(0x21f)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5bde(){const _0x55c529=['get','error','symbol','HTTPService','224pXmcJw','length','Reply','defineProperty','59462toAoQq','Module','resolveComment','pipe','12TGOgsb','rangeType','updateComment','OpenOrReOpen','ThreadCommentModel','8pTBzQS','Add','deleteComment','stringify','UNRECOGNIZED','replyId','15115090YXJWzZ','_sessionService','threadId','9255834ApJIWp','reply','UniverInstanceType','addUser','content','parentId','Plugin','post','Delete','payload','_threadCommentModel','Inject','_userService','solved','91hZNwKP','subscribe','rangeId','getCurrentUser','Solve','@univerjs/thread-comment','setConfig','_initDataSource','rxjs','@univerjs/network','getComment','map','forEach','replies','/list','_config','Solved','requireSession','personId','UniverLicensePlugin','_threadCommentDataSource','listComments','6959282OwBAMz','onReady','delete','_init','find','dayjs','Injector','Disposable','filter','UniverThreadCommentUIPlugin','_httpService','/universer-api/comment/unit/','commentUpdate$','customRanges','UserManagerService','users','root','type','_initUserSync','getMemberID','CollaborationSessionService','/add','YYYY/MM/DD\x20HH:mm','60366hYIGNI','_commentService','size','_configService','_threadCommentDataSourceService','ref','/universer-api/user/list','values','17432PXzWnI','merge','body','createTimestamp','unitId','pluginName','onStarting','thread-comment-data-source.config','3361265QKeAOQ','user','userID','format','CustomRangeType','Edit','getOwnPropertyDescriptor','slice','_injector','Unknown','getUnit','add','getUser','UniverThreadCommentDataSourcePlugin','parse','toStringTag','/edit','code','@univerjs-pro/license','userId'];_0x5bde=function(){return _0x55c529;};return _0x5bde();}var I=(_0x340b44=>(_0x340b44[_0x340b44[_0xffd7c1(0x1fd)]=0x0]='OpenOrReOpen',_0x340b44[_0x340b44[_0xffd7c1(0x226)]=0x1]='Solved',_0x340b44[_0x340b44[_0xffd7c1(0x203)]=-0x1]='UNRECOGNIZED',_0x340b44))(I||{}),v=(_0x520030=>(_0x520030[_0x520030[_0xffd7c1(0x1e3)]=0x0]=_0xffd7c1(0x1e3),_0x520030[_0x520030[_0xffd7c1(0x200)]=0x1]=_0xffd7c1(0x200),_0x520030[_0x520030['Reply']=0x2]=_0xffd7c1(0x1f4),_0x520030[_0x520030[_0xffd7c1(0x1df)]=0x3]=_0xffd7c1(0x1df),_0x520030[_0x520030[_0xffd7c1(0x210)]=0x4]='Delete',_0x520030[_0x520030[_0xffd7c1(0x21a)]=0x5]=_0xffd7c1(0x21a),_0x520030[_0x520030[_0xffd7c1(0x203)]=-0x1]=_0xffd7c1(0x203),_0x520030))(v||{});const f=_0x455437=>c[_0xffd7c1(0x1b8)](new Date(+_0x455437))['format'](_0xffd7c1(0x1c9)),R=async(_0x3cb26b,_0x45b5c1)=>{const _0x4277f7=_0xffd7c1,_0x3bc52b=_0x3cb26b['get'](c[_0x4277f7(0x1c1)]),_0x25d6fb=_0x3cb26b[_0x4277f7(0x1ee)](P[_0x4277f7(0x1f1)]);_0x45b5c1[_0x4277f7(0x222)](_0x49a959=>{const _0x27beb0=_0x4277f7;_0x3bc52b[_0x27beb0(0x1e6)](_0x49a959)&&_0x45b5c1[_0x27beb0(0x1b5)](_0x49a959);}),_0x45b5c1[_0x4277f7(0x1cc)]&&(await _0x25d6fb[_0x4277f7(0x1ee)](_0x4277f7(0x1d0),{'params':{'userIDs':[..._0x45b5c1]}}))['body']['users'][_0x4277f7(0x222)](_0x55b207=>{_0x55b207&&_0x3bc52b['addUser'](_0x55b207);});};var $=Object[_0xffd7c1(0x1e0)],E=(_0xa4b534,_0x18007d,_0x502393,_0x52d361)=>{const _0x5e52b1=_0xffd7c1;for(var _0xa0454=_0x52d361>0x1?void 0x0:_0x52d361?$(_0x18007d,_0x502393):_0x18007d,_0x3e61f5=_0xa4b534[_0x5e52b1(0x1f3)]-0x1,_0x1da931;_0x3e61f5>=0x0;_0x3e61f5--)(_0x1da931=_0xa4b534[_0x3e61f5])&&(_0xa0454=_0x1da931(_0xa0454)||_0xa0454);return _0xa0454;},S=(_0x395aea,_0x3916fc)=>(_0x5e7c79,_0x1bd90b)=>_0x3916fc(_0x5e7c79,_0x1bd90b,_0x395aea);let p=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x32cceb,_0x62f9ce,_0x48de18,_0x38b025){const _0x49cb3f=_0xffd7c1;super(),this['_commentService']=_0x32cceb,this['_threadCommentModel']=_0x62f9ce,this[_0x49cb3f(0x214)]=_0x48de18,this[_0x49cb3f(0x1e2)]=_0x38b025,this[_0x49cb3f(0x1b6)](),this[_0x49cb3f(0x1c5)]();}[_0xffd7c1(0x1c5)](){const _0x2fb269=_0xffd7c1;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2fb269(0x1f9)](w['bufferTime'](0x10))['subscribe'](_0x2de257=>{const _0x3b8f3b=_0x2fb269,_0x403a89=new Set();_0x2de257[_0x3b8f3b(0x222)](_0x218148=>{const _0x4f1ae7=_0x3b8f3b;switch(_0x218148[_0x4f1ae7(0x1c4)]){case _0x4f1ae7(0x1e5):{const _0x207d6b=_0x218148[_0x4f1ae7(0x211)][_0x4f1ae7(0x228)];_0x403a89[_0x4f1ae7(0x1e5)](_0x207d6b);break;}}}),R(this[_0x3b8f3b(0x1e2)],_0x403a89);}));}[_0xffd7c1(0x1b6)](){const _0x3816e1=_0xffd7c1;this['disposeWithMe'](this[_0x3816e1(0x1cb)][_0x3816e1(0x1bf)][_0x3816e1(0x217)](async _0x310e5e=>{const _0x101589=_0x3816e1;var _0xaabfe,_0x44c48c,_0x3f155a,_0x58395e;const _0x12749d=(_0xaabfe=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x505abe=>_0x505abe[_0x101589(0x207)]===_0x310e5e[_0x101589(0x207)]))==null?void 0x0:_0xaabfe[_0x101589(0x1c3)];if(!_0x12749d)return;const {unitId:_0x2bfa44,subUnitId:_0x3d6411}=_0x12749d;switch(_0x310e5e[_0x101589(0x1db)]&&this['_userService'][_0x101589(0x20b)](_0x310e5e['user']),_0x310e5e[_0x101589(0x1c4)]){case v[_0x101589(0x200)]:break;case v['Reply']:{this[_0x101589(0x212)]['addComment'](_0x2bfa44,_0x3d6411,{'unitId':_0x2bfa44,'subUnitId':_0x3d6411,'ref':'','id':_0x310e5e[_0x101589(0x204)],'dT':f(+_0x310e5e[_0x101589(0x1d5)]),'threadId':_0x310e5e[_0x101589(0x207)],'personId':(_0x3f155a=(_0x44c48c=_0x310e5e[_0x101589(0x1db)])==null?void 0x0:_0x44c48c['userID'])!=null?_0x3f155a:_0x310e5e[_0x101589(0x1ed)],'text':JSON[_0x101589(0x1e8)](_0x310e5e['content']),'parentId':_0x12749d['id']});break;}case v[_0x101589(0x210)]:{const _0x40fd11=this['_threadCommentModel'][_0x101589(0x220)](_0x2bfa44,_0x3d6411,_0x310e5e[_0x101589(0x204)]);_0x40fd11&&_0x40fd11[_0x101589(0x20d)]&&this[_0x101589(0x212)][_0x101589(0x201)](_0x2bfa44,_0x3d6411,_0x310e5e['replyId']);break;}case v[_0x101589(0x1df)]:{this[_0x101589(0x212)][_0x101589(0x1fc)](_0x2bfa44,_0x3d6411,{'commentId':_0x310e5e['replyId'],'text':JSON[_0x101589(0x1e8)](_0x310e5e[_0x101589(0x20c)])});break;}case v[_0x101589(0x21a)]:{const _0x16a7f7=(_0x58395e=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x350cf1=>_0x350cf1[_0x101589(0x207)]===_0x310e5e['threadId']))==null?void 0x0:_0x58395e['root'];_0x16a7f7&&this[_0x101589(0x212)][_0x101589(0x1f8)](_0x2bfa44,_0x3d6411,_0x16a7f7['id'],_0x310e5e[_0x101589(0x215)]===I[_0x101589(0x226)]);break;}}}));}};p=E([S(0x0,c[_0xffd7c1(0x213)](b['CommentService'])),S(0x1,c[_0xffd7c1(0x213)](M[_0xffd7c1(0x1fe)])),S(0x2,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),S(0x3,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)]))],p);const q=_0xffd7c1(0x1d9),D={};var A=Object[_0xffd7c1(0x1e0)],x=(_0x10207d,_0x55f01d,_0x47891d,_0x27f53a)=>{const _0x9bedec=_0xffd7c1;for(var _0x50d167=_0x27f53a>0x1?void 0x0:_0x27f53a?A(_0x55f01d,_0x47891d):_0x55f01d,_0xfe8748=_0x10207d[_0x9bedec(0x1f3)]-0x1,_0x525166;_0xfe8748>=0x0;_0xfe8748--)(_0x525166=_0x10207d[_0xfe8748])&&(_0x50d167=_0x525166(_0x50d167)||_0x50d167);return _0x50d167;},_=(_0x5e8392,_0x1a1076)=>(_0x6634f5,_0x39bfc3)=>_0x1a1076(_0x6634f5,_0x39bfc3,_0x5e8392);function Y(_0xaf2165,_0x25f74e){const _0x4c095e=_0xffd7c1,_0x2282d5=_0xaf2165['replies'][0x0];return{..._0x25f74e,'id':_0x2282d5[_0x4c095e(0x204)],'resolved':_0xaf2165[_0x4c095e(0x215)]===0x1,'dT':f(_0x2282d5[_0x4c095e(0x1d5)]),'personId':_0x2282d5[_0x4c095e(0x1ed)],'threadId':_0x2282d5[_0x4c095e(0x207)]};}function _0x3ffc(_0x32388b,_0x58add7){const _0x5bdecb=_0x5bde();return _0x3ffc=function(_0x3ffce6,_0x4cc13f){_0x3ffce6=_0x3ffce6-0x1b0;let _0x1526fa=_0x5bdecb[_0x3ffce6];return _0x1526fa;},_0x3ffc(_0x32388b,_0x58add7);}function G(_0x2d242a,_0x28cd98,_0x387255){const _0x30516f=_0xffd7c1;var _0x59121b,_0x50147b;if(((_0x50147b=(_0x59121b=_0x2d242a==null?void 0x0:_0x2d242a[_0x30516f(0x223)])==null?void 0x0:_0x59121b[_0x30516f(0x1f3)])!=null?_0x50147b:0x0)>0x0){const _0x3bba77=(_0x5104fa,_0x2d709f)=>({'id':_0x5104fa['replyId'],'threadId':_0x5104fa[_0x30516f(0x207)],'dT':f(_0x5104fa['createTimestamp']),'personId':_0x5104fa[_0x30516f(0x1ed)],'resolved':_0x2d242a[_0x30516f(0x215)]===I['Solved'],'unitId':_0x28cd98,'subUnitId':_0x387255,'text':JSON[_0x30516f(0x1e8)](_0x5104fa[_0x30516f(0x20c)]),'parentId':_0x2d709f}),_0x187b88=_0x3bba77(_0x2d242a[_0x30516f(0x223)][0x0]);return{..._0x187b88,'children':_0x2d242a[_0x30516f(0x223)][_0x30516f(0x1e1)](0x1)['map'](_0x2c3dc2=>_0x3bba77(_0x2c3dc2,_0x187b88['id']))};}return null;}let g=class{constructor(_0x5da154,_0x3174ca,_0x303225,_0x5eb344){const _0x580d9f=_0xffd7c1;this[_0x580d9f(0x1bd)]=_0x5da154,this[_0x580d9f(0x214)]=_0x3174ca,this[_0x580d9f(0x206)]=_0x303225,this[_0x580d9f(0x1e2)]=_0x5eb344;}async['addComment'](_0x42c55b){const _0x252814=_0xffd7c1;var _0x229d76,_0x11afd0;const {parentId:_0x427c17,unitId:_0xffa395,text:_0x2a2557,threadId:_0x26b256}=_0x42c55b,_0x1b38f6=(_0x11afd0=(_0x229d76=_0x2a2557['customRanges'])==null?void 0x0:_0x229d76[_0x252814(0x1bb)](_0x4009b1=>_0x4009b1[_0x252814(0x1fb)]===c[_0x252814(0x1de)]['COMMENT'])[_0x252814(0x221)](_0x21942e=>_0x21942e[_0x252814(0x218)]))!=null?_0x11afd0:[],_0x146451=JSON[_0x252814(0x202)](_0x2a2557),_0x2816d1=(await this[_0x252814(0x206)][_0x252814(0x227)](_0xffa395))[_0x252814(0x1c6)]();if(_0x427c17){const _0x565ca0={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6,'threadId':_0x26b256},_0x37edab=(await this[_0x252814(0x1bd)]['post']('/universer-api/comment/unit/'+_0xffa395+'/reply',{'body':_0x565ca0}))['body'][_0x252814(0x209)];return{..._0x42c55b,'id':_0x37edab[_0x252814(0x204)],'dT':c[_0x252814(0x1b8)](+_0x37edab[_0x252814(0x1d5)])[_0x252814(0x1dd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37edab['userId']};}else{const _0xc6ed97={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6},_0x3cd16f=await this[_0x252814(0x1bd)][_0x252814(0x20f)](_0x252814(0x1be)+_0xffa395+_0x252814(0x1c8),{'body':_0xc6ed97});return Y(_0x3cd16f['body']['comment'],_0x42c55b);}}async[_0xffd7c1(0x1fc)](_0x226585){const _0x40902a=_0xffd7c1;var _0x58d8c2,_0x4059bd;const {text:_0x17a0d8,unitId:_0x2120db}=_0x226585,_0x35f862=(_0x4059bd=(_0x58d8c2=_0x17a0d8[_0x40902a(0x1c0)])==null?void 0x0:_0x58d8c2[_0x40902a(0x1bb)](_0x468a5f=>_0x468a5f[_0x40902a(0x1fb)]===c[_0x40902a(0x1de)]['COMMENT'])[_0x40902a(0x221)](_0xa25acc=>_0xa25acc[_0x40902a(0x218)]))!=null?_0x4059bd:[],_0xe37cfb=JSON[_0x40902a(0x202)](_0x17a0d8),_0x5687ce=_0x226585['threadId'],_0x217dac=_0x226585['id'],_0x1c5cc0={'memberId':(await this[_0x40902a(0x206)][_0x40902a(0x227)](_0x2120db))[_0x40902a(0x1c6)](),'unitId':_0x2120db,'threadId':_0x5687ce,'mention':_0x35f862,'content':_0xe37cfb,'replyId':_0x217dac},_0x2616f2=await this['_httpService'][_0x40902a(0x20f)](_0x40902a(0x1be)+_0x2120db+_0x40902a(0x1ea),{'body':_0x1c5cc0});return!_0x2616f2['body']['error']||_0x2616f2[_0x40902a(0x1d4)][_0x40902a(0x1ef)][_0x40902a(0x1eb)]===0x1;}async[_0xffd7c1(0x1f8)](_0x4a742d){const _0x17bd31=_0xffd7c1,{unitId:_0x1f432f}=_0x4a742d,_0xc1c4c6=_0x4a742d['threadId'],_0xaa01d7={'memberId':this[_0x17bd31(0x214)][_0x17bd31(0x219)]()[_0x17bd31(0x1dc)],'unitId':_0x1f432f,'threadId':_0xc1c4c6,'solved':_0x4a742d['resolved']?I[_0x17bd31(0x226)]:I[_0x17bd31(0x1fd)]},_0x5c81ff=await this[_0x17bd31(0x1bd)][_0x17bd31(0x20f)](_0x17bd31(0x1be)+_0x1f432f+'/solved',{'body':_0xaa01d7});return!_0x5c81ff[_0x17bd31(0x1d4)]['error']||_0x5c81ff[_0x17bd31(0x1d4)]['error'][_0x17bd31(0x1eb)]===0x1;}async['deleteComment'](_0x5c88ea,_0x2353ca,_0x370224,_0x12afd8){const _0x26c894=_0xffd7c1,_0x3930db={'memberId':(await this[_0x26c894(0x206)][_0x26c894(0x227)](_0x5c88ea))[_0x26c894(0x1c6)](),'threadId':_0x370224,'replyId':_0x12afd8,'unitId':_0x5c88ea},_0x114cc2=await this['_httpService'][_0x26c894(0x20f)](_0x26c894(0x1be)+_0x5c88ea+'/delete',{'body':_0x3930db});return!_0x114cc2[_0x26c894(0x1d4)][_0x26c894(0x1ef)]||_0x114cc2['body'][_0x26c894(0x1ef)][_0x26c894(0x1eb)]===0x1;}async[_0xffd7c1(0x1b2)](_0x1ae5c4,_0x56601e,_0x1964a4){const _0x368da6=_0xffd7c1,_0x3e71ca={'unitId':_0x1ae5c4,'threadId':_0x1964a4},_0x1434e7=await this[_0x368da6(0x1bd)]['post'](_0x368da6(0x1be)+_0x1ae5c4+_0x368da6(0x224),{'body':_0x3e71ca}),_0xfa9c87=_0x1964a4[_0x368da6(0x221)](_0x2760e0=>G(_0x1434e7[_0x368da6(0x1d4)]['comments'][_0x2760e0],_0x1ae5c4,_0x56601e))[_0x368da6(0x1bb)](Boolean);return Object[_0x368da6(0x1d1)](_0x1434e7['body'][_0x368da6(0x1c2)])[_0x368da6(0x222)](_0x30b311=>{const _0x5228cc=_0x368da6;this[_0x5228cc(0x214)]['addUser'](_0x30b311);}),_0xfa9c87;}['saveCommentToSnapshot'](_0x3dd797){const _0x365dcd=_0xffd7c1;return{'id':_0x3dd797['id'],'threadId':_0x3dd797[_0x365dcd(0x207)],'ref':_0x3dd797[_0x365dcd(0x1cf)]};}};g=x([_(0x0,c[_0xffd7c1(0x213)](P['HTTPService'])),_(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),_(0x2,c[_0xffd7c1(0x213)](b[_0xffd7c1(0x1c7)])),_(0x3,c['Inject'](c[_0xffd7c1(0x1b9)]))],g);var H=Object[_0xffd7c1(0x1e0)],J=(_0x18cccc,_0x58305a,_0x5c145c,_0x327beb)=>{for(var _0x4d6962=_0x327beb>0x1?void 0x0:_0x327beb?H(_0x58305a,_0x5c145c):_0x58305a,_0x3c0f0c=_0x18cccc['length']-0x1,_0x202ac3;_0x3c0f0c>=0x0;_0x3c0f0c--)(_0x202ac3=_0x18cccc[_0x3c0f0c])&&(_0x4d6962=_0x202ac3(_0x4d6962)||_0x4d6962);return _0x4d6962;},y=(_0x149e54,_0x5bf7e4)=>(_0xe3f055,_0x3588ae)=>_0x5bf7e4(_0xe3f055,_0x3588ae,_0x149e54);let C=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x36e352,_0x3d0537){const _0x2c22c1=_0xffd7c1;super(),this[_0x2c22c1(0x1ce)]=_0x36e352,this[_0x2c22c1(0x1b1)]=_0x3d0537,this[_0x2c22c1(0x21d)]();}['_initDataSource'](){const _0x58a1e5=_0xffd7c1;this[_0x58a1e5(0x1ce)]['dataSource']=this[_0x58a1e5(0x1b1)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xffd7c1(0x213)](g))],C);var F=Object[_0xffd7c1(0x1f5)],L=Object[_0xffd7c1(0x1e0)],Z=(_0x3fb045,_0x3ac6cb,_0x13dae2)=>_0x3ac6cb in _0x3fb045?F(_0x3fb045,_0x3ac6cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13dae2}):_0x3fb045[_0x3ac6cb]=_0x13dae2,W=(_0x2476a1,_0x1eb0a9,_0x3f33a3,_0x38ed79)=>{const _0x46ff68=_0xffd7c1;for(var _0x3776ba=_0x38ed79>0x1?void 0x0:_0x38ed79?L(_0x1eb0a9,_0x3f33a3):_0x1eb0a9,_0x4ccb5b=_0x2476a1[_0x46ff68(0x1f3)]-0x1,_0x1bd8ff;_0x4ccb5b>=0x0;_0x4ccb5b--)(_0x1bd8ff=_0x2476a1[_0x4ccb5b])&&(_0x3776ba=_0x1bd8ff(_0x3776ba)||_0x3776ba);return _0x3776ba;},O=(_0x399380,_0x2b6425)=>(_0x2b71a6,_0x10da1e)=>_0x2b6425(_0x2b71a6,_0x10da1e,_0x399380),N=(_0x4e7d01,_0x39c708,_0x458544)=>Z(_0x4e7d01,typeof _0x39c708!=_0xffd7c1(0x1f0)?_0x39c708+'':_0x39c708,_0x458544);exports[_0xffd7c1(0x1e7)]=class extends c[_0xffd7c1(0x20e)]{constructor(_0x59e461=D,_0x5d6176,_0x3654c2){const _0x52910a=_0xffd7c1;super(),this[_0x52910a(0x225)]=_0x59e461,this[_0x52910a(0x1e2)]=_0x5d6176,this[_0x52910a(0x1cd)]=_0x3654c2;const {..._0x286fe4}=c[_0x52910a(0x1d3)]({},D,this[_0x52910a(0x225)]);this[_0x52910a(0x1cd)][_0x52910a(0x21c)](q,_0x286fe4);}[_0xffd7c1(0x1d8)](){const _0x231320=_0xffd7c1;[[g],[C],[p]][_0x231320(0x222)](_0x5bc432=>{const _0xe43858=_0x231320;this[_0xe43858(0x1e2)][_0xe43858(0x1e5)](_0x5bc432);});}[_0xffd7c1(0x1b4)](){const _0x1ae994=_0xffd7c1;this[_0x1ae994(0x1e2)][_0x1ae994(0x1ee)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1d7),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1c4),c[_0xffd7c1(0x20a)]['UNIVER_UNKNOWN']),exports[_0xffd7c1(0x1e7)]=W([c['DependentOn'](j[_0xffd7c1(0x1bc)],b['UniverCollaborationClientPlugin'],T[_0xffd7c1(0x1b0)]),O(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x4113a8=_0x38e9;function _0x51f1(){const _0x27aa18=['UniverLicensePlugin','payload','code','IThreadCommentDataSourceService','map','@univerjs-pro/collaboration-client','pipe','error','@univerjs/thread-comment-ui','filter','/reply','root','/universer-api/comment/unit/','format','_threadCommentModel','pluginName','@univerjs-pro/license','OpenOrReOpen','Injector','COMMENT','userID','1271NkOJee','forEach','508dfhVZU','12HCHzBm','comments','getUnit','UniverThreadCommentDataSourcePlugin','rangeId','UNRECOGNIZED','getCurrentUser','bufferTime','replyId','onStarting','onReady','find','UNIVER_UNKNOWN','1526010LjZVLG','UserManagerService','HTTPService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','body','reply','users','_threadCommentDataSource','unitId','parentId','_init','threadId','content','_initUserSync','type','DependentOn','UniverCollaborationClientPlugin','Delete','3852827wokJai','parse','add','requireSession','deleteComment','YYYY/MM/DD\x20HH:mm','userId','@univerjs/core','1963620jUXMdG','replies','stringify','setConfig','comment','values','_commentService','UniverInstanceType','CustomRangeType','/edit','thread-comment-data-source.config','/universer-api/user/list','_injector','addComment','_configService','Unknown','ThreadCommentModel','get','IConfigService','slice','_initDataSource','Inject','/add','symbol','Solved','Add','getMemberID','_httpService','2224eEPWse','Module','@univerjs/network','length','user','77126bnyVTV','size','addUser','getOwnPropertyDescriptor','Plugin','Reply','toStringTag','customRanges','commentUpdate$','9eVxBWM','getUser','resolveComment','merge','createTimestamp','post','6441560kvLTFl','Edit','Solve','rangeType','6535wAKbla','_threadCommentDataSourceService','_config','_userService','UniverThreadCommentUIPlugin','disposeWithMe','subscribe','defineProperty','CollaborationSessionService'];_0x51f1=function(){return _0x27aa18;};return _0x51f1();}function _0x38e9(_0x3152bf,_0x43d9fc){const _0x51f1f4=_0x51f1();return _0x38e9=function(_0x38e94f,_0xe359e8){_0x38e94f=_0x38e94f-0x1c6;let _0x554c9c=_0x51f1f4[_0x38e94f];return _0x554c9c;},_0x38e9(_0x3152bf,_0x43d9fc);}(function(_0x52407c,_0x4f9533){const _0x33a2aa=_0x38e9,_0x301fdf=_0x52407c();while(!![]){try{const _0x35f4cd=-parseInt(_0x33a2aa(0x1f0))/0x1*(-parseInt(_0x33a2aa(0x1f2))/0x2)+-parseInt(_0x33a2aa(0x200))/0x3+-parseInt(_0x33a2aa(0x237))/0x4*(parseInt(_0x33a2aa(0x1d2))/0x5)+parseInt(_0x33a2aa(0x1f3))/0x6*(-parseInt(_0x33a2aa(0x23c))/0x7)+parseInt(_0x33a2aa(0x1ce))/0x8*(parseInt(_0x33a2aa(0x1c8))/0x9)+parseInt(_0x33a2aa(0x21b))/0xa+parseInt(_0x33a2aa(0x213))/0xb;if(_0x35f4cd===_0x4f9533)break;else _0x301fdf['push'](_0x301fdf['shift']());}catch(_0x188d20){_0x301fdf['push'](_0x301fdf['shift']());}}}(_0x51f1,0x65de2));Object[_0x4113a8(0x1d9)](exports,Symbol[_0x4113a8(0x242)],{'value':_0x4113a8(0x238)});const b=require(_0x4113a8(0x1e0)),T=require(_0x4113a8(0x1eb)),c=require(_0x4113a8(0x21a)),j=require(_0x4113a8(0x1e3)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x4113a8(0x239)),U=_0x4113a8(0x203);var I=(_0x4411c0=>(_0x4411c0[_0x4411c0['OpenOrReOpen']=0x0]=_0x4113a8(0x1ec),_0x4411c0[_0x4411c0['Solved']=0x1]=_0x4113a8(0x233),_0x4411c0[_0x4411c0[_0x4113a8(0x1f8)]=-0x1]='UNRECOGNIZED',_0x4411c0))(I||{}),v=(_0x2d7c7f=>(_0x2d7c7f[_0x2d7c7f['Unknown']=0x0]=_0x4113a8(0x22a),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x234)]=0x1]=_0x4113a8(0x234),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x241)]=0x2]=_0x4113a8(0x241),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1cf)]=0x3]=_0x4113a8(0x1cf),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x212)]=0x4]=_0x4113a8(0x212),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1d0)]=0x5]='Solve',_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1f8)]=-0x1]=_0x4113a8(0x1f8),_0x2d7c7f))(v||{});const f=_0x3f3b66=>c['dayjs'](new Date(+_0x3f3b66))['format'](_0x4113a8(0x218)),R=async(_0xe55dd1,_0x260f5f)=>{const _0xe6a3c3=_0x4113a8,_0xf4e131=_0xe55dd1[_0xe6a3c3(0x22c)](c['UserManagerService']),_0x498f6d=_0xe55dd1['get'](P[_0xe6a3c3(0x202)]);_0x260f5f[_0xe6a3c3(0x1f1)](_0x510e79=>{const _0x164cfd=_0xe6a3c3;_0xf4e131[_0x164cfd(0x1c9)](_0x510e79)&&_0x260f5f['delete'](_0x510e79);}),_0x260f5f[_0xe6a3c3(0x23d)]&&(await _0x498f6d[_0xe6a3c3(0x22c)](_0xe6a3c3(0x226),{'params':{'userIDs':[..._0x260f5f]}}))[_0xe6a3c3(0x205)]['users']['forEach'](_0x43baa7=>{const _0x72d471=_0xe6a3c3;_0x43baa7&&_0xf4e131[_0x72d471(0x23e)](_0x43baa7);});};var $=Object[_0x4113a8(0x23f)],E=(_0x32a1d1,_0x3c56fd,_0x14fff0,_0x3deae2)=>{const _0x4c3ee3=_0x4113a8;for(var _0x4bef7b=_0x3deae2>0x1?void 0x0:_0x3deae2?$(_0x3c56fd,_0x14fff0):_0x3c56fd,_0x37b848=_0x32a1d1[_0x4c3ee3(0x23a)]-0x1,_0xd721ab;_0x37b848>=0x0;_0x37b848--)(_0xd721ab=_0x32a1d1[_0x37b848])&&(_0x4bef7b=_0xd721ab(_0x4bef7b)||_0x4bef7b);return _0x4bef7b;},S=(_0x7b0b65,_0x288673)=>(_0x5db9c5,_0x31bc0c)=>_0x288673(_0x5db9c5,_0x31bc0c,_0x7b0b65);let p=class extends c['Disposable']{constructor(_0x51e5d9,_0x3c4769,_0x281c25,_0x2266a8){const _0x1e97dd=_0x4113a8;super(),this[_0x1e97dd(0x221)]=_0x51e5d9,this['_threadCommentModel']=_0x3c4769,this[_0x1e97dd(0x1d5)]=_0x281c25,this[_0x1e97dd(0x227)]=_0x2266a8,this[_0x1e97dd(0x20b)](),this[_0x1e97dd(0x20e)]();}[_0x4113a8(0x20e)](){const _0x2bf860=_0x4113a8;this[_0x2bf860(0x1d7)](this[_0x2bf860(0x1e9)]['commentUpdate$'][_0x2bf860(0x1e1)](w[_0x2bf860(0x1fa)](0x10))[_0x2bf860(0x1d8)](_0x2c1a30=>{const _0x16c62d=_0x2bf860,_0x210e47=new Set();_0x2c1a30['forEach'](_0x343ded=>{const _0x1d1121=_0x38e9;switch(_0x343ded[_0x1d1121(0x20f)]){case'add':{const _0x16a64e=_0x343ded[_0x1d1121(0x1dc)]['personId'];_0x210e47[_0x1d1121(0x215)](_0x16a64e);break;}}}),R(this[_0x16c62d(0x227)],_0x210e47);}));}[_0x4113a8(0x20b)](){const _0x36f372=_0x4113a8;this[_0x36f372(0x1d7)](this[_0x36f372(0x221)][_0x36f372(0x1c7)]['subscribe'](async _0x1f704a=>{const _0x1248aa=_0x36f372;var _0x23faf0,_0x292ad8,_0x3c7b47,_0x4e1a6a;const _0x29305f=(_0x23faf0=this[_0x1248aa(0x1e9)]['getUnit'](_0x1f704a[_0x1248aa(0x209)])[_0x1248aa(0x1fe)](_0xacc3e7=>_0xacc3e7[_0x1248aa(0x20c)]===_0x1f704a['threadId']))==null?void 0x0:_0x23faf0[_0x1248aa(0x1e6)];if(!_0x29305f)return;const {unitId:_0x8e2f9,subUnitId:_0x1dc25d}=_0x29305f;switch(_0x1f704a['user']&&this['_userService']['addUser'](_0x1f704a[_0x1248aa(0x23b)]),_0x1f704a[_0x1248aa(0x20f)]){case v[_0x1248aa(0x234)]:break;case v[_0x1248aa(0x241)]:{this[_0x1248aa(0x1e9)][_0x1248aa(0x228)](_0x8e2f9,_0x1dc25d,{'unitId':_0x8e2f9,'subUnitId':_0x1dc25d,'ref':'','id':_0x1f704a[_0x1248aa(0x1fb)],'dT':f(+_0x1f704a[_0x1248aa(0x1cc)]),'threadId':_0x1f704a[_0x1248aa(0x20c)],'personId':(_0x3c7b47=(_0x292ad8=_0x1f704a[_0x1248aa(0x23b)])==null?void 0x0:_0x292ad8['userID'])!=null?_0x3c7b47:_0x1f704a[_0x1248aa(0x219)],'text':JSON['parse'](_0x1f704a[_0x1248aa(0x20d)]),'parentId':_0x29305f['id']});break;}case v[_0x1248aa(0x212)]:{const _0x361caf=this[_0x1248aa(0x1e9)]['getComment'](_0x8e2f9,_0x1dc25d,_0x1f704a[_0x1248aa(0x1fb)]);_0x361caf&&_0x361caf[_0x1248aa(0x20a)]&&this['_threadCommentModel'][_0x1248aa(0x217)](_0x8e2f9,_0x1dc25d,_0x1f704a[_0x1248aa(0x1fb)]);break;}case v['Edit']:{this[_0x1248aa(0x1e9)]['updateComment'](_0x8e2f9,_0x1dc25d,{'commentId':_0x1f704a['replyId'],'text':JSON['parse'](_0x1f704a[_0x1248aa(0x20d)])});break;}case v[_0x1248aa(0x1d0)]:{const _0x3113cc=(_0x4e1a6a=this[_0x1248aa(0x1e9)][_0x1248aa(0x1f5)](_0x1f704a[_0x1248aa(0x209)])[_0x1248aa(0x1fe)](_0x5388e0=>_0x5388e0['threadId']===_0x1f704a['threadId']))==null?void 0x0:_0x4e1a6a['root'];_0x3113cc&&this['_threadCommentModel'][_0x1248aa(0x1ca)](_0x8e2f9,_0x1dc25d,_0x3113cc['id'],_0x1f704a['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4113a8(0x230)](b['CommentService'])),S(0x1,c[_0x4113a8(0x230)](M[_0x4113a8(0x22b)])),S(0x2,c[_0x4113a8(0x230)](c['UserManagerService'])),S(0x3,c[_0x4113a8(0x230)](c['Injector']))],p);const q=_0x4113a8(0x225),D={};var A=Object[_0x4113a8(0x23f)],x=(_0x385f3e,_0xce6763,_0x2fcb52,_0x1a7fa5)=>{for(var _0x5f4582=_0x1a7fa5>0x1?void 0x0:_0x1a7fa5?A(_0xce6763,_0x2fcb52):_0xce6763,_0x29cded=_0x385f3e['length']-0x1,_0x209b13;_0x29cded>=0x0;_0x29cded--)(_0x209b13=_0x385f3e[_0x29cded])&&(_0x5f4582=_0x209b13(_0x5f4582)||_0x5f4582);return _0x5f4582;},_=(_0x1fa1cb,_0x17cfb0)=>(_0x52528f,_0x5563d7)=>_0x17cfb0(_0x52528f,_0x5563d7,_0x1fa1cb);function Y(_0x4a5642,_0x31250f){const _0x5aec06=_0x4113a8,_0x123897=_0x4a5642[_0x5aec06(0x21c)][0x0];return{..._0x31250f,'id':_0x123897[_0x5aec06(0x1fb)],'resolved':_0x4a5642['solved']===0x1,'dT':f(_0x123897['createTimestamp']),'personId':_0x123897[_0x5aec06(0x219)],'threadId':_0x123897[_0x5aec06(0x20c)]};}function G(_0x120e7a,_0x2f47d2,_0x535424){const _0x37a1b2=_0x4113a8;var _0x155931,_0x28d530;if(((_0x28d530=(_0x155931=_0x120e7a==null?void 0x0:_0x120e7a[_0x37a1b2(0x21c)])==null?void 0x0:_0x155931[_0x37a1b2(0x23a)])!=null?_0x28d530:0x0)>0x0){const _0x3321d8=(_0x4e67fe,_0x24141d)=>({'id':_0x4e67fe['replyId'],'threadId':_0x4e67fe['threadId'],'dT':f(_0x4e67fe['createTimestamp']),'personId':_0x4e67fe[_0x37a1b2(0x219)],'resolved':_0x120e7a['solved']===I[_0x37a1b2(0x233)],'unitId':_0x2f47d2,'subUnitId':_0x535424,'text':JSON[_0x37a1b2(0x214)](_0x4e67fe['content']),'parentId':_0x24141d}),_0x59107b=_0x3321d8(_0x120e7a[_0x37a1b2(0x21c)][0x0]);return{..._0x59107b,'children':_0x120e7a[_0x37a1b2(0x21c)][_0x37a1b2(0x22e)](0x1)[_0x37a1b2(0x1df)](_0x6b735d=>_0x3321d8(_0x6b735d,_0x59107b['id']))};}return null;}let g=class{constructor(_0x484bcb,_0x20b6d4,_0x3c884a,_0x1787c3){const _0x5b5e41=_0x4113a8;this[_0x5b5e41(0x236)]=_0x484bcb,this[_0x5b5e41(0x1d5)]=_0x20b6d4,this[_0x5b5e41(0x204)]=_0x3c884a,this[_0x5b5e41(0x227)]=_0x1787c3;}async[_0x4113a8(0x228)](_0x488e8a){const _0x14f53c=_0x4113a8;var _0xe187d9,_0x3eb708;const {parentId:_0x20e1e2,unitId:_0x184b1e,text:_0x41e5f0,threadId:_0x56b48d}=_0x488e8a,_0x316ad7=(_0x3eb708=(_0xe187d9=_0x41e5f0[_0x14f53c(0x1c6)])==null?void 0x0:_0xe187d9[_0x14f53c(0x1e4)](_0x911662=>_0x911662[_0x14f53c(0x1d1)]===c[_0x14f53c(0x223)][_0x14f53c(0x1ee)])[_0x14f53c(0x1df)](_0x1bbf82=>_0x1bbf82[_0x14f53c(0x1f7)]))!=null?_0x3eb708:[],_0x2cbbd8=JSON[_0x14f53c(0x21d)](_0x41e5f0),_0x113aa6=(await this[_0x14f53c(0x204)][_0x14f53c(0x216)](_0x184b1e))[_0x14f53c(0x235)]();if(_0x20e1e2){const _0x49f05f={'memberId':_0x113aa6,'unitId':_0x184b1e,'content':_0x2cbbd8,'mention':_0x316ad7,'threadId':_0x56b48d},_0x5102e6=(await this['_httpService'][_0x14f53c(0x1cd)](_0x14f53c(0x1e7)+_0x184b1e+_0x14f53c(0x1e5),{'body':_0x49f05f}))[_0x14f53c(0x205)][_0x14f53c(0x206)];return{..._0x488e8a,'id':_0x5102e6['replyId'],'dT':c['dayjs'](+_0x5102e6['createTimestamp'])[_0x14f53c(0x1e8)](_0x14f53c(0x218)),'personId':_0x5102e6['userId']};}else{const _0x1ded3b={'memberId':_0x113aa6,'unitId':_0x184b1e,'content':_0x2cbbd8,'mention':_0x316ad7},_0x381404=await this[_0x14f53c(0x236)][_0x14f53c(0x1cd)](_0x14f53c(0x1e7)+_0x184b1e+_0x14f53c(0x231),{'body':_0x1ded3b});return Y(_0x381404[_0x14f53c(0x205)][_0x14f53c(0x21f)],_0x488e8a);}}async['updateComment'](_0x2d63f7){const _0x5c08e3=_0x4113a8;var _0x489070,_0x38cf43;const {text:_0x526526,unitId:_0x332dc3}=_0x2d63f7,_0x2e49a2=(_0x38cf43=(_0x489070=_0x526526['customRanges'])==null?void 0x0:_0x489070['filter'](_0x5ba3c1=>_0x5ba3c1['rangeType']===c[_0x5c08e3(0x223)]['COMMENT'])['map'](_0x3d1f40=>_0x3d1f40[_0x5c08e3(0x1f7)]))!=null?_0x38cf43:[],_0x1965ff=JSON['stringify'](_0x526526),_0x16d809=_0x2d63f7['threadId'],_0x2e6fb2=_0x2d63f7['id'],_0x48d839={'memberId':(await this['_sessionService'][_0x5c08e3(0x216)](_0x332dc3))[_0x5c08e3(0x235)](),'unitId':_0x332dc3,'threadId':_0x16d809,'mention':_0x2e49a2,'content':_0x1965ff,'replyId':_0x2e6fb2},_0x40f2a0=await this[_0x5c08e3(0x236)][_0x5c08e3(0x1cd)](_0x5c08e3(0x1e7)+_0x332dc3+_0x5c08e3(0x224),{'body':_0x48d839});return!_0x40f2a0[_0x5c08e3(0x205)][_0x5c08e3(0x1e2)]||_0x40f2a0['body'][_0x5c08e3(0x1e2)][_0x5c08e3(0x1dd)]===0x1;}async[_0x4113a8(0x1ca)](_0x3bfb78){const _0x48884b=_0x4113a8,{unitId:_0x1b18ad}=_0x3bfb78,_0x87d4ce=_0x3bfb78[_0x48884b(0x20c)],_0x56322a={'memberId':this[_0x48884b(0x1d5)][_0x48884b(0x1f9)]()[_0x48884b(0x1ef)],'unitId':_0x1b18ad,'threadId':_0x87d4ce,'solved':_0x3bfb78['resolved']?I[_0x48884b(0x233)]:I['OpenOrReOpen']},_0x3ee492=await this[_0x48884b(0x236)]['post'](_0x48884b(0x1e7)+_0x1b18ad+'/solved',{'body':_0x56322a});return!_0x3ee492['body'][_0x48884b(0x1e2)]||_0x3ee492[_0x48884b(0x205)][_0x48884b(0x1e2)][_0x48884b(0x1dd)]===0x1;}async['deleteComment'](_0x1e2f7a,_0x52cf2a,_0x453e85,_0x4ca25e){const _0x5b3ad3=_0x4113a8,_0x1f4751={'memberId':(await this[_0x5b3ad3(0x204)]['requireSession'](_0x1e2f7a))[_0x5b3ad3(0x235)](),'threadId':_0x453e85,'replyId':_0x4ca25e,'unitId':_0x1e2f7a},_0x54f686=await this[_0x5b3ad3(0x236)]['post'](_0x5b3ad3(0x1e7)+_0x1e2f7a+'/delete',{'body':_0x1f4751});return!_0x54f686[_0x5b3ad3(0x205)][_0x5b3ad3(0x1e2)]||_0x54f686['body'][_0x5b3ad3(0x1e2)][_0x5b3ad3(0x1dd)]===0x1;}async['listComments'](_0x3149f0,_0x4648a1,_0x2740c9){const _0x3616eb=_0x4113a8,_0xab4b72={'unitId':_0x3149f0,'threadId':_0x2740c9},_0x3e23a9=await this[_0x3616eb(0x236)][_0x3616eb(0x1cd)]('/universer-api/comment/unit/'+_0x3149f0+'/list',{'body':_0xab4b72}),_0x5318e7=_0x2740c9[_0x3616eb(0x1df)](_0x4d90f2=>G(_0x3e23a9[_0x3616eb(0x205)][_0x3616eb(0x1f4)][_0x4d90f2],_0x3149f0,_0x4648a1))[_0x3616eb(0x1e4)](Boolean);return Object[_0x3616eb(0x220)](_0x3e23a9[_0x3616eb(0x205)][_0x3616eb(0x207)])[_0x3616eb(0x1f1)](_0x286d76=>{const _0x447b64=_0x3616eb;this[_0x447b64(0x1d5)][_0x447b64(0x23e)](_0x286d76);}),_0x5318e7;}['saveCommentToSnapshot'](_0x3b0ee9){const _0x434ec9=_0x4113a8;return{'id':_0x3b0ee9['id'],'threadId':_0x3b0ee9[_0x434ec9(0x20c)],'ref':_0x3b0ee9['ref']};}};g=x([_(0x0,c['Inject'](P[_0x4113a8(0x202)])),_(0x1,c['Inject'](c[_0x4113a8(0x201)])),_(0x2,c[_0x4113a8(0x230)](b[_0x4113a8(0x1da)])),_(0x3,c[_0x4113a8(0x230)](c[_0x4113a8(0x1ed)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xa15eac,_0x1b8d67,_0xb46098,_0x30d6a8)=>{const _0x2a626f=_0x4113a8;for(var _0x3fa584=_0x30d6a8>0x1?void 0x0:_0x30d6a8?H(_0x1b8d67,_0xb46098):_0x1b8d67,_0x5458f8=_0xa15eac[_0x2a626f(0x23a)]-0x1,_0x510a64;_0x5458f8>=0x0;_0x5458f8--)(_0x510a64=_0xa15eac[_0x5458f8])&&(_0x3fa584=_0x510a64(_0x3fa584)||_0x3fa584);return _0x3fa584;},y=(_0x409cc1,_0x366c16)=>(_0x1cdbc0,_0x5a9b5e)=>_0x366c16(_0x1cdbc0,_0x5a9b5e,_0x409cc1);let C=class extends c['Disposable']{constructor(_0x3d0898,_0x2782b3){const _0xd00cf0=_0x4113a8;super(),this[_0xd00cf0(0x1d3)]=_0x3d0898,this['_threadCommentDataSource']=_0x2782b3,this[_0xd00cf0(0x22f)]();}[_0x4113a8(0x22f)](){const _0x1825ad=_0x4113a8;this[_0x1825ad(0x1d3)]['dataSource']=this[_0x1825ad(0x208)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4113a8(0x1de)]),y(0x1,c[_0x4113a8(0x230)](g))],C);var F=Object[_0x4113a8(0x1d9)],L=Object[_0x4113a8(0x23f)],Z=(_0x2dcb73,_0x186a03,_0x6cbfdd)=>_0x186a03 in _0x2dcb73?F(_0x2dcb73,_0x186a03,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6cbfdd}):_0x2dcb73[_0x186a03]=_0x6cbfdd,W=(_0x49a1b1,_0x1ff37d,_0x907e77,_0x408acd)=>{const _0x301a04=_0x4113a8;for(var _0x175cac=_0x408acd>0x1?void 0x0:_0x408acd?L(_0x1ff37d,_0x907e77):_0x1ff37d,_0x1fcf5=_0x49a1b1[_0x301a04(0x23a)]-0x1,_0x395712;_0x1fcf5>=0x0;_0x1fcf5--)(_0x395712=_0x49a1b1[_0x1fcf5])&&(_0x175cac=_0x395712(_0x175cac)||_0x175cac);return _0x175cac;},O=(_0x1ce1ca,_0x5f0b8d)=>(_0x1bd4a2,_0x4922fd)=>_0x5f0b8d(_0x1bd4a2,_0x4922fd,_0x1ce1ca),N=(_0xe6d993,_0x15c927,_0x341d1b)=>Z(_0xe6d993,typeof _0x15c927!=_0x4113a8(0x232)?_0x15c927+'':_0x15c927,_0x341d1b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4113a8(0x240)]{constructor(_0x71895d=D,_0x5801f8,_0x24f14e){const _0x193b4c=_0x4113a8;super(),this['_config']=_0x71895d,this[_0x193b4c(0x227)]=_0x5801f8,this[_0x193b4c(0x229)]=_0x24f14e;const {..._0x25d43a}=c[_0x193b4c(0x1cb)]({},D,this[_0x193b4c(0x1d4)]);this[_0x193b4c(0x229)][_0x193b4c(0x21e)](q,_0x25d43a);}[_0x4113a8(0x1fc)](){const _0xbca2d1=_0x4113a8;[[g],[C],[p]][_0xbca2d1(0x1f1)](_0x1163db=>{const _0x6b72a4=_0xbca2d1;this[_0x6b72a4(0x227)][_0x6b72a4(0x215)](_0x1163db);});}[_0x4113a8(0x1fd)](){const _0x28a180=_0x4113a8;this['_injector'][_0x28a180(0x22c)](C),this[_0x28a180(0x227)][_0x28a180(0x22c)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4113a8(0x1ea),U),N(exports[_0x4113a8(0x1f6)],'type',c[_0x4113a8(0x222)][_0x4113a8(0x1ff)]),exports[_0x4113a8(0x1f6)]=W([c[_0x4113a8(0x210)](j[_0x4113a8(0x1d6)],b[_0x4113a8(0x211)],T[_0x4113a8(0x1db)]),O(0x1,c[_0x4113a8(0x230)](c[_0x4113a8(0x1ed)])),O(0x2,c[_0x4113a8(0x22d)])],exports[_0x4113a8(0x1f6)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x32593b=_0x51fd;(function(_0x59556a,_0x213cce){const _0x290389=_0x51fd,_0x437077=_0x59556a();while(!![]){try{const _0x307ce9=-parseInt(_0x290389(0x22f))/0x1+parseInt(_0x290389(0x1f2))/0x2+-parseInt(_0x290389(0x1fd))/0x3+parseInt(_0x290389(0x251))/0x4+-parseInt(_0x290389(0x23e))/0x5+parseInt(_0x290389(0x215))/0x6*(parseInt(_0x290389(0x245))/0x7)+parseInt(_0x290389(0x21b))/0x8;if(_0x307ce9===_0x213cce)break;else _0x437077['push'](_0x437077['shift']());}catch(_0x1c2812){_0x437077['push'](_0x437077['shift']());}}}(_0x3725,0x4d5e9));import{CommentService as _0x3b45f0,CollaborationSessionService as _0x197a37,UniverCollaborationClientPlugin as _0x182658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3592f4}from'@univerjs-pro/license';import{dayjs as _0x255919,UserManagerService as _0x43f749,Inject as _0x9b5830,Injector as _0x57c758,Disposable as _0x136e8f,CustomRangeType as _0x49f0f2,UniverInstanceType as _0x34926c,DependentOn as _0x44d782,IConfigService as _0x46444d,Plugin as _0x4332cb,merge as _0x2aa03e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xea9a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2927dc,IThreadCommentDataSourceService as _0x49413f}from'@univerjs/thread-comment';import{bufferTime as _0x14c0b1}from'rxjs';import{HTTPService as _0x5af417}from'@univerjs/network';const W=_0x32593b(0x231);var I=(_0x22bc7d=>(_0x22bc7d[_0x22bc7d[_0x32593b(0x227)]=0x0]=_0x32593b(0x227),_0x22bc7d[_0x22bc7d[_0x32593b(0x212)]=0x1]='Solved',_0x22bc7d[_0x22bc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22bc7d))(I||{}),v=(_0x2a8bc9=>(_0x2a8bc9[_0x2a8bc9[_0x32593b(0x249)]=0x0]=_0x32593b(0x249),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x22d)]=0x1]='Add',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x23a)]=0x2]=_0x32593b(0x23a),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x228)]=0x3]=_0x32593b(0x228),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x24f)]=0x4]=_0x32593b(0x24f),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x214)]=0x5]='Solve',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x20b)]=-0x1]=_0x32593b(0x20b),_0x2a8bc9))(v||{});const D=_0x17c914=>_0x255919(new Date(+_0x17c914))[_0x32593b(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x380532,_0x32ceff)=>{const _0x1e2646=_0x32593b,_0x97741c=_0x380532[_0x1e2646(0x254)](_0x43f749),_0x1b563b=_0x380532[_0x1e2646(0x254)](_0x5af417);_0x32ceff[_0x1e2646(0x236)](_0x488096=>{const _0x570972=_0x1e2646;_0x97741c[_0x570972(0x1fc)](_0x488096)&&_0x32ceff[_0x570972(0x234)](_0x488096);}),_0x32ceff[_0x1e2646(0x23d)]&&(await _0x1b563b['get'](_0x1e2646(0x20a),{'params':{'userIDs':[..._0x32ceff]}}))[_0x1e2646(0x20f)]['users'][_0x1e2646(0x236)](_0x27270e=>{const _0x30b19a=_0x1e2646;_0x27270e&&_0x97741c[_0x30b19a(0x253)](_0x27270e);});};var K=Object[_0x32593b(0x216)],V=(_0x1c2360,_0x54a8d6,_0x57aa88,_0x4f1f5c)=>{for(var _0x28251d=_0x4f1f5c>0x1?void 0x0:_0x4f1f5c?K(_0x54a8d6,_0x57aa88):_0x54a8d6,_0x339191=_0x1c2360['length']-0x1,_0x3c6e4c;_0x339191>=0x0;_0x339191--)(_0x3c6e4c=_0x1c2360[_0x339191])&&(_0x28251d=_0x3c6e4c(_0x28251d)||_0x28251d);return _0x28251d;},p=(_0x6a970d,_0x463f6f)=>(_0xb43242,_0x5d22bc)=>_0x463f6f(_0xb43242,_0x5d22bc,_0x6a970d);let S=class extends _0x136e8f{constructor(_0x2e455,_0x34bf1b,_0x531665,_0x2b23fe){const _0x272032=_0x32593b;super(),this[_0x272032(0x205)]=_0x2e455,this[_0x272032(0x224)]=_0x34bf1b,this[_0x272032(0x238)]=_0x531665,this[_0x272032(0x252)]=_0x2b23fe,this[_0x272032(0x1f6)](),this[_0x272032(0x206)]();}[_0x32593b(0x206)](){const _0x29804b=_0x32593b;this[_0x29804b(0x201)](this['_threadCommentModel'][_0x29804b(0x24e)][_0x29804b(0x244)](_0x14c0b1(0x10))[_0x29804b(0x21a)](_0x345ba8=>{const _0x39fc88=_0x29804b,_0x4425b4=new Set();_0x345ba8[_0x39fc88(0x236)](_0x5be4d5=>{const _0x5db378=_0x39fc88;switch(_0x5be4d5[_0x5db378(0x218)]){case _0x5db378(0x220):{const _0x4d2234=_0x5be4d5[_0x5db378(0x24d)][_0x5db378(0x24b)];_0x4425b4[_0x5db378(0x220)](_0x4d2234);break;}}}),B(this[_0x39fc88(0x252)],_0x4425b4);}));}[_0x32593b(0x1f6)](){const _0x416e53=_0x32593b;this[_0x416e53(0x201)](this['_commentService'][_0x416e53(0x24e)]['subscribe'](async _0xbfeb65=>{const _0x1cf9a0=_0x416e53;var _0x58c403,_0x45b09,_0xccaf01,_0x63a4a;const _0x153dbe=(_0x58c403=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65[_0x1cf9a0(0x200)])[_0x1cf9a0(0x222)](_0x34cc77=>_0x34cc77['threadId']===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x58c403[_0x1cf9a0(0x213)];if(!_0x153dbe)return;const {unitId:_0x50510d,subUnitId:_0x4552f7}=_0x153dbe;switch(_0xbfeb65[_0x1cf9a0(0x242)]&&this['_userService'][_0x1cf9a0(0x253)](_0xbfeb65['user']),_0xbfeb65[_0x1cf9a0(0x218)]){case v[_0x1cf9a0(0x22d)]:break;case v[_0x1cf9a0(0x23a)]:{this[_0x1cf9a0(0x224)][_0x1cf9a0(0x1fb)](_0x50510d,_0x4552f7,{'unitId':_0x50510d,'subUnitId':_0x4552f7,'ref':'','id':_0xbfeb65[_0x1cf9a0(0x240)],'dT':D(+_0xbfeb65[_0x1cf9a0(0x233)]),'threadId':_0xbfeb65['threadId'],'personId':(_0xccaf01=(_0x45b09=_0xbfeb65[_0x1cf9a0(0x242)])==null?void 0x0:_0x45b09['userID'])!=null?_0xccaf01:_0xbfeb65['userId'],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)]),'parentId':_0x153dbe['id']});break;}case v['Delete']:{const _0x5599c1=this[_0x1cf9a0(0x224)]['getComment'](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);_0x5599c1&&_0x5599c1[_0x1cf9a0(0x20d)]&&this['_threadCommentModel'][_0x1cf9a0(0x1f4)](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);break;}case v[_0x1cf9a0(0x228)]:{this[_0x1cf9a0(0x224)]['updateComment'](_0x50510d,_0x4552f7,{'commentId':_0xbfeb65[_0x1cf9a0(0x240)],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)])});break;}case v[_0x1cf9a0(0x214)]:{const _0x5ca788=(_0x63a4a=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65['unitId'])[_0x1cf9a0(0x222)](_0x21e169=>_0x21e169[_0x1cf9a0(0x243)]===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x63a4a[_0x1cf9a0(0x213)];_0x5ca788&&this[_0x1cf9a0(0x224)]['resolveComment'](_0x50510d,_0x4552f7,_0x5ca788['id'],_0xbfeb65[_0x1cf9a0(0x22a)]===I[_0x1cf9a0(0x212)]);break;}}}));}};S=V([p(0x0,_0x9b5830(_0x3b45f0)),p(0x1,_0x9b5830(_0x2927dc)),p(0x2,_0x9b5830(_0x43f749)),p(0x3,_0x9b5830(_0x57c758))],S);const z=_0x32593b(0x239),M={};var k=Object[_0x32593b(0x216)],Q=(_0x441207,_0x35647d,_0x5644f9,_0x2e9c15)=>{for(var _0x1bdebe=_0x2e9c15>0x1?void 0x0:_0x2e9c15?k(_0x35647d,_0x5644f9):_0x35647d,_0xedc7a6=_0x441207['length']-0x1,_0x87c2c4;_0xedc7a6>=0x0;_0xedc7a6--)(_0x87c2c4=_0x441207[_0xedc7a6])&&(_0x1bdebe=_0x87c2c4(_0x1bdebe)||_0x1bdebe);return _0x1bdebe;},_=(_0x38dbe1,_0x5c61db)=>(_0x20721d,_0x1cd919)=>_0x5c61db(_0x20721d,_0x1cd919,_0x38dbe1);function X(_0x20f192,_0x1d3a33){const _0x3abfb5=_0x32593b,_0x1613a2=_0x20f192['replies'][0x0];return{..._0x1d3a33,'id':_0x1613a2[_0x3abfb5(0x240)],'resolved':_0x20f192['solved']===0x1,'dT':D(_0x1613a2['createTimestamp']),'personId':_0x1613a2[_0x3abfb5(0x208)],'threadId':_0x1613a2[_0x3abfb5(0x243)]};}function ee(_0x5cbf13,_0xb12159,_0x3af956){const _0x4c3d03=_0x32593b;var _0x5732c3,_0x2c9ee9;if(((_0x2c9ee9=(_0x5732c3=_0x5cbf13==null?void 0x0:_0x5cbf13[_0x4c3d03(0x241)])==null?void 0x0:_0x5732c3[_0x4c3d03(0x248)])!=null?_0x2c9ee9:0x0)>0x0){const _0x81b62f=(_0x260e4b,_0x1c37f0)=>({'id':_0x260e4b[_0x4c3d03(0x240)],'threadId':_0x260e4b['threadId'],'dT':D(_0x260e4b[_0x4c3d03(0x233)]),'personId':_0x260e4b['userId'],'resolved':_0x5cbf13[_0x4c3d03(0x22a)]===I[_0x4c3d03(0x212)],'unitId':_0xb12159,'subUnitId':_0x3af956,'text':JSON[_0x4c3d03(0x230)](_0x260e4b[_0x4c3d03(0x223)]),'parentId':_0x1c37f0}),_0x2aa118=_0x81b62f(_0x5cbf13[_0x4c3d03(0x241)][0x0]);return{..._0x2aa118,'children':_0x5cbf13[_0x4c3d03(0x241)][_0x4c3d03(0x1f9)](0x1)[_0x4c3d03(0x21c)](_0x21ce8b=>_0x81b62f(_0x21ce8b,_0x2aa118['id']))};}return null;}let f=class{constructor(_0x5649fe,_0x45d19d,_0x24f100,_0x5ca544){const _0x26223d=_0x32593b;this[_0x26223d(0x203)]=_0x5649fe,this[_0x26223d(0x238)]=_0x45d19d,this[_0x26223d(0x22c)]=_0x24f100,this[_0x26223d(0x252)]=_0x5ca544;}async['addComment'](_0xda541f){const _0x2c0383=_0x32593b;var _0x39be13,_0x5effbd;const {parentId:_0xa7b38d,unitId:_0x708db6,text:_0x1eb77a,threadId:_0x54d336}=_0xda541f,_0x3782d7=(_0x5effbd=(_0x39be13=_0x1eb77a[_0x2c0383(0x1fe)])==null?void 0x0:_0x39be13['filter'](_0x4c4f83=>_0x4c4f83[_0x2c0383(0x20c)]===_0x49f0f2[_0x2c0383(0x229)])[_0x2c0383(0x21c)](_0x30424d=>_0x30424d[_0x2c0383(0x1f8)]))!=null?_0x5effbd:[],_0x350802=JSON['stringify'](_0x1eb77a),_0x543b9f=(await this[_0x2c0383(0x22c)]['requireSession'](_0x708db6))[_0x2c0383(0x1f3)]();if(_0xa7b38d){const _0x1bd899={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7,'threadId':_0x54d336},_0xec6ee8=(await this[_0x2c0383(0x203)][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x237),{'body':_0x1bd899}))[_0x2c0383(0x20f)]['reply'];return{..._0xda541f,'id':_0xec6ee8[_0x2c0383(0x240)],'dT':_0x255919(+_0xec6ee8[_0x2c0383(0x233)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xec6ee8[_0x2c0383(0x208)]};}else{const _0xe5a528={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7},_0x19485b=await this['_httpService'][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x217),{'body':_0xe5a528});return X(_0x19485b[_0x2c0383(0x20f)][_0x2c0383(0x221)],_0xda541f);}}async['updateComment'](_0x522fcd){const _0x132034=_0x32593b;var _0x44a055,_0x4b17cd;const {text:_0x1ce70e,unitId:_0x57df11}=_0x522fcd,_0x48a142=(_0x4b17cd=(_0x44a055=_0x1ce70e[_0x132034(0x1fe)])==null?void 0x0:_0x44a055[_0x132034(0x1f7)](_0x3b1956=>_0x3b1956[_0x132034(0x20c)]===_0x49f0f2[_0x132034(0x229)])[_0x132034(0x21c)](_0x253041=>_0x253041[_0x132034(0x1f8)]))!=null?_0x4b17cd:[],_0x2e926d=JSON['stringify'](_0x1ce70e),_0xa2564e=_0x522fcd[_0x132034(0x243)],_0x49f8f9=_0x522fcd['id'],_0x5654e7={'memberId':(await this[_0x132034(0x22c)][_0x132034(0x232)](_0x57df11))[_0x132034(0x1f3)](),'unitId':_0x57df11,'threadId':_0xa2564e,'mention':_0x48a142,'content':_0x2e926d,'replyId':_0x49f8f9},_0x372dca=await this['_httpService']['post'](_0x132034(0x22b)+_0x57df11+_0x132034(0x24c),{'body':_0x5654e7});return!_0x372dca[_0x132034(0x20f)][_0x132034(0x21e)]||_0x372dca[_0x132034(0x20f)]['error']['code']===0x1;}async['resolveComment'](_0x42f97b){const _0x3d2006=_0x32593b,{unitId:_0x2e3279}=_0x42f97b,_0x351c9c=_0x42f97b[_0x3d2006(0x243)],_0xe382b5={'memberId':this[_0x3d2006(0x238)][_0x3d2006(0x23f)]()[_0x3d2006(0x23c)],'unitId':_0x2e3279,'threadId':_0x351c9c,'solved':_0x42f97b['resolved']?I[_0x3d2006(0x212)]:I[_0x3d2006(0x227)]},_0x15daf5=await this['_httpService']['post'](_0x3d2006(0x22b)+_0x2e3279+_0x3d2006(0x20e),{'body':_0xe382b5});return!_0x15daf5[_0x3d2006(0x20f)][_0x3d2006(0x21e)]||_0x15daf5['body'][_0x3d2006(0x21e)]['code']===0x1;}async['deleteComment'](_0x2f9b23,_0x1fa5a9,_0x10131e,_0x380a9e){const _0x4f8190=_0x32593b,_0x5c3ebe={'memberId':(await this[_0x4f8190(0x22c)][_0x4f8190(0x232)](_0x2f9b23))[_0x4f8190(0x1f3)](),'threadId':_0x10131e,'replyId':_0x380a9e,'unitId':_0x2f9b23},_0x15a431=await this[_0x4f8190(0x203)][_0x4f8190(0x1f5)](_0x4f8190(0x22b)+_0x2f9b23+_0x4f8190(0x1fa),{'body':_0x5c3ebe});return!_0x15a431[_0x4f8190(0x20f)][_0x4f8190(0x21e)]||_0x15a431['body'][_0x4f8190(0x21e)]['code']===0x1;}async[_0x32593b(0x235)](_0x2d56a6,_0x160fd3,_0x139651){const _0x3dfaea=_0x32593b,_0x160338={'unitId':_0x2d56a6,'threadId':_0x139651},_0x1bdfed=await this[_0x3dfaea(0x203)][_0x3dfaea(0x1f5)](_0x3dfaea(0x22b)+_0x2d56a6+_0x3dfaea(0x247),{'body':_0x160338}),_0x36079b=_0x139651[_0x3dfaea(0x21c)](_0x4e6117=>ee(_0x1bdfed['body'][_0x3dfaea(0x23b)][_0x4e6117],_0x2d56a6,_0x160fd3))[_0x3dfaea(0x1f7)](Boolean);return Object['values'](_0x1bdfed[_0x3dfaea(0x20f)][_0x3dfaea(0x219)])[_0x3dfaea(0x236)](_0x5c508c=>{const _0x5142b1=_0x3dfaea;this[_0x5142b1(0x238)]['addUser'](_0x5c508c);}),_0x36079b;}['saveCommentToSnapshot'](_0x379471){const _0xe40a1b=_0x32593b;return{'id':_0x379471['id'],'threadId':_0x379471[_0xe40a1b(0x243)],'ref':_0x379471['ref']};}};f=Q([_(0x0,_0x9b5830(_0x5af417)),_(0x1,_0x9b5830(_0x43f749)),_(0x2,_0x9b5830(_0x197a37)),_(0x3,_0x9b5830(_0x57c758))],f);function _0x51fd(_0x73eb84,_0x4da1fb){const _0x3725c3=_0x3725();return _0x51fd=function(_0x51fd1b,_0x15c1c6){_0x51fd1b=_0x51fd1b-0x1f2;let _0x276321=_0x3725c3[_0x51fd1b];return _0x276321;},_0x51fd(_0x73eb84,_0x4da1fb);}var re=Object['getOwnPropertyDescriptor'],te=(_0x3e59ae,_0x1db0a4,_0x5cfe78,_0x3b14f7)=>{const _0x43997f=_0x32593b;for(var _0x43fdac=_0x3b14f7>0x1?void 0x0:_0x3b14f7?re(_0x1db0a4,_0x5cfe78):_0x1db0a4,_0x19760a=_0x3e59ae[_0x43997f(0x248)]-0x1,_0x266302;_0x19760a>=0x0;_0x19760a--)(_0x266302=_0x3e59ae[_0x19760a])&&(_0x43fdac=_0x266302(_0x43fdac)||_0x43fdac);return _0x43fdac;},N=(_0x4d749b,_0x5a760b)=>(_0xea4c70,_0x2d46ec)=>_0x5a760b(_0xea4c70,_0x2d46ec,_0x4d749b);let g=class extends _0x136e8f{constructor(_0x269df9,_0x3fe1dc){const _0x59bfb6=_0x32593b;super(),this['_threadCommentDataSourceService']=_0x269df9,this[_0x59bfb6(0x1ff)]=_0x3fe1dc,this[_0x59bfb6(0x210)]();}[_0x32593b(0x210)](){const _0x1315d5=_0x32593b;this[_0x1315d5(0x202)][_0x1315d5(0x211)]=this[_0x1315d5(0x1ff)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x49413f),N(0x1,_0x9b5830(f))],g);var se=Object[_0x32593b(0x21f)],oe=Object[_0x32593b(0x216)],ne=(_0x2dbdc4,_0x27d5e7,_0x1bd7b1)=>_0x27d5e7 in _0x2dbdc4?se(_0x2dbdc4,_0x27d5e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bd7b1}):_0x2dbdc4[_0x27d5e7]=_0x1bd7b1,ie=(_0x292f9f,_0x2f3d92,_0x19eb8a,_0x204101)=>{const _0x39aa67=_0x32593b;for(var _0x3878f6=_0x204101>0x1?void 0x0:_0x204101?oe(_0x2f3d92,_0x19eb8a):_0x2f3d92,_0x4660e3=_0x292f9f[_0x39aa67(0x248)]-0x1,_0x14b78d;_0x4660e3>=0x0;_0x4660e3--)(_0x14b78d=_0x292f9f[_0x4660e3])&&(_0x3878f6=_0x14b78d(_0x3878f6)||_0x3878f6);return _0x3878f6;},w=(_0x46c5ba,_0x381f8e)=>(_0x508835,_0x25aec6)=>_0x381f8e(_0x508835,_0x25aec6,_0x46c5ba),$=(_0x5c2db0,_0x32d758,_0x481fca)=>ne(_0x5c2db0,typeof _0x32d758!=_0x32593b(0x204)?_0x32d758+'':_0x32d758,_0x481fca);function _0x3725(){const _0xd10164=['Delete','onStarting','2342116CkcUOL','_injector','addUser','get','525676eAFmsL','getMemberID','deleteComment','post','_init','filter','rangeId','slice','/delete','addComment','getUser','1435665PkjsXQ','customRanges','_threadCommentDataSource','unitId','disposeWithMe','_threadCommentDataSourceService','_httpService','symbol','_commentService','_initUserSync','_config','userId','format','/universer-api/user/list','UNRECOGNIZED','rangeType','parentId','/solved','body','_initDataSource','dataSource','Solved','root','Solve','1764YCiPbl','getOwnPropertyDescriptor','/add','type','users','subscribe','3060968CAjsgA','map','getUnit','error','defineProperty','add','comment','find','content','_threadCommentModel','onReady','UNIVER_UNKNOWN','OpenOrReOpen','Edit','COMMENT','solved','/universer-api/comment/unit/','_sessionService','Add','_configService','149484eiySRq','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','createTimestamp','delete','listComments','forEach','/reply','_userService','thread-comment-data-source.config','Reply','comments','userID','size','3145710ICPYuK','getCurrentUser','replyId','replies','user','threadId','pipe','8169DWLpUl','pluginName','/list','length','Unknown','setConfig','personId','/edit','payload','commentUpdate$'];_0x3725=function(){return _0xd10164;};return _0x3725();}let b=class extends _0x4332cb{constructor(_0x3dc5cf=M,_0x546445,_0x6b2e7f){const _0xffff0e=_0x32593b;super(),this[_0xffff0e(0x207)]=_0x3dc5cf,this['_injector']=_0x546445,this[_0xffff0e(0x22e)]=_0x6b2e7f;const {..._0x1546e0}=_0x2aa03e({},M,this[_0xffff0e(0x207)]);this[_0xffff0e(0x22e)][_0xffff0e(0x24a)](z,_0x1546e0);}[_0x32593b(0x250)](){const _0x1a7124=_0x32593b;[[f],[g],[S]][_0x1a7124(0x236)](_0x2c8a2e=>{const _0x3533c6=_0x1a7124;this[_0x3533c6(0x252)][_0x3533c6(0x220)](_0x2c8a2e);});}[_0x32593b(0x225)](){const _0xe1971f=_0x32593b;this['_injector']['get'](g),this[_0xe1971f(0x252)][_0xe1971f(0x254)](S);}};$(b,_0x32593b(0x246),W),$(b,_0x32593b(0x218),_0x34926c[_0x32593b(0x226)]),b=ie([_0x44d782(_0xea9a1,_0x182658,_0x3592f4),w(0x1,_0x9b5830(_0x57c758)),w(0x2,_0x46444d)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x32593b=_0x51fd;(function(_0x59556a,_0x213cce){const _0x290389=_0x51fd,_0x437077=_0x59556a();while(!![]){try{const _0x307ce9=-parseInt(_0x290389(0x22f))/0x1+parseInt(_0x290389(0x1f2))/0x2+-parseInt(_0x290389(0x1fd))/0x3+parseInt(_0x290389(0x251))/0x4+-parseInt(_0x290389(0x23e))/0x5+parseInt(_0x290389(0x215))/0x6*(parseInt(_0x290389(0x245))/0x7)+parseInt(_0x290389(0x21b))/0x8;if(_0x307ce9===_0x213cce)break;else _0x437077['push'](_0x437077['shift']());}catch(_0x1c2812){_0x437077['push'](_0x437077['shift']());}}}(_0x3725,0x4d5e9));import{CommentService as _0x3b45f0,CollaborationSessionService as _0x197a37,UniverCollaborationClientPlugin as _0x182658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3592f4}from'@univerjs-pro/license';import{dayjs as _0x255919,UserManagerService as _0x43f749,Inject as _0x9b5830,Injector as _0x57c758,Disposable as _0x136e8f,CustomRangeType as _0x49f0f2,UniverInstanceType as _0x34926c,DependentOn as _0x44d782,IConfigService as _0x46444d,Plugin as _0x4332cb,merge as _0x2aa03e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xea9a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2927dc,IThreadCommentDataSourceService as _0x49413f}from'@univerjs/thread-comment';import{bufferTime as _0x14c0b1}from'rxjs';import{HTTPService as _0x5af417}from'@univerjs/network';const W=_0x32593b(0x231);var I=(_0x22bc7d=>(_0x22bc7d[_0x22bc7d[_0x32593b(0x227)]=0x0]=_0x32593b(0x227),_0x22bc7d[_0x22bc7d[_0x32593b(0x212)]=0x1]='Solved',_0x22bc7d[_0x22bc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22bc7d))(I||{}),v=(_0x2a8bc9=>(_0x2a8bc9[_0x2a8bc9[_0x32593b(0x249)]=0x0]=_0x32593b(0x249),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x22d)]=0x1]='Add',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x23a)]=0x2]=_0x32593b(0x23a),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x228)]=0x3]=_0x32593b(0x228),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x24f)]=0x4]=_0x32593b(0x24f),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x214)]=0x5]='Solve',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x20b)]=-0x1]=_0x32593b(0x20b),_0x2a8bc9))(v||{});const D=_0x17c914=>_0x255919(new Date(+_0x17c914))[_0x32593b(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x380532,_0x32ceff)=>{const _0x1e2646=_0x32593b,_0x97741c=_0x380532[_0x1e2646(0x254)](_0x43f749),_0x1b563b=_0x380532[_0x1e2646(0x254)](_0x5af417);_0x32ceff[_0x1e2646(0x236)](_0x488096=>{const _0x570972=_0x1e2646;_0x97741c[_0x570972(0x1fc)](_0x488096)&&_0x32ceff[_0x570972(0x234)](_0x488096);}),_0x32ceff[_0x1e2646(0x23d)]&&(await _0x1b563b['get'](_0x1e2646(0x20a),{'params':{'userIDs':[..._0x32ceff]}}))[_0x1e2646(0x20f)]['users'][_0x1e2646(0x236)](_0x27270e=>{const _0x30b19a=_0x1e2646;_0x27270e&&_0x97741c[_0x30b19a(0x253)](_0x27270e);});};var K=Object[_0x32593b(0x216)],V=(_0x1c2360,_0x54a8d6,_0x57aa88,_0x4f1f5c)=>{for(var _0x28251d=_0x4f1f5c>0x1?void 0x0:_0x4f1f5c?K(_0x54a8d6,_0x57aa88):_0x54a8d6,_0x339191=_0x1c2360['length']-0x1,_0x3c6e4c;_0x339191>=0x0;_0x339191--)(_0x3c6e4c=_0x1c2360[_0x339191])&&(_0x28251d=_0x3c6e4c(_0x28251d)||_0x28251d);return _0x28251d;},p=(_0x6a970d,_0x463f6f)=>(_0xb43242,_0x5d22bc)=>_0x463f6f(_0xb43242,_0x5d22bc,_0x6a970d);let S=class extends _0x136e8f{constructor(_0x2e455,_0x34bf1b,_0x531665,_0x2b23fe){const _0x272032=_0x32593b;super(),this[_0x272032(0x205)]=_0x2e455,this[_0x272032(0x224)]=_0x34bf1b,this[_0x272032(0x238)]=_0x531665,this[_0x272032(0x252)]=_0x2b23fe,this[_0x272032(0x1f6)](),this[_0x272032(0x206)]();}[_0x32593b(0x206)](){const _0x29804b=_0x32593b;this[_0x29804b(0x201)](this['_threadCommentModel'][_0x29804b(0x24e)][_0x29804b(0x244)](_0x14c0b1(0x10))[_0x29804b(0x21a)](_0x345ba8=>{const _0x39fc88=_0x29804b,_0x4425b4=new Set();_0x345ba8[_0x39fc88(0x236)](_0x5be4d5=>{const _0x5db378=_0x39fc88;switch(_0x5be4d5[_0x5db378(0x218)]){case _0x5db378(0x220):{const _0x4d2234=_0x5be4d5[_0x5db378(0x24d)][_0x5db378(0x24b)];_0x4425b4[_0x5db378(0x220)](_0x4d2234);break;}}}),B(this[_0x39fc88(0x252)],_0x4425b4);}));}[_0x32593b(0x1f6)](){const _0x416e53=_0x32593b;this[_0x416e53(0x201)](this['_commentService'][_0x416e53(0x24e)]['subscribe'](async _0xbfeb65=>{const _0x1cf9a0=_0x416e53;var _0x58c403,_0x45b09,_0xccaf01,_0x63a4a;const _0x153dbe=(_0x58c403=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65[_0x1cf9a0(0x200)])[_0x1cf9a0(0x222)](_0x34cc77=>_0x34cc77['threadId']===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x58c403[_0x1cf9a0(0x213)];if(!_0x153dbe)return;const {unitId:_0x50510d,subUnitId:_0x4552f7}=_0x153dbe;switch(_0xbfeb65[_0x1cf9a0(0x242)]&&this['_userService'][_0x1cf9a0(0x253)](_0xbfeb65['user']),_0xbfeb65[_0x1cf9a0(0x218)]){case v[_0x1cf9a0(0x22d)]:break;case v[_0x1cf9a0(0x23a)]:{this[_0x1cf9a0(0x224)][_0x1cf9a0(0x1fb)](_0x50510d,_0x4552f7,{'unitId':_0x50510d,'subUnitId':_0x4552f7,'ref':'','id':_0xbfeb65[_0x1cf9a0(0x240)],'dT':D(+_0xbfeb65[_0x1cf9a0(0x233)]),'threadId':_0xbfeb65['threadId'],'personId':(_0xccaf01=(_0x45b09=_0xbfeb65[_0x1cf9a0(0x242)])==null?void 0x0:_0x45b09['userID'])!=null?_0xccaf01:_0xbfeb65['userId'],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)]),'parentId':_0x153dbe['id']});break;}case v['Delete']:{const _0x5599c1=this[_0x1cf9a0(0x224)]['getComment'](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);_0x5599c1&&_0x5599c1[_0x1cf9a0(0x20d)]&&this['_threadCommentModel'][_0x1cf9a0(0x1f4)](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);break;}case v[_0x1cf9a0(0x228)]:{this[_0x1cf9a0(0x224)]['updateComment'](_0x50510d,_0x4552f7,{'commentId':_0xbfeb65[_0x1cf9a0(0x240)],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)])});break;}case v[_0x1cf9a0(0x214)]:{const _0x5ca788=(_0x63a4a=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65['unitId'])[_0x1cf9a0(0x222)](_0x21e169=>_0x21e169[_0x1cf9a0(0x243)]===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x63a4a[_0x1cf9a0(0x213)];_0x5ca788&&this[_0x1cf9a0(0x224)]['resolveComment'](_0x50510d,_0x4552f7,_0x5ca788['id'],_0xbfeb65[_0x1cf9a0(0x22a)]===I[_0x1cf9a0(0x212)]);break;}}}));}};S=V([p(0x0,_0x9b5830(_0x3b45f0)),p(0x1,_0x9b5830(_0x2927dc)),p(0x2,_0x9b5830(_0x43f749)),p(0x3,_0x9b5830(_0x57c758))],S);const z=_0x32593b(0x239),M={};var k=Object[_0x32593b(0x216)],Q=(_0x441207,_0x35647d,_0x5644f9,_0x2e9c15)=>{for(var _0x1bdebe=_0x2e9c15>0x1?void 0x0:_0x2e9c15?k(_0x35647d,_0x5644f9):_0x35647d,_0xedc7a6=_0x441207['length']-0x1,_0x87c2c4;_0xedc7a6>=0x0;_0xedc7a6--)(_0x87c2c4=_0x441207[_0xedc7a6])&&(_0x1bdebe=_0x87c2c4(_0x1bdebe)||_0x1bdebe);return _0x1bdebe;},_=(_0x38dbe1,_0x5c61db)=>(_0x20721d,_0x1cd919)=>_0x5c61db(_0x20721d,_0x1cd919,_0x38dbe1);function X(_0x20f192,_0x1d3a33){const _0x3abfb5=_0x32593b,_0x1613a2=_0x20f192['replies'][0x0];return{..._0x1d3a33,'id':_0x1613a2[_0x3abfb5(0x240)],'resolved':_0x20f192['solved']===0x1,'dT':D(_0x1613a2['createTimestamp']),'personId':_0x1613a2[_0x3abfb5(0x208)],'threadId':_0x1613a2[_0x3abfb5(0x243)]};}function ee(_0x5cbf13,_0xb12159,_0x3af956){const _0x4c3d03=_0x32593b;var _0x5732c3,_0x2c9ee9;if(((_0x2c9ee9=(_0x5732c3=_0x5cbf13==null?void 0x0:_0x5cbf13[_0x4c3d03(0x241)])==null?void 0x0:_0x5732c3[_0x4c3d03(0x248)])!=null?_0x2c9ee9:0x0)>0x0){const _0x81b62f=(_0x260e4b,_0x1c37f0)=>({'id':_0x260e4b[_0x4c3d03(0x240)],'threadId':_0x260e4b['threadId'],'dT':D(_0x260e4b[_0x4c3d03(0x233)]),'personId':_0x260e4b['userId'],'resolved':_0x5cbf13[_0x4c3d03(0x22a)]===I[_0x4c3d03(0x212)],'unitId':_0xb12159,'subUnitId':_0x3af956,'text':JSON[_0x4c3d03(0x230)](_0x260e4b[_0x4c3d03(0x223)]),'parentId':_0x1c37f0}),_0x2aa118=_0x81b62f(_0x5cbf13[_0x4c3d03(0x241)][0x0]);return{..._0x2aa118,'children':_0x5cbf13[_0x4c3d03(0x241)][_0x4c3d03(0x1f9)](0x1)[_0x4c3d03(0x21c)](_0x21ce8b=>_0x81b62f(_0x21ce8b,_0x2aa118['id']))};}return null;}let f=class{constructor(_0x5649fe,_0x45d19d,_0x24f100,_0x5ca544){const _0x26223d=_0x32593b;this[_0x26223d(0x203)]=_0x5649fe,this[_0x26223d(0x238)]=_0x45d19d,this[_0x26223d(0x22c)]=_0x24f100,this[_0x26223d(0x252)]=_0x5ca544;}async['addComment'](_0xda541f){const _0x2c0383=_0x32593b;var _0x39be13,_0x5effbd;const {parentId:_0xa7b38d,unitId:_0x708db6,text:_0x1eb77a,threadId:_0x54d336}=_0xda541f,_0x3782d7=(_0x5effbd=(_0x39be13=_0x1eb77a[_0x2c0383(0x1fe)])==null?void 0x0:_0x39be13['filter'](_0x4c4f83=>_0x4c4f83[_0x2c0383(0x20c)]===_0x49f0f2[_0x2c0383(0x229)])[_0x2c0383(0x21c)](_0x30424d=>_0x30424d[_0x2c0383(0x1f8)]))!=null?_0x5effbd:[],_0x350802=JSON['stringify'](_0x1eb77a),_0x543b9f=(await this[_0x2c0383(0x22c)]['requireSession'](_0x708db6))[_0x2c0383(0x1f3)]();if(_0xa7b38d){const _0x1bd899={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7,'threadId':_0x54d336},_0xec6ee8=(await this[_0x2c0383(0x203)][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x237),{'body':_0x1bd899}))[_0x2c0383(0x20f)]['reply'];return{..._0xda541f,'id':_0xec6ee8[_0x2c0383(0x240)],'dT':_0x255919(+_0xec6ee8[_0x2c0383(0x233)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xec6ee8[_0x2c0383(0x208)]};}else{const _0xe5a528={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7},_0x19485b=await this['_httpService'][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x217),{'body':_0xe5a528});return X(_0x19485b[_0x2c0383(0x20f)][_0x2c0383(0x221)],_0xda541f);}}async['updateComment'](_0x522fcd){const _0x132034=_0x32593b;var _0x44a055,_0x4b17cd;const {text:_0x1ce70e,unitId:_0x57df11}=_0x522fcd,_0x48a142=(_0x4b17cd=(_0x44a055=_0x1ce70e[_0x132034(0x1fe)])==null?void 0x0:_0x44a055[_0x132034(0x1f7)](_0x3b1956=>_0x3b1956[_0x132034(0x20c)]===_0x49f0f2[_0x132034(0x229)])[_0x132034(0x21c)](_0x253041=>_0x253041[_0x132034(0x1f8)]))!=null?_0x4b17cd:[],_0x2e926d=JSON['stringify'](_0x1ce70e),_0xa2564e=_0x522fcd[_0x132034(0x243)],_0x49f8f9=_0x522fcd['id'],_0x5654e7={'memberId':(await this[_0x132034(0x22c)][_0x132034(0x232)](_0x57df11))[_0x132034(0x1f3)](),'unitId':_0x57df11,'threadId':_0xa2564e,'mention':_0x48a142,'content':_0x2e926d,'replyId':_0x49f8f9},_0x372dca=await this['_httpService']['post'](_0x132034(0x22b)+_0x57df11+_0x132034(0x24c),{'body':_0x5654e7});return!_0x372dca[_0x132034(0x20f)][_0x132034(0x21e)]||_0x372dca[_0x132034(0x20f)]['error']['code']===0x1;}async['resolveComment'](_0x42f97b){const _0x3d2006=_0x32593b,{unitId:_0x2e3279}=_0x42f97b,_0x351c9c=_0x42f97b[_0x3d2006(0x243)],_0xe382b5={'memberId':this[_0x3d2006(0x238)][_0x3d2006(0x23f)]()[_0x3d2006(0x23c)],'unitId':_0x2e3279,'threadId':_0x351c9c,'solved':_0x42f97b['resolved']?I[_0x3d2006(0x212)]:I[_0x3d2006(0x227)]},_0x15daf5=await this['_httpService']['post'](_0x3d2006(0x22b)+_0x2e3279+_0x3d2006(0x20e),{'body':_0xe382b5});return!_0x15daf5[_0x3d2006(0x20f)][_0x3d2006(0x21e)]||_0x15daf5['body'][_0x3d2006(0x21e)]['code']===0x1;}async['deleteComment'](_0x2f9b23,_0x1fa5a9,_0x10131e,_0x380a9e){const _0x4f8190=_0x32593b,_0x5c3ebe={'memberId':(await this[_0x4f8190(0x22c)][_0x4f8190(0x232)](_0x2f9b23))[_0x4f8190(0x1f3)](),'threadId':_0x10131e,'replyId':_0x380a9e,'unitId':_0x2f9b23},_0x15a431=await this[_0x4f8190(0x203)][_0x4f8190(0x1f5)](_0x4f8190(0x22b)+_0x2f9b23+_0x4f8190(0x1fa),{'body':_0x5c3ebe});return!_0x15a431[_0x4f8190(0x20f)][_0x4f8190(0x21e)]||_0x15a431['body'][_0x4f8190(0x21e)]['code']===0x1;}async[_0x32593b(0x235)](_0x2d56a6,_0x160fd3,_0x139651){const _0x3dfaea=_0x32593b,_0x160338={'unitId':_0x2d56a6,'threadId':_0x139651},_0x1bdfed=await this[_0x3dfaea(0x203)][_0x3dfaea(0x1f5)](_0x3dfaea(0x22b)+_0x2d56a6+_0x3dfaea(0x247),{'body':_0x160338}),_0x36079b=_0x139651[_0x3dfaea(0x21c)](_0x4e6117=>ee(_0x1bdfed['body'][_0x3dfaea(0x23b)][_0x4e6117],_0x2d56a6,_0x160fd3))[_0x3dfaea(0x1f7)](Boolean);return Object['values'](_0x1bdfed[_0x3dfaea(0x20f)][_0x3dfaea(0x219)])[_0x3dfaea(0x236)](_0x5c508c=>{const _0x5142b1=_0x3dfaea;this[_0x5142b1(0x238)]['addUser'](_0x5c508c);}),_0x36079b;}['saveCommentToSnapshot'](_0x379471){const _0xe40a1b=_0x32593b;return{'id':_0x379471['id'],'threadId':_0x379471[_0xe40a1b(0x243)],'ref':_0x379471['ref']};}};f=Q([_(0x0,_0x9b5830(_0x5af417)),_(0x1,_0x9b5830(_0x43f749)),_(0x2,_0x9b5830(_0x197a37)),_(0x3,_0x9b5830(_0x57c758))],f);function _0x51fd(_0x73eb84,_0x4da1fb){const _0x3725c3=_0x3725();return _0x51fd=function(_0x51fd1b,_0x15c1c6){_0x51fd1b=_0x51fd1b-0x1f2;let _0x276321=_0x3725c3[_0x51fd1b];return _0x276321;},_0x51fd(_0x73eb84,_0x4da1fb);}var re=Object['getOwnPropertyDescriptor'],te=(_0x3e59ae,_0x1db0a4,_0x5cfe78,_0x3b14f7)=>{const _0x43997f=_0x32593b;for(var _0x43fdac=_0x3b14f7>0x1?void 0x0:_0x3b14f7?re(_0x1db0a4,_0x5cfe78):_0x1db0a4,_0x19760a=_0x3e59ae[_0x43997f(0x248)]-0x1,_0x266302;_0x19760a>=0x0;_0x19760a--)(_0x266302=_0x3e59ae[_0x19760a])&&(_0x43fdac=_0x266302(_0x43fdac)||_0x43fdac);return _0x43fdac;},N=(_0x4d749b,_0x5a760b)=>(_0xea4c70,_0x2d46ec)=>_0x5a760b(_0xea4c70,_0x2d46ec,_0x4d749b);let g=class extends _0x136e8f{constructor(_0x269df9,_0x3fe1dc){const _0x59bfb6=_0x32593b;super(),this['_threadCommentDataSourceService']=_0x269df9,this[_0x59bfb6(0x1ff)]=_0x3fe1dc,this[_0x59bfb6(0x210)]();}[_0x32593b(0x210)](){const _0x1315d5=_0x32593b;this[_0x1315d5(0x202)][_0x1315d5(0x211)]=this[_0x1315d5(0x1ff)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x49413f),N(0x1,_0x9b5830(f))],g);var se=Object[_0x32593b(0x21f)],oe=Object[_0x32593b(0x216)],ne=(_0x2dbdc4,_0x27d5e7,_0x1bd7b1)=>_0x27d5e7 in _0x2dbdc4?se(_0x2dbdc4,_0x27d5e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bd7b1}):_0x2dbdc4[_0x27d5e7]=_0x1bd7b1,ie=(_0x292f9f,_0x2f3d92,_0x19eb8a,_0x204101)=>{const _0x39aa67=_0x32593b;for(var _0x3878f6=_0x204101>0x1?void 0x0:_0x204101?oe(_0x2f3d92,_0x19eb8a):_0x2f3d92,_0x4660e3=_0x292f9f[_0x39aa67(0x248)]-0x1,_0x14b78d;_0x4660e3>=0x0;_0x4660e3--)(_0x14b78d=_0x292f9f[_0x4660e3])&&(_0x3878f6=_0x14b78d(_0x3878f6)||_0x3878f6);return _0x3878f6;},w=(_0x46c5ba,_0x381f8e)=>(_0x508835,_0x25aec6)=>_0x381f8e(_0x508835,_0x25aec6,_0x46c5ba),$=(_0x5c2db0,_0x32d758,_0x481fca)=>ne(_0x5c2db0,typeof _0x32d758!=_0x32593b(0x204)?_0x32d758+'':_0x32d758,_0x481fca);function _0x3725(){const _0xd10164=['Delete','onStarting','2342116CkcUOL','_injector','addUser','get','525676eAFmsL','getMemberID','deleteComment','post','_init','filter','rangeId','slice','/delete','addComment','getUser','1435665PkjsXQ','customRanges','_threadCommentDataSource','unitId','disposeWithMe','_threadCommentDataSourceService','_httpService','symbol','_commentService','_initUserSync','_config','userId','format','/universer-api/user/list','UNRECOGNIZED','rangeType','parentId','/solved','body','_initDataSource','dataSource','Solved','root','Solve','1764YCiPbl','getOwnPropertyDescriptor','/add','type','users','subscribe','3060968CAjsgA','map','getUnit','error','defineProperty','add','comment','find','content','_threadCommentModel','onReady','UNIVER_UNKNOWN','OpenOrReOpen','Edit','COMMENT','solved','/universer-api/comment/unit/','_sessionService','Add','_configService','149484eiySRq','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','createTimestamp','delete','listComments','forEach','/reply','_userService','thread-comment-data-source.config','Reply','comments','userID','size','3145710ICPYuK','getCurrentUser','replyId','replies','user','threadId','pipe','8169DWLpUl','pluginName','/list','length','Unknown','setConfig','personId','/edit','payload','commentUpdate$'];_0x3725=function(){return _0xd10164;};return _0x3725();}let b=class extends _0x4332cb{constructor(_0x3dc5cf=M,_0x546445,_0x6b2e7f){const _0xffff0e=_0x32593b;super(),this[_0xffff0e(0x207)]=_0x3dc5cf,this['_injector']=_0x546445,this[_0xffff0e(0x22e)]=_0x6b2e7f;const {..._0x1546e0}=_0x2aa03e({},M,this[_0xffff0e(0x207)]);this[_0xffff0e(0x22e)][_0xffff0e(0x24a)](z,_0x1546e0);}[_0x32593b(0x250)](){const _0x1a7124=_0x32593b;[[f],[g],[S]][_0x1a7124(0x236)](_0x2c8a2e=>{const _0x3533c6=_0x1a7124;this[_0x3533c6(0x252)][_0x3533c6(0x220)](_0x2c8a2e);});}[_0x32593b(0x225)](){const _0xe1971f=_0x32593b;this['_injector']['get'](g),this[_0xe1971f(0x252)][_0xe1971f(0x254)](S);}};$(b,_0x32593b(0x246),W),$(b,_0x32593b(0x218),_0x34926c[_0x32593b(0x226)]),b=ie([_0x44d782(_0xea9a1,_0x182658,_0x3592f4),w(0x1,_0x9b5830(_0x57c758)),w(0x2,_0x46444d)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xe027(){const _0x138747=['subscribe','Injector','Edit','type','payload','69160NHmLBv','Disposable','parentId','getComment','filter','saveCommentToSnapshot','Solved','Add','3943926ZeYDZf','/list','disposeWithMe','_userService','ThreadCommentModel','21630sgBnnQ','object','merge','UniverThreadCommentDataSourcePlugin','895815rMfFma','UniverProCollaborationClient','format','_config','UniverCore','addUser','listComments','thread-comment-data-source.config','UniverInstanceType','@univerjs/thread-comment-ui','rxjs','CommentService','UserManagerService','defineProperty','stringify','find','Solve','getMemberID','3DGdyzg','slice','_init','2214vEaMjU','delete','Delete','_threadCommentModel','userID','content','pipe','function','customRanges','UniverNetwork','getUnit','size','users','_injector','_initUserSync','679mQdgZR','getUser','comments','rangeType','@univerjs-pro/license','_threadCommentDataSource','bufferTime','_threadCommentDataSourceService','pluginName','replyId','requireSession','map','forEach','userId','@univerjs-pro/collaboration-client','get','/delete','add','IThreadCommentDataSourceService','IConfigService','syncUpdateMutationToColla','Unknown','/add','replies','UniverProThreadCommentDatasource','addComment','UniverThreadCommentUIPlugin','ref','rangeId','UniverCollaborationClientPlugin','symbol','UniverProLicense','_configService','205FGjebG','values','Reply','UNRECOGNIZED','@univerjs/network','/universer-api/comment/unit/','getCurrentUser','updateComment','deleteComment','28083484ykCfQG','setConfig','getOwnPropertyDescriptor','_initDataSource','2182866ouYduq','onReady','unitId','_httpService','Plugin','solved','reply','onStarting','error','@univerjs/core','personId','resolveComment','code','createTimestamp','user','commentUpdate$','@univerjs/thread-comment','post','amd','UNIVER_UNKNOWN','dayjs','Inject','parse','length','CustomRangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','body','threadId','102412TKWSgi','_sessionService','COMMENT','dataSource','HTTPService','YYYY/MM/DD\x20HH:mm'];_0xe027=function(){return _0x138747;};return _0xe027();}function _0x52f8(_0x4fb342,_0x3373af){const _0xe0271f=_0xe027();return _0x52f8=function(_0x52f810,_0x3a4965){_0x52f810=_0x52f810-0x193;let _0x1864c6=_0xe0271f[_0x52f810];return _0x1864c6;},_0x52f8(_0x4fb342,_0x3373af);}(function(_0x34023c,_0x5d7969){const _0x45813d=_0x52f8,_0x2b3c37=_0x34023c();while(!![]){try{const _0x19d742=parseInt(_0x45813d(0x1de))/0x1+-parseInt(_0x45813d(0x1a5))/0x2*(parseInt(_0x45813d(0x1f0))/0x3)+-parseInt(_0x45813d(0x1c2))/0x4*(parseInt(_0x45813d(0x198))/0x5)+parseInt(_0x45813d(0x1d5))/0x6+-parseInt(_0x45813d(0x202))/0x7*(parseInt(_0x45813d(0x1cd))/0x8)+parseInt(_0x45813d(0x1f3))/0x9*(-parseInt(_0x45813d(0x1da))/0xa)+parseInt(_0x45813d(0x1a1))/0xb;if(_0x19d742===_0x5d7969)break;else _0x2b3c37['push'](_0x2b3c37['shift']());}catch(_0x26457a){_0x2b3c37['push'](_0x2b3c37['shift']());}}}(_0xe027,0x911b9),function(_0x2201f2,_0xc7da50){const _0x3ad85e=_0x52f8;typeof exports==_0x3ad85e(0x1db)&&typeof module<'u'?_0xc7da50(exports,require(_0x3ad85e(0x210)),require(_0x3ad85e(0x206)),require(_0x3ad85e(0x1ae)),require(_0x3ad85e(0x1e7)),require(_0x3ad85e(0x1b5)),require(_0x3ad85e(0x1e8)),require('@univerjs/network')):typeof define==_0x3ad85e(0x1fa)&&define[_0x3ad85e(0x1b7)]?define(['exports',_0x3ad85e(0x210),'@univerjs-pro/license',_0x3ad85e(0x1ae),_0x3ad85e(0x1e7),_0x3ad85e(0x1b5),_0x3ad85e(0x1e8),_0x3ad85e(0x19c)],_0xc7da50):(_0x2201f2=typeof globalThis<'u'?globalThis:_0x2201f2||self,_0xc7da50(_0x2201f2[_0x3ad85e(0x21a)]={},_0x2201f2[_0x3ad85e(0x1df)],_0x2201f2[_0x3ad85e(0x196)],_0x2201f2[_0x3ad85e(0x1e2)],_0x2201f2['UniverThreadCommentUi'],_0x2201f2['UniverThreadComment'],_0x2201f2['rxjs'],_0x2201f2[_0x3ad85e(0x1fc)]));}(this,function(_0x548496,_0x426221,_0xc37522,_0x1c699f,_0x87d4ea,_0xcce1a5,_0x147dd4,_0x521ef0){'use strict';const _0x116d82=_0x52f8;const _0x456c38=_0x116d82(0x1be);var _0x16e3d0=(_0x1af785=>(_0x1af785[_0x1af785['OpenOrReOpen']=0x0]=_0x116d82(0x1bf),_0x1af785[_0x1af785[_0x116d82(0x1d3)]=0x1]=_0x116d82(0x1d3),_0x1af785[_0x1af785['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1af785))(_0x16e3d0||{}),_0x348269=(_0x40fa4c=>(_0x40fa4c[_0x40fa4c[_0x116d82(0x217)]=0x0]=_0x116d82(0x217),_0x40fa4c[_0x40fa4c['Add']=0x1]='Add',_0x40fa4c[_0x40fa4c[_0x116d82(0x19a)]=0x2]=_0x116d82(0x19a),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ca)]=0x3]=_0x116d82(0x1ca),_0x40fa4c[_0x40fa4c[_0x116d82(0x1f5)]=0x4]=_0x116d82(0x1f5),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ee)]=0x5]=_0x116d82(0x1ee),_0x40fa4c[_0x40fa4c[_0x116d82(0x19b)]=-0x1]=_0x116d82(0x19b),_0x40fa4c))(_0x348269||{});const _0x408a58=_0xefb243=>_0x1c699f[_0x116d82(0x1b9)](new Date(+_0xefb243))[_0x116d82(0x1e0)](_0x116d82(0x1c7)),_0x5f3f61=async(_0x29757c,_0x51ac4f)=>{const _0x1fd6a9=_0x116d82,_0x1db48f=_0x29757c[_0x1fd6a9(0x211)](_0x1c699f[_0x1fd6a9(0x1ea)]),_0x44e7d9=_0x29757c[_0x1fd6a9(0x211)](_0x521ef0[_0x1fd6a9(0x1c6)]);_0x51ac4f[_0x1fd6a9(0x20e)](_0x13bcd1=>{const _0x3f6484=_0x1fd6a9;_0x1db48f[_0x3f6484(0x203)](_0x13bcd1)&&_0x51ac4f[_0x3f6484(0x1f4)](_0x13bcd1);}),_0x51ac4f[_0x1fd6a9(0x1fe)]&&(await _0x44e7d9[_0x1fd6a9(0x211)]('/universer-api/user/list',{'params':{'userIDs':[..._0x51ac4f]}}))[_0x1fd6a9(0x1c0)]['users'][_0x1fd6a9(0x20e)](_0x5995ac=>{const _0xac934b=_0x1fd6a9;_0x5995ac&&_0x1db48f[_0xac934b(0x1e3)](_0x5995ac);});};var _0x5a206a=Object[_0x116d82(0x1a3)],_0x263b60=(_0x1fbe0a,_0x20341b,_0x183666,_0x496ece)=>{const _0x215ec8=_0x116d82;for(var _0x5afa5c=_0x496ece>0x1?void 0x0:_0x496ece?_0x5a206a(_0x20341b,_0x183666):_0x20341b,_0x48930a=_0x1fbe0a[_0x215ec8(0x1bc)]-0x1,_0x7c05ae;_0x48930a>=0x0;_0x48930a--)(_0x7c05ae=_0x1fbe0a[_0x48930a])&&(_0x5afa5c=_0x7c05ae(_0x5afa5c)||_0x5afa5c);return _0x5afa5c;},_0x5ac075=(_0x4d4148,_0xe81b4f)=>(_0x3136a5,_0x402d2b)=>_0xe81b4f(_0x3136a5,_0x402d2b,_0x4d4148);let _0x102805=class extends _0x1c699f[_0x116d82(0x1ce)]{constructor(_0x2af3a4,_0x53477f,_0x43fccb,_0x1b79ec){const _0x2a5b53=_0x116d82;super(),this['_commentService']=_0x2af3a4,this['_threadCommentModel']=_0x53477f,this['_userService']=_0x43fccb,this['_injector']=_0x1b79ec,this['_init'](),this[_0x2a5b53(0x201)]();}[_0x116d82(0x201)](){const _0x23d098=_0x116d82;this[_0x23d098(0x1d7)](this[_0x23d098(0x1f6)][_0x23d098(0x1b4)][_0x23d098(0x1f9)](_0x147dd4[_0x23d098(0x208)](0x10))[_0x23d098(0x1c8)](_0x1a253c=>{const _0x478236=_0x23d098,_0x5a814b=new Set();_0x1a253c[_0x478236(0x20e)](_0x444204=>{const _0x506986=_0x478236;switch(_0x444204[_0x506986(0x1cb)]){case _0x506986(0x213):{const _0x1f411a=_0x444204[_0x506986(0x1cc)][_0x506986(0x1af)];_0x5a814b[_0x506986(0x213)](_0x1f411a);break;}}}),_0x5f3f61(this[_0x478236(0x200)],_0x5a814b);}));}[_0x116d82(0x1f2)](){const _0x391011=_0x116d82;this[_0x391011(0x1d7)](this['_commentService']['commentUpdate$'][_0x391011(0x1c8)](async _0x19c4ca=>{const _0x41dc1=_0x391011;var _0x346823,_0x4b0569,_0x1f78f3,_0x3998f8;const _0x44e72c=(_0x346823=this['_threadCommentModel']['getUnit'](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x5ca515=>_0x5ca515['threadId']===_0x19c4ca['threadId']))==null?void 0x0:_0x346823['root'];if(!_0x44e72c)return;const {unitId:_0x2a8853,subUnitId:_0x6a997f}=_0x44e72c;switch(_0x19c4ca[_0x41dc1(0x1b3)]&&this[_0x41dc1(0x1d8)][_0x41dc1(0x1e3)](_0x19c4ca[_0x41dc1(0x1b3)]),_0x19c4ca['type']){case _0x348269[_0x41dc1(0x1d4)]:break;case _0x348269[_0x41dc1(0x19a)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x21b)](_0x2a8853,_0x6a997f,{'unitId':_0x2a8853,'subUnitId':_0x6a997f,'ref':'','id':_0x19c4ca['replyId'],'dT':_0x408a58(+_0x19c4ca['createTimestamp']),'threadId':_0x19c4ca['threadId'],'personId':(_0x1f78f3=(_0x4b0569=_0x19c4ca[_0x41dc1(0x1b3)])==null?void 0x0:_0x4b0569[_0x41dc1(0x1f7)])!=null?_0x1f78f3:_0x19c4ca[_0x41dc1(0x20f)],'text':JSON['parse'](_0x19c4ca[_0x41dc1(0x1f8)]),'parentId':_0x44e72c['id']});break;}case _0x348269[_0x41dc1(0x1f5)]:{const _0x190aac=this['_threadCommentModel'][_0x41dc1(0x1d0)](_0x2a8853,_0x6a997f,_0x19c4ca['replyId']);_0x190aac&&_0x190aac[_0x41dc1(0x1cf)]&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1a0)](_0x2a8853,_0x6a997f,_0x19c4ca[_0x41dc1(0x20b)]);break;}case _0x348269[_0x41dc1(0x1ca)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x19f)](_0x2a8853,_0x6a997f,{'commentId':_0x19c4ca[_0x41dc1(0x20b)],'text':JSON[_0x41dc1(0x1bb)](_0x19c4ca[_0x41dc1(0x1f8)])});break;}case _0x348269[_0x41dc1(0x1ee)]:{const _0x159724=(_0x3998f8=this[_0x41dc1(0x1f6)][_0x41dc1(0x1fd)](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x449aea=>_0x449aea['threadId']===_0x19c4ca[_0x41dc1(0x1c1)]))==null?void 0x0:_0x3998f8['root'];_0x159724&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1b0)](_0x2a8853,_0x6a997f,_0x159724['id'],_0x19c4ca[_0x41dc1(0x1aa)]===_0x16e3d0[_0x41dc1(0x1d3)]);break;}}}));}};_0x102805=_0x263b60([_0x5ac075(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x426221[_0x116d82(0x1e9)])),_0x5ac075(0x1,_0x1c699f[_0x116d82(0x1ba)](_0xcce1a5[_0x116d82(0x1d9)])),_0x5ac075(0x2,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f['UserManagerService'])),_0x5ac075(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x102805);const _0x1eab7f=_0x116d82(0x1e5),_0xabd489={};var _0x5efb10=Object[_0x116d82(0x1a3)],_0xfa0ff3=(_0x541205,_0xb650c7,_0x5217ee,_0x349ff1)=>{const _0x326edc=_0x116d82;for(var _0xd85ac8=_0x349ff1>0x1?void 0x0:_0x349ff1?_0x5efb10(_0xb650c7,_0x5217ee):_0xb650c7,_0x352ce5=_0x541205[_0x326edc(0x1bc)]-0x1,_0x41053f;_0x352ce5>=0x0;_0x352ce5--)(_0x41053f=_0x541205[_0x352ce5])&&(_0xd85ac8=_0x41053f(_0xd85ac8)||_0xd85ac8);return _0xd85ac8;},_0xbf8b5b=(_0x297a5a,_0x3d8234)=>(_0x220058,_0x20bdd1)=>_0x3d8234(_0x220058,_0x20bdd1,_0x297a5a);function _0x34bfe5(_0x397723,_0x2ca247){const _0x8af5c3=_0x116d82,_0x2f1581=_0x397723[_0x8af5c3(0x219)][0x0];return{..._0x2ca247,'id':_0x2f1581[_0x8af5c3(0x20b)],'resolved':_0x397723[_0x8af5c3(0x1aa)]===0x1,'dT':_0x408a58(_0x2f1581[_0x8af5c3(0x1b2)]),'personId':_0x2f1581[_0x8af5c3(0x20f)],'threadId':_0x2f1581[_0x8af5c3(0x1c1)]};}function _0x4959a2(_0x5e4d87,_0x667d5d,_0x347ea2){const _0x3833e5=_0x116d82;var _0x4fdeaa,_0x3bf4fd;if(((_0x3bf4fd=(_0x4fdeaa=_0x5e4d87==null?void 0x0:_0x5e4d87[_0x3833e5(0x219)])==null?void 0x0:_0x4fdeaa[_0x3833e5(0x1bc)])!=null?_0x3bf4fd:0x0)>0x0){const _0x135770=(_0x9a188f,_0x15afd1)=>({'id':_0x9a188f[_0x3833e5(0x20b)],'threadId':_0x9a188f[_0x3833e5(0x1c1)],'dT':_0x408a58(_0x9a188f[_0x3833e5(0x1b2)]),'personId':_0x9a188f[_0x3833e5(0x20f)],'resolved':_0x5e4d87[_0x3833e5(0x1aa)]===_0x16e3d0[_0x3833e5(0x1d3)],'unitId':_0x667d5d,'subUnitId':_0x347ea2,'text':JSON[_0x3833e5(0x1bb)](_0x9a188f[_0x3833e5(0x1f8)]),'parentId':_0x15afd1}),_0x18acc6=_0x135770(_0x5e4d87[_0x3833e5(0x219)][0x0]);return{..._0x18acc6,'children':_0x5e4d87[_0x3833e5(0x219)][_0x3833e5(0x1f1)](0x1)[_0x3833e5(0x20d)](_0x129fc7=>_0x135770(_0x129fc7,_0x18acc6['id']))};}return null;}let _0x54b91b=class{constructor(_0x39ca5e,_0x1b4b63,_0x3926d3,_0x270d69){const _0x563a4a=_0x116d82;this[_0x563a4a(0x1a8)]=_0x39ca5e,this['_userService']=_0x1b4b63,this['_sessionService']=_0x3926d3,this[_0x563a4a(0x200)]=_0x270d69;}async[_0x116d82(0x21b)](_0x1bb360){const _0x3335f9=_0x116d82;var _0x1c6047,_0x20e732;const {parentId:_0x815b70,unitId:_0x56d781,text:_0x430df3,threadId:_0x5c8fee}=_0x1bb360,_0x371683=(_0x20e732=(_0x1c6047=_0x430df3[_0x3335f9(0x1fb)])==null?void 0x0:_0x1c6047[_0x3335f9(0x1d1)](_0x52079e=>_0x52079e[_0x3335f9(0x205)]===_0x1c699f[_0x3335f9(0x1bd)][_0x3335f9(0x1c4)])['map'](_0x4e6abc=>_0x4e6abc[_0x3335f9(0x193)]))!=null?_0x20e732:[],_0x38020b=JSON[_0x3335f9(0x1ec)](_0x430df3),_0x38fdf9=(await this[_0x3335f9(0x1c3)][_0x3335f9(0x20c)](_0x56d781))[_0x3335f9(0x1ef)]();if(_0x815b70){const _0x27d942={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683,'threadId':_0x5c8fee},_0x434cc8=(await this['_httpService'][_0x3335f9(0x1b6)](_0x3335f9(0x19d)+_0x56d781+'/reply',{'body':_0x27d942}))[_0x3335f9(0x1c0)][_0x3335f9(0x1ab)];return{..._0x1bb360,'id':_0x434cc8[_0x3335f9(0x20b)],'dT':_0x1c699f[_0x3335f9(0x1b9)](+_0x434cc8[_0x3335f9(0x1b2)])[_0x3335f9(0x1e0)](_0x3335f9(0x1c7)),'personId':_0x434cc8[_0x3335f9(0x20f)]};}else{const _0x59a8da={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683},_0x115952=await this['_httpService']['post'](_0x3335f9(0x19d)+_0x56d781+_0x3335f9(0x218),{'body':_0x59a8da});return _0x34bfe5(_0x115952['body']['comment'],_0x1bb360);}}async[_0x116d82(0x19f)](_0x59a569){const _0xa48423=_0x116d82;var _0x4795e5,_0x52c03c;const {text:_0x5ee8d3,unitId:_0x501209}=_0x59a569,_0x57d47a=(_0x52c03c=(_0x4795e5=_0x5ee8d3[_0xa48423(0x1fb)])==null?void 0x0:_0x4795e5['filter'](_0x1f3a9e=>_0x1f3a9e['rangeType']===_0x1c699f[_0xa48423(0x1bd)][_0xa48423(0x1c4)])['map'](_0x4d951d=>_0x4d951d[_0xa48423(0x193)]))!=null?_0x52c03c:[],_0x218496=JSON[_0xa48423(0x1ec)](_0x5ee8d3),_0x3f1db1=_0x59a569[_0xa48423(0x1c1)],_0x51c8a6=_0x59a569['id'],_0xe17eb4={'memberId':(await this['_sessionService'][_0xa48423(0x20c)](_0x501209))['getMemberID'](),'unitId':_0x501209,'threadId':_0x3f1db1,'mention':_0x57d47a,'content':_0x218496,'replyId':_0x51c8a6},_0x12cdf2=await this[_0xa48423(0x1a8)]['post']('/universer-api/comment/unit/'+_0x501209+'/edit',{'body':_0xe17eb4});return!_0x12cdf2[_0xa48423(0x1c0)][_0xa48423(0x1ad)]||_0x12cdf2['body'][_0xa48423(0x1ad)][_0xa48423(0x1b1)]===0x1;}async[_0x116d82(0x1b0)](_0x5abe8c){const _0x421e78=_0x116d82,{unitId:_0x1b7e39}=_0x5abe8c,_0xdc4ff9=_0x5abe8c[_0x421e78(0x1c1)],_0x3e3335={'memberId':this[_0x421e78(0x1d8)][_0x421e78(0x19e)]()['userID'],'unitId':_0x1b7e39,'threadId':_0xdc4ff9,'solved':_0x5abe8c['resolved']?_0x16e3d0['Solved']:_0x16e3d0[_0x421e78(0x1bf)]},_0x10c454=await this['_httpService']['post'](_0x421e78(0x19d)+_0x1b7e39+'/solved',{'body':_0x3e3335});return!_0x10c454['body']['error']||_0x10c454[_0x421e78(0x1c0)][_0x421e78(0x1ad)][_0x421e78(0x1b1)]===0x1;}async[_0x116d82(0x1a0)](_0x33c73e,_0x568d76,_0x3ba347,_0x2be894){const _0x3b8567=_0x116d82,_0xf1e7d6={'memberId':(await this[_0x3b8567(0x1c3)][_0x3b8567(0x20c)](_0x33c73e))[_0x3b8567(0x1ef)](),'threadId':_0x3ba347,'replyId':_0x2be894,'unitId':_0x33c73e},_0x37b982=await this[_0x3b8567(0x1a8)][_0x3b8567(0x1b6)](_0x3b8567(0x19d)+_0x33c73e+_0x3b8567(0x212),{'body':_0xf1e7d6});return!_0x37b982[_0x3b8567(0x1c0)][_0x3b8567(0x1ad)]||_0x37b982[_0x3b8567(0x1c0)]['error'][_0x3b8567(0x1b1)]===0x1;}async[_0x116d82(0x1e4)](_0x5674b5,_0x5bf4f6,_0x4876f9){const _0x161065=_0x116d82,_0x369366={'unitId':_0x5674b5,'threadId':_0x4876f9},_0x9e8f68=await this['_httpService']['post'](_0x161065(0x19d)+_0x5674b5+_0x161065(0x1d6),{'body':_0x369366}),_0x16f77b=_0x4876f9['map'](_0x4e8962=>_0x4959a2(_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x204)][_0x4e8962],_0x5674b5,_0x5bf4f6))[_0x161065(0x1d1)](Boolean);return Object[_0x161065(0x199)](_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x1ff)])[_0x161065(0x20e)](_0x80d514=>{const _0x314f8c=_0x161065;this[_0x314f8c(0x1d8)][_0x314f8c(0x1e3)](_0x80d514);}),_0x16f77b;}[_0x116d82(0x1d2)](_0x5b7314){const _0x1de497=_0x116d82;return{'id':_0x5b7314['id'],'threadId':_0x5b7314[_0x1de497(0x1c1)],'ref':_0x5b7314[_0x1de497(0x21d)]};}};_0x54b91b=_0xfa0ff3([_0xbf8b5b(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x521ef0[_0x116d82(0x1c6)])),_0xbf8b5b(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1ea)])),_0xbf8b5b(0x2,_0x1c699f['Inject'](_0x426221['CollaborationSessionService'])),_0xbf8b5b(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x54b91b);var _0xd9f954=Object[_0x116d82(0x1a3)],_0x21f4e2=(_0xa6e4ec,_0x5291f7,_0x25411a,_0x450458)=>{const _0x37369d=_0x116d82;for(var _0x221026=_0x450458>0x1?void 0x0:_0x450458?_0xd9f954(_0x5291f7,_0x25411a):_0x5291f7,_0x510ae6=_0xa6e4ec[_0x37369d(0x1bc)]-0x1,_0x566447;_0x510ae6>=0x0;_0x510ae6--)(_0x566447=_0xa6e4ec[_0x510ae6])&&(_0x221026=_0x566447(_0x221026)||_0x221026);return _0x221026;},_0x4dc25a=(_0xcfdc0e,_0x17cc5f)=>(_0x312fd5,_0x4b2496)=>_0x17cc5f(_0x312fd5,_0x4b2496,_0xcfdc0e);let _0x161aae=class extends _0x1c699f['Disposable']{constructor(_0x24295c,_0x5c6753){const _0x12e491=_0x116d82;super(),this[_0x12e491(0x209)]=_0x24295c,this[_0x12e491(0x207)]=_0x5c6753,this[_0x12e491(0x1a4)]();}[_0x116d82(0x1a4)](){const _0x1866bc=_0x116d82;this[_0x1866bc(0x209)][_0x1866bc(0x1c5)]=this[_0x1866bc(0x207)],this['_threadCommentDataSourceService'][_0x1866bc(0x216)]=!0x1;}};_0x161aae=_0x21f4e2([_0x4dc25a(0x0,_0xcce1a5[_0x116d82(0x214)]),_0x4dc25a(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x54b91b))],_0x161aae);var _0x100f6e=Object[_0x116d82(0x1eb)],_0x5ecccc=Object['getOwnPropertyDescriptor'],_0x32371c=(_0x402718,_0x4f0803,_0x24988d)=>_0x4f0803 in _0x402718?_0x100f6e(_0x402718,_0x4f0803,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24988d}):_0x402718[_0x4f0803]=_0x24988d,_0x1434f9=(_0x274279,_0x414d9f,_0x50fe16,_0x4685d9)=>{const _0x17f876=_0x116d82;for(var _0x55c349=_0x4685d9>0x1?void 0x0:_0x4685d9?_0x5ecccc(_0x414d9f,_0x50fe16):_0x414d9f,_0x58e2b4=_0x274279[_0x17f876(0x1bc)]-0x1,_0x5406fb;_0x58e2b4>=0x0;_0x58e2b4--)(_0x5406fb=_0x274279[_0x58e2b4])&&(_0x55c349=_0x5406fb(_0x55c349)||_0x55c349);return _0x55c349;},_0x466e95=(_0x477af6,_0x5b002c)=>(_0x251b06,_0x4d247f)=>_0x5b002c(_0x251b06,_0x4d247f,_0x477af6),_0x3b8683=(_0x1cc1b5,_0x4a396d,_0x5395bb)=>_0x32371c(_0x1cc1b5,typeof _0x4a396d!=_0x116d82(0x195)?_0x4a396d+'':_0x4a396d,_0x5395bb);_0x548496[_0x116d82(0x1dd)]=class extends _0x1c699f[_0x116d82(0x1a9)]{constructor(_0xf5a0d3=_0xabd489,_0xd9fecd,_0x5137a5){const _0x13851d=_0x116d82;super(),this[_0x13851d(0x1e1)]=_0xf5a0d3,this[_0x13851d(0x200)]=_0xd9fecd,this[_0x13851d(0x197)]=_0x5137a5;const {..._0x20c592}=_0x1c699f[_0x13851d(0x1dc)]({},_0xabd489,this[_0x13851d(0x1e1)]);this['_configService'][_0x13851d(0x1a2)](_0x1eab7f,_0x20c592);}[_0x116d82(0x1ac)](){[[_0x54b91b],[_0x161aae],[_0x102805]]['forEach'](_0x3bf10f=>{const _0x3b6ba9=_0x52f8;this[_0x3b6ba9(0x200)]['add'](_0x3bf10f);});}[_0x116d82(0x1a6)](){const _0x4d73c6=_0x116d82;this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x161aae),this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x102805);}},_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x20a),_0x456c38),_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x1cb),_0x1c699f[_0x116d82(0x1e6)][_0x116d82(0x1b8)]),_0x548496['UniverThreadCommentDataSourcePlugin']=_0x1434f9([_0x1c699f['DependentOn'](_0x87d4ea[_0x116d82(0x21c)],_0x426221[_0x116d82(0x194)],_0xc37522['UniverLicensePlugin']),_0x466e95(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)])),_0x466e95(0x2,_0x1c699f[_0x116d82(0x215)])],_0x548496[_0x116d82(0x1dd)]),Object['defineProperty'](_0x548496,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0xfcf5(){const _0x1bef4e=['comments','resolved','replies','56616OXHIZI','10479771AevuVK','Reply','@univerjs/core','find','_userService','resolveComment','UniverProCollaborationClient','syncUpdateMutationToColla','rangeId','object','5819664IJZZTV','Delete','map','values','thread-comment-data-source.config','_config','UserManagerService','_threadCommentDataSource','_configService','getMemberID','ThreadCommentModel','add','UniverNetwork','_threadCommentModel','forEach','post','YYYY/MM/DD\x20HH:mm','Solved','parse','merge','replyId','filter','/delete','_init','disposeWithMe','Solve','_threadCommentDataSourceService','Module','commentUpdate$','setConfig','/universer-api/comment/unit/','18780QPBfKm','_initUserSync','8131501Plkygq','UniverInstanceType','Edit','function','HTTPService','parentId','Injector','root','UniverLicensePlugin','_sessionService','Unknown','10RKLdfP','listComments','OpenOrReOpen','getUnit','_initDataSource','UniverThreadCommentUi','addUser','addComment','dataSource','getComment','_httpService','CommentService','@univerjs-pro/license','format','user','amd','personId','threadId','stringify','body','solved','getOwnPropertyDescriptor','/list','UNIVER_UNKNOWN','unitId','IThreadCommentDataSourceService','slice','users','_commentService','3251610ArrXoK','UniverCollaborationClientPlugin','getUser','2473614EdhzTH','rxjs','saveCommentToSnapshot','rangeType','CustomRangeType','UniverProLicense','toStringTag','IConfigService','onReady','@univerjs/network','bufferTime','/solved','requireSession','/add','/reply','userID','dayjs','size','code','createTimestamp','26YdarCI','UniverThreadCommentDataSourcePlugin','pipe','defineProperty','Inject','COMMENT','UniverThreadCommentUIPlugin','get','414TNSvTi','UNRECOGNIZED','@univerjs/thread-comment-ui','length','reply','UniverThreadComment','userId','DependentOn','deleteComment','subscribe','_injector','error','UniverCore','@univerjs-pro/collaboration-client','updateComment','type'];_0xfcf5=function(){return _0x1bef4e;};return _0xfcf5();}function _0x249c(_0x4990fa,_0x9fbd97){const _0xfcf510=_0xfcf5();return _0x249c=function(_0x249c10,_0x1b6188){_0x249c10=_0x249c10-0x1e7;let _0x564cc5=_0xfcf510[_0x249c10];return _0x564cc5;},_0x249c(_0x4990fa,_0x9fbd97);}(function(_0x10eedd,_0x4cb075){const _0x3ba7de=_0x249c,_0x294252=_0x10eedd();while(!![]){try{const _0x5615ff=parseInt(_0x3ba7de(0x24c))/0x1*(parseInt(_0x3ba7de(0x231))/0x2)+parseInt(_0x3ba7de(0x239))/0x3*(-parseInt(_0x3ba7de(0x1f0))/0x4)+-parseInt(_0x3ba7de(0x21a))/0x5+-parseInt(_0x3ba7de(0x21d))/0x6+parseInt(_0x3ba7de(0x1f2))/0x7+-parseInt(_0x3ba7de(0x257))/0x8+-parseInt(_0x3ba7de(0x24d))/0x9*(-parseInt(_0x3ba7de(0x1fd))/0xa);if(_0x5615ff===_0x4cb075)break;else _0x294252['push'](_0x294252['shift']());}catch(_0x1cdc3c){_0x294252['push'](_0x294252['shift']());}}}(_0xfcf5,0x985ef),function(_0xdd4d13,_0x4f199d){const _0x5ecbf8=_0x249c;typeof exports==_0x5ecbf8(0x256)&&typeof module<'u'?_0x4f199d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x5ecbf8(0x24f)),require(_0x5ecbf8(0x23b)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x5ecbf8(0x226))):typeof define==_0x5ecbf8(0x1f5)&&define[_0x5ecbf8(0x20c)]?define(['exports',_0x5ecbf8(0x246),_0x5ecbf8(0x209),_0x5ecbf8(0x24f),_0x5ecbf8(0x23b),'@univerjs/thread-comment',_0x5ecbf8(0x21e),_0x5ecbf8(0x226)],_0x4f199d):(_0xdd4d13=typeof globalThis<'u'?globalThis:_0xdd4d13||self,_0x4f199d(_0xdd4d13['UniverProThreadCommentDatasource']={},_0xdd4d13[_0x5ecbf8(0x253)],_0xdd4d13[_0x5ecbf8(0x222)],_0xdd4d13[_0x5ecbf8(0x245)],_0xdd4d13[_0x5ecbf8(0x202)],_0xdd4d13[_0x5ecbf8(0x23e)],_0xdd4d13[_0x5ecbf8(0x21e)],_0xdd4d13[_0x5ecbf8(0x263)]));}(this,function(_0x2845e5,_0x509d44,_0x1b1acc,_0x1b5fb0,_0x3ad4ec,_0x4c7067,_0x5c3ac0,_0x5b10eb){'use strict';const _0x4e3d65=_0x249c;const _0x465670='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xc5d00b=(_0x49f292=>(_0x49f292[_0x49f292[_0x4e3d65(0x1ff)]=0x0]=_0x4e3d65(0x1ff),_0x49f292[_0x49f292[_0x4e3d65(0x268)]=0x1]=_0x4e3d65(0x268),_0x49f292[_0x49f292[_0x4e3d65(0x23a)]=-0x1]='UNRECOGNIZED',_0x49f292))(_0xc5d00b||{}),_0x39b66d=(_0x2a3c77=>(_0x2a3c77[_0x2a3c77[_0x4e3d65(0x1fc)]=0x0]=_0x4e3d65(0x1fc),_0x2a3c77[_0x2a3c77['Add']=0x1]='Add',_0x2a3c77[_0x2a3c77[_0x4e3d65(0x24e)]=0x2]=_0x4e3d65(0x24e),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x1f4)]=0x3]=_0x4e3d65(0x1f4),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x258)]=0x4]=_0x4e3d65(0x258),_0x2a3c77[_0x2a3c77['Solve']=0x5]=_0x4e3d65(0x1ea),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x23a)]=-0x1]=_0x4e3d65(0x23a),_0x2a3c77))(_0x39b66d||{});const _0xfbee1b=_0x2fd03f=>_0x1b5fb0[_0x4e3d65(0x22d)](new Date(+_0x2fd03f))['format']('YYYY/MM/DD\x20HH:mm'),_0x146e38=async(_0x89e8c0,_0x19fe16)=>{const _0x2c0045=_0x4e3d65,_0x1891a7=_0x89e8c0[_0x2c0045(0x238)](_0x1b5fb0['UserManagerService']),_0x4a25f7=_0x89e8c0[_0x2c0045(0x238)](_0x5b10eb['HTTPService']);_0x19fe16[_0x2c0045(0x265)](_0xa54b54=>{const _0x3b00f3=_0x2c0045;_0x1891a7[_0x3b00f3(0x21c)](_0xa54b54)&&_0x19fe16['delete'](_0xa54b54);}),_0x19fe16[_0x2c0045(0x22e)]&&(await _0x4a25f7[_0x2c0045(0x238)]('/universer-api/user/list',{'params':{'userIDs':[..._0x19fe16]}}))[_0x2c0045(0x210)][_0x2c0045(0x218)]['forEach'](_0x3ecefc=>{const _0x599bf4=_0x2c0045;_0x3ecefc&&_0x1891a7[_0x599bf4(0x203)](_0x3ecefc);});};var _0x125952=Object[_0x4e3d65(0x212)],_0x192f83=(_0x3328ec,_0x4d5a63,_0x458a54,_0x3b7c6f)=>{const _0xae4899=_0x4e3d65;for(var _0x17cc7b=_0x3b7c6f>0x1?void 0x0:_0x3b7c6f?_0x125952(_0x4d5a63,_0x458a54):_0x4d5a63,_0x15e0f8=_0x3328ec[_0xae4899(0x23c)]-0x1,_0x36de45;_0x15e0f8>=0x0;_0x15e0f8--)(_0x36de45=_0x3328ec[_0x15e0f8])&&(_0x17cc7b=_0x36de45(_0x17cc7b)||_0x17cc7b);return _0x17cc7b;},_0x3248f1=(_0x517955,_0x1a7d8e)=>(_0x37931d,_0x876ea0)=>_0x1a7d8e(_0x37931d,_0x876ea0,_0x517955);let _0x39a0a6=class extends _0x1b5fb0['Disposable']{constructor(_0x32d915,_0x211a5b,_0x11062c,_0xfae724){const _0x40866a=_0x4e3d65;super(),this[_0x40866a(0x219)]=_0x32d915,this['_threadCommentModel']=_0x211a5b,this[_0x40866a(0x251)]=_0x11062c,this['_injector']=_0xfae724,this['_init'](),this[_0x40866a(0x1f1)]();}[_0x4e3d65(0x1f1)](){const _0x3d5cbd=_0x4e3d65;this[_0x3d5cbd(0x1e9)](this[_0x3d5cbd(0x264)][_0x3d5cbd(0x1ed)][_0x3d5cbd(0x233)](_0x5c3ac0[_0x3d5cbd(0x227)](0x10))[_0x3d5cbd(0x242)](_0x1be6c2=>{const _0x509db1=_0x3d5cbd,_0x35c1d1=new Set();_0x1be6c2['forEach'](_0x428f96=>{const _0xb3eb1f=_0x249c;switch(_0x428f96['type']){case _0xb3eb1f(0x262):{const _0x2b3668=_0x428f96['payload'][_0xb3eb1f(0x20d)];_0x35c1d1[_0xb3eb1f(0x262)](_0x2b3668);break;}}}),_0x146e38(this[_0x509db1(0x243)],_0x35c1d1);}));}[_0x4e3d65(0x1e8)](){const _0x359d37=_0x4e3d65;this[_0x359d37(0x1e9)](this[_0x359d37(0x219)][_0x359d37(0x1ed)]['subscribe'](async _0x1d6846=>{const _0xe94713=_0x359d37;var _0x5b343b,_0x5af259,_0x27c1c1,_0x422bfb;const _0x1042fb=(_0x5b343b=this[_0xe94713(0x264)][_0xe94713(0x200)](_0x1d6846[_0xe94713(0x215)])['find'](_0x182fe8=>_0x182fe8[_0xe94713(0x20e)]===_0x1d6846['threadId']))==null?void 0x0:_0x5b343b[_0xe94713(0x1f9)];if(!_0x1042fb)return;const {unitId:_0x67a126,subUnitId:_0x19c4ba}=_0x1042fb;switch(_0x1d6846[_0xe94713(0x20b)]&&this[_0xe94713(0x251)][_0xe94713(0x203)](_0x1d6846[_0xe94713(0x20b)]),_0x1d6846[_0xe94713(0x248)]){case _0x39b66d['Add']:break;case _0x39b66d['Reply']:{this['_threadCommentModel'][_0xe94713(0x204)](_0x67a126,_0x19c4ba,{'unitId':_0x67a126,'subUnitId':_0x19c4ba,'ref':'','id':_0x1d6846[_0xe94713(0x26b)],'dT':_0xfbee1b(+_0x1d6846[_0xe94713(0x230)]),'threadId':_0x1d6846[_0xe94713(0x20e)],'personId':(_0x27c1c1=(_0x5af259=_0x1d6846[_0xe94713(0x20b)])==null?void 0x0:_0x5af259[_0xe94713(0x22c)])!=null?_0x27c1c1:_0x1d6846[_0xe94713(0x23f)],'text':JSON[_0xe94713(0x269)](_0x1d6846['content']),'parentId':_0x1042fb['id']});break;}case _0x39b66d['Delete']:{const _0x3109fa=this[_0xe94713(0x264)][_0xe94713(0x206)](_0x67a126,_0x19c4ba,_0x1d6846[_0xe94713(0x26b)]);_0x3109fa&&_0x3109fa[_0xe94713(0x1f7)]&&this[_0xe94713(0x264)]['deleteComment'](_0x67a126,_0x19c4ba,_0x1d6846[_0xe94713(0x26b)]);break;}case _0x39b66d[_0xe94713(0x1f4)]:{this['_threadCommentModel']['updateComment'](_0x67a126,_0x19c4ba,{'commentId':_0x1d6846[_0xe94713(0x26b)],'text':JSON[_0xe94713(0x269)](_0x1d6846['content'])});break;}case _0x39b66d[_0xe94713(0x1ea)]:{const _0x3d1c6e=(_0x422bfb=this['_threadCommentModel'][_0xe94713(0x200)](_0x1d6846[_0xe94713(0x215)])[_0xe94713(0x250)](_0xe5fcd7=>_0xe5fcd7[_0xe94713(0x20e)]===_0x1d6846[_0xe94713(0x20e)]))==null?void 0x0:_0x422bfb['root'];_0x3d1c6e&&this['_threadCommentModel'][_0xe94713(0x252)](_0x67a126,_0x19c4ba,_0x3d1c6e['id'],_0x1d6846[_0xe94713(0x211)]===_0xc5d00b[_0xe94713(0x268)]);break;}}}));}};_0x39a0a6=_0x192f83([_0x3248f1(0x0,_0x1b5fb0[_0x4e3d65(0x235)](_0x509d44[_0x4e3d65(0x208)])),_0x3248f1(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x4c7067[_0x4e3d65(0x261)])),_0x3248f1(0x2,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x25d)])),_0x3248f1(0x3,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x1f8)]))],_0x39a0a6);const _0x5b2358=_0x4e3d65(0x25b),_0x1767a4={};var _0x5e2b8a=Object[_0x4e3d65(0x212)],_0xefe7b0=(_0x6cee85,_0x1773c0,_0x2de8d6,_0x44d8e2)=>{for(var _0x3fbb3d=_0x44d8e2>0x1?void 0x0:_0x44d8e2?_0x5e2b8a(_0x1773c0,_0x2de8d6):_0x1773c0,_0x2daeb3=_0x6cee85['length']-0x1,_0x463c8e;_0x2daeb3>=0x0;_0x2daeb3--)(_0x463c8e=_0x6cee85[_0x2daeb3])&&(_0x3fbb3d=_0x463c8e(_0x3fbb3d)||_0x3fbb3d);return _0x3fbb3d;},_0x22d778=(_0x313867,_0x38f2cf)=>(_0x315a37,_0x1606eb)=>_0x38f2cf(_0x315a37,_0x1606eb,_0x313867);function _0x547d6e(_0x5a7e22,_0x5b1769){const _0x17366c=_0x4e3d65,_0xc3715d=_0x5a7e22['replies'][0x0];return{..._0x5b1769,'id':_0xc3715d['replyId'],'resolved':_0x5a7e22[_0x17366c(0x211)]===0x1,'dT':_0xfbee1b(_0xc3715d[_0x17366c(0x230)]),'personId':_0xc3715d['userId'],'threadId':_0xc3715d[_0x17366c(0x20e)]};}function _0x4ea554(_0x36b28f,_0x3d5499,_0x3be22a){const _0x958824=_0x4e3d65;var _0x177685,_0x12a44a;if(((_0x12a44a=(_0x177685=_0x36b28f==null?void 0x0:_0x36b28f[_0x958824(0x24b)])==null?void 0x0:_0x177685[_0x958824(0x23c)])!=null?_0x12a44a:0x0)>0x0){const _0x351afc=(_0x2e6d55,_0x2da14b)=>({'id':_0x2e6d55[_0x958824(0x26b)],'threadId':_0x2e6d55[_0x958824(0x20e)],'dT':_0xfbee1b(_0x2e6d55[_0x958824(0x230)]),'personId':_0x2e6d55['userId'],'resolved':_0x36b28f['solved']===_0xc5d00b[_0x958824(0x268)],'unitId':_0x3d5499,'subUnitId':_0x3be22a,'text':JSON[_0x958824(0x269)](_0x2e6d55['content']),'parentId':_0x2da14b}),_0x3a1603=_0x351afc(_0x36b28f[_0x958824(0x24b)][0x0]);return{..._0x3a1603,'children':_0x36b28f[_0x958824(0x24b)][_0x958824(0x217)](0x1)['map'](_0x2877a5=>_0x351afc(_0x2877a5,_0x3a1603['id']))};}return null;}let _0xcf1639=class{constructor(_0x5b0265,_0x1d36d2,_0x4f8af9,_0x189876){const _0x4c5141=_0x4e3d65;this[_0x4c5141(0x207)]=_0x5b0265,this[_0x4c5141(0x251)]=_0x1d36d2,this[_0x4c5141(0x1fb)]=_0x4f8af9,this[_0x4c5141(0x243)]=_0x189876;}async[_0x4e3d65(0x204)](_0xf58068){const _0x16765a=_0x4e3d65;var _0x32c232,_0x5c6da3;const {parentId:_0x1792a5,unitId:_0x5b5802,text:_0x2eeab4,threadId:_0x1de2b6}=_0xf58068,_0x503e97=(_0x5c6da3=(_0x32c232=_0x2eeab4['customRanges'])==null?void 0x0:_0x32c232[_0x16765a(0x26c)](_0xff8601=>_0xff8601[_0x16765a(0x220)]===_0x1b5fb0[_0x16765a(0x221)][_0x16765a(0x236)])['map'](_0x1643ff=>_0x1643ff['rangeId']))!=null?_0x5c6da3:[],_0xce3c20=JSON[_0x16765a(0x20f)](_0x2eeab4),_0x5c3461=(await this[_0x16765a(0x1fb)][_0x16765a(0x229)](_0x5b5802))['getMemberID']();if(_0x1792a5){const _0x2c6205={'memberId':_0x5c3461,'unitId':_0x5b5802,'content':_0xce3c20,'mention':_0x503e97,'threadId':_0x1de2b6},_0x41dec0=(await this[_0x16765a(0x207)][_0x16765a(0x266)](_0x16765a(0x1ef)+_0x5b5802+_0x16765a(0x22b),{'body':_0x2c6205}))[_0x16765a(0x210)][_0x16765a(0x23d)];return{..._0xf58068,'id':_0x41dec0[_0x16765a(0x26b)],'dT':_0x1b5fb0['dayjs'](+_0x41dec0['createTimestamp'])[_0x16765a(0x20a)](_0x16765a(0x267)),'personId':_0x41dec0[_0x16765a(0x23f)]};}else{const _0x166e1c={'memberId':_0x5c3461,'unitId':_0x5b5802,'content':_0xce3c20,'mention':_0x503e97},_0x4b510f=await this[_0x16765a(0x207)][_0x16765a(0x266)]('/universer-api/comment/unit/'+_0x5b5802+_0x16765a(0x22a),{'body':_0x166e1c});return _0x547d6e(_0x4b510f[_0x16765a(0x210)]['comment'],_0xf58068);}}async[_0x4e3d65(0x247)](_0x31da81){const _0x47822e=_0x4e3d65;var _0x2aba96,_0x755453;const {text:_0x56dfe7,unitId:_0x230246}=_0x31da81,_0x53170e=(_0x755453=(_0x2aba96=_0x56dfe7['customRanges'])==null?void 0x0:_0x2aba96[_0x47822e(0x26c)](_0x1af25c=>_0x1af25c[_0x47822e(0x220)]===_0x1b5fb0[_0x47822e(0x221)]['COMMENT'])[_0x47822e(0x259)](_0x524020=>_0x524020[_0x47822e(0x255)]))!=null?_0x755453:[],_0x366d25=JSON['stringify'](_0x56dfe7),_0x13daa7=_0x31da81[_0x47822e(0x20e)],_0x4abdff=_0x31da81['id'],_0x364515={'memberId':(await this[_0x47822e(0x1fb)][_0x47822e(0x229)](_0x230246))['getMemberID'](),'unitId':_0x230246,'threadId':_0x13daa7,'mention':_0x53170e,'content':_0x366d25,'replyId':_0x4abdff},_0x376f4d=await this[_0x47822e(0x207)]['post'](_0x47822e(0x1ef)+_0x230246+'/edit',{'body':_0x364515});return!_0x376f4d['body'][_0x47822e(0x244)]||_0x376f4d[_0x47822e(0x210)][_0x47822e(0x244)][_0x47822e(0x22f)]===0x1;}async[_0x4e3d65(0x252)](_0x9b318){const _0x4f6bbf=_0x4e3d65,{unitId:_0x3b1410}=_0x9b318,_0x5c2f84=_0x9b318[_0x4f6bbf(0x20e)],_0x1410b5={'memberId':this[_0x4f6bbf(0x251)]['getCurrentUser']()['userID'],'unitId':_0x3b1410,'threadId':_0x5c2f84,'solved':_0x9b318[_0x4f6bbf(0x24a)]?_0xc5d00b[_0x4f6bbf(0x268)]:_0xc5d00b[_0x4f6bbf(0x1ff)]},_0x17feea=await this[_0x4f6bbf(0x207)]['post']('/universer-api/comment/unit/'+_0x3b1410+_0x4f6bbf(0x228),{'body':_0x1410b5});return!_0x17feea['body'][_0x4f6bbf(0x244)]||_0x17feea[_0x4f6bbf(0x210)]['error'][_0x4f6bbf(0x22f)]===0x1;}async[_0x4e3d65(0x241)](_0x39b090,_0x3da594,_0x4d23ab,_0x29e9da){const _0x1be58d=_0x4e3d65,_0x30dc73={'memberId':(await this[_0x1be58d(0x1fb)]['requireSession'](_0x39b090))[_0x1be58d(0x260)](),'threadId':_0x4d23ab,'replyId':_0x29e9da,'unitId':_0x39b090},_0x454c5c=await this['_httpService'][_0x1be58d(0x266)](_0x1be58d(0x1ef)+_0x39b090+_0x1be58d(0x1e7),{'body':_0x30dc73});return!_0x454c5c['body'][_0x1be58d(0x244)]||_0x454c5c['body'][_0x1be58d(0x244)]['code']===0x1;}async[_0x4e3d65(0x1fe)](_0x352076,_0x4b8623,_0x5d9059){const _0x3f602a=_0x4e3d65,_0x1b3aef={'unitId':_0x352076,'threadId':_0x5d9059},_0x5dd7d9=await this[_0x3f602a(0x207)][_0x3f602a(0x266)]('/universer-api/comment/unit/'+_0x352076+_0x3f602a(0x213),{'body':_0x1b3aef}),_0x53e40f=_0x5d9059[_0x3f602a(0x259)](_0x233d54=>_0x4ea554(_0x5dd7d9[_0x3f602a(0x210)][_0x3f602a(0x249)][_0x233d54],_0x352076,_0x4b8623))['filter'](Boolean);return Object[_0x3f602a(0x25a)](_0x5dd7d9['body']['users'])[_0x3f602a(0x265)](_0x66014e=>{const _0x420f84=_0x3f602a;this[_0x420f84(0x251)]['addUser'](_0x66014e);}),_0x53e40f;}[_0x4e3d65(0x21f)](_0x540631){return{'id':_0x540631['id'],'threadId':_0x540631['threadId'],'ref':_0x540631['ref']};}};_0xcf1639=_0xefe7b0([_0x22d778(0x0,_0x1b5fb0[_0x4e3d65(0x235)](_0x5b10eb[_0x4e3d65(0x1f6)])),_0x22d778(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x25d)])),_0x22d778(0x2,_0x1b5fb0['Inject'](_0x509d44['CollaborationSessionService'])),_0x22d778(0x3,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x1f8)]))],_0xcf1639);var _0x427a14=Object[_0x4e3d65(0x212)],_0x5760e5=(_0x464205,_0x45c31e,_0x4861e7,_0x5ce170)=>{for(var _0x1c1169=_0x5ce170>0x1?void 0x0:_0x5ce170?_0x427a14(_0x45c31e,_0x4861e7):_0x45c31e,_0xdbe8f6=_0x464205['length']-0x1,_0x4ae0b1;_0xdbe8f6>=0x0;_0xdbe8f6--)(_0x4ae0b1=_0x464205[_0xdbe8f6])&&(_0x1c1169=_0x4ae0b1(_0x1c1169)||_0x1c1169);return _0x1c1169;},_0x7ca01e=(_0x5140f5,_0x22259f)=>(_0x36dbbf,_0x282413)=>_0x22259f(_0x36dbbf,_0x282413,_0x5140f5);let _0x5dbf72=class extends _0x1b5fb0['Disposable']{constructor(_0x5d5b43,_0x56c2d3){const _0x366070=_0x4e3d65;super(),this['_threadCommentDataSourceService']=_0x5d5b43,this[_0x366070(0x25e)]=_0x56c2d3,this[_0x366070(0x201)]();}[_0x4e3d65(0x201)](){const _0x1e69c4=_0x4e3d65;this[_0x1e69c4(0x1eb)][_0x1e69c4(0x205)]=this[_0x1e69c4(0x25e)],this[_0x1e69c4(0x1eb)][_0x1e69c4(0x254)]=!0x1;}};_0x5dbf72=_0x5760e5([_0x7ca01e(0x0,_0x4c7067[_0x4e3d65(0x216)]),_0x7ca01e(0x1,_0x1b5fb0['Inject'](_0xcf1639))],_0x5dbf72);var _0x3eaa5b=Object['defineProperty'],_0x2cdd98=Object[_0x4e3d65(0x212)],_0xf95243=(_0x36e973,_0x2c8915,_0x3aa8f2)=>_0x2c8915 in _0x36e973?_0x3eaa5b(_0x36e973,_0x2c8915,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3aa8f2}):_0x36e973[_0x2c8915]=_0x3aa8f2,_0x5eeab4=(_0x28cd7f,_0x30feb9,_0x14a876,_0x555251)=>{const _0x5197b2=_0x4e3d65;for(var _0x517a13=_0x555251>0x1?void 0x0:_0x555251?_0x2cdd98(_0x30feb9,_0x14a876):_0x30feb9,_0xac875e=_0x28cd7f[_0x5197b2(0x23c)]-0x1,_0x4a1546;_0xac875e>=0x0;_0xac875e--)(_0x4a1546=_0x28cd7f[_0xac875e])&&(_0x517a13=_0x4a1546(_0x517a13)||_0x517a13);return _0x517a13;},_0x9631c0=(_0x1d7d98,_0x187cd2)=>(_0x4915e3,_0x38b8fc)=>_0x187cd2(_0x4915e3,_0x38b8fc,_0x1d7d98),_0xe9441=(_0x59231f,_0x15bb1b,_0x1f9124)=>_0xf95243(_0x59231f,typeof _0x15bb1b!='symbol'?_0x15bb1b+'':_0x15bb1b,_0x1f9124);_0x2845e5[_0x4e3d65(0x232)]=class extends _0x1b5fb0['Plugin']{constructor(_0x688da0=_0x1767a4,_0x1be308,_0x513f0a){const _0x1b025c=_0x4e3d65;super(),this[_0x1b025c(0x25c)]=_0x688da0,this[_0x1b025c(0x243)]=_0x1be308,this[_0x1b025c(0x25f)]=_0x513f0a;const {..._0x12d38a}=_0x1b5fb0[_0x1b025c(0x26a)]({},_0x1767a4,this[_0x1b025c(0x25c)]);this['_configService'][_0x1b025c(0x1ee)](_0x5b2358,_0x12d38a);}['onStarting'](){const _0x27165c=_0x4e3d65;[[_0xcf1639],[_0x5dbf72],[_0x39a0a6]][_0x27165c(0x265)](_0x4fd03e=>{const _0x110214=_0x27165c;this[_0x110214(0x243)][_0x110214(0x262)](_0x4fd03e);});}[_0x4e3d65(0x225)](){const _0x22a19a=_0x4e3d65;this[_0x22a19a(0x243)][_0x22a19a(0x238)](_0x5dbf72),this[_0x22a19a(0x243)][_0x22a19a(0x238)](_0x39a0a6);}},_0xe9441(_0x2845e5[_0x4e3d65(0x232)],'pluginName',_0x465670),_0xe9441(_0x2845e5['UniverThreadCommentDataSourcePlugin'],_0x4e3d65(0x248),_0x1b5fb0[_0x4e3d65(0x1f3)][_0x4e3d65(0x214)]),_0x2845e5[_0x4e3d65(0x232)]=_0x5eeab4([_0x1b5fb0[_0x4e3d65(0x240)](_0x3ad4ec[_0x4e3d65(0x237)],_0x509d44[_0x4e3d65(0x21b)],_0x1b1acc[_0x4e3d65(0x1fa)]),_0x9631c0(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0['Injector'])),_0x9631c0(0x2,_0x1b5fb0[_0x4e3d65(0x224)])],_0x2845e5[_0x4e3d65(0x232)]),Object[_0x4e3d65(0x234)](_0x2845e5,Symbol[_0x4e3d65(0x223)],{'value':_0x4e3d65(0x1ec)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505231607",
3
+ "version": "0.7.0-nightly.202505251606",
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.7.0-nightly.202505231607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505231607",
50
- "@univerjs/core": "0.7.0-nightly.202505231607",
51
- "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505231607",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505231607",
54
- "@univerjs/network": "0.7.0-nightly.202505231607"
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505251606",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505251606",
50
+ "@univerjs/core": "0.7.0-nightly.202505251606",
51
+ "@univerjs/network": "0.7.0-nightly.202505251606",
52
+ "@univerjs/protocol": "0.1.47-alpha.0",
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505251606",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505251606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",