@univerjs-pro/thread-comment-datasource 0.10.10 → 0.10.11-nightly.202510220308
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/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3f2e8c=_0x5675;function _0x5675(_0x16a61a,_0x45e333){const _0x3bbdc7=_0x3bbd();return _0x5675=function(_0x5675a8,_0x3f3003){_0x5675a8=_0x5675a8-0x12a;let _0x560438=_0x3bbdc7[_0x5675a8];return _0x560438;},_0x5675(_0x16a61a,_0x45e333);}(function(_0x586374,_0x7959){const _0x3f266b=_0x5675,_0x1e90cc=_0x586374();while(!![]){try{const _0x4a7e94=-parseInt(_0x3f266b(0x148))/0x1*(parseInt(_0x3f266b(0x18d))/0x2)+parseInt(_0x3f266b(0x18c))/0x3+parseInt(_0x3f266b(0x19b))/0x4*(-parseInt(_0x3f266b(0x147))/0x5)+-parseInt(_0x3f266b(0x131))/0x6*(parseInt(_0x3f266b(0x155))/0x7)+parseInt(_0x3f266b(0x198))/0x8+parseInt(_0x3f266b(0x152))/0x9+-parseInt(_0x3f266b(0x15c))/0xa;if(_0x4a7e94===_0x7959)break;else _0x1e90cc['push'](_0x1e90cc['shift']());}catch(_0x596b31){_0x1e90cc['push'](_0x1e90cc['shift']());}}}(_0x3bbd,0x25969));Object[_0x3f2e8c(0x186)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3c89fc=>(_0x3c89fc[_0x3c89fc['OpenOrReOpen']=0x0]=_0x3f2e8c(0x177),_0x3c89fc[_0x3c89fc[_0x3f2e8c(0x191)]=0x1]=_0x3f2e8c(0x191),_0x3c89fc[_0x3c89fc[_0x3f2e8c(0x197)]=-0x1]=_0x3f2e8c(0x197),_0x3c89fc))(I||{}),v=(_0x2f572f=>(_0x2f572f[_0x2f572f[_0x3f2e8c(0x158)]=0x0]=_0x3f2e8c(0x158),_0x2f572f[_0x2f572f[_0x3f2e8c(0x17d)]=0x1]='Add',_0x2f572f[_0x2f572f[_0x3f2e8c(0x150)]=0x2]=_0x3f2e8c(0x150),_0x2f572f[_0x2f572f[_0x3f2e8c(0x166)]=0x3]=_0x3f2e8c(0x166),_0x2f572f[_0x2f572f[_0x3f2e8c(0x143)]=0x4]='Delete',_0x2f572f[_0x2f572f[_0x3f2e8c(0x18a)]=0x5]=_0x3f2e8c(0x18a),_0x2f572f[_0x2f572f['UNRECOGNIZED']=-0x1]=_0x3f2e8c(0x197),_0x2f572f))(v||{});const f=_0x222932=>c[_0x3f2e8c(0x16a)](new Date(+_0x222932))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x3b0d23,_0x1c184e)=>{const _0x3bd054=_0x3f2e8c,_0xa098a9=_0x3b0d23[_0x3bd054(0x16d)](c[_0x3bd054(0x156)]),_0x1022fc=_0x3b0d23[_0x3bd054(0x16d)](P[_0x3bd054(0x17f)]);_0x1c184e[_0x3bd054(0x19d)](_0x580c37=>{const _0x146c21=_0x3bd054;_0xa098a9[_0x146c21(0x175)](_0x580c37)&&_0x1c184e[_0x146c21(0x19e)](_0x580c37);}),_0x1c184e['size']&&(await _0x1022fc['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x1c184e]}}))[_0x3bd054(0x176)][_0x3bd054(0x161)][_0x3bd054(0x19d)](_0x4cb1b8=>{const _0x2e553a=_0x3bd054;_0x4cb1b8&&_0xa098a9[_0x2e553a(0x18e)](_0x4cb1b8);});};var $=Object[_0x3f2e8c(0x180)],E=(_0x676033,_0x4369d2,_0x553f3b,_0xc2757a)=>{const _0xf46b4e=_0x3f2e8c;for(var _0x161747=_0xc2757a>0x1?void 0x0:_0xc2757a?$(_0x4369d2,_0x553f3b):_0x4369d2,_0x3a6554=_0x676033[_0xf46b4e(0x132)]-0x1,_0x381711;_0x3a6554>=0x0;_0x3a6554--)(_0x381711=_0x676033[_0x3a6554])&&(_0x161747=_0x381711(_0x161747)||_0x161747);return _0x161747;},S=(_0x4117ec,_0x22f495)=>(_0x34957d,_0x2e3f01)=>_0x22f495(_0x34957d,_0x2e3f01,_0x4117ec);let _=class extends c['Disposable']{constructor(_0x1310e2,_0x552e49,_0x287bd5,_0x6114f4){const _0x5bb7fb=_0x3f2e8c;super(),this['_commentService']=_0x1310e2,this[_0x5bb7fb(0x162)]=_0x552e49,this[_0x5bb7fb(0x12b)]=_0x287bd5,this[_0x5bb7fb(0x15a)]=_0x6114f4,this[_0x5bb7fb(0x13a)](),this[_0x5bb7fb(0x171)]();}['_initUserSync'](){const _0x4747c8=_0x3f2e8c;this['disposeWithMe'](this[_0x4747c8(0x162)][_0x4747c8(0x16b)][_0x4747c8(0x168)](j[_0x4747c8(0x134)](0x10))[_0x4747c8(0x140)](_0x58c355=>{const _0x160a09=_0x4747c8,_0x181377=new Set();_0x58c355[_0x160a09(0x19d)](_0xbe9422=>{const _0x414b1c=_0x160a09;switch(_0xbe9422[_0x414b1c(0x14a)]){case _0x414b1c(0x179):{const _0x5503d3=_0xbe9422['payload'][_0x414b1c(0x172)];_0x181377['add'](_0x5503d3);break;}}}),R(this['_injector'],_0x181377);}));}['_init'](){const _0x4effc3=_0x3f2e8c;this[_0x4effc3(0x182)](this['_commentService'][_0x4effc3(0x16b)][_0x4effc3(0x140)](async _0x50cb02=>{const _0x3729d8=_0x4effc3;var _0x5ca97e,_0x1fd7d3,_0x6402d5,_0x40806f;const _0x2130f9=(_0x5ca97e=this[_0x3729d8(0x162)]['getUnit'](_0x50cb02[_0x3729d8(0x12c)])[_0x3729d8(0x174)](_0x47a1ce=>_0x47a1ce[_0x3729d8(0x12d)]===_0x50cb02[_0x3729d8(0x12d)]))==null?void 0x0:_0x5ca97e[_0x3729d8(0x183)];if(!_0x2130f9)return;const {unitId:_0x4462df,subUnitId:_0x765853}=_0x2130f9;switch(_0x50cb02['user']&&this['_userService'][_0x3729d8(0x18e)](_0x50cb02['user']),_0x50cb02[_0x3729d8(0x14a)]){case v[_0x3729d8(0x17d)]:break;case v[_0x3729d8(0x150)]:{this[_0x3729d8(0x162)][_0x3729d8(0x169)](_0x4462df,_0x765853,{'unitId':_0x4462df,'subUnitId':_0x765853,'ref':'','id':_0x50cb02['replyId'],'dT':f(+_0x50cb02[_0x3729d8(0x196)]),'threadId':_0x50cb02[_0x3729d8(0x12d)],'personId':(_0x6402d5=(_0x1fd7d3=_0x50cb02[_0x3729d8(0x14e)])==null?void 0x0:_0x1fd7d3[_0x3729d8(0x195)])!=null?_0x6402d5:_0x50cb02[_0x3729d8(0x19a)],'text':JSON[_0x3729d8(0x12e)](_0x50cb02[_0x3729d8(0x189)]),'parentId':_0x2130f9['id']});break;}case v[_0x3729d8(0x143)]:{const _0x56c7c8=this[_0x3729d8(0x162)]['getComment'](_0x4462df,_0x765853,_0x50cb02['replyId']);_0x56c7c8&&_0x56c7c8[_0x3729d8(0x163)]&&this[_0x3729d8(0x162)][_0x3729d8(0x157)](_0x4462df,_0x765853,_0x50cb02['replyId']);break;}case v[_0x3729d8(0x166)]:{this[_0x3729d8(0x162)][_0x3729d8(0x138)](_0x4462df,_0x765853,{'commentId':_0x50cb02[_0x3729d8(0x149)],'text':JSON[_0x3729d8(0x12e)](_0x50cb02[_0x3729d8(0x189)])});break;}case v[_0x3729d8(0x18a)]:{const _0x9e62c2=(_0x40806f=this[_0x3729d8(0x162)]['getUnit'](_0x50cb02[_0x3729d8(0x12c)])[_0x3729d8(0x174)](_0x48d7b0=>_0x48d7b0[_0x3729d8(0x12d)]===_0x50cb02[_0x3729d8(0x12d)]))==null?void 0x0:_0x40806f[_0x3729d8(0x183)];_0x9e62c2&&this[_0x3729d8(0x162)][_0x3729d8(0x14b)](_0x4462df,_0x765853,_0x9e62c2['id'],_0x50cb02[_0x3729d8(0x192)]===I[_0x3729d8(0x191)]);break;}}}));}};_=E([S(0x0,c[_0x3f2e8c(0x199)](b[_0x3f2e8c(0x178)])),S(0x1,c[_0x3f2e8c(0x199)](M['ThreadCommentModel'])),S(0x2,c[_0x3f2e8c(0x199)](c[_0x3f2e8c(0x156)])),S(0x3,c['Inject'](c[_0x3f2e8c(0x137)]))],_);const q=_0x3f2e8c(0x153),D={};var A=Object[_0x3f2e8c(0x180)],x=(_0x2850ae,_0x73c04b,_0x5d437b,_0x74c1ed)=>{const _0x47e50e=_0x3f2e8c;for(var _0x311039=_0x74c1ed>0x1?void 0x0:_0x74c1ed?A(_0x73c04b,_0x5d437b):_0x73c04b,_0x426a91=_0x2850ae[_0x47e50e(0x132)]-0x1,_0x14259e;_0x426a91>=0x0;_0x426a91--)(_0x14259e=_0x2850ae[_0x426a91])&&(_0x311039=_0x14259e(_0x311039)||_0x311039);return _0x311039;},C=(_0x232df3,_0x292d02)=>(_0x4870cd,_0x128345)=>_0x292d02(_0x4870cd,_0x128345,_0x232df3);function Y(_0x16607a,_0x56eb53){const _0xedb219=_0x3f2e8c,_0x5a8853=_0x16607a[_0xedb219(0x141)][0x0];return{..._0x56eb53,'id':_0x5a8853['replyId'],'resolved':_0x16607a['solved']===0x1,'dT':f(_0x5a8853[_0xedb219(0x196)]),'personId':_0x5a8853[_0xedb219(0x19a)],'threadId':_0x5a8853[_0xedb219(0x12d)]};}function G(_0x3f2af7,_0x4f0375,_0x46ffc2){const _0x2ca8c5=_0x3f2e8c;var _0x145810,_0x28c57d;if(((_0x28c57d=(_0x145810=_0x3f2af7==null?void 0x0:_0x3f2af7['replies'])==null?void 0x0:_0x145810[_0x2ca8c5(0x132)])!=null?_0x28c57d:0x0)>0x0){const _0x4da385=(_0x1ac5a6,_0x67fe69)=>({'id':_0x1ac5a6[_0x2ca8c5(0x149)],'threadId':_0x1ac5a6[_0x2ca8c5(0x12d)],'dT':f(_0x1ac5a6[_0x2ca8c5(0x196)]),'personId':_0x1ac5a6[_0x2ca8c5(0x19a)],'resolved':_0x3f2af7[_0x2ca8c5(0x192)]===I[_0x2ca8c5(0x191)],'unitId':_0x4f0375,'subUnitId':_0x46ffc2,'text':JSON[_0x2ca8c5(0x12e)](_0x1ac5a6[_0x2ca8c5(0x189)]),'parentId':_0x67fe69}),_0x18463e=_0x4da385(_0x3f2af7[_0x2ca8c5(0x141)][0x0]);return{..._0x18463e,'children':_0x3f2af7[_0x2ca8c5(0x141)][_0x2ca8c5(0x133)](0x1)[_0x2ca8c5(0x13f)](_0x48e1cd=>_0x4da385(_0x48e1cd,_0x18463e['id']))};}return null;}function _0x3bbd(){const _0x1625aa=['_httpService','UniverThreadCommentUIPlugin','Edit','DependentOn','pipe','addComment','dayjs','commentUpdate$','/edit','get','_threadCommentDataSource','_config','stringify','_initUserSync','personId','COMMENT','find','getUser','body','OpenOrReOpen','CommentService','add','syncUpdateMutationToColla','filter','UniverLicensePlugin','Add','resolved','HTTPService','getOwnPropertyDescriptor','post','disposeWithMe','root','IConfigService','onReady','defineProperty','IThreadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','content','Solve','format','914391envQJP','2566zrxgPw','addUser','UNIVER_UNKNOWN','Plugin','Solved','solved','getCurrentUser','rangeId','userID','createTimestamp','UNRECOGNIZED','1652920HmZjqY','Inject','userId','4KbrCqF','requireSession','forEach','delete','values','customRanges','comment','_threadCommentDataSourceService','_userService','unitId','threadId','parse','pluginName','CustomRangeType','417114vwRgcT','length','slice','bufferTime','/delete','/solved','Injector','updateComment','ref','_init','listComments','_initDataSource','error','YYYY/MM/DD\x20HH:mm','map','subscribe','replies','UniverInstanceType','Delete','dataSource','/list','_configService','284910ikoYNa','22azbkks','replyId','type','resolveComment','rangeType','/universer-api/comment/unit/','user','merge','Reply','onStarting','946242NrgQut','thread-comment-data-source.config','/add','7SnGoYq','UserManagerService','deleteComment','Unknown','UniverCollaborationClientPlugin','_injector','_sessionService','3078620qqVXGv','getMemberID','/reply','reply','Disposable','users','_threadCommentModel','parentId'];_0x3bbd=function(){return _0x1625aa;};return _0x3bbd();}let p=class{constructor(_0xd4e7ea,_0x19a241,_0x551510){const _0x2b0a5e=_0x3f2e8c;this[_0x2b0a5e(0x164)]=_0xd4e7ea,this[_0x2b0a5e(0x12b)]=_0x19a241,this[_0x2b0a5e(0x15b)]=_0x551510;}async[_0x3f2e8c(0x169)](_0xe010cd){const _0x3140c3=_0x3f2e8c;var _0x587c66,_0x2fefe5;const {parentId:_0x213c2c,unitId:_0x4e3ce8,text:_0x23706e,threadId:_0x166cda}=_0xe010cd,_0x5ef2e6=(_0x2fefe5=(_0x587c66=_0x23706e[_0x3140c3(0x1a0)])==null?void 0x0:_0x587c66['filter'](_0x34929d=>_0x34929d[_0x3140c3(0x14c)]===c[_0x3140c3(0x130)][_0x3140c3(0x173)])[_0x3140c3(0x13f)](_0x52c771=>_0x52c771[_0x3140c3(0x194)]))!=null?_0x2fefe5:[],_0x3008f5=JSON[_0x3140c3(0x170)](_0x23706e),_0x283202=(await this['_sessionService']['requireSession'](_0x4e3ce8))['getMemberID']();if(_0x213c2c){const _0xe72f97={'memberId':_0x283202,'unitId':_0x4e3ce8,'content':_0x3008f5,'mention':_0x5ef2e6,'threadId':_0x166cda},_0xd349b4=(await this['_httpService'][_0x3140c3(0x181)](_0x3140c3(0x14d)+_0x4e3ce8+_0x3140c3(0x15e),{'body':_0xe72f97}))['body'][_0x3140c3(0x15f)];return{..._0xe010cd,'id':_0xd349b4['replyId'],'dT':c[_0x3140c3(0x16a)](+_0xd349b4[_0x3140c3(0x196)])[_0x3140c3(0x18b)](_0x3140c3(0x13e)),'personId':_0xd349b4[_0x3140c3(0x19a)]};}else{const _0x592d62={'memberId':_0x283202,'unitId':_0x4e3ce8,'content':_0x3008f5,'mention':_0x5ef2e6},_0x506d0f=await this[_0x3140c3(0x164)][_0x3140c3(0x181)](_0x3140c3(0x14d)+_0x4e3ce8+_0x3140c3(0x154),{'body':_0x592d62});return Y(_0x506d0f[_0x3140c3(0x176)][_0x3140c3(0x1a1)],_0xe010cd);}}async[_0x3f2e8c(0x138)](_0x51306b){const _0x4e7b5b=_0x3f2e8c;var _0x2fd154,_0x1d8b52;const {text:_0x36dc8d,unitId:_0x477d4b}=_0x51306b,_0x453b1f=(_0x1d8b52=(_0x2fd154=_0x36dc8d['customRanges'])==null?void 0x0:_0x2fd154[_0x4e7b5b(0x17b)](_0x500364=>_0x500364[_0x4e7b5b(0x14c)]===c[_0x4e7b5b(0x130)]['COMMENT'])[_0x4e7b5b(0x13f)](_0x31ec20=>_0x31ec20['rangeId']))!=null?_0x1d8b52:[],_0x2038b9=JSON[_0x4e7b5b(0x170)](_0x36dc8d),_0x4529f8=_0x51306b['threadId'],_0x36d580=_0x51306b['id'],_0x1a1079={'memberId':(await this['_sessionService'][_0x4e7b5b(0x19c)](_0x477d4b))[_0x4e7b5b(0x15d)](),'unitId':_0x477d4b,'threadId':_0x4529f8,'mention':_0x453b1f,'content':_0x2038b9,'replyId':_0x36d580},_0x348d96=await this[_0x4e7b5b(0x164)]['post'](_0x4e7b5b(0x14d)+_0x477d4b+_0x4e7b5b(0x16c),{'body':_0x1a1079});return!_0x348d96[_0x4e7b5b(0x176)][_0x4e7b5b(0x13d)]||_0x348d96['body'][_0x4e7b5b(0x13d)]['code']===0x1;}async[_0x3f2e8c(0x14b)](_0x321d12){const _0x509806=_0x3f2e8c,{unitId:_0x5e3ddd}=_0x321d12,_0x14b49e=_0x321d12[_0x509806(0x12d)],_0x2bacf2={'memberId':this[_0x509806(0x12b)][_0x509806(0x193)]()['userID'],'unitId':_0x5e3ddd,'threadId':_0x14b49e,'solved':_0x321d12[_0x509806(0x17e)]?I['Solved']:I['OpenOrReOpen']},_0x31b103=await this[_0x509806(0x164)][_0x509806(0x181)](_0x509806(0x14d)+_0x5e3ddd+_0x509806(0x136),{'body':_0x2bacf2});return!_0x31b103[_0x509806(0x176)][_0x509806(0x13d)]||_0x31b103['body'][_0x509806(0x13d)]['code']===0x1;}async['deleteComment'](_0x1ca91c,_0x1db0ff,_0x13778f,_0x3a2e3d){const _0x45db4e=_0x3f2e8c,_0x215d42={'memberId':(await this[_0x45db4e(0x15b)]['requireSession'](_0x1ca91c))[_0x45db4e(0x15d)](),'threadId':_0x13778f,'replyId':_0x3a2e3d,'unitId':_0x1ca91c},_0x3fb0db=await this[_0x45db4e(0x164)][_0x45db4e(0x181)](_0x45db4e(0x14d)+_0x1ca91c+_0x45db4e(0x135),{'body':_0x215d42});return!_0x3fb0db[_0x45db4e(0x176)][_0x45db4e(0x13d)]||_0x3fb0db[_0x45db4e(0x176)][_0x45db4e(0x13d)]['code']===0x1;}async[_0x3f2e8c(0x13b)](_0x4301a4,_0x234b14,_0x8f6b6e){const _0x18505b=_0x3f2e8c,_0x2a8f37={'unitId':_0x4301a4,'threadId':_0x8f6b6e},_0x484a8e=await this[_0x18505b(0x164)][_0x18505b(0x181)](_0x18505b(0x14d)+_0x4301a4+_0x18505b(0x145),{'body':_0x2a8f37}),_0x380e31=_0x8f6b6e[_0x18505b(0x13f)](_0x17881c=>G(_0x484a8e[_0x18505b(0x176)]['comments'][_0x17881c],_0x4301a4,_0x234b14))['filter'](Boolean);return Object[_0x18505b(0x19f)](_0x484a8e[_0x18505b(0x176)][_0x18505b(0x161)])[_0x18505b(0x19d)](_0x453d99=>{const _0x4e6a4d=_0x18505b;this[_0x4e6a4d(0x12b)][_0x4e6a4d(0x18e)](_0x453d99);}),_0x380e31;}['saveCommentToSnapshot'](_0x679a04){const _0x48706d=_0x3f2e8c;return{'id':_0x679a04['id'],'threadId':_0x679a04[_0x48706d(0x12d)],'ref':_0x679a04[_0x48706d(0x139)]};}};p=x([C(0x0,c[_0x3f2e8c(0x199)](P[_0x3f2e8c(0x17f)])),C(0x1,c[_0x3f2e8c(0x199)](c[_0x3f2e8c(0x156)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x31b805,_0x3c8d65,_0x15162f,_0x121738)=>{const _0x330da6=_0x3f2e8c;for(var _0x5b638e=_0x121738>0x1?void 0x0:_0x121738?H(_0x3c8d65,_0x15162f):_0x3c8d65,_0x50f7a6=_0x31b805[_0x330da6(0x132)]-0x1,_0x2a4c21;_0x50f7a6>=0x0;_0x50f7a6--)(_0x2a4c21=_0x31b805[_0x50f7a6])&&(_0x5b638e=_0x2a4c21(_0x5b638e)||_0x5b638e);return _0x5b638e;},y=(_0x4e6cc6,_0x1f95e1)=>(_0x5392e5,_0x39daf9)=>_0x1f95e1(_0x5392e5,_0x39daf9,_0x4e6cc6);let g=class extends c[_0x3f2e8c(0x160)]{constructor(_0x2a36c7,_0x346831){const _0x2b15f0=_0x3f2e8c;super(),this['_threadCommentDataSourceService']=_0x2a36c7,this[_0x2b15f0(0x16e)]=_0x346831,this[_0x2b15f0(0x13c)]();}[_0x3f2e8c(0x13c)](){const _0x550a0a=_0x3f2e8c;this[_0x550a0a(0x12a)][_0x550a0a(0x144)]=this[_0x550a0a(0x16e)],this[_0x550a0a(0x12a)][_0x550a0a(0x17a)]=!0x1;}};g=J([y(0x0,M[_0x3f2e8c(0x187)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x3f2e8c(0x180)],Z=(_0x4d1219,_0x615691,_0x12a143)=>_0x615691 in _0x4d1219?F(_0x4d1219,_0x615691,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12a143}):_0x4d1219[_0x615691]=_0x12a143,W=(_0x1e6544,_0x95c62d,_0x509cdf,_0xb25b8b)=>{const _0x582af2=_0x3f2e8c;for(var _0x2a27be=_0xb25b8b>0x1?void 0x0:_0xb25b8b?L(_0x95c62d,_0x509cdf):_0x95c62d,_0x4aa9af=_0x1e6544[_0x582af2(0x132)]-0x1,_0x152715;_0x4aa9af>=0x0;_0x4aa9af--)(_0x152715=_0x1e6544[_0x4aa9af])&&(_0x2a27be=_0x152715(_0x2a27be)||_0x2a27be);return _0x2a27be;},O=(_0x580b3d,_0x261c6a)=>(_0x359132,_0x1456a7)=>_0x261c6a(_0x359132,_0x1456a7,_0x580b3d),N=(_0x4b00e7,_0x27b019,_0x203909)=>Z(_0x4b00e7,typeof _0x27b019!='symbol'?_0x27b019+'':_0x27b019,_0x203909);exports[_0x3f2e8c(0x188)]=class extends c[_0x3f2e8c(0x190)]{constructor(_0x2b9880=D,_0x21be5c,_0x56a8a8){const _0x53a5c1=_0x3f2e8c;super(),this[_0x53a5c1(0x16f)]=_0x2b9880,this[_0x53a5c1(0x15a)]=_0x21be5c,this[_0x53a5c1(0x146)]=_0x56a8a8;const {..._0x4fb298}=c[_0x53a5c1(0x14f)]({},D,this[_0x53a5c1(0x16f)]);this['_configService']['setConfig'](q,_0x4fb298);}[_0x3f2e8c(0x151)](){const _0x22390b=_0x3f2e8c;[[p],[g],[_]][_0x22390b(0x19d)](_0xf568e4=>{const _0x5e3122=_0x22390b;this['_injector'][_0x5e3122(0x179)](_0xf568e4);});}[_0x3f2e8c(0x185)](){const _0xe3750f=_0x3f2e8c;this[_0xe3750f(0x15a)][_0xe3750f(0x16d)](g),this[_0xe3750f(0x15a)][_0xe3750f(0x16d)](_);}},N(exports[_0x3f2e8c(0x188)],_0x3f2e8c(0x12f),U),N(exports[_0x3f2e8c(0x188)],_0x3f2e8c(0x14a),c[_0x3f2e8c(0x142)][_0x3f2e8c(0x18f)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3f2e8c(0x167)](w[_0x3f2e8c(0x165)],b[_0x3f2e8c(0x159)],T[_0x3f2e8c(0x17c)]),O(0x1,c[_0x3f2e8c(0x199)](c[_0x3f2e8c(0x137)])),O(0x2,c[_0x3f2e8c(0x184)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x3d1cb3=_0x162f;(function(_0x5dbede,_0x4747b5){const _0xb0aa82=_0x162f,_0x316031=_0x5dbede();while(!![]){try{const _0x1c7aa5=-parseInt(_0xb0aa82(0x152))/0x1+-parseInt(_0xb0aa82(0x123))/0x2*(parseInt(_0xb0aa82(0x132))/0x3)+-parseInt(_0xb0aa82(0x15f))/0x4*(-parseInt(_0xb0aa82(0x10f))/0x5)+-parseInt(_0xb0aa82(0x159))/0x6*(-parseInt(_0xb0aa82(0x112))/0x7)+parseInt(_0xb0aa82(0x153))/0x8+parseInt(_0xb0aa82(0x129))/0x9+-parseInt(_0xb0aa82(0x164))/0xa;if(_0x1c7aa5===_0x4747b5)break;else _0x316031['push'](_0x316031['shift']());}catch(_0x21a443){_0x316031['push'](_0x316031['shift']());}}}(_0x36ef,0x7d403));Object[_0x3d1cb3(0x149)](exports,Symbol['toStringTag'],{'value':_0x3d1cb3(0x111)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x3d1cb3(0x155);var I=(_0x4ada49=>(_0x4ada49[_0x4ada49['OpenOrReOpen']=0x0]=_0x3d1cb3(0x160),_0x4ada49[_0x4ada49[_0x3d1cb3(0xfb)]=0x1]=_0x3d1cb3(0xfb),_0x4ada49[_0x4ada49[_0x3d1cb3(0x145)]=-0x1]=_0x3d1cb3(0x145),_0x4ada49))(I||{}),v=(_0x5bdce4=>(_0x5bdce4[_0x5bdce4[_0x3d1cb3(0xf4)]=0x0]=_0x3d1cb3(0xf4),_0x5bdce4[_0x5bdce4[_0x3d1cb3(0x130)]=0x1]='Add',_0x5bdce4[_0x5bdce4[_0x3d1cb3(0xfc)]=0x2]=_0x3d1cb3(0xfc),_0x5bdce4[_0x5bdce4[_0x3d1cb3(0x12d)]=0x3]=_0x3d1cb3(0x12d),_0x5bdce4[_0x5bdce4[_0x3d1cb3(0x122)]=0x4]='Delete',_0x5bdce4[_0x5bdce4['Solve']=0x5]=_0x3d1cb3(0x104),_0x5bdce4[_0x5bdce4['UNRECOGNIZED']=-0x1]=_0x3d1cb3(0x145),_0x5bdce4))(v||{});const f=_0x17a505=>c[_0x3d1cb3(0x148)](new Date(+_0x17a505))[_0x3d1cb3(0x154)](_0x3d1cb3(0x15b)),R=async(_0x404bb7,_0x1a9a84)=>{const _0x165c99=_0x3d1cb3,_0x27b07e=_0x404bb7[_0x165c99(0xf0)](c[_0x165c99(0x14e)]),_0xe41089=_0x404bb7[_0x165c99(0xf0)](P[_0x165c99(0x125)]);_0x1a9a84[_0x165c99(0xf7)](_0x280739=>{const _0x5ab926=_0x165c99;_0x27b07e[_0x5ab926(0x127)](_0x280739)&&_0x1a9a84[_0x5ab926(0x100)](_0x280739);}),_0x1a9a84[_0x165c99(0x106)]&&(await _0xe41089[_0x165c99(0xf0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1a9a84]}}))[_0x165c99(0x13a)]['users'][_0x165c99(0xf7)](_0x1e0a6a=>{const _0x3f8000=_0x165c99;_0x1e0a6a&&_0x27b07e[_0x3f8000(0x107)](_0x1e0a6a);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x57b33d,_0x333a20,_0x54bf26,_0xbb1532)=>{const _0x51e8f4=_0x3d1cb3;for(var _0x44d80a=_0xbb1532>0x1?void 0x0:_0xbb1532?$(_0x333a20,_0x54bf26):_0x333a20,_0x2de291=_0x57b33d[_0x51e8f4(0x14d)]-0x1,_0x5b9623;_0x2de291>=0x0;_0x2de291--)(_0x5b9623=_0x57b33d[_0x2de291])&&(_0x44d80a=_0x5b9623(_0x44d80a)||_0x44d80a);return _0x44d80a;},S=(_0x46bb0c,_0x18b3a3)=>(_0x438d2a,_0x38a129)=>_0x18b3a3(_0x438d2a,_0x38a129,_0x46bb0c);let _=class extends c[_0x3d1cb3(0x15c)]{constructor(_0x33bb95,_0x21481f,_0x486c56,_0x489b33){const _0x253659=_0x3d1cb3;super(),this[_0x253659(0x166)]=_0x33bb95,this['_threadCommentModel']=_0x21481f,this['_userService']=_0x486c56,this['_injector']=_0x489b33,this['_init'](),this['_initUserSync']();}[_0x3d1cb3(0x150)](){const _0x1c8cdc=_0x3d1cb3;this[_0x1c8cdc(0x110)](this['_threadCommentModel']['commentUpdate$'][_0x1c8cdc(0xf6)](j[_0x1c8cdc(0x118)](0x10))[_0x1c8cdc(0x135)](_0x16698e=>{const _0x135600=_0x1c8cdc,_0x4c1e94=new Set();_0x16698e[_0x135600(0xf7)](_0x43522b=>{const _0x110578=_0x135600;switch(_0x43522b['type']){case'add':{const _0x3dd892=_0x43522b[_0x110578(0x12f)][_0x110578(0x11c)];_0x4c1e94['add'](_0x3dd892);break;}}}),R(this['_injector'],_0x4c1e94);}));}[_0x3d1cb3(0x10b)](){const _0x234762=_0x3d1cb3;this['disposeWithMe'](this[_0x234762(0x166)]['commentUpdate$']['subscribe'](async _0x2d586e=>{const _0x418dbc=_0x234762;var _0x49df3c,_0x412a59,_0x397ed2,_0x5944b0;const _0x58f86b=(_0x49df3c=this['_threadCommentModel'][_0x418dbc(0x144)](_0x2d586e[_0x418dbc(0x109)])[_0x418dbc(0x11a)](_0x166f44=>_0x166f44[_0x418dbc(0x14f)]===_0x2d586e[_0x418dbc(0x14f)]))==null?void 0x0:_0x49df3c[_0x418dbc(0x136)];if(!_0x58f86b)return;const {unitId:_0x3e9f7c,subUnitId:_0x2b1815}=_0x58f86b;switch(_0x2d586e[_0x418dbc(0x165)]&&this[_0x418dbc(0x157)][_0x418dbc(0x107)](_0x2d586e[_0x418dbc(0x165)]),_0x2d586e[_0x418dbc(0xef)]){case v[_0x418dbc(0x130)]:break;case v[_0x418dbc(0xfc)]:{this[_0x418dbc(0x121)][_0x418dbc(0x14c)](_0x3e9f7c,_0x2b1815,{'unitId':_0x3e9f7c,'subUnitId':_0x2b1815,'ref':'','id':_0x2d586e[_0x418dbc(0xf8)],'dT':f(+_0x2d586e[_0x418dbc(0xee)]),'threadId':_0x2d586e[_0x418dbc(0x14f)],'personId':(_0x397ed2=(_0x412a59=_0x2d586e[_0x418dbc(0x165)])==null?void 0x0:_0x412a59[_0x418dbc(0x102)])!=null?_0x397ed2:_0x2d586e[_0x418dbc(0x13b)],'text':JSON[_0x418dbc(0x120)](_0x2d586e['content']),'parentId':_0x58f86b['id']});break;}case v[_0x418dbc(0x122)]:{const _0x10e434=this['_threadCommentModel'][_0x418dbc(0x12c)](_0x3e9f7c,_0x2b1815,_0x2d586e[_0x418dbc(0xf8)]);_0x10e434&&_0x10e434[_0x418dbc(0x163)]&&this[_0x418dbc(0x121)]['deleteComment'](_0x3e9f7c,_0x2b1815,_0x2d586e[_0x418dbc(0xf8)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x418dbc(0x156)](_0x3e9f7c,_0x2b1815,{'commentId':_0x2d586e[_0x418dbc(0xf8)],'text':JSON[_0x418dbc(0x120)](_0x2d586e['content'])});break;}case v['Solve']:{const _0x50c4b6=(_0x5944b0=this[_0x418dbc(0x121)]['getUnit'](_0x2d586e[_0x418dbc(0x109)])['find'](_0x23a6c4=>_0x23a6c4[_0x418dbc(0x14f)]===_0x2d586e[_0x418dbc(0x14f)]))==null?void 0x0:_0x5944b0[_0x418dbc(0x136)];_0x50c4b6&&this[_0x418dbc(0x121)][_0x418dbc(0x10e)](_0x3e9f7c,_0x2b1815,_0x50c4b6['id'],_0x2d586e[_0x418dbc(0x137)]===I[_0x418dbc(0xfb)]);break;}}}));}};_=E([S(0x0,c[_0x3d1cb3(0x140)](b[_0x3d1cb3(0x10a)])),S(0x1,c[_0x3d1cb3(0x140)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x3d1cb3(0x11f)]))],_);const q=_0x3d1cb3(0x15e),D={};var A=Object[_0x3d1cb3(0x12b)],x=(_0x180b31,_0x810b0d,_0x729731,_0x5cfc3a)=>{const _0x2239a3=_0x3d1cb3;for(var _0x300363=_0x5cfc3a>0x1?void 0x0:_0x5cfc3a?A(_0x810b0d,_0x729731):_0x810b0d,_0x15290a=_0x180b31[_0x2239a3(0x14d)]-0x1,_0x262ba5;_0x15290a>=0x0;_0x15290a--)(_0x262ba5=_0x180b31[_0x15290a])&&(_0x300363=_0x262ba5(_0x300363)||_0x300363);return _0x300363;},C=(_0x12e0e5,_0x3bcdd8)=>(_0x4b445d,_0x1281d1)=>_0x3bcdd8(_0x4b445d,_0x1281d1,_0x12e0e5);function Y(_0x2b4d88,_0x2f7209){const _0x54db8e=_0x3d1cb3,_0x2c0750=_0x2b4d88[_0x54db8e(0x158)][0x0];return{..._0x2f7209,'id':_0x2c0750[_0x54db8e(0xf8)],'resolved':_0x2b4d88[_0x54db8e(0x137)]===0x1,'dT':f(_0x2c0750[_0x54db8e(0xee)]),'personId':_0x2c0750[_0x54db8e(0x13b)],'threadId':_0x2c0750[_0x54db8e(0x14f)]};}function G(_0x569088,_0x3498a6,_0x367d2f){const _0x436c38=_0x3d1cb3;var _0x512ab3,_0x2e69a2;if(((_0x2e69a2=(_0x512ab3=_0x569088==null?void 0x0:_0x569088['replies'])==null?void 0x0:_0x512ab3[_0x436c38(0x14d)])!=null?_0x2e69a2:0x0)>0x0){const _0x37cdb2=(_0x3c3924,_0x40210e)=>({'id':_0x3c3924['replyId'],'threadId':_0x3c3924[_0x436c38(0x14f)],'dT':f(_0x3c3924[_0x436c38(0xee)]),'personId':_0x3c3924['userId'],'resolved':_0x569088[_0x436c38(0x137)]===I[_0x436c38(0xfb)],'unitId':_0x3498a6,'subUnitId':_0x367d2f,'text':JSON['parse'](_0x3c3924[_0x436c38(0x142)]),'parentId':_0x40210e}),_0x52c3e8=_0x37cdb2(_0x569088[_0x436c38(0x158)][0x0]);return{..._0x52c3e8,'children':_0x569088[_0x436c38(0x158)]['slice'](0x1)['map'](_0x448eb6=>_0x37cdb2(_0x448eb6,_0x52c3e8['id']))};}return null;}function _0x36ef(){const _0x3c9d9a=['addComment','length','UserManagerService','threadId','_initUserSync','DependentOn','459128CfXBFF','4784024iLsaMJ','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','_userService','replies','222LsUBed','_config','YYYY/MM/DD\x20HH:mm','Disposable','UniverThreadCommentUIPlugin','thread-comment-data-source.config','26844jFmzsV','OpenOrReOpen','deleteComment','add','parentId','11691470zHdpic','user','_commentService','/add','/reply','createTimestamp','type','get','/edit','error','merge','Unknown','_httpService','pipe','forEach','replyId','comments','onReady','Solved','Reply','customRanges','CustomRangeType','rangeType','delete','/solved','userID','UniverThreadCommentDataSourcePlugin','Solve','dataSource','size','addUser','/universer-api/comment/unit/','unitId','CommentService','_init','CollaborationSessionService','IConfigService','resolveComment','245elZGtc','disposeWithMe','Module','162638HPSwVV','onStarting','reply','filter','syncUpdateMutationToColla','requireSession','bufferTime','post','find','IThreadCommentDataSourceService','personId','values','_injector','Injector','parse','_threadCommentModel','Delete','97288MnfOPC','symbol','HTTPService','UNIVER_UNKNOWN','getUser','rangeId','6695586qMnnzu','map','getOwnPropertyDescriptor','getComment','Edit','Plugin','payload','Add','UniverCollaborationClientPlugin','24mCrGZJ','_sessionService','stringify','subscribe','root','solved','_configService','/list','body','userId','UniverInstanceType','_initDataSource','/delete','_threadCommentDataSourceService','Inject','UniverLicensePlugin','content','code','getUnit','UNRECOGNIZED','ref','COMMENT','dayjs','defineProperty','comment','getMemberID'];_0x36ef=function(){return _0x3c9d9a;};return _0x36ef();}function _0x162f(_0x3c6142,_0x4e33a5){const _0x36ef30=_0x36ef();return _0x162f=function(_0x162f09,_0x2ae1cc){_0x162f09=_0x162f09-0xec;let _0x4b73d9=_0x36ef30[_0x162f09];return _0x4b73d9;},_0x162f(_0x3c6142,_0x4e33a5);}let p=class{constructor(_0xa5e0f2,_0x1e6e78,_0x3cbb26){const _0x51a99d=_0x3d1cb3;this[_0x51a99d(0xf5)]=_0xa5e0f2,this[_0x51a99d(0x157)]=_0x1e6e78,this[_0x51a99d(0x133)]=_0x3cbb26;}async[_0x3d1cb3(0x14c)](_0x24795a){const _0x5adfea=_0x3d1cb3;var _0x2615d6,_0x93187b;const {parentId:_0x4c8173,unitId:_0x129334,text:_0x352261,threadId:_0x487527}=_0x24795a,_0x39beef=(_0x93187b=(_0x2615d6=_0x352261[_0x5adfea(0xfd)])==null?void 0x0:_0x2615d6[_0x5adfea(0x115)](_0x533b2e=>_0x533b2e[_0x5adfea(0xff)]===c[_0x5adfea(0xfe)][_0x5adfea(0x147)])[_0x5adfea(0x12a)](_0x3f90d6=>_0x3f90d6[_0x5adfea(0x128)]))!=null?_0x93187b:[],_0x50815a=JSON[_0x5adfea(0x134)](_0x352261),_0x376f90=(await this['_sessionService']['requireSession'](_0x129334))[_0x5adfea(0x14b)]();if(_0x4c8173){const _0x472861={'memberId':_0x376f90,'unitId':_0x129334,'content':_0x50815a,'mention':_0x39beef,'threadId':_0x487527},_0x589e19=(await this[_0x5adfea(0xf5)][_0x5adfea(0x119)](_0x5adfea(0x108)+_0x129334+_0x5adfea(0xed),{'body':_0x472861}))[_0x5adfea(0x13a)][_0x5adfea(0x114)];return{..._0x24795a,'id':_0x589e19[_0x5adfea(0xf8)],'dT':c['dayjs'](+_0x589e19[_0x5adfea(0xee)])['format'](_0x5adfea(0x15b)),'personId':_0x589e19[_0x5adfea(0x13b)]};}else{const _0xb0e7a2={'memberId':_0x376f90,'unitId':_0x129334,'content':_0x50815a,'mention':_0x39beef},_0x480f51=await this[_0x5adfea(0xf5)][_0x5adfea(0x119)](_0x5adfea(0x108)+_0x129334+_0x5adfea(0xec),{'body':_0xb0e7a2});return Y(_0x480f51[_0x5adfea(0x13a)][_0x5adfea(0x14a)],_0x24795a);}}async['updateComment'](_0x3ceabb){const _0xb6d5f2=_0x3d1cb3;var _0x29c203,_0x23ad8d;const {text:_0x436979,unitId:_0x101225}=_0x3ceabb,_0x21a5cf=(_0x23ad8d=(_0x29c203=_0x436979[_0xb6d5f2(0xfd)])==null?void 0x0:_0x29c203[_0xb6d5f2(0x115)](_0x19cb48=>_0x19cb48[_0xb6d5f2(0xff)]===c[_0xb6d5f2(0xfe)][_0xb6d5f2(0x147)])[_0xb6d5f2(0x12a)](_0x391d6a=>_0x391d6a[_0xb6d5f2(0x128)]))!=null?_0x23ad8d:[],_0x2b951a=JSON[_0xb6d5f2(0x134)](_0x436979),_0x3332c6=_0x3ceabb[_0xb6d5f2(0x14f)],_0x532f09=_0x3ceabb['id'],_0x4efe4f={'memberId':(await this[_0xb6d5f2(0x133)][_0xb6d5f2(0x117)](_0x101225))[_0xb6d5f2(0x14b)](),'unitId':_0x101225,'threadId':_0x3332c6,'mention':_0x21a5cf,'content':_0x2b951a,'replyId':_0x532f09},_0x941fc0=await this[_0xb6d5f2(0xf5)][_0xb6d5f2(0x119)]('/universer-api/comment/unit/'+_0x101225+_0xb6d5f2(0xf1),{'body':_0x4efe4f});return!_0x941fc0[_0xb6d5f2(0x13a)][_0xb6d5f2(0xf2)]||_0x941fc0['body'][_0xb6d5f2(0xf2)][_0xb6d5f2(0x143)]===0x1;}async[_0x3d1cb3(0x10e)](_0x46016c){const _0x2a0d83=_0x3d1cb3,{unitId:_0x533c5c}=_0x46016c,_0x28ec6c=_0x46016c[_0x2a0d83(0x14f)],_0x46ff12={'memberId':this[_0x2a0d83(0x157)]['getCurrentUser']()[_0x2a0d83(0x102)],'unitId':_0x533c5c,'threadId':_0x28ec6c,'solved':_0x46016c['resolved']?I[_0x2a0d83(0xfb)]:I[_0x2a0d83(0x160)]},_0x42d192=await this[_0x2a0d83(0xf5)][_0x2a0d83(0x119)](_0x2a0d83(0x108)+_0x533c5c+_0x2a0d83(0x101),{'body':_0x46ff12});return!_0x42d192[_0x2a0d83(0x13a)][_0x2a0d83(0xf2)]||_0x42d192[_0x2a0d83(0x13a)][_0x2a0d83(0xf2)][_0x2a0d83(0x143)]===0x1;}async[_0x3d1cb3(0x161)](_0x4505c6,_0x4e2f0d,_0x34d4f8,_0x3ed212){const _0x85e187=_0x3d1cb3,_0x4ffe7c={'memberId':(await this[_0x85e187(0x133)][_0x85e187(0x117)](_0x4505c6))['getMemberID'](),'threadId':_0x34d4f8,'replyId':_0x3ed212,'unitId':_0x4505c6},_0x25fc90=await this[_0x85e187(0xf5)][_0x85e187(0x119)](_0x85e187(0x108)+_0x4505c6+_0x85e187(0x13e),{'body':_0x4ffe7c});return!_0x25fc90[_0x85e187(0x13a)]['error']||_0x25fc90[_0x85e187(0x13a)]['error']['code']===0x1;}async['listComments'](_0x159242,_0xf2f98c,_0x5a965d){const _0x25cbe8=_0x3d1cb3,_0x477880={'unitId':_0x159242,'threadId':_0x5a965d},_0x246955=await this[_0x25cbe8(0xf5)][_0x25cbe8(0x119)](_0x25cbe8(0x108)+_0x159242+_0x25cbe8(0x139),{'body':_0x477880}),_0x2560d3=_0x5a965d[_0x25cbe8(0x12a)](_0x5247ab=>G(_0x246955[_0x25cbe8(0x13a)][_0x25cbe8(0xf9)][_0x5247ab],_0x159242,_0xf2f98c))[_0x25cbe8(0x115)](Boolean);return Object[_0x25cbe8(0x11d)](_0x246955[_0x25cbe8(0x13a)]['users'])['forEach'](_0xc41566=>{const _0x421c99=_0x25cbe8;this[_0x421c99(0x157)][_0x421c99(0x107)](_0xc41566);}),_0x2560d3;}['saveCommentToSnapshot'](_0x2efa2a){const _0x503eef=_0x3d1cb3;return{'id':_0x2efa2a['id'],'threadId':_0x2efa2a[_0x503eef(0x14f)],'ref':_0x2efa2a[_0x503eef(0x146)]};}};p=x([C(0x0,c['Inject'](P[_0x3d1cb3(0x125)])),C(0x1,c['Inject'](c[_0x3d1cb3(0x14e)])),C(0x2,c[_0x3d1cb3(0x140)](b[_0x3d1cb3(0x10c)]))],p);var H=Object[_0x3d1cb3(0x12b)],J=(_0x5f5a19,_0xd55c77,_0x2f1a38,_0x108508)=>{const _0x133254=_0x3d1cb3;for(var _0x56b9b7=_0x108508>0x1?void 0x0:_0x108508?H(_0xd55c77,_0x2f1a38):_0xd55c77,_0x5b5424=_0x5f5a19[_0x133254(0x14d)]-0x1,_0x4dd186;_0x5b5424>=0x0;_0x5b5424--)(_0x4dd186=_0x5f5a19[_0x5b5424])&&(_0x56b9b7=_0x4dd186(_0x56b9b7)||_0x56b9b7);return _0x56b9b7;},y=(_0x2864e7,_0x5bb18c)=>(_0x1dd44e,_0x41d0fc)=>_0x5bb18c(_0x1dd44e,_0x41d0fc,_0x2864e7);let g=class extends c[_0x3d1cb3(0x15c)]{constructor(_0x37ef8b,_0x5a8a8b){const _0x2dd21d=_0x3d1cb3;super(),this[_0x2dd21d(0x13f)]=_0x37ef8b,this['_threadCommentDataSource']=_0x5a8a8b,this[_0x2dd21d(0x13d)]();}['_initDataSource'](){const _0x2c13ee=_0x3d1cb3;this[_0x2c13ee(0x13f)][_0x2c13ee(0x105)]=this['_threadCommentDataSource'],this[_0x2c13ee(0x13f)][_0x2c13ee(0x116)]=!0x1;}};g=J([y(0x0,M[_0x3d1cb3(0x11b)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x3d1cb3(0x149)],L=Object[_0x3d1cb3(0x12b)],Z=(_0x4ece36,_0x1154c2,_0x4f7a17)=>_0x1154c2 in _0x4ece36?F(_0x4ece36,_0x1154c2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4f7a17}):_0x4ece36[_0x1154c2]=_0x4f7a17,W=(_0x499bf1,_0x1e6fad,_0x3ba502,_0x460ed9)=>{const _0xcfd447=_0x3d1cb3;for(var _0x7d3a09=_0x460ed9>0x1?void 0x0:_0x460ed9?L(_0x1e6fad,_0x3ba502):_0x1e6fad,_0x52d127=_0x499bf1[_0xcfd447(0x14d)]-0x1,_0x30f8ec;_0x52d127>=0x0;_0x52d127--)(_0x30f8ec=_0x499bf1[_0x52d127])&&(_0x7d3a09=_0x30f8ec(_0x7d3a09)||_0x7d3a09);return _0x7d3a09;},O=(_0xfa4d2f,_0x580417)=>(_0x11bfca,_0x4536ee)=>_0x580417(_0x11bfca,_0x4536ee,_0xfa4d2f),N=(_0x28fefe,_0x1fee87,_0x27b279)=>Z(_0x28fefe,typeof _0x1fee87!=_0x3d1cb3(0x124)?_0x1fee87+'':_0x1fee87,_0x27b279);exports[_0x3d1cb3(0x103)]=class extends c[_0x3d1cb3(0x12e)]{constructor(_0x49b38f=D,_0x392eb4,_0x4601f1){const _0x3fdfc2=_0x3d1cb3;super(),this[_0x3fdfc2(0x15a)]=_0x49b38f,this[_0x3fdfc2(0x11e)]=_0x392eb4,this[_0x3fdfc2(0x138)]=_0x4601f1;const {..._0x35f8ea}=c[_0x3fdfc2(0xf3)]({},D,this['_config']);this[_0x3fdfc2(0x138)]['setConfig'](q,_0x35f8ea);}[_0x3d1cb3(0x113)](){[[p],[g],[_]]['forEach'](_0x190f0c=>{const _0x1e3eb1=_0x162f;this['_injector'][_0x1e3eb1(0x162)](_0x190f0c);});}[_0x3d1cb3(0xfa)](){const _0x37131a=_0x3d1cb3;this[_0x37131a(0x11e)][_0x37131a(0xf0)](g),this[_0x37131a(0x11e)]['get'](_);}},N(exports[_0x3d1cb3(0x103)],'pluginName',U),N(exports[_0x3d1cb3(0x103)],_0x3d1cb3(0xef),c[_0x3d1cb3(0x13c)][_0x3d1cb3(0x126)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3d1cb3(0x151)](w[_0x3d1cb3(0x15d)],b[_0x3d1cb3(0x131)],T[_0x3d1cb3(0x141)]),O(0x1,c[_0x3d1cb3(0x140)](c[_0x3d1cb3(0x11f)])),O(0x2,c[_0x3d1cb3(0x10d)])],exports[_0x3d1cb3(0x103)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1654f6=_0x50e3;(function(_0x53c3ac,_0x583819){const _0xeaa62a=_0x50e3,_0x1be22b=_0x53c3ac();while(!![]){try{const _0x279cc6=parseInt(_0xeaa62a(0x1a4))/0x1+parseInt(_0xeaa62a(0x177))/0x2+-parseInt(_0xeaa62a(0x170))/0x3+-parseInt(_0xeaa62a(0x18a))/0x4*(-parseInt(_0xeaa62a(0x165))/0x5)+-parseInt(_0xeaa62a(0x1a6))/0x6+parseInt(_0xeaa62a(0x18f))/0x7*(-parseInt(_0xeaa62a(0x153))/0x8)+parseInt(_0xeaa62a(0x162))/0x9;if(_0x279cc6===_0x583819)break;else _0x1be22b['push'](_0x1be22b['shift']());}catch(_0x36b141){_0x1be22b['push'](_0x1be22b['shift']());}}}(_0x2e3d,0x6bf2b));import{CommentService as _0x21c8a1,CollaborationSessionService as _0x5cf12a,UniverCollaborationClientPlugin as _0xd71383}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1717b0}from'@univerjs-pro/license';import{dayjs as _0x5879de,UserManagerService as _0x5212c7,Inject as _0x57f171,Injector as _0x4d8ec4,Disposable as _0x141799,CustomRangeType as _0x5bccc8,UniverInstanceType as _0x339391,DependentOn as _0x4aa3bb,IConfigService as _0x3d9e11,Plugin as _0x146c0a,merge as _0x4677bf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4d6a33}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd0bbc7,IThreadCommentDataSourceService as _0x3d5f8a}from'@univerjs/thread-comment';function _0x2e3d(){const _0x2cfc57=['65GjZKiI','OpenOrReOpen','replyId','_commentService','onReady','deleteComment','resolved','user','parse','type','threadId','2450322nktakI','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','body','UNRECOGNIZED','_userService','1341780uCsgai','updateComment','parentId','_threadCommentDataSourceService','Solved','ref','comments','subscribe','solved','syncUpdateMutationToColla','_httpService','userId','/universer-api/comment/unit/','thread-comment-data-source.config','_sessionService','customRanges','root','commentUpdate$','_config','56012KYEXWB','_initDataSource','COMMENT','getMemberID','length','7qhKtSY','_threadCommentModel','onStarting','Unknown','format','Delete','getOwnPropertyDescriptor','dataSource','/edit','setConfig','add','_threadCommentDataSource','unitId','rangeType','find','disposeWithMe','payload','replies','addComment','content','addUser','349873oyKGNv','/add','3990582AOiUiZ','get','resolveComment','listComments','stringify','/list','_initUserSync','map','/delete','requireSession','YYYY/MM/DD\x20HH:mm','slice','forEach','_init','Add','1918168rzOSVJ','userID','getUnit','code','saveCommentToSnapshot','UNIVER_UNKNOWN','error','rangeId','getUser','Edit','_configService','_injector','getCurrentUser','values','post','8648955taJmED','Solve','filter'];_0x2e3d=function(){return _0x2cfc57;};return _0x2e3d();}import{bufferTime as _0x4d4422}from'rxjs';import{HTTPService as _0x201c5c}from'@univerjs/network';function _0x50e3(_0x49a090,_0x13c583){const _0x2e3d19=_0x2e3d();return _0x50e3=function(_0x50e3e6,_0x4440d1){_0x50e3e6=_0x50e3e6-0x153;let _0x490880=_0x2e3d19[_0x50e3e6];return _0x490880;},_0x50e3(_0x49a090,_0x13c583);}const W=_0x1654f6(0x172);var I=(_0x4be17b=>(_0x4be17b[_0x4be17b['OpenOrReOpen']=0x0]=_0x1654f6(0x166),_0x4be17b[_0x4be17b[_0x1654f6(0x17b)]=0x1]='Solved',_0x4be17b[_0x4be17b[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x4be17b))(I||{}),v=(_0x10b0b9=>(_0x10b0b9[_0x10b0b9[_0x1654f6(0x192)]=0x0]='Unknown',_0x10b0b9[_0x10b0b9['Add']=0x1]=_0x1654f6(0x1b4),_0x10b0b9[_0x10b0b9[_0x1654f6(0x173)]=0x2]=_0x1654f6(0x173),_0x10b0b9[_0x10b0b9[_0x1654f6(0x15c)]=0x3]=_0x1654f6(0x15c),_0x10b0b9[_0x10b0b9[_0x1654f6(0x194)]=0x4]='Delete',_0x10b0b9[_0x10b0b9[_0x1654f6(0x163)]=0x5]=_0x1654f6(0x163),_0x10b0b9[_0x10b0b9[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x10b0b9))(v||{});const y=_0x3fcad2=>_0x5879de(new Date(+_0x3fcad2))[_0x1654f6(0x193)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4dcf10,_0x4839be)=>{const _0x47f3e0=_0x1654f6,_0x22f65e=_0x4dcf10[_0x47f3e0(0x1a7)](_0x5212c7),_0x4b8bb0=_0x4dcf10[_0x47f3e0(0x1a7)](_0x201c5c);_0x4839be[_0x47f3e0(0x1b2)](_0x361dec=>{const _0x4c4e8=_0x47f3e0;_0x22f65e[_0x4c4e8(0x15b)](_0x361dec)&&_0x4839be['delete'](_0x361dec);}),_0x4839be['size']&&(await _0x4b8bb0[_0x47f3e0(0x1a7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4839be]}}))['body']['users'][_0x47f3e0(0x1b2)](_0x15d8ee=>{const _0x54230f=_0x47f3e0;_0x15d8ee&&_0x22f65e[_0x54230f(0x1a3)](_0x15d8ee);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x57327c,_0x17db6e,_0x144616,_0x12ce7a)=>{const _0x2bb1f3=_0x1654f6;for(var _0x2ddc0e=_0x12ce7a>0x1?void 0x0:_0x12ce7a?K(_0x17db6e,_0x144616):_0x17db6e,_0x49e2be=_0x57327c[_0x2bb1f3(0x18e)]-0x1,_0x351454;_0x49e2be>=0x0;_0x49e2be--)(_0x351454=_0x57327c[_0x49e2be])&&(_0x2ddc0e=_0x351454(_0x2ddc0e)||_0x2ddc0e);return _0x2ddc0e;},p=(_0x2c87de,_0x86ea50)=>(_0x42fcb3,_0xd20120)=>_0x86ea50(_0x42fcb3,_0xd20120,_0x2c87de);let _=class extends _0x141799{constructor(_0x3300ad,_0x5e15dc,_0x2dc805,_0x50f644){const _0x1cfcd5=_0x1654f6;super(),this[_0x1cfcd5(0x168)]=_0x3300ad,this[_0x1cfcd5(0x190)]=_0x5e15dc,this[_0x1cfcd5(0x176)]=_0x2dc805,this['_injector']=_0x50f644,this[_0x1cfcd5(0x1b3)](),this[_0x1cfcd5(0x1ac)]();}[_0x1654f6(0x1ac)](){const _0x7f1c24=_0x1654f6;this[_0x7f1c24(0x19e)](this['_threadCommentModel'][_0x7f1c24(0x188)]['pipe'](_0x4d4422(0x10))['subscribe'](_0x36c886=>{const _0x15750f=_0x7f1c24,_0x431e21=new Set();_0x36c886['forEach'](_0x489d9b=>{const _0x1f99b6=_0x50e3;switch(_0x489d9b['type']){case'add':{const _0x481590=_0x489d9b[_0x1f99b6(0x19f)]['personId'];_0x431e21[_0x1f99b6(0x199)](_0x481590);break;}}}),B(this[_0x15750f(0x15e)],_0x431e21);}));}['_init'](){const _0x377d54=_0x1654f6;this[_0x377d54(0x19e)](this[_0x377d54(0x168)]['commentUpdate$'][_0x377d54(0x17e)](async _0x4a1933=>{const _0x2b28f8=_0x377d54;var _0x4ab35e,_0x1e26fc,_0x461e0b,_0x24bb66;const _0x126e4c=(_0x4ab35e=this['_threadCommentModel']['getUnit'](_0x4a1933['unitId'])['find'](_0x49f2df=>_0x49f2df[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x4ab35e[_0x2b28f8(0x187)];if(!_0x126e4c)return;const {unitId:_0x1c9db1,subUnitId:_0x256ac5}=_0x126e4c;switch(_0x4a1933[_0x2b28f8(0x16c)]&&this[_0x2b28f8(0x176)][_0x2b28f8(0x1a3)](_0x4a1933[_0x2b28f8(0x16c)]),_0x4a1933[_0x2b28f8(0x16e)]){case v[_0x2b28f8(0x1b4)]:break;case v[_0x2b28f8(0x173)]:{this[_0x2b28f8(0x190)]['addComment'](_0x1c9db1,_0x256ac5,{'unitId':_0x1c9db1,'subUnitId':_0x256ac5,'ref':'','id':_0x4a1933[_0x2b28f8(0x167)],'dT':y(+_0x4a1933['createTimestamp']),'threadId':_0x4a1933[_0x2b28f8(0x16f)],'personId':(_0x461e0b=(_0x1e26fc=_0x4a1933['user'])==null?void 0x0:_0x1e26fc[_0x2b28f8(0x154)])!=null?_0x461e0b:_0x4a1933['userId'],'text':JSON[_0x2b28f8(0x16d)](_0x4a1933[_0x2b28f8(0x1a2)]),'parentId':_0x126e4c['id']});break;}case v[_0x2b28f8(0x194)]:{const _0xe2a6f3=this[_0x2b28f8(0x190)]['getComment'](_0x1c9db1,_0x256ac5,_0x4a1933[_0x2b28f8(0x167)]);_0xe2a6f3&&_0xe2a6f3[_0x2b28f8(0x179)]&&this[_0x2b28f8(0x190)][_0x2b28f8(0x16a)](_0x1c9db1,_0x256ac5,_0x4a1933['replyId']);break;}case v[_0x2b28f8(0x15c)]:{this[_0x2b28f8(0x190)][_0x2b28f8(0x178)](_0x1c9db1,_0x256ac5,{'commentId':_0x4a1933[_0x2b28f8(0x167)],'text':JSON['parse'](_0x4a1933[_0x2b28f8(0x1a2)])});break;}case v[_0x2b28f8(0x163)]:{const _0x1d6afa=(_0x24bb66=this[_0x2b28f8(0x190)][_0x2b28f8(0x155)](_0x4a1933[_0x2b28f8(0x19b)])[_0x2b28f8(0x19d)](_0x4752d6=>_0x4752d6[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x24bb66['root'];_0x1d6afa&&this['_threadCommentModel'][_0x2b28f8(0x1a8)](_0x1c9db1,_0x256ac5,_0x1d6afa['id'],_0x4a1933['solved']===I[_0x2b28f8(0x17b)]);break;}}}));}};_=V([p(0x0,_0x57f171(_0x21c8a1)),p(0x1,_0x57f171(_0xd0bbc7)),p(0x2,_0x57f171(_0x5212c7)),p(0x3,_0x57f171(_0x4d8ec4))],_);const z=_0x1654f6(0x184),O={};var k=Object[_0x1654f6(0x195)],Q=(_0x1943b1,_0x3a9f24,_0x2e6aa2,_0x2a8666)=>{const _0x2a3259=_0x1654f6;for(var _0x3d03ba=_0x2a8666>0x1?void 0x0:_0x2a8666?k(_0x3a9f24,_0x2e6aa2):_0x3a9f24,_0x3c0ad9=_0x1943b1[_0x2a3259(0x18e)]-0x1,_0x1a9562;_0x3c0ad9>=0x0;_0x3c0ad9--)(_0x1a9562=_0x1943b1[_0x3c0ad9])&&(_0x3d03ba=_0x1a9562(_0x3d03ba)||_0x3d03ba);return _0x3d03ba;},b=(_0x2d906e,_0x40354f)=>(_0x3fe29f,_0x4c0852)=>_0x40354f(_0x3fe29f,_0x4c0852,_0x2d906e);function X(_0x5573db,_0x191d8e){const _0x44bbd5=_0x1654f6,_0x389af4=_0x5573db[_0x44bbd5(0x1a0)][0x0];return{..._0x191d8e,'id':_0x389af4['replyId'],'resolved':_0x5573db[_0x44bbd5(0x17f)]===0x1,'dT':y(_0x389af4['createTimestamp']),'personId':_0x389af4[_0x44bbd5(0x182)],'threadId':_0x389af4[_0x44bbd5(0x16f)]};}function ee(_0x3fa525,_0x44496,_0x1db221){const _0x59a81a=_0x1654f6;var _0xdeacd7,_0x21ba3c;if(((_0x21ba3c=(_0xdeacd7=_0x3fa525==null?void 0x0:_0x3fa525[_0x59a81a(0x1a0)])==null?void 0x0:_0xdeacd7['length'])!=null?_0x21ba3c:0x0)>0x0){const _0x2609ed=(_0x2c18fa,_0x3c426b)=>({'id':_0x2c18fa[_0x59a81a(0x167)],'threadId':_0x2c18fa[_0x59a81a(0x16f)],'dT':y(_0x2c18fa['createTimestamp']),'personId':_0x2c18fa['userId'],'resolved':_0x3fa525[_0x59a81a(0x17f)]===I[_0x59a81a(0x17b)],'unitId':_0x44496,'subUnitId':_0x1db221,'text':JSON[_0x59a81a(0x16d)](_0x2c18fa[_0x59a81a(0x1a2)]),'parentId':_0x3c426b}),_0x32d122=_0x2609ed(_0x3fa525['replies'][0x0]);return{..._0x32d122,'children':_0x3fa525[_0x59a81a(0x1a0)][_0x59a81a(0x1b1)](0x1)[_0x59a81a(0x1ad)](_0x24fadf=>_0x2609ed(_0x24fadf,_0x32d122['id']))};}return null;}let S=class{constructor(_0x3d415f,_0x5d36e8,_0x3e71d0){const _0x29c780=_0x1654f6;this[_0x29c780(0x181)]=_0x3d415f,this[_0x29c780(0x176)]=_0x5d36e8,this[_0x29c780(0x185)]=_0x3e71d0;}async[_0x1654f6(0x1a1)](_0x109b31){const _0x2d4bbb=_0x1654f6;var _0x439cc8,_0x396137;const {parentId:_0x34d57e,unitId:_0x53925c,text:_0xde9c8e,threadId:_0x51018c}=_0x109b31,_0x3da9ff=(_0x396137=(_0x439cc8=_0xde9c8e[_0x2d4bbb(0x186)])==null?void 0x0:_0x439cc8[_0x2d4bbb(0x164)](_0x2416f0=>_0x2416f0[_0x2d4bbb(0x19c)]===_0x5bccc8[_0x2d4bbb(0x18c)])[_0x2d4bbb(0x1ad)](_0x142295=>_0x142295[_0x2d4bbb(0x15a)]))!=null?_0x396137:[],_0x4c05e8=JSON['stringify'](_0xde9c8e),_0x2e52e5=(await this[_0x2d4bbb(0x185)][_0x2d4bbb(0x1af)](_0x53925c))['getMemberID']();if(_0x34d57e){const _0x934fc9={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff,'threadId':_0x51018c},_0x46f0ae=(await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)](_0x2d4bbb(0x183)+_0x53925c+'/reply',{'body':_0x934fc9}))[_0x2d4bbb(0x174)]['reply'];return{..._0x109b31,'id':_0x46f0ae[_0x2d4bbb(0x167)],'dT':_0x5879de(+_0x46f0ae['createTimestamp'])[_0x2d4bbb(0x193)](_0x2d4bbb(0x1b0)),'personId':_0x46f0ae[_0x2d4bbb(0x182)]};}else{const _0x4b0150={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff},_0x5bafc4=await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)]('/universer-api/comment/unit/'+_0x53925c+_0x2d4bbb(0x1a5),{'body':_0x4b0150});return X(_0x5bafc4[_0x2d4bbb(0x174)]['comment'],_0x109b31);}}async['updateComment'](_0x451b78){const _0x344980=_0x1654f6;var _0x5a53ca,_0x14a9d0;const {text:_0x29f0cd,unitId:_0x378bfa}=_0x451b78,_0xebe613=(_0x14a9d0=(_0x5a53ca=_0x29f0cd[_0x344980(0x186)])==null?void 0x0:_0x5a53ca['filter'](_0x77597e=>_0x77597e['rangeType']===_0x5bccc8[_0x344980(0x18c)])['map'](_0x17d46c=>_0x17d46c[_0x344980(0x15a)]))!=null?_0x14a9d0:[],_0x4b9c40=JSON[_0x344980(0x1aa)](_0x29f0cd),_0x1feec1=_0x451b78['threadId'],_0x4bc086=_0x451b78['id'],_0x462c9d={'memberId':(await this[_0x344980(0x185)]['requireSession'](_0x378bfa))[_0x344980(0x18d)](),'unitId':_0x378bfa,'threadId':_0x1feec1,'mention':_0xebe613,'content':_0x4b9c40,'replyId':_0x4bc086},_0x2277e6=await this[_0x344980(0x181)][_0x344980(0x161)]('/universer-api/comment/unit/'+_0x378bfa+_0x344980(0x197),{'body':_0x462c9d});return!_0x2277e6['body'][_0x344980(0x159)]||_0x2277e6[_0x344980(0x174)][_0x344980(0x159)]['code']===0x1;}async['resolveComment'](_0x3f9edf){const _0x184c34=_0x1654f6,{unitId:_0x3b2e58}=_0x3f9edf,_0x231975=_0x3f9edf[_0x184c34(0x16f)],_0x341c41={'memberId':this[_0x184c34(0x176)][_0x184c34(0x15f)]()[_0x184c34(0x154)],'unitId':_0x3b2e58,'threadId':_0x231975,'solved':_0x3f9edf[_0x184c34(0x16b)]?I[_0x184c34(0x17b)]:I['OpenOrReOpen']},_0x275c85=await this[_0x184c34(0x181)]['post']('/universer-api/comment/unit/'+_0x3b2e58+_0x184c34(0x171),{'body':_0x341c41});return!_0x275c85[_0x184c34(0x174)]['error']||_0x275c85[_0x184c34(0x174)][_0x184c34(0x159)][_0x184c34(0x156)]===0x1;}async[_0x1654f6(0x16a)](_0x5a86cf,_0x26b9e7,_0x1abeff,_0xd126c6){const _0x2b667=_0x1654f6,_0x4ccfa5={'memberId':(await this['_sessionService'][_0x2b667(0x1af)](_0x5a86cf))['getMemberID'](),'threadId':_0x1abeff,'replyId':_0xd126c6,'unitId':_0x5a86cf},_0x1751a8=await this[_0x2b667(0x181)]['post'](_0x2b667(0x183)+_0x5a86cf+_0x2b667(0x1ae),{'body':_0x4ccfa5});return!_0x1751a8[_0x2b667(0x174)][_0x2b667(0x159)]||_0x1751a8['body']['error'][_0x2b667(0x156)]===0x1;}async[_0x1654f6(0x1a9)](_0x3c19fb,_0x3806de,_0xbd4dac){const _0xac09c8=_0x1654f6,_0x51c3f4={'unitId':_0x3c19fb,'threadId':_0xbd4dac},_0x14013f=await this[_0xac09c8(0x181)][_0xac09c8(0x161)](_0xac09c8(0x183)+_0x3c19fb+_0xac09c8(0x1ab),{'body':_0x51c3f4}),_0x5bcafe=_0xbd4dac[_0xac09c8(0x1ad)](_0x40c7cf=>ee(_0x14013f[_0xac09c8(0x174)][_0xac09c8(0x17d)][_0x40c7cf],_0x3c19fb,_0x3806de))['filter'](Boolean);return Object[_0xac09c8(0x160)](_0x14013f[_0xac09c8(0x174)]['users'])[_0xac09c8(0x1b2)](_0x54e425=>{const _0x3e8d2a=_0xac09c8;this['_userService'][_0x3e8d2a(0x1a3)](_0x54e425);}),_0x5bcafe;}[_0x1654f6(0x157)](_0x298a67){const _0x30c429=_0x1654f6;return{'id':_0x298a67['id'],'threadId':_0x298a67[_0x30c429(0x16f)],'ref':_0x298a67[_0x30c429(0x17c)]};}};S=Q([b(0x0,_0x57f171(_0x201c5c)),b(0x1,_0x57f171(_0x5212c7)),b(0x2,_0x57f171(_0x5cf12a))],S);var re=Object[_0x1654f6(0x195)],te=(_0x554c20,_0x5b9a43,_0x29b099,_0x403688)=>{const _0xd2dc28=_0x1654f6;for(var _0x34f861=_0x403688>0x1?void 0x0:_0x403688?re(_0x5b9a43,_0x29b099):_0x5b9a43,_0x5b6400=_0x554c20[_0xd2dc28(0x18e)]-0x1,_0x1781db;_0x5b6400>=0x0;_0x5b6400--)(_0x1781db=_0x554c20[_0x5b6400])&&(_0x34f861=_0x1781db(_0x34f861)||_0x34f861);return _0x34f861;},M=(_0xdfbe1,_0x5df061)=>(_0x11807e,_0x506eb2)=>_0x5df061(_0x11807e,_0x506eb2,_0xdfbe1);let f=class extends _0x141799{constructor(_0x3082d5,_0x32cb0e){const _0x3a5515=_0x1654f6;super(),this['_threadCommentDataSourceService']=_0x3082d5,this['_threadCommentDataSource']=_0x32cb0e,this[_0x3a5515(0x18b)]();}[_0x1654f6(0x18b)](){const _0x67f481=_0x1654f6;this[_0x67f481(0x17a)][_0x67f481(0x196)]=this[_0x67f481(0x19a)],this[_0x67f481(0x17a)][_0x67f481(0x180)]=!0x1;}};f=te([M(0x0,_0x3d5f8a),M(0x1,_0x57f171(S))],f);var se=Object['defineProperty'],oe=Object[_0x1654f6(0x195)],ne=(_0x544dac,_0x490b13,_0x11d8f4)=>_0x490b13 in _0x544dac?se(_0x544dac,_0x490b13,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11d8f4}):_0x544dac[_0x490b13]=_0x11d8f4,ie=(_0x3fbc4a,_0x51f5d6,_0x28d8cf,_0x4dce95)=>{for(var _0x3ff36a=_0x4dce95>0x1?void 0x0:_0x4dce95?oe(_0x51f5d6,_0x28d8cf):_0x51f5d6,_0x4cded3=_0x3fbc4a['length']-0x1,_0x3f0f5b;_0x4cded3>=0x0;_0x4cded3--)(_0x3f0f5b=_0x3fbc4a[_0x4cded3])&&(_0x3ff36a=_0x3f0f5b(_0x3ff36a)||_0x3ff36a);return _0x3ff36a;},N=(_0x5a1c09,_0x48d1e3)=>(_0x41a498,_0xaafe49)=>_0x48d1e3(_0x41a498,_0xaafe49,_0x5a1c09),$=(_0x3b9493,_0x4b78a5,_0x5eab98)=>ne(_0x3b9493,typeof _0x4b78a5!='symbol'?_0x4b78a5+'':_0x4b78a5,_0x5eab98);let g=class extends _0x146c0a{constructor(_0x4bb7f0=O,_0x5a7622,_0x2d7da7){const _0x47c73c=_0x1654f6;super(),this[_0x47c73c(0x189)]=_0x4bb7f0,this[_0x47c73c(0x15e)]=_0x5a7622,this[_0x47c73c(0x15d)]=_0x2d7da7;const {..._0x29ac18}=_0x4677bf({},O,this[_0x47c73c(0x189)]);this[_0x47c73c(0x15d)][_0x47c73c(0x198)](z,_0x29ac18);}[_0x1654f6(0x191)](){const _0x508150=_0x1654f6;[[S],[f],[_]][_0x508150(0x1b2)](_0x5a1af1=>{const _0x260fa7=_0x508150;this['_injector'][_0x260fa7(0x199)](_0x5a1af1);});}[_0x1654f6(0x169)](){const _0x5891d6=_0x1654f6;this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](f),this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](_);}};$(g,'pluginName',W),$(g,_0x1654f6(0x16e),_0x339391[_0x1654f6(0x158)]),g=ie([_0x4aa3bb(_0x4d6a33,_0xd71383,_0x1717b0),N(0x1,_0x57f171(_0x4d8ec4)),N(0x2,_0x3d9e11)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2b0436=_0xc8e3;(function(_0x16e5bb,_0x447792){const _0x1b6ead=_0xc8e3,_0x3c60bb=_0x16e5bb();while(!![]){try{const _0x24dbf4=-parseInt(_0x1b6ead(0x179))/0x1+parseInt(_0x1b6ead(0x142))/0x2*(parseInt(_0x1b6ead(0x139))/0x3)+parseInt(_0x1b6ead(0x18c))/0x4+-parseInt(_0x1b6ead(0x160))/0x5+parseInt(_0x1b6ead(0x154))/0x6*(parseInt(_0x1b6ead(0x181))/0x7)+parseInt(_0x1b6ead(0x129))/0x8*(-parseInt(_0x1b6ead(0x147))/0x9)+-parseInt(_0x1b6ead(0x17d))/0xa;if(_0x24dbf4===_0x447792)break;else _0x3c60bb['push'](_0x3c60bb['shift']());}catch(_0x3e3240){_0x3c60bb['push'](_0x3c60bb['shift']());}}}(_0x1d21,0x54fd9));import{CommentService as _0x991cb0,CollaborationSessionService as _0x1460d2,UniverCollaborationClientPlugin as _0x223e2c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4af8e4}from'@univerjs-pro/license';function _0x1d21(){const _0xcbdc39=['OpenOrReOpen','slice','comments','/edit','Solve','/solved','filter','body','_threadCommentDataSourceService','get','36AvhmKJ','deleteComment','size','error','/delete','_sessionService','dataSource','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','saveCommentToSnapshot','resolveComment','_threadCommentDataSource','1826075zUoCVk','_httpService','_init','Add','map','content','replies','post','userId','rangeId','find','Delete','unitId','comment','delete','updateComment','type','root','listComments','/reply','getMemberID','pluginName','userID','users','commentUpdate$','294842SuUSBg','threadId','solved','getComment','825700lPjMEW','thread-comment-data-source.config','stringify','format','477148kzezfO','_threadCommentModel','values','_config','reply','COMMENT','_injector','_commentService','subscribe','personId','replyId','947464xqFCDu','payload','_configService','disposeWithMe','add','syncUpdateMutationToColla','/list','24GYretu','getOwnPropertyDescriptor','symbol','createTimestamp','Edit','ref','requireSession','Reply','rangeType','onStarting','user','UNRECOGNIZED','_initUserSync','/add','defineProperty','parse','1987455gzDBMU','getUnit','UNIVER_UNKNOWN','addComment','length','_userService','resolved','code','Solved','2LFtNUC','_initDataSource','customRanges','setConfig','Unknown','652761fDeSyt','addUser','forEach'];_0x1d21=function(){return _0xcbdc39;};return _0x1d21();}import{dayjs as _0x5db2b3,UserManagerService as _0x657f0b,Inject as _0x256e66,Injector as _0x441339,Disposable as _0x1993b0,CustomRangeType as _0x1597cd,UniverInstanceType as _0x2f5e31,DependentOn as _0x334c07,IConfigService as _0x301fd5,Plugin as _0x590fd8,merge as _0x55235b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3534dc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x41a975,IThreadCommentDataSourceService as _0x4a6e49}from'@univerjs/thread-comment';import{bufferTime as _0x90f46a}from'rxjs';import{HTTPService as _0x470136}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2af9d0=>(_0x2af9d0[_0x2af9d0[_0x2b0436(0x14a)]=0x0]='OpenOrReOpen',_0x2af9d0[_0x2af9d0['Solved']=0x1]='Solved',_0x2af9d0[_0x2af9d0[_0x2b0436(0x134)]=-0x1]=_0x2b0436(0x134),_0x2af9d0))(I||{}),v=(_0x23ae31=>(_0x23ae31[_0x23ae31[_0x2b0436(0x146)]=0x0]=_0x2b0436(0x146),_0x23ae31[_0x23ae31[_0x2b0436(0x163)]=0x1]=_0x2b0436(0x163),_0x23ae31[_0x23ae31[_0x2b0436(0x130)]=0x2]=_0x2b0436(0x130),_0x23ae31[_0x23ae31[_0x2b0436(0x12d)]=0x3]=_0x2b0436(0x12d),_0x23ae31[_0x23ae31[_0x2b0436(0x16b)]=0x4]='Delete',_0x23ae31[_0x23ae31[_0x2b0436(0x14e)]=0x5]=_0x2b0436(0x14e),_0x23ae31[_0x23ae31[_0x2b0436(0x134)]=-0x1]='UNRECOGNIZED',_0x23ae31))(v||{});const y=_0x4fb873=>_0x5db2b3(new Date(+_0x4fb873))[_0x2b0436(0x180)](_0x2b0436(0x15b)),B=async(_0x347f33,_0xd62c3b)=>{const _0x9dc7c0=_0x2b0436,_0x362199=_0x347f33[_0x9dc7c0(0x153)](_0x657f0b),_0x36153e=_0x347f33['get'](_0x470136);_0xd62c3b[_0x9dc7c0(0x149)](_0x485677=>{const _0xcdb9d4=_0x9dc7c0;_0x362199['getUser'](_0x485677)&&_0xd62c3b[_0xcdb9d4(0x16e)](_0x485677);}),_0xd62c3b[_0x9dc7c0(0x156)]&&(await _0x36153e[_0x9dc7c0(0x153)]('/universer-api/user/list',{'params':{'userIDs':[..._0xd62c3b]}}))[_0x9dc7c0(0x151)][_0x9dc7c0(0x177)][_0x9dc7c0(0x149)](_0x512725=>{const _0x4c5cd4=_0x9dc7c0;_0x512725&&_0x362199[_0x4c5cd4(0x148)](_0x512725);});};var K=Object[_0x2b0436(0x12a)],V=(_0x500890,_0x1a555b,_0x4bf3f6,_0x6af989)=>{const _0x4469bb=_0x2b0436;for(var _0x1db3c1=_0x6af989>0x1?void 0x0:_0x6af989?K(_0x1a555b,_0x4bf3f6):_0x1a555b,_0x4fbd87=_0x500890[_0x4469bb(0x13d)]-0x1,_0x4f8213;_0x4fbd87>=0x0;_0x4fbd87--)(_0x4f8213=_0x500890[_0x4fbd87])&&(_0x1db3c1=_0x4f8213(_0x1db3c1)||_0x1db3c1);return _0x1db3c1;},p=(_0x4e4d31,_0x76a9d5)=>(_0x1153c6,_0x1fecc1)=>_0x76a9d5(_0x1153c6,_0x1fecc1,_0x4e4d31);let _=class extends _0x1993b0{constructor(_0x212a92,_0xe9cfd8,_0x2643e9,_0x324bb8){const _0x1cd8d0=_0x2b0436;super(),this[_0x1cd8d0(0x188)]=_0x212a92,this[_0x1cd8d0(0x182)]=_0xe9cfd8,this[_0x1cd8d0(0x13e)]=_0x2643e9,this[_0x1cd8d0(0x187)]=_0x324bb8,this[_0x1cd8d0(0x162)](),this['_initUserSync']();}[_0x2b0436(0x135)](){const _0x233fab=_0x2b0436;this[_0x233fab(0x18f)](this[_0x233fab(0x182)][_0x233fab(0x178)]['pipe'](_0x90f46a(0x10))[_0x233fab(0x189)](_0x1ea871=>{const _0x2a3b54=new Set();_0x1ea871['forEach'](_0x37b438=>{const _0x2c62b0=_0xc8e3;switch(_0x37b438[_0x2c62b0(0x170)]){case _0x2c62b0(0x190):{const _0x56e132=_0x37b438[_0x2c62b0(0x18d)][_0x2c62b0(0x18a)];_0x2a3b54[_0x2c62b0(0x190)](_0x56e132);break;}}}),B(this['_injector'],_0x2a3b54);}));}[_0x2b0436(0x162)](){const _0x31a7ef=_0x2b0436;this[_0x31a7ef(0x18f)](this[_0x31a7ef(0x188)]['commentUpdate$']['subscribe'](async _0x3e415f=>{const _0x6f73a8=_0x31a7ef;var _0x2ede99,_0x1a3736,_0x244842,_0x447ee1;const _0x4505a3=(_0x2ede99=this[_0x6f73a8(0x182)]['getUnit'](_0x3e415f[_0x6f73a8(0x16c)])[_0x6f73a8(0x16a)](_0x4ccaca=>_0x4ccaca[_0x6f73a8(0x17a)]===_0x3e415f['threadId']))==null?void 0x0:_0x2ede99[_0x6f73a8(0x171)];if(!_0x4505a3)return;const {unitId:_0x5cb90c,subUnitId:_0x2f5bfd}=_0x4505a3;switch(_0x3e415f[_0x6f73a8(0x133)]&&this[_0x6f73a8(0x13e)][_0x6f73a8(0x148)](_0x3e415f['user']),_0x3e415f[_0x6f73a8(0x170)]){case v[_0x6f73a8(0x163)]:break;case v[_0x6f73a8(0x130)]:{this[_0x6f73a8(0x182)][_0x6f73a8(0x13c)](_0x5cb90c,_0x2f5bfd,{'unitId':_0x5cb90c,'subUnitId':_0x2f5bfd,'ref':'','id':_0x3e415f[_0x6f73a8(0x18b)],'dT':y(+_0x3e415f[_0x6f73a8(0x12c)]),'threadId':_0x3e415f['threadId'],'personId':(_0x244842=(_0x1a3736=_0x3e415f[_0x6f73a8(0x133)])==null?void 0x0:_0x1a3736[_0x6f73a8(0x176)])!=null?_0x244842:_0x3e415f['userId'],'text':JSON['parse'](_0x3e415f[_0x6f73a8(0x165)]),'parentId':_0x4505a3['id']});break;}case v[_0x6f73a8(0x16b)]:{const _0x23ff9a=this[_0x6f73a8(0x182)][_0x6f73a8(0x17c)](_0x5cb90c,_0x2f5bfd,_0x3e415f[_0x6f73a8(0x18b)]);_0x23ff9a&&_0x23ff9a['parentId']&&this[_0x6f73a8(0x182)]['deleteComment'](_0x5cb90c,_0x2f5bfd,_0x3e415f[_0x6f73a8(0x18b)]);break;}case v[_0x6f73a8(0x12d)]:{this['_threadCommentModel'][_0x6f73a8(0x16f)](_0x5cb90c,_0x2f5bfd,{'commentId':_0x3e415f['replyId'],'text':JSON[_0x6f73a8(0x138)](_0x3e415f['content'])});break;}case v[_0x6f73a8(0x14e)]:{const _0x44311e=(_0x447ee1=this[_0x6f73a8(0x182)][_0x6f73a8(0x13a)](_0x3e415f['unitId'])[_0x6f73a8(0x16a)](_0x2a0086=>_0x2a0086[_0x6f73a8(0x17a)]===_0x3e415f[_0x6f73a8(0x17a)]))==null?void 0x0:_0x447ee1[_0x6f73a8(0x171)];_0x44311e&&this[_0x6f73a8(0x182)][_0x6f73a8(0x15e)](_0x5cb90c,_0x2f5bfd,_0x44311e['id'],_0x3e415f[_0x6f73a8(0x17b)]===I[_0x6f73a8(0x141)]);break;}}}));}};_=V([p(0x0,_0x256e66(_0x991cb0)),p(0x1,_0x256e66(_0x41a975)),p(0x2,_0x256e66(_0x657f0b)),p(0x3,_0x256e66(_0x441339))],_);const z=_0x2b0436(0x17e),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2b3b84,_0xf83558,_0x38cd5c,_0x411195)=>{const _0x230d1a=_0x2b0436;for(var _0xbd4ef2=_0x411195>0x1?void 0x0:_0x411195?k(_0xf83558,_0x38cd5c):_0xf83558,_0x322620=_0x2b3b84[_0x230d1a(0x13d)]-0x1,_0x25b883;_0x322620>=0x0;_0x322620--)(_0x25b883=_0x2b3b84[_0x322620])&&(_0xbd4ef2=_0x25b883(_0xbd4ef2)||_0xbd4ef2);return _0xbd4ef2;},b=(_0x149b90,_0x202303)=>(_0x472de8,_0x1138c0)=>_0x202303(_0x472de8,_0x1138c0,_0x149b90);function X(_0x441bdf,_0x328fcd){const _0x18f605=_0x2b0436,_0x307768=_0x441bdf['replies'][0x0];return{..._0x328fcd,'id':_0x307768[_0x18f605(0x18b)],'resolved':_0x441bdf[_0x18f605(0x17b)]===0x1,'dT':y(_0x307768[_0x18f605(0x12c)]),'personId':_0x307768[_0x18f605(0x168)],'threadId':_0x307768['threadId']};}function ee(_0x1ad05c,_0x5113bb,_0x2a01b9){const _0x4e28aa=_0x2b0436;var _0x5d54d4,_0x2b194d;if(((_0x2b194d=(_0x5d54d4=_0x1ad05c==null?void 0x0:_0x1ad05c[_0x4e28aa(0x166)])==null?void 0x0:_0x5d54d4[_0x4e28aa(0x13d)])!=null?_0x2b194d:0x0)>0x0){const _0x3be5c3=(_0x11923d,_0x425bcd)=>({'id':_0x11923d[_0x4e28aa(0x18b)],'threadId':_0x11923d[_0x4e28aa(0x17a)],'dT':y(_0x11923d[_0x4e28aa(0x12c)]),'personId':_0x11923d[_0x4e28aa(0x168)],'resolved':_0x1ad05c[_0x4e28aa(0x17b)]===I['Solved'],'unitId':_0x5113bb,'subUnitId':_0x2a01b9,'text':JSON[_0x4e28aa(0x138)](_0x11923d[_0x4e28aa(0x165)]),'parentId':_0x425bcd}),_0xc9909d=_0x3be5c3(_0x1ad05c[_0x4e28aa(0x166)][0x0]);return{..._0xc9909d,'children':_0x1ad05c['replies'][_0x4e28aa(0x14b)](0x1)[_0x4e28aa(0x164)](_0x19cfb4=>_0x3be5c3(_0x19cfb4,_0xc9909d['id']))};}return null;}let S=class{constructor(_0x3243fe,_0x21058f,_0x34d045){const _0x17862c=_0x2b0436;this[_0x17862c(0x161)]=_0x3243fe,this['_userService']=_0x21058f,this[_0x17862c(0x159)]=_0x34d045;}async['addComment'](_0x539578){const _0x201c49=_0x2b0436;var _0x41bdf8,_0x368b70;const {parentId:_0x555701,unitId:_0x519995,text:_0x39dbd6,threadId:_0x4d457d}=_0x539578,_0x9009ec=(_0x368b70=(_0x41bdf8=_0x39dbd6[_0x201c49(0x144)])==null?void 0x0:_0x41bdf8['filter'](_0xf339c1=>_0xf339c1[_0x201c49(0x131)]===_0x1597cd[_0x201c49(0x186)])[_0x201c49(0x164)](_0xcfb890=>_0xcfb890[_0x201c49(0x169)]))!=null?_0x368b70:[],_0xc6c08c=JSON['stringify'](_0x39dbd6),_0x5cb2ed=(await this['_sessionService']['requireSession'](_0x519995))[_0x201c49(0x174)]();if(_0x555701){const _0x5b4ac7={'memberId':_0x5cb2ed,'unitId':_0x519995,'content':_0xc6c08c,'mention':_0x9009ec,'threadId':_0x4d457d},_0x483d8e=(await this['_httpService']['post'](_0x201c49(0x15c)+_0x519995+_0x201c49(0x173),{'body':_0x5b4ac7}))[_0x201c49(0x151)][_0x201c49(0x185)];return{..._0x539578,'id':_0x483d8e['replyId'],'dT':_0x5db2b3(+_0x483d8e['createTimestamp'])['format'](_0x201c49(0x15b)),'personId':_0x483d8e['userId']};}else{const _0x4a4631={'memberId':_0x5cb2ed,'unitId':_0x519995,'content':_0xc6c08c,'mention':_0x9009ec},_0x3dbdf7=await this['_httpService'][_0x201c49(0x167)](_0x201c49(0x15c)+_0x519995+_0x201c49(0x136),{'body':_0x4a4631});return X(_0x3dbdf7['body'][_0x201c49(0x16d)],_0x539578);}}async[_0x2b0436(0x16f)](_0x1b2456){const _0x160746=_0x2b0436;var _0xe646fb,_0x1d0765;const {text:_0x711873,unitId:_0x217cc9}=_0x1b2456,_0x17e98b=(_0x1d0765=(_0xe646fb=_0x711873['customRanges'])==null?void 0x0:_0xe646fb[_0x160746(0x150)](_0xb6f9eb=>_0xb6f9eb[_0x160746(0x131)]===_0x1597cd[_0x160746(0x186)])[_0x160746(0x164)](_0x2b7a33=>_0x2b7a33['rangeId']))!=null?_0x1d0765:[],_0xba9bc4=JSON[_0x160746(0x17f)](_0x711873),_0x301ba0=_0x1b2456[_0x160746(0x17a)],_0x30069e=_0x1b2456['id'],_0xa940c3={'memberId':(await this[_0x160746(0x159)]['requireSession'](_0x217cc9))['getMemberID'](),'unitId':_0x217cc9,'threadId':_0x301ba0,'mention':_0x17e98b,'content':_0xba9bc4,'replyId':_0x30069e},_0x223150=await this[_0x160746(0x161)][_0x160746(0x167)]('/universer-api/comment/unit/'+_0x217cc9+_0x160746(0x14d),{'body':_0xa940c3});return!_0x223150['body'][_0x160746(0x157)]||_0x223150[_0x160746(0x151)][_0x160746(0x157)][_0x160746(0x140)]===0x1;}async[_0x2b0436(0x15e)](_0x5320ea){const _0x2dfc66=_0x2b0436,{unitId:_0x2db037}=_0x5320ea,_0x298e10=_0x5320ea[_0x2dfc66(0x17a)],_0x2f7b03={'memberId':this[_0x2dfc66(0x13e)]['getCurrentUser']()[_0x2dfc66(0x176)],'unitId':_0x2db037,'threadId':_0x298e10,'solved':_0x5320ea[_0x2dfc66(0x13f)]?I['Solved']:I[_0x2dfc66(0x14a)]},_0x249429=await this[_0x2dfc66(0x161)][_0x2dfc66(0x167)](_0x2dfc66(0x15c)+_0x2db037+_0x2dfc66(0x14f),{'body':_0x2f7b03});return!_0x249429[_0x2dfc66(0x151)][_0x2dfc66(0x157)]||_0x249429['body']['error'][_0x2dfc66(0x140)]===0x1;}async[_0x2b0436(0x155)](_0x184aa4,_0x2af81f,_0x52c7e3,_0x4a5d83){const _0x37d14=_0x2b0436,_0x393da5={'memberId':(await this[_0x37d14(0x159)][_0x37d14(0x12f)](_0x184aa4))[_0x37d14(0x174)](),'threadId':_0x52c7e3,'replyId':_0x4a5d83,'unitId':_0x184aa4},_0x5abe69=await this[_0x37d14(0x161)]['post'](_0x37d14(0x15c)+_0x184aa4+_0x37d14(0x158),{'body':_0x393da5});return!_0x5abe69[_0x37d14(0x151)]['error']||_0x5abe69['body'][_0x37d14(0x157)][_0x37d14(0x140)]===0x1;}async[_0x2b0436(0x172)](_0x21e836,_0x51d8df,_0x5ba0ed){const _0x2f1c2e=_0x2b0436,_0x37b84b={'unitId':_0x21e836,'threadId':_0x5ba0ed},_0x4c2401=await this[_0x2f1c2e(0x161)]['post'](_0x2f1c2e(0x15c)+_0x21e836+_0x2f1c2e(0x128),{'body':_0x37b84b}),_0x11d821=_0x5ba0ed[_0x2f1c2e(0x164)](_0x3ad42f=>ee(_0x4c2401[_0x2f1c2e(0x151)][_0x2f1c2e(0x14c)][_0x3ad42f],_0x21e836,_0x51d8df))[_0x2f1c2e(0x150)](Boolean);return Object[_0x2f1c2e(0x183)](_0x4c2401[_0x2f1c2e(0x151)]['users'])['forEach'](_0x2cb371=>{const _0x3ef8e9=_0x2f1c2e;this['_userService'][_0x3ef8e9(0x148)](_0x2cb371);}),_0x11d821;}[_0x2b0436(0x15d)](_0x2a2ad7){const _0x10c250=_0x2b0436;return{'id':_0x2a2ad7['id'],'threadId':_0x2a2ad7[_0x10c250(0x17a)],'ref':_0x2a2ad7[_0x10c250(0x12e)]};}};S=Q([b(0x0,_0x256e66(_0x470136)),b(0x1,_0x256e66(_0x657f0b)),b(0x2,_0x256e66(_0x1460d2))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x35b9ce,_0x2d3aae,_0x5724fa,_0x1794f8)=>{const _0x11a303=_0x2b0436;for(var _0x44e503=_0x1794f8>0x1?void 0x0:_0x1794f8?re(_0x2d3aae,_0x5724fa):_0x2d3aae,_0x111269=_0x35b9ce[_0x11a303(0x13d)]-0x1,_0x3bb394;_0x111269>=0x0;_0x111269--)(_0x3bb394=_0x35b9ce[_0x111269])&&(_0x44e503=_0x3bb394(_0x44e503)||_0x44e503);return _0x44e503;},M=(_0x3aafd9,_0x44545d)=>(_0x5c1210,_0x2d4e06)=>_0x44545d(_0x5c1210,_0x2d4e06,_0x3aafd9);let f=class extends _0x1993b0{constructor(_0x2266e1,_0x553f0f){const _0x5e9e03=_0x2b0436;super(),this[_0x5e9e03(0x152)]=_0x2266e1,this[_0x5e9e03(0x15f)]=_0x553f0f,this['_initDataSource']();}[_0x2b0436(0x143)](){const _0x37909f=_0x2b0436;this['_threadCommentDataSourceService'][_0x37909f(0x15a)]=this['_threadCommentDataSource'],this[_0x37909f(0x152)][_0x37909f(0x127)]=!0x1;}};function _0xc8e3(_0x2f2f9a,_0x4f7f83){const _0x1d21a6=_0x1d21();return _0xc8e3=function(_0xc8e35b,_0x3a9f83){_0xc8e35b=_0xc8e35b-0x127;let _0x415b57=_0x1d21a6[_0xc8e35b];return _0x415b57;},_0xc8e3(_0x2f2f9a,_0x4f7f83);}f=te([M(0x0,_0x4a6e49),M(0x1,_0x256e66(S))],f);var se=Object[_0x2b0436(0x137)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1658c2,_0x1bbb99,_0x15875a)=>_0x1bbb99 in _0x1658c2?se(_0x1658c2,_0x1bbb99,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15875a}):_0x1658c2[_0x1bbb99]=_0x15875a,ie=(_0x40961c,_0x533dc2,_0x3047e2,_0x1df943)=>{for(var _0x215eda=_0x1df943>0x1?void 0x0:_0x1df943?oe(_0x533dc2,_0x3047e2):_0x533dc2,_0x5c1814=_0x40961c['length']-0x1,_0x591582;_0x5c1814>=0x0;_0x5c1814--)(_0x591582=_0x40961c[_0x5c1814])&&(_0x215eda=_0x591582(_0x215eda)||_0x215eda);return _0x215eda;},N=(_0x3fc88f,_0x2e9de7)=>(_0xe7d04e,_0x228ba4)=>_0x2e9de7(_0xe7d04e,_0x228ba4,_0x3fc88f),$=(_0x4b6f69,_0x34ff30,_0x328d8f)=>ne(_0x4b6f69,typeof _0x34ff30!=_0x2b0436(0x12b)?_0x34ff30+'':_0x34ff30,_0x328d8f);let g=class extends _0x590fd8{constructor(_0x4244d2=O,_0x932b40,_0x145a0f){const _0x22973d=_0x2b0436;super(),this[_0x22973d(0x184)]=_0x4244d2,this[_0x22973d(0x187)]=_0x932b40,this[_0x22973d(0x18e)]=_0x145a0f;const {..._0xdc8f84}=_0x55235b({},O,this[_0x22973d(0x184)]);this[_0x22973d(0x18e)][_0x22973d(0x145)](z,_0xdc8f84);}[_0x2b0436(0x132)](){[[S],[f],[_]]['forEach'](_0x3e516c=>{const _0x561815=_0xc8e3;this['_injector'][_0x561815(0x190)](_0x3e516c);});}['onReady'](){const _0x9d10c0=_0x2b0436;this[_0x9d10c0(0x187)][_0x9d10c0(0x153)](f),this[_0x9d10c0(0x187)][_0x9d10c0(0x153)](_);}};$(g,_0x2b0436(0x175),W),$(g,_0x2b0436(0x170),_0x2f5e31[_0x2b0436(0x13b)]),g=ie([_0x334c07(_0x3534dc,_0x223e2c,_0x4af8e4),N(0x1,_0x256e66(_0x441339)),N(0x2,_0x301fd5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1654f6=_0x50e3;(function(_0x53c3ac,_0x583819){const _0xeaa62a=_0x50e3,_0x1be22b=_0x53c3ac();while(!![]){try{const _0x279cc6=parseInt(_0xeaa62a(0x1a4))/0x1+parseInt(_0xeaa62a(0x177))/0x2+-parseInt(_0xeaa62a(0x170))/0x3+-parseInt(_0xeaa62a(0x18a))/0x4*(-parseInt(_0xeaa62a(0x165))/0x5)+-parseInt(_0xeaa62a(0x1a6))/0x6+parseInt(_0xeaa62a(0x18f))/0x7*(-parseInt(_0xeaa62a(0x153))/0x8)+parseInt(_0xeaa62a(0x162))/0x9;if(_0x279cc6===_0x583819)break;else _0x1be22b['push'](_0x1be22b['shift']());}catch(_0x36b141){_0x1be22b['push'](_0x1be22b['shift']());}}}(_0x2e3d,0x6bf2b));import{CommentService as _0x21c8a1,CollaborationSessionService as _0x5cf12a,UniverCollaborationClientPlugin as _0xd71383}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1717b0}from'@univerjs-pro/license';import{dayjs as _0x5879de,UserManagerService as _0x5212c7,Inject as _0x57f171,Injector as _0x4d8ec4,Disposable as _0x141799,CustomRangeType as _0x5bccc8,UniverInstanceType as _0x339391,DependentOn as _0x4aa3bb,IConfigService as _0x3d9e11,Plugin as _0x146c0a,merge as _0x4677bf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4d6a33}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd0bbc7,IThreadCommentDataSourceService as _0x3d5f8a}from'@univerjs/thread-comment';function _0x2e3d(){const _0x2cfc57=['65GjZKiI','OpenOrReOpen','replyId','_commentService','onReady','deleteComment','resolved','user','parse','type','threadId','2450322nktakI','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','body','UNRECOGNIZED','_userService','1341780uCsgai','updateComment','parentId','_threadCommentDataSourceService','Solved','ref','comments','subscribe','solved','syncUpdateMutationToColla','_httpService','userId','/universer-api/comment/unit/','thread-comment-data-source.config','_sessionService','customRanges','root','commentUpdate$','_config','56012KYEXWB','_initDataSource','COMMENT','getMemberID','length','7qhKtSY','_threadCommentModel','onStarting','Unknown','format','Delete','getOwnPropertyDescriptor','dataSource','/edit','setConfig','add','_threadCommentDataSource','unitId','rangeType','find','disposeWithMe','payload','replies','addComment','content','addUser','349873oyKGNv','/add','3990582AOiUiZ','get','resolveComment','listComments','stringify','/list','_initUserSync','map','/delete','requireSession','YYYY/MM/DD\x20HH:mm','slice','forEach','_init','Add','1918168rzOSVJ','userID','getUnit','code','saveCommentToSnapshot','UNIVER_UNKNOWN','error','rangeId','getUser','Edit','_configService','_injector','getCurrentUser','values','post','8648955taJmED','Solve','filter'];_0x2e3d=function(){return _0x2cfc57;};return _0x2e3d();}import{bufferTime as _0x4d4422}from'rxjs';import{HTTPService as _0x201c5c}from'@univerjs/network';function _0x50e3(_0x49a090,_0x13c583){const _0x2e3d19=_0x2e3d();return _0x50e3=function(_0x50e3e6,_0x4440d1){_0x50e3e6=_0x50e3e6-0x153;let _0x490880=_0x2e3d19[_0x50e3e6];return _0x490880;},_0x50e3(_0x49a090,_0x13c583);}const W=_0x1654f6(0x172);var I=(_0x4be17b=>(_0x4be17b[_0x4be17b['OpenOrReOpen']=0x0]=_0x1654f6(0x166),_0x4be17b[_0x4be17b[_0x1654f6(0x17b)]=0x1]='Solved',_0x4be17b[_0x4be17b[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x4be17b))(I||{}),v=(_0x10b0b9=>(_0x10b0b9[_0x10b0b9[_0x1654f6(0x192)]=0x0]='Unknown',_0x10b0b9[_0x10b0b9['Add']=0x1]=_0x1654f6(0x1b4),_0x10b0b9[_0x10b0b9[_0x1654f6(0x173)]=0x2]=_0x1654f6(0x173),_0x10b0b9[_0x10b0b9[_0x1654f6(0x15c)]=0x3]=_0x1654f6(0x15c),_0x10b0b9[_0x10b0b9[_0x1654f6(0x194)]=0x4]='Delete',_0x10b0b9[_0x10b0b9[_0x1654f6(0x163)]=0x5]=_0x1654f6(0x163),_0x10b0b9[_0x10b0b9[_0x1654f6(0x175)]=-0x1]=_0x1654f6(0x175),_0x10b0b9))(v||{});const y=_0x3fcad2=>_0x5879de(new Date(+_0x3fcad2))[_0x1654f6(0x193)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4dcf10,_0x4839be)=>{const _0x47f3e0=_0x1654f6,_0x22f65e=_0x4dcf10[_0x47f3e0(0x1a7)](_0x5212c7),_0x4b8bb0=_0x4dcf10[_0x47f3e0(0x1a7)](_0x201c5c);_0x4839be[_0x47f3e0(0x1b2)](_0x361dec=>{const _0x4c4e8=_0x47f3e0;_0x22f65e[_0x4c4e8(0x15b)](_0x361dec)&&_0x4839be['delete'](_0x361dec);}),_0x4839be['size']&&(await _0x4b8bb0[_0x47f3e0(0x1a7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4839be]}}))['body']['users'][_0x47f3e0(0x1b2)](_0x15d8ee=>{const _0x54230f=_0x47f3e0;_0x15d8ee&&_0x22f65e[_0x54230f(0x1a3)](_0x15d8ee);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x57327c,_0x17db6e,_0x144616,_0x12ce7a)=>{const _0x2bb1f3=_0x1654f6;for(var _0x2ddc0e=_0x12ce7a>0x1?void 0x0:_0x12ce7a?K(_0x17db6e,_0x144616):_0x17db6e,_0x49e2be=_0x57327c[_0x2bb1f3(0x18e)]-0x1,_0x351454;_0x49e2be>=0x0;_0x49e2be--)(_0x351454=_0x57327c[_0x49e2be])&&(_0x2ddc0e=_0x351454(_0x2ddc0e)||_0x2ddc0e);return _0x2ddc0e;},p=(_0x2c87de,_0x86ea50)=>(_0x42fcb3,_0xd20120)=>_0x86ea50(_0x42fcb3,_0xd20120,_0x2c87de);let _=class extends _0x141799{constructor(_0x3300ad,_0x5e15dc,_0x2dc805,_0x50f644){const _0x1cfcd5=_0x1654f6;super(),this[_0x1cfcd5(0x168)]=_0x3300ad,this[_0x1cfcd5(0x190)]=_0x5e15dc,this[_0x1cfcd5(0x176)]=_0x2dc805,this['_injector']=_0x50f644,this[_0x1cfcd5(0x1b3)](),this[_0x1cfcd5(0x1ac)]();}[_0x1654f6(0x1ac)](){const _0x7f1c24=_0x1654f6;this[_0x7f1c24(0x19e)](this['_threadCommentModel'][_0x7f1c24(0x188)]['pipe'](_0x4d4422(0x10))['subscribe'](_0x36c886=>{const _0x15750f=_0x7f1c24,_0x431e21=new Set();_0x36c886['forEach'](_0x489d9b=>{const _0x1f99b6=_0x50e3;switch(_0x489d9b['type']){case'add':{const _0x481590=_0x489d9b[_0x1f99b6(0x19f)]['personId'];_0x431e21[_0x1f99b6(0x199)](_0x481590);break;}}}),B(this[_0x15750f(0x15e)],_0x431e21);}));}['_init'](){const _0x377d54=_0x1654f6;this[_0x377d54(0x19e)](this[_0x377d54(0x168)]['commentUpdate$'][_0x377d54(0x17e)](async _0x4a1933=>{const _0x2b28f8=_0x377d54;var _0x4ab35e,_0x1e26fc,_0x461e0b,_0x24bb66;const _0x126e4c=(_0x4ab35e=this['_threadCommentModel']['getUnit'](_0x4a1933['unitId'])['find'](_0x49f2df=>_0x49f2df[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x4ab35e[_0x2b28f8(0x187)];if(!_0x126e4c)return;const {unitId:_0x1c9db1,subUnitId:_0x256ac5}=_0x126e4c;switch(_0x4a1933[_0x2b28f8(0x16c)]&&this[_0x2b28f8(0x176)][_0x2b28f8(0x1a3)](_0x4a1933[_0x2b28f8(0x16c)]),_0x4a1933[_0x2b28f8(0x16e)]){case v[_0x2b28f8(0x1b4)]:break;case v[_0x2b28f8(0x173)]:{this[_0x2b28f8(0x190)]['addComment'](_0x1c9db1,_0x256ac5,{'unitId':_0x1c9db1,'subUnitId':_0x256ac5,'ref':'','id':_0x4a1933[_0x2b28f8(0x167)],'dT':y(+_0x4a1933['createTimestamp']),'threadId':_0x4a1933[_0x2b28f8(0x16f)],'personId':(_0x461e0b=(_0x1e26fc=_0x4a1933['user'])==null?void 0x0:_0x1e26fc[_0x2b28f8(0x154)])!=null?_0x461e0b:_0x4a1933['userId'],'text':JSON[_0x2b28f8(0x16d)](_0x4a1933[_0x2b28f8(0x1a2)]),'parentId':_0x126e4c['id']});break;}case v[_0x2b28f8(0x194)]:{const _0xe2a6f3=this[_0x2b28f8(0x190)]['getComment'](_0x1c9db1,_0x256ac5,_0x4a1933[_0x2b28f8(0x167)]);_0xe2a6f3&&_0xe2a6f3[_0x2b28f8(0x179)]&&this[_0x2b28f8(0x190)][_0x2b28f8(0x16a)](_0x1c9db1,_0x256ac5,_0x4a1933['replyId']);break;}case v[_0x2b28f8(0x15c)]:{this[_0x2b28f8(0x190)][_0x2b28f8(0x178)](_0x1c9db1,_0x256ac5,{'commentId':_0x4a1933[_0x2b28f8(0x167)],'text':JSON['parse'](_0x4a1933[_0x2b28f8(0x1a2)])});break;}case v[_0x2b28f8(0x163)]:{const _0x1d6afa=(_0x24bb66=this[_0x2b28f8(0x190)][_0x2b28f8(0x155)](_0x4a1933[_0x2b28f8(0x19b)])[_0x2b28f8(0x19d)](_0x4752d6=>_0x4752d6[_0x2b28f8(0x16f)]===_0x4a1933[_0x2b28f8(0x16f)]))==null?void 0x0:_0x24bb66['root'];_0x1d6afa&&this['_threadCommentModel'][_0x2b28f8(0x1a8)](_0x1c9db1,_0x256ac5,_0x1d6afa['id'],_0x4a1933['solved']===I[_0x2b28f8(0x17b)]);break;}}}));}};_=V([p(0x0,_0x57f171(_0x21c8a1)),p(0x1,_0x57f171(_0xd0bbc7)),p(0x2,_0x57f171(_0x5212c7)),p(0x3,_0x57f171(_0x4d8ec4))],_);const z=_0x1654f6(0x184),O={};var k=Object[_0x1654f6(0x195)],Q=(_0x1943b1,_0x3a9f24,_0x2e6aa2,_0x2a8666)=>{const _0x2a3259=_0x1654f6;for(var _0x3d03ba=_0x2a8666>0x1?void 0x0:_0x2a8666?k(_0x3a9f24,_0x2e6aa2):_0x3a9f24,_0x3c0ad9=_0x1943b1[_0x2a3259(0x18e)]-0x1,_0x1a9562;_0x3c0ad9>=0x0;_0x3c0ad9--)(_0x1a9562=_0x1943b1[_0x3c0ad9])&&(_0x3d03ba=_0x1a9562(_0x3d03ba)||_0x3d03ba);return _0x3d03ba;},b=(_0x2d906e,_0x40354f)=>(_0x3fe29f,_0x4c0852)=>_0x40354f(_0x3fe29f,_0x4c0852,_0x2d906e);function X(_0x5573db,_0x191d8e){const _0x44bbd5=_0x1654f6,_0x389af4=_0x5573db[_0x44bbd5(0x1a0)][0x0];return{..._0x191d8e,'id':_0x389af4['replyId'],'resolved':_0x5573db[_0x44bbd5(0x17f)]===0x1,'dT':y(_0x389af4['createTimestamp']),'personId':_0x389af4[_0x44bbd5(0x182)],'threadId':_0x389af4[_0x44bbd5(0x16f)]};}function ee(_0x3fa525,_0x44496,_0x1db221){const _0x59a81a=_0x1654f6;var _0xdeacd7,_0x21ba3c;if(((_0x21ba3c=(_0xdeacd7=_0x3fa525==null?void 0x0:_0x3fa525[_0x59a81a(0x1a0)])==null?void 0x0:_0xdeacd7['length'])!=null?_0x21ba3c:0x0)>0x0){const _0x2609ed=(_0x2c18fa,_0x3c426b)=>({'id':_0x2c18fa[_0x59a81a(0x167)],'threadId':_0x2c18fa[_0x59a81a(0x16f)],'dT':y(_0x2c18fa['createTimestamp']),'personId':_0x2c18fa['userId'],'resolved':_0x3fa525[_0x59a81a(0x17f)]===I[_0x59a81a(0x17b)],'unitId':_0x44496,'subUnitId':_0x1db221,'text':JSON[_0x59a81a(0x16d)](_0x2c18fa[_0x59a81a(0x1a2)]),'parentId':_0x3c426b}),_0x32d122=_0x2609ed(_0x3fa525['replies'][0x0]);return{..._0x32d122,'children':_0x3fa525[_0x59a81a(0x1a0)][_0x59a81a(0x1b1)](0x1)[_0x59a81a(0x1ad)](_0x24fadf=>_0x2609ed(_0x24fadf,_0x32d122['id']))};}return null;}let S=class{constructor(_0x3d415f,_0x5d36e8,_0x3e71d0){const _0x29c780=_0x1654f6;this[_0x29c780(0x181)]=_0x3d415f,this[_0x29c780(0x176)]=_0x5d36e8,this[_0x29c780(0x185)]=_0x3e71d0;}async[_0x1654f6(0x1a1)](_0x109b31){const _0x2d4bbb=_0x1654f6;var _0x439cc8,_0x396137;const {parentId:_0x34d57e,unitId:_0x53925c,text:_0xde9c8e,threadId:_0x51018c}=_0x109b31,_0x3da9ff=(_0x396137=(_0x439cc8=_0xde9c8e[_0x2d4bbb(0x186)])==null?void 0x0:_0x439cc8[_0x2d4bbb(0x164)](_0x2416f0=>_0x2416f0[_0x2d4bbb(0x19c)]===_0x5bccc8[_0x2d4bbb(0x18c)])[_0x2d4bbb(0x1ad)](_0x142295=>_0x142295[_0x2d4bbb(0x15a)]))!=null?_0x396137:[],_0x4c05e8=JSON['stringify'](_0xde9c8e),_0x2e52e5=(await this[_0x2d4bbb(0x185)][_0x2d4bbb(0x1af)](_0x53925c))['getMemberID']();if(_0x34d57e){const _0x934fc9={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff,'threadId':_0x51018c},_0x46f0ae=(await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)](_0x2d4bbb(0x183)+_0x53925c+'/reply',{'body':_0x934fc9}))[_0x2d4bbb(0x174)]['reply'];return{..._0x109b31,'id':_0x46f0ae[_0x2d4bbb(0x167)],'dT':_0x5879de(+_0x46f0ae['createTimestamp'])[_0x2d4bbb(0x193)](_0x2d4bbb(0x1b0)),'personId':_0x46f0ae[_0x2d4bbb(0x182)]};}else{const _0x4b0150={'memberId':_0x2e52e5,'unitId':_0x53925c,'content':_0x4c05e8,'mention':_0x3da9ff},_0x5bafc4=await this[_0x2d4bbb(0x181)][_0x2d4bbb(0x161)]('/universer-api/comment/unit/'+_0x53925c+_0x2d4bbb(0x1a5),{'body':_0x4b0150});return X(_0x5bafc4[_0x2d4bbb(0x174)]['comment'],_0x109b31);}}async['updateComment'](_0x451b78){const _0x344980=_0x1654f6;var _0x5a53ca,_0x14a9d0;const {text:_0x29f0cd,unitId:_0x378bfa}=_0x451b78,_0xebe613=(_0x14a9d0=(_0x5a53ca=_0x29f0cd[_0x344980(0x186)])==null?void 0x0:_0x5a53ca['filter'](_0x77597e=>_0x77597e['rangeType']===_0x5bccc8[_0x344980(0x18c)])['map'](_0x17d46c=>_0x17d46c[_0x344980(0x15a)]))!=null?_0x14a9d0:[],_0x4b9c40=JSON[_0x344980(0x1aa)](_0x29f0cd),_0x1feec1=_0x451b78['threadId'],_0x4bc086=_0x451b78['id'],_0x462c9d={'memberId':(await this[_0x344980(0x185)]['requireSession'](_0x378bfa))[_0x344980(0x18d)](),'unitId':_0x378bfa,'threadId':_0x1feec1,'mention':_0xebe613,'content':_0x4b9c40,'replyId':_0x4bc086},_0x2277e6=await this[_0x344980(0x181)][_0x344980(0x161)]('/universer-api/comment/unit/'+_0x378bfa+_0x344980(0x197),{'body':_0x462c9d});return!_0x2277e6['body'][_0x344980(0x159)]||_0x2277e6[_0x344980(0x174)][_0x344980(0x159)]['code']===0x1;}async['resolveComment'](_0x3f9edf){const _0x184c34=_0x1654f6,{unitId:_0x3b2e58}=_0x3f9edf,_0x231975=_0x3f9edf[_0x184c34(0x16f)],_0x341c41={'memberId':this[_0x184c34(0x176)][_0x184c34(0x15f)]()[_0x184c34(0x154)],'unitId':_0x3b2e58,'threadId':_0x231975,'solved':_0x3f9edf[_0x184c34(0x16b)]?I[_0x184c34(0x17b)]:I['OpenOrReOpen']},_0x275c85=await this[_0x184c34(0x181)]['post']('/universer-api/comment/unit/'+_0x3b2e58+_0x184c34(0x171),{'body':_0x341c41});return!_0x275c85[_0x184c34(0x174)]['error']||_0x275c85[_0x184c34(0x174)][_0x184c34(0x159)][_0x184c34(0x156)]===0x1;}async[_0x1654f6(0x16a)](_0x5a86cf,_0x26b9e7,_0x1abeff,_0xd126c6){const _0x2b667=_0x1654f6,_0x4ccfa5={'memberId':(await this['_sessionService'][_0x2b667(0x1af)](_0x5a86cf))['getMemberID'](),'threadId':_0x1abeff,'replyId':_0xd126c6,'unitId':_0x5a86cf},_0x1751a8=await this[_0x2b667(0x181)]['post'](_0x2b667(0x183)+_0x5a86cf+_0x2b667(0x1ae),{'body':_0x4ccfa5});return!_0x1751a8[_0x2b667(0x174)][_0x2b667(0x159)]||_0x1751a8['body']['error'][_0x2b667(0x156)]===0x1;}async[_0x1654f6(0x1a9)](_0x3c19fb,_0x3806de,_0xbd4dac){const _0xac09c8=_0x1654f6,_0x51c3f4={'unitId':_0x3c19fb,'threadId':_0xbd4dac},_0x14013f=await this[_0xac09c8(0x181)][_0xac09c8(0x161)](_0xac09c8(0x183)+_0x3c19fb+_0xac09c8(0x1ab),{'body':_0x51c3f4}),_0x5bcafe=_0xbd4dac[_0xac09c8(0x1ad)](_0x40c7cf=>ee(_0x14013f[_0xac09c8(0x174)][_0xac09c8(0x17d)][_0x40c7cf],_0x3c19fb,_0x3806de))['filter'](Boolean);return Object[_0xac09c8(0x160)](_0x14013f[_0xac09c8(0x174)]['users'])[_0xac09c8(0x1b2)](_0x54e425=>{const _0x3e8d2a=_0xac09c8;this['_userService'][_0x3e8d2a(0x1a3)](_0x54e425);}),_0x5bcafe;}[_0x1654f6(0x157)](_0x298a67){const _0x30c429=_0x1654f6;return{'id':_0x298a67['id'],'threadId':_0x298a67[_0x30c429(0x16f)],'ref':_0x298a67[_0x30c429(0x17c)]};}};S=Q([b(0x0,_0x57f171(_0x201c5c)),b(0x1,_0x57f171(_0x5212c7)),b(0x2,_0x57f171(_0x5cf12a))],S);var re=Object[_0x1654f6(0x195)],te=(_0x554c20,_0x5b9a43,_0x29b099,_0x403688)=>{const _0xd2dc28=_0x1654f6;for(var _0x34f861=_0x403688>0x1?void 0x0:_0x403688?re(_0x5b9a43,_0x29b099):_0x5b9a43,_0x5b6400=_0x554c20[_0xd2dc28(0x18e)]-0x1,_0x1781db;_0x5b6400>=0x0;_0x5b6400--)(_0x1781db=_0x554c20[_0x5b6400])&&(_0x34f861=_0x1781db(_0x34f861)||_0x34f861);return _0x34f861;},M=(_0xdfbe1,_0x5df061)=>(_0x11807e,_0x506eb2)=>_0x5df061(_0x11807e,_0x506eb2,_0xdfbe1);let f=class extends _0x141799{constructor(_0x3082d5,_0x32cb0e){const _0x3a5515=_0x1654f6;super(),this['_threadCommentDataSourceService']=_0x3082d5,this['_threadCommentDataSource']=_0x32cb0e,this[_0x3a5515(0x18b)]();}[_0x1654f6(0x18b)](){const _0x67f481=_0x1654f6;this[_0x67f481(0x17a)][_0x67f481(0x196)]=this[_0x67f481(0x19a)],this[_0x67f481(0x17a)][_0x67f481(0x180)]=!0x1;}};f=te([M(0x0,_0x3d5f8a),M(0x1,_0x57f171(S))],f);var se=Object['defineProperty'],oe=Object[_0x1654f6(0x195)],ne=(_0x544dac,_0x490b13,_0x11d8f4)=>_0x490b13 in _0x544dac?se(_0x544dac,_0x490b13,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11d8f4}):_0x544dac[_0x490b13]=_0x11d8f4,ie=(_0x3fbc4a,_0x51f5d6,_0x28d8cf,_0x4dce95)=>{for(var _0x3ff36a=_0x4dce95>0x1?void 0x0:_0x4dce95?oe(_0x51f5d6,_0x28d8cf):_0x51f5d6,_0x4cded3=_0x3fbc4a['length']-0x1,_0x3f0f5b;_0x4cded3>=0x0;_0x4cded3--)(_0x3f0f5b=_0x3fbc4a[_0x4cded3])&&(_0x3ff36a=_0x3f0f5b(_0x3ff36a)||_0x3ff36a);return _0x3ff36a;},N=(_0x5a1c09,_0x48d1e3)=>(_0x41a498,_0xaafe49)=>_0x48d1e3(_0x41a498,_0xaafe49,_0x5a1c09),$=(_0x3b9493,_0x4b78a5,_0x5eab98)=>ne(_0x3b9493,typeof _0x4b78a5!='symbol'?_0x4b78a5+'':_0x4b78a5,_0x5eab98);let g=class extends _0x146c0a{constructor(_0x4bb7f0=O,_0x5a7622,_0x2d7da7){const _0x47c73c=_0x1654f6;super(),this[_0x47c73c(0x189)]=_0x4bb7f0,this[_0x47c73c(0x15e)]=_0x5a7622,this[_0x47c73c(0x15d)]=_0x2d7da7;const {..._0x29ac18}=_0x4677bf({},O,this[_0x47c73c(0x189)]);this[_0x47c73c(0x15d)][_0x47c73c(0x198)](z,_0x29ac18);}[_0x1654f6(0x191)](){const _0x508150=_0x1654f6;[[S],[f],[_]][_0x508150(0x1b2)](_0x5a1af1=>{const _0x260fa7=_0x508150;this['_injector'][_0x260fa7(0x199)](_0x5a1af1);});}[_0x1654f6(0x169)](){const _0x5891d6=_0x1654f6;this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](f),this[_0x5891d6(0x15e)][_0x5891d6(0x1a7)](_);}};$(g,'pluginName',W),$(g,_0x1654f6(0x16e),_0x339391[_0x1654f6(0x158)]),g=ie([_0x4aa3bb(_0x4d6a33,_0xd71383,_0x1717b0),N(0x1,_0x57f171(_0x4d8ec4)),N(0x2,_0x3d9e11)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2b0436=_0xc8e3;(function(_0x16e5bb,_0x447792){const _0x1b6ead=_0xc8e3,_0x3c60bb=_0x16e5bb();while(!![]){try{const _0x24dbf4=-parseInt(_0x1b6ead(0x179))/0x1+parseInt(_0x1b6ead(0x142))/0x2*(parseInt(_0x1b6ead(0x139))/0x3)+parseInt(_0x1b6ead(0x18c))/0x4+-parseInt(_0x1b6ead(0x160))/0x5+parseInt(_0x1b6ead(0x154))/0x6*(parseInt(_0x1b6ead(0x181))/0x7)+parseInt(_0x1b6ead(0x129))/0x8*(-parseInt(_0x1b6ead(0x147))/0x9)+-parseInt(_0x1b6ead(0x17d))/0xa;if(_0x24dbf4===_0x447792)break;else _0x3c60bb['push'](_0x3c60bb['shift']());}catch(_0x3e3240){_0x3c60bb['push'](_0x3c60bb['shift']());}}}(_0x1d21,0x54fd9));import{CommentService as _0x991cb0,CollaborationSessionService as _0x1460d2,UniverCollaborationClientPlugin as _0x223e2c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4af8e4}from'@univerjs-pro/license';function _0x1d21(){const _0xcbdc39=['OpenOrReOpen','slice','comments','/edit','Solve','/solved','filter','body','_threadCommentDataSourceService','get','36AvhmKJ','deleteComment','size','error','/delete','_sessionService','dataSource','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','saveCommentToSnapshot','resolveComment','_threadCommentDataSource','1826075zUoCVk','_httpService','_init','Add','map','content','replies','post','userId','rangeId','find','Delete','unitId','comment','delete','updateComment','type','root','listComments','/reply','getMemberID','pluginName','userID','users','commentUpdate$','294842SuUSBg','threadId','solved','getComment','825700lPjMEW','thread-comment-data-source.config','stringify','format','477148kzezfO','_threadCommentModel','values','_config','reply','COMMENT','_injector','_commentService','subscribe','personId','replyId','947464xqFCDu','payload','_configService','disposeWithMe','add','syncUpdateMutationToColla','/list','24GYretu','getOwnPropertyDescriptor','symbol','createTimestamp','Edit','ref','requireSession','Reply','rangeType','onStarting','user','UNRECOGNIZED','_initUserSync','/add','defineProperty','parse','1987455gzDBMU','getUnit','UNIVER_UNKNOWN','addComment','length','_userService','resolved','code','Solved','2LFtNUC','_initDataSource','customRanges','setConfig','Unknown','652761fDeSyt','addUser','forEach'];_0x1d21=function(){return _0xcbdc39;};return _0x1d21();}import{dayjs as _0x5db2b3,UserManagerService as _0x657f0b,Inject as _0x256e66,Injector as _0x441339,Disposable as _0x1993b0,CustomRangeType as _0x1597cd,UniverInstanceType as _0x2f5e31,DependentOn as _0x334c07,IConfigService as _0x301fd5,Plugin as _0x590fd8,merge as _0x55235b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3534dc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x41a975,IThreadCommentDataSourceService as _0x4a6e49}from'@univerjs/thread-comment';import{bufferTime as _0x90f46a}from'rxjs';import{HTTPService as _0x470136}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2af9d0=>(_0x2af9d0[_0x2af9d0[_0x2b0436(0x14a)]=0x0]='OpenOrReOpen',_0x2af9d0[_0x2af9d0['Solved']=0x1]='Solved',_0x2af9d0[_0x2af9d0[_0x2b0436(0x134)]=-0x1]=_0x2b0436(0x134),_0x2af9d0))(I||{}),v=(_0x23ae31=>(_0x23ae31[_0x23ae31[_0x2b0436(0x146)]=0x0]=_0x2b0436(0x146),_0x23ae31[_0x23ae31[_0x2b0436(0x163)]=0x1]=_0x2b0436(0x163),_0x23ae31[_0x23ae31[_0x2b0436(0x130)]=0x2]=_0x2b0436(0x130),_0x23ae31[_0x23ae31[_0x2b0436(0x12d)]=0x3]=_0x2b0436(0x12d),_0x23ae31[_0x23ae31[_0x2b0436(0x16b)]=0x4]='Delete',_0x23ae31[_0x23ae31[_0x2b0436(0x14e)]=0x5]=_0x2b0436(0x14e),_0x23ae31[_0x23ae31[_0x2b0436(0x134)]=-0x1]='UNRECOGNIZED',_0x23ae31))(v||{});const y=_0x4fb873=>_0x5db2b3(new Date(+_0x4fb873))[_0x2b0436(0x180)](_0x2b0436(0x15b)),B=async(_0x347f33,_0xd62c3b)=>{const _0x9dc7c0=_0x2b0436,_0x362199=_0x347f33[_0x9dc7c0(0x153)](_0x657f0b),_0x36153e=_0x347f33['get'](_0x470136);_0xd62c3b[_0x9dc7c0(0x149)](_0x485677=>{const _0xcdb9d4=_0x9dc7c0;_0x362199['getUser'](_0x485677)&&_0xd62c3b[_0xcdb9d4(0x16e)](_0x485677);}),_0xd62c3b[_0x9dc7c0(0x156)]&&(await _0x36153e[_0x9dc7c0(0x153)]('/universer-api/user/list',{'params':{'userIDs':[..._0xd62c3b]}}))[_0x9dc7c0(0x151)][_0x9dc7c0(0x177)][_0x9dc7c0(0x149)](_0x512725=>{const _0x4c5cd4=_0x9dc7c0;_0x512725&&_0x362199[_0x4c5cd4(0x148)](_0x512725);});};var K=Object[_0x2b0436(0x12a)],V=(_0x500890,_0x1a555b,_0x4bf3f6,_0x6af989)=>{const _0x4469bb=_0x2b0436;for(var _0x1db3c1=_0x6af989>0x1?void 0x0:_0x6af989?K(_0x1a555b,_0x4bf3f6):_0x1a555b,_0x4fbd87=_0x500890[_0x4469bb(0x13d)]-0x1,_0x4f8213;_0x4fbd87>=0x0;_0x4fbd87--)(_0x4f8213=_0x500890[_0x4fbd87])&&(_0x1db3c1=_0x4f8213(_0x1db3c1)||_0x1db3c1);return _0x1db3c1;},p=(_0x4e4d31,_0x76a9d5)=>(_0x1153c6,_0x1fecc1)=>_0x76a9d5(_0x1153c6,_0x1fecc1,_0x4e4d31);let _=class extends _0x1993b0{constructor(_0x212a92,_0xe9cfd8,_0x2643e9,_0x324bb8){const _0x1cd8d0=_0x2b0436;super(),this[_0x1cd8d0(0x188)]=_0x212a92,this[_0x1cd8d0(0x182)]=_0xe9cfd8,this[_0x1cd8d0(0x13e)]=_0x2643e9,this[_0x1cd8d0(0x187)]=_0x324bb8,this[_0x1cd8d0(0x162)](),this['_initUserSync']();}[_0x2b0436(0x135)](){const _0x233fab=_0x2b0436;this[_0x233fab(0x18f)](this[_0x233fab(0x182)][_0x233fab(0x178)]['pipe'](_0x90f46a(0x10))[_0x233fab(0x189)](_0x1ea871=>{const _0x2a3b54=new Set();_0x1ea871['forEach'](_0x37b438=>{const _0x2c62b0=_0xc8e3;switch(_0x37b438[_0x2c62b0(0x170)]){case _0x2c62b0(0x190):{const _0x56e132=_0x37b438[_0x2c62b0(0x18d)][_0x2c62b0(0x18a)];_0x2a3b54[_0x2c62b0(0x190)](_0x56e132);break;}}}),B(this['_injector'],_0x2a3b54);}));}[_0x2b0436(0x162)](){const _0x31a7ef=_0x2b0436;this[_0x31a7ef(0x18f)](this[_0x31a7ef(0x188)]['commentUpdate$']['subscribe'](async _0x3e415f=>{const _0x6f73a8=_0x31a7ef;var _0x2ede99,_0x1a3736,_0x244842,_0x447ee1;const _0x4505a3=(_0x2ede99=this[_0x6f73a8(0x182)]['getUnit'](_0x3e415f[_0x6f73a8(0x16c)])[_0x6f73a8(0x16a)](_0x4ccaca=>_0x4ccaca[_0x6f73a8(0x17a)]===_0x3e415f['threadId']))==null?void 0x0:_0x2ede99[_0x6f73a8(0x171)];if(!_0x4505a3)return;const {unitId:_0x5cb90c,subUnitId:_0x2f5bfd}=_0x4505a3;switch(_0x3e415f[_0x6f73a8(0x133)]&&this[_0x6f73a8(0x13e)][_0x6f73a8(0x148)](_0x3e415f['user']),_0x3e415f[_0x6f73a8(0x170)]){case v[_0x6f73a8(0x163)]:break;case v[_0x6f73a8(0x130)]:{this[_0x6f73a8(0x182)][_0x6f73a8(0x13c)](_0x5cb90c,_0x2f5bfd,{'unitId':_0x5cb90c,'subUnitId':_0x2f5bfd,'ref':'','id':_0x3e415f[_0x6f73a8(0x18b)],'dT':y(+_0x3e415f[_0x6f73a8(0x12c)]),'threadId':_0x3e415f['threadId'],'personId':(_0x244842=(_0x1a3736=_0x3e415f[_0x6f73a8(0x133)])==null?void 0x0:_0x1a3736[_0x6f73a8(0x176)])!=null?_0x244842:_0x3e415f['userId'],'text':JSON['parse'](_0x3e415f[_0x6f73a8(0x165)]),'parentId':_0x4505a3['id']});break;}case v[_0x6f73a8(0x16b)]:{const _0x23ff9a=this[_0x6f73a8(0x182)][_0x6f73a8(0x17c)](_0x5cb90c,_0x2f5bfd,_0x3e415f[_0x6f73a8(0x18b)]);_0x23ff9a&&_0x23ff9a['parentId']&&this[_0x6f73a8(0x182)]['deleteComment'](_0x5cb90c,_0x2f5bfd,_0x3e415f[_0x6f73a8(0x18b)]);break;}case v[_0x6f73a8(0x12d)]:{this['_threadCommentModel'][_0x6f73a8(0x16f)](_0x5cb90c,_0x2f5bfd,{'commentId':_0x3e415f['replyId'],'text':JSON[_0x6f73a8(0x138)](_0x3e415f['content'])});break;}case v[_0x6f73a8(0x14e)]:{const _0x44311e=(_0x447ee1=this[_0x6f73a8(0x182)][_0x6f73a8(0x13a)](_0x3e415f['unitId'])[_0x6f73a8(0x16a)](_0x2a0086=>_0x2a0086[_0x6f73a8(0x17a)]===_0x3e415f[_0x6f73a8(0x17a)]))==null?void 0x0:_0x447ee1[_0x6f73a8(0x171)];_0x44311e&&this[_0x6f73a8(0x182)][_0x6f73a8(0x15e)](_0x5cb90c,_0x2f5bfd,_0x44311e['id'],_0x3e415f[_0x6f73a8(0x17b)]===I[_0x6f73a8(0x141)]);break;}}}));}};_=V([p(0x0,_0x256e66(_0x991cb0)),p(0x1,_0x256e66(_0x41a975)),p(0x2,_0x256e66(_0x657f0b)),p(0x3,_0x256e66(_0x441339))],_);const z=_0x2b0436(0x17e),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2b3b84,_0xf83558,_0x38cd5c,_0x411195)=>{const _0x230d1a=_0x2b0436;for(var _0xbd4ef2=_0x411195>0x1?void 0x0:_0x411195?k(_0xf83558,_0x38cd5c):_0xf83558,_0x322620=_0x2b3b84[_0x230d1a(0x13d)]-0x1,_0x25b883;_0x322620>=0x0;_0x322620--)(_0x25b883=_0x2b3b84[_0x322620])&&(_0xbd4ef2=_0x25b883(_0xbd4ef2)||_0xbd4ef2);return _0xbd4ef2;},b=(_0x149b90,_0x202303)=>(_0x472de8,_0x1138c0)=>_0x202303(_0x472de8,_0x1138c0,_0x149b90);function X(_0x441bdf,_0x328fcd){const _0x18f605=_0x2b0436,_0x307768=_0x441bdf['replies'][0x0];return{..._0x328fcd,'id':_0x307768[_0x18f605(0x18b)],'resolved':_0x441bdf[_0x18f605(0x17b)]===0x1,'dT':y(_0x307768[_0x18f605(0x12c)]),'personId':_0x307768[_0x18f605(0x168)],'threadId':_0x307768['threadId']};}function ee(_0x1ad05c,_0x5113bb,_0x2a01b9){const _0x4e28aa=_0x2b0436;var _0x5d54d4,_0x2b194d;if(((_0x2b194d=(_0x5d54d4=_0x1ad05c==null?void 0x0:_0x1ad05c[_0x4e28aa(0x166)])==null?void 0x0:_0x5d54d4[_0x4e28aa(0x13d)])!=null?_0x2b194d:0x0)>0x0){const _0x3be5c3=(_0x11923d,_0x425bcd)=>({'id':_0x11923d[_0x4e28aa(0x18b)],'threadId':_0x11923d[_0x4e28aa(0x17a)],'dT':y(_0x11923d[_0x4e28aa(0x12c)]),'personId':_0x11923d[_0x4e28aa(0x168)],'resolved':_0x1ad05c[_0x4e28aa(0x17b)]===I['Solved'],'unitId':_0x5113bb,'subUnitId':_0x2a01b9,'text':JSON[_0x4e28aa(0x138)](_0x11923d[_0x4e28aa(0x165)]),'parentId':_0x425bcd}),_0xc9909d=_0x3be5c3(_0x1ad05c[_0x4e28aa(0x166)][0x0]);return{..._0xc9909d,'children':_0x1ad05c['replies'][_0x4e28aa(0x14b)](0x1)[_0x4e28aa(0x164)](_0x19cfb4=>_0x3be5c3(_0x19cfb4,_0xc9909d['id']))};}return null;}let S=class{constructor(_0x3243fe,_0x21058f,_0x34d045){const _0x17862c=_0x2b0436;this[_0x17862c(0x161)]=_0x3243fe,this['_userService']=_0x21058f,this[_0x17862c(0x159)]=_0x34d045;}async['addComment'](_0x539578){const _0x201c49=_0x2b0436;var _0x41bdf8,_0x368b70;const {parentId:_0x555701,unitId:_0x519995,text:_0x39dbd6,threadId:_0x4d457d}=_0x539578,_0x9009ec=(_0x368b70=(_0x41bdf8=_0x39dbd6[_0x201c49(0x144)])==null?void 0x0:_0x41bdf8['filter'](_0xf339c1=>_0xf339c1[_0x201c49(0x131)]===_0x1597cd[_0x201c49(0x186)])[_0x201c49(0x164)](_0xcfb890=>_0xcfb890[_0x201c49(0x169)]))!=null?_0x368b70:[],_0xc6c08c=JSON['stringify'](_0x39dbd6),_0x5cb2ed=(await this['_sessionService']['requireSession'](_0x519995))[_0x201c49(0x174)]();if(_0x555701){const _0x5b4ac7={'memberId':_0x5cb2ed,'unitId':_0x519995,'content':_0xc6c08c,'mention':_0x9009ec,'threadId':_0x4d457d},_0x483d8e=(await this['_httpService']['post'](_0x201c49(0x15c)+_0x519995+_0x201c49(0x173),{'body':_0x5b4ac7}))[_0x201c49(0x151)][_0x201c49(0x185)];return{..._0x539578,'id':_0x483d8e['replyId'],'dT':_0x5db2b3(+_0x483d8e['createTimestamp'])['format'](_0x201c49(0x15b)),'personId':_0x483d8e['userId']};}else{const _0x4a4631={'memberId':_0x5cb2ed,'unitId':_0x519995,'content':_0xc6c08c,'mention':_0x9009ec},_0x3dbdf7=await this['_httpService'][_0x201c49(0x167)](_0x201c49(0x15c)+_0x519995+_0x201c49(0x136),{'body':_0x4a4631});return X(_0x3dbdf7['body'][_0x201c49(0x16d)],_0x539578);}}async[_0x2b0436(0x16f)](_0x1b2456){const _0x160746=_0x2b0436;var _0xe646fb,_0x1d0765;const {text:_0x711873,unitId:_0x217cc9}=_0x1b2456,_0x17e98b=(_0x1d0765=(_0xe646fb=_0x711873['customRanges'])==null?void 0x0:_0xe646fb[_0x160746(0x150)](_0xb6f9eb=>_0xb6f9eb[_0x160746(0x131)]===_0x1597cd[_0x160746(0x186)])[_0x160746(0x164)](_0x2b7a33=>_0x2b7a33['rangeId']))!=null?_0x1d0765:[],_0xba9bc4=JSON[_0x160746(0x17f)](_0x711873),_0x301ba0=_0x1b2456[_0x160746(0x17a)],_0x30069e=_0x1b2456['id'],_0xa940c3={'memberId':(await this[_0x160746(0x159)]['requireSession'](_0x217cc9))['getMemberID'](),'unitId':_0x217cc9,'threadId':_0x301ba0,'mention':_0x17e98b,'content':_0xba9bc4,'replyId':_0x30069e},_0x223150=await this[_0x160746(0x161)][_0x160746(0x167)]('/universer-api/comment/unit/'+_0x217cc9+_0x160746(0x14d),{'body':_0xa940c3});return!_0x223150['body'][_0x160746(0x157)]||_0x223150[_0x160746(0x151)][_0x160746(0x157)][_0x160746(0x140)]===0x1;}async[_0x2b0436(0x15e)](_0x5320ea){const _0x2dfc66=_0x2b0436,{unitId:_0x2db037}=_0x5320ea,_0x298e10=_0x5320ea[_0x2dfc66(0x17a)],_0x2f7b03={'memberId':this[_0x2dfc66(0x13e)]['getCurrentUser']()[_0x2dfc66(0x176)],'unitId':_0x2db037,'threadId':_0x298e10,'solved':_0x5320ea[_0x2dfc66(0x13f)]?I['Solved']:I[_0x2dfc66(0x14a)]},_0x249429=await this[_0x2dfc66(0x161)][_0x2dfc66(0x167)](_0x2dfc66(0x15c)+_0x2db037+_0x2dfc66(0x14f),{'body':_0x2f7b03});return!_0x249429[_0x2dfc66(0x151)][_0x2dfc66(0x157)]||_0x249429['body']['error'][_0x2dfc66(0x140)]===0x1;}async[_0x2b0436(0x155)](_0x184aa4,_0x2af81f,_0x52c7e3,_0x4a5d83){const _0x37d14=_0x2b0436,_0x393da5={'memberId':(await this[_0x37d14(0x159)][_0x37d14(0x12f)](_0x184aa4))[_0x37d14(0x174)](),'threadId':_0x52c7e3,'replyId':_0x4a5d83,'unitId':_0x184aa4},_0x5abe69=await this[_0x37d14(0x161)]['post'](_0x37d14(0x15c)+_0x184aa4+_0x37d14(0x158),{'body':_0x393da5});return!_0x5abe69[_0x37d14(0x151)]['error']||_0x5abe69['body'][_0x37d14(0x157)][_0x37d14(0x140)]===0x1;}async[_0x2b0436(0x172)](_0x21e836,_0x51d8df,_0x5ba0ed){const _0x2f1c2e=_0x2b0436,_0x37b84b={'unitId':_0x21e836,'threadId':_0x5ba0ed},_0x4c2401=await this[_0x2f1c2e(0x161)]['post'](_0x2f1c2e(0x15c)+_0x21e836+_0x2f1c2e(0x128),{'body':_0x37b84b}),_0x11d821=_0x5ba0ed[_0x2f1c2e(0x164)](_0x3ad42f=>ee(_0x4c2401[_0x2f1c2e(0x151)][_0x2f1c2e(0x14c)][_0x3ad42f],_0x21e836,_0x51d8df))[_0x2f1c2e(0x150)](Boolean);return Object[_0x2f1c2e(0x183)](_0x4c2401[_0x2f1c2e(0x151)]['users'])['forEach'](_0x2cb371=>{const _0x3ef8e9=_0x2f1c2e;this['_userService'][_0x3ef8e9(0x148)](_0x2cb371);}),_0x11d821;}[_0x2b0436(0x15d)](_0x2a2ad7){const _0x10c250=_0x2b0436;return{'id':_0x2a2ad7['id'],'threadId':_0x2a2ad7[_0x10c250(0x17a)],'ref':_0x2a2ad7[_0x10c250(0x12e)]};}};S=Q([b(0x0,_0x256e66(_0x470136)),b(0x1,_0x256e66(_0x657f0b)),b(0x2,_0x256e66(_0x1460d2))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x35b9ce,_0x2d3aae,_0x5724fa,_0x1794f8)=>{const _0x11a303=_0x2b0436;for(var _0x44e503=_0x1794f8>0x1?void 0x0:_0x1794f8?re(_0x2d3aae,_0x5724fa):_0x2d3aae,_0x111269=_0x35b9ce[_0x11a303(0x13d)]-0x1,_0x3bb394;_0x111269>=0x0;_0x111269--)(_0x3bb394=_0x35b9ce[_0x111269])&&(_0x44e503=_0x3bb394(_0x44e503)||_0x44e503);return _0x44e503;},M=(_0x3aafd9,_0x44545d)=>(_0x5c1210,_0x2d4e06)=>_0x44545d(_0x5c1210,_0x2d4e06,_0x3aafd9);let f=class extends _0x1993b0{constructor(_0x2266e1,_0x553f0f){const _0x5e9e03=_0x2b0436;super(),this[_0x5e9e03(0x152)]=_0x2266e1,this[_0x5e9e03(0x15f)]=_0x553f0f,this['_initDataSource']();}[_0x2b0436(0x143)](){const _0x37909f=_0x2b0436;this['_threadCommentDataSourceService'][_0x37909f(0x15a)]=this['_threadCommentDataSource'],this[_0x37909f(0x152)][_0x37909f(0x127)]=!0x1;}};function _0xc8e3(_0x2f2f9a,_0x4f7f83){const _0x1d21a6=_0x1d21();return _0xc8e3=function(_0xc8e35b,_0x3a9f83){_0xc8e35b=_0xc8e35b-0x127;let _0x415b57=_0x1d21a6[_0xc8e35b];return _0x415b57;},_0xc8e3(_0x2f2f9a,_0x4f7f83);}f=te([M(0x0,_0x4a6e49),M(0x1,_0x256e66(S))],f);var se=Object[_0x2b0436(0x137)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1658c2,_0x1bbb99,_0x15875a)=>_0x1bbb99 in _0x1658c2?se(_0x1658c2,_0x1bbb99,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15875a}):_0x1658c2[_0x1bbb99]=_0x15875a,ie=(_0x40961c,_0x533dc2,_0x3047e2,_0x1df943)=>{for(var _0x215eda=_0x1df943>0x1?void 0x0:_0x1df943?oe(_0x533dc2,_0x3047e2):_0x533dc2,_0x5c1814=_0x40961c['length']-0x1,_0x591582;_0x5c1814>=0x0;_0x5c1814--)(_0x591582=_0x40961c[_0x5c1814])&&(_0x215eda=_0x591582(_0x215eda)||_0x215eda);return _0x215eda;},N=(_0x3fc88f,_0x2e9de7)=>(_0xe7d04e,_0x228ba4)=>_0x2e9de7(_0xe7d04e,_0x228ba4,_0x3fc88f),$=(_0x4b6f69,_0x34ff30,_0x328d8f)=>ne(_0x4b6f69,typeof _0x34ff30!=_0x2b0436(0x12b)?_0x34ff30+'':_0x34ff30,_0x328d8f);let g=class extends _0x590fd8{constructor(_0x4244d2=O,_0x932b40,_0x145a0f){const _0x22973d=_0x2b0436;super(),this[_0x22973d(0x184)]=_0x4244d2,this[_0x22973d(0x187)]=_0x932b40,this[_0x22973d(0x18e)]=_0x145a0f;const {..._0xdc8f84}=_0x55235b({},O,this[_0x22973d(0x184)]);this[_0x22973d(0x18e)][_0x22973d(0x145)](z,_0xdc8f84);}[_0x2b0436(0x132)](){[[S],[f],[_]]['forEach'](_0x3e516c=>{const _0x561815=_0xc8e3;this['_injector'][_0x561815(0x190)](_0x3e516c);});}['onReady'](){const _0x9d10c0=_0x2b0436;this[_0x9d10c0(0x187)][_0x9d10c0(0x153)](f),this[_0x9d10c0(0x187)][_0x9d10c0(0x153)](_);}};$(g,_0x2b0436(0x175),W),$(g,_0x2b0436(0x170),_0x2f5e31[_0x2b0436(0x13b)]),g=ie([_0x334c07(_0x3534dc,_0x223e2c,_0x4af8e4),N(0x1,_0x256e66(_0x441339)),N(0x2,_0x301fd5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5da13a,_0x3f8a83){const _0x15a510=_0x5033,_0x5ebcc2=_0x5da13a();while(!![]){try{const _0x1e6150=-parseInt(_0x15a510(0x225))/0x1*(-parseInt(_0x15a510(0x1e5))/0x2)+parseInt(_0x15a510(0x22e))/0x3+parseInt(_0x15a510(0x228))/0x4+-parseInt(_0x15a510(0x1e1))/0x5+parseInt(_0x15a510(0x215))/0x6*(parseInt(_0x15a510(0x1bf))/0x7)+-parseInt(_0x15a510(0x206))/0x8+-parseInt(_0x15a510(0x1fe))/0x9;if(_0x1e6150===_0x3f8a83)break;else _0x5ebcc2['push'](_0x5ebcc2['shift']());}catch(_0x24fd31){_0x5ebcc2['push'](_0x5ebcc2['shift']());}}}(_0x1b27,0xdd9de),function(_0x4d0ce8,_0x2aec0c){const _0x57585c=_0x5033;typeof exports==_0x57585c(0x1f1)&&typeof module<'u'?_0x2aec0c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x57585c(0x207)&&define[_0x57585c(0x1dc)]?define([_0x57585c(0x22a),'@univerjs-pro/collaboration-client',_0x57585c(0x1b2),_0x57585c(0x21b),_0x57585c(0x1f4),_0x57585c(0x214),_0x57585c(0x201),'@univerjs/network'],_0x2aec0c):(_0x4d0ce8=typeof globalThis<'u'?globalThis:_0x4d0ce8||self,_0x2aec0c(_0x4d0ce8[_0x57585c(0x1fa)]={},_0x4d0ce8[_0x57585c(0x1c6)],_0x4d0ce8[_0x57585c(0x223)],_0x4d0ce8[_0x57585c(0x1cf)],_0x4d0ce8[_0x57585c(0x1e7)],_0x4d0ce8[_0x57585c(0x1b1)],_0x4d0ce8[_0x57585c(0x201)],_0x4d0ce8['UniverNetwork']));}(this,function(_0x1384e2,_0xd637b2,_0xb4ec85,_0xca3df0,_0x2832a7,_0xc5ac98,_0x1c95db,_0x2413ad){'use strict';const _0x1b6927=_0x5033;const _0x36886f=_0x1b6927(0x1c7);var _0x271263=(_0x232d1d=>(_0x232d1d[_0x232d1d[_0x1b6927(0x205)]=0x0]=_0x1b6927(0x205),_0x232d1d[_0x232d1d[_0x1b6927(0x1b0)]=0x1]=_0x1b6927(0x1b0),_0x232d1d[_0x232d1d[_0x1b6927(0x1c5)]=-0x1]=_0x1b6927(0x1c5),_0x232d1d))(_0x271263||{}),_0x13e2d0=(_0x55393a=>(_0x55393a[_0x55393a[_0x1b6927(0x1ed)]=0x0]=_0x1b6927(0x1ed),_0x55393a[_0x55393a[_0x1b6927(0x1e6)]=0x1]=_0x1b6927(0x1e6),_0x55393a[_0x55393a[_0x1b6927(0x1ba)]=0x2]=_0x1b6927(0x1ba),_0x55393a[_0x55393a['Edit']=0x3]='Edit',_0x55393a[_0x55393a['Delete']=0x4]='Delete',_0x55393a[_0x55393a[_0x1b6927(0x1ee)]=0x5]='Solve',_0x55393a[_0x55393a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x55393a))(_0x13e2d0||{});const _0x5106e7=_0x525295=>_0xca3df0['dayjs'](new Date(+_0x525295))[_0x1b6927(0x22b)](_0x1b6927(0x1bb)),_0x1325ae=async(_0x3e4c65,_0x479503)=>{const _0xf7a301=_0x1b6927,_0x4cbc17=_0x3e4c65['get'](_0xca3df0[_0xf7a301(0x1df)]),_0x6fb204=_0x3e4c65['get'](_0x2413ad[_0xf7a301(0x1b6)]);_0x479503[_0xf7a301(0x1b9)](_0x434fad=>{const _0x38ea71=_0xf7a301;_0x4cbc17[_0x38ea71(0x1d9)](_0x434fad)&&_0x479503['delete'](_0x434fad);}),_0x479503[_0xf7a301(0x21a)]&&(await _0x6fb204[_0xf7a301(0x222)](_0xf7a301(0x1d2),{'params':{'userIDs':[..._0x479503]}}))[_0xf7a301(0x1c2)]['users'][_0xf7a301(0x1b9)](_0x517972=>{const _0xa45fda=_0xf7a301;_0x517972&&_0x4cbc17[_0xa45fda(0x1f6)](_0x517972);});};var _0x2fadb1=Object[_0x1b6927(0x229)],_0x5d48ff=(_0x575886,_0x58150a,_0x5985b4,_0x2d453b)=>{const _0x4fe517=_0x1b6927;for(var _0x19b9bb=_0x2d453b>0x1?void 0x0:_0x2d453b?_0x2fadb1(_0x58150a,_0x5985b4):_0x58150a,_0xad0ccb=_0x575886[_0x4fe517(0x221)]-0x1,_0x53aff7;_0xad0ccb>=0x0;_0xad0ccb--)(_0x53aff7=_0x575886[_0xad0ccb])&&(_0x19b9bb=_0x53aff7(_0x19b9bb)||_0x19b9bb);return _0x19b9bb;},_0x5130cb=(_0x594ba1,_0x50a438)=>(_0x5bdab5,_0x454c52)=>_0x50a438(_0x5bdab5,_0x454c52,_0x594ba1);let _0x169a97=class extends _0xca3df0[_0x1b6927(0x1a7)]{constructor(_0x224cfb,_0x4bb323,_0x2f3c80,_0x368373){const _0x2c5ba9=_0x1b6927;super(),this['_commentService']=_0x224cfb,this[_0x2c5ba9(0x1db)]=_0x4bb323,this[_0x2c5ba9(0x1d5)]=_0x2f3c80,this[_0x2c5ba9(0x1eb)]=_0x368373,this[_0x2c5ba9(0x217)](),this['_initUserSync']();}['_initUserSync'](){const _0x3e61bb=_0x1b6927;this[_0x3e61bb(0x21e)](this[_0x3e61bb(0x1db)][_0x3e61bb(0x1a9)]['pipe'](_0x1c95db[_0x3e61bb(0x1cd)](0x10))[_0x3e61bb(0x1b8)](_0x8aab6b=>{const _0x584782=_0x3e61bb,_0x82c416=new Set();_0x8aab6b['forEach'](_0x4324ab=>{const _0x414450=_0x5033;switch(_0x4324ab[_0x414450(0x1f9)]){case _0x414450(0x1ea):{const _0x134e10=_0x4324ab[_0x414450(0x204)]['personId'];_0x82c416[_0x414450(0x1ea)](_0x134e10);break;}}}),_0x1325ae(this[_0x584782(0x1eb)],_0x82c416);}));}['_init'](){const _0x3bf308=_0x1b6927;this['disposeWithMe'](this[_0x3bf308(0x1e2)][_0x3bf308(0x1a9)][_0x3bf308(0x1b8)](async _0xebbb27=>{const _0xb9e7a=_0x3bf308;var _0x59a6f6,_0x5138cb,_0x4655e5,_0x1679fb;const _0x11f385=(_0x59a6f6=this[_0xb9e7a(0x1db)][_0xb9e7a(0x1b4)](_0xebbb27['unitId'])[_0xb9e7a(0x1e0)](_0x2a05a0=>_0x2a05a0['threadId']===_0xebbb27[_0xb9e7a(0x1ff)]))==null?void 0x0:_0x59a6f6[_0xb9e7a(0x226)];if(!_0x11f385)return;const {unitId:_0x25da35,subUnitId:_0x40d396}=_0x11f385;switch(_0xebbb27[_0xb9e7a(0x1fc)]&&this[_0xb9e7a(0x1d5)]['addUser'](_0xebbb27['user']),_0xebbb27[_0xb9e7a(0x1f9)]){case _0x13e2d0[_0xb9e7a(0x1e6)]:break;case _0x13e2d0['Reply']:{this['_threadCommentModel'][_0xb9e7a(0x203)](_0x25da35,_0x40d396,{'unitId':_0x25da35,'subUnitId':_0x40d396,'ref':'','id':_0xebbb27['replyId'],'dT':_0x5106e7(+_0xebbb27[_0xb9e7a(0x1f0)]),'threadId':_0xebbb27[_0xb9e7a(0x1ff)],'personId':(_0x4655e5=(_0x5138cb=_0xebbb27[_0xb9e7a(0x1fc)])==null?void 0x0:_0x5138cb['userID'])!=null?_0x4655e5:_0xebbb27[_0xb9e7a(0x1d0)],'text':JSON[_0xb9e7a(0x211)](_0xebbb27['content']),'parentId':_0x11f385['id']});break;}case _0x13e2d0[_0xb9e7a(0x20e)]:{const _0x2a6b1a=this[_0xb9e7a(0x1db)][_0xb9e7a(0x1de)](_0x25da35,_0x40d396,_0xebbb27[_0xb9e7a(0x1c1)]);_0x2a6b1a&&_0x2a6b1a[_0xb9e7a(0x1b7)]&&this['_threadCommentModel'][_0xb9e7a(0x1d3)](_0x25da35,_0x40d396,_0xebbb27['replyId']);break;}case _0x13e2d0[_0xb9e7a(0x1b5)]:{this[_0xb9e7a(0x1db)][_0xb9e7a(0x1f8)](_0x25da35,_0x40d396,{'commentId':_0xebbb27[_0xb9e7a(0x1c1)],'text':JSON[_0xb9e7a(0x211)](_0xebbb27[_0xb9e7a(0x1d8)])});break;}case _0x13e2d0[_0xb9e7a(0x1ee)]:{const _0x2c2285=(_0x1679fb=this[_0xb9e7a(0x1db)][_0xb9e7a(0x1b4)](_0xebbb27[_0xb9e7a(0x1be)])[_0xb9e7a(0x1e0)](_0x3e4d3f=>_0x3e4d3f[_0xb9e7a(0x1ff)]===_0xebbb27[_0xb9e7a(0x1ff)]))==null?void 0x0:_0x1679fb[_0xb9e7a(0x226)];_0x2c2285&&this[_0xb9e7a(0x1db)]['resolveComment'](_0x25da35,_0x40d396,_0x2c2285['id'],_0xebbb27[_0xb9e7a(0x21c)]===_0x271263[_0xb9e7a(0x1b0)]);break;}}}));}};_0x169a97=_0x5d48ff([_0x5130cb(0x0,_0xca3df0['Inject'](_0xd637b2[_0x1b6927(0x220)])),_0x5130cb(0x1,_0xca3df0['Inject'](_0xc5ac98['ThreadCommentModel'])),_0x5130cb(0x2,_0xca3df0['Inject'](_0xca3df0['UserManagerService'])),_0x5130cb(0x3,_0xca3df0[_0x1b6927(0x202)](_0xca3df0['Injector']))],_0x169a97);const _0x2b4a16=_0x1b6927(0x208),_0x261ea6={};var _0x30124f=Object[_0x1b6927(0x229)],_0x142f98=(_0x49e3dd,_0x247b98,_0x425fc2,_0x13c3f0)=>{const _0x9269f9=_0x1b6927;for(var _0x28f474=_0x13c3f0>0x1?void 0x0:_0x13c3f0?_0x30124f(_0x247b98,_0x425fc2):_0x247b98,_0x523210=_0x49e3dd[_0x9269f9(0x221)]-0x1,_0x15595e;_0x523210>=0x0;_0x523210--)(_0x15595e=_0x49e3dd[_0x523210])&&(_0x28f474=_0x15595e(_0x28f474)||_0x28f474);return _0x28f474;},_0x7bf77=(_0x54d7ff,_0x33cafe)=>(_0x1e984d,_0x8853f0)=>_0x33cafe(_0x1e984d,_0x8853f0,_0x54d7ff);function _0xb8caed(_0x137d6d,_0x47f4ef){const _0x26c914=_0x1b6927,_0x49ce09=_0x137d6d[_0x26c914(0x1fb)][0x0];return{..._0x47f4ef,'id':_0x49ce09[_0x26c914(0x1c1)],'resolved':_0x137d6d[_0x26c914(0x21c)]===0x1,'dT':_0x5106e7(_0x49ce09[_0x26c914(0x1f0)]),'personId':_0x49ce09['userId'],'threadId':_0x49ce09[_0x26c914(0x1ff)]};}function _0x2f96a7(_0x1d0c80,_0xdefb4f,_0x211782){const _0x5f2aa7=_0x1b6927;var _0x190d49,_0x5019e5;if(((_0x5019e5=(_0x190d49=_0x1d0c80==null?void 0x0:_0x1d0c80[_0x5f2aa7(0x1fb)])==null?void 0x0:_0x190d49[_0x5f2aa7(0x221)])!=null?_0x5019e5:0x0)>0x0){const _0x22d9e8=(_0x513878,_0x438eb7)=>({'id':_0x513878['replyId'],'threadId':_0x513878[_0x5f2aa7(0x1ff)],'dT':_0x5106e7(_0x513878['createTimestamp']),'personId':_0x513878[_0x5f2aa7(0x1d0)],'resolved':_0x1d0c80[_0x5f2aa7(0x21c)]===_0x271263[_0x5f2aa7(0x1b0)],'unitId':_0xdefb4f,'subUnitId':_0x211782,'text':JSON[_0x5f2aa7(0x211)](_0x513878[_0x5f2aa7(0x1d8)]),'parentId':_0x438eb7}),_0x56b151=_0x22d9e8(_0x1d0c80['replies'][0x0]);return{..._0x56b151,'children':_0x1d0c80[_0x5f2aa7(0x1fb)][_0x5f2aa7(0x1a8)](0x1)[_0x5f2aa7(0x1d1)](_0x46d726=>_0x22d9e8(_0x46d726,_0x56b151['id']))};}return null;}let _0x23fd58=class{constructor(_0x53d34d,_0x5b4dd3,_0x1d7ad1){const _0x12ef84=_0x1b6927;this[_0x12ef84(0x1b3)]=_0x53d34d,this[_0x12ef84(0x1d5)]=_0x5b4dd3,this[_0x12ef84(0x1bc)]=_0x1d7ad1;}async[_0x1b6927(0x203)](_0x2f0a2f){const _0x389dd6=_0x1b6927;var _0x24b8a1,_0x1b8d85;const {parentId:_0x5eb9d3,unitId:_0x4ffa80,text:_0x4cc82c,threadId:_0x2b5298}=_0x2f0a2f,_0xf39665=(_0x1b8d85=(_0x24b8a1=_0x4cc82c[_0x389dd6(0x1cc)])==null?void 0x0:_0x24b8a1[_0x389dd6(0x1e3)](_0x3d094d=>_0x3d094d['rangeType']===_0xca3df0['CustomRangeType'][_0x389dd6(0x1fd)])[_0x389dd6(0x1d1)](_0x59e52c=>_0x59e52c[_0x389dd6(0x1d7)]))!=null?_0x1b8d85:[],_0x608a16=JSON[_0x389dd6(0x1c0)](_0x4cc82c),_0x596cf0=(await this['_sessionService']['requireSession'](_0x4ffa80))[_0x389dd6(0x1ad)]();if(_0x5eb9d3){const _0x15a37b={'memberId':_0x596cf0,'unitId':_0x4ffa80,'content':_0x608a16,'mention':_0xf39665,'threadId':_0x2b5298},_0x150565=(await this[_0x389dd6(0x1b3)][_0x389dd6(0x219)](_0x389dd6(0x1ef)+_0x4ffa80+_0x389dd6(0x21d),{'body':_0x15a37b}))['body'][_0x389dd6(0x1c3)];return{..._0x2f0a2f,'id':_0x150565[_0x389dd6(0x1c1)],'dT':_0xca3df0['dayjs'](+_0x150565[_0x389dd6(0x1f0)])[_0x389dd6(0x22b)](_0x389dd6(0x1bb)),'personId':_0x150565[_0x389dd6(0x1d0)]};}else{const _0x68ebbd={'memberId':_0x596cf0,'unitId':_0x4ffa80,'content':_0x608a16,'mention':_0xf39665},_0x356182=await this['_httpService'][_0x389dd6(0x219)](_0x389dd6(0x1ef)+_0x4ffa80+_0x389dd6(0x1bd),{'body':_0x68ebbd});return _0xb8caed(_0x356182[_0x389dd6(0x1c2)][_0x389dd6(0x1e9)],_0x2f0a2f);}}async['updateComment'](_0x5a616f){const _0x432668=_0x1b6927;var _0xbf30d8,_0x440dce;const {text:_0x2b054f,unitId:_0x575368}=_0x5a616f,_0x566e27=(_0x440dce=(_0xbf30d8=_0x2b054f[_0x432668(0x1cc)])==null?void 0x0:_0xbf30d8[_0x432668(0x1e3)](_0x2049aa=>_0x2049aa[_0x432668(0x218)]===_0xca3df0[_0x432668(0x1d4)]['COMMENT'])[_0x432668(0x1d1)](_0x1ba003=>_0x1ba003[_0x432668(0x1d7)]))!=null?_0x440dce:[],_0x4fd834=JSON['stringify'](_0x2b054f),_0x34e533=_0x5a616f[_0x432668(0x1ff)],_0x229c6f=_0x5a616f['id'],_0x3d3781={'memberId':(await this[_0x432668(0x1bc)][_0x432668(0x1f5)](_0x575368))[_0x432668(0x1ad)](),'unitId':_0x575368,'threadId':_0x34e533,'mention':_0x566e27,'content':_0x4fd834,'replyId':_0x229c6f},_0x3a3d0a=await this[_0x432668(0x1b3)][_0x432668(0x219)](_0x432668(0x1ef)+_0x575368+_0x432668(0x1ac),{'body':_0x3d3781});return!_0x3a3d0a[_0x432668(0x1c2)]['error']||_0x3a3d0a[_0x432668(0x1c2)][_0x432668(0x1f7)]['code']===0x1;}async[_0x1b6927(0x1ca)](_0x5eb025){const _0xed5df4=_0x1b6927,{unitId:_0x241955}=_0x5eb025,_0x5db4b7=_0x5eb025['threadId'],_0x5c59d4={'memberId':this[_0xed5df4(0x1d5)][_0xed5df4(0x1ab)]()[_0xed5df4(0x1d6)],'unitId':_0x241955,'threadId':_0x5db4b7,'solved':_0x5eb025[_0xed5df4(0x20a)]?_0x271263['Solved']:_0x271263[_0xed5df4(0x205)]},_0x15e0eb=await this[_0xed5df4(0x1b3)]['post'](_0xed5df4(0x1ef)+_0x241955+_0xed5df4(0x1cb),{'body':_0x5c59d4});return!_0x15e0eb[_0xed5df4(0x1c2)]['error']||_0x15e0eb['body'][_0xed5df4(0x1f7)]['code']===0x1;}async[_0x1b6927(0x1d3)](_0x30e3ea,_0x72815a,_0x34c545,_0xa7f3b0){const _0x543651=_0x1b6927,_0x35a5bd={'memberId':(await this[_0x543651(0x1bc)][_0x543651(0x1f5)](_0x30e3ea))[_0x543651(0x1ad)](),'threadId':_0x34c545,'replyId':_0xa7f3b0,'unitId':_0x30e3ea},_0x1e9249=await this['_httpService']['post'](_0x543651(0x1ef)+_0x30e3ea+_0x543651(0x1dd),{'body':_0x35a5bd});return!_0x1e9249[_0x543651(0x1c2)][_0x543651(0x1f7)]||_0x1e9249[_0x543651(0x1c2)][_0x543651(0x1f7)]['code']===0x1;}async['listComments'](_0x2abc2b,_0x5d993b,_0x2c3a17){const _0x3192ee=_0x1b6927,_0x4d9189={'unitId':_0x2abc2b,'threadId':_0x2c3a17},_0xada11e=await this['_httpService'][_0x3192ee(0x219)](_0x3192ee(0x1ef)+_0x2abc2b+_0x3192ee(0x1c4),{'body':_0x4d9189}),_0x3314d4=_0x2c3a17['map'](_0x1e6fb7=>_0x2f96a7(_0xada11e['body'][_0x3192ee(0x212)][_0x1e6fb7],_0x2abc2b,_0x5d993b))[_0x3192ee(0x1e3)](Boolean);return Object[_0x3192ee(0x210)](_0xada11e[_0x3192ee(0x1c2)][_0x3192ee(0x1f3)])[_0x3192ee(0x1b9)](_0x7517=>{this['_userService']['addUser'](_0x7517);}),_0x3314d4;}[_0x1b6927(0x20f)](_0x75dab){const _0x365244=_0x1b6927;return{'id':_0x75dab['id'],'threadId':_0x75dab[_0x365244(0x1ff)],'ref':_0x75dab[_0x365244(0x22c)]};}};_0x23fd58=_0x142f98([_0x7bf77(0x0,_0xca3df0['Inject'](_0x2413ad[_0x1b6927(0x1b6)])),_0x7bf77(0x1,_0xca3df0[_0x1b6927(0x202)](_0xca3df0[_0x1b6927(0x1df)])),_0x7bf77(0x2,_0xca3df0['Inject'](_0xd637b2[_0x1b6927(0x1da)]))],_0x23fd58);var _0x5544c9=Object[_0x1b6927(0x229)],_0x4a5157=(_0x2f4d54,_0x42256a,_0x5c302f,_0x6d5afc)=>{const _0x5d7d68=_0x1b6927;for(var _0x96adf1=_0x6d5afc>0x1?void 0x0:_0x6d5afc?_0x5544c9(_0x42256a,_0x5c302f):_0x42256a,_0x2319cf=_0x2f4d54[_0x5d7d68(0x221)]-0x1,_0x1d7575;_0x2319cf>=0x0;_0x2319cf--)(_0x1d7575=_0x2f4d54[_0x2319cf])&&(_0x96adf1=_0x1d7575(_0x96adf1)||_0x96adf1);return _0x96adf1;},_0x23beb0=(_0x15a4c6,_0x4381db)=>(_0x25886b,_0xab13fd)=>_0x4381db(_0x25886b,_0xab13fd,_0x15a4c6);let _0x4213a4=class extends _0xca3df0['Disposable']{constructor(_0x21d371,_0x5d5c33){const _0x178092=_0x1b6927;super(),this[_0x178092(0x22f)]=_0x21d371,this[_0x178092(0x1af)]=_0x5d5c33,this[_0x178092(0x1c8)]();}[_0x1b6927(0x1c8)](){const _0x32b8ed=_0x1b6927;this[_0x32b8ed(0x22f)][_0x32b8ed(0x1ec)]=this[_0x32b8ed(0x1af)],this[_0x32b8ed(0x22f)]['syncUpdateMutationToColla']=!0x1;}};_0x4213a4=_0x4a5157([_0x23beb0(0x0,_0xc5ac98[_0x1b6927(0x1c9)]),_0x23beb0(0x1,_0xca3df0[_0x1b6927(0x202)](_0x23fd58))],_0x4213a4);var _0x57b98a=Object[_0x1b6927(0x22d)],_0x36553a=Object[_0x1b6927(0x229)],_0xd73c6f=(_0x58ea0e,_0x386796,_0x249734)=>_0x386796 in _0x58ea0e?_0x57b98a(_0x58ea0e,_0x386796,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x249734}):_0x58ea0e[_0x386796]=_0x249734,_0x334824=(_0x25bea0,_0x467bd7,_0x4af12d,_0x24d34f)=>{const _0x13ae0d=_0x1b6927;for(var _0x3c14b9=_0x24d34f>0x1?void 0x0:_0x24d34f?_0x36553a(_0x467bd7,_0x4af12d):_0x467bd7,_0x3a9f9f=_0x25bea0[_0x13ae0d(0x221)]-0x1,_0x5deb58;_0x3a9f9f>=0x0;_0x3a9f9f--)(_0x5deb58=_0x25bea0[_0x3a9f9f])&&(_0x3c14b9=_0x5deb58(_0x3c14b9)||_0x3c14b9);return _0x3c14b9;},_0x4a30e2=(_0x529ae3,_0x40f71)=>(_0x334f0d,_0x379c60)=>_0x40f71(_0x334f0d,_0x379c60,_0x529ae3),_0x3851b7=(_0x1a00ea,_0x10d732,_0x4e1baa)=>_0xd73c6f(_0x1a00ea,typeof _0x10d732!=_0x1b6927(0x224)?_0x10d732+'':_0x10d732,_0x4e1baa);_0x1384e2[_0x1b6927(0x1aa)]=class extends _0xca3df0[_0x1b6927(0x20b)]{constructor(_0x47fa39=_0x261ea6,_0x1fc894,_0x35e781){const _0x38f22a=_0x1b6927;super(),this[_0x38f22a(0x200)]=_0x47fa39,this['_injector']=_0x1fc894,this[_0x38f22a(0x209)]=_0x35e781;const {..._0x4e5127}=_0xca3df0[_0x38f22a(0x216)]({},_0x261ea6,this[_0x38f22a(0x200)]);this[_0x38f22a(0x209)][_0x38f22a(0x20d)](_0x2b4a16,_0x4e5127);}[_0x1b6927(0x1e8)](){const _0x4013be=_0x1b6927;[[_0x23fd58],[_0x4213a4],[_0x169a97]][_0x4013be(0x1b9)](_0x4bd13e=>{const _0x29bdb3=_0x4013be;this['_injector'][_0x29bdb3(0x1ea)](_0x4bd13e);});}[_0x1b6927(0x1ce)](){const _0x14f6ac=_0x1b6927;this['_injector'][_0x14f6ac(0x222)](_0x4213a4),this[_0x14f6ac(0x1eb)][_0x14f6ac(0x222)](_0x169a97);}},_0x3851b7(_0x1384e2['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x36886f),_0x3851b7(_0x1384e2[_0x1b6927(0x1aa)],'type',_0xca3df0[_0x1b6927(0x20c)]['UNIVER_UNKNOWN']),_0x1384e2[_0x1b6927(0x1aa)]=_0x334824([_0xca3df0[_0x1b6927(0x1f2)](_0x2832a7[_0x1b6927(0x1ae)],_0xd637b2[_0x1b6927(0x227)],_0xb4ec85[_0x1b6927(0x1e4)]),_0x4a30e2(0x1,_0xca3df0[_0x1b6927(0x202)](_0xca3df0[_0x1b6927(0x21f)])),_0x4a30e2(0x2,_0xca3df0['IConfigService'])],_0x1384e2['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x1384e2,Symbol['toStringTag'],{'value':_0x1b6927(0x213)});}));function _0x5033(_0xc0537e,_0x1adce0){const _0x1b2795=_0x1b27();return _0x5033=function(_0x503383,_0x3f76e4){_0x503383=_0x503383-0x1a7;let _0x77dcdc=_0x1b2795[_0x503383];return _0x77dcdc;},_0x5033(_0xc0537e,_0x1adce0);}function _0x1b27(){const _0xdeb7d=['saveCommentToSnapshot','values','parse','comments','Module','@univerjs/thread-comment','168GNkJxY','merge','_init','rangeType','post','size','@univerjs/core','solved','/reply','disposeWithMe','Injector','CommentService','length','get','UniverProLicense','symbol','1VpHjhg','root','UniverCollaborationClientPlugin','2663028SBBzJe','getOwnPropertyDescriptor','exports','format','ref','defineProperty','2874435HYLHpl','_threadCommentDataSourceService','Disposable','slice','commentUpdate$','UniverThreadCommentDataSourcePlugin','getCurrentUser','/edit','getMemberID','UniverThreadCommentUIPlugin','_threadCommentDataSource','Solved','UniverThreadComment','@univerjs-pro/license','_httpService','getUnit','Edit','HTTPService','parentId','subscribe','forEach','Reply','YYYY/MM/DD\x20HH:mm','_sessionService','/add','unitId','51079DAafEw','stringify','replyId','body','reply','/list','UNRECOGNIZED','UniverProCollaborationClient','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','IThreadCommentDataSourceService','resolveComment','/solved','customRanges','bufferTime','onReady','UniverCore','userId','map','/universer-api/user/list','deleteComment','CustomRangeType','_userService','userID','rangeId','content','getUser','CollaborationSessionService','_threadCommentModel','amd','/delete','getComment','UserManagerService','find','3363925zGFFLr','_commentService','filter','UniverLicensePlugin','1221314cqUYdO','Add','UniverThreadCommentUi','onStarting','comment','add','_injector','dataSource','Unknown','Solve','/universer-api/comment/unit/','createTimestamp','object','DependentOn','users','@univerjs/thread-comment-ui','requireSession','addUser','error','updateComment','type','UniverProThreadCommentDatasource','replies','user','COMMENT','227646sBLrkM','threadId','_config','rxjs','Inject','addComment','payload','OpenOrReOpen','6664432eQPbES','function','thread-comment-data-source.config','_configService','resolved','Plugin','UniverInstanceType','setConfig','Delete'];_0x1b27=function(){return _0xdeb7d;};return _0x1b27();}
|
|
1
|
+
function _0x1ebe(){const _0x58ea8c=['forEach','COMMENT','/delete','Unknown','/edit','UNRECOGNIZED','UserManagerService','rxjs','ref','userId','defineProperty','Plugin','1049480kAfVtO','UniverCollaborationClientPlugin','values','payload','reply','Reply','/universer-api/user/list','UniverThreadComment','content','length','@univerjs/network','_threadCommentDataSourceService','replies','_initDataSource','merge','format','_threadCommentDataSource','amd','Disposable','OpenOrReOpen','UniverThreadCommentUIPlugin','Injector','IConfigService','slice','/add','Add','customRanges','ThreadCommentModel','personId','comments','/reply','_threadCommentModel','get','UniverNetwork','userID','addComment','@univerjs/thread-comment','toStringTag','user','Edit','parse','root','add','_httpService','DependentOn','@univerjs/core','dayjs','1882436lDTbLw','object','saveCommentToSnapshot','code','@univerjs-pro/license','getUnit','listComments','552393avqeDn','11VOoLzL','72mNVIHC','resolveComment','rangeId','Inject','map','pipe','requireSession','type','YYYY/MM/DD\x20HH:mm','_commentService','_init','filter','function','getComment','createTimestamp','body','subscribe','dataSource','UniverInstanceType','Module','find','UniverThreadCommentDataSourcePlugin','disposeWithMe','setConfig','253743pBxBTy','_config','15057fjiaJh','post','599742BomZqA','UniverLicensePlugin','_injector','onStarting','Solved','CustomRangeType','error','getOwnPropertyDescriptor','HTTPService','_sessionService','Solve','updateComment','resolved','5kihykd','CommentService','getCurrentUser','UniverCore','users','unitId','/solved','_configService','commentUpdate$','exports','bufferTime','threadId','replyId','deleteComment','_userService','UniverThreadCommentUi','310hZhfFL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','_initUserSync','syncUpdateMutationToColla','UniverProCollaborationClient','getMemberID','solved','Delete','IThreadCommentDataSourceService','stringify','rangeType','/universer-api/comment/unit/','4478747KfKlyO','delete'];_0x1ebe=function(){return _0x58ea8c;};return _0x1ebe();}function _0x58ac(_0x53bc05,_0x533327){const _0x1ebed0=_0x1ebe();return _0x58ac=function(_0x58acf6,_0x2b0d31){_0x58acf6=_0x58acf6-0x69;let _0xaf638d=_0x1ebed0[_0x58acf6];return _0xaf638d;},_0x58ac(_0x53bc05,_0x533327);}(function(_0x312056,_0x5f26f9){const _0x19c920=_0x58ac,_0x2d0e4b=_0x312056();while(!![]){try{const _0x292345=parseInt(_0x19c920(0x71))/0x1+parseInt(_0x19c920(0x92))/0x2*(parseInt(_0x19c920(0x73))/0x3)+parseInt(_0x19c920(0xdc))/0x4*(-parseInt(_0x19c920(0x82))/0x5)+-parseInt(_0x19c920(0x75))/0x6+parseInt(_0x19c920(0x9f))/0x7+-parseInt(_0x19c920(0xe5))/0x8*(parseInt(_0x19c920(0xe3))/0x9)+-parseInt(_0x19c920(0xad))/0xa*(parseInt(_0x19c920(0xe4))/0xb);if(_0x292345===_0x5f26f9)break;else _0x2d0e4b['push'](_0x2d0e4b['shift']());}catch(_0x3f6da6){_0x2d0e4b['push'](_0x2d0e4b['shift']());}}}(_0x1ebe,0x6c4d2),function(_0x5bd754,_0x7e3661){const _0xab8b2a=_0x58ac;typeof exports==_0xab8b2a(0xdd)&&typeof module<'u'?_0x7e3661(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xab8b2a(0xf1)&&define[_0xab8b2a(0xbe)]?define([_0xab8b2a(0x8b),'@univerjs-pro/collaboration-client',_0xab8b2a(0xe0),_0xab8b2a(0xda),'@univerjs/thread-comment-ui',_0xab8b2a(0xd1),_0xab8b2a(0xa8),_0xab8b2a(0xb7)],_0x7e3661):(_0x5bd754=typeof globalThis<'u'?globalThis:_0x5bd754||self,_0x7e3661(_0x5bd754['UniverProThreadCommentDatasource']={},_0x5bd754[_0xab8b2a(0x97)],_0x5bd754['UniverProLicense'],_0x5bd754[_0xab8b2a(0x85)],_0x5bd754[_0xab8b2a(0x91)],_0x5bd754[_0xab8b2a(0xb4)],_0x5bd754['rxjs'],_0x5bd754[_0xab8b2a(0xce)]));}(this,function(_0x2d7c01,_0x38db26,_0x1c1974,_0x4fd5eb,_0x918915,_0x23229c,_0x4ad042,_0x13aaef){'use strict';const _0x2c5749=_0x58ac;const _0x2c0766=_0x2c5749(0x93);var _0x4cd869=(_0x33004f=>(_0x33004f[_0x33004f[_0x2c5749(0xc0)]=0x0]=_0x2c5749(0xc0),_0x33004f[_0x33004f[_0x2c5749(0x79)]=0x1]=_0x2c5749(0x79),_0x33004f[_0x33004f[_0x2c5749(0xa6)]=-0x1]=_0x2c5749(0xa6),_0x33004f))(_0x4cd869||{}),_0x524e79=(_0x4ecde9=>(_0x4ecde9[_0x4ecde9['Unknown']=0x0]=_0x2c5749(0xa4),_0x4ecde9[_0x4ecde9[_0x2c5749(0xc6)]=0x1]=_0x2c5749(0xc6),_0x4ecde9[_0x4ecde9[_0x2c5749(0xb2)]=0x2]='Reply',_0x4ecde9[_0x4ecde9[_0x2c5749(0xd4)]=0x3]=_0x2c5749(0xd4),_0x4ecde9[_0x4ecde9[_0x2c5749(0x9a)]=0x4]=_0x2c5749(0x9a),_0x4ecde9[_0x4ecde9['Solve']=0x5]=_0x2c5749(0x7f),_0x4ecde9[_0x4ecde9['UNRECOGNIZED']=-0x1]=_0x2c5749(0xa6),_0x4ecde9))(_0x524e79||{});const _0x1e9c18=_0x267616=>_0x4fd5eb[_0x2c5749(0xdb)](new Date(+_0x267616))[_0x2c5749(0xbc)]('YYYY/MM/DD\x20HH:mm'),_0x12a72b=async(_0x2bc260,_0x39cb72)=>{const _0x1715d1=_0x2c5749,_0x356b21=_0x2bc260['get'](_0x4fd5eb[_0x1715d1(0xa7)]),_0x316127=_0x2bc260['get'](_0x13aaef[_0x1715d1(0x7d)]);_0x39cb72[_0x1715d1(0xa1)](_0x29be39=>{const _0x16486a=_0x1715d1;_0x356b21['getUser'](_0x29be39)&&_0x39cb72[_0x16486a(0xa0)](_0x29be39);}),_0x39cb72['size']&&(await _0x316127['get'](_0x1715d1(0xb3),{'params':{'userIDs':[..._0x39cb72]}}))[_0x1715d1(0xf4)]['users']['forEach'](_0x90f02f=>{const _0x2ed98b=_0x1715d1;_0x90f02f&&_0x356b21[_0x2ed98b(0x94)](_0x90f02f);});};var _0x235634=Object[_0x2c5749(0x7c)],_0x5a156e=(_0x51aa44,_0x5485d7,_0xc502c7,_0x4ce7b5)=>{const _0x423f70=_0x2c5749;for(var _0x228053=_0x4ce7b5>0x1?void 0x0:_0x4ce7b5?_0x235634(_0x5485d7,_0xc502c7):_0x5485d7,_0x1e31b1=_0x51aa44[_0x423f70(0xb6)]-0x1,_0x380b9c;_0x1e31b1>=0x0;_0x1e31b1--)(_0x380b9c=_0x51aa44[_0x1e31b1])&&(_0x228053=_0x380b9c(_0x228053)||_0x228053);return _0x228053;},_0x4ecb05=(_0x436f6d,_0x2cc073)=>(_0x1b833e,_0x12792b)=>_0x2cc073(_0x1b833e,_0x12792b,_0x436f6d);let _0x42adbc=class extends _0x4fd5eb[_0x2c5749(0xbf)]{constructor(_0x11b319,_0x295c68,_0x34d627,_0x1011e7){const _0x5d8638=_0x2c5749;super(),this[_0x5d8638(0xee)]=_0x11b319,this['_threadCommentModel']=_0x295c68,this[_0x5d8638(0x90)]=_0x34d627,this[_0x5d8638(0x77)]=_0x1011e7,this[_0x5d8638(0xef)](),this[_0x5d8638(0x95)]();}['_initUserSync'](){const _0x1c633e=_0x2c5749;this[_0x1c633e(0x6f)](this[_0x1c633e(0xcc)][_0x1c633e(0x8a)][_0x1c633e(0xea)](_0x4ad042[_0x1c633e(0x8c)](0x10))[_0x1c633e(0x69)](_0x1d7f1b=>{const _0x4fbc22=_0x1c633e,_0x166617=new Set();_0x1d7f1b['forEach'](_0x35bab7=>{const _0x7ad427=_0x58ac;switch(_0x35bab7['type']){case _0x7ad427(0xd7):{const _0x23b4cb=_0x35bab7[_0x7ad427(0xb0)][_0x7ad427(0xc9)];_0x166617[_0x7ad427(0xd7)](_0x23b4cb);break;}}}),_0x12a72b(this[_0x4fbc22(0x77)],_0x166617);}));}[_0x2c5749(0xef)](){const _0x197ed4=_0x2c5749;this['disposeWithMe'](this['_commentService'][_0x197ed4(0x8a)][_0x197ed4(0x69)](async _0x13c850=>{const _0x5ac70b=_0x197ed4;var _0x633892,_0x373d00,_0x4aed86,_0x5dc706;const _0x385c6e=(_0x633892=this[_0x5ac70b(0xcc)]['getUnit'](_0x13c850[_0x5ac70b(0x87)])[_0x5ac70b(0x6d)](_0x32467a=>_0x32467a[_0x5ac70b(0x8d)]===_0x13c850['threadId']))==null?void 0x0:_0x633892[_0x5ac70b(0xd6)];if(!_0x385c6e)return;const {unitId:_0x5dfb19,subUnitId:_0x2b3d03}=_0x385c6e;switch(_0x13c850[_0x5ac70b(0xd3)]&&this[_0x5ac70b(0x90)]['addUser'](_0x13c850[_0x5ac70b(0xd3)]),_0x13c850[_0x5ac70b(0xec)]){case _0x524e79[_0x5ac70b(0xc6)]:break;case _0x524e79[_0x5ac70b(0xb2)]:{this[_0x5ac70b(0xcc)][_0x5ac70b(0xd0)](_0x5dfb19,_0x2b3d03,{'unitId':_0x5dfb19,'subUnitId':_0x2b3d03,'ref':'','id':_0x13c850['replyId'],'dT':_0x1e9c18(+_0x13c850[_0x5ac70b(0xf3)]),'threadId':_0x13c850[_0x5ac70b(0x8d)],'personId':(_0x4aed86=(_0x373d00=_0x13c850['user'])==null?void 0x0:_0x373d00['userID'])!=null?_0x4aed86:_0x13c850['userId'],'text':JSON['parse'](_0x13c850[_0x5ac70b(0xb5)]),'parentId':_0x385c6e['id']});break;}case _0x524e79[_0x5ac70b(0x9a)]:{const _0x31eb9a=this[_0x5ac70b(0xcc)][_0x5ac70b(0xf2)](_0x5dfb19,_0x2b3d03,_0x13c850[_0x5ac70b(0x8e)]);_0x31eb9a&&_0x31eb9a['parentId']&&this['_threadCommentModel'][_0x5ac70b(0x8f)](_0x5dfb19,_0x2b3d03,_0x13c850['replyId']);break;}case _0x524e79[_0x5ac70b(0xd4)]:{this[_0x5ac70b(0xcc)]['updateComment'](_0x5dfb19,_0x2b3d03,{'commentId':_0x13c850['replyId'],'text':JSON['parse'](_0x13c850[_0x5ac70b(0xb5)])});break;}case _0x524e79['Solve']:{const _0x21101b=(_0x5dc706=this['_threadCommentModel'][_0x5ac70b(0xe1)](_0x13c850['unitId'])[_0x5ac70b(0x6d)](_0x21a18f=>_0x21a18f[_0x5ac70b(0x8d)]===_0x13c850[_0x5ac70b(0x8d)]))==null?void 0x0:_0x5dc706[_0x5ac70b(0xd6)];_0x21101b&&this[_0x5ac70b(0xcc)][_0x5ac70b(0xe6)](_0x5dfb19,_0x2b3d03,_0x21101b['id'],_0x13c850[_0x5ac70b(0x99)]===_0x4cd869['Solved']);break;}}}));}};_0x42adbc=_0x5a156e([_0x4ecb05(0x0,_0x4fd5eb[_0x2c5749(0xe8)](_0x38db26[_0x2c5749(0x83)])),_0x4ecb05(0x1,_0x4fd5eb[_0x2c5749(0xe8)](_0x23229c[_0x2c5749(0xc8)])),_0x4ecb05(0x2,_0x4fd5eb['Inject'](_0x4fd5eb[_0x2c5749(0xa7)])),_0x4ecb05(0x3,_0x4fd5eb['Inject'](_0x4fd5eb[_0x2c5749(0xc2)]))],_0x42adbc);const _0x276fbf='thread-comment-data-source.config',_0x432237={};var _0x4458b1=Object[_0x2c5749(0x7c)],_0x1db690=(_0x109e1c,_0x214aff,_0xab3e00,_0x5c5c93)=>{for(var _0x4e7f26=_0x5c5c93>0x1?void 0x0:_0x5c5c93?_0x4458b1(_0x214aff,_0xab3e00):_0x214aff,_0x2f10c3=_0x109e1c['length']-0x1,_0x11d560;_0x2f10c3>=0x0;_0x2f10c3--)(_0x11d560=_0x109e1c[_0x2f10c3])&&(_0x4e7f26=_0x11d560(_0x4e7f26)||_0x4e7f26);return _0x4e7f26;},_0x2fa1de=(_0x1a4c21,_0xd75427)=>(_0x3cb2f2,_0x3d9159)=>_0xd75427(_0x3cb2f2,_0x3d9159,_0x1a4c21);function _0x192603(_0x9e1f1b,_0x435440){const _0xb16616=_0x2c5749,_0x1a70be=_0x9e1f1b['replies'][0x0];return{..._0x435440,'id':_0x1a70be[_0xb16616(0x8e)],'resolved':_0x9e1f1b[_0xb16616(0x99)]===0x1,'dT':_0x1e9c18(_0x1a70be[_0xb16616(0xf3)]),'personId':_0x1a70be['userId'],'threadId':_0x1a70be[_0xb16616(0x8d)]};}function _0x4e9c9f(_0x369456,_0x307fd9,_0x38a601){const _0x21ef6c=_0x2c5749;var _0x101775,_0x3fbd4e;if(((_0x3fbd4e=(_0x101775=_0x369456==null?void 0x0:_0x369456[_0x21ef6c(0xb9)])==null?void 0x0:_0x101775[_0x21ef6c(0xb6)])!=null?_0x3fbd4e:0x0)>0x0){const _0x3e0ca8=(_0x3ee1f6,_0x47db0b)=>({'id':_0x3ee1f6['replyId'],'threadId':_0x3ee1f6['threadId'],'dT':_0x1e9c18(_0x3ee1f6[_0x21ef6c(0xf3)]),'personId':_0x3ee1f6[_0x21ef6c(0xaa)],'resolved':_0x369456[_0x21ef6c(0x99)]===_0x4cd869[_0x21ef6c(0x79)],'unitId':_0x307fd9,'subUnitId':_0x38a601,'text':JSON[_0x21ef6c(0xd5)](_0x3ee1f6[_0x21ef6c(0xb5)]),'parentId':_0x47db0b}),_0x3d7862=_0x3e0ca8(_0x369456[_0x21ef6c(0xb9)][0x0]);return{..._0x3d7862,'children':_0x369456[_0x21ef6c(0xb9)][_0x21ef6c(0xc4)](0x1)['map'](_0xd6c4b5=>_0x3e0ca8(_0xd6c4b5,_0x3d7862['id']))};}return null;}let _0x5e219c=class{constructor(_0x1d274f,_0x59f180,_0x3dacf9){const _0x1b3047=_0x2c5749;this['_httpService']=_0x1d274f,this['_userService']=_0x59f180,this[_0x1b3047(0x7e)]=_0x3dacf9;}async[_0x2c5749(0xd0)](_0x1789e1){const _0x4406ba=_0x2c5749;var _0x5f3d8a,_0x6a7ae9;const {parentId:_0x2b2605,unitId:_0x158f0b,text:_0x428b67,threadId:_0x341ef0}=_0x1789e1,_0x3d2062=(_0x6a7ae9=(_0x5f3d8a=_0x428b67[_0x4406ba(0xc7)])==null?void 0x0:_0x5f3d8a[_0x4406ba(0xf0)](_0x548e2a=>_0x548e2a[_0x4406ba(0x9d)]===_0x4fd5eb[_0x4406ba(0x7a)]['COMMENT'])[_0x4406ba(0xe9)](_0x1f7e4d=>_0x1f7e4d[_0x4406ba(0xe7)]))!=null?_0x6a7ae9:[],_0x5ed67f=JSON[_0x4406ba(0x9c)](_0x428b67),_0x2e4a4a=(await this[_0x4406ba(0x7e)]['requireSession'](_0x158f0b))['getMemberID']();if(_0x2b2605){const _0x30b587={'memberId':_0x2e4a4a,'unitId':_0x158f0b,'content':_0x5ed67f,'mention':_0x3d2062,'threadId':_0x341ef0},_0xbb48d=(await this[_0x4406ba(0xd8)][_0x4406ba(0x74)]('/universer-api/comment/unit/'+_0x158f0b+_0x4406ba(0xcb),{'body':_0x30b587}))['body'][_0x4406ba(0xb1)];return{..._0x1789e1,'id':_0xbb48d[_0x4406ba(0x8e)],'dT':_0x4fd5eb['dayjs'](+_0xbb48d['createTimestamp'])['format'](_0x4406ba(0xed)),'personId':_0xbb48d['userId']};}else{const _0x1ca04e={'memberId':_0x2e4a4a,'unitId':_0x158f0b,'content':_0x5ed67f,'mention':_0x3d2062},_0x1179c3=await this[_0x4406ba(0xd8)][_0x4406ba(0x74)]('/universer-api/comment/unit/'+_0x158f0b+_0x4406ba(0xc5),{'body':_0x1ca04e});return _0x192603(_0x1179c3['body']['comment'],_0x1789e1);}}async[_0x2c5749(0x80)](_0x3f2eb5){const _0x2e67ba=_0x2c5749;var _0x3451b5,_0xa659fe;const {text:_0xc8ca08,unitId:_0x122e0a}=_0x3f2eb5,_0x45b452=(_0xa659fe=(_0x3451b5=_0xc8ca08['customRanges'])==null?void 0x0:_0x3451b5[_0x2e67ba(0xf0)](_0x7d3851=>_0x7d3851['rangeType']===_0x4fd5eb['CustomRangeType'][_0x2e67ba(0xa2)])[_0x2e67ba(0xe9)](_0xc9078e=>_0xc9078e[_0x2e67ba(0xe7)]))!=null?_0xa659fe:[],_0x2815ad=JSON[_0x2e67ba(0x9c)](_0xc8ca08),_0x5bafdf=_0x3f2eb5[_0x2e67ba(0x8d)],_0x16a6c3=_0x3f2eb5['id'],_0x18d948={'memberId':(await this[_0x2e67ba(0x7e)]['requireSession'](_0x122e0a))[_0x2e67ba(0x98)](),'unitId':_0x122e0a,'threadId':_0x5bafdf,'mention':_0x45b452,'content':_0x2815ad,'replyId':_0x16a6c3},_0x44ab1e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x122e0a+_0x2e67ba(0xa5),{'body':_0x18d948});return!_0x44ab1e['body'][_0x2e67ba(0x7b)]||_0x44ab1e[_0x2e67ba(0xf4)][_0x2e67ba(0x7b)]['code']===0x1;}async['resolveComment'](_0x2483cd){const _0x42170d=_0x2c5749,{unitId:_0x5bdc0e}=_0x2483cd,_0x31b203=_0x2483cd[_0x42170d(0x8d)],_0x40ae9e={'memberId':this[_0x42170d(0x90)][_0x42170d(0x84)]()[_0x42170d(0xcf)],'unitId':_0x5bdc0e,'threadId':_0x31b203,'solved':_0x2483cd[_0x42170d(0x81)]?_0x4cd869['Solved']:_0x4cd869['OpenOrReOpen']},_0x3bc74e=await this[_0x42170d(0xd8)][_0x42170d(0x74)](_0x42170d(0x9e)+_0x5bdc0e+_0x42170d(0x88),{'body':_0x40ae9e});return!_0x3bc74e[_0x42170d(0xf4)]['error']||_0x3bc74e[_0x42170d(0xf4)]['error']['code']===0x1;}async[_0x2c5749(0x8f)](_0x144940,_0x23fd2c,_0x4997b7,_0x36f498){const _0x6c944a=_0x2c5749,_0x4d942d={'memberId':(await this[_0x6c944a(0x7e)][_0x6c944a(0xeb)](_0x144940))[_0x6c944a(0x98)](),'threadId':_0x4997b7,'replyId':_0x36f498,'unitId':_0x144940},_0x4dd83a=await this[_0x6c944a(0xd8)][_0x6c944a(0x74)](_0x6c944a(0x9e)+_0x144940+_0x6c944a(0xa3),{'body':_0x4d942d});return!_0x4dd83a['body'][_0x6c944a(0x7b)]||_0x4dd83a[_0x6c944a(0xf4)][_0x6c944a(0x7b)][_0x6c944a(0xdf)]===0x1;}async[_0x2c5749(0xe2)](_0x12b90e,_0x4e400a,_0x1d706e){const _0x10045d=_0x2c5749,_0x12503a={'unitId':_0x12b90e,'threadId':_0x1d706e},_0x1fe85c=await this[_0x10045d(0xd8)][_0x10045d(0x74)](_0x10045d(0x9e)+_0x12b90e+'/list',{'body':_0x12503a}),_0x1e1059=_0x1d706e['map'](_0x5911f4=>_0x4e9c9f(_0x1fe85c[_0x10045d(0xf4)][_0x10045d(0xca)][_0x5911f4],_0x12b90e,_0x4e400a))[_0x10045d(0xf0)](Boolean);return Object[_0x10045d(0xaf)](_0x1fe85c[_0x10045d(0xf4)][_0x10045d(0x86)])[_0x10045d(0xa1)](_0x2ba7db=>{this['_userService']['addUser'](_0x2ba7db);}),_0x1e1059;}[_0x2c5749(0xde)](_0x4ab6b5){const _0x230bd7=_0x2c5749;return{'id':_0x4ab6b5['id'],'threadId':_0x4ab6b5['threadId'],'ref':_0x4ab6b5[_0x230bd7(0xa9)]};}};_0x5e219c=_0x1db690([_0x2fa1de(0x0,_0x4fd5eb['Inject'](_0x13aaef[_0x2c5749(0x7d)])),_0x2fa1de(0x1,_0x4fd5eb[_0x2c5749(0xe8)](_0x4fd5eb['UserManagerService'])),_0x2fa1de(0x2,_0x4fd5eb['Inject'](_0x38db26['CollaborationSessionService']))],_0x5e219c);var _0x2fda56=Object['getOwnPropertyDescriptor'],_0x50f00a=(_0x1371d7,_0x4f62c3,_0x467f0f,_0x46b884)=>{const _0x575042=_0x2c5749;for(var _0x40084b=_0x46b884>0x1?void 0x0:_0x46b884?_0x2fda56(_0x4f62c3,_0x467f0f):_0x4f62c3,_0x814855=_0x1371d7[_0x575042(0xb6)]-0x1,_0x4b46ee;_0x814855>=0x0;_0x814855--)(_0x4b46ee=_0x1371d7[_0x814855])&&(_0x40084b=_0x4b46ee(_0x40084b)||_0x40084b);return _0x40084b;},_0x5c4b40=(_0x2a7cdf,_0x275b62)=>(_0x438f31,_0x16441f)=>_0x275b62(_0x438f31,_0x16441f,_0x2a7cdf);let _0x25d362=class extends _0x4fd5eb[_0x2c5749(0xbf)]{constructor(_0x322be6,_0x1e8e16){const _0x45d202=_0x2c5749;super(),this['_threadCommentDataSourceService']=_0x322be6,this[_0x45d202(0xbd)]=_0x1e8e16,this[_0x45d202(0xba)]();}['_initDataSource'](){const _0x8b5573=_0x2c5749;this[_0x8b5573(0xb8)][_0x8b5573(0x6a)]=this[_0x8b5573(0xbd)],this[_0x8b5573(0xb8)][_0x8b5573(0x96)]=!0x1;}};_0x25d362=_0x50f00a([_0x5c4b40(0x0,_0x23229c[_0x2c5749(0x9b)]),_0x5c4b40(0x1,_0x4fd5eb[_0x2c5749(0xe8)](_0x5e219c))],_0x25d362);var _0x3f2a07=Object[_0x2c5749(0xab)],_0x57b0c8=Object['getOwnPropertyDescriptor'],_0x4a0bb2=(_0x1599d4,_0x53da75,_0x3588a4)=>_0x53da75 in _0x1599d4?_0x3f2a07(_0x1599d4,_0x53da75,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3588a4}):_0x1599d4[_0x53da75]=_0x3588a4,_0x5de8ae=(_0x1e2ebb,_0xa1fc79,_0x29f2de,_0x1c4084)=>{const _0x42517e=_0x2c5749;for(var _0x110ea3=_0x1c4084>0x1?void 0x0:_0x1c4084?_0x57b0c8(_0xa1fc79,_0x29f2de):_0xa1fc79,_0x3b943d=_0x1e2ebb[_0x42517e(0xb6)]-0x1,_0x3983bf;_0x3b943d>=0x0;_0x3b943d--)(_0x3983bf=_0x1e2ebb[_0x3b943d])&&(_0x110ea3=_0x3983bf(_0x110ea3)||_0x110ea3);return _0x110ea3;},_0x15c57=(_0x4c2824,_0x11d5a0)=>(_0x489202,_0xa860d1)=>_0x11d5a0(_0x489202,_0xa860d1,_0x4c2824),_0x514383=(_0x817ea1,_0x4fe49c,_0xff6567)=>_0x4a0bb2(_0x817ea1,typeof _0x4fe49c!='symbol'?_0x4fe49c+'':_0x4fe49c,_0xff6567);_0x2d7c01[_0x2c5749(0x6e)]=class extends _0x4fd5eb[_0x2c5749(0xac)]{constructor(_0x15460f=_0x432237,_0x2c04a9,_0x3879db){const _0x380f3f=_0x2c5749;super(),this['_config']=_0x15460f,this[_0x380f3f(0x77)]=_0x2c04a9,this[_0x380f3f(0x89)]=_0x3879db;const {..._0x1abd95}=_0x4fd5eb[_0x380f3f(0xbb)]({},_0x432237,this[_0x380f3f(0x72)]);this[_0x380f3f(0x89)][_0x380f3f(0x70)](_0x276fbf,_0x1abd95);}[_0x2c5749(0x78)](){const _0x2c01b3=_0x2c5749;[[_0x5e219c],[_0x25d362],[_0x42adbc]][_0x2c01b3(0xa1)](_0x499c53=>{const _0x1b1f2f=_0x2c01b3;this[_0x1b1f2f(0x77)][_0x1b1f2f(0xd7)](_0x499c53);});}['onReady'](){const _0x302abe=_0x2c5749;this[_0x302abe(0x77)][_0x302abe(0xcd)](_0x25d362),this[_0x302abe(0x77)][_0x302abe(0xcd)](_0x42adbc);}},_0x514383(_0x2d7c01[_0x2c5749(0x6e)],'pluginName',_0x2c0766),_0x514383(_0x2d7c01['UniverThreadCommentDataSourcePlugin'],_0x2c5749(0xec),_0x4fd5eb[_0x2c5749(0x6b)]['UNIVER_UNKNOWN']),_0x2d7c01[_0x2c5749(0x6e)]=_0x5de8ae([_0x4fd5eb[_0x2c5749(0xd9)](_0x918915[_0x2c5749(0xc1)],_0x38db26[_0x2c5749(0xae)],_0x1c1974[_0x2c5749(0x76)]),_0x15c57(0x1,_0x4fd5eb[_0x2c5749(0xe8)](_0x4fd5eb['Injector'])),_0x15c57(0x2,_0x4fd5eb[_0x2c5749(0xc3)])],_0x2d7c01[_0x2c5749(0x6e)]),Object[_0x2c5749(0xab)](_0x2d7c01,Symbol[_0x2c5749(0xd2)],{'value':_0x2c5749(0x6c)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11-nightly.202510220308",
|
|
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.10.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/network": "0.10.
|
|
51
|
-
"@univerjs
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.11-nightly.202510220308",
|
|
49
|
+
"@univerjs-pro/license": "0.10.11-nightly.202510220308",
|
|
50
|
+
"@univerjs/network": "0.10.11-nightly.202510220308",
|
|
51
|
+
"@univerjs/core": "0.10.11-nightly.202510220308",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.11-nightly.202510220308",
|
|
54
|
+
"@univerjs/thread-comment": "0.10.11-nightly.202510220308"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
|
-
"typescript": "^5.9.
|
|
59
|
-
"vite": "^7.1.
|
|
58
|
+
"typescript": "^5.9.3",
|
|
59
|
+
"vite": "^7.1.10",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.11"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|