@univerjs-pro/thread-comment-datasource 0.10.2-nightly.202508080617 → 0.10.3-experimental.20250812-b4b6f1a
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4ecdf2=_0x53af;(function(_0x4d4dde,_0x1fb83b){const _0x3cbca5=_0x53af,_0x4c2369=_0x4d4dde();while(!![]){try{const _0x1e3a8e=parseInt(_0x3cbca5(0x207))/0x1+-parseInt(_0x3cbca5(0x20c))/0x2*(parseInt(_0x3cbca5(0x1e9))/0x3)+parseInt(_0x3cbca5(0x1c0))/0x4+parseInt(_0x3cbca5(0x1e0))/0x5+-parseInt(_0x3cbca5(0x210))/0x6*(-parseInt(_0x3cbca5(0x1d8))/0x7)+parseInt(_0x3cbca5(0x1fa))/0x8*(-parseInt(_0x3cbca5(0x1c3))/0x9)+parseInt(_0x3cbca5(0x211))/0xa;if(_0x1e3a8e===_0x1fb83b)break;else _0x4c2369['push'](_0x4c2369['shift']());}catch(_0x248632){_0x4c2369['push'](_0x4c2369['shift']());}}}(_0x4119,0x3e084));Object[_0x4ecdf2(0x20d)](exports,Symbol[_0x4ecdf2(0x1b9)],{'value':_0x4ecdf2(0x224)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4ecdf2(0x200);var I=(_0x268487=>(_0x268487[_0x268487['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x268487[_0x268487['Solved']=0x1]=_0x4ecdf2(0x1e3),_0x268487[_0x268487['UNRECOGNIZED']=-0x1]=_0x4ecdf2(0x22f),_0x268487))(I||{}),v=(_0x1978e=>(_0x1978e[_0x1978e['Unknown']=0x0]=_0x4ecdf2(0x209),_0x1978e[_0x1978e['Add']=0x1]=_0x4ecdf2(0x21a),_0x1978e[_0x1978e[_0x4ecdf2(0x1cd)]=0x2]=_0x4ecdf2(0x1cd),_0x1978e[_0x1978e[_0x4ecdf2(0x1f8)]=0x3]=_0x4ecdf2(0x1f8),_0x1978e[_0x1978e[_0x4ecdf2(0x20b)]=0x4]=_0x4ecdf2(0x20b),_0x1978e[_0x1978e[_0x4ecdf2(0x215)]=0x5]='Solve',_0x1978e[_0x1978e[_0x4ecdf2(0x22f)]=-0x1]='UNRECOGNIZED',_0x1978e))(v||{});const f=_0x461312=>c[_0x4ecdf2(0x1e8)](new Date(+_0x461312))['format'](_0x4ecdf2(0x20a)),R=async(_0x4fc4d1,_0x5dc763)=>{const _0xf63c06=_0x4ecdf2,_0x33deaa=_0x4fc4d1[_0xf63c06(0x22b)](c[_0xf63c06(0x1f9)]),_0x4c0ccf=_0x4fc4d1['get'](P[_0xf63c06(0x228)]);_0x5dc763[_0xf63c06(0x20e)](_0x418fe2=>{const _0x4b33a3=_0xf63c06;_0x33deaa[_0x4b33a3(0x1db)](_0x418fe2)&&_0x5dc763[_0x4b33a3(0x1fc)](_0x418fe2);}),_0x5dc763[_0xf63c06(0x1c5)]&&(await _0x4c0ccf[_0xf63c06(0x22b)](_0xf63c06(0x21f),{'params':{'userIDs':[..._0x5dc763]}}))[_0xf63c06(0x1f2)][_0xf63c06(0x1cc)][_0xf63c06(0x20e)](_0x28bda7=>{const _0x52e2f5=_0xf63c06;_0x28bda7&&_0x33deaa[_0x52e2f5(0x1fe)](_0x28bda7);});};var $=Object[_0x4ecdf2(0x205)],E=(_0x1f73fd,_0x9cc331,_0x243674,_0x227c2b)=>{const _0xb7c8e1=_0x4ecdf2;for(var _0x4fe69f=_0x227c2b>0x1?void 0x0:_0x227c2b?$(_0x9cc331,_0x243674):_0x9cc331,_0x341af2=_0x1f73fd[_0xb7c8e1(0x21e)]-0x1,_0x3b112a;_0x341af2>=0x0;_0x341af2--)(_0x3b112a=_0x1f73fd[_0x341af2])&&(_0x4fe69f=_0x3b112a(_0x4fe69f)||_0x4fe69f);return _0x4fe69f;},S=(_0x158a74,_0x4032e8)=>(_0xf434f4,_0x4c9cf4)=>_0x4032e8(_0xf434f4,_0x4c9cf4,_0x158a74);let _=class extends c[_0x4ecdf2(0x1dc)]{constructor(_0x4ce93f,_0x3f9f73,_0x13a36f,_0x174bb7){const _0x43ee16=_0x4ecdf2;super(),this[_0x43ee16(0x229)]=_0x4ce93f,this[_0x43ee16(0x1f7)]=_0x3f9f73,this[_0x43ee16(0x21b)]=_0x13a36f,this[_0x43ee16(0x204)]=_0x174bb7,this[_0x43ee16(0x22e)](),this[_0x43ee16(0x1d4)]();}[_0x4ecdf2(0x1d4)](){const _0x283ea3=_0x4ecdf2;this[_0x283ea3(0x220)](this[_0x283ea3(0x1f7)][_0x283ea3(0x1fb)]['pipe'](j['bufferTime'](0x10))[_0x283ea3(0x1ca)](_0x54b196=>{const _0x117647=_0x283ea3,_0x26bcc6=new Set();_0x54b196[_0x117647(0x20e)](_0x37c957=>{const _0x372ab7=_0x117647;switch(_0x37c957['type']){case _0x372ab7(0x208):{const _0x39e80c=_0x37c957['payload'][_0x372ab7(0x1dd)];_0x26bcc6[_0x372ab7(0x208)](_0x39e80c);break;}}}),R(this[_0x117647(0x204)],_0x26bcc6);}));}[_0x4ecdf2(0x22e)](){const _0x32a4d0=_0x4ecdf2;this['disposeWithMe'](this[_0x32a4d0(0x229)]['commentUpdate$'][_0x32a4d0(0x1ca)](async _0x4fbb29=>{const _0x5a4113=_0x32a4d0;var _0x219540,_0x5b16c5,_0x405a08,_0x26827b;const _0x4581a7=(_0x219540=this[_0x5a4113(0x1f7)]['getUnit'](_0x4fbb29['unitId'])[_0x5a4113(0x203)](_0x22b3ca=>_0x22b3ca['threadId']===_0x4fbb29['threadId']))==null?void 0x0:_0x219540[_0x5a4113(0x1cf)];if(!_0x4581a7)return;const {unitId:_0x5af8dd,subUnitId:_0x1ea507}=_0x4581a7;switch(_0x4fbb29[_0x5a4113(0x1bd)]&&this['_userService'][_0x5a4113(0x1fe)](_0x4fbb29[_0x5a4113(0x1bd)]),_0x4fbb29['type']){case v['Add']:break;case v[_0x5a4113(0x1cd)]:{this[_0x5a4113(0x1f7)][_0x5a4113(0x1ee)](_0x5af8dd,_0x1ea507,{'unitId':_0x5af8dd,'subUnitId':_0x1ea507,'ref':'','id':_0x4fbb29[_0x5a4113(0x1bc)],'dT':f(+_0x4fbb29[_0x5a4113(0x1e2)]),'threadId':_0x4fbb29[_0x5a4113(0x1ba)],'personId':(_0x405a08=(_0x5b16c5=_0x4fbb29[_0x5a4113(0x1bd)])==null?void 0x0:_0x5b16c5[_0x5a4113(0x1c4)])!=null?_0x405a08:_0x4fbb29[_0x5a4113(0x22d)],'text':JSON[_0x5a4113(0x217)](_0x4fbb29[_0x5a4113(0x1d0)]),'parentId':_0x4581a7['id']});break;}case v['Delete']:{const _0x1dee8b=this[_0x5a4113(0x1f7)]['getComment'](_0x5af8dd,_0x1ea507,_0x4fbb29[_0x5a4113(0x1bc)]);_0x1dee8b&&_0x1dee8b[_0x5a4113(0x1f3)]&&this[_0x5a4113(0x1f7)]['deleteComment'](_0x5af8dd,_0x1ea507,_0x4fbb29[_0x5a4113(0x1bc)]);break;}case v['Edit']:{this[_0x5a4113(0x1f7)][_0x5a4113(0x1e4)](_0x5af8dd,_0x1ea507,{'commentId':_0x4fbb29[_0x5a4113(0x1bc)],'text':JSON['parse'](_0x4fbb29['content'])});break;}case v[_0x5a4113(0x215)]:{const _0x77642e=(_0x26827b=this[_0x5a4113(0x1f7)][_0x5a4113(0x219)](_0x4fbb29['unitId'])[_0x5a4113(0x203)](_0x5a2e1f=>_0x5a2e1f[_0x5a4113(0x1ba)]===_0x4fbb29[_0x5a4113(0x1ba)]))==null?void 0x0:_0x26827b[_0x5a4113(0x1cf)];_0x77642e&&this[_0x5a4113(0x1f7)]['resolveComment'](_0x5af8dd,_0x1ea507,_0x77642e['id'],_0x4fbb29[_0x5a4113(0x1c8)]===I[_0x5a4113(0x1e3)]);break;}}}));}};_=E([S(0x0,c[_0x4ecdf2(0x1d1)](b['CommentService'])),S(0x1,c[_0x4ecdf2(0x1d1)](M[_0x4ecdf2(0x1f5)])),S(0x2,c[_0x4ecdf2(0x1d1)](c['UserManagerService'])),S(0x3,c[_0x4ecdf2(0x1d1)](c[_0x4ecdf2(0x223)]))],_);const q=_0x4ecdf2(0x1ff),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2f4e60,_0x518c51,_0xca52f8,_0x48e751)=>{for(var _0x484d58=_0x48e751>0x1?void 0x0:_0x48e751?A(_0x518c51,_0xca52f8):_0x518c51,_0x369f42=_0x2f4e60['length']-0x1,_0x4f0970;_0x369f42>=0x0;_0x369f42--)(_0x4f0970=_0x2f4e60[_0x369f42])&&(_0x484d58=_0x4f0970(_0x484d58)||_0x484d58);return _0x484d58;},C=(_0x44c698,_0x3a59ee)=>(_0x44bc7a,_0xbc4d1f)=>_0x3a59ee(_0x44bc7a,_0xbc4d1f,_0x44c698);function Y(_0x28242e,_0xf33673){const _0x148025=_0x4ecdf2,_0x47190b=_0x28242e[_0x148025(0x1f0)][0x0];return{..._0xf33673,'id':_0x47190b[_0x148025(0x1bc)],'resolved':_0x28242e['solved']===0x1,'dT':f(_0x47190b[_0x148025(0x1e2)]),'personId':_0x47190b['userId'],'threadId':_0x47190b['threadId']};}function _0x4119(){const _0xf4fbe8=['code','replyId','user','getCurrentUser','post','633052vqoWjm','/list','dataSource','9JnFgJg','userID','size','listComments','_threadCommentDataSourceService','solved','symbol','subscribe','/solved','users','Reply','/universer-api/comment/unit/','root','content','Inject','/delete','rangeId','_initUserSync','_initDataSource','setConfig','/add','1386eVurtO','comments','error','getUser','Disposable','personId','OpenOrReOpen','_threadCommentDataSource','746705VftjqU','type','createTimestamp','Solved','updateComment','merge','/reply','values','dayjs','3IiCIei','map','IConfigService','_httpService','rangeType','addComment','UniverCollaborationClientPlugin','replies','_config','body','parentId','UniverThreadCommentDataSourcePlugin','ThreadCommentModel','comment','_threadCommentModel','Edit','UserManagerService','3636888HbFNHh','commentUpdate$','delete','syncUpdateMutationToColla','addUser','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','format','find','_injector','getOwnPropertyDescriptor','IThreadCommentDataSourceService','290094yRPwJj','add','Unknown','YYYY/MM/DD\x20HH:mm','Delete','230290UffiCC','defineProperty','forEach','Plugin','1362AhBjhy','1811960ugIeCN','onStarting','UniverLicensePlugin','UNIVER_UNKNOWN','Solve','filter','parse','reply','getUnit','Add','_userService','/edit','customRanges','length','/universer-api/user/list','disposeWithMe','requireSession','DependentOn','Injector','Module','UniverThreadCommentUIPlugin','_configService','CustomRangeType','HTTPService','_commentService','stringify','get','_sessionService','userId','_init','UNRECOGNIZED','toStringTag','threadId'];_0x4119=function(){return _0xf4fbe8;};return _0x4119();}function G(_0x4d04bb,_0x5adbe3,_0x2cce95){const _0x193ee9=_0x4ecdf2;var _0x4938a8,_0x5a7798;if(((_0x5a7798=(_0x4938a8=_0x4d04bb==null?void 0x0:_0x4d04bb['replies'])==null?void 0x0:_0x4938a8[_0x193ee9(0x21e)])!=null?_0x5a7798:0x0)>0x0){const _0x5bf6a2=(_0x54fbd8,_0x117236)=>({'id':_0x54fbd8[_0x193ee9(0x1bc)],'threadId':_0x54fbd8[_0x193ee9(0x1ba)],'dT':f(_0x54fbd8[_0x193ee9(0x1e2)]),'personId':_0x54fbd8[_0x193ee9(0x22d)],'resolved':_0x4d04bb[_0x193ee9(0x1c8)]===I['Solved'],'unitId':_0x5adbe3,'subUnitId':_0x2cce95,'text':JSON[_0x193ee9(0x217)](_0x54fbd8['content']),'parentId':_0x117236}),_0x3e7860=_0x5bf6a2(_0x4d04bb[_0x193ee9(0x1f0)][0x0]);return{..._0x3e7860,'children':_0x4d04bb['replies']['slice'](0x1)[_0x193ee9(0x1ea)](_0x30fff2=>_0x5bf6a2(_0x30fff2,_0x3e7860['id']))};}return null;}let p=class{constructor(_0x171602,_0x3b0e15,_0x5435b4){const _0x2b57b8=_0x4ecdf2;this[_0x2b57b8(0x1ec)]=_0x171602,this['_userService']=_0x3b0e15,this[_0x2b57b8(0x22c)]=_0x5435b4;}async[_0x4ecdf2(0x1ee)](_0x107feb){const _0x211889=_0x4ecdf2;var _0x267029,_0x1dc1bc;const {parentId:_0x17afb6,unitId:_0x3ef4d3,text:_0x72b5b7,threadId:_0x46b77e}=_0x107feb,_0x4b3fb1=(_0x1dc1bc=(_0x267029=_0x72b5b7[_0x211889(0x21d)])==null?void 0x0:_0x267029['filter'](_0x5326e0=>_0x5326e0[_0x211889(0x1ed)]===c[_0x211889(0x227)]['COMMENT'])[_0x211889(0x1ea)](_0xac796d=>_0xac796d[_0x211889(0x1d3)]))!=null?_0x1dc1bc:[],_0x10e11a=JSON[_0x211889(0x22a)](_0x72b5b7),_0x3c8dcf=(await this['_sessionService'][_0x211889(0x221)](_0x3ef4d3))[_0x211889(0x201)]();if(_0x17afb6){const _0x56d8ac={'memberId':_0x3c8dcf,'unitId':_0x3ef4d3,'content':_0x10e11a,'mention':_0x4b3fb1,'threadId':_0x46b77e},_0x53043d=(await this[_0x211889(0x1ec)]['post'](_0x211889(0x1ce)+_0x3ef4d3+_0x211889(0x1e6),{'body':_0x56d8ac}))[_0x211889(0x1f2)][_0x211889(0x218)];return{..._0x107feb,'id':_0x53043d['replyId'],'dT':c[_0x211889(0x1e8)](+_0x53043d[_0x211889(0x1e2)])[_0x211889(0x202)](_0x211889(0x20a)),'personId':_0x53043d[_0x211889(0x22d)]};}else{const _0x1c1f4a={'memberId':_0x3c8dcf,'unitId':_0x3ef4d3,'content':_0x10e11a,'mention':_0x4b3fb1},_0x580237=await this[_0x211889(0x1ec)][_0x211889(0x1bf)]('/universer-api/comment/unit/'+_0x3ef4d3+_0x211889(0x1d7),{'body':_0x1c1f4a});return Y(_0x580237[_0x211889(0x1f2)][_0x211889(0x1f6)],_0x107feb);}}async[_0x4ecdf2(0x1e4)](_0x1b008c){const _0x1ffd73=_0x4ecdf2;var _0x3cf492,_0x33b73c;const {text:_0xf3d0fc,unitId:_0x10568a}=_0x1b008c,_0x1b0c5a=(_0x33b73c=(_0x3cf492=_0xf3d0fc[_0x1ffd73(0x21d)])==null?void 0x0:_0x3cf492[_0x1ffd73(0x216)](_0x44b317=>_0x44b317['rangeType']===c[_0x1ffd73(0x227)]['COMMENT'])[_0x1ffd73(0x1ea)](_0x51b4a6=>_0x51b4a6[_0x1ffd73(0x1d3)]))!=null?_0x33b73c:[],_0x496d96=JSON[_0x1ffd73(0x22a)](_0xf3d0fc),_0xed9303=_0x1b008c[_0x1ffd73(0x1ba)],_0x39c3c9=_0x1b008c['id'],_0x264610={'memberId':(await this[_0x1ffd73(0x22c)][_0x1ffd73(0x221)](_0x10568a))['getMemberID'](),'unitId':_0x10568a,'threadId':_0xed9303,'mention':_0x1b0c5a,'content':_0x496d96,'replyId':_0x39c3c9},_0x2074c8=await this[_0x1ffd73(0x1ec)][_0x1ffd73(0x1bf)](_0x1ffd73(0x1ce)+_0x10568a+_0x1ffd73(0x21c),{'body':_0x264610});return!_0x2074c8[_0x1ffd73(0x1f2)][_0x1ffd73(0x1da)]||_0x2074c8[_0x1ffd73(0x1f2)]['error'][_0x1ffd73(0x1bb)]===0x1;}async['resolveComment'](_0x393df3){const _0x37e651=_0x4ecdf2,{unitId:_0xb54bc0}=_0x393df3,_0x129785=_0x393df3[_0x37e651(0x1ba)],_0x41d6a2={'memberId':this[_0x37e651(0x21b)][_0x37e651(0x1be)]()['userID'],'unitId':_0xb54bc0,'threadId':_0x129785,'solved':_0x393df3['resolved']?I['Solved']:I[_0x37e651(0x1de)]},_0x384983=await this[_0x37e651(0x1ec)][_0x37e651(0x1bf)](_0x37e651(0x1ce)+_0xb54bc0+_0x37e651(0x1cb),{'body':_0x41d6a2});return!_0x384983[_0x37e651(0x1f2)][_0x37e651(0x1da)]||_0x384983['body'][_0x37e651(0x1da)][_0x37e651(0x1bb)]===0x1;}async['deleteComment'](_0xf5b282,_0x37d4b1,_0x1df2e8,_0x52c6c2){const _0x2dfc2b=_0x4ecdf2,_0x23b09e={'memberId':(await this[_0x2dfc2b(0x22c)][_0x2dfc2b(0x221)](_0xf5b282))['getMemberID'](),'threadId':_0x1df2e8,'replyId':_0x52c6c2,'unitId':_0xf5b282},_0x2353c1=await this[_0x2dfc2b(0x1ec)][_0x2dfc2b(0x1bf)]('/universer-api/comment/unit/'+_0xf5b282+_0x2dfc2b(0x1d2),{'body':_0x23b09e});return!_0x2353c1[_0x2dfc2b(0x1f2)]['error']||_0x2353c1[_0x2dfc2b(0x1f2)][_0x2dfc2b(0x1da)][_0x2dfc2b(0x1bb)]===0x1;}async[_0x4ecdf2(0x1c6)](_0x42e6ce,_0x1bfe2b,_0x27e937){const _0x99a953=_0x4ecdf2,_0x2b52c8={'unitId':_0x42e6ce,'threadId':_0x27e937},_0x39c422=await this[_0x99a953(0x1ec)]['post'](_0x99a953(0x1ce)+_0x42e6ce+_0x99a953(0x1c1),{'body':_0x2b52c8}),_0x5e45c8=_0x27e937[_0x99a953(0x1ea)](_0x558d7a=>G(_0x39c422[_0x99a953(0x1f2)][_0x99a953(0x1d9)][_0x558d7a],_0x42e6ce,_0x1bfe2b))[_0x99a953(0x216)](Boolean);return Object[_0x99a953(0x1e7)](_0x39c422[_0x99a953(0x1f2)][_0x99a953(0x1cc)])[_0x99a953(0x20e)](_0x4d148e=>{const _0x8368b0=_0x99a953;this[_0x8368b0(0x21b)]['addUser'](_0x4d148e);}),_0x5e45c8;}['saveCommentToSnapshot'](_0x2ab9f8){return{'id':_0x2ab9f8['id'],'threadId':_0x2ab9f8['threadId'],'ref':_0x2ab9f8['ref']};}};p=x([C(0x0,c[_0x4ecdf2(0x1d1)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x4ecdf2(0x1f9)])),C(0x2,c[_0x4ecdf2(0x1d1)](b['CollaborationSessionService']))],p);var H=Object[_0x4ecdf2(0x205)],J=(_0x50b4c4,_0x4e2ab7,_0x5b92aa,_0x61fe8b)=>{for(var _0x4618d9=_0x61fe8b>0x1?void 0x0:_0x61fe8b?H(_0x4e2ab7,_0x5b92aa):_0x4e2ab7,_0x1958ff=_0x50b4c4['length']-0x1,_0x43e1a6;_0x1958ff>=0x0;_0x1958ff--)(_0x43e1a6=_0x50b4c4[_0x1958ff])&&(_0x4618d9=_0x43e1a6(_0x4618d9)||_0x4618d9);return _0x4618d9;},y=(_0x12d63f,_0x4526a8)=>(_0x41e74d,_0x2b8502)=>_0x4526a8(_0x41e74d,_0x2b8502,_0x12d63f);function _0x53af(_0x3bea29,_0x3b3be6){const _0x41193e=_0x4119();return _0x53af=function(_0x53af8f,_0x2f8143){_0x53af8f=_0x53af8f-0x1b9;let _0x4cba41=_0x41193e[_0x53af8f];return _0x4cba41;},_0x53af(_0x3bea29,_0x3b3be6);}let g=class extends c[_0x4ecdf2(0x1dc)]{constructor(_0x2f6cf6,_0x11403a){const _0xf7f023=_0x4ecdf2;super(),this[_0xf7f023(0x1c7)]=_0x2f6cf6,this[_0xf7f023(0x1df)]=_0x11403a,this[_0xf7f023(0x1d5)]();}['_initDataSource'](){const _0xbb1fcb=_0x4ecdf2;this[_0xbb1fcb(0x1c7)][_0xbb1fcb(0x1c2)]=this[_0xbb1fcb(0x1df)],this[_0xbb1fcb(0x1c7)][_0xbb1fcb(0x1fd)]=!0x1;}};g=J([y(0x0,M[_0x4ecdf2(0x206)]),y(0x1,c[_0x4ecdf2(0x1d1)](p))],g);var F=Object[_0x4ecdf2(0x20d)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3de2fc,_0x18eb64,_0x3a3d14)=>_0x18eb64 in _0x3de2fc?F(_0x3de2fc,_0x18eb64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a3d14}):_0x3de2fc[_0x18eb64]=_0x3a3d14,W=(_0x33926b,_0x13a912,_0x45af13,_0x3753b0)=>{for(var _0x38f10b=_0x3753b0>0x1?void 0x0:_0x3753b0?L(_0x13a912,_0x45af13):_0x13a912,_0x5675aa=_0x33926b['length']-0x1,_0x28c864;_0x5675aa>=0x0;_0x5675aa--)(_0x28c864=_0x33926b[_0x5675aa])&&(_0x38f10b=_0x28c864(_0x38f10b)||_0x38f10b);return _0x38f10b;},O=(_0x2f4f96,_0x42accc)=>(_0x1c2daf,_0x5eac63)=>_0x42accc(_0x1c2daf,_0x5eac63,_0x2f4f96),N=(_0xe0a11a,_0x16f38c,_0x36afdd)=>Z(_0xe0a11a,typeof _0x16f38c!=_0x4ecdf2(0x1c9)?_0x16f38c+'':_0x16f38c,_0x36afdd);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4ecdf2(0x20f)]{constructor(_0x191f11=D,_0x3a0c43,_0x1af245){const _0xc90db9=_0x4ecdf2;super(),this['_config']=_0x191f11,this[_0xc90db9(0x204)]=_0x3a0c43,this[_0xc90db9(0x226)]=_0x1af245;const {..._0x51c529}=c[_0xc90db9(0x1e5)]({},D,this[_0xc90db9(0x1f1)]);this[_0xc90db9(0x226)][_0xc90db9(0x1d6)](q,_0x51c529);}[_0x4ecdf2(0x212)](){const _0x262041=_0x4ecdf2;[[p],[g],[_]][_0x262041(0x20e)](_0x254357=>{const _0x1057dc=_0x262041;this[_0x1057dc(0x204)][_0x1057dc(0x208)](_0x254357);});}['onReady'](){const _0x4f9c74=_0x4ecdf2;this['_injector']['get'](g),this['_injector'][_0x4f9c74(0x22b)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4ecdf2(0x1e1),c['UniverInstanceType'][_0x4ecdf2(0x214)]),exports[_0x4ecdf2(0x1f4)]=W([c[_0x4ecdf2(0x222)](w[_0x4ecdf2(0x225)],b[_0x4ecdf2(0x1ef)],T[_0x4ecdf2(0x213)]),O(0x1,c[_0x4ecdf2(0x1d1)](c['Injector'])),O(0x2,c[_0x4ecdf2(0x1eb)])],exports[_0x4ecdf2(0x1f4)]);
|
|
1
|
+
'use strict';const _0x4e17d9=_0x3823;(function(_0xb29057,_0x5387e0){const _0x4adaa9=_0x3823,_0x225e72=_0xb29057();while(!![]){try{const _0x3f7496=parseInt(_0x4adaa9(0x11a))/0x1*(-parseInt(_0x4adaa9(0x12d))/0x2)+-parseInt(_0x4adaa9(0x109))/0x3*(-parseInt(_0x4adaa9(0xee))/0x4)+parseInt(_0x4adaa9(0x13b))/0x5+parseInt(_0x4adaa9(0x136))/0x6+-parseInt(_0x4adaa9(0x10e))/0x7*(-parseInt(_0x4adaa9(0x12f))/0x8)+parseInt(_0x4adaa9(0xf4))/0x9+-parseInt(_0x4adaa9(0x100))/0xa;if(_0x3f7496===_0x5387e0)break;else _0x225e72['push'](_0x225e72['shift']());}catch(_0xd7ce1b){_0x225e72['push'](_0x225e72['shift']());}}}(_0x12be,0x796cd));Object[_0x4e17d9(0x130)](exports,Symbol['toStringTag'],{'value':_0x4e17d9(0x129)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4e17d9(0xf1);var I=(_0x145e10=>(_0x145e10[_0x145e10[_0x4e17d9(0xf9)]=0x0]='OpenOrReOpen',_0x145e10[_0x145e10[_0x4e17d9(0x112)]=0x1]=_0x4e17d9(0x112),_0x145e10[_0x145e10[_0x4e17d9(0x108)]=-0x1]='UNRECOGNIZED',_0x145e10))(I||{}),v=(_0xac5613=>(_0xac5613[_0xac5613[_0x4e17d9(0xdd)]=0x0]=_0x4e17d9(0xdd),_0xac5613[_0xac5613['Add']=0x1]='Add',_0xac5613[_0xac5613[_0x4e17d9(0x12a)]=0x2]=_0x4e17d9(0x12a),_0xac5613[_0xac5613[_0x4e17d9(0x133)]=0x3]=_0x4e17d9(0x133),_0xac5613[_0xac5613[_0x4e17d9(0xed)]=0x4]=_0x4e17d9(0xed),_0xac5613[_0xac5613['Solve']=0x5]=_0x4e17d9(0x117),_0xac5613[_0xac5613[_0x4e17d9(0x108)]=-0x1]=_0x4e17d9(0x108),_0xac5613))(v||{});const f=_0x4a397d=>c[_0x4e17d9(0x122)](new Date(+_0x4a397d))['format'](_0x4e17d9(0xdf)),R=async(_0x477e5e,_0x2d7a16)=>{const _0xb1531e=_0x4e17d9,_0x1f9d41=_0x477e5e[_0xb1531e(0x11c)](c[_0xb1531e(0x11b)]),_0x1e0074=_0x477e5e[_0xb1531e(0x11c)](P[_0xb1531e(0x137)]);_0x2d7a16[_0xb1531e(0x141)](_0x45b6ba=>{_0x1f9d41['getUser'](_0x45b6ba)&&_0x2d7a16['delete'](_0x45b6ba);}),_0x2d7a16[_0xb1531e(0x110)]&&(await _0x1e0074['get'](_0xb1531e(0xe9),{'params':{'userIDs':[..._0x2d7a16]}}))[_0xb1531e(0x121)][_0xb1531e(0x126)][_0xb1531e(0x141)](_0x31d795=>{const _0x19ac06=_0xb1531e;_0x31d795&&_0x1f9d41[_0x19ac06(0xfe)](_0x31d795);});};var $=Object[_0x4e17d9(0x10b)],E=(_0xa820e2,_0x48a996,_0x3579fe,_0x1e1f0f)=>{for(var _0x1272f2=_0x1e1f0f>0x1?void 0x0:_0x1e1f0f?$(_0x48a996,_0x3579fe):_0x48a996,_0x3db5a5=_0xa820e2['length']-0x1,_0x54098d;_0x3db5a5>=0x0;_0x3db5a5--)(_0x54098d=_0xa820e2[_0x3db5a5])&&(_0x1272f2=_0x54098d(_0x1272f2)||_0x1272f2);return _0x1272f2;},S=(_0x46e83c,_0x11630a)=>(_0x580307,_0x16a374)=>_0x11630a(_0x580307,_0x16a374,_0x46e83c);let _=class extends c['Disposable']{constructor(_0x69ac87,_0x1ead45,_0x4d0706,_0x5c591a){const _0x171005=_0x4e17d9;super(),this['_commentService']=_0x69ac87,this[_0x171005(0x10f)]=_0x1ead45,this['_userService']=_0x4d0706,this[_0x171005(0x147)]=_0x5c591a,this['_init'](),this[_0x171005(0x13a)]();}[_0x4e17d9(0x13a)](){const _0x4d506f=_0x4e17d9;this['disposeWithMe'](this[_0x4d506f(0x10f)]['commentUpdate$'][_0x4d506f(0xda)](j[_0x4d506f(0x106)](0x10))['subscribe'](_0x3b7b4f=>{const _0x8ac26=_0x4d506f,_0x200455=new Set();_0x3b7b4f[_0x8ac26(0x141)](_0x3efb93=>{const _0x576d0f=_0x8ac26;switch(_0x3efb93['type']){case'add':{const _0x3e51b3=_0x3efb93[_0x576d0f(0x119)][_0x576d0f(0xd1)];_0x200455[_0x576d0f(0xe2)](_0x3e51b3);break;}}}),R(this['_injector'],_0x200455);}));}[_0x4e17d9(0x127)](){const _0x35d0c0=_0x4e17d9;this[_0x35d0c0(0xf3)](this[_0x35d0c0(0x111)][_0x35d0c0(0x132)][_0x35d0c0(0xea)](async _0x342afb=>{const _0x3c4237=_0x35d0c0;var _0x379990,_0x2e0bad,_0x25e331,_0x55adc5;const _0x3d9750=(_0x379990=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x34d9b2=>_0x34d9b2[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x379990[_0x3c4237(0xff)];if(!_0x3d9750)return;const {unitId:_0x26ec77,subUnitId:_0x1c55fe}=_0x3d9750;switch(_0x342afb[_0x3c4237(0x113)]&&this[_0x3c4237(0xf2)][_0x3c4237(0xfe)](_0x342afb[_0x3c4237(0x113)]),_0x342afb[_0x3c4237(0x145)]){case v[_0x3c4237(0x10d)]:break;case v[_0x3c4237(0x12a)]:{this['_threadCommentModel']['addComment'](_0x26ec77,_0x1c55fe,{'unitId':_0x26ec77,'subUnitId':_0x1c55fe,'ref':'','id':_0x342afb[_0x3c4237(0x13f)],'dT':f(+_0x342afb[_0x3c4237(0xfd)]),'threadId':_0x342afb[_0x3c4237(0xd9)],'personId':(_0x25e331=(_0x2e0bad=_0x342afb['user'])==null?void 0x0:_0x2e0bad['userID'])!=null?_0x25e331:_0x342afb[_0x3c4237(0x120)],'text':JSON[_0x3c4237(0x116)](_0x342afb[_0x3c4237(0xef)]),'parentId':_0x3d9750['id']});break;}case v[_0x3c4237(0xed)]:{const _0x42cef3=this[_0x3c4237(0x10f)][_0x3c4237(0xe7)](_0x26ec77,_0x1c55fe,_0x342afb['replyId']);_0x42cef3&&_0x42cef3['parentId']&&this[_0x3c4237(0x10f)]['deleteComment'](_0x26ec77,_0x1c55fe,_0x342afb[_0x3c4237(0x13f)]);break;}case v[_0x3c4237(0x133)]:{this[_0x3c4237(0x10f)][_0x3c4237(0xe3)](_0x26ec77,_0x1c55fe,{'commentId':_0x342afb[_0x3c4237(0x13f)],'text':JSON['parse'](_0x342afb[_0x3c4237(0xef)])});break;}case v[_0x3c4237(0x117)]:{const _0x24650f=(_0x55adc5=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x374a74=>_0x374a74[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x55adc5['root'];_0x24650f&&this[_0x3c4237(0x10f)]['resolveComment'](_0x26ec77,_0x1c55fe,_0x24650f['id'],_0x342afb[_0x3c4237(0xce)]===I[_0x3c4237(0x112)]);break;}}}));}};_=E([S(0x0,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0x123)])),S(0x1,c['Inject'](M[_0x4e17d9(0x144)])),S(0x2,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),S(0x3,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x13e)]))],_);const q=_0x4e17d9(0xd7),D={};function _0x12be(){const _0x37e88a=['personId','_configService','comments','Inject','DependentOn','COMMENT','thread-comment-data-source.config','CustomRangeType','threadId','pipe','_sessionService','pluginName','Unknown','Plugin','YYYY/MM/DD\x20HH:mm','values','getMemberID','add','updateComment','/add','comment','/solved','getComment','dataSource','/universer-api/user/list','subscribe','IThreadCommentDataSourceService','getUnit','Delete','202556rTHpDe','content','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','disposeWithMe','4658085rtefFO','map','/reply','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','OpenOrReOpen','CollaborationSessionService','find','Disposable','createTimestamp','addUser','root','18651000UOUOUW','_threadCommentDataSource','_threadCommentDataSourceService','deleteComment','reply','_initDataSource','bufferTime','post','UNRECOGNIZED','6nkrmUS','UniverLicensePlugin','getOwnPropertyDescriptor','symbol','Add','1505HenaNg','_threadCommentModel','size','_commentService','Solved','user','filter','resolveComment','parse','Solve','/delete','payload','44LbftRN','UserManagerService','get','resolved','IConfigService','customRanges','userId','body','dayjs','CommentService','_httpService','code','users','_init','error','Module','Reply','length','onStarting','22854zLsdaG','requireSession','31880KgLHof','defineProperty','_config','commentUpdate$','Edit','onReady','UniverThreadCommentDataSourcePlugin','5964006OqygSC','HTTPService','unitId','addComment','_initUserSync','1978130lBzAvl','setConfig','stringify','Injector','replyId','/universer-api/comment/unit/','forEach','merge','replies','ThreadCommentModel','type','rangeType','_injector','UNIVER_UNKNOWN','solved','rangeId','userID'];_0x12be=function(){return _0x37e88a;};return _0x12be();}var A=Object[_0x4e17d9(0x10b)],x=(_0x2eb4ac,_0x268727,_0x11aaf8,_0xe65d0c)=>{const _0x28e1b1=_0x4e17d9;for(var _0x53b2f4=_0xe65d0c>0x1?void 0x0:_0xe65d0c?A(_0x268727,_0x11aaf8):_0x268727,_0x4dcb1e=_0x2eb4ac[_0x28e1b1(0x12b)]-0x1,_0x137b0c;_0x4dcb1e>=0x0;_0x4dcb1e--)(_0x137b0c=_0x2eb4ac[_0x4dcb1e])&&(_0x53b2f4=_0x137b0c(_0x53b2f4)||_0x53b2f4);return _0x53b2f4;},C=(_0x54e97a,_0x290d5e)=>(_0x28bed3,_0x248d72)=>_0x290d5e(_0x28bed3,_0x248d72,_0x54e97a);function Y(_0x3ada4e,_0x11d4ee){const _0x44b437=_0x4e17d9,_0x354407=_0x3ada4e[_0x44b437(0x143)][0x0];return{..._0x11d4ee,'id':_0x354407[_0x44b437(0x13f)],'resolved':_0x3ada4e[_0x44b437(0xce)]===0x1,'dT':f(_0x354407[_0x44b437(0xfd)]),'personId':_0x354407[_0x44b437(0x120)],'threadId':_0x354407[_0x44b437(0xd9)]};}function G(_0x4fbd4e,_0x183c75,_0x8309ce){const _0x18d4f0=_0x4e17d9;var _0x41606e,_0x3dc0b1;if(((_0x3dc0b1=(_0x41606e=_0x4fbd4e==null?void 0x0:_0x4fbd4e[_0x18d4f0(0x143)])==null?void 0x0:_0x41606e[_0x18d4f0(0x12b)])!=null?_0x3dc0b1:0x0)>0x0){const _0x4939f1=(_0x47dcef,_0x259023)=>({'id':_0x47dcef[_0x18d4f0(0x13f)],'threadId':_0x47dcef[_0x18d4f0(0xd9)],'dT':f(_0x47dcef[_0x18d4f0(0xfd)]),'personId':_0x47dcef['userId'],'resolved':_0x4fbd4e[_0x18d4f0(0xce)]===I['Solved'],'unitId':_0x183c75,'subUnitId':_0x8309ce,'text':JSON[_0x18d4f0(0x116)](_0x47dcef['content']),'parentId':_0x259023}),_0xb36bbc=_0x4939f1(_0x4fbd4e[_0x18d4f0(0x143)][0x0]);return{..._0xb36bbc,'children':_0x4fbd4e[_0x18d4f0(0x143)]['slice'](0x1)[_0x18d4f0(0xf5)](_0x2abdac=>_0x4939f1(_0x2abdac,_0xb36bbc['id']))};}return null;}let p=class{constructor(_0x49ccc4,_0x376817,_0x3f9ff2){const _0x214a91=_0x4e17d9;this[_0x214a91(0x124)]=_0x49ccc4,this[_0x214a91(0xf2)]=_0x376817,this[_0x214a91(0xdb)]=_0x3f9ff2;}async[_0x4e17d9(0x139)](_0x4f8dc5){const _0x1327b0=_0x4e17d9;var _0x5c51cb,_0x9d0b24;const {parentId:_0x94b0e7,unitId:_0x5b2992,text:_0x52e12f,threadId:_0x2cdbdb}=_0x4f8dc5,_0x8c1907=(_0x9d0b24=(_0x5c51cb=_0x52e12f[_0x1327b0(0x11f)])==null?void 0x0:_0x5c51cb['filter'](_0x281cfe=>_0x281cfe['rangeType']===c[_0x1327b0(0xd8)][_0x1327b0(0xd6)])['map'](_0x7168e8=>_0x7168e8[_0x1327b0(0xcf)]))!=null?_0x9d0b24:[],_0x167be7=JSON['stringify'](_0x52e12f),_0x49b65a=(await this['_sessionService']['requireSession'](_0x5b2992))[_0x1327b0(0xe1)]();if(_0x94b0e7){const _0x298611={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907,'threadId':_0x2cdbdb},_0x50f763=(await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xf6),{'body':_0x298611}))[_0x1327b0(0x121)][_0x1327b0(0x104)];return{..._0x4f8dc5,'id':_0x50f763['replyId'],'dT':c['dayjs'](+_0x50f763['createTimestamp'])['format'](_0x1327b0(0xdf)),'personId':_0x50f763[_0x1327b0(0x120)]};}else{const _0x2a7a85={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907},_0x173bbc=await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xe4),{'body':_0x2a7a85});return Y(_0x173bbc[_0x1327b0(0x121)][_0x1327b0(0xe5)],_0x4f8dc5);}}async[_0x4e17d9(0xe3)](_0x25ba3a){const _0x55de65=_0x4e17d9;var _0x275f2a,_0x4e51fb;const {text:_0x256c93,unitId:_0x2f2b17}=_0x25ba3a,_0xdee93d=(_0x4e51fb=(_0x275f2a=_0x256c93['customRanges'])==null?void 0x0:_0x275f2a[_0x55de65(0x114)](_0x57eecc=>_0x57eecc[_0x55de65(0x146)]===c['CustomRangeType'][_0x55de65(0xd6)])[_0x55de65(0xf5)](_0x4c0316=>_0x4c0316[_0x55de65(0xcf)]))!=null?_0x4e51fb:[],_0x9059e6=JSON[_0x55de65(0x13d)](_0x256c93),_0x103d64=_0x25ba3a[_0x55de65(0xd9)],_0x4b47ca=_0x25ba3a['id'],_0x3d660e={'memberId':(await this[_0x55de65(0xdb)][_0x55de65(0x12e)](_0x2f2b17))[_0x55de65(0xe1)](),'unitId':_0x2f2b17,'threadId':_0x103d64,'mention':_0xdee93d,'content':_0x9059e6,'replyId':_0x4b47ca},_0x4f295e=await this[_0x55de65(0x124)]['post'](_0x55de65(0x140)+_0x2f2b17+'/edit',{'body':_0x3d660e});return!_0x4f295e[_0x55de65(0x121)][_0x55de65(0x128)]||_0x4f295e['body'][_0x55de65(0x128)]['code']===0x1;}async[_0x4e17d9(0x115)](_0xf153cb){const _0xfe0cc7=_0x4e17d9,{unitId:_0x3eeef0}=_0xf153cb,_0x49263f=_0xf153cb[_0xfe0cc7(0xd9)],_0x53f00e={'memberId':this[_0xfe0cc7(0xf2)]['getCurrentUser']()[_0xfe0cc7(0xd0)],'unitId':_0x3eeef0,'threadId':_0x49263f,'solved':_0xf153cb[_0xfe0cc7(0x11d)]?I[_0xfe0cc7(0x112)]:I[_0xfe0cc7(0xf9)]},_0x31ba52=await this[_0xfe0cc7(0x124)][_0xfe0cc7(0x107)](_0xfe0cc7(0x140)+_0x3eeef0+_0xfe0cc7(0xe6),{'body':_0x53f00e});return!_0x31ba52[_0xfe0cc7(0x121)]['error']||_0x31ba52[_0xfe0cc7(0x121)][_0xfe0cc7(0x128)][_0xfe0cc7(0x125)]===0x1;}async[_0x4e17d9(0x103)](_0x11dc11,_0x11a1d4,_0x3f98b5,_0x550438){const _0x92860d=_0x4e17d9,_0x52f063={'memberId':(await this[_0x92860d(0xdb)][_0x92860d(0x12e)](_0x11dc11))[_0x92860d(0xe1)](),'threadId':_0x3f98b5,'replyId':_0x550438,'unitId':_0x11dc11},_0x47fb00=await this['_httpService'][_0x92860d(0x107)](_0x92860d(0x140)+_0x11dc11+_0x92860d(0x118),{'body':_0x52f063});return!_0x47fb00[_0x92860d(0x121)][_0x92860d(0x128)]||_0x47fb00['body'][_0x92860d(0x128)]['code']===0x1;}async[_0x4e17d9(0xf0)](_0x50f3b0,_0x249f60,_0x5b9591){const _0x5304b5=_0x4e17d9,_0x7e808c={'unitId':_0x50f3b0,'threadId':_0x5b9591},_0x559bef=await this[_0x5304b5(0x124)][_0x5304b5(0x107)](_0x5304b5(0x140)+_0x50f3b0+'/list',{'body':_0x7e808c}),_0x4adb69=_0x5b9591[_0x5304b5(0xf5)](_0x3de047=>G(_0x559bef[_0x5304b5(0x121)][_0x5304b5(0xd3)][_0x3de047],_0x50f3b0,_0x249f60))['filter'](Boolean);return Object[_0x5304b5(0xe0)](_0x559bef[_0x5304b5(0x121)][_0x5304b5(0x126)])[_0x5304b5(0x141)](_0x544ec3=>{const _0x48ffcc=_0x5304b5;this[_0x48ffcc(0xf2)][_0x48ffcc(0xfe)](_0x544ec3);}),_0x4adb69;}['saveCommentToSnapshot'](_0x4ea878){return{'id':_0x4ea878['id'],'threadId':_0x4ea878['threadId'],'ref':_0x4ea878['ref']};}};p=x([C(0x0,c[_0x4e17d9(0xd4)](P[_0x4e17d9(0x137)])),C(0x1,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),C(0x2,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0xfa)]))],p);var H=Object[_0x4e17d9(0x10b)],J=(_0x1c8b9c,_0x442ace,_0xa3f0f6,_0x4114a9)=>{const _0x35c6a4=_0x4e17d9;for(var _0x5cf295=_0x4114a9>0x1?void 0x0:_0x4114a9?H(_0x442ace,_0xa3f0f6):_0x442ace,_0x5c4051=_0x1c8b9c[_0x35c6a4(0x12b)]-0x1,_0x16ff27;_0x5c4051>=0x0;_0x5c4051--)(_0x16ff27=_0x1c8b9c[_0x5c4051])&&(_0x5cf295=_0x16ff27(_0x5cf295)||_0x5cf295);return _0x5cf295;},y=(_0x2e8f6e,_0x3af385)=>(_0x248e36,_0x104cbf)=>_0x3af385(_0x248e36,_0x104cbf,_0x2e8f6e);let g=class extends c[_0x4e17d9(0xfc)]{constructor(_0x59abb2,_0x333b9a){const _0x625d6f=_0x4e17d9;super(),this[_0x625d6f(0x102)]=_0x59abb2,this[_0x625d6f(0x101)]=_0x333b9a,this[_0x625d6f(0x105)]();}['_initDataSource'](){const _0x2927fb=_0x4e17d9;this[_0x2927fb(0x102)][_0x2927fb(0xe8)]=this['_threadCommentDataSource'],this[_0x2927fb(0x102)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4e17d9(0xeb)]),y(0x1,c[_0x4e17d9(0xd4)](p))],g);function _0x3823(_0x32c266,_0x26fd90){const _0x12be48=_0x12be();return _0x3823=function(_0x382373,_0x54a3ba){_0x382373=_0x382373-0xce;let _0x2c7e67=_0x12be48[_0x382373];return _0x2c7e67;},_0x3823(_0x32c266,_0x26fd90);}var F=Object[_0x4e17d9(0x130)],L=Object[_0x4e17d9(0x10b)],Z=(_0xe92ea8,_0x2cbfba,_0x4c975e)=>_0x2cbfba in _0xe92ea8?F(_0xe92ea8,_0x2cbfba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c975e}):_0xe92ea8[_0x2cbfba]=_0x4c975e,W=(_0xd1f9b1,_0x231c7a,_0x43656a,_0xbf70aa)=>{const _0x4b7489=_0x4e17d9;for(var _0x117c37=_0xbf70aa>0x1?void 0x0:_0xbf70aa?L(_0x231c7a,_0x43656a):_0x231c7a,_0x18a78d=_0xd1f9b1[_0x4b7489(0x12b)]-0x1,_0x78b8fe;_0x18a78d>=0x0;_0x18a78d--)(_0x78b8fe=_0xd1f9b1[_0x18a78d])&&(_0x117c37=_0x78b8fe(_0x117c37)||_0x117c37);return _0x117c37;},O=(_0x5d10b7,_0x20047c)=>(_0x2eb921,_0x48bb4d)=>_0x20047c(_0x2eb921,_0x48bb4d,_0x5d10b7),N=(_0x51112e,_0x454e1c,_0x3cfccb)=>Z(_0x51112e,typeof _0x454e1c!=_0x4e17d9(0x10c)?_0x454e1c+'':_0x454e1c,_0x3cfccb);exports[_0x4e17d9(0x135)]=class extends c[_0x4e17d9(0xde)]{constructor(_0x2c1584=D,_0x3ee91d,_0x117bbe){const _0xc15ccb=_0x4e17d9;super(),this[_0xc15ccb(0x131)]=_0x2c1584,this['_injector']=_0x3ee91d,this[_0xc15ccb(0xd2)]=_0x117bbe;const {..._0x5ea0da}=c[_0xc15ccb(0x142)]({},D,this[_0xc15ccb(0x131)]);this[_0xc15ccb(0xd2)][_0xc15ccb(0x13c)](q,_0x5ea0da);}[_0x4e17d9(0x12c)](){[[p],[g],[_]]['forEach'](_0x1897f5=>{const _0x492956=_0x3823;this[_0x492956(0x147)]['add'](_0x1897f5);});}[_0x4e17d9(0x134)](){const _0x4e9bcb=_0x4e17d9;this['_injector'][_0x4e9bcb(0x11c)](g),this['_injector'][_0x4e9bcb(0x11c)](_);}},N(exports[_0x4e17d9(0x135)],_0x4e17d9(0xdc),U),N(exports[_0x4e17d9(0x135)],_0x4e17d9(0x145),c['UniverInstanceType'][_0x4e17d9(0x148)]),exports[_0x4e17d9(0x135)]=W([c[_0x4e17d9(0xd5)](w[_0x4e17d9(0xf8)],b[_0x4e17d9(0xf7)],T[_0x4e17d9(0x10a)]),O(0x1,c[_0x4e17d9(0xd4)](c['Injector'])),O(0x2,c[_0x4e17d9(0x11e)])],exports[_0x4e17d9(0x135)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x284a3e=_0x358d;(function(_0x5cc712,_0x2187a0){const _0x24203b=_0x358d,_0x3a3e5d=_0x5cc712();while(!![]){try{const _0x122a4c=-parseInt(_0x24203b(0x201))/0x1+-parseInt(_0x24203b(0x230))/0x2+parseInt(_0x24203b(0x205))/0x3*(parseInt(_0x24203b(0x1fa))/0x4)+parseInt(_0x24203b(0x22e))/0x5*(-parseInt(_0x24203b(0x22b))/0x6)+parseInt(_0x24203b(0x241))/0x7+parseInt(_0x24203b(0x249))/0x8+parseInt(_0x24203b(0x21c))/0x9*(parseInt(_0x24203b(0x23b))/0xa);if(_0x122a4c===_0x2187a0)break;else _0x3a3e5d['push'](_0x3a3e5d['shift']());}catch(_0x2704dd){_0x3a3e5d['push'](_0x3a3e5d['shift']());}}}(_0x5a56,0xaaf62));import{CommentService as _0x8f2b46,CollaborationSessionService as _0x537a40,UniverCollaborationClientPlugin as _0x192bbc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c80ab}from'@univerjs-pro/license';import{dayjs as _0x2caec2,UserManagerService as _0x597ce3,Inject as _0x345b5f,Injector as _0x362af1,Disposable as _0x443fef,CustomRangeType as _0x3119b5,UniverInstanceType as _0x39a8f1,DependentOn as _0x5609cc,IConfigService as _0x1ed401,Plugin as _0x1fd8ea,merge as _0x58aefb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23f049}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xf61861,IThreadCommentDataSourceService as _0xc3e1e6}from'@univerjs/thread-comment';function _0x358d(_0x32244d,_0x4b642b){const _0x5a5654=_0x5a56();return _0x358d=function(_0x358d59,_0x462227){_0x358d59=_0x358d59-0x1eb;let _0x19a2fd=_0x5a5654[_0x358d59];return _0x19a2fd;},_0x358d(_0x32244d,_0x4b642b);}import{bufferTime as _0x4ba7d2}from'rxjs';import{HTTPService as _0x57d2ba}from'@univerjs/network';const W=_0x284a3e(0x23d);var I=(_0x204fde=>(_0x204fde[_0x204fde[_0x284a3e(0x1f6)]=0x0]='OpenOrReOpen',_0x204fde[_0x204fde[_0x284a3e(0x222)]=0x1]=_0x284a3e(0x222),_0x204fde[_0x204fde[_0x284a3e(0x22c)]=-0x1]=_0x284a3e(0x22c),_0x204fde))(I||{}),v=(_0xba5322=>(_0xba5322[_0xba5322[_0x284a3e(0x220)]=0x0]=_0x284a3e(0x220),_0xba5322[_0xba5322[_0x284a3e(0x212)]=0x1]=_0x284a3e(0x212),_0xba5322[_0xba5322[_0x284a3e(0x23f)]=0x2]=_0x284a3e(0x23f),_0xba5322[_0xba5322[_0x284a3e(0x245)]=0x3]='Edit',_0xba5322[_0xba5322[_0x284a3e(0x21a)]=0x4]=_0x284a3e(0x21a),_0xba5322[_0xba5322[_0x284a3e(0x247)]=0x5]=_0x284a3e(0x247),_0xba5322[_0xba5322[_0x284a3e(0x22c)]=-0x1]=_0x284a3e(0x22c),_0xba5322))(v||{});const y=_0x354da2=>_0x2caec2(new Date(+_0x354da2))[_0x284a3e(0x217)](_0x284a3e(0x22f)),B=async(_0x1c8dc5,_0x5117b9)=>{const _0x795a87=_0x284a3e,_0x2f1424=_0x1c8dc5[_0x795a87(0x22a)](_0x597ce3),_0x3ce25a=_0x1c8dc5[_0x795a87(0x22a)](_0x57d2ba);_0x5117b9[_0x795a87(0x234)](_0x3af781=>{const _0x586140=_0x795a87;_0x2f1424[_0x586140(0x200)](_0x3af781)&&_0x5117b9['delete'](_0x3af781);}),_0x5117b9[_0x795a87(0x237)]&&(await _0x3ce25a['get'](_0x795a87(0x24d),{'params':{'userIDs':[..._0x5117b9]}}))[_0x795a87(0x236)][_0x795a87(0x246)][_0x795a87(0x234)](_0xc95a93=>{_0xc95a93&&_0x2f1424['addUser'](_0xc95a93);});};var K=Object[_0x284a3e(0x228)],V=(_0x2bf3c6,_0x27e314,_0x2db744,_0xf9ac0)=>{const _0xe590dc=_0x284a3e;for(var _0x2066f7=_0xf9ac0>0x1?void 0x0:_0xf9ac0?K(_0x27e314,_0x2db744):_0x27e314,_0x5e699b=_0x2bf3c6[_0xe590dc(0x224)]-0x1,_0x4cd071;_0x5e699b>=0x0;_0x5e699b--)(_0x4cd071=_0x2bf3c6[_0x5e699b])&&(_0x2066f7=_0x4cd071(_0x2066f7)||_0x2066f7);return _0x2066f7;},p=(_0x412ebf,_0x57c9e6)=>(_0x15e8fb,_0x4a8de6)=>_0x57c9e6(_0x15e8fb,_0x4a8de6,_0x412ebf);let _=class extends _0x443fef{constructor(_0x2b61c9,_0x455239,_0x324ee2,_0x18ab5a){const _0x8e79fb=_0x284a3e;super(),this['_commentService']=_0x2b61c9,this[_0x8e79fb(0x216)]=_0x455239,this['_userService']=_0x324ee2,this['_injector']=_0x18ab5a,this[_0x8e79fb(0x227)](),this['_initUserSync']();}['_initUserSync'](){const _0x295a5a=_0x284a3e;this[_0x295a5a(0x1f5)](this[_0x295a5a(0x216)]['commentUpdate$'][_0x295a5a(0x1f2)](_0x4ba7d2(0x10))['subscribe'](_0x270d58=>{const _0x13c95f=_0x295a5a,_0x36b6ff=new Set();_0x270d58['forEach'](_0x55cfc9=>{const _0xac59f=_0x358d;switch(_0x55cfc9[_0xac59f(0x1ef)]){case _0xac59f(0x242):{const _0x5bb433=_0x55cfc9[_0xac59f(0x1f9)]['personId'];_0x36b6ff[_0xac59f(0x242)](_0x5bb433);break;}}}),B(this[_0x13c95f(0x232)],_0x36b6ff);}));}['_init'](){const _0x42b002=_0x284a3e;this[_0x42b002(0x1f5)](this[_0x42b002(0x1f0)][_0x42b002(0x223)][_0x42b002(0x206)](async _0x205927=>{const _0x53c73d=_0x42b002;var _0x109814,_0x5f0e1f,_0x18cb13,_0x1ca944;const _0x4a3c94=(_0x109814=this[_0x53c73d(0x216)][_0x53c73d(0x1fe)](_0x205927['unitId'])[_0x53c73d(0x203)](_0x385062=>_0x385062[_0x53c73d(0x23c)]===_0x205927['threadId']))==null?void 0x0:_0x109814[_0x53c73d(0x229)];if(!_0x4a3c94)return;const {unitId:_0x2ae4b9,subUnitId:_0x3de7e8}=_0x4a3c94;switch(_0x205927[_0x53c73d(0x238)]&&this[_0x53c73d(0x22d)][_0x53c73d(0x214)](_0x205927[_0x53c73d(0x238)]),_0x205927['type']){case v['Add']:break;case v[_0x53c73d(0x23f)]:{this[_0x53c73d(0x216)]['addComment'](_0x2ae4b9,_0x3de7e8,{'unitId':_0x2ae4b9,'subUnitId':_0x3de7e8,'ref':'','id':_0x205927[_0x53c73d(0x1f7)],'dT':y(+_0x205927[_0x53c73d(0x215)]),'threadId':_0x205927[_0x53c73d(0x23c)],'personId':(_0x18cb13=(_0x5f0e1f=_0x205927['user'])==null?void 0x0:_0x5f0e1f['userID'])!=null?_0x18cb13:_0x205927[_0x53c73d(0x20f)],'text':JSON[_0x53c73d(0x21e)](_0x205927['content']),'parentId':_0x4a3c94['id']});break;}case v[_0x53c73d(0x21a)]:{const _0x10bb02=this['_threadCommentModel'][_0x53c73d(0x1ff)](_0x2ae4b9,_0x3de7e8,_0x205927[_0x53c73d(0x1f7)]);_0x10bb02&&_0x10bb02['parentId']&&this[_0x53c73d(0x216)][_0x53c73d(0x21f)](_0x2ae4b9,_0x3de7e8,_0x205927[_0x53c73d(0x1f7)]);break;}case v[_0x53c73d(0x245)]:{this['_threadCommentModel'][_0x53c73d(0x225)](_0x2ae4b9,_0x3de7e8,{'commentId':_0x205927[_0x53c73d(0x1f7)],'text':JSON[_0x53c73d(0x21e)](_0x205927[_0x53c73d(0x1eb)])});break;}case v[_0x53c73d(0x247)]:{const _0x4f560a=(_0x1ca944=this[_0x53c73d(0x216)][_0x53c73d(0x1fe)](_0x205927[_0x53c73d(0x24b)])['find'](_0x24924a=>_0x24924a['threadId']===_0x205927[_0x53c73d(0x23c)]))==null?void 0x0:_0x1ca944[_0x53c73d(0x229)];_0x4f560a&&this['_threadCommentModel']['resolveComment'](_0x2ae4b9,_0x3de7e8,_0x4f560a['id'],_0x205927[_0x53c73d(0x23e)]===I[_0x53c73d(0x222)]);break;}}}));}};_=V([p(0x0,_0x345b5f(_0x8f2b46)),p(0x1,_0x345b5f(_0xf61861)),p(0x2,_0x345b5f(_0x597ce3)),p(0x3,_0x345b5f(_0x362af1))],_);function _0x5a56(){const _0x43b034=['unitId','/list','/universer-api/user/list','content','onReady','_threadCommentDataSourceService','_initDataSource','type','_commentService','pluginName','pipe','filter','_sessionService','disposeWithMe','OpenOrReOpen','replyId','dataSource','payload','20RxCCsa','getCurrentUser','/universer-api/comment/unit/','onStarting','getUnit','getComment','getUser','986732hXJHzL','/edit','find','comments','296547YwaOCE','subscribe','stringify','rangeType','_httpService','code','syncUpdateMutationToColla','addComment','rangeId','reply','userId','requireSession','replies','Add','_config','addUser','createTimestamp','_threadCommentModel','format','map','_threadCommentDataSource','Delete','thread-comment-data-source.config','522pXlPFI','saveCommentToSnapshot','parse','deleteComment','Unknown','listComments','Solved','commentUpdate$','length','updateComment','/solved','_init','getOwnPropertyDescriptor','root','get','6gwwCVn','UNRECOGNIZED','_userService','3487630FkiCON','YYYY/MM/DD\x20HH:mm','1792324SADaXc','resolveComment','_injector','getMemberID','forEach','customRanges','body','size','user','post','defineProperty','457790FFkEgV','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','Reply','setConfig','73227iCwfPz','add','/reply','error','Edit','users','Solve','_configService','966320fVWDHK','userID'];_0x5a56=function(){return _0x43b034;};return _0x5a56();}const z=_0x284a3e(0x21b),O={};var k=Object[_0x284a3e(0x228)],Q=(_0x4e2b48,_0x4d7a70,_0x4b43b6,_0x13e7c9)=>{for(var _0x3404b5=_0x13e7c9>0x1?void 0x0:_0x13e7c9?k(_0x4d7a70,_0x4b43b6):_0x4d7a70,_0x34e796=_0x4e2b48['length']-0x1,_0x5ec6f5;_0x34e796>=0x0;_0x34e796--)(_0x5ec6f5=_0x4e2b48[_0x34e796])&&(_0x3404b5=_0x5ec6f5(_0x3404b5)||_0x3404b5);return _0x3404b5;},b=(_0x4d1264,_0x3ab4d4)=>(_0xd7209d,_0x394239)=>_0x3ab4d4(_0xd7209d,_0x394239,_0x4d1264);function X(_0x516f7f,_0x3cef51){const _0x5dc8a9=_0x284a3e,_0x6b95f7=_0x516f7f[_0x5dc8a9(0x211)][0x0];return{..._0x3cef51,'id':_0x6b95f7['replyId'],'resolved':_0x516f7f[_0x5dc8a9(0x23e)]===0x1,'dT':y(_0x6b95f7[_0x5dc8a9(0x215)]),'personId':_0x6b95f7[_0x5dc8a9(0x20f)],'threadId':_0x6b95f7[_0x5dc8a9(0x23c)]};}function ee(_0x3f7fc8,_0x35b1d4,_0x3054fe){const _0x5c8862=_0x284a3e;var _0x176bd9,_0x250b5f;if(((_0x250b5f=(_0x176bd9=_0x3f7fc8==null?void 0x0:_0x3f7fc8[_0x5c8862(0x211)])==null?void 0x0:_0x176bd9[_0x5c8862(0x224)])!=null?_0x250b5f:0x0)>0x0){const _0x5d1eaf=(_0x58c915,_0x2dffda)=>({'id':_0x58c915[_0x5c8862(0x1f7)],'threadId':_0x58c915[_0x5c8862(0x23c)],'dT':y(_0x58c915[_0x5c8862(0x215)]),'personId':_0x58c915[_0x5c8862(0x20f)],'resolved':_0x3f7fc8[_0x5c8862(0x23e)]===I['Solved'],'unitId':_0x35b1d4,'subUnitId':_0x3054fe,'text':JSON[_0x5c8862(0x21e)](_0x58c915[_0x5c8862(0x1eb)]),'parentId':_0x2dffda}),_0x1d380f=_0x5d1eaf(_0x3f7fc8[_0x5c8862(0x211)][0x0]);return{..._0x1d380f,'children':_0x3f7fc8[_0x5c8862(0x211)]['slice'](0x1)['map'](_0xa5f9fa=>_0x5d1eaf(_0xa5f9fa,_0x1d380f['id']))};}return null;}let S=class{constructor(_0x2a8f3e,_0xc002a6,_0x1e30ec){const _0x5e6199=_0x284a3e;this[_0x5e6199(0x209)]=_0x2a8f3e,this['_userService']=_0xc002a6,this['_sessionService']=_0x1e30ec;}async[_0x284a3e(0x20c)](_0x4d7f6e){const _0x290327=_0x284a3e;var _0x13299a,_0x3722b2;const {parentId:_0x470d07,unitId:_0x287fe4,text:_0x953487,threadId:_0x2e4e74}=_0x4d7f6e,_0x21e078=(_0x3722b2=(_0x13299a=_0x953487[_0x290327(0x235)])==null?void 0x0:_0x13299a[_0x290327(0x1f3)](_0x5970ac=>_0x5970ac[_0x290327(0x208)]===_0x3119b5['COMMENT'])[_0x290327(0x218)](_0x520df1=>_0x520df1[_0x290327(0x20d)]))!=null?_0x3722b2:[],_0x5268ff=JSON[_0x290327(0x207)](_0x953487),_0x5ee958=(await this[_0x290327(0x1f4)][_0x290327(0x210)](_0x287fe4))[_0x290327(0x233)]();if(_0x470d07){const _0x58a5cd={'memberId':_0x5ee958,'unitId':_0x287fe4,'content':_0x5268ff,'mention':_0x21e078,'threadId':_0x2e4e74},_0x4aaed8=(await this[_0x290327(0x209)][_0x290327(0x239)]('/universer-api/comment/unit/'+_0x287fe4+_0x290327(0x243),{'body':_0x58a5cd}))[_0x290327(0x236)][_0x290327(0x20e)];return{..._0x4d7f6e,'id':_0x4aaed8['replyId'],'dT':_0x2caec2(+_0x4aaed8['createTimestamp'])['format'](_0x290327(0x22f)),'personId':_0x4aaed8['userId']};}else{const _0x144650={'memberId':_0x5ee958,'unitId':_0x287fe4,'content':_0x5268ff,'mention':_0x21e078},_0x373464=await this['_httpService']['post'](_0x290327(0x1fc)+_0x287fe4+'/add',{'body':_0x144650});return X(_0x373464['body']['comment'],_0x4d7f6e);}}async[_0x284a3e(0x225)](_0x5d838a){const _0x1e8a33=_0x284a3e;var _0x46d587,_0x1c2f22;const {text:_0x4bfda0,unitId:_0x284991}=_0x5d838a,_0x373ebc=(_0x1c2f22=(_0x46d587=_0x4bfda0[_0x1e8a33(0x235)])==null?void 0x0:_0x46d587[_0x1e8a33(0x1f3)](_0x593b6c=>_0x593b6c[_0x1e8a33(0x208)]===_0x3119b5['COMMENT'])[_0x1e8a33(0x218)](_0x1dad3c=>_0x1dad3c['rangeId']))!=null?_0x1c2f22:[],_0x550e8a=JSON[_0x1e8a33(0x207)](_0x4bfda0),_0x19b9a6=_0x5d838a['threadId'],_0x3a9855=_0x5d838a['id'],_0x2a76d5={'memberId':(await this[_0x1e8a33(0x1f4)][_0x1e8a33(0x210)](_0x284991))[_0x1e8a33(0x233)](),'unitId':_0x284991,'threadId':_0x19b9a6,'mention':_0x373ebc,'content':_0x550e8a,'replyId':_0x3a9855},_0x444a75=await this['_httpService'][_0x1e8a33(0x239)]('/universer-api/comment/unit/'+_0x284991+_0x1e8a33(0x202),{'body':_0x2a76d5});return!_0x444a75[_0x1e8a33(0x236)][_0x1e8a33(0x244)]||_0x444a75[_0x1e8a33(0x236)]['error'][_0x1e8a33(0x20a)]===0x1;}async[_0x284a3e(0x231)](_0x3e7d9e){const _0x3f4abb=_0x284a3e,{unitId:_0x4ffec5}=_0x3e7d9e,_0x15c4e6=_0x3e7d9e[_0x3f4abb(0x23c)],_0x21bb01={'memberId':this[_0x3f4abb(0x22d)][_0x3f4abb(0x1fb)]()[_0x3f4abb(0x24a)],'unitId':_0x4ffec5,'threadId':_0x15c4e6,'solved':_0x3e7d9e['resolved']?I[_0x3f4abb(0x222)]:I['OpenOrReOpen']},_0x20c387=await this[_0x3f4abb(0x209)]['post'](_0x3f4abb(0x1fc)+_0x4ffec5+_0x3f4abb(0x226),{'body':_0x21bb01});return!_0x20c387[_0x3f4abb(0x236)][_0x3f4abb(0x244)]||_0x20c387[_0x3f4abb(0x236)][_0x3f4abb(0x244)]['code']===0x1;}async[_0x284a3e(0x21f)](_0x35645e,_0x264c62,_0x1cb8c5,_0x3c85bf){const _0xc745a2=_0x284a3e,_0x55d9a2={'memberId':(await this['_sessionService'][_0xc745a2(0x210)](_0x35645e))[_0xc745a2(0x233)](),'threadId':_0x1cb8c5,'replyId':_0x3c85bf,'unitId':_0x35645e},_0x5bcec3=await this[_0xc745a2(0x209)][_0xc745a2(0x239)](_0xc745a2(0x1fc)+_0x35645e+'/delete',{'body':_0x55d9a2});return!_0x5bcec3[_0xc745a2(0x236)][_0xc745a2(0x244)]||_0x5bcec3[_0xc745a2(0x236)]['error']['code']===0x1;}async[_0x284a3e(0x221)](_0x28f1b1,_0x5339df,_0x4c0ed6){const _0xb8870c=_0x284a3e,_0x1b642b={'unitId':_0x28f1b1,'threadId':_0x4c0ed6},_0x43b89b=await this[_0xb8870c(0x209)][_0xb8870c(0x239)](_0xb8870c(0x1fc)+_0x28f1b1+_0xb8870c(0x24c),{'body':_0x1b642b}),_0x5b0677=_0x4c0ed6[_0xb8870c(0x218)](_0x4c909d=>ee(_0x43b89b['body'][_0xb8870c(0x204)][_0x4c909d],_0x28f1b1,_0x5339df))[_0xb8870c(0x1f3)](Boolean);return Object['values'](_0x43b89b[_0xb8870c(0x236)][_0xb8870c(0x246)])[_0xb8870c(0x234)](_0x50f4f5=>{const _0x93a4fd=_0xb8870c;this[_0x93a4fd(0x22d)][_0x93a4fd(0x214)](_0x50f4f5);}),_0x5b0677;}[_0x284a3e(0x21d)](_0x151e44){return{'id':_0x151e44['id'],'threadId':_0x151e44['threadId'],'ref':_0x151e44['ref']};}};S=Q([b(0x0,_0x345b5f(_0x57d2ba)),b(0x1,_0x345b5f(_0x597ce3)),b(0x2,_0x345b5f(_0x537a40))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x468790,_0xfb0f7a,_0x132a21,_0x513f0f)=>{for(var _0x1ed0f6=_0x513f0f>0x1?void 0x0:_0x513f0f?re(_0xfb0f7a,_0x132a21):_0xfb0f7a,_0x1d2638=_0x468790['length']-0x1,_0x410504;_0x1d2638>=0x0;_0x1d2638--)(_0x410504=_0x468790[_0x1d2638])&&(_0x1ed0f6=_0x410504(_0x1ed0f6)||_0x1ed0f6);return _0x1ed0f6;},M=(_0x4ce5d0,_0x20d349)=>(_0x2932d6,_0xb4285d)=>_0x20d349(_0x2932d6,_0xb4285d,_0x4ce5d0);let f=class extends _0x443fef{constructor(_0x2b8383,_0x943c26){const _0x4aef81=_0x284a3e;super(),this[_0x4aef81(0x1ed)]=_0x2b8383,this[_0x4aef81(0x219)]=_0x943c26,this[_0x4aef81(0x1ee)]();}[_0x284a3e(0x1ee)](){const _0x181bea=_0x284a3e;this[_0x181bea(0x1ed)][_0x181bea(0x1f8)]=this[_0x181bea(0x219)],this[_0x181bea(0x1ed)][_0x181bea(0x20b)]=!0x1;}};f=te([M(0x0,_0xc3e1e6),M(0x1,_0x345b5f(S))],f);var se=Object[_0x284a3e(0x23a)],oe=Object[_0x284a3e(0x228)],ne=(_0x5bcdda,_0x538b67,_0x4dc43f)=>_0x538b67 in _0x5bcdda?se(_0x5bcdda,_0x538b67,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4dc43f}):_0x5bcdda[_0x538b67]=_0x4dc43f,ie=(_0x22c4a8,_0xc5e7bd,_0x4131a7,_0x4a9cc1)=>{const _0x36483b=_0x284a3e;for(var _0x363063=_0x4a9cc1>0x1?void 0x0:_0x4a9cc1?oe(_0xc5e7bd,_0x4131a7):_0xc5e7bd,_0x2f14ac=_0x22c4a8[_0x36483b(0x224)]-0x1,_0x4d0a6b;_0x2f14ac>=0x0;_0x2f14ac--)(_0x4d0a6b=_0x22c4a8[_0x2f14ac])&&(_0x363063=_0x4d0a6b(_0x363063)||_0x363063);return _0x363063;},N=(_0x55ac22,_0x157760)=>(_0x54aaaa,_0x3ff0e2)=>_0x157760(_0x54aaaa,_0x3ff0e2,_0x55ac22),$=(_0x4e0a74,_0x1aaee4,_0x4b1f57)=>ne(_0x4e0a74,typeof _0x1aaee4!='symbol'?_0x1aaee4+'':_0x1aaee4,_0x4b1f57);let g=class extends _0x1fd8ea{constructor(_0xde71ef=O,_0x38f0d0,_0x33c7d2){const _0x3577fd=_0x284a3e;super(),this[_0x3577fd(0x213)]=_0xde71ef,this[_0x3577fd(0x232)]=_0x38f0d0,this[_0x3577fd(0x248)]=_0x33c7d2;const {..._0x45b86f}=_0x58aefb({},O,this[_0x3577fd(0x213)]);this[_0x3577fd(0x248)][_0x3577fd(0x240)](z,_0x45b86f);}[_0x284a3e(0x1fd)](){[[S],[f],[_]]['forEach'](_0x2af147=>{const _0xf58ec8=_0x358d;this[_0xf58ec8(0x232)][_0xf58ec8(0x242)](_0x2af147);});}[_0x284a3e(0x1ec)](){const _0x5af11c=_0x284a3e;this['_injector'][_0x5af11c(0x22a)](f),this[_0x5af11c(0x232)][_0x5af11c(0x22a)](_);}};$(g,_0x284a3e(0x1f1),W),$(g,_0x284a3e(0x1ef),_0x39a8f1['UNIVER_UNKNOWN']),g=ie([_0x5609cc(_0x23f049,_0x192bbc,_0x5c80ab),N(0x1,_0x345b5f(_0x362af1)),N(0x2,_0x1ed401)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x284a3e=_0x358d;(function(_0x5cc712,_0x2187a0){const _0x24203b=_0x358d,_0x3a3e5d=_0x5cc712();while(!![]){try{const _0x122a4c=-parseInt(_0x24203b(0x201))/0x1+-parseInt(_0x24203b(0x230))/0x2+parseInt(_0x24203b(0x205))/0x3*(parseInt(_0x24203b(0x1fa))/0x4)+parseInt(_0x24203b(0x22e))/0x5*(-parseInt(_0x24203b(0x22b))/0x6)+parseInt(_0x24203b(0x241))/0x7+parseInt(_0x24203b(0x249))/0x8+parseInt(_0x24203b(0x21c))/0x9*(parseInt(_0x24203b(0x23b))/0xa);if(_0x122a4c===_0x2187a0)break;else _0x3a3e5d['push'](_0x3a3e5d['shift']());}catch(_0x2704dd){_0x3a3e5d['push'](_0x3a3e5d['shift']());}}}(_0x5a56,0xaaf62));import{CommentService as _0x8f2b46,CollaborationSessionService as _0x537a40,UniverCollaborationClientPlugin as _0x192bbc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c80ab}from'@univerjs-pro/license';import{dayjs as _0x2caec2,UserManagerService as _0x597ce3,Inject as _0x345b5f,Injector as _0x362af1,Disposable as _0x443fef,CustomRangeType as _0x3119b5,UniverInstanceType as _0x39a8f1,DependentOn as _0x5609cc,IConfigService as _0x1ed401,Plugin as _0x1fd8ea,merge as _0x58aefb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23f049}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xf61861,IThreadCommentDataSourceService as _0xc3e1e6}from'@univerjs/thread-comment';function _0x358d(_0x32244d,_0x4b642b){const _0x5a5654=_0x5a56();return _0x358d=function(_0x358d59,_0x462227){_0x358d59=_0x358d59-0x1eb;let _0x19a2fd=_0x5a5654[_0x358d59];return _0x19a2fd;},_0x358d(_0x32244d,_0x4b642b);}import{bufferTime as _0x4ba7d2}from'rxjs';import{HTTPService as _0x57d2ba}from'@univerjs/network';const W=_0x284a3e(0x23d);var I=(_0x204fde=>(_0x204fde[_0x204fde[_0x284a3e(0x1f6)]=0x0]='OpenOrReOpen',_0x204fde[_0x204fde[_0x284a3e(0x222)]=0x1]=_0x284a3e(0x222),_0x204fde[_0x204fde[_0x284a3e(0x22c)]=-0x1]=_0x284a3e(0x22c),_0x204fde))(I||{}),v=(_0xba5322=>(_0xba5322[_0xba5322[_0x284a3e(0x220)]=0x0]=_0x284a3e(0x220),_0xba5322[_0xba5322[_0x284a3e(0x212)]=0x1]=_0x284a3e(0x212),_0xba5322[_0xba5322[_0x284a3e(0x23f)]=0x2]=_0x284a3e(0x23f),_0xba5322[_0xba5322[_0x284a3e(0x245)]=0x3]='Edit',_0xba5322[_0xba5322[_0x284a3e(0x21a)]=0x4]=_0x284a3e(0x21a),_0xba5322[_0xba5322[_0x284a3e(0x247)]=0x5]=_0x284a3e(0x247),_0xba5322[_0xba5322[_0x284a3e(0x22c)]=-0x1]=_0x284a3e(0x22c),_0xba5322))(v||{});const y=_0x354da2=>_0x2caec2(new Date(+_0x354da2))[_0x284a3e(0x217)](_0x284a3e(0x22f)),B=async(_0x1c8dc5,_0x5117b9)=>{const _0x795a87=_0x284a3e,_0x2f1424=_0x1c8dc5[_0x795a87(0x22a)](_0x597ce3),_0x3ce25a=_0x1c8dc5[_0x795a87(0x22a)](_0x57d2ba);_0x5117b9[_0x795a87(0x234)](_0x3af781=>{const _0x586140=_0x795a87;_0x2f1424[_0x586140(0x200)](_0x3af781)&&_0x5117b9['delete'](_0x3af781);}),_0x5117b9[_0x795a87(0x237)]&&(await _0x3ce25a['get'](_0x795a87(0x24d),{'params':{'userIDs':[..._0x5117b9]}}))[_0x795a87(0x236)][_0x795a87(0x246)][_0x795a87(0x234)](_0xc95a93=>{_0xc95a93&&_0x2f1424['addUser'](_0xc95a93);});};var K=Object[_0x284a3e(0x228)],V=(_0x2bf3c6,_0x27e314,_0x2db744,_0xf9ac0)=>{const _0xe590dc=_0x284a3e;for(var _0x2066f7=_0xf9ac0>0x1?void 0x0:_0xf9ac0?K(_0x27e314,_0x2db744):_0x27e314,_0x5e699b=_0x2bf3c6[_0xe590dc(0x224)]-0x1,_0x4cd071;_0x5e699b>=0x0;_0x5e699b--)(_0x4cd071=_0x2bf3c6[_0x5e699b])&&(_0x2066f7=_0x4cd071(_0x2066f7)||_0x2066f7);return _0x2066f7;},p=(_0x412ebf,_0x57c9e6)=>(_0x15e8fb,_0x4a8de6)=>_0x57c9e6(_0x15e8fb,_0x4a8de6,_0x412ebf);let _=class extends _0x443fef{constructor(_0x2b61c9,_0x455239,_0x324ee2,_0x18ab5a){const _0x8e79fb=_0x284a3e;super(),this['_commentService']=_0x2b61c9,this[_0x8e79fb(0x216)]=_0x455239,this['_userService']=_0x324ee2,this['_injector']=_0x18ab5a,this[_0x8e79fb(0x227)](),this['_initUserSync']();}['_initUserSync'](){const _0x295a5a=_0x284a3e;this[_0x295a5a(0x1f5)](this[_0x295a5a(0x216)]['commentUpdate$'][_0x295a5a(0x1f2)](_0x4ba7d2(0x10))['subscribe'](_0x270d58=>{const _0x13c95f=_0x295a5a,_0x36b6ff=new Set();_0x270d58['forEach'](_0x55cfc9=>{const _0xac59f=_0x358d;switch(_0x55cfc9[_0xac59f(0x1ef)]){case _0xac59f(0x242):{const _0x5bb433=_0x55cfc9[_0xac59f(0x1f9)]['personId'];_0x36b6ff[_0xac59f(0x242)](_0x5bb433);break;}}}),B(this[_0x13c95f(0x232)],_0x36b6ff);}));}['_init'](){const _0x42b002=_0x284a3e;this[_0x42b002(0x1f5)](this[_0x42b002(0x1f0)][_0x42b002(0x223)][_0x42b002(0x206)](async _0x205927=>{const _0x53c73d=_0x42b002;var _0x109814,_0x5f0e1f,_0x18cb13,_0x1ca944;const _0x4a3c94=(_0x109814=this[_0x53c73d(0x216)][_0x53c73d(0x1fe)](_0x205927['unitId'])[_0x53c73d(0x203)](_0x385062=>_0x385062[_0x53c73d(0x23c)]===_0x205927['threadId']))==null?void 0x0:_0x109814[_0x53c73d(0x229)];if(!_0x4a3c94)return;const {unitId:_0x2ae4b9,subUnitId:_0x3de7e8}=_0x4a3c94;switch(_0x205927[_0x53c73d(0x238)]&&this[_0x53c73d(0x22d)][_0x53c73d(0x214)](_0x205927[_0x53c73d(0x238)]),_0x205927['type']){case v['Add']:break;case v[_0x53c73d(0x23f)]:{this[_0x53c73d(0x216)]['addComment'](_0x2ae4b9,_0x3de7e8,{'unitId':_0x2ae4b9,'subUnitId':_0x3de7e8,'ref':'','id':_0x205927[_0x53c73d(0x1f7)],'dT':y(+_0x205927[_0x53c73d(0x215)]),'threadId':_0x205927[_0x53c73d(0x23c)],'personId':(_0x18cb13=(_0x5f0e1f=_0x205927['user'])==null?void 0x0:_0x5f0e1f['userID'])!=null?_0x18cb13:_0x205927[_0x53c73d(0x20f)],'text':JSON[_0x53c73d(0x21e)](_0x205927['content']),'parentId':_0x4a3c94['id']});break;}case v[_0x53c73d(0x21a)]:{const _0x10bb02=this['_threadCommentModel'][_0x53c73d(0x1ff)](_0x2ae4b9,_0x3de7e8,_0x205927[_0x53c73d(0x1f7)]);_0x10bb02&&_0x10bb02['parentId']&&this[_0x53c73d(0x216)][_0x53c73d(0x21f)](_0x2ae4b9,_0x3de7e8,_0x205927[_0x53c73d(0x1f7)]);break;}case v[_0x53c73d(0x245)]:{this['_threadCommentModel'][_0x53c73d(0x225)](_0x2ae4b9,_0x3de7e8,{'commentId':_0x205927[_0x53c73d(0x1f7)],'text':JSON[_0x53c73d(0x21e)](_0x205927[_0x53c73d(0x1eb)])});break;}case v[_0x53c73d(0x247)]:{const _0x4f560a=(_0x1ca944=this[_0x53c73d(0x216)][_0x53c73d(0x1fe)](_0x205927[_0x53c73d(0x24b)])['find'](_0x24924a=>_0x24924a['threadId']===_0x205927[_0x53c73d(0x23c)]))==null?void 0x0:_0x1ca944[_0x53c73d(0x229)];_0x4f560a&&this['_threadCommentModel']['resolveComment'](_0x2ae4b9,_0x3de7e8,_0x4f560a['id'],_0x205927[_0x53c73d(0x23e)]===I[_0x53c73d(0x222)]);break;}}}));}};_=V([p(0x0,_0x345b5f(_0x8f2b46)),p(0x1,_0x345b5f(_0xf61861)),p(0x2,_0x345b5f(_0x597ce3)),p(0x3,_0x345b5f(_0x362af1))],_);function _0x5a56(){const _0x43b034=['unitId','/list','/universer-api/user/list','content','onReady','_threadCommentDataSourceService','_initDataSource','type','_commentService','pluginName','pipe','filter','_sessionService','disposeWithMe','OpenOrReOpen','replyId','dataSource','payload','20RxCCsa','getCurrentUser','/universer-api/comment/unit/','onStarting','getUnit','getComment','getUser','986732hXJHzL','/edit','find','comments','296547YwaOCE','subscribe','stringify','rangeType','_httpService','code','syncUpdateMutationToColla','addComment','rangeId','reply','userId','requireSession','replies','Add','_config','addUser','createTimestamp','_threadCommentModel','format','map','_threadCommentDataSource','Delete','thread-comment-data-source.config','522pXlPFI','saveCommentToSnapshot','parse','deleteComment','Unknown','listComments','Solved','commentUpdate$','length','updateComment','/solved','_init','getOwnPropertyDescriptor','root','get','6gwwCVn','UNRECOGNIZED','_userService','3487630FkiCON','YYYY/MM/DD\x20HH:mm','1792324SADaXc','resolveComment','_injector','getMemberID','forEach','customRanges','body','size','user','post','defineProperty','457790FFkEgV','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','Reply','setConfig','73227iCwfPz','add','/reply','error','Edit','users','Solve','_configService','966320fVWDHK','userID'];_0x5a56=function(){return _0x43b034;};return _0x5a56();}const z=_0x284a3e(0x21b),O={};var k=Object[_0x284a3e(0x228)],Q=(_0x4e2b48,_0x4d7a70,_0x4b43b6,_0x13e7c9)=>{for(var _0x3404b5=_0x13e7c9>0x1?void 0x0:_0x13e7c9?k(_0x4d7a70,_0x4b43b6):_0x4d7a70,_0x34e796=_0x4e2b48['length']-0x1,_0x5ec6f5;_0x34e796>=0x0;_0x34e796--)(_0x5ec6f5=_0x4e2b48[_0x34e796])&&(_0x3404b5=_0x5ec6f5(_0x3404b5)||_0x3404b5);return _0x3404b5;},b=(_0x4d1264,_0x3ab4d4)=>(_0xd7209d,_0x394239)=>_0x3ab4d4(_0xd7209d,_0x394239,_0x4d1264);function X(_0x516f7f,_0x3cef51){const _0x5dc8a9=_0x284a3e,_0x6b95f7=_0x516f7f[_0x5dc8a9(0x211)][0x0];return{..._0x3cef51,'id':_0x6b95f7['replyId'],'resolved':_0x516f7f[_0x5dc8a9(0x23e)]===0x1,'dT':y(_0x6b95f7[_0x5dc8a9(0x215)]),'personId':_0x6b95f7[_0x5dc8a9(0x20f)],'threadId':_0x6b95f7[_0x5dc8a9(0x23c)]};}function ee(_0x3f7fc8,_0x35b1d4,_0x3054fe){const _0x5c8862=_0x284a3e;var _0x176bd9,_0x250b5f;if(((_0x250b5f=(_0x176bd9=_0x3f7fc8==null?void 0x0:_0x3f7fc8[_0x5c8862(0x211)])==null?void 0x0:_0x176bd9[_0x5c8862(0x224)])!=null?_0x250b5f:0x0)>0x0){const _0x5d1eaf=(_0x58c915,_0x2dffda)=>({'id':_0x58c915[_0x5c8862(0x1f7)],'threadId':_0x58c915[_0x5c8862(0x23c)],'dT':y(_0x58c915[_0x5c8862(0x215)]),'personId':_0x58c915[_0x5c8862(0x20f)],'resolved':_0x3f7fc8[_0x5c8862(0x23e)]===I['Solved'],'unitId':_0x35b1d4,'subUnitId':_0x3054fe,'text':JSON[_0x5c8862(0x21e)](_0x58c915[_0x5c8862(0x1eb)]),'parentId':_0x2dffda}),_0x1d380f=_0x5d1eaf(_0x3f7fc8[_0x5c8862(0x211)][0x0]);return{..._0x1d380f,'children':_0x3f7fc8[_0x5c8862(0x211)]['slice'](0x1)['map'](_0xa5f9fa=>_0x5d1eaf(_0xa5f9fa,_0x1d380f['id']))};}return null;}let S=class{constructor(_0x2a8f3e,_0xc002a6,_0x1e30ec){const _0x5e6199=_0x284a3e;this[_0x5e6199(0x209)]=_0x2a8f3e,this['_userService']=_0xc002a6,this['_sessionService']=_0x1e30ec;}async[_0x284a3e(0x20c)](_0x4d7f6e){const _0x290327=_0x284a3e;var _0x13299a,_0x3722b2;const {parentId:_0x470d07,unitId:_0x287fe4,text:_0x953487,threadId:_0x2e4e74}=_0x4d7f6e,_0x21e078=(_0x3722b2=(_0x13299a=_0x953487[_0x290327(0x235)])==null?void 0x0:_0x13299a[_0x290327(0x1f3)](_0x5970ac=>_0x5970ac[_0x290327(0x208)]===_0x3119b5['COMMENT'])[_0x290327(0x218)](_0x520df1=>_0x520df1[_0x290327(0x20d)]))!=null?_0x3722b2:[],_0x5268ff=JSON[_0x290327(0x207)](_0x953487),_0x5ee958=(await this[_0x290327(0x1f4)][_0x290327(0x210)](_0x287fe4))[_0x290327(0x233)]();if(_0x470d07){const _0x58a5cd={'memberId':_0x5ee958,'unitId':_0x287fe4,'content':_0x5268ff,'mention':_0x21e078,'threadId':_0x2e4e74},_0x4aaed8=(await this[_0x290327(0x209)][_0x290327(0x239)]('/universer-api/comment/unit/'+_0x287fe4+_0x290327(0x243),{'body':_0x58a5cd}))[_0x290327(0x236)][_0x290327(0x20e)];return{..._0x4d7f6e,'id':_0x4aaed8['replyId'],'dT':_0x2caec2(+_0x4aaed8['createTimestamp'])['format'](_0x290327(0x22f)),'personId':_0x4aaed8['userId']};}else{const _0x144650={'memberId':_0x5ee958,'unitId':_0x287fe4,'content':_0x5268ff,'mention':_0x21e078},_0x373464=await this['_httpService']['post'](_0x290327(0x1fc)+_0x287fe4+'/add',{'body':_0x144650});return X(_0x373464['body']['comment'],_0x4d7f6e);}}async[_0x284a3e(0x225)](_0x5d838a){const _0x1e8a33=_0x284a3e;var _0x46d587,_0x1c2f22;const {text:_0x4bfda0,unitId:_0x284991}=_0x5d838a,_0x373ebc=(_0x1c2f22=(_0x46d587=_0x4bfda0[_0x1e8a33(0x235)])==null?void 0x0:_0x46d587[_0x1e8a33(0x1f3)](_0x593b6c=>_0x593b6c[_0x1e8a33(0x208)]===_0x3119b5['COMMENT'])[_0x1e8a33(0x218)](_0x1dad3c=>_0x1dad3c['rangeId']))!=null?_0x1c2f22:[],_0x550e8a=JSON[_0x1e8a33(0x207)](_0x4bfda0),_0x19b9a6=_0x5d838a['threadId'],_0x3a9855=_0x5d838a['id'],_0x2a76d5={'memberId':(await this[_0x1e8a33(0x1f4)][_0x1e8a33(0x210)](_0x284991))[_0x1e8a33(0x233)](),'unitId':_0x284991,'threadId':_0x19b9a6,'mention':_0x373ebc,'content':_0x550e8a,'replyId':_0x3a9855},_0x444a75=await this['_httpService'][_0x1e8a33(0x239)]('/universer-api/comment/unit/'+_0x284991+_0x1e8a33(0x202),{'body':_0x2a76d5});return!_0x444a75[_0x1e8a33(0x236)][_0x1e8a33(0x244)]||_0x444a75[_0x1e8a33(0x236)]['error'][_0x1e8a33(0x20a)]===0x1;}async[_0x284a3e(0x231)](_0x3e7d9e){const _0x3f4abb=_0x284a3e,{unitId:_0x4ffec5}=_0x3e7d9e,_0x15c4e6=_0x3e7d9e[_0x3f4abb(0x23c)],_0x21bb01={'memberId':this[_0x3f4abb(0x22d)][_0x3f4abb(0x1fb)]()[_0x3f4abb(0x24a)],'unitId':_0x4ffec5,'threadId':_0x15c4e6,'solved':_0x3e7d9e['resolved']?I[_0x3f4abb(0x222)]:I['OpenOrReOpen']},_0x20c387=await this[_0x3f4abb(0x209)]['post'](_0x3f4abb(0x1fc)+_0x4ffec5+_0x3f4abb(0x226),{'body':_0x21bb01});return!_0x20c387[_0x3f4abb(0x236)][_0x3f4abb(0x244)]||_0x20c387[_0x3f4abb(0x236)][_0x3f4abb(0x244)]['code']===0x1;}async[_0x284a3e(0x21f)](_0x35645e,_0x264c62,_0x1cb8c5,_0x3c85bf){const _0xc745a2=_0x284a3e,_0x55d9a2={'memberId':(await this['_sessionService'][_0xc745a2(0x210)](_0x35645e))[_0xc745a2(0x233)](),'threadId':_0x1cb8c5,'replyId':_0x3c85bf,'unitId':_0x35645e},_0x5bcec3=await this[_0xc745a2(0x209)][_0xc745a2(0x239)](_0xc745a2(0x1fc)+_0x35645e+'/delete',{'body':_0x55d9a2});return!_0x5bcec3[_0xc745a2(0x236)][_0xc745a2(0x244)]||_0x5bcec3[_0xc745a2(0x236)]['error']['code']===0x1;}async[_0x284a3e(0x221)](_0x28f1b1,_0x5339df,_0x4c0ed6){const _0xb8870c=_0x284a3e,_0x1b642b={'unitId':_0x28f1b1,'threadId':_0x4c0ed6},_0x43b89b=await this[_0xb8870c(0x209)][_0xb8870c(0x239)](_0xb8870c(0x1fc)+_0x28f1b1+_0xb8870c(0x24c),{'body':_0x1b642b}),_0x5b0677=_0x4c0ed6[_0xb8870c(0x218)](_0x4c909d=>ee(_0x43b89b['body'][_0xb8870c(0x204)][_0x4c909d],_0x28f1b1,_0x5339df))[_0xb8870c(0x1f3)](Boolean);return Object['values'](_0x43b89b[_0xb8870c(0x236)][_0xb8870c(0x246)])[_0xb8870c(0x234)](_0x50f4f5=>{const _0x93a4fd=_0xb8870c;this[_0x93a4fd(0x22d)][_0x93a4fd(0x214)](_0x50f4f5);}),_0x5b0677;}[_0x284a3e(0x21d)](_0x151e44){return{'id':_0x151e44['id'],'threadId':_0x151e44['threadId'],'ref':_0x151e44['ref']};}};S=Q([b(0x0,_0x345b5f(_0x57d2ba)),b(0x1,_0x345b5f(_0x597ce3)),b(0x2,_0x345b5f(_0x537a40))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x468790,_0xfb0f7a,_0x132a21,_0x513f0f)=>{for(var _0x1ed0f6=_0x513f0f>0x1?void 0x0:_0x513f0f?re(_0xfb0f7a,_0x132a21):_0xfb0f7a,_0x1d2638=_0x468790['length']-0x1,_0x410504;_0x1d2638>=0x0;_0x1d2638--)(_0x410504=_0x468790[_0x1d2638])&&(_0x1ed0f6=_0x410504(_0x1ed0f6)||_0x1ed0f6);return _0x1ed0f6;},M=(_0x4ce5d0,_0x20d349)=>(_0x2932d6,_0xb4285d)=>_0x20d349(_0x2932d6,_0xb4285d,_0x4ce5d0);let f=class extends _0x443fef{constructor(_0x2b8383,_0x943c26){const _0x4aef81=_0x284a3e;super(),this[_0x4aef81(0x1ed)]=_0x2b8383,this[_0x4aef81(0x219)]=_0x943c26,this[_0x4aef81(0x1ee)]();}[_0x284a3e(0x1ee)](){const _0x181bea=_0x284a3e;this[_0x181bea(0x1ed)][_0x181bea(0x1f8)]=this[_0x181bea(0x219)],this[_0x181bea(0x1ed)][_0x181bea(0x20b)]=!0x1;}};f=te([M(0x0,_0xc3e1e6),M(0x1,_0x345b5f(S))],f);var se=Object[_0x284a3e(0x23a)],oe=Object[_0x284a3e(0x228)],ne=(_0x5bcdda,_0x538b67,_0x4dc43f)=>_0x538b67 in _0x5bcdda?se(_0x5bcdda,_0x538b67,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4dc43f}):_0x5bcdda[_0x538b67]=_0x4dc43f,ie=(_0x22c4a8,_0xc5e7bd,_0x4131a7,_0x4a9cc1)=>{const _0x36483b=_0x284a3e;for(var _0x363063=_0x4a9cc1>0x1?void 0x0:_0x4a9cc1?oe(_0xc5e7bd,_0x4131a7):_0xc5e7bd,_0x2f14ac=_0x22c4a8[_0x36483b(0x224)]-0x1,_0x4d0a6b;_0x2f14ac>=0x0;_0x2f14ac--)(_0x4d0a6b=_0x22c4a8[_0x2f14ac])&&(_0x363063=_0x4d0a6b(_0x363063)||_0x363063);return _0x363063;},N=(_0x55ac22,_0x157760)=>(_0x54aaaa,_0x3ff0e2)=>_0x157760(_0x54aaaa,_0x3ff0e2,_0x55ac22),$=(_0x4e0a74,_0x1aaee4,_0x4b1f57)=>ne(_0x4e0a74,typeof _0x1aaee4!='symbol'?_0x1aaee4+'':_0x1aaee4,_0x4b1f57);let g=class extends _0x1fd8ea{constructor(_0xde71ef=O,_0x38f0d0,_0x33c7d2){const _0x3577fd=_0x284a3e;super(),this[_0x3577fd(0x213)]=_0xde71ef,this[_0x3577fd(0x232)]=_0x38f0d0,this[_0x3577fd(0x248)]=_0x33c7d2;const {..._0x45b86f}=_0x58aefb({},O,this[_0x3577fd(0x213)]);this[_0x3577fd(0x248)][_0x3577fd(0x240)](z,_0x45b86f);}[_0x284a3e(0x1fd)](){[[S],[f],[_]]['forEach'](_0x2af147=>{const _0xf58ec8=_0x358d;this[_0xf58ec8(0x232)][_0xf58ec8(0x242)](_0x2af147);});}[_0x284a3e(0x1ec)](){const _0x5af11c=_0x284a3e;this['_injector'][_0x5af11c(0x22a)](f),this[_0x5af11c(0x232)][_0x5af11c(0x22a)](_);}};$(g,_0x284a3e(0x1f1),W),$(g,_0x284a3e(0x1ef),_0x39a8f1['UNIVER_UNKNOWN']),g=ie([_0x5609cc(_0x23f049,_0x192bbc,_0x5c80ab),N(0x1,_0x345b5f(_0x362af1)),N(0x2,_0x1ed401)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x24ea(){const _0x4bb3a6=['user','syncUpdateMutationToColla','UNIVER_UNKNOWN','@univerjs/thread-comment','map','Solve','solved','_commentService','UserManagerService','comments','dayjs','content','DependentOn','addUser','513WvFbKP','root','@univerjs/core','UniverThreadCommentUIPlugin','5zfCoVg','thread-comment-data-source.config','saveCommentToSnapshot','userID','deleteComment','ThreadCommentModel','error','bufferTime','_config','get','getUnit','_threadCommentDataSource','/universer-api/comment/unit/','/universer-api/user/list','values','replyId','addComment','personId','stringify','code','_init','object','Plugin','@univerjs/network','/list','16016264EaGIeT','type','UniverProCollaborationClient','UniverThreadComment','resolved','UniverNetwork','parentId','customRanges','pipe','disposeWithMe','Disposable','amd','UniverThreadCommentUi','userId','rangeId','function','_injector','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','threadId','onReady','getUser','108070oExXVr','subscribe','COMMENT','onStarting','UniverProLicense','symbol','UniverInstanceType','103216HjuJZL','YYYY/MM/DD\x20HH:mm','requireSession','_initDataSource','dataSource','reply','UniverCollaborationClientPlugin','/delete','@univerjs-pro/collaboration-client','replies','Module','299422zAuWzZ','2212070dtxzQz','Injector','UniverCore','Reply','delete','parse','UNRECOGNIZED','users','size','unitId','updateComment','merge','format','rxjs','resolveComment','_sessionService','setConfig','getComment','_threadCommentModel','defineProperty','/reply','_initUserSync','_userService','Solved','post','toStringTag','getOwnPropertyDescriptor','find','UniverThreadCommentDataSourcePlugin','length','116ITtFml','@univerjs-pro/license','Unknown','listComments','getMemberID','UniverProThreadCommentDatasource','779556ScawLz','exports','payload','/add','Inject','Delete','7rvNalO','CollaborationSessionService','UniverLicensePlugin','_threadCommentDataSourceService','IThreadCommentDataSourceService','filter','createTimestamp','body','Edit','slice','_httpService','commentUpdate$','HTTPService','forEach','@univerjs/thread-comment-ui','1072734pWtMWJ','OpenOrReOpen','add','_configService'];_0x24ea=function(){return _0x4bb3a6;};return _0x24ea();}function _0x5095(_0x5eb53c,_0x3f8e57){const _0x24ea7c=_0x24ea();return _0x5095=function(_0x5095b8,_0x56cf44){_0x5095b8=_0x5095b8-0x14a;let _0x3ed70f=_0x24ea7c[_0x5095b8];return _0x3ed70f;},_0x5095(_0x5eb53c,_0x3f8e57);}(function(_0x3f33f1,_0x4f4189){const _0x1d5cd1=_0x5095,_0x257d6e=_0x3f33f1();while(!![]){try{const _0x5d75d3=parseInt(_0x1d5cd1(0x177))/0x1*(-parseInt(_0x1d5cd1(0x1b9))/0x2)+parseInt(_0x1d5cd1(0x14c))/0x3+parseInt(_0x1d5cd1(0x1d8))/0x4*(parseInt(_0x1d5cd1(0x1a7))/0x5)+parseInt(_0x1d5cd1(0x161))/0x6*(-parseInt(_0x1d5cd1(0x152))/0x7)+-parseInt(_0x1d5cd1(0x1ae))/0x8*(parseInt(_0x1d5cd1(0x173))/0x9)+-parseInt(_0x1d5cd1(0x1ba))/0xa+parseInt(_0x1d5cd1(0x190))/0xb;if(_0x5d75d3===_0x4f4189)break;else _0x257d6e['push'](_0x257d6e['shift']());}catch(_0x4d2f8b){_0x257d6e['push'](_0x257d6e['shift']());}}}(_0x24ea,0x6ffdd),function(_0x1bfe0b,_0x491db7){const _0x51ec63=_0x5095;typeof exports==_0x51ec63(0x18c)&&typeof module<'u'?_0x491db7(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==_0x51ec63(0x19f)&&define[_0x51ec63(0x19b)]?define([_0x51ec63(0x14d),_0x51ec63(0x1b6),_0x51ec63(0x1d9),_0x51ec63(0x175),_0x51ec63(0x160),_0x51ec63(0x168),_0x51ec63(0x1c7),_0x51ec63(0x18e)],_0x491db7):(_0x1bfe0b=typeof globalThis<'u'?globalThis:_0x1bfe0b||self,_0x491db7(_0x1bfe0b[_0x51ec63(0x14b)]={},_0x1bfe0b[_0x51ec63(0x192)],_0x1bfe0b[_0x51ec63(0x1ab)],_0x1bfe0b[_0x51ec63(0x1bc)],_0x1bfe0b[_0x51ec63(0x19c)],_0x1bfe0b[_0x51ec63(0x193)],_0x1bfe0b[_0x51ec63(0x1c7)],_0x1bfe0b[_0x51ec63(0x195)]));}(this,function(_0x3fe854,_0x24a2e1,_0x20b60f,_0x4f65f4,_0x58350f,_0x259153,_0x559209,_0x2b0841){'use strict';const _0x3d4cd0=_0x5095;const _0x5cae78=_0x3d4cd0(0x1a2);var _0x6d444a=(_0xc196b4=>(_0xc196b4[_0xc196b4[_0x3d4cd0(0x162)]=0x0]=_0x3d4cd0(0x162),_0xc196b4[_0xc196b4[_0x3d4cd0(0x1d1)]=0x1]=_0x3d4cd0(0x1d1),_0xc196b4[_0xc196b4[_0x3d4cd0(0x1c0)]=-0x1]=_0x3d4cd0(0x1c0),_0xc196b4))(_0x6d444a||{}),_0x4fe60f=(_0x320add=>(_0x320add[_0x320add[_0x3d4cd0(0x1da)]=0x0]=_0x3d4cd0(0x1da),_0x320add[_0x320add[_0x3d4cd0(0x1a3)]=0x1]=_0x3d4cd0(0x1a3),_0x320add[_0x320add[_0x3d4cd0(0x1bd)]=0x2]=_0x3d4cd0(0x1bd),_0x320add[_0x320add['Edit']=0x3]=_0x3d4cd0(0x15a),_0x320add[_0x320add['Delete']=0x4]=_0x3d4cd0(0x151),_0x320add[_0x320add[_0x3d4cd0(0x16a)]=0x5]='Solve',_0x320add[_0x320add[_0x3d4cd0(0x1c0)]=-0x1]=_0x3d4cd0(0x1c0),_0x320add))(_0x4fe60f||{});const _0x427747=_0x3ad04b=>_0x4f65f4[_0x3d4cd0(0x16f)](new Date(+_0x3ad04b))['format'](_0x3d4cd0(0x1af)),_0x249837=async(_0x3c264e,_0x4cd7d8)=>{const _0x320339=_0x3d4cd0,_0x1081a6=_0x3c264e[_0x320339(0x180)](_0x4f65f4[_0x320339(0x16d)]),_0x32a2ec=_0x3c264e[_0x320339(0x180)](_0x2b0841[_0x320339(0x15e)]);_0x4cd7d8[_0x320339(0x15f)](_0x2af5ac=>{const _0x4f4a8f=_0x320339;_0x1081a6[_0x4f4a8f(0x1a6)](_0x2af5ac)&&_0x4cd7d8[_0x4f4a8f(0x1be)](_0x2af5ac);}),_0x4cd7d8[_0x320339(0x1c2)]&&(await _0x32a2ec[_0x320339(0x180)](_0x320339(0x184),{'params':{'userIDs':[..._0x4cd7d8]}}))[_0x320339(0x159)]['users']['forEach'](_0x454374=>{const _0x426bac=_0x320339;_0x454374&&_0x1081a6[_0x426bac(0x172)](_0x454374);});};var _0x2cf67e=Object[_0x3d4cd0(0x1d4)],_0x2cf0ea=(_0x6400fd,_0xd628a0,_0x3bd410,_0x31f78c)=>{const _0x9c9845=_0x3d4cd0;for(var _0x698a04=_0x31f78c>0x1?void 0x0:_0x31f78c?_0x2cf67e(_0xd628a0,_0x3bd410):_0xd628a0,_0x4ca83e=_0x6400fd[_0x9c9845(0x1d7)]-0x1,_0x1d50d1;_0x4ca83e>=0x0;_0x4ca83e--)(_0x1d50d1=_0x6400fd[_0x4ca83e])&&(_0x698a04=_0x1d50d1(_0x698a04)||_0x698a04);return _0x698a04;},_0x44e76a=(_0x1852e4,_0x563160)=>(_0x36ab10,_0x5aa0dc)=>_0x563160(_0x36ab10,_0x5aa0dc,_0x1852e4);let _0x33b826=class extends _0x4f65f4[_0x3d4cd0(0x19a)]{constructor(_0xea420c,_0x5a9637,_0x2bee23,_0x3da266){const _0x372027=_0x3d4cd0;super(),this[_0x372027(0x16c)]=_0xea420c,this[_0x372027(0x1cc)]=_0x5a9637,this[_0x372027(0x1d0)]=_0x2bee23,this[_0x372027(0x1a0)]=_0x3da266,this[_0x372027(0x18b)](),this[_0x372027(0x1cf)]();}[_0x3d4cd0(0x1cf)](){const _0x1daf43=_0x3d4cd0;this[_0x1daf43(0x199)](this['_threadCommentModel'][_0x1daf43(0x15d)][_0x1daf43(0x198)](_0x559209[_0x1daf43(0x17e)](0x10))['subscribe'](_0x35098f=>{const _0x501bed=_0x1daf43,_0x6176d3=new Set();_0x35098f[_0x501bed(0x15f)](_0x76191=>{const _0x268913=_0x501bed;switch(_0x76191[_0x268913(0x191)]){case _0x268913(0x163):{const _0x4e8b64=_0x76191[_0x268913(0x14e)][_0x268913(0x188)];_0x6176d3[_0x268913(0x163)](_0x4e8b64);break;}}}),_0x249837(this['_injector'],_0x6176d3);}));}[_0x3d4cd0(0x18b)](){const _0x755702=_0x3d4cd0;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x755702(0x1a8)](async _0x4c0b09=>{const _0x126e57=_0x755702;var _0x2d7065,_0x5793c5,_0x182ae8,_0x561141;const _0x2ed94d=(_0x2d7065=this['_threadCommentModel']['getUnit'](_0x4c0b09[_0x126e57(0x1c3)])[_0x126e57(0x1d5)](_0x2a9ffc=>_0x2a9ffc[_0x126e57(0x1a4)]===_0x4c0b09[_0x126e57(0x1a4)]))==null?void 0x0:_0x2d7065[_0x126e57(0x174)];if(!_0x2ed94d)return;const {unitId:_0x4461bd,subUnitId:_0x4a169e}=_0x2ed94d;switch(_0x4c0b09[_0x126e57(0x165)]&&this['_userService']['addUser'](_0x4c0b09[_0x126e57(0x165)]),_0x4c0b09[_0x126e57(0x191)]){case _0x4fe60f[_0x126e57(0x1a3)]:break;case _0x4fe60f[_0x126e57(0x1bd)]:{this[_0x126e57(0x1cc)][_0x126e57(0x187)](_0x4461bd,_0x4a169e,{'unitId':_0x4461bd,'subUnitId':_0x4a169e,'ref':'','id':_0x4c0b09[_0x126e57(0x186)],'dT':_0x427747(+_0x4c0b09[_0x126e57(0x158)]),'threadId':_0x4c0b09[_0x126e57(0x1a4)],'personId':(_0x182ae8=(_0x5793c5=_0x4c0b09[_0x126e57(0x165)])==null?void 0x0:_0x5793c5['userID'])!=null?_0x182ae8:_0x4c0b09[_0x126e57(0x19d)],'text':JSON['parse'](_0x4c0b09[_0x126e57(0x170)]),'parentId':_0x2ed94d['id']});break;}case _0x4fe60f[_0x126e57(0x151)]:{const _0x4bf6e4=this[_0x126e57(0x1cc)][_0x126e57(0x1cb)](_0x4461bd,_0x4a169e,_0x4c0b09[_0x126e57(0x186)]);_0x4bf6e4&&_0x4bf6e4[_0x126e57(0x196)]&&this[_0x126e57(0x1cc)][_0x126e57(0x17b)](_0x4461bd,_0x4a169e,_0x4c0b09[_0x126e57(0x186)]);break;}case _0x4fe60f[_0x126e57(0x15a)]:{this[_0x126e57(0x1cc)][_0x126e57(0x1c4)](_0x4461bd,_0x4a169e,{'commentId':_0x4c0b09[_0x126e57(0x186)],'text':JSON[_0x126e57(0x1bf)](_0x4c0b09[_0x126e57(0x170)])});break;}case _0x4fe60f['Solve']:{const _0xdd327d=(_0x561141=this[_0x126e57(0x1cc)][_0x126e57(0x181)](_0x4c0b09[_0x126e57(0x1c3)])['find'](_0x2853b5=>_0x2853b5[_0x126e57(0x1a4)]===_0x4c0b09[_0x126e57(0x1a4)]))==null?void 0x0:_0x561141[_0x126e57(0x174)];_0xdd327d&&this[_0x126e57(0x1cc)][_0x126e57(0x1c8)](_0x4461bd,_0x4a169e,_0xdd327d['id'],_0x4c0b09['solved']===_0x6d444a['Solved']);break;}}}));}};_0x33b826=_0x2cf0ea([_0x44e76a(0x0,_0x4f65f4['Inject'](_0x24a2e1['CommentService'])),_0x44e76a(0x1,_0x4f65f4[_0x3d4cd0(0x150)](_0x259153[_0x3d4cd0(0x17c)])),_0x44e76a(0x2,_0x4f65f4['Inject'](_0x4f65f4[_0x3d4cd0(0x16d)])),_0x44e76a(0x3,_0x4f65f4['Inject'](_0x4f65f4[_0x3d4cd0(0x1bb)]))],_0x33b826);const _0x222ebd=_0x3d4cd0(0x178),_0x2d63e7={};var _0x2903bd=Object[_0x3d4cd0(0x1d4)],_0x1ba843=(_0x25c78e,_0x14f1ef,_0x500044,_0x59b123)=>{const _0x392a21=_0x3d4cd0;for(var _0x1befb2=_0x59b123>0x1?void 0x0:_0x59b123?_0x2903bd(_0x14f1ef,_0x500044):_0x14f1ef,_0x4dec4b=_0x25c78e[_0x392a21(0x1d7)]-0x1,_0x2fdc7d;_0x4dec4b>=0x0;_0x4dec4b--)(_0x2fdc7d=_0x25c78e[_0x4dec4b])&&(_0x1befb2=_0x2fdc7d(_0x1befb2)||_0x1befb2);return _0x1befb2;},_0x1a539a=(_0x26e5ee,_0x33cb85)=>(_0x40e950,_0x3290b1)=>_0x33cb85(_0x40e950,_0x3290b1,_0x26e5ee);function _0x497a3a(_0x50ff24,_0xc299d3){const _0x4a8d44=_0x3d4cd0,_0x36d565=_0x50ff24[_0x4a8d44(0x1b7)][0x0];return{..._0xc299d3,'id':_0x36d565[_0x4a8d44(0x186)],'resolved':_0x50ff24[_0x4a8d44(0x16b)]===0x1,'dT':_0x427747(_0x36d565[_0x4a8d44(0x158)]),'personId':_0x36d565[_0x4a8d44(0x19d)],'threadId':_0x36d565[_0x4a8d44(0x1a4)]};}function _0x3481b3(_0x42dd03,_0x26aff2,_0x4a1be1){const _0x26b251=_0x3d4cd0;var _0x34f36e,_0x571a81;if(((_0x571a81=(_0x34f36e=_0x42dd03==null?void 0x0:_0x42dd03['replies'])==null?void 0x0:_0x34f36e[_0x26b251(0x1d7)])!=null?_0x571a81:0x0)>0x0){const _0x290d35=(_0x1bae6e,_0xcbf37f)=>({'id':_0x1bae6e[_0x26b251(0x186)],'threadId':_0x1bae6e[_0x26b251(0x1a4)],'dT':_0x427747(_0x1bae6e[_0x26b251(0x158)]),'personId':_0x1bae6e[_0x26b251(0x19d)],'resolved':_0x42dd03[_0x26b251(0x16b)]===_0x6d444a['Solved'],'unitId':_0x26aff2,'subUnitId':_0x4a1be1,'text':JSON[_0x26b251(0x1bf)](_0x1bae6e['content']),'parentId':_0xcbf37f}),_0x54cbe5=_0x290d35(_0x42dd03['replies'][0x0]);return{..._0x54cbe5,'children':_0x42dd03[_0x26b251(0x1b7)][_0x26b251(0x15b)](0x1)[_0x26b251(0x169)](_0x299aea=>_0x290d35(_0x299aea,_0x54cbe5['id']))};}return null;}let _0x487010=class{constructor(_0x996dd7,_0x1cc90e,_0x18c2e5){const _0x3184e7=_0x3d4cd0;this[_0x3184e7(0x15c)]=_0x996dd7,this[_0x3184e7(0x1d0)]=_0x1cc90e,this[_0x3184e7(0x1c9)]=_0x18c2e5;}async[_0x3d4cd0(0x187)](_0x15aba5){const _0x4f58a9=_0x3d4cd0;var _0x180ab6,_0x54da5f;const {parentId:_0x4fddbc,unitId:_0xd9af3a,text:_0xa17632,threadId:_0x20ed66}=_0x15aba5,_0x1479e6=(_0x54da5f=(_0x180ab6=_0xa17632[_0x4f58a9(0x197)])==null?void 0x0:_0x180ab6[_0x4f58a9(0x157)](_0x38eb61=>_0x38eb61[_0x4f58a9(0x1a1)]===_0x4f65f4['CustomRangeType'][_0x4f58a9(0x1a9)])['map'](_0x12e144=>_0x12e144[_0x4f58a9(0x19e)]))!=null?_0x54da5f:[],_0x293464=JSON[_0x4f58a9(0x189)](_0xa17632),_0x62eb13=(await this[_0x4f58a9(0x1c9)][_0x4f58a9(0x1b0)](_0xd9af3a))[_0x4f58a9(0x14a)]();if(_0x4fddbc){const _0x291aaf={'memberId':_0x62eb13,'unitId':_0xd9af3a,'content':_0x293464,'mention':_0x1479e6,'threadId':_0x20ed66},_0x1064bc=(await this[_0x4f58a9(0x15c)][_0x4f58a9(0x1d2)](_0x4f58a9(0x183)+_0xd9af3a+_0x4f58a9(0x1ce),{'body':_0x291aaf}))[_0x4f58a9(0x159)][_0x4f58a9(0x1b3)];return{..._0x15aba5,'id':_0x1064bc['replyId'],'dT':_0x4f65f4[_0x4f58a9(0x16f)](+_0x1064bc['createTimestamp'])[_0x4f58a9(0x1c6)](_0x4f58a9(0x1af)),'personId':_0x1064bc[_0x4f58a9(0x19d)]};}else{const _0x3f90d4={'memberId':_0x62eb13,'unitId':_0xd9af3a,'content':_0x293464,'mention':_0x1479e6},_0xfbcb4e=await this['_httpService']['post'](_0x4f58a9(0x183)+_0xd9af3a+_0x4f58a9(0x14f),{'body':_0x3f90d4});return _0x497a3a(_0xfbcb4e[_0x4f58a9(0x159)]['comment'],_0x15aba5);}}async[_0x3d4cd0(0x1c4)](_0x479f48){const _0x2a9fc9=_0x3d4cd0;var _0x50dcd0,_0x5e1fe8;const {text:_0x270a3c,unitId:_0x44cb5a}=_0x479f48,_0x47e305=(_0x5e1fe8=(_0x50dcd0=_0x270a3c['customRanges'])==null?void 0x0:_0x50dcd0[_0x2a9fc9(0x157)](_0x30edf9=>_0x30edf9[_0x2a9fc9(0x1a1)]===_0x4f65f4['CustomRangeType'][_0x2a9fc9(0x1a9)])[_0x2a9fc9(0x169)](_0x39d882=>_0x39d882[_0x2a9fc9(0x19e)]))!=null?_0x5e1fe8:[],_0x568791=JSON['stringify'](_0x270a3c),_0x5dfb22=_0x479f48['threadId'],_0x1e18c5=_0x479f48['id'],_0x214cf1={'memberId':(await this[_0x2a9fc9(0x1c9)][_0x2a9fc9(0x1b0)](_0x44cb5a))[_0x2a9fc9(0x14a)](),'unitId':_0x44cb5a,'threadId':_0x5dfb22,'mention':_0x47e305,'content':_0x568791,'replyId':_0x1e18c5},_0x33ea92=await this[_0x2a9fc9(0x15c)]['post']('/universer-api/comment/unit/'+_0x44cb5a+'/edit',{'body':_0x214cf1});return!_0x33ea92[_0x2a9fc9(0x159)]['error']||_0x33ea92[_0x2a9fc9(0x159)][_0x2a9fc9(0x17d)]['code']===0x1;}async[_0x3d4cd0(0x1c8)](_0x31149f){const _0x3f6f7b=_0x3d4cd0,{unitId:_0xe00bb6}=_0x31149f,_0x46bf3d=_0x31149f[_0x3f6f7b(0x1a4)],_0x41b9d9={'memberId':this['_userService']['getCurrentUser']()[_0x3f6f7b(0x17a)],'unitId':_0xe00bb6,'threadId':_0x46bf3d,'solved':_0x31149f[_0x3f6f7b(0x194)]?_0x6d444a['Solved']:_0x6d444a[_0x3f6f7b(0x162)]},_0x37f008=await this[_0x3f6f7b(0x15c)][_0x3f6f7b(0x1d2)](_0x3f6f7b(0x183)+_0xe00bb6+'/solved',{'body':_0x41b9d9});return!_0x37f008['body']['error']||_0x37f008['body']['error'][_0x3f6f7b(0x18a)]===0x1;}async[_0x3d4cd0(0x17b)](_0x2f42f8,_0xe50bdd,_0x249288,_0x4367d0){const _0x2eadd2=_0x3d4cd0,_0x52e093={'memberId':(await this[_0x2eadd2(0x1c9)]['requireSession'](_0x2f42f8))['getMemberID'](),'threadId':_0x249288,'replyId':_0x4367d0,'unitId':_0x2f42f8},_0x34158a=await this[_0x2eadd2(0x15c)][_0x2eadd2(0x1d2)]('/universer-api/comment/unit/'+_0x2f42f8+_0x2eadd2(0x1b5),{'body':_0x52e093});return!_0x34158a['body'][_0x2eadd2(0x17d)]||_0x34158a[_0x2eadd2(0x159)][_0x2eadd2(0x17d)][_0x2eadd2(0x18a)]===0x1;}async[_0x3d4cd0(0x1db)](_0x4c0fa9,_0x49f6fb,_0x3d67f5){const _0x28081d=_0x3d4cd0,_0x4bd11b={'unitId':_0x4c0fa9,'threadId':_0x3d67f5},_0x1abe28=await this[_0x28081d(0x15c)][_0x28081d(0x1d2)]('/universer-api/comment/unit/'+_0x4c0fa9+_0x28081d(0x18f),{'body':_0x4bd11b}),_0x5137e1=_0x3d67f5['map'](_0x4c17cb=>_0x3481b3(_0x1abe28[_0x28081d(0x159)][_0x28081d(0x16e)][_0x4c17cb],_0x4c0fa9,_0x49f6fb))[_0x28081d(0x157)](Boolean);return Object[_0x28081d(0x185)](_0x1abe28[_0x28081d(0x159)][_0x28081d(0x1c1)])[_0x28081d(0x15f)](_0x225e2a=>{const _0x2cb067=_0x28081d;this[_0x2cb067(0x1d0)][_0x2cb067(0x172)](_0x225e2a);}),_0x5137e1;}[_0x3d4cd0(0x179)](_0x3ef81f){const _0x2f393f=_0x3d4cd0;return{'id':_0x3ef81f['id'],'threadId':_0x3ef81f[_0x2f393f(0x1a4)],'ref':_0x3ef81f['ref']};}};_0x487010=_0x1ba843([_0x1a539a(0x0,_0x4f65f4['Inject'](_0x2b0841[_0x3d4cd0(0x15e)])),_0x1a539a(0x1,_0x4f65f4[_0x3d4cd0(0x150)](_0x4f65f4[_0x3d4cd0(0x16d)])),_0x1a539a(0x2,_0x4f65f4['Inject'](_0x24a2e1[_0x3d4cd0(0x153)]))],_0x487010);var _0x537577=Object['getOwnPropertyDescriptor'],_0x4397de=(_0x3ba4be,_0x594c13,_0x1dde7c,_0x26e6ea)=>{const _0x3d172e=_0x3d4cd0;for(var _0x560c7b=_0x26e6ea>0x1?void 0x0:_0x26e6ea?_0x537577(_0x594c13,_0x1dde7c):_0x594c13,_0xad3480=_0x3ba4be[_0x3d172e(0x1d7)]-0x1,_0x21c727;_0xad3480>=0x0;_0xad3480--)(_0x21c727=_0x3ba4be[_0xad3480])&&(_0x560c7b=_0x21c727(_0x560c7b)||_0x560c7b);return _0x560c7b;},_0x100932=(_0x3247cd,_0x176b9f)=>(_0x3319aa,_0x496961)=>_0x176b9f(_0x3319aa,_0x496961,_0x3247cd);let _0x15c334=class extends _0x4f65f4['Disposable']{constructor(_0x6ac3a1,_0x3d0fdd){const _0xc86d80=_0x3d4cd0;super(),this[_0xc86d80(0x155)]=_0x6ac3a1,this[_0xc86d80(0x182)]=_0x3d0fdd,this[_0xc86d80(0x1b1)]();}[_0x3d4cd0(0x1b1)](){const _0x290af5=_0x3d4cd0;this['_threadCommentDataSourceService'][_0x290af5(0x1b2)]=this['_threadCommentDataSource'],this[_0x290af5(0x155)][_0x290af5(0x166)]=!0x1;}};_0x15c334=_0x4397de([_0x100932(0x0,_0x259153[_0x3d4cd0(0x156)]),_0x100932(0x1,_0x4f65f4[_0x3d4cd0(0x150)](_0x487010))],_0x15c334);var _0x2c927b=Object['defineProperty'],_0x1ead02=Object[_0x3d4cd0(0x1d4)],_0x277b55=(_0x1487c2,_0x53cec6,_0x3622f4)=>_0x53cec6 in _0x1487c2?_0x2c927b(_0x1487c2,_0x53cec6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3622f4}):_0x1487c2[_0x53cec6]=_0x3622f4,_0xe780e2=(_0x52d7e2,_0x3ad0c5,_0x4d170a,_0x18ba00)=>{const _0xe020bb=_0x3d4cd0;for(var _0x395800=_0x18ba00>0x1?void 0x0:_0x18ba00?_0x1ead02(_0x3ad0c5,_0x4d170a):_0x3ad0c5,_0x4617fc=_0x52d7e2[_0xe020bb(0x1d7)]-0x1,_0x1fe30e;_0x4617fc>=0x0;_0x4617fc--)(_0x1fe30e=_0x52d7e2[_0x4617fc])&&(_0x395800=_0x1fe30e(_0x395800)||_0x395800);return _0x395800;},_0x4d7fb9=(_0x4a9003,_0x19ff3d)=>(_0x1a9396,_0x314112)=>_0x19ff3d(_0x1a9396,_0x314112,_0x4a9003),_0x271644=(_0x18a5fb,_0x36b09a,_0x1d508d)=>_0x277b55(_0x18a5fb,typeof _0x36b09a!=_0x3d4cd0(0x1ac)?_0x36b09a+'':_0x36b09a,_0x1d508d);_0x3fe854[_0x3d4cd0(0x1d6)]=class extends _0x4f65f4[_0x3d4cd0(0x18d)]{constructor(_0x183a6c=_0x2d63e7,_0x933660,_0x53fe87){const _0x54a355=_0x3d4cd0;super(),this['_config']=_0x183a6c,this['_injector']=_0x933660,this[_0x54a355(0x164)]=_0x53fe87;const {..._0x9ebdcb}=_0x4f65f4[_0x54a355(0x1c5)]({},_0x2d63e7,this[_0x54a355(0x17f)]);this[_0x54a355(0x164)][_0x54a355(0x1ca)](_0x222ebd,_0x9ebdcb);}[_0x3d4cd0(0x1aa)](){const _0x473d7f=_0x3d4cd0;[[_0x487010],[_0x15c334],[_0x33b826]][_0x473d7f(0x15f)](_0x127222=>{const _0x5b0246=_0x473d7f;this[_0x5b0246(0x1a0)]['add'](_0x127222);});}[_0x3d4cd0(0x1a5)](){const _0x18d100=_0x3d4cd0;this[_0x18d100(0x1a0)][_0x18d100(0x180)](_0x15c334),this[_0x18d100(0x1a0)]['get'](_0x33b826);}},_0x271644(_0x3fe854[_0x3d4cd0(0x1d6)],'pluginName',_0x5cae78),_0x271644(_0x3fe854['UniverThreadCommentDataSourcePlugin'],'type',_0x4f65f4[_0x3d4cd0(0x1ad)][_0x3d4cd0(0x167)]),_0x3fe854['UniverThreadCommentDataSourcePlugin']=_0xe780e2([_0x4f65f4[_0x3d4cd0(0x171)](_0x58350f[_0x3d4cd0(0x176)],_0x24a2e1[_0x3d4cd0(0x1b4)],_0x20b60f[_0x3d4cd0(0x154)]),_0x4d7fb9(0x1,_0x4f65f4['Inject'](_0x4f65f4[_0x3d4cd0(0x1bb)])),_0x4d7fb9(0x2,_0x4f65f4['IConfigService'])],_0x3fe854[_0x3d4cd0(0x1d6)]),Object[_0x3d4cd0(0x1cd)](_0x3fe854,Symbol[_0x3d4cd0(0x1d3)],{'value':_0x3d4cd0(0x1b8)});}));
|
|
1
|
+
function _0xc476(){const _0x529c11=['Solved','359895lMNRKv','comment','post','_configService','HTTPService','UniverCore','ref','COMMENT','replyId','map','function','Injector','@univerjs/network','dayjs','slice','format','disposeWithMe','root','reply','CollaborationSessionService','addUser','code','filter','add','Delete','exports','_commentService','error','symbol','delete','5170758jYcYic','personId','Unknown','11OLwFjr','/universer-api/user/list','rangeId','user','amd','comments','994995rcyiDm','stringify','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','UNRECOGNIZED','pipe','@univerjs/thread-comment','_threadCommentDataSourceService','_userService','replies','customRanges','_init','userId','Module','forEach','@univerjs/core','payload','/universer-api/comment/unit/','parse','1864528KxNzww','type','users','_initDataSource','parentId','CustomRangeType','DependentOn','pluginName','threadId','defineProperty','merge','Add','getOwnPropertyDescriptor','length','size','5467700TRtfnB','toStringTag','rxjs','object','setConfig','getUnit','Edit','/solved','_sessionService','Disposable','_httpService','values','get','/add','UniverThreadCommentUi','19970570nRvqLm','_injector','ThreadCommentModel','find','userID','getComment','CommentService','3870324hpRuwN','resolved','Plugin','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','deleteComment','solved','UniverThreadComment','addComment','rangeType','Reply','OpenOrReOpen','commentUpdate$','UniverThreadCommentDataSourcePlugin','UniverNetwork','getMemberID','subscribe','content','_threadCommentModel','getUser','unitId','UniverProCollaborationClient','resolveComment','onReady','/delete','body','IConfigService','Solve','_initUserSync','UniverInstanceType','_threadCommentDataSource','UniverLicensePlugin','requireSession','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','54fvkEMT','/edit','_config','UserManagerService','Inject','10xruOlO','createTimestamp','7eGvcAH','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply'];_0xc476=function(){return _0x529c11;};return _0xc476();}function _0x2f68(_0x271dbe,_0x25f33c){const _0xc4765=_0xc476();return _0x2f68=function(_0x2f6854,_0x5469bf){_0x2f6854=_0x2f6854-0x96;let _0x210980=_0xc4765[_0x2f6854];return _0x210980;},_0x2f68(_0x271dbe,_0x25f33c);}(function(_0xb87033,_0x2fb6a7){const _0x31b3f0=_0x2f68,_0x2181ed=_0xb87033();while(!![]){try{const _0x1dc901=parseInt(_0x31b3f0(0xd6))/0x1*(-parseInt(_0x31b3f0(0xcf))/0x2)+parseInt(_0x31b3f0(0xa7))/0x3+parseInt(_0x31b3f0(0x11f))/0x4+-parseInt(_0x31b3f0(0xfd))/0x5+-parseInt(_0x31b3f0(0xf4))/0x6*(-parseInt(_0x31b3f0(0xd1))/0x7)+-parseInt(_0x31b3f0(0x110))/0x8*(-parseInt(_0x31b3f0(0xca))/0x9)+-parseInt(_0x31b3f0(0xa0))/0xa*(parseInt(_0x31b3f0(0xf7))/0xb);if(_0x1dc901===_0x2fb6a7)break;else _0x2181ed['push'](_0x2181ed['shift']());}catch(_0xd37a1f){_0x2181ed['push'](_0x2181ed['shift']());}}}(_0xc476,0xe105b),function(_0x1c9d4d,_0x7f4872){const _0xb1b1e9=_0x2f68;typeof exports==_0xb1b1e9(0x122)&&typeof module<'u'?_0x7f4872(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==_0xb1b1e9(0xe0)&&define[_0xb1b1e9(0xfb)]?define([_0xb1b1e9(0xef),_0xb1b1e9(0xc9),'@univerjs-pro/license',_0xb1b1e9(0x10c),_0xb1b1e9(0xc8),_0xb1b1e9(0x103),_0xb1b1e9(0x121),_0xb1b1e9(0xe2)],_0x7f4872):(_0x1c9d4d=typeof globalThis<'u'?globalThis:_0x1c9d4d||self,_0x7f4872(_0x1c9d4d[_0xb1b1e9(0xaa)]={},_0x1c9d4d[_0xb1b1e9(0xbc)],_0x1c9d4d['UniverProLicense'],_0x1c9d4d[_0xb1b1e9(0xdb)],_0x1c9d4d[_0xb1b1e9(0x9f)],_0x1c9d4d[_0xb1b1e9(0xae)],_0x1c9d4d[_0xb1b1e9(0x121)],_0x1c9d4d[_0xb1b1e9(0xb5)]));}(this,function(_0x3b0238,_0x1f850e,_0x25b08e,_0x4dc168,_0x940fd9,_0x396cb8,_0x32004a,_0x3bd295){'use strict';const _0x327966=_0x2f68;const _0x43fbd9=_0x327966(0xd3);var _0x58e237=(_0x5ca945=>(_0x5ca945[_0x5ca945[_0x327966(0xb2)]=0x0]=_0x327966(0xb2),_0x5ca945[_0x5ca945[_0x327966(0xd5)]=0x1]=_0x327966(0xd5),_0x5ca945[_0x5ca945['UNRECOGNIZED']=-0x1]=_0x327966(0x101),_0x5ca945))(_0x58e237||{}),_0x2a392e=(_0x471823=>(_0x471823[_0x471823[_0x327966(0xf6)]=0x0]=_0x327966(0xf6),_0x471823[_0x471823[_0x327966(0x11b)]=0x1]='Add',_0x471823[_0x471823[_0x327966(0xb1)]=0x2]=_0x327966(0xb1),_0x471823[_0x471823['Edit']=0x3]=_0x327966(0x97),_0x471823[_0x471823[_0x327966(0xee)]=0x4]=_0x327966(0xee),_0x471823[_0x471823[_0x327966(0xc2)]=0x5]=_0x327966(0xc2),_0x471823[_0x471823[_0x327966(0x101)]=-0x1]='UNRECOGNIZED',_0x471823))(_0x2a392e||{});const _0x5efbbc=_0x3c4c00=>_0x4dc168[_0x327966(0xe3)](new Date(+_0x3c4c00))[_0x327966(0xe5)](_0x327966(0xab)),_0x135566=async(_0x448abc,_0x12c5cf)=>{const _0x42b1e5=_0x327966,_0x384e7f=_0x448abc[_0x42b1e5(0x9d)](_0x4dc168[_0x42b1e5(0xcd)]),_0x1b02c2=_0x448abc[_0x42b1e5(0x9d)](_0x3bd295[_0x42b1e5(0xda)]);_0x12c5cf[_0x42b1e5(0x10b)](_0x55b00d=>{const _0x1145a6=_0x42b1e5;_0x384e7f[_0x1145a6(0xba)](_0x55b00d)&&_0x12c5cf[_0x1145a6(0xf3)](_0x55b00d);}),_0x12c5cf[_0x42b1e5(0x11e)]&&(await _0x1b02c2[_0x42b1e5(0x9d)](_0x42b1e5(0xf8),{'params':{'userIDs':[..._0x12c5cf]}}))[_0x42b1e5(0xc0)][_0x42b1e5(0x112)][_0x42b1e5(0x10b)](_0x5d0f07=>{const _0x4f3e14=_0x42b1e5;_0x5d0f07&&_0x384e7f[_0x4f3e14(0xea)](_0x5d0f07);});};var _0x56432e=Object[_0x327966(0x11c)],_0x40a743=(_0x251ee5,_0x113d2e,_0x192411,_0x44c1eb)=>{for(var _0x560eba=_0x44c1eb>0x1?void 0x0:_0x44c1eb?_0x56432e(_0x113d2e,_0x192411):_0x113d2e,_0x44aedc=_0x251ee5['length']-0x1,_0x3c1251;_0x44aedc>=0x0;_0x44aedc--)(_0x3c1251=_0x251ee5[_0x44aedc])&&(_0x560eba=_0x3c1251(_0x560eba)||_0x560eba);return _0x560eba;},_0x2e2e56=(_0xe3044d,_0x1d9822)=>(_0x4d105e,_0x5bec97)=>_0x1d9822(_0x4d105e,_0x5bec97,_0xe3044d);let _0x1f3357=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x1a3b73,_0x4eb07f,_0x25f8d8,_0x1ea39f){const _0x4802ad=_0x327966;super(),this[_0x4802ad(0xf0)]=_0x1a3b73,this[_0x4802ad(0xb9)]=_0x4eb07f,this[_0x4802ad(0x105)]=_0x25f8d8,this[_0x4802ad(0xa1)]=_0x1ea39f,this[_0x4802ad(0x108)](),this[_0x4802ad(0xc3)]();}['_initUserSync'](){const _0x988aaa=_0x327966;this['disposeWithMe'](this[_0x988aaa(0xb9)][_0x988aaa(0xb3)][_0x988aaa(0x102)](_0x32004a['bufferTime'](0x10))[_0x988aaa(0xb7)](_0x546705=>{const _0xfb2e84=_0x988aaa,_0x4fdcba=new Set();_0x546705[_0xfb2e84(0x10b)](_0x1fb96d=>{const _0x3d2d0b=_0xfb2e84;switch(_0x1fb96d[_0x3d2d0b(0x111)]){case _0x3d2d0b(0xed):{const _0xd045cc=_0x1fb96d[_0x3d2d0b(0x10d)][_0x3d2d0b(0xf5)];_0x4fdcba['add'](_0xd045cc);break;}}}),_0x135566(this[_0xfb2e84(0xa1)],_0x4fdcba);}));}[_0x327966(0x108)](){const _0x4f0181=_0x327966;this[_0x4f0181(0xe6)](this[_0x4f0181(0xf0)]['commentUpdate$'][_0x4f0181(0xb7)](async _0x2aed10=>{const _0x3ff38f=_0x4f0181;var _0x44e2bf,_0x1fdc39,_0x415389,_0x24759e;const _0x20ee2a=(_0x44e2bf=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])['find'](_0x5caf9a=>_0x5caf9a[_0x3ff38f(0x118)]===_0x2aed10[_0x3ff38f(0x118)]))==null?void 0x0:_0x44e2bf[_0x3ff38f(0xe7)];if(!_0x20ee2a)return;const {unitId:_0x2655f8,subUnitId:_0x4ba732}=_0x20ee2a;switch(_0x2aed10[_0x3ff38f(0xfa)]&&this[_0x3ff38f(0x105)]['addUser'](_0x2aed10[_0x3ff38f(0xfa)]),_0x2aed10[_0x3ff38f(0x111)]){case _0x2a392e[_0x3ff38f(0x11b)]:break;case _0x2a392e[_0x3ff38f(0xb1)]:{this['_threadCommentModel']['addComment'](_0x2655f8,_0x4ba732,{'unitId':_0x2655f8,'subUnitId':_0x4ba732,'ref':'','id':_0x2aed10[_0x3ff38f(0xde)],'dT':_0x5efbbc(+_0x2aed10['createTimestamp']),'threadId':_0x2aed10[_0x3ff38f(0x118)],'personId':(_0x415389=(_0x1fdc39=_0x2aed10[_0x3ff38f(0xfa)])==null?void 0x0:_0x1fdc39[_0x3ff38f(0xa4)])!=null?_0x415389:_0x2aed10[_0x3ff38f(0x109)],'text':JSON['parse'](_0x2aed10[_0x3ff38f(0xb8)]),'parentId':_0x20ee2a['id']});break;}case _0x2a392e[_0x3ff38f(0xee)]:{const _0x323b0d=this['_threadCommentModel'][_0x3ff38f(0xa5)](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);_0x323b0d&&_0x323b0d[_0x3ff38f(0x114)]&&this['_threadCommentModel']['deleteComment'](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);break;}case _0x2a392e[_0x3ff38f(0x97)]:{this[_0x3ff38f(0xb9)]['updateComment'](_0x2655f8,_0x4ba732,{'commentId':_0x2aed10[_0x3ff38f(0xde)],'text':JSON[_0x3ff38f(0x10f)](_0x2aed10[_0x3ff38f(0xb8)])});break;}case _0x2a392e['Solve']:{const _0x4923dc=(_0x24759e=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])[_0x3ff38f(0xa3)](_0x4cd95a=>_0x4cd95a[_0x3ff38f(0x118)]===_0x2aed10['threadId']))==null?void 0x0:_0x24759e[_0x3ff38f(0xe7)];_0x4923dc&&this['_threadCommentModel'][_0x3ff38f(0xbd)](_0x2655f8,_0x4ba732,_0x4923dc['id'],_0x2aed10[_0x3ff38f(0xad)]===_0x58e237[_0x3ff38f(0xd5)]);break;}}}));}};_0x1f3357=_0x40a743([_0x2e2e56(0x0,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xa6)])),_0x2e2e56(0x1,_0x4dc168['Inject'](_0x396cb8[_0x327966(0xa2)])),_0x2e2e56(0x2,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2e2e56(0x3,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)]))],_0x1f3357);const _0x2f467a='thread-comment-data-source.config',_0x1cae5c={};var _0x3b79be=Object[_0x327966(0x11c)],_0x4e6402=(_0x120d59,_0x448a6c,_0x1be3a5,_0x10f36a)=>{for(var _0x2ae339=_0x10f36a>0x1?void 0x0:_0x10f36a?_0x3b79be(_0x448a6c,_0x1be3a5):_0x448a6c,_0x1047ee=_0x120d59['length']-0x1,_0x8fa1e0;_0x1047ee>=0x0;_0x1047ee--)(_0x8fa1e0=_0x120d59[_0x1047ee])&&(_0x2ae339=_0x8fa1e0(_0x2ae339)||_0x2ae339);return _0x2ae339;},_0x2799af=(_0x5eb65b,_0xe5f370)=>(_0x15c027,_0xb320a0)=>_0xe5f370(_0x15c027,_0xb320a0,_0x5eb65b);function _0x250f64(_0x3be529,_0x81d08){const _0x58c0b5=_0x327966,_0x5abd65=_0x3be529[_0x58c0b5(0x106)][0x0];return{..._0x81d08,'id':_0x5abd65['replyId'],'resolved':_0x3be529[_0x58c0b5(0xad)]===0x1,'dT':_0x5efbbc(_0x5abd65[_0x58c0b5(0xd0)]),'personId':_0x5abd65[_0x58c0b5(0x109)],'threadId':_0x5abd65['threadId']};}function _0x3e5dca(_0x1468fa,_0x160309,_0x438dba){const _0x873b07=_0x327966;var _0x586873,_0xbc9885;if(((_0xbc9885=(_0x586873=_0x1468fa==null?void 0x0:_0x1468fa[_0x873b07(0x106)])==null?void 0x0:_0x586873[_0x873b07(0x11d)])!=null?_0xbc9885:0x0)>0x0){const _0x3559fc=(_0x2e089c,_0x296079)=>({'id':_0x2e089c[_0x873b07(0xde)],'threadId':_0x2e089c[_0x873b07(0x118)],'dT':_0x5efbbc(_0x2e089c[_0x873b07(0xd0)]),'personId':_0x2e089c[_0x873b07(0x109)],'resolved':_0x1468fa[_0x873b07(0xad)]===_0x58e237[_0x873b07(0xd5)],'unitId':_0x160309,'subUnitId':_0x438dba,'text':JSON[_0x873b07(0x10f)](_0x2e089c[_0x873b07(0xb8)]),'parentId':_0x296079}),_0x1930b3=_0x3559fc(_0x1468fa[_0x873b07(0x106)][0x0]);return{..._0x1930b3,'children':_0x1468fa['replies'][_0x873b07(0xe4)](0x1)[_0x873b07(0xdf)](_0x54c705=>_0x3559fc(_0x54c705,_0x1930b3['id']))};}return null;}let _0x20bedb=class{constructor(_0x9b5c11,_0xbf37e,_0x7cd19a){const _0x187d17=_0x327966;this[_0x187d17(0x9b)]=_0x9b5c11,this[_0x187d17(0x105)]=_0xbf37e,this[_0x187d17(0x99)]=_0x7cd19a;}async[_0x327966(0xaf)](_0x399b9b){const _0x8d977d=_0x327966;var _0x7957ed,_0x454120;const {parentId:_0x4ed1f3,unitId:_0x450045,text:_0x5d15de,threadId:_0x5af9c8}=_0x399b9b,_0x46b199=(_0x454120=(_0x7957ed=_0x5d15de[_0x8d977d(0x107)])==null?void 0x0:_0x7957ed['filter'](_0x3c444c=>_0x3c444c[_0x8d977d(0xb0)]===_0x4dc168[_0x8d977d(0x115)][_0x8d977d(0xdd)])[_0x8d977d(0xdf)](_0x23af1c=>_0x23af1c[_0x8d977d(0xf9)]))!=null?_0x454120:[],_0x265330=JSON[_0x8d977d(0xfe)](_0x5d15de),_0x1f67ff=(await this['_sessionService'][_0x8d977d(0xc7)](_0x450045))['getMemberID']();if(_0x4ed1f3){const _0xc45976={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199,'threadId':_0x5af9c8},_0x3968a7=(await this['_httpService']['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0xd4),{'body':_0xc45976}))[_0x8d977d(0xc0)][_0x8d977d(0xe8)];return{..._0x399b9b,'id':_0x3968a7[_0x8d977d(0xde)],'dT':_0x4dc168[_0x8d977d(0xe3)](+_0x3968a7['createTimestamp'])[_0x8d977d(0xe5)](_0x8d977d(0xab)),'personId':_0x3968a7[_0x8d977d(0x109)]};}else{const _0x1e8550={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199},_0x46dba1=await this[_0x8d977d(0x9b)]['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0x9e),{'body':_0x1e8550});return _0x250f64(_0x46dba1[_0x8d977d(0xc0)][_0x8d977d(0xd7)],_0x399b9b);}}async['updateComment'](_0x4acc59){const _0x5a2422=_0x327966;var _0x3e55a1,_0x1f6490;const {text:_0x5c2a2c,unitId:_0x4c9c45}=_0x4acc59,_0x1b1a54=(_0x1f6490=(_0x3e55a1=_0x5c2a2c[_0x5a2422(0x107)])==null?void 0x0:_0x3e55a1[_0x5a2422(0xec)](_0x212719=>_0x212719['rangeType']===_0x4dc168['CustomRangeType'][_0x5a2422(0xdd)])[_0x5a2422(0xdf)](_0x10a5f0=>_0x10a5f0[_0x5a2422(0xf9)]))!=null?_0x1f6490:[],_0x569a3a=JSON[_0x5a2422(0xfe)](_0x5c2a2c),_0x5c710f=_0x4acc59[_0x5a2422(0x118)],_0x328083=_0x4acc59['id'],_0x55a772={'memberId':(await this[_0x5a2422(0x99)][_0x5a2422(0xc7)](_0x4c9c45))[_0x5a2422(0xb6)](),'unitId':_0x4c9c45,'threadId':_0x5c710f,'mention':_0x1b1a54,'content':_0x569a3a,'replyId':_0x328083},_0x2a52b5=await this['_httpService'][_0x5a2422(0xd8)](_0x5a2422(0x10e)+_0x4c9c45+_0x5a2422(0xcb),{'body':_0x55a772});return!_0x2a52b5['body'][_0x5a2422(0xf1)]||_0x2a52b5[_0x5a2422(0xc0)][_0x5a2422(0xf1)][_0x5a2422(0xeb)]===0x1;}async['resolveComment'](_0x2f54be){const _0x562f28=_0x327966,{unitId:_0x1960f6}=_0x2f54be,_0x17e2a6=_0x2f54be[_0x562f28(0x118)],_0x1d5afe={'memberId':this[_0x562f28(0x105)]['getCurrentUser']()[_0x562f28(0xa4)],'unitId':_0x1960f6,'threadId':_0x17e2a6,'solved':_0x2f54be[_0x562f28(0xa8)]?_0x58e237[_0x562f28(0xd5)]:_0x58e237[_0x562f28(0xb2)]},_0x45f41c=await this[_0x562f28(0x9b)][_0x562f28(0xd8)](_0x562f28(0x10e)+_0x1960f6+_0x562f28(0x98),{'body':_0x1d5afe});return!_0x45f41c[_0x562f28(0xc0)]['error']||_0x45f41c['body'][_0x562f28(0xf1)]['code']===0x1;}async[_0x327966(0xac)](_0x24caf5,_0xf81232,_0xa82bcd,_0x2e4957){const _0x1cb6bd=_0x327966,_0x40aaf3={'memberId':(await this[_0x1cb6bd(0x99)][_0x1cb6bd(0xc7)](_0x24caf5))[_0x1cb6bd(0xb6)](),'threadId':_0xa82bcd,'replyId':_0x2e4957,'unitId':_0x24caf5},_0x3558b1=await this['_httpService'][_0x1cb6bd(0xd8)](_0x1cb6bd(0x10e)+_0x24caf5+_0x1cb6bd(0xbf),{'body':_0x40aaf3});return!_0x3558b1[_0x1cb6bd(0xc0)]['error']||_0x3558b1['body'][_0x1cb6bd(0xf1)][_0x1cb6bd(0xeb)]===0x1;}async['listComments'](_0x315b3b,_0x48c897,_0x4769a9){const _0x33f8b2=_0x327966,_0x313d24={'unitId':_0x315b3b,'threadId':_0x4769a9},_0x26d2b1=await this['_httpService'][_0x33f8b2(0xd8)](_0x33f8b2(0x10e)+_0x315b3b+'/list',{'body':_0x313d24}),_0x5ddca4=_0x4769a9[_0x33f8b2(0xdf)](_0x595540=>_0x3e5dca(_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0xfc)][_0x595540],_0x315b3b,_0x48c897))[_0x33f8b2(0xec)](Boolean);return Object[_0x33f8b2(0x9c)](_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0x112)])[_0x33f8b2(0x10b)](_0x50a925=>{const _0x2430ff=_0x33f8b2;this[_0x2430ff(0x105)][_0x2430ff(0xea)](_0x50a925);}),_0x5ddca4;}[_0x327966(0xd2)](_0xd0cfdf){const _0x15901=_0x327966;return{'id':_0xd0cfdf['id'],'threadId':_0xd0cfdf[_0x15901(0x118)],'ref':_0xd0cfdf[_0x15901(0xdc)]};}};_0x20bedb=_0x4e6402([_0x2799af(0x0,_0x4dc168[_0x327966(0xce)](_0x3bd295['HTTPService'])),_0x2799af(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2799af(0x2,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xe9)]))],_0x20bedb);var _0x23ebe6=Object['getOwnPropertyDescriptor'],_0x50725f=(_0x5d6c4e,_0x13eb2d,_0x33425a,_0x274e1c)=>{const _0x3f81c1=_0x327966;for(var _0x219dc0=_0x274e1c>0x1?void 0x0:_0x274e1c?_0x23ebe6(_0x13eb2d,_0x33425a):_0x13eb2d,_0x4ceed7=_0x5d6c4e[_0x3f81c1(0x11d)]-0x1,_0x1fefe3;_0x4ceed7>=0x0;_0x4ceed7--)(_0x1fefe3=_0x5d6c4e[_0x4ceed7])&&(_0x219dc0=_0x1fefe3(_0x219dc0)||_0x219dc0);return _0x219dc0;},_0x554cb4=(_0x152ca7,_0x4daf52)=>(_0x248d07,_0x1182aa)=>_0x4daf52(_0x248d07,_0x1182aa,_0x152ca7);let _0x13880a=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x3b5ce7,_0x4a165f){const _0x409e49=_0x327966;super(),this[_0x409e49(0x104)]=_0x3b5ce7,this[_0x409e49(0xc5)]=_0x4a165f,this[_0x409e49(0x113)]();}['_initDataSource'](){const _0x1217df=_0x327966;this[_0x1217df(0x104)]['dataSource']=this['_threadCommentDataSource'],this[_0x1217df(0x104)]['syncUpdateMutationToColla']=!0x1;}};_0x13880a=_0x50725f([_0x554cb4(0x0,_0x396cb8[_0x327966(0x100)]),_0x554cb4(0x1,_0x4dc168[_0x327966(0xce)](_0x20bedb))],_0x13880a);var _0x2deb99=Object[_0x327966(0x119)],_0x43f983=Object[_0x327966(0x11c)],_0x4a34d2=(_0xeeee9c,_0x43d041,_0x192aca)=>_0x43d041 in _0xeeee9c?_0x2deb99(_0xeeee9c,_0x43d041,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x192aca}):_0xeeee9c[_0x43d041]=_0x192aca,_0x1dda2c=(_0x5424b5,_0x256c3f,_0x581b2f,_0xa1af5)=>{for(var _0x48f96c=_0xa1af5>0x1?void 0x0:_0xa1af5?_0x43f983(_0x256c3f,_0x581b2f):_0x256c3f,_0xd23ea1=_0x5424b5['length']-0x1,_0x4e716a;_0xd23ea1>=0x0;_0xd23ea1--)(_0x4e716a=_0x5424b5[_0xd23ea1])&&(_0x48f96c=_0x4e716a(_0x48f96c)||_0x48f96c);return _0x48f96c;},_0x50ef05=(_0x296b9e,_0x219ace)=>(_0x399328,_0x5bb111)=>_0x219ace(_0x399328,_0x5bb111,_0x296b9e),_0x7b636b=(_0x247b1c,_0x494df5,_0x58443c)=>_0x4a34d2(_0x247b1c,typeof _0x494df5!=_0x327966(0xf2)?_0x494df5+'':_0x494df5,_0x58443c);_0x3b0238[_0x327966(0xb4)]=class extends _0x4dc168[_0x327966(0xa9)]{constructor(_0x3a0702=_0x1cae5c,_0xbc51cd,_0x46c99a){const _0x58904b=_0x327966;super(),this[_0x58904b(0xcc)]=_0x3a0702,this[_0x58904b(0xa1)]=_0xbc51cd,this[_0x58904b(0xd9)]=_0x46c99a;const {..._0x1329d1}=_0x4dc168[_0x58904b(0x11a)]({},_0x1cae5c,this[_0x58904b(0xcc)]);this[_0x58904b(0xd9)][_0x58904b(0x123)](_0x2f467a,_0x1329d1);}['onStarting'](){const _0x3a6c34=_0x327966;[[_0x20bedb],[_0x13880a],[_0x1f3357]][_0x3a6c34(0x10b)](_0x403a6e=>{const _0x51151d=_0x3a6c34;this['_injector'][_0x51151d(0xed)](_0x403a6e);});}[_0x327966(0xbe)](){const _0x1730d6=_0x327966;this[_0x1730d6(0xa1)][_0x1730d6(0x9d)](_0x13880a),this[_0x1730d6(0xa1)]['get'](_0x1f3357);}},_0x7b636b(_0x3b0238[_0x327966(0xb4)],_0x327966(0x117),_0x43fbd9),_0x7b636b(_0x3b0238[_0x327966(0xb4)],'type',_0x4dc168[_0x327966(0xc4)]['UNIVER_UNKNOWN']),_0x3b0238['UniverThreadCommentDataSourcePlugin']=_0x1dda2c([_0x4dc168[_0x327966(0x116)](_0x940fd9['UniverThreadCommentUIPlugin'],_0x1f850e[_0x327966(0xff)],_0x25b08e[_0x327966(0xc6)]),_0x50ef05(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)])),_0x50ef05(0x2,_0x4dc168[_0x327966(0xc1)])],_0x3b0238['UniverThreadCommentDataSourcePlugin']),Object[_0x327966(0x119)](_0x3b0238,Symbol[_0x327966(0x120)],{'value':_0x327966(0x10a)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3-experimental.20250812-b4b6f1a",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.
|
|
49
|
-
"@univerjs-pro/license": "0.10.
|
|
50
|
-
"@univerjs/core": "0.10.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.3-experimental.20250812-b4b6f1a",
|
|
49
|
+
"@univerjs-pro/license": "0.10.3-experimental.20250812-b4b6f1a",
|
|
50
|
+
"@univerjs/core": "0.10.3-experimental.20250812-b4b6f1a",
|
|
51
|
+
"@univerjs/network": "0.10.3-experimental.20250812-b4b6f1a",
|
|
52
|
+
"@univerjs/thread-comment": "0.10.3-experimental.20250812-b4b6f1a",
|
|
51
53
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.10.2-nightly.202508080617",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.2-nightly.202508080617"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.3-experimental.20250812-b4b6f1a"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^7.0.6",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|