@univerjs-pro/thread-comment-datasource 0.6.4 → 0.6.5-nightly.202503131607

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 _0x5b4944=_0x515c;(function(_0x332033,_0x30fdad){const _0x147e5c=_0x515c,_0x43447c=_0x332033();while(!![]){try{const _0x1937cd=-parseInt(_0x147e5c(0x1a8))/0x1+parseInt(_0x147e5c(0x17c))/0x2+parseInt(_0x147e5c(0x180))/0x3*(parseInt(_0x147e5c(0x1f6))/0x4)+parseInt(_0x147e5c(0x1c4))/0x5+-parseInt(_0x147e5c(0x1b9))/0x6+parseInt(_0x147e5c(0x1da))/0x7+-parseInt(_0x147e5c(0x1a2))/0x8;if(_0x1937cd===_0x30fdad)break;else _0x43447c['push'](_0x43447c['shift']());}catch(_0x28530b){_0x43447c['push'](_0x43447c['shift']());}}}(_0x1a14,0xb4036));Object[_0x5b4944(0x1be)](exports,Symbol[_0x5b4944(0x1f1)],{'value':_0x5b4944(0x1ba)});const b=require(_0x5b4944(0x1c1)),T=require(_0x5b4944(0x1f3)),c=require('@univerjs/core'),j=require(_0x5b4944(0x18e)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x5b4944(0x1e1)),U=_0x5b4944(0x1c3);var I=(_0x5b92a0=>(_0x5b92a0[_0x5b92a0[_0x5b4944(0x1fb)]=0x0]=_0x5b4944(0x1fb),_0x5b92a0[_0x5b92a0['Solved']=0x1]=_0x5b4944(0x19f),_0x5b92a0[_0x5b92a0[_0x5b4944(0x1a3)]=-0x1]=_0x5b4944(0x1a3),_0x5b92a0))(I||{}),v=(_0x3eb117=>(_0x3eb117[_0x3eb117[_0x5b4944(0x18d)]=0x0]=_0x5b4944(0x18d),_0x3eb117[_0x3eb117[_0x5b4944(0x1d1)]=0x1]='Add',_0x3eb117[_0x3eb117[_0x5b4944(0x1a6)]=0x2]=_0x5b4944(0x1a6),_0x3eb117[_0x3eb117['Edit']=0x3]=_0x5b4944(0x1dd),_0x3eb117[_0x3eb117[_0x5b4944(0x1ee)]=0x4]=_0x5b4944(0x1ee),_0x3eb117[_0x3eb117['Solve']=0x5]=_0x5b4944(0x18a),_0x3eb117[_0x3eb117['UNRECOGNIZED']=-0x1]=_0x5b4944(0x1a3),_0x3eb117))(v||{});function _0x1a14(){const _0x50facb=['dayjs','saveCommentToSnapshot','Inject','_threadCommentModel','UniverThreadCommentUIPlugin','UniverCollaborationClientPlugin','subscribe','UniverLicensePlugin','root','6017670Xdgyfs','Module','_userService','onStarting','UserManagerService','defineProperty','_initUserSync','/delete','@univerjs-pro/collaboration-client','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6145numINv','map','IThreadCommentDataSourceService','IConfigService','bufferTime','format','_threadCommentDataSourceService','setConfig','_initDataSource','body','UniverInstanceType','dataSource','pluginName','Add','ThreadCommentModel','get','HTTPService','resolved','/universer-api/user/list','getUser','stringify','userId','9629613VDEbBN','users','getOwnPropertyDescriptor','Edit','pipe','COMMENT','threadId','@univerjs/network','addComment','error','values','find','delete','updateComment','size','CommentService','_config','addUser','/solved','unitId','Delete','slice','_httpService','toStringTag','parse','@univerjs-pro/license','filter','content','17116oPFWWf','resolveComment','_configService','getComment','replyId','OpenOrReOpen','user','listComments','post','ref','1339530LAKqgK','parentId','solved','Injector','687RZbtRU','createTimestamp','syncUpdateMutationToColla','replies','disposeWithMe','requireSession','_init','customRanges','CustomRangeType','/list','Solve','_commentService','getMemberID','Unknown','@univerjs/thread-comment-ui','commentUpdate$','/universer-api/comment/unit/','_sessionService','rangeType','forEach','UNIVER_UNKNOWN','/add','comment','personId','Disposable','_threadCommentDataSource','Plugin','getUnit','reply','add','length','Solved','code','DependentOn','2471896hjWNvU','UNRECOGNIZED','/edit','_injector','Reply','/reply','977278pTKpBS','CollaborationSessionService','deleteComment','symbol','UniverThreadCommentDataSourcePlugin','comments','rangeId','YYYY/MM/DD\x20HH:mm'];_0x1a14=function(){return _0x50facb;};return _0x1a14();}const f=_0x5b729e=>c['dayjs'](new Date(+_0x5b729e))['format'](_0x5b4944(0x1af)),R=async(_0x265582,_0xcf7fa2)=>{const _0x51062e=_0x5b4944,_0x483076=_0x265582[_0x51062e(0x1d3)](c[_0x51062e(0x1bd)]),_0x52d261=_0x265582[_0x51062e(0x1d3)](P['HTTPService']);_0xcf7fa2['forEach'](_0x4cb5ea=>{const _0x2fc242=_0x51062e;_0x483076[_0x2fc242(0x1d7)](_0x4cb5ea)&&_0xcf7fa2[_0x2fc242(0x1e6)](_0x4cb5ea);}),_0xcf7fa2[_0x51062e(0x1e8)]&&(await _0x52d261[_0x51062e(0x1d3)](_0x51062e(0x1d6),{'params':{'userIDs':[..._0xcf7fa2]}}))[_0x51062e(0x1cd)][_0x51062e(0x1db)][_0x51062e(0x193)](_0x154b36=>{const _0x2907ae=_0x51062e;_0x154b36&&_0x483076[_0x2907ae(0x1eb)](_0x154b36);});};var $=Object[_0x5b4944(0x1dc)],E=(_0x3406f4,_0xea2513,_0x2b524a,_0x417162)=>{const _0x5a4a41=_0x5b4944;for(var _0x22ba1e=_0x417162>0x1?void 0x0:_0x417162?$(_0xea2513,_0x2b524a):_0xea2513,_0x5ddf42=_0x3406f4[_0x5a4a41(0x19e)]-0x1,_0xfb231a;_0x5ddf42>=0x0;_0x5ddf42--)(_0xfb231a=_0x3406f4[_0x5ddf42])&&(_0x22ba1e=_0xfb231a(_0x22ba1e)||_0x22ba1e);return _0x22ba1e;},S=(_0x5c60ea,_0x691d1b)=>(_0x2adbc8,_0x5b337c)=>_0x691d1b(_0x2adbc8,_0x5b337c,_0x5c60ea);let p=class extends c['Disposable']{constructor(_0x4bde17,_0x2da715,_0x5688e0,_0x1b71a7){const _0x4135c0=_0x5b4944;super(),this[_0x4135c0(0x18b)]=_0x4bde17,this[_0x4135c0(0x1b3)]=_0x2da715,this[_0x4135c0(0x1bb)]=_0x5688e0,this[_0x4135c0(0x1a5)]=_0x1b71a7,this[_0x4135c0(0x186)](),this[_0x4135c0(0x1bf)]();}[_0x5b4944(0x1bf)](){const _0x3c1687=_0x5b4944;this[_0x3c1687(0x184)](this['_threadCommentModel'][_0x3c1687(0x18f)][_0x3c1687(0x1de)](w[_0x3c1687(0x1c8)](0x10))[_0x3c1687(0x1b6)](_0x58d643=>{const _0x23c484=_0x3c1687,_0x5bd303=new Set();_0x58d643['forEach'](_0x471862=>{const _0x11d80f=_0x515c;switch(_0x471862[_0x11d80f(0x1c2)]){case'add':{const _0x4db40f=_0x471862['payload'][_0x11d80f(0x197)];_0x5bd303[_0x11d80f(0x19d)](_0x4db40f);break;}}}),R(this[_0x23c484(0x1a5)],_0x5bd303);}));}['_init'](){const _0x394af5=_0x5b4944;this[_0x394af5(0x184)](this['_commentService'][_0x394af5(0x18f)][_0x394af5(0x1b6)](async _0x3cb518=>{const _0x2c3704=_0x394af5;var _0x716613,_0x34fe3c,_0x5dcdd4,_0x6c3ebf;const _0x1530aa=(_0x716613=this['_threadCommentModel'][_0x2c3704(0x19b)](_0x3cb518['unitId'])[_0x2c3704(0x1e5)](_0x5037f1=>_0x5037f1[_0x2c3704(0x1e0)]===_0x3cb518[_0x2c3704(0x1e0)]))==null?void 0x0:_0x716613[_0x2c3704(0x1b8)];if(!_0x1530aa)return;const {unitId:_0x49209b,subUnitId:_0x4431dc}=_0x1530aa;switch(_0x3cb518[_0x2c3704(0x1fc)]&&this[_0x2c3704(0x1bb)][_0x2c3704(0x1eb)](_0x3cb518[_0x2c3704(0x1fc)]),_0x3cb518[_0x2c3704(0x1c2)]){case v[_0x2c3704(0x1d1)]:break;case v[_0x2c3704(0x1a6)]:{this[_0x2c3704(0x1b3)][_0x2c3704(0x1e2)](_0x49209b,_0x4431dc,{'unitId':_0x49209b,'subUnitId':_0x4431dc,'ref':'','id':_0x3cb518['replyId'],'dT':f(+_0x3cb518[_0x2c3704(0x181)]),'threadId':_0x3cb518[_0x2c3704(0x1e0)],'personId':(_0x5dcdd4=(_0x34fe3c=_0x3cb518[_0x2c3704(0x1fc)])==null?void 0x0:_0x34fe3c['userID'])!=null?_0x5dcdd4:_0x3cb518['userId'],'text':JSON[_0x2c3704(0x1f2)](_0x3cb518[_0x2c3704(0x1f5)]),'parentId':_0x1530aa['id']});break;}case v['Delete']:{const _0x2ae398=this[_0x2c3704(0x1b3)][_0x2c3704(0x1f9)](_0x49209b,_0x4431dc,_0x3cb518[_0x2c3704(0x1fa)]);_0x2ae398&&_0x2ae398[_0x2c3704(0x17d)]&&this[_0x2c3704(0x1b3)][_0x2c3704(0x1aa)](_0x49209b,_0x4431dc,_0x3cb518['replyId']);break;}case v[_0x2c3704(0x1dd)]:{this[_0x2c3704(0x1b3)][_0x2c3704(0x1e7)](_0x49209b,_0x4431dc,{'commentId':_0x3cb518[_0x2c3704(0x1fa)],'text':JSON[_0x2c3704(0x1f2)](_0x3cb518[_0x2c3704(0x1f5)])});break;}case v[_0x2c3704(0x18a)]:{const _0x11b491=(_0x6c3ebf=this[_0x2c3704(0x1b3)][_0x2c3704(0x19b)](_0x3cb518[_0x2c3704(0x1ed)])[_0x2c3704(0x1e5)](_0x3003b0=>_0x3003b0['threadId']===_0x3cb518[_0x2c3704(0x1e0)]))==null?void 0x0:_0x6c3ebf[_0x2c3704(0x1b8)];_0x11b491&&this[_0x2c3704(0x1b3)][_0x2c3704(0x1f7)](_0x49209b,_0x4431dc,_0x11b491['id'],_0x3cb518[_0x2c3704(0x17e)]===I[_0x2c3704(0x19f)]);break;}}}));}};p=E([S(0x0,c[_0x5b4944(0x1b2)](b[_0x5b4944(0x1e9)])),S(0x1,c[_0x5b4944(0x1b2)](M[_0x5b4944(0x1d2)])),S(0x2,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x1bd)])),S(0x3,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x17f)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x5b4944(0x1dc)],x=(_0x4f8f80,_0x39d68f,_0x232d74,_0x4e67f9)=>{for(var _0xb37159=_0x4e67f9>0x1?void 0x0:_0x4e67f9?A(_0x39d68f,_0x232d74):_0x39d68f,_0x1ef799=_0x4f8f80['length']-0x1,_0x4e8b9a;_0x1ef799>=0x0;_0x1ef799--)(_0x4e8b9a=_0x4f8f80[_0x1ef799])&&(_0xb37159=_0x4e8b9a(_0xb37159)||_0xb37159);return _0xb37159;},_=(_0xe8afcd,_0x2bce7c)=>(_0x4ddd53,_0x44ffe1)=>_0x2bce7c(_0x4ddd53,_0x44ffe1,_0xe8afcd);function Y(_0x20c9f6,_0xf52310){const _0x2b1439=_0x5b4944,_0x5a7543=_0x20c9f6[_0x2b1439(0x183)][0x0];return{..._0xf52310,'id':_0x5a7543[_0x2b1439(0x1fa)],'resolved':_0x20c9f6['solved']===0x1,'dT':f(_0x5a7543[_0x2b1439(0x181)]),'personId':_0x5a7543['userId'],'threadId':_0x5a7543[_0x2b1439(0x1e0)]};}function G(_0x9b93b6,_0x397e11,_0x4cf5f9){const _0x543a6e=_0x5b4944;var _0x5e9d98,_0xf14d77;if(((_0xf14d77=(_0x5e9d98=_0x9b93b6==null?void 0x0:_0x9b93b6[_0x543a6e(0x183)])==null?void 0x0:_0x5e9d98['length'])!=null?_0xf14d77:0x0)>0x0){const _0x416871=(_0x1f7585,_0x26551d)=>({'id':_0x1f7585[_0x543a6e(0x1fa)],'threadId':_0x1f7585['threadId'],'dT':f(_0x1f7585[_0x543a6e(0x181)]),'personId':_0x1f7585[_0x543a6e(0x1d9)],'resolved':_0x9b93b6[_0x543a6e(0x17e)]===I[_0x543a6e(0x19f)],'unitId':_0x397e11,'subUnitId':_0x4cf5f9,'text':JSON[_0x543a6e(0x1f2)](_0x1f7585[_0x543a6e(0x1f5)]),'parentId':_0x26551d}),_0x3b9f3d=_0x416871(_0x9b93b6['replies'][0x0]);return{..._0x3b9f3d,'children':_0x9b93b6[_0x543a6e(0x183)][_0x543a6e(0x1ef)](0x1)[_0x543a6e(0x1c5)](_0x2bda50=>_0x416871(_0x2bda50,_0x3b9f3d['id']))};}return null;}let g=class{constructor(_0x51cc89,_0x5d52f6,_0x39bf8a,_0x5aa1aa){const _0x44dbbf=_0x5b4944;this['_httpService']=_0x51cc89,this[_0x44dbbf(0x1bb)]=_0x5d52f6,this[_0x44dbbf(0x191)]=_0x39bf8a,this['_injector']=_0x5aa1aa;}async['addComment'](_0x18787d){const _0x3dfce3=_0x5b4944;var _0x3db1b6,_0x3d54f4;const {parentId:_0x24b658,unitId:_0x149add,text:_0x5150f3,threadId:_0x356253}=_0x18787d,_0x9468f4=(_0x3d54f4=(_0x3db1b6=_0x5150f3[_0x3dfce3(0x187)])==null?void 0x0:_0x3db1b6[_0x3dfce3(0x1f4)](_0x14666f=>_0x14666f[_0x3dfce3(0x192)]===c['CustomRangeType'][_0x3dfce3(0x1df)])[_0x3dfce3(0x1c5)](_0xff3d3f=>_0xff3d3f[_0x3dfce3(0x1ae)]))!=null?_0x3d54f4:[],_0x2ac2c1=JSON[_0x3dfce3(0x1d8)](_0x5150f3),_0x11eac7=(await this['_sessionService'][_0x3dfce3(0x185)](_0x149add))[_0x3dfce3(0x18c)]();if(_0x24b658){const _0x20053d={'memberId':_0x11eac7,'unitId':_0x149add,'content':_0x2ac2c1,'mention':_0x9468f4,'threadId':_0x356253},_0x498058=(await this[_0x3dfce3(0x1f0)][_0x3dfce3(0x1fe)]('/universer-api/comment/unit/'+_0x149add+_0x3dfce3(0x1a7),{'body':_0x20053d}))[_0x3dfce3(0x1cd)][_0x3dfce3(0x19c)];return{..._0x18787d,'id':_0x498058[_0x3dfce3(0x1fa)],'dT':c[_0x3dfce3(0x1b0)](+_0x498058[_0x3dfce3(0x181)])[_0x3dfce3(0x1c9)](_0x3dfce3(0x1af)),'personId':_0x498058['userId']};}else{const _0x5106b0={'memberId':_0x11eac7,'unitId':_0x149add,'content':_0x2ac2c1,'mention':_0x9468f4},_0x2cc363=await this['_httpService'][_0x3dfce3(0x1fe)](_0x3dfce3(0x190)+_0x149add+_0x3dfce3(0x195),{'body':_0x5106b0});return Y(_0x2cc363[_0x3dfce3(0x1cd)][_0x3dfce3(0x196)],_0x18787d);}}async['updateComment'](_0x1e404d){const _0x2e1c5b=_0x5b4944;var _0x9d5f01,_0x459d52;const {text:_0x2f7003,unitId:_0x2aca6f}=_0x1e404d,_0x163724=(_0x459d52=(_0x9d5f01=_0x2f7003[_0x2e1c5b(0x187)])==null?void 0x0:_0x9d5f01[_0x2e1c5b(0x1f4)](_0x14b35e=>_0x14b35e[_0x2e1c5b(0x192)]===c[_0x2e1c5b(0x188)][_0x2e1c5b(0x1df)])[_0x2e1c5b(0x1c5)](_0x4cc1f8=>_0x4cc1f8[_0x2e1c5b(0x1ae)]))!=null?_0x459d52:[],_0x47df13=JSON[_0x2e1c5b(0x1d8)](_0x2f7003),_0x1dac11=_0x1e404d[_0x2e1c5b(0x1e0)],_0x4d7cff=_0x1e404d['id'],_0x57eb21={'memberId':(await this['_sessionService'][_0x2e1c5b(0x185)](_0x2aca6f))[_0x2e1c5b(0x18c)](),'unitId':_0x2aca6f,'threadId':_0x1dac11,'mention':_0x163724,'content':_0x47df13,'replyId':_0x4d7cff},_0x1343bc=await this[_0x2e1c5b(0x1f0)][_0x2e1c5b(0x1fe)](_0x2e1c5b(0x190)+_0x2aca6f+_0x2e1c5b(0x1a4),{'body':_0x57eb21});return!_0x1343bc[_0x2e1c5b(0x1cd)][_0x2e1c5b(0x1e3)]||_0x1343bc[_0x2e1c5b(0x1cd)]['error'][_0x2e1c5b(0x1a0)]===0x1;}async[_0x5b4944(0x1f7)](_0x1eabde){const _0x3b3f42=_0x5b4944,{unitId:_0x282604}=_0x1eabde,_0x442052=_0x1eabde[_0x3b3f42(0x1e0)],_0x1b0eef={'memberId':this[_0x3b3f42(0x1bb)]['getCurrentUser']()['userID'],'unitId':_0x282604,'threadId':_0x442052,'solved':_0x1eabde[_0x3b3f42(0x1d5)]?I[_0x3b3f42(0x19f)]:I[_0x3b3f42(0x1fb)]},_0x4e1c92=await this[_0x3b3f42(0x1f0)][_0x3b3f42(0x1fe)](_0x3b3f42(0x190)+_0x282604+_0x3b3f42(0x1ec),{'body':_0x1b0eef});return!_0x4e1c92[_0x3b3f42(0x1cd)][_0x3b3f42(0x1e3)]||_0x4e1c92[_0x3b3f42(0x1cd)][_0x3b3f42(0x1e3)][_0x3b3f42(0x1a0)]===0x1;}async[_0x5b4944(0x1aa)](_0x194719,_0x3d5d07,_0x2acc75,_0x471641){const _0x3b2c05=_0x5b4944,_0x3f593a={'memberId':(await this[_0x3b2c05(0x191)][_0x3b2c05(0x185)](_0x194719))[_0x3b2c05(0x18c)](),'threadId':_0x2acc75,'replyId':_0x471641,'unitId':_0x194719},_0xafdf5b=await this[_0x3b2c05(0x1f0)][_0x3b2c05(0x1fe)](_0x3b2c05(0x190)+_0x194719+_0x3b2c05(0x1c0),{'body':_0x3f593a});return!_0xafdf5b['body'][_0x3b2c05(0x1e3)]||_0xafdf5b[_0x3b2c05(0x1cd)][_0x3b2c05(0x1e3)]['code']===0x1;}async[_0x5b4944(0x1fd)](_0x57da6a,_0x27c680,_0x1318f6){const _0xe1a8e0=_0x5b4944,_0x37b279={'unitId':_0x57da6a,'threadId':_0x1318f6},_0x249307=await this['_httpService'][_0xe1a8e0(0x1fe)](_0xe1a8e0(0x190)+_0x57da6a+_0xe1a8e0(0x189),{'body':_0x37b279}),_0x2214aa=_0x1318f6['map'](_0x247b80=>G(_0x249307[_0xe1a8e0(0x1cd)][_0xe1a8e0(0x1ad)][_0x247b80],_0x57da6a,_0x27c680))[_0xe1a8e0(0x1f4)](Boolean);return Object[_0xe1a8e0(0x1e4)](_0x249307[_0xe1a8e0(0x1cd)][_0xe1a8e0(0x1db)])[_0xe1a8e0(0x193)](_0x372cf3=>{const _0x57f7b4=_0xe1a8e0;this[_0x57f7b4(0x1bb)][_0x57f7b4(0x1eb)](_0x372cf3);}),_0x2214aa;}[_0x5b4944(0x1b1)](_0xed0728){const _0x653b7f=_0x5b4944;return{'id':_0xed0728['id'],'threadId':_0xed0728[_0x653b7f(0x1e0)],'ref':_0xed0728[_0x653b7f(0x17b)]};}};g=x([_(0x0,c[_0x5b4944(0x1b2)](P[_0x5b4944(0x1d4)])),_(0x1,c[_0x5b4944(0x1b2)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x5b4944(0x1a9)])),_(0x3,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x17f)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xbb859c,_0x111278,_0x2caede,_0x50bbcc)=>{for(var _0x1f742d=_0x50bbcc>0x1?void 0x0:_0x50bbcc?H(_0x111278,_0x2caede):_0x111278,_0x12d0fb=_0xbb859c['length']-0x1,_0x553bd3;_0x12d0fb>=0x0;_0x12d0fb--)(_0x553bd3=_0xbb859c[_0x12d0fb])&&(_0x1f742d=_0x553bd3(_0x1f742d)||_0x1f742d);return _0x1f742d;},y=(_0x48c0d8,_0x5a3ec4)=>(_0x51651e,_0x2852c9)=>_0x5a3ec4(_0x51651e,_0x2852c9,_0x48c0d8);let C=class extends c[_0x5b4944(0x198)]{constructor(_0x54c875,_0x4f9389){const _0x1c1763=_0x5b4944;super(),this[_0x1c1763(0x1ca)]=_0x54c875,this['_threadCommentDataSource']=_0x4f9389,this['_initDataSource']();}[_0x5b4944(0x1cc)](){const _0x29bd78=_0x5b4944;this[_0x29bd78(0x1ca)][_0x29bd78(0x1cf)]=this[_0x29bd78(0x199)],this[_0x29bd78(0x1ca)][_0x29bd78(0x182)]=!0x1;}};function _0x515c(_0x288b38,_0x450dba){const _0x1a1418=_0x1a14();return _0x515c=function(_0x515c07,_0x5b2d94){_0x515c07=_0x515c07-0x17b;let _0x4bbc1c=_0x1a1418[_0x515c07];return _0x4bbc1c;},_0x515c(_0x288b38,_0x450dba);}C=J([y(0x0,M[_0x5b4944(0x1c6)]),y(0x1,c[_0x5b4944(0x1b2)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x3cb348,_0x367bae,_0x271844)=>_0x367bae in _0x3cb348?F(_0x3cb348,_0x367bae,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271844}):_0x3cb348[_0x367bae]=_0x271844,W=(_0x3579b8,_0x52b8e3,_0x2b6735,_0x234ef6)=>{const _0x2492f3=_0x5b4944;for(var _0x51be5c=_0x234ef6>0x1?void 0x0:_0x234ef6?L(_0x52b8e3,_0x2b6735):_0x52b8e3,_0x4f7838=_0x3579b8[_0x2492f3(0x19e)]-0x1,_0x5ecc55;_0x4f7838>=0x0;_0x4f7838--)(_0x5ecc55=_0x3579b8[_0x4f7838])&&(_0x51be5c=_0x5ecc55(_0x51be5c)||_0x51be5c);return _0x51be5c;},O=(_0x1bb35b,_0x169108)=>(_0xae00ea,_0x16209b)=>_0x169108(_0xae00ea,_0x16209b,_0x1bb35b),N=(_0x475e65,_0x30511a,_0x31564d)=>Z(_0x475e65,typeof _0x30511a!=_0x5b4944(0x1ab)?_0x30511a+'':_0x30511a,_0x31564d);exports[_0x5b4944(0x1ac)]=class extends c[_0x5b4944(0x19a)]{constructor(_0xd82cfa=D,_0x530706,_0x47edf3){const _0x5d79de=_0x5b4944;super(),this[_0x5d79de(0x1ea)]=_0xd82cfa,this['_injector']=_0x530706,this['_configService']=_0x47edf3;const {..._0x190039}=c['merge']({},D,this[_0x5d79de(0x1ea)]);this[_0x5d79de(0x1f8)][_0x5d79de(0x1cb)](q,_0x190039);}[_0x5b4944(0x1bc)](){const _0x183168=_0x5b4944;[[g],[C],[p]][_0x183168(0x193)](_0x3a82d7=>{const _0x327422=_0x183168;this[_0x327422(0x1a5)]['add'](_0x3a82d7);});}['onReady'](){const _0x4b66f5=_0x5b4944;this[_0x4b66f5(0x1a5)]['get'](C),this[_0x4b66f5(0x1a5)][_0x4b66f5(0x1d3)](p);}},N(exports[_0x5b4944(0x1ac)],_0x5b4944(0x1d0),U),N(exports[_0x5b4944(0x1ac)],_0x5b4944(0x1c2),c[_0x5b4944(0x1ce)][_0x5b4944(0x194)]),exports[_0x5b4944(0x1ac)]=W([c[_0x5b4944(0x1a1)](j[_0x5b4944(0x1b4)],b[_0x5b4944(0x1b5)],T[_0x5b4944(0x1b7)]),O(0x1,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x17f)])),O(0x2,c[_0x5b4944(0x1c7)])],exports[_0x5b4944(0x1ac)]);
1
+ 'use strict';const _0x3e72c8=_0x55c0;(function(_0xacd1,_0x5c5646){const _0x393a5d=_0x55c0,_0x92da4b=_0xacd1();while(!![]){try{const _0x1cd068=-parseInt(_0x393a5d(0x95))/0x1+parseInt(_0x393a5d(0x93))/0x2*(parseInt(_0x393a5d(0x96))/0x3)+-parseInt(_0x393a5d(0x81))/0x4*(-parseInt(_0x393a5d(0xe8))/0x5)+-parseInt(_0x393a5d(0xa3))/0x6+-parseInt(_0x393a5d(0xc0))/0x7+-parseInt(_0x393a5d(0xab))/0x8*(-parseInt(_0x393a5d(0x7c))/0x9)+parseInt(_0x393a5d(0x92))/0xa*(parseInt(_0x393a5d(0x84))/0xb);if(_0x1cd068===_0x5c5646)break;else _0x92da4b['push'](_0x92da4b['shift']());}catch(_0x5721e3){_0x92da4b['push'](_0x92da4b['shift']());}}}(_0x5b95,0xccf0b));Object['defineProperty'](exports,Symbol[_0x3e72c8(0x99)],{'value':_0x3e72c8(0x90)});function _0x5b95(){const _0x5d8b87=['replyId','get','10471111rhqhlm','onReady','_init','_threadCommentModel','merge','UniverCollaborationClientPlugin','commentUpdate$','Reply','replies','format','add','addComment','getUnit','pluginName','getUser','Add','_initUserSync','createTimestamp','CollaborationSessionService','symbol','unitId','rangeType','size','ThreadCommentModel','comment','addUser','dataSource','filter','find','reply','content','solved','OpenOrReOpen','/reply','rxjs','parentId','Injector','CustomRangeType','resolveComment','forEach','4405TFrfIn','_httpService','UserManagerService','YYYY/MM/DD\x20HH:mm','error','/universer-api/comment/unit/','_initDataSource','@univerjs-pro/license','Edit','_injector','UniverInstanceType','subscribe','requireSession','UniverThreadCommentDataSourcePlugin','code','@univerjs/thread-comment-ui','IThreadCommentDataSourceService','COMMENT','comments','_configService','defineProperty','Unknown','143001SnNeDy','UNRECOGNIZED','UniverThreadCommentUIPlugin','root','Disposable','1124OYsWXP','rangeId','_threadCommentDataSourceService','44hiEjkw','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','_threadCommentDataSource','/delete','onStarting','dayjs','map','syncUpdateMutationToColla','Delete','updateComment','/edit','Module','payload','4796730vzMVqd','4IggkLQ','_config','1007028LuWbTk','809619wnGZVO','@univerjs/network','Solve','toStringTag','getOwnPropertyDescriptor','/universer-api/user/list','UNIVER_UNKNOWN','users','thread-comment-data-source.config','DependentOn','parse','userID','_commentService','4476036wRbaux','HTTPService','Plugin','pipe','length','_userService','threadId','post','696DEYJXB','getCurrentUser','IConfigService','customRanges','disposeWithMe','body','getMemberID','ref','@univerjs/thread-comment','@univerjs/core','userId','saveCommentToSnapshot','user','deleteComment','_sessionService','Solved','Inject','type','UniverLicensePlugin'];_0x5b95=function(){return _0x5d8b87;};return _0x5b95();}const b=require('@univerjs-pro/collaboration-client'),T=require(_0x3e72c8(0xef)),c=require(_0x3e72c8(0xb4)),j=require(_0x3e72c8(0x75)),M=require(_0x3e72c8(0xb3)),w=require(_0x3e72c8(0xe2)),P=require(_0x3e72c8(0x97)),U=_0x3e72c8(0x85);function _0x55c0(_0x2208cb,_0x193536){const _0x5b95f9=_0x5b95();return _0x55c0=function(_0x55c0d4,_0x3a1fbb){_0x55c0d4=_0x55c0d4-0x73;let _0x1bb96a=_0x5b95f9[_0x55c0d4];return _0x1bb96a;},_0x55c0(_0x2208cb,_0x193536);}var I=(_0x237792=>(_0x237792[_0x237792['OpenOrReOpen']=0x0]=_0x3e72c8(0xe0),_0x237792[_0x237792[_0x3e72c8(0xba)]=0x1]='Solved',_0x237792[_0x237792[_0x3e72c8(0x7d)]=-0x1]=_0x3e72c8(0x7d),_0x237792))(I||{}),v=(_0x3118fe=>(_0x3118fe[_0x3118fe[_0x3e72c8(0x7b)]=0x0]=_0x3e72c8(0x7b),_0x3118fe[_0x3118fe[_0x3e72c8(0xcf)]=0x1]=_0x3e72c8(0xcf),_0x3118fe[_0x3118fe['Reply']=0x2]=_0x3e72c8(0xc7),_0x3118fe[_0x3118fe[_0x3e72c8(0xf0)]=0x3]=_0x3e72c8(0xf0),_0x3118fe[_0x3118fe[_0x3e72c8(0x8d)]=0x4]=_0x3e72c8(0x8d),_0x3118fe[_0x3118fe[_0x3e72c8(0x98)]=0x5]=_0x3e72c8(0x98),_0x3118fe[_0x3118fe[_0x3e72c8(0x7d)]=-0x1]='UNRECOGNIZED',_0x3118fe))(v||{});const f=_0x109a67=>c[_0x3e72c8(0x8a)](new Date(+_0x109a67))[_0x3e72c8(0xc9)](_0x3e72c8(0xeb)),R=async(_0x12e587,_0x5edc51)=>{const _0x738cfb=_0x3e72c8,_0x2b40bb=_0x12e587[_0x738cfb(0xbf)](c[_0x738cfb(0xea)]),_0x338771=_0x12e587['get'](P['HTTPService']);_0x5edc51[_0x738cfb(0xe7)](_0x1d8120=>{const _0x13af6c=_0x738cfb;_0x2b40bb[_0x13af6c(0xce)](_0x1d8120)&&_0x5edc51['delete'](_0x1d8120);}),_0x5edc51[_0x738cfb(0xd6)]&&(await _0x338771[_0x738cfb(0xbf)](_0x738cfb(0x9b),{'params':{'userIDs':[..._0x5edc51]}}))['body']['users'][_0x738cfb(0xe7)](_0x44f591=>{const _0x2ee95c=_0x738cfb;_0x44f591&&_0x2b40bb[_0x2ee95c(0xd9)](_0x44f591);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x31a29f,_0x16f2bb,_0x1159f4,_0x228bdf)=>{const _0x133f58=_0x3e72c8;for(var _0x23a977=_0x228bdf>0x1?void 0x0:_0x228bdf?$(_0x16f2bb,_0x1159f4):_0x16f2bb,_0x347069=_0x31a29f[_0x133f58(0xa7)]-0x1,_0x231edb;_0x347069>=0x0;_0x347069--)(_0x231edb=_0x31a29f[_0x347069])&&(_0x23a977=_0x231edb(_0x23a977)||_0x23a977);return _0x23a977;},S=(_0x2b353b,_0x139d3a)=>(_0x514494,_0x108823)=>_0x139d3a(_0x514494,_0x108823,_0x2b353b);let p=class extends c[_0x3e72c8(0x80)]{constructor(_0x4bf66d,_0xe0a6e1,_0x3d0cf7,_0x9e67e1){const _0x1a8644=_0x3e72c8;super(),this[_0x1a8644(0xa2)]=_0x4bf66d,this[_0x1a8644(0xc3)]=_0xe0a6e1,this[_0x1a8644(0xa8)]=_0x3d0cf7,this['_injector']=_0x9e67e1,this[_0x1a8644(0xc2)](),this[_0x1a8644(0xd0)]();}[_0x3e72c8(0xd0)](){const _0x4eae77=_0x3e72c8;this[_0x4eae77(0xaf)](this[_0x4eae77(0xc3)][_0x4eae77(0xc6)][_0x4eae77(0xa6)](w['bufferTime'](0x10))[_0x4eae77(0xf3)](_0x3f8bb8=>{const _0x2dd41f=_0x4eae77,_0x5c1e06=new Set();_0x3f8bb8[_0x2dd41f(0xe7)](_0x40346d=>{const _0x1d6268=_0x2dd41f;switch(_0x40346d[_0x1d6268(0xbc)]){case _0x1d6268(0xca):{const _0x30a157=_0x40346d[_0x1d6268(0x91)]['personId'];_0x5c1e06[_0x1d6268(0xca)](_0x30a157);break;}}}),R(this['_injector'],_0x5c1e06);}));}[_0x3e72c8(0xc2)](){const _0x2f121b=_0x3e72c8;this[_0x2f121b(0xaf)](this[_0x2f121b(0xa2)][_0x2f121b(0xc6)][_0x2f121b(0xf3)](async _0x59b51a=>{const _0x50e3c0=_0x2f121b;var _0x2cb308,_0x1d7d1a,_0x445964,_0x1ee093;const _0x22e6ca=(_0x2cb308=this[_0x50e3c0(0xc3)][_0x50e3c0(0xcc)](_0x59b51a['unitId'])[_0x50e3c0(0xdc)](_0x4e63c8=>_0x4e63c8[_0x50e3c0(0xa9)]===_0x59b51a[_0x50e3c0(0xa9)]))==null?void 0x0:_0x2cb308['root'];if(!_0x22e6ca)return;const {unitId:_0x22be00,subUnitId:_0x4c2da8}=_0x22e6ca;switch(_0x59b51a[_0x50e3c0(0xb7)]&&this[_0x50e3c0(0xa8)][_0x50e3c0(0xd9)](_0x59b51a[_0x50e3c0(0xb7)]),_0x59b51a[_0x50e3c0(0xbc)]){case v['Add']:break;case v['Reply']:{this[_0x50e3c0(0xc3)][_0x50e3c0(0xcb)](_0x22be00,_0x4c2da8,{'unitId':_0x22be00,'subUnitId':_0x4c2da8,'ref':'','id':_0x59b51a['replyId'],'dT':f(+_0x59b51a['createTimestamp']),'threadId':_0x59b51a[_0x50e3c0(0xa9)],'personId':(_0x445964=(_0x1d7d1a=_0x59b51a['user'])==null?void 0x0:_0x1d7d1a[_0x50e3c0(0xa1)])!=null?_0x445964:_0x59b51a[_0x50e3c0(0xb5)],'text':JSON['parse'](_0x59b51a[_0x50e3c0(0xde)]),'parentId':_0x22e6ca['id']});break;}case v[_0x50e3c0(0x8d)]:{const _0x29eb2e=this[_0x50e3c0(0xc3)][_0x50e3c0(0x86)](_0x22be00,_0x4c2da8,_0x59b51a['replyId']);_0x29eb2e&&_0x29eb2e[_0x50e3c0(0xe3)]&&this[_0x50e3c0(0xc3)][_0x50e3c0(0xb8)](_0x22be00,_0x4c2da8,_0x59b51a[_0x50e3c0(0xbe)]);break;}case v[_0x50e3c0(0xf0)]:{this[_0x50e3c0(0xc3)][_0x50e3c0(0x8e)](_0x22be00,_0x4c2da8,{'commentId':_0x59b51a[_0x50e3c0(0xbe)],'text':JSON[_0x50e3c0(0xa0)](_0x59b51a[_0x50e3c0(0xde)])});break;}case v[_0x50e3c0(0x98)]:{const _0x35e49c=(_0x1ee093=this['_threadCommentModel'][_0x50e3c0(0xcc)](_0x59b51a[_0x50e3c0(0xd4)])[_0x50e3c0(0xdc)](_0x13b309=>_0x13b309[_0x50e3c0(0xa9)]===_0x59b51a[_0x50e3c0(0xa9)]))==null?void 0x0:_0x1ee093[_0x50e3c0(0x7f)];_0x35e49c&&this['_threadCommentModel'][_0x50e3c0(0xe6)](_0x22be00,_0x4c2da8,_0x35e49c['id'],_0x59b51a['solved']===I[_0x50e3c0(0xba)]);break;}}}));}};p=E([S(0x0,c[_0x3e72c8(0xbb)](b['CommentService'])),S(0x1,c['Inject'](M[_0x3e72c8(0xd7)])),S(0x2,c[_0x3e72c8(0xbb)](c[_0x3e72c8(0xea)])),S(0x3,c[_0x3e72c8(0xbb)](c[_0x3e72c8(0xe4)]))],p);const q=_0x3e72c8(0x9e),D={};var A=Object[_0x3e72c8(0x9a)],x=(_0x1094ad,_0x418ab2,_0x5c25b9,_0x43e970)=>{const _0x3eb806=_0x3e72c8;for(var _0x4dc10c=_0x43e970>0x1?void 0x0:_0x43e970?A(_0x418ab2,_0x5c25b9):_0x418ab2,_0x2a7099=_0x1094ad[_0x3eb806(0xa7)]-0x1,_0x2f1712;_0x2a7099>=0x0;_0x2a7099--)(_0x2f1712=_0x1094ad[_0x2a7099])&&(_0x4dc10c=_0x2f1712(_0x4dc10c)||_0x4dc10c);return _0x4dc10c;},_=(_0xc760c6,_0x20aaac)=>(_0x1a6906,_0x487b2e)=>_0x20aaac(_0x1a6906,_0x487b2e,_0xc760c6);function Y(_0xd74054,_0x6c1da7){const _0x359ade=_0x3e72c8,_0x390312=_0xd74054[_0x359ade(0xc8)][0x0];return{..._0x6c1da7,'id':_0x390312[_0x359ade(0xbe)],'resolved':_0xd74054[_0x359ade(0xdf)]===0x1,'dT':f(_0x390312[_0x359ade(0xd1)]),'personId':_0x390312['userId'],'threadId':_0x390312[_0x359ade(0xa9)]};}function G(_0x437ee6,_0x5ef5b8,_0x229bc9){const _0x26c229=_0x3e72c8;var _0x442c17,_0xc36ad5;if(((_0xc36ad5=(_0x442c17=_0x437ee6==null?void 0x0:_0x437ee6[_0x26c229(0xc8)])==null?void 0x0:_0x442c17['length'])!=null?_0xc36ad5:0x0)>0x0){const _0x4dadd5=(_0x141ffc,_0x57cbaa)=>({'id':_0x141ffc['replyId'],'threadId':_0x141ffc[_0x26c229(0xa9)],'dT':f(_0x141ffc['createTimestamp']),'personId':_0x141ffc[_0x26c229(0xb5)],'resolved':_0x437ee6[_0x26c229(0xdf)]===I[_0x26c229(0xba)],'unitId':_0x5ef5b8,'subUnitId':_0x229bc9,'text':JSON[_0x26c229(0xa0)](_0x141ffc[_0x26c229(0xde)]),'parentId':_0x57cbaa}),_0x54d958=_0x4dadd5(_0x437ee6[_0x26c229(0xc8)][0x0]);return{..._0x54d958,'children':_0x437ee6[_0x26c229(0xc8)]['slice'](0x1)[_0x26c229(0x8b)](_0x3190e2=>_0x4dadd5(_0x3190e2,_0x54d958['id']))};}return null;}let g=class{constructor(_0x1d7877,_0x22bdd5,_0x40c190,_0x2ae3df){const _0x2a47a0=_0x3e72c8;this['_httpService']=_0x1d7877,this[_0x2a47a0(0xa8)]=_0x22bdd5,this[_0x2a47a0(0xb9)]=_0x40c190,this[_0x2a47a0(0xf1)]=_0x2ae3df;}async[_0x3e72c8(0xcb)](_0x487408){const _0x20f2df=_0x3e72c8;var _0x14bf6f,_0x11f9de;const {parentId:_0x46143c,unitId:_0x17a563,text:_0x4f99a4,threadId:_0x55268a}=_0x487408,_0x5d3e49=(_0x11f9de=(_0x14bf6f=_0x4f99a4[_0x20f2df(0xae)])==null?void 0x0:_0x14bf6f[_0x20f2df(0xdb)](_0x5884b3=>_0x5884b3[_0x20f2df(0xd5)]===c['CustomRangeType'][_0x20f2df(0x77)])[_0x20f2df(0x8b)](_0x240af6=>_0x240af6[_0x20f2df(0x82)]))!=null?_0x11f9de:[],_0x4b9d52=JSON['stringify'](_0x4f99a4),_0x8b1139=(await this[_0x20f2df(0xb9)][_0x20f2df(0xf4)](_0x17a563))[_0x20f2df(0xb1)]();if(_0x46143c){const _0xae5918={'memberId':_0x8b1139,'unitId':_0x17a563,'content':_0x4b9d52,'mention':_0x5d3e49,'threadId':_0x55268a},_0x3739c0=(await this['_httpService'][_0x20f2df(0xaa)]('/universer-api/comment/unit/'+_0x17a563+_0x20f2df(0xe1),{'body':_0xae5918}))[_0x20f2df(0xb0)][_0x20f2df(0xdd)];return{..._0x487408,'id':_0x3739c0['replyId'],'dT':c[_0x20f2df(0x8a)](+_0x3739c0[_0x20f2df(0xd1)])[_0x20f2df(0xc9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3739c0[_0x20f2df(0xb5)]};}else{const _0x20b93f={'memberId':_0x8b1139,'unitId':_0x17a563,'content':_0x4b9d52,'mention':_0x5d3e49},_0x4c2c67=await this[_0x20f2df(0xe9)]['post'](_0x20f2df(0xed)+_0x17a563+'/add',{'body':_0x20b93f});return Y(_0x4c2c67[_0x20f2df(0xb0)][_0x20f2df(0xd8)],_0x487408);}}async[_0x3e72c8(0x8e)](_0x860a23){const _0x4cd909=_0x3e72c8;var _0x116712,_0x10381c;const {text:_0xa2bc1f,unitId:_0x46089f}=_0x860a23,_0x38d2d7=(_0x10381c=(_0x116712=_0xa2bc1f[_0x4cd909(0xae)])==null?void 0x0:_0x116712[_0x4cd909(0xdb)](_0x24026d=>_0x24026d[_0x4cd909(0xd5)]===c[_0x4cd909(0xe5)][_0x4cd909(0x77)])[_0x4cd909(0x8b)](_0x1a6aff=>_0x1a6aff[_0x4cd909(0x82)]))!=null?_0x10381c:[],_0xb28e67=JSON['stringify'](_0xa2bc1f),_0x7ceb27=_0x860a23['threadId'],_0x4398e6=_0x860a23['id'],_0x4e1823={'memberId':(await this[_0x4cd909(0xb9)]['requireSession'](_0x46089f))[_0x4cd909(0xb1)](),'unitId':_0x46089f,'threadId':_0x7ceb27,'mention':_0x38d2d7,'content':_0xb28e67,'replyId':_0x4398e6},_0x249fee=await this[_0x4cd909(0xe9)][_0x4cd909(0xaa)](_0x4cd909(0xed)+_0x46089f+_0x4cd909(0x8f),{'body':_0x4e1823});return!_0x249fee[_0x4cd909(0xb0)][_0x4cd909(0xec)]||_0x249fee[_0x4cd909(0xb0)][_0x4cd909(0xec)][_0x4cd909(0x74)]===0x1;}async[_0x3e72c8(0xe6)](_0x356c3d){const _0x410a7b=_0x3e72c8,{unitId:_0x13de4d}=_0x356c3d,_0x41f643=_0x356c3d[_0x410a7b(0xa9)],_0x18498c={'memberId':this['_userService'][_0x410a7b(0xac)]()[_0x410a7b(0xa1)],'unitId':_0x13de4d,'threadId':_0x41f643,'solved':_0x356c3d['resolved']?I[_0x410a7b(0xba)]:I[_0x410a7b(0xe0)]},_0x378df0=await this[_0x410a7b(0xe9)][_0x410a7b(0xaa)](_0x410a7b(0xed)+_0x13de4d+'/solved',{'body':_0x18498c});return!_0x378df0[_0x410a7b(0xb0)]['error']||_0x378df0['body'][_0x410a7b(0xec)]['code']===0x1;}async[_0x3e72c8(0xb8)](_0xe12558,_0x144822,_0x49f3b1,_0x54e2bb){const _0x2d8278=_0x3e72c8,_0x5ca6ed={'memberId':(await this[_0x2d8278(0xb9)]['requireSession'](_0xe12558))[_0x2d8278(0xb1)](),'threadId':_0x49f3b1,'replyId':_0x54e2bb,'unitId':_0xe12558},_0x49da26=await this[_0x2d8278(0xe9)]['post'](_0x2d8278(0xed)+_0xe12558+_0x2d8278(0x88),{'body':_0x5ca6ed});return!_0x49da26[_0x2d8278(0xb0)][_0x2d8278(0xec)]||_0x49da26['body']['error'][_0x2d8278(0x74)]===0x1;}async['listComments'](_0x37252d,_0x11be07,_0x5e0adf){const _0x16eaa8=_0x3e72c8,_0x3bc252={'unitId':_0x37252d,'threadId':_0x5e0adf},_0x2d0b26=await this[_0x16eaa8(0xe9)]['post'](_0x16eaa8(0xed)+_0x37252d+'/list',{'body':_0x3bc252}),_0x444dd6=_0x5e0adf[_0x16eaa8(0x8b)](_0x31bc99=>G(_0x2d0b26[_0x16eaa8(0xb0)][_0x16eaa8(0x78)][_0x31bc99],_0x37252d,_0x11be07))['filter'](Boolean);return Object['values'](_0x2d0b26[_0x16eaa8(0xb0)][_0x16eaa8(0x9d)])[_0x16eaa8(0xe7)](_0x411f1a=>{const _0x2e2f6c=_0x16eaa8;this[_0x2e2f6c(0xa8)][_0x2e2f6c(0xd9)](_0x411f1a);}),_0x444dd6;}[_0x3e72c8(0xb6)](_0x3dffed){const _0x510fe5=_0x3e72c8;return{'id':_0x3dffed['id'],'threadId':_0x3dffed[_0x510fe5(0xa9)],'ref':_0x3dffed[_0x510fe5(0xb2)]};}};g=x([_(0x0,c[_0x3e72c8(0xbb)](P[_0x3e72c8(0xa4)])),_(0x1,c['Inject'](c[_0x3e72c8(0xea)])),_(0x2,c[_0x3e72c8(0xbb)](b[_0x3e72c8(0xd2)])),_(0x3,c[_0x3e72c8(0xbb)](c[_0x3e72c8(0xe4)]))],g);var H=Object[_0x3e72c8(0x9a)],J=(_0x1ce7c1,_0x5627ed,_0x4fca86,_0x4fef20)=>{for(var _0x2fe6f6=_0x4fef20>0x1?void 0x0:_0x4fef20?H(_0x5627ed,_0x4fca86):_0x5627ed,_0x3a8c72=_0x1ce7c1['length']-0x1,_0x5c6f91;_0x3a8c72>=0x0;_0x3a8c72--)(_0x5c6f91=_0x1ce7c1[_0x3a8c72])&&(_0x2fe6f6=_0x5c6f91(_0x2fe6f6)||_0x2fe6f6);return _0x2fe6f6;},y=(_0x5a19b7,_0xb796d4)=>(_0x3ff894,_0x3c3334)=>_0xb796d4(_0x3ff894,_0x3c3334,_0x5a19b7);let C=class extends c[_0x3e72c8(0x80)]{constructor(_0x3eebef,_0x2818c3){const _0x331c60=_0x3e72c8;super(),this['_threadCommentDataSourceService']=_0x3eebef,this[_0x331c60(0x87)]=_0x2818c3,this[_0x331c60(0xee)]();}[_0x3e72c8(0xee)](){const _0x375b4d=_0x3e72c8;this['_threadCommentDataSourceService'][_0x375b4d(0xda)]=this[_0x375b4d(0x87)],this[_0x375b4d(0x83)][_0x375b4d(0x8c)]=!0x1;}};C=J([y(0x0,M[_0x3e72c8(0x76)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x3e72c8(0x7a)],L=Object[_0x3e72c8(0x9a)],Z=(_0x45955b,_0x139b5f,_0x4e83ab)=>_0x139b5f in _0x45955b?F(_0x45955b,_0x139b5f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e83ab}):_0x45955b[_0x139b5f]=_0x4e83ab,W=(_0x30a229,_0x39d6cf,_0x5670c9,_0xe8e78)=>{const _0x76b74a=_0x3e72c8;for(var _0x4bf12c=_0xe8e78>0x1?void 0x0:_0xe8e78?L(_0x39d6cf,_0x5670c9):_0x39d6cf,_0x15b9e4=_0x30a229[_0x76b74a(0xa7)]-0x1,_0x441aa8;_0x15b9e4>=0x0;_0x15b9e4--)(_0x441aa8=_0x30a229[_0x15b9e4])&&(_0x4bf12c=_0x441aa8(_0x4bf12c)||_0x4bf12c);return _0x4bf12c;},O=(_0x5d308e,_0x3f8d39)=>(_0x3a4015,_0x3e2ff6)=>_0x3f8d39(_0x3a4015,_0x3e2ff6,_0x5d308e),N=(_0x318f82,_0x169521,_0x3df4e1)=>Z(_0x318f82,typeof _0x169521!=_0x3e72c8(0xd3)?_0x169521+'':_0x169521,_0x3df4e1);exports[_0x3e72c8(0x73)]=class extends c[_0x3e72c8(0xa5)]{constructor(_0x424df9=D,_0x4707b2,_0x5c4b9d){const _0x57d84c=_0x3e72c8;super(),this[_0x57d84c(0x94)]=_0x424df9,this['_injector']=_0x4707b2,this[_0x57d84c(0x79)]=_0x5c4b9d;const {..._0x532a69}=c[_0x57d84c(0xc4)]({},D,this[_0x57d84c(0x94)]);this[_0x57d84c(0x79)]['setConfig'](q,_0x532a69);}[_0x3e72c8(0x89)](){[[g],[C],[p]]['forEach'](_0x40facb=>{const _0xf14147=_0x55c0;this[_0xf14147(0xf1)][_0xf14147(0xca)](_0x40facb);});}[_0x3e72c8(0xc1)](){const _0x5f0705=_0x3e72c8;this[_0x5f0705(0xf1)]['get'](C),this[_0x5f0705(0xf1)][_0x5f0705(0xbf)](p);}},N(exports[_0x3e72c8(0x73)],_0x3e72c8(0xcd),U),N(exports[_0x3e72c8(0x73)],_0x3e72c8(0xbc),c[_0x3e72c8(0xf2)][_0x3e72c8(0x9c)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3e72c8(0x9f)](j[_0x3e72c8(0x7e)],b[_0x3e72c8(0xc5)],T[_0x3e72c8(0xbd)]),O(0x1,c[_0x3e72c8(0xbb)](c[_0x3e72c8(0xe4)])),O(0x2,c[_0x3e72c8(0xad)])],exports[_0x3e72c8(0x73)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x450490=_0x28d3;(function(_0x391c96,_0x287992){const _0x4a5ecd=_0x28d3,_0x5b1d7e=_0x391c96();while(!![]){try{const _0x2521a8=parseInt(_0x4a5ecd(0x21e))/0x1*(parseInt(_0x4a5ecd(0x1fb))/0x2)+parseInt(_0x4a5ecd(0x1e7))/0x3+-parseInt(_0x4a5ecd(0x22f))/0x4+-parseInt(_0x4a5ecd(0x224))/0x5+parseInt(_0x4a5ecd(0x226))/0x6*(parseInt(_0x4a5ecd(0x209))/0x7)+-parseInt(_0x4a5ecd(0x229))/0x8+-parseInt(_0x4a5ecd(0x1fa))/0x9;if(_0x2521a8===_0x287992)break;else _0x5b1d7e['push'](_0x5b1d7e['shift']());}catch(_0x2f6ac3){_0x5b1d7e['push'](_0x5b1d7e['shift']());}}}(_0x39a8,0x47adc));import{CommentService as _0x17c949,CollaborationSessionService as _0x14474b,UniverCollaborationClientPlugin as _0x36e610}from'@univerjs-pro/collaboration-client';function _0x28d3(_0x1902ea,_0x5c158b){const _0x39a8bd=_0x39a8();return _0x28d3=function(_0x28d3ac,_0x207e3b){_0x28d3ac=_0x28d3ac-0x1d8;let _0x2d896d=_0x39a8bd[_0x28d3ac];return _0x2d896d;},_0x28d3(_0x1902ea,_0x5c158b);}import{UniverLicensePlugin as _0x3c7bfb}from'@univerjs-pro/license';import{dayjs as _0x3aaae1,UserManagerService as _0x4324c3,Inject as _0x4fa82d,Injector as _0x177e93,Disposable as _0x3b01cc,CustomRangeType as _0x75b4f0,UniverInstanceType as _0x499be0,DependentOn as _0x274cbd,IConfigService as _0x1b371a,Plugin as _0x34bf4b,merge as _0x19037b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52f165}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35ed95,IThreadCommentDataSourceService as _0x456f56}from'@univerjs/thread-comment';import{bufferTime as _0x26d7c9}from'rxjs';import{HTTPService as _0x54e253}from'@univerjs/network';const W=_0x450490(0x21d);var I=(_0x21de72=>(_0x21de72[_0x21de72[_0x450490(0x1e4)]=0x0]=_0x450490(0x1e4),_0x21de72[_0x21de72[_0x450490(0x22a)]=0x1]=_0x450490(0x22a),_0x21de72[_0x21de72[_0x450490(0x223)]=-0x1]='UNRECOGNIZED',_0x21de72))(I||{}),v=(_0x40b8de=>(_0x40b8de[_0x40b8de[_0x450490(0x20d)]=0x0]=_0x450490(0x20d),_0x40b8de[_0x40b8de[_0x450490(0x234)]=0x1]='Add',_0x40b8de[_0x40b8de[_0x450490(0x225)]=0x2]=_0x450490(0x225),_0x40b8de[_0x40b8de['Edit']=0x3]=_0x450490(0x1ef),_0x40b8de[_0x40b8de['Delete']=0x4]=_0x450490(0x212),_0x40b8de[_0x40b8de[_0x450490(0x1ea)]=0x5]='Solve',_0x40b8de[_0x40b8de[_0x450490(0x223)]=-0x1]=_0x450490(0x223),_0x40b8de))(v||{});const D=_0x48d5c8=>_0x3aaae1(new Date(+_0x48d5c8))['format'](_0x450490(0x22e)),B=async(_0x714718,_0x5dc3c1)=>{const _0x39b6a5=_0x450490,_0x43e9ab=_0x714718['get'](_0x4324c3),_0x7a637f=_0x714718[_0x39b6a5(0x1e8)](_0x54e253);_0x5dc3c1[_0x39b6a5(0x1f3)](_0x55b91a=>{const _0x5011d3=_0x39b6a5;_0x43e9ab[_0x5011d3(0x22d)](_0x55b91a)&&_0x5dc3c1[_0x5011d3(0x220)](_0x55b91a);}),_0x5dc3c1[_0x39b6a5(0x1f0)]&&(await _0x7a637f[_0x39b6a5(0x1e8)](_0x39b6a5(0x1eb),{'params':{'userIDs':[..._0x5dc3c1]}}))[_0x39b6a5(0x1dd)][_0x39b6a5(0x20b)][_0x39b6a5(0x1f3)](_0x55d208=>{_0x55d208&&_0x43e9ab['addUser'](_0x55d208);});};var K=Object[_0x450490(0x218)],V=(_0x3f8b60,_0x4c36c5,_0x44422f,_0x40a0c2)=>{const _0xa9f825=_0x450490;for(var _0x3d6de2=_0x40a0c2>0x1?void 0x0:_0x40a0c2?K(_0x4c36c5,_0x44422f):_0x4c36c5,_0x3a897b=_0x3f8b60[_0xa9f825(0x1d9)]-0x1,_0x296513;_0x3a897b>=0x0;_0x3a897b--)(_0x296513=_0x3f8b60[_0x3a897b])&&(_0x3d6de2=_0x296513(_0x3d6de2)||_0x3d6de2);return _0x3d6de2;},p=(_0x188093,_0x590fc0)=>(_0x494c11,_0x5eb0fa)=>_0x590fc0(_0x494c11,_0x5eb0fa,_0x188093);let S=class extends _0x3b01cc{constructor(_0x4f4412,_0x4b8c77,_0xc29fd9,_0x5add0c){const _0x907b44=_0x450490;super(),this[_0x907b44(0x214)]=_0x4f4412,this[_0x907b44(0x231)]=_0x4b8c77,this[_0x907b44(0x221)]=_0xc29fd9,this[_0x907b44(0x210)]=_0x5add0c,this[_0x907b44(0x1f5)](),this[_0x907b44(0x1f6)]();}['_initUserSync'](){const _0x4b0331=_0x450490;this[_0x4b0331(0x202)](this[_0x4b0331(0x231)][_0x4b0331(0x22b)][_0x4b0331(0x201)](_0x26d7c9(0x10))['subscribe'](_0x4e0901=>{const _0xa7b471=_0x4b0331,_0x1b54fd=new Set();_0x4e0901['forEach'](_0x53369c=>{const _0x34b95e=_0x28d3;switch(_0x53369c[_0x34b95e(0x1f7)]){case'add':{const _0x23e1e3=_0x53369c[_0x34b95e(0x233)][_0x34b95e(0x204)];_0x1b54fd[_0x34b95e(0x203)](_0x23e1e3);break;}}}),B(this[_0xa7b471(0x210)],_0x1b54fd);}));}['_init'](){const _0x16e5ba=_0x450490;this[_0x16e5ba(0x202)](this[_0x16e5ba(0x214)][_0x16e5ba(0x22b)][_0x16e5ba(0x1f9)](async _0x5bc146=>{const _0x29c86f=_0x16e5ba;var _0x2054f8,_0x5baf12,_0x4e085c,_0x26d821;const _0x19f01e=(_0x2054f8=this[_0x29c86f(0x231)][_0x29c86f(0x205)](_0x5bc146[_0x29c86f(0x238)])[_0x29c86f(0x1e2)](_0x466a4e=>_0x466a4e[_0x29c86f(0x21c)]===_0x5bc146[_0x29c86f(0x21c)]))==null?void 0x0:_0x2054f8['root'];if(!_0x19f01e)return;const {unitId:_0x5c7e23,subUnitId:_0x3e7250}=_0x19f01e;switch(_0x5bc146[_0x29c86f(0x1e3)]&&this[_0x29c86f(0x221)][_0x29c86f(0x21f)](_0x5bc146[_0x29c86f(0x1e3)]),_0x5bc146[_0x29c86f(0x1f7)]){case v[_0x29c86f(0x234)]:break;case v[_0x29c86f(0x225)]:{this[_0x29c86f(0x231)][_0x29c86f(0x1ec)](_0x5c7e23,_0x3e7250,{'unitId':_0x5c7e23,'subUnitId':_0x3e7250,'ref':'','id':_0x5bc146[_0x29c86f(0x1e0)],'dT':D(+_0x5bc146[_0x29c86f(0x215)]),'threadId':_0x5bc146[_0x29c86f(0x21c)],'personId':(_0x4e085c=(_0x5baf12=_0x5bc146[_0x29c86f(0x1e3)])==null?void 0x0:_0x5baf12[_0x29c86f(0x213)])!=null?_0x4e085c:_0x5bc146[_0x29c86f(0x1db)],'text':JSON[_0x29c86f(0x1fe)](_0x5bc146['content']),'parentId':_0x19f01e['id']});break;}case v[_0x29c86f(0x212)]:{const _0x1b78e1=this[_0x29c86f(0x231)][_0x29c86f(0x227)](_0x5c7e23,_0x3e7250,_0x5bc146[_0x29c86f(0x1e0)]);_0x1b78e1&&_0x1b78e1[_0x29c86f(0x1f4)]&&this[_0x29c86f(0x231)][_0x29c86f(0x200)](_0x5c7e23,_0x3e7250,_0x5bc146[_0x29c86f(0x1e0)]);break;}case v[_0x29c86f(0x1ef)]:{this['_threadCommentModel']['updateComment'](_0x5c7e23,_0x3e7250,{'commentId':_0x5bc146[_0x29c86f(0x1e0)],'text':JSON[_0x29c86f(0x1fe)](_0x5bc146['content'])});break;}case v[_0x29c86f(0x1ea)]:{const _0x169773=(_0x26d821=this[_0x29c86f(0x231)][_0x29c86f(0x205)](_0x5bc146['unitId'])[_0x29c86f(0x1e2)](_0x1f5d10=>_0x1f5d10[_0x29c86f(0x21c)]===_0x5bc146[_0x29c86f(0x21c)]))==null?void 0x0:_0x26d821[_0x29c86f(0x236)];_0x169773&&this[_0x29c86f(0x231)]['resolveComment'](_0x5c7e23,_0x3e7250,_0x169773['id'],_0x5bc146['solved']===I[_0x29c86f(0x22a)]);break;}}}));}};S=V([p(0x0,_0x4fa82d(_0x17c949)),p(0x1,_0x4fa82d(_0x35ed95)),p(0x2,_0x4fa82d(_0x4324c3)),p(0x3,_0x4fa82d(_0x177e93))],S);const z=_0x450490(0x20f),M={};var k=Object[_0x450490(0x218)],Q=(_0x2c0e21,_0x5eade7,_0x45c358,_0x2df47f)=>{const _0xa6eb1f=_0x450490;for(var _0x91c3fd=_0x2df47f>0x1?void 0x0:_0x2df47f?k(_0x5eade7,_0x45c358):_0x5eade7,_0x1a057c=_0x2c0e21[_0xa6eb1f(0x1d9)]-0x1,_0x685f10;_0x1a057c>=0x0;_0x1a057c--)(_0x685f10=_0x2c0e21[_0x1a057c])&&(_0x91c3fd=_0x685f10(_0x91c3fd)||_0x91c3fd);return _0x91c3fd;},_=(_0x191de0,_0x38b9e5)=>(_0x1aabcb,_0x51c303)=>_0x38b9e5(_0x1aabcb,_0x51c303,_0x191de0);function X(_0x994757,_0x44ac1d){const _0x97e8ee=_0x450490,_0x18b487=_0x994757[_0x97e8ee(0x1da)][0x0];return{..._0x44ac1d,'id':_0x18b487[_0x97e8ee(0x1e0)],'resolved':_0x994757[_0x97e8ee(0x1fd)]===0x1,'dT':D(_0x18b487[_0x97e8ee(0x215)]),'personId':_0x18b487['userId'],'threadId':_0x18b487['threadId']};}function ee(_0x390c54,_0x39753c,_0x1e9c4a){const _0x25e75b=_0x450490;var _0x4eb4e7,_0x50ee55;if(((_0x50ee55=(_0x4eb4e7=_0x390c54==null?void 0x0:_0x390c54[_0x25e75b(0x1da)])==null?void 0x0:_0x4eb4e7[_0x25e75b(0x1d9)])!=null?_0x50ee55:0x0)>0x0){const _0x12f09c=(_0xef4b12,_0x14d0b6)=>({'id':_0xef4b12[_0x25e75b(0x1e0)],'threadId':_0xef4b12[_0x25e75b(0x21c)],'dT':D(_0xef4b12['createTimestamp']),'personId':_0xef4b12[_0x25e75b(0x1db)],'resolved':_0x390c54[_0x25e75b(0x1fd)]===I[_0x25e75b(0x22a)],'unitId':_0x39753c,'subUnitId':_0x1e9c4a,'text':JSON[_0x25e75b(0x1fe)](_0xef4b12[_0x25e75b(0x219)]),'parentId':_0x14d0b6}),_0x9e160=_0x12f09c(_0x390c54[_0x25e75b(0x1da)][0x0]);return{..._0x9e160,'children':_0x390c54[_0x25e75b(0x1da)][_0x25e75b(0x20e)](0x1)[_0x25e75b(0x217)](_0x20997f=>_0x12f09c(_0x20997f,_0x9e160['id']))};}return null;}let f=class{constructor(_0x56a0c5,_0x2f75e8,_0x40f236,_0xfa858c){const _0x91c437=_0x450490;this[_0x91c437(0x1f2)]=_0x56a0c5,this[_0x91c437(0x221)]=_0x2f75e8,this['_sessionService']=_0x40f236,this[_0x91c437(0x210)]=_0xfa858c;}async[_0x450490(0x1ec)](_0x5f5b53){const _0x49f9f3=_0x450490;var _0xa3b04f,_0x19c4de;const {parentId:_0x2f8f47,unitId:_0x4608d9,text:_0x4cb3b6,threadId:_0x15cecb}=_0x5f5b53,_0x3a405b=(_0x19c4de=(_0xa3b04f=_0x4cb3b6[_0x49f9f3(0x1ee)])==null?void 0x0:_0xa3b04f[_0x49f9f3(0x21a)](_0xf0f054=>_0xf0f054['rangeType']===_0x75b4f0[_0x49f9f3(0x1de)])[_0x49f9f3(0x217)](_0x1aec59=>_0x1aec59[_0x49f9f3(0x208)]))!=null?_0x19c4de:[],_0x26c9f5=JSON['stringify'](_0x4cb3b6),_0x5c0dc7=(await this[_0x49f9f3(0x20a)]['requireSession'](_0x4608d9))[_0x49f9f3(0x232)]();if(_0x2f8f47){const _0x484308={'memberId':_0x5c0dc7,'unitId':_0x4608d9,'content':_0x26c9f5,'mention':_0x3a405b,'threadId':_0x15cecb},_0x39105e=(await this[_0x49f9f3(0x1f2)][_0x49f9f3(0x1df)](_0x49f9f3(0x1e9)+_0x4608d9+'/reply',{'body':_0x484308}))['body']['reply'];return{..._0x5f5b53,'id':_0x39105e[_0x49f9f3(0x1e0)],'dT':_0x3aaae1(+_0x39105e[_0x49f9f3(0x215)])[_0x49f9f3(0x211)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x39105e['userId']};}else{const _0x539b54={'memberId':_0x5c0dc7,'unitId':_0x4608d9,'content':_0x26c9f5,'mention':_0x3a405b},_0x509c28=await this[_0x49f9f3(0x1f2)]['post']('/universer-api/comment/unit/'+_0x4608d9+_0x49f9f3(0x207),{'body':_0x539b54});return X(_0x509c28[_0x49f9f3(0x1dd)][_0x49f9f3(0x1fc)],_0x5f5b53);}}async[_0x450490(0x235)](_0x54db86){const _0x10bcd3=_0x450490;var _0x5cbb3f,_0x3ad180;const {text:_0x1ce4a6,unitId:_0x4ffe4d}=_0x54db86,_0x558833=(_0x3ad180=(_0x5cbb3f=_0x1ce4a6[_0x10bcd3(0x1ee)])==null?void 0x0:_0x5cbb3f[_0x10bcd3(0x21a)](_0x356e16=>_0x356e16[_0x10bcd3(0x230)]===_0x75b4f0[_0x10bcd3(0x1de)])[_0x10bcd3(0x217)](_0x34000f=>_0x34000f[_0x10bcd3(0x208)]))!=null?_0x3ad180:[],_0xad934a=JSON['stringify'](_0x1ce4a6),_0x31b07e=_0x54db86[_0x10bcd3(0x21c)],_0x8d94dd=_0x54db86['id'],_0x5c864d={'memberId':(await this[_0x10bcd3(0x20a)][_0x10bcd3(0x1d8)](_0x4ffe4d))['getMemberID'](),'unitId':_0x4ffe4d,'threadId':_0x31b07e,'mention':_0x558833,'content':_0xad934a,'replyId':_0x8d94dd},_0x2da91e=await this[_0x10bcd3(0x1f2)]['post']('/universer-api/comment/unit/'+_0x4ffe4d+_0x10bcd3(0x216),{'body':_0x5c864d});return!_0x2da91e[_0x10bcd3(0x1dd)][_0x10bcd3(0x1e5)]||_0x2da91e[_0x10bcd3(0x1dd)][_0x10bcd3(0x1e5)]['code']===0x1;}async[_0x450490(0x22c)](_0x28e5a4){const _0x68a3ae=_0x450490,{unitId:_0x6f7401}=_0x28e5a4,_0x2a775e=_0x28e5a4[_0x68a3ae(0x21c)],_0xb15d39={'memberId':this[_0x68a3ae(0x221)][_0x68a3ae(0x239)]()[_0x68a3ae(0x213)],'unitId':_0x6f7401,'threadId':_0x2a775e,'solved':_0x28e5a4[_0x68a3ae(0x1ed)]?I[_0x68a3ae(0x22a)]:I[_0x68a3ae(0x1e4)]},_0x4f91fb=await this[_0x68a3ae(0x1f2)][_0x68a3ae(0x1df)]('/universer-api/comment/unit/'+_0x6f7401+'/solved',{'body':_0xb15d39});return!_0x4f91fb['body'][_0x68a3ae(0x1e5)]||_0x4f91fb['body']['error'][_0x68a3ae(0x1dc)]===0x1;}async[_0x450490(0x200)](_0x1430aa,_0x415c58,_0x56a870,_0x18e826){const _0x15921c=_0x450490,_0x1bc3da={'memberId':(await this[_0x15921c(0x20a)]['requireSession'](_0x1430aa))[_0x15921c(0x232)](),'threadId':_0x56a870,'replyId':_0x18e826,'unitId':_0x1430aa},_0x57ee3a=await this[_0x15921c(0x1f2)][_0x15921c(0x1df)]('/universer-api/comment/unit/'+_0x1430aa+'/delete',{'body':_0x1bc3da});return!_0x57ee3a[_0x15921c(0x1dd)][_0x15921c(0x1e5)]||_0x57ee3a[_0x15921c(0x1dd)][_0x15921c(0x1e5)][_0x15921c(0x1dc)]===0x1;}async['listComments'](_0x7ee900,_0x2816ff,_0x19e094){const _0x425c06=_0x450490,_0x59e863={'unitId':_0x7ee900,'threadId':_0x19e094},_0x9ed4ec=await this[_0x425c06(0x1f2)][_0x425c06(0x1df)](_0x425c06(0x1e9)+_0x7ee900+_0x425c06(0x20c),{'body':_0x59e863}),_0x44725d=_0x19e094[_0x425c06(0x217)](_0x25d174=>ee(_0x9ed4ec[_0x425c06(0x1dd)][_0x425c06(0x1f1)][_0x25d174],_0x7ee900,_0x2816ff))['filter'](Boolean);return Object['values'](_0x9ed4ec['body']['users'])[_0x425c06(0x1f3)](_0x41061d=>{const _0x5a722f=_0x425c06;this[_0x5a722f(0x221)][_0x5a722f(0x21f)](_0x41061d);}),_0x44725d;}[_0x450490(0x1ff)](_0x2cafbd){return{'id':_0x2cafbd['id'],'threadId':_0x2cafbd['threadId'],'ref':_0x2cafbd['ref']};}};f=Q([_(0x0,_0x4fa82d(_0x54e253)),_(0x1,_0x4fa82d(_0x4324c3)),_(0x2,_0x4fa82d(_0x14474b)),_(0x3,_0x4fa82d(_0x177e93))],f);var re=Object[_0x450490(0x218)],te=(_0x46d228,_0x5c7d5d,_0x36082a,_0x3bcf91)=>{const _0x24eac4=_0x450490;for(var _0x4a080f=_0x3bcf91>0x1?void 0x0:_0x3bcf91?re(_0x5c7d5d,_0x36082a):_0x5c7d5d,_0x323d44=_0x46d228[_0x24eac4(0x1d9)]-0x1,_0x4de727;_0x323d44>=0x0;_0x323d44--)(_0x4de727=_0x46d228[_0x323d44])&&(_0x4a080f=_0x4de727(_0x4a080f)||_0x4a080f);return _0x4a080f;},N=(_0x327c58,_0xdc2650)=>(_0x12fef2,_0xde5e18)=>_0xdc2650(_0x12fef2,_0xde5e18,_0x327c58);let g=class extends _0x3b01cc{constructor(_0x243361,_0xe00ef5){const _0x23283a=_0x450490;super(),this['_threadCommentDataSourceService']=_0x243361,this[_0x23283a(0x206)]=_0xe00ef5,this[_0x23283a(0x1f8)]();}[_0x450490(0x1f8)](){const _0x2a1967=_0x450490;this[_0x2a1967(0x228)][_0x2a1967(0x23a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x2a1967(0x1e6)]=!0x1;}};g=te([N(0x0,_0x456f56),N(0x1,_0x4fa82d(f))],g);var se=Object['defineProperty'],oe=Object[_0x450490(0x218)],ne=(_0x14415e,_0x1c9a07,_0x545161)=>_0x1c9a07 in _0x14415e?se(_0x14415e,_0x1c9a07,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x545161}):_0x14415e[_0x1c9a07]=_0x545161,ie=(_0x13b9af,_0xea1823,_0x305719,_0x4892f1)=>{for(var _0x203087=_0x4892f1>0x1?void 0x0:_0x4892f1?oe(_0xea1823,_0x305719):_0xea1823,_0x5157e5=_0x13b9af['length']-0x1,_0x2e62a1;_0x5157e5>=0x0;_0x5157e5--)(_0x2e62a1=_0x13b9af[_0x5157e5])&&(_0x203087=_0x2e62a1(_0x203087)||_0x203087);return _0x203087;},w=(_0x15919c,_0x57782c)=>(_0x284506,_0x410599)=>_0x57782c(_0x284506,_0x410599,_0x15919c),$=(_0x1e1c72,_0x22e486,_0x347ce7)=>ne(_0x1e1c72,typeof _0x22e486!=_0x450490(0x237)?_0x22e486+'':_0x22e486,_0x347ce7);let b=class extends _0x34bf4b{constructor(_0x33d55f=M,_0x3284ac,_0x48ce07){const _0xbb0efe=_0x450490;super(),this['_config']=_0x33d55f,this[_0xbb0efe(0x210)]=_0x3284ac,this[_0xbb0efe(0x222)]=_0x48ce07;const {..._0x57119e}=_0x19037b({},M,this['_config']);this['_configService'][_0xbb0efe(0x1e1)](z,_0x57119e);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x170b3a=>{const _0x4c29d6=_0x28d3;this['_injector'][_0x4c29d6(0x203)](_0x170b3a);});}[_0x450490(0x21b)](){const _0x269b4d=_0x450490;this[_0x269b4d(0x210)][_0x269b4d(0x1e8)](g),this[_0x269b4d(0x210)][_0x269b4d(0x1e8)](S);}};$(b,'pluginName',W),$(b,_0x450490(0x1f7),_0x499be0['UNIVER_UNKNOWN']),b=ie([_0x274cbd(_0x52f165,_0x36e610,_0x3c7bfb),w(0x1,_0x4fa82d(_0x177e93)),w(0x2,_0x1b371a)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x39a8(){const _0x5c7eb1=['/edit','map','getOwnPropertyDescriptor','content','filter','onReady','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','24363WcXksp','addUser','delete','_userService','_configService','UNRECOGNIZED','225080TEPajc','Reply','244410sFLEdU','getComment','_threadCommentDataSourceService','3503432TEzVkL','Solved','commentUpdate$','resolveComment','getUser','YYYY/MM/DD\x20HH:mm','2171500UNqhjE','rangeType','_threadCommentModel','getMemberID','payload','Add','updateComment','root','symbol','unitId','getCurrentUser','dataSource','requireSession','length','replies','userId','code','body','COMMENT','post','replyId','setConfig','find','user','OpenOrReOpen','error','syncUpdateMutationToColla','1301790KMEayF','get','/universer-api/comment/unit/','Solve','/universer-api/user/list','addComment','resolved','customRanges','Edit','size','comments','_httpService','forEach','parentId','_init','_initUserSync','type','_initDataSource','subscribe','301383HYJYLO','42NTegPa','comment','solved','parse','saveCommentToSnapshot','deleteComment','pipe','disposeWithMe','add','personId','getUnit','_threadCommentDataSource','/add','rangeId','70erKCGG','_sessionService','users','/list','Unknown','slice','thread-comment-data-source.config','_injector','format','Delete','userID','_commentService','createTimestamp'];_0x39a8=function(){return _0x5c7eb1;};return _0x39a8();}
1
+ const _0x29f942=_0x4334;(function(_0x333758,_0x51389e){const _0x5063f2=_0x4334,_0x23563f=_0x333758();while(!![]){try{const _0x6ea5fd=parseInt(_0x5063f2(0xa8))/0x1+-parseInt(_0x5063f2(0x80))/0x2+parseInt(_0x5063f2(0x91))/0x3*(parseInt(_0x5063f2(0x8a))/0x4)+-parseInt(_0x5063f2(0xd8))/0x5+-parseInt(_0x5063f2(0x89))/0x6*(parseInt(_0x5063f2(0xc6))/0x7)+parseInt(_0x5063f2(0x9f))/0x8*(-parseInt(_0x5063f2(0x98))/0x9)+-parseInt(_0x5063f2(0xb3))/0xa*(-parseInt(_0x5063f2(0xc3))/0xb);if(_0x6ea5fd===_0x51389e)break;else _0x23563f['push'](_0x23563f['shift']());}catch(_0x55d38e){_0x23563f['push'](_0x23563f['shift']());}}}(_0x18b4,0x99f1c));import{CommentService as _0x4347ee,CollaborationSessionService as _0x288fc5,UniverCollaborationClientPlugin as _0x43f539}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x18fa8c}from'@univerjs-pro/license';import{dayjs as _0x2cc82e,UserManagerService as _0x533617,Inject as _0x4a7b12,Injector as _0x5cbd2e,Disposable as _0x350976,CustomRangeType as _0x34dea6,UniverInstanceType as _0x2ee514,DependentOn as _0xc85228,IConfigService as _0xaab53c,Plugin as _0x107eaa,merge as _0x58037e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x20a2ec}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x431832,IThreadCommentDataSourceService as _0x23e802}from'@univerjs/thread-comment';import{bufferTime as _0xae25c5}from'rxjs';import{HTTPService as _0x6ab9de}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x33a103=>(_0x33a103[_0x33a103[_0x29f942(0xdb)]=0x0]=_0x29f942(0xdb),_0x33a103[_0x33a103[_0x29f942(0xce)]=0x1]=_0x29f942(0xce),_0x33a103[_0x33a103[_0x29f942(0xaf)]=-0x1]=_0x29f942(0xaf),_0x33a103))(I||{}),v=(_0x10ef06=>(_0x10ef06[_0x10ef06[_0x29f942(0xa6)]=0x0]=_0x29f942(0xa6),_0x10ef06[_0x10ef06[_0x29f942(0x94)]=0x1]=_0x29f942(0x94),_0x10ef06[_0x10ef06[_0x29f942(0xac)]=0x2]=_0x29f942(0xac),_0x10ef06[_0x10ef06[_0x29f942(0x7b)]=0x3]='Edit',_0x10ef06[_0x10ef06[_0x29f942(0x73)]=0x4]=_0x29f942(0x73),_0x10ef06[_0x10ef06[_0x29f942(0x75)]=0x5]=_0x29f942(0x75),_0x10ef06[_0x10ef06[_0x29f942(0xaf)]=-0x1]=_0x29f942(0xaf),_0x10ef06))(v||{});const D=_0x22ccec=>_0x2cc82e(new Date(+_0x22ccec))[_0x29f942(0xcf)](_0x29f942(0x7a)),B=async(_0x1a20c9,_0x28c16d)=>{const _0x17c3d5=_0x29f942,_0x27b8ad=_0x1a20c9[_0x17c3d5(0x78)](_0x533617),_0x350b84=_0x1a20c9[_0x17c3d5(0x78)](_0x6ab9de);_0x28c16d[_0x17c3d5(0xb2)](_0x38e179=>{const _0x457e7e=_0x17c3d5;_0x27b8ad[_0x457e7e(0xd7)](_0x38e179)&&_0x28c16d[_0x457e7e(0xd1)](_0x38e179);}),_0x28c16d['size']&&(await _0x350b84[_0x17c3d5(0x78)](_0x17c3d5(0xa2),{'params':{'userIDs':[..._0x28c16d]}}))[_0x17c3d5(0xb6)][_0x17c3d5(0x8d)]['forEach'](_0x397939=>{const _0x3f5855=_0x17c3d5;_0x397939&&_0x27b8ad[_0x3f5855(0x7f)](_0x397939);});};var K=Object[_0x29f942(0x82)],V=(_0xc5c74f,_0x5d9548,_0x2f7bf9,_0x4b2dcb)=>{const _0x494da1=_0x29f942;for(var _0x26a499=_0x4b2dcb>0x1?void 0x0:_0x4b2dcb?K(_0x5d9548,_0x2f7bf9):_0x5d9548,_0x1b0776=_0xc5c74f[_0x494da1(0xa5)]-0x1,_0x5bb360;_0x1b0776>=0x0;_0x1b0776--)(_0x5bb360=_0xc5c74f[_0x1b0776])&&(_0x26a499=_0x5bb360(_0x26a499)||_0x26a499);return _0x26a499;},p=(_0x54e3fe,_0x3d0ab9)=>(_0x280bbf,_0x43f2bd)=>_0x3d0ab9(_0x280bbf,_0x43f2bd,_0x54e3fe);let S=class extends _0x350976{constructor(_0x1dc3d4,_0x241c67,_0x32e85e,_0x2cfdba){const _0x1f94e7=_0x29f942;super(),this[_0x1f94e7(0x9a)]=_0x1dc3d4,this[_0x1f94e7(0xaa)]=_0x241c67,this[_0x1f94e7(0xcc)]=_0x32e85e,this[_0x1f94e7(0x9e)]=_0x2cfdba,this[_0x1f94e7(0x84)](),this[_0x1f94e7(0xcd)]();}[_0x29f942(0xcd)](){const _0x151283=_0x29f942;this[_0x151283(0x9b)](this[_0x151283(0xaa)]['commentUpdate$'][_0x151283(0xc5)](_0xae25c5(0x10))[_0x151283(0x86)](_0x40d5b4=>{const _0x3eb8fd=_0x151283,_0x2db398=new Set();_0x40d5b4[_0x3eb8fd(0xb2)](_0x40a4b0=>{const _0x535054=_0x3eb8fd;switch(_0x40a4b0[_0x535054(0x92)]){case _0x535054(0x9c):{const _0x268622=_0x40a4b0['payload'][_0x535054(0xae)];_0x2db398[_0x535054(0x9c)](_0x268622);break;}}}),B(this['_injector'],_0x2db398);}));}[_0x29f942(0x84)](){const _0x5f517a=_0x29f942;this[_0x5f517a(0x9b)](this['_commentService'][_0x5f517a(0xa7)][_0x5f517a(0x86)](async _0x16419d=>{const _0x492e67=_0x5f517a;var _0x114a33,_0x3c52bc,_0x551926,_0x35208e;const _0xc0b51f=(_0x114a33=this['_threadCommentModel'][_0x492e67(0x96)](_0x16419d[_0x492e67(0x8b)])[_0x492e67(0xbe)](_0x565759=>_0x565759[_0x492e67(0x7d)]===_0x16419d[_0x492e67(0x7d)]))==null?void 0x0:_0x114a33[_0x492e67(0xc7)];if(!_0xc0b51f)return;const {unitId:_0x24c3d0,subUnitId:_0x531709}=_0xc0b51f;switch(_0x16419d[_0x492e67(0xd4)]&&this['_userService'][_0x492e67(0x7f)](_0x16419d[_0x492e67(0xd4)]),_0x16419d[_0x492e67(0x92)]){case v[_0x492e67(0x94)]:break;case v['Reply']:{this[_0x492e67(0xaa)][_0x492e67(0xd6)](_0x24c3d0,_0x531709,{'unitId':_0x24c3d0,'subUnitId':_0x531709,'ref':'','id':_0x16419d[_0x492e67(0x90)],'dT':D(+_0x16419d[_0x492e67(0xd5)]),'threadId':_0x16419d['threadId'],'personId':(_0x551926=(_0x3c52bc=_0x16419d[_0x492e67(0xd4)])==null?void 0x0:_0x3c52bc[_0x492e67(0x88)])!=null?_0x551926:_0x16419d[_0x492e67(0xbc)],'text':JSON[_0x492e67(0x7e)](_0x16419d[_0x492e67(0xca)]),'parentId':_0xc0b51f['id']});break;}case v[_0x492e67(0x73)]:{const _0x176311=this[_0x492e67(0xaa)][_0x492e67(0xab)](_0x24c3d0,_0x531709,_0x16419d['replyId']);_0x176311&&_0x176311[_0x492e67(0x8c)]&&this['_threadCommentModel'][_0x492e67(0xa9)](_0x24c3d0,_0x531709,_0x16419d[_0x492e67(0x90)]);break;}case v['Edit']:{this[_0x492e67(0xaa)][_0x492e67(0xa1)](_0x24c3d0,_0x531709,{'commentId':_0x16419d[_0x492e67(0x90)],'text':JSON['parse'](_0x16419d[_0x492e67(0xca)])});break;}case v['Solve']:{const _0x5df5a7=(_0x35208e=this[_0x492e67(0xaa)][_0x492e67(0x96)](_0x16419d[_0x492e67(0x8b)])[_0x492e67(0xbe)](_0x4ed95a=>_0x4ed95a[_0x492e67(0x7d)]===_0x16419d[_0x492e67(0x7d)]))==null?void 0x0:_0x35208e[_0x492e67(0xc7)];_0x5df5a7&&this[_0x492e67(0xaa)][_0x492e67(0xa3)](_0x24c3d0,_0x531709,_0x5df5a7['id'],_0x16419d[_0x492e67(0x87)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4a7b12(_0x4347ee)),p(0x1,_0x4a7b12(_0x431832)),p(0x2,_0x4a7b12(_0x533617)),p(0x3,_0x4a7b12(_0x5cbd2e))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x50f3c0,_0x2555cb,_0x52b063,_0x447ce9)=>{for(var _0x4469cb=_0x447ce9>0x1?void 0x0:_0x447ce9?k(_0x2555cb,_0x52b063):_0x2555cb,_0x1266e2=_0x50f3c0['length']-0x1,_0x24f95b;_0x1266e2>=0x0;_0x1266e2--)(_0x24f95b=_0x50f3c0[_0x1266e2])&&(_0x4469cb=_0x24f95b(_0x4469cb)||_0x4469cb);return _0x4469cb;},_=(_0x401078,_0x4a8f92)=>(_0x2aaf59,_0x5197b8)=>_0x4a8f92(_0x2aaf59,_0x5197b8,_0x401078);function _0x4334(_0x2fdc10,_0x57240e){const _0x18b476=_0x18b4();return _0x4334=function(_0x433465,_0x235f48){_0x433465=_0x433465-0x73;let _0x5c4fe4=_0x18b476[_0x433465];return _0x5c4fe4;},_0x4334(_0x2fdc10,_0x57240e);}function X(_0x24dd37,_0x362450){const _0x38f47a=_0x29f942,_0x1ae1d4=_0x24dd37[_0x38f47a(0x77)][0x0];return{..._0x362450,'id':_0x1ae1d4[_0x38f47a(0x90)],'resolved':_0x24dd37[_0x38f47a(0x87)]===0x1,'dT':D(_0x1ae1d4['createTimestamp']),'personId':_0x1ae1d4[_0x38f47a(0xbc)],'threadId':_0x1ae1d4[_0x38f47a(0x7d)]};}function ee(_0x1914c2,_0xd49f8b,_0x1113e6){const _0x33122a=_0x29f942;var _0x260910,_0x22b981;if(((_0x22b981=(_0x260910=_0x1914c2==null?void 0x0:_0x1914c2[_0x33122a(0x77)])==null?void 0x0:_0x260910[_0x33122a(0xa5)])!=null?_0x22b981:0x0)>0x0){const _0x1bf3ef=(_0x5d17bf,_0x5aa36b)=>({'id':_0x5d17bf[_0x33122a(0x90)],'threadId':_0x5d17bf['threadId'],'dT':D(_0x5d17bf[_0x33122a(0xd5)]),'personId':_0x5d17bf['userId'],'resolved':_0x1914c2['solved']===I[_0x33122a(0xce)],'unitId':_0xd49f8b,'subUnitId':_0x1113e6,'text':JSON['parse'](_0x5d17bf[_0x33122a(0xca)]),'parentId':_0x5aa36b}),_0x24694e=_0x1bf3ef(_0x1914c2[_0x33122a(0x77)][0x0]);return{..._0x24694e,'children':_0x1914c2[_0x33122a(0x77)][_0x33122a(0x79)](0x1)['map'](_0x215248=>_0x1bf3ef(_0x215248,_0x24694e['id']))};}return null;}let f=class{constructor(_0x42ed1d,_0xb04340,_0x226b85,_0x2f5d81){const _0xf47c06=_0x29f942;this[_0xf47c06(0xda)]=_0x42ed1d,this[_0xf47c06(0xcc)]=_0xb04340,this[_0xf47c06(0x97)]=_0x226b85,this[_0xf47c06(0x9e)]=_0x2f5d81;}async[_0x29f942(0xd6)](_0x30a525){const _0x383552=_0x29f942;var _0x1f432f,_0x1885cf;const {parentId:_0x1580ee,unitId:_0x1cd678,text:_0x5511bd,threadId:_0x78bdc7}=_0x30a525,_0x42c5fc=(_0x1885cf=(_0x1f432f=_0x5511bd[_0x383552(0xd9)])==null?void 0x0:_0x1f432f[_0x383552(0xad)](_0x5c2194=>_0x5c2194[_0x383552(0xb1)]===_0x34dea6[_0x383552(0xc8)])['map'](_0x48725a=>_0x48725a[_0x383552(0x93)]))!=null?_0x1885cf:[],_0x107562=JSON[_0x383552(0x7c)](_0x5511bd),_0xbf4aa6=(await this['_sessionService']['requireSession'](_0x1cd678))[_0x383552(0xa0)]();if(_0x1580ee){const _0x4ed5ac={'memberId':_0xbf4aa6,'unitId':_0x1cd678,'content':_0x107562,'mention':_0x42c5fc,'threadId':_0x78bdc7},_0x2158e6=(await this[_0x383552(0xda)][_0x383552(0x99)]('/universer-api/comment/unit/'+_0x1cd678+_0x383552(0xc0),{'body':_0x4ed5ac}))[_0x383552(0xb6)]['reply'];return{..._0x30a525,'id':_0x2158e6[_0x383552(0x90)],'dT':_0x2cc82e(+_0x2158e6['createTimestamp'])[_0x383552(0xcf)](_0x383552(0x7a)),'personId':_0x2158e6[_0x383552(0xbc)]};}else{const _0x16d554={'memberId':_0xbf4aa6,'unitId':_0x1cd678,'content':_0x107562,'mention':_0x42c5fc},_0x129cf8=await this['_httpService']['post'](_0x383552(0xb4)+_0x1cd678+_0x383552(0xb5),{'body':_0x16d554});return X(_0x129cf8[_0x383552(0xb6)][_0x383552(0x83)],_0x30a525);}}async[_0x29f942(0xa1)](_0x579e57){const _0x2437ea=_0x29f942;var _0x443f02,_0x3950d5;const {text:_0x342a39,unitId:_0x41113d}=_0x579e57,_0x1f9957=(_0x3950d5=(_0x443f02=_0x342a39[_0x2437ea(0xd9)])==null?void 0x0:_0x443f02[_0x2437ea(0xad)](_0x70d4d0=>_0x70d4d0[_0x2437ea(0xb1)]===_0x34dea6[_0x2437ea(0xc8)])['map'](_0x4b2ce5=>_0x4b2ce5[_0x2437ea(0x93)]))!=null?_0x3950d5:[],_0x4c6401=JSON[_0x2437ea(0x7c)](_0x342a39),_0x54944d=_0x579e57[_0x2437ea(0x7d)],_0x5b79a8=_0x579e57['id'],_0x1a984b={'memberId':(await this[_0x2437ea(0x97)]['requireSession'](_0x41113d))['getMemberID'](),'unitId':_0x41113d,'threadId':_0x54944d,'mention':_0x1f9957,'content':_0x4c6401,'replyId':_0x5b79a8},_0x5eb928=await this[_0x2437ea(0xda)][_0x2437ea(0x99)](_0x2437ea(0xb4)+_0x41113d+_0x2437ea(0xbb),{'body':_0x1a984b});return!_0x5eb928[_0x2437ea(0xb6)][_0x2437ea(0xb7)]||_0x5eb928[_0x2437ea(0xb6)][_0x2437ea(0xb7)][_0x2437ea(0x81)]===0x1;}async[_0x29f942(0xa3)](_0x573fa1){const _0x1973b3=_0x29f942,{unitId:_0x16647d}=_0x573fa1,_0x285bd0=_0x573fa1[_0x1973b3(0x7d)],_0x17424f={'memberId':this[_0x1973b3(0xcc)][_0x1973b3(0xd3)]()[_0x1973b3(0x88)],'unitId':_0x16647d,'threadId':_0x285bd0,'solved':_0x573fa1[_0x1973b3(0x8f)]?I[_0x1973b3(0xce)]:I[_0x1973b3(0xdb)]},_0x52d854=await this[_0x1973b3(0xda)][_0x1973b3(0x99)](_0x1973b3(0xb4)+_0x16647d+_0x1973b3(0x9d),{'body':_0x17424f});return!_0x52d854[_0x1973b3(0xb6)][_0x1973b3(0xb7)]||_0x52d854[_0x1973b3(0xb6)][_0x1973b3(0xb7)][_0x1973b3(0x81)]===0x1;}async['deleteComment'](_0x5df071,_0x3251dc,_0x369714,_0x5b58e1){const _0x26730e=_0x29f942,_0x5b727f={'memberId':(await this['_sessionService'][_0x26730e(0x74)](_0x5df071))[_0x26730e(0xa0)](),'threadId':_0x369714,'replyId':_0x5b58e1,'unitId':_0x5df071},_0x487ede=await this[_0x26730e(0xda)][_0x26730e(0x99)](_0x26730e(0xb4)+_0x5df071+'/delete',{'body':_0x5b727f});return!_0x487ede[_0x26730e(0xb6)]['error']||_0x487ede[_0x26730e(0xb6)][_0x26730e(0xb7)][_0x26730e(0x81)]===0x1;}async['listComments'](_0x842a0,_0x55cd22,_0x4c22a8){const _0x2656a0=_0x29f942,_0x1e8614={'unitId':_0x842a0,'threadId':_0x4c22a8},_0x44dda7=await this[_0x2656a0(0xda)][_0x2656a0(0x99)](_0x2656a0(0xb4)+_0x842a0+'/list',{'body':_0x1e8614}),_0x2d63e8=_0x4c22a8[_0x2656a0(0xbf)](_0x369cb7=>ee(_0x44dda7[_0x2656a0(0xb6)][_0x2656a0(0xc2)][_0x369cb7],_0x842a0,_0x55cd22))[_0x2656a0(0xad)](Boolean);return Object[_0x2656a0(0x95)](_0x44dda7[_0x2656a0(0xb6)][_0x2656a0(0x8d)])[_0x2656a0(0xb2)](_0x16a64b=>{const _0x112fc5=_0x2656a0;this[_0x112fc5(0xcc)][_0x112fc5(0x7f)](_0x16a64b);}),_0x2d63e8;}[_0x29f942(0x76)](_0x12067f){const _0x3769cc=_0x29f942;return{'id':_0x12067f['id'],'threadId':_0x12067f[_0x3769cc(0x7d)],'ref':_0x12067f[_0x3769cc(0xc4)]};}};f=Q([_(0x0,_0x4a7b12(_0x6ab9de)),_(0x1,_0x4a7b12(_0x533617)),_(0x2,_0x4a7b12(_0x288fc5)),_(0x3,_0x4a7b12(_0x5cbd2e))],f);function _0x18b4(){const _0x252ecc=['Delete','requireSession','Solve','saveCommentToSnapshot','replies','get','slice','YYYY/MM/DD\x20HH:mm','Edit','stringify','threadId','parse','addUser','608486deckMd','code','getOwnPropertyDescriptor','comment','_init','_initDataSource','subscribe','solved','userID','6kyfxnH','29444iVeazD','unitId','parentId','users','dataSource','resolved','replyId','24nBmYud','type','rangeId','Add','values','getUnit','_sessionService','111762WboYmk','post','_commentService','disposeWithMe','add','/solved','_injector','256sxjpxg','getMemberID','updateComment','/universer-api/user/list','resolveComment','_threadCommentDataSourceService','length','Unknown','commentUpdate$','387681uveVCN','deleteComment','_threadCommentModel','getComment','Reply','filter','personId','UNRECOGNIZED','onReady','rangeType','forEach','30FzDJmy','/universer-api/comment/unit/','/add','body','error','setConfig','_configService','_config','/edit','userId','onStarting','find','map','/reply','symbol','comments','4501937ZxEPIB','ref','pipe','798469OYddvF','root','COMMENT','defineProperty','content','syncUpdateMutationToColla','_userService','_initUserSync','Solved','format','_threadCommentDataSource','delete','UNIVER_UNKNOWN','getCurrentUser','user','createTimestamp','addComment','getUser','1140640pAamzs','customRanges','_httpService','OpenOrReOpen'];_0x18b4=function(){return _0x252ecc;};return _0x18b4();}var re=Object['getOwnPropertyDescriptor'],te=(_0x59ce3d,_0x2ffb86,_0x4898ec,_0x4ed95e)=>{const _0x3a5a8f=_0x29f942;for(var _0x255abc=_0x4ed95e>0x1?void 0x0:_0x4ed95e?re(_0x2ffb86,_0x4898ec):_0x2ffb86,_0x44a226=_0x59ce3d[_0x3a5a8f(0xa5)]-0x1,_0x1b64fa;_0x44a226>=0x0;_0x44a226--)(_0x1b64fa=_0x59ce3d[_0x44a226])&&(_0x255abc=_0x1b64fa(_0x255abc)||_0x255abc);return _0x255abc;},N=(_0xbd7a2c,_0x394313)=>(_0x124176,_0x4d2816)=>_0x394313(_0x124176,_0x4d2816,_0xbd7a2c);let g=class extends _0x350976{constructor(_0x353a25,_0x3a5186){const _0x20cb97=_0x29f942;super(),this[_0x20cb97(0xa4)]=_0x353a25,this[_0x20cb97(0xd0)]=_0x3a5186,this[_0x20cb97(0x85)]();}[_0x29f942(0x85)](){const _0x392763=_0x29f942;this[_0x392763(0xa4)][_0x392763(0x8e)]=this[_0x392763(0xd0)],this[_0x392763(0xa4)][_0x392763(0xcb)]=!0x1;}};g=te([N(0x0,_0x23e802),N(0x1,_0x4a7b12(f))],g);var se=Object[_0x29f942(0xc9)],oe=Object[_0x29f942(0x82)],ne=(_0x4d8029,_0x398518,_0x167439)=>_0x398518 in _0x4d8029?se(_0x4d8029,_0x398518,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x167439}):_0x4d8029[_0x398518]=_0x167439,ie=(_0x4a8c80,_0x31f37a,_0x1f7bc2,_0x560063)=>{const _0x326d84=_0x29f942;for(var _0x2dad6c=_0x560063>0x1?void 0x0:_0x560063?oe(_0x31f37a,_0x1f7bc2):_0x31f37a,_0x58093a=_0x4a8c80[_0x326d84(0xa5)]-0x1,_0x5b8c4c;_0x58093a>=0x0;_0x58093a--)(_0x5b8c4c=_0x4a8c80[_0x58093a])&&(_0x2dad6c=_0x5b8c4c(_0x2dad6c)||_0x2dad6c);return _0x2dad6c;},w=(_0x4c2cf6,_0x375d6a)=>(_0x275d55,_0x3b9896)=>_0x375d6a(_0x275d55,_0x3b9896,_0x4c2cf6),$=(_0x1c8e9d,_0x42eabe,_0x513ad6)=>ne(_0x1c8e9d,typeof _0x42eabe!=_0x29f942(0xc1)?_0x42eabe+'':_0x42eabe,_0x513ad6);let b=class extends _0x107eaa{constructor(_0x597ba8=M,_0x4651e3,_0x3651b1){const _0x10fffd=_0x29f942;super(),this[_0x10fffd(0xba)]=_0x597ba8,this[_0x10fffd(0x9e)]=_0x4651e3,this[_0x10fffd(0xb9)]=_0x3651b1;const {..._0x393650}=_0x58037e({},M,this[_0x10fffd(0xba)]);this[_0x10fffd(0xb9)][_0x10fffd(0xb8)](z,_0x393650);}[_0x29f942(0xbd)](){const _0x1631d7=_0x29f942;[[f],[g],[S]][_0x1631d7(0xb2)](_0x90e66a=>{const _0x32995a=_0x1631d7;this[_0x32995a(0x9e)]['add'](_0x90e66a);});}[_0x29f942(0xb0)](){const _0x345913=_0x29f942;this['_injector'][_0x345913(0x78)](g),this['_injector'][_0x345913(0x78)](S);}};$(b,'pluginName',W),$(b,_0x29f942(0x92),_0x2ee514[_0x29f942(0xd2)]),b=ie([_0xc85228(_0x20a2ec,_0x43f539,_0x18fa8c),w(0x1,_0x4a7b12(_0x5cbd2e)),w(0x2,_0xaab53c)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x410f(_0x27a1fd,_0x2720aa){const _0x1c187d=_0x1c18();return _0x410f=function(_0x410f69,_0x4ec8c7){_0x410f69=_0x410f69-0x95;let _0x2e3902=_0x1c187d[_0x410f69];return _0x2e3902;},_0x410f(_0x27a1fd,_0x2720aa);}function _0x1c18(){const _0x2d7a1c=['bufferTime','/universer-api/comment/unit/','Unknown','UniverNetwork','replyId','UniverCollaborationClientPlugin','Edit','payload','YYYY/MM/DD\x20HH:mm','/delete','forEach','_injector','Reply','_init','HTTPService','_threadCommentModel','comments','CollaborationSessionService','DependentOn','listComments','dataSource','deleteComment','solved','UniverThreadCommentDataSourcePlugin','resolveComment','dayjs','172790qVdmaG','delete','resolved','map','stringify','symbol','UniverProLicense','user','Add','COMMENT','32Lxvmqy','/list','Disposable','rxjs','body','values','content','threadId','parentId','personId','disposeWithMe','commentUpdate$','addComment','filter','getMemberID','updateComment','/edit','OpenOrReOpen','23889330IzBCJQ','requireSession','@univerjs/thread-comment-ui','_userService','parse','63060cKGYBz','UniverThreadCommentUIPlugin','Injector','@univerjs-pro/collaboration-client','object','35PTAeud','IThreadCommentDataSourceService','UniverProThreadCommentDatasource','error','_threadCommentDataSourceService','Inject','getCurrentUser','_config','subscribe','_sessionService','_threadCommentDataSource','Module','66858ghvMtw','/add','userID','unitId','length','getOwnPropertyDescriptor','getUser','addUser','@univerjs/core','Delete','createTimestamp','/solved','UserManagerService','setConfig','exports','get','getUnit','_initDataSource','onReady','Solve','reply','Plugin','root','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','28gmGtWR','IConfigService','@univerjs-pro/license','customRanges','@univerjs/thread-comment','slice','rangeType','code','UNRECOGNIZED','thread-comment-data-source.config','rangeId','_commentService','Solved','pipe','/reply','1102076uXxQTh','size','_configService','ThreadCommentModel','getComment','UNIVER_UNKNOWN','_httpService','merge','UniverProCollaborationClient','type','post','ref','userId','2818359bosKOi','replies','add','/universer-api/user/list','toStringTag','CustomRangeType','_initUserSync','2849541XIASJz'];_0x1c18=function(){return _0x2d7a1c;};return _0x1c18();}(function(_0x2b7fe3,_0xc2721f){const _0x5775a9=_0x410f,_0x21e795=_0x2b7fe3();while(!![]){try{const _0x54dde2=-parseInt(_0x5775a9(0xdf))/0x1+-parseInt(_0x5775a9(0xb7))/0x2+parseInt(_0x5775a9(0xf3))/0x3+-parseInt(_0x5775a9(0xd0))/0x4*(parseInt(_0x5775a9(0x10e))/0x5)+-parseInt(_0x5775a9(0xa6))/0x6*(parseInt(_0x5775a9(0xab))/0x7)+-parseInt(_0x5775a9(0x118))/0x8*(parseInt(_0x5775a9(0xec))/0x9)+parseInt(_0x5775a9(0xa1))/0xa;if(_0x54dde2===_0xc2721f)break;else _0x21e795['push'](_0x21e795['shift']());}catch(_0x4f78d1){_0x21e795['push'](_0x21e795['shift']());}}}(_0x1c18,0xa0357),function(_0x485e70,_0x5f2182){const _0x4d9e83=_0x410f;typeof exports==_0x4d9e83(0xaa)&&typeof module<'u'?_0x5f2182(exports,require(_0x4d9e83(0xa9)),require(_0x4d9e83(0xd2)),require(_0x4d9e83(0xbf)),require(_0x4d9e83(0xa3)),require(_0x4d9e83(0xd4)),require(_0x4d9e83(0x11b)),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x4d9e83(0xc5),_0x4d9e83(0xa9),_0x4d9e83(0xd2),'@univerjs/core',_0x4d9e83(0xa3),_0x4d9e83(0xd4),_0x4d9e83(0x11b),'@univerjs/network'],_0x5f2182):(_0x485e70=typeof globalThis<'u'?globalThis:_0x485e70||self,_0x5f2182(_0x485e70[_0x4d9e83(0xad)]={},_0x485e70[_0x4d9e83(0xe7)],_0x485e70[_0x4d9e83(0x114)],_0x485e70['UniverCore'],_0x485e70['UniverThreadCommentUi'],_0x485e70['UniverThreadComment'],_0x485e70[_0x4d9e83(0x11b)],_0x485e70[_0x4d9e83(0xf7)]));}(this,function(_0x3d532e,_0x2a531a,_0x607b56,_0x2ff182,_0x2ba0c7,_0x3333ab,_0x54fdf3,_0x2c3537){'use strict';const _0x51689e=_0x410f;const _0x5cdddb=_0x51689e(0xcf);var _0x5cd0af=(_0x58d7ef=>(_0x58d7ef[_0x58d7ef[_0x51689e(0xa0)]=0x0]='OpenOrReOpen',_0x58d7ef[_0x58d7ef[_0x51689e(0xdc)]=0x1]=_0x51689e(0xdc),_0x58d7ef[_0x58d7ef['UNRECOGNIZED']=-0x1]=_0x51689e(0xd8),_0x58d7ef))(_0x5cd0af||{}),_0x88baf7=(_0x2d9957=>(_0x2d9957[_0x2d9957[_0x51689e(0xf6)]=0x0]='Unknown',_0x2d9957[_0x2d9957['Add']=0x1]=_0x51689e(0x116),_0x2d9957[_0x2d9957[_0x51689e(0x100)]=0x2]='Reply',_0x2d9957[_0x2d9957[_0x51689e(0xfa)]=0x3]=_0x51689e(0xfa),_0x2d9957[_0x2d9957['Delete']=0x4]=_0x51689e(0xc0),_0x2d9957[_0x2d9957[_0x51689e(0xca)]=0x5]=_0x51689e(0xca),_0x2d9957[_0x2d9957[_0x51689e(0xd8)]=-0x1]=_0x51689e(0xd8),_0x2d9957))(_0x88baf7||{});const _0x42fb5c=_0x2d44b1=>_0x2ff182[_0x51689e(0x10d)](new Date(+_0x2d44b1))['format'](_0x51689e(0xfc)),_0x5861c6=async(_0x18bfe4,_0x10c202)=>{const _0x14e13d=_0x51689e,_0x364bb2=_0x18bfe4[_0x14e13d(0xc6)](_0x2ff182[_0x14e13d(0xc3)]),_0x32b8e2=_0x18bfe4['get'](_0x2c3537[_0x14e13d(0x102)]);_0x10c202[_0x14e13d(0xfe)](_0x4ce48c=>{const _0x5164e6=_0x14e13d;_0x364bb2[_0x5164e6(0xbd)](_0x4ce48c)&&_0x10c202[_0x5164e6(0x10f)](_0x4ce48c);}),_0x10c202[_0x14e13d(0xe0)]&&(await _0x32b8e2[_0x14e13d(0xc6)](_0x14e13d(0xef),{'params':{'userIDs':[..._0x10c202]}}))[_0x14e13d(0x11c)]['users'][_0x14e13d(0xfe)](_0x54a077=>{const _0x1aeda1=_0x14e13d;_0x54a077&&_0x364bb2[_0x1aeda1(0xbe)](_0x54a077);});};var _0x167b67=Object[_0x51689e(0xbc)],_0xf2faa2=(_0x28df88,_0x643ae6,_0x92f1f3,_0x51e148)=>{const _0x45e9f2=_0x51689e;for(var _0x1e7c2a=_0x51e148>0x1?void 0x0:_0x51e148?_0x167b67(_0x643ae6,_0x92f1f3):_0x643ae6,_0x5343eb=_0x28df88[_0x45e9f2(0xbb)]-0x1,_0x4dd1a4;_0x5343eb>=0x0;_0x5343eb--)(_0x4dd1a4=_0x28df88[_0x5343eb])&&(_0x1e7c2a=_0x4dd1a4(_0x1e7c2a)||_0x1e7c2a);return _0x1e7c2a;},_0x3945d3=(_0x48d9b7,_0x28d36f)=>(_0x1c0e0b,_0x5aea7a)=>_0x28d36f(_0x1c0e0b,_0x5aea7a,_0x48d9b7);let _0x583e4a=class extends _0x2ff182[_0x51689e(0x11a)]{constructor(_0x3b9f75,_0x1751fa,_0x336a91,_0x35a366){const _0x2a1129=_0x51689e;super(),this[_0x2a1129(0xdb)]=_0x3b9f75,this['_threadCommentModel']=_0x1751fa,this[_0x2a1129(0xa4)]=_0x336a91,this[_0x2a1129(0xff)]=_0x35a366,this['_init'](),this[_0x2a1129(0xf2)]();}[_0x51689e(0xf2)](){const _0x1e52c2=_0x51689e;this[_0x1e52c2(0x99)](this[_0x1e52c2(0x103)]['commentUpdate$'][_0x1e52c2(0xdd)](_0x54fdf3[_0x1e52c2(0xf4)](0x10))[_0x1e52c2(0xb3)](_0x54bc2f=>{const _0x1cc859=_0x1e52c2,_0x5e184c=new Set();_0x54bc2f[_0x1cc859(0xfe)](_0xf58037=>{const _0x44080a=_0x1cc859;switch(_0xf58037['type']){case'add':{const _0x246fd6=_0xf58037[_0x44080a(0xfb)][_0x44080a(0x98)];_0x5e184c[_0x44080a(0xee)](_0x246fd6);break;}}}),_0x5861c6(this['_injector'],_0x5e184c);}));}[_0x51689e(0x101)](){const _0x201744=_0x51689e;this[_0x201744(0x99)](this['_commentService'][_0x201744(0x9a)][_0x201744(0xb3)](async _0x4fa531=>{const _0x41a488=_0x201744;var _0x20fed6,_0x4825fc,_0x20ff1a,_0x23e1e5;const _0x1c5ec3=(_0x20fed6=this[_0x41a488(0x103)][_0x41a488(0xc7)](_0x4fa531[_0x41a488(0xba)])['find'](_0x1668cc=>_0x1668cc[_0x41a488(0x96)]===_0x4fa531[_0x41a488(0x96)]))==null?void 0x0:_0x20fed6[_0x41a488(0xcd)];if(!_0x1c5ec3)return;const {unitId:_0x40c0f6,subUnitId:_0x4dc0be}=_0x1c5ec3;switch(_0x4fa531[_0x41a488(0x115)]&&this['_userService'][_0x41a488(0xbe)](_0x4fa531[_0x41a488(0x115)]),_0x4fa531[_0x41a488(0xe8)]){case _0x88baf7[_0x41a488(0x116)]:break;case _0x88baf7[_0x41a488(0x100)]:{this[_0x41a488(0x103)][_0x41a488(0x9b)](_0x40c0f6,_0x4dc0be,{'unitId':_0x40c0f6,'subUnitId':_0x4dc0be,'ref':'','id':_0x4fa531[_0x41a488(0xf8)],'dT':_0x42fb5c(+_0x4fa531[_0x41a488(0xc1)]),'threadId':_0x4fa531[_0x41a488(0x96)],'personId':(_0x20ff1a=(_0x4825fc=_0x4fa531[_0x41a488(0x115)])==null?void 0x0:_0x4825fc[_0x41a488(0xb9)])!=null?_0x20ff1a:_0x4fa531['userId'],'text':JSON[_0x41a488(0xa5)](_0x4fa531['content']),'parentId':_0x1c5ec3['id']});break;}case _0x88baf7[_0x41a488(0xc0)]:{const _0x1f33ae=this[_0x41a488(0x103)][_0x41a488(0xe3)](_0x40c0f6,_0x4dc0be,_0x4fa531[_0x41a488(0xf8)]);_0x1f33ae&&_0x1f33ae[_0x41a488(0x97)]&&this[_0x41a488(0x103)][_0x41a488(0x109)](_0x40c0f6,_0x4dc0be,_0x4fa531[_0x41a488(0xf8)]);break;}case _0x88baf7[_0x41a488(0xfa)]:{this[_0x41a488(0x103)][_0x41a488(0x9e)](_0x40c0f6,_0x4dc0be,{'commentId':_0x4fa531[_0x41a488(0xf8)],'text':JSON[_0x41a488(0xa5)](_0x4fa531[_0x41a488(0x95)])});break;}case _0x88baf7[_0x41a488(0xca)]:{const _0x4971e1=(_0x23e1e5=this['_threadCommentModel'][_0x41a488(0xc7)](_0x4fa531['unitId'])['find'](_0x3dcf09=>_0x3dcf09[_0x41a488(0x96)]===_0x4fa531[_0x41a488(0x96)]))==null?void 0x0:_0x23e1e5[_0x41a488(0xcd)];_0x4971e1&&this[_0x41a488(0x103)][_0x41a488(0x10c)](_0x40c0f6,_0x4dc0be,_0x4971e1['id'],_0x4fa531['solved']===_0x5cd0af[_0x41a488(0xdc)]);break;}}}));}};_0x583e4a=_0xf2faa2([_0x3945d3(0x0,_0x2ff182[_0x51689e(0xb0)](_0x2a531a['CommentService'])),_0x3945d3(0x1,_0x2ff182[_0x51689e(0xb0)](_0x3333ab[_0x51689e(0xe2)])),_0x3945d3(0x2,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xc3)])),_0x3945d3(0x3,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xa8)]))],_0x583e4a);const _0x1f8f63=_0x51689e(0xd9),_0x2cb5a4={};var _0x3ec1f6=Object[_0x51689e(0xbc)],_0x40f11d=(_0xe190b1,_0x5892c9,_0x5c5764,_0x1ad566)=>{const _0x202af1=_0x51689e;for(var _0x28245e=_0x1ad566>0x1?void 0x0:_0x1ad566?_0x3ec1f6(_0x5892c9,_0x5c5764):_0x5892c9,_0x2d48ed=_0xe190b1[_0x202af1(0xbb)]-0x1,_0x29f028;_0x2d48ed>=0x0;_0x2d48ed--)(_0x29f028=_0xe190b1[_0x2d48ed])&&(_0x28245e=_0x29f028(_0x28245e)||_0x28245e);return _0x28245e;},_0x30a906=(_0x5e8f92,_0x41985f)=>(_0x50cfe9,_0xbf691a)=>_0x41985f(_0x50cfe9,_0xbf691a,_0x5e8f92);function _0x40d04b(_0x8fa03,_0x3cec04){const _0x489140=_0x51689e,_0x20a66c=_0x8fa03['replies'][0x0];return{..._0x3cec04,'id':_0x20a66c['replyId'],'resolved':_0x8fa03['solved']===0x1,'dT':_0x42fb5c(_0x20a66c['createTimestamp']),'personId':_0x20a66c['userId'],'threadId':_0x20a66c[_0x489140(0x96)]};}function _0x32914d(_0x1db743,_0x206acf,_0x137d6c){const _0x47b4ca=_0x51689e;var _0x54f508,_0x12bf42;if(((_0x12bf42=(_0x54f508=_0x1db743==null?void 0x0:_0x1db743[_0x47b4ca(0xed)])==null?void 0x0:_0x54f508[_0x47b4ca(0xbb)])!=null?_0x12bf42:0x0)>0x0){const _0xbfdab7=(_0x31baf7,_0x17a927)=>({'id':_0x31baf7['replyId'],'threadId':_0x31baf7[_0x47b4ca(0x96)],'dT':_0x42fb5c(_0x31baf7[_0x47b4ca(0xc1)]),'personId':_0x31baf7[_0x47b4ca(0xeb)],'resolved':_0x1db743[_0x47b4ca(0x10a)]===_0x5cd0af[_0x47b4ca(0xdc)],'unitId':_0x206acf,'subUnitId':_0x137d6c,'text':JSON['parse'](_0x31baf7['content']),'parentId':_0x17a927}),_0x483ee1=_0xbfdab7(_0x1db743[_0x47b4ca(0xed)][0x0]);return{..._0x483ee1,'children':_0x1db743[_0x47b4ca(0xed)][_0x47b4ca(0xd5)](0x1)['map'](_0x30d471=>_0xbfdab7(_0x30d471,_0x483ee1['id']))};}return null;}let _0x2c3739=class{constructor(_0xe732c4,_0x8dbb52,_0x55a60f,_0x382314){const _0x1e2215=_0x51689e;this['_httpService']=_0xe732c4,this[_0x1e2215(0xa4)]=_0x8dbb52,this[_0x1e2215(0xb4)]=_0x55a60f,this[_0x1e2215(0xff)]=_0x382314;}async['addComment'](_0x3ecc92){const _0x1bc3f8=_0x51689e;var _0x48800a,_0x5559a7;const {parentId:_0x9aa941,unitId:_0x5711c4,text:_0xff1f34,threadId:_0x847573}=_0x3ecc92,_0x2aaf63=(_0x5559a7=(_0x48800a=_0xff1f34[_0x1bc3f8(0xd3)])==null?void 0x0:_0x48800a['filter'](_0x40f06e=>_0x40f06e[_0x1bc3f8(0xd6)]===_0x2ff182[_0x1bc3f8(0xf1)][_0x1bc3f8(0x117)])[_0x1bc3f8(0x111)](_0x40560e=>_0x40560e['rangeId']))!=null?_0x5559a7:[],_0x26625a=JSON[_0x1bc3f8(0x112)](_0xff1f34),_0x19570e=(await this[_0x1bc3f8(0xb4)][_0x1bc3f8(0xa2)](_0x5711c4))['getMemberID']();if(_0x9aa941){const _0x502a55={'memberId':_0x19570e,'unitId':_0x5711c4,'content':_0x26625a,'mention':_0x2aaf63,'threadId':_0x847573},_0x52d0c7=(await this['_httpService'][_0x1bc3f8(0xe9)](_0x1bc3f8(0xf5)+_0x5711c4+_0x1bc3f8(0xde),{'body':_0x502a55}))[_0x1bc3f8(0x11c)][_0x1bc3f8(0xcb)];return{..._0x3ecc92,'id':_0x52d0c7[_0x1bc3f8(0xf8)],'dT':_0x2ff182[_0x1bc3f8(0x10d)](+_0x52d0c7[_0x1bc3f8(0xc1)])[_0x1bc3f8(0xce)](_0x1bc3f8(0xfc)),'personId':_0x52d0c7[_0x1bc3f8(0xeb)]};}else{const _0x2f75a8={'memberId':_0x19570e,'unitId':_0x5711c4,'content':_0x26625a,'mention':_0x2aaf63},_0x165bbc=await this[_0x1bc3f8(0xe5)][_0x1bc3f8(0xe9)](_0x1bc3f8(0xf5)+_0x5711c4+_0x1bc3f8(0xb8),{'body':_0x2f75a8});return _0x40d04b(_0x165bbc['body']['comment'],_0x3ecc92);}}async[_0x51689e(0x9e)](_0x23a511){const _0x15fde0=_0x51689e;var _0x3b5c24,_0x268f26;const {text:_0x2b6eab,unitId:_0x47c855}=_0x23a511,_0x108a89=(_0x268f26=(_0x3b5c24=_0x2b6eab['customRanges'])==null?void 0x0:_0x3b5c24['filter'](_0x2a4c4a=>_0x2a4c4a[_0x15fde0(0xd6)]===_0x2ff182[_0x15fde0(0xf1)][_0x15fde0(0x117)])['map'](_0x535324=>_0x535324[_0x15fde0(0xda)]))!=null?_0x268f26:[],_0x5e92d3=JSON[_0x15fde0(0x112)](_0x2b6eab),_0x4737b8=_0x23a511[_0x15fde0(0x96)],_0x430670=_0x23a511['id'],_0x2a83d6={'memberId':(await this['_sessionService'][_0x15fde0(0xa2)](_0x47c855))[_0x15fde0(0x9d)](),'unitId':_0x47c855,'threadId':_0x4737b8,'mention':_0x108a89,'content':_0x5e92d3,'replyId':_0x430670},_0x1274ee=await this[_0x15fde0(0xe5)][_0x15fde0(0xe9)](_0x15fde0(0xf5)+_0x47c855+_0x15fde0(0x9f),{'body':_0x2a83d6});return!_0x1274ee[_0x15fde0(0x11c)][_0x15fde0(0xae)]||_0x1274ee[_0x15fde0(0x11c)]['error'][_0x15fde0(0xd7)]===0x1;}async[_0x51689e(0x10c)](_0x13a860){const _0x191419=_0x51689e,{unitId:_0x2ef3b7}=_0x13a860,_0x18409e=_0x13a860[_0x191419(0x96)],_0xf1c56f={'memberId':this[_0x191419(0xa4)][_0x191419(0xb1)]()[_0x191419(0xb9)],'unitId':_0x2ef3b7,'threadId':_0x18409e,'solved':_0x13a860[_0x191419(0x110)]?_0x5cd0af['Solved']:_0x5cd0af['OpenOrReOpen']},_0x3525bd=await this['_httpService'][_0x191419(0xe9)](_0x191419(0xf5)+_0x2ef3b7+_0x191419(0xc2),{'body':_0xf1c56f});return!_0x3525bd['body']['error']||_0x3525bd[_0x191419(0x11c)][_0x191419(0xae)][_0x191419(0xd7)]===0x1;}async[_0x51689e(0x109)](_0x13e50c,_0x10d702,_0x591d12,_0x1cdcc3){const _0xa12152=_0x51689e,_0x188232={'memberId':(await this[_0xa12152(0xb4)][_0xa12152(0xa2)](_0x13e50c))[_0xa12152(0x9d)](),'threadId':_0x591d12,'replyId':_0x1cdcc3,'unitId':_0x13e50c},_0x35fafc=await this[_0xa12152(0xe5)][_0xa12152(0xe9)](_0xa12152(0xf5)+_0x13e50c+_0xa12152(0xfd),{'body':_0x188232});return!_0x35fafc['body'][_0xa12152(0xae)]||_0x35fafc[_0xa12152(0x11c)][_0xa12152(0xae)][_0xa12152(0xd7)]===0x1;}async[_0x51689e(0x107)](_0x55ff7d,_0x49fa10,_0x5ed314){const _0x47ca89=_0x51689e,_0x494a27={'unitId':_0x55ff7d,'threadId':_0x5ed314},_0x2efa45=await this[_0x47ca89(0xe5)][_0x47ca89(0xe9)]('/universer-api/comment/unit/'+_0x55ff7d+_0x47ca89(0x119),{'body':_0x494a27}),_0x2aad23=_0x5ed314['map'](_0x1f6b6d=>_0x32914d(_0x2efa45[_0x47ca89(0x11c)][_0x47ca89(0x104)][_0x1f6b6d],_0x55ff7d,_0x49fa10))[_0x47ca89(0x9c)](Boolean);return Object[_0x47ca89(0x11d)](_0x2efa45['body']['users'])[_0x47ca89(0xfe)](_0x266ec2=>{const _0x408e9a=_0x47ca89;this[_0x408e9a(0xa4)][_0x408e9a(0xbe)](_0x266ec2);}),_0x2aad23;}['saveCommentToSnapshot'](_0x55df52){const _0x2ea5fb=_0x51689e;return{'id':_0x55df52['id'],'threadId':_0x55df52['threadId'],'ref':_0x55df52[_0x2ea5fb(0xea)]};}};_0x2c3739=_0x40f11d([_0x30a906(0x0,_0x2ff182[_0x51689e(0xb0)](_0x2c3537[_0x51689e(0x102)])),_0x30a906(0x1,_0x2ff182['Inject'](_0x2ff182['UserManagerService'])),_0x30a906(0x2,_0x2ff182[_0x51689e(0xb0)](_0x2a531a[_0x51689e(0x105)])),_0x30a906(0x3,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xa8)]))],_0x2c3739);var _0x238171=Object[_0x51689e(0xbc)],_0x2d8aaa=(_0x520dcf,_0x5bfa2d,_0x54e9a9,_0x48f091)=>{const _0x39ef6f=_0x51689e;for(var _0x573edf=_0x48f091>0x1?void 0x0:_0x48f091?_0x238171(_0x5bfa2d,_0x54e9a9):_0x5bfa2d,_0x2365f0=_0x520dcf[_0x39ef6f(0xbb)]-0x1,_0x2f6a2f;_0x2365f0>=0x0;_0x2365f0--)(_0x2f6a2f=_0x520dcf[_0x2365f0])&&(_0x573edf=_0x2f6a2f(_0x573edf)||_0x573edf);return _0x573edf;},_0x303f9e=(_0x2b7d47,_0x1952bd)=>(_0x247bb7,_0x1be979)=>_0x1952bd(_0x247bb7,_0x1be979,_0x2b7d47);let _0x58eacd=class extends _0x2ff182[_0x51689e(0x11a)]{constructor(_0x22e674,_0x51818a){const _0x4439a1=_0x51689e;super(),this[_0x4439a1(0xaf)]=_0x22e674,this[_0x4439a1(0xb5)]=_0x51818a,this[_0x4439a1(0xc8)]();}['_initDataSource'](){const _0xb25e85=_0x51689e;this['_threadCommentDataSourceService'][_0xb25e85(0x108)]=this[_0xb25e85(0xb5)],this[_0xb25e85(0xaf)]['syncUpdateMutationToColla']=!0x1;}};_0x58eacd=_0x2d8aaa([_0x303f9e(0x0,_0x3333ab[_0x51689e(0xac)]),_0x303f9e(0x1,_0x2ff182['Inject'](_0x2c3739))],_0x58eacd);var _0xfc1a22=Object['defineProperty'],_0x2d09da=Object[_0x51689e(0xbc)],_0x40ac32=(_0x44cc1a,_0x898d04,_0x1941c5)=>_0x898d04 in _0x44cc1a?_0xfc1a22(_0x44cc1a,_0x898d04,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1941c5}):_0x44cc1a[_0x898d04]=_0x1941c5,_0xdd27c4=(_0x18365c,_0x47e282,_0x50d311,_0x5b2a2b)=>{const _0x2f2d7e=_0x51689e;for(var _0x5a1664=_0x5b2a2b>0x1?void 0x0:_0x5b2a2b?_0x2d09da(_0x47e282,_0x50d311):_0x47e282,_0x1561f8=_0x18365c[_0x2f2d7e(0xbb)]-0x1,_0x3e2dae;_0x1561f8>=0x0;_0x1561f8--)(_0x3e2dae=_0x18365c[_0x1561f8])&&(_0x5a1664=_0x3e2dae(_0x5a1664)||_0x5a1664);return _0x5a1664;},_0x55edc0=(_0x1743ea,_0x41bd69)=>(_0x96ecdb,_0x3a1cce)=>_0x41bd69(_0x96ecdb,_0x3a1cce,_0x1743ea),_0x36774f=(_0x5c744d,_0x377ee2,_0x59c6ae)=>_0x40ac32(_0x5c744d,typeof _0x377ee2!=_0x51689e(0x113)?_0x377ee2+'':_0x377ee2,_0x59c6ae);_0x3d532e[_0x51689e(0x10b)]=class extends _0x2ff182[_0x51689e(0xcc)]{constructor(_0xd2f0c8=_0x2cb5a4,_0x58b329,_0x3f0daa){const _0x12c32c=_0x51689e;super(),this[_0x12c32c(0xb2)]=_0xd2f0c8,this[_0x12c32c(0xff)]=_0x58b329,this['_configService']=_0x3f0daa;const {..._0x1f57f1}=_0x2ff182[_0x12c32c(0xe6)]({},_0x2cb5a4,this[_0x12c32c(0xb2)]);this[_0x12c32c(0xe1)][_0x12c32c(0xc4)](_0x1f8f63,_0x1f57f1);}['onStarting'](){const _0x3b7321=_0x51689e;[[_0x2c3739],[_0x58eacd],[_0x583e4a]][_0x3b7321(0xfe)](_0x41d47e=>{const _0x5ab5d5=_0x3b7321;this[_0x5ab5d5(0xff)]['add'](_0x41d47e);});}[_0x51689e(0xc9)](){const _0x42bebf=_0x51689e;this[_0x42bebf(0xff)][_0x42bebf(0xc6)](_0x58eacd),this[_0x42bebf(0xff)][_0x42bebf(0xc6)](_0x583e4a);}},_0x36774f(_0x3d532e[_0x51689e(0x10b)],'pluginName',_0x5cdddb),_0x36774f(_0x3d532e['UniverThreadCommentDataSourcePlugin'],_0x51689e(0xe8),_0x2ff182['UniverInstanceType'][_0x51689e(0xe4)]),_0x3d532e['UniverThreadCommentDataSourcePlugin']=_0xdd27c4([_0x2ff182[_0x51689e(0x106)](_0x2ba0c7[_0x51689e(0xa7)],_0x2a531a[_0x51689e(0xf9)],_0x607b56['UniverLicensePlugin']),_0x55edc0(0x1,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xa8)])),_0x55edc0(0x2,_0x2ff182[_0x51689e(0xd1)])],_0x3d532e[_0x51689e(0x10b)]),Object['defineProperty'](_0x3d532e,Symbol[_0x51689e(0xf0)],{'value':_0x51689e(0xb6)});}));
1
+ function _0x89c0(_0x1b026d,_0x4e6853){const _0x403343=_0x4033();return _0x89c0=function(_0x89c0f3,_0x42b613){_0x89c0f3=_0x89c0f3-0xc6;let _0x5bc220=_0x403343[_0x89c0f3];return _0x5bc220;},_0x89c0(_0x1b026d,_0x4e6853);}(function(_0x93a121,_0x472870){const _0x5b2b87=_0x89c0,_0x35ffad=_0x93a121();while(!![]){try{const _0x229587=-parseInt(_0x5b2b87(0xf1))/0x1*(-parseInt(_0x5b2b87(0x11a))/0x2)+parseInt(_0x5b2b87(0x118))/0x3*(parseInt(_0x5b2b87(0x120))/0x4)+parseInt(_0x5b2b87(0xdf))/0x5+-parseInt(_0x5b2b87(0xe2))/0x6+-parseInt(_0x5b2b87(0x129))/0x7*(-parseInt(_0x5b2b87(0x136))/0x8)+parseInt(_0x5b2b87(0xdd))/0x9+parseInt(_0x5b2b87(0x102))/0xa*(-parseInt(_0x5b2b87(0xfa))/0xb);if(_0x229587===_0x472870)break;else _0x35ffad['push'](_0x35ffad['shift']());}catch(_0x163a21){_0x35ffad['push'](_0x35ffad['shift']());}}}(_0x4033,0x899bc),function(_0x429597,_0x5671e1){const _0x45d6b0=_0x89c0;typeof exports==_0x45d6b0(0x101)&&typeof module<'u'?_0x5671e1(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x45d6b0(0x122)),require(_0x45d6b0(0x11c)),require('@univerjs/thread-comment'),require(_0x45d6b0(0x137)),require(_0x45d6b0(0xe8))):typeof define==_0x45d6b0(0x14a)&&define[_0x45d6b0(0x111)]?define([_0x45d6b0(0x138),_0x45d6b0(0xcd),_0x45d6b0(0x13c),'@univerjs/core',_0x45d6b0(0x11c),_0x45d6b0(0x105),_0x45d6b0(0x137),_0x45d6b0(0xe8)],_0x5671e1):(_0x429597=typeof globalThis<'u'?globalThis:_0x429597||self,_0x5671e1(_0x429597[_0x45d6b0(0xee)]={},_0x429597[_0x45d6b0(0xed)],_0x429597[_0x45d6b0(0xd2)],_0x429597['UniverCore'],_0x429597[_0x45d6b0(0xf2)],_0x429597[_0x45d6b0(0xeb)],_0x429597['rxjs'],_0x429597['UniverNetwork']));}(this,function(_0xb0cef1,_0x357611,_0x3d611f,_0x1ffeb1,_0x24c0cd,_0x3652f4,_0x173474,_0x5c1cc1){'use strict';const _0xc3de1b=_0x89c0;const _0x1c8b08=_0xc3de1b(0x139);var _0x525bf8=(_0x1c0b2e=>(_0x1c0b2e[_0x1c0b2e[_0xc3de1b(0x13f)]=0x0]=_0xc3de1b(0x13f),_0x1c0b2e[_0x1c0b2e['Solved']=0x1]=_0xc3de1b(0xc7),_0x1c0b2e[_0x1c0b2e['UNRECOGNIZED']=-0x1]=_0xc3de1b(0x121),_0x1c0b2e))(_0x525bf8||{}),_0x594eba=(_0x27b78a=>(_0x27b78a[_0x27b78a[_0xc3de1b(0x10d)]=0x0]='Unknown',_0x27b78a[_0x27b78a[_0xc3de1b(0xf9)]=0x1]=_0xc3de1b(0xf9),_0x27b78a[_0x27b78a[_0xc3de1b(0xf5)]=0x2]=_0xc3de1b(0xf5),_0x27b78a[_0x27b78a[_0xc3de1b(0xdc)]=0x3]=_0xc3de1b(0xdc),_0x27b78a[_0x27b78a['Delete']=0x4]=_0xc3de1b(0xe4),_0x27b78a[_0x27b78a[_0xc3de1b(0x106)]=0x5]=_0xc3de1b(0x106),_0x27b78a[_0x27b78a[_0xc3de1b(0x121)]=-0x1]=_0xc3de1b(0x121),_0x27b78a))(_0x594eba||{});const _0x174ea9=_0x56ef5d=>_0x1ffeb1[_0xc3de1b(0x132)](new Date(+_0x56ef5d))[_0xc3de1b(0xef)](_0xc3de1b(0xd0)),_0x3e352e=async(_0xaee7e2,_0x41d61f)=>{const _0x16bf4a=_0xc3de1b,_0x3316d7=_0xaee7e2['get'](_0x1ffeb1[_0x16bf4a(0x149)]),_0x362544=_0xaee7e2['get'](_0x5c1cc1['HTTPService']);_0x41d61f[_0x16bf4a(0x143)](_0x463ba2=>{const _0x482c51=_0x16bf4a;_0x3316d7['getUser'](_0x463ba2)&&_0x41d61f[_0x482c51(0x12f)](_0x463ba2);}),_0x41d61f[_0x16bf4a(0xe6)]&&(await _0x362544[_0x16bf4a(0x114)](_0x16bf4a(0xff),{'params':{'userIDs':[..._0x41d61f]}}))[_0x16bf4a(0xd9)]['users'][_0x16bf4a(0x143)](_0x505670=>{const _0x33c835=_0x16bf4a;_0x505670&&_0x3316d7[_0x33c835(0x146)](_0x505670);});};var _0x1a66e4=Object['getOwnPropertyDescriptor'],_0xec67d4=(_0x202d5b,_0x457b00,_0x264211,_0x5d95e3)=>{const _0x121d03=_0xc3de1b;for(var _0x5ef480=_0x5d95e3>0x1?void 0x0:_0x5d95e3?_0x1a66e4(_0x457b00,_0x264211):_0x457b00,_0x8461ac=_0x202d5b[_0x121d03(0x110)]-0x1,_0x4480ab;_0x8461ac>=0x0;_0x8461ac--)(_0x4480ab=_0x202d5b[_0x8461ac])&&(_0x5ef480=_0x4480ab(_0x5ef480)||_0x5ef480);return _0x5ef480;},_0x366ffd=(_0x85836c,_0x3e525b)=>(_0x177839,_0x395ec9)=>_0x3e525b(_0x177839,_0x395ec9,_0x85836c);let _0x1c89a1=class extends _0x1ffeb1[_0xc3de1b(0xd1)]{constructor(_0x16020c,_0xeb42f3,_0x184ef9,_0x429d6d){const _0x153e37=_0xc3de1b;super(),this[_0x153e37(0x115)]=_0x16020c,this['_threadCommentModel']=_0xeb42f3,this[_0x153e37(0xda)]=_0x184ef9,this['_injector']=_0x429d6d,this[_0x153e37(0xc9)](),this[_0x153e37(0xc6)]();}[_0xc3de1b(0xc6)](){const _0x1d8ea4=_0xc3de1b;this[_0x1d8ea4(0x104)](this[_0x1d8ea4(0xd5)][_0x1d8ea4(0x11e)]['pipe'](_0x173474[_0x1d8ea4(0xcc)](0x10))[_0x1d8ea4(0xf4)](_0xa7308d=>{const _0x27afe0=new Set();_0xa7308d['forEach'](_0x2d9d2e=>{const _0x23b241=_0x89c0;switch(_0x2d9d2e[_0x23b241(0x113)]){case _0x23b241(0xe7):{const _0x35c24e=_0x2d9d2e['payload'][_0x23b241(0x11b)];_0x27afe0[_0x23b241(0xe7)](_0x35c24e);break;}}}),_0x3e352e(this['_injector'],_0x27afe0);}));}['_init'](){const _0x57e4a0=_0xc3de1b;this[_0x57e4a0(0x104)](this[_0x57e4a0(0x115)][_0x57e4a0(0x11e)][_0x57e4a0(0xf4)](async _0xb09e72=>{const _0xadc399=_0x57e4a0;var _0x532058,_0x4fbf74,_0x443bcd,_0x263ebb;const _0x108946=(_0x532058=this['_threadCommentModel'][_0xadc399(0x125)](_0xb09e72['unitId'])[_0xadc399(0xcb)](_0x51f59c=>_0x51f59c[_0xadc399(0x135)]===_0xb09e72[_0xadc399(0x135)]))==null?void 0x0:_0x532058[_0xadc399(0x116)];if(!_0x108946)return;const {unitId:_0x2a7fea,subUnitId:_0x19842a}=_0x108946;switch(_0xb09e72[_0xadc399(0xf0)]&&this[_0xadc399(0xda)]['addUser'](_0xb09e72[_0xadc399(0xf0)]),_0xb09e72[_0xadc399(0x113)]){case _0x594eba[_0xadc399(0xf9)]:break;case _0x594eba['Reply']:{this[_0xadc399(0xd5)][_0xadc399(0xce)](_0x2a7fea,_0x19842a,{'unitId':_0x2a7fea,'subUnitId':_0x19842a,'ref':'','id':_0xb09e72[_0xadc399(0x140)],'dT':_0x174ea9(+_0xb09e72[_0xadc399(0x10c)]),'threadId':_0xb09e72[_0xadc399(0x135)],'personId':(_0x443bcd=(_0x4fbf74=_0xb09e72[_0xadc399(0xf0)])==null?void 0x0:_0x4fbf74[_0xadc399(0xe5)])!=null?_0x443bcd:_0xb09e72[_0xadc399(0x10f)],'text':JSON['parse'](_0xb09e72[_0xadc399(0xe0)]),'parentId':_0x108946['id']});break;}case _0x594eba['Delete']:{const _0x3f1d86=this[_0xadc399(0xd5)]['getComment'](_0x2a7fea,_0x19842a,_0xb09e72[_0xadc399(0x140)]);_0x3f1d86&&_0x3f1d86['parentId']&&this['_threadCommentModel']['deleteComment'](_0x2a7fea,_0x19842a,_0xb09e72[_0xadc399(0x140)]);break;}case _0x594eba[_0xadc399(0xdc)]:{this[_0xadc399(0xd5)][_0xadc399(0xcf)](_0x2a7fea,_0x19842a,{'commentId':_0xb09e72[_0xadc399(0x140)],'text':JSON[_0xadc399(0x148)](_0xb09e72[_0xadc399(0xe0)])});break;}case _0x594eba['Solve']:{const _0x513779=(_0x263ebb=this[_0xadc399(0xd5)]['getUnit'](_0xb09e72[_0xadc399(0x123)])[_0xadc399(0xcb)](_0x1b745b=>_0x1b745b[_0xadc399(0x135)]===_0xb09e72['threadId']))==null?void 0x0:_0x263ebb['root'];_0x513779&&this[_0xadc399(0xd5)]['resolveComment'](_0x2a7fea,_0x19842a,_0x513779['id'],_0xb09e72[_0xadc399(0x130)]===_0x525bf8[_0xadc399(0xc7)]);break;}}}));}};_0x1c89a1=_0xec67d4([_0x366ffd(0x0,_0x1ffeb1[_0xc3de1b(0xf7)](_0x357611[_0xc3de1b(0x10e)])),_0x366ffd(0x1,_0x1ffeb1[_0xc3de1b(0xf7)](_0x3652f4[_0xc3de1b(0xde)])),_0x366ffd(0x2,_0x1ffeb1[_0xc3de1b(0xf7)](_0x1ffeb1[_0xc3de1b(0x149)])),_0x366ffd(0x3,_0x1ffeb1['Inject'](_0x1ffeb1[_0xc3de1b(0x108)]))],_0x1c89a1);const _0x5b6d5c=_0xc3de1b(0x10b),_0x526451={};var _0x2638d6=Object[_0xc3de1b(0x127)],_0x4ae6e5=(_0x20d3ce,_0x567b89,_0x2faf91,_0x5b889d)=>{const _0x403e18=_0xc3de1b;for(var _0x1b3a2a=_0x5b889d>0x1?void 0x0:_0x5b889d?_0x2638d6(_0x567b89,_0x2faf91):_0x567b89,_0x2abedc=_0x20d3ce[_0x403e18(0x110)]-0x1,_0x581986;_0x2abedc>=0x0;_0x2abedc--)(_0x581986=_0x20d3ce[_0x2abedc])&&(_0x1b3a2a=_0x581986(_0x1b3a2a)||_0x1b3a2a);return _0x1b3a2a;},_0x546148=(_0xfc254,_0x25c493)=>(_0x4491e0,_0xfa280)=>_0x25c493(_0x4491e0,_0xfa280,_0xfc254);function _0x51c2f1(_0x5ae697,_0x772e81){const _0x1b265a=_0xc3de1b,_0x475046=_0x5ae697[_0x1b265a(0x112)][0x0];return{..._0x772e81,'id':_0x475046[_0x1b265a(0x140)],'resolved':_0x5ae697[_0x1b265a(0x130)]===0x1,'dT':_0x174ea9(_0x475046[_0x1b265a(0x10c)]),'personId':_0x475046[_0x1b265a(0x10f)],'threadId':_0x475046[_0x1b265a(0x135)]};}function _0x1eef8c(_0x4363d0,_0x58fdc5,_0x59873d){const _0x3bc486=_0xc3de1b;var _0x12b6ca,_0x13f435;if(((_0x13f435=(_0x12b6ca=_0x4363d0==null?void 0x0:_0x4363d0[_0x3bc486(0x112)])==null?void 0x0:_0x12b6ca[_0x3bc486(0x110)])!=null?_0x13f435:0x0)>0x0){const _0xdbf053=(_0x442158,_0x1ad7c4)=>({'id':_0x442158[_0x3bc486(0x140)],'threadId':_0x442158['threadId'],'dT':_0x174ea9(_0x442158[_0x3bc486(0x10c)]),'personId':_0x442158[_0x3bc486(0x10f)],'resolved':_0x4363d0[_0x3bc486(0x130)]===_0x525bf8[_0x3bc486(0xc7)],'unitId':_0x58fdc5,'subUnitId':_0x59873d,'text':JSON['parse'](_0x442158[_0x3bc486(0xe0)]),'parentId':_0x1ad7c4}),_0x2fd26a=_0xdbf053(_0x4363d0['replies'][0x0]);return{..._0x2fd26a,'children':_0x4363d0[_0x3bc486(0x112)][_0x3bc486(0xfd)](0x1)[_0x3bc486(0xfb)](_0x2e23d1=>_0xdbf053(_0x2e23d1,_0x2fd26a['id']))};}return null;}let _0x4c40cd=class{constructor(_0x1fb00a,_0xe33c41,_0x3cb56d,_0x20a2ed){const _0x3adaf=_0xc3de1b;this[_0x3adaf(0xe1)]=_0x1fb00a,this[_0x3adaf(0xda)]=_0xe33c41,this[_0x3adaf(0xd3)]=_0x3cb56d,this[_0x3adaf(0xec)]=_0x20a2ed;}async[_0xc3de1b(0xce)](_0x59a435){const _0x2a9001=_0xc3de1b;var _0x422829,_0x2b9cbe;const {parentId:_0x1d090e,unitId:_0x56e8f1,text:_0x1513f8,threadId:_0x3c5eb2}=_0x59a435,_0x2f50b6=(_0x2b9cbe=(_0x422829=_0x1513f8['customRanges'])==null?void 0x0:_0x422829['filter'](_0x249ec6=>_0x249ec6[_0x2a9001(0x100)]===_0x1ffeb1[_0x2a9001(0x134)]['COMMENT'])[_0x2a9001(0xfb)](_0x4bb51b=>_0x4bb51b['rangeId']))!=null?_0x2b9cbe:[],_0x3e26d1=JSON[_0x2a9001(0xca)](_0x1513f8),_0x1d8c02=(await this[_0x2a9001(0xd3)][_0x2a9001(0xc8)](_0x56e8f1))[_0x2a9001(0x10a)]();if(_0x1d090e){const _0x2d5b58={'memberId':_0x1d8c02,'unitId':_0x56e8f1,'content':_0x3e26d1,'mention':_0x2f50b6,'threadId':_0x3c5eb2},_0x450283=(await this[_0x2a9001(0xe1)]['post'](_0x2a9001(0x13b)+_0x56e8f1+_0x2a9001(0xd6),{'body':_0x2d5b58}))[_0x2a9001(0xd9)][_0x2a9001(0x142)];return{..._0x59a435,'id':_0x450283['replyId'],'dT':_0x1ffeb1[_0x2a9001(0x132)](+_0x450283['createTimestamp'])[_0x2a9001(0xef)](_0x2a9001(0xd0)),'personId':_0x450283[_0x2a9001(0x10f)]};}else{const _0x15d43d={'memberId':_0x1d8c02,'unitId':_0x56e8f1,'content':_0x3e26d1,'mention':_0x2f50b6},_0x246878=await this['_httpService'][_0x2a9001(0x11d)]('/universer-api/comment/unit/'+_0x56e8f1+_0x2a9001(0x147),{'body':_0x15d43d});return _0x51c2f1(_0x246878[_0x2a9001(0xd9)]['comment'],_0x59a435);}}async[_0xc3de1b(0xcf)](_0xacf0c3){const _0x37e088=_0xc3de1b;var _0x58d800,_0x2f894d;const {text:_0x45c4f7,unitId:_0x37b4b3}=_0xacf0c3,_0x406c94=(_0x2f894d=(_0x58d800=_0x45c4f7[_0x37e088(0x124)])==null?void 0x0:_0x58d800[_0x37e088(0xf8)](_0x207efa=>_0x207efa['rangeType']===_0x1ffeb1[_0x37e088(0x134)]['COMMENT'])[_0x37e088(0xfb)](_0x3937bf=>_0x3937bf[_0x37e088(0xe3)]))!=null?_0x2f894d:[],_0x30b20c=JSON['stringify'](_0x45c4f7),_0x3b1d35=_0xacf0c3[_0x37e088(0x135)],_0x46983a=_0xacf0c3['id'],_0x4c2606={'memberId':(await this['_sessionService'][_0x37e088(0xc8)](_0x37b4b3))['getMemberID'](),'unitId':_0x37b4b3,'threadId':_0x3b1d35,'mention':_0x406c94,'content':_0x30b20c,'replyId':_0x46983a},_0x24cf66=await this[_0x37e088(0xe1)][_0x37e088(0x11d)](_0x37e088(0x13b)+_0x37b4b3+_0x37e088(0xdb),{'body':_0x4c2606});return!_0x24cf66['body']['error']||_0x24cf66['body']['error'][_0x37e088(0x128)]===0x1;}async[_0xc3de1b(0x141)](_0xd32226){const _0x383ba3=_0xc3de1b,{unitId:_0x31c7bd}=_0xd32226,_0x505595=_0xd32226[_0x383ba3(0x135)],_0x4da7d8={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x31c7bd,'threadId':_0x505595,'solved':_0xd32226[_0x383ba3(0x131)]?_0x525bf8[_0x383ba3(0xc7)]:_0x525bf8['OpenOrReOpen']},_0x2edbf4=await this['_httpService'][_0x383ba3(0x11d)](_0x383ba3(0x13b)+_0x31c7bd+_0x383ba3(0x12e),{'body':_0x4da7d8});return!_0x2edbf4[_0x383ba3(0xd9)]['error']||_0x2edbf4[_0x383ba3(0xd9)][_0x383ba3(0x133)][_0x383ba3(0x128)]===0x1;}async[_0xc3de1b(0x13d)](_0x4d1e06,_0x2e8d15,_0x53fe6c,_0x464423){const _0x264f0b=_0xc3de1b,_0x540a4f={'memberId':(await this[_0x264f0b(0xd3)]['requireSession'](_0x4d1e06))[_0x264f0b(0x10a)](),'threadId':_0x53fe6c,'replyId':_0x464423,'unitId':_0x4d1e06},_0x5688f1=await this[_0x264f0b(0xe1)]['post'](_0x264f0b(0x13b)+_0x4d1e06+_0x264f0b(0xe9),{'body':_0x540a4f});return!_0x5688f1[_0x264f0b(0xd9)][_0x264f0b(0x133)]||_0x5688f1[_0x264f0b(0xd9)][_0x264f0b(0x133)][_0x264f0b(0x128)]===0x1;}async[_0xc3de1b(0xf3)](_0x50a49d,_0xa667b8,_0x2fa66d){const _0x3ac912=_0xc3de1b,_0x27316e={'unitId':_0x50a49d,'threadId':_0x2fa66d},_0x498d91=await this[_0x3ac912(0xe1)]['post'](_0x3ac912(0x13b)+_0x50a49d+'/list',{'body':_0x27316e}),_0x55ece8=_0x2fa66d['map'](_0x1c7f1b=>_0x1eef8c(_0x498d91[_0x3ac912(0xd9)]['comments'][_0x1c7f1b],_0x50a49d,_0xa667b8))[_0x3ac912(0xf8)](Boolean);return Object[_0x3ac912(0x144)](_0x498d91['body'][_0x3ac912(0x107)])[_0x3ac912(0x143)](_0x1e9448=>{const _0x266b91=_0x3ac912;this[_0x266b91(0xda)][_0x266b91(0x146)](_0x1e9448);}),_0x55ece8;}[_0xc3de1b(0x11f)](_0x2dd881){const _0x5352e9=_0xc3de1b;return{'id':_0x2dd881['id'],'threadId':_0x2dd881[_0x5352e9(0x135)],'ref':_0x2dd881[_0x5352e9(0x13a)]};}};_0x4c40cd=_0x4ae6e5([_0x546148(0x0,_0x1ffeb1['Inject'](_0x5c1cc1[_0xc3de1b(0xd8)])),_0x546148(0x1,_0x1ffeb1[_0xc3de1b(0xf7)](_0x1ffeb1[_0xc3de1b(0x149)])),_0x546148(0x2,_0x1ffeb1['Inject'](_0x357611[_0xc3de1b(0x12d)])),_0x546148(0x3,_0x1ffeb1[_0xc3de1b(0xf7)](_0x1ffeb1[_0xc3de1b(0x108)]))],_0x4c40cd);var _0x245f69=Object[_0xc3de1b(0x127)],_0x1c8d30=(_0x277ba8,_0xdd0c2,_0x58407d,_0x5d0101)=>{const _0x334ab2=_0xc3de1b;for(var _0x3bb2d0=_0x5d0101>0x1?void 0x0:_0x5d0101?_0x245f69(_0xdd0c2,_0x58407d):_0xdd0c2,_0x3348fb=_0x277ba8[_0x334ab2(0x110)]-0x1,_0x1a601a;_0x3348fb>=0x0;_0x3348fb--)(_0x1a601a=_0x277ba8[_0x3348fb])&&(_0x3bb2d0=_0x1a601a(_0x3bb2d0)||_0x3bb2d0);return _0x3bb2d0;},_0x4ed285=(_0x128721,_0x2a67b2)=>(_0x1e8b57,_0x2f0815)=>_0x2a67b2(_0x1e8b57,_0x2f0815,_0x128721);let _0x216cad=class extends _0x1ffeb1['Disposable']{constructor(_0x19ff2e,_0x760f18){const _0x47bbc7=_0xc3de1b;super(),this[_0x47bbc7(0xf6)]=_0x19ff2e,this['_threadCommentDataSource']=_0x760f18,this[_0x47bbc7(0x126)]();}['_initDataSource'](){const _0x376942=_0xc3de1b;this[_0x376942(0xf6)]['dataSource']=this[_0x376942(0x119)],this['_threadCommentDataSourceService'][_0x376942(0x145)]=!0x1;}};_0x216cad=_0x1c8d30([_0x4ed285(0x0,_0x3652f4[_0xc3de1b(0xd7)]),_0x4ed285(0x1,_0x1ffeb1[_0xc3de1b(0xf7)](_0x4c40cd))],_0x216cad);var _0x4da84f=Object[_0xc3de1b(0xea)],_0x27c11f=Object[_0xc3de1b(0x127)],_0x5f5913=(_0x549e77,_0x1d193a,_0xe3758f)=>_0x1d193a in _0x549e77?_0x4da84f(_0x549e77,_0x1d193a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe3758f}):_0x549e77[_0x1d193a]=_0xe3758f,_0x3346c1=(_0x2afede,_0x20b7f7,_0x58060d,_0x16f8c7)=>{const _0x3398b7=_0xc3de1b;for(var _0x366cf0=_0x16f8c7>0x1?void 0x0:_0x16f8c7?_0x27c11f(_0x20b7f7,_0x58060d):_0x20b7f7,_0xdc7279=_0x2afede[_0x3398b7(0x110)]-0x1,_0xae5cfb;_0xdc7279>=0x0;_0xdc7279--)(_0xae5cfb=_0x2afede[_0xdc7279])&&(_0x366cf0=_0xae5cfb(_0x366cf0)||_0x366cf0);return _0x366cf0;},_0x1526cb=(_0x2c74f4,_0x24bba8)=>(_0x147ba2,_0x1b2dfc)=>_0x24bba8(_0x147ba2,_0x1b2dfc,_0x2c74f4),_0x124bd5=(_0x3aa33a,_0x17be2a,_0x2021cf)=>_0x5f5913(_0x3aa33a,typeof _0x17be2a!='symbol'?_0x17be2a+'':_0x17be2a,_0x2021cf);_0xb0cef1[_0xc3de1b(0x13e)]=class extends _0x1ffeb1[_0xc3de1b(0xfe)]{constructor(_0x541099=_0x526451,_0x5ef7a0,_0x526baa){const _0x226729=_0xc3de1b;super(),this['_config']=_0x541099,this['_injector']=_0x5ef7a0,this['_configService']=_0x526baa;const {..._0x37a89c}=_0x1ffeb1[_0x226729(0x12c)]({},_0x526451,this[_0x226729(0x12a)]);this['_configService']['setConfig'](_0x5b6d5c,_0x37a89c);}[_0xc3de1b(0x117)](){const _0x3c9e99=_0xc3de1b;[[_0x4c40cd],[_0x216cad],[_0x1c89a1]][_0x3c9e99(0x143)](_0x3fa5e3=>{const _0x39af96=_0x3c9e99;this[_0x39af96(0xec)]['add'](_0x3fa5e3);});}[_0xc3de1b(0xd4)](){const _0x409ec3=_0xc3de1b;this[_0x409ec3(0xec)][_0x409ec3(0x114)](_0x216cad),this[_0x409ec3(0xec)]['get'](_0x1c89a1);}},_0x124bd5(_0xb0cef1['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1c8b08),_0x124bd5(_0xb0cef1[_0xc3de1b(0x13e)],_0xc3de1b(0x113),_0x1ffeb1[_0xc3de1b(0x109)][_0xc3de1b(0xfc)]),_0xb0cef1[_0xc3de1b(0x13e)]=_0x3346c1([_0x1ffeb1[_0xc3de1b(0x103)](_0x24c0cd[_0xc3de1b(0x12b)],_0x357611['UniverCollaborationClientPlugin'],_0x3d611f['UniverLicensePlugin']),_0x1526cb(0x1,_0x1ffeb1['Inject'](_0x1ffeb1[_0xc3de1b(0x108)])),_0x1526cb(0x2,_0x1ffeb1['IConfigService'])],_0xb0cef1['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0xb0cef1,Symbol['toStringTag'],{'value':'Module'});}));function _0x4033(){const _0xc81bdb=['code','14PAwreK','_config','UniverThreadCommentUIPlugin','merge','CollaborationSessionService','/solved','delete','solved','resolved','dayjs','error','CustomRangeType','threadId','2552224GpdYTp','rxjs','exports','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ref','/universer-api/comment/unit/','@univerjs-pro/license','deleteComment','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','replyId','resolveComment','reply','forEach','values','syncUpdateMutationToColla','addUser','/add','parse','UserManagerService','function','_initUserSync','Solved','requireSession','_init','stringify','find','bufferTime','@univerjs-pro/collaboration-client','addComment','updateComment','YYYY/MM/DD\x20HH:mm','Disposable','UniverProLicense','_sessionService','onReady','_threadCommentModel','/reply','IThreadCommentDataSourceService','HTTPService','body','_userService','/edit','Edit','7849800GrSnkQ','ThreadCommentModel','5179645VSgRQa','content','_httpService','6436908drGsoW','rangeId','Delete','userID','size','add','@univerjs/network','/delete','defineProperty','UniverThreadComment','_injector','UniverProCollaborationClient','UniverProThreadCommentDatasource','format','user','896606bHLgcA','UniverThreadCommentUi','listComments','subscribe','Reply','_threadCommentDataSourceService','Inject','filter','Add','25003TewBrx','map','UNIVER_UNKNOWN','slice','Plugin','/universer-api/user/list','rangeType','object','9870OGImgo','DependentOn','disposeWithMe','@univerjs/thread-comment','Solve','users','Injector','UniverInstanceType','getMemberID','thread-comment-data-source.config','createTimestamp','Unknown','CommentService','userId','length','amd','replies','type','get','_commentService','root','onStarting','187338rODKsV','_threadCommentDataSource','2MXmGhZ','personId','@univerjs/thread-comment-ui','post','commentUpdate$','saveCommentToSnapshot','28upTAiO','UNRECOGNIZED','@univerjs/core','unitId','customRanges','getUnit','_initDataSource','getOwnPropertyDescriptor'];_0x4033=function(){return _0xc81bdb;};return _0x4033();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.4",
3
+ "version": "0.6.5-nightly.202503131607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.4",
49
- "@univerjs/core": "0.6.4",
50
- "@univerjs-pro/license": "0.6.4",
51
- "@univerjs/network": "0.6.4",
48
+ "@univerjs-pro/collaboration-client": "0.6.5-nightly.202503131607",
49
+ "@univerjs/core": "0.6.5-nightly.202503131607",
52
50
  "@univerjs/protocol": "0.1.44-alpha.3",
53
- "@univerjs/thread-comment": "0.6.4",
54
- "@univerjs/thread-comment-ui": "0.6.4"
51
+ "@univerjs/thread-comment": "0.6.5-nightly.202503131607",
52
+ "@univerjs/thread-comment-ui": "0.6.5-nightly.202503131607",
53
+ "@univerjs/network": "0.6.5-nightly.202503131607",
54
+ "@univerjs-pro/license": "0.6.5-nightly.202503131607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
- "vite": "^6.2.0",
60
- "vitest": "^3.0.7",
61
- "@univerjs-infra/shared": "0.6.4"
59
+ "vite": "^6.2.1",
60
+ "vitest": "^3.0.8",
61
+ "@univerjs-infra/shared": "0.6.5"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",