@univerjs-pro/thread-comment-datasource 0.6.4 → 0.6.5-nightly.202503121607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
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 _0x55ad69=_0x3f4e;(function(_0x49f09e,_0x204edc){const _0x4efe58=_0x3f4e,_0x1f219f=_0x49f09e();while(!![]){try{const _0x3b95e1=parseInt(_0x4efe58(0x1b9))/0x1+-parseInt(_0x4efe58(0x1b4))/0x2+-parseInt(_0x4efe58(0x163))/0x3*(parseInt(_0x4efe58(0x1cf))/0x4)+parseInt(_0x4efe58(0x1a5))/0x5+-parseInt(_0x4efe58(0x16d))/0x6+parseInt(_0x4efe58(0x195))/0x7+parseInt(_0x4efe58(0x14f))/0x8;if(_0x3b95e1===_0x204edc)break;else _0x1f219f['push'](_0x1f219f['shift']());}catch(_0x2731dc){_0x1f219f['push'](_0x1f219f['shift']());}}}(_0x3408,0x875f3));Object[_0x55ad69(0x17a)](exports,Symbol['toStringTag'],{'value':_0x55ad69(0x183)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x55ad69(0x162)),c=require(_0x55ad69(0x1cb)),j=require('@univerjs/thread-comment-ui'),M=require(_0x55ad69(0x1c2)),w=require(_0x55ad69(0x19b)),P=require(_0x55ad69(0x1af)),U=_0x55ad69(0x1b7);var I=(_0xba19b4=>(_0xba19b4[_0xba19b4[_0x55ad69(0x19f)]=0x0]=_0x55ad69(0x19f),_0xba19b4[_0xba19b4['Solved']=0x1]='Solved',_0xba19b4[_0xba19b4[_0x55ad69(0x19a)]=-0x1]='UNRECOGNIZED',_0xba19b4))(I||{}),v=(_0x1b6724=>(_0x1b6724[_0x1b6724[_0x55ad69(0x19e)]=0x0]=_0x55ad69(0x19e),_0x1b6724[_0x1b6724['Add']=0x1]=_0x55ad69(0x1c8),_0x1b6724[_0x1b6724['Reply']=0x2]=_0x55ad69(0x1a8),_0x1b6724[_0x1b6724['Edit']=0x3]=_0x55ad69(0x176),_0x1b6724[_0x1b6724[_0x55ad69(0x179)]=0x4]='Delete',_0x1b6724[_0x1b6724[_0x55ad69(0x15b)]=0x5]=_0x55ad69(0x15b),_0x1b6724[_0x1b6724[_0x55ad69(0x19a)]=-0x1]=_0x55ad69(0x19a),_0x1b6724))(v||{});const f=_0x72d3f6=>c[_0x55ad69(0x153)](new Date(+_0x72d3f6))[_0x55ad69(0x196)](_0x55ad69(0x1ac)),R=async(_0x1689ed,_0xfc2dcf)=>{const _0x55d21c=_0x55ad69,_0x23aa51=_0x1689ed[_0x55d21c(0x1c7)](c[_0x55d21c(0x152)]),_0x5852e6=_0x1689ed[_0x55d21c(0x1c7)](P[_0x55d21c(0x14c)]);_0xfc2dcf[_0x55d21c(0x18a)](_0x3bb75f=>{const _0x4a49ab=_0x55d21c;_0x23aa51[_0x4a49ab(0x1bb)](_0x3bb75f)&&_0xfc2dcf[_0x4a49ab(0x17e)](_0x3bb75f);}),_0xfc2dcf['size']&&(await _0x5852e6['get'](_0x55d21c(0x1a2),{'params':{'userIDs':[..._0xfc2dcf]}}))['body'][_0x55d21c(0x170)]['forEach'](_0x3810a8=>{const _0x2b3344=_0x55d21c;_0x3810a8&&_0x23aa51[_0x2b3344(0x1b6)](_0x3810a8);});};var $=Object[_0x55ad69(0x168)],E=(_0xa98bb7,_0x275153,_0x570e50,_0x10c3bb)=>{const _0x14e804=_0x55ad69;for(var _0x54076=_0x10c3bb>0x1?void 0x0:_0x10c3bb?$(_0x275153,_0x570e50):_0x275153,_0x29aa0e=_0xa98bb7[_0x14e804(0x1b3)]-0x1,_0x3cbf61;_0x29aa0e>=0x0;_0x29aa0e--)(_0x3cbf61=_0xa98bb7[_0x29aa0e])&&(_0x54076=_0x3cbf61(_0x54076)||_0x54076);return _0x54076;},S=(_0x25823d,_0x5ef3c1)=>(_0x552242,_0x40a675)=>_0x5ef3c1(_0x552242,_0x40a675,_0x25823d);function _0x3f4e(_0x103076,_0x407b23){const _0x34089b=_0x3408();return _0x3f4e=function(_0x3f4ebf,_0x29dcbd){_0x3f4ebf=_0x3f4ebf-0x14c;let _0x27a585=_0x34089b[_0x3f4ebf];return _0x27a585;},_0x3f4e(_0x103076,_0x407b23);}let p=class extends c[_0x55ad69(0x1b0)]{constructor(_0x21cadd,_0x3cd73b,_0x10d0b3,_0x3079c2){const _0xff7160=_0x55ad69;super(),this[_0xff7160(0x190)]=_0x21cadd,this[_0xff7160(0x191)]=_0x3cd73b,this[_0xff7160(0x169)]=_0x10d0b3,this[_0xff7160(0x178)]=_0x3079c2,this['_init'](),this[_0xff7160(0x180)]();}[_0x55ad69(0x180)](){const _0x1961f0=_0x55ad69;this[_0x1961f0(0x1bc)](this[_0x1961f0(0x191)][_0x1961f0(0x154)][_0x1961f0(0x17c)](w[_0x1961f0(0x167)](0x10))[_0x1961f0(0x1ce)](_0x2d02e4=>{const _0x143b34=_0x1961f0,_0x576a82=new Set();_0x2d02e4[_0x143b34(0x18a)](_0x26f26a=>{const _0x5448a3=_0x143b34;switch(_0x26f26a[_0x5448a3(0x157)]){case'add':{const _0x23543c=_0x26f26a[_0x5448a3(0x160)][_0x5448a3(0x184)];_0x576a82['add'](_0x23543c);break;}}}),R(this[_0x143b34(0x178)],_0x576a82);}));}['_init'](){const _0x1f3d1b=_0x55ad69;this[_0x1f3d1b(0x1bc)](this[_0x1f3d1b(0x190)][_0x1f3d1b(0x154)][_0x1f3d1b(0x1ce)](async _0x1517ac=>{const _0xab867e=_0x1f3d1b;var _0x44b7e2,_0x153861,_0x461779,_0x4cacd4;const _0x529c11=(_0x44b7e2=this['_threadCommentModel'][_0xab867e(0x16b)](_0x1517ac[_0xab867e(0x1a6)])['find'](_0x271e57=>_0x271e57[_0xab867e(0x161)]===_0x1517ac[_0xab867e(0x161)]))==null?void 0x0:_0x44b7e2['root'];if(!_0x529c11)return;const {unitId:_0x558390,subUnitId:_0x1dfa7a}=_0x529c11;switch(_0x1517ac[_0xab867e(0x1a7)]&&this['_userService'][_0xab867e(0x1b6)](_0x1517ac[_0xab867e(0x1a7)]),_0x1517ac[_0xab867e(0x157)]){case v['Add']:break;case v[_0xab867e(0x1a8)]:{this[_0xab867e(0x191)]['addComment'](_0x558390,_0x1dfa7a,{'unitId':_0x558390,'subUnitId':_0x1dfa7a,'ref':'','id':_0x1517ac[_0xab867e(0x1c6)],'dT':f(+_0x1517ac['createTimestamp']),'threadId':_0x1517ac[_0xab867e(0x161)],'personId':(_0x461779=(_0x153861=_0x1517ac[_0xab867e(0x1a7)])==null?void 0x0:_0x153861[_0xab867e(0x18c)])!=null?_0x461779:_0x1517ac['userId'],'text':JSON['parse'](_0x1517ac[_0xab867e(0x16f)]),'parentId':_0x529c11['id']});break;}case v[_0xab867e(0x179)]:{const _0x300aa8=this[_0xab867e(0x191)][_0xab867e(0x17f)](_0x558390,_0x1dfa7a,_0x1517ac[_0xab867e(0x1c6)]);_0x300aa8&&_0x300aa8[_0xab867e(0x1be)]&&this[_0xab867e(0x191)]['deleteComment'](_0x558390,_0x1dfa7a,_0x1517ac[_0xab867e(0x1c6)]);break;}case v[_0xab867e(0x176)]:{this[_0xab867e(0x191)][_0xab867e(0x18d)](_0x558390,_0x1dfa7a,{'commentId':_0x1517ac['replyId'],'text':JSON[_0xab867e(0x17d)](_0x1517ac['content'])});break;}case v[_0xab867e(0x15b)]:{const _0x3a65a4=(_0x4cacd4=this[_0xab867e(0x191)]['getUnit'](_0x1517ac[_0xab867e(0x1a6)])['find'](_0x50b4e8=>_0x50b4e8[_0xab867e(0x161)]===_0x1517ac['threadId']))==null?void 0x0:_0x4cacd4[_0xab867e(0x171)];_0x3a65a4&&this[_0xab867e(0x191)][_0xab867e(0x193)](_0x558390,_0x1dfa7a,_0x3a65a4['id'],_0x1517ac[_0xab867e(0x1b5)]===I[_0xab867e(0x19d)]);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x55ad69(0x199)](M[_0x55ad69(0x15a)])),S(0x2,c[_0x55ad69(0x199)](c[_0x55ad69(0x152)])),S(0x3,c[_0x55ad69(0x199)](c[_0x55ad69(0x186)]))],p);const q=_0x55ad69(0x1aa),D={};var A=Object[_0x55ad69(0x168)],x=(_0x2cd731,_0x4714ca,_0x2aa9d3,_0x40aa96)=>{const _0xe985f2=_0x55ad69;for(var _0x547f98=_0x40aa96>0x1?void 0x0:_0x40aa96?A(_0x4714ca,_0x2aa9d3):_0x4714ca,_0x5d5d43=_0x2cd731[_0xe985f2(0x1b3)]-0x1,_0x270a3d;_0x5d5d43>=0x0;_0x5d5d43--)(_0x270a3d=_0x2cd731[_0x5d5d43])&&(_0x547f98=_0x270a3d(_0x547f98)||_0x547f98);return _0x547f98;},_=(_0x5aff0e,_0xb920c5)=>(_0xfe62a1,_0x2a60a5)=>_0xb920c5(_0xfe62a1,_0x2a60a5,_0x5aff0e);function Y(_0x49a043,_0x741cfa){const _0x8d668e=_0x55ad69,_0x2ab65e=_0x49a043[_0x8d668e(0x1b8)][0x0];return{..._0x741cfa,'id':_0x2ab65e[_0x8d668e(0x1c6)],'resolved':_0x49a043[_0x8d668e(0x1b5)]===0x1,'dT':f(_0x2ab65e[_0x8d668e(0x1c9)]),'personId':_0x2ab65e[_0x8d668e(0x14e)],'threadId':_0x2ab65e['threadId']};}function G(_0x399d64,_0x54ad8b,_0x5072c3){const _0x1640ad=_0x55ad69;var _0x47906d,_0x1cf785;if(((_0x1cf785=(_0x47906d=_0x399d64==null?void 0x0:_0x399d64[_0x1640ad(0x1b8)])==null?void 0x0:_0x47906d[_0x1640ad(0x1b3)])!=null?_0x1cf785:0x0)>0x0){const _0xa3a951=(_0x301ab7,_0x397c11)=>({'id':_0x301ab7['replyId'],'threadId':_0x301ab7['threadId'],'dT':f(_0x301ab7[_0x1640ad(0x1c9)]),'personId':_0x301ab7[_0x1640ad(0x14e)],'resolved':_0x399d64[_0x1640ad(0x1b5)]===I[_0x1640ad(0x19d)],'unitId':_0x54ad8b,'subUnitId':_0x5072c3,'text':JSON[_0x1640ad(0x17d)](_0x301ab7[_0x1640ad(0x16f)]),'parentId':_0x397c11}),_0x2ff817=_0xa3a951(_0x399d64['replies'][0x0]);return{..._0x2ff817,'children':_0x399d64[_0x1640ad(0x1b8)][_0x1640ad(0x1ad)](0x1)[_0x1640ad(0x194)](_0x530daa=>_0xa3a951(_0x530daa,_0x2ff817['id']))};}return null;}let g=class{constructor(_0x1b3d1d,_0x3346e7,_0x10ffc3,_0x402a41){const _0x4c7bf8=_0x55ad69;this[_0x4c7bf8(0x1ae)]=_0x1b3d1d,this[_0x4c7bf8(0x169)]=_0x3346e7,this[_0x4c7bf8(0x1b2)]=_0x10ffc3,this['_injector']=_0x402a41;}async[_0x55ad69(0x192)](_0x298ff3){const _0x3bdca4=_0x55ad69;var _0x565efb,_0x1de105;const {parentId:_0x449cb3,unitId:_0x5a3cbd,text:_0x372a88,threadId:_0x5aa6c0}=_0x298ff3,_0x71ba6e=(_0x1de105=(_0x565efb=_0x372a88[_0x3bdca4(0x1a3)])==null?void 0x0:_0x565efb[_0x3bdca4(0x18f)](_0x37b08=>_0x37b08['rangeType']===c[_0x3bdca4(0x1a0)][_0x3bdca4(0x198)])[_0x3bdca4(0x194)](_0x44781e=>_0x44781e[_0x3bdca4(0x16a)]))!=null?_0x1de105:[],_0xa88061=JSON[_0x3bdca4(0x197)](_0x372a88),_0x43bc9e=(await this[_0x3bdca4(0x1b2)][_0x3bdca4(0x17b)](_0x5a3cbd))[_0x3bdca4(0x1bf)]();if(_0x449cb3){const _0x51ee3e={'memberId':_0x43bc9e,'unitId':_0x5a3cbd,'content':_0xa88061,'mention':_0x71ba6e,'threadId':_0x5aa6c0},_0xf3974a=(await this['_httpService'][_0x3bdca4(0x1ab)](_0x3bdca4(0x174)+_0x5a3cbd+_0x3bdca4(0x15c),{'body':_0x51ee3e}))[_0x3bdca4(0x165)][_0x3bdca4(0x1c5)];return{..._0x298ff3,'id':_0xf3974a[_0x3bdca4(0x1c6)],'dT':c[_0x3bdca4(0x153)](+_0xf3974a[_0x3bdca4(0x1c9)])[_0x3bdca4(0x196)](_0x3bdca4(0x1ac)),'personId':_0xf3974a[_0x3bdca4(0x14e)]};}else{const _0x510bf0={'memberId':_0x43bc9e,'unitId':_0x5a3cbd,'content':_0xa88061,'mention':_0x71ba6e},_0x5429ab=await this[_0x3bdca4(0x1ae)][_0x3bdca4(0x1ab)](_0x3bdca4(0x174)+_0x5a3cbd+_0x3bdca4(0x16e),{'body':_0x510bf0});return Y(_0x5429ab[_0x3bdca4(0x165)][_0x3bdca4(0x156)],_0x298ff3);}}async['updateComment'](_0x17e9d0){const _0x2b2270=_0x55ad69;var _0x2cd46a,_0x55ff71;const {text:_0x3c4d7e,unitId:_0x4cd18d}=_0x17e9d0,_0x1b47bb=(_0x55ff71=(_0x2cd46a=_0x3c4d7e['customRanges'])==null?void 0x0:_0x2cd46a[_0x2b2270(0x18f)](_0xab7bfe=>_0xab7bfe['rangeType']===c[_0x2b2270(0x1a0)][_0x2b2270(0x198)])['map'](_0xc7a6dc=>_0xc7a6dc[_0x2b2270(0x16a)]))!=null?_0x55ff71:[],_0x3e64a5=JSON['stringify'](_0x3c4d7e),_0x5c3636=_0x17e9d0['threadId'],_0x3344bc=_0x17e9d0['id'],_0x54e568={'memberId':(await this[_0x2b2270(0x1b2)][_0x2b2270(0x17b)](_0x4cd18d))[_0x2b2270(0x1bf)](),'unitId':_0x4cd18d,'threadId':_0x5c3636,'mention':_0x1b47bb,'content':_0x3e64a5,'replyId':_0x3344bc},_0xff9349=await this[_0x2b2270(0x1ae)][_0x2b2270(0x1ab)]('/universer-api/comment/unit/'+_0x4cd18d+_0x2b2270(0x18e),{'body':_0x54e568});return!_0xff9349['body']['error']||_0xff9349[_0x2b2270(0x165)][_0x2b2270(0x155)][_0x2b2270(0x187)]===0x1;}async[_0x55ad69(0x193)](_0x43f208){const _0x3ad000=_0x55ad69,{unitId:_0x1f6db3}=_0x43f208,_0x4ba67e=_0x43f208[_0x3ad000(0x161)],_0x1669ad={'memberId':this[_0x3ad000(0x169)][_0x3ad000(0x1bd)]()[_0x3ad000(0x18c)],'unitId':_0x1f6db3,'threadId':_0x4ba67e,'solved':_0x43f208[_0x3ad000(0x1b1)]?I['Solved']:I[_0x3ad000(0x19f)]},_0x4ae7d5=await this['_httpService'][_0x3ad000(0x1ab)](_0x3ad000(0x174)+_0x1f6db3+_0x3ad000(0x158),{'body':_0x1669ad});return!_0x4ae7d5[_0x3ad000(0x165)][_0x3ad000(0x155)]||_0x4ae7d5[_0x3ad000(0x165)][_0x3ad000(0x155)][_0x3ad000(0x187)]===0x1;}async[_0x55ad69(0x1ca)](_0x824528,_0x17c6ce,_0x1d1175,_0x19edd5){const _0x2dcab1=_0x55ad69,_0x67b26b={'memberId':(await this[_0x2dcab1(0x1b2)][_0x2dcab1(0x17b)](_0x824528))[_0x2dcab1(0x1bf)](),'threadId':_0x1d1175,'replyId':_0x19edd5,'unitId':_0x824528},_0x3253a0=await this[_0x2dcab1(0x1ae)][_0x2dcab1(0x1ab)](_0x2dcab1(0x174)+_0x824528+_0x2dcab1(0x19c),{'body':_0x67b26b});return!_0x3253a0[_0x2dcab1(0x165)]['error']||_0x3253a0[_0x2dcab1(0x165)][_0x2dcab1(0x155)]['code']===0x1;}async[_0x55ad69(0x1a1)](_0x1e62de,_0x8de3d,_0x156319){const _0x180c6e=_0x55ad69,_0x13e553={'unitId':_0x1e62de,'threadId':_0x156319},_0x565c24=await this[_0x180c6e(0x1ae)][_0x180c6e(0x1ab)](_0x180c6e(0x174)+_0x1e62de+_0x180c6e(0x1cd),{'body':_0x13e553}),_0x1052bd=_0x156319[_0x180c6e(0x194)](_0x2dea7b=>G(_0x565c24[_0x180c6e(0x165)][_0x180c6e(0x1a4)][_0x2dea7b],_0x1e62de,_0x8de3d))[_0x180c6e(0x18f)](Boolean);return Object[_0x180c6e(0x173)](_0x565c24[_0x180c6e(0x165)][_0x180c6e(0x170)])[_0x180c6e(0x18a)](_0x283ce9=>{const _0x1c17e2=_0x180c6e;this[_0x1c17e2(0x169)][_0x1c17e2(0x1b6)](_0x283ce9);}),_0x1052bd;}[_0x55ad69(0x150)](_0x4f248c){const _0x43e34e=_0x55ad69;return{'id':_0x4f248c['id'],'threadId':_0x4f248c[_0x43e34e(0x161)],'ref':_0x4f248c[_0x43e34e(0x1a9)]};}};g=x([_(0x0,c[_0x55ad69(0x199)](P[_0x55ad69(0x14c)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x55ad69(0x199)](b[_0x55ad69(0x18b)])),_(0x3,c[_0x55ad69(0x199)](c[_0x55ad69(0x186)]))],g);var H=Object[_0x55ad69(0x168)],J=(_0x133483,_0x48926b,_0x57cbd2,_0x3c6d87)=>{for(var _0x20cbe2=_0x3c6d87>0x1?void 0x0:_0x3c6d87?H(_0x48926b,_0x57cbd2):_0x48926b,_0x5606fc=_0x133483['length']-0x1,_0x44c428;_0x5606fc>=0x0;_0x5606fc--)(_0x44c428=_0x133483[_0x5606fc])&&(_0x20cbe2=_0x44c428(_0x20cbe2)||_0x20cbe2);return _0x20cbe2;},y=(_0xa511c5,_0x293d2b)=>(_0x2f5bc3,_0x732ba9)=>_0x293d2b(_0x2f5bc3,_0x732ba9,_0xa511c5);let C=class extends c[_0x55ad69(0x1b0)]{constructor(_0x53904e,_0x4799a3){const _0x474ed6=_0x55ad69;super(),this[_0x474ed6(0x16c)]=_0x53904e,this[_0x474ed6(0x15f)]=_0x4799a3,this['_initDataSource']();}[_0x55ad69(0x175)](){const _0xbd97fc=_0x55ad69;this[_0xbd97fc(0x16c)][_0xbd97fc(0x188)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xbd97fc(0x177)]=!0x1;}};function _0x3408(){const _0x7d5456=['_sessionService','length','1418532FKivCQ','solved','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','998239MODElZ','UniverThreadCommentDataSourcePlugin','getUser','disposeWithMe','getCurrentUser','parentId','getMemberID','UniverThreadCommentUIPlugin','onReady','@univerjs/thread-comment','UniverCollaborationClientPlugin','onStarting','reply','replyId','get','Add','createTimestamp','deleteComment','@univerjs/core','UNIVER_UNKNOWN','/list','subscribe','4400kLXjUT','_configService','HTTPService','merge','userId','1966768TkMpwL','saveCommentToSnapshot','DependentOn','UserManagerService','dayjs','commentUpdate$','error','comment','type','/solved','UniverInstanceType','ThreadCommentModel','Solve','/reply','pluginName','UniverLicensePlugin','_threadCommentDataSource','payload','threadId','@univerjs-pro/license','522tphOBc','setConfig','body','Plugin','bufferTime','getOwnPropertyDescriptor','_userService','rangeId','getUnit','_threadCommentDataSourceService','5852484QpOObZ','/add','content','users','root','_config','values','/universer-api/comment/unit/','_initDataSource','Edit','syncUpdateMutationToColla','_injector','Delete','defineProperty','requireSession','pipe','parse','delete','getComment','_initUserSync','symbol','IConfigService','Module','personId','add','Injector','code','dataSource','IThreadCommentDataSourceService','forEach','CollaborationSessionService','userID','updateComment','/edit','filter','_commentService','_threadCommentModel','addComment','resolveComment','map','7357658fBVkHf','format','stringify','COMMENT','Inject','UNRECOGNIZED','rxjs','/delete','Solved','Unknown','OpenOrReOpen','CustomRangeType','listComments','/universer-api/user/list','customRanges','comments','676920ZgSvls','unitId','user','Reply','ref','thread-comment-data-source.config','post','YYYY/MM/DD\x20HH:mm','slice','_httpService','@univerjs/network','Disposable','resolved'];_0x3408=function(){return _0x7d5456;};return _0x3408();}C=J([y(0x0,M[_0x55ad69(0x189)]),y(0x1,c[_0x55ad69(0x199)](g))],C);var F=Object[_0x55ad69(0x17a)],L=Object[_0x55ad69(0x168)],Z=(_0x34962b,_0xee2b97,_0x551492)=>_0xee2b97 in _0x34962b?F(_0x34962b,_0xee2b97,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x551492}):_0x34962b[_0xee2b97]=_0x551492,W=(_0x2819b3,_0x9d5c5d,_0x3d0e03,_0x185032)=>{const _0x5eb055=_0x55ad69;for(var _0x4783bf=_0x185032>0x1?void 0x0:_0x185032?L(_0x9d5c5d,_0x3d0e03):_0x9d5c5d,_0x7bcd1=_0x2819b3[_0x5eb055(0x1b3)]-0x1,_0xbd9960;_0x7bcd1>=0x0;_0x7bcd1--)(_0xbd9960=_0x2819b3[_0x7bcd1])&&(_0x4783bf=_0xbd9960(_0x4783bf)||_0x4783bf);return _0x4783bf;},O=(_0x30b0b8,_0x337749)=>(_0x3b69c5,_0x3abfa4)=>_0x337749(_0x3b69c5,_0x3abfa4,_0x30b0b8),N=(_0xf949c4,_0x4f0f35,_0x1941ae)=>Z(_0xf949c4,typeof _0x4f0f35!=_0x55ad69(0x181)?_0x4f0f35+'':_0x4f0f35,_0x1941ae);exports[_0x55ad69(0x1ba)]=class extends c[_0x55ad69(0x166)]{constructor(_0x382cf7=D,_0x1cdf6d,_0x1b8979){const _0x1e0d4d=_0x55ad69;super(),this[_0x1e0d4d(0x172)]=_0x382cf7,this[_0x1e0d4d(0x178)]=_0x1cdf6d,this[_0x1e0d4d(0x1d0)]=_0x1b8979;const {..._0x4006de}=c[_0x1e0d4d(0x14d)]({},D,this['_config']);this[_0x1e0d4d(0x1d0)][_0x1e0d4d(0x164)](q,_0x4006de);}[_0x55ad69(0x1c4)](){const _0x413f90=_0x55ad69;[[g],[C],[p]][_0x413f90(0x18a)](_0x13551c=>{const _0x576b4e=_0x413f90;this[_0x576b4e(0x178)][_0x576b4e(0x185)](_0x13551c);});}[_0x55ad69(0x1c1)](){const _0x358c0d=_0x55ad69;this[_0x358c0d(0x178)][_0x358c0d(0x1c7)](C),this[_0x358c0d(0x178)][_0x358c0d(0x1c7)](p);}},N(exports[_0x55ad69(0x1ba)],_0x55ad69(0x15d),U),N(exports[_0x55ad69(0x1ba)],'type',c[_0x55ad69(0x159)][_0x55ad69(0x1cc)]),exports[_0x55ad69(0x1ba)]=W([c[_0x55ad69(0x151)](j[_0x55ad69(0x1c0)],b[_0x55ad69(0x1c3)],T[_0x55ad69(0x15e)]),O(0x1,c[_0x55ad69(0x199)](c['Injector'])),O(0x2,c[_0x55ad69(0x182)])],exports[_0x55ad69(0x1ba)]);
|
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 _0x508cef=_0x4101;(function(_0x424ce5,_0x31e9c2){const _0x1dbd55=_0x4101,_0xd6dc0f=_0x424ce5();while(!![]){try{const _0x2b6584=parseInt(_0x1dbd55(0x161))/0x1+-parseInt(_0x1dbd55(0x151))/0x2*(parseInt(_0x1dbd55(0x19b))/0x3)+-parseInt(_0x1dbd55(0x14f))/0x4*(parseInt(_0x1dbd55(0x16e))/0x5)+-parseInt(_0x1dbd55(0x17d))/0x6+-parseInt(_0x1dbd55(0x158))/0x7*(parseInt(_0x1dbd55(0x1a8))/0x8)+-parseInt(_0x1dbd55(0x194))/0x9+-parseInt(_0x1dbd55(0x159))/0xa*(-parseInt(_0x1dbd55(0x1a5))/0xb);if(_0x2b6584===_0x31e9c2)break;else _0xd6dc0f['push'](_0xd6dc0f['shift']());}catch(_0x20ebad){_0xd6dc0f['push'](_0xd6dc0f['shift']());}}}(_0x2140,0xd4fe8));import{CommentService as _0x57cb84,CollaborationSessionService as _0x18a6f8,UniverCollaborationClientPlugin as _0x23671c}from'@univerjs-pro/collaboration-client';function _0x2140(){const _0x434e47=['length','70QEQtkY','96010SrrFNq','onStarting','_configService','values','resolveComment','subscribe','getComment','COMMENT','398733NNNkLw','payload','add','Reply','onReady','/universer-api/comment/unit/','UNRECOGNIZED','reply','_initUserSync','createTimestamp','_threadCommentModel','getUnit','disposeWithMe','1791445mzaxBj','_injector','post','Unknown','YYYY/MM/DD\x20HH:mm','addUser','solved','parentId','code','/reply','/solved','comments','getCurrentUser','dataSource','/delete','4678434kFlqth','thread-comment-data-source.config','unitId','/list','UNIVER_UNKNOWN','_threadCommentDataSourceService','commentUpdate$','_userService','pluginName','rangeType','/add','userID','getOwnPropertyDescriptor','parse','_initDataSource','forEach','replyId','error','type','getMemberID','replies','requireSession','threadId','1707948KYfFRz','Solve','OpenOrReOpen','filter','/universer-api/user/list','delete','defineProperty','3lhnBDS','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','content','userId','saveCommentToSnapshot','map','symbol','Delete','_init','5027SqysEI','Solved','listComments','284320oaRSAE','_threadCommentDataSource','deleteComment','Add','body','stringify','find','Edit','comment','_httpService','16rxbScu','/edit','2311798eIIBJa','ref','getUser','user','get','_sessionService'];_0x2140=function(){return _0x434e47;};return _0x2140();}import{UniverLicensePlugin as _0x55b9db}from'@univerjs-pro/license';import{dayjs as _0x160daa,UserManagerService as _0x34b1d3,Inject as _0x5206be,Injector as _0x582b7,Disposable as _0x2df6ba,CustomRangeType as _0x2c2f0a,UniverInstanceType as _0x12e88f,DependentOn as _0xbf2e79,IConfigService as _0x5e839a,Plugin as _0x2b066e,merge as _0x267143}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4be3f3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x235e22,IThreadCommentDataSourceService as _0x50d8be}from'@univerjs/thread-comment';import{bufferTime as _0x177970}from'rxjs';import{HTTPService as _0x808da2}from'@univerjs/network';const W=_0x508cef(0x19c);var I=(_0x5b8887=>(_0x5b8887[_0x5b8887[_0x508cef(0x196)]=0x0]=_0x508cef(0x196),_0x5b8887[_0x5b8887['Solved']=0x1]='Solved',_0x5b8887[_0x5b8887[_0x508cef(0x167)]=-0x1]=_0x508cef(0x167),_0x5b8887))(I||{}),v=(_0x1f98e7=>(_0x1f98e7[_0x1f98e7[_0x508cef(0x171)]=0x0]=_0x508cef(0x171),_0x1f98e7[_0x1f98e7[_0x508cef(0x1ab)]=0x1]=_0x508cef(0x1ab),_0x1f98e7[_0x1f98e7[_0x508cef(0x164)]=0x2]=_0x508cef(0x164),_0x1f98e7[_0x1f98e7[_0x508cef(0x14c)]=0x3]=_0x508cef(0x14c),_0x1f98e7[_0x1f98e7[_0x508cef(0x1a3)]=0x4]=_0x508cef(0x1a3),_0x1f98e7[_0x1f98e7[_0x508cef(0x195)]=0x5]=_0x508cef(0x195),_0x1f98e7[_0x1f98e7['UNRECOGNIZED']=-0x1]=_0x508cef(0x167),_0x1f98e7))(v||{});const D=_0x43a91a=>_0x160daa(new Date(+_0x43a91a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x2e3abd,_0x266b50)=>{const _0x7fb9c9=_0x508cef,_0x39e663=_0x2e3abd['get'](_0x34b1d3),_0x39cdbd=_0x2e3abd[_0x7fb9c9(0x155)](_0x808da2);_0x266b50[_0x7fb9c9(0x18c)](_0x531929=>{const _0x2a7dc7=_0x7fb9c9;_0x39e663[_0x2a7dc7(0x153)](_0x531929)&&_0x266b50[_0x2a7dc7(0x199)](_0x531929);}),_0x266b50['size']&&(await _0x39cdbd[_0x7fb9c9(0x155)](_0x7fb9c9(0x198),{'params':{'userIDs':[..._0x266b50]}}))[_0x7fb9c9(0x1ac)]['users']['forEach'](_0x447515=>{const _0x351035=_0x7fb9c9;_0x447515&&_0x39e663[_0x351035(0x173)](_0x447515);});};var K=Object[_0x508cef(0x189)],V=(_0x63ba2a,_0x1fcc66,_0x2a308f,_0xff588e)=>{const _0x5eb47a=_0x508cef;for(var _0x3eae41=_0xff588e>0x1?void 0x0:_0xff588e?K(_0x1fcc66,_0x2a308f):_0x1fcc66,_0x1a7818=_0x63ba2a[_0x5eb47a(0x157)]-0x1,_0xae39a0;_0x1a7818>=0x0;_0x1a7818--)(_0xae39a0=_0x63ba2a[_0x1a7818])&&(_0x3eae41=_0xae39a0(_0x3eae41)||_0x3eae41);return _0x3eae41;},p=(_0x32fc62,_0x59b65d)=>(_0x571b50,_0x58845c)=>_0x59b65d(_0x571b50,_0x58845c,_0x32fc62);function _0x4101(_0x3e8f8f,_0x48b806){const _0x214041=_0x2140();return _0x4101=function(_0x4101ff,_0x193087){_0x4101ff=_0x4101ff-0x14b;let _0x354070=_0x214041[_0x4101ff];return _0x354070;},_0x4101(_0x3e8f8f,_0x48b806);}let S=class extends _0x2df6ba{constructor(_0x40d4bc,_0x46b231,_0x4697dc,_0x1cd84c){const _0x567046=_0x508cef;super(),this[_0x567046(0x19d)]=_0x40d4bc,this[_0x567046(0x16b)]=_0x46b231,this[_0x567046(0x184)]=_0x4697dc,this[_0x567046(0x16f)]=_0x1cd84c,this[_0x567046(0x1a4)](),this[_0x567046(0x169)]();}[_0x508cef(0x169)](){const _0x24f154=_0x508cef;this[_0x24f154(0x16d)](this[_0x24f154(0x16b)][_0x24f154(0x183)]['pipe'](_0x177970(0x10))[_0x24f154(0x15e)](_0x114d59=>{const _0x53efee=_0x24f154,_0x5aa79d=new Set();_0x114d59[_0x53efee(0x18c)](_0x233cc3=>{const _0x23cf4a=_0x53efee;switch(_0x233cc3['type']){case _0x23cf4a(0x163):{const _0x1b2573=_0x233cc3[_0x23cf4a(0x162)]['personId'];_0x5aa79d['add'](_0x1b2573);break;}}}),B(this[_0x53efee(0x16f)],_0x5aa79d);}));}[_0x508cef(0x1a4)](){const _0x36a05f=_0x508cef;this['disposeWithMe'](this[_0x36a05f(0x19d)][_0x36a05f(0x183)]['subscribe'](async _0x4ed15d=>{const _0x3b015a=_0x36a05f;var _0x52a344,_0x236687,_0x35538c,_0x3442c7;const _0x4f237f=(_0x52a344=this[_0x3b015a(0x16b)][_0x3b015a(0x16c)](_0x4ed15d[_0x3b015a(0x17f)])[_0x3b015a(0x14b)](_0x38b85b=>_0x38b85b[_0x3b015a(0x193)]===_0x4ed15d[_0x3b015a(0x193)]))==null?void 0x0:_0x52a344['root'];if(!_0x4f237f)return;const {unitId:_0x1a7a87,subUnitId:_0xcd0034}=_0x4f237f;switch(_0x4ed15d['user']&&this['_userService'][_0x3b015a(0x173)](_0x4ed15d[_0x3b015a(0x154)]),_0x4ed15d[_0x3b015a(0x18f)]){case v[_0x3b015a(0x1ab)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x1a7a87,_0xcd0034,{'unitId':_0x1a7a87,'subUnitId':_0xcd0034,'ref':'','id':_0x4ed15d['replyId'],'dT':D(+_0x4ed15d[_0x3b015a(0x16a)]),'threadId':_0x4ed15d[_0x3b015a(0x193)],'personId':(_0x35538c=(_0x236687=_0x4ed15d[_0x3b015a(0x154)])==null?void 0x0:_0x236687['userID'])!=null?_0x35538c:_0x4ed15d['userId'],'text':JSON['parse'](_0x4ed15d[_0x3b015a(0x19e)]),'parentId':_0x4f237f['id']});break;}case v[_0x3b015a(0x1a3)]:{const _0x1ba5f7=this[_0x3b015a(0x16b)][_0x3b015a(0x15f)](_0x1a7a87,_0xcd0034,_0x4ed15d[_0x3b015a(0x18d)]);_0x1ba5f7&&_0x1ba5f7[_0x3b015a(0x175)]&&this['_threadCommentModel'][_0x3b015a(0x1aa)](_0x1a7a87,_0xcd0034,_0x4ed15d[_0x3b015a(0x18d)]);break;}case v[_0x3b015a(0x14c)]:{this[_0x3b015a(0x16b)]['updateComment'](_0x1a7a87,_0xcd0034,{'commentId':_0x4ed15d['replyId'],'text':JSON[_0x3b015a(0x18a)](_0x4ed15d['content'])});break;}case v[_0x3b015a(0x195)]:{const _0x13f57d=(_0x3442c7=this['_threadCommentModel'][_0x3b015a(0x16c)](_0x4ed15d[_0x3b015a(0x17f)])['find'](_0x2a4961=>_0x2a4961[_0x3b015a(0x193)]===_0x4ed15d[_0x3b015a(0x193)]))==null?void 0x0:_0x3442c7['root'];_0x13f57d&&this['_threadCommentModel'][_0x3b015a(0x15d)](_0x1a7a87,_0xcd0034,_0x13f57d['id'],_0x4ed15d['solved']===I[_0x3b015a(0x1a6)]);break;}}}));}};S=V([p(0x0,_0x5206be(_0x57cb84)),p(0x1,_0x5206be(_0x235e22)),p(0x2,_0x5206be(_0x34b1d3)),p(0x3,_0x5206be(_0x582b7))],S);const z=_0x508cef(0x17e),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1e3b57,_0x4935b0,_0xd4eaf3,_0x3284ae)=>{for(var _0x5da029=_0x3284ae>0x1?void 0x0:_0x3284ae?k(_0x4935b0,_0xd4eaf3):_0x4935b0,_0x1ce6ad=_0x1e3b57['length']-0x1,_0x15bee4;_0x1ce6ad>=0x0;_0x1ce6ad--)(_0x15bee4=_0x1e3b57[_0x1ce6ad])&&(_0x5da029=_0x15bee4(_0x5da029)||_0x5da029);return _0x5da029;},_=(_0x4dfb14,_0x24cc19)=>(_0x182d4d,_0x21e939)=>_0x24cc19(_0x182d4d,_0x21e939,_0x4dfb14);function X(_0x55b287,_0x44a643){const _0x228562=_0x508cef,_0x2e4efe=_0x55b287[_0x228562(0x191)][0x0];return{..._0x44a643,'id':_0x2e4efe['replyId'],'resolved':_0x55b287[_0x228562(0x174)]===0x1,'dT':D(_0x2e4efe[_0x228562(0x16a)]),'personId':_0x2e4efe[_0x228562(0x19f)],'threadId':_0x2e4efe[_0x228562(0x193)]};}function ee(_0xbcd119,_0x393aca,_0x3b5f89){const _0x2ccd14=_0x508cef;var _0x1d8037,_0x18e976;if(((_0x18e976=(_0x1d8037=_0xbcd119==null?void 0x0:_0xbcd119[_0x2ccd14(0x191)])==null?void 0x0:_0x1d8037[_0x2ccd14(0x157)])!=null?_0x18e976:0x0)>0x0){const _0x21b030=(_0x51dc5c,_0x1b905f)=>({'id':_0x51dc5c[_0x2ccd14(0x18d)],'threadId':_0x51dc5c[_0x2ccd14(0x193)],'dT':D(_0x51dc5c[_0x2ccd14(0x16a)]),'personId':_0x51dc5c[_0x2ccd14(0x19f)],'resolved':_0xbcd119[_0x2ccd14(0x174)]===I['Solved'],'unitId':_0x393aca,'subUnitId':_0x3b5f89,'text':JSON[_0x2ccd14(0x18a)](_0x51dc5c[_0x2ccd14(0x19e)]),'parentId':_0x1b905f}),_0xc5fc45=_0x21b030(_0xbcd119[_0x2ccd14(0x191)][0x0]);return{..._0xc5fc45,'children':_0xbcd119[_0x2ccd14(0x191)]['slice'](0x1)[_0x2ccd14(0x1a1)](_0x9ef4d=>_0x21b030(_0x9ef4d,_0xc5fc45['id']))};}return null;}let f=class{constructor(_0x23d16d,_0x577cea,_0x368c5c,_0x594ffe){const _0xb4b5c9=_0x508cef;this[_0xb4b5c9(0x14e)]=_0x23d16d,this[_0xb4b5c9(0x184)]=_0x577cea,this[_0xb4b5c9(0x156)]=_0x368c5c,this[_0xb4b5c9(0x16f)]=_0x594ffe;}async['addComment'](_0x39e089){const _0x41ca91=_0x508cef;var _0x578638,_0x4bc3a7;const {parentId:_0x37eef0,unitId:_0x1cef81,text:_0x4dff97,threadId:_0x42cde7}=_0x39e089,_0x4a5849=(_0x4bc3a7=(_0x578638=_0x4dff97['customRanges'])==null?void 0x0:_0x578638[_0x41ca91(0x197)](_0x2ff8d2=>_0x2ff8d2[_0x41ca91(0x186)]===_0x2c2f0a[_0x41ca91(0x160)])[_0x41ca91(0x1a1)](_0x2eac05=>_0x2eac05['rangeId']))!=null?_0x4bc3a7:[],_0x8143ac=JSON[_0x41ca91(0x1ad)](_0x4dff97),_0x29ad50=(await this[_0x41ca91(0x156)][_0x41ca91(0x192)](_0x1cef81))[_0x41ca91(0x190)]();if(_0x37eef0){const _0x56fdc4={'memberId':_0x29ad50,'unitId':_0x1cef81,'content':_0x8143ac,'mention':_0x4a5849,'threadId':_0x42cde7},_0x5a57f3=(await this[_0x41ca91(0x14e)][_0x41ca91(0x170)](_0x41ca91(0x166)+_0x1cef81+_0x41ca91(0x177),{'body':_0x56fdc4}))['body'][_0x41ca91(0x168)];return{..._0x39e089,'id':_0x5a57f3['replyId'],'dT':_0x160daa(+_0x5a57f3['createTimestamp'])['format'](_0x41ca91(0x172)),'personId':_0x5a57f3[_0x41ca91(0x19f)]};}else{const _0x32ef54={'memberId':_0x29ad50,'unitId':_0x1cef81,'content':_0x8143ac,'mention':_0x4a5849},_0x5c1da3=await this[_0x41ca91(0x14e)][_0x41ca91(0x170)](_0x41ca91(0x166)+_0x1cef81+_0x41ca91(0x187),{'body':_0x32ef54});return X(_0x5c1da3['body'][_0x41ca91(0x14d)],_0x39e089);}}async['updateComment'](_0x345f4b){const _0x5a7952=_0x508cef;var _0x417a90,_0x25baed;const {text:_0x3e0e1c,unitId:_0x510653}=_0x345f4b,_0x3f6084=(_0x25baed=(_0x417a90=_0x3e0e1c['customRanges'])==null?void 0x0:_0x417a90['filter'](_0x9b611c=>_0x9b611c[_0x5a7952(0x186)]===_0x2c2f0a[_0x5a7952(0x160)])[_0x5a7952(0x1a1)](_0x4846cd=>_0x4846cd['rangeId']))!=null?_0x25baed:[],_0x18eb98=JSON['stringify'](_0x3e0e1c),_0x491836=_0x345f4b[_0x5a7952(0x193)],_0x3bf436=_0x345f4b['id'],_0x36fcec={'memberId':(await this[_0x5a7952(0x156)][_0x5a7952(0x192)](_0x510653))[_0x5a7952(0x190)](),'unitId':_0x510653,'threadId':_0x491836,'mention':_0x3f6084,'content':_0x18eb98,'replyId':_0x3bf436},_0x20f816=await this[_0x5a7952(0x14e)][_0x5a7952(0x170)]('/universer-api/comment/unit/'+_0x510653+_0x5a7952(0x150),{'body':_0x36fcec});return!_0x20f816['body'][_0x5a7952(0x18e)]||_0x20f816['body']['error'][_0x5a7952(0x176)]===0x1;}async[_0x508cef(0x15d)](_0x23c87b){const _0x282352=_0x508cef,{unitId:_0x126e50}=_0x23c87b,_0x3864cb=_0x23c87b['threadId'],_0x536abb={'memberId':this[_0x282352(0x184)][_0x282352(0x17a)]()[_0x282352(0x188)],'unitId':_0x126e50,'threadId':_0x3864cb,'solved':_0x23c87b['resolved']?I[_0x282352(0x1a6)]:I[_0x282352(0x196)]},_0x1901a2=await this[_0x282352(0x14e)][_0x282352(0x170)]('/universer-api/comment/unit/'+_0x126e50+_0x282352(0x178),{'body':_0x536abb});return!_0x1901a2[_0x282352(0x1ac)][_0x282352(0x18e)]||_0x1901a2[_0x282352(0x1ac)][_0x282352(0x18e)]['code']===0x1;}async[_0x508cef(0x1aa)](_0x126437,_0x5b2995,_0x4d2245,_0x3ae48){const _0x1ba045=_0x508cef,_0x279deb={'memberId':(await this[_0x1ba045(0x156)]['requireSession'](_0x126437))[_0x1ba045(0x190)](),'threadId':_0x4d2245,'replyId':_0x3ae48,'unitId':_0x126437},_0x53440d=await this[_0x1ba045(0x14e)]['post'](_0x1ba045(0x166)+_0x126437+_0x1ba045(0x17c),{'body':_0x279deb});return!_0x53440d[_0x1ba045(0x1ac)][_0x1ba045(0x18e)]||_0x53440d[_0x1ba045(0x1ac)][_0x1ba045(0x18e)]['code']===0x1;}async[_0x508cef(0x1a7)](_0x2e2fb,_0x277917,_0x1f3008){const _0x571bcf=_0x508cef,_0x30bfcf={'unitId':_0x2e2fb,'threadId':_0x1f3008},_0x595ff3=await this[_0x571bcf(0x14e)][_0x571bcf(0x170)](_0x571bcf(0x166)+_0x2e2fb+_0x571bcf(0x180),{'body':_0x30bfcf}),_0x3909c1=_0x1f3008['map'](_0x1ada16=>ee(_0x595ff3['body'][_0x571bcf(0x179)][_0x1ada16],_0x2e2fb,_0x277917))[_0x571bcf(0x197)](Boolean);return Object[_0x571bcf(0x15c)](_0x595ff3['body']['users'])[_0x571bcf(0x18c)](_0x1ef1fb=>{const _0x4a3509=_0x571bcf;this[_0x4a3509(0x184)][_0x4a3509(0x173)](_0x1ef1fb);}),_0x3909c1;}[_0x508cef(0x1a0)](_0x3e1288){const _0xccb86d=_0x508cef;return{'id':_0x3e1288['id'],'threadId':_0x3e1288['threadId'],'ref':_0x3e1288[_0xccb86d(0x152)]};}};f=Q([_(0x0,_0x5206be(_0x808da2)),_(0x1,_0x5206be(_0x34b1d3)),_(0x2,_0x5206be(_0x18a6f8)),_(0x3,_0x5206be(_0x582b7))],f);var re=Object[_0x508cef(0x189)],te=(_0x337592,_0x536959,_0x5ae29b,_0x5642e5)=>{for(var _0x3bc0ee=_0x5642e5>0x1?void 0x0:_0x5642e5?re(_0x536959,_0x5ae29b):_0x536959,_0x3ff754=_0x337592['length']-0x1,_0x2c78a0;_0x3ff754>=0x0;_0x3ff754--)(_0x2c78a0=_0x337592[_0x3ff754])&&(_0x3bc0ee=_0x2c78a0(_0x3bc0ee)||_0x3bc0ee);return _0x3bc0ee;},N=(_0x5bff66,_0x5b7b6d)=>(_0x150e01,_0x4b7dd4)=>_0x5b7b6d(_0x150e01,_0x4b7dd4,_0x5bff66);let g=class extends _0x2df6ba{constructor(_0x304fe1,_0xab4c97){const _0x609c69=_0x508cef;super(),this[_0x609c69(0x182)]=_0x304fe1,this['_threadCommentDataSource']=_0xab4c97,this[_0x609c69(0x18b)]();}[_0x508cef(0x18b)](){const _0x4cfbf1=_0x508cef;this[_0x4cfbf1(0x182)][_0x4cfbf1(0x17b)]=this[_0x4cfbf1(0x1a9)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x50d8be),N(0x1,_0x5206be(f))],g);var se=Object[_0x508cef(0x19a)],oe=Object[_0x508cef(0x189)],ne=(_0x280ea5,_0x2b83f9,_0x102371)=>_0x2b83f9 in _0x280ea5?se(_0x280ea5,_0x2b83f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x102371}):_0x280ea5[_0x2b83f9]=_0x102371,ie=(_0x1e7633,_0x464d07,_0x38f50c,_0x236317)=>{const _0xed8217=_0x508cef;for(var _0x150b64=_0x236317>0x1?void 0x0:_0x236317?oe(_0x464d07,_0x38f50c):_0x464d07,_0x385ae0=_0x1e7633[_0xed8217(0x157)]-0x1,_0x5c6c0e;_0x385ae0>=0x0;_0x385ae0--)(_0x5c6c0e=_0x1e7633[_0x385ae0])&&(_0x150b64=_0x5c6c0e(_0x150b64)||_0x150b64);return _0x150b64;},w=(_0x15041f,_0x184799)=>(_0x2257e5,_0x22a1a7)=>_0x184799(_0x2257e5,_0x22a1a7,_0x15041f),$=(_0x373fbb,_0x4c436d,_0x47a819)=>ne(_0x373fbb,typeof _0x4c436d!=_0x508cef(0x1a2)?_0x4c436d+'':_0x4c436d,_0x47a819);let b=class extends _0x2b066e{constructor(_0x39dd3e=M,_0x218e36,_0x592867){const _0x2de1ce=_0x508cef;super(),this['_config']=_0x39dd3e,this['_injector']=_0x218e36,this['_configService']=_0x592867;const {..._0x2a86e5}=_0x267143({},M,this['_config']);this[_0x2de1ce(0x15b)]['setConfig'](z,_0x2a86e5);}[_0x508cef(0x15a)](){const _0xb4e322=_0x508cef;[[f],[g],[S]][_0xb4e322(0x18c)](_0x551b15=>{const _0xc22a2d=_0xb4e322;this[_0xc22a2d(0x16f)][_0xc22a2d(0x163)](_0x551b15);});}[_0x508cef(0x165)](){const _0xe81540=_0x508cef;this['_injector'][_0xe81540(0x155)](g),this[_0xe81540(0x16f)][_0xe81540(0x155)](S);}};$(b,_0x508cef(0x185),W),$(b,_0x508cef(0x18f),_0x12e88f[_0x508cef(0x181)]),b=ie([_0xbf2e79(_0x4be3f3,_0x23671c,_0x55b9db),w(0x1,_0x5206be(_0x582b7)),w(0x2,_0x5e839a)],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(_0x5cff4f,_0x3770da){const _0x435489=_0x5595,_0x58680b=_0x5cff4f();while(!![]){try{const _0x1b3b83=-parseInt(_0x435489(0x149))/0x1*(-parseInt(_0x435489(0x11c))/0x2)+parseInt(_0x435489(0x142))/0x3*(-parseInt(_0x435489(0x14f))/0x4)+parseInt(_0x435489(0x134))/0x5+parseInt(_0x435489(0xdd))/0x6+parseInt(_0x435489(0x12d))/0x7+-parseInt(_0x435489(0x113))/0x8+parseInt(_0x435489(0x141))/0x9*(-parseInt(_0x435489(0x102))/0xa);if(_0x1b3b83===_0x3770da)break;else _0x58680b['push'](_0x58680b['shift']());}catch(_0x2ac498){_0x58680b['push'](_0x58680b['shift']());}}}(_0x2f63,0x45816),function(_0xba79ab,_0xc63dd7){const _0x49b789=_0x5595;typeof exports==_0x49b789(0x122)&&typeof module<'u'?_0xc63dd7(exports,require(_0x49b789(0x158)),require(_0x49b789(0x13c)),require(_0x49b789(0xe9)),require(_0x49b789(0x138)),require(_0x49b789(0xf0)),require(_0x49b789(0x15f)),require('@univerjs/network')):typeof define==_0x49b789(0x15c)&&define[_0x49b789(0xe0)]?define([_0x49b789(0x139),_0x49b789(0x158),_0x49b789(0x13c),_0x49b789(0xe9),_0x49b789(0x138),_0x49b789(0xf0),'rxjs',_0x49b789(0x156)],_0xc63dd7):(_0xba79ab=typeof globalThis<'u'?globalThis:_0xba79ab||self,_0xc63dd7(_0xba79ab[_0x49b789(0x103)]={},_0xba79ab[_0x49b789(0xff)],_0xba79ab['UniverProLicense'],_0xba79ab[_0x49b789(0x10b)],_0xba79ab[_0x49b789(0x15e)],_0xba79ab['UniverThreadComment'],_0xba79ab[_0x49b789(0x15f)],_0xba79ab[_0x49b789(0x10f)]));}(this,function(_0x575727,_0x529f48,_0x4cbde0,_0x53046e,_0x40d616,_0x53f135,_0xd35e99,_0x32ca65){'use strict';const _0x10c774=_0x5595;const _0x32c1cd='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4a7c1e=(_0x238f8d=>(_0x238f8d[_0x238f8d[_0x10c774(0x13b)]=0x0]=_0x10c774(0x13b),_0x238f8d[_0x238f8d[_0x10c774(0x107)]=0x1]=_0x10c774(0x107),_0x238f8d[_0x238f8d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x238f8d))(_0x4a7c1e||{}),_0x1429de=(_0x3a44a2=>(_0x3a44a2[_0x3a44a2[_0x10c774(0x151)]=0x0]=_0x10c774(0x151),_0x3a44a2[_0x3a44a2[_0x10c774(0x126)]=0x1]=_0x10c774(0x126),_0x3a44a2[_0x3a44a2['Reply']=0x2]=_0x10c774(0x121),_0x3a44a2[_0x3a44a2[_0x10c774(0x159)]=0x3]=_0x10c774(0x159),_0x3a44a2[_0x3a44a2[_0x10c774(0xe1)]=0x4]=_0x10c774(0xe1),_0x3a44a2[_0x3a44a2[_0x10c774(0x152)]=0x5]=_0x10c774(0x152),_0x3a44a2[_0x3a44a2[_0x10c774(0xfd)]=-0x1]='UNRECOGNIZED',_0x3a44a2))(_0x1429de||{});const _0x11c8e2=_0x1eb7b0=>_0x53046e[_0x10c774(0xf9)](new Date(+_0x1eb7b0))[_0x10c774(0xee)]('YYYY/MM/DD\x20HH:mm'),_0x4d821e=async(_0x37e276,_0x32dbd9)=>{const _0x4cc083=_0x10c774,_0x4052e6=_0x37e276[_0x4cc083(0xfc)](_0x53046e[_0x4cc083(0x108)]),_0x3101c5=_0x37e276['get'](_0x32ca65['HTTPService']);_0x32dbd9[_0x4cc083(0xef)](_0x455112=>{const _0x1e1cc0=_0x4cc083;_0x4052e6['getUser'](_0x455112)&&_0x32dbd9[_0x1e1cc0(0x12b)](_0x455112);}),_0x32dbd9[_0x4cc083(0x162)]&&(await _0x3101c5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x32dbd9]}}))[_0x4cc083(0xeb)][_0x4cc083(0x14c)][_0x4cc083(0xef)](_0x291024=>{_0x291024&&_0x4052e6['addUser'](_0x291024);});};var _0x3b9770=Object[_0x10c774(0xde)],_0x15df90=(_0x1e18c2,_0x4f34af,_0x39293d,_0x42aaee)=>{for(var _0x4ec72a=_0x42aaee>0x1?void 0x0:_0x42aaee?_0x3b9770(_0x4f34af,_0x39293d):_0x4f34af,_0x4de987=_0x1e18c2['length']-0x1,_0x110141;_0x4de987>=0x0;_0x4de987--)(_0x110141=_0x1e18c2[_0x4de987])&&(_0x4ec72a=_0x110141(_0x4ec72a)||_0x4ec72a);return _0x4ec72a;},_0x58860a=(_0x464c5e,_0x217374)=>(_0x30fff0,_0x37bacc)=>_0x217374(_0x30fff0,_0x37bacc,_0x464c5e);let _0x2d2988=class extends _0x53046e['Disposable']{constructor(_0x4b5f71,_0x51bf94,_0x4dfd97,_0x978d){const _0x55ef36=_0x10c774;super(),this[_0x55ef36(0x133)]=_0x4b5f71,this[_0x55ef36(0x11e)]=_0x51bf94,this[_0x55ef36(0x145)]=_0x4dfd97,this['_injector']=_0x978d,this[_0x55ef36(0xf6)](),this[_0x55ef36(0x128)]();}[_0x10c774(0x128)](){const _0x343236=_0x10c774;this[_0x343236(0xfa)](this[_0x343236(0x11e)]['commentUpdate$'][_0x343236(0x10c)](_0xd35e99[_0x343236(0x155)](0x10))[_0x343236(0x160)](_0xa30320=>{const _0x1b3ac5=_0x343236,_0x3c3792=new Set();_0xa30320['forEach'](_0x8402c7=>{const _0x4bbea7=_0x5595;switch(_0x8402c7[_0x4bbea7(0x10d)]){case _0x4bbea7(0x13d):{const _0x29c050=_0x8402c7[_0x4bbea7(0x147)][_0x4bbea7(0x105)];_0x3c3792[_0x4bbea7(0x13d)](_0x29c050);break;}}}),_0x4d821e(this[_0x1b3ac5(0x12a)],_0x3c3792);}));}[_0x10c774(0xf6)](){const _0x59e949=_0x10c774;this[_0x59e949(0xfa)](this[_0x59e949(0x133)][_0x59e949(0x123)][_0x59e949(0x160)](async _0x171085=>{const _0xd2ba64=_0x59e949;var _0x4cdd1d,_0x5bd64b,_0x3dc4a2,_0xdc6793;const _0x187a79=(_0x4cdd1d=this[_0xd2ba64(0x11e)][_0xd2ba64(0x11d)](_0x171085['unitId'])[_0xd2ba64(0xec)](_0x20f563=>_0x20f563[_0xd2ba64(0xf2)]===_0x171085[_0xd2ba64(0xf2)]))==null?void 0x0:_0x4cdd1d['root'];if(!_0x187a79)return;const {unitId:_0x37113e,subUnitId:_0x49a5c2}=_0x187a79;switch(_0x171085['user']&&this[_0xd2ba64(0x145)][_0xd2ba64(0x124)](_0x171085['user']),_0x171085[_0xd2ba64(0x10d)]){case _0x1429de[_0xd2ba64(0x126)]:break;case _0x1429de['Reply']:{this['_threadCommentModel']['addComment'](_0x37113e,_0x49a5c2,{'unitId':_0x37113e,'subUnitId':_0x49a5c2,'ref':'','id':_0x171085[_0xd2ba64(0x14e)],'dT':_0x11c8e2(+_0x171085[_0xd2ba64(0x14a)]),'threadId':_0x171085[_0xd2ba64(0xf2)],'personId':(_0x3dc4a2=(_0x5bd64b=_0x171085['user'])==null?void 0x0:_0x5bd64b[_0xd2ba64(0x112)])!=null?_0x3dc4a2:_0x171085[_0xd2ba64(0x125)],'text':JSON[_0xd2ba64(0x15d)](_0x171085[_0xd2ba64(0x118)]),'parentId':_0x187a79['id']});break;}case _0x1429de[_0xd2ba64(0xe1)]:{const _0x509ef8=this[_0xd2ba64(0x11e)][_0xd2ba64(0x157)](_0x37113e,_0x49a5c2,_0x171085['replyId']);_0x509ef8&&_0x509ef8['parentId']&&this[_0xd2ba64(0x11e)][_0xd2ba64(0x15b)](_0x37113e,_0x49a5c2,_0x171085[_0xd2ba64(0x14e)]);break;}case _0x1429de[_0xd2ba64(0x159)]:{this[_0xd2ba64(0x11e)][_0xd2ba64(0xed)](_0x37113e,_0x49a5c2,{'commentId':_0x171085['replyId'],'text':JSON[_0xd2ba64(0x15d)](_0x171085[_0xd2ba64(0x118)])});break;}case _0x1429de[_0xd2ba64(0x152)]:{const _0xa9333a=(_0xdc6793=this[_0xd2ba64(0x11e)]['getUnit'](_0x171085[_0xd2ba64(0x15a)])[_0xd2ba64(0xec)](_0x568223=>_0x568223['threadId']===_0x171085[_0xd2ba64(0xf2)]))==null?void 0x0:_0xdc6793[_0xd2ba64(0x10a)];_0xa9333a&&this[_0xd2ba64(0x11e)][_0xd2ba64(0x120)](_0x37113e,_0x49a5c2,_0xa9333a['id'],_0x171085[_0xd2ba64(0x13e)]===_0x4a7c1e[_0xd2ba64(0x107)]);break;}}}));}};_0x2d2988=_0x15df90([_0x58860a(0x0,_0x53046e[_0x10c774(0x143)](_0x529f48[_0x10c774(0xe4)])),_0x58860a(0x1,_0x53046e['Inject'](_0x53f135[_0x10c774(0x116)])),_0x58860a(0x2,_0x53046e[_0x10c774(0x143)](_0x53046e[_0x10c774(0x108)])),_0x58860a(0x3,_0x53046e[_0x10c774(0x143)](_0x53046e[_0x10c774(0x13a)]))],_0x2d2988);const _0x239262=_0x10c774(0x140),_0x5a0948={};var _0xd0c940=Object[_0x10c774(0xde)],_0x55ac16=(_0x28e4e0,_0x474ad5,_0x4ac996,_0x3dfae7)=>{const _0x5bdc6e=_0x10c774;for(var _0x50cd11=_0x3dfae7>0x1?void 0x0:_0x3dfae7?_0xd0c940(_0x474ad5,_0x4ac996):_0x474ad5,_0x3c9816=_0x28e4e0[_0x5bdc6e(0x111)]-0x1,_0x351b7d;_0x3c9816>=0x0;_0x3c9816--)(_0x351b7d=_0x28e4e0[_0x3c9816])&&(_0x50cd11=_0x351b7d(_0x50cd11)||_0x50cd11);return _0x50cd11;},_0x2866f8=(_0x21adc6,_0x5ae03b)=>(_0x57afa1,_0x53acab)=>_0x5ae03b(_0x57afa1,_0x53acab,_0x21adc6);function _0x103ccd(_0x27f827,_0x54242e){const _0x36c93c=_0x10c774,_0x1cc4d8=_0x27f827['replies'][0x0];return{..._0x54242e,'id':_0x1cc4d8[_0x36c93c(0x14e)],'resolved':_0x27f827['solved']===0x1,'dT':_0x11c8e2(_0x1cc4d8[_0x36c93c(0x14a)]),'personId':_0x1cc4d8[_0x36c93c(0x125)],'threadId':_0x1cc4d8[_0x36c93c(0xf2)]};}function _0x456607(_0x460dba,_0x507ef6,_0x2ed76d){const _0x2658e4=_0x10c774;var _0x2de41a,_0x1252e5;if(((_0x1252e5=(_0x2de41a=_0x460dba==null?void 0x0:_0x460dba[_0x2658e4(0x137)])==null?void 0x0:_0x2de41a[_0x2658e4(0x111)])!=null?_0x1252e5:0x0)>0x0){const _0x26c658=(_0xa72d15,_0x42cd91)=>({'id':_0xa72d15[_0x2658e4(0x14e)],'threadId':_0xa72d15[_0x2658e4(0xf2)],'dT':_0x11c8e2(_0xa72d15[_0x2658e4(0x14a)]),'personId':_0xa72d15[_0x2658e4(0x125)],'resolved':_0x460dba[_0x2658e4(0x13e)]===_0x4a7c1e[_0x2658e4(0x107)],'unitId':_0x507ef6,'subUnitId':_0x2ed76d,'text':JSON['parse'](_0xa72d15['content']),'parentId':_0x42cd91}),_0x43f784=_0x26c658(_0x460dba['replies'][0x0]);return{..._0x43f784,'children':_0x460dba['replies'][_0x2658e4(0x135)](0x1)['map'](_0xec7210=>_0x26c658(_0xec7210,_0x43f784['id']))};}return null;}let _0x17ad14=class{constructor(_0x5d6fe1,_0x10b050,_0x3b0db9,_0x1d4efc){const _0x29644d=_0x10c774;this[_0x29644d(0x144)]=_0x5d6fe1,this[_0x29644d(0x145)]=_0x10b050,this[_0x29644d(0x161)]=_0x3b0db9,this[_0x29644d(0x12a)]=_0x1d4efc;}async[_0x10c774(0xf1)](_0x35a547){const _0x2f843d=_0x10c774;var _0x3c237d,_0x15f1d3;const {parentId:_0xc14dfd,unitId:_0x2a020c,text:_0x43ee6f,threadId:_0x5f1b4e}=_0x35a547,_0x10704f=(_0x15f1d3=(_0x3c237d=_0x43ee6f[_0x2f843d(0x127)])==null?void 0x0:_0x3c237d['filter'](_0x2c9063=>_0x2c9063[_0x2f843d(0x13f)]===_0x53046e[_0x2f843d(0x119)]['COMMENT'])[_0x2f843d(0xf3)](_0x7c872f=>_0x7c872f[_0x2f843d(0x114)]))!=null?_0x15f1d3:[],_0x1e6e26=JSON[_0x2f843d(0x110)](_0x43ee6f),_0x5cab2f=(await this[_0x2f843d(0x161)][_0x2f843d(0x148)](_0x2a020c))[_0x2f843d(0x101)]();if(_0xc14dfd){const _0x4ba129={'memberId':_0x5cab2f,'unitId':_0x2a020c,'content':_0x1e6e26,'mention':_0x10704f,'threadId':_0x5f1b4e},_0x40c7ff=(await this[_0x2f843d(0x144)][_0x2f843d(0xf5)](_0x2f843d(0x115)+_0x2a020c+_0x2f843d(0x106),{'body':_0x4ba129}))['body']['reply'];return{..._0x35a547,'id':_0x40c7ff[_0x2f843d(0x14e)],'dT':_0x53046e[_0x2f843d(0xf9)](+_0x40c7ff['createTimestamp'])[_0x2f843d(0xee)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x40c7ff[_0x2f843d(0x125)]};}else{const _0x5f3aaf={'memberId':_0x5cab2f,'unitId':_0x2a020c,'content':_0x1e6e26,'mention':_0x10704f},_0x422ddf=await this[_0x2f843d(0x144)]['post']('/universer-api/comment/unit/'+_0x2a020c+'/add',{'body':_0x5f3aaf});return _0x103ccd(_0x422ddf[_0x2f843d(0xeb)]['comment'],_0x35a547);}}async[_0x10c774(0xed)](_0x542e0b){const _0x134d00=_0x10c774;var _0x3c6e46,_0x1058d2;const {text:_0x1ac7ed,unitId:_0x450568}=_0x542e0b,_0x31dc0a=(_0x1058d2=(_0x3c6e46=_0x1ac7ed[_0x134d00(0x127)])==null?void 0x0:_0x3c6e46['filter'](_0x462819=>_0x462819[_0x134d00(0x13f)]===_0x53046e[_0x134d00(0x119)]['COMMENT'])['map'](_0x521d2c=>_0x521d2c[_0x134d00(0x114)]))!=null?_0x1058d2:[],_0x32b9ec=JSON['stringify'](_0x1ac7ed),_0x58fbfc=_0x542e0b[_0x134d00(0xf2)],_0x32f71e=_0x542e0b['id'],_0x21d83b={'memberId':(await this['_sessionService'][_0x134d00(0x148)](_0x450568))['getMemberID'](),'unitId':_0x450568,'threadId':_0x58fbfc,'mention':_0x31dc0a,'content':_0x32b9ec,'replyId':_0x32f71e},_0x241ae2=await this[_0x134d00(0x144)][_0x134d00(0xf5)](_0x134d00(0x115)+_0x450568+'/edit',{'body':_0x21d83b});return!_0x241ae2[_0x134d00(0xeb)][_0x134d00(0xe6)]||_0x241ae2[_0x134d00(0xeb)][_0x134d00(0xe6)][_0x134d00(0x153)]===0x1;}async[_0x10c774(0x120)](_0x1ee9a4){const _0x3f7a63=_0x10c774,{unitId:_0x3e2d2c}=_0x1ee9a4,_0x514056=_0x1ee9a4[_0x3f7a63(0xf2)],_0x39cbf2={'memberId':this[_0x3f7a63(0x145)][_0x3f7a63(0x136)]()[_0x3f7a63(0x112)],'unitId':_0x3e2d2c,'threadId':_0x514056,'solved':_0x1ee9a4[_0x3f7a63(0xfb)]?_0x4a7c1e[_0x3f7a63(0x107)]:_0x4a7c1e[_0x3f7a63(0x13b)]},_0x32735d=await this[_0x3f7a63(0x144)][_0x3f7a63(0xf5)](_0x3f7a63(0x115)+_0x3e2d2c+_0x3f7a63(0x14d),{'body':_0x39cbf2});return!_0x32735d['body'][_0x3f7a63(0xe6)]||_0x32735d['body'][_0x3f7a63(0xe6)][_0x3f7a63(0x153)]===0x1;}async[_0x10c774(0x15b)](_0x274b77,_0x54cd85,_0x191c80,_0x32f677){const _0x15e336=_0x10c774,_0xfdc836={'memberId':(await this[_0x15e336(0x161)]['requireSession'](_0x274b77))[_0x15e336(0x101)](),'threadId':_0x191c80,'replyId':_0x32f677,'unitId':_0x274b77},_0x501436=await this[_0x15e336(0x144)][_0x15e336(0xf5)](_0x15e336(0x115)+_0x274b77+_0x15e336(0xdf),{'body':_0xfdc836});return!_0x501436[_0x15e336(0xeb)]['error']||_0x501436[_0x15e336(0xeb)][_0x15e336(0xe6)][_0x15e336(0x153)]===0x1;}async[_0x10c774(0x146)](_0x331ff9,_0x5d83a0,_0x5ea6da){const _0x353879=_0x10c774,_0x29f862={'unitId':_0x331ff9,'threadId':_0x5ea6da},_0x4924a2=await this[_0x353879(0x144)][_0x353879(0xf5)](_0x353879(0x115)+_0x331ff9+_0x353879(0xe5),{'body':_0x29f862}),_0x3f57ce=_0x5ea6da['map'](_0x448790=>_0x456607(_0x4924a2['body'][_0x353879(0x104)][_0x448790],_0x331ff9,_0x5d83a0))[_0x353879(0x154)](Boolean);return Object[_0x353879(0x11f)](_0x4924a2[_0x353879(0xeb)][_0x353879(0x14c)])[_0x353879(0xef)](_0x380f1c=>{const _0x25eb9e=_0x353879;this[_0x25eb9e(0x145)]['addUser'](_0x380f1c);}),_0x3f57ce;}[_0x10c774(0xf4)](_0x4ca874){const _0x1deb84=_0x10c774;return{'id':_0x4ca874['id'],'threadId':_0x4ca874[_0x1deb84(0xf2)],'ref':_0x4ca874[_0x1deb84(0xe7)]};}};_0x17ad14=_0x55ac16([_0x2866f8(0x0,_0x53046e[_0x10c774(0x143)](_0x32ca65['HTTPService'])),_0x2866f8(0x1,_0x53046e[_0x10c774(0x143)](_0x53046e['UserManagerService'])),_0x2866f8(0x2,_0x53046e[_0x10c774(0x143)](_0x529f48[_0x10c774(0xf8)])),_0x2866f8(0x3,_0x53046e['Inject'](_0x53046e['Injector']))],_0x17ad14);var _0x460514=Object['getOwnPropertyDescriptor'],_0x27a9aa=(_0x465c83,_0x3ea3ce,_0xed3a5,_0xda3f67)=>{for(var _0x599206=_0xda3f67>0x1?void 0x0:_0xda3f67?_0x460514(_0x3ea3ce,_0xed3a5):_0x3ea3ce,_0x493c28=_0x465c83['length']-0x1,_0x50c7cb;_0x493c28>=0x0;_0x493c28--)(_0x50c7cb=_0x465c83[_0x493c28])&&(_0x599206=_0x50c7cb(_0x599206)||_0x599206);return _0x599206;},_0x3ecd38=(_0x4f3e94,_0xdba78e)=>(_0x2ad679,_0x50490f)=>_0xdba78e(_0x2ad679,_0x50490f,_0x4f3e94);let _0x27324a=class extends _0x53046e[_0x10c774(0x11b)]{constructor(_0xf8f6e1,_0xd768b7){const _0x5c976f=_0x10c774;super(),this[_0x5c976f(0x12f)]=_0xf8f6e1,this[_0x5c976f(0x100)]=_0xd768b7,this[_0x5c976f(0x12e)]();}[_0x10c774(0x12e)](){const _0x5860f9=_0x10c774;this[_0x5860f9(0x12f)][_0x5860f9(0x150)]=this[_0x5860f9(0x100)],this[_0x5860f9(0x12f)]['syncUpdateMutationToColla']=!0x1;}};_0x27324a=_0x27a9aa([_0x3ecd38(0x0,_0x53f135['IThreadCommentDataSourceService']),_0x3ecd38(0x1,_0x53046e[_0x10c774(0x143)](_0x17ad14))],_0x27324a);var _0x1fbc65=Object['defineProperty'],_0x38df8c=Object['getOwnPropertyDescriptor'],_0x358e50=(_0x549f3c,_0xb5e06e,_0x4de9da)=>_0xb5e06e in _0x549f3c?_0x1fbc65(_0x549f3c,_0xb5e06e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4de9da}):_0x549f3c[_0xb5e06e]=_0x4de9da,_0x2ada3e=(_0x46bde5,_0x1fb88c,_0x9e0a67,_0x1a7e5b)=>{const _0x3853fd=_0x10c774;for(var _0x212bd5=_0x1a7e5b>0x1?void 0x0:_0x1a7e5b?_0x38df8c(_0x1fb88c,_0x9e0a67):_0x1fb88c,_0x1e7079=_0x46bde5[_0x3853fd(0x111)]-0x1,_0x53fc0d;_0x1e7079>=0x0;_0x1e7079--)(_0x53fc0d=_0x46bde5[_0x1e7079])&&(_0x212bd5=_0x53fc0d(_0x212bd5)||_0x212bd5);return _0x212bd5;},_0xca11ff=(_0x5d6014,_0x53a736)=>(_0x232c4b,_0x394c8f)=>_0x53a736(_0x232c4b,_0x394c8f,_0x5d6014),_0x40c93d=(_0x20fa97,_0x5a0b81,_0x5bf2f5)=>_0x358e50(_0x20fa97,typeof _0x5a0b81!=_0x10c774(0xf7)?_0x5a0b81+'':_0x5a0b81,_0x5bf2f5);_0x575727[_0x10c774(0x117)]=class extends _0x53046e['Plugin']{constructor(_0x3d0fa4=_0x5a0948,_0x276188,_0x5c6b12){const _0x2bb500=_0x10c774;super(),this[_0x2bb500(0x109)]=_0x3d0fa4,this['_injector']=_0x276188,this[_0x2bb500(0xe8)]=_0x5c6b12;const {..._0x65358c}=_0x53046e[_0x2bb500(0x164)]({},_0x5a0948,this[_0x2bb500(0x109)]);this[_0x2bb500(0xe8)][_0x2bb500(0xe2)](_0x239262,_0x65358c);}[_0x10c774(0x11a)](){const _0x1bdef1=_0x10c774;[[_0x17ad14],[_0x27324a],[_0x2d2988]][_0x1bdef1(0xef)](_0x1cde5c=>{const _0x39467c=_0x1bdef1;this[_0x39467c(0x12a)]['add'](_0x1cde5c);});}[_0x10c774(0xea)](){const _0x211645=_0x10c774;this[_0x211645(0x12a)][_0x211645(0xfc)](_0x27324a),this[_0x211645(0x12a)][_0x211645(0xfc)](_0x2d2988);}},_0x40c93d(_0x575727[_0x10c774(0x117)],_0x10c774(0xe3),_0x32c1cd),_0x40c93d(_0x575727[_0x10c774(0x117)],_0x10c774(0x10d),_0x53046e[_0x10c774(0xfe)][_0x10c774(0x163)]),_0x575727[_0x10c774(0x117)]=_0x2ada3e([_0x53046e[_0x10c774(0x129)](_0x40d616[_0x10c774(0x12c)],_0x529f48[_0x10c774(0x131)],_0x4cbde0[_0x10c774(0x10e)]),_0xca11ff(0x1,_0x53046e[_0x10c774(0x143)](_0x53046e['Injector'])),_0xca11ff(0x2,_0x53046e['IConfigService'])],_0x575727[_0x10c774(0x117)]),Object[_0x10c774(0x132)](_0x575727,Symbol[_0x10c774(0x14b)],{'value':_0x10c774(0x130)});}));function _0x5595(_0x108b89,_0x5b1c5c){const _0x2f63f8=_0x2f63();return _0x5595=function(_0x55954d,_0x5def85){_0x55954d=_0x55954d-0xdd;let _0x2f09b5=_0x2f63f8[_0x55954d];return _0x2f09b5;},_0x5595(_0x108b89,_0x5b1c5c);}function _0x2f63(){const _0x423ef9=['@univerjs/thread-comment-ui','exports','Injector','OpenOrReOpen','@univerjs-pro/license','add','solved','rangeType','thread-comment-data-source.config','3339dzJCLl','2289xqNroC','Inject','_httpService','_userService','listComments','payload','requireSession','44865Ibnlhh','createTimestamp','toStringTag','users','/solved','replyId','652ZtdLkB','dataSource','Unknown','Solve','code','filter','bufferTime','@univerjs/network','getComment','@univerjs-pro/collaboration-client','Edit','unitId','deleteComment','function','parse','UniverThreadCommentUi','rxjs','subscribe','_sessionService','size','UNIVER_UNKNOWN','merge','2733978UfKzBU','getOwnPropertyDescriptor','/delete','amd','Delete','setConfig','pluginName','CommentService','/list','error','ref','_configService','@univerjs/core','onReady','body','find','updateComment','format','forEach','@univerjs/thread-comment','addComment','threadId','map','saveCommentToSnapshot','post','_init','symbol','CollaborationSessionService','dayjs','disposeWithMe','resolved','get','UNRECOGNIZED','UniverInstanceType','UniverProCollaborationClient','_threadCommentDataSource','getMemberID','27570vFGIie','UniverProThreadCommentDatasource','comments','personId','/reply','Solved','UserManagerService','_config','root','UniverCore','pipe','type','UniverLicensePlugin','UniverNetwork','stringify','length','userID','537008fcGSQa','rangeId','/universer-api/comment/unit/','ThreadCommentModel','UniverThreadCommentDataSourcePlugin','content','CustomRangeType','onStarting','Disposable','2fXhdej','getUnit','_threadCommentModel','values','resolveComment','Reply','object','commentUpdate$','addUser','userId','Add','customRanges','_initUserSync','DependentOn','_injector','delete','UniverThreadCommentUIPlugin','3159905YBXjij','_initDataSource','_threadCommentDataSourceService','Module','UniverCollaborationClientPlugin','defineProperty','_commentService','2735465hwjpsX','slice','getCurrentUser','replies'];_0x2f63=function(){return _0x423ef9;};return _0x2f63();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5-nightly.202503121607",
|
|
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.
|
|
49
|
-
"@univerjs/core": "0.6.
|
|
50
|
-
"@univerjs-pro/license": "0.6.
|
|
51
|
-
"@univerjs/network": "0.6.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.5-nightly.202503121607",
|
|
49
|
+
"@univerjs/core": "0.6.5-nightly.202503121607",
|
|
50
|
+
"@univerjs-pro/license": "0.6.5-nightly.202503121607",
|
|
51
|
+
"@univerjs/network": "0.6.5-nightly.202503121607",
|
|
52
52
|
"@univerjs/protocol": "0.1.44-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.5-nightly.202503121607",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.5-nightly.202503121607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vite": "^6.2.0",
|
|
60
|
-
"vitest": "^3.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
60
|
+
"vitest": "^3.0.8",
|
|
61
|
+
"@univerjs-infra/shared": "0.6.5"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|