@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507131606 → 0.9.2-nightly.202507141607
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3f12ff=_0x4010;(function(_0x354f79,_0x22d64f){const _0x30eab3=_0x4010,_0x3f1718=_0x354f79();while(!![]){try{const _0x2306b1=-parseInt(_0x30eab3(0x1ff))/0x1+parseInt(_0x30eab3(0x20b))/0x2+parseInt(_0x30eab3(0x1de))/0x3*(-parseInt(_0x30eab3(0x1c8))/0x4)+parseInt(_0x30eab3(0x202))/0x5+parseInt(_0x30eab3(0x214))/0x6+parseInt(_0x30eab3(0x22a))/0x7*(-parseInt(_0x30eab3(0x224))/0x8)+parseInt(_0x30eab3(0x1ee))/0x9;if(_0x2306b1===_0x22d64f)break;else _0x3f1718['push'](_0x3f1718['shift']());}catch(_0x1fd701){_0x3f1718['push'](_0x3f1718['shift']());}}}(_0x9afa,0xe5397));Object[_0x3f12ff(0x223)](exports,Symbol[_0x3f12ff(0x1c1)],{'value':_0x3f12ff(0x1f4)});function _0x9afa(){const _0x3635ff=['subscribe','parentId','_threadCommentDataSource','createTimestamp','IConfigService','pluginName','getMemberID','error','values','488682YFTeAt','dayjs','commentUpdate$','stringify','syncUpdateMutationToColla','user','Module','length','_sessionService','/universer-api/comment/unit/','UNIVER_UNKNOWN','userID','COMMENT','UserManagerService','unitId','IThreadCommentDataSourceService','getCurrentUser','899079iDatFV','Plugin','_userService','3611205YfkfKH','_injector','body','Injector','Unknown','format','getUnit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','1258100SYHXSj','/reply','/universer-api/user/list','rangeType','comment','_init','size','forEach','YYYY/MM/DD\x20HH:mm','6790242MmWenc','UniverThreadCommentUIPlugin','Add','Inject','merge','_threadCommentDataSourceService','parse','comments','HTTPService','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','find','addUser','code','customRanges','defineProperty','9608tqqhIQ','Solved','/list','post','UNRECOGNIZED','replies','1043RAUeFJ','getUser','filter','UniverLicensePlugin','Solve','disposeWithMe','setConfig','onStarting','_config','_configService','map','Delete','CustomRangeType','Reply','userId','ThreadCommentModel','replyId','toStringTag','requireSession','pipe','reply','deleteComment','CommentService','/edit','18420eOZNGa','_initUserSync','/add','_httpService','symbol','_commentService','users','Edit','UniverInstanceType','/delete','add','resolveComment','Disposable','updateComment','getOwnPropertyDescriptor','slice','thread-comment-data-source.config','payload','type','threadId','_threadCommentModel','content','339hsNJtz','ref','getComment','personId','OpenOrReOpen','bufferTime','get'];_0x9afa=function(){return _0x3635ff;};return _0x9afa();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x3f12ff(0x209);var I=(_0x55eeba=>(_0x55eeba[_0x55eeba[_0x3f12ff(0x1e2)]=0x0]=_0x3f12ff(0x1e2),_0x55eeba[_0x55eeba['Solved']=0x1]=_0x3f12ff(0x225),_0x55eeba[_0x55eeba[_0x3f12ff(0x228)]=-0x1]=_0x3f12ff(0x228),_0x55eeba))(I||{}),v=(_0xb11008=>(_0xb11008[_0xb11008['Unknown']=0x0]=_0x3f12ff(0x206),_0xb11008[_0xb11008[_0x3f12ff(0x216)]=0x1]='Add',_0xb11008[_0xb11008[_0x3f12ff(0x1bd)]=0x2]=_0x3f12ff(0x1bd),_0xb11008[_0xb11008[_0x3f12ff(0x1cf)]=0x3]=_0x3f12ff(0x1cf),_0xb11008[_0xb11008[_0x3f12ff(0x235)]=0x4]=_0x3f12ff(0x235),_0xb11008[_0xb11008[_0x3f12ff(0x22e)]=0x5]='Solve',_0xb11008[_0xb11008['UNRECOGNIZED']=-0x1]=_0x3f12ff(0x228),_0xb11008))(v||{});const f=_0x484f94=>c[_0x3f12ff(0x1ef)](new Date(+_0x484f94))['format'](_0x3f12ff(0x213)),R=async(_0x3774bd,_0x36b32a)=>{const _0x58e353=_0x3f12ff,_0x12d8ff=_0x3774bd[_0x58e353(0x1e4)](c[_0x58e353(0x1fb)]),_0x47967b=_0x3774bd[_0x58e353(0x1e4)](P[_0x58e353(0x21c)]);_0x36b32a[_0x58e353(0x212)](_0x3a12a0=>{const _0x201bb8=_0x58e353;_0x12d8ff[_0x201bb8(0x22b)](_0x3a12a0)&&_0x36b32a['delete'](_0x3a12a0);}),_0x36b32a[_0x58e353(0x211)]&&(await _0x47967b['get'](_0x58e353(0x20d),{'params':{'userIDs':[..._0x36b32a]}}))[_0x58e353(0x204)][_0x58e353(0x1ce)][_0x58e353(0x212)](_0x37f7ae=>{_0x37f7ae&&_0x12d8ff['addUser'](_0x37f7ae);});};var $=Object[_0x3f12ff(0x1d6)],E=(_0x49a5b8,_0xf89ff1,_0x9b07e7,_0x1d927f)=>{for(var _0x256040=_0x1d927f>0x1?void 0x0:_0x1d927f?$(_0xf89ff1,_0x9b07e7):_0xf89ff1,_0x234ae5=_0x49a5b8['length']-0x1,_0x2f4ddf;_0x234ae5>=0x0;_0x234ae5--)(_0x2f4ddf=_0x49a5b8[_0x234ae5])&&(_0x256040=_0x2f4ddf(_0x256040)||_0x256040);return _0x256040;},S=(_0x37cefa,_0x46fc52)=>(_0x12d601,_0x5a147f)=>_0x46fc52(_0x12d601,_0x5a147f,_0x37cefa);let p=class extends c['Disposable']{constructor(_0x255c37,_0x1c8afb,_0x4caa63,_0x422453){const _0x4601c2=_0x3f12ff;super(),this[_0x4601c2(0x1cd)]=_0x255c37,this[_0x4601c2(0x1dc)]=_0x1c8afb,this[_0x4601c2(0x201)]=_0x4caa63,this['_injector']=_0x422453,this[_0x4601c2(0x210)](),this['_initUserSync']();}[_0x3f12ff(0x1c9)](){const _0x103be0=_0x3f12ff;this[_0x103be0(0x22f)](this[_0x103be0(0x1dc)][_0x103be0(0x1f0)][_0x103be0(0x1c3)](w[_0x103be0(0x1e3)](0x10))[_0x103be0(0x1e5)](_0xa3663a=>{const _0x362fde=_0x103be0,_0x12629b=new Set();_0xa3663a['forEach'](_0x5e62a1=>{const _0x5f9c55=_0x4010;switch(_0x5e62a1[_0x5f9c55(0x1da)]){case _0x5f9c55(0x1d2):{const _0x386fa3=_0x5e62a1[_0x5f9c55(0x1d9)][_0x5f9c55(0x1e1)];_0x12629b[_0x5f9c55(0x1d2)](_0x386fa3);break;}}}),R(this[_0x362fde(0x203)],_0x12629b);}));}['_init'](){const _0x501f11=_0x3f12ff;this[_0x501f11(0x22f)](this[_0x501f11(0x1cd)][_0x501f11(0x1f0)][_0x501f11(0x1e5)](async _0xcb9ce8=>{const _0x212146=_0x501f11;var _0x3d8c0b,_0x4d1f25,_0x11d8a8,_0x37b94d;const _0x1ff6a7=(_0x3d8c0b=this[_0x212146(0x1dc)][_0x212146(0x208)](_0xcb9ce8[_0x212146(0x1fc)])['find'](_0x40e652=>_0x40e652[_0x212146(0x1db)]===_0xcb9ce8[_0x212146(0x1db)]))==null?void 0x0:_0x3d8c0b['root'];if(!_0x1ff6a7)return;const {unitId:_0x5c31e7,subUnitId:_0x4bd4ec}=_0x1ff6a7;switch(_0xcb9ce8[_0x212146(0x1f3)]&&this[_0x212146(0x201)]['addUser'](_0xcb9ce8[_0x212146(0x1f3)]),_0xcb9ce8[_0x212146(0x1da)]){case v[_0x212146(0x216)]:break;case v[_0x212146(0x1bd)]:{this[_0x212146(0x1dc)]['addComment'](_0x5c31e7,_0x4bd4ec,{'unitId':_0x5c31e7,'subUnitId':_0x4bd4ec,'ref':'','id':_0xcb9ce8[_0x212146(0x1c0)],'dT':f(+_0xcb9ce8[_0x212146(0x1e8)]),'threadId':_0xcb9ce8[_0x212146(0x1db)],'personId':(_0x11d8a8=(_0x4d1f25=_0xcb9ce8[_0x212146(0x1f3)])==null?void 0x0:_0x4d1f25[_0x212146(0x1f9)])!=null?_0x11d8a8:_0xcb9ce8[_0x212146(0x1be)],'text':JSON[_0x212146(0x21a)](_0xcb9ce8[_0x212146(0x1dd)]),'parentId':_0x1ff6a7['id']});break;}case v['Delete']:{const _0x8ed531=this[_0x212146(0x1dc)][_0x212146(0x1e0)](_0x5c31e7,_0x4bd4ec,_0xcb9ce8[_0x212146(0x1c0)]);_0x8ed531&&_0x8ed531[_0x212146(0x1e6)]&&this[_0x212146(0x1dc)][_0x212146(0x1c5)](_0x5c31e7,_0x4bd4ec,_0xcb9ce8[_0x212146(0x1c0)]);break;}case v[_0x212146(0x1cf)]:{this['_threadCommentModel'][_0x212146(0x1d5)](_0x5c31e7,_0x4bd4ec,{'commentId':_0xcb9ce8[_0x212146(0x1c0)],'text':JSON['parse'](_0xcb9ce8[_0x212146(0x1dd)])});break;}case v[_0x212146(0x22e)]:{const _0xbc4e47=(_0x37b94d=this[_0x212146(0x1dc)][_0x212146(0x208)](_0xcb9ce8[_0x212146(0x1fc)])[_0x212146(0x21f)](_0x5216e6=>_0x5216e6[_0x212146(0x1db)]===_0xcb9ce8[_0x212146(0x1db)]))==null?void 0x0:_0x37b94d['root'];_0xbc4e47&&this['_threadCommentModel'][_0x212146(0x1d3)](_0x5c31e7,_0x4bd4ec,_0xbc4e47['id'],_0xcb9ce8['solved']===I[_0x212146(0x225)]);break;}}}));}};p=E([S(0x0,c[_0x3f12ff(0x217)](b[_0x3f12ff(0x1c6)])),S(0x1,c[_0x3f12ff(0x217)](M[_0x3f12ff(0x1bf)])),S(0x2,c[_0x3f12ff(0x217)](c[_0x3f12ff(0x1fb)])),S(0x3,c[_0x3f12ff(0x217)](c['Injector']))],p);const q=_0x3f12ff(0x1d8),D={};var A=Object[_0x3f12ff(0x1d6)],x=(_0xcd3d84,_0x3cb3d7,_0x231dea,_0x112247)=>{const _0x1e93b1=_0x3f12ff;for(var _0x187e80=_0x112247>0x1?void 0x0:_0x112247?A(_0x3cb3d7,_0x231dea):_0x3cb3d7,_0x213f40=_0xcd3d84[_0x1e93b1(0x1f5)]-0x1,_0x226be9;_0x213f40>=0x0;_0x213f40--)(_0x226be9=_0xcd3d84[_0x213f40])&&(_0x187e80=_0x226be9(_0x187e80)||_0x187e80);return _0x187e80;},_=(_0x213bb0,_0x11c92b)=>(_0x149385,_0x3be764)=>_0x11c92b(_0x149385,_0x3be764,_0x213bb0);function Y(_0x43740e,_0x3e9205){const _0x2c74d1=_0x3f12ff,_0x1c2b44=_0x43740e['replies'][0x0];return{..._0x3e9205,'id':_0x1c2b44[_0x2c74d1(0x1c0)],'resolved':_0x43740e['solved']===0x1,'dT':f(_0x1c2b44[_0x2c74d1(0x1e8)]),'personId':_0x1c2b44[_0x2c74d1(0x1be)],'threadId':_0x1c2b44[_0x2c74d1(0x1db)]};}function G(_0x548557,_0x2644a,_0x457502){const _0x37b6b5=_0x3f12ff;var _0x4d22d7,_0x2a0b2e;if(((_0x2a0b2e=(_0x4d22d7=_0x548557==null?void 0x0:_0x548557[_0x37b6b5(0x229)])==null?void 0x0:_0x4d22d7[_0x37b6b5(0x1f5)])!=null?_0x2a0b2e:0x0)>0x0){const _0x1053f8=(_0x121167,_0xd1cabb)=>({'id':_0x121167['replyId'],'threadId':_0x121167[_0x37b6b5(0x1db)],'dT':f(_0x121167[_0x37b6b5(0x1e8)]),'personId':_0x121167[_0x37b6b5(0x1be)],'resolved':_0x548557['solved']===I[_0x37b6b5(0x225)],'unitId':_0x2644a,'subUnitId':_0x457502,'text':JSON['parse'](_0x121167[_0x37b6b5(0x1dd)]),'parentId':_0xd1cabb}),_0x441c8e=_0x1053f8(_0x548557[_0x37b6b5(0x229)][0x0]);return{..._0x441c8e,'children':_0x548557[_0x37b6b5(0x229)][_0x37b6b5(0x1d7)](0x1)['map'](_0x5bf0ab=>_0x1053f8(_0x5bf0ab,_0x441c8e['id']))};}return null;}let g=class{constructor(_0xe4cea4,_0x4ac633,_0x1c7b94,_0x3a8590){const _0x1d0198=_0x3f12ff;this[_0x1d0198(0x1cb)]=_0xe4cea4,this[_0x1d0198(0x201)]=_0x4ac633,this['_sessionService']=_0x1c7b94,this['_injector']=_0x3a8590;}async['addComment'](_0x5031ca){const _0x369a27=_0x3f12ff;var _0xaf45f8,_0xf2b5a8;const {parentId:_0x3d9b5b,unitId:_0x17ab9d,text:_0x1798a4,threadId:_0x53bfa6}=_0x5031ca,_0x54291a=(_0xf2b5a8=(_0xaf45f8=_0x1798a4[_0x369a27(0x222)])==null?void 0x0:_0xaf45f8[_0x369a27(0x22c)](_0x5ec90b=>_0x5ec90b[_0x369a27(0x20e)]===c[_0x369a27(0x236)][_0x369a27(0x1fa)])['map'](_0x5e01b2=>_0x5e01b2['rangeId']))!=null?_0xf2b5a8:[],_0x4986fb=JSON[_0x369a27(0x1f1)](_0x1798a4),_0x1444b8=(await this[_0x369a27(0x1f6)][_0x369a27(0x1c2)](_0x17ab9d))[_0x369a27(0x1eb)]();if(_0x3d9b5b){const _0x65cc37={'memberId':_0x1444b8,'unitId':_0x17ab9d,'content':_0x4986fb,'mention':_0x54291a,'threadId':_0x53bfa6},_0x373598=(await this[_0x369a27(0x1cb)][_0x369a27(0x227)](_0x369a27(0x1f7)+_0x17ab9d+_0x369a27(0x20c),{'body':_0x65cc37}))[_0x369a27(0x204)][_0x369a27(0x1c4)];return{..._0x5031ca,'id':_0x373598[_0x369a27(0x1c0)],'dT':c[_0x369a27(0x1ef)](+_0x373598[_0x369a27(0x1e8)])[_0x369a27(0x207)](_0x369a27(0x213)),'personId':_0x373598[_0x369a27(0x1be)]};}else{const _0x4e8468={'memberId':_0x1444b8,'unitId':_0x17ab9d,'content':_0x4986fb,'mention':_0x54291a},_0x389204=await this['_httpService']['post'](_0x369a27(0x1f7)+_0x17ab9d+_0x369a27(0x1ca),{'body':_0x4e8468});return Y(_0x389204[_0x369a27(0x204)][_0x369a27(0x20f)],_0x5031ca);}}async[_0x3f12ff(0x1d5)](_0x29e21a){const _0x294b68=_0x3f12ff;var _0x3e0685,_0x2427e6;const {text:_0x27adec,unitId:_0x23ab8b}=_0x29e21a,_0x3dd34a=(_0x2427e6=(_0x3e0685=_0x27adec[_0x294b68(0x222)])==null?void 0x0:_0x3e0685['filter'](_0x3e7dab=>_0x3e7dab[_0x294b68(0x20e)]===c[_0x294b68(0x236)]['COMMENT'])[_0x294b68(0x234)](_0x367755=>_0x367755['rangeId']))!=null?_0x2427e6:[],_0x9834e4=JSON[_0x294b68(0x1f1)](_0x27adec),_0x44a7f7=_0x29e21a[_0x294b68(0x1db)],_0x297648=_0x29e21a['id'],_0x52fc1d={'memberId':(await this[_0x294b68(0x1f6)][_0x294b68(0x1c2)](_0x23ab8b))[_0x294b68(0x1eb)](),'unitId':_0x23ab8b,'threadId':_0x44a7f7,'mention':_0x3dd34a,'content':_0x9834e4,'replyId':_0x297648},_0x55052c=await this[_0x294b68(0x1cb)][_0x294b68(0x227)](_0x294b68(0x1f7)+_0x23ab8b+_0x294b68(0x1c7),{'body':_0x52fc1d});return!_0x55052c['body'][_0x294b68(0x1ec)]||_0x55052c[_0x294b68(0x204)][_0x294b68(0x1ec)]['code']===0x1;}async[_0x3f12ff(0x1d3)](_0x5281ea){const _0x52365a=_0x3f12ff,{unitId:_0x45f9b2}=_0x5281ea,_0x27ae7c=_0x5281ea['threadId'],_0x4d3c29={'memberId':this['_userService'][_0x52365a(0x1fe)]()['userID'],'unitId':_0x45f9b2,'threadId':_0x27ae7c,'solved':_0x5281ea['resolved']?I[_0x52365a(0x225)]:I[_0x52365a(0x1e2)]},_0x4741ce=await this[_0x52365a(0x1cb)]['post']('/universer-api/comment/unit/'+_0x45f9b2+'/solved',{'body':_0x4d3c29});return!_0x4741ce['body'][_0x52365a(0x1ec)]||_0x4741ce[_0x52365a(0x204)][_0x52365a(0x1ec)][_0x52365a(0x221)]===0x1;}async[_0x3f12ff(0x1c5)](_0x255463,_0x468ab2,_0x3f32b4,_0x4baf63){const _0x525c4e=_0x3f12ff,_0x31eb27={'memberId':(await this['_sessionService'][_0x525c4e(0x1c2)](_0x255463))[_0x525c4e(0x1eb)](),'threadId':_0x3f32b4,'replyId':_0x4baf63,'unitId':_0x255463},_0x5c4985=await this[_0x525c4e(0x1cb)][_0x525c4e(0x227)](_0x525c4e(0x1f7)+_0x255463+_0x525c4e(0x1d1),{'body':_0x31eb27});return!_0x5c4985[_0x525c4e(0x204)][_0x525c4e(0x1ec)]||_0x5c4985['body'][_0x525c4e(0x1ec)]['code']===0x1;}async['listComments'](_0x154b0b,_0x4a813c,_0x91eb87){const _0x104a36=_0x3f12ff,_0x51b3d8={'unitId':_0x154b0b,'threadId':_0x91eb87},_0x5606a1=await this[_0x104a36(0x1cb)]['post'](_0x104a36(0x1f7)+_0x154b0b+_0x104a36(0x226),{'body':_0x51b3d8}),_0x2302ee=_0x91eb87['map'](_0x1979e1=>G(_0x5606a1['body'][_0x104a36(0x21b)][_0x1979e1],_0x154b0b,_0x4a813c))['filter'](Boolean);return Object[_0x104a36(0x1ed)](_0x5606a1[_0x104a36(0x204)]['users'])[_0x104a36(0x212)](_0x29bc69=>{const _0x362776=_0x104a36;this[_0x362776(0x201)][_0x362776(0x220)](_0x29bc69);}),_0x2302ee;}[_0x3f12ff(0x21e)](_0x274342){const _0x15840e=_0x3f12ff;return{'id':_0x274342['id'],'threadId':_0x274342[_0x15840e(0x1db)],'ref':_0x274342[_0x15840e(0x1df)]};}};g=x([_(0x0,c[_0x3f12ff(0x217)](P['HTTPService'])),_(0x1,c[_0x3f12ff(0x217)](c[_0x3f12ff(0x1fb)])),_(0x2,c[_0x3f12ff(0x217)](b['CollaborationSessionService'])),_(0x3,c[_0x3f12ff(0x217)](c[_0x3f12ff(0x205)]))],g);function _0x4010(_0x3c4449,_0x2fc0dc){const _0x9afa75=_0x9afa();return _0x4010=function(_0x401035,_0x25637c){_0x401035=_0x401035-0x1bd;let _0x43929b=_0x9afa75[_0x401035];return _0x43929b;},_0x4010(_0x3c4449,_0x2fc0dc);}var H=Object[_0x3f12ff(0x1d6)],J=(_0x242fbc,_0x1aa9f0,_0x291b27,_0x4a5756)=>{const _0x22e59f=_0x3f12ff;for(var _0x9e0676=_0x4a5756>0x1?void 0x0:_0x4a5756?H(_0x1aa9f0,_0x291b27):_0x1aa9f0,_0x57c5ed=_0x242fbc[_0x22e59f(0x1f5)]-0x1,_0x40630a;_0x57c5ed>=0x0;_0x57c5ed--)(_0x40630a=_0x242fbc[_0x57c5ed])&&(_0x9e0676=_0x40630a(_0x9e0676)||_0x9e0676);return _0x9e0676;},y=(_0x44b91f,_0x214373)=>(_0x410914,_0x41c818)=>_0x214373(_0x410914,_0x41c818,_0x44b91f);let C=class extends c[_0x3f12ff(0x1d4)]{constructor(_0x6f9c41,_0x2d9708){const _0x1c45d0=_0x3f12ff;super(),this[_0x1c45d0(0x219)]=_0x6f9c41,this[_0x1c45d0(0x1e7)]=_0x2d9708,this[_0x1c45d0(0x20a)]();}[_0x3f12ff(0x20a)](){const _0x1b16b0=_0x3f12ff;this[_0x1b16b0(0x219)]['dataSource']=this[_0x1b16b0(0x1e7)],this['_threadCommentDataSourceService'][_0x1b16b0(0x1f2)]=!0x1;}};C=J([y(0x0,M[_0x3f12ff(0x1fd)]),y(0x1,c[_0x3f12ff(0x217)](g))],C);var F=Object['defineProperty'],L=Object[_0x3f12ff(0x1d6)],Z=(_0x86d4a3,_0x56cdc9,_0x5aa755)=>_0x56cdc9 in _0x86d4a3?F(_0x86d4a3,_0x56cdc9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aa755}):_0x86d4a3[_0x56cdc9]=_0x5aa755,W=(_0x27d69d,_0x4b0eda,_0x5b0beb,_0x17dd9d)=>{const _0x564611=_0x3f12ff;for(var _0x584c38=_0x17dd9d>0x1?void 0x0:_0x17dd9d?L(_0x4b0eda,_0x5b0beb):_0x4b0eda,_0x3d9cab=_0x27d69d[_0x564611(0x1f5)]-0x1,_0x4100ca;_0x3d9cab>=0x0;_0x3d9cab--)(_0x4100ca=_0x27d69d[_0x3d9cab])&&(_0x584c38=_0x4100ca(_0x584c38)||_0x584c38);return _0x584c38;},O=(_0x2243d0,_0x2a1751)=>(_0x19ffea,_0xa95e6a)=>_0x2a1751(_0x19ffea,_0xa95e6a,_0x2243d0),N=(_0x175ca9,_0x35995c,_0x3578f6)=>Z(_0x175ca9,typeof _0x35995c!=_0x3f12ff(0x1cc)?_0x35995c+'':_0x35995c,_0x3578f6);exports[_0x3f12ff(0x21d)]=class extends c[_0x3f12ff(0x200)]{constructor(_0x57dc8c=D,_0x5596fc,_0x21c1d2){const _0x6e6ba0=_0x3f12ff;super(),this['_config']=_0x57dc8c,this[_0x6e6ba0(0x203)]=_0x5596fc,this[_0x6e6ba0(0x233)]=_0x21c1d2;const {..._0xf2ea86}=c[_0x6e6ba0(0x218)]({},D,this[_0x6e6ba0(0x232)]);this['_configService'][_0x6e6ba0(0x230)](q,_0xf2ea86);}[_0x3f12ff(0x231)](){const _0x969329=_0x3f12ff;[[g],[C],[p]][_0x969329(0x212)](_0xadccb2=>{const _0x5e505a=_0x969329;this['_injector'][_0x5e505a(0x1d2)](_0xadccb2);});}['onReady'](){const _0xe84286=_0x3f12ff;this[_0xe84286(0x203)][_0xe84286(0x1e4)](C),this['_injector'][_0xe84286(0x1e4)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3f12ff(0x1ea),U),N(exports[_0x3f12ff(0x21d)],_0x3f12ff(0x1da),c[_0x3f12ff(0x1d0)][_0x3f12ff(0x1f8)]),exports[_0x3f12ff(0x21d)]=W([c['DependentOn'](j[_0x3f12ff(0x215)],b['UniverCollaborationClientPlugin'],T[_0x3f12ff(0x22d)]),O(0x1,c['Inject'](c[_0x3f12ff(0x205)])),O(0x2,c[_0x3f12ff(0x1e9)])],exports[_0x3f12ff(0x21d)]);
|
|
1
|
+
'use strict';const _0x578bb1=_0x13f0;(function(_0x1d48e8,_0x2dae30){const _0x731f58=_0x13f0,_0x2a9654=_0x1d48e8();while(!![]){try{const _0x1ac6a8=parseInt(_0x731f58(0xe0))/0x1*(-parseInt(_0x731f58(0x13b))/0x2)+parseInt(_0x731f58(0xd7))/0x3+-parseInt(_0x731f58(0xe2))/0x4*(parseInt(_0x731f58(0xdb))/0x5)+parseInt(_0x731f58(0xd8))/0x6+-parseInt(_0x731f58(0xeb))/0x7+-parseInt(_0x731f58(0x139))/0x8+parseInt(_0x731f58(0xfe))/0x9;if(_0x1ac6a8===_0x2dae30)break;else _0x2a9654['push'](_0x2a9654['shift']());}catch(_0x613c90){_0x2a9654['push'](_0x2a9654['shift']());}}}(_0x3947,0x595f7));Object[_0x578bb1(0xd0)](exports,Symbol[_0x578bb1(0x101)],{'value':_0x578bb1(0xe4)});function _0x13f0(_0x5ee185,_0x2c0106){const _0x394744=_0x3947();return _0x13f0=function(_0x13f020,_0x1b6e18){_0x13f020=_0x13f020-0xce;let _0x23b677=_0x394744[_0x13f020];return _0x23b677;},_0x13f0(_0x5ee185,_0x2c0106);}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x578bb1(0x12e);var I=(_0x2fb288=>(_0x2fb288[_0x2fb288[_0x578bb1(0x13c)]=0x0]=_0x578bb1(0x13c),_0x2fb288[_0x2fb288[_0x578bb1(0xe7)]=0x1]='Solved',_0x2fb288[_0x2fb288['UNRECOGNIZED']=-0x1]=_0x578bb1(0x114),_0x2fb288))(I||{}),v=(_0x6e848d=>(_0x6e848d[_0x6e848d['Unknown']=0x0]=_0x578bb1(0x12c),_0x6e848d[_0x6e848d[_0x578bb1(0x11e)]=0x1]=_0x578bb1(0x11e),_0x6e848d[_0x6e848d[_0x578bb1(0xf4)]=0x2]=_0x578bb1(0xf4),_0x6e848d[_0x6e848d[_0x578bb1(0x12a)]=0x3]=_0x578bb1(0x12a),_0x6e848d[_0x6e848d[_0x578bb1(0xf6)]=0x4]='Delete',_0x6e848d[_0x6e848d[_0x578bb1(0xf8)]=0x5]='Solve',_0x6e848d[_0x6e848d[_0x578bb1(0x114)]=-0x1]=_0x578bb1(0x114),_0x6e848d))(v||{});const f=_0x498c96=>c[_0x578bb1(0x109)](new Date(+_0x498c96))[_0x578bb1(0xd5)](_0x578bb1(0x134)),R=async(_0x48b27e,_0x5a3a14)=>{const _0x688d23=_0x578bb1,_0x1cc799=_0x48b27e['get'](c['UserManagerService']),_0x8ba1ef=_0x48b27e[_0x688d23(0x104)](P[_0x688d23(0xd3)]);_0x5a3a14[_0x688d23(0x100)](_0x15b444=>{const _0x263354=_0x688d23;_0x1cc799[_0x263354(0x128)](_0x15b444)&&_0x5a3a14[_0x263354(0x11b)](_0x15b444);}),_0x5a3a14[_0x688d23(0xce)]&&(await _0x8ba1ef['get'](_0x688d23(0x132),{'params':{'userIDs':[..._0x5a3a14]}}))[_0x688d23(0x10b)][_0x688d23(0xf2)]['forEach'](_0x57c62a=>{_0x57c62a&&_0x1cc799['addUser'](_0x57c62a);});};var $=Object[_0x578bb1(0x123)],E=(_0x155166,_0x327ce3,_0x18f854,_0x462f5c)=>{for(var _0x17a43c=_0x462f5c>0x1?void 0x0:_0x462f5c?$(_0x327ce3,_0x18f854):_0x327ce3,_0x123289=_0x155166['length']-0x1,_0xdcec2c;_0x123289>=0x0;_0x123289--)(_0xdcec2c=_0x155166[_0x123289])&&(_0x17a43c=_0xdcec2c(_0x17a43c)||_0x17a43c);return _0x17a43c;},S=(_0x21b453,_0x56444c)=>(_0xb3a6f5,_0x363f77)=>_0x56444c(_0xb3a6f5,_0x363f77,_0x21b453);let p=class extends c[_0x578bb1(0xf9)]{constructor(_0x2b062a,_0x4e0a92,_0x4c4713,_0x5269f3){const _0x194adf=_0x578bb1;super(),this['_commentService']=_0x2b062a,this['_threadCommentModel']=_0x4e0a92,this[_0x194adf(0x110)]=_0x4c4713,this[_0x194adf(0x118)]=_0x5269f3,this[_0x194adf(0x137)](),this[_0x194adf(0xef)]();}[_0x578bb1(0xef)](){const _0x5b1e53=_0x578bb1;this['disposeWithMe'](this[_0x5b1e53(0xd6)][_0x5b1e53(0x140)][_0x5b1e53(0xfb)](w[_0x5b1e53(0x13d)](0x10))[_0x5b1e53(0xe1)](_0x384010=>{const _0x5060a0=_0x5b1e53,_0x2c5b57=new Set();_0x384010[_0x5060a0(0x100)](_0x93656f=>{const _0x4baa90=_0x5060a0;switch(_0x93656f['type']){case _0x4baa90(0xec):{const _0x406024=_0x93656f[_0x4baa90(0x102)][_0x4baa90(0xf7)];_0x2c5b57[_0x4baa90(0xec)](_0x406024);break;}}}),R(this[_0x5060a0(0x118)],_0x2c5b57);}));}['_init'](){const _0x169d35=_0x578bb1;this['disposeWithMe'](this[_0x169d35(0x111)][_0x169d35(0x140)][_0x169d35(0xe1)](async _0x3abc01=>{const _0x109d08=_0x169d35;var _0x55ad40,_0x17c590,_0x3a1704,_0x5eacdb;const _0x3fee23=(_0x55ad40=this[_0x109d08(0xd6)]['getUnit'](_0x3abc01[_0x109d08(0x124)])[_0x109d08(0xfc)](_0x3c70c3=>_0x3c70c3[_0x109d08(0x12b)]===_0x3abc01[_0x109d08(0x12b)]))==null?void 0x0:_0x55ad40[_0x109d08(0x142)];if(!_0x3fee23)return;const {unitId:_0x30edd3,subUnitId:_0x86d9b5}=_0x3fee23;switch(_0x3abc01[_0x109d08(0xd9)]&&this[_0x109d08(0x110)][_0x109d08(0xd4)](_0x3abc01[_0x109d08(0xd9)]),_0x3abc01[_0x109d08(0xf0)]){case v[_0x109d08(0x11e)]:break;case v[_0x109d08(0xf4)]:{this['_threadCommentModel'][_0x109d08(0x143)](_0x30edd3,_0x86d9b5,{'unitId':_0x30edd3,'subUnitId':_0x86d9b5,'ref':'','id':_0x3abc01[_0x109d08(0x107)],'dT':f(+_0x3abc01[_0x109d08(0xde)]),'threadId':_0x3abc01[_0x109d08(0x12b)],'personId':(_0x3a1704=(_0x17c590=_0x3abc01[_0x109d08(0xd9)])==null?void 0x0:_0x17c590[_0x109d08(0x127)])!=null?_0x3a1704:_0x3abc01[_0x109d08(0x105)],'text':JSON['parse'](_0x3abc01['content']),'parentId':_0x3fee23['id']});break;}case v['Delete']:{const _0xbab24b=this[_0x109d08(0xd6)][_0x109d08(0x112)](_0x30edd3,_0x86d9b5,_0x3abc01[_0x109d08(0x107)]);_0xbab24b&&_0xbab24b[_0x109d08(0x133)]&&this['_threadCommentModel']['deleteComment'](_0x30edd3,_0x86d9b5,_0x3abc01['replyId']);break;}case v[_0x109d08(0x12a)]:{this[_0x109d08(0xd6)]['updateComment'](_0x30edd3,_0x86d9b5,{'commentId':_0x3abc01['replyId'],'text':JSON['parse'](_0x3abc01[_0x109d08(0xea)])});break;}case v[_0x109d08(0xf8)]:{const _0x47962a=(_0x5eacdb=this[_0x109d08(0xd6)][_0x109d08(0x141)](_0x3abc01[_0x109d08(0x124)])['find'](_0x5dc24c=>_0x5dc24c[_0x109d08(0x12b)]===_0x3abc01[_0x109d08(0x12b)]))==null?void 0x0:_0x5eacdb[_0x109d08(0x142)];_0x47962a&&this[_0x109d08(0xd6)][_0x109d08(0x113)](_0x30edd3,_0x86d9b5,_0x47962a['id'],_0x3abc01[_0x109d08(0xed)]===I[_0x109d08(0xe7)]);break;}}}));}};p=E([S(0x0,c[_0x578bb1(0xff)](b['CommentService'])),S(0x1,c['Inject'](M[_0x578bb1(0x116)])),S(0x2,c[_0x578bb1(0xff)](c[_0x578bb1(0x10f)])),S(0x3,c['Inject'](c[_0x578bb1(0x13a)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x578bb1(0x123)],x=(_0x200c96,_0x281b29,_0x4442c7,_0x16e902)=>{const _0x3174cf=_0x578bb1;for(var _0x1d6ffd=_0x16e902>0x1?void 0x0:_0x16e902?A(_0x281b29,_0x4442c7):_0x281b29,_0x2af8b1=_0x200c96[_0x3174cf(0x119)]-0x1,_0x28cb2a;_0x2af8b1>=0x0;_0x2af8b1--)(_0x28cb2a=_0x200c96[_0x2af8b1])&&(_0x1d6ffd=_0x28cb2a(_0x1d6ffd)||_0x1d6ffd);return _0x1d6ffd;},_=(_0x52ff97,_0x2fb406)=>(_0x7f799a,_0x24220b)=>_0x2fb406(_0x7f799a,_0x24220b,_0x52ff97);function Y(_0x378310,_0x5b7ec1){const _0x3c0c3a=_0x578bb1,_0x545460=_0x378310['replies'][0x0];return{..._0x5b7ec1,'id':_0x545460[_0x3c0c3a(0x107)],'resolved':_0x378310['solved']===0x1,'dT':f(_0x545460[_0x3c0c3a(0xde)]),'personId':_0x545460[_0x3c0c3a(0x105)],'threadId':_0x545460['threadId']};}function G(_0x38f0e3,_0x90da3e,_0x355cb7){const _0x5ebfb3=_0x578bb1;var _0x4605fe,_0x1e2281;if(((_0x1e2281=(_0x4605fe=_0x38f0e3==null?void 0x0:_0x38f0e3[_0x5ebfb3(0x13e)])==null?void 0x0:_0x4605fe[_0x5ebfb3(0x119)])!=null?_0x1e2281:0x0)>0x0){const _0x1b6e4e=(_0x2d9b00,_0x32f732)=>({'id':_0x2d9b00[_0x5ebfb3(0x107)],'threadId':_0x2d9b00[_0x5ebfb3(0x12b)],'dT':f(_0x2d9b00[_0x5ebfb3(0xde)]),'personId':_0x2d9b00[_0x5ebfb3(0x105)],'resolved':_0x38f0e3['solved']===I[_0x5ebfb3(0xe7)],'unitId':_0x90da3e,'subUnitId':_0x355cb7,'text':JSON[_0x5ebfb3(0xfd)](_0x2d9b00[_0x5ebfb3(0xea)]),'parentId':_0x32f732}),_0x4133a2=_0x1b6e4e(_0x38f0e3[_0x5ebfb3(0x13e)][0x0]);return{..._0x4133a2,'children':_0x38f0e3['replies']['slice'](0x1)['map'](_0x208851=>_0x1b6e4e(_0x208851,_0x4133a2['id']))};}return null;}let g=class{constructor(_0xeeff8e,_0x5598a8,_0x57e966,_0x5c127c){const _0x1f38c0=_0x578bb1;this[_0x1f38c0(0xf3)]=_0xeeff8e,this[_0x1f38c0(0x110)]=_0x5598a8,this[_0x1f38c0(0x121)]=_0x57e966,this[_0x1f38c0(0x118)]=_0x5c127c;}async[_0x578bb1(0x143)](_0x5b65bf){const _0x42cad5=_0x578bb1;var _0x53cbdb,_0x4d8ff4;const {parentId:_0x17eda5,unitId:_0x2757d4,text:_0x5ecd4b,threadId:_0x1355d8}=_0x5b65bf,_0x2cfb2f=(_0x4d8ff4=(_0x53cbdb=_0x5ecd4b[_0x42cad5(0x10e)])==null?void 0x0:_0x53cbdb[_0x42cad5(0xe5)](_0x1052e9=>_0x1052e9[_0x42cad5(0x125)]===c['CustomRangeType'][_0x42cad5(0x126)])[_0x42cad5(0xdc)](_0x59a2c3=>_0x59a2c3[_0x42cad5(0xf5)]))!=null?_0x4d8ff4:[],_0x4825ac=JSON[_0x42cad5(0xe3)](_0x5ecd4b),_0x52c221=(await this['_sessionService']['requireSession'](_0x2757d4))[_0x42cad5(0xe8)]();if(_0x17eda5){const _0x31695a={'memberId':_0x52c221,'unitId':_0x2757d4,'content':_0x4825ac,'mention':_0x2cfb2f,'threadId':_0x1355d8},_0x18477c=(await this['_httpService'][_0x42cad5(0x11a)](_0x42cad5(0x129)+_0x2757d4+'/reply',{'body':_0x31695a}))[_0x42cad5(0x10b)][_0x42cad5(0x117)];return{..._0x5b65bf,'id':_0x18477c[_0x42cad5(0x107)],'dT':c['dayjs'](+_0x18477c[_0x42cad5(0xde)])['format'](_0x42cad5(0x134)),'personId':_0x18477c[_0x42cad5(0x105)]};}else{const _0x5ee5f2={'memberId':_0x52c221,'unitId':_0x2757d4,'content':_0x4825ac,'mention':_0x2cfb2f},_0x5297aa=await this['_httpService'][_0x42cad5(0x11a)](_0x42cad5(0x129)+_0x2757d4+'/add',{'body':_0x5ee5f2});return Y(_0x5297aa[_0x42cad5(0x10b)][_0x42cad5(0x12f)],_0x5b65bf);}}async[_0x578bb1(0x10a)](_0xf6cff9){const _0x1e9adb=_0x578bb1;var _0x753768,_0x19d626;const {text:_0x416e63,unitId:_0x180038}=_0xf6cff9,_0xf861ed=(_0x19d626=(_0x753768=_0x416e63['customRanges'])==null?void 0x0:_0x753768[_0x1e9adb(0xe5)](_0x2f816e=>_0x2f816e[_0x1e9adb(0x125)]===c['CustomRangeType'][_0x1e9adb(0x126)])[_0x1e9adb(0xdc)](_0x222dd5=>_0x222dd5[_0x1e9adb(0xf5)]))!=null?_0x19d626:[],_0x532efe=JSON[_0x1e9adb(0xe3)](_0x416e63),_0x313599=_0xf6cff9[_0x1e9adb(0x12b)],_0x22864e=_0xf6cff9['id'],_0x417632={'memberId':(await this['_sessionService']['requireSession'](_0x180038))['getMemberID'](),'unitId':_0x180038,'threadId':_0x313599,'mention':_0xf861ed,'content':_0x532efe,'replyId':_0x22864e},_0x256b42=await this[_0x1e9adb(0xf3)][_0x1e9adb(0x11a)]('/universer-api/comment/unit/'+_0x180038+_0x1e9adb(0x13f),{'body':_0x417632});return!_0x256b42[_0x1e9adb(0x10b)]['error']||_0x256b42[_0x1e9adb(0x10b)][_0x1e9adb(0xe6)][_0x1e9adb(0x103)]===0x1;}async[_0x578bb1(0x113)](_0x49d46c){const _0xed9479=_0x578bb1,{unitId:_0x55ce49}=_0x49d46c,_0xb03a99=_0x49d46c[_0xed9479(0x12b)],_0x31d4e0={'memberId':this[_0xed9479(0x110)]['getCurrentUser']()[_0xed9479(0x127)],'unitId':_0x55ce49,'threadId':_0xb03a99,'solved':_0x49d46c['resolved']?I[_0xed9479(0xe7)]:I[_0xed9479(0x13c)]},_0x40dde7=await this[_0xed9479(0xf3)]['post']('/universer-api/comment/unit/'+_0x55ce49+_0xed9479(0x131),{'body':_0x31d4e0});return!_0x40dde7[_0xed9479(0x10b)][_0xed9479(0xe6)]||_0x40dde7[_0xed9479(0x10b)]['error'][_0xed9479(0x103)]===0x1;}async[_0x578bb1(0xda)](_0x24acab,_0x2088a5,_0x4203d3,_0x549aee){const _0x5cb092=_0x578bb1,_0x718237={'memberId':(await this['_sessionService']['requireSession'](_0x24acab))[_0x5cb092(0xe8)](),'threadId':_0x4203d3,'replyId':_0x549aee,'unitId':_0x24acab},_0x55efb6=await this[_0x5cb092(0xf3)][_0x5cb092(0x11a)](_0x5cb092(0x129)+_0x24acab+_0x5cb092(0x10d),{'body':_0x718237});return!_0x55efb6[_0x5cb092(0x10b)][_0x5cb092(0xe6)]||_0x55efb6['body'][_0x5cb092(0xe6)][_0x5cb092(0x103)]===0x1;}async[_0x578bb1(0xe9)](_0x251e2c,_0x54a471,_0x482978){const _0x4bf591=_0x578bb1,_0x27f48c={'unitId':_0x251e2c,'threadId':_0x482978},_0x25dad7=await this[_0x4bf591(0xf3)][_0x4bf591(0x11a)](_0x4bf591(0x129)+_0x251e2c+_0x4bf591(0xd1),{'body':_0x27f48c}),_0x4cfe3c=_0x482978['map'](_0x4df21a=>G(_0x25dad7[_0x4bf591(0x10b)]['comments'][_0x4df21a],_0x251e2c,_0x54a471))['filter'](Boolean);return Object[_0x4bf591(0x12d)](_0x25dad7[_0x4bf591(0x10b)]['users'])[_0x4bf591(0x100)](_0x2ee4d7=>{const _0x46970f=_0x4bf591;this[_0x46970f(0x110)][_0x46970f(0xd4)](_0x2ee4d7);}),_0x4cfe3c;}[_0x578bb1(0x144)](_0x521b94){const _0x2fba6a=_0x578bb1;return{'id':_0x521b94['id'],'threadId':_0x521b94[_0x2fba6a(0x12b)],'ref':_0x521b94['ref']};}};g=x([_(0x0,c[_0x578bb1(0xff)](P[_0x578bb1(0xd3)])),_(0x1,c[_0x578bb1(0xff)](c[_0x578bb1(0x10f)])),_(0x2,c[_0x578bb1(0xff)](b[_0x578bb1(0x11d)])),_(0x3,c[_0x578bb1(0xff)](c[_0x578bb1(0x13a)]))],g);var H=Object[_0x578bb1(0x123)],J=(_0x3796a5,_0x204eee,_0x21d947,_0x4652ce)=>{const _0x1e17da=_0x578bb1;for(var _0x2bbe68=_0x4652ce>0x1?void 0x0:_0x4652ce?H(_0x204eee,_0x21d947):_0x204eee,_0x26d0ed=_0x3796a5[_0x1e17da(0x119)]-0x1,_0x192866;_0x26d0ed>=0x0;_0x26d0ed--)(_0x192866=_0x3796a5[_0x26d0ed])&&(_0x2bbe68=_0x192866(_0x2bbe68)||_0x2bbe68);return _0x2bbe68;},y=(_0x4acc96,_0x5329c2)=>(_0x285eaa,_0x9e56e3)=>_0x5329c2(_0x285eaa,_0x9e56e3,_0x4acc96);let C=class extends c[_0x578bb1(0xf9)]{constructor(_0x5462fe,_0x535a4b){const _0x409c79=_0x578bb1;super(),this['_threadCommentDataSourceService']=_0x5462fe,this[_0x409c79(0x10c)]=_0x535a4b,this[_0x409c79(0xf1)]();}[_0x578bb1(0xf1)](){const _0x4720a0=_0x578bb1;this[_0x4720a0(0xfa)][_0x4720a0(0x145)]=this[_0x4720a0(0x10c)],this[_0x4720a0(0xfa)][_0x4720a0(0x108)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x578bb1(0xff)](g))],C);function _0x3947(){const _0x136394=['delete','UniverCollaborationClientPlugin','CollaborationSessionService','Add','UniverInstanceType','UniverThreadCommentDataSourcePlugin','_sessionService','symbol','getOwnPropertyDescriptor','unitId','rangeType','COMMENT','userID','getUser','/universer-api/comment/unit/','Edit','threadId','Unknown','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','_configService','/solved','/universer-api/user/list','parentId','YYYY/MM/DD\x20HH:mm','pluginName','_config','_init','onStarting','4382336lDrHTF','Injector','286aPJqJZ','OpenOrReOpen','bufferTime','replies','/edit','commentUpdate$','getUnit','root','addComment','saveCommentToSnapshot','dataSource','size','DependentOn','defineProperty','/list','IConfigService','HTTPService','addUser','format','_threadCommentModel','1121769AuvVnG','397884FCjpzT','user','deleteComment','230145zaWqxN','map','setConfig','createTimestamp','Plugin','1267ZIKCGi','subscribe','44JgwQtH','stringify','Module','filter','error','Solved','getMemberID','listComments','content','2454767vRUbZJ','add','solved','merge','_initUserSync','type','_initDataSource','users','_httpService','Reply','rangeId','Delete','personId','Solve','Disposable','_threadCommentDataSourceService','pipe','find','parse','13606263mjAiFC','Inject','forEach','toStringTag','payload','code','get','userId','onReady','replyId','syncUpdateMutationToColla','dayjs','updateComment','body','_threadCommentDataSource','/delete','customRanges','UserManagerService','_userService','_commentService','getComment','resolveComment','UNRECOGNIZED','UNIVER_UNKNOWN','ThreadCommentModel','reply','_injector','length','post'];_0x3947=function(){return _0x136394;};return _0x3947();}var F=Object[_0x578bb1(0xd0)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5added,_0x54995d,_0xbb03ae)=>_0x54995d in _0x5added?F(_0x5added,_0x54995d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbb03ae}):_0x5added[_0x54995d]=_0xbb03ae,W=(_0xe1d2fd,_0x2da2c2,_0x2bf0bd,_0x4e350b)=>{const _0x3e6a80=_0x578bb1;for(var _0x4312fd=_0x4e350b>0x1?void 0x0:_0x4e350b?L(_0x2da2c2,_0x2bf0bd):_0x2da2c2,_0x28a55b=_0xe1d2fd[_0x3e6a80(0x119)]-0x1,_0x58a034;_0x28a55b>=0x0;_0x28a55b--)(_0x58a034=_0xe1d2fd[_0x28a55b])&&(_0x4312fd=_0x58a034(_0x4312fd)||_0x4312fd);return _0x4312fd;},O=(_0x4fb63e,_0x418e42)=>(_0x4b9e25,_0xb1755d)=>_0x418e42(_0x4b9e25,_0xb1755d,_0x4fb63e),N=(_0xd39a58,_0xac40aa,_0x341336)=>Z(_0xd39a58,typeof _0xac40aa!=_0x578bb1(0x122)?_0xac40aa+'':_0xac40aa,_0x341336);exports[_0x578bb1(0x120)]=class extends c[_0x578bb1(0xdf)]{constructor(_0x2ae5aa=D,_0x292a8d,_0x4bcde5){const _0x2cf7da=_0x578bb1;super(),this[_0x2cf7da(0x136)]=_0x2ae5aa,this[_0x2cf7da(0x118)]=_0x292a8d,this[_0x2cf7da(0x130)]=_0x4bcde5;const {..._0x2e9243}=c[_0x2cf7da(0xee)]({},D,this[_0x2cf7da(0x136)]);this[_0x2cf7da(0x130)][_0x2cf7da(0xdd)](q,_0x2e9243);}[_0x578bb1(0x138)](){const _0x4c15cd=_0x578bb1;[[g],[C],[p]][_0x4c15cd(0x100)](_0x40b0c3=>{const _0x351788=_0x4c15cd;this[_0x351788(0x118)][_0x351788(0xec)](_0x40b0c3);});}[_0x578bb1(0x106)](){const _0x2481b2=_0x578bb1;this[_0x2481b2(0x118)][_0x2481b2(0x104)](C),this[_0x2481b2(0x118)][_0x2481b2(0x104)](p);}},N(exports[_0x578bb1(0x120)],_0x578bb1(0x135),U),N(exports[_0x578bb1(0x120)],_0x578bb1(0xf0),c[_0x578bb1(0x11f)][_0x578bb1(0x115)]),exports[_0x578bb1(0x120)]=W([c[_0x578bb1(0xcf)](j['UniverThreadCommentUIPlugin'],b[_0x578bb1(0x11c)],T['UniverLicensePlugin']),O(0x1,c[_0x578bb1(0xff)](c['Injector'])),O(0x2,c[_0x578bb1(0xd2)])],exports[_0x578bb1(0x120)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x218b1b=_0x5793;(function(_0x2f7d05,_0x345765){const _0x319dee=_0x5793,_0x582086=_0x2f7d05();while(!![]){try{const _0x4c5b48=-parseInt(_0x319dee(0x1ce))/0x1+parseInt(_0x319dee(0x1b3))/0x2+parseInt(_0x319dee(0x1e6))/0x3+parseInt(_0x319dee(0x1f2))/0x4+parseInt(_0x319dee(0x20a))/0x5+-parseInt(_0x319dee(0x1f6))/0x6+-parseInt(_0x319dee(0x1bb))/0x7*(parseInt(_0x319dee(0x1ef))/0x8);if(_0x4c5b48===_0x345765)break;else _0x582086['push'](_0x582086['shift']());}catch(_0x405fdf){_0x582086['push'](_0x582086['shift']());}}}(_0x1114,0xeb9c4));import{CommentService as _0x3c5e4f,CollaborationSessionService as _0x234389,UniverCollaborationClientPlugin as _0x529408}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e54fb}from'@univerjs-pro/license';import{dayjs as _0x57fc57,UserManagerService as _0x1e18f7,Inject as _0x57b463,Injector as _0x2b34e0,Disposable as _0x4b2cab,CustomRangeType as _0x41ef65,UniverInstanceType as _0x560016,DependentOn as _0x40913a,IConfigService as _0xec0c59,Plugin as _0x6a62ef,merge as _0x26f562}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x363f4c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x172d4d,IThreadCommentDataSourceService as _0x41f3b2}from'@univerjs/thread-comment';import{bufferTime as _0x1521d5}from'rxjs';import{HTTPService as _0x1b5530}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x48d5f4=>(_0x48d5f4[_0x48d5f4[_0x218b1b(0x1bf)]=0x0]='OpenOrReOpen',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1d5)]=0x1]='Solved',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1c3)]=-0x1]=_0x218b1b(0x1c3),_0x48d5f4))(I||{}),v=(_0x43bbf0=>(_0x43bbf0[_0x43bbf0[_0x218b1b(0x1d3)]=0x0]=_0x218b1b(0x1d3),_0x43bbf0[_0x43bbf0[_0x218b1b(0x200)]=0x1]=_0x218b1b(0x200),_0x43bbf0[_0x43bbf0[_0x218b1b(0x1b0)]=0x2]='Reply',_0x43bbf0[_0x43bbf0['Edit']=0x3]='Edit',_0x43bbf0[_0x43bbf0[_0x218b1b(0x1e9)]=0x4]=_0x218b1b(0x1e9),_0x43bbf0[_0x43bbf0['Solve']=0x5]=_0x218b1b(0x1ae),_0x43bbf0[_0x43bbf0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43bbf0))(v||{});const D=_0x5de655=>_0x57fc57(new Date(+_0x5de655))[_0x218b1b(0x1cb)](_0x218b1b(0x1af)),B=async(_0x32496e,_0x2a21a8)=>{const _0xc483cd=_0x218b1b,_0x452701=_0x32496e[_0xc483cd(0x1f7)](_0x1e18f7),_0x99a0b9=_0x32496e[_0xc483cd(0x1f7)](_0x1b5530);_0x2a21a8[_0xc483cd(0x1b5)](_0x453bfb=>{_0x452701['getUser'](_0x453bfb)&&_0x2a21a8['delete'](_0x453bfb);}),_0x2a21a8[_0xc483cd(0x1fa)]&&(await _0x99a0b9[_0xc483cd(0x1f7)](_0xc483cd(0x1bd),{'params':{'userIDs':[..._0x2a21a8]}}))[_0xc483cd(0x1cc)][_0xc483cd(0x209)][_0xc483cd(0x1b5)](_0x41d54c=>{const _0x40cb51=_0xc483cd;_0x41d54c&&_0x452701[_0x40cb51(0x1f5)](_0x41d54c);});};var K=Object[_0x218b1b(0x1cf)],V=(_0x2cc9fa,_0x6cc859,_0x1f408c,_0x5a37f6)=>{const _0x38341a=_0x218b1b;for(var _0x2d5a14=_0x5a37f6>0x1?void 0x0:_0x5a37f6?K(_0x6cc859,_0x1f408c):_0x6cc859,_0x4e9718=_0x2cc9fa[_0x38341a(0x1e8)]-0x1,_0x3b55ee;_0x4e9718>=0x0;_0x4e9718--)(_0x3b55ee=_0x2cc9fa[_0x4e9718])&&(_0x2d5a14=_0x3b55ee(_0x2d5a14)||_0x2d5a14);return _0x2d5a14;},p=(_0x28028a,_0x11976f)=>(_0x3ecca1,_0x5e38be)=>_0x11976f(_0x3ecca1,_0x5e38be,_0x28028a);let S=class extends _0x4b2cab{constructor(_0x21f0a9,_0x4257e6,_0xa3bc7f,_0x4d02f0){const _0x443dee=_0x218b1b;super(),this['_commentService']=_0x21f0a9,this[_0x443dee(0x1fb)]=_0x4257e6,this['_userService']=_0xa3bc7f,this[_0x443dee(0x1cd)]=_0x4d02f0,this[_0x443dee(0x1d7)](),this[_0x443dee(0x1b8)]();}['_initUserSync'](){const _0x1f7962=_0x218b1b;this[_0x1f7962(0x1ac)](this[_0x1f7962(0x1fb)][_0x1f7962(0x1d1)]['pipe'](_0x1521d5(0x10))[_0x1f7962(0x1f8)](_0x31fc0b=>{const _0x3e85e2=_0x1f7962,_0x47cd46=new Set();_0x31fc0b['forEach'](_0x50e185=>{const _0x35ff9=_0x5793;switch(_0x50e185[_0x35ff9(0x1d9)]){case'add':{const _0x3c6181=_0x50e185[_0x35ff9(0x1ee)][_0x35ff9(0x203)];_0x47cd46['add'](_0x3c6181);break;}}}),B(this[_0x3e85e2(0x1cd)],_0x47cd46);}));}[_0x218b1b(0x1d7)](){const _0x3df9e7=_0x218b1b;this[_0x3df9e7(0x1ac)](this[_0x3df9e7(0x1ba)]['commentUpdate$'][_0x3df9e7(0x1f8)](async _0x1c88f4=>{const _0x33f90b=_0x3df9e7;var _0x6a25fe,_0x309902,_0x192a9e,_0x447c29;const _0x4e8b8a=(_0x6a25fe=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4[_0x33f90b(0x1f0)])[_0x33f90b(0x1e4)](_0x3c4c23=>_0x3c4c23[_0x33f90b(0x1c1)]===_0x1c88f4['threadId']))==null?void 0x0:_0x6a25fe['root'];if(!_0x4e8b8a)return;const {unitId:_0x18e153,subUnitId:_0x1d86f0}=_0x4e8b8a;switch(_0x1c88f4[_0x33f90b(0x1e3)]&&this[_0x33f90b(0x1d8)]['addUser'](_0x1c88f4[_0x33f90b(0x1e3)]),_0x1c88f4[_0x33f90b(0x1d9)]){case v[_0x33f90b(0x200)]:break;case v[_0x33f90b(0x1b0)]:{this['_threadCommentModel'][_0x33f90b(0x1ea)](_0x18e153,_0x1d86f0,{'unitId':_0x18e153,'subUnitId':_0x1d86f0,'ref':'','id':_0x1c88f4[_0x33f90b(0x1dc)],'dT':D(+_0x1c88f4[_0x33f90b(0x1b6)]),'threadId':_0x1c88f4[_0x33f90b(0x1c1)],'personId':(_0x192a9e=(_0x309902=_0x1c88f4[_0x33f90b(0x1e3)])==null?void 0x0:_0x309902['userID'])!=null?_0x192a9e:_0x1c88f4[_0x33f90b(0x1ec)],'text':JSON['parse'](_0x1c88f4[_0x33f90b(0x1b4)]),'parentId':_0x4e8b8a['id']});break;}case v[_0x33f90b(0x1e9)]:{const _0x3e1005=this['_threadCommentModel'][_0x33f90b(0x1c8)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);_0x3e1005&&_0x3e1005[_0x33f90b(0x1e5)]&&this['_threadCommentModel'][_0x33f90b(0x1da)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);break;}case v['Edit']:{this[_0x33f90b(0x1fb)][_0x33f90b(0x1d2)](_0x18e153,_0x1d86f0,{'commentId':_0x1c88f4[_0x33f90b(0x1dc)],'text':JSON[_0x33f90b(0x1d4)](_0x1c88f4[_0x33f90b(0x1b4)])});break;}case v['Solve']:{const _0x79daf5=(_0x447c29=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4['unitId'])[_0x33f90b(0x1e4)](_0x4aa4d5=>_0x4aa4d5[_0x33f90b(0x1c1)]===_0x1c88f4[_0x33f90b(0x1c1)]))==null?void 0x0:_0x447c29[_0x33f90b(0x1de)];_0x79daf5&&this[_0x33f90b(0x1fb)][_0x33f90b(0x1b2)](_0x18e153,_0x1d86f0,_0x79daf5['id'],_0x1c88f4[_0x33f90b(0x1c2)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x57b463(_0x3c5e4f)),p(0x1,_0x57b463(_0x172d4d)),p(0x2,_0x57b463(_0x1e18f7)),p(0x3,_0x57b463(_0x2b34e0))],S);const z='thread-comment-data-source.config',M={};function _0x5793(_0x1a0fe1,_0x27a806){const _0x111446=_0x1114();return _0x5793=function(_0x579335,_0x46b67d){_0x579335=_0x579335-0x1aa;let _0x1aedd1=_0x111446[_0x579335];return _0x1aedd1;},_0x5793(_0x1a0fe1,_0x27a806);}var k=Object[_0x218b1b(0x1cf)],Q=(_0x2ee888,_0x5b796b,_0x39fb3a,_0x4f391c)=>{const _0x119055=_0x218b1b;for(var _0x38f24f=_0x4f391c>0x1?void 0x0:_0x4f391c?k(_0x5b796b,_0x39fb3a):_0x5b796b,_0x2da413=_0x2ee888[_0x119055(0x1e8)]-0x1,_0x9e11eb;_0x2da413>=0x0;_0x2da413--)(_0x9e11eb=_0x2ee888[_0x2da413])&&(_0x38f24f=_0x9e11eb(_0x38f24f)||_0x38f24f);return _0x38f24f;},_=(_0x1470ee,_0x3d6d6d)=>(_0x4fb35b,_0x35ff70)=>_0x3d6d6d(_0x4fb35b,_0x35ff70,_0x1470ee);function _0x1114(){const _0x3c601a=['getComment','customRanges','reply','format','body','_injector','617387WFSSks','getOwnPropertyDescriptor','_threadCommentDataSourceService','commentUpdate$','updateComment','Unknown','parse','Solved','_threadCommentDataSource','_init','_userService','type','deleteComment','/solved','replyId','comment','root','error','comments','_initDataSource','replies','user','find','parentId','5747580xgglVl','_config','length','Delete','addComment','add','userId','dataSource','payload','1913256CMWGYg','unitId','_sessionService','4049792MCZFHg','_configService','/universer-api/comment/unit/','addUser','5999292unGysp','get','subscribe','resolved','size','_threadCommentModel','code','UNIVER_UNKNOWN','pluginName','symbol','Add','_httpService','getMemberID','personId','saveCommentToSnapshot','getUnit','rangeId','rangeType','post','users','6177075QGObhl','values','onStarting','disposeWithMe','filter','Solve','YYYY/MM/DD\x20HH:mm','Reply','defineProperty','resolveComment','3055294MUFlmL','content','forEach','createTimestamp','/delete','_initUserSync','setConfig','_commentService','91GdzjXB','syncUpdateMutationToColla','/universer-api/user/list','/edit','OpenOrReOpen','stringify','threadId','solved','UNRECOGNIZED','map','COMMENT','requireSession','onReady'];_0x1114=function(){return _0x3c601a;};return _0x1114();}function X(_0x189eac,_0x9ab8f9){const _0x2bdc3e=_0x218b1b,_0x1902dc=_0x189eac[_0x2bdc3e(0x1e2)][0x0];return{..._0x9ab8f9,'id':_0x1902dc[_0x2bdc3e(0x1dc)],'resolved':_0x189eac[_0x2bdc3e(0x1c2)]===0x1,'dT':D(_0x1902dc[_0x2bdc3e(0x1b6)]),'personId':_0x1902dc[_0x2bdc3e(0x1ec)],'threadId':_0x1902dc[_0x2bdc3e(0x1c1)]};}function ee(_0x2d2a27,_0x4c5992,_0x4f4ff0){const _0x95fe85=_0x218b1b;var _0x2a5c90,_0x586e7d;if(((_0x586e7d=(_0x2a5c90=_0x2d2a27==null?void 0x0:_0x2d2a27[_0x95fe85(0x1e2)])==null?void 0x0:_0x2a5c90['length'])!=null?_0x586e7d:0x0)>0x0){const _0x372928=(_0x47ac82,_0x27ebc8)=>({'id':_0x47ac82['replyId'],'threadId':_0x47ac82[_0x95fe85(0x1c1)],'dT':D(_0x47ac82[_0x95fe85(0x1b6)]),'personId':_0x47ac82[_0x95fe85(0x1ec)],'resolved':_0x2d2a27[_0x95fe85(0x1c2)]===I[_0x95fe85(0x1d5)],'unitId':_0x4c5992,'subUnitId':_0x4f4ff0,'text':JSON[_0x95fe85(0x1d4)](_0x47ac82[_0x95fe85(0x1b4)]),'parentId':_0x27ebc8}),_0x29703f=_0x372928(_0x2d2a27['replies'][0x0]);return{..._0x29703f,'children':_0x2d2a27[_0x95fe85(0x1e2)]['slice'](0x1)['map'](_0x58c2f3=>_0x372928(_0x58c2f3,_0x29703f['id']))};}return null;}let f=class{constructor(_0x41015e,_0x36976e,_0x42020d,_0x5d1dcb){const _0x5e9b30=_0x218b1b;this['_httpService']=_0x41015e,this[_0x5e9b30(0x1d8)]=_0x36976e,this[_0x5e9b30(0x1f1)]=_0x42020d,this[_0x5e9b30(0x1cd)]=_0x5d1dcb;}async[_0x218b1b(0x1ea)](_0x550f4b){const _0x116228=_0x218b1b;var _0x4fc409,_0x35bca5;const {parentId:_0x1b284d,unitId:_0x5ca5bd,text:_0x231a87,threadId:_0x1046c5}=_0x550f4b,_0x15c45a=(_0x35bca5=(_0x4fc409=_0x231a87[_0x116228(0x1c9)])==null?void 0x0:_0x4fc409[_0x116228(0x1ad)](_0x31147d=>_0x31147d[_0x116228(0x207)]===_0x41ef65[_0x116228(0x1c5)])[_0x116228(0x1c4)](_0x4edcff=>_0x4edcff[_0x116228(0x206)]))!=null?_0x35bca5:[],_0xac80f6=JSON[_0x116228(0x1c0)](_0x231a87),_0x561a74=(await this[_0x116228(0x1f1)]['requireSession'](_0x5ca5bd))[_0x116228(0x202)]();if(_0x1b284d){const _0x2d29aa={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a,'threadId':_0x1046c5},_0x20a59b=(await this[_0x116228(0x201)][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/reply',{'body':_0x2d29aa}))[_0x116228(0x1cc)][_0x116228(0x1ca)];return{..._0x550f4b,'id':_0x20a59b[_0x116228(0x1dc)],'dT':_0x57fc57(+_0x20a59b[_0x116228(0x1b6)])[_0x116228(0x1cb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x20a59b[_0x116228(0x1ec)]};}else{const _0x5440ca={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a},_0x592c3c=await this['_httpService'][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/add',{'body':_0x5440ca});return X(_0x592c3c['body'][_0x116228(0x1dd)],_0x550f4b);}}async['updateComment'](_0x5421c1){const _0x59bc22=_0x218b1b;var _0xfaed3b,_0x54ba37;const {text:_0x4cd565,unitId:_0x9ecd81}=_0x5421c1,_0x34069a=(_0x54ba37=(_0xfaed3b=_0x4cd565[_0x59bc22(0x1c9)])==null?void 0x0:_0xfaed3b['filter'](_0x418fba=>_0x418fba[_0x59bc22(0x207)]===_0x41ef65['COMMENT'])[_0x59bc22(0x1c4)](_0x50346c=>_0x50346c[_0x59bc22(0x206)]))!=null?_0x54ba37:[],_0xdcdff2=JSON[_0x59bc22(0x1c0)](_0x4cd565),_0x27b6c7=_0x5421c1[_0x59bc22(0x1c1)],_0x257710=_0x5421c1['id'],_0x3b0da1={'memberId':(await this[_0x59bc22(0x1f1)][_0x59bc22(0x1c6)](_0x9ecd81))[_0x59bc22(0x202)](),'unitId':_0x9ecd81,'threadId':_0x27b6c7,'mention':_0x34069a,'content':_0xdcdff2,'replyId':_0x257710},_0x4c6c04=await this[_0x59bc22(0x201)][_0x59bc22(0x208)](_0x59bc22(0x1f4)+_0x9ecd81+_0x59bc22(0x1be),{'body':_0x3b0da1});return!_0x4c6c04[_0x59bc22(0x1cc)]['error']||_0x4c6c04[_0x59bc22(0x1cc)]['error']['code']===0x1;}async['resolveComment'](_0x15f442){const _0x29b574=_0x218b1b,{unitId:_0x3b631a}=_0x15f442,_0x5c634f=_0x15f442[_0x29b574(0x1c1)],_0x18d9bd={'memberId':this[_0x29b574(0x1d8)]['getCurrentUser']()['userID'],'unitId':_0x3b631a,'threadId':_0x5c634f,'solved':_0x15f442[_0x29b574(0x1f9)]?I['Solved']:I['OpenOrReOpen']},_0x21cb72=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3b631a+_0x29b574(0x1db),{'body':_0x18d9bd});return!_0x21cb72[_0x29b574(0x1cc)][_0x29b574(0x1df)]||_0x21cb72['body'][_0x29b574(0x1df)]['code']===0x1;}async[_0x218b1b(0x1da)](_0x4cbaea,_0x1d903c,_0x3beacd,_0x55ecda){const _0x413474=_0x218b1b,_0x442131={'memberId':(await this[_0x413474(0x1f1)]['requireSession'](_0x4cbaea))[_0x413474(0x202)](),'threadId':_0x3beacd,'replyId':_0x55ecda,'unitId':_0x4cbaea},_0x917901=await this[_0x413474(0x201)]['post'](_0x413474(0x1f4)+_0x4cbaea+_0x413474(0x1b7),{'body':_0x442131});return!_0x917901[_0x413474(0x1cc)][_0x413474(0x1df)]||_0x917901[_0x413474(0x1cc)]['error'][_0x413474(0x1fc)]===0x1;}async['listComments'](_0x15c2fe,_0x2fefd9,_0xa7015){const _0x3b66da=_0x218b1b,_0x425889={'unitId':_0x15c2fe,'threadId':_0xa7015},_0x5013fe=await this[_0x3b66da(0x201)]['post']('/universer-api/comment/unit/'+_0x15c2fe+'/list',{'body':_0x425889}),_0x17dd92=_0xa7015[_0x3b66da(0x1c4)](_0x246688=>ee(_0x5013fe['body'][_0x3b66da(0x1e0)][_0x246688],_0x15c2fe,_0x2fefd9))['filter'](Boolean);return Object[_0x3b66da(0x1aa)](_0x5013fe[_0x3b66da(0x1cc)][_0x3b66da(0x209)])[_0x3b66da(0x1b5)](_0x38cdf3=>{const _0xaa4097=_0x3b66da;this[_0xaa4097(0x1d8)][_0xaa4097(0x1f5)](_0x38cdf3);}),_0x17dd92;}[_0x218b1b(0x204)](_0x5564f2){const _0x4e676f=_0x218b1b;return{'id':_0x5564f2['id'],'threadId':_0x5564f2[_0x4e676f(0x1c1)],'ref':_0x5564f2['ref']};}};f=Q([_(0x0,_0x57b463(_0x1b5530)),_(0x1,_0x57b463(_0x1e18f7)),_(0x2,_0x57b463(_0x234389)),_(0x3,_0x57b463(_0x2b34e0))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x370407,_0xf4b3c0,_0x16d409,_0x36b6ff)=>{for(var _0x25d21d=_0x36b6ff>0x1?void 0x0:_0x36b6ff?re(_0xf4b3c0,_0x16d409):_0xf4b3c0,_0x347b03=_0x370407['length']-0x1,_0x3de019;_0x347b03>=0x0;_0x347b03--)(_0x3de019=_0x370407[_0x347b03])&&(_0x25d21d=_0x3de019(_0x25d21d)||_0x25d21d);return _0x25d21d;},N=(_0x57484d,_0x7b693a)=>(_0x11f3c3,_0x194d79)=>_0x7b693a(_0x11f3c3,_0x194d79,_0x57484d);let g=class extends _0x4b2cab{constructor(_0x4d2277,_0x373121){const _0x1e99dc=_0x218b1b;super(),this[_0x1e99dc(0x1d0)]=_0x4d2277,this[_0x1e99dc(0x1d6)]=_0x373121,this[_0x1e99dc(0x1e1)]();}['_initDataSource'](){const _0x4d7ec7=_0x218b1b;this[_0x4d7ec7(0x1d0)][_0x4d7ec7(0x1ed)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4d7ec7(0x1bc)]=!0x1;}};g=te([N(0x0,_0x41f3b2),N(0x1,_0x57b463(f))],g);var se=Object[_0x218b1b(0x1b1)],oe=Object[_0x218b1b(0x1cf)],ne=(_0x4d6cd6,_0x54b7d6,_0x2fef47)=>_0x54b7d6 in _0x4d6cd6?se(_0x4d6cd6,_0x54b7d6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2fef47}):_0x4d6cd6[_0x54b7d6]=_0x2fef47,ie=(_0x3ac978,_0x4e242f,_0x2a17b8,_0x30979f)=>{const _0x2c00e5=_0x218b1b;for(var _0x10bf60=_0x30979f>0x1?void 0x0:_0x30979f?oe(_0x4e242f,_0x2a17b8):_0x4e242f,_0x24bce6=_0x3ac978[_0x2c00e5(0x1e8)]-0x1,_0x30ffdf;_0x24bce6>=0x0;_0x24bce6--)(_0x30ffdf=_0x3ac978[_0x24bce6])&&(_0x10bf60=_0x30ffdf(_0x10bf60)||_0x10bf60);return _0x10bf60;},w=(_0x330e8e,_0x1aea17)=>(_0x326674,_0x3423e5)=>_0x1aea17(_0x326674,_0x3423e5,_0x330e8e),$=(_0x5c726b,_0x4c5532,_0x1ebdd9)=>ne(_0x5c726b,typeof _0x4c5532!=_0x218b1b(0x1ff)?_0x4c5532+'':_0x4c5532,_0x1ebdd9);let b=class extends _0x6a62ef{constructor(_0x1fafff=M,_0x2da749,_0x394955){const _0x4f8f84=_0x218b1b;super(),this[_0x4f8f84(0x1e7)]=_0x1fafff,this[_0x4f8f84(0x1cd)]=_0x2da749,this[_0x4f8f84(0x1f3)]=_0x394955;const {..._0x2d86ac}=_0x26f562({},M,this[_0x4f8f84(0x1e7)]);this[_0x4f8f84(0x1f3)][_0x4f8f84(0x1b9)](z,_0x2d86ac);}[_0x218b1b(0x1ab)](){const _0x1df57e=_0x218b1b;[[f],[g],[S]][_0x1df57e(0x1b5)](_0x1c0741=>{const _0x1207b6=_0x1df57e;this[_0x1207b6(0x1cd)][_0x1207b6(0x1eb)](_0x1c0741);});}[_0x218b1b(0x1c7)](){const _0x92beb3=_0x218b1b;this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](g),this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](S);}};$(b,_0x218b1b(0x1fe),W),$(b,_0x218b1b(0x1d9),_0x560016[_0x218b1b(0x1fd)]),b=ie([_0x40913a(_0x363f4c,_0x529408,_0x1e54fb),w(0x1,_0x57b463(_0x2b34e0)),w(0x2,_0xec0c59)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x293706=_0x3c54;(function(_0x58e3e8,_0x200c12){const _0x338b0a=_0x3c54,_0x529f35=_0x58e3e8();while(!![]){try{const _0x4f0194=-parseInt(_0x338b0a(0xf5))/0x1*(parseInt(_0x338b0a(0x11d))/0x2)+-parseInt(_0x338b0a(0xc3))/0x3+-parseInt(_0x338b0a(0xe3))/0x4+parseInt(_0x338b0a(0x120))/0x5+parseInt(_0x338b0a(0xda))/0x6*(-parseInt(_0x338b0a(0x117))/0x7)+parseInt(_0x338b0a(0x101))/0x8+-parseInt(_0x338b0a(0xc9))/0x9*(-parseInt(_0x338b0a(0xea))/0xa);if(_0x4f0194===_0x200c12)break;else _0x529f35['push'](_0x529f35['shift']());}catch(_0xdb568a){_0x529f35['push'](_0x529f35['shift']());}}}(_0x2dbc,0xa2a09));import{CommentService as _0x4dcb6c,CollaborationSessionService as _0x40f849,UniverCollaborationClientPlugin as _0x320f56}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9823}from'@univerjs-pro/license';import{dayjs as _0x30b957,UserManagerService as _0x3196d5,Inject as _0x3bd5d5,Injector as _0x2dd791,Disposable as _0x3a5f25,CustomRangeType as _0x854669,UniverInstanceType as _0x58268d,DependentOn as _0x3479fe,IConfigService as _0x5d4364,Plugin as _0x287d2d,merge as _0x1aaaac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x516425}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48ead0,IThreadCommentDataSourceService as _0x2416c3}from'@univerjs/thread-comment';import{bufferTime as _0x2f2c97}from'rxjs';function _0x2dbc(){const _0x5ef8ce=['getUser','_injector','COMMENT','symbol','userID','2166764YwLVRy','Solve','getComment','_configService','_init','_initUserSync','pipe','510KyjSna','parse','thread-comment-data-source.config','_threadCommentModel','post','forEach','/reply','requireSession','defineProperty','getUnit','/solved','138231BwZRfT','resolved','rangeId','find','users','_initDataSource','/universer-api/comment/unit/','get','map','Unknown','subscribe','personId','5160968LzzNtC','/add','stringify','addComment','disposeWithMe','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','_threadCommentDataSourceService','/universer-api/user/list','Solved','_config','createTimestamp','filter','payload','resolveComment','_sessionService','replies','length','user','/list','size','_userService','791287xrLqTp','body','replyId','_threadCommentDataSource','solved','delete','18NJHVyY','_httpService','error','6366260NvOmeL','deleteComment','code','Reply','threadId','customRanges','addUser','getCurrentUser','rangeType','1229106YULOFb','userId','ref','unitId','onStarting','listComments','186399RQDqKh','dataSource','slice','commentUpdate$','root','UNIVER_UNKNOWN','getMemberID','parentId','UNRECOGNIZED','_commentService','Edit','add','content','type','format','setConfig','Delete','6UVTtnX','updateComment','Add','getOwnPropertyDescriptor'];_0x2dbc=function(){return _0x5ef8ce;};return _0x2dbc();}import{HTTPService as _0x191dc9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5226b2=>(_0x5226b2[_0x5226b2[_0x293706(0x107)]=0x0]='OpenOrReOpen',_0x5226b2[_0x5226b2[_0x293706(0x10a)]=0x1]=_0x293706(0x10a),_0x5226b2[_0x5226b2[_0x293706(0xd1)]=-0x1]=_0x293706(0xd1),_0x5226b2))(I||{}),v=(_0x4dcd9d=>(_0x4dcd9d[_0x4dcd9d['Unknown']=0x0]=_0x293706(0xfe),_0x4dcd9d[_0x4dcd9d[_0x293706(0xdc)]=0x1]='Add',_0x4dcd9d[_0x4dcd9d['Reply']=0x2]=_0x293706(0x123),_0x4dcd9d[_0x4dcd9d['Edit']=0x3]='Edit',_0x4dcd9d[_0x4dcd9d[_0x293706(0xd9)]=0x4]=_0x293706(0xd9),_0x4dcd9d[_0x4dcd9d[_0x293706(0xe4)]=0x5]=_0x293706(0xe4),_0x4dcd9d[_0x4dcd9d[_0x293706(0xd1)]=-0x1]='UNRECOGNIZED',_0x4dcd9d))(v||{});const D=_0x4b7d74=>_0x30b957(new Date(+_0x4b7d74))[_0x293706(0xd7)](_0x293706(0x106)),B=async(_0x5a4b02,_0x1b7f1c)=>{const _0x72a905=_0x293706,_0x49ab71=_0x5a4b02[_0x72a905(0xfc)](_0x3196d5),_0x53d4b6=_0x5a4b02[_0x72a905(0xfc)](_0x191dc9);_0x1b7f1c[_0x72a905(0xef)](_0x51fa7=>{const _0x50a859=_0x72a905;_0x49ab71[_0x50a859(0xde)](_0x51fa7)&&_0x1b7f1c[_0x50a859(0x11c)](_0x51fa7);}),_0x1b7f1c[_0x72a905(0x115)]&&(await _0x53d4b6[_0x72a905(0xfc)](_0x72a905(0x109),{'params':{'userIDs':[..._0x1b7f1c]}}))[_0x72a905(0x118)][_0x72a905(0xf9)]['forEach'](_0x28d0e1=>{const _0x1821c5=_0x72a905;_0x28d0e1&&_0x49ab71[_0x1821c5(0xc0)](_0x28d0e1);});};var K=Object[_0x293706(0xdd)],V=(_0x30beea,_0x52fe5f,_0x5f5311,_0x5562ab)=>{for(var _0x381bab=_0x5562ab>0x1?void 0x0:_0x5562ab?K(_0x52fe5f,_0x5f5311):_0x52fe5f,_0x2e08b8=_0x30beea['length']-0x1,_0x933162;_0x2e08b8>=0x0;_0x2e08b8--)(_0x933162=_0x30beea[_0x2e08b8])&&(_0x381bab=_0x933162(_0x381bab)||_0x381bab);return _0x381bab;},p=(_0xa2a71a,_0x26af67)=>(_0x449bae,_0x32e695)=>_0x26af67(_0x449bae,_0x32e695,_0xa2a71a);let S=class extends _0x3a5f25{constructor(_0x453871,_0x928fe0,_0x51a3b6,_0x4f2b76){const _0x54d1d2=_0x293706;super(),this[_0x54d1d2(0xd2)]=_0x453871,this[_0x54d1d2(0xed)]=_0x928fe0,this['_userService']=_0x51a3b6,this[_0x54d1d2(0xdf)]=_0x4f2b76,this[_0x54d1d2(0xe7)](),this[_0x54d1d2(0xe8)]();}[_0x293706(0xe8)](){const _0x3abfd6=_0x293706;this['disposeWithMe'](this[_0x3abfd6(0xed)][_0x3abfd6(0xcc)][_0x3abfd6(0xe9)](_0x2f2c97(0x10))[_0x3abfd6(0xff)](_0x20520d=>{const _0x2057a1=_0x3abfd6,_0x119b7a=new Set();_0x20520d[_0x2057a1(0xef)](_0x1829b5=>{const _0x15ebe2=_0x2057a1;switch(_0x1829b5[_0x15ebe2(0xd6)]){case _0x15ebe2(0xd4):{const _0x4a0e07=_0x1829b5[_0x15ebe2(0x10e)][_0x15ebe2(0x100)];_0x119b7a[_0x15ebe2(0xd4)](_0x4a0e07);break;}}}),B(this[_0x2057a1(0xdf)],_0x119b7a);}));}[_0x293706(0xe7)](){const _0x2435b6=_0x293706;this[_0x2435b6(0x105)](this['_commentService'][_0x2435b6(0xcc)]['subscribe'](async _0x3c857f=>{const _0x37388a=_0x2435b6;var _0x3d71b4,_0x2252d6,_0x53c898,_0x192981;const _0x68ba12=(_0x3d71b4=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f[_0x37388a(0xc6)])[_0x37388a(0xf8)](_0xd54b6b=>_0xd54b6b['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x3d71b4[_0x37388a(0xcd)];if(!_0x68ba12)return;const {unitId:_0x4f6342,subUnitId:_0x366811}=_0x68ba12;switch(_0x3c857f[_0x37388a(0x113)]&&this[_0x37388a(0x116)][_0x37388a(0xc0)](_0x3c857f[_0x37388a(0x113)]),_0x3c857f['type']){case v[_0x37388a(0xdc)]:break;case v[_0x37388a(0x123)]:{this[_0x37388a(0xed)][_0x37388a(0x104)](_0x4f6342,_0x366811,{'unitId':_0x4f6342,'subUnitId':_0x366811,'ref':'','id':_0x3c857f['replyId'],'dT':D(+_0x3c857f[_0x37388a(0x10c)]),'threadId':_0x3c857f[_0x37388a(0xbe)],'personId':(_0x53c898=(_0x2252d6=_0x3c857f['user'])==null?void 0x0:_0x2252d6[_0x37388a(0xe2)])!=null?_0x53c898:_0x3c857f[_0x37388a(0xc4)],'text':JSON[_0x37388a(0xeb)](_0x3c857f[_0x37388a(0xd5)]),'parentId':_0x68ba12['id']});break;}case v[_0x37388a(0xd9)]:{const _0x429ed6=this['_threadCommentModel'][_0x37388a(0xe5)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);_0x429ed6&&_0x429ed6[_0x37388a(0xd0)]&&this[_0x37388a(0xed)][_0x37388a(0x121)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);break;}case v[_0x37388a(0xd3)]:{this[_0x37388a(0xed)][_0x37388a(0xdb)](_0x4f6342,_0x366811,{'commentId':_0x3c857f['replyId'],'text':JSON['parse'](_0x3c857f['content'])});break;}case v[_0x37388a(0xe4)]:{const _0x17b09c=(_0x192981=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f['unitId'])['find'](_0x519117=>_0x519117['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x192981['root'];_0x17b09c&&this[_0x37388a(0xed)][_0x37388a(0x10f)](_0x4f6342,_0x366811,_0x17b09c['id'],_0x3c857f['solved']===I[_0x37388a(0x10a)]);break;}}}));}};S=V([p(0x0,_0x3bd5d5(_0x4dcb6c)),p(0x1,_0x3bd5d5(_0x48ead0)),p(0x2,_0x3bd5d5(_0x3196d5)),p(0x3,_0x3bd5d5(_0x2dd791))],S);function _0x3c54(_0x57a76a,_0x1b7982){const _0x2dbc8d=_0x2dbc();return _0x3c54=function(_0x3c540a,_0xe454a5){_0x3c540a=_0x3c540a-0xbe;let _0x7feb65=_0x2dbc8d[_0x3c540a];return _0x7feb65;},_0x3c54(_0x57a76a,_0x1b7982);}const z=_0x293706(0xec),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1632d7,_0x1e7ee6,_0x4a221e,_0xcf572b)=>{const _0x59e9ee=_0x293706;for(var _0x4f0bfe=_0xcf572b>0x1?void 0x0:_0xcf572b?k(_0x1e7ee6,_0x4a221e):_0x1e7ee6,_0x5ec4a4=_0x1632d7[_0x59e9ee(0x112)]-0x1,_0x552ed2;_0x5ec4a4>=0x0;_0x5ec4a4--)(_0x552ed2=_0x1632d7[_0x5ec4a4])&&(_0x4f0bfe=_0x552ed2(_0x4f0bfe)||_0x4f0bfe);return _0x4f0bfe;},_=(_0x1f6295,_0x4f1bf4)=>(_0x276c1d,_0x5662a0)=>_0x4f1bf4(_0x276c1d,_0x5662a0,_0x1f6295);function X(_0x44fe48,_0x49ae41){const _0x5979a5=_0x293706,_0x5b6387=_0x44fe48[_0x5979a5(0x111)][0x0];return{..._0x49ae41,'id':_0x5b6387[_0x5979a5(0x119)],'resolved':_0x44fe48[_0x5979a5(0x11b)]===0x1,'dT':D(_0x5b6387[_0x5979a5(0x10c)]),'personId':_0x5b6387[_0x5979a5(0xc4)],'threadId':_0x5b6387[_0x5979a5(0xbe)]};}function ee(_0x36997a,_0x4abe74,_0x10af6d){const _0x1fc04e=_0x293706;var _0x5b6ad5,_0x995892;if(((_0x995892=(_0x5b6ad5=_0x36997a==null?void 0x0:_0x36997a[_0x1fc04e(0x111)])==null?void 0x0:_0x5b6ad5[_0x1fc04e(0x112)])!=null?_0x995892:0x0)>0x0){const _0x1bc15d=(_0x5a1587,_0x3bbc06)=>({'id':_0x5a1587[_0x1fc04e(0x119)],'threadId':_0x5a1587[_0x1fc04e(0xbe)],'dT':D(_0x5a1587[_0x1fc04e(0x10c)]),'personId':_0x5a1587[_0x1fc04e(0xc4)],'resolved':_0x36997a[_0x1fc04e(0x11b)]===I[_0x1fc04e(0x10a)],'unitId':_0x4abe74,'subUnitId':_0x10af6d,'text':JSON[_0x1fc04e(0xeb)](_0x5a1587[_0x1fc04e(0xd5)]),'parentId':_0x3bbc06}),_0x518af1=_0x1bc15d(_0x36997a['replies'][0x0]);return{..._0x518af1,'children':_0x36997a[_0x1fc04e(0x111)][_0x1fc04e(0xcb)](0x1)[_0x1fc04e(0xfd)](_0x54dcf2=>_0x1bc15d(_0x54dcf2,_0x518af1['id']))};}return null;}let f=class{constructor(_0x7e778e,_0x1a4119,_0x3f6cd9,_0x4bc76d){const _0x3ec7f2=_0x293706;this[_0x3ec7f2(0x11e)]=_0x7e778e,this['_userService']=_0x1a4119,this[_0x3ec7f2(0x110)]=_0x3f6cd9,this[_0x3ec7f2(0xdf)]=_0x4bc76d;}async['addComment'](_0x2fd081){const _0x66793c=_0x293706;var _0x2deb51,_0x15d31f;const {parentId:_0x5c2f3e,unitId:_0x459a92,text:_0x465f02,threadId:_0x483851}=_0x2fd081,_0xc2ff04=(_0x15d31f=(_0x2deb51=_0x465f02[_0x66793c(0xbf)])==null?void 0x0:_0x2deb51[_0x66793c(0x10d)](_0x4349f0=>_0x4349f0[_0x66793c(0xc2)]===_0x854669[_0x66793c(0xe0)])['map'](_0xef9756=>_0xef9756[_0x66793c(0xf7)]))!=null?_0x15d31f:[],_0x4307da=JSON[_0x66793c(0x103)](_0x465f02),_0x3446c0=(await this['_sessionService']['requireSession'](_0x459a92))[_0x66793c(0xcf)]();if(_0x5c2f3e){const _0x5041b3={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04,'threadId':_0x483851},_0x191a54=(await this['_httpService'][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0xf0),{'body':_0x5041b3}))[_0x66793c(0x118)]['reply'];return{..._0x2fd081,'id':_0x191a54[_0x66793c(0x119)],'dT':_0x30b957(+_0x191a54[_0x66793c(0x10c)])['format'](_0x66793c(0x106)),'personId':_0x191a54[_0x66793c(0xc4)]};}else{const _0x469b8c={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04},_0x3b8a05=await this[_0x66793c(0x11e)][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0x102),{'body':_0x469b8c});return X(_0x3b8a05[_0x66793c(0x118)]['comment'],_0x2fd081);}}async[_0x293706(0xdb)](_0x4a15d9){const _0x32f301=_0x293706;var _0x115165,_0x5df503;const {text:_0x472bd7,unitId:_0x2d9b9a}=_0x4a15d9,_0x540cbd=(_0x5df503=(_0x115165=_0x472bd7[_0x32f301(0xbf)])==null?void 0x0:_0x115165[_0x32f301(0x10d)](_0x5ced11=>_0x5ced11[_0x32f301(0xc2)]===_0x854669['COMMENT'])[_0x32f301(0xfd)](_0x46d31c=>_0x46d31c[_0x32f301(0xf7)]))!=null?_0x5df503:[],_0x4311a2=JSON[_0x32f301(0x103)](_0x472bd7),_0x4ed214=_0x4a15d9[_0x32f301(0xbe)],_0x213e9d=_0x4a15d9['id'],_0x23982a={'memberId':(await this['_sessionService'][_0x32f301(0xf1)](_0x2d9b9a))[_0x32f301(0xcf)](),'unitId':_0x2d9b9a,'threadId':_0x4ed214,'mention':_0x540cbd,'content':_0x4311a2,'replyId':_0x213e9d},_0x553af4=await this[_0x32f301(0x11e)][_0x32f301(0xee)](_0x32f301(0xfb)+_0x2d9b9a+'/edit',{'body':_0x23982a});return!_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)]||_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)][_0x32f301(0x122)]===0x1;}async['resolveComment'](_0x79e56b){const _0x48961e=_0x293706,{unitId:_0x1cc0df}=_0x79e56b,_0x38c259=_0x79e56b[_0x48961e(0xbe)],_0x2f7f56={'memberId':this['_userService'][_0x48961e(0xc1)]()[_0x48961e(0xe2)],'unitId':_0x1cc0df,'threadId':_0x38c259,'solved':_0x79e56b[_0x48961e(0xf6)]?I[_0x48961e(0x10a)]:I[_0x48961e(0x107)]},_0x5733c4=await this[_0x48961e(0x11e)][_0x48961e(0xee)](_0x48961e(0xfb)+_0x1cc0df+_0x48961e(0xf4),{'body':_0x2f7f56});return!_0x5733c4[_0x48961e(0x118)][_0x48961e(0x11f)]||_0x5733c4[_0x48961e(0x118)]['error'][_0x48961e(0x122)]===0x1;}async[_0x293706(0x121)](_0x5d3ddc,_0x1b793d,_0x7149e8,_0x3014dc){const _0x3539ff=_0x293706,_0x1df114={'memberId':(await this[_0x3539ff(0x110)][_0x3539ff(0xf1)](_0x5d3ddc))[_0x3539ff(0xcf)](),'threadId':_0x7149e8,'replyId':_0x3014dc,'unitId':_0x5d3ddc},_0x17131b=await this[_0x3539ff(0x11e)]['post'](_0x3539ff(0xfb)+_0x5d3ddc+'/delete',{'body':_0x1df114});return!_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)]||_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)][_0x3539ff(0x122)]===0x1;}async[_0x293706(0xc8)](_0x57cc2c,_0x232977,_0x51e319){const _0x4de966=_0x293706,_0x43cfcb={'unitId':_0x57cc2c,'threadId':_0x51e319},_0x5b56db=await this[_0x4de966(0x11e)][_0x4de966(0xee)](_0x4de966(0xfb)+_0x57cc2c+_0x4de966(0x114),{'body':_0x43cfcb}),_0x2f5970=_0x51e319[_0x4de966(0xfd)](_0x26046a=>ee(_0x5b56db[_0x4de966(0x118)]['comments'][_0x26046a],_0x57cc2c,_0x232977))[_0x4de966(0x10d)](Boolean);return Object['values'](_0x5b56db['body'][_0x4de966(0xf9)])[_0x4de966(0xef)](_0x398273=>{const _0x1a32a8=_0x4de966;this['_userService'][_0x1a32a8(0xc0)](_0x398273);}),_0x2f5970;}['saveCommentToSnapshot'](_0x13ce20){const _0x2d335d=_0x293706;return{'id':_0x13ce20['id'],'threadId':_0x13ce20['threadId'],'ref':_0x13ce20[_0x2d335d(0xc5)]};}};f=Q([_(0x0,_0x3bd5d5(_0x191dc9)),_(0x1,_0x3bd5d5(_0x3196d5)),_(0x2,_0x3bd5d5(_0x40f849)),_(0x3,_0x3bd5d5(_0x2dd791))],f);var re=Object[_0x293706(0xdd)],te=(_0x1d4d36,_0x458372,_0x127bcc,_0x215438)=>{for(var _0x3e43a4=_0x215438>0x1?void 0x0:_0x215438?re(_0x458372,_0x127bcc):_0x458372,_0x5024d1=_0x1d4d36['length']-0x1,_0x331327;_0x5024d1>=0x0;_0x5024d1--)(_0x331327=_0x1d4d36[_0x5024d1])&&(_0x3e43a4=_0x331327(_0x3e43a4)||_0x3e43a4);return _0x3e43a4;},N=(_0x5af987,_0x2995d8)=>(_0x2ab013,_0x35438e)=>_0x2995d8(_0x2ab013,_0x35438e,_0x5af987);let g=class extends _0x3a5f25{constructor(_0x389787,_0x4a422f){const _0x3abbf6=_0x293706;super(),this[_0x3abbf6(0x108)]=_0x389787,this[_0x3abbf6(0x11a)]=_0x4a422f,this[_0x3abbf6(0xfa)]();}[_0x293706(0xfa)](){const _0x21025c=_0x293706;this[_0x21025c(0x108)][_0x21025c(0xca)]=this[_0x21025c(0x11a)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2416c3),N(0x1,_0x3bd5d5(f))],g);var se=Object[_0x293706(0xf2)],oe=Object[_0x293706(0xdd)],ne=(_0x2ec168,_0x23c57f,_0x42682f)=>_0x23c57f in _0x2ec168?se(_0x2ec168,_0x23c57f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42682f}):_0x2ec168[_0x23c57f]=_0x42682f,ie=(_0x4cf028,_0x2753b1,_0x3d6d11,_0x19366b)=>{const _0x406116=_0x293706;for(var _0x25c8ea=_0x19366b>0x1?void 0x0:_0x19366b?oe(_0x2753b1,_0x3d6d11):_0x2753b1,_0x4bcd37=_0x4cf028[_0x406116(0x112)]-0x1,_0x55881d;_0x4bcd37>=0x0;_0x4bcd37--)(_0x55881d=_0x4cf028[_0x4bcd37])&&(_0x25c8ea=_0x55881d(_0x25c8ea)||_0x25c8ea);return _0x25c8ea;},w=(_0x3d2689,_0x475db5)=>(_0x41e608,_0x1a0034)=>_0x475db5(_0x41e608,_0x1a0034,_0x3d2689),$=(_0x54a4df,_0x2291fc,_0x4f7cf8)=>ne(_0x54a4df,typeof _0x2291fc!=_0x293706(0xe1)?_0x2291fc+'':_0x2291fc,_0x4f7cf8);let b=class extends _0x287d2d{constructor(_0x318192=M,_0x711135,_0x51b8c5){const _0x1e7db9=_0x293706;super(),this[_0x1e7db9(0x10b)]=_0x318192,this[_0x1e7db9(0xdf)]=_0x711135,this[_0x1e7db9(0xe6)]=_0x51b8c5;const {..._0x137174}=_0x1aaaac({},M,this[_0x1e7db9(0x10b)]);this[_0x1e7db9(0xe6)][_0x1e7db9(0xd8)](z,_0x137174);}[_0x293706(0xc7)](){const _0x49c07d=_0x293706;[[f],[g],[S]][_0x49c07d(0xef)](_0x2dffec=>{const _0x1a4b13=_0x49c07d;this[_0x1a4b13(0xdf)][_0x1a4b13(0xd4)](_0x2dffec);});}['onReady'](){const _0x46faf1=_0x293706;this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](g),this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](S);}};$(b,'pluginName',W),$(b,_0x293706(0xd6),_0x58268d[_0x293706(0xce)]),b=ie([_0x3479fe(_0x516425,_0x320f56,_0x4b9823),w(0x1,_0x3bd5d5(_0x2dd791)),w(0x2,_0x5d4364)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x218b1b=_0x5793;(function(_0x2f7d05,_0x345765){const _0x319dee=_0x5793,_0x582086=_0x2f7d05();while(!![]){try{const _0x4c5b48=-parseInt(_0x319dee(0x1ce))/0x1+parseInt(_0x319dee(0x1b3))/0x2+parseInt(_0x319dee(0x1e6))/0x3+parseInt(_0x319dee(0x1f2))/0x4+parseInt(_0x319dee(0x20a))/0x5+-parseInt(_0x319dee(0x1f6))/0x6+-parseInt(_0x319dee(0x1bb))/0x7*(parseInt(_0x319dee(0x1ef))/0x8);if(_0x4c5b48===_0x345765)break;else _0x582086['push'](_0x582086['shift']());}catch(_0x405fdf){_0x582086['push'](_0x582086['shift']());}}}(_0x1114,0xeb9c4));import{CommentService as _0x3c5e4f,CollaborationSessionService as _0x234389,UniverCollaborationClientPlugin as _0x529408}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e54fb}from'@univerjs-pro/license';import{dayjs as _0x57fc57,UserManagerService as _0x1e18f7,Inject as _0x57b463,Injector as _0x2b34e0,Disposable as _0x4b2cab,CustomRangeType as _0x41ef65,UniverInstanceType as _0x560016,DependentOn as _0x40913a,IConfigService as _0xec0c59,Plugin as _0x6a62ef,merge as _0x26f562}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x363f4c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x172d4d,IThreadCommentDataSourceService as _0x41f3b2}from'@univerjs/thread-comment';import{bufferTime as _0x1521d5}from'rxjs';import{HTTPService as _0x1b5530}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x48d5f4=>(_0x48d5f4[_0x48d5f4[_0x218b1b(0x1bf)]=0x0]='OpenOrReOpen',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1d5)]=0x1]='Solved',_0x48d5f4[_0x48d5f4[_0x218b1b(0x1c3)]=-0x1]=_0x218b1b(0x1c3),_0x48d5f4))(I||{}),v=(_0x43bbf0=>(_0x43bbf0[_0x43bbf0[_0x218b1b(0x1d3)]=0x0]=_0x218b1b(0x1d3),_0x43bbf0[_0x43bbf0[_0x218b1b(0x200)]=0x1]=_0x218b1b(0x200),_0x43bbf0[_0x43bbf0[_0x218b1b(0x1b0)]=0x2]='Reply',_0x43bbf0[_0x43bbf0['Edit']=0x3]='Edit',_0x43bbf0[_0x43bbf0[_0x218b1b(0x1e9)]=0x4]=_0x218b1b(0x1e9),_0x43bbf0[_0x43bbf0['Solve']=0x5]=_0x218b1b(0x1ae),_0x43bbf0[_0x43bbf0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43bbf0))(v||{});const D=_0x5de655=>_0x57fc57(new Date(+_0x5de655))[_0x218b1b(0x1cb)](_0x218b1b(0x1af)),B=async(_0x32496e,_0x2a21a8)=>{const _0xc483cd=_0x218b1b,_0x452701=_0x32496e[_0xc483cd(0x1f7)](_0x1e18f7),_0x99a0b9=_0x32496e[_0xc483cd(0x1f7)](_0x1b5530);_0x2a21a8[_0xc483cd(0x1b5)](_0x453bfb=>{_0x452701['getUser'](_0x453bfb)&&_0x2a21a8['delete'](_0x453bfb);}),_0x2a21a8[_0xc483cd(0x1fa)]&&(await _0x99a0b9[_0xc483cd(0x1f7)](_0xc483cd(0x1bd),{'params':{'userIDs':[..._0x2a21a8]}}))[_0xc483cd(0x1cc)][_0xc483cd(0x209)][_0xc483cd(0x1b5)](_0x41d54c=>{const _0x40cb51=_0xc483cd;_0x41d54c&&_0x452701[_0x40cb51(0x1f5)](_0x41d54c);});};var K=Object[_0x218b1b(0x1cf)],V=(_0x2cc9fa,_0x6cc859,_0x1f408c,_0x5a37f6)=>{const _0x38341a=_0x218b1b;for(var _0x2d5a14=_0x5a37f6>0x1?void 0x0:_0x5a37f6?K(_0x6cc859,_0x1f408c):_0x6cc859,_0x4e9718=_0x2cc9fa[_0x38341a(0x1e8)]-0x1,_0x3b55ee;_0x4e9718>=0x0;_0x4e9718--)(_0x3b55ee=_0x2cc9fa[_0x4e9718])&&(_0x2d5a14=_0x3b55ee(_0x2d5a14)||_0x2d5a14);return _0x2d5a14;},p=(_0x28028a,_0x11976f)=>(_0x3ecca1,_0x5e38be)=>_0x11976f(_0x3ecca1,_0x5e38be,_0x28028a);let S=class extends _0x4b2cab{constructor(_0x21f0a9,_0x4257e6,_0xa3bc7f,_0x4d02f0){const _0x443dee=_0x218b1b;super(),this['_commentService']=_0x21f0a9,this[_0x443dee(0x1fb)]=_0x4257e6,this['_userService']=_0xa3bc7f,this[_0x443dee(0x1cd)]=_0x4d02f0,this[_0x443dee(0x1d7)](),this[_0x443dee(0x1b8)]();}['_initUserSync'](){const _0x1f7962=_0x218b1b;this[_0x1f7962(0x1ac)](this[_0x1f7962(0x1fb)][_0x1f7962(0x1d1)]['pipe'](_0x1521d5(0x10))[_0x1f7962(0x1f8)](_0x31fc0b=>{const _0x3e85e2=_0x1f7962,_0x47cd46=new Set();_0x31fc0b['forEach'](_0x50e185=>{const _0x35ff9=_0x5793;switch(_0x50e185[_0x35ff9(0x1d9)]){case'add':{const _0x3c6181=_0x50e185[_0x35ff9(0x1ee)][_0x35ff9(0x203)];_0x47cd46['add'](_0x3c6181);break;}}}),B(this[_0x3e85e2(0x1cd)],_0x47cd46);}));}[_0x218b1b(0x1d7)](){const _0x3df9e7=_0x218b1b;this[_0x3df9e7(0x1ac)](this[_0x3df9e7(0x1ba)]['commentUpdate$'][_0x3df9e7(0x1f8)](async _0x1c88f4=>{const _0x33f90b=_0x3df9e7;var _0x6a25fe,_0x309902,_0x192a9e,_0x447c29;const _0x4e8b8a=(_0x6a25fe=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4[_0x33f90b(0x1f0)])[_0x33f90b(0x1e4)](_0x3c4c23=>_0x3c4c23[_0x33f90b(0x1c1)]===_0x1c88f4['threadId']))==null?void 0x0:_0x6a25fe['root'];if(!_0x4e8b8a)return;const {unitId:_0x18e153,subUnitId:_0x1d86f0}=_0x4e8b8a;switch(_0x1c88f4[_0x33f90b(0x1e3)]&&this[_0x33f90b(0x1d8)]['addUser'](_0x1c88f4[_0x33f90b(0x1e3)]),_0x1c88f4[_0x33f90b(0x1d9)]){case v[_0x33f90b(0x200)]:break;case v[_0x33f90b(0x1b0)]:{this['_threadCommentModel'][_0x33f90b(0x1ea)](_0x18e153,_0x1d86f0,{'unitId':_0x18e153,'subUnitId':_0x1d86f0,'ref':'','id':_0x1c88f4[_0x33f90b(0x1dc)],'dT':D(+_0x1c88f4[_0x33f90b(0x1b6)]),'threadId':_0x1c88f4[_0x33f90b(0x1c1)],'personId':(_0x192a9e=(_0x309902=_0x1c88f4[_0x33f90b(0x1e3)])==null?void 0x0:_0x309902['userID'])!=null?_0x192a9e:_0x1c88f4[_0x33f90b(0x1ec)],'text':JSON['parse'](_0x1c88f4[_0x33f90b(0x1b4)]),'parentId':_0x4e8b8a['id']});break;}case v[_0x33f90b(0x1e9)]:{const _0x3e1005=this['_threadCommentModel'][_0x33f90b(0x1c8)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);_0x3e1005&&_0x3e1005[_0x33f90b(0x1e5)]&&this['_threadCommentModel'][_0x33f90b(0x1da)](_0x18e153,_0x1d86f0,_0x1c88f4[_0x33f90b(0x1dc)]);break;}case v['Edit']:{this[_0x33f90b(0x1fb)][_0x33f90b(0x1d2)](_0x18e153,_0x1d86f0,{'commentId':_0x1c88f4[_0x33f90b(0x1dc)],'text':JSON[_0x33f90b(0x1d4)](_0x1c88f4[_0x33f90b(0x1b4)])});break;}case v['Solve']:{const _0x79daf5=(_0x447c29=this[_0x33f90b(0x1fb)][_0x33f90b(0x205)](_0x1c88f4['unitId'])[_0x33f90b(0x1e4)](_0x4aa4d5=>_0x4aa4d5[_0x33f90b(0x1c1)]===_0x1c88f4[_0x33f90b(0x1c1)]))==null?void 0x0:_0x447c29[_0x33f90b(0x1de)];_0x79daf5&&this[_0x33f90b(0x1fb)][_0x33f90b(0x1b2)](_0x18e153,_0x1d86f0,_0x79daf5['id'],_0x1c88f4[_0x33f90b(0x1c2)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x57b463(_0x3c5e4f)),p(0x1,_0x57b463(_0x172d4d)),p(0x2,_0x57b463(_0x1e18f7)),p(0x3,_0x57b463(_0x2b34e0))],S);const z='thread-comment-data-source.config',M={};function _0x5793(_0x1a0fe1,_0x27a806){const _0x111446=_0x1114();return _0x5793=function(_0x579335,_0x46b67d){_0x579335=_0x579335-0x1aa;let _0x1aedd1=_0x111446[_0x579335];return _0x1aedd1;},_0x5793(_0x1a0fe1,_0x27a806);}var k=Object[_0x218b1b(0x1cf)],Q=(_0x2ee888,_0x5b796b,_0x39fb3a,_0x4f391c)=>{const _0x119055=_0x218b1b;for(var _0x38f24f=_0x4f391c>0x1?void 0x0:_0x4f391c?k(_0x5b796b,_0x39fb3a):_0x5b796b,_0x2da413=_0x2ee888[_0x119055(0x1e8)]-0x1,_0x9e11eb;_0x2da413>=0x0;_0x2da413--)(_0x9e11eb=_0x2ee888[_0x2da413])&&(_0x38f24f=_0x9e11eb(_0x38f24f)||_0x38f24f);return _0x38f24f;},_=(_0x1470ee,_0x3d6d6d)=>(_0x4fb35b,_0x35ff70)=>_0x3d6d6d(_0x4fb35b,_0x35ff70,_0x1470ee);function _0x1114(){const _0x3c601a=['getComment','customRanges','reply','format','body','_injector','617387WFSSks','getOwnPropertyDescriptor','_threadCommentDataSourceService','commentUpdate$','updateComment','Unknown','parse','Solved','_threadCommentDataSource','_init','_userService','type','deleteComment','/solved','replyId','comment','root','error','comments','_initDataSource','replies','user','find','parentId','5747580xgglVl','_config','length','Delete','addComment','add','userId','dataSource','payload','1913256CMWGYg','unitId','_sessionService','4049792MCZFHg','_configService','/universer-api/comment/unit/','addUser','5999292unGysp','get','subscribe','resolved','size','_threadCommentModel','code','UNIVER_UNKNOWN','pluginName','symbol','Add','_httpService','getMemberID','personId','saveCommentToSnapshot','getUnit','rangeId','rangeType','post','users','6177075QGObhl','values','onStarting','disposeWithMe','filter','Solve','YYYY/MM/DD\x20HH:mm','Reply','defineProperty','resolveComment','3055294MUFlmL','content','forEach','createTimestamp','/delete','_initUserSync','setConfig','_commentService','91GdzjXB','syncUpdateMutationToColla','/universer-api/user/list','/edit','OpenOrReOpen','stringify','threadId','solved','UNRECOGNIZED','map','COMMENT','requireSession','onReady'];_0x1114=function(){return _0x3c601a;};return _0x1114();}function X(_0x189eac,_0x9ab8f9){const _0x2bdc3e=_0x218b1b,_0x1902dc=_0x189eac[_0x2bdc3e(0x1e2)][0x0];return{..._0x9ab8f9,'id':_0x1902dc[_0x2bdc3e(0x1dc)],'resolved':_0x189eac[_0x2bdc3e(0x1c2)]===0x1,'dT':D(_0x1902dc[_0x2bdc3e(0x1b6)]),'personId':_0x1902dc[_0x2bdc3e(0x1ec)],'threadId':_0x1902dc[_0x2bdc3e(0x1c1)]};}function ee(_0x2d2a27,_0x4c5992,_0x4f4ff0){const _0x95fe85=_0x218b1b;var _0x2a5c90,_0x586e7d;if(((_0x586e7d=(_0x2a5c90=_0x2d2a27==null?void 0x0:_0x2d2a27[_0x95fe85(0x1e2)])==null?void 0x0:_0x2a5c90['length'])!=null?_0x586e7d:0x0)>0x0){const _0x372928=(_0x47ac82,_0x27ebc8)=>({'id':_0x47ac82['replyId'],'threadId':_0x47ac82[_0x95fe85(0x1c1)],'dT':D(_0x47ac82[_0x95fe85(0x1b6)]),'personId':_0x47ac82[_0x95fe85(0x1ec)],'resolved':_0x2d2a27[_0x95fe85(0x1c2)]===I[_0x95fe85(0x1d5)],'unitId':_0x4c5992,'subUnitId':_0x4f4ff0,'text':JSON[_0x95fe85(0x1d4)](_0x47ac82[_0x95fe85(0x1b4)]),'parentId':_0x27ebc8}),_0x29703f=_0x372928(_0x2d2a27['replies'][0x0]);return{..._0x29703f,'children':_0x2d2a27[_0x95fe85(0x1e2)]['slice'](0x1)['map'](_0x58c2f3=>_0x372928(_0x58c2f3,_0x29703f['id']))};}return null;}let f=class{constructor(_0x41015e,_0x36976e,_0x42020d,_0x5d1dcb){const _0x5e9b30=_0x218b1b;this['_httpService']=_0x41015e,this[_0x5e9b30(0x1d8)]=_0x36976e,this[_0x5e9b30(0x1f1)]=_0x42020d,this[_0x5e9b30(0x1cd)]=_0x5d1dcb;}async[_0x218b1b(0x1ea)](_0x550f4b){const _0x116228=_0x218b1b;var _0x4fc409,_0x35bca5;const {parentId:_0x1b284d,unitId:_0x5ca5bd,text:_0x231a87,threadId:_0x1046c5}=_0x550f4b,_0x15c45a=(_0x35bca5=(_0x4fc409=_0x231a87[_0x116228(0x1c9)])==null?void 0x0:_0x4fc409[_0x116228(0x1ad)](_0x31147d=>_0x31147d[_0x116228(0x207)]===_0x41ef65[_0x116228(0x1c5)])[_0x116228(0x1c4)](_0x4edcff=>_0x4edcff[_0x116228(0x206)]))!=null?_0x35bca5:[],_0xac80f6=JSON[_0x116228(0x1c0)](_0x231a87),_0x561a74=(await this[_0x116228(0x1f1)]['requireSession'](_0x5ca5bd))[_0x116228(0x202)]();if(_0x1b284d){const _0x2d29aa={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a,'threadId':_0x1046c5},_0x20a59b=(await this[_0x116228(0x201)][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/reply',{'body':_0x2d29aa}))[_0x116228(0x1cc)][_0x116228(0x1ca)];return{..._0x550f4b,'id':_0x20a59b[_0x116228(0x1dc)],'dT':_0x57fc57(+_0x20a59b[_0x116228(0x1b6)])[_0x116228(0x1cb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x20a59b[_0x116228(0x1ec)]};}else{const _0x5440ca={'memberId':_0x561a74,'unitId':_0x5ca5bd,'content':_0xac80f6,'mention':_0x15c45a},_0x592c3c=await this['_httpService'][_0x116228(0x208)](_0x116228(0x1f4)+_0x5ca5bd+'/add',{'body':_0x5440ca});return X(_0x592c3c['body'][_0x116228(0x1dd)],_0x550f4b);}}async['updateComment'](_0x5421c1){const _0x59bc22=_0x218b1b;var _0xfaed3b,_0x54ba37;const {text:_0x4cd565,unitId:_0x9ecd81}=_0x5421c1,_0x34069a=(_0x54ba37=(_0xfaed3b=_0x4cd565[_0x59bc22(0x1c9)])==null?void 0x0:_0xfaed3b['filter'](_0x418fba=>_0x418fba[_0x59bc22(0x207)]===_0x41ef65['COMMENT'])[_0x59bc22(0x1c4)](_0x50346c=>_0x50346c[_0x59bc22(0x206)]))!=null?_0x54ba37:[],_0xdcdff2=JSON[_0x59bc22(0x1c0)](_0x4cd565),_0x27b6c7=_0x5421c1[_0x59bc22(0x1c1)],_0x257710=_0x5421c1['id'],_0x3b0da1={'memberId':(await this[_0x59bc22(0x1f1)][_0x59bc22(0x1c6)](_0x9ecd81))[_0x59bc22(0x202)](),'unitId':_0x9ecd81,'threadId':_0x27b6c7,'mention':_0x34069a,'content':_0xdcdff2,'replyId':_0x257710},_0x4c6c04=await this[_0x59bc22(0x201)][_0x59bc22(0x208)](_0x59bc22(0x1f4)+_0x9ecd81+_0x59bc22(0x1be),{'body':_0x3b0da1});return!_0x4c6c04[_0x59bc22(0x1cc)]['error']||_0x4c6c04[_0x59bc22(0x1cc)]['error']['code']===0x1;}async['resolveComment'](_0x15f442){const _0x29b574=_0x218b1b,{unitId:_0x3b631a}=_0x15f442,_0x5c634f=_0x15f442[_0x29b574(0x1c1)],_0x18d9bd={'memberId':this[_0x29b574(0x1d8)]['getCurrentUser']()['userID'],'unitId':_0x3b631a,'threadId':_0x5c634f,'solved':_0x15f442[_0x29b574(0x1f9)]?I['Solved']:I['OpenOrReOpen']},_0x21cb72=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3b631a+_0x29b574(0x1db),{'body':_0x18d9bd});return!_0x21cb72[_0x29b574(0x1cc)][_0x29b574(0x1df)]||_0x21cb72['body'][_0x29b574(0x1df)]['code']===0x1;}async[_0x218b1b(0x1da)](_0x4cbaea,_0x1d903c,_0x3beacd,_0x55ecda){const _0x413474=_0x218b1b,_0x442131={'memberId':(await this[_0x413474(0x1f1)]['requireSession'](_0x4cbaea))[_0x413474(0x202)](),'threadId':_0x3beacd,'replyId':_0x55ecda,'unitId':_0x4cbaea},_0x917901=await this[_0x413474(0x201)]['post'](_0x413474(0x1f4)+_0x4cbaea+_0x413474(0x1b7),{'body':_0x442131});return!_0x917901[_0x413474(0x1cc)][_0x413474(0x1df)]||_0x917901[_0x413474(0x1cc)]['error'][_0x413474(0x1fc)]===0x1;}async['listComments'](_0x15c2fe,_0x2fefd9,_0xa7015){const _0x3b66da=_0x218b1b,_0x425889={'unitId':_0x15c2fe,'threadId':_0xa7015},_0x5013fe=await this[_0x3b66da(0x201)]['post']('/universer-api/comment/unit/'+_0x15c2fe+'/list',{'body':_0x425889}),_0x17dd92=_0xa7015[_0x3b66da(0x1c4)](_0x246688=>ee(_0x5013fe['body'][_0x3b66da(0x1e0)][_0x246688],_0x15c2fe,_0x2fefd9))['filter'](Boolean);return Object[_0x3b66da(0x1aa)](_0x5013fe[_0x3b66da(0x1cc)][_0x3b66da(0x209)])[_0x3b66da(0x1b5)](_0x38cdf3=>{const _0xaa4097=_0x3b66da;this[_0xaa4097(0x1d8)][_0xaa4097(0x1f5)](_0x38cdf3);}),_0x17dd92;}[_0x218b1b(0x204)](_0x5564f2){const _0x4e676f=_0x218b1b;return{'id':_0x5564f2['id'],'threadId':_0x5564f2[_0x4e676f(0x1c1)],'ref':_0x5564f2['ref']};}};f=Q([_(0x0,_0x57b463(_0x1b5530)),_(0x1,_0x57b463(_0x1e18f7)),_(0x2,_0x57b463(_0x234389)),_(0x3,_0x57b463(_0x2b34e0))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x370407,_0xf4b3c0,_0x16d409,_0x36b6ff)=>{for(var _0x25d21d=_0x36b6ff>0x1?void 0x0:_0x36b6ff?re(_0xf4b3c0,_0x16d409):_0xf4b3c0,_0x347b03=_0x370407['length']-0x1,_0x3de019;_0x347b03>=0x0;_0x347b03--)(_0x3de019=_0x370407[_0x347b03])&&(_0x25d21d=_0x3de019(_0x25d21d)||_0x25d21d);return _0x25d21d;},N=(_0x57484d,_0x7b693a)=>(_0x11f3c3,_0x194d79)=>_0x7b693a(_0x11f3c3,_0x194d79,_0x57484d);let g=class extends _0x4b2cab{constructor(_0x4d2277,_0x373121){const _0x1e99dc=_0x218b1b;super(),this[_0x1e99dc(0x1d0)]=_0x4d2277,this[_0x1e99dc(0x1d6)]=_0x373121,this[_0x1e99dc(0x1e1)]();}['_initDataSource'](){const _0x4d7ec7=_0x218b1b;this[_0x4d7ec7(0x1d0)][_0x4d7ec7(0x1ed)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4d7ec7(0x1bc)]=!0x1;}};g=te([N(0x0,_0x41f3b2),N(0x1,_0x57b463(f))],g);var se=Object[_0x218b1b(0x1b1)],oe=Object[_0x218b1b(0x1cf)],ne=(_0x4d6cd6,_0x54b7d6,_0x2fef47)=>_0x54b7d6 in _0x4d6cd6?se(_0x4d6cd6,_0x54b7d6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2fef47}):_0x4d6cd6[_0x54b7d6]=_0x2fef47,ie=(_0x3ac978,_0x4e242f,_0x2a17b8,_0x30979f)=>{const _0x2c00e5=_0x218b1b;for(var _0x10bf60=_0x30979f>0x1?void 0x0:_0x30979f?oe(_0x4e242f,_0x2a17b8):_0x4e242f,_0x24bce6=_0x3ac978[_0x2c00e5(0x1e8)]-0x1,_0x30ffdf;_0x24bce6>=0x0;_0x24bce6--)(_0x30ffdf=_0x3ac978[_0x24bce6])&&(_0x10bf60=_0x30ffdf(_0x10bf60)||_0x10bf60);return _0x10bf60;},w=(_0x330e8e,_0x1aea17)=>(_0x326674,_0x3423e5)=>_0x1aea17(_0x326674,_0x3423e5,_0x330e8e),$=(_0x5c726b,_0x4c5532,_0x1ebdd9)=>ne(_0x5c726b,typeof _0x4c5532!=_0x218b1b(0x1ff)?_0x4c5532+'':_0x4c5532,_0x1ebdd9);let b=class extends _0x6a62ef{constructor(_0x1fafff=M,_0x2da749,_0x394955){const _0x4f8f84=_0x218b1b;super(),this[_0x4f8f84(0x1e7)]=_0x1fafff,this[_0x4f8f84(0x1cd)]=_0x2da749,this[_0x4f8f84(0x1f3)]=_0x394955;const {..._0x2d86ac}=_0x26f562({},M,this[_0x4f8f84(0x1e7)]);this[_0x4f8f84(0x1f3)][_0x4f8f84(0x1b9)](z,_0x2d86ac);}[_0x218b1b(0x1ab)](){const _0x1df57e=_0x218b1b;[[f],[g],[S]][_0x1df57e(0x1b5)](_0x1c0741=>{const _0x1207b6=_0x1df57e;this[_0x1207b6(0x1cd)][_0x1207b6(0x1eb)](_0x1c0741);});}[_0x218b1b(0x1c7)](){const _0x92beb3=_0x218b1b;this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](g),this[_0x92beb3(0x1cd)][_0x92beb3(0x1f7)](S);}};$(b,_0x218b1b(0x1fe),W),$(b,_0x218b1b(0x1d9),_0x560016[_0x218b1b(0x1fd)]),b=ie([_0x40913a(_0x363f4c,_0x529408,_0x1e54fb),w(0x1,_0x57b463(_0x2b34e0)),w(0x2,_0xec0c59)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x293706=_0x3c54;(function(_0x58e3e8,_0x200c12){const _0x338b0a=_0x3c54,_0x529f35=_0x58e3e8();while(!![]){try{const _0x4f0194=-parseInt(_0x338b0a(0xf5))/0x1*(parseInt(_0x338b0a(0x11d))/0x2)+-parseInt(_0x338b0a(0xc3))/0x3+-parseInt(_0x338b0a(0xe3))/0x4+parseInt(_0x338b0a(0x120))/0x5+parseInt(_0x338b0a(0xda))/0x6*(-parseInt(_0x338b0a(0x117))/0x7)+parseInt(_0x338b0a(0x101))/0x8+-parseInt(_0x338b0a(0xc9))/0x9*(-parseInt(_0x338b0a(0xea))/0xa);if(_0x4f0194===_0x200c12)break;else _0x529f35['push'](_0x529f35['shift']());}catch(_0xdb568a){_0x529f35['push'](_0x529f35['shift']());}}}(_0x2dbc,0xa2a09));import{CommentService as _0x4dcb6c,CollaborationSessionService as _0x40f849,UniverCollaborationClientPlugin as _0x320f56}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9823}from'@univerjs-pro/license';import{dayjs as _0x30b957,UserManagerService as _0x3196d5,Inject as _0x3bd5d5,Injector as _0x2dd791,Disposable as _0x3a5f25,CustomRangeType as _0x854669,UniverInstanceType as _0x58268d,DependentOn as _0x3479fe,IConfigService as _0x5d4364,Plugin as _0x287d2d,merge as _0x1aaaac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x516425}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48ead0,IThreadCommentDataSourceService as _0x2416c3}from'@univerjs/thread-comment';import{bufferTime as _0x2f2c97}from'rxjs';function _0x2dbc(){const _0x5ef8ce=['getUser','_injector','COMMENT','symbol','userID','2166764YwLVRy','Solve','getComment','_configService','_init','_initUserSync','pipe','510KyjSna','parse','thread-comment-data-source.config','_threadCommentModel','post','forEach','/reply','requireSession','defineProperty','getUnit','/solved','138231BwZRfT','resolved','rangeId','find','users','_initDataSource','/universer-api/comment/unit/','get','map','Unknown','subscribe','personId','5160968LzzNtC','/add','stringify','addComment','disposeWithMe','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','_threadCommentDataSourceService','/universer-api/user/list','Solved','_config','createTimestamp','filter','payload','resolveComment','_sessionService','replies','length','user','/list','size','_userService','791287xrLqTp','body','replyId','_threadCommentDataSource','solved','delete','18NJHVyY','_httpService','error','6366260NvOmeL','deleteComment','code','Reply','threadId','customRanges','addUser','getCurrentUser','rangeType','1229106YULOFb','userId','ref','unitId','onStarting','listComments','186399RQDqKh','dataSource','slice','commentUpdate$','root','UNIVER_UNKNOWN','getMemberID','parentId','UNRECOGNIZED','_commentService','Edit','add','content','type','format','setConfig','Delete','6UVTtnX','updateComment','Add','getOwnPropertyDescriptor'];_0x2dbc=function(){return _0x5ef8ce;};return _0x2dbc();}import{HTTPService as _0x191dc9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5226b2=>(_0x5226b2[_0x5226b2[_0x293706(0x107)]=0x0]='OpenOrReOpen',_0x5226b2[_0x5226b2[_0x293706(0x10a)]=0x1]=_0x293706(0x10a),_0x5226b2[_0x5226b2[_0x293706(0xd1)]=-0x1]=_0x293706(0xd1),_0x5226b2))(I||{}),v=(_0x4dcd9d=>(_0x4dcd9d[_0x4dcd9d['Unknown']=0x0]=_0x293706(0xfe),_0x4dcd9d[_0x4dcd9d[_0x293706(0xdc)]=0x1]='Add',_0x4dcd9d[_0x4dcd9d['Reply']=0x2]=_0x293706(0x123),_0x4dcd9d[_0x4dcd9d['Edit']=0x3]='Edit',_0x4dcd9d[_0x4dcd9d[_0x293706(0xd9)]=0x4]=_0x293706(0xd9),_0x4dcd9d[_0x4dcd9d[_0x293706(0xe4)]=0x5]=_0x293706(0xe4),_0x4dcd9d[_0x4dcd9d[_0x293706(0xd1)]=-0x1]='UNRECOGNIZED',_0x4dcd9d))(v||{});const D=_0x4b7d74=>_0x30b957(new Date(+_0x4b7d74))[_0x293706(0xd7)](_0x293706(0x106)),B=async(_0x5a4b02,_0x1b7f1c)=>{const _0x72a905=_0x293706,_0x49ab71=_0x5a4b02[_0x72a905(0xfc)](_0x3196d5),_0x53d4b6=_0x5a4b02[_0x72a905(0xfc)](_0x191dc9);_0x1b7f1c[_0x72a905(0xef)](_0x51fa7=>{const _0x50a859=_0x72a905;_0x49ab71[_0x50a859(0xde)](_0x51fa7)&&_0x1b7f1c[_0x50a859(0x11c)](_0x51fa7);}),_0x1b7f1c[_0x72a905(0x115)]&&(await _0x53d4b6[_0x72a905(0xfc)](_0x72a905(0x109),{'params':{'userIDs':[..._0x1b7f1c]}}))[_0x72a905(0x118)][_0x72a905(0xf9)]['forEach'](_0x28d0e1=>{const _0x1821c5=_0x72a905;_0x28d0e1&&_0x49ab71[_0x1821c5(0xc0)](_0x28d0e1);});};var K=Object[_0x293706(0xdd)],V=(_0x30beea,_0x52fe5f,_0x5f5311,_0x5562ab)=>{for(var _0x381bab=_0x5562ab>0x1?void 0x0:_0x5562ab?K(_0x52fe5f,_0x5f5311):_0x52fe5f,_0x2e08b8=_0x30beea['length']-0x1,_0x933162;_0x2e08b8>=0x0;_0x2e08b8--)(_0x933162=_0x30beea[_0x2e08b8])&&(_0x381bab=_0x933162(_0x381bab)||_0x381bab);return _0x381bab;},p=(_0xa2a71a,_0x26af67)=>(_0x449bae,_0x32e695)=>_0x26af67(_0x449bae,_0x32e695,_0xa2a71a);let S=class extends _0x3a5f25{constructor(_0x453871,_0x928fe0,_0x51a3b6,_0x4f2b76){const _0x54d1d2=_0x293706;super(),this[_0x54d1d2(0xd2)]=_0x453871,this[_0x54d1d2(0xed)]=_0x928fe0,this['_userService']=_0x51a3b6,this[_0x54d1d2(0xdf)]=_0x4f2b76,this[_0x54d1d2(0xe7)](),this[_0x54d1d2(0xe8)]();}[_0x293706(0xe8)](){const _0x3abfd6=_0x293706;this['disposeWithMe'](this[_0x3abfd6(0xed)][_0x3abfd6(0xcc)][_0x3abfd6(0xe9)](_0x2f2c97(0x10))[_0x3abfd6(0xff)](_0x20520d=>{const _0x2057a1=_0x3abfd6,_0x119b7a=new Set();_0x20520d[_0x2057a1(0xef)](_0x1829b5=>{const _0x15ebe2=_0x2057a1;switch(_0x1829b5[_0x15ebe2(0xd6)]){case _0x15ebe2(0xd4):{const _0x4a0e07=_0x1829b5[_0x15ebe2(0x10e)][_0x15ebe2(0x100)];_0x119b7a[_0x15ebe2(0xd4)](_0x4a0e07);break;}}}),B(this[_0x2057a1(0xdf)],_0x119b7a);}));}[_0x293706(0xe7)](){const _0x2435b6=_0x293706;this[_0x2435b6(0x105)](this['_commentService'][_0x2435b6(0xcc)]['subscribe'](async _0x3c857f=>{const _0x37388a=_0x2435b6;var _0x3d71b4,_0x2252d6,_0x53c898,_0x192981;const _0x68ba12=(_0x3d71b4=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f[_0x37388a(0xc6)])[_0x37388a(0xf8)](_0xd54b6b=>_0xd54b6b['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x3d71b4[_0x37388a(0xcd)];if(!_0x68ba12)return;const {unitId:_0x4f6342,subUnitId:_0x366811}=_0x68ba12;switch(_0x3c857f[_0x37388a(0x113)]&&this[_0x37388a(0x116)][_0x37388a(0xc0)](_0x3c857f[_0x37388a(0x113)]),_0x3c857f['type']){case v[_0x37388a(0xdc)]:break;case v[_0x37388a(0x123)]:{this[_0x37388a(0xed)][_0x37388a(0x104)](_0x4f6342,_0x366811,{'unitId':_0x4f6342,'subUnitId':_0x366811,'ref':'','id':_0x3c857f['replyId'],'dT':D(+_0x3c857f[_0x37388a(0x10c)]),'threadId':_0x3c857f[_0x37388a(0xbe)],'personId':(_0x53c898=(_0x2252d6=_0x3c857f['user'])==null?void 0x0:_0x2252d6[_0x37388a(0xe2)])!=null?_0x53c898:_0x3c857f[_0x37388a(0xc4)],'text':JSON[_0x37388a(0xeb)](_0x3c857f[_0x37388a(0xd5)]),'parentId':_0x68ba12['id']});break;}case v[_0x37388a(0xd9)]:{const _0x429ed6=this['_threadCommentModel'][_0x37388a(0xe5)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);_0x429ed6&&_0x429ed6[_0x37388a(0xd0)]&&this[_0x37388a(0xed)][_0x37388a(0x121)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);break;}case v[_0x37388a(0xd3)]:{this[_0x37388a(0xed)][_0x37388a(0xdb)](_0x4f6342,_0x366811,{'commentId':_0x3c857f['replyId'],'text':JSON['parse'](_0x3c857f['content'])});break;}case v[_0x37388a(0xe4)]:{const _0x17b09c=(_0x192981=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f['unitId'])['find'](_0x519117=>_0x519117['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x192981['root'];_0x17b09c&&this[_0x37388a(0xed)][_0x37388a(0x10f)](_0x4f6342,_0x366811,_0x17b09c['id'],_0x3c857f['solved']===I[_0x37388a(0x10a)]);break;}}}));}};S=V([p(0x0,_0x3bd5d5(_0x4dcb6c)),p(0x1,_0x3bd5d5(_0x48ead0)),p(0x2,_0x3bd5d5(_0x3196d5)),p(0x3,_0x3bd5d5(_0x2dd791))],S);function _0x3c54(_0x57a76a,_0x1b7982){const _0x2dbc8d=_0x2dbc();return _0x3c54=function(_0x3c540a,_0xe454a5){_0x3c540a=_0x3c540a-0xbe;let _0x7feb65=_0x2dbc8d[_0x3c540a];return _0x7feb65;},_0x3c54(_0x57a76a,_0x1b7982);}const z=_0x293706(0xec),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1632d7,_0x1e7ee6,_0x4a221e,_0xcf572b)=>{const _0x59e9ee=_0x293706;for(var _0x4f0bfe=_0xcf572b>0x1?void 0x0:_0xcf572b?k(_0x1e7ee6,_0x4a221e):_0x1e7ee6,_0x5ec4a4=_0x1632d7[_0x59e9ee(0x112)]-0x1,_0x552ed2;_0x5ec4a4>=0x0;_0x5ec4a4--)(_0x552ed2=_0x1632d7[_0x5ec4a4])&&(_0x4f0bfe=_0x552ed2(_0x4f0bfe)||_0x4f0bfe);return _0x4f0bfe;},_=(_0x1f6295,_0x4f1bf4)=>(_0x276c1d,_0x5662a0)=>_0x4f1bf4(_0x276c1d,_0x5662a0,_0x1f6295);function X(_0x44fe48,_0x49ae41){const _0x5979a5=_0x293706,_0x5b6387=_0x44fe48[_0x5979a5(0x111)][0x0];return{..._0x49ae41,'id':_0x5b6387[_0x5979a5(0x119)],'resolved':_0x44fe48[_0x5979a5(0x11b)]===0x1,'dT':D(_0x5b6387[_0x5979a5(0x10c)]),'personId':_0x5b6387[_0x5979a5(0xc4)],'threadId':_0x5b6387[_0x5979a5(0xbe)]};}function ee(_0x36997a,_0x4abe74,_0x10af6d){const _0x1fc04e=_0x293706;var _0x5b6ad5,_0x995892;if(((_0x995892=(_0x5b6ad5=_0x36997a==null?void 0x0:_0x36997a[_0x1fc04e(0x111)])==null?void 0x0:_0x5b6ad5[_0x1fc04e(0x112)])!=null?_0x995892:0x0)>0x0){const _0x1bc15d=(_0x5a1587,_0x3bbc06)=>({'id':_0x5a1587[_0x1fc04e(0x119)],'threadId':_0x5a1587[_0x1fc04e(0xbe)],'dT':D(_0x5a1587[_0x1fc04e(0x10c)]),'personId':_0x5a1587[_0x1fc04e(0xc4)],'resolved':_0x36997a[_0x1fc04e(0x11b)]===I[_0x1fc04e(0x10a)],'unitId':_0x4abe74,'subUnitId':_0x10af6d,'text':JSON[_0x1fc04e(0xeb)](_0x5a1587[_0x1fc04e(0xd5)]),'parentId':_0x3bbc06}),_0x518af1=_0x1bc15d(_0x36997a['replies'][0x0]);return{..._0x518af1,'children':_0x36997a[_0x1fc04e(0x111)][_0x1fc04e(0xcb)](0x1)[_0x1fc04e(0xfd)](_0x54dcf2=>_0x1bc15d(_0x54dcf2,_0x518af1['id']))};}return null;}let f=class{constructor(_0x7e778e,_0x1a4119,_0x3f6cd9,_0x4bc76d){const _0x3ec7f2=_0x293706;this[_0x3ec7f2(0x11e)]=_0x7e778e,this['_userService']=_0x1a4119,this[_0x3ec7f2(0x110)]=_0x3f6cd9,this[_0x3ec7f2(0xdf)]=_0x4bc76d;}async['addComment'](_0x2fd081){const _0x66793c=_0x293706;var _0x2deb51,_0x15d31f;const {parentId:_0x5c2f3e,unitId:_0x459a92,text:_0x465f02,threadId:_0x483851}=_0x2fd081,_0xc2ff04=(_0x15d31f=(_0x2deb51=_0x465f02[_0x66793c(0xbf)])==null?void 0x0:_0x2deb51[_0x66793c(0x10d)](_0x4349f0=>_0x4349f0[_0x66793c(0xc2)]===_0x854669[_0x66793c(0xe0)])['map'](_0xef9756=>_0xef9756[_0x66793c(0xf7)]))!=null?_0x15d31f:[],_0x4307da=JSON[_0x66793c(0x103)](_0x465f02),_0x3446c0=(await this['_sessionService']['requireSession'](_0x459a92))[_0x66793c(0xcf)]();if(_0x5c2f3e){const _0x5041b3={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04,'threadId':_0x483851},_0x191a54=(await this['_httpService'][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0xf0),{'body':_0x5041b3}))[_0x66793c(0x118)]['reply'];return{..._0x2fd081,'id':_0x191a54[_0x66793c(0x119)],'dT':_0x30b957(+_0x191a54[_0x66793c(0x10c)])['format'](_0x66793c(0x106)),'personId':_0x191a54[_0x66793c(0xc4)]};}else{const _0x469b8c={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04},_0x3b8a05=await this[_0x66793c(0x11e)][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0x102),{'body':_0x469b8c});return X(_0x3b8a05[_0x66793c(0x118)]['comment'],_0x2fd081);}}async[_0x293706(0xdb)](_0x4a15d9){const _0x32f301=_0x293706;var _0x115165,_0x5df503;const {text:_0x472bd7,unitId:_0x2d9b9a}=_0x4a15d9,_0x540cbd=(_0x5df503=(_0x115165=_0x472bd7[_0x32f301(0xbf)])==null?void 0x0:_0x115165[_0x32f301(0x10d)](_0x5ced11=>_0x5ced11[_0x32f301(0xc2)]===_0x854669['COMMENT'])[_0x32f301(0xfd)](_0x46d31c=>_0x46d31c[_0x32f301(0xf7)]))!=null?_0x5df503:[],_0x4311a2=JSON[_0x32f301(0x103)](_0x472bd7),_0x4ed214=_0x4a15d9[_0x32f301(0xbe)],_0x213e9d=_0x4a15d9['id'],_0x23982a={'memberId':(await this['_sessionService'][_0x32f301(0xf1)](_0x2d9b9a))[_0x32f301(0xcf)](),'unitId':_0x2d9b9a,'threadId':_0x4ed214,'mention':_0x540cbd,'content':_0x4311a2,'replyId':_0x213e9d},_0x553af4=await this[_0x32f301(0x11e)][_0x32f301(0xee)](_0x32f301(0xfb)+_0x2d9b9a+'/edit',{'body':_0x23982a});return!_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)]||_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)][_0x32f301(0x122)]===0x1;}async['resolveComment'](_0x79e56b){const _0x48961e=_0x293706,{unitId:_0x1cc0df}=_0x79e56b,_0x38c259=_0x79e56b[_0x48961e(0xbe)],_0x2f7f56={'memberId':this['_userService'][_0x48961e(0xc1)]()[_0x48961e(0xe2)],'unitId':_0x1cc0df,'threadId':_0x38c259,'solved':_0x79e56b[_0x48961e(0xf6)]?I[_0x48961e(0x10a)]:I[_0x48961e(0x107)]},_0x5733c4=await this[_0x48961e(0x11e)][_0x48961e(0xee)](_0x48961e(0xfb)+_0x1cc0df+_0x48961e(0xf4),{'body':_0x2f7f56});return!_0x5733c4[_0x48961e(0x118)][_0x48961e(0x11f)]||_0x5733c4[_0x48961e(0x118)]['error'][_0x48961e(0x122)]===0x1;}async[_0x293706(0x121)](_0x5d3ddc,_0x1b793d,_0x7149e8,_0x3014dc){const _0x3539ff=_0x293706,_0x1df114={'memberId':(await this[_0x3539ff(0x110)][_0x3539ff(0xf1)](_0x5d3ddc))[_0x3539ff(0xcf)](),'threadId':_0x7149e8,'replyId':_0x3014dc,'unitId':_0x5d3ddc},_0x17131b=await this[_0x3539ff(0x11e)]['post'](_0x3539ff(0xfb)+_0x5d3ddc+'/delete',{'body':_0x1df114});return!_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)]||_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)][_0x3539ff(0x122)]===0x1;}async[_0x293706(0xc8)](_0x57cc2c,_0x232977,_0x51e319){const _0x4de966=_0x293706,_0x43cfcb={'unitId':_0x57cc2c,'threadId':_0x51e319},_0x5b56db=await this[_0x4de966(0x11e)][_0x4de966(0xee)](_0x4de966(0xfb)+_0x57cc2c+_0x4de966(0x114),{'body':_0x43cfcb}),_0x2f5970=_0x51e319[_0x4de966(0xfd)](_0x26046a=>ee(_0x5b56db[_0x4de966(0x118)]['comments'][_0x26046a],_0x57cc2c,_0x232977))[_0x4de966(0x10d)](Boolean);return Object['values'](_0x5b56db['body'][_0x4de966(0xf9)])[_0x4de966(0xef)](_0x398273=>{const _0x1a32a8=_0x4de966;this['_userService'][_0x1a32a8(0xc0)](_0x398273);}),_0x2f5970;}['saveCommentToSnapshot'](_0x13ce20){const _0x2d335d=_0x293706;return{'id':_0x13ce20['id'],'threadId':_0x13ce20['threadId'],'ref':_0x13ce20[_0x2d335d(0xc5)]};}};f=Q([_(0x0,_0x3bd5d5(_0x191dc9)),_(0x1,_0x3bd5d5(_0x3196d5)),_(0x2,_0x3bd5d5(_0x40f849)),_(0x3,_0x3bd5d5(_0x2dd791))],f);var re=Object[_0x293706(0xdd)],te=(_0x1d4d36,_0x458372,_0x127bcc,_0x215438)=>{for(var _0x3e43a4=_0x215438>0x1?void 0x0:_0x215438?re(_0x458372,_0x127bcc):_0x458372,_0x5024d1=_0x1d4d36['length']-0x1,_0x331327;_0x5024d1>=0x0;_0x5024d1--)(_0x331327=_0x1d4d36[_0x5024d1])&&(_0x3e43a4=_0x331327(_0x3e43a4)||_0x3e43a4);return _0x3e43a4;},N=(_0x5af987,_0x2995d8)=>(_0x2ab013,_0x35438e)=>_0x2995d8(_0x2ab013,_0x35438e,_0x5af987);let g=class extends _0x3a5f25{constructor(_0x389787,_0x4a422f){const _0x3abbf6=_0x293706;super(),this[_0x3abbf6(0x108)]=_0x389787,this[_0x3abbf6(0x11a)]=_0x4a422f,this[_0x3abbf6(0xfa)]();}[_0x293706(0xfa)](){const _0x21025c=_0x293706;this[_0x21025c(0x108)][_0x21025c(0xca)]=this[_0x21025c(0x11a)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2416c3),N(0x1,_0x3bd5d5(f))],g);var se=Object[_0x293706(0xf2)],oe=Object[_0x293706(0xdd)],ne=(_0x2ec168,_0x23c57f,_0x42682f)=>_0x23c57f in _0x2ec168?se(_0x2ec168,_0x23c57f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42682f}):_0x2ec168[_0x23c57f]=_0x42682f,ie=(_0x4cf028,_0x2753b1,_0x3d6d11,_0x19366b)=>{const _0x406116=_0x293706;for(var _0x25c8ea=_0x19366b>0x1?void 0x0:_0x19366b?oe(_0x2753b1,_0x3d6d11):_0x2753b1,_0x4bcd37=_0x4cf028[_0x406116(0x112)]-0x1,_0x55881d;_0x4bcd37>=0x0;_0x4bcd37--)(_0x55881d=_0x4cf028[_0x4bcd37])&&(_0x25c8ea=_0x55881d(_0x25c8ea)||_0x25c8ea);return _0x25c8ea;},w=(_0x3d2689,_0x475db5)=>(_0x41e608,_0x1a0034)=>_0x475db5(_0x41e608,_0x1a0034,_0x3d2689),$=(_0x54a4df,_0x2291fc,_0x4f7cf8)=>ne(_0x54a4df,typeof _0x2291fc!=_0x293706(0xe1)?_0x2291fc+'':_0x2291fc,_0x4f7cf8);let b=class extends _0x287d2d{constructor(_0x318192=M,_0x711135,_0x51b8c5){const _0x1e7db9=_0x293706;super(),this[_0x1e7db9(0x10b)]=_0x318192,this[_0x1e7db9(0xdf)]=_0x711135,this[_0x1e7db9(0xe6)]=_0x51b8c5;const {..._0x137174}=_0x1aaaac({},M,this[_0x1e7db9(0x10b)]);this[_0x1e7db9(0xe6)][_0x1e7db9(0xd8)](z,_0x137174);}[_0x293706(0xc7)](){const _0x49c07d=_0x293706;[[f],[g],[S]][_0x49c07d(0xef)](_0x2dffec=>{const _0x1a4b13=_0x49c07d;this[_0x1a4b13(0xdf)][_0x1a4b13(0xd4)](_0x2dffec);});}['onReady'](){const _0x46faf1=_0x293706;this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](g),this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](S);}};$(b,'pluginName',W),$(b,_0x293706(0xd6),_0x58268d[_0x293706(0xce)]),b=ie([_0x3479fe(_0x516425,_0x320f56,_0x4b9823),w(0x1,_0x3bd5d5(_0x2dd791)),w(0x2,_0x5d4364)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3cb9e3,_0x23efbe){const _0x1c905c=_0x4349,_0x94e9da=_0x3cb9e3();while(!![]){try{const _0x2b3ed6=-parseInt(_0x1c905c(0x12a))/0x1*(parseInt(_0x1c905c(0xe3))/0x2)+-parseInt(_0x1c905c(0x143))/0x3*(-parseInt(_0x1c905c(0x13c))/0x4)+-parseInt(_0x1c905c(0x136))/0x5+-parseInt(_0x1c905c(0xca))/0x6+-parseInt(_0x1c905c(0xf1))/0x7*(parseInt(_0x1c905c(0x152))/0x8)+-parseInt(_0x1c905c(0x14d))/0x9*(-parseInt(_0x1c905c(0x117))/0xa)+parseInt(_0x1c905c(0xd3))/0xb;if(_0x2b3ed6===_0x23efbe)break;else _0x94e9da['push'](_0x94e9da['shift']());}catch(_0x4e113e){_0x94e9da['push'](_0x94e9da['shift']());}}}(_0x2ee3,0x97429),function(_0x2082cd,_0x298a19){const _0x288384=_0x4349;typeof exports==_0x288384(0x146)&&typeof module<'u'?_0x298a19(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==_0x288384(0x155)&&define[_0x288384(0x126)]?define(['exports',_0x288384(0x14f),'@univerjs-pro/license',_0x288384(0xc9),_0x288384(0xe8),_0x288384(0x132),'rxjs',_0x288384(0xe9)],_0x298a19):(_0x2082cd=typeof globalThis<'u'?globalThis:_0x2082cd||self,_0x298a19(_0x2082cd['UniverProThreadCommentDatasource']={},_0x2082cd[_0x288384(0x11a)],_0x2082cd[_0x288384(0xeb)],_0x2082cd[_0x288384(0x10e)],_0x2082cd[_0x288384(0x150)],_0x2082cd[_0x288384(0xe6)],_0x2082cd[_0x288384(0x10b)],_0x2082cd[_0x288384(0x133)]));}(this,function(_0x1d1eab,_0x59815a,_0x3fc5c7,_0x2941a7,_0x151541,_0xb01d52,_0x10a70d,_0x2e8727){'use strict';const _0x791389=_0x4349;const _0x2612f2=_0x791389(0xd9);var _0x2634df=(_0x4f5787=>(_0x4f5787[_0x4f5787['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4f5787[_0x4f5787[_0x791389(0x121)]=0x1]='Solved',_0x4f5787[_0x4f5787[_0x791389(0x12d)]=-0x1]=_0x791389(0x12d),_0x4f5787))(_0x2634df||{}),_0xfb16b=(_0x1bbab5=>(_0x1bbab5[_0x1bbab5[_0x791389(0x147)]=0x0]='Unknown',_0x1bbab5[_0x1bbab5[_0x791389(0x114)]=0x1]='Add',_0x1bbab5[_0x1bbab5[_0x791389(0x109)]=0x2]='Reply',_0x1bbab5[_0x1bbab5[_0x791389(0xf6)]=0x3]=_0x791389(0xf6),_0x1bbab5[_0x1bbab5[_0x791389(0x10c)]=0x4]=_0x791389(0x10c),_0x1bbab5[_0x1bbab5['Solve']=0x5]=_0x791389(0x125),_0x1bbab5[_0x1bbab5[_0x791389(0x12d)]=-0x1]=_0x791389(0x12d),_0x1bbab5))(_0xfb16b||{});const _0x27177d=_0x5d50de=>_0x2941a7[_0x791389(0xe1)](new Date(+_0x5d50de))['format'](_0x791389(0xe2)),_0x101a6e=async(_0x3f8a74,_0x53a6af)=>{const _0x124d6a=_0x791389,_0x56be90=_0x3f8a74[_0x124d6a(0x153)](_0x2941a7['UserManagerService']),_0x470019=_0x3f8a74[_0x124d6a(0x153)](_0x2e8727['HTTPService']);_0x53a6af['forEach'](_0x379409=>{const _0xb48919=_0x124d6a;_0x56be90[_0xb48919(0x13d)](_0x379409)&&_0x53a6af[_0xb48919(0xec)](_0x379409);}),_0x53a6af[_0x124d6a(0x135)]&&(await _0x470019['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x53a6af]}}))[_0x124d6a(0x14e)][_0x124d6a(0x13e)][_0x124d6a(0xf5)](_0x1acfea=>{const _0xf92bac=_0x124d6a;_0x1acfea&&_0x56be90[_0xf92bac(0x100)](_0x1acfea);});};var _0x3cb4ab=Object[_0x791389(0x108)],_0x2fe928=(_0x530ee7,_0x178237,_0x58f4f1,_0x4a04ba)=>{for(var _0x1a808b=_0x4a04ba>0x1?void 0x0:_0x4a04ba?_0x3cb4ab(_0x178237,_0x58f4f1):_0x178237,_0xe8ef32=_0x530ee7['length']-0x1,_0x5dc490;_0xe8ef32>=0x0;_0xe8ef32--)(_0x5dc490=_0x530ee7[_0xe8ef32])&&(_0x1a808b=_0x5dc490(_0x1a808b)||_0x1a808b);return _0x1a808b;},_0x2d50d3=(_0xd9eb62,_0x36737d)=>(_0xfd588a,_0x113573)=>_0x36737d(_0xfd588a,_0x113573,_0xd9eb62);let _0x40a442=class extends _0x2941a7[_0x791389(0xce)]{constructor(_0x3d3e1e,_0x3d7ff2,_0x3f3215,_0x349725){const _0xa306dd=_0x791389;super(),this[_0xa306dd(0xfb)]=_0x3d3e1e,this['_threadCommentModel']=_0x3d7ff2,this[_0xa306dd(0x137)]=_0x3f3215,this[_0xa306dd(0xcf)]=_0x349725,this['_init'](),this[_0xa306dd(0x130)]();}[_0x791389(0x130)](){const _0x38b593=_0x791389;this['disposeWithMe'](this['_threadCommentModel'][_0x38b593(0xea)][_0x38b593(0xd2)](_0x10a70d[_0x38b593(0x124)](0x10))[_0x38b593(0xe5)](_0x49fd3b=>{const _0x5397fb=new Set();_0x49fd3b['forEach'](_0x2fe6fc=>{const _0x37d0fb=_0x4349;switch(_0x2fe6fc[_0x37d0fb(0x11e)]){case _0x37d0fb(0xfd):{const _0xd34595=_0x2fe6fc[_0x37d0fb(0xee)]['personId'];_0x5397fb[_0x37d0fb(0xfd)](_0xd34595);break;}}}),_0x101a6e(this['_injector'],_0x5397fb);}));}[_0x791389(0x113)](){const _0x733764=_0x791389;this[_0x733764(0x103)](this[_0x733764(0xfb)][_0x733764(0xea)][_0x733764(0xe5)](async _0xe6d531=>{const _0x44b3ed=_0x733764;var _0x57d5d7,_0x3a0762,_0x28d9f5,_0x20f0e5;const _0x323aea=(_0x57d5d7=this['_threadCommentModel'][_0x44b3ed(0x116)](_0xe6d531[_0x44b3ed(0xd0)])[_0x44b3ed(0x12e)](_0x1e7913=>_0x1e7913[_0x44b3ed(0xf4)]===_0xe6d531[_0x44b3ed(0xf4)]))==null?void 0x0:_0x57d5d7['root'];if(!_0x323aea)return;const {unitId:_0x1ac90f,subUnitId:_0x11e763}=_0x323aea;switch(_0xe6d531[_0x44b3ed(0x139)]&&this[_0x44b3ed(0x137)][_0x44b3ed(0x100)](_0xe6d531[_0x44b3ed(0x139)]),_0xe6d531['type']){case _0xfb16b[_0x44b3ed(0x114)]:break;case _0xfb16b['Reply']:{this['_threadCommentModel'][_0x44b3ed(0x14a)](_0x1ac90f,_0x11e763,{'unitId':_0x1ac90f,'subUnitId':_0x11e763,'ref':'','id':_0xe6d531[_0x44b3ed(0xcb)],'dT':_0x27177d(+_0xe6d531[_0x44b3ed(0x151)]),'threadId':_0xe6d531[_0x44b3ed(0xf4)],'personId':(_0x28d9f5=(_0x3a0762=_0xe6d531[_0x44b3ed(0x139)])==null?void 0x0:_0x3a0762[_0x44b3ed(0xdd)])!=null?_0x28d9f5:_0xe6d531[_0x44b3ed(0x122)],'text':JSON[_0x44b3ed(0x110)](_0xe6d531[_0x44b3ed(0x128)]),'parentId':_0x323aea['id']});break;}case _0xfb16b[_0x44b3ed(0x10c)]:{const _0x1bde4f=this[_0x44b3ed(0x115)][_0x44b3ed(0x12c)](_0x1ac90f,_0x11e763,_0xe6d531[_0x44b3ed(0xcb)]);_0x1bde4f&&_0x1bde4f[_0x44b3ed(0xcc)]&&this[_0x44b3ed(0x115)]['deleteComment'](_0x1ac90f,_0x11e763,_0xe6d531['replyId']);break;}case _0xfb16b[_0x44b3ed(0xf6)]:{this[_0x44b3ed(0x115)][_0x44b3ed(0x127)](_0x1ac90f,_0x11e763,{'commentId':_0xe6d531[_0x44b3ed(0xcb)],'text':JSON['parse'](_0xe6d531[_0x44b3ed(0x128)])});break;}case _0xfb16b['Solve']:{const _0x3b76bf=(_0x20f0e5=this[_0x44b3ed(0x115)][_0x44b3ed(0x116)](_0xe6d531[_0x44b3ed(0xd0)])[_0x44b3ed(0x12e)](_0x17078d=>_0x17078d[_0x44b3ed(0xf4)]===_0xe6d531['threadId']))==null?void 0x0:_0x20f0e5[_0x44b3ed(0x13a)];_0x3b76bf&&this[_0x44b3ed(0x115)][_0x44b3ed(0x134)](_0x1ac90f,_0x11e763,_0x3b76bf['id'],_0xe6d531[_0x44b3ed(0xfa)]===_0x2634df['Solved']);break;}}}));}};_0x40a442=_0x2fe928([_0x2d50d3(0x0,_0x2941a7[_0x791389(0xe4)](_0x59815a[_0x791389(0xfc)])),_0x2d50d3(0x1,_0x2941a7[_0x791389(0xe4)](_0xb01d52[_0x791389(0xd4)])),_0x2d50d3(0x2,_0x2941a7['Inject'](_0x2941a7[_0x791389(0xc8)])),_0x2d50d3(0x3,_0x2941a7[_0x791389(0xe4)](_0x2941a7['Injector']))],_0x40a442);const _0x2d2338=_0x791389(0x11c),_0x48ec76={};var _0x268268=Object[_0x791389(0x108)],_0x3febf1=(_0x2085c7,_0x4209db,_0x279c9c,_0x589bb8)=>{const _0x431324=_0x791389;for(var _0x163df2=_0x589bb8>0x1?void 0x0:_0x589bb8?_0x268268(_0x4209db,_0x279c9c):_0x4209db,_0x2b8701=_0x2085c7[_0x431324(0x11b)]-0x1,_0x19a0bf;_0x2b8701>=0x0;_0x2b8701--)(_0x19a0bf=_0x2085c7[_0x2b8701])&&(_0x163df2=_0x19a0bf(_0x163df2)||_0x163df2);return _0x163df2;},_0x5ba8de=(_0xb7cd67,_0x5cadf0)=>(_0x1e739f,_0x51ecf0)=>_0x5cadf0(_0x1e739f,_0x51ecf0,_0xb7cd67);function _0x1d6d94(_0xff0cf2,_0x35dc67){const _0x336a7d=_0x791389,_0x4b54a1=_0xff0cf2[_0x336a7d(0x10d)][0x0];return{..._0x35dc67,'id':_0x4b54a1[_0x336a7d(0xcb)],'resolved':_0xff0cf2[_0x336a7d(0xfa)]===0x1,'dT':_0x27177d(_0x4b54a1[_0x336a7d(0x151)]),'personId':_0x4b54a1[_0x336a7d(0x122)],'threadId':_0x4b54a1['threadId']};}function _0x14b44e(_0x566e8e,_0x5352c0,_0x642dc5){const _0x41848e=_0x791389;var _0x5f1af9,_0x1adfb4;if(((_0x1adfb4=(_0x5f1af9=_0x566e8e==null?void 0x0:_0x566e8e['replies'])==null?void 0x0:_0x5f1af9['length'])!=null?_0x1adfb4:0x0)>0x0){const _0x4effce=(_0x506365,_0x40dd2b)=>({'id':_0x506365[_0x41848e(0xcb)],'threadId':_0x506365[_0x41848e(0xf4)],'dT':_0x27177d(_0x506365['createTimestamp']),'personId':_0x506365['userId'],'resolved':_0x566e8e[_0x41848e(0xfa)]===_0x2634df[_0x41848e(0x121)],'unitId':_0x5352c0,'subUnitId':_0x642dc5,'text':JSON['parse'](_0x506365[_0x41848e(0x128)]),'parentId':_0x40dd2b}),_0x2d6383=_0x4effce(_0x566e8e[_0x41848e(0x10d)][0x0]);return{..._0x2d6383,'children':_0x566e8e[_0x41848e(0x10d)][_0x41848e(0x142)](0x1)[_0x41848e(0xe7)](_0x183574=>_0x4effce(_0x183574,_0x2d6383['id']))};}return null;}let _0x316b70=class{constructor(_0x3eabbc,_0x3574d0,_0x202aa2,_0x28d3e4){const _0x1dbd11=_0x791389;this[_0x1dbd11(0xf9)]=_0x3eabbc,this['_userService']=_0x3574d0,this[_0x1dbd11(0x101)]=_0x202aa2,this[_0x1dbd11(0xcf)]=_0x28d3e4;}async[_0x791389(0x14a)](_0x5ac52f){const _0x1bd848=_0x791389;var _0x47a92c,_0x3852bd;const {parentId:_0x52912d,unitId:_0xda665c,text:_0x338227,threadId:_0x28e76d}=_0x5ac52f,_0x450b21=(_0x3852bd=(_0x47a92c=_0x338227[_0x1bd848(0x11f)])==null?void 0x0:_0x47a92c[_0x1bd848(0xff)](_0x2127b6=>_0x2127b6[_0x1bd848(0x119)]===_0x2941a7[_0x1bd848(0xed)][_0x1bd848(0x138)])['map'](_0x4846aa=>_0x4846aa[_0x1bd848(0x10a)]))!=null?_0x3852bd:[],_0x1f12ad=JSON[_0x1bd848(0x10f)](_0x338227),_0x4168d4=(await this[_0x1bd848(0x101)]['requireSession'](_0xda665c))[_0x1bd848(0x112)]();if(_0x52912d){const _0x32bb13={'memberId':_0x4168d4,'unitId':_0xda665c,'content':_0x1f12ad,'mention':_0x450b21,'threadId':_0x28e76d},_0x42da76=(await this[_0x1bd848(0xf9)]['post']('/universer-api/comment/unit/'+_0xda665c+_0x1bd848(0x14c),{'body':_0x32bb13}))[_0x1bd848(0x14e)]['reply'];return{..._0x5ac52f,'id':_0x42da76[_0x1bd848(0xcb)],'dT':_0x2941a7[_0x1bd848(0xe1)](+_0x42da76['createTimestamp'])['format'](_0x1bd848(0xe2)),'personId':_0x42da76[_0x1bd848(0x122)]};}else{const _0x16c69d={'memberId':_0x4168d4,'unitId':_0xda665c,'content':_0x1f12ad,'mention':_0x450b21},_0x107283=await this[_0x1bd848(0xf9)][_0x1bd848(0x131)](_0x1bd848(0x102)+_0xda665c+_0x1bd848(0x145),{'body':_0x16c69d});return _0x1d6d94(_0x107283[_0x1bd848(0x14e)][_0x1bd848(0xd8)],_0x5ac52f);}}async['updateComment'](_0x3d2ea4){const _0x16919f=_0x791389;var _0x304be8,_0x2007c5;const {text:_0x32d3d2,unitId:_0x2ad25d}=_0x3d2ea4,_0x41d361=(_0x2007c5=(_0x304be8=_0x32d3d2[_0x16919f(0x11f)])==null?void 0x0:_0x304be8['filter'](_0x310e00=>_0x310e00[_0x16919f(0x119)]===_0x2941a7[_0x16919f(0xed)][_0x16919f(0x138)])[_0x16919f(0xe7)](_0x3f9443=>_0x3f9443[_0x16919f(0x10a)]))!=null?_0x2007c5:[],_0xa4e40b=JSON[_0x16919f(0x10f)](_0x32d3d2),_0x5cbf2e=_0x3d2ea4[_0x16919f(0xf4)],_0x228b68=_0x3d2ea4['id'],_0x27577d={'memberId':(await this[_0x16919f(0x101)][_0x16919f(0xf8)](_0x2ad25d))[_0x16919f(0x112)](),'unitId':_0x2ad25d,'threadId':_0x5cbf2e,'mention':_0x41d361,'content':_0xa4e40b,'replyId':_0x228b68},_0x2fde45=await this[_0x16919f(0xf9)][_0x16919f(0x131)]('/universer-api/comment/unit/'+_0x2ad25d+_0x16919f(0x13f),{'body':_0x27577d});return!_0x2fde45[_0x16919f(0x14e)]['error']||_0x2fde45['body'][_0x16919f(0xcd)]['code']===0x1;}async['resolveComment'](_0x158bb5){const _0x45d5fa=_0x791389,{unitId:_0x873109}=_0x158bb5,_0x377417=_0x158bb5[_0x45d5fa(0xf4)],_0x27f8e2={'memberId':this[_0x45d5fa(0x137)][_0x45d5fa(0x11d)]()['userID'],'unitId':_0x873109,'threadId':_0x377417,'solved':_0x158bb5[_0x45d5fa(0x106)]?_0x2634df[_0x45d5fa(0x121)]:_0x2634df[_0x45d5fa(0x105)]},_0x57bd9b=await this[_0x45d5fa(0xf9)][_0x45d5fa(0x131)](_0x45d5fa(0x102)+_0x873109+_0x45d5fa(0x12b),{'body':_0x27f8e2});return!_0x57bd9b[_0x45d5fa(0x14e)]['error']||_0x57bd9b[_0x45d5fa(0x14e)][_0x45d5fa(0xcd)][_0x45d5fa(0xf3)]===0x1;}async[_0x791389(0xd1)](_0x34a54a,_0x2ee5c9,_0x52968e,_0x22ecaf){const _0x345dfb=_0x791389,_0x1a00e9={'memberId':(await this[_0x345dfb(0x101)][_0x345dfb(0xf8)](_0x34a54a))[_0x345dfb(0x112)](),'threadId':_0x52968e,'replyId':_0x22ecaf,'unitId':_0x34a54a},_0x594a78=await this['_httpService'][_0x345dfb(0x131)](_0x345dfb(0x102)+_0x34a54a+_0x345dfb(0xf2),{'body':_0x1a00e9});return!_0x594a78['body']['error']||_0x594a78[_0x345dfb(0x14e)][_0x345dfb(0xcd)]['code']===0x1;}async[_0x791389(0x123)](_0x1d54be,_0x43a5ea,_0x75e79b){const _0xf85445=_0x791389,_0x5d73c7={'unitId':_0x1d54be,'threadId':_0x75e79b},_0xdc12ac=await this[_0xf85445(0xf9)][_0xf85445(0x131)]('/universer-api/comment/unit/'+_0x1d54be+_0xf85445(0xd7),{'body':_0x5d73c7}),_0xbacbba=_0x75e79b['map'](_0x291ed4=>_0x14b44e(_0xdc12ac[_0xf85445(0x14e)][_0xf85445(0x111)][_0x291ed4],_0x1d54be,_0x43a5ea))['filter'](Boolean);return Object['values'](_0xdc12ac[_0xf85445(0x14e)][_0xf85445(0x13e)])[_0xf85445(0xf5)](_0x31907d=>{const _0x3929b6=_0xf85445;this['_userService'][_0x3929b6(0x100)](_0x31907d);}),_0xbacbba;}[_0x791389(0xde)](_0x274027){const _0x4365bf=_0x791389;return{'id':_0x274027['id'],'threadId':_0x274027[_0x4365bf(0xf4)],'ref':_0x274027[_0x4365bf(0xf7)]};}};_0x316b70=_0x3febf1([_0x5ba8de(0x0,_0x2941a7['Inject'](_0x2e8727[_0x791389(0x120)])),_0x5ba8de(0x1,_0x2941a7['Inject'](_0x2941a7[_0x791389(0xc8)])),_0x5ba8de(0x2,_0x2941a7[_0x791389(0xe4)](_0x59815a[_0x791389(0xef)])),_0x5ba8de(0x3,_0x2941a7['Inject'](_0x2941a7[_0x791389(0x118)]))],_0x316b70);var _0x14ae07=Object[_0x791389(0x108)],_0x4e3a9a=(_0x279d19,_0x30edc2,_0x55ac2a,_0x59e5e1)=>{const _0x14dde2=_0x791389;for(var _0x4746bd=_0x59e5e1>0x1?void 0x0:_0x59e5e1?_0x14ae07(_0x30edc2,_0x55ac2a):_0x30edc2,_0x11072a=_0x279d19[_0x14dde2(0x11b)]-0x1,_0x3bfb26;_0x11072a>=0x0;_0x11072a--)(_0x3bfb26=_0x279d19[_0x11072a])&&(_0x4746bd=_0x3bfb26(_0x4746bd)||_0x4746bd);return _0x4746bd;},_0x46c5cd=(_0x16bd58,_0x55e15e)=>(_0x134e54,_0xf560ec)=>_0x55e15e(_0x134e54,_0xf560ec,_0x16bd58);let _0x2169ed=class extends _0x2941a7[_0x791389(0xce)]{constructor(_0xf7a432,_0x6a5f67){const _0x5e64b7=_0x791389;super(),this[_0x5e64b7(0x154)]=_0xf7a432,this[_0x5e64b7(0xdf)]=_0x6a5f67,this[_0x5e64b7(0x140)]();}[_0x791389(0x140)](){const _0x8b2b6f=_0x791389;this[_0x8b2b6f(0x154)][_0x8b2b6f(0x13b)]=this['_threadCommentDataSource'],this[_0x8b2b6f(0x154)][_0x8b2b6f(0x148)]=!0x1;}};_0x2169ed=_0x4e3a9a([_0x46c5cd(0x0,_0xb01d52[_0x791389(0xd6)]),_0x46c5cd(0x1,_0x2941a7[_0x791389(0xe4)](_0x316b70))],_0x2169ed);var _0x2ff294=Object['defineProperty'],_0x3a908c=Object['getOwnPropertyDescriptor'],_0x25b8e7=(_0x1f4ef0,_0x369941,_0x50e9ce)=>_0x369941 in _0x1f4ef0?_0x2ff294(_0x1f4ef0,_0x369941,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50e9ce}):_0x1f4ef0[_0x369941]=_0x50e9ce,_0x45f856=(_0x1a2f8,_0x56b667,_0x5f30f3,_0x372141)=>{const _0x5d6831=_0x791389;for(var _0x395e9b=_0x372141>0x1?void 0x0:_0x372141?_0x3a908c(_0x56b667,_0x5f30f3):_0x56b667,_0xb628aa=_0x1a2f8[_0x5d6831(0x11b)]-0x1,_0x5cca3b;_0xb628aa>=0x0;_0xb628aa--)(_0x5cca3b=_0x1a2f8[_0xb628aa])&&(_0x395e9b=_0x5cca3b(_0x395e9b)||_0x395e9b);return _0x395e9b;},_0x3e20d3=(_0x4c1814,_0xe4cd05)=>(_0xaa835a,_0x26d251)=>_0xe4cd05(_0xaa835a,_0x26d251,_0x4c1814),_0x6432f0=(_0x2b1d5f,_0x124099,_0x183955)=>_0x25b8e7(_0x2b1d5f,typeof _0x124099!=_0x791389(0x12f)?_0x124099+'':_0x124099,_0x183955);_0x1d1eab['UniverThreadCommentDataSourcePlugin']=class extends _0x2941a7[_0x791389(0xf0)]{constructor(_0x235f85=_0x48ec76,_0x509b30,_0x90915d){const _0x1d83f8=_0x791389;super(),this['_config']=_0x235f85,this[_0x1d83f8(0xcf)]=_0x509b30,this[_0x1d83f8(0x141)]=_0x90915d;const {..._0x149dfa}=_0x2941a7[_0x1d83f8(0xdb)]({},_0x48ec76,this[_0x1d83f8(0xd5)]);this['_configService'][_0x1d83f8(0x129)](_0x2d2338,_0x149dfa);}[_0x791389(0x104)](){const _0xdf0020=_0x791389;[[_0x316b70],[_0x2169ed],[_0x40a442]][_0xdf0020(0xf5)](_0x3e08e9=>{const _0x5459c4=_0xdf0020;this[_0x5459c4(0xcf)][_0x5459c4(0xfd)](_0x3e08e9);});}[_0x791389(0xfe)](){const _0x3b59b9=_0x791389;this[_0x3b59b9(0xcf)][_0x3b59b9(0x153)](_0x2169ed),this[_0x3b59b9(0xcf)][_0x3b59b9(0x153)](_0x40a442);}},_0x6432f0(_0x1d1eab[_0x791389(0x144)],'pluginName',_0x2612f2),_0x6432f0(_0x1d1eab[_0x791389(0x144)],_0x791389(0x11e),_0x2941a7['UniverInstanceType']['UNIVER_UNKNOWN']),_0x1d1eab[_0x791389(0x144)]=_0x45f856([_0x2941a7[_0x791389(0xe0)](_0x151541[_0x791389(0x107)],_0x59815a[_0x791389(0xdc)],_0x3fc5c7['UniverLicensePlugin']),_0x3e20d3(0x1,_0x2941a7[_0x791389(0xe4)](_0x2941a7['Injector'])),_0x3e20d3(0x2,_0x2941a7['IConfigService'])],_0x1d1eab[_0x791389(0x144)]),Object[_0x791389(0x14b)](_0x1d1eab,Symbol[_0x791389(0x149)],{'value':_0x791389(0xda)});}));function _0x4349(_0x1c1215,_0x9f4fb4){const _0x2ee3b1=_0x2ee3();return _0x4349=function(_0x4349fd,_0x584817){_0x4349fd=_0x4349fd-0xc8;let _0x1c6cf1=_0x2ee3b1[_0x4349fd];return _0x1c6cf1;},_0x4349(_0x1c1215,_0x9f4fb4);}function _0x2ee3(){const _0x3b25c1=['amd','updateComment','content','setConfig','307941rXQcPK','/solved','getComment','UNRECOGNIZED','find','symbol','_initUserSync','post','@univerjs/thread-comment','UniverNetwork','resolveComment','size','1323270vmeCcK','_userService','COMMENT','user','root','dataSource','135316OKjexZ','getUser','users','/edit','_initDataSource','_configService','slice','48OWDEBS','UniverThreadCommentDataSourcePlugin','/add','object','Unknown','syncUpdateMutationToColla','toStringTag','addComment','defineProperty','/reply','3960EXCMpH','body','@univerjs-pro/collaboration-client','UniverThreadCommentUi','createTimestamp','1112jSCRZC','get','_threadCommentDataSourceService','function','UserManagerService','@univerjs/core','24762bfbYAD','replyId','parentId','error','Disposable','_injector','unitId','deleteComment','pipe','12079881lTjtUL','ThreadCommentModel','_config','IThreadCommentDataSourceService','/list','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Module','merge','UniverCollaborationClientPlugin','userID','saveCommentToSnapshot','_threadCommentDataSource','DependentOn','dayjs','YYYY/MM/DD\x20HH:mm','4ErBDFh','Inject','subscribe','UniverThreadComment','map','@univerjs/thread-comment-ui','@univerjs/network','commentUpdate$','UniverProLicense','delete','CustomRangeType','payload','CollaborationSessionService','Plugin','11263owrhtQ','/delete','code','threadId','forEach','Edit','ref','requireSession','_httpService','solved','_commentService','CommentService','add','onReady','filter','addUser','_sessionService','/universer-api/comment/unit/','disposeWithMe','onStarting','OpenOrReOpen','resolved','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','Reply','rangeId','rxjs','Delete','replies','UniverCore','stringify','parse','comments','getMemberID','_init','Add','_threadCommentModel','getUnit','2010pqHbKA','Injector','rangeType','UniverProCollaborationClient','length','thread-comment-data-source.config','getCurrentUser','type','customRanges','HTTPService','Solved','userId','listComments','bufferTime','Solve'];_0x2ee3=function(){return _0x3b25c1;};return _0x2ee3();}
|
|
1
|
+
function _0x46f4(){const _0xd9fa78=['getOwnPropertyDescriptor','userID','add','listComments','delete','type','filter','161934bQIkLa','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','get','_initDataSource','_httpService','thread-comment-data-source.config','Unknown','find','Solve','rangeId','Disposable','Solved','IConfigService','onReady','1671834lngxYD','_threadCommentModel','resolved','CollaborationSessionService','_init','ThreadCommentModel','IThreadCommentDataSourceService','HTTPService','getUser','/universer-api/user/list','/edit','amd','UniverCore','UNIVER_UNKNOWN','root','dayjs','commentUpdate$','UniverCollaborationClientPlugin','_userService','requireSession','_config','3426595pknpmz','OpenOrReOpen','Add','content','toStringTag','defineProperty','user','exports','addUser','values','CommentService','length','rangeType','parse','UniverThreadCommentUIPlugin','onStarting','18ydIHGr','UniverNetwork','subscribe','merge','1404dWcqXo','userId','payload','/delete','632674eyEvNM','addComment','Injector','body','YYYY/MM/DD\x20HH:mm','CustomRangeType','symbol','290xsmrZi','UserManagerService','getComment','Inject','COMMENT','22891Dtehcf','comments','@univerjs/thread-comment','createTimestamp','345217KkzcQR','code','@univerjs/thread-comment-ui','pluginName','_commentService','disposeWithMe','/universer-api/comment/unit/','replies','getCurrentUser','Delete','getUnit','customRanges','setConfig','Module','_threadCommentDataSourceService','UniverInstanceType','Reply','UniverLicensePlugin','error','slice','_configService','UNRECOGNIZED','function','_initUserSync','_sessionService','rxjs','_threadCommentDataSource','getMemberID','4kuyRGH','updateComment','solved','syncUpdateMutationToColla','parentId','/solved','reply','UniverProThreadCommentDatasource','stringify','dataSource','forEach','resolveComment','threadId','pipe','users','Edit','/reply','Plugin','post','67923OGWTJX','map','UniverThreadCommentDataSourcePlugin','_injector','deleteComment','unitId','UniverProCollaborationClient','replyId','16fqNYja'];_0x46f4=function(){return _0xd9fa78;};return _0x46f4();}function _0x3417(_0x42f3b8,_0x8f3e97){const _0x46f49a=_0x46f4();return _0x3417=function(_0x341731,_0x55260f){_0x341731=_0x341731-0x80;let _0x50735e=_0x46f49a[_0x341731];return _0x50735e;},_0x3417(_0x42f3b8,_0x8f3e97);}(function(_0x2bb5fd,_0x18444a){const _0x1d943b=_0x3417,_0x167d6d=_0x2bb5fd();while(!![]){try{const _0x3d580b=-parseInt(_0x1d943b(0xba))/0x1+parseInt(_0x1d943b(0xf9))/0x2*(parseInt(_0x1d943b(0xa2))/0x3)+-parseInt(_0x1d943b(0xd6))/0x4*(parseInt(_0x1d943b(0x92))/0x5)+parseInt(_0x1d943b(0x108))/0x6+-parseInt(_0x1d943b(0xaa))/0x7*(-parseInt(_0x1d943b(0xf1))/0x8)+parseInt(_0x1d943b(0xe9))/0x9*(parseInt(_0x1d943b(0xb1))/0xa)+-parseInt(_0x1d943b(0xb6))/0xb*(-parseInt(_0x1d943b(0xa6))/0xc);if(_0x3d580b===_0x18444a)break;else _0x167d6d['push'](_0x167d6d['shift']());}catch(_0x39651d){_0x167d6d['push'](_0x167d6d['shift']());}}}(_0x46f4,0x5c0b1),function(_0x378411,_0x5ae508){const _0x1b1a25=_0x3417;typeof exports=='object'&&typeof module<'u'?_0x5ae508(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==_0x1b1a25(0xd0)&&define[_0x1b1a25(0x88)]?define([_0x1b1a25(0x99),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x1b1a25(0xbc),_0x1b1a25(0xb8),_0x1b1a25(0xd3),'@univerjs/network'],_0x5ae508):(_0x378411=typeof globalThis<'u'?globalThis:_0x378411||self,_0x5ae508(_0x378411[_0x1b1a25(0xdd)]={},_0x378411[_0x1b1a25(0xef)],_0x378411['UniverProLicense'],_0x378411[_0x1b1a25(0x89)],_0x378411['UniverThreadCommentUi'],_0x378411['UniverThreadComment'],_0x378411[_0x1b1a25(0xd3)],_0x378411[_0x1b1a25(0xa3)]));}(this,function(_0x2ea72a,_0x204406,_0x44fff7,_0x4f4087,_0x343015,_0x4f7dd7,_0x3b81d3,_0x59fb72){'use strict';const _0x581b78=_0x3417;const _0x1d6925=_0x581b78(0xfa);var _0x9044fa=(_0x236543=>(_0x236543[_0x236543[_0x581b78(0x93)]=0x0]=_0x581b78(0x93),_0x236543[_0x236543[_0x581b78(0x105)]=0x1]=_0x581b78(0x105),_0x236543[_0x236543[_0x581b78(0xcf)]=-0x1]=_0x581b78(0xcf),_0x236543))(_0x9044fa||{}),_0x1ed302=(_0x4eb1bb=>(_0x4eb1bb[_0x4eb1bb[_0x581b78(0x100)]=0x0]='Unknown',_0x4eb1bb[_0x4eb1bb[_0x581b78(0x94)]=0x1]=_0x581b78(0x94),_0x4eb1bb[_0x4eb1bb['Reply']=0x2]=_0x581b78(0xca),_0x4eb1bb[_0x4eb1bb[_0x581b78(0xe5)]=0x3]='Edit',_0x4eb1bb[_0x4eb1bb[_0x581b78(0xc3)]=0x4]=_0x581b78(0xc3),_0x4eb1bb[_0x4eb1bb['Solve']=0x5]='Solve',_0x4eb1bb[_0x4eb1bb[_0x581b78(0xcf)]=-0x1]=_0x581b78(0xcf),_0x4eb1bb))(_0x1ed302||{});const _0x2d94c3=_0x402031=>_0x4f4087[_0x581b78(0x8c)](new Date(+_0x402031))[_0x581b78(0xfb)](_0x581b78(0xae)),_0x40fbaa=async(_0x4c1fed,_0x5ca32f)=>{const _0x2f1dbf=_0x581b78,_0x55e035=_0x4c1fed['get'](_0x4f4087['UserManagerService']),_0x128830=_0x4c1fed[_0x2f1dbf(0xfc)](_0x59fb72[_0x2f1dbf(0x84)]);_0x5ca32f[_0x2f1dbf(0xe0)](_0x5a0853=>{const _0x3b28c7=_0x2f1dbf;_0x55e035[_0x3b28c7(0x85)](_0x5a0853)&&_0x5ca32f[_0x3b28c7(0xf6)](_0x5a0853);}),_0x5ca32f['size']&&(await _0x128830['get'](_0x2f1dbf(0x86),{'params':{'userIDs':[..._0x5ca32f]}}))[_0x2f1dbf(0xad)]['users']['forEach'](_0x499d88=>{const _0x29245f=_0x2f1dbf;_0x499d88&&_0x55e035[_0x29245f(0x9a)](_0x499d88);});};var _0x5a923e=Object['getOwnPropertyDescriptor'],_0x3d6b94=(_0x51067c,_0x448cc4,_0x259259,_0x23c018)=>{const _0x2168e1=_0x581b78;for(var _0x47237f=_0x23c018>0x1?void 0x0:_0x23c018?_0x5a923e(_0x448cc4,_0x259259):_0x448cc4,_0x1d0ecd=_0x51067c[_0x2168e1(0x9d)]-0x1,_0x2aaafe;_0x1d0ecd>=0x0;_0x1d0ecd--)(_0x2aaafe=_0x51067c[_0x1d0ecd])&&(_0x47237f=_0x2aaafe(_0x47237f)||_0x47237f);return _0x47237f;},_0x287783=(_0x15c4f8,_0x107b7f)=>(_0xd04612,_0x2a9d44)=>_0x107b7f(_0xd04612,_0x2a9d44,_0x15c4f8);let _0x22f493=class extends _0x4f4087[_0x581b78(0x104)]{constructor(_0x308ab1,_0x44e886,_0x473c97,_0x5bece3){const _0x2766c1=_0x581b78;super(),this[_0x2766c1(0xbe)]=_0x308ab1,this['_threadCommentModel']=_0x44e886,this[_0x2766c1(0x8f)]=_0x473c97,this[_0x2766c1(0xec)]=_0x5bece3,this[_0x2766c1(0x81)](),this[_0x2766c1(0xd1)]();}[_0x581b78(0xd1)](){const _0x3188b4=_0x581b78;this['disposeWithMe'](this['_threadCommentModel'][_0x3188b4(0x8d)][_0x3188b4(0xe3)](_0x3b81d3['bufferTime'](0x10))[_0x3188b4(0xa4)](_0x232e31=>{const _0x12523c=_0x3188b4,_0x4c2cb4=new Set();_0x232e31[_0x12523c(0xe0)](_0x4bf12c=>{const _0x516177=_0x12523c;switch(_0x4bf12c[_0x516177(0xf7)]){case _0x516177(0xf4):{const _0x4c8d5e=_0x4bf12c[_0x516177(0xa8)]['personId'];_0x4c2cb4['add'](_0x4c8d5e);break;}}}),_0x40fbaa(this['_injector'],_0x4c2cb4);}));}[_0x581b78(0x81)](){const _0x9824ca=_0x581b78;this[_0x9824ca(0xbf)](this[_0x9824ca(0xbe)][_0x9824ca(0x8d)][_0x9824ca(0xa4)](async _0x239342=>{const _0x1cc9e8=_0x9824ca;var _0x1a794c,_0x56a472,_0x4152af,_0x4a7764;const _0x4afacc=(_0x1a794c=this[_0x1cc9e8(0x109)][_0x1cc9e8(0xc4)](_0x239342[_0x1cc9e8(0xee)])['find'](_0x4150b7=>_0x4150b7[_0x1cc9e8(0xe2)]===_0x239342['threadId']))==null?void 0x0:_0x1a794c[_0x1cc9e8(0x8b)];if(!_0x4afacc)return;const {unitId:_0x3acfbb,subUnitId:_0x27e497}=_0x4afacc;switch(_0x239342[_0x1cc9e8(0x98)]&&this[_0x1cc9e8(0x8f)][_0x1cc9e8(0x9a)](_0x239342[_0x1cc9e8(0x98)]),_0x239342[_0x1cc9e8(0xf7)]){case _0x1ed302[_0x1cc9e8(0x94)]:break;case _0x1ed302[_0x1cc9e8(0xca)]:{this[_0x1cc9e8(0x109)][_0x1cc9e8(0xab)](_0x3acfbb,_0x27e497,{'unitId':_0x3acfbb,'subUnitId':_0x27e497,'ref':'','id':_0x239342[_0x1cc9e8(0xf0)],'dT':_0x2d94c3(+_0x239342[_0x1cc9e8(0xb9)]),'threadId':_0x239342[_0x1cc9e8(0xe2)],'personId':(_0x4152af=(_0x56a472=_0x239342[_0x1cc9e8(0x98)])==null?void 0x0:_0x56a472[_0x1cc9e8(0xf3)])!=null?_0x4152af:_0x239342[_0x1cc9e8(0xa7)],'text':JSON[_0x1cc9e8(0x9f)](_0x239342[_0x1cc9e8(0x95)]),'parentId':_0x4afacc['id']});break;}case _0x1ed302[_0x1cc9e8(0xc3)]:{const _0x3ce0b6=this[_0x1cc9e8(0x109)][_0x1cc9e8(0xb3)](_0x3acfbb,_0x27e497,_0x239342[_0x1cc9e8(0xf0)]);_0x3ce0b6&&_0x3ce0b6[_0x1cc9e8(0xda)]&&this[_0x1cc9e8(0x109)][_0x1cc9e8(0xed)](_0x3acfbb,_0x27e497,_0x239342[_0x1cc9e8(0xf0)]);break;}case _0x1ed302[_0x1cc9e8(0xe5)]:{this[_0x1cc9e8(0x109)][_0x1cc9e8(0xd7)](_0x3acfbb,_0x27e497,{'commentId':_0x239342[_0x1cc9e8(0xf0)],'text':JSON['parse'](_0x239342['content'])});break;}case _0x1ed302[_0x1cc9e8(0x102)]:{const _0x4a1fdf=(_0x4a7764=this[_0x1cc9e8(0x109)]['getUnit'](_0x239342[_0x1cc9e8(0xee)])[_0x1cc9e8(0x101)](_0x2a8927=>_0x2a8927['threadId']===_0x239342[_0x1cc9e8(0xe2)]))==null?void 0x0:_0x4a7764[_0x1cc9e8(0x8b)];_0x4a1fdf&&this[_0x1cc9e8(0x109)][_0x1cc9e8(0xe1)](_0x3acfbb,_0x27e497,_0x4a1fdf['id'],_0x239342[_0x1cc9e8(0xd8)]===_0x9044fa[_0x1cc9e8(0x105)]);break;}}}));}};_0x22f493=_0x3d6b94([_0x287783(0x0,_0x4f4087['Inject'](_0x204406[_0x581b78(0x9c)])),_0x287783(0x1,_0x4f4087[_0x581b78(0xb4)](_0x4f7dd7[_0x581b78(0x82)])),_0x287783(0x2,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xb2)])),_0x287783(0x3,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xac)]))],_0x22f493);const _0x2f83b2=_0x581b78(0xff),_0xc11060={};var _0x5c4351=Object[_0x581b78(0xf2)],_0x1c6188=(_0x174e50,_0xc8f1a2,_0x3250eb,_0x1d729b)=>{const _0x3f2084=_0x581b78;for(var _0x56937a=_0x1d729b>0x1?void 0x0:_0x1d729b?_0x5c4351(_0xc8f1a2,_0x3250eb):_0xc8f1a2,_0x545f19=_0x174e50[_0x3f2084(0x9d)]-0x1,_0x2940cf;_0x545f19>=0x0;_0x545f19--)(_0x2940cf=_0x174e50[_0x545f19])&&(_0x56937a=_0x2940cf(_0x56937a)||_0x56937a);return _0x56937a;},_0x5d68d6=(_0x30e0af,_0x4c4e02)=>(_0x2d25f0,_0x2e259e)=>_0x4c4e02(_0x2d25f0,_0x2e259e,_0x30e0af);function _0xba59a(_0xfe252d,_0x3fa700){const _0x3a9310=_0x581b78,_0xb83e92=_0xfe252d[_0x3a9310(0xc1)][0x0];return{..._0x3fa700,'id':_0xb83e92[_0x3a9310(0xf0)],'resolved':_0xfe252d[_0x3a9310(0xd8)]===0x1,'dT':_0x2d94c3(_0xb83e92['createTimestamp']),'personId':_0xb83e92['userId'],'threadId':_0xb83e92[_0x3a9310(0xe2)]};}function _0x47685c(_0x1cbdf9,_0x3ee1c8,_0x1ce733){const _0x165f3f=_0x581b78;var _0x5e8961,_0x52dcfa;if(((_0x52dcfa=(_0x5e8961=_0x1cbdf9==null?void 0x0:_0x1cbdf9[_0x165f3f(0xc1)])==null?void 0x0:_0x5e8961[_0x165f3f(0x9d)])!=null?_0x52dcfa:0x0)>0x0){const _0x1252eb=(_0x5be783,_0x7df660)=>({'id':_0x5be783[_0x165f3f(0xf0)],'threadId':_0x5be783[_0x165f3f(0xe2)],'dT':_0x2d94c3(_0x5be783['createTimestamp']),'personId':_0x5be783[_0x165f3f(0xa7)],'resolved':_0x1cbdf9[_0x165f3f(0xd8)]===_0x9044fa[_0x165f3f(0x105)],'unitId':_0x3ee1c8,'subUnitId':_0x1ce733,'text':JSON[_0x165f3f(0x9f)](_0x5be783[_0x165f3f(0x95)]),'parentId':_0x7df660}),_0x3780b4=_0x1252eb(_0x1cbdf9[_0x165f3f(0xc1)][0x0]);return{..._0x3780b4,'children':_0x1cbdf9[_0x165f3f(0xc1)][_0x165f3f(0xcd)](0x1)[_0x165f3f(0xea)](_0x4a9831=>_0x1252eb(_0x4a9831,_0x3780b4['id']))};}return null;}let _0x4753c4=class{constructor(_0x42fd30,_0x4df1a9,_0x3f60ae,_0x99fc79){const _0x1aed2d=_0x581b78;this[_0x1aed2d(0xfe)]=_0x42fd30,this[_0x1aed2d(0x8f)]=_0x4df1a9,this[_0x1aed2d(0xd2)]=_0x3f60ae,this[_0x1aed2d(0xec)]=_0x99fc79;}async['addComment'](_0x186140){const _0x67237f=_0x581b78;var _0x3520b1,_0x1ce282;const {parentId:_0x5790e7,unitId:_0x5896cc,text:_0x558e3a,threadId:_0x403967}=_0x186140,_0x107971=(_0x1ce282=(_0x3520b1=_0x558e3a[_0x67237f(0xc5)])==null?void 0x0:_0x3520b1['filter'](_0x55a556=>_0x55a556[_0x67237f(0x9e)]===_0x4f4087[_0x67237f(0xaf)][_0x67237f(0xb5)])[_0x67237f(0xea)](_0x3466bd=>_0x3466bd[_0x67237f(0x103)]))!=null?_0x1ce282:[],_0x382c13=JSON[_0x67237f(0xde)](_0x558e3a),_0xda2bd6=(await this[_0x67237f(0xd2)]['requireSession'](_0x5896cc))['getMemberID']();if(_0x5790e7){const _0x10847f={'memberId':_0xda2bd6,'unitId':_0x5896cc,'content':_0x382c13,'mention':_0x107971,'threadId':_0x403967},_0x5081b2=(await this[_0x67237f(0xfe)][_0x67237f(0xe8)]('/universer-api/comment/unit/'+_0x5896cc+_0x67237f(0xe6),{'body':_0x10847f}))[_0x67237f(0xad)][_0x67237f(0xdc)];return{..._0x186140,'id':_0x5081b2[_0x67237f(0xf0)],'dT':_0x4f4087[_0x67237f(0x8c)](+_0x5081b2[_0x67237f(0xb9)])[_0x67237f(0xfb)](_0x67237f(0xae)),'personId':_0x5081b2[_0x67237f(0xa7)]};}else{const _0x112095={'memberId':_0xda2bd6,'unitId':_0x5896cc,'content':_0x382c13,'mention':_0x107971},_0x12daaf=await this[_0x67237f(0xfe)][_0x67237f(0xe8)](_0x67237f(0xc0)+_0x5896cc+'/add',{'body':_0x112095});return _0xba59a(_0x12daaf[_0x67237f(0xad)]['comment'],_0x186140);}}async[_0x581b78(0xd7)](_0x317f3c){const _0x52422a=_0x581b78;var _0x74e413,_0x361eda;const {text:_0x207213,unitId:_0x47bd2b}=_0x317f3c,_0x5e7af5=(_0x361eda=(_0x74e413=_0x207213[_0x52422a(0xc5)])==null?void 0x0:_0x74e413[_0x52422a(0xf8)](_0x50a835=>_0x50a835[_0x52422a(0x9e)]===_0x4f4087[_0x52422a(0xaf)][_0x52422a(0xb5)])['map'](_0x144d92=>_0x144d92[_0x52422a(0x103)]))!=null?_0x361eda:[],_0xe9095d=JSON[_0x52422a(0xde)](_0x207213),_0x53aa63=_0x317f3c['threadId'],_0x18066b=_0x317f3c['id'],_0x2d358e={'memberId':(await this[_0x52422a(0xd2)][_0x52422a(0x90)](_0x47bd2b))['getMemberID'](),'unitId':_0x47bd2b,'threadId':_0x53aa63,'mention':_0x5e7af5,'content':_0xe9095d,'replyId':_0x18066b},_0x184fb0=await this[_0x52422a(0xfe)][_0x52422a(0xe8)](_0x52422a(0xc0)+_0x47bd2b+_0x52422a(0x87),{'body':_0x2d358e});return!_0x184fb0[_0x52422a(0xad)][_0x52422a(0xcc)]||_0x184fb0[_0x52422a(0xad)][_0x52422a(0xcc)]['code']===0x1;}async[_0x581b78(0xe1)](_0x15810b){const _0x51e5b9=_0x581b78,{unitId:_0x34933a}=_0x15810b,_0x43c87b=_0x15810b[_0x51e5b9(0xe2)],_0x1fd92a={'memberId':this[_0x51e5b9(0x8f)][_0x51e5b9(0xc2)]()[_0x51e5b9(0xf3)],'unitId':_0x34933a,'threadId':_0x43c87b,'solved':_0x15810b[_0x51e5b9(0x10a)]?_0x9044fa[_0x51e5b9(0x105)]:_0x9044fa['OpenOrReOpen']},_0x125496=await this[_0x51e5b9(0xfe)][_0x51e5b9(0xe8)](_0x51e5b9(0xc0)+_0x34933a+_0x51e5b9(0xdb),{'body':_0x1fd92a});return!_0x125496[_0x51e5b9(0xad)][_0x51e5b9(0xcc)]||_0x125496['body'][_0x51e5b9(0xcc)][_0x51e5b9(0xbb)]===0x1;}async['deleteComment'](_0x227cc9,_0x4ec769,_0x583a08,_0xf3666c){const _0x3025ca=_0x581b78,_0x33b539={'memberId':(await this[_0x3025ca(0xd2)]['requireSession'](_0x227cc9))[_0x3025ca(0xd5)](),'threadId':_0x583a08,'replyId':_0xf3666c,'unitId':_0x227cc9},_0x19dd6e=await this[_0x3025ca(0xfe)]['post'](_0x3025ca(0xc0)+_0x227cc9+_0x3025ca(0xa9),{'body':_0x33b539});return!_0x19dd6e[_0x3025ca(0xad)][_0x3025ca(0xcc)]||_0x19dd6e[_0x3025ca(0xad)][_0x3025ca(0xcc)]['code']===0x1;}async[_0x581b78(0xf5)](_0x5d860b,_0x24ab8c,_0x27f32d){const _0x4eb89a=_0x581b78,_0x2eea92={'unitId':_0x5d860b,'threadId':_0x27f32d},_0x4d6a5e=await this[_0x4eb89a(0xfe)][_0x4eb89a(0xe8)](_0x4eb89a(0xc0)+_0x5d860b+'/list',{'body':_0x2eea92}),_0x4eeb1e=_0x27f32d[_0x4eb89a(0xea)](_0x449d03=>_0x47685c(_0x4d6a5e[_0x4eb89a(0xad)][_0x4eb89a(0xb7)][_0x449d03],_0x5d860b,_0x24ab8c))['filter'](Boolean);return Object[_0x4eb89a(0x9b)](_0x4d6a5e[_0x4eb89a(0xad)][_0x4eb89a(0xe4)])[_0x4eb89a(0xe0)](_0x4e248e=>{const _0x486c6d=_0x4eb89a;this[_0x486c6d(0x8f)]['addUser'](_0x4e248e);}),_0x4eeb1e;}['saveCommentToSnapshot'](_0x29d082){const _0xd8975f=_0x581b78;return{'id':_0x29d082['id'],'threadId':_0x29d082[_0xd8975f(0xe2)],'ref':_0x29d082['ref']};}};_0x4753c4=_0x1c6188([_0x5d68d6(0x0,_0x4f4087[_0x581b78(0xb4)](_0x59fb72[_0x581b78(0x84)])),_0x5d68d6(0x1,_0x4f4087['Inject'](_0x4f4087[_0x581b78(0xb2)])),_0x5d68d6(0x2,_0x4f4087[_0x581b78(0xb4)](_0x204406[_0x581b78(0x80)])),_0x5d68d6(0x3,_0x4f4087['Inject'](_0x4f4087[_0x581b78(0xac)]))],_0x4753c4);var _0x2fe2a9=Object[_0x581b78(0xf2)],_0x3d84cf=(_0x146374,_0x4654fc,_0x3bbb00,_0x3c11e0)=>{const _0x354948=_0x581b78;for(var _0x373690=_0x3c11e0>0x1?void 0x0:_0x3c11e0?_0x2fe2a9(_0x4654fc,_0x3bbb00):_0x4654fc,_0x320836=_0x146374[_0x354948(0x9d)]-0x1,_0x35a185;_0x320836>=0x0;_0x320836--)(_0x35a185=_0x146374[_0x320836])&&(_0x373690=_0x35a185(_0x373690)||_0x373690);return _0x373690;},_0x1edeac=(_0x176206,_0x18102e)=>(_0x468cfd,_0x1e9254)=>_0x18102e(_0x468cfd,_0x1e9254,_0x176206);let _0x3e993a=class extends _0x4f4087[_0x581b78(0x104)]{constructor(_0x7cf27,_0x5f5d3a){const _0x513b8c=_0x581b78;super(),this[_0x513b8c(0xc8)]=_0x7cf27,this[_0x513b8c(0xd4)]=_0x5f5d3a,this[_0x513b8c(0xfd)]();}[_0x581b78(0xfd)](){const _0x251a91=_0x581b78;this[_0x251a91(0xc8)][_0x251a91(0xdf)]=this[_0x251a91(0xd4)],this[_0x251a91(0xc8)][_0x251a91(0xd9)]=!0x1;}};_0x3e993a=_0x3d84cf([_0x1edeac(0x0,_0x4f7dd7[_0x581b78(0x83)]),_0x1edeac(0x1,_0x4f4087['Inject'](_0x4753c4))],_0x3e993a);var _0x13e078=Object[_0x581b78(0x97)],_0xea4399=Object[_0x581b78(0xf2)],_0x593bcf=(_0x45382b,_0x315abd,_0x421c20)=>_0x315abd in _0x45382b?_0x13e078(_0x45382b,_0x315abd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x421c20}):_0x45382b[_0x315abd]=_0x421c20,_0x4182c7=(_0x135b9c,_0xc385b7,_0x3aa74f,_0x1bc5fb)=>{const _0x496e09=_0x581b78;for(var _0x142880=_0x1bc5fb>0x1?void 0x0:_0x1bc5fb?_0xea4399(_0xc385b7,_0x3aa74f):_0xc385b7,_0x1b5533=_0x135b9c[_0x496e09(0x9d)]-0x1,_0x258869;_0x1b5533>=0x0;_0x1b5533--)(_0x258869=_0x135b9c[_0x1b5533])&&(_0x142880=_0x258869(_0x142880)||_0x142880);return _0x142880;},_0x235afc=(_0x1051c3,_0x1a817e)=>(_0x50ba9c,_0x3dc9e8)=>_0x1a817e(_0x50ba9c,_0x3dc9e8,_0x1051c3),_0x18a529=(_0x226f6a,_0x20d845,_0x100b70)=>_0x593bcf(_0x226f6a,typeof _0x20d845!=_0x581b78(0xb0)?_0x20d845+'':_0x20d845,_0x100b70);_0x2ea72a[_0x581b78(0xeb)]=class extends _0x4f4087[_0x581b78(0xe7)]{constructor(_0x3ac8d8=_0xc11060,_0x48eb21,_0x565864){const _0x1a5a44=_0x581b78;super(),this['_config']=_0x3ac8d8,this[_0x1a5a44(0xec)]=_0x48eb21,this[_0x1a5a44(0xce)]=_0x565864;const {..._0x28e738}=_0x4f4087[_0x1a5a44(0xa5)]({},_0xc11060,this[_0x1a5a44(0x91)]);this[_0x1a5a44(0xce)][_0x1a5a44(0xc6)](_0x2f83b2,_0x28e738);}[_0x581b78(0xa1)](){const _0x4a7be2=_0x581b78;[[_0x4753c4],[_0x3e993a],[_0x22f493]][_0x4a7be2(0xe0)](_0x3fc8ff=>{const _0x1ca3c9=_0x4a7be2;this['_injector'][_0x1ca3c9(0xf4)](_0x3fc8ff);});}[_0x581b78(0x107)](){const _0x45cfe2=_0x581b78;this[_0x45cfe2(0xec)][_0x45cfe2(0xfc)](_0x3e993a),this[_0x45cfe2(0xec)][_0x45cfe2(0xfc)](_0x22f493);}},_0x18a529(_0x2ea72a[_0x581b78(0xeb)],_0x581b78(0xbd),_0x1d6925),_0x18a529(_0x2ea72a[_0x581b78(0xeb)],_0x581b78(0xf7),_0x4f4087[_0x581b78(0xc9)][_0x581b78(0x8a)]),_0x2ea72a[_0x581b78(0xeb)]=_0x4182c7([_0x4f4087['DependentOn'](_0x343015[_0x581b78(0xa0)],_0x204406[_0x581b78(0x8e)],_0x44fff7[_0x581b78(0xcb)]),_0x235afc(0x1,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xac)])),_0x235afc(0x2,_0x4f4087[_0x581b78(0x106)])],_0x2ea72a['UniverThreadCommentDataSourcePlugin']),Object[_0x581b78(0x97)](_0x2ea72a,Symbol[_0x581b78(0x96)],{'value':_0x581b78(0xc7)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.2-nightly.
|
|
3
|
+
"version": "0.9.2-nightly.202507141607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs-pro/
|
|
50
|
-
"@univerjs/core": "0.9.2-nightly.
|
|
48
|
+
"@univerjs-pro/license": "0.9.2-nightly.202507141607",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.9.2-nightly.202507141607",
|
|
50
|
+
"@univerjs/core": "0.9.2-nightly.202507141607",
|
|
51
|
+
"@univerjs/network": "0.9.2-nightly.202507141607",
|
|
51
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.9.2-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.9.2-nightly.202507131606"
|
|
53
|
+
"@univerjs/thread-comment": "0.9.2-nightly.202507141607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.9.2-nightly.202507141607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|