@univerjs-pro/thread-comment-datasource 0.10.7-nightly.202509090319 → 0.10.7-nightly.202509130640

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 _0x4f6f57=_0x2eab;(function(_0x51c0de,_0x1a41db){const _0x8db6f4=_0x2eab,_0x6b2e9b=_0x51c0de();while(!![]){try{const _0x34febb=-parseInt(_0x8db6f4(0x1c0))/0x1+parseInt(_0x8db6f4(0x226))/0x2+-parseInt(_0x8db6f4(0x215))/0x3*(-parseInt(_0x8db6f4(0x1ca))/0x4)+-parseInt(_0x8db6f4(0x1d3))/0x5*(parseInt(_0x8db6f4(0x1fa))/0x6)+parseInt(_0x8db6f4(0x22a))/0x7*(-parseInt(_0x8db6f4(0x1cf))/0x8)+parseInt(_0x8db6f4(0x1ef))/0x9+parseInt(_0x8db6f4(0x1d2))/0xa;if(_0x34febb===_0x1a41db)break;else _0x6b2e9b['push'](_0x6b2e9b['shift']());}catch(_0x36ce06){_0x6b2e9b['push'](_0x6b2e9b['shift']());}}}(_0x1eae,0x35c0f));Object[_0x4f6f57(0x205)](exports,Symbol[_0x4f6f57(0x227)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4f6f57(0x1f9);var I=(_0x29e28a=>(_0x29e28a[_0x29e28a[_0x4f6f57(0x1e3)]=0x0]=_0x4f6f57(0x1e3),_0x29e28a[_0x29e28a[_0x4f6f57(0x1cb)]=0x1]=_0x4f6f57(0x1cb),_0x29e28a[_0x29e28a[_0x4f6f57(0x22d)]=-0x1]=_0x4f6f57(0x22d),_0x29e28a))(I||{}),v=(_0x25a15c=>(_0x25a15c[_0x25a15c[_0x4f6f57(0x20b)]=0x0]='Unknown',_0x25a15c[_0x25a15c[_0x4f6f57(0x1fd)]=0x1]=_0x4f6f57(0x1fd),_0x25a15c[_0x25a15c[_0x4f6f57(0x201)]=0x2]=_0x4f6f57(0x201),_0x25a15c[_0x25a15c[_0x4f6f57(0x1c6)]=0x3]='Edit',_0x25a15c[_0x25a15c[_0x4f6f57(0x1c8)]=0x4]=_0x4f6f57(0x1c8),_0x25a15c[_0x25a15c[_0x4f6f57(0x1d5)]=0x5]=_0x4f6f57(0x1d5),_0x25a15c[_0x25a15c[_0x4f6f57(0x22d)]=-0x1]=_0x4f6f57(0x22d),_0x25a15c))(v||{});const f=_0x292d6c=>c[_0x4f6f57(0x20f)](new Date(+_0x292d6c))['format'](_0x4f6f57(0x1be)),R=async(_0x2de1bd,_0x2046f3)=>{const _0x343033=_0x4f6f57,_0x38d160=_0x2de1bd['get'](c[_0x343033(0x1fe)]),_0x24905b=_0x2de1bd[_0x343033(0x1fc)](P[_0x343033(0x1f5)]);_0x2046f3[_0x343033(0x1da)](_0x52f53c=>{const _0x12043c=_0x343033;_0x38d160[_0x12043c(0x1c5)](_0x52f53c)&&_0x2046f3[_0x12043c(0x1ea)](_0x52f53c);}),_0x2046f3['size']&&(await _0x24905b[_0x343033(0x1fc)](_0x343033(0x1c4),{'params':{'userIDs':[..._0x2046f3]}}))[_0x343033(0x1e8)][_0x343033(0x1fb)][_0x343033(0x1da)](_0x54f0c9=>{const _0xd456ee=_0x343033;_0x54f0c9&&_0x38d160[_0xd456ee(0x213)](_0x54f0c9);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x10bd8e,_0x475a67,_0x14941c,_0x36ee28)=>{for(var _0x2b5b03=_0x36ee28>0x1?void 0x0:_0x36ee28?$(_0x475a67,_0x14941c):_0x475a67,_0x180982=_0x10bd8e['length']-0x1,_0x4f0cfe;_0x180982>=0x0;_0x180982--)(_0x4f0cfe=_0x10bd8e[_0x180982])&&(_0x2b5b03=_0x4f0cfe(_0x2b5b03)||_0x2b5b03);return _0x2b5b03;},S=(_0x4d23b1,_0x1a1732)=>(_0x554db4,_0x471422)=>_0x1a1732(_0x554db4,_0x471422,_0x4d23b1);function _0x2eab(_0x4b6f0e,_0x47281c){const _0x1eaea3=_0x1eae();return _0x2eab=function(_0x2eab48,_0x585f6b){_0x2eab48=_0x2eab48-0x1bb;let _0x2c2bf7=_0x1eaea3[_0x2eab48];return _0x2c2bf7;},_0x2eab(_0x4b6f0e,_0x47281c);}let _=class extends c[_0x4f6f57(0x223)]{constructor(_0x360d3b,_0x965bad,_0x19172d,_0x40835c){const _0x3ffb97=_0x4f6f57;super(),this[_0x3ffb97(0x1d7)]=_0x360d3b,this[_0x3ffb97(0x1db)]=_0x965bad,this[_0x3ffb97(0x1c3)]=_0x19172d,this['_injector']=_0x40835c,this['_init'](),this[_0x3ffb97(0x224)]();}[_0x4f6f57(0x224)](){const _0x2dc334=_0x4f6f57;this['disposeWithMe'](this[_0x2dc334(0x1db)][_0x2dc334(0x22e)]['pipe'](j[_0x2dc334(0x1ee)](0x10))[_0x2dc334(0x206)](_0x44ef08=>{const _0x581598=_0x2dc334,_0x5eb03a=new Set();_0x44ef08[_0x581598(0x1da)](_0x3f3dae=>{const _0x7900b=_0x581598;switch(_0x3f3dae[_0x7900b(0x20c)]){case _0x7900b(0x20a):{const _0x3eb4bf=_0x3f3dae[_0x7900b(0x1d6)]['personId'];_0x5eb03a[_0x7900b(0x20a)](_0x3eb4bf);break;}}}),R(this[_0x581598(0x1e0)],_0x5eb03a);}));}[_0x4f6f57(0x1ed)](){const _0x5ac597=_0x4f6f57;this['disposeWithMe'](this[_0x5ac597(0x1d7)]['commentUpdate$']['subscribe'](async _0xf8829f=>{const _0x421f8e=_0x5ac597;var _0x4e97d7,_0x1c61e0,_0x62b20b,_0x58d9b6;const _0x17a2a7=(_0x4e97d7=this['_threadCommentModel'][_0x421f8e(0x1c2)](_0xf8829f['unitId'])[_0x421f8e(0x1d8)](_0x53fd15=>_0x53fd15[_0x421f8e(0x1d1)]===_0xf8829f[_0x421f8e(0x1d1)]))==null?void 0x0:_0x4e97d7['root'];if(!_0x17a2a7)return;const {unitId:_0xd3ba0f,subUnitId:_0x5bc435}=_0x17a2a7;switch(_0xf8829f[_0x421f8e(0x1e5)]&&this['_userService'][_0x421f8e(0x213)](_0xf8829f[_0x421f8e(0x1e5)]),_0xf8829f[_0x421f8e(0x20c)]){case v['Add']:break;case v[_0x421f8e(0x201)]:{this[_0x421f8e(0x1db)][_0x421f8e(0x1dd)](_0xd3ba0f,_0x5bc435,{'unitId':_0xd3ba0f,'subUnitId':_0x5bc435,'ref':'','id':_0xf8829f[_0x421f8e(0x1cd)],'dT':f(+_0xf8829f[_0x421f8e(0x209)]),'threadId':_0xf8829f['threadId'],'personId':(_0x62b20b=(_0x1c61e0=_0xf8829f[_0x421f8e(0x1e5)])==null?void 0x0:_0x1c61e0['userID'])!=null?_0x62b20b:_0xf8829f[_0x421f8e(0x1bc)],'text':JSON['parse'](_0xf8829f[_0x421f8e(0x1dc)]),'parentId':_0x17a2a7['id']});break;}case v['Delete']:{const _0x1dc361=this[_0x421f8e(0x1db)][_0x421f8e(0x211)](_0xd3ba0f,_0x5bc435,_0xf8829f[_0x421f8e(0x1cd)]);_0x1dc361&&_0x1dc361[_0x421f8e(0x210)]&&this['_threadCommentModel']['deleteComment'](_0xd3ba0f,_0x5bc435,_0xf8829f[_0x421f8e(0x1cd)]);break;}case v[_0x421f8e(0x1c6)]:{this[_0x421f8e(0x1db)][_0x421f8e(0x222)](_0xd3ba0f,_0x5bc435,{'commentId':_0xf8829f[_0x421f8e(0x1cd)],'text':JSON[_0x421f8e(0x1f6)](_0xf8829f[_0x421f8e(0x1dc)])});break;}case v[_0x421f8e(0x1d5)]:{const _0x58afd3=(_0x58d9b6=this[_0x421f8e(0x1db)][_0x421f8e(0x1c2)](_0xf8829f['unitId'])[_0x421f8e(0x1d8)](_0x1aac8a=>_0x1aac8a[_0x421f8e(0x1d1)]===_0xf8829f[_0x421f8e(0x1d1)]))==null?void 0x0:_0x58d9b6['root'];_0x58afd3&&this['_threadCommentModel'][_0x421f8e(0x1ec)](_0xd3ba0f,_0x5bc435,_0x58afd3['id'],_0xf8829f[_0x421f8e(0x1cc)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4f6f57(0x1c7)](b[_0x4f6f57(0x1d0)])),S(0x1,c[_0x4f6f57(0x1c7)](M[_0x4f6f57(0x1f1)])),S(0x2,c[_0x4f6f57(0x1c7)](c[_0x4f6f57(0x1fe)])),S(0x3,c[_0x4f6f57(0x1c7)](c[_0x4f6f57(0x1bb)]))],_);const q=_0x4f6f57(0x1f2),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x517ffb,_0xd01c6d,_0x4b6f6a,_0x3841b9)=>{for(var _0x372bf2=_0x3841b9>0x1?void 0x0:_0x3841b9?A(_0xd01c6d,_0x4b6f6a):_0xd01c6d,_0x4f0510=_0x517ffb['length']-0x1,_0x4c2d90;_0x4f0510>=0x0;_0x4f0510--)(_0x4c2d90=_0x517ffb[_0x4f0510])&&(_0x372bf2=_0x4c2d90(_0x372bf2)||_0x372bf2);return _0x372bf2;},C=(_0x3d9c02,_0x5190b0)=>(_0x232de7,_0xeec352)=>_0x5190b0(_0x232de7,_0xeec352,_0x3d9c02);function Y(_0x2cc733,_0x4292cc){const _0x48470b=_0x4f6f57,_0x1dabab=_0x2cc733[_0x48470b(0x1df)][0x0];return{..._0x4292cc,'id':_0x1dabab[_0x48470b(0x1cd)],'resolved':_0x2cc733['solved']===0x1,'dT':f(_0x1dabab[_0x48470b(0x209)]),'personId':_0x1dabab[_0x48470b(0x1bc)],'threadId':_0x1dabab[_0x48470b(0x1d1)]};}function G(_0x10566f,_0x4fb45d,_0x34f4ad){const _0x371b9b=_0x4f6f57;var _0x6426b4,_0x36aa96;if(((_0x36aa96=(_0x6426b4=_0x10566f==null?void 0x0:_0x10566f[_0x371b9b(0x1df)])==null?void 0x0:_0x6426b4[_0x371b9b(0x1f8)])!=null?_0x36aa96:0x0)>0x0){const _0x45df45=(_0x3fdcc3,_0x23458f)=>({'id':_0x3fdcc3[_0x371b9b(0x1cd)],'threadId':_0x3fdcc3['threadId'],'dT':f(_0x3fdcc3[_0x371b9b(0x209)]),'personId':_0x3fdcc3['userId'],'resolved':_0x10566f[_0x371b9b(0x1cc)]===I[_0x371b9b(0x1cb)],'unitId':_0x4fb45d,'subUnitId':_0x34f4ad,'text':JSON[_0x371b9b(0x1f6)](_0x3fdcc3[_0x371b9b(0x1dc)]),'parentId':_0x23458f}),_0x38a1b0=_0x45df45(_0x10566f['replies'][0x0]);return{..._0x38a1b0,'children':_0x10566f[_0x371b9b(0x1df)]['slice'](0x1)[_0x371b9b(0x1bd)](_0x1d7cd9=>_0x45df45(_0x1d7cd9,_0x38a1b0['id']))};}return null;}function _0x1eae(){const _0x282d38=['syncUpdateMutationToColla','_threadCommentDataSource','UniverInstanceType','defineProperty','subscribe','/add','rangeType','createTimestamp','add','Unknown','type','filter','/reply','dayjs','parentId','getComment','deleteComment','addUser','error','368601gLXAqf','CustomRangeType','DependentOn','post','/delete','_initDataSource','reply','comments','/solved','UniverThreadCommentDataSourcePlugin','code','getOwnPropertyDescriptor','_sessionService','updateComment','Disposable','_initUserSync','/universer-api/comment/unit/','456826IXPZKq','toStringTag','_configService','_httpService','231245QkkahV','dataSource','Plugin','UNRECOGNIZED','commentUpdate$','format','Injector','userId','map','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','285681okCKtb','UniverCollaborationClientPlugin','getUnit','_userService','/universer-api/user/list','getUser','Edit','Inject','Delete','rangeId','4XHVXCH','Solved','solved','replyId','getMemberID','40SxrEzV','CommentService','threadId','4389480HllmJU','505095utkdSX','stringify','Solve','payload','_commentService','find','ref','forEach','_threadCommentModel','content','addComment','getCurrentUser','replies','_injector','IConfigService','onReady','OpenOrReOpen','IThreadCommentDataSourceService','user','_config','setConfig','body','resolved','delete','/list','resolveComment','_init','bufferTime','745569KdQTHS','values','ThreadCommentModel','thread-comment-data-source.config','customRanges','requireSession','HTTPService','parse','UniverLicensePlugin','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','12LiAeRU','users','get','Add','UserManagerService','COMMENT','onStarting','Reply'];_0x1eae=function(){return _0x282d38;};return _0x1eae();}let p=class{constructor(_0x30c87b,_0x2a8f13,_0x2efd21){const _0x8e37e5=_0x4f6f57;this[_0x8e37e5(0x229)]=_0x30c87b,this[_0x8e37e5(0x1c3)]=_0x2a8f13,this[_0x8e37e5(0x221)]=_0x2efd21;}async[_0x4f6f57(0x1dd)](_0x1ea538){const _0x4b81e2=_0x4f6f57;var _0x197053,_0x2542bb;const {parentId:_0x3e7d9c,unitId:_0x4eb871,text:_0x5f242e,threadId:_0x39df6c}=_0x1ea538,_0x5757f6=(_0x2542bb=(_0x197053=_0x5f242e[_0x4b81e2(0x1f3)])==null?void 0x0:_0x197053[_0x4b81e2(0x20d)](_0x5c82fc=>_0x5c82fc['rangeType']===c[_0x4b81e2(0x216)]['COMMENT'])['map'](_0x4c3f39=>_0x4c3f39[_0x4b81e2(0x1c9)]))!=null?_0x2542bb:[],_0x43bd38=JSON[_0x4b81e2(0x1d4)](_0x5f242e),_0x5c0036=(await this[_0x4b81e2(0x221)][_0x4b81e2(0x1f4)](_0x4eb871))[_0x4b81e2(0x1ce)]();if(_0x3e7d9c){const _0x52d50c={'memberId':_0x5c0036,'unitId':_0x4eb871,'content':_0x43bd38,'mention':_0x5757f6,'threadId':_0x39df6c},_0x1099ba=(await this[_0x4b81e2(0x229)]['post'](_0x4b81e2(0x225)+_0x4eb871+_0x4b81e2(0x20e),{'body':_0x52d50c}))[_0x4b81e2(0x1e8)][_0x4b81e2(0x21b)];return{..._0x1ea538,'id':_0x1099ba[_0x4b81e2(0x1cd)],'dT':c[_0x4b81e2(0x20f)](+_0x1099ba['createTimestamp'])[_0x4b81e2(0x22f)](_0x4b81e2(0x1be)),'personId':_0x1099ba[_0x4b81e2(0x1bc)]};}else{const _0x26f2ae={'memberId':_0x5c0036,'unitId':_0x4eb871,'content':_0x43bd38,'mention':_0x5757f6},_0x4cefed=await this[_0x4b81e2(0x229)][_0x4b81e2(0x218)](_0x4b81e2(0x225)+_0x4eb871+_0x4b81e2(0x207),{'body':_0x26f2ae});return Y(_0x4cefed[_0x4b81e2(0x1e8)]['comment'],_0x1ea538);}}async[_0x4f6f57(0x222)](_0x21045f){const _0x162b96=_0x4f6f57;var _0x202227,_0x3303b1;const {text:_0xd508fb,unitId:_0x2f9d75}=_0x21045f,_0x5ade6d=(_0x3303b1=(_0x202227=_0xd508fb[_0x162b96(0x1f3)])==null?void 0x0:_0x202227[_0x162b96(0x20d)](_0x3977f7=>_0x3977f7[_0x162b96(0x208)]===c[_0x162b96(0x216)][_0x162b96(0x1ff)])[_0x162b96(0x1bd)](_0x34351c=>_0x34351c[_0x162b96(0x1c9)]))!=null?_0x3303b1:[],_0x347659=JSON['stringify'](_0xd508fb),_0x547a35=_0x21045f['threadId'],_0x41833d=_0x21045f['id'],_0x44a058={'memberId':(await this[_0x162b96(0x221)][_0x162b96(0x1f4)](_0x2f9d75))['getMemberID'](),'unitId':_0x2f9d75,'threadId':_0x547a35,'mention':_0x5ade6d,'content':_0x347659,'replyId':_0x41833d},_0x577064=await this[_0x162b96(0x229)][_0x162b96(0x218)](_0x162b96(0x225)+_0x2f9d75+'/edit',{'body':_0x44a058});return!_0x577064[_0x162b96(0x1e8)][_0x162b96(0x214)]||_0x577064[_0x162b96(0x1e8)]['error'][_0x162b96(0x21f)]===0x1;}async[_0x4f6f57(0x1ec)](_0x245fbd){const _0x4c615c=_0x4f6f57,{unitId:_0x67709}=_0x245fbd,_0x27cc3b=_0x245fbd['threadId'],_0x18e31a={'memberId':this['_userService'][_0x4c615c(0x1de)]()['userID'],'unitId':_0x67709,'threadId':_0x27cc3b,'solved':_0x245fbd[_0x4c615c(0x1e9)]?I[_0x4c615c(0x1cb)]:I['OpenOrReOpen']},_0x3aa034=await this['_httpService'][_0x4c615c(0x218)](_0x4c615c(0x225)+_0x67709+_0x4c615c(0x21d),{'body':_0x18e31a});return!_0x3aa034[_0x4c615c(0x1e8)][_0x4c615c(0x214)]||_0x3aa034['body'][_0x4c615c(0x214)][_0x4c615c(0x21f)]===0x1;}async[_0x4f6f57(0x212)](_0x1954d7,_0x53615a,_0x5bf174,_0x4c5658){const _0x5c2a91=_0x4f6f57,_0x3d5062={'memberId':(await this[_0x5c2a91(0x221)]['requireSession'](_0x1954d7))[_0x5c2a91(0x1ce)](),'threadId':_0x5bf174,'replyId':_0x4c5658,'unitId':_0x1954d7},_0x14a116=await this['_httpService'][_0x5c2a91(0x218)](_0x5c2a91(0x225)+_0x1954d7+_0x5c2a91(0x219),{'body':_0x3d5062});return!_0x14a116['body'][_0x5c2a91(0x214)]||_0x14a116[_0x5c2a91(0x1e8)]['error'][_0x5c2a91(0x21f)]===0x1;}async['listComments'](_0x2d8f52,_0x1a764b,_0x3edd4b){const _0x183b5b=_0x4f6f57,_0x2f02c0={'unitId':_0x2d8f52,'threadId':_0x3edd4b},_0x440e14=await this[_0x183b5b(0x229)][_0x183b5b(0x218)](_0x183b5b(0x225)+_0x2d8f52+_0x183b5b(0x1eb),{'body':_0x2f02c0}),_0x3f6d60=_0x3edd4b[_0x183b5b(0x1bd)](_0x5e682f=>G(_0x440e14['body'][_0x183b5b(0x21c)][_0x5e682f],_0x2d8f52,_0x1a764b))[_0x183b5b(0x20d)](Boolean);return Object[_0x183b5b(0x1f0)](_0x440e14[_0x183b5b(0x1e8)][_0x183b5b(0x1fb)])[_0x183b5b(0x1da)](_0x36d31a=>{const _0x6ec7c=_0x183b5b;this[_0x6ec7c(0x1c3)][_0x6ec7c(0x213)](_0x36d31a);}),_0x3f6d60;}['saveCommentToSnapshot'](_0x1df18c){const _0x5641e4=_0x4f6f57;return{'id':_0x1df18c['id'],'threadId':_0x1df18c[_0x5641e4(0x1d1)],'ref':_0x1df18c[_0x5641e4(0x1d9)]};}};p=x([C(0x0,c[_0x4f6f57(0x1c7)](P['HTTPService'])),C(0x1,c[_0x4f6f57(0x1c7)](c[_0x4f6f57(0x1fe)])),C(0x2,c[_0x4f6f57(0x1c7)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x6ae5de,_0x1e1c53,_0x5db7f7,_0x55d6f8)=>{for(var _0x329fe0=_0x55d6f8>0x1?void 0x0:_0x55d6f8?H(_0x1e1c53,_0x5db7f7):_0x1e1c53,_0x453845=_0x6ae5de['length']-0x1,_0x1448ca;_0x453845>=0x0;_0x453845--)(_0x1448ca=_0x6ae5de[_0x453845])&&(_0x329fe0=_0x1448ca(_0x329fe0)||_0x329fe0);return _0x329fe0;},y=(_0x2ae971,_0x4da78b)=>(_0x259592,_0x44c020)=>_0x4da78b(_0x259592,_0x44c020,_0x2ae971);let g=class extends c['Disposable']{constructor(_0x39677d,_0x547f4f){const _0x56b84b=_0x4f6f57;super(),this[_0x56b84b(0x1bf)]=_0x39677d,this[_0x56b84b(0x203)]=_0x547f4f,this[_0x56b84b(0x21a)]();}['_initDataSource'](){const _0x2a56a3=_0x4f6f57;this[_0x2a56a3(0x1bf)][_0x2a56a3(0x22b)]=this[_0x2a56a3(0x203)],this[_0x2a56a3(0x1bf)][_0x2a56a3(0x202)]=!0x1;}};g=J([y(0x0,M[_0x4f6f57(0x1e4)]),y(0x1,c[_0x4f6f57(0x1c7)](p))],g);var F=Object[_0x4f6f57(0x205)],L=Object[_0x4f6f57(0x220)],Z=(_0x1ef1e0,_0x354972,_0x5aa832)=>_0x354972 in _0x1ef1e0?F(_0x1ef1e0,_0x354972,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aa832}):_0x1ef1e0[_0x354972]=_0x5aa832,W=(_0x579d66,_0x5dccc9,_0x1bb98e,_0x497cd4)=>{for(var _0x4d89c1=_0x497cd4>0x1?void 0x0:_0x497cd4?L(_0x5dccc9,_0x1bb98e):_0x5dccc9,_0x5c5fb9=_0x579d66['length']-0x1,_0x502ce6;_0x5c5fb9>=0x0;_0x5c5fb9--)(_0x502ce6=_0x579d66[_0x5c5fb9])&&(_0x4d89c1=_0x502ce6(_0x4d89c1)||_0x4d89c1);return _0x4d89c1;},O=(_0x59de2e,_0x28ef79)=>(_0x36a74b,_0x2d4628)=>_0x28ef79(_0x36a74b,_0x2d4628,_0x59de2e),N=(_0x382537,_0x3193d,_0x1728f4)=>Z(_0x382537,typeof _0x3193d!='symbol'?_0x3193d+'':_0x3193d,_0x1728f4);exports[_0x4f6f57(0x21e)]=class extends c[_0x4f6f57(0x22c)]{constructor(_0x1dfaa6=D,_0x512baa,_0x3c3a33){const _0x3a9b6a=_0x4f6f57;super(),this[_0x3a9b6a(0x1e6)]=_0x1dfaa6,this['_injector']=_0x512baa,this['_configService']=_0x3c3a33;const {..._0x5a18a7}=c['merge']({},D,this[_0x3a9b6a(0x1e6)]);this[_0x3a9b6a(0x228)][_0x3a9b6a(0x1e7)](q,_0x5a18a7);}[_0x4f6f57(0x200)](){const _0x33c298=_0x4f6f57;[[p],[g],[_]][_0x33c298(0x1da)](_0xc6d789=>{const _0xefd48=_0x33c298;this[_0xefd48(0x1e0)][_0xefd48(0x20a)](_0xc6d789);});}[_0x4f6f57(0x1e2)](){const _0x3b4fff=_0x4f6f57;this[_0x3b4fff(0x1e0)][_0x3b4fff(0x1fc)](g),this[_0x3b4fff(0x1e0)]['get'](_);}},N(exports[_0x4f6f57(0x21e)],'pluginName',U),N(exports[_0x4f6f57(0x21e)],'type',c[_0x4f6f57(0x204)]['UNIVER_UNKNOWN']),exports[_0x4f6f57(0x21e)]=W([c[_0x4f6f57(0x217)](w['UniverThreadCommentUIPlugin'],b[_0x4f6f57(0x1c1)],T[_0x4f6f57(0x1f7)]),O(0x1,c['Inject'](c[_0x4f6f57(0x1bb)])),O(0x2,c[_0x4f6f57(0x1e1)])],exports[_0x4f6f57(0x21e)]);
1
+ 'use strict';const _0x49849a=_0x1b25;(function(_0x17097c,_0x5949ad){const _0x234dd9=_0x1b25,_0x524c25=_0x17097c();while(!![]){try{const _0x5e18a2=parseInt(_0x234dd9(0xf2))/0x1*(parseInt(_0x234dd9(0xd0))/0x2)+-parseInt(_0x234dd9(0xc5))/0x3*(parseInt(_0x234dd9(0xc4))/0x4)+-parseInt(_0x234dd9(0xdb))/0x5+-parseInt(_0x234dd9(0xfc))/0x6*(-parseInt(_0x234dd9(0xce))/0x7)+-parseInt(_0x234dd9(0xde))/0x8*(-parseInt(_0x234dd9(0xc7))/0x9)+-parseInt(_0x234dd9(0xd4))/0xa*(-parseInt(_0x234dd9(0xf0))/0xb)+parseInt(_0x234dd9(0xc2))/0xc;if(_0x5e18a2===_0x5949ad)break;else _0x524c25['push'](_0x524c25['shift']());}catch(_0x327095){_0x524c25['push'](_0x524c25['shift']());}}}(_0x1839,0x9fdd4));Object[_0x49849a(0xbb)](exports,Symbol[_0x49849a(0xb7)],{'value':_0x49849a(0x10c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x49849a(0xa5);var I=(_0x312a05=>(_0x312a05[_0x312a05[_0x49849a(0xfa)]=0x0]=_0x49849a(0xfa),_0x312a05[_0x312a05[_0x49849a(0x101)]=0x1]=_0x49849a(0x101),_0x312a05[_0x312a05['UNRECOGNIZED']=-0x1]=_0x49849a(0xcb),_0x312a05))(I||{}),v=(_0x1ae531=>(_0x1ae531[_0x1ae531[_0x49849a(0xed)]=0x0]=_0x49849a(0xed),_0x1ae531[_0x1ae531[_0x49849a(0xff)]=0x1]=_0x49849a(0xff),_0x1ae531[_0x1ae531['Reply']=0x2]=_0x49849a(0xe7),_0x1ae531[_0x1ae531[_0x49849a(0x9d)]=0x3]=_0x49849a(0x9d),_0x1ae531[_0x1ae531[_0x49849a(0xa6)]=0x4]=_0x49849a(0xa6),_0x1ae531[_0x1ae531[_0x49849a(0xe8)]=0x5]=_0x49849a(0xe8),_0x1ae531[_0x1ae531['UNRECOGNIZED']=-0x1]=_0x49849a(0xcb),_0x1ae531))(v||{});const f=_0xaffd06=>c['dayjs'](new Date(+_0xaffd06))[_0x49849a(0xaa)]('YYYY/MM/DD\x20HH:mm'),R=async(_0xd4fa1e,_0x57b9e7)=>{const _0x1c1de2=_0x49849a,_0x1daa1a=_0xd4fa1e[_0x1c1de2(0xd8)](c[_0x1c1de2(0x10d)]),_0xa0d3ca=_0xd4fa1e[_0x1c1de2(0xd8)](P[_0x1c1de2(0x10a)]);_0x57b9e7[_0x1c1de2(0xe2)](_0x5e54c4=>{const _0x33a6cf=_0x1c1de2;_0x1daa1a['getUser'](_0x5e54c4)&&_0x57b9e7[_0x33a6cf(0xad)](_0x5e54c4);}),_0x57b9e7[_0x1c1de2(0x9e)]&&(await _0xa0d3ca['get'](_0x1c1de2(0xf4),{'params':{'userIDs':[..._0x57b9e7]}}))[_0x1c1de2(0xb8)][_0x1c1de2(0xfe)]['forEach'](_0x889a6d=>{const _0x41ea46=_0x1c1de2;_0x889a6d&&_0x1daa1a[_0x41ea46(0xc0)](_0x889a6d);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x46cf74,_0x4d573c,_0x1be50f,_0x2cbe3e)=>{const _0x38fd78=_0x49849a;for(var _0x4ce09e=_0x2cbe3e>0x1?void 0x0:_0x2cbe3e?$(_0x4d573c,_0x1be50f):_0x4d573c,_0x40b36b=_0x46cf74[_0x38fd78(0xf1)]-0x1,_0x2e1cea;_0x40b36b>=0x0;_0x40b36b--)(_0x2e1cea=_0x46cf74[_0x40b36b])&&(_0x4ce09e=_0x2e1cea(_0x4ce09e)||_0x4ce09e);return _0x4ce09e;},S=(_0x364aa3,_0x39835f)=>(_0x1e4f48,_0x1a7725)=>_0x39835f(_0x1e4f48,_0x1a7725,_0x364aa3);let _=class extends c[_0x49849a(0xe6)]{constructor(_0x134a4e,_0xd58ec8,_0x58705b,_0x38d45b){const _0xbbdb00=_0x49849a;super(),this['_commentService']=_0x134a4e,this[_0xbbdb00(0xa2)]=_0xd58ec8,this[_0xbbdb00(0x109)]=_0x58705b,this[_0xbbdb00(0xdf)]=_0x38d45b,this[_0xbbdb00(0xa9)](),this[_0xbbdb00(0x104)]();}['_initUserSync'](){const _0x3c0e24=_0x49849a;this['disposeWithMe'](this['_threadCommentModel'][_0x3c0e24(0xb2)]['pipe'](j[_0x3c0e24(0x102)](0x10))['subscribe'](_0x432b7d=>{const _0x19e386=new Set();_0x432b7d['forEach'](_0x245074=>{const _0x1f5bd5=_0x1b25;switch(_0x245074[_0x1f5bd5(0x100)]){case _0x1f5bd5(0x108):{const _0x5d6bac=_0x245074[_0x1f5bd5(0xe1)][_0x1f5bd5(0xcd)];_0x19e386[_0x1f5bd5(0x108)](_0x5d6bac);break;}}}),R(this['_injector'],_0x19e386);}));}[_0x49849a(0xa9)](){const _0x10926c=_0x49849a;this['disposeWithMe'](this['_commentService'][_0x10926c(0xb2)][_0x10926c(0xee)](async _0x3ee7f1=>{const _0x525cc=_0x10926c;var _0x247e3b,_0x3e5776,_0x39b69a,_0x481261;const _0xf6ddea=(_0x247e3b=this[_0x525cc(0xa2)][_0x525cc(0xae)](_0x3ee7f1[_0x525cc(0xb3)])[_0x525cc(0xf3)](_0x3e7110=>_0x3e7110[_0x525cc(0x98)]===_0x3ee7f1['threadId']))==null?void 0x0:_0x247e3b[_0x525cc(0xe9)];if(!_0xf6ddea)return;const {unitId:_0x1f708f,subUnitId:_0x941e44}=_0xf6ddea;switch(_0x3ee7f1[_0x525cc(0xdd)]&&this[_0x525cc(0x109)][_0x525cc(0xc0)](_0x3ee7f1['user']),_0x3ee7f1[_0x525cc(0x100)]){case v['Add']:break;case v[_0x525cc(0xe7)]:{this[_0x525cc(0xa2)][_0x525cc(0xc6)](_0x1f708f,_0x941e44,{'unitId':_0x1f708f,'subUnitId':_0x941e44,'ref':'','id':_0x3ee7f1['replyId'],'dT':f(+_0x3ee7f1[_0x525cc(0xa0)]),'threadId':_0x3ee7f1['threadId'],'personId':(_0x39b69a=(_0x3e5776=_0x3ee7f1[_0x525cc(0xdd)])==null?void 0x0:_0x3e5776[_0x525cc(0x105)])!=null?_0x39b69a:_0x3ee7f1[_0x525cc(0x10b)],'text':JSON[_0x525cc(0xca)](_0x3ee7f1['content']),'parentId':_0xf6ddea['id']});break;}case v[_0x525cc(0xa6)]:{const _0x3da445=this[_0x525cc(0xa2)][_0x525cc(0xec)](_0x1f708f,_0x941e44,_0x3ee7f1[_0x525cc(0x97)]);_0x3da445&&_0x3da445[_0x525cc(0xfd)]&&this[_0x525cc(0xa2)][_0x525cc(0xc8)](_0x1f708f,_0x941e44,_0x3ee7f1[_0x525cc(0x97)]);break;}case v[_0x525cc(0x9d)]:{this[_0x525cc(0xa2)][_0x525cc(0xcf)](_0x1f708f,_0x941e44,{'commentId':_0x3ee7f1[_0x525cc(0x97)],'text':JSON['parse'](_0x3ee7f1[_0x525cc(0x107)])});break;}case v[_0x525cc(0xe8)]:{const _0x4946bf=(_0x481261=this[_0x525cc(0xa2)][_0x525cc(0xae)](_0x3ee7f1[_0x525cc(0xb3)])[_0x525cc(0xf3)](_0x1b6483=>_0x1b6483[_0x525cc(0x98)]===_0x3ee7f1[_0x525cc(0x98)]))==null?void 0x0:_0x481261[_0x525cc(0xe9)];_0x4946bf&&this[_0x525cc(0xa2)][_0x525cc(0xd7)](_0x1f708f,_0x941e44,_0x4946bf['id'],_0x3ee7f1[_0x525cc(0x9b)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x49849a(0x9a)](b[_0x49849a(0xc3)])),S(0x1,c[_0x49849a(0x9a)](M[_0x49849a(0xda)])),S(0x2,c[_0x49849a(0x9a)](c[_0x49849a(0x10d)])),S(0x3,c['Inject'](c[_0x49849a(0x106)]))],_);const q=_0x49849a(0xaf),D={};var A=Object[_0x49849a(0xe4)],x=(_0x28acd5,_0x3c3297,_0x1237d6,_0xcb3979)=>{const _0x35ab1a=_0x49849a;for(var _0x221137=_0xcb3979>0x1?void 0x0:_0xcb3979?A(_0x3c3297,_0x1237d6):_0x3c3297,_0xf17d99=_0x28acd5[_0x35ab1a(0xf1)]-0x1,_0x1b3a6a;_0xf17d99>=0x0;_0xf17d99--)(_0x1b3a6a=_0x28acd5[_0xf17d99])&&(_0x221137=_0x1b3a6a(_0x221137)||_0x221137);return _0x221137;},C=(_0x47ae62,_0x3085cc)=>(_0x1c5de8,_0x4cb897)=>_0x3085cc(_0x1c5de8,_0x4cb897,_0x47ae62);function _0x1839(){const _0x47b387=['getMemberID','OpenOrReOpen','UniverLicensePlugin','6vQLOUx','parentId','users','Add','type','Solved','bufferTime','_configService','_initUserSync','userID','Injector','content','add','_userService','HTTPService','userId','Module','UserManagerService','replyId','threadId','DependentOn','Inject','solved','comments','Edit','size','slice','createTimestamp','onReady','_threadCommentModel','CustomRangeType','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','reply','rangeId','_init','format','comment','UniverThreadCommentDataSourcePlugin','delete','getUnit','thread-comment-data-source.config','replies','customRanges','commentUpdate$','unitId','post','_threadCommentDataSourceService','syncUpdateMutationToColla','toStringTag','body','COMMENT','_initDataSource','defineProperty','onStarting','_config','/delete','dayjs','addUser','UniverThreadCommentUIPlugin','7660956AENmyF','CommentService','97876VTuntm','57NkvNlX','addComment','8712iAoBUN','deleteComment','requireSession','parse','UNRECOGNIZED','merge','personId','139573HKcXXc','updateComment','282FfZuQl','_threadCommentDataSource','map','listComments','30maknyU','/universer-api/comment/unit/','filter','resolveComment','get','setConfig','ThreadCommentModel','4462755CiQrsY','_httpService','user','680tpPxdc','_injector','dataSource','payload','forEach','ref','getOwnPropertyDescriptor','IThreadCommentDataSourceService','Disposable','Reply','Solve','root','code','error','getComment','Unknown','subscribe','UniverCollaborationClientPlugin','3329832TWHdsb','length','2578jaTHMa','find','/universer-api/user/list','rangeType','stringify','IConfigService','YYYY/MM/DD\x20HH:mm'];_0x1839=function(){return _0x47b387;};return _0x1839();}function Y(_0x4a8510,_0x5bed3b){const _0x2916a1=_0x49849a,_0x1ade84=_0x4a8510['replies'][0x0];return{..._0x5bed3b,'id':_0x1ade84['replyId'],'resolved':_0x4a8510[_0x2916a1(0x9b)]===0x1,'dT':f(_0x1ade84[_0x2916a1(0xa0)]),'personId':_0x1ade84[_0x2916a1(0x10b)],'threadId':_0x1ade84[_0x2916a1(0x98)]};}function G(_0x2d649c,_0xcbf474,_0x233a8c){const _0x2596de=_0x49849a;var _0x1688a2,_0x126139;if(((_0x126139=(_0x1688a2=_0x2d649c==null?void 0x0:_0x2d649c[_0x2596de(0xb0)])==null?void 0x0:_0x1688a2[_0x2596de(0xf1)])!=null?_0x126139:0x0)>0x0){const _0x29e902=(_0xda353d,_0x369e68)=>({'id':_0xda353d[_0x2596de(0x97)],'threadId':_0xda353d[_0x2596de(0x98)],'dT':f(_0xda353d['createTimestamp']),'personId':_0xda353d[_0x2596de(0x10b)],'resolved':_0x2d649c[_0x2596de(0x9b)]===I[_0x2596de(0x101)],'unitId':_0xcbf474,'subUnitId':_0x233a8c,'text':JSON['parse'](_0xda353d[_0x2596de(0x107)]),'parentId':_0x369e68}),_0x1da4cd=_0x29e902(_0x2d649c[_0x2596de(0xb0)][0x0]);return{..._0x1da4cd,'children':_0x2d649c[_0x2596de(0xb0)][_0x2596de(0x9f)](0x1)['map'](_0x24207b=>_0x29e902(_0x24207b,_0x1da4cd['id']))};}return null;}function _0x1b25(_0x5eec79,_0x58c0a9){const _0x1839ec=_0x1839();return _0x1b25=function(_0x1b2596,_0x3f07b3){_0x1b2596=_0x1b2596-0x97;let _0x55b4a6=_0x1839ec[_0x1b2596];return _0x55b4a6;},_0x1b25(_0x5eec79,_0x58c0a9);}let p=class{constructor(_0x48e75f,_0x2dfbf4,_0xac536b){const _0x41e2bb=_0x49849a;this['_httpService']=_0x48e75f,this[_0x41e2bb(0x109)]=_0x2dfbf4,this['_sessionService']=_0xac536b;}async[_0x49849a(0xc6)](_0x1ee7a7){const _0xa8cc94=_0x49849a;var _0x4d389a,_0x1a9b2a;const {parentId:_0xaa053a,unitId:_0x39bf24,text:_0x5a0221,threadId:_0x57ae52}=_0x1ee7a7,_0xae0c70=(_0x1a9b2a=(_0x4d389a=_0x5a0221[_0xa8cc94(0xb1)])==null?void 0x0:_0x4d389a['filter'](_0x4b1fa4=>_0x4b1fa4[_0xa8cc94(0xf5)]===c[_0xa8cc94(0xa3)]['COMMENT'])[_0xa8cc94(0xd2)](_0x384124=>_0x384124[_0xa8cc94(0xa8)]))!=null?_0x1a9b2a:[],_0x294ff5=JSON[_0xa8cc94(0xf6)](_0x5a0221),_0xd0a4b=(await this['_sessionService'][_0xa8cc94(0xc9)](_0x39bf24))['getMemberID']();if(_0xaa053a){const _0x186ba8={'memberId':_0xd0a4b,'unitId':_0x39bf24,'content':_0x294ff5,'mention':_0xae0c70,'threadId':_0x57ae52},_0x35d198=(await this[_0xa8cc94(0xdc)][_0xa8cc94(0xb4)](_0xa8cc94(0xd5)+_0x39bf24+'/reply',{'body':_0x186ba8}))[_0xa8cc94(0xb8)][_0xa8cc94(0xa7)];return{..._0x1ee7a7,'id':_0x35d198[_0xa8cc94(0x97)],'dT':c[_0xa8cc94(0xbf)](+_0x35d198[_0xa8cc94(0xa0)])[_0xa8cc94(0xaa)](_0xa8cc94(0xf8)),'personId':_0x35d198[_0xa8cc94(0x10b)]};}else{const _0x57020a={'memberId':_0xd0a4b,'unitId':_0x39bf24,'content':_0x294ff5,'mention':_0xae0c70},_0x47ae2e=await this['_httpService'][_0xa8cc94(0xb4)](_0xa8cc94(0xd5)+_0x39bf24+'/add',{'body':_0x57020a});return Y(_0x47ae2e[_0xa8cc94(0xb8)][_0xa8cc94(0xab)],_0x1ee7a7);}}async['updateComment'](_0x1a8086){const _0x92aecd=_0x49849a;var _0x57dc0a,_0x25ee45;const {text:_0x233f98,unitId:_0x2e49c7}=_0x1a8086,_0x1ffec2=(_0x25ee45=(_0x57dc0a=_0x233f98[_0x92aecd(0xb1)])==null?void 0x0:_0x57dc0a[_0x92aecd(0xd6)](_0x6e2f40=>_0x6e2f40[_0x92aecd(0xf5)]===c[_0x92aecd(0xa3)][_0x92aecd(0xb9)])[_0x92aecd(0xd2)](_0x49d312=>_0x49d312[_0x92aecd(0xa8)]))!=null?_0x25ee45:[],_0x80d7b0=JSON[_0x92aecd(0xf6)](_0x233f98),_0x40d9bd=_0x1a8086['threadId'],_0x340ba6=_0x1a8086['id'],_0x25896f={'memberId':(await this['_sessionService'][_0x92aecd(0xc9)](_0x2e49c7))['getMemberID'](),'unitId':_0x2e49c7,'threadId':_0x40d9bd,'mention':_0x1ffec2,'content':_0x80d7b0,'replyId':_0x340ba6},_0x164cce=await this[_0x92aecd(0xdc)]['post'](_0x92aecd(0xd5)+_0x2e49c7+'/edit',{'body':_0x25896f});return!_0x164cce[_0x92aecd(0xb8)]['error']||_0x164cce['body']['error'][_0x92aecd(0xea)]===0x1;}async['resolveComment'](_0x398697){const _0x47e287=_0x49849a,{unitId:_0x360442}=_0x398697,_0x47f84d=_0x398697[_0x47e287(0x98)],_0x368f62={'memberId':this['_userService'][_0x47e287(0xa4)]()['userID'],'unitId':_0x360442,'threadId':_0x47f84d,'solved':_0x398697['resolved']?I[_0x47e287(0x101)]:I[_0x47e287(0xfa)]},_0x3ec6c6=await this[_0x47e287(0xdc)]['post'](_0x47e287(0xd5)+_0x360442+'/solved',{'body':_0x368f62});return!_0x3ec6c6[_0x47e287(0xb8)][_0x47e287(0xeb)]||_0x3ec6c6[_0x47e287(0xb8)][_0x47e287(0xeb)][_0x47e287(0xea)]===0x1;}async[_0x49849a(0xc8)](_0x222255,_0x398185,_0x33aaa1,_0x48da19){const _0x5ec98a=_0x49849a,_0x317c17={'memberId':(await this['_sessionService'][_0x5ec98a(0xc9)](_0x222255))[_0x5ec98a(0xf9)](),'threadId':_0x33aaa1,'replyId':_0x48da19,'unitId':_0x222255},_0xdfc739=await this[_0x5ec98a(0xdc)][_0x5ec98a(0xb4)](_0x5ec98a(0xd5)+_0x222255+_0x5ec98a(0xbe),{'body':_0x317c17});return!_0xdfc739[_0x5ec98a(0xb8)][_0x5ec98a(0xeb)]||_0xdfc739[_0x5ec98a(0xb8)][_0x5ec98a(0xeb)][_0x5ec98a(0xea)]===0x1;}async[_0x49849a(0xd3)](_0x1a5f90,_0x4b3361,_0x25af2e){const _0x5d9143=_0x49849a,_0x39aa6={'unitId':_0x1a5f90,'threadId':_0x25af2e},_0x43c4b1=await this[_0x5d9143(0xdc)][_0x5d9143(0xb4)](_0x5d9143(0xd5)+_0x1a5f90+'/list',{'body':_0x39aa6}),_0x2d62d8=_0x25af2e[_0x5d9143(0xd2)](_0x1691d3=>G(_0x43c4b1[_0x5d9143(0xb8)][_0x5d9143(0x9c)][_0x1691d3],_0x1a5f90,_0x4b3361))[_0x5d9143(0xd6)](Boolean);return Object['values'](_0x43c4b1[_0x5d9143(0xb8)][_0x5d9143(0xfe)])[_0x5d9143(0xe2)](_0x596c59=>{const _0x2005f6=_0x5d9143;this[_0x2005f6(0x109)][_0x2005f6(0xc0)](_0x596c59);}),_0x2d62d8;}['saveCommentToSnapshot'](_0xa23ad3){const _0x3b3339=_0x49849a;return{'id':_0xa23ad3['id'],'threadId':_0xa23ad3['threadId'],'ref':_0xa23ad3[_0x3b3339(0xe3)]};}};p=x([C(0x0,c[_0x49849a(0x9a)](P[_0x49849a(0x10a)])),C(0x1,c['Inject'](c[_0x49849a(0x10d)])),C(0x2,c[_0x49849a(0x9a)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x304088,_0x1e80e5,_0x2293ac,_0x25119f)=>{const _0x53ebfa=_0x49849a;for(var _0x165bef=_0x25119f>0x1?void 0x0:_0x25119f?H(_0x1e80e5,_0x2293ac):_0x1e80e5,_0x57d192=_0x304088[_0x53ebfa(0xf1)]-0x1,_0x56f873;_0x57d192>=0x0;_0x57d192--)(_0x56f873=_0x304088[_0x57d192])&&(_0x165bef=_0x56f873(_0x165bef)||_0x165bef);return _0x165bef;},y=(_0x389415,_0x31b75a)=>(_0x42f9b1,_0x143d6a)=>_0x31b75a(_0x42f9b1,_0x143d6a,_0x389415);let g=class extends c[_0x49849a(0xe6)]{constructor(_0x230bb8,_0x2907dd){const _0x1ae40a=_0x49849a;super(),this['_threadCommentDataSourceService']=_0x230bb8,this[_0x1ae40a(0xd1)]=_0x2907dd,this[_0x1ae40a(0xba)]();}[_0x49849a(0xba)](){const _0x2f583c=_0x49849a;this['_threadCommentDataSourceService'][_0x2f583c(0xe0)]=this[_0x2f583c(0xd1)],this[_0x2f583c(0xb5)][_0x2f583c(0xb6)]=!0x1;}};g=J([y(0x0,M[_0x49849a(0xe5)]),y(0x1,c[_0x49849a(0x9a)](p))],g);var F=Object[_0x49849a(0xbb)],L=Object[_0x49849a(0xe4)],Z=(_0x1a1974,_0x1a44d7,_0x3b4e52)=>_0x1a44d7 in _0x1a1974?F(_0x1a1974,_0x1a44d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b4e52}):_0x1a1974[_0x1a44d7]=_0x3b4e52,W=(_0x5db762,_0x44506d,_0x4b2ba5,_0x5bed5)=>{const _0x51f9a1=_0x49849a;for(var _0x39f63a=_0x5bed5>0x1?void 0x0:_0x5bed5?L(_0x44506d,_0x4b2ba5):_0x44506d,_0x590ebe=_0x5db762[_0x51f9a1(0xf1)]-0x1,_0x30796f;_0x590ebe>=0x0;_0x590ebe--)(_0x30796f=_0x5db762[_0x590ebe])&&(_0x39f63a=_0x30796f(_0x39f63a)||_0x39f63a);return _0x39f63a;},O=(_0x363b7d,_0x50b8ab)=>(_0x543329,_0x27ccb0)=>_0x50b8ab(_0x543329,_0x27ccb0,_0x363b7d),N=(_0x14db5a,_0x2bfcfe,_0x3098f8)=>Z(_0x14db5a,typeof _0x2bfcfe!='symbol'?_0x2bfcfe+'':_0x2bfcfe,_0x3098f8);exports[_0x49849a(0xac)]=class extends c['Plugin']{constructor(_0x463f92=D,_0xbca383,_0x4d1096){const _0x274119=_0x49849a;super(),this[_0x274119(0xbd)]=_0x463f92,this['_injector']=_0xbca383,this[_0x274119(0x103)]=_0x4d1096;const {..._0x4ca1c9}=c[_0x274119(0xcc)]({},D,this[_0x274119(0xbd)]);this[_0x274119(0x103)][_0x274119(0xd9)](q,_0x4ca1c9);}[_0x49849a(0xbc)](){[[p],[g],[_]]['forEach'](_0x55168d=>{const _0x18940d=_0x1b25;this[_0x18940d(0xdf)][_0x18940d(0x108)](_0x55168d);});}[_0x49849a(0xa1)](){const _0x437a69=_0x49849a;this['_injector'][_0x437a69(0xd8)](g),this[_0x437a69(0xdf)][_0x437a69(0xd8)](_);}},N(exports[_0x49849a(0xac)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x49849a(0x100),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x49849a(0x99)](w[_0x49849a(0xc1)],b[_0x49849a(0xef)],T[_0x49849a(0xfb)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x49849a(0xf7)])],exports[_0x49849a(0xac)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x51d6ee=_0xcce0;(function(_0x20a5b8,_0xe2fa2a){const _0x4aa656=_0xcce0,_0x51e3f4=_0x20a5b8();while(!![]){try{const _0x575fa8=parseInt(_0x4aa656(0x9b))/0x1*(parseInt(_0x4aa656(0x80))/0x2)+-parseInt(_0x4aa656(0xbd))/0x3+-parseInt(_0x4aa656(0x79))/0x4+-parseInt(_0x4aa656(0xc0))/0x5*(parseInt(_0x4aa656(0x68))/0x6)+parseInt(_0x4aa656(0x8c))/0x7+parseInt(_0x4aa656(0xa1))/0x8*(parseInt(_0x4aa656(0xbf))/0x9)+parseInt(_0x4aa656(0x92))/0xa*(parseInt(_0x4aa656(0x75))/0xb);if(_0x575fa8===_0xe2fa2a)break;else _0x51e3f4['push'](_0x51e3f4['shift']());}catch(_0xf92ea9){_0x51e3f4['push'](_0x51e3f4['shift']());}}}(_0x10e6,0xe4408));import{CommentService as _0x3e89ca,CollaborationSessionService as _0x434488,UniverCollaborationClientPlugin as _0x46428b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d9af7}from'@univerjs-pro/license';import{dayjs as _0x20fc5c,UserManagerService as _0x222ae4,Inject as _0x454f13,Injector as _0x5ce71f,Disposable as _0x1acb77,CustomRangeType as _0x3274b3,UniverInstanceType as _0x1f9c28,DependentOn as _0x52b2c3,IConfigService as _0x6a194c,Plugin as _0x59eae2,merge as _0x1c6e7b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23dfb8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x81c630,IThreadCommentDataSourceService as _0xb1d392}from'@univerjs/thread-comment';import{bufferTime as _0x52c83e}from'rxjs';import{HTTPService as _0x1768e5}from'@univerjs/network';const W=_0x51d6ee(0x6e);var I=(_0x2e10d6=>(_0x2e10d6[_0x2e10d6[_0x51d6ee(0x88)]=0x0]=_0x51d6ee(0x88),_0x2e10d6[_0x2e10d6[_0x51d6ee(0xb4)]=0x1]=_0x51d6ee(0xb4),_0x2e10d6[_0x2e10d6['UNRECOGNIZED']=-0x1]=_0x51d6ee(0x6c),_0x2e10d6))(I||{}),v=(_0x49ae95=>(_0x49ae95[_0x49ae95['Unknown']=0x0]=_0x51d6ee(0xb7),_0x49ae95[_0x49ae95[_0x51d6ee(0x67)]=0x1]=_0x51d6ee(0x67),_0x49ae95[_0x49ae95['Reply']=0x2]=_0x51d6ee(0x93),_0x49ae95[_0x49ae95[_0x51d6ee(0xb9)]=0x3]=_0x51d6ee(0xb9),_0x49ae95[_0x49ae95[_0x51d6ee(0x6a)]=0x4]=_0x51d6ee(0x6a),_0x49ae95[_0x49ae95['Solve']=0x5]=_0x51d6ee(0x73),_0x49ae95[_0x49ae95[_0x51d6ee(0x6c)]=-0x1]=_0x51d6ee(0x6c),_0x49ae95))(v||{});const y=_0x31d5d0=>_0x20fc5c(new Date(+_0x31d5d0))[_0x51d6ee(0xad)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x171eb3,_0x2f9404)=>{const _0x4cca58=_0x51d6ee,_0x217328=_0x171eb3[_0x4cca58(0x9f)](_0x222ae4),_0x92237a=_0x171eb3['get'](_0x1768e5);_0x2f9404[_0x4cca58(0x7c)](_0x3c7726=>{const _0x38b01a=_0x4cca58;_0x217328['getUser'](_0x3c7726)&&_0x2f9404[_0x38b01a(0xab)](_0x3c7726);}),_0x2f9404[_0x4cca58(0xa4)]&&(await _0x92237a['get'](_0x4cca58(0xac),{'params':{'userIDs':[..._0x2f9404]}}))[_0x4cca58(0x78)]['users']['forEach'](_0x46046d=>{const _0x5e6baf=_0x4cca58;_0x46046d&&_0x217328[_0x5e6baf(0x8d)](_0x46046d);});};var K=Object[_0x51d6ee(0xa8)],V=(_0x5e6ed8,_0x3d5a66,_0xffa6e3,_0x325f25)=>{const _0x2b44d3=_0x51d6ee;for(var _0x26bc4a=_0x325f25>0x1?void 0x0:_0x325f25?K(_0x3d5a66,_0xffa6e3):_0x3d5a66,_0x418897=_0x5e6ed8[_0x2b44d3(0x94)]-0x1,_0x4d7aff;_0x418897>=0x0;_0x418897--)(_0x4d7aff=_0x5e6ed8[_0x418897])&&(_0x26bc4a=_0x4d7aff(_0x26bc4a)||_0x26bc4a);return _0x26bc4a;},p=(_0x418894,_0x38ab13)=>(_0x3c2bd5,_0x1596e0)=>_0x38ab13(_0x3c2bd5,_0x1596e0,_0x418894);let _=class extends _0x1acb77{constructor(_0x54bf5e,_0xe39f26,_0x3708ba,_0x324723){const _0x378f0f=_0x51d6ee;super(),this['_commentService']=_0x54bf5e,this[_0x378f0f(0xa3)]=_0xe39f26,this[_0x378f0f(0x9c)]=_0x3708ba,this[_0x378f0f(0x6d)]=_0x324723,this[_0x378f0f(0x87)](),this[_0x378f0f(0xc7)]();}[_0x51d6ee(0xc7)](){const _0x32d170=_0x51d6ee;this[_0x32d170(0xa9)](this['_threadCommentModel'][_0x32d170(0x76)][_0x32d170(0x96)](_0x52c83e(0x10))[_0x32d170(0xc8)](_0x4a8ab0=>{const _0x50ed0d=_0x32d170,_0x2265a0=new Set();_0x4a8ab0[_0x50ed0d(0x7c)](_0x186f8f=>{const _0xe4fa42=_0x50ed0d;switch(_0x186f8f[_0xe4fa42(0x85)]){case _0xe4fa42(0xa5):{const _0x55dac0=_0x186f8f[_0xe4fa42(0x9e)][_0xe4fa42(0x65)];_0x2265a0[_0xe4fa42(0xa5)](_0x55dac0);break;}}}),B(this[_0x50ed0d(0x6d)],_0x2265a0);}));}[_0x51d6ee(0x87)](){const _0x373076=_0x51d6ee;this[_0x373076(0xa9)](this[_0x373076(0x7a)][_0x373076(0x76)][_0x373076(0xc8)](async _0x7a7fd1=>{const _0x16346e=_0x373076;var _0x5636be,_0xeca34d,_0x549415,_0x2bd0b1;const _0x304ce5=(_0x5636be=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x1c922e=>_0x1c922e[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x5636be[_0x16346e(0xbc)];if(!_0x304ce5)return;const {unitId:_0x566330,subUnitId:_0x26068a}=_0x304ce5;switch(_0x7a7fd1[_0x16346e(0xb6)]&&this[_0x16346e(0x9c)]['addUser'](_0x7a7fd1[_0x16346e(0xb6)]),_0x7a7fd1['type']){case v['Add']:break;case v[_0x16346e(0x93)]:{this['_threadCommentModel']['addComment'](_0x566330,_0x26068a,{'unitId':_0x566330,'subUnitId':_0x26068a,'ref':'','id':_0x7a7fd1[_0x16346e(0xbe)],'dT':y(+_0x7a7fd1['createTimestamp']),'threadId':_0x7a7fd1['threadId'],'personId':(_0x549415=(_0xeca34d=_0x7a7fd1['user'])==null?void 0x0:_0xeca34d[_0x16346e(0xcb)])!=null?_0x549415:_0x7a7fd1['userId'],'text':JSON['parse'](_0x7a7fd1[_0x16346e(0xca)]),'parentId':_0x304ce5['id']});break;}case v[_0x16346e(0x6a)]:{const _0x3255e8=this[_0x16346e(0xa3)]['getComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);_0x3255e8&&_0x3255e8['parentId']&&this[_0x16346e(0xa3)]['deleteComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);break;}case v[_0x16346e(0xb9)]:{this[_0x16346e(0xa3)][_0x16346e(0x91)](_0x566330,_0x26068a,{'commentId':_0x7a7fd1[_0x16346e(0xbe)],'text':JSON[_0x16346e(0xb1)](_0x7a7fd1[_0x16346e(0xca)])});break;}case v[_0x16346e(0x73)]:{const _0x258002=(_0x2bd0b1=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x168ada=>_0x168ada[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x2bd0b1['root'];_0x258002&&this[_0x16346e(0xa3)]['resolveComment'](_0x566330,_0x26068a,_0x258002['id'],_0x7a7fd1[_0x16346e(0xb0)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x454f13(_0x3e89ca)),p(0x1,_0x454f13(_0x81c630)),p(0x2,_0x454f13(_0x222ae4)),p(0x3,_0x454f13(_0x5ce71f))],_);const z=_0x51d6ee(0x8f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x469a54,_0x157df9,_0x1706c7,_0x57b21f)=>{for(var _0x3a01e3=_0x57b21f>0x1?void 0x0:_0x57b21f?k(_0x157df9,_0x1706c7):_0x157df9,_0x3fb191=_0x469a54['length']-0x1,_0x411d4a;_0x3fb191>=0x0;_0x3fb191--)(_0x411d4a=_0x469a54[_0x3fb191])&&(_0x3a01e3=_0x411d4a(_0x3a01e3)||_0x3a01e3);return _0x3a01e3;},b=(_0x174a3e,_0xb50247)=>(_0x5d21c5,_0x212e44)=>_0xb50247(_0x5d21c5,_0x212e44,_0x174a3e);function X(_0x1b441d,_0x247add){const _0x11bb1d=_0x51d6ee,_0x70da45=_0x1b441d[_0x11bb1d(0xaa)][0x0];return{..._0x247add,'id':_0x70da45[_0x11bb1d(0xbe)],'resolved':_0x1b441d[_0x11bb1d(0xb0)]===0x1,'dT':y(_0x70da45[_0x11bb1d(0xaf)]),'personId':_0x70da45[_0x11bb1d(0x82)],'threadId':_0x70da45[_0x11bb1d(0x86)]};}function ee(_0x29e18b,_0x528ef4,_0x389ddf){const _0x419b03=_0x51d6ee;var _0x29f614,_0x514c9a;if(((_0x514c9a=(_0x29f614=_0x29e18b==null?void 0x0:_0x29e18b[_0x419b03(0xaa)])==null?void 0x0:_0x29f614['length'])!=null?_0x514c9a:0x0)>0x0){const _0x29575c=(_0x21be44,_0x1d1e4f)=>({'id':_0x21be44[_0x419b03(0xbe)],'threadId':_0x21be44['threadId'],'dT':y(_0x21be44[_0x419b03(0xaf)]),'personId':_0x21be44[_0x419b03(0x82)],'resolved':_0x29e18b[_0x419b03(0xb0)]===I[_0x419b03(0xb4)],'unitId':_0x528ef4,'subUnitId':_0x389ddf,'text':JSON[_0x419b03(0xb1)](_0x21be44[_0x419b03(0xca)]),'parentId':_0x1d1e4f}),_0x21c442=_0x29575c(_0x29e18b[_0x419b03(0xaa)][0x0]);return{..._0x21c442,'children':_0x29e18b[_0x419b03(0xaa)][_0x419b03(0x66)](0x1)[_0x419b03(0x6b)](_0x40e9bb=>_0x29575c(_0x40e9bb,_0x21c442['id']))};}return null;}let S=class{constructor(_0x25c12e,_0x5bc843,_0x49aa9c){const _0xcee460=_0x51d6ee;this[_0xcee460(0xc1)]=_0x25c12e,this[_0xcee460(0x9c)]=_0x5bc843,this[_0xcee460(0x98)]=_0x49aa9c;}async['addComment'](_0x1f5e6f){const _0x498202=_0x51d6ee;var _0x34e307,_0x3d50d1;const {parentId:_0x1a3138,unitId:_0x43b2de,text:_0x9dab7b,threadId:_0x2ec661}=_0x1f5e6f,_0x45002c=(_0x3d50d1=(_0x34e307=_0x9dab7b[_0x498202(0xc3)])==null?void 0x0:_0x34e307[_0x498202(0x70)](_0x2905df=>_0x2905df[_0x498202(0x72)]===_0x3274b3[_0x498202(0xb5)])[_0x498202(0x6b)](_0x44578b=>_0x44578b['rangeId']))!=null?_0x3d50d1:[],_0x2857ea=JSON['stringify'](_0x9dab7b),_0x58f953=(await this['_sessionService'][_0x498202(0x95)](_0x43b2de))[_0x498202(0xa7)]();if(_0x1a3138){const _0xe93156={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c,'threadId':_0x2ec661},_0x28970f=(await this[_0x498202(0xc1)][_0x498202(0x84)](_0x498202(0x99)+_0x43b2de+_0x498202(0xba),{'body':_0xe93156}))['body'][_0x498202(0x90)];return{..._0x1f5e6f,'id':_0x28970f[_0x498202(0xbe)],'dT':_0x20fc5c(+_0x28970f[_0x498202(0xaf)])[_0x498202(0xad)](_0x498202(0xc6)),'personId':_0x28970f[_0x498202(0x82)]};}else{const _0x1ce77e={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c},_0x38a993=await this[_0x498202(0xc1)]['post']('/universer-api/comment/unit/'+_0x43b2de+_0x498202(0xc4),{'body':_0x1ce77e});return X(_0x38a993[_0x498202(0x78)]['comment'],_0x1f5e6f);}}async[_0x51d6ee(0x91)](_0x7453f4){const _0x2d557e=_0x51d6ee;var _0x4a1b2f,_0x1fd33a;const {text:_0x44d91a,unitId:_0x754bc}=_0x7453f4,_0x594220=(_0x1fd33a=(_0x4a1b2f=_0x44d91a[_0x2d557e(0xc3)])==null?void 0x0:_0x4a1b2f[_0x2d557e(0x70)](_0xb8ef72=>_0xb8ef72[_0x2d557e(0x72)]===_0x3274b3[_0x2d557e(0xb5)])['map'](_0x2ea3bb=>_0x2ea3bb['rangeId']))!=null?_0x1fd33a:[],_0x49d97b=JSON[_0x2d557e(0x71)](_0x44d91a),_0x1b8223=_0x7453f4[_0x2d557e(0x86)],_0x15ea9c=_0x7453f4['id'],_0x46cda1={'memberId':(await this[_0x2d557e(0x98)][_0x2d557e(0x95)](_0x754bc))[_0x2d557e(0xa7)](),'unitId':_0x754bc,'threadId':_0x1b8223,'mention':_0x594220,'content':_0x49d97b,'replyId':_0x15ea9c},_0x115eab=await this[_0x2d557e(0xc1)][_0x2d557e(0x84)]('/universer-api/comment/unit/'+_0x754bc+_0x2d557e(0xbb),{'body':_0x46cda1});return!_0x115eab[_0x2d557e(0x78)][_0x2d557e(0x81)]||_0x115eab[_0x2d557e(0x78)]['error'][_0x2d557e(0xae)]===0x1;}async['resolveComment'](_0x27d98e){const _0x23936d=_0x51d6ee,{unitId:_0x37e78f}=_0x27d98e,_0x24b97a=_0x27d98e['threadId'],_0x4629f3={'memberId':this[_0x23936d(0x9c)][_0x23936d(0x74)]()['userID'],'unitId':_0x37e78f,'threadId':_0x24b97a,'solved':_0x27d98e['resolved']?I[_0x23936d(0xb4)]:I[_0x23936d(0x88)]},_0x1debd5=await this['_httpService'][_0x23936d(0x84)]('/universer-api/comment/unit/'+_0x37e78f+_0x23936d(0x9a),{'body':_0x4629f3});return!_0x1debd5[_0x23936d(0x78)][_0x23936d(0x81)]||_0x1debd5[_0x23936d(0x78)]['error'][_0x23936d(0xae)]===0x1;}async[_0x51d6ee(0xc9)](_0x24f79b,_0xc6744,_0x153112,_0x29470b){const _0x5889e3=_0x51d6ee,_0x3b0f08={'memberId':(await this[_0x5889e3(0x98)][_0x5889e3(0x95)](_0x24f79b))['getMemberID'](),'threadId':_0x153112,'replyId':_0x29470b,'unitId':_0x24f79b},_0x383d42=await this[_0x5889e3(0xc1)]['post'](_0x5889e3(0x99)+_0x24f79b+_0x5889e3(0xc2),{'body':_0x3b0f08});return!_0x383d42[_0x5889e3(0x78)][_0x5889e3(0x81)]||_0x383d42['body'][_0x5889e3(0x81)][_0x5889e3(0xae)]===0x1;}async['listComments'](_0x24cf93,_0x47cc6b,_0x452b88){const _0x40a582=_0x51d6ee,_0x33ac72={'unitId':_0x24cf93,'threadId':_0x452b88},_0x32452f=await this[_0x40a582(0xc1)][_0x40a582(0x84)](_0x40a582(0x99)+_0x24cf93+_0x40a582(0x97),{'body':_0x33ac72}),_0x262db5=_0x452b88['map'](_0x51659c=>ee(_0x32452f['body'][_0x40a582(0x8b)][_0x51659c],_0x24cf93,_0x47cc6b))[_0x40a582(0x70)](Boolean);return Object['values'](_0x32452f[_0x40a582(0x78)][_0x40a582(0xa2)])[_0x40a582(0x7c)](_0x549af6=>{const _0xb709ca=_0x40a582;this[_0xb709ca(0x9c)]['addUser'](_0x549af6);}),_0x262db5;}['saveCommentToSnapshot'](_0x12055d){const _0xca4d7=_0x51d6ee;return{'id':_0x12055d['id'],'threadId':_0x12055d[_0xca4d7(0x86)],'ref':_0x12055d[_0xca4d7(0xa0)]};}};S=Q([b(0x0,_0x454f13(_0x1768e5)),b(0x1,_0x454f13(_0x222ae4)),b(0x2,_0x454f13(_0x434488))],S);var re=Object[_0x51d6ee(0xa8)],te=(_0x444c2d,_0x2a310f,_0x574678,_0x10458e)=>{const _0x485f0c=_0x51d6ee;for(var _0x5b85ff=_0x10458e>0x1?void 0x0:_0x10458e?re(_0x2a310f,_0x574678):_0x2a310f,_0x3614c8=_0x444c2d[_0x485f0c(0x94)]-0x1,_0x228f12;_0x3614c8>=0x0;_0x3614c8--)(_0x228f12=_0x444c2d[_0x3614c8])&&(_0x5b85ff=_0x228f12(_0x5b85ff)||_0x5b85ff);return _0x5b85ff;},M=(_0x5a6d1c,_0x31fb4b)=>(_0x411238,_0x3a275d)=>_0x31fb4b(_0x411238,_0x3a275d,_0x5a6d1c);function _0xcce0(_0x412d16,_0x1b1663){const _0x10e650=_0x10e6();return _0xcce0=function(_0xcce061,_0x20e2e2){_0xcce061=_0xcce061-0x65;let _0x4d95b9=_0x10e650[_0xcce061];return _0x4d95b9;},_0xcce0(_0x412d16,_0x1b1663);}let f=class extends _0x1acb77{constructor(_0x570238,_0x471dcd){const _0x5b5ebf=_0x51d6ee;super(),this[_0x5b5ebf(0x8a)]=_0x570238,this['_threadCommentDataSource']=_0x471dcd,this[_0x5b5ebf(0x7d)]();}[_0x51d6ee(0x7d)](){const _0x8855a3=_0x51d6ee;this['_threadCommentDataSourceService'][_0x8855a3(0x83)]=this[_0x8855a3(0xb2)],this[_0x8855a3(0x8a)][_0x8855a3(0x7e)]=!0x1;}};f=te([M(0x0,_0xb1d392),M(0x1,_0x454f13(S))],f);var se=Object[_0x51d6ee(0x7f)],oe=Object[_0x51d6ee(0xa8)],ne=(_0x8d4074,_0x2d63bc,_0x5492cc)=>_0x2d63bc in _0x8d4074?se(_0x8d4074,_0x2d63bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5492cc}):_0x8d4074[_0x2d63bc]=_0x5492cc,ie=(_0x49a7da,_0x1e0110,_0x3e3bc7,_0x359a18)=>{const _0xa128bc=_0x51d6ee;for(var _0x1e5c5c=_0x359a18>0x1?void 0x0:_0x359a18?oe(_0x1e0110,_0x3e3bc7):_0x1e0110,_0x1b5327=_0x49a7da[_0xa128bc(0x94)]-0x1,_0x1e3882;_0x1b5327>=0x0;_0x1b5327--)(_0x1e3882=_0x49a7da[_0x1b5327])&&(_0x1e5c5c=_0x1e3882(_0x1e5c5c)||_0x1e5c5c);return _0x1e5c5c;},N=(_0x546c6b,_0x42889d)=>(_0x4b04f1,_0x1b502a)=>_0x42889d(_0x4b04f1,_0x1b502a,_0x546c6b),$=(_0xa96a01,_0x5af488,_0xcff0eb)=>ne(_0xa96a01,typeof _0x5af488!=_0x51d6ee(0x9d)?_0x5af488+'':_0x5af488,_0xcff0eb);let g=class extends _0x59eae2{constructor(_0x53936f=O,_0x459f58,_0x3ffa18){const _0x18d5f6=_0x51d6ee;super(),this[_0x18d5f6(0xa6)]=_0x53936f,this['_injector']=_0x459f58,this[_0x18d5f6(0x6f)]=_0x3ffa18;const {..._0x2d95be}=_0x1c6e7b({},O,this[_0x18d5f6(0xa6)]);this['_configService'][_0x18d5f6(0xb3)](z,_0x2d95be);}[_0x51d6ee(0x7b)](){const _0x23b729=_0x51d6ee;[[S],[f],[_]][_0x23b729(0x7c)](_0xc54ba4=>{const _0x90c1ea=_0x23b729;this[_0x90c1ea(0x6d)][_0x90c1ea(0xa5)](_0xc54ba4);});}[_0x51d6ee(0x8e)](){const _0x56ee66=_0x51d6ee;this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](f),this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](_);}};function _0x10e6(){const _0x1b2877=['threadId','_init','OpenOrReOpen','find','_threadCommentDataSourceService','comments','5814830wikXUt','addUser','onReady','thread-comment-data-source.config','reply','updateComment','66230GoAyvd','Reply','length','requireSession','pipe','/list','_sessionService','/universer-api/comment/unit/','/solved','3gTQMhO','_userService','symbol','payload','get','ref','54952nxEavL','users','_threadCommentModel','size','add','_config','getMemberID','getOwnPropertyDescriptor','disposeWithMe','replies','delete','/universer-api/user/list','format','code','createTimestamp','solved','parse','_threadCommentDataSource','setConfig','Solved','COMMENT','user','Unknown','UNIVER_UNKNOWN','Edit','/reply','/edit','root','4422450BhOvuV','replyId','117sMYJEs','1050ETFdIG','_httpService','/delete','customRanges','/add','getUnit','YYYY/MM/DD\x20HH:mm','_initUserSync','subscribe','deleteComment','content','userID','personId','slice','Add','52956eDdONb','unitId','Delete','map','UNRECOGNIZED','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','filter','stringify','rangeType','Solve','getCurrentUser','5423hvOOsX','commentUpdate$','pluginName','body','932768lvYkJB','_commentService','onStarting','forEach','_initDataSource','syncUpdateMutationToColla','defineProperty','207064jGFRJb','error','userId','dataSource','post','type'];_0x10e6=function(){return _0x1b2877;};return _0x10e6();}$(g,_0x51d6ee(0x77),W),$(g,_0x51d6ee(0x85),_0x1f9c28[_0x51d6ee(0xb8)]),g=ie([_0x52b2c3(_0x23dfb8,_0x46428b,_0x2d9af7),N(0x1,_0x454f13(_0x5ce71f)),N(0x2,_0x6a194c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5bf11d=_0x5c98;(function(_0x2e1a9f,_0x30be59){const _0x36f4ce=_0x5c98,_0x340a84=_0x2e1a9f();while(!![]){try{const _0x4b898f=parseInt(_0x36f4ce(0xdd))/0x1+-parseInt(_0x36f4ce(0xf1))/0x2*(-parseInt(_0x36f4ce(0xd6))/0x3)+parseInt(_0x36f4ce(0xe3))/0x4+-parseInt(_0x36f4ce(0xdb))/0x5*(-parseInt(_0x36f4ce(0xd0))/0x6)+-parseInt(_0x36f4ce(0xc9))/0x7*(parseInt(_0x36f4ce(0xf6))/0x8)+parseInt(_0x36f4ce(0xaf))/0x9*(-parseInt(_0x36f4ce(0xa7))/0xa)+parseInt(_0x36f4ce(0xe1))/0xb;if(_0x4b898f===_0x30be59)break;else _0x340a84['push'](_0x340a84['shift']());}catch(_0x326e6d){_0x340a84['push'](_0x340a84['shift']());}}}(_0x13a5,0x32c10));import{CommentService as _0x3e033d,CollaborationSessionService as _0x55d10c,UniverCollaborationClientPlugin as _0x42a23e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2436a8}from'@univerjs-pro/license';import{dayjs as _0x406095,UserManagerService as _0x370dc1,Inject as _0x139489,Injector as _0x353baa,Disposable as _0x3ad743,CustomRangeType as _0x2abdd2,UniverInstanceType as _0xae0343,DependentOn as _0x13c419,IConfigService as _0x33ac58,Plugin as _0x57b30b,merge as _0x1ae59a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x134544}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfaeaef,IThreadCommentDataSourceService as _0x31dc00}from'@univerjs/thread-comment';import{bufferTime as _0x1b3cbd}from'rxjs';import{HTTPService as _0x4acda9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa5a42e=>(_0xa5a42e[_0xa5a42e[_0x5bf11d(0xda)]=0x0]='OpenOrReOpen',_0xa5a42e[_0xa5a42e[_0x5bf11d(0xa9)]=0x1]=_0x5bf11d(0xa9),_0xa5a42e[_0xa5a42e[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0xa5a42e))(I||{}),v=(_0x465061=>(_0x465061[_0x465061[_0x5bf11d(0xd1)]=0x0]=_0x5bf11d(0xd1),_0x465061[_0x465061['Add']=0x1]=_0x5bf11d(0xb0),_0x465061[_0x465061[_0x5bf11d(0xe0)]=0x2]=_0x5bf11d(0xe0),_0x465061[_0x465061[_0x5bf11d(0xae)]=0x3]='Edit',_0x465061[_0x465061[_0x5bf11d(0xbe)]=0x4]='Delete',_0x465061[_0x465061[_0x5bf11d(0xac)]=0x5]='Solve',_0x465061[_0x465061[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0x465061))(v||{});const y=_0x354b69=>_0x406095(new Date(+_0x354b69))[_0x5bf11d(0xe4)](_0x5bf11d(0xf3)),B=async(_0x59c066,_0x265859)=>{const _0x23d640=_0x5bf11d,_0x7cf6a3=_0x59c066[_0x23d640(0xc0)](_0x370dc1),_0xe02f44=_0x59c066[_0x23d640(0xc0)](_0x4acda9);_0x265859[_0x23d640(0xe5)](_0x45aff2=>{const _0x4ffe44=_0x23d640;_0x7cf6a3[_0x4ffe44(0xf7)](_0x45aff2)&&_0x265859[_0x4ffe44(0xdc)](_0x45aff2);}),_0x265859[_0x23d640(0xb6)]&&(await _0xe02f44['get'](_0x23d640(0xb5),{'params':{'userIDs':[..._0x265859]}}))['body'][_0x23d640(0xde)][_0x23d640(0xe5)](_0x3653d2=>{const _0x518695=_0x23d640;_0x3653d2&&_0x7cf6a3[_0x518695(0xc1)](_0x3653d2);});};var K=Object[_0x5bf11d(0xe6)],V=(_0x3bfb34,_0x36803c,_0x2f7419,_0x352174)=>{const _0x28378b=_0x5bf11d;for(var _0x291a75=_0x352174>0x1?void 0x0:_0x352174?K(_0x36803c,_0x2f7419):_0x36803c,_0x23c6c2=_0x3bfb34[_0x28378b(0xc8)]-0x1,_0x3de3bf;_0x23c6c2>=0x0;_0x23c6c2--)(_0x3de3bf=_0x3bfb34[_0x23c6c2])&&(_0x291a75=_0x3de3bf(_0x291a75)||_0x291a75);return _0x291a75;},p=(_0xdb68c,_0x55b200)=>(_0x16f280,_0x1a89d0)=>_0x55b200(_0x16f280,_0x1a89d0,_0xdb68c);let _=class extends _0x3ad743{constructor(_0x4567e3,_0x1cb9ac,_0xc9fcd0,_0x58aecc){const _0x1c15ef=_0x5bf11d;super(),this['_commentService']=_0x4567e3,this[_0x1c15ef(0xba)]=_0x1cb9ac,this['_userService']=_0xc9fcd0,this[_0x1c15ef(0xb7)]=_0x58aecc,this[_0x1c15ef(0xfb)](),this[_0x1c15ef(0xa8)]();}[_0x5bf11d(0xa8)](){const _0x234f5a=_0x5bf11d;this[_0x234f5a(0xe8)](this[_0x234f5a(0xba)][_0x234f5a(0xc3)][_0x234f5a(0x102)](_0x1b3cbd(0x10))[_0x234f5a(0xd7)](_0x4923b1=>{const _0x2026f8=_0x234f5a,_0xf55b68=new Set();_0x4923b1[_0x2026f8(0xe5)](_0x319820=>{const _0x1055b7=_0x2026f8;switch(_0x319820[_0x1055b7(0xcd)]){case _0x1055b7(0xce):{const _0x1e1ce4=_0x319820[_0x1055b7(0xdf)][_0x1055b7(0xef)];_0xf55b68[_0x1055b7(0xce)](_0x1e1ce4);break;}}}),B(this[_0x2026f8(0xb7)],_0xf55b68);}));}[_0x5bf11d(0xfb)](){const _0x3c0edb=_0x5bf11d;this['disposeWithMe'](this[_0x3c0edb(0xfe)][_0x3c0edb(0xc3)][_0x3c0edb(0xd7)](async _0x4027c4=>{const _0x2beaf9=_0x3c0edb;var _0x38148c,_0x5e62cb,_0x2e3854,_0x45f066;const _0x346856=(_0x38148c=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x22cdba=>_0x22cdba['threadId']===_0x4027c4['threadId']))==null?void 0x0:_0x38148c[_0x2beaf9(0xcf)];if(!_0x346856)return;const {unitId:_0x37c898,subUnitId:_0x2f743d}=_0x346856;switch(_0x4027c4[_0x2beaf9(0xea)]&&this[_0x2beaf9(0xf4)][_0x2beaf9(0xc1)](_0x4027c4[_0x2beaf9(0xea)]),_0x4027c4[_0x2beaf9(0xcd)]){case v[_0x2beaf9(0xb0)]:break;case v['Reply']:{this[_0x2beaf9(0xba)][_0x2beaf9(0xf9)](_0x37c898,_0x2f743d,{'unitId':_0x37c898,'subUnitId':_0x2f743d,'ref':'','id':_0x4027c4[_0x2beaf9(0x108)],'dT':y(+_0x4027c4[_0x2beaf9(0xf2)]),'threadId':_0x4027c4[_0x2beaf9(0x10b)],'personId':(_0x2e3854=(_0x5e62cb=_0x4027c4['user'])==null?void 0x0:_0x5e62cb[_0x2beaf9(0xbb)])!=null?_0x2e3854:_0x4027c4[_0x2beaf9(0xeb)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4['content']),'parentId':_0x346856['id']});break;}case v[_0x2beaf9(0xbe)]:{const _0x38620f=this['_threadCommentModel']['getComment'](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);_0x38620f&&_0x38620f['parentId']&&this[_0x2beaf9(0xba)][_0x2beaf9(0xa5)](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);break;}case v[_0x2beaf9(0xae)]:{this[_0x2beaf9(0xba)][_0x2beaf9(0x109)](_0x37c898,_0x2f743d,{'commentId':_0x4027c4[_0x2beaf9(0x108)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4[_0x2beaf9(0x100)])});break;}case v[_0x2beaf9(0xac)]:{const _0x1317ca=(_0x45f066=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x5732d5=>_0x5732d5[_0x2beaf9(0x10b)]===_0x4027c4[_0x2beaf9(0x10b)]))==null?void 0x0:_0x45f066[_0x2beaf9(0xcf)];_0x1317ca&&this[_0x2beaf9(0xba)][_0x2beaf9(0xca)](_0x37c898,_0x2f743d,_0x1317ca['id'],_0x4027c4[_0x2beaf9(0xe7)]===I[_0x2beaf9(0xa9)]);break;}}}));}};_=V([p(0x0,_0x139489(_0x3e033d)),p(0x1,_0x139489(_0xfaeaef)),p(0x2,_0x139489(_0x370dc1)),p(0x3,_0x139489(_0x353baa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5bf11d(0xe6)],Q=(_0x24661e,_0x4297bf,_0x3af404,_0x1dbed9)=>{const _0x176d9b=_0x5bf11d;for(var _0x128f88=_0x1dbed9>0x1?void 0x0:_0x1dbed9?k(_0x4297bf,_0x3af404):_0x4297bf,_0x585f99=_0x24661e[_0x176d9b(0xc8)]-0x1,_0x3ab8c4;_0x585f99>=0x0;_0x585f99--)(_0x3ab8c4=_0x24661e[_0x585f99])&&(_0x128f88=_0x3ab8c4(_0x128f88)||_0x128f88);return _0x128f88;},b=(_0x1428f6,_0x598794)=>(_0x5b2621,_0x55982e)=>_0x598794(_0x5b2621,_0x55982e,_0x1428f6);function X(_0x73df2,_0x1e4ea3){const _0xb53790=_0x5bf11d,_0x28a9e0=_0x73df2[_0xb53790(0xcb)][0x0];return{..._0x1e4ea3,'id':_0x28a9e0[_0xb53790(0x108)],'resolved':_0x73df2[_0xb53790(0xe7)]===0x1,'dT':y(_0x28a9e0[_0xb53790(0xf2)]),'personId':_0x28a9e0[_0xb53790(0xeb)],'threadId':_0x28a9e0['threadId']};}function ee(_0x105610,_0x5e8c31,_0x141a18){const _0x56050c=_0x5bf11d;var _0x50f0ef,_0xdcf5d9;if(((_0xdcf5d9=(_0x50f0ef=_0x105610==null?void 0x0:_0x105610[_0x56050c(0xcb)])==null?void 0x0:_0x50f0ef[_0x56050c(0xc8)])!=null?_0xdcf5d9:0x0)>0x0){const _0x10d295=(_0xc7e1b7,_0x26cf67)=>({'id':_0xc7e1b7[_0x56050c(0x108)],'threadId':_0xc7e1b7['threadId'],'dT':y(_0xc7e1b7[_0x56050c(0xf2)]),'personId':_0xc7e1b7[_0x56050c(0xeb)],'resolved':_0x105610[_0x56050c(0xe7)]===I[_0x56050c(0xa9)],'unitId':_0x5e8c31,'subUnitId':_0x141a18,'text':JSON[_0x56050c(0x103)](_0xc7e1b7[_0x56050c(0x100)]),'parentId':_0x26cf67}),_0x3da65e=_0x10d295(_0x105610['replies'][0x0]);return{..._0x3da65e,'children':_0x105610[_0x56050c(0xcb)][_0x56050c(0xad)](0x1)[_0x56050c(0x106)](_0x5ec665=>_0x10d295(_0x5ec665,_0x3da65e['id']))};}return null;}let S=class{constructor(_0x1839ec,_0x13413f,_0x338f6b){const _0x53ee56=_0x5bf11d;this[_0x53ee56(0xd5)]=_0x1839ec,this[_0x53ee56(0xf4)]=_0x13413f,this[_0x53ee56(0xfd)]=_0x338f6b;}async[_0x5bf11d(0xf9)](_0x45270a){const _0x3f0d07=_0x5bf11d;var _0x2e3882,_0xbf5c4a;const {parentId:_0x2be2b5,unitId:_0x146327,text:_0x49f1df,threadId:_0x11d063}=_0x45270a,_0x444d32=(_0xbf5c4a=(_0x2e3882=_0x49f1df[_0x3f0d07(0xec)])==null?void 0x0:_0x2e3882['filter'](_0x52638a=>_0x52638a[_0x3f0d07(0xb3)]===_0x2abdd2[_0x3f0d07(0xfa)])[_0x3f0d07(0x106)](_0x576472=>_0x576472[_0x3f0d07(0xc2)]))!=null?_0xbf5c4a:[],_0x4fa583=JSON[_0x3f0d07(0xbf)](_0x49f1df),_0xefe1cf=(await this[_0x3f0d07(0xfd)]['requireSession'](_0x146327))['getMemberID']();if(_0x2be2b5){const _0x5b81d6={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32,'threadId':_0x11d063},_0x35f7b8=(await this['_httpService']['post'](_0x3f0d07(0xb2)+_0x146327+_0x3f0d07(0xe9),{'body':_0x5b81d6}))[_0x3f0d07(0x104)][_0x3f0d07(0xee)];return{..._0x45270a,'id':_0x35f7b8[_0x3f0d07(0x108)],'dT':_0x406095(+_0x35f7b8[_0x3f0d07(0xf2)])[_0x3f0d07(0xe4)](_0x3f0d07(0xf3)),'personId':_0x35f7b8[_0x3f0d07(0xeb)]};}else{const _0x3a702d={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32},_0x5ccff7=await this[_0x3f0d07(0xd5)]['post']('/universer-api/comment/unit/'+_0x146327+_0x3f0d07(0xc5),{'body':_0x3a702d});return X(_0x5ccff7[_0x3f0d07(0x104)][_0x3f0d07(0xfc)],_0x45270a);}}async[_0x5bf11d(0x109)](_0x1ad167){const _0x442f2f=_0x5bf11d;var _0x5ab67b,_0x11ed83;const {text:_0x51b466,unitId:_0x5ec047}=_0x1ad167,_0x575b41=(_0x11ed83=(_0x5ab67b=_0x51b466['customRanges'])==null?void 0x0:_0x5ab67b['filter'](_0x56a241=>_0x56a241['rangeType']===_0x2abdd2[_0x442f2f(0xfa)])[_0x442f2f(0x106)](_0x506958=>_0x506958['rangeId']))!=null?_0x11ed83:[],_0x320c1c=JSON[_0x442f2f(0xbf)](_0x51b466),_0x4c66e7=_0x1ad167[_0x442f2f(0x10b)],_0x19170e=_0x1ad167['id'],_0xa7bd21={'memberId':(await this[_0x442f2f(0xfd)][_0x442f2f(0xa6)](_0x5ec047))['getMemberID'](),'unitId':_0x5ec047,'threadId':_0x4c66e7,'mention':_0x575b41,'content':_0x320c1c,'replyId':_0x19170e},_0x40277b=await this[_0x442f2f(0xd5)][_0x442f2f(0xd3)](_0x442f2f(0xb2)+_0x5ec047+_0x442f2f(0xe2),{'body':_0xa7bd21});return!_0x40277b[_0x442f2f(0x104)]['error']||_0x40277b[_0x442f2f(0x104)][_0x442f2f(0x107)]['code']===0x1;}async[_0x5bf11d(0xca)](_0x4a2da7){const _0x317f0c=_0x5bf11d,{unitId:_0x316b80}=_0x4a2da7,_0xcff4a8=_0x4a2da7['threadId'],_0x41c37d={'memberId':this['_userService']['getCurrentUser']()[_0x317f0c(0xbb)],'unitId':_0x316b80,'threadId':_0xcff4a8,'solved':_0x4a2da7[_0x317f0c(0xd2)]?I['Solved']:I['OpenOrReOpen']},_0x17dcc6=await this[_0x317f0c(0xd5)][_0x317f0c(0xd3)]('/universer-api/comment/unit/'+_0x316b80+'/solved',{'body':_0x41c37d});return!_0x17dcc6['body'][_0x317f0c(0x107)]||_0x17dcc6[_0x317f0c(0x104)]['error']['code']===0x1;}async[_0x5bf11d(0xa5)](_0x1669fd,_0xdf954d,_0x21fcd4,_0x40cc3e){const _0x2d7b44=_0x5bf11d,_0x145fcb={'memberId':(await this['_sessionService'][_0x2d7b44(0xa6)](_0x1669fd))[_0x2d7b44(0xd4)](),'threadId':_0x21fcd4,'replyId':_0x40cc3e,'unitId':_0x1669fd},_0x2c31f8=await this[_0x2d7b44(0xd5)][_0x2d7b44(0xd3)](_0x2d7b44(0xb2)+_0x1669fd+'/delete',{'body':_0x145fcb});return!_0x2c31f8['body'][_0x2d7b44(0x107)]||_0x2c31f8[_0x2d7b44(0x104)][_0x2d7b44(0x107)]['code']===0x1;}async[_0x5bf11d(0xb1)](_0x4086fa,_0x236b49,_0x56d668){const _0x443b4b=_0x5bf11d,_0x216b2a={'unitId':_0x4086fa,'threadId':_0x56d668},_0x25a709=await this[_0x443b4b(0xd5)][_0x443b4b(0xd3)](_0x443b4b(0xb2)+_0x4086fa+'/list',{'body':_0x216b2a}),_0x8721ad=_0x56d668[_0x443b4b(0x106)](_0x371ab5=>ee(_0x25a709['body'][_0x443b4b(0x105)][_0x371ab5],_0x4086fa,_0x236b49))[_0x443b4b(0xf5)](Boolean);return Object[_0x443b4b(0xbc)](_0x25a709['body'][_0x443b4b(0xde)])[_0x443b4b(0xe5)](_0x287315=>{const _0x4e7811=_0x443b4b;this[_0x4e7811(0xf4)]['addUser'](_0x287315);}),_0x8721ad;}[_0x5bf11d(0xd9)](_0x38d009){const _0x17c816=_0x5bf11d;return{'id':_0x38d009['id'],'threadId':_0x38d009[_0x17c816(0x10b)],'ref':_0x38d009[_0x17c816(0xbd)]};}};S=Q([b(0x0,_0x139489(_0x4acda9)),b(0x1,_0x139489(_0x370dc1)),b(0x2,_0x139489(_0x55d10c))],S);var re=Object[_0x5bf11d(0xe6)],te=(_0x281ea2,_0x17e6ed,_0x2f813a,_0xcdad0e)=>{const _0x22c2a4=_0x5bf11d;for(var _0x3a9061=_0xcdad0e>0x1?void 0x0:_0xcdad0e?re(_0x17e6ed,_0x2f813a):_0x17e6ed,_0x4ee619=_0x281ea2[_0x22c2a4(0xc8)]-0x1,_0x38f483;_0x4ee619>=0x0;_0x4ee619--)(_0x38f483=_0x281ea2[_0x4ee619])&&(_0x3a9061=_0x38f483(_0x3a9061)||_0x3a9061);return _0x3a9061;},M=(_0x58a15e,_0x5dfceb)=>(_0x48230e,_0x221d62)=>_0x5dfceb(_0x48230e,_0x221d62,_0x58a15e);let f=class extends _0x3ad743{constructor(_0x1e1287,_0x333ecf){const _0x5a4e20=_0x5bf11d;super(),this[_0x5a4e20(0x10a)]=_0x1e1287,this['_threadCommentDataSource']=_0x333ecf,this[_0x5a4e20(0xcc)]();}[_0x5bf11d(0xcc)](){const _0xbbc3e4=_0x5bf11d;this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xc7)]=this[_0xbbc3e4(0xa4)],this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xed)]=!0x1;}};f=te([M(0x0,_0x31dc00),M(0x1,_0x139489(S))],f);var se=Object[_0x5bf11d(0xb9)],oe=Object[_0x5bf11d(0xe6)],ne=(_0x3b2842,_0x47248f,_0x1fbeae)=>_0x47248f in _0x3b2842?se(_0x3b2842,_0x47248f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fbeae}):_0x3b2842[_0x47248f]=_0x1fbeae,ie=(_0x3f7c99,_0x18db66,_0x3834f1,_0x49e30c)=>{const _0x416ee1=_0x5bf11d;for(var _0x2b7297=_0x49e30c>0x1?void 0x0:_0x49e30c?oe(_0x18db66,_0x3834f1):_0x18db66,_0x1b7f42=_0x3f7c99[_0x416ee1(0xc8)]-0x1,_0x44c4fc;_0x1b7f42>=0x0;_0x1b7f42--)(_0x44c4fc=_0x3f7c99[_0x1b7f42])&&(_0x2b7297=_0x44c4fc(_0x2b7297)||_0x2b7297);return _0x2b7297;},N=(_0x22ed37,_0x390191)=>(_0x505d01,_0x4a07e5)=>_0x390191(_0x505d01,_0x4a07e5,_0x22ed37),$=(_0x190ed5,_0x4585cc,_0x6972f6)=>ne(_0x190ed5,typeof _0x4585cc!='symbol'?_0x4585cc+'':_0x4585cc,_0x6972f6);let g=class extends _0x57b30b{constructor(_0x3f4ee8=O,_0xc21555,_0x2f17ad){const _0xf7f1b4=_0x5bf11d;super(),this[_0xf7f1b4(0xd8)]=_0x3f4ee8,this[_0xf7f1b4(0xb7)]=_0xc21555,this[_0xf7f1b4(0xab)]=_0x2f17ad;const {..._0x5aa886}=_0x1ae59a({},O,this[_0xf7f1b4(0xd8)]);this[_0xf7f1b4(0xab)][_0xf7f1b4(0xaa)](z,_0x5aa886);}[_0x5bf11d(0xb8)](){[[S],[f],[_]]['forEach'](_0x152f8a=>{this['_injector']['add'](_0x152f8a);});}[_0x5bf11d(0xff)](){const _0x11a33f=_0x5bf11d;this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](f),this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](_);}};$(g,_0x5bf11d(0xf0),W),$(g,_0x5bf11d(0xcd),_0xae0343[_0x5bf11d(0xf8)]),g=ie([_0x13c419(_0x134544,_0x42a23e,_0x2436a8),N(0x1,_0x139489(_0x353baa)),N(0x2,_0x33ac58)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5c98(_0x37660f,_0x46c7d4){const _0x13a5fa=_0x13a5();return _0x5c98=function(_0x5c9884,_0x508eff){_0x5c9884=_0x5c9884-0xa4;let _0x14dfa3=_0x13a5fa[_0x5c9884];return _0x14dfa3;},_0x5c98(_0x37660f,_0x46c7d4);}function _0x13a5(){const _0x4599c3=['_configService','Solve','slice','Edit','1722834Aelhmc','Add','listComments','/universer-api/comment/unit/','rangeType','getUnit','/universer-api/user/list','size','_injector','onStarting','defineProperty','_threadCommentModel','userID','values','ref','Delete','stringify','get','addUser','rangeId','commentUpdate$','unitId','/add','UNRECOGNIZED','dataSource','length','1081276IdqyQq','resolveComment','replies','_initDataSource','type','add','root','6Unnzsy','Unknown','resolved','post','getMemberID','_httpService','3uAqxVm','subscribe','_config','saveCommentToSnapshot','OpenOrReOpen','671095ProWqz','delete','83216OEcflq','users','payload','Reply','1039830BowSAD','/edit','728104pWlPOg','format','forEach','getOwnPropertyDescriptor','solved','disposeWithMe','/reply','user','userId','customRanges','syncUpdateMutationToColla','reply','personId','pluginName','428518XmUQtY','createTimestamp','YYYY/MM/DD\x20HH:mm','_userService','filter','16IYopTa','getUser','UNIVER_UNKNOWN','addComment','COMMENT','_init','comment','_sessionService','_commentService','onReady','content','find','pipe','parse','body','comments','map','error','replyId','updateComment','_threadCommentDataSourceService','threadId','_threadCommentDataSource','deleteComment','requireSession','10KkPTVV','_initUserSync','Solved','setConfig'];_0x13a5=function(){return _0x4599c3;};return _0x13a5();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x51d6ee=_0xcce0;(function(_0x20a5b8,_0xe2fa2a){const _0x4aa656=_0xcce0,_0x51e3f4=_0x20a5b8();while(!![]){try{const _0x575fa8=parseInt(_0x4aa656(0x9b))/0x1*(parseInt(_0x4aa656(0x80))/0x2)+-parseInt(_0x4aa656(0xbd))/0x3+-parseInt(_0x4aa656(0x79))/0x4+-parseInt(_0x4aa656(0xc0))/0x5*(parseInt(_0x4aa656(0x68))/0x6)+parseInt(_0x4aa656(0x8c))/0x7+parseInt(_0x4aa656(0xa1))/0x8*(parseInt(_0x4aa656(0xbf))/0x9)+parseInt(_0x4aa656(0x92))/0xa*(parseInt(_0x4aa656(0x75))/0xb);if(_0x575fa8===_0xe2fa2a)break;else _0x51e3f4['push'](_0x51e3f4['shift']());}catch(_0xf92ea9){_0x51e3f4['push'](_0x51e3f4['shift']());}}}(_0x10e6,0xe4408));import{CommentService as _0x3e89ca,CollaborationSessionService as _0x434488,UniverCollaborationClientPlugin as _0x46428b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d9af7}from'@univerjs-pro/license';import{dayjs as _0x20fc5c,UserManagerService as _0x222ae4,Inject as _0x454f13,Injector as _0x5ce71f,Disposable as _0x1acb77,CustomRangeType as _0x3274b3,UniverInstanceType as _0x1f9c28,DependentOn as _0x52b2c3,IConfigService as _0x6a194c,Plugin as _0x59eae2,merge as _0x1c6e7b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23dfb8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x81c630,IThreadCommentDataSourceService as _0xb1d392}from'@univerjs/thread-comment';import{bufferTime as _0x52c83e}from'rxjs';import{HTTPService as _0x1768e5}from'@univerjs/network';const W=_0x51d6ee(0x6e);var I=(_0x2e10d6=>(_0x2e10d6[_0x2e10d6[_0x51d6ee(0x88)]=0x0]=_0x51d6ee(0x88),_0x2e10d6[_0x2e10d6[_0x51d6ee(0xb4)]=0x1]=_0x51d6ee(0xb4),_0x2e10d6[_0x2e10d6['UNRECOGNIZED']=-0x1]=_0x51d6ee(0x6c),_0x2e10d6))(I||{}),v=(_0x49ae95=>(_0x49ae95[_0x49ae95['Unknown']=0x0]=_0x51d6ee(0xb7),_0x49ae95[_0x49ae95[_0x51d6ee(0x67)]=0x1]=_0x51d6ee(0x67),_0x49ae95[_0x49ae95['Reply']=0x2]=_0x51d6ee(0x93),_0x49ae95[_0x49ae95[_0x51d6ee(0xb9)]=0x3]=_0x51d6ee(0xb9),_0x49ae95[_0x49ae95[_0x51d6ee(0x6a)]=0x4]=_0x51d6ee(0x6a),_0x49ae95[_0x49ae95['Solve']=0x5]=_0x51d6ee(0x73),_0x49ae95[_0x49ae95[_0x51d6ee(0x6c)]=-0x1]=_0x51d6ee(0x6c),_0x49ae95))(v||{});const y=_0x31d5d0=>_0x20fc5c(new Date(+_0x31d5d0))[_0x51d6ee(0xad)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x171eb3,_0x2f9404)=>{const _0x4cca58=_0x51d6ee,_0x217328=_0x171eb3[_0x4cca58(0x9f)](_0x222ae4),_0x92237a=_0x171eb3['get'](_0x1768e5);_0x2f9404[_0x4cca58(0x7c)](_0x3c7726=>{const _0x38b01a=_0x4cca58;_0x217328['getUser'](_0x3c7726)&&_0x2f9404[_0x38b01a(0xab)](_0x3c7726);}),_0x2f9404[_0x4cca58(0xa4)]&&(await _0x92237a['get'](_0x4cca58(0xac),{'params':{'userIDs':[..._0x2f9404]}}))[_0x4cca58(0x78)]['users']['forEach'](_0x46046d=>{const _0x5e6baf=_0x4cca58;_0x46046d&&_0x217328[_0x5e6baf(0x8d)](_0x46046d);});};var K=Object[_0x51d6ee(0xa8)],V=(_0x5e6ed8,_0x3d5a66,_0xffa6e3,_0x325f25)=>{const _0x2b44d3=_0x51d6ee;for(var _0x26bc4a=_0x325f25>0x1?void 0x0:_0x325f25?K(_0x3d5a66,_0xffa6e3):_0x3d5a66,_0x418897=_0x5e6ed8[_0x2b44d3(0x94)]-0x1,_0x4d7aff;_0x418897>=0x0;_0x418897--)(_0x4d7aff=_0x5e6ed8[_0x418897])&&(_0x26bc4a=_0x4d7aff(_0x26bc4a)||_0x26bc4a);return _0x26bc4a;},p=(_0x418894,_0x38ab13)=>(_0x3c2bd5,_0x1596e0)=>_0x38ab13(_0x3c2bd5,_0x1596e0,_0x418894);let _=class extends _0x1acb77{constructor(_0x54bf5e,_0xe39f26,_0x3708ba,_0x324723){const _0x378f0f=_0x51d6ee;super(),this['_commentService']=_0x54bf5e,this[_0x378f0f(0xa3)]=_0xe39f26,this[_0x378f0f(0x9c)]=_0x3708ba,this[_0x378f0f(0x6d)]=_0x324723,this[_0x378f0f(0x87)](),this[_0x378f0f(0xc7)]();}[_0x51d6ee(0xc7)](){const _0x32d170=_0x51d6ee;this[_0x32d170(0xa9)](this['_threadCommentModel'][_0x32d170(0x76)][_0x32d170(0x96)](_0x52c83e(0x10))[_0x32d170(0xc8)](_0x4a8ab0=>{const _0x50ed0d=_0x32d170,_0x2265a0=new Set();_0x4a8ab0[_0x50ed0d(0x7c)](_0x186f8f=>{const _0xe4fa42=_0x50ed0d;switch(_0x186f8f[_0xe4fa42(0x85)]){case _0xe4fa42(0xa5):{const _0x55dac0=_0x186f8f[_0xe4fa42(0x9e)][_0xe4fa42(0x65)];_0x2265a0[_0xe4fa42(0xa5)](_0x55dac0);break;}}}),B(this[_0x50ed0d(0x6d)],_0x2265a0);}));}[_0x51d6ee(0x87)](){const _0x373076=_0x51d6ee;this[_0x373076(0xa9)](this[_0x373076(0x7a)][_0x373076(0x76)][_0x373076(0xc8)](async _0x7a7fd1=>{const _0x16346e=_0x373076;var _0x5636be,_0xeca34d,_0x549415,_0x2bd0b1;const _0x304ce5=(_0x5636be=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x1c922e=>_0x1c922e[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x5636be[_0x16346e(0xbc)];if(!_0x304ce5)return;const {unitId:_0x566330,subUnitId:_0x26068a}=_0x304ce5;switch(_0x7a7fd1[_0x16346e(0xb6)]&&this[_0x16346e(0x9c)]['addUser'](_0x7a7fd1[_0x16346e(0xb6)]),_0x7a7fd1['type']){case v['Add']:break;case v[_0x16346e(0x93)]:{this['_threadCommentModel']['addComment'](_0x566330,_0x26068a,{'unitId':_0x566330,'subUnitId':_0x26068a,'ref':'','id':_0x7a7fd1[_0x16346e(0xbe)],'dT':y(+_0x7a7fd1['createTimestamp']),'threadId':_0x7a7fd1['threadId'],'personId':(_0x549415=(_0xeca34d=_0x7a7fd1['user'])==null?void 0x0:_0xeca34d[_0x16346e(0xcb)])!=null?_0x549415:_0x7a7fd1['userId'],'text':JSON['parse'](_0x7a7fd1[_0x16346e(0xca)]),'parentId':_0x304ce5['id']});break;}case v[_0x16346e(0x6a)]:{const _0x3255e8=this[_0x16346e(0xa3)]['getComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);_0x3255e8&&_0x3255e8['parentId']&&this[_0x16346e(0xa3)]['deleteComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);break;}case v[_0x16346e(0xb9)]:{this[_0x16346e(0xa3)][_0x16346e(0x91)](_0x566330,_0x26068a,{'commentId':_0x7a7fd1[_0x16346e(0xbe)],'text':JSON[_0x16346e(0xb1)](_0x7a7fd1[_0x16346e(0xca)])});break;}case v[_0x16346e(0x73)]:{const _0x258002=(_0x2bd0b1=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x168ada=>_0x168ada[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x2bd0b1['root'];_0x258002&&this[_0x16346e(0xa3)]['resolveComment'](_0x566330,_0x26068a,_0x258002['id'],_0x7a7fd1[_0x16346e(0xb0)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x454f13(_0x3e89ca)),p(0x1,_0x454f13(_0x81c630)),p(0x2,_0x454f13(_0x222ae4)),p(0x3,_0x454f13(_0x5ce71f))],_);const z=_0x51d6ee(0x8f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x469a54,_0x157df9,_0x1706c7,_0x57b21f)=>{for(var _0x3a01e3=_0x57b21f>0x1?void 0x0:_0x57b21f?k(_0x157df9,_0x1706c7):_0x157df9,_0x3fb191=_0x469a54['length']-0x1,_0x411d4a;_0x3fb191>=0x0;_0x3fb191--)(_0x411d4a=_0x469a54[_0x3fb191])&&(_0x3a01e3=_0x411d4a(_0x3a01e3)||_0x3a01e3);return _0x3a01e3;},b=(_0x174a3e,_0xb50247)=>(_0x5d21c5,_0x212e44)=>_0xb50247(_0x5d21c5,_0x212e44,_0x174a3e);function X(_0x1b441d,_0x247add){const _0x11bb1d=_0x51d6ee,_0x70da45=_0x1b441d[_0x11bb1d(0xaa)][0x0];return{..._0x247add,'id':_0x70da45[_0x11bb1d(0xbe)],'resolved':_0x1b441d[_0x11bb1d(0xb0)]===0x1,'dT':y(_0x70da45[_0x11bb1d(0xaf)]),'personId':_0x70da45[_0x11bb1d(0x82)],'threadId':_0x70da45[_0x11bb1d(0x86)]};}function ee(_0x29e18b,_0x528ef4,_0x389ddf){const _0x419b03=_0x51d6ee;var _0x29f614,_0x514c9a;if(((_0x514c9a=(_0x29f614=_0x29e18b==null?void 0x0:_0x29e18b[_0x419b03(0xaa)])==null?void 0x0:_0x29f614['length'])!=null?_0x514c9a:0x0)>0x0){const _0x29575c=(_0x21be44,_0x1d1e4f)=>({'id':_0x21be44[_0x419b03(0xbe)],'threadId':_0x21be44['threadId'],'dT':y(_0x21be44[_0x419b03(0xaf)]),'personId':_0x21be44[_0x419b03(0x82)],'resolved':_0x29e18b[_0x419b03(0xb0)]===I[_0x419b03(0xb4)],'unitId':_0x528ef4,'subUnitId':_0x389ddf,'text':JSON[_0x419b03(0xb1)](_0x21be44[_0x419b03(0xca)]),'parentId':_0x1d1e4f}),_0x21c442=_0x29575c(_0x29e18b[_0x419b03(0xaa)][0x0]);return{..._0x21c442,'children':_0x29e18b[_0x419b03(0xaa)][_0x419b03(0x66)](0x1)[_0x419b03(0x6b)](_0x40e9bb=>_0x29575c(_0x40e9bb,_0x21c442['id']))};}return null;}let S=class{constructor(_0x25c12e,_0x5bc843,_0x49aa9c){const _0xcee460=_0x51d6ee;this[_0xcee460(0xc1)]=_0x25c12e,this[_0xcee460(0x9c)]=_0x5bc843,this[_0xcee460(0x98)]=_0x49aa9c;}async['addComment'](_0x1f5e6f){const _0x498202=_0x51d6ee;var _0x34e307,_0x3d50d1;const {parentId:_0x1a3138,unitId:_0x43b2de,text:_0x9dab7b,threadId:_0x2ec661}=_0x1f5e6f,_0x45002c=(_0x3d50d1=(_0x34e307=_0x9dab7b[_0x498202(0xc3)])==null?void 0x0:_0x34e307[_0x498202(0x70)](_0x2905df=>_0x2905df[_0x498202(0x72)]===_0x3274b3[_0x498202(0xb5)])[_0x498202(0x6b)](_0x44578b=>_0x44578b['rangeId']))!=null?_0x3d50d1:[],_0x2857ea=JSON['stringify'](_0x9dab7b),_0x58f953=(await this['_sessionService'][_0x498202(0x95)](_0x43b2de))[_0x498202(0xa7)]();if(_0x1a3138){const _0xe93156={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c,'threadId':_0x2ec661},_0x28970f=(await this[_0x498202(0xc1)][_0x498202(0x84)](_0x498202(0x99)+_0x43b2de+_0x498202(0xba),{'body':_0xe93156}))['body'][_0x498202(0x90)];return{..._0x1f5e6f,'id':_0x28970f[_0x498202(0xbe)],'dT':_0x20fc5c(+_0x28970f[_0x498202(0xaf)])[_0x498202(0xad)](_0x498202(0xc6)),'personId':_0x28970f[_0x498202(0x82)]};}else{const _0x1ce77e={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c},_0x38a993=await this[_0x498202(0xc1)]['post']('/universer-api/comment/unit/'+_0x43b2de+_0x498202(0xc4),{'body':_0x1ce77e});return X(_0x38a993[_0x498202(0x78)]['comment'],_0x1f5e6f);}}async[_0x51d6ee(0x91)](_0x7453f4){const _0x2d557e=_0x51d6ee;var _0x4a1b2f,_0x1fd33a;const {text:_0x44d91a,unitId:_0x754bc}=_0x7453f4,_0x594220=(_0x1fd33a=(_0x4a1b2f=_0x44d91a[_0x2d557e(0xc3)])==null?void 0x0:_0x4a1b2f[_0x2d557e(0x70)](_0xb8ef72=>_0xb8ef72[_0x2d557e(0x72)]===_0x3274b3[_0x2d557e(0xb5)])['map'](_0x2ea3bb=>_0x2ea3bb['rangeId']))!=null?_0x1fd33a:[],_0x49d97b=JSON[_0x2d557e(0x71)](_0x44d91a),_0x1b8223=_0x7453f4[_0x2d557e(0x86)],_0x15ea9c=_0x7453f4['id'],_0x46cda1={'memberId':(await this[_0x2d557e(0x98)][_0x2d557e(0x95)](_0x754bc))[_0x2d557e(0xa7)](),'unitId':_0x754bc,'threadId':_0x1b8223,'mention':_0x594220,'content':_0x49d97b,'replyId':_0x15ea9c},_0x115eab=await this[_0x2d557e(0xc1)][_0x2d557e(0x84)]('/universer-api/comment/unit/'+_0x754bc+_0x2d557e(0xbb),{'body':_0x46cda1});return!_0x115eab[_0x2d557e(0x78)][_0x2d557e(0x81)]||_0x115eab[_0x2d557e(0x78)]['error'][_0x2d557e(0xae)]===0x1;}async['resolveComment'](_0x27d98e){const _0x23936d=_0x51d6ee,{unitId:_0x37e78f}=_0x27d98e,_0x24b97a=_0x27d98e['threadId'],_0x4629f3={'memberId':this[_0x23936d(0x9c)][_0x23936d(0x74)]()['userID'],'unitId':_0x37e78f,'threadId':_0x24b97a,'solved':_0x27d98e['resolved']?I[_0x23936d(0xb4)]:I[_0x23936d(0x88)]},_0x1debd5=await this['_httpService'][_0x23936d(0x84)]('/universer-api/comment/unit/'+_0x37e78f+_0x23936d(0x9a),{'body':_0x4629f3});return!_0x1debd5[_0x23936d(0x78)][_0x23936d(0x81)]||_0x1debd5[_0x23936d(0x78)]['error'][_0x23936d(0xae)]===0x1;}async[_0x51d6ee(0xc9)](_0x24f79b,_0xc6744,_0x153112,_0x29470b){const _0x5889e3=_0x51d6ee,_0x3b0f08={'memberId':(await this[_0x5889e3(0x98)][_0x5889e3(0x95)](_0x24f79b))['getMemberID'](),'threadId':_0x153112,'replyId':_0x29470b,'unitId':_0x24f79b},_0x383d42=await this[_0x5889e3(0xc1)]['post'](_0x5889e3(0x99)+_0x24f79b+_0x5889e3(0xc2),{'body':_0x3b0f08});return!_0x383d42[_0x5889e3(0x78)][_0x5889e3(0x81)]||_0x383d42['body'][_0x5889e3(0x81)][_0x5889e3(0xae)]===0x1;}async['listComments'](_0x24cf93,_0x47cc6b,_0x452b88){const _0x40a582=_0x51d6ee,_0x33ac72={'unitId':_0x24cf93,'threadId':_0x452b88},_0x32452f=await this[_0x40a582(0xc1)][_0x40a582(0x84)](_0x40a582(0x99)+_0x24cf93+_0x40a582(0x97),{'body':_0x33ac72}),_0x262db5=_0x452b88['map'](_0x51659c=>ee(_0x32452f['body'][_0x40a582(0x8b)][_0x51659c],_0x24cf93,_0x47cc6b))[_0x40a582(0x70)](Boolean);return Object['values'](_0x32452f[_0x40a582(0x78)][_0x40a582(0xa2)])[_0x40a582(0x7c)](_0x549af6=>{const _0xb709ca=_0x40a582;this[_0xb709ca(0x9c)]['addUser'](_0x549af6);}),_0x262db5;}['saveCommentToSnapshot'](_0x12055d){const _0xca4d7=_0x51d6ee;return{'id':_0x12055d['id'],'threadId':_0x12055d[_0xca4d7(0x86)],'ref':_0x12055d[_0xca4d7(0xa0)]};}};S=Q([b(0x0,_0x454f13(_0x1768e5)),b(0x1,_0x454f13(_0x222ae4)),b(0x2,_0x454f13(_0x434488))],S);var re=Object[_0x51d6ee(0xa8)],te=(_0x444c2d,_0x2a310f,_0x574678,_0x10458e)=>{const _0x485f0c=_0x51d6ee;for(var _0x5b85ff=_0x10458e>0x1?void 0x0:_0x10458e?re(_0x2a310f,_0x574678):_0x2a310f,_0x3614c8=_0x444c2d[_0x485f0c(0x94)]-0x1,_0x228f12;_0x3614c8>=0x0;_0x3614c8--)(_0x228f12=_0x444c2d[_0x3614c8])&&(_0x5b85ff=_0x228f12(_0x5b85ff)||_0x5b85ff);return _0x5b85ff;},M=(_0x5a6d1c,_0x31fb4b)=>(_0x411238,_0x3a275d)=>_0x31fb4b(_0x411238,_0x3a275d,_0x5a6d1c);function _0xcce0(_0x412d16,_0x1b1663){const _0x10e650=_0x10e6();return _0xcce0=function(_0xcce061,_0x20e2e2){_0xcce061=_0xcce061-0x65;let _0x4d95b9=_0x10e650[_0xcce061];return _0x4d95b9;},_0xcce0(_0x412d16,_0x1b1663);}let f=class extends _0x1acb77{constructor(_0x570238,_0x471dcd){const _0x5b5ebf=_0x51d6ee;super(),this[_0x5b5ebf(0x8a)]=_0x570238,this['_threadCommentDataSource']=_0x471dcd,this[_0x5b5ebf(0x7d)]();}[_0x51d6ee(0x7d)](){const _0x8855a3=_0x51d6ee;this['_threadCommentDataSourceService'][_0x8855a3(0x83)]=this[_0x8855a3(0xb2)],this[_0x8855a3(0x8a)][_0x8855a3(0x7e)]=!0x1;}};f=te([M(0x0,_0xb1d392),M(0x1,_0x454f13(S))],f);var se=Object[_0x51d6ee(0x7f)],oe=Object[_0x51d6ee(0xa8)],ne=(_0x8d4074,_0x2d63bc,_0x5492cc)=>_0x2d63bc in _0x8d4074?se(_0x8d4074,_0x2d63bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5492cc}):_0x8d4074[_0x2d63bc]=_0x5492cc,ie=(_0x49a7da,_0x1e0110,_0x3e3bc7,_0x359a18)=>{const _0xa128bc=_0x51d6ee;for(var _0x1e5c5c=_0x359a18>0x1?void 0x0:_0x359a18?oe(_0x1e0110,_0x3e3bc7):_0x1e0110,_0x1b5327=_0x49a7da[_0xa128bc(0x94)]-0x1,_0x1e3882;_0x1b5327>=0x0;_0x1b5327--)(_0x1e3882=_0x49a7da[_0x1b5327])&&(_0x1e5c5c=_0x1e3882(_0x1e5c5c)||_0x1e5c5c);return _0x1e5c5c;},N=(_0x546c6b,_0x42889d)=>(_0x4b04f1,_0x1b502a)=>_0x42889d(_0x4b04f1,_0x1b502a,_0x546c6b),$=(_0xa96a01,_0x5af488,_0xcff0eb)=>ne(_0xa96a01,typeof _0x5af488!=_0x51d6ee(0x9d)?_0x5af488+'':_0x5af488,_0xcff0eb);let g=class extends _0x59eae2{constructor(_0x53936f=O,_0x459f58,_0x3ffa18){const _0x18d5f6=_0x51d6ee;super(),this[_0x18d5f6(0xa6)]=_0x53936f,this['_injector']=_0x459f58,this[_0x18d5f6(0x6f)]=_0x3ffa18;const {..._0x2d95be}=_0x1c6e7b({},O,this[_0x18d5f6(0xa6)]);this['_configService'][_0x18d5f6(0xb3)](z,_0x2d95be);}[_0x51d6ee(0x7b)](){const _0x23b729=_0x51d6ee;[[S],[f],[_]][_0x23b729(0x7c)](_0xc54ba4=>{const _0x90c1ea=_0x23b729;this[_0x90c1ea(0x6d)][_0x90c1ea(0xa5)](_0xc54ba4);});}[_0x51d6ee(0x8e)](){const _0x56ee66=_0x51d6ee;this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](f),this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](_);}};function _0x10e6(){const _0x1b2877=['threadId','_init','OpenOrReOpen','find','_threadCommentDataSourceService','comments','5814830wikXUt','addUser','onReady','thread-comment-data-source.config','reply','updateComment','66230GoAyvd','Reply','length','requireSession','pipe','/list','_sessionService','/universer-api/comment/unit/','/solved','3gTQMhO','_userService','symbol','payload','get','ref','54952nxEavL','users','_threadCommentModel','size','add','_config','getMemberID','getOwnPropertyDescriptor','disposeWithMe','replies','delete','/universer-api/user/list','format','code','createTimestamp','solved','parse','_threadCommentDataSource','setConfig','Solved','COMMENT','user','Unknown','UNIVER_UNKNOWN','Edit','/reply','/edit','root','4422450BhOvuV','replyId','117sMYJEs','1050ETFdIG','_httpService','/delete','customRanges','/add','getUnit','YYYY/MM/DD\x20HH:mm','_initUserSync','subscribe','deleteComment','content','userID','personId','slice','Add','52956eDdONb','unitId','Delete','map','UNRECOGNIZED','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','filter','stringify','rangeType','Solve','getCurrentUser','5423hvOOsX','commentUpdate$','pluginName','body','932768lvYkJB','_commentService','onStarting','forEach','_initDataSource','syncUpdateMutationToColla','defineProperty','207064jGFRJb','error','userId','dataSource','post','type'];_0x10e6=function(){return _0x1b2877;};return _0x10e6();}$(g,_0x51d6ee(0x77),W),$(g,_0x51d6ee(0x85),_0x1f9c28[_0x51d6ee(0xb8)]),g=ie([_0x52b2c3(_0x23dfb8,_0x46428b,_0x2d9af7),N(0x1,_0x454f13(_0x5ce71f)),N(0x2,_0x6a194c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5bf11d=_0x5c98;(function(_0x2e1a9f,_0x30be59){const _0x36f4ce=_0x5c98,_0x340a84=_0x2e1a9f();while(!![]){try{const _0x4b898f=parseInt(_0x36f4ce(0xdd))/0x1+-parseInt(_0x36f4ce(0xf1))/0x2*(-parseInt(_0x36f4ce(0xd6))/0x3)+parseInt(_0x36f4ce(0xe3))/0x4+-parseInt(_0x36f4ce(0xdb))/0x5*(-parseInt(_0x36f4ce(0xd0))/0x6)+-parseInt(_0x36f4ce(0xc9))/0x7*(parseInt(_0x36f4ce(0xf6))/0x8)+parseInt(_0x36f4ce(0xaf))/0x9*(-parseInt(_0x36f4ce(0xa7))/0xa)+parseInt(_0x36f4ce(0xe1))/0xb;if(_0x4b898f===_0x30be59)break;else _0x340a84['push'](_0x340a84['shift']());}catch(_0x326e6d){_0x340a84['push'](_0x340a84['shift']());}}}(_0x13a5,0x32c10));import{CommentService as _0x3e033d,CollaborationSessionService as _0x55d10c,UniverCollaborationClientPlugin as _0x42a23e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2436a8}from'@univerjs-pro/license';import{dayjs as _0x406095,UserManagerService as _0x370dc1,Inject as _0x139489,Injector as _0x353baa,Disposable as _0x3ad743,CustomRangeType as _0x2abdd2,UniverInstanceType as _0xae0343,DependentOn as _0x13c419,IConfigService as _0x33ac58,Plugin as _0x57b30b,merge as _0x1ae59a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x134544}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfaeaef,IThreadCommentDataSourceService as _0x31dc00}from'@univerjs/thread-comment';import{bufferTime as _0x1b3cbd}from'rxjs';import{HTTPService as _0x4acda9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa5a42e=>(_0xa5a42e[_0xa5a42e[_0x5bf11d(0xda)]=0x0]='OpenOrReOpen',_0xa5a42e[_0xa5a42e[_0x5bf11d(0xa9)]=0x1]=_0x5bf11d(0xa9),_0xa5a42e[_0xa5a42e[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0xa5a42e))(I||{}),v=(_0x465061=>(_0x465061[_0x465061[_0x5bf11d(0xd1)]=0x0]=_0x5bf11d(0xd1),_0x465061[_0x465061['Add']=0x1]=_0x5bf11d(0xb0),_0x465061[_0x465061[_0x5bf11d(0xe0)]=0x2]=_0x5bf11d(0xe0),_0x465061[_0x465061[_0x5bf11d(0xae)]=0x3]='Edit',_0x465061[_0x465061[_0x5bf11d(0xbe)]=0x4]='Delete',_0x465061[_0x465061[_0x5bf11d(0xac)]=0x5]='Solve',_0x465061[_0x465061[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0x465061))(v||{});const y=_0x354b69=>_0x406095(new Date(+_0x354b69))[_0x5bf11d(0xe4)](_0x5bf11d(0xf3)),B=async(_0x59c066,_0x265859)=>{const _0x23d640=_0x5bf11d,_0x7cf6a3=_0x59c066[_0x23d640(0xc0)](_0x370dc1),_0xe02f44=_0x59c066[_0x23d640(0xc0)](_0x4acda9);_0x265859[_0x23d640(0xe5)](_0x45aff2=>{const _0x4ffe44=_0x23d640;_0x7cf6a3[_0x4ffe44(0xf7)](_0x45aff2)&&_0x265859[_0x4ffe44(0xdc)](_0x45aff2);}),_0x265859[_0x23d640(0xb6)]&&(await _0xe02f44['get'](_0x23d640(0xb5),{'params':{'userIDs':[..._0x265859]}}))['body'][_0x23d640(0xde)][_0x23d640(0xe5)](_0x3653d2=>{const _0x518695=_0x23d640;_0x3653d2&&_0x7cf6a3[_0x518695(0xc1)](_0x3653d2);});};var K=Object[_0x5bf11d(0xe6)],V=(_0x3bfb34,_0x36803c,_0x2f7419,_0x352174)=>{const _0x28378b=_0x5bf11d;for(var _0x291a75=_0x352174>0x1?void 0x0:_0x352174?K(_0x36803c,_0x2f7419):_0x36803c,_0x23c6c2=_0x3bfb34[_0x28378b(0xc8)]-0x1,_0x3de3bf;_0x23c6c2>=0x0;_0x23c6c2--)(_0x3de3bf=_0x3bfb34[_0x23c6c2])&&(_0x291a75=_0x3de3bf(_0x291a75)||_0x291a75);return _0x291a75;},p=(_0xdb68c,_0x55b200)=>(_0x16f280,_0x1a89d0)=>_0x55b200(_0x16f280,_0x1a89d0,_0xdb68c);let _=class extends _0x3ad743{constructor(_0x4567e3,_0x1cb9ac,_0xc9fcd0,_0x58aecc){const _0x1c15ef=_0x5bf11d;super(),this['_commentService']=_0x4567e3,this[_0x1c15ef(0xba)]=_0x1cb9ac,this['_userService']=_0xc9fcd0,this[_0x1c15ef(0xb7)]=_0x58aecc,this[_0x1c15ef(0xfb)](),this[_0x1c15ef(0xa8)]();}[_0x5bf11d(0xa8)](){const _0x234f5a=_0x5bf11d;this[_0x234f5a(0xe8)](this[_0x234f5a(0xba)][_0x234f5a(0xc3)][_0x234f5a(0x102)](_0x1b3cbd(0x10))[_0x234f5a(0xd7)](_0x4923b1=>{const _0x2026f8=_0x234f5a,_0xf55b68=new Set();_0x4923b1[_0x2026f8(0xe5)](_0x319820=>{const _0x1055b7=_0x2026f8;switch(_0x319820[_0x1055b7(0xcd)]){case _0x1055b7(0xce):{const _0x1e1ce4=_0x319820[_0x1055b7(0xdf)][_0x1055b7(0xef)];_0xf55b68[_0x1055b7(0xce)](_0x1e1ce4);break;}}}),B(this[_0x2026f8(0xb7)],_0xf55b68);}));}[_0x5bf11d(0xfb)](){const _0x3c0edb=_0x5bf11d;this['disposeWithMe'](this[_0x3c0edb(0xfe)][_0x3c0edb(0xc3)][_0x3c0edb(0xd7)](async _0x4027c4=>{const _0x2beaf9=_0x3c0edb;var _0x38148c,_0x5e62cb,_0x2e3854,_0x45f066;const _0x346856=(_0x38148c=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x22cdba=>_0x22cdba['threadId']===_0x4027c4['threadId']))==null?void 0x0:_0x38148c[_0x2beaf9(0xcf)];if(!_0x346856)return;const {unitId:_0x37c898,subUnitId:_0x2f743d}=_0x346856;switch(_0x4027c4[_0x2beaf9(0xea)]&&this[_0x2beaf9(0xf4)][_0x2beaf9(0xc1)](_0x4027c4[_0x2beaf9(0xea)]),_0x4027c4[_0x2beaf9(0xcd)]){case v[_0x2beaf9(0xb0)]:break;case v['Reply']:{this[_0x2beaf9(0xba)][_0x2beaf9(0xf9)](_0x37c898,_0x2f743d,{'unitId':_0x37c898,'subUnitId':_0x2f743d,'ref':'','id':_0x4027c4[_0x2beaf9(0x108)],'dT':y(+_0x4027c4[_0x2beaf9(0xf2)]),'threadId':_0x4027c4[_0x2beaf9(0x10b)],'personId':(_0x2e3854=(_0x5e62cb=_0x4027c4['user'])==null?void 0x0:_0x5e62cb[_0x2beaf9(0xbb)])!=null?_0x2e3854:_0x4027c4[_0x2beaf9(0xeb)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4['content']),'parentId':_0x346856['id']});break;}case v[_0x2beaf9(0xbe)]:{const _0x38620f=this['_threadCommentModel']['getComment'](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);_0x38620f&&_0x38620f['parentId']&&this[_0x2beaf9(0xba)][_0x2beaf9(0xa5)](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);break;}case v[_0x2beaf9(0xae)]:{this[_0x2beaf9(0xba)][_0x2beaf9(0x109)](_0x37c898,_0x2f743d,{'commentId':_0x4027c4[_0x2beaf9(0x108)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4[_0x2beaf9(0x100)])});break;}case v[_0x2beaf9(0xac)]:{const _0x1317ca=(_0x45f066=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x5732d5=>_0x5732d5[_0x2beaf9(0x10b)]===_0x4027c4[_0x2beaf9(0x10b)]))==null?void 0x0:_0x45f066[_0x2beaf9(0xcf)];_0x1317ca&&this[_0x2beaf9(0xba)][_0x2beaf9(0xca)](_0x37c898,_0x2f743d,_0x1317ca['id'],_0x4027c4[_0x2beaf9(0xe7)]===I[_0x2beaf9(0xa9)]);break;}}}));}};_=V([p(0x0,_0x139489(_0x3e033d)),p(0x1,_0x139489(_0xfaeaef)),p(0x2,_0x139489(_0x370dc1)),p(0x3,_0x139489(_0x353baa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5bf11d(0xe6)],Q=(_0x24661e,_0x4297bf,_0x3af404,_0x1dbed9)=>{const _0x176d9b=_0x5bf11d;for(var _0x128f88=_0x1dbed9>0x1?void 0x0:_0x1dbed9?k(_0x4297bf,_0x3af404):_0x4297bf,_0x585f99=_0x24661e[_0x176d9b(0xc8)]-0x1,_0x3ab8c4;_0x585f99>=0x0;_0x585f99--)(_0x3ab8c4=_0x24661e[_0x585f99])&&(_0x128f88=_0x3ab8c4(_0x128f88)||_0x128f88);return _0x128f88;},b=(_0x1428f6,_0x598794)=>(_0x5b2621,_0x55982e)=>_0x598794(_0x5b2621,_0x55982e,_0x1428f6);function X(_0x73df2,_0x1e4ea3){const _0xb53790=_0x5bf11d,_0x28a9e0=_0x73df2[_0xb53790(0xcb)][0x0];return{..._0x1e4ea3,'id':_0x28a9e0[_0xb53790(0x108)],'resolved':_0x73df2[_0xb53790(0xe7)]===0x1,'dT':y(_0x28a9e0[_0xb53790(0xf2)]),'personId':_0x28a9e0[_0xb53790(0xeb)],'threadId':_0x28a9e0['threadId']};}function ee(_0x105610,_0x5e8c31,_0x141a18){const _0x56050c=_0x5bf11d;var _0x50f0ef,_0xdcf5d9;if(((_0xdcf5d9=(_0x50f0ef=_0x105610==null?void 0x0:_0x105610[_0x56050c(0xcb)])==null?void 0x0:_0x50f0ef[_0x56050c(0xc8)])!=null?_0xdcf5d9:0x0)>0x0){const _0x10d295=(_0xc7e1b7,_0x26cf67)=>({'id':_0xc7e1b7[_0x56050c(0x108)],'threadId':_0xc7e1b7['threadId'],'dT':y(_0xc7e1b7[_0x56050c(0xf2)]),'personId':_0xc7e1b7[_0x56050c(0xeb)],'resolved':_0x105610[_0x56050c(0xe7)]===I[_0x56050c(0xa9)],'unitId':_0x5e8c31,'subUnitId':_0x141a18,'text':JSON[_0x56050c(0x103)](_0xc7e1b7[_0x56050c(0x100)]),'parentId':_0x26cf67}),_0x3da65e=_0x10d295(_0x105610['replies'][0x0]);return{..._0x3da65e,'children':_0x105610[_0x56050c(0xcb)][_0x56050c(0xad)](0x1)[_0x56050c(0x106)](_0x5ec665=>_0x10d295(_0x5ec665,_0x3da65e['id']))};}return null;}let S=class{constructor(_0x1839ec,_0x13413f,_0x338f6b){const _0x53ee56=_0x5bf11d;this[_0x53ee56(0xd5)]=_0x1839ec,this[_0x53ee56(0xf4)]=_0x13413f,this[_0x53ee56(0xfd)]=_0x338f6b;}async[_0x5bf11d(0xf9)](_0x45270a){const _0x3f0d07=_0x5bf11d;var _0x2e3882,_0xbf5c4a;const {parentId:_0x2be2b5,unitId:_0x146327,text:_0x49f1df,threadId:_0x11d063}=_0x45270a,_0x444d32=(_0xbf5c4a=(_0x2e3882=_0x49f1df[_0x3f0d07(0xec)])==null?void 0x0:_0x2e3882['filter'](_0x52638a=>_0x52638a[_0x3f0d07(0xb3)]===_0x2abdd2[_0x3f0d07(0xfa)])[_0x3f0d07(0x106)](_0x576472=>_0x576472[_0x3f0d07(0xc2)]))!=null?_0xbf5c4a:[],_0x4fa583=JSON[_0x3f0d07(0xbf)](_0x49f1df),_0xefe1cf=(await this[_0x3f0d07(0xfd)]['requireSession'](_0x146327))['getMemberID']();if(_0x2be2b5){const _0x5b81d6={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32,'threadId':_0x11d063},_0x35f7b8=(await this['_httpService']['post'](_0x3f0d07(0xb2)+_0x146327+_0x3f0d07(0xe9),{'body':_0x5b81d6}))[_0x3f0d07(0x104)][_0x3f0d07(0xee)];return{..._0x45270a,'id':_0x35f7b8[_0x3f0d07(0x108)],'dT':_0x406095(+_0x35f7b8[_0x3f0d07(0xf2)])[_0x3f0d07(0xe4)](_0x3f0d07(0xf3)),'personId':_0x35f7b8[_0x3f0d07(0xeb)]};}else{const _0x3a702d={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32},_0x5ccff7=await this[_0x3f0d07(0xd5)]['post']('/universer-api/comment/unit/'+_0x146327+_0x3f0d07(0xc5),{'body':_0x3a702d});return X(_0x5ccff7[_0x3f0d07(0x104)][_0x3f0d07(0xfc)],_0x45270a);}}async[_0x5bf11d(0x109)](_0x1ad167){const _0x442f2f=_0x5bf11d;var _0x5ab67b,_0x11ed83;const {text:_0x51b466,unitId:_0x5ec047}=_0x1ad167,_0x575b41=(_0x11ed83=(_0x5ab67b=_0x51b466['customRanges'])==null?void 0x0:_0x5ab67b['filter'](_0x56a241=>_0x56a241['rangeType']===_0x2abdd2[_0x442f2f(0xfa)])[_0x442f2f(0x106)](_0x506958=>_0x506958['rangeId']))!=null?_0x11ed83:[],_0x320c1c=JSON[_0x442f2f(0xbf)](_0x51b466),_0x4c66e7=_0x1ad167[_0x442f2f(0x10b)],_0x19170e=_0x1ad167['id'],_0xa7bd21={'memberId':(await this[_0x442f2f(0xfd)][_0x442f2f(0xa6)](_0x5ec047))['getMemberID'](),'unitId':_0x5ec047,'threadId':_0x4c66e7,'mention':_0x575b41,'content':_0x320c1c,'replyId':_0x19170e},_0x40277b=await this[_0x442f2f(0xd5)][_0x442f2f(0xd3)](_0x442f2f(0xb2)+_0x5ec047+_0x442f2f(0xe2),{'body':_0xa7bd21});return!_0x40277b[_0x442f2f(0x104)]['error']||_0x40277b[_0x442f2f(0x104)][_0x442f2f(0x107)]['code']===0x1;}async[_0x5bf11d(0xca)](_0x4a2da7){const _0x317f0c=_0x5bf11d,{unitId:_0x316b80}=_0x4a2da7,_0xcff4a8=_0x4a2da7['threadId'],_0x41c37d={'memberId':this['_userService']['getCurrentUser']()[_0x317f0c(0xbb)],'unitId':_0x316b80,'threadId':_0xcff4a8,'solved':_0x4a2da7[_0x317f0c(0xd2)]?I['Solved']:I['OpenOrReOpen']},_0x17dcc6=await this[_0x317f0c(0xd5)][_0x317f0c(0xd3)]('/universer-api/comment/unit/'+_0x316b80+'/solved',{'body':_0x41c37d});return!_0x17dcc6['body'][_0x317f0c(0x107)]||_0x17dcc6[_0x317f0c(0x104)]['error']['code']===0x1;}async[_0x5bf11d(0xa5)](_0x1669fd,_0xdf954d,_0x21fcd4,_0x40cc3e){const _0x2d7b44=_0x5bf11d,_0x145fcb={'memberId':(await this['_sessionService'][_0x2d7b44(0xa6)](_0x1669fd))[_0x2d7b44(0xd4)](),'threadId':_0x21fcd4,'replyId':_0x40cc3e,'unitId':_0x1669fd},_0x2c31f8=await this[_0x2d7b44(0xd5)][_0x2d7b44(0xd3)](_0x2d7b44(0xb2)+_0x1669fd+'/delete',{'body':_0x145fcb});return!_0x2c31f8['body'][_0x2d7b44(0x107)]||_0x2c31f8[_0x2d7b44(0x104)][_0x2d7b44(0x107)]['code']===0x1;}async[_0x5bf11d(0xb1)](_0x4086fa,_0x236b49,_0x56d668){const _0x443b4b=_0x5bf11d,_0x216b2a={'unitId':_0x4086fa,'threadId':_0x56d668},_0x25a709=await this[_0x443b4b(0xd5)][_0x443b4b(0xd3)](_0x443b4b(0xb2)+_0x4086fa+'/list',{'body':_0x216b2a}),_0x8721ad=_0x56d668[_0x443b4b(0x106)](_0x371ab5=>ee(_0x25a709['body'][_0x443b4b(0x105)][_0x371ab5],_0x4086fa,_0x236b49))[_0x443b4b(0xf5)](Boolean);return Object[_0x443b4b(0xbc)](_0x25a709['body'][_0x443b4b(0xde)])[_0x443b4b(0xe5)](_0x287315=>{const _0x4e7811=_0x443b4b;this[_0x4e7811(0xf4)]['addUser'](_0x287315);}),_0x8721ad;}[_0x5bf11d(0xd9)](_0x38d009){const _0x17c816=_0x5bf11d;return{'id':_0x38d009['id'],'threadId':_0x38d009[_0x17c816(0x10b)],'ref':_0x38d009[_0x17c816(0xbd)]};}};S=Q([b(0x0,_0x139489(_0x4acda9)),b(0x1,_0x139489(_0x370dc1)),b(0x2,_0x139489(_0x55d10c))],S);var re=Object[_0x5bf11d(0xe6)],te=(_0x281ea2,_0x17e6ed,_0x2f813a,_0xcdad0e)=>{const _0x22c2a4=_0x5bf11d;for(var _0x3a9061=_0xcdad0e>0x1?void 0x0:_0xcdad0e?re(_0x17e6ed,_0x2f813a):_0x17e6ed,_0x4ee619=_0x281ea2[_0x22c2a4(0xc8)]-0x1,_0x38f483;_0x4ee619>=0x0;_0x4ee619--)(_0x38f483=_0x281ea2[_0x4ee619])&&(_0x3a9061=_0x38f483(_0x3a9061)||_0x3a9061);return _0x3a9061;},M=(_0x58a15e,_0x5dfceb)=>(_0x48230e,_0x221d62)=>_0x5dfceb(_0x48230e,_0x221d62,_0x58a15e);let f=class extends _0x3ad743{constructor(_0x1e1287,_0x333ecf){const _0x5a4e20=_0x5bf11d;super(),this[_0x5a4e20(0x10a)]=_0x1e1287,this['_threadCommentDataSource']=_0x333ecf,this[_0x5a4e20(0xcc)]();}[_0x5bf11d(0xcc)](){const _0xbbc3e4=_0x5bf11d;this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xc7)]=this[_0xbbc3e4(0xa4)],this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xed)]=!0x1;}};f=te([M(0x0,_0x31dc00),M(0x1,_0x139489(S))],f);var se=Object[_0x5bf11d(0xb9)],oe=Object[_0x5bf11d(0xe6)],ne=(_0x3b2842,_0x47248f,_0x1fbeae)=>_0x47248f in _0x3b2842?se(_0x3b2842,_0x47248f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fbeae}):_0x3b2842[_0x47248f]=_0x1fbeae,ie=(_0x3f7c99,_0x18db66,_0x3834f1,_0x49e30c)=>{const _0x416ee1=_0x5bf11d;for(var _0x2b7297=_0x49e30c>0x1?void 0x0:_0x49e30c?oe(_0x18db66,_0x3834f1):_0x18db66,_0x1b7f42=_0x3f7c99[_0x416ee1(0xc8)]-0x1,_0x44c4fc;_0x1b7f42>=0x0;_0x1b7f42--)(_0x44c4fc=_0x3f7c99[_0x1b7f42])&&(_0x2b7297=_0x44c4fc(_0x2b7297)||_0x2b7297);return _0x2b7297;},N=(_0x22ed37,_0x390191)=>(_0x505d01,_0x4a07e5)=>_0x390191(_0x505d01,_0x4a07e5,_0x22ed37),$=(_0x190ed5,_0x4585cc,_0x6972f6)=>ne(_0x190ed5,typeof _0x4585cc!='symbol'?_0x4585cc+'':_0x4585cc,_0x6972f6);let g=class extends _0x57b30b{constructor(_0x3f4ee8=O,_0xc21555,_0x2f17ad){const _0xf7f1b4=_0x5bf11d;super(),this[_0xf7f1b4(0xd8)]=_0x3f4ee8,this[_0xf7f1b4(0xb7)]=_0xc21555,this[_0xf7f1b4(0xab)]=_0x2f17ad;const {..._0x5aa886}=_0x1ae59a({},O,this[_0xf7f1b4(0xd8)]);this[_0xf7f1b4(0xab)][_0xf7f1b4(0xaa)](z,_0x5aa886);}[_0x5bf11d(0xb8)](){[[S],[f],[_]]['forEach'](_0x152f8a=>{this['_injector']['add'](_0x152f8a);});}[_0x5bf11d(0xff)](){const _0x11a33f=_0x5bf11d;this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](f),this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](_);}};$(g,_0x5bf11d(0xf0),W),$(g,_0x5bf11d(0xcd),_0xae0343[_0x5bf11d(0xf8)]),g=ie([_0x13c419(_0x134544,_0x42a23e,_0x2436a8),N(0x1,_0x139489(_0x353baa)),N(0x2,_0x33ac58)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5c98(_0x37660f,_0x46c7d4){const _0x13a5fa=_0x13a5();return _0x5c98=function(_0x5c9884,_0x508eff){_0x5c9884=_0x5c9884-0xa4;let _0x14dfa3=_0x13a5fa[_0x5c9884];return _0x14dfa3;},_0x5c98(_0x37660f,_0x46c7d4);}function _0x13a5(){const _0x4599c3=['_configService','Solve','slice','Edit','1722834Aelhmc','Add','listComments','/universer-api/comment/unit/','rangeType','getUnit','/universer-api/user/list','size','_injector','onStarting','defineProperty','_threadCommentModel','userID','values','ref','Delete','stringify','get','addUser','rangeId','commentUpdate$','unitId','/add','UNRECOGNIZED','dataSource','length','1081276IdqyQq','resolveComment','replies','_initDataSource','type','add','root','6Unnzsy','Unknown','resolved','post','getMemberID','_httpService','3uAqxVm','subscribe','_config','saveCommentToSnapshot','OpenOrReOpen','671095ProWqz','delete','83216OEcflq','users','payload','Reply','1039830BowSAD','/edit','728104pWlPOg','format','forEach','getOwnPropertyDescriptor','solved','disposeWithMe','/reply','user','userId','customRanges','syncUpdateMutationToColla','reply','personId','pluginName','428518XmUQtY','createTimestamp','YYYY/MM/DD\x20HH:mm','_userService','filter','16IYopTa','getUser','UNIVER_UNKNOWN','addComment','COMMENT','_init','comment','_sessionService','_commentService','onReady','content','find','pipe','parse','body','comments','map','error','replyId','updateComment','_threadCommentDataSourceService','threadId','_threadCommentDataSource','deleteComment','requireSession','10KkPTVV','_initUserSync','Solved','setConfig'];_0x13a5=function(){return _0x4599c3;};return _0x13a5();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2767(){const _0x331b22=['_commentService','bufferTime','UniverCore','amd','user','users','updateComment','filter','12AfwRFl','26485WNeNCs','@univerjs/network','/list','_sessionService','getUnit','Delete','format','get','148bELcKK','UniverThreadCommentDataSourcePlugin','Injector','root','userID','UniverThreadCommentUIPlugin','createTimestamp','rxjs','find','pipe','HTTPService','body','UniverProThreadCommentDatasource','defineProperty','_threadCommentDataSourceService','customRanges','UniverThreadComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','payload','comments','/edit','_configService','reply','1918847EnJDYa','15955093EgRpEq','Disposable','/add','_initUserSync','Module','COMMENT','getOwnPropertyDescriptor','rangeType','UniverProLicense','addUser','/solved','@univerjs/thread-comment-ui','replies','resolveComment','_injector','type','deleteComment','stringify','Unknown','code','Inject','CollaborationSessionService','8DOHyec','comment','userId','commentUpdate$','_threadCommentModel','post','Edit','unitId','exports','onStarting','CommentService','4948850DTMprs','map','error','UNRECOGNIZED','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','resolved','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','syncUpdateMutationToColla','@univerjs-pro/license','disposeWithMe','Plugin','length','parse','dataSource','Add','333veUwTC','UniverLicensePlugin','_threadCommentDataSource','rangeId','content','_init','add','merge','4788369OVQpIy','@univerjs/core','_config','solved','threadId','size','getMemberID','listComments','dayjs','CustomRangeType','forEach','DependentOn','2450onZrNI','@univerjs/thread-comment','getUser','function','ThreadCommentModel','saveCommentToSnapshot','requireSession','/delete','OpenOrReOpen','_httpService','getCurrentUser','ref','delete','_userService','UniverProCollaborationClient','1314891wUmllD','@univerjs-pro/collaboration-client','IConfigService','Solved','UserManagerService','object','subscribe','addComment','getComment'];_0x2767=function(){return _0x331b22;};return _0x2767();}function _0x72ca(_0x3d2d20,_0x185fe0){const _0x276719=_0x2767();return _0x72ca=function(_0x72ca22,_0x101aa1){_0x72ca22=_0x72ca22-0x1e5;let _0x3d2738=_0x276719[_0x72ca22];return _0x3d2738;},_0x72ca(_0x3d2d20,_0x185fe0);}(function(_0x185e75,_0x300caf){const _0x1eab25=_0x72ca,_0xb0049f=_0x185e75();while(!![]){try{const _0x157ad0=-parseInt(_0x1eab25(0x243))/0x1*(parseInt(_0x1eab25(0x257))/0x2)+parseInt(_0x1eab25(0x266))/0x3+parseInt(_0x1eab25(0x1f8))/0x4*(parseInt(_0x1eab25(0x1f0))/0x5)+-parseInt(_0x1eab25(0x1ef))/0x6*(-parseInt(_0x1eab25(0x210))/0x7)+-parseInt(_0x1eab25(0x227))/0x8*(-parseInt(_0x1eab25(0x24b))/0x9)+parseInt(_0x1eab25(0x232))/0xa+-parseInt(_0x1eab25(0x211))/0xb;if(_0x157ad0===_0x300caf)break;else _0xb0049f['push'](_0xb0049f['shift']());}catch(_0x2884bc){_0xb0049f['push'](_0xb0049f['shift']());}}}(_0x2767,0x55b5a),function(_0x47d833,_0x3579a4){const _0x4b990e=_0x72ca;typeof exports==_0x4b990e(0x26b)&&typeof module<'u'?_0x3579a4(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x4b990e(0x25a)&&define[_0x4b990e(0x1ea)]?define([_0x4b990e(0x22f),_0x4b990e(0x267),_0x4b990e(0x23c),_0x4b990e(0x24c),_0x4b990e(0x21c),_0x4b990e(0x258),'rxjs',_0x4b990e(0x1f1)],_0x3579a4):(_0x47d833=typeof globalThis<'u'?globalThis:_0x47d833||self,_0x3579a4(_0x47d833[_0x4b990e(0x204)]={},_0x47d833[_0x4b990e(0x265)],_0x47d833[_0x4b990e(0x219)],_0x47d833[_0x4b990e(0x1e9)],_0x47d833['UniverThreadCommentUi'],_0x47d833[_0x4b990e(0x208)],_0x47d833[_0x4b990e(0x1ff)],_0x47d833['UniverNetwork']));}(this,function(_0x542128,_0x11ff7d,_0x4e769e,_0x3be0b2,_0x57a4fa,_0x3662a9,_0x6d7e6b,_0x2266af){'use strict';const _0x5cb4cf=_0x72ca;const _0x1aec9b=_0x5cb4cf(0x209);var _0x38b960=(_0x40eb11=>(_0x40eb11[_0x40eb11[_0x5cb4cf(0x25f)]=0x0]=_0x5cb4cf(0x25f),_0x40eb11[_0x40eb11[_0x5cb4cf(0x269)]=0x1]=_0x5cb4cf(0x269),_0x40eb11[_0x40eb11[_0x5cb4cf(0x235)]=-0x1]=_0x5cb4cf(0x235),_0x40eb11))(_0x38b960||{}),_0x6a09e5=(_0x15b096=>(_0x15b096[_0x15b096[_0x5cb4cf(0x223)]=0x0]='Unknown',_0x15b096[_0x15b096[_0x5cb4cf(0x242)]=0x1]=_0x5cb4cf(0x242),_0x15b096[_0x15b096['Reply']=0x2]='Reply',_0x15b096[_0x15b096[_0x5cb4cf(0x22d)]=0x3]=_0x5cb4cf(0x22d),_0x15b096[_0x15b096[_0x5cb4cf(0x1f5)]=0x4]=_0x5cb4cf(0x1f5),_0x15b096[_0x15b096['Solve']=0x5]='Solve',_0x15b096[_0x15b096[_0x5cb4cf(0x235)]=-0x1]=_0x5cb4cf(0x235),_0x15b096))(_0x6a09e5||{});const _0x1e8e1e=_0x46d9db=>_0x3be0b2[_0x5cb4cf(0x253)](new Date(+_0x46d9db))[_0x5cb4cf(0x1f6)](_0x5cb4cf(0x239)),_0xdad704=async(_0x425bd0,_0x44fe55)=>{const _0x3b5dba=_0x5cb4cf,_0x399801=_0x425bd0[_0x3b5dba(0x1f7)](_0x3be0b2[_0x3b5dba(0x26a)]),_0x5065dd=_0x425bd0[_0x3b5dba(0x1f7)](_0x2266af[_0x3b5dba(0x202)]);_0x44fe55['forEach'](_0x48a28d=>{const _0xdbbde6=_0x3b5dba;_0x399801[_0xdbbde6(0x259)](_0x48a28d)&&_0x44fe55[_0xdbbde6(0x263)](_0x48a28d);}),_0x44fe55[_0x3b5dba(0x250)]&&(await _0x5065dd[_0x3b5dba(0x1f7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x44fe55]}}))['body'][_0x3b5dba(0x1ec)][_0x3b5dba(0x255)](_0x11af92=>{const _0x2fdbd7=_0x3b5dba;_0x11af92&&_0x399801[_0x2fdbd7(0x21a)](_0x11af92);});};var _0x338547=Object[_0x5cb4cf(0x217)],_0x5124eb=(_0x3950e6,_0x455fdd,_0x32e65d,_0x2f3407)=>{const _0x472906=_0x5cb4cf;for(var _0x9d9359=_0x2f3407>0x1?void 0x0:_0x2f3407?_0x338547(_0x455fdd,_0x32e65d):_0x455fdd,_0x3c4c2d=_0x3950e6[_0x472906(0x23f)]-0x1,_0x1a1860;_0x3c4c2d>=0x0;_0x3c4c2d--)(_0x1a1860=_0x3950e6[_0x3c4c2d])&&(_0x9d9359=_0x1a1860(_0x9d9359)||_0x9d9359);return _0x9d9359;},_0x65afd1=(_0x169412,_0x3ad55f)=>(_0x38c08d,_0x3bc807)=>_0x3ad55f(_0x38c08d,_0x3bc807,_0x169412);let _0x31466a=class extends _0x3be0b2['Disposable']{constructor(_0xdd646e,_0x5bd79d,_0x560f57,_0x5ced12){const _0x34384f=_0x5cb4cf;super(),this[_0x34384f(0x1e7)]=_0xdd646e,this[_0x34384f(0x22b)]=_0x5bd79d,this['_userService']=_0x560f57,this[_0x34384f(0x21f)]=_0x5ced12,this['_init'](),this[_0x34384f(0x214)]();}['_initUserSync'](){const _0x5a871b=_0x5cb4cf;this[_0x5a871b(0x23d)](this[_0x5a871b(0x22b)][_0x5a871b(0x22a)][_0x5a871b(0x201)](_0x6d7e6b[_0x5a871b(0x1e8)](0x10))['subscribe'](_0x4855d0=>{const _0x2091bd=new Set();_0x4855d0['forEach'](_0xb0d6c6=>{const _0x3eb4a7=_0x72ca;switch(_0xb0d6c6[_0x3eb4a7(0x220)]){case _0x3eb4a7(0x249):{const _0xaf36eb=_0xb0d6c6[_0x3eb4a7(0x20b)]['personId'];_0x2091bd[_0x3eb4a7(0x249)](_0xaf36eb);break;}}}),_0xdad704(this['_injector'],_0x2091bd);}));}[_0x5cb4cf(0x248)](){const _0x453d97=_0x5cb4cf;this[_0x453d97(0x23d)](this[_0x453d97(0x1e7)][_0x453d97(0x22a)][_0x453d97(0x26c)](async _0x3e84b2=>{const _0x3a551d=_0x453d97;var _0x406a91,_0x4bb339,_0x3d5134,_0x29bf27;const _0x219208=(_0x406a91=this[_0x3a551d(0x22b)][_0x3a551d(0x1f4)](_0x3e84b2[_0x3a551d(0x22e)])[_0x3a551d(0x200)](_0x45d668=>_0x45d668['threadId']===_0x3e84b2[_0x3a551d(0x24f)]))==null?void 0x0:_0x406a91[_0x3a551d(0x1fb)];if(!_0x219208)return;const {unitId:_0x485e78,subUnitId:_0xd3ba3}=_0x219208;switch(_0x3e84b2['user']&&this[_0x3a551d(0x264)][_0x3a551d(0x21a)](_0x3e84b2[_0x3a551d(0x1eb)]),_0x3e84b2['type']){case _0x6a09e5[_0x3a551d(0x242)]:break;case _0x6a09e5['Reply']:{this[_0x3a551d(0x22b)][_0x3a551d(0x1e5)](_0x485e78,_0xd3ba3,{'unitId':_0x485e78,'subUnitId':_0xd3ba3,'ref':'','id':_0x3e84b2[_0x3a551d(0x20a)],'dT':_0x1e8e1e(+_0x3e84b2[_0x3a551d(0x1fe)]),'threadId':_0x3e84b2['threadId'],'personId':(_0x3d5134=(_0x4bb339=_0x3e84b2[_0x3a551d(0x1eb)])==null?void 0x0:_0x4bb339[_0x3a551d(0x1fc)])!=null?_0x3d5134:_0x3e84b2[_0x3a551d(0x229)],'text':JSON[_0x3a551d(0x240)](_0x3e84b2['content']),'parentId':_0x219208['id']});break;}case _0x6a09e5[_0x3a551d(0x1f5)]:{const _0x364c06=this[_0x3a551d(0x22b)][_0x3a551d(0x1e6)](_0x485e78,_0xd3ba3,_0x3e84b2['replyId']);_0x364c06&&_0x364c06['parentId']&&this[_0x3a551d(0x22b)][_0x3a551d(0x221)](_0x485e78,_0xd3ba3,_0x3e84b2[_0x3a551d(0x20a)]);break;}case _0x6a09e5[_0x3a551d(0x22d)]:{this[_0x3a551d(0x22b)][_0x3a551d(0x1ed)](_0x485e78,_0xd3ba3,{'commentId':_0x3e84b2[_0x3a551d(0x20a)],'text':JSON[_0x3a551d(0x240)](_0x3e84b2[_0x3a551d(0x247)])});break;}case _0x6a09e5['Solve']:{const _0x1c5449=(_0x29bf27=this['_threadCommentModel'][_0x3a551d(0x1f4)](_0x3e84b2[_0x3a551d(0x22e)])[_0x3a551d(0x200)](_0x592ed2=>_0x592ed2[_0x3a551d(0x24f)]===_0x3e84b2[_0x3a551d(0x24f)]))==null?void 0x0:_0x29bf27['root'];_0x1c5449&&this[_0x3a551d(0x22b)][_0x3a551d(0x21e)](_0x485e78,_0xd3ba3,_0x1c5449['id'],_0x3e84b2[_0x3a551d(0x24e)]===_0x38b960[_0x3a551d(0x269)]);break;}}}));}};_0x31466a=_0x5124eb([_0x65afd1(0x0,_0x3be0b2[_0x5cb4cf(0x225)](_0x11ff7d[_0x5cb4cf(0x231)])),_0x65afd1(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x3662a9[_0x5cb4cf(0x25b)])),_0x65afd1(0x2,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2['UserManagerService'])),_0x65afd1(0x3,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2[_0x5cb4cf(0x1fa)]))],_0x31466a);const _0x14ce47='thread-comment-data-source.config',_0x1b934c={};var _0x7b7e2c=Object['getOwnPropertyDescriptor'],_0x577fc4=(_0xddbfb6,_0x48f68e,_0x3187c9,_0x4b20e3)=>{const _0x5b338b=_0x5cb4cf;for(var _0x2002b4=_0x4b20e3>0x1?void 0x0:_0x4b20e3?_0x7b7e2c(_0x48f68e,_0x3187c9):_0x48f68e,_0x964122=_0xddbfb6[_0x5b338b(0x23f)]-0x1,_0x18c180;_0x964122>=0x0;_0x964122--)(_0x18c180=_0xddbfb6[_0x964122])&&(_0x2002b4=_0x18c180(_0x2002b4)||_0x2002b4);return _0x2002b4;},_0x303178=(_0x10af89,_0x414c37)=>(_0x4c30dd,_0x38ce67)=>_0x414c37(_0x4c30dd,_0x38ce67,_0x10af89);function _0x2588e9(_0x528214,_0x3973d6){const _0x489633=_0x5cb4cf,_0x2a8921=_0x528214['replies'][0x0];return{..._0x3973d6,'id':_0x2a8921[_0x489633(0x20a)],'resolved':_0x528214[_0x489633(0x24e)]===0x1,'dT':_0x1e8e1e(_0x2a8921[_0x489633(0x1fe)]),'personId':_0x2a8921[_0x489633(0x229)],'threadId':_0x2a8921[_0x489633(0x24f)]};}function _0x5e6034(_0x4694cf,_0x36b647,_0x538bd0){const _0x1e4692=_0x5cb4cf;var _0x4eb90f,_0x4c8b2f;if(((_0x4c8b2f=(_0x4eb90f=_0x4694cf==null?void 0x0:_0x4694cf[_0x1e4692(0x21d)])==null?void 0x0:_0x4eb90f['length'])!=null?_0x4c8b2f:0x0)>0x0){const _0x2697ca=(_0x1a1d9c,_0x34c1f5)=>({'id':_0x1a1d9c['replyId'],'threadId':_0x1a1d9c[_0x1e4692(0x24f)],'dT':_0x1e8e1e(_0x1a1d9c['createTimestamp']),'personId':_0x1a1d9c['userId'],'resolved':_0x4694cf[_0x1e4692(0x24e)]===_0x38b960['Solved'],'unitId':_0x36b647,'subUnitId':_0x538bd0,'text':JSON['parse'](_0x1a1d9c['content']),'parentId':_0x34c1f5}),_0x33e2bd=_0x2697ca(_0x4694cf[_0x1e4692(0x21d)][0x0]);return{..._0x33e2bd,'children':_0x4694cf['replies']['slice'](0x1)[_0x1e4692(0x233)](_0x1e47de=>_0x2697ca(_0x1e47de,_0x33e2bd['id']))};}return null;}let _0x1ce46e=class{constructor(_0x519f50,_0x30b406,_0x118430){const _0x256502=_0x5cb4cf;this[_0x256502(0x260)]=_0x519f50,this[_0x256502(0x264)]=_0x30b406,this[_0x256502(0x1f3)]=_0x118430;}async[_0x5cb4cf(0x1e5)](_0xddc751){const _0x54973b=_0x5cb4cf;var _0x44a831,_0x307cd4;const {parentId:_0x497d71,unitId:_0x126bfc,text:_0x14b9e1,threadId:_0x276750}=_0xddc751,_0x5a8408=(_0x307cd4=(_0x44a831=_0x14b9e1[_0x54973b(0x207)])==null?void 0x0:_0x44a831['filter'](_0xe3647f=>_0xe3647f[_0x54973b(0x218)]===_0x3be0b2[_0x54973b(0x254)][_0x54973b(0x216)])['map'](_0x6cc6eb=>_0x6cc6eb[_0x54973b(0x246)]))!=null?_0x307cd4:[],_0x585aab=JSON[_0x54973b(0x222)](_0x14b9e1),_0x4a873f=(await this['_sessionService'][_0x54973b(0x25d)](_0x126bfc))[_0x54973b(0x251)]();if(_0x497d71){const _0x3a1314={'memberId':_0x4a873f,'unitId':_0x126bfc,'content':_0x585aab,'mention':_0x5a8408,'threadId':_0x276750},_0x32ca5a=(await this[_0x54973b(0x260)][_0x54973b(0x22c)](_0x54973b(0x23a)+_0x126bfc+'/reply',{'body':_0x3a1314}))[_0x54973b(0x203)][_0x54973b(0x20f)];return{..._0xddc751,'id':_0x32ca5a[_0x54973b(0x20a)],'dT':_0x3be0b2[_0x54973b(0x253)](+_0x32ca5a['createTimestamp'])[_0x54973b(0x1f6)](_0x54973b(0x239)),'personId':_0x32ca5a[_0x54973b(0x229)]};}else{const _0x4ce111={'memberId':_0x4a873f,'unitId':_0x126bfc,'content':_0x585aab,'mention':_0x5a8408},_0x211eb5=await this[_0x54973b(0x260)][_0x54973b(0x22c)](_0x54973b(0x23a)+_0x126bfc+_0x54973b(0x213),{'body':_0x4ce111});return _0x2588e9(_0x211eb5[_0x54973b(0x203)][_0x54973b(0x228)],_0xddc751);}}async['updateComment'](_0xe192e8){const _0x5a85d5=_0x5cb4cf;var _0x12bab0,_0x2ef986;const {text:_0x36b87f,unitId:_0x5a84db}=_0xe192e8,_0x42d546=(_0x2ef986=(_0x12bab0=_0x36b87f[_0x5a85d5(0x207)])==null?void 0x0:_0x12bab0['filter'](_0x19fee4=>_0x19fee4[_0x5a85d5(0x218)]===_0x3be0b2[_0x5a85d5(0x254)]['COMMENT'])[_0x5a85d5(0x233)](_0x115971=>_0x115971['rangeId']))!=null?_0x2ef986:[],_0x5f15c0=JSON[_0x5a85d5(0x222)](_0x36b87f),_0x3c2d41=_0xe192e8[_0x5a85d5(0x24f)],_0x584339=_0xe192e8['id'],_0x70b3a5={'memberId':(await this[_0x5a85d5(0x1f3)][_0x5a85d5(0x25d)](_0x5a84db))['getMemberID'](),'unitId':_0x5a84db,'threadId':_0x3c2d41,'mention':_0x42d546,'content':_0x5f15c0,'replyId':_0x584339},_0x54fe61=await this[_0x5a85d5(0x260)][_0x5a85d5(0x22c)]('/universer-api/comment/unit/'+_0x5a84db+_0x5a85d5(0x20d),{'body':_0x70b3a5});return!_0x54fe61[_0x5a85d5(0x203)][_0x5a85d5(0x234)]||_0x54fe61[_0x5a85d5(0x203)][_0x5a85d5(0x234)]['code']===0x1;}async[_0x5cb4cf(0x21e)](_0x587ce5){const _0x1ebebb=_0x5cb4cf,{unitId:_0x31ddf5}=_0x587ce5,_0x19cd2b=_0x587ce5[_0x1ebebb(0x24f)],_0x22009a={'memberId':this[_0x1ebebb(0x264)][_0x1ebebb(0x261)]()[_0x1ebebb(0x1fc)],'unitId':_0x31ddf5,'threadId':_0x19cd2b,'solved':_0x587ce5[_0x1ebebb(0x238)]?_0x38b960[_0x1ebebb(0x269)]:_0x38b960[_0x1ebebb(0x25f)]},_0x4141c2=await this[_0x1ebebb(0x260)]['post'](_0x1ebebb(0x23a)+_0x31ddf5+_0x1ebebb(0x21b),{'body':_0x22009a});return!_0x4141c2['body'][_0x1ebebb(0x234)]||_0x4141c2[_0x1ebebb(0x203)][_0x1ebebb(0x234)][_0x1ebebb(0x224)]===0x1;}async[_0x5cb4cf(0x221)](_0x4dde4c,_0x5c6f37,_0x5f30f9,_0x5839e1){const _0x1cc21a=_0x5cb4cf,_0x40d3d={'memberId':(await this[_0x1cc21a(0x1f3)][_0x1cc21a(0x25d)](_0x4dde4c))[_0x1cc21a(0x251)](),'threadId':_0x5f30f9,'replyId':_0x5839e1,'unitId':_0x4dde4c},_0x457a53=await this['_httpService'][_0x1cc21a(0x22c)](_0x1cc21a(0x23a)+_0x4dde4c+_0x1cc21a(0x25e),{'body':_0x40d3d});return!_0x457a53['body']['error']||_0x457a53['body'][_0x1cc21a(0x234)][_0x1cc21a(0x224)]===0x1;}async[_0x5cb4cf(0x252)](_0x5d2c53,_0x3b0178,_0x27fce8){const _0xef559d=_0x5cb4cf,_0x28f8a7={'unitId':_0x5d2c53,'threadId':_0x27fce8},_0x791986=await this['_httpService'][_0xef559d(0x22c)](_0xef559d(0x23a)+_0x5d2c53+_0xef559d(0x1f2),{'body':_0x28f8a7}),_0x2cc70a=_0x27fce8[_0xef559d(0x233)](_0xbbb383=>_0x5e6034(_0x791986[_0xef559d(0x203)][_0xef559d(0x20c)][_0xbbb383],_0x5d2c53,_0x3b0178))[_0xef559d(0x1ee)](Boolean);return Object['values'](_0x791986['body'][_0xef559d(0x1ec)])[_0xef559d(0x255)](_0x631be5=>{const _0x426230=_0xef559d;this[_0x426230(0x264)]['addUser'](_0x631be5);}),_0x2cc70a;}[_0x5cb4cf(0x25c)](_0xf91394){const _0x18dee3=_0x5cb4cf;return{'id':_0xf91394['id'],'threadId':_0xf91394[_0x18dee3(0x24f)],'ref':_0xf91394[_0x18dee3(0x262)]};}};_0x1ce46e=_0x577fc4([_0x303178(0x0,_0x3be0b2['Inject'](_0x2266af[_0x5cb4cf(0x202)])),_0x303178(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2[_0x5cb4cf(0x26a)])),_0x303178(0x2,_0x3be0b2[_0x5cb4cf(0x225)](_0x11ff7d[_0x5cb4cf(0x226)]))],_0x1ce46e);var _0x3cef0e=Object[_0x5cb4cf(0x217)],_0x67db37=(_0x1ee67a,_0x3e1224,_0x238bb5,_0x295300)=>{const _0x129f84=_0x5cb4cf;for(var _0x12fc82=_0x295300>0x1?void 0x0:_0x295300?_0x3cef0e(_0x3e1224,_0x238bb5):_0x3e1224,_0x3a48a2=_0x1ee67a[_0x129f84(0x23f)]-0x1,_0x11a808;_0x3a48a2>=0x0;_0x3a48a2--)(_0x11a808=_0x1ee67a[_0x3a48a2])&&(_0x12fc82=_0x11a808(_0x12fc82)||_0x12fc82);return _0x12fc82;},_0x963a30=(_0x3a0910,_0xc51b8f)=>(_0x1bbb7f,_0x1ab3c6)=>_0xc51b8f(_0x1bbb7f,_0x1ab3c6,_0x3a0910);let _0x4a9f6b=class extends _0x3be0b2[_0x5cb4cf(0x212)]{constructor(_0x28072d,_0x150d3e){const _0x419323=_0x5cb4cf;super(),this[_0x419323(0x206)]=_0x28072d,this['_threadCommentDataSource']=_0x150d3e,this['_initDataSource']();}['_initDataSource'](){const _0x54272b=_0x5cb4cf;this['_threadCommentDataSourceService'][_0x54272b(0x241)]=this[_0x54272b(0x245)],this[_0x54272b(0x206)][_0x54272b(0x23b)]=!0x1;}};_0x4a9f6b=_0x67db37([_0x963a30(0x0,_0x3662a9[_0x5cb4cf(0x237)]),_0x963a30(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x1ce46e))],_0x4a9f6b);var _0x1be782=Object[_0x5cb4cf(0x205)],_0x53ad6e=Object['getOwnPropertyDescriptor'],_0x876af9=(_0x258796,_0xf6cb0c,_0x350906)=>_0xf6cb0c in _0x258796?_0x1be782(_0x258796,_0xf6cb0c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x350906}):_0x258796[_0xf6cb0c]=_0x350906,_0x4304b9=(_0x45a92e,_0x1a107e,_0xba9443,_0x1c863c)=>{for(var _0x29a4a5=_0x1c863c>0x1?void 0x0:_0x1c863c?_0x53ad6e(_0x1a107e,_0xba9443):_0x1a107e,_0x1ac6fa=_0x45a92e['length']-0x1,_0x3cb529;_0x1ac6fa>=0x0;_0x1ac6fa--)(_0x3cb529=_0x45a92e[_0x1ac6fa])&&(_0x29a4a5=_0x3cb529(_0x29a4a5)||_0x29a4a5);return _0x29a4a5;},_0x18619d=(_0x172a95,_0x573c12)=>(_0x255bca,_0x4a79cf)=>_0x573c12(_0x255bca,_0x4a79cf,_0x172a95),_0x37248b=(_0x598bcd,_0x3d4de5,_0x4e9c68)=>_0x876af9(_0x598bcd,typeof _0x3d4de5!='symbol'?_0x3d4de5+'':_0x3d4de5,_0x4e9c68);_0x542128[_0x5cb4cf(0x1f9)]=class extends _0x3be0b2[_0x5cb4cf(0x23e)]{constructor(_0x1fbdb7=_0x1b934c,_0x344813,_0x35b20e){const _0x386100=_0x5cb4cf;super(),this[_0x386100(0x24d)]=_0x1fbdb7,this[_0x386100(0x21f)]=_0x344813,this['_configService']=_0x35b20e;const {..._0x30d377}=_0x3be0b2[_0x386100(0x24a)]({},_0x1b934c,this[_0x386100(0x24d)]);this[_0x386100(0x20e)]['setConfig'](_0x14ce47,_0x30d377);}[_0x5cb4cf(0x230)](){const _0x230bf8=_0x5cb4cf;[[_0x1ce46e],[_0x4a9f6b],[_0x31466a]][_0x230bf8(0x255)](_0x554b4a=>{const _0x12ee52=_0x230bf8;this[_0x12ee52(0x21f)][_0x12ee52(0x249)](_0x554b4a);});}['onReady'](){const _0x5af577=_0x5cb4cf;this[_0x5af577(0x21f)][_0x5af577(0x1f7)](_0x4a9f6b),this[_0x5af577(0x21f)][_0x5af577(0x1f7)](_0x31466a);}},_0x37248b(_0x542128[_0x5cb4cf(0x1f9)],'pluginName',_0x1aec9b),_0x37248b(_0x542128['UniverThreadCommentDataSourcePlugin'],_0x5cb4cf(0x220),_0x3be0b2['UniverInstanceType']['UNIVER_UNKNOWN']),_0x542128['UniverThreadCommentDataSourcePlugin']=_0x4304b9([_0x3be0b2[_0x5cb4cf(0x256)](_0x57a4fa[_0x5cb4cf(0x1fd)],_0x11ff7d[_0x5cb4cf(0x236)],_0x4e769e[_0x5cb4cf(0x244)]),_0x18619d(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2['Injector'])),_0x18619d(0x2,_0x3be0b2[_0x5cb4cf(0x268)])],_0x542128['UniverThreadCommentDataSourcePlugin']),Object[_0x5cb4cf(0x205)](_0x542128,Symbol['toStringTag'],{'value':_0x5cb4cf(0x215)});}));
1
+ (function(_0x1d8798,_0x28aea5){const _0x5ae101=_0x40ee,_0xa9b065=_0x1d8798();while(!![]){try{const _0x167d95=-parseInt(_0x5ae101(0x105))/0x1+-parseInt(_0x5ae101(0x11c))/0x2*(-parseInt(_0x5ae101(0x143))/0x3)+parseInt(_0x5ae101(0x10a))/0x4+-parseInt(_0x5ae101(0x11a))/0x5+-parseInt(_0x5ae101(0xd9))/0x6*(-parseInt(_0x5ae101(0x134))/0x7)+-parseInt(_0x5ae101(0x121))/0x8+parseInt(_0x5ae101(0x103))/0x9;if(_0x167d95===_0x28aea5)break;else _0xa9b065['push'](_0xa9b065['shift']());}catch(_0x5024b5){_0xa9b065['push'](_0xa9b065['shift']());}}}(_0x20fa,0xb9f4b),function(_0x34f2bd,_0x1724d8){const _0x2170da=_0x40ee;typeof exports==_0x2170da(0x100)&&typeof module<'u'?_0x1724d8(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x2170da(0xe9),_0x2170da(0x11d),'@univerjs-pro/license','@univerjs/core',_0x2170da(0xff),_0x2170da(0xf8),_0x2170da(0x130),_0x2170da(0xe5)],_0x1724d8):(_0x34f2bd=typeof globalThis<'u'?globalThis:_0x34f2bd||self,_0x1724d8(_0x34f2bd[_0x2170da(0xe1)]={},_0x34f2bd['UniverProCollaborationClient'],_0x34f2bd['UniverProLicense'],_0x34f2bd[_0x2170da(0xda)],_0x34f2bd['UniverThreadCommentUi'],_0x34f2bd[_0x2170da(0x114)],_0x34f2bd[_0x2170da(0x130)],_0x34f2bd['UniverNetwork']));}(this,function(_0x4c7cd7,_0x2d5994,_0x5bcd5c,_0x35dc7d,_0x564085,_0x5f4c25,_0x4d2593,_0x16bd52){'use strict';const _0x15015b=_0x40ee;const _0x3d9bb4=_0x15015b(0xe2);var _0x3fcd43=(_0x484ae5=>(_0x484ae5[_0x484ae5[_0x15015b(0x144)]=0x0]='OpenOrReOpen',_0x484ae5[_0x484ae5['Solved']=0x1]=_0x15015b(0x135),_0x484ae5[_0x484ae5[_0x15015b(0x104)]=-0x1]=_0x15015b(0x104),_0x484ae5))(_0x3fcd43||{}),_0x17088c=(_0x5b58f9=>(_0x5b58f9[_0x5b58f9['Unknown']=0x0]=_0x15015b(0xf2),_0x5b58f9[_0x5b58f9[_0x15015b(0xd7)]=0x1]=_0x15015b(0xd7),_0x5b58f9[_0x5b58f9['Reply']=0x2]=_0x15015b(0xf4),_0x5b58f9[_0x5b58f9[_0x15015b(0x14c)]=0x3]=_0x15015b(0x14c),_0x5b58f9[_0x5b58f9['Delete']=0x4]=_0x15015b(0x116),_0x5b58f9[_0x5b58f9[_0x15015b(0x137)]=0x5]=_0x15015b(0x137),_0x5b58f9[_0x5b58f9[_0x15015b(0x104)]=-0x1]=_0x15015b(0x104),_0x5b58f9))(_0x17088c||{});const _0x3c4352=_0x291c2e=>_0x35dc7d['dayjs'](new Date(+_0x291c2e))[_0x15015b(0x14a)](_0x15015b(0x123)),_0x29cc28=async(_0x3aae23,_0x239ce2)=>{const _0x544198=_0x15015b,_0x15e460=_0x3aae23[_0x544198(0xdf)](_0x35dc7d[_0x544198(0xdd)]),_0x2323d0=_0x3aae23[_0x544198(0xdf)](_0x16bd52[_0x544198(0xfa)]);_0x239ce2[_0x544198(0xf3)](_0xc2a973=>{const _0x3544a=_0x544198;_0x15e460['getUser'](_0xc2a973)&&_0x239ce2[_0x3544a(0xf1)](_0xc2a973);}),_0x239ce2[_0x544198(0x10c)]&&(await _0x2323d0[_0x544198(0xdf)](_0x544198(0x112),{'params':{'userIDs':[..._0x239ce2]}}))[_0x544198(0xfc)][_0x544198(0x10e)]['forEach'](_0x3f2140=>{const _0x4ec464=_0x544198;_0x3f2140&&_0x15e460[_0x4ec464(0xf0)](_0x3f2140);});};var _0x1593d1=Object[_0x15015b(0xd4)],_0x4a9f54=(_0x17280a,_0x52d324,_0x308252,_0x133035)=>{const _0x3a1486=_0x15015b;for(var _0x33216c=_0x133035>0x1?void 0x0:_0x133035?_0x1593d1(_0x52d324,_0x308252):_0x52d324,_0xf9cf3b=_0x17280a[_0x3a1486(0x11e)]-0x1,_0x5d7f3b;_0xf9cf3b>=0x0;_0xf9cf3b--)(_0x5d7f3b=_0x17280a[_0xf9cf3b])&&(_0x33216c=_0x5d7f3b(_0x33216c)||_0x33216c);return _0x33216c;},_0x2abb1e=(_0x1899e2,_0x3d755a)=>(_0x1e84e1,_0x161f69)=>_0x3d755a(_0x1e84e1,_0x161f69,_0x1899e2);let _0x516e59=class extends _0x35dc7d[_0x15015b(0x10f)]{constructor(_0x2fd134,_0x46b857,_0x3c9230,_0x59d966){const _0x4e3277=_0x15015b;super(),this[_0x4e3277(0x12f)]=_0x2fd134,this['_threadCommentModel']=_0x46b857,this[_0x4e3277(0xea)]=_0x3c9230,this['_injector']=_0x59d966,this[_0x4e3277(0xd5)](),this['_initUserSync']();}[_0x15015b(0xd2)](){const _0x4bbf2b=_0x15015b;this['disposeWithMe'](this[_0x4bbf2b(0x133)][_0x4bbf2b(0xdc)]['pipe'](_0x4d2593[_0x4bbf2b(0x129)](0x10))['subscribe'](_0x5c4313=>{const _0x266960=_0x4bbf2b,_0x874bf4=new Set();_0x5c4313[_0x266960(0xf3)](_0x3742b6=>{const _0x5dda26=_0x266960;switch(_0x3742b6[_0x5dda26(0xd3)]){case _0x5dda26(0xd6):{const _0x493ee7=_0x3742b6[_0x5dda26(0x136)][_0x5dda26(0x145)];_0x874bf4[_0x5dda26(0xd6)](_0x493ee7);break;}}}),_0x29cc28(this[_0x266960(0x119)],_0x874bf4);}));}[_0x15015b(0xd5)](){const _0x4694fa=_0x15015b;this[_0x4694fa(0x14e)](this[_0x4694fa(0x12f)][_0x4694fa(0xdc)][_0x4694fa(0x110)](async _0x2be083=>{const _0x1d624f=_0x4694fa;var _0x452611,_0x31fb94,_0x28e4a3,_0x2f2cd0;const _0x1275b1=(_0x452611=this[_0x1d624f(0x133)][_0x1d624f(0x111)](_0x2be083[_0x1d624f(0x13e)])[_0x1d624f(0x118)](_0x398f02=>_0x398f02[_0x1d624f(0x13a)]===_0x2be083['threadId']))==null?void 0x0:_0x452611['root'];if(!_0x1275b1)return;const {unitId:_0x3ca67c,subUnitId:_0x31e06d}=_0x1275b1;switch(_0x2be083['user']&&this[_0x1d624f(0xea)][_0x1d624f(0xf0)](_0x2be083[_0x1d624f(0x12d)]),_0x2be083[_0x1d624f(0xd3)]){case _0x17088c['Add']:break;case _0x17088c[_0x1d624f(0xf4)]:{this[_0x1d624f(0x133)][_0x1d624f(0x125)](_0x3ca67c,_0x31e06d,{'unitId':_0x3ca67c,'subUnitId':_0x31e06d,'ref':'','id':_0x2be083[_0x1d624f(0x107)],'dT':_0x3c4352(+_0x2be083[_0x1d624f(0x127)]),'threadId':_0x2be083[_0x1d624f(0x13a)],'personId':(_0x28e4a3=(_0x31fb94=_0x2be083[_0x1d624f(0x12d)])==null?void 0x0:_0x31fb94[_0x1d624f(0xe6)])!=null?_0x28e4a3:_0x2be083[_0x1d624f(0xfb)],'text':JSON[_0x1d624f(0x12b)](_0x2be083[_0x1d624f(0x148)]),'parentId':_0x1275b1['id']});break;}case _0x17088c[_0x1d624f(0x116)]:{const _0x462d38=this['_threadCommentModel'][_0x1d624f(0x131)](_0x3ca67c,_0x31e06d,_0x2be083[_0x1d624f(0x107)]);_0x462d38&&_0x462d38[_0x1d624f(0xd8)]&&this[_0x1d624f(0x133)]['deleteComment'](_0x3ca67c,_0x31e06d,_0x2be083[_0x1d624f(0x107)]);break;}case _0x17088c[_0x1d624f(0x14c)]:{this['_threadCommentModel'][_0x1d624f(0x120)](_0x3ca67c,_0x31e06d,{'commentId':_0x2be083[_0x1d624f(0x107)],'text':JSON[_0x1d624f(0x12b)](_0x2be083[_0x1d624f(0x148)])});break;}case _0x17088c[_0x1d624f(0x137)]:{const _0x59f7aa=(_0x2f2cd0=this[_0x1d624f(0x133)][_0x1d624f(0x111)](_0x2be083[_0x1d624f(0x13e)])[_0x1d624f(0x118)](_0x41a484=>_0x41a484[_0x1d624f(0x13a)]===_0x2be083[_0x1d624f(0x13a)]))==null?void 0x0:_0x2f2cd0[_0x1d624f(0x141)];_0x59f7aa&&this[_0x1d624f(0x133)][_0x1d624f(0x13b)](_0x3ca67c,_0x31e06d,_0x59f7aa['id'],_0x2be083[_0x1d624f(0x13d)]===_0x3fcd43[_0x1d624f(0x135)]);break;}}}));}};_0x516e59=_0x4a9f54([_0x2abb1e(0x0,_0x35dc7d['Inject'](_0x2d5994[_0x15015b(0x12c)])),_0x2abb1e(0x1,_0x35dc7d[_0x15015b(0x101)](_0x5f4c25[_0x15015b(0xec)])),_0x2abb1e(0x2,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0xdd)])),_0x2abb1e(0x3,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0x140)]))],_0x516e59);const _0x260143=_0x15015b(0x14b),_0xa24d8={};var _0x1b3816=Object['getOwnPropertyDescriptor'],_0x240f12=(_0x3c8a91,_0x50ceb3,_0x175f6a,_0x45495d)=>{const _0x1c282d=_0x15015b;for(var _0x89cddf=_0x45495d>0x1?void 0x0:_0x45495d?_0x1b3816(_0x50ceb3,_0x175f6a):_0x50ceb3,_0x18b19d=_0x3c8a91[_0x1c282d(0x11e)]-0x1,_0x5bf163;_0x18b19d>=0x0;_0x18b19d--)(_0x5bf163=_0x3c8a91[_0x18b19d])&&(_0x89cddf=_0x5bf163(_0x89cddf)||_0x89cddf);return _0x89cddf;},_0x51564c=(_0x5e969d,_0x5a9755)=>(_0x1aee62,_0x2bc3f4)=>_0x5a9755(_0x1aee62,_0x2bc3f4,_0x5e969d);function _0x3232be(_0x241ad2,_0x3db7e2){const _0x3ead38=_0x15015b,_0x397b47=_0x241ad2[_0x3ead38(0x142)][0x0];return{..._0x3db7e2,'id':_0x397b47[_0x3ead38(0x107)],'resolved':_0x241ad2[_0x3ead38(0x13d)]===0x1,'dT':_0x3c4352(_0x397b47[_0x3ead38(0x127)]),'personId':_0x397b47['userId'],'threadId':_0x397b47[_0x3ead38(0x13a)]};}function _0x265f9f(_0xc6bfb2,_0xbc977f,_0x4892f1){const _0x14908b=_0x15015b;var _0x30223b,_0x2527ce;if(((_0x2527ce=(_0x30223b=_0xc6bfb2==null?void 0x0:_0xc6bfb2[_0x14908b(0x142)])==null?void 0x0:_0x30223b[_0x14908b(0x11e)])!=null?_0x2527ce:0x0)>0x0){const _0x3887ef=(_0x495355,_0x4af366)=>({'id':_0x495355[_0x14908b(0x107)],'threadId':_0x495355[_0x14908b(0x13a)],'dT':_0x3c4352(_0x495355['createTimestamp']),'personId':_0x495355[_0x14908b(0xfb)],'resolved':_0xc6bfb2['solved']===_0x3fcd43[_0x14908b(0x135)],'unitId':_0xbc977f,'subUnitId':_0x4892f1,'text':JSON[_0x14908b(0x12b)](_0x495355[_0x14908b(0x148)]),'parentId':_0x4af366}),_0x3a8309=_0x3887ef(_0xc6bfb2[_0x14908b(0x142)][0x0]);return{..._0x3a8309,'children':_0xc6bfb2[_0x14908b(0x142)]['slice'](0x1)[_0x14908b(0xef)](_0x5c062d=>_0x3887ef(_0x5c062d,_0x3a8309['id']))};}return null;}let _0x36f2f2=class{constructor(_0x5da468,_0x1745d7,_0x1615b8){const _0x4b4726=_0x15015b;this['_httpService']=_0x5da468,this[_0x4b4726(0xea)]=_0x1745d7,this[_0x4b4726(0xfd)]=_0x1615b8;}async[_0x15015b(0x125)](_0x49b8fd){const _0xcf72b9=_0x15015b;var _0x4284e2,_0x5d148f;const {parentId:_0x3e6a9e,unitId:_0x2970f3,text:_0x3628df,threadId:_0x414fdc}=_0x49b8fd,_0x1a9153=(_0x5d148f=(_0x4284e2=_0x3628df['customRanges'])==null?void 0x0:_0x4284e2[_0xcf72b9(0xee)](_0x2a0c5c=>_0x2a0c5c[_0xcf72b9(0x122)]===_0x35dc7d[_0xcf72b9(0x124)]['COMMENT'])['map'](_0x50d4d8=>_0x50d4d8[_0xcf72b9(0xd1)]))!=null?_0x5d148f:[],_0x4fb88a=JSON[_0xcf72b9(0x13c)](_0x3628df),_0x168990=(await this['_sessionService'][_0xcf72b9(0x12e)](_0x2970f3))[_0xcf72b9(0x11f)]();if(_0x3e6a9e){const _0xd228ef={'memberId':_0x168990,'unitId':_0x2970f3,'content':_0x4fb88a,'mention':_0x1a9153,'threadId':_0x414fdc},_0x2181ec=(await this[_0xcf72b9(0xde)][_0xcf72b9(0xeb)]('/universer-api/comment/unit/'+_0x2970f3+_0xcf72b9(0xe8),{'body':_0xd228ef}))[_0xcf72b9(0xfc)]['reply'];return{..._0x49b8fd,'id':_0x2181ec[_0xcf72b9(0x107)],'dT':_0x35dc7d[_0xcf72b9(0x10b)](+_0x2181ec[_0xcf72b9(0x127)])[_0xcf72b9(0x14a)](_0xcf72b9(0x123)),'personId':_0x2181ec[_0xcf72b9(0xfb)]};}else{const _0x3dd9ee={'memberId':_0x168990,'unitId':_0x2970f3,'content':_0x4fb88a,'mention':_0x1a9153},_0x4dcb9d=await this['_httpService'][_0xcf72b9(0xeb)](_0xcf72b9(0x13f)+_0x2970f3+_0xcf72b9(0x128),{'body':_0x3dd9ee});return _0x3232be(_0x4dcb9d['body'][_0xcf72b9(0x139)],_0x49b8fd);}}async[_0x15015b(0x120)](_0x4d5a87){const _0x1d339d=_0x15015b;var _0x2ab6b4,_0x27bdbd;const {text:_0x1c8f10,unitId:_0x47a094}=_0x4d5a87,_0x5689b4=(_0x27bdbd=(_0x2ab6b4=_0x1c8f10['customRanges'])==null?void 0x0:_0x2ab6b4[_0x1d339d(0xee)](_0xf67312=>_0xf67312[_0x1d339d(0x122)]===_0x35dc7d[_0x1d339d(0x124)][_0x1d339d(0xf7)])[_0x1d339d(0xef)](_0x15cd69=>_0x15cd69[_0x1d339d(0xd1)]))!=null?_0x27bdbd:[],_0x25af08=JSON[_0x1d339d(0x13c)](_0x1c8f10),_0x371cda=_0x4d5a87[_0x1d339d(0x13a)],_0x522bea=_0x4d5a87['id'],_0x3456db={'memberId':(await this[_0x1d339d(0xfd)][_0x1d339d(0x12e)](_0x47a094))[_0x1d339d(0x11f)](),'unitId':_0x47a094,'threadId':_0x371cda,'mention':_0x5689b4,'content':_0x25af08,'replyId':_0x522bea},_0x125769=await this[_0x1d339d(0xde)][_0x1d339d(0xeb)]('/universer-api/comment/unit/'+_0x47a094+_0x1d339d(0x12a),{'body':_0x3456db});return!_0x125769['body'][_0x1d339d(0x106)]||_0x125769[_0x1d339d(0xfc)]['error'][_0x1d339d(0xed)]===0x1;}async[_0x15015b(0x13b)](_0x1a173b){const _0x6e6663=_0x15015b,{unitId:_0x5d1f13}=_0x1a173b,_0x21733f=_0x1a173b[_0x6e6663(0x13a)],_0xaab5ca={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x5d1f13,'threadId':_0x21733f,'solved':_0x1a173b['resolved']?_0x3fcd43[_0x6e6663(0x135)]:_0x3fcd43[_0x6e6663(0x144)]},_0x397ce4=await this[_0x6e6663(0xde)][_0x6e6663(0xeb)](_0x6e6663(0x13f)+_0x5d1f13+_0x6e6663(0xe3),{'body':_0xaab5ca});return!_0x397ce4[_0x6e6663(0xfc)][_0x6e6663(0x106)]||_0x397ce4[_0x6e6663(0xfc)][_0x6e6663(0x106)][_0x6e6663(0xed)]===0x1;}async[_0x15015b(0x147)](_0x5d1a6d,_0x55c6c4,_0x44471b,_0x205517){const _0x4e40e9=_0x15015b,_0xf73b64={'memberId':(await this[_0x4e40e9(0xfd)]['requireSession'](_0x5d1a6d))[_0x4e40e9(0x11f)](),'threadId':_0x44471b,'replyId':_0x205517,'unitId':_0x5d1a6d},_0xcc5e79=await this[_0x4e40e9(0xde)][_0x4e40e9(0xeb)](_0x4e40e9(0x13f)+_0x5d1a6d+_0x4e40e9(0xdb),{'body':_0xf73b64});return!_0xcc5e79['body'][_0x4e40e9(0x106)]||_0xcc5e79[_0x4e40e9(0xfc)][_0x4e40e9(0x106)][_0x4e40e9(0xed)]===0x1;}async['listComments'](_0x50d5bb,_0x33c7b2,_0x12e6af){const _0xe9ce3f=_0x15015b,_0x190ea7={'unitId':_0x50d5bb,'threadId':_0x12e6af},_0x3fc1be=await this['_httpService'][_0xe9ce3f(0xeb)](_0xe9ce3f(0x13f)+_0x50d5bb+'/list',{'body':_0x190ea7}),_0x251b65=_0x12e6af[_0xe9ce3f(0xef)](_0x59b9ec=>_0x265f9f(_0x3fc1be[_0xe9ce3f(0xfc)][_0xe9ce3f(0x146)][_0x59b9ec],_0x50d5bb,_0x33c7b2))[_0xe9ce3f(0xee)](Boolean);return Object[_0xe9ce3f(0x14d)](_0x3fc1be[_0xe9ce3f(0xfc)][_0xe9ce3f(0x10e)])[_0xe9ce3f(0xf3)](_0x3ee570=>{const _0x2ebb25=_0xe9ce3f;this[_0x2ebb25(0xea)][_0x2ebb25(0xf0)](_0x3ee570);}),_0x251b65;}[_0x15015b(0x102)](_0x140654){const _0x1f4375=_0x15015b;return{'id':_0x140654['id'],'threadId':_0x140654[_0x1f4375(0x13a)],'ref':_0x140654['ref']};}};_0x36f2f2=_0x240f12([_0x51564c(0x0,_0x35dc7d[_0x15015b(0x101)](_0x16bd52[_0x15015b(0xfa)])),_0x51564c(0x1,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0xdd)])),_0x51564c(0x2,_0x35dc7d[_0x15015b(0x101)](_0x2d5994['CollaborationSessionService']))],_0x36f2f2);var _0x4224f1=Object[_0x15015b(0xd4)],_0x558249=(_0x3c2f4b,_0x286f7b,_0x54c5b3,_0x4de0e7)=>{const _0x38f2a3=_0x15015b;for(var _0x34c497=_0x4de0e7>0x1?void 0x0:_0x4de0e7?_0x4224f1(_0x286f7b,_0x54c5b3):_0x286f7b,_0x174e7b=_0x3c2f4b[_0x38f2a3(0x11e)]-0x1,_0x15ee0f;_0x174e7b>=0x0;_0x174e7b--)(_0x15ee0f=_0x3c2f4b[_0x174e7b])&&(_0x34c497=_0x15ee0f(_0x34c497)||_0x34c497);return _0x34c497;},_0x4dc30b=(_0x18817b,_0x418121)=>(_0x31731a,_0x366727)=>_0x418121(_0x31731a,_0x366727,_0x18817b);let _0x49d7cd=class extends _0x35dc7d[_0x15015b(0x10f)]{constructor(_0x83f409,_0x50ec50){const _0x8029c7=_0x15015b;super(),this[_0x8029c7(0x109)]=_0x83f409,this[_0x8029c7(0x149)]=_0x50ec50,this[_0x8029c7(0x11b)]();}[_0x15015b(0x11b)](){const _0x465f3e=_0x15015b;this[_0x465f3e(0x109)]['dataSource']=this[_0x465f3e(0x149)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x49d7cd=_0x558249([_0x4dc30b(0x0,_0x5f4c25['IThreadCommentDataSourceService']),_0x4dc30b(0x1,_0x35dc7d['Inject'](_0x36f2f2))],_0x49d7cd);var _0x4cf2c1=Object['defineProperty'],_0x24f466=Object[_0x15015b(0xd4)],_0x3300b2=(_0x3bce12,_0x5edaa1,_0x92b56f)=>_0x5edaa1 in _0x3bce12?_0x4cf2c1(_0x3bce12,_0x5edaa1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x92b56f}):_0x3bce12[_0x5edaa1]=_0x92b56f,_0x54f16f=(_0x1ff9f0,_0x4b09b4,_0x18604d,_0x1fbfa8)=>{const _0x479930=_0x15015b;for(var _0x50a84c=_0x1fbfa8>0x1?void 0x0:_0x1fbfa8?_0x24f466(_0x4b09b4,_0x18604d):_0x4b09b4,_0x1cd747=_0x1ff9f0[_0x479930(0x11e)]-0x1,_0x3f22cf;_0x1cd747>=0x0;_0x1cd747--)(_0x3f22cf=_0x1ff9f0[_0x1cd747])&&(_0x50a84c=_0x3f22cf(_0x50a84c)||_0x50a84c);return _0x50a84c;},_0x30b072=(_0x3e795c,_0x2d3670)=>(_0x5ecf0b,_0x5c9dc4)=>_0x2d3670(_0x5ecf0b,_0x5c9dc4,_0x3e795c),_0x4f482f=(_0x4c069e,_0x47ef09,_0x54ba97)=>_0x3300b2(_0x4c069e,typeof _0x47ef09!=_0x15015b(0x138)?_0x47ef09+'':_0x47ef09,_0x54ba97);_0x4c7cd7[_0x15015b(0xe0)]=class extends _0x35dc7d[_0x15015b(0xf6)]{constructor(_0x499924=_0xa24d8,_0x294384,_0x29e110){const _0x3deb1=_0x15015b;super(),this[_0x3deb1(0xf9)]=_0x499924,this['_injector']=_0x294384,this[_0x3deb1(0x113)]=_0x29e110;const {..._0x292125}=_0x35dc7d['merge']({},_0xa24d8,this[_0x3deb1(0xf9)]);this['_configService'][_0x3deb1(0x115)](_0x260143,_0x292125);}[_0x15015b(0x10d)](){const _0x18bf93=_0x15015b;[[_0x36f2f2],[_0x49d7cd],[_0x516e59]][_0x18bf93(0xf3)](_0x3c35ed=>{const _0x25896e=_0x18bf93;this[_0x25896e(0x119)]['add'](_0x3c35ed);});}['onReady'](){const _0x5c3919=_0x15015b;this['_injector']['get'](_0x49d7cd),this[_0x5c3919(0x119)]['get'](_0x516e59);}},_0x4f482f(_0x4c7cd7[_0x15015b(0xe0)],'pluginName',_0x3d9bb4),_0x4f482f(_0x4c7cd7[_0x15015b(0xe0)],_0x15015b(0xd3),_0x35dc7d['UniverInstanceType'][_0x15015b(0x117)]),_0x4c7cd7[_0x15015b(0xe0)]=_0x54f16f([_0x35dc7d[_0x15015b(0xe4)](_0x564085[_0x15015b(0x132)],_0x2d5994['UniverCollaborationClientPlugin'],_0x5bcd5c[_0x15015b(0x126)]),_0x30b072(0x1,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0x140)])),_0x30b072(0x2,_0x35dc7d[_0x15015b(0x108)])],_0x4c7cd7[_0x15015b(0xe0)]),Object[_0x15015b(0xe7)](_0x4c7cd7,Symbol[_0x15015b(0xf5)],{'value':_0x15015b(0xfe)});}));function _0x40ee(_0x22a5ee,_0x499ca3){const _0x20fa16=_0x20fa();return _0x40ee=function(_0x40eeb1,_0x2b44fc){_0x40eeb1=_0x40eeb1-0xd1;let _0x680306=_0x20fa16[_0x40eeb1];return _0x680306;},_0x40ee(_0x22a5ee,_0x499ca3);}function _0x20fa(){const _0x444878=['COMMENT','@univerjs/thread-comment','_config','HTTPService','userId','body','_sessionService','Module','@univerjs/thread-comment-ui','object','Inject','saveCommentToSnapshot','2117628GpJLji','UNRECOGNIZED','533564NNnqkw','error','replyId','IConfigService','_threadCommentDataSourceService','3136324LYRpSa','dayjs','size','onStarting','users','Disposable','subscribe','getUnit','/universer-api/user/list','_configService','UniverThreadComment','setConfig','Delete','UNIVER_UNKNOWN','find','_injector','1962940WlkeqY','_initDataSource','1220wkqlvw','@univerjs-pro/collaboration-client','length','getMemberID','updateComment','8884208ESbWYi','rangeType','YYYY/MM/DD\x20HH:mm','CustomRangeType','addComment','UniverLicensePlugin','createTimestamp','/add','bufferTime','/edit','parse','CommentService','user','requireSession','_commentService','rxjs','getComment','UniverThreadCommentUIPlugin','_threadCommentModel','7VlZRvd','Solved','payload','Solve','symbol','comment','threadId','resolveComment','stringify','solved','unitId','/universer-api/comment/unit/','Injector','root','replies','4509xBQtsX','OpenOrReOpen','personId','comments','deleteComment','content','_threadCommentDataSource','format','thread-comment-data-source.config','Edit','values','disposeWithMe','rangeId','_initUserSync','type','getOwnPropertyDescriptor','_init','add','Add','parentId','5172900mktqnj','UniverCore','/delete','commentUpdate$','UserManagerService','_httpService','get','UniverThreadCommentDataSourcePlugin','UniverProThreadCommentDatasource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','DependentOn','@univerjs/network','userID','defineProperty','/reply','exports','_userService','post','ThreadCommentModel','code','filter','map','addUser','delete','Unknown','forEach','Reply','toStringTag','Plugin'];_0x20fa=function(){return _0x444878;};return _0x20fa();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.7-nightly.202509090319",
3
+ "version": "0.10.7-nightly.202509130640",
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.10.7-nightly.202509090319",
49
- "@univerjs-pro/license": "0.10.7-nightly.202509090319",
50
- "@univerjs/network": "0.10.7-nightly.202509090319",
51
- "@univerjs/core": "0.10.7-nightly.202509090319",
48
+ "@univerjs-pro/collaboration-client": "0.10.7-nightly.202509130640",
49
+ "@univerjs-pro/license": "0.10.7-nightly.202509130640",
50
+ "@univerjs/core": "0.10.7-nightly.202509130640",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.10.7-nightly.202509090319",
54
- "@univerjs/thread-comment-ui": "0.10.7-nightly.202509090319"
52
+ "@univerjs/network": "0.10.7-nightly.202509130640",
53
+ "@univerjs/thread-comment-ui": "0.10.7-nightly.202509130640",
54
+ "@univerjs/thread-comment": "0.10.7-nightly.202509130640"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",