@univerjs-pro/thread-comment-datasource 0.9.0 → 0.9.1-nightly.202507041607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x501199=_0x137a;(function(_0x36a6f1,_0x36a669){const _0x26ee4c=_0x137a,_0x2f785a=_0x36a6f1();while(!![]){try{const _0x43e2ca=parseInt(_0x26ee4c(0x15e))/0x1+-parseInt(_0x26ee4c(0x164))/0x2*(parseInt(_0x26ee4c(0x182))/0x3)+parseInt(_0x26ee4c(0x15d))/0x4*(parseInt(_0x26ee4c(0x1a9))/0x5)+-parseInt(_0x26ee4c(0x1b5))/0x6*(parseInt(_0x26ee4c(0x192))/0x7)+parseInt(_0x26ee4c(0x1a6))/0x8+parseInt(_0x26ee4c(0x19b))/0x9*(parseInt(_0x26ee4c(0x16e))/0xa)+-parseInt(_0x26ee4c(0x14a))/0xb;if(_0x43e2ca===_0x36a669)break;else _0x2f785a['push'](_0x2f785a['shift']());}catch(_0x3883db){_0x2f785a['push'](_0x2f785a['shift']());}}}(_0x9275,0xcfccb));Object[_0x501199(0x16d)](exports,Symbol[_0x501199(0x1b8)],{'value':_0x501199(0x160)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5f118d=>(_0x5f118d[_0x5f118d['OpenOrReOpen']=0x0]=_0x501199(0x1bd),_0x5f118d[_0x5f118d['Solved']=0x1]=_0x501199(0x16a),_0x5f118d[_0x5f118d[_0x501199(0x1c4)]=-0x1]=_0x501199(0x1c4),_0x5f118d))(I||{}),v=(_0x1e6787=>(_0x1e6787[_0x1e6787['Unknown']=0x0]=_0x501199(0x191),_0x1e6787[_0x1e6787[_0x501199(0x1c3)]=0x1]='Add',_0x1e6787[_0x1e6787[_0x501199(0x171)]=0x2]=_0x501199(0x171),_0x1e6787[_0x1e6787[_0x501199(0x155)]=0x3]=_0x501199(0x155),_0x1e6787[_0x1e6787[_0x501199(0x172)]=0x4]=_0x501199(0x172),_0x1e6787[_0x1e6787['Solve']=0x5]=_0x501199(0x195),_0x1e6787[_0x1e6787['UNRECOGNIZED']=-0x1]=_0x501199(0x1c4),_0x1e6787))(v||{});const f=_0x5e0f60=>c[_0x501199(0x1a2)](new Date(+_0x5e0f60))[_0x501199(0x173)](_0x501199(0x185)),R=async(_0x2ca8a5,_0x14498f)=>{const _0x5dccac=_0x501199,_0x2d19f1=_0x2ca8a5['get'](c[_0x5dccac(0x1a7)]),_0x3a6a5a=_0x2ca8a5[_0x5dccac(0x157)](P['HTTPService']);_0x14498f['forEach'](_0x448649=>{const _0x9b4079=_0x5dccac;_0x2d19f1[_0x9b4079(0x1a5)](_0x448649)&&_0x14498f[_0x9b4079(0x15c)](_0x448649);}),_0x14498f[_0x5dccac(0x154)]&&(await _0x3a6a5a['get'](_0x5dccac(0x194),{'params':{'userIDs':[..._0x14498f]}}))['body'][_0x5dccac(0x153)]['forEach'](_0x42961a=>{_0x42961a&&_0x2d19f1['addUser'](_0x42961a);});};var $=Object[_0x501199(0x1c2)],E=(_0x3253d8,_0x17b51d,_0x8930a,_0x2be72e)=>{const _0x1440b3=_0x501199;for(var _0x4b282e=_0x2be72e>0x1?void 0x0:_0x2be72e?$(_0x17b51d,_0x8930a):_0x17b51d,_0x24bfe8=_0x3253d8[_0x1440b3(0x18d)]-0x1,_0xccdf08;_0x24bfe8>=0x0;_0x24bfe8--)(_0xccdf08=_0x3253d8[_0x24bfe8])&&(_0x4b282e=_0xccdf08(_0x4b282e)||_0x4b282e);return _0x4b282e;},S=(_0x2e4e66,_0x15793f)=>(_0x567cde,_0x5711b3)=>_0x15793f(_0x567cde,_0x5711b3,_0x2e4e66);let p=class extends c[_0x501199(0x198)]{constructor(_0x1ab0e2,_0x3259f9,_0x910ddf,_0xf66ea9){const _0x19923c=_0x501199;super(),this[_0x19923c(0x17c)]=_0x1ab0e2,this[_0x19923c(0x15b)]=_0x3259f9,this['_userService']=_0x910ddf,this[_0x19923c(0x16c)]=_0xf66ea9,this['_init'](),this[_0x19923c(0x180)]();}[_0x501199(0x180)](){const _0x2676a6=_0x501199;this[_0x2676a6(0x165)](this['_threadCommentModel'][_0x2676a6(0x15a)][_0x2676a6(0x190)](w[_0x2676a6(0x19a)](0x10))[_0x2676a6(0x1a3)](_0x2e1212=>{const _0x388dd1=new Set();_0x2e1212['forEach'](_0x5049da=>{const _0x38957b=_0x137a;switch(_0x5049da[_0x38957b(0x18b)]){case'add':{const _0xebf883=_0x5049da[_0x38957b(0x150)][_0x38957b(0x196)];_0x388dd1[_0x38957b(0x17b)](_0xebf883);break;}}}),R(this['_injector'],_0x388dd1);}));}[_0x501199(0x14b)](){const _0x2fec56=_0x501199;this[_0x2fec56(0x165)](this[_0x2fec56(0x17c)][_0x2fec56(0x15a)][_0x2fec56(0x1a3)](async _0x4210ca=>{const _0x358808=_0x2fec56;var _0x2fc802,_0x2ff477,_0x13d96c,_0x2e615b;const _0x51f280=(_0x2fc802=this[_0x358808(0x15b)]['getUnit'](_0x4210ca[_0x358808(0x170)])[_0x358808(0x159)](_0x9dfb8e=>_0x9dfb8e[_0x358808(0x1a0)]===_0x4210ca['threadId']))==null?void 0x0:_0x2fc802[_0x358808(0x1b2)];if(!_0x51f280)return;const {unitId:_0x1c14be,subUnitId:_0x39474b}=_0x51f280;switch(_0x4210ca[_0x358808(0x17e)]&&this['_userService']['addUser'](_0x4210ca['user']),_0x4210ca['type']){case v[_0x358808(0x1c3)]:break;case v[_0x358808(0x171)]:{this[_0x358808(0x15b)][_0x358808(0x161)](_0x1c14be,_0x39474b,{'unitId':_0x1c14be,'subUnitId':_0x39474b,'ref':'','id':_0x4210ca[_0x358808(0x1af)],'dT':f(+_0x4210ca[_0x358808(0x167)]),'threadId':_0x4210ca[_0x358808(0x1a0)],'personId':(_0x13d96c=(_0x2ff477=_0x4210ca['user'])==null?void 0x0:_0x2ff477[_0x358808(0x15f)])!=null?_0x13d96c:_0x4210ca[_0x358808(0x17f)],'text':JSON['parse'](_0x4210ca[_0x358808(0x163)]),'parentId':_0x51f280['id']});break;}case v[_0x358808(0x172)]:{const _0x2e579f=this[_0x358808(0x15b)][_0x358808(0x149)](_0x1c14be,_0x39474b,_0x4210ca[_0x358808(0x1af)]);_0x2e579f&&_0x2e579f[_0x358808(0x199)]&&this[_0x358808(0x15b)][_0x358808(0x189)](_0x1c14be,_0x39474b,_0x4210ca[_0x358808(0x1af)]);break;}case v['Edit']:{this[_0x358808(0x15b)][_0x358808(0x14d)](_0x1c14be,_0x39474b,{'commentId':_0x4210ca[_0x358808(0x1af)],'text':JSON['parse'](_0x4210ca[_0x358808(0x163)])});break;}case v['Solve']:{const _0x384091=(_0x2e615b=this[_0x358808(0x15b)][_0x358808(0x1b6)](_0x4210ca['unitId'])['find'](_0x288625=>_0x288625[_0x358808(0x1a0)]===_0x4210ca[_0x358808(0x1a0)]))==null?void 0x0:_0x2e615b[_0x358808(0x1b2)];_0x384091&&this[_0x358808(0x15b)][_0x358808(0x1a4)](_0x1c14be,_0x39474b,_0x384091['id'],_0x4210ca[_0x358808(0x156)]===I[_0x358808(0x16a)]);break;}}}));}};p=E([S(0x0,c[_0x501199(0x151)](b[_0x501199(0x16f)])),S(0x1,c[_0x501199(0x151)](M[_0x501199(0x179)])),S(0x2,c[_0x501199(0x151)](c['UserManagerService'])),S(0x3,c[_0x501199(0x151)](c[_0x501199(0x19f)]))],p);function _0x9275(){const _0x11d0a3=['DependentOn','getOwnPropertyDescriptor','Add','UNRECOGNIZED','body','getComment','14037892inptnW','_init','CollaborationSessionService','updateComment','getMemberID','_httpService','payload','Inject','reply','users','size','Edit','solved','get','thread-comment-data-source.config','find','commentUpdate$','_threadCommentModel','delete','199340ygHvoa','846221DluLMJ','userID','Module','addComment','saveCommentToSnapshot','content','7526fhuPXw','disposeWithMe','parse','createTimestamp','symbol','pluginName','Solved','_threadCommentDataSourceService','_injector','defineProperty','20fbIWZz','CommentService','unitId','Reply','Delete','format','setConfig','_sessionService','/list','IThreadCommentDataSourceService','comments','ThreadCommentModel','_threadCommentDataSource','add','_commentService','/add','user','userId','_initUserSync','error','1074TeIRLe','_configService','ref','YYYY/MM/DD\x20HH:mm','addUser','UniverCollaborationClientPlugin','replies','deleteComment','code','type','requireSession','length','dataSource','filter','pipe','Unknown','1414693padwPH','_initDataSource','/universer-api/user/list','Solve','personId','/solved','Disposable','parentId','bufferTime','1323819ImIYKv','forEach','post','rangeId','Injector','threadId','UNIVER_UNKNOWN','dayjs','subscribe','resolveComment','getUser','12736504fwQuEG','UserManagerService','IConfigService','115MCtloF','UniverLicensePlugin','COMMENT','UniverInstanceType','comment','/reply','replyId','map','merge','root','_userService','rangeType','12kEuNpZ','getUnit','/universer-api/comment/unit/','toStringTag','HTTPService','syncUpdateMutationToColla','onReady','customRanges','OpenOrReOpen','stringify','UniverThreadCommentDataSourcePlugin','_config'];_0x9275=function(){return _0x11d0a3;};return _0x9275();}const q=_0x501199(0x158),D={};var A=Object[_0x501199(0x1c2)],x=(_0x34b6fb,_0x2fbead,_0xf5b13d,_0x3fd10a)=>{const _0x2e5f2d=_0x501199;for(var _0x42635c=_0x3fd10a>0x1?void 0x0:_0x3fd10a?A(_0x2fbead,_0xf5b13d):_0x2fbead,_0x4c30c2=_0x34b6fb[_0x2e5f2d(0x18d)]-0x1,_0x353be6;_0x4c30c2>=0x0;_0x4c30c2--)(_0x353be6=_0x34b6fb[_0x4c30c2])&&(_0x42635c=_0x353be6(_0x42635c)||_0x42635c);return _0x42635c;},_=(_0x45f2ee,_0x536db8)=>(_0x38a9b5,_0x4cc90b)=>_0x536db8(_0x38a9b5,_0x4cc90b,_0x45f2ee);function _0x137a(_0xca4e88,_0x1bc16f){const _0x927513=_0x9275();return _0x137a=function(_0x137a7f,_0x49b096){_0x137a7f=_0x137a7f-0x148;let _0x11a738=_0x927513[_0x137a7f];return _0x11a738;},_0x137a(_0xca4e88,_0x1bc16f);}function Y(_0x14c0dd,_0x157e8e){const _0x4405ac=_0x501199,_0x1e7bb7=_0x14c0dd[_0x4405ac(0x188)][0x0];return{..._0x157e8e,'id':_0x1e7bb7[_0x4405ac(0x1af)],'resolved':_0x14c0dd['solved']===0x1,'dT':f(_0x1e7bb7['createTimestamp']),'personId':_0x1e7bb7[_0x4405ac(0x17f)],'threadId':_0x1e7bb7[_0x4405ac(0x1a0)]};}function G(_0x4fab12,_0x4820a3,_0x54789a){const _0x1c4e13=_0x501199;var _0x411fbf,_0x2f09fb;if(((_0x2f09fb=(_0x411fbf=_0x4fab12==null?void 0x0:_0x4fab12[_0x1c4e13(0x188)])==null?void 0x0:_0x411fbf[_0x1c4e13(0x18d)])!=null?_0x2f09fb:0x0)>0x0){const _0x5cc92b=(_0x4a28d5,_0x4d4f97)=>({'id':_0x4a28d5[_0x1c4e13(0x1af)],'threadId':_0x4a28d5[_0x1c4e13(0x1a0)],'dT':f(_0x4a28d5[_0x1c4e13(0x167)]),'personId':_0x4a28d5['userId'],'resolved':_0x4fab12[_0x1c4e13(0x156)]===I[_0x1c4e13(0x16a)],'unitId':_0x4820a3,'subUnitId':_0x54789a,'text':JSON[_0x1c4e13(0x166)](_0x4a28d5[_0x1c4e13(0x163)]),'parentId':_0x4d4f97}),_0x2898db=_0x5cc92b(_0x4fab12[_0x1c4e13(0x188)][0x0]);return{..._0x2898db,'children':_0x4fab12[_0x1c4e13(0x188)]['slice'](0x1)[_0x1c4e13(0x1b0)](_0x406573=>_0x5cc92b(_0x406573,_0x2898db['id']))};}return null;}let g=class{constructor(_0x4bd862,_0x21f673,_0x1f46ee,_0x4a23fc){const _0x300a91=_0x501199;this[_0x300a91(0x14f)]=_0x4bd862,this[_0x300a91(0x1b3)]=_0x21f673,this['_sessionService']=_0x1f46ee,this[_0x300a91(0x16c)]=_0x4a23fc;}async[_0x501199(0x161)](_0x2144c8){const _0x52b4a4=_0x501199;var _0x3b3b95,_0x4d703d;const {parentId:_0x3f5f29,unitId:_0x554baa,text:_0x1ed5d8,threadId:_0x268b3e}=_0x2144c8,_0x3c9c07=(_0x4d703d=(_0x3b3b95=_0x1ed5d8[_0x52b4a4(0x1bc)])==null?void 0x0:_0x3b3b95[_0x52b4a4(0x18f)](_0x19dc2b=>_0x19dc2b[_0x52b4a4(0x1b4)]===c['CustomRangeType'][_0x52b4a4(0x1ab)])[_0x52b4a4(0x1b0)](_0xd37570=>_0xd37570[_0x52b4a4(0x19e)]))!=null?_0x4d703d:[],_0x25db3e=JSON[_0x52b4a4(0x1be)](_0x1ed5d8),_0x23f792=(await this['_sessionService'][_0x52b4a4(0x18c)](_0x554baa))[_0x52b4a4(0x14e)]();if(_0x3f5f29){const _0x408f79={'memberId':_0x23f792,'unitId':_0x554baa,'content':_0x25db3e,'mention':_0x3c9c07,'threadId':_0x268b3e},_0x5e7072=(await this['_httpService'][_0x52b4a4(0x19d)]('/universer-api/comment/unit/'+_0x554baa+_0x52b4a4(0x1ae),{'body':_0x408f79}))[_0x52b4a4(0x148)][_0x52b4a4(0x152)];return{..._0x2144c8,'id':_0x5e7072['replyId'],'dT':c[_0x52b4a4(0x1a2)](+_0x5e7072[_0x52b4a4(0x167)])[_0x52b4a4(0x173)](_0x52b4a4(0x185)),'personId':_0x5e7072[_0x52b4a4(0x17f)]};}else{const _0x5d2c0e={'memberId':_0x23f792,'unitId':_0x554baa,'content':_0x25db3e,'mention':_0x3c9c07},_0xec7ae1=await this[_0x52b4a4(0x14f)][_0x52b4a4(0x19d)](_0x52b4a4(0x1b7)+_0x554baa+_0x52b4a4(0x17d),{'body':_0x5d2c0e});return Y(_0xec7ae1[_0x52b4a4(0x148)][_0x52b4a4(0x1ad)],_0x2144c8);}}async[_0x501199(0x14d)](_0x41b0b5){const _0x4dc009=_0x501199;var _0x732bf2,_0x2afcf6;const {text:_0xd5f98d,unitId:_0x501700}=_0x41b0b5,_0x2c94b8=(_0x2afcf6=(_0x732bf2=_0xd5f98d[_0x4dc009(0x1bc)])==null?void 0x0:_0x732bf2['filter'](_0x42e8c6=>_0x42e8c6[_0x4dc009(0x1b4)]===c['CustomRangeType'][_0x4dc009(0x1ab)])[_0x4dc009(0x1b0)](_0x440567=>_0x440567['rangeId']))!=null?_0x2afcf6:[],_0x1eda68=JSON['stringify'](_0xd5f98d),_0x591b4b=_0x41b0b5['threadId'],_0x150459=_0x41b0b5['id'],_0x399c07={'memberId':(await this[_0x4dc009(0x175)][_0x4dc009(0x18c)](_0x501700))['getMemberID'](),'unitId':_0x501700,'threadId':_0x591b4b,'mention':_0x2c94b8,'content':_0x1eda68,'replyId':_0x150459},_0x169f58=await this[_0x4dc009(0x14f)][_0x4dc009(0x19d)](_0x4dc009(0x1b7)+_0x501700+'/edit',{'body':_0x399c07});return!_0x169f58[_0x4dc009(0x148)][_0x4dc009(0x181)]||_0x169f58[_0x4dc009(0x148)][_0x4dc009(0x181)][_0x4dc009(0x18a)]===0x1;}async[_0x501199(0x1a4)](_0x528674){const _0x4ea599=_0x501199,{unitId:_0x14aef4}=_0x528674,_0x2bfdf8=_0x528674[_0x4ea599(0x1a0)],_0x4c9b25={'memberId':this[_0x4ea599(0x1b3)]['getCurrentUser']()[_0x4ea599(0x15f)],'unitId':_0x14aef4,'threadId':_0x2bfdf8,'solved':_0x528674['resolved']?I[_0x4ea599(0x16a)]:I[_0x4ea599(0x1bd)]},_0x5f4383=await this[_0x4ea599(0x14f)]['post'](_0x4ea599(0x1b7)+_0x14aef4+_0x4ea599(0x197),{'body':_0x4c9b25});return!_0x5f4383[_0x4ea599(0x148)][_0x4ea599(0x181)]||_0x5f4383[_0x4ea599(0x148)][_0x4ea599(0x181)][_0x4ea599(0x18a)]===0x1;}async[_0x501199(0x189)](_0x36ef42,_0x3a9e03,_0x224c0e,_0x1095f0){const _0x28e354=_0x501199,_0x394a08={'memberId':(await this['_sessionService'][_0x28e354(0x18c)](_0x36ef42))['getMemberID'](),'threadId':_0x224c0e,'replyId':_0x1095f0,'unitId':_0x36ef42},_0x9b00ab=await this[_0x28e354(0x14f)]['post']('/universer-api/comment/unit/'+_0x36ef42+'/delete',{'body':_0x394a08});return!_0x9b00ab['body']['error']||_0x9b00ab[_0x28e354(0x148)][_0x28e354(0x181)]['code']===0x1;}async['listComments'](_0x3b3d87,_0x5cb4ac,_0x1328ee){const _0x3822a0=_0x501199,_0x57ec1d={'unitId':_0x3b3d87,'threadId':_0x1328ee},_0x20238e=await this[_0x3822a0(0x14f)]['post'](_0x3822a0(0x1b7)+_0x3b3d87+_0x3822a0(0x176),{'body':_0x57ec1d}),_0xe4f853=_0x1328ee[_0x3822a0(0x1b0)](_0x1fffb0=>G(_0x20238e[_0x3822a0(0x148)][_0x3822a0(0x178)][_0x1fffb0],_0x3b3d87,_0x5cb4ac))[_0x3822a0(0x18f)](Boolean);return Object['values'](_0x20238e[_0x3822a0(0x148)][_0x3822a0(0x153)])[_0x3822a0(0x19c)](_0x2a82a8=>{const _0x520f61=_0x3822a0;this['_userService'][_0x520f61(0x186)](_0x2a82a8);}),_0xe4f853;}[_0x501199(0x162)](_0x1e4785){const _0x133ab1=_0x501199;return{'id':_0x1e4785['id'],'threadId':_0x1e4785['threadId'],'ref':_0x1e4785[_0x133ab1(0x184)]};}};g=x([_(0x0,c['Inject'](P[_0x501199(0x1b9)])),_(0x1,c[_0x501199(0x151)](c[_0x501199(0x1a7)])),_(0x2,c[_0x501199(0x151)](b[_0x501199(0x14c)])),_(0x3,c[_0x501199(0x151)](c['Injector']))],g);var H=Object[_0x501199(0x1c2)],J=(_0x2aeccc,_0x4c6e11,_0x4c3a05,_0x532e4b)=>{const _0x244ebd=_0x501199;for(var _0x256657=_0x532e4b>0x1?void 0x0:_0x532e4b?H(_0x4c6e11,_0x4c3a05):_0x4c6e11,_0x129c48=_0x2aeccc[_0x244ebd(0x18d)]-0x1,_0xa16a73;_0x129c48>=0x0;_0x129c48--)(_0xa16a73=_0x2aeccc[_0x129c48])&&(_0x256657=_0xa16a73(_0x256657)||_0x256657);return _0x256657;},y=(_0x53a951,_0x2f5215)=>(_0x4e94ed,_0x5e5d48)=>_0x2f5215(_0x4e94ed,_0x5e5d48,_0x53a951);let C=class extends c[_0x501199(0x198)]{constructor(_0x25b811,_0x47ea47){const _0x4c8e95=_0x501199;super(),this['_threadCommentDataSourceService']=_0x25b811,this[_0x4c8e95(0x17a)]=_0x47ea47,this['_initDataSource']();}[_0x501199(0x193)](){const _0x2da8c0=_0x501199;this[_0x2da8c0(0x16b)][_0x2da8c0(0x18e)]=this['_threadCommentDataSource'],this[_0x2da8c0(0x16b)][_0x2da8c0(0x1ba)]=!0x1;}};C=J([y(0x0,M[_0x501199(0x177)]),y(0x1,c[_0x501199(0x151)](g))],C);var F=Object['defineProperty'],L=Object[_0x501199(0x1c2)],Z=(_0x37152f,_0x5ccb18,_0x29716e)=>_0x5ccb18 in _0x37152f?F(_0x37152f,_0x5ccb18,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29716e}):_0x37152f[_0x5ccb18]=_0x29716e,W=(_0x34ff8c,_0x1726fa,_0x48d3c1,_0x43c231)=>{const _0x55d4e4=_0x501199;for(var _0x505207=_0x43c231>0x1?void 0x0:_0x43c231?L(_0x1726fa,_0x48d3c1):_0x1726fa,_0x553b57=_0x34ff8c[_0x55d4e4(0x18d)]-0x1,_0x17d2a2;_0x553b57>=0x0;_0x553b57--)(_0x17d2a2=_0x34ff8c[_0x553b57])&&(_0x505207=_0x17d2a2(_0x505207)||_0x505207);return _0x505207;},O=(_0x15de8e,_0x40a296)=>(_0x523a83,_0x552d71)=>_0x40a296(_0x523a83,_0x552d71,_0x15de8e),N=(_0x4e8062,_0x471134,_0x536a94)=>Z(_0x4e8062,typeof _0x471134!=_0x501199(0x168)?_0x471134+'':_0x471134,_0x536a94);exports[_0x501199(0x1bf)]=class extends c['Plugin']{constructor(_0x54c9b8=D,_0x2fbc88,_0x1fdb86){const _0x4ff6e7=_0x501199;super(),this['_config']=_0x54c9b8,this[_0x4ff6e7(0x16c)]=_0x2fbc88,this['_configService']=_0x1fdb86;const {..._0x3d16c8}=c[_0x4ff6e7(0x1b1)]({},D,this[_0x4ff6e7(0x1c0)]);this[_0x4ff6e7(0x183)][_0x4ff6e7(0x174)](q,_0x3d16c8);}['onStarting'](){const _0x306672=_0x501199;[[g],[C],[p]][_0x306672(0x19c)](_0x165345=>{const _0x4a097a=_0x306672;this['_injector'][_0x4a097a(0x17b)](_0x165345);});}[_0x501199(0x1bb)](){const _0x20b12e=_0x501199;this[_0x20b12e(0x16c)][_0x20b12e(0x157)](C),this[_0x20b12e(0x16c)][_0x20b12e(0x157)](p);}},N(exports[_0x501199(0x1bf)],_0x501199(0x169),U),N(exports[_0x501199(0x1bf)],_0x501199(0x18b),c[_0x501199(0x1ac)][_0x501199(0x1a1)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x501199(0x1c1)](j['UniverThreadCommentUIPlugin'],b[_0x501199(0x187)],T[_0x501199(0x1aa)]),O(0x1,c[_0x501199(0x151)](c[_0x501199(0x19f)])),O(0x2,c[_0x501199(0x1a8)])],exports[_0x501199(0x1bf)]);
1
+ 'use strict';const _0x347084=_0x4776;(function(_0x453905,_0x116c3f){const _0x1a6a04=_0x4776,_0x1a4966=_0x453905();while(!![]){try{const _0x88c851=-parseInt(_0x1a6a04(0x248))/0x1+-parseInt(_0x1a6a04(0x20a))/0x2*(-parseInt(_0x1a6a04(0x1f3))/0x3)+-parseInt(_0x1a6a04(0x202))/0x4+parseInt(_0x1a6a04(0x20c))/0x5+-parseInt(_0x1a6a04(0x21e))/0x6*(parseInt(_0x1a6a04(0x234))/0x7)+parseInt(_0x1a6a04(0x1eb))/0x8+-parseInt(_0x1a6a04(0x24d))/0x9;if(_0x88c851===_0x116c3f)break;else _0x1a4966['push'](_0x1a4966['shift']());}catch(_0x45c40e){_0x1a4966['push'](_0x1a4966['shift']());}}}(_0x5ba4,0x42acb));function _0x4776(_0x510854,_0x31bb3b){const _0x5ba441=_0x5ba4();return _0x4776=function(_0x477615,_0x5e53d8){_0x477615=_0x477615-0x1de;let _0xf18d08=_0x5ba441[_0x477615];return _0xf18d08;},_0x4776(_0x510854,_0x31bb3b);}Object[_0x347084(0x240)](exports,Symbol['toStringTag'],{'value':_0x347084(0x1f8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4a2390=>(_0x4a2390[_0x4a2390['OpenOrReOpen']=0x0]=_0x347084(0x216),_0x4a2390[_0x4a2390[_0x347084(0x22c)]=0x1]='Solved',_0x4a2390[_0x4a2390[_0x347084(0x24f)]=-0x1]=_0x347084(0x24f),_0x4a2390))(I||{}),v=(_0x1baf7a=>(_0x1baf7a[_0x1baf7a[_0x347084(0x1e6)]=0x0]='Unknown',_0x1baf7a[_0x1baf7a[_0x347084(0x210)]=0x1]=_0x347084(0x210),_0x1baf7a[_0x1baf7a['Reply']=0x2]=_0x347084(0x24c),_0x1baf7a[_0x1baf7a[_0x347084(0x23a)]=0x3]='Edit',_0x1baf7a[_0x1baf7a[_0x347084(0x1e9)]=0x4]=_0x347084(0x1e9),_0x1baf7a[_0x1baf7a[_0x347084(0x1ec)]=0x5]=_0x347084(0x1ec),_0x1baf7a[_0x1baf7a[_0x347084(0x24f)]=-0x1]=_0x347084(0x24f),_0x1baf7a))(v||{});const f=_0x5e5114=>c[_0x347084(0x23e)](new Date(+_0x5e5114))[_0x347084(0x1f0)](_0x347084(0x228)),R=async(_0x1cc0d5,_0x5d52e3)=>{const _0x3b4c8f=_0x347084,_0x2c15cd=_0x1cc0d5[_0x3b4c8f(0x222)](c[_0x3b4c8f(0x241)]),_0x54a0bb=_0x1cc0d5['get'](P['HTTPService']);_0x5d52e3[_0x3b4c8f(0x1e2)](_0x185188=>{const _0xf5e62c=_0x3b4c8f;_0x2c15cd[_0xf5e62c(0x21f)](_0x185188)&&_0x5d52e3[_0xf5e62c(0x215)](_0x185188);}),_0x5d52e3[_0x3b4c8f(0x207)]&&(await _0x54a0bb[_0x3b4c8f(0x222)](_0x3b4c8f(0x230),{'params':{'userIDs':[..._0x5d52e3]}}))[_0x3b4c8f(0x24b)][_0x3b4c8f(0x1e0)][_0x3b4c8f(0x1e2)](_0x32f571=>{const _0x25454b=_0x3b4c8f;_0x32f571&&_0x2c15cd[_0x25454b(0x233)](_0x32f571);});};var $=Object[_0x347084(0x219)],E=(_0x9546db,_0x345c16,_0x26cfa3,_0x302d5a)=>{const _0xbfc91f=_0x347084;for(var _0x37cbba=_0x302d5a>0x1?void 0x0:_0x302d5a?$(_0x345c16,_0x26cfa3):_0x345c16,_0x404259=_0x9546db[_0xbfc91f(0x22e)]-0x1,_0x5b9bcc;_0x404259>=0x0;_0x404259--)(_0x5b9bcc=_0x9546db[_0x404259])&&(_0x37cbba=_0x5b9bcc(_0x37cbba)||_0x37cbba);return _0x37cbba;},S=(_0x24092,_0x47552b)=>(_0x2744ea,_0x1e9742)=>_0x47552b(_0x2744ea,_0x1e9742,_0x24092);let p=class extends c['Disposable']{constructor(_0x73b320,_0x49fac9,_0x2f2eca,_0x144978){const _0x3144bb=_0x347084;super(),this[_0x3144bb(0x21c)]=_0x73b320,this['_threadCommentModel']=_0x49fac9,this[_0x3144bb(0x243)]=_0x2f2eca,this['_injector']=_0x144978,this[_0x3144bb(0x224)](),this[_0x3144bb(0x255)]();}[_0x347084(0x255)](){const _0x461fc5=_0x347084;this['disposeWithMe'](this[_0x461fc5(0x212)]['commentUpdate$'][_0x461fc5(0x223)](w[_0x461fc5(0x1f5)](0x10))[_0x461fc5(0x236)](_0x22cea4=>{const _0x4c3aaa=_0x461fc5,_0x4e92a8=new Set();_0x22cea4[_0x4c3aaa(0x1e2)](_0x225b8c=>{const _0x49e558=_0x4c3aaa;switch(_0x225b8c[_0x49e558(0x242)]){case'add':{const _0x1575e6=_0x225b8c['payload']['personId'];_0x4e92a8[_0x49e558(0x231)](_0x1575e6);break;}}}),R(this['_injector'],_0x4e92a8);}));}['_init'](){const _0x42a141=_0x347084;this[_0x42a141(0x22b)](this[_0x42a141(0x21c)]['commentUpdate$']['subscribe'](async _0xf52fee=>{const _0x2c29be=_0x42a141;var _0x3c3eab,_0x284d80,_0xf67595,_0x5c1784;const _0x1ae3cf=(_0x3c3eab=this['_threadCommentModel'][_0x2c29be(0x22f)](_0xf52fee[_0x2c29be(0x22a)])[_0x2c29be(0x1ed)](_0x56805e=>_0x56805e['threadId']===_0xf52fee[_0x2c29be(0x238)]))==null?void 0x0:_0x3c3eab[_0x2c29be(0x208)];if(!_0x1ae3cf)return;const {unitId:_0xd5b860,subUnitId:_0x3ce8f1}=_0x1ae3cf;switch(_0xf52fee[_0x2c29be(0x1f6)]&&this[_0x2c29be(0x243)][_0x2c29be(0x233)](_0xf52fee[_0x2c29be(0x1f6)]),_0xf52fee[_0x2c29be(0x242)]){case v['Add']:break;case v[_0x2c29be(0x24c)]:{this[_0x2c29be(0x212)]['addComment'](_0xd5b860,_0x3ce8f1,{'unitId':_0xd5b860,'subUnitId':_0x3ce8f1,'ref':'','id':_0xf52fee[_0x2c29be(0x217)],'dT':f(+_0xf52fee['createTimestamp']),'threadId':_0xf52fee[_0x2c29be(0x238)],'personId':(_0xf67595=(_0x284d80=_0xf52fee[_0x2c29be(0x1f6)])==null?void 0x0:_0x284d80[_0x2c29be(0x1f1)])!=null?_0xf67595:_0xf52fee[_0x2c29be(0x225)],'text':JSON[_0x2c29be(0x20b)](_0xf52fee['content']),'parentId':_0x1ae3cf['id']});break;}case v[_0x2c29be(0x1e9)]:{const _0x567d24=this[_0x2c29be(0x212)][_0x2c29be(0x252)](_0xd5b860,_0x3ce8f1,_0xf52fee[_0x2c29be(0x217)]);_0x567d24&&_0x567d24['parentId']&&this[_0x2c29be(0x212)][_0x2c29be(0x1fd)](_0xd5b860,_0x3ce8f1,_0xf52fee[_0x2c29be(0x217)]);break;}case v['Edit']:{this[_0x2c29be(0x212)][_0x2c29be(0x23f)](_0xd5b860,_0x3ce8f1,{'commentId':_0xf52fee[_0x2c29be(0x217)],'text':JSON[_0x2c29be(0x20b)](_0xf52fee[_0x2c29be(0x21d)])});break;}case v[_0x2c29be(0x1ec)]:{const _0x1db5a1=(_0x5c1784=this[_0x2c29be(0x212)]['getUnit'](_0xf52fee['unitId'])[_0x2c29be(0x1ed)](_0x2c67ab=>_0x2c67ab['threadId']===_0xf52fee[_0x2c29be(0x238)]))==null?void 0x0:_0x5c1784[_0x2c29be(0x208)];_0x1db5a1&&this[_0x2c29be(0x212)][_0x2c29be(0x1ef)](_0xd5b860,_0x3ce8f1,_0x1db5a1['id'],_0xf52fee['solved']===I[_0x2c29be(0x22c)]);break;}}}));}};p=E([S(0x0,c[_0x347084(0x235)](b[_0x347084(0x246)])),S(0x1,c[_0x347084(0x235)](M[_0x347084(0x1f7)])),S(0x2,c['Inject'](c[_0x347084(0x241)])),S(0x3,c['Inject'](c[_0x347084(0x213)]))],p);const q=_0x347084(0x21b),D={};var A=Object[_0x347084(0x219)],x=(_0xefb70f,_0x51c742,_0x354ea7,_0x17cd5e)=>{for(var _0x576b40=_0x17cd5e>0x1?void 0x0:_0x17cd5e?A(_0x51c742,_0x354ea7):_0x51c742,_0x5a6bc0=_0xefb70f['length']-0x1,_0x286e47;_0x5a6bc0>=0x0;_0x5a6bc0--)(_0x286e47=_0xefb70f[_0x5a6bc0])&&(_0x576b40=_0x286e47(_0x576b40)||_0x576b40);return _0x576b40;},_=(_0x1b32bf,_0x46e5c3)=>(_0xd94bed,_0x5e117d)=>_0x46e5c3(_0xd94bed,_0x5e117d,_0x1b32bf);function Y(_0x1416b2,_0x24fb53){const _0x177688=_0x347084,_0x3246f9=_0x1416b2[_0x177688(0x1ff)][0x0];return{..._0x24fb53,'id':_0x3246f9[_0x177688(0x217)],'resolved':_0x1416b2[_0x177688(0x203)]===0x1,'dT':f(_0x3246f9[_0x177688(0x251)]),'personId':_0x3246f9[_0x177688(0x225)],'threadId':_0x3246f9[_0x177688(0x238)]};}function _0x5ba4(){const _0x46c5a5=['UNRECOGNIZED','slice','createTimestamp','getComment','error','CustomRangeType','_initUserSync','UniverInstanceType','code','users','/list','forEach','onStarting','rangeId','listComments','Unknown','post','merge','Delete','HTTPService','2538456dSGcGS','Solve','find','UniverThreadCommentDataSourcePlugin','resolveComment','format','userID','/edit','3MGiMGH','_threadCommentDataSource','bufferTime','user','ThreadCommentModel','Module','_initDataSource','setConfig','requireSession','_threadCommentDataSourceService','deleteComment','UniverCollaborationClientPlugin','replies','/add','filter','1531264gtaRaJ','solved','comments','resolved','/delete','size','root','IConfigService','1055732UNRpzH','parse','2289630hOvWQo','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','onReady','Add','Plugin','_threadCommentModel','Injector','addComment','delete','OpenOrReOpen','replyId','symbol','getOwnPropertyDescriptor','_httpService','thread-comment-data-source.config','_commentService','content','60xrkjwG','getUser','CollaborationSessionService','/universer-api/comment/unit/','get','pipe','_init','userId','Disposable','rangeType','YYYY/MM/DD\x20HH:mm','_sessionService','unitId','disposeWithMe','Solved','_config','length','getUnit','/universer-api/user/list','add','saveCommentToSnapshot','addUser','132146PqiKJb','Inject','subscribe','COMMENT','threadId','UniverLicensePlugin','Edit','syncUpdateMutationToColla','_configService','stringify','dayjs','updateComment','defineProperty','UserManagerService','type','_userService','_injector','comment','CommentService','map','355238mKuJwm','customRanges','pluginName','body','Reply','928494qjwKHk','values'];_0x5ba4=function(){return _0x46c5a5;};return _0x5ba4();}function G(_0x1b59b0,_0x4d3128,_0x38f183){const _0x14ddd8=_0x347084;var _0x39bc04,_0xbdda2a;if(((_0xbdda2a=(_0x39bc04=_0x1b59b0==null?void 0x0:_0x1b59b0['replies'])==null?void 0x0:_0x39bc04[_0x14ddd8(0x22e)])!=null?_0xbdda2a:0x0)>0x0){const _0xcc5ac1=(_0x2ecb91,_0x5c7734)=>({'id':_0x2ecb91[_0x14ddd8(0x217)],'threadId':_0x2ecb91[_0x14ddd8(0x238)],'dT':f(_0x2ecb91[_0x14ddd8(0x251)]),'personId':_0x2ecb91[_0x14ddd8(0x225)],'resolved':_0x1b59b0['solved']===I[_0x14ddd8(0x22c)],'unitId':_0x4d3128,'subUnitId':_0x38f183,'text':JSON['parse'](_0x2ecb91['content']),'parentId':_0x5c7734}),_0x2264a6=_0xcc5ac1(_0x1b59b0[_0x14ddd8(0x1ff)][0x0]);return{..._0x2264a6,'children':_0x1b59b0[_0x14ddd8(0x1ff)][_0x14ddd8(0x250)](0x1)['map'](_0x5507dd=>_0xcc5ac1(_0x5507dd,_0x2264a6['id']))};}return null;}let g=class{constructor(_0x41a525,_0xa7d7bb,_0xe96236,_0x3aa911){const _0x3b83bf=_0x347084;this['_httpService']=_0x41a525,this['_userService']=_0xa7d7bb,this[_0x3b83bf(0x229)]=_0xe96236,this[_0x3b83bf(0x244)]=_0x3aa911;}async[_0x347084(0x214)](_0x4cca6c){const _0x5d3b91=_0x347084;var _0x61f202,_0x2a3729;const {parentId:_0x22ea19,unitId:_0x1f75cb,text:_0x2cf3de,threadId:_0x3e5e85}=_0x4cca6c,_0x3d414e=(_0x2a3729=(_0x61f202=_0x2cf3de[_0x5d3b91(0x249)])==null?void 0x0:_0x61f202['filter'](_0x4d8e0a=>_0x4d8e0a[_0x5d3b91(0x227)]===c['CustomRangeType'][_0x5d3b91(0x237)])['map'](_0x5783d5=>_0x5783d5['rangeId']))!=null?_0x2a3729:[],_0x890c9a=JSON['stringify'](_0x2cf3de),_0x4b93b2=(await this[_0x5d3b91(0x229)][_0x5d3b91(0x1fb)](_0x1f75cb))['getMemberID']();if(_0x22ea19){const _0x202aef={'memberId':_0x4b93b2,'unitId':_0x1f75cb,'content':_0x890c9a,'mention':_0x3d414e,'threadId':_0x3e5e85},_0x2f8d72=(await this['_httpService'][_0x5d3b91(0x1e7)]('/universer-api/comment/unit/'+_0x1f75cb+'/reply',{'body':_0x202aef}))[_0x5d3b91(0x24b)]['reply'];return{..._0x4cca6c,'id':_0x2f8d72[_0x5d3b91(0x217)],'dT':c[_0x5d3b91(0x23e)](+_0x2f8d72['createTimestamp'])[_0x5d3b91(0x1f0)](_0x5d3b91(0x228)),'personId':_0x2f8d72[_0x5d3b91(0x225)]};}else{const _0x1ff11b={'memberId':_0x4b93b2,'unitId':_0x1f75cb,'content':_0x890c9a,'mention':_0x3d414e},_0x36a846=await this[_0x5d3b91(0x21a)][_0x5d3b91(0x1e7)]('/universer-api/comment/unit/'+_0x1f75cb+_0x5d3b91(0x200),{'body':_0x1ff11b});return Y(_0x36a846['body'][_0x5d3b91(0x245)],_0x4cca6c);}}async[_0x347084(0x23f)](_0x3d21dd){const _0x1e648f=_0x347084;var _0xb05680,_0x5311d5;const {text:_0x320d70,unitId:_0x3ff537}=_0x3d21dd,_0x23974d=(_0x5311d5=(_0xb05680=_0x320d70[_0x1e648f(0x249)])==null?void 0x0:_0xb05680[_0x1e648f(0x201)](_0x20d0a4=>_0x20d0a4[_0x1e648f(0x227)]===c[_0x1e648f(0x254)][_0x1e648f(0x237)])['map'](_0x4842f9=>_0x4842f9[_0x1e648f(0x1e4)]))!=null?_0x5311d5:[],_0x5804e8=JSON[_0x1e648f(0x23d)](_0x320d70),_0x484fff=_0x3d21dd['threadId'],_0x438d33=_0x3d21dd['id'],_0x2270ce={'memberId':(await this[_0x1e648f(0x229)]['requireSession'](_0x3ff537))['getMemberID'](),'unitId':_0x3ff537,'threadId':_0x484fff,'mention':_0x23974d,'content':_0x5804e8,'replyId':_0x438d33},_0x4ba91c=await this[_0x1e648f(0x21a)][_0x1e648f(0x1e7)]('/universer-api/comment/unit/'+_0x3ff537+_0x1e648f(0x1f2),{'body':_0x2270ce});return!_0x4ba91c['body']['error']||_0x4ba91c['body']['error'][_0x1e648f(0x1df)]===0x1;}async[_0x347084(0x1ef)](_0x586171){const _0x45e425=_0x347084,{unitId:_0x27d8d6}=_0x586171,_0x17c88e=_0x586171['threadId'],_0x576183={'memberId':this[_0x45e425(0x243)]['getCurrentUser']()['userID'],'unitId':_0x27d8d6,'threadId':_0x17c88e,'solved':_0x586171[_0x45e425(0x205)]?I['Solved']:I[_0x45e425(0x216)]},_0x93b3d5=await this['_httpService'][_0x45e425(0x1e7)]('/universer-api/comment/unit/'+_0x27d8d6+'/solved',{'body':_0x576183});return!_0x93b3d5['body'][_0x45e425(0x253)]||_0x93b3d5['body'][_0x45e425(0x253)][_0x45e425(0x1df)]===0x1;}async[_0x347084(0x1fd)](_0x42c63f,_0x48f6ac,_0x2e4a92,_0x2be286){const _0x4f9d20=_0x347084,_0x5e5d42={'memberId':(await this['_sessionService'][_0x4f9d20(0x1fb)](_0x42c63f))['getMemberID'](),'threadId':_0x2e4a92,'replyId':_0x2be286,'unitId':_0x42c63f},_0x98a617=await this['_httpService'][_0x4f9d20(0x1e7)](_0x4f9d20(0x221)+_0x42c63f+_0x4f9d20(0x206),{'body':_0x5e5d42});return!_0x98a617['body'][_0x4f9d20(0x253)]||_0x98a617[_0x4f9d20(0x24b)]['error'][_0x4f9d20(0x1df)]===0x1;}async[_0x347084(0x1e5)](_0x48038f,_0x43e55c,_0x504017){const _0x400754=_0x347084,_0x4ce622={'unitId':_0x48038f,'threadId':_0x504017},_0x22c09d=await this['_httpService'][_0x400754(0x1e7)](_0x400754(0x221)+_0x48038f+_0x400754(0x1e1),{'body':_0x4ce622}),_0x20904f=_0x504017[_0x400754(0x247)](_0x10cb80=>G(_0x22c09d['body'][_0x400754(0x204)][_0x10cb80],_0x48038f,_0x43e55c))[_0x400754(0x201)](Boolean);return Object[_0x400754(0x24e)](_0x22c09d[_0x400754(0x24b)][_0x400754(0x1e0)])[_0x400754(0x1e2)](_0x85cb91=>{const _0x572345=_0x400754;this[_0x572345(0x243)][_0x572345(0x233)](_0x85cb91);}),_0x20904f;}[_0x347084(0x232)](_0x57a31e){const _0xa5ca16=_0x347084;return{'id':_0x57a31e['id'],'threadId':_0x57a31e[_0xa5ca16(0x238)],'ref':_0x57a31e['ref']};}};g=x([_(0x0,c['Inject'](P[_0x347084(0x1ea)])),_(0x1,c[_0x347084(0x235)](c[_0x347084(0x241)])),_(0x2,c[_0x347084(0x235)](b[_0x347084(0x220)])),_(0x3,c[_0x347084(0x235)](c[_0x347084(0x213)]))],g);var H=Object[_0x347084(0x219)],J=(_0x1429b1,_0x2db0ed,_0x28b031,_0x4f1507)=>{const _0x17438a=_0x347084;for(var _0x531942=_0x4f1507>0x1?void 0x0:_0x4f1507?H(_0x2db0ed,_0x28b031):_0x2db0ed,_0x5335d5=_0x1429b1[_0x17438a(0x22e)]-0x1,_0x1d894a;_0x5335d5>=0x0;_0x5335d5--)(_0x1d894a=_0x1429b1[_0x5335d5])&&(_0x531942=_0x1d894a(_0x531942)||_0x531942);return _0x531942;},y=(_0x19da57,_0x128bcd)=>(_0x17e7cd,_0x585671)=>_0x128bcd(_0x17e7cd,_0x585671,_0x19da57);let C=class extends c[_0x347084(0x226)]{constructor(_0xe65574,_0x3006a1){const _0x280c35=_0x347084;super(),this[_0x280c35(0x1fc)]=_0xe65574,this['_threadCommentDataSource']=_0x3006a1,this[_0x280c35(0x1f9)]();}[_0x347084(0x1f9)](){const _0x22d662=_0x347084;this['_threadCommentDataSourceService']['dataSource']=this[_0x22d662(0x1f4)],this[_0x22d662(0x1fc)][_0x22d662(0x23b)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x347084(0x235)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x2eadc3,_0x4100b2,_0x4ac010)=>_0x4100b2 in _0x2eadc3?F(_0x2eadc3,_0x4100b2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ac010}):_0x2eadc3[_0x4100b2]=_0x4ac010,W=(_0x24022d,_0x29b1f5,_0x5eec74,_0x5dcde1)=>{const _0x4fc8ad=_0x347084;for(var _0x8b18dd=_0x5dcde1>0x1?void 0x0:_0x5dcde1?L(_0x29b1f5,_0x5eec74):_0x29b1f5,_0x3b85ef=_0x24022d[_0x4fc8ad(0x22e)]-0x1,_0x57d638;_0x3b85ef>=0x0;_0x3b85ef--)(_0x57d638=_0x24022d[_0x3b85ef])&&(_0x8b18dd=_0x57d638(_0x8b18dd)||_0x8b18dd);return _0x8b18dd;},O=(_0x1580bc,_0x2f746a)=>(_0x4c4df7,_0x35457c)=>_0x2f746a(_0x4c4df7,_0x35457c,_0x1580bc),N=(_0x53ea26,_0x32c70a,_0x3f8c39)=>Z(_0x53ea26,typeof _0x32c70a!=_0x347084(0x218)?_0x32c70a+'':_0x32c70a,_0x3f8c39);exports[_0x347084(0x1ee)]=class extends c[_0x347084(0x211)]{constructor(_0x26b856=D,_0x2a86a0,_0xd27f04){const _0x1837af=_0x347084;super(),this['_config']=_0x26b856,this[_0x1837af(0x244)]=_0x2a86a0,this[_0x1837af(0x23c)]=_0xd27f04;const {..._0x3fe716}=c[_0x1837af(0x1e8)]({},D,this[_0x1837af(0x22d)]);this[_0x1837af(0x23c)][_0x1837af(0x1fa)](q,_0x3fe716);}[_0x347084(0x1e3)](){[[g],[C],[p]]['forEach'](_0x439b7f=>{const _0x5d96ba=_0x4776;this['_injector'][_0x5d96ba(0x231)](_0x439b7f);});}[_0x347084(0x20f)](){const _0x33945a=_0x347084;this[_0x33945a(0x244)][_0x33945a(0x222)](C),this[_0x33945a(0x244)]['get'](p);}},N(exports[_0x347084(0x1ee)],_0x347084(0x24a),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x347084(0x242),c[_0x347084(0x1de)][_0x347084(0x20e)]),exports[_0x347084(0x1ee)]=W([c['DependentOn'](j[_0x347084(0x20d)],b[_0x347084(0x1fe)],T[_0x347084(0x239)]),O(0x1,c[_0x347084(0x235)](c[_0x347084(0x213)])),O(0x2,c[_0x347084(0x209)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12dc97=_0x1bc5;(function(_0x21e0c9,_0xb78217){const _0x4b0789=_0x1bc5,_0x3e8e66=_0x21e0c9();while(!![]){try{const _0x35f53c=parseInt(_0x4b0789(0x134))/0x1*(parseInt(_0x4b0789(0x142))/0x2)+parseInt(_0x4b0789(0x14b))/0x3*(parseInt(_0x4b0789(0x112))/0x4)+parseInt(_0x4b0789(0x10e))/0x5*(parseInt(_0x4b0789(0xfa))/0x6)+parseInt(_0x4b0789(0x108))/0x7*(parseInt(_0x4b0789(0x141))/0x8)+parseInt(_0x4b0789(0x140))/0x9+parseInt(_0x4b0789(0x11e))/0xa+-parseInt(_0x4b0789(0x103))/0xb;if(_0x35f53c===_0xb78217)break;else _0x3e8e66['push'](_0x3e8e66['shift']());}catch(_0x4b5e2a){_0x3e8e66['push'](_0x3e8e66['shift']());}}}(_0x430d,0x2cae5));import{CommentService as _0x26d6de,CollaborationSessionService as _0x289268,UniverCollaborationClientPlugin as _0x40d0cd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a9e0e}from'@univerjs-pro/license';import{dayjs as _0x3f2441,UserManagerService as _0x2bf58a,Inject as _0x4b87e2,Injector as _0x1f0779,Disposable as _0x19e379,CustomRangeType as _0x1f5b42,UniverInstanceType as _0x1dc825,DependentOn as _0x1af6a9,IConfigService as _0x359526,Plugin as _0x44e7f1,merge as _0x486a2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f422}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e1fd,IThreadCommentDataSourceService as _0x245cbd}from'@univerjs/thread-comment';import{bufferTime as _0x24cc49}from'rxjs';import{HTTPService as _0x51d949}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a750a=>(_0x3a750a[_0x3a750a[_0x12dc97(0x145)]=0x0]=_0x12dc97(0x145),_0x3a750a[_0x3a750a[_0x12dc97(0xf8)]=0x1]='Solved',_0x3a750a[_0x3a750a[_0x12dc97(0x13f)]=-0x1]='UNRECOGNIZED',_0x3a750a))(I||{}),v=(_0x414d9b=>(_0x414d9b[_0x414d9b[_0x12dc97(0x113)]=0x0]='Unknown',_0x414d9b[_0x414d9b[_0x12dc97(0x124)]=0x1]='Add',_0x414d9b[_0x414d9b['Reply']=0x2]=_0x12dc97(0x128),_0x414d9b[_0x414d9b[_0x12dc97(0x117)]=0x3]=_0x12dc97(0x117),_0x414d9b[_0x414d9b[_0x12dc97(0xe8)]=0x4]=_0x12dc97(0xe8),_0x414d9b[_0x414d9b[_0x12dc97(0x127)]=0x5]=_0x12dc97(0x127),_0x414d9b[_0x414d9b[_0x12dc97(0x13f)]=-0x1]=_0x12dc97(0x13f),_0x414d9b))(v||{});const D=_0x27e895=>_0x3f2441(new Date(+_0x27e895))[_0x12dc97(0x10b)](_0x12dc97(0xf9)),B=async(_0x58b841,_0x2da5f9)=>{const _0x2d2095=_0x12dc97,_0x5e3cb9=_0x58b841[_0x2d2095(0xf6)](_0x2bf58a),_0x54736e=_0x58b841['get'](_0x51d949);_0x2da5f9[_0x2d2095(0x13b)](_0x5b6471=>{const _0x14705b=_0x2d2095;_0x5e3cb9[_0x14705b(0x11c)](_0x5b6471)&&_0x2da5f9[_0x14705b(0x12c)](_0x5b6471);}),_0x2da5f9['size']&&(await _0x54736e[_0x2d2095(0xf6)](_0x2d2095(0x148),{'params':{'userIDs':[..._0x2da5f9]}}))[_0x2d2095(0xf1)][_0x2d2095(0xfe)][_0x2d2095(0x13b)](_0x125b92=>{const _0x4edf14=_0x2d2095;_0x125b92&&_0x5e3cb9[_0x4edf14(0x102)](_0x125b92);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3ce21e,_0x1fd4b6,_0x1d763e,_0x10c07f)=>{const _0x1b0931=_0x12dc97;for(var _0x5131a3=_0x10c07f>0x1?void 0x0:_0x10c07f?K(_0x1fd4b6,_0x1d763e):_0x1fd4b6,_0x5eac7a=_0x3ce21e[_0x1b0931(0x110)]-0x1,_0x2680c7;_0x5eac7a>=0x0;_0x5eac7a--)(_0x2680c7=_0x3ce21e[_0x5eac7a])&&(_0x5131a3=_0x2680c7(_0x5131a3)||_0x5131a3);return _0x5131a3;},p=(_0x32bc87,_0x45f52f)=>(_0x17021e,_0x420734)=>_0x45f52f(_0x17021e,_0x420734,_0x32bc87);let S=class extends _0x19e379{constructor(_0x171470,_0x3112bf,_0x57358c,_0x3f34b3){const _0x51f7b9=_0x12dc97;super(),this['_commentService']=_0x171470,this[_0x51f7b9(0x147)]=_0x3112bf,this[_0x51f7b9(0x10c)]=_0x57358c,this[_0x51f7b9(0x138)]=_0x3f34b3,this['_init'](),this['_initUserSync']();}[_0x12dc97(0x133)](){const _0x1958da=_0x12dc97;this[_0x1958da(0xef)](this[_0x1958da(0x147)][_0x1958da(0xf5)][_0x1958da(0x131)](_0x24cc49(0x10))[_0x1958da(0x132)](_0x47f92b=>{const _0x18c78e=_0x1958da,_0x16770c=new Set();_0x47f92b['forEach'](_0x5f08fe=>{const _0x2abbb8=_0x1bc5;switch(_0x5f08fe[_0x2abbb8(0x135)]){case'add':{const _0x1dd540=_0x5f08fe[_0x2abbb8(0x146)]['personId'];_0x16770c[_0x2abbb8(0x10a)](_0x1dd540);break;}}}),B(this[_0x18c78e(0x138)],_0x16770c);}));}[_0x12dc97(0x101)](){const _0x29e66d=_0x12dc97;this[_0x29e66d(0xef)](this[_0x29e66d(0x130)]['commentUpdate$'][_0x29e66d(0x132)](async _0x2e6ad=>{const _0x413546=_0x29e66d;var _0x14cf0e,_0xe39692,_0x280a06,_0xeb7d0c;const _0x4bd80b=(_0x14cf0e=this['_threadCommentModel'][_0x413546(0xe7)](_0x2e6ad['unitId'])[_0x413546(0xf2)](_0x3865dd=>_0x3865dd['threadId']===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0x14cf0e[_0x413546(0x104)];if(!_0x4bd80b)return;const {unitId:_0x44d583,subUnitId:_0xf7c61c}=_0x4bd80b;switch(_0x2e6ad[_0x413546(0x120)]&&this['_userService'][_0x413546(0x102)](_0x2e6ad[_0x413546(0x120)]),_0x2e6ad[_0x413546(0x135)]){case v['Add']:break;case v['Reply']:{this[_0x413546(0x147)][_0x413546(0x13e)](_0x44d583,_0xf7c61c,{'unitId':_0x44d583,'subUnitId':_0xf7c61c,'ref':'','id':_0x2e6ad[_0x413546(0x10f)],'dT':D(+_0x2e6ad[_0x413546(0xfc)]),'threadId':_0x2e6ad[_0x413546(0xec)],'personId':(_0x280a06=(_0xe39692=_0x2e6ad[_0x413546(0x120)])==null?void 0x0:_0xe39692[_0x413546(0x126)])!=null?_0x280a06:_0x2e6ad[_0x413546(0x144)],'text':JSON['parse'](_0x2e6ad[_0x413546(0x139)]),'parentId':_0x4bd80b['id']});break;}case v['Delete']:{const _0x35e5fa=this[_0x413546(0x147)][_0x413546(0x11b)](_0x44d583,_0xf7c61c,_0x2e6ad['replyId']);_0x35e5fa&&_0x35e5fa['parentId']&&this[_0x413546(0x147)][_0x413546(0x12b)](_0x44d583,_0xf7c61c,_0x2e6ad[_0x413546(0x10f)]);break;}case v['Edit']:{this[_0x413546(0x147)][_0x413546(0x106)](_0x44d583,_0xf7c61c,{'commentId':_0x2e6ad[_0x413546(0x10f)],'text':JSON[_0x413546(0x13a)](_0x2e6ad[_0x413546(0x139)])});break;}case v['Solve']:{const _0xcbcec2=(_0xeb7d0c=this[_0x413546(0x147)]['getUnit'](_0x2e6ad[_0x413546(0x14a)])['find'](_0x1a73f8=>_0x1a73f8[_0x413546(0xec)]===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0xeb7d0c['root'];_0xcbcec2&&this[_0x413546(0x147)]['resolveComment'](_0x44d583,_0xf7c61c,_0xcbcec2['id'],_0x2e6ad[_0x413546(0x11a)]===I[_0x413546(0xf8)]);break;}}}));}};S=V([p(0x0,_0x4b87e2(_0x26d6de)),p(0x1,_0x4b87e2(_0x53e1fd)),p(0x2,_0x4b87e2(_0x2bf58a)),p(0x3,_0x4b87e2(_0x1f0779))],S);function _0x430d(){const _0x58e240=['61168qlWvQy','16AOrhaP','comment','userId','OpenOrReOpen','payload','_threadCommentModel','/universer-api/user/list','ref','unitId','69LMERwN','error','getUnit','Delete','reply','getMemberID','filter','threadId','/delete','stringify','disposeWithMe','getCurrentUser','body','find','post','_sessionService','commentUpdate$','get','_config','Solved','YYYY/MM/DD\x20HH:mm','7674iwblHh','resolveComment','createTimestamp','_configService','users','syncUpdateMutationToColla','dataSource','_init','addUser','6693522EODwxn','root','rangeId','updateComment','/solved','133LEtNuv','saveCommentToSnapshot','add','format','_userService','/edit','45bthNhX','replyId','length','/list','55676XYObVu','Unknown','comments','customRanges','getOwnPropertyDescriptor','Edit','rangeType','thread-comment-data-source.config','solved','getComment','getUser','replies','790950bcDQWk','map','user','UNIVER_UNKNOWN','/add','values','Add','COMMENT','userID','Solve','Reply','/universer-api/comment/unit/','_httpService','deleteComment','delete','code','/reply','_initDataSource','_commentService','pipe','subscribe','_initUserSync','23095CtMSSb','type','_threadCommentDataSourceService','requireSession','_injector','content','parse','forEach','setConfig','slice','addComment','UNRECOGNIZED','456642LHDjnG'];_0x430d=function(){return _0x58e240;};return _0x430d();}const z=_0x12dc97(0x119),M={};var k=Object[_0x12dc97(0x116)],Q=(_0x3cdc53,_0x2419d0,_0x1d369d,_0x32c511)=>{const _0x51f03f=_0x12dc97;for(var _0x3ec7cd=_0x32c511>0x1?void 0x0:_0x32c511?k(_0x2419d0,_0x1d369d):_0x2419d0,_0x2353c2=_0x3cdc53[_0x51f03f(0x110)]-0x1,_0x594330;_0x2353c2>=0x0;_0x2353c2--)(_0x594330=_0x3cdc53[_0x2353c2])&&(_0x3ec7cd=_0x594330(_0x3ec7cd)||_0x3ec7cd);return _0x3ec7cd;},_=(_0x1bb1f8,_0xb55261)=>(_0xf36bba,_0x1dec31)=>_0xb55261(_0xf36bba,_0x1dec31,_0x1bb1f8);function X(_0x5f457d,_0x50c699){const _0x533343=_0x12dc97,_0x229e7a=_0x5f457d[_0x533343(0x11d)][0x0];return{..._0x50c699,'id':_0x229e7a[_0x533343(0x10f)],'resolved':_0x5f457d[_0x533343(0x11a)]===0x1,'dT':D(_0x229e7a[_0x533343(0xfc)]),'personId':_0x229e7a['userId'],'threadId':_0x229e7a['threadId']};}function ee(_0xa8a2dd,_0x564d9e,_0x205136){const _0x4d5db2=_0x12dc97;var _0x5679b8,_0x5c42ef;if(((_0x5c42ef=(_0x5679b8=_0xa8a2dd==null?void 0x0:_0xa8a2dd[_0x4d5db2(0x11d)])==null?void 0x0:_0x5679b8['length'])!=null?_0x5c42ef:0x0)>0x0){const _0x4a20b8=(_0x5189f4,_0x498f8d)=>({'id':_0x5189f4[_0x4d5db2(0x10f)],'threadId':_0x5189f4[_0x4d5db2(0xec)],'dT':D(_0x5189f4[_0x4d5db2(0xfc)]),'personId':_0x5189f4[_0x4d5db2(0x144)],'resolved':_0xa8a2dd[_0x4d5db2(0x11a)]===I['Solved'],'unitId':_0x564d9e,'subUnitId':_0x205136,'text':JSON[_0x4d5db2(0x13a)](_0x5189f4[_0x4d5db2(0x139)]),'parentId':_0x498f8d}),_0xd03946=_0x4a20b8(_0xa8a2dd[_0x4d5db2(0x11d)][0x0]);return{..._0xd03946,'children':_0xa8a2dd[_0x4d5db2(0x11d)][_0x4d5db2(0x13d)](0x1)['map'](_0x22299a=>_0x4a20b8(_0x22299a,_0xd03946['id']))};}return null;}let f=class{constructor(_0x15583c,_0x46f078,_0x38a432,_0x532b82){const _0x398fc5=_0x12dc97;this[_0x398fc5(0x12a)]=_0x15583c,this[_0x398fc5(0x10c)]=_0x46f078,this['_sessionService']=_0x38a432,this[_0x398fc5(0x138)]=_0x532b82;}async[_0x12dc97(0x13e)](_0x2458a6){const _0x51e6e4=_0x12dc97;var _0x118a78,_0x50b952;const {parentId:_0x455a2f,unitId:_0x1a0de7,text:_0x3ca6c2,threadId:_0x50378d}=_0x2458a6,_0x559a62=(_0x50b952=(_0x118a78=_0x3ca6c2[_0x51e6e4(0x115)])==null?void 0x0:_0x118a78[_0x51e6e4(0xeb)](_0x5e9efe=>_0x5e9efe[_0x51e6e4(0x118)]===_0x1f5b42[_0x51e6e4(0x125)])[_0x51e6e4(0x11f)](_0x3eae8b=>_0x3eae8b[_0x51e6e4(0x105)]))!=null?_0x50b952:[],_0x74f276=JSON[_0x51e6e4(0xee)](_0x3ca6c2),_0x35b5d2=(await this[_0x51e6e4(0xf4)]['requireSession'](_0x1a0de7))[_0x51e6e4(0xea)]();if(_0x455a2f){const _0x3be33c={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62,'threadId':_0x50378d},_0x3b098f=(await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x12e),{'body':_0x3be33c}))[_0x51e6e4(0xf1)][_0x51e6e4(0xe9)];return{..._0x2458a6,'id':_0x3b098f[_0x51e6e4(0x10f)],'dT':_0x3f2441(+_0x3b098f[_0x51e6e4(0xfc)])[_0x51e6e4(0x10b)](_0x51e6e4(0xf9)),'personId':_0x3b098f['userId']};}else{const _0x3d30ae={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62},_0x1a33f9=await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x122),{'body':_0x3d30ae});return X(_0x1a33f9[_0x51e6e4(0xf1)][_0x51e6e4(0x143)],_0x2458a6);}}async[_0x12dc97(0x106)](_0x176260){const _0x40c137=_0x12dc97;var _0x2f11e7,_0x2960b5;const {text:_0x1ab132,unitId:_0xb70ca2}=_0x176260,_0x5876ab=(_0x2960b5=(_0x2f11e7=_0x1ab132['customRanges'])==null?void 0x0:_0x2f11e7[_0x40c137(0xeb)](_0x134a91=>_0x134a91[_0x40c137(0x118)]===_0x1f5b42[_0x40c137(0x125)])[_0x40c137(0x11f)](_0x4eb7d7=>_0x4eb7d7[_0x40c137(0x105)]))!=null?_0x2960b5:[],_0x19624b=JSON['stringify'](_0x1ab132),_0x6f9901=_0x176260['threadId'],_0x507486=_0x176260['id'],_0x40b8fb={'memberId':(await this['_sessionService'][_0x40c137(0x137)](_0xb70ca2))[_0x40c137(0xea)](),'unitId':_0xb70ca2,'threadId':_0x6f9901,'mention':_0x5876ab,'content':_0x19624b,'replyId':_0x507486},_0x5a2b8a=await this['_httpService'][_0x40c137(0xf3)]('/universer-api/comment/unit/'+_0xb70ca2+_0x40c137(0x10d),{'body':_0x40b8fb});return!_0x5a2b8a[_0x40c137(0xf1)]['error']||_0x5a2b8a['body'][_0x40c137(0xe6)][_0x40c137(0x12d)]===0x1;}async[_0x12dc97(0xfb)](_0x697e7a){const _0xc4aae2=_0x12dc97,{unitId:_0xb55d5e}=_0x697e7a,_0x2a97aa=_0x697e7a['threadId'],_0x97f607={'memberId':this[_0xc4aae2(0x10c)][_0xc4aae2(0xf0)]()[_0xc4aae2(0x126)],'unitId':_0xb55d5e,'threadId':_0x2a97aa,'solved':_0x697e7a['resolved']?I[_0xc4aae2(0xf8)]:I[_0xc4aae2(0x145)]},_0x138a35=await this['_httpService'][_0xc4aae2(0xf3)](_0xc4aae2(0x129)+_0xb55d5e+_0xc4aae2(0x107),{'body':_0x97f607});return!_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]||_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]['code']===0x1;}async[_0x12dc97(0x12b)](_0x47a60d,_0x234e46,_0x5aa25d,_0x553c97){const _0x284af2=_0x12dc97,_0x3b823c={'memberId':(await this[_0x284af2(0xf4)]['requireSession'](_0x47a60d))[_0x284af2(0xea)](),'threadId':_0x5aa25d,'replyId':_0x553c97,'unitId':_0x47a60d},_0xab68b0=await this[_0x284af2(0x12a)]['post'](_0x284af2(0x129)+_0x47a60d+_0x284af2(0xed),{'body':_0x3b823c});return!_0xab68b0[_0x284af2(0xf1)]['error']||_0xab68b0['body'][_0x284af2(0xe6)]['code']===0x1;}async['listComments'](_0x57fdf4,_0x893104,_0x652262){const _0x415ff7=_0x12dc97,_0x28ff76={'unitId':_0x57fdf4,'threadId':_0x652262},_0x33f5f4=await this[_0x415ff7(0x12a)][_0x415ff7(0xf3)](_0x415ff7(0x129)+_0x57fdf4+_0x415ff7(0x111),{'body':_0x28ff76}),_0x3fcc79=_0x652262[_0x415ff7(0x11f)](_0x59c5d2=>ee(_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0x114)][_0x59c5d2],_0x57fdf4,_0x893104))[_0x415ff7(0xeb)](Boolean);return Object[_0x415ff7(0x123)](_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0xfe)])['forEach'](_0x29d9b2=>{const _0x2226e0=_0x415ff7;this[_0x2226e0(0x10c)][_0x2226e0(0x102)](_0x29d9b2);}),_0x3fcc79;}[_0x12dc97(0x109)](_0x21b9e8){const _0x62f0fb=_0x12dc97;return{'id':_0x21b9e8['id'],'threadId':_0x21b9e8[_0x62f0fb(0xec)],'ref':_0x21b9e8[_0x62f0fb(0x149)]};}};f=Q([_(0x0,_0x4b87e2(_0x51d949)),_(0x1,_0x4b87e2(_0x2bf58a)),_(0x2,_0x4b87e2(_0x289268)),_(0x3,_0x4b87e2(_0x1f0779))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x15dc41,_0x33c558,_0x228c8c,_0x2d6a88)=>{const _0x5f3fd8=_0x12dc97;for(var _0x5adbfb=_0x2d6a88>0x1?void 0x0:_0x2d6a88?re(_0x33c558,_0x228c8c):_0x33c558,_0x3801fb=_0x15dc41[_0x5f3fd8(0x110)]-0x1,_0x295695;_0x3801fb>=0x0;_0x3801fb--)(_0x295695=_0x15dc41[_0x3801fb])&&(_0x5adbfb=_0x295695(_0x5adbfb)||_0x5adbfb);return _0x5adbfb;},N=(_0x16e8b6,_0x6926c8)=>(_0x5bdb47,_0x345bf7)=>_0x6926c8(_0x5bdb47,_0x345bf7,_0x16e8b6);let g=class extends _0x19e379{constructor(_0x13de5b,_0x4401d6){const _0x1317f9=_0x12dc97;super(),this[_0x1317f9(0x136)]=_0x13de5b,this['_threadCommentDataSource']=_0x4401d6,this[_0x1317f9(0x12f)]();}[_0x12dc97(0x12f)](){const _0x54d7ff=_0x12dc97;this[_0x54d7ff(0x136)][_0x54d7ff(0x100)]=this['_threadCommentDataSource'],this[_0x54d7ff(0x136)][_0x54d7ff(0xff)]=!0x1;}};g=te([N(0x0,_0x245cbd),N(0x1,_0x4b87e2(f))],g);function _0x1bc5(_0x3599da,_0x24e96e){const _0x430d10=_0x430d();return _0x1bc5=function(_0x1bc588,_0x44c62f){_0x1bc588=_0x1bc588-0xe6;let _0x57bd06=_0x430d10[_0x1bc588];return _0x57bd06;},_0x1bc5(_0x3599da,_0x24e96e);}var se=Object['defineProperty'],oe=Object[_0x12dc97(0x116)],ne=(_0x10a38a,_0x32bb98,_0x266df0)=>_0x32bb98 in _0x10a38a?se(_0x10a38a,_0x32bb98,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x266df0}):_0x10a38a[_0x32bb98]=_0x266df0,ie=(_0x283476,_0xa9d5c6,_0x1c36c3,_0x52cbc6)=>{for(var _0x574ddf=_0x52cbc6>0x1?void 0x0:_0x52cbc6?oe(_0xa9d5c6,_0x1c36c3):_0xa9d5c6,_0xe3e07=_0x283476['length']-0x1,_0x4635a1;_0xe3e07>=0x0;_0xe3e07--)(_0x4635a1=_0x283476[_0xe3e07])&&(_0x574ddf=_0x4635a1(_0x574ddf)||_0x574ddf);return _0x574ddf;},w=(_0x105342,_0x34cc49)=>(_0x124080,_0x7cf7f4)=>_0x34cc49(_0x124080,_0x7cf7f4,_0x105342),$=(_0x389833,_0x32a24d,_0x1370bc)=>ne(_0x389833,typeof _0x32a24d!='symbol'?_0x32a24d+'':_0x32a24d,_0x1370bc);let b=class extends _0x44e7f1{constructor(_0x343d69=M,_0x340bf3,_0x2a5d9b){const _0x58a938=_0x12dc97;super(),this['_config']=_0x343d69,this[_0x58a938(0x138)]=_0x340bf3,this[_0x58a938(0xfd)]=_0x2a5d9b;const {..._0x3edb9b}=_0x486a2a({},M,this[_0x58a938(0xf7)]);this[_0x58a938(0xfd)][_0x58a938(0x13c)](z,_0x3edb9b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5ce318=>{const _0x533932=_0x1bc5;this[_0x533932(0x138)][_0x533932(0x10a)](_0x5ce318);});}['onReady'](){const _0x459b9f=_0x12dc97;this[_0x459b9f(0x138)][_0x459b9f(0xf6)](g),this[_0x459b9f(0x138)][_0x459b9f(0xf6)](S);}};$(b,'pluginName',W),$(b,_0x12dc97(0x135),_0x1dc825[_0x12dc97(0x121)]),b=ie([_0x1af6a9(_0x31f422,_0x40d0cd,_0x1a9e0e),w(0x1,_0x4b87e2(_0x1f0779)),w(0x2,_0x359526)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xbf68e1=_0x1c41;(function(_0x2be46d,_0x201409){const _0x166ef4=_0x1c41,_0xe90126=_0x2be46d();while(!![]){try{const _0x18c2e5=parseInt(_0x166ef4(0x148))/0x1+-parseInt(_0x166ef4(0x14b))/0x2*(parseInt(_0x166ef4(0x14e))/0x3)+-parseInt(_0x166ef4(0x130))/0x4*(-parseInt(_0x166ef4(0x17b))/0x5)+parseInt(_0x166ef4(0x165))/0x6+-parseInt(_0x166ef4(0x121))/0x7*(parseInt(_0x166ef4(0x17a))/0x8)+parseInt(_0x166ef4(0x167))/0x9*(parseInt(_0x166ef4(0x14d))/0xa)+-parseInt(_0x166ef4(0x12e))/0xb;if(_0x18c2e5===_0x201409)break;else _0xe90126['push'](_0xe90126['shift']());}catch(_0x55eefc){_0xe90126['push'](_0xe90126['shift']());}}}(_0x39fc,0x3dc1c));import{CommentService as _0x24bf5a,CollaborationSessionService as _0x28cbe3,UniverCollaborationClientPlugin as _0x9525d4}from'@univerjs-pro/collaboration-client';function _0x39fc(){const _0x45054d=['post','_configService','ref','COMMENT','replies','get','getUser','defineProperty','/reply','921930HYOshG','forEach','549QiXcri','rangeType','symbol','Edit','content','user','_threadCommentModel','subscribe','OpenOrReOpen','_initUserSync','pipe','comments','disposeWithMe','parse','_threadCommentDataSourceService','/list','code','getOwnPropertyDescriptor','deleteComment','8cHYvvG','2502155fuuGXf','userId','/universer-api/user/list','slice','_initDataSource','onStarting','customRanges','addUser','Delete','updateComment','map','addComment','delete','getUnit','1170218oiFXSJ','getCurrentUser','body','stringify','length','personId','threadId','UNRECOGNIZED','_userService','userID','users','payload','_sessionService','648197DEFwbZ','add','4LUUVNH','resolveComment','Add','type','values','/solved','comment','setConfig','requireSession','_commentService','replyId','filter','error','/universer-api/comment/unit/','resolved','YYYY/MM/DD\x20HH:mm','getComment','_httpService','listComments','pluginName','root','solved','_config','/edit','138038DmcZue','Reply','/add','64850pfUMdo','Solved','17780OoBxTA','39WcDrPS','Solve','unitId','_injector','commentUpdate$','Unknown','format','_init','getMemberID','_threadCommentDataSource','reply','find','createTimestamp','/delete'];_0x39fc=function(){return _0x45054d;};return _0x39fc();}import{UniverLicensePlugin as _0x864633}from'@univerjs-pro/license';import{dayjs as _0x5e2681,UserManagerService as _0x4eab9e,Inject as _0x4f3a21,Injector as _0x8d5e07,Disposable as _0x5a933e,CustomRangeType as _0x1a431c,UniverInstanceType as _0x536cd8,DependentOn as _0x38802e,IConfigService as _0x350c90,Plugin as _0x32d5ff,merge as _0x40e613}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b97b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5aae77,IThreadCommentDataSourceService as _0xe116fb}from'@univerjs/thread-comment';import{bufferTime as _0x363eac}from'rxjs';import{HTTPService as _0x36f428}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3b924d=>(_0x3b924d[_0x3b924d['OpenOrReOpen']=0x0]=_0xbf68e1(0x16f),_0x3b924d[_0x3b924d[_0xbf68e1(0x14c)]=0x1]=_0xbf68e1(0x14c),_0x3b924d[_0x3b924d[_0xbf68e1(0x128)]=-0x1]='UNRECOGNIZED',_0x3b924d))(I||{}),v=(_0x3663c9=>(_0x3663c9[_0x3663c9[_0xbf68e1(0x153)]=0x0]='Unknown',_0x3663c9[_0x3663c9[_0xbf68e1(0x132)]=0x1]=_0xbf68e1(0x132),_0x3663c9[_0x3663c9[_0xbf68e1(0x149)]=0x2]='Reply',_0x3663c9[_0x3663c9[_0xbf68e1(0x16a)]=0x3]=_0xbf68e1(0x16a),_0x3663c9[_0x3663c9['Delete']=0x4]=_0xbf68e1(0x11b),_0x3663c9[_0x3663c9[_0xbf68e1(0x14f)]=0x5]='Solve',_0x3663c9[_0x3663c9[_0xbf68e1(0x128)]=-0x1]=_0xbf68e1(0x128),_0x3663c9))(v||{});const D=_0x13cf56=>_0x5e2681(new Date(+_0x13cf56))[_0xbf68e1(0x154)](_0xbf68e1(0x13f)),B=async(_0x2a7abd,_0xe2218c)=>{const _0x28c80b=_0xbf68e1,_0x4eb165=_0x2a7abd[_0x28c80b(0x161)](_0x4eab9e),_0xcb30bd=_0x2a7abd['get'](_0x36f428);_0xe2218c[_0x28c80b(0x166)](_0x4c3a2a=>{const _0x547855=_0x28c80b;_0x4eb165[_0x547855(0x162)](_0x4c3a2a)&&_0xe2218c[_0x547855(0x11f)](_0x4c3a2a);}),_0xe2218c['size']&&(await _0xcb30bd[_0x28c80b(0x161)](_0x28c80b(0x115),{'params':{'userIDs':[..._0xe2218c]}}))[_0x28c80b(0x123)]['users']['forEach'](_0x4e7eba=>{const _0x115dba=_0x28c80b;_0x4e7eba&&_0x4eb165[_0x115dba(0x11a)](_0x4e7eba);});};var K=Object[_0xbf68e1(0x178)],V=(_0x59a755,_0x382e52,_0x3f76e9,_0x5d4827)=>{const _0x3c7999=_0xbf68e1;for(var _0x429bc1=_0x5d4827>0x1?void 0x0:_0x5d4827?K(_0x382e52,_0x3f76e9):_0x382e52,_0x510dc0=_0x59a755[_0x3c7999(0x125)]-0x1,_0x253dc0;_0x510dc0>=0x0;_0x510dc0--)(_0x253dc0=_0x59a755[_0x510dc0])&&(_0x429bc1=_0x253dc0(_0x429bc1)||_0x429bc1);return _0x429bc1;},p=(_0x37ddb4,_0x5082f3)=>(_0x4d8057,_0x105950)=>_0x5082f3(_0x4d8057,_0x105950,_0x37ddb4);function _0x1c41(_0x396f2b,_0x59e721){const _0x39fc90=_0x39fc();return _0x1c41=function(_0x1c41d2,_0x4b933d){_0x1c41d2=_0x1c41d2-0x115;let _0x186892=_0x39fc90[_0x1c41d2];return _0x186892;},_0x1c41(_0x396f2b,_0x59e721);}let S=class extends _0x5a933e{constructor(_0x4e3d93,_0x3cd519,_0x4ab288,_0x1843ee){const _0x4f773d=_0xbf68e1;super(),this[_0x4f773d(0x139)]=_0x4e3d93,this[_0x4f773d(0x16d)]=_0x3cd519,this[_0x4f773d(0x129)]=_0x4ab288,this['_injector']=_0x1843ee,this[_0x4f773d(0x155)](),this[_0x4f773d(0x170)]();}['_initUserSync'](){const _0x1dd83a=_0xbf68e1;this[_0x1dd83a(0x173)](this[_0x1dd83a(0x16d)][_0x1dd83a(0x152)][_0x1dd83a(0x171)](_0x363eac(0x10))[_0x1dd83a(0x16e)](_0x112690=>{const _0x49d524=_0x1dd83a,_0x5479b=new Set();_0x112690[_0x49d524(0x166)](_0x20eec5=>{const _0x3ae9fa=_0x49d524;switch(_0x20eec5['type']){case _0x3ae9fa(0x12f):{const _0x4691de=_0x20eec5[_0x3ae9fa(0x12c)][_0x3ae9fa(0x126)];_0x5479b['add'](_0x4691de);break;}}}),B(this[_0x49d524(0x151)],_0x5479b);}));}[_0xbf68e1(0x155)](){const _0x487e35=_0xbf68e1;this['disposeWithMe'](this[_0x487e35(0x139)][_0x487e35(0x152)][_0x487e35(0x16e)](async _0x41f182=>{const _0x25ec51=_0x487e35;var _0x6e1861,_0x434a5c,_0x47cd03,_0x34fbfb;const _0x191590=(_0x6e1861=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x205a71=>_0x205a71[_0x25ec51(0x127)]===_0x41f182[_0x25ec51(0x127)]))==null?void 0x0:_0x6e1861[_0x25ec51(0x144)];if(!_0x191590)return;const {unitId:_0x1d2cf4,subUnitId:_0x554e0b}=_0x191590;switch(_0x41f182[_0x25ec51(0x16c)]&&this[_0x25ec51(0x129)][_0x25ec51(0x11a)](_0x41f182[_0x25ec51(0x16c)]),_0x41f182['type']){case v[_0x25ec51(0x132)]:break;case v[_0x25ec51(0x149)]:{this[_0x25ec51(0x16d)]['addComment'](_0x1d2cf4,_0x554e0b,{'unitId':_0x1d2cf4,'subUnitId':_0x554e0b,'ref':'','id':_0x41f182['replyId'],'dT':D(+_0x41f182[_0x25ec51(0x15a)]),'threadId':_0x41f182['threadId'],'personId':(_0x47cd03=(_0x434a5c=_0x41f182[_0x25ec51(0x16c)])==null?void 0x0:_0x434a5c[_0x25ec51(0x12a)])!=null?_0x47cd03:_0x41f182['userId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content']),'parentId':_0x191590['id']});break;}case v[_0x25ec51(0x11b)]:{const _0x2580ce=this[_0x25ec51(0x16d)][_0x25ec51(0x140)](_0x1d2cf4,_0x554e0b,_0x41f182[_0x25ec51(0x13a)]);_0x2580ce&&_0x2580ce['parentId']&&this[_0x25ec51(0x16d)][_0x25ec51(0x179)](_0x1d2cf4,_0x554e0b,_0x41f182['replyId']);break;}case v[_0x25ec51(0x16a)]:{this['_threadCommentModel'][_0x25ec51(0x11c)](_0x1d2cf4,_0x554e0b,{'commentId':_0x41f182['replyId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content'])});break;}case v[_0x25ec51(0x14f)]:{const _0x226b6d=(_0x34fbfb=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x1f0c9c=>_0x1f0c9c[_0x25ec51(0x127)]===_0x41f182['threadId']))==null?void 0x0:_0x34fbfb[_0x25ec51(0x144)];_0x226b6d&&this['_threadCommentModel'][_0x25ec51(0x131)](_0x1d2cf4,_0x554e0b,_0x226b6d['id'],_0x41f182['solved']===I[_0x25ec51(0x14c)]);break;}}}));}};S=V([p(0x0,_0x4f3a21(_0x24bf5a)),p(0x1,_0x4f3a21(_0x5aae77)),p(0x2,_0x4f3a21(_0x4eab9e)),p(0x3,_0x4f3a21(_0x8d5e07))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x255c02,_0xa0e69f,_0x25383d,_0x1519fd)=>{for(var _0x32de6a=_0x1519fd>0x1?void 0x0:_0x1519fd?k(_0xa0e69f,_0x25383d):_0xa0e69f,_0x48e18c=_0x255c02['length']-0x1,_0x28dfe3;_0x48e18c>=0x0;_0x48e18c--)(_0x28dfe3=_0x255c02[_0x48e18c])&&(_0x32de6a=_0x28dfe3(_0x32de6a)||_0x32de6a);return _0x32de6a;},_=(_0x3a289f,_0x1d6a32)=>(_0x37f1bb,_0x307b91)=>_0x1d6a32(_0x37f1bb,_0x307b91,_0x3a289f);function X(_0x40bf0a,_0x2abb47){const _0x14012f=_0xbf68e1,_0x217399=_0x40bf0a[_0x14012f(0x160)][0x0];return{..._0x2abb47,'id':_0x217399[_0x14012f(0x13a)],'resolved':_0x40bf0a[_0x14012f(0x145)]===0x1,'dT':D(_0x217399[_0x14012f(0x15a)]),'personId':_0x217399['userId'],'threadId':_0x217399[_0x14012f(0x127)]};}function ee(_0x1f96d6,_0x247b6f,_0x343b81){const _0x215786=_0xbf68e1;var _0x17e4e1,_0xbdea56;if(((_0xbdea56=(_0x17e4e1=_0x1f96d6==null?void 0x0:_0x1f96d6[_0x215786(0x160)])==null?void 0x0:_0x17e4e1[_0x215786(0x125)])!=null?_0xbdea56:0x0)>0x0){const _0x2bf7b7=(_0x8034a4,_0x4857c9)=>({'id':_0x8034a4[_0x215786(0x13a)],'threadId':_0x8034a4[_0x215786(0x127)],'dT':D(_0x8034a4[_0x215786(0x15a)]),'personId':_0x8034a4[_0x215786(0x17c)],'resolved':_0x1f96d6['solved']===I['Solved'],'unitId':_0x247b6f,'subUnitId':_0x343b81,'text':JSON['parse'](_0x8034a4[_0x215786(0x16b)]),'parentId':_0x4857c9}),_0x150b4b=_0x2bf7b7(_0x1f96d6[_0x215786(0x160)][0x0]);return{..._0x150b4b,'children':_0x1f96d6[_0x215786(0x160)][_0x215786(0x116)](0x1)[_0x215786(0x11d)](_0x234aaf=>_0x2bf7b7(_0x234aaf,_0x150b4b['id']))};}return null;}let f=class{constructor(_0xa200ee,_0x1df30a,_0x115f26,_0x2b7729){const _0x363a7c=_0xbf68e1;this[_0x363a7c(0x141)]=_0xa200ee,this[_0x363a7c(0x129)]=_0x1df30a,this[_0x363a7c(0x12d)]=_0x115f26,this[_0x363a7c(0x151)]=_0x2b7729;}async[_0xbf68e1(0x11e)](_0x11e6f4){const _0x3d6a56=_0xbf68e1;var _0x575978,_0x5f24cc;const {parentId:_0x110641,unitId:_0x342b4c,text:_0x252a1a,threadId:_0x400bad}=_0x11e6f4,_0x3bbe0b=(_0x5f24cc=(_0x575978=_0x252a1a[_0x3d6a56(0x119)])==null?void 0x0:_0x575978[_0x3d6a56(0x13b)](_0xe1f76a=>_0xe1f76a[_0x3d6a56(0x168)]===_0x1a431c[_0x3d6a56(0x15f)])['map'](_0xb1f29c=>_0xb1f29c['rangeId']))!=null?_0x5f24cc:[],_0x4ffe3c=JSON[_0x3d6a56(0x124)](_0x252a1a),_0x1e00d7=(await this[_0x3d6a56(0x12d)][_0x3d6a56(0x138)](_0x342b4c))[_0x3d6a56(0x156)]();if(_0x110641){const _0x31797d={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b,'threadId':_0x400bad},_0x1784cc=(await this[_0x3d6a56(0x141)][_0x3d6a56(0x15c)](_0x3d6a56(0x13d)+_0x342b4c+_0x3d6a56(0x164),{'body':_0x31797d}))[_0x3d6a56(0x123)][_0x3d6a56(0x158)];return{..._0x11e6f4,'id':_0x1784cc[_0x3d6a56(0x13a)],'dT':_0x5e2681(+_0x1784cc[_0x3d6a56(0x15a)])[_0x3d6a56(0x154)](_0x3d6a56(0x13f)),'personId':_0x1784cc[_0x3d6a56(0x17c)]};}else{const _0x4f68be={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b},_0x54ebc7=await this['_httpService'][_0x3d6a56(0x15c)]('/universer-api/comment/unit/'+_0x342b4c+_0x3d6a56(0x14a),{'body':_0x4f68be});return X(_0x54ebc7[_0x3d6a56(0x123)][_0x3d6a56(0x136)],_0x11e6f4);}}async['updateComment'](_0x77a8af){const _0x5229b8=_0xbf68e1;var _0x5942eb,_0x57cb38;const {text:_0x376793,unitId:_0x5c14d5}=_0x77a8af,_0x256637=(_0x57cb38=(_0x5942eb=_0x376793[_0x5229b8(0x119)])==null?void 0x0:_0x5942eb[_0x5229b8(0x13b)](_0x4fb5ce=>_0x4fb5ce['rangeType']===_0x1a431c[_0x5229b8(0x15f)])[_0x5229b8(0x11d)](_0x265ea5=>_0x265ea5['rangeId']))!=null?_0x57cb38:[],_0xe22770=JSON['stringify'](_0x376793),_0x58c073=_0x77a8af['threadId'],_0x370bc3=_0x77a8af['id'],_0x15b891={'memberId':(await this[_0x5229b8(0x12d)]['requireSession'](_0x5c14d5))[_0x5229b8(0x156)](),'unitId':_0x5c14d5,'threadId':_0x58c073,'mention':_0x256637,'content':_0xe22770,'replyId':_0x370bc3},_0x2d9d46=await this[_0x5229b8(0x141)][_0x5229b8(0x15c)](_0x5229b8(0x13d)+_0x5c14d5+_0x5229b8(0x147),{'body':_0x15b891});return!_0x2d9d46[_0x5229b8(0x123)][_0x5229b8(0x13c)]||_0x2d9d46[_0x5229b8(0x123)]['error'][_0x5229b8(0x177)]===0x1;}async[_0xbf68e1(0x131)](_0x47a996){const _0x1a038d=_0xbf68e1,{unitId:_0x476854}=_0x47a996,_0x339186=_0x47a996[_0x1a038d(0x127)],_0x2ba622={'memberId':this[_0x1a038d(0x129)][_0x1a038d(0x122)]()[_0x1a038d(0x12a)],'unitId':_0x476854,'threadId':_0x339186,'solved':_0x47a996[_0x1a038d(0x13e)]?I[_0x1a038d(0x14c)]:I['OpenOrReOpen']},_0x10bddc=await this[_0x1a038d(0x141)][_0x1a038d(0x15c)](_0x1a038d(0x13d)+_0x476854+_0x1a038d(0x135),{'body':_0x2ba622});return!_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]||_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]['code']===0x1;}async['deleteComment'](_0x3347b2,_0x2033d4,_0x1ef2bf,_0x29ebd5){const _0x344709=_0xbf68e1,_0x575194={'memberId':(await this['_sessionService'][_0x344709(0x138)](_0x3347b2))['getMemberID'](),'threadId':_0x1ef2bf,'replyId':_0x29ebd5,'unitId':_0x3347b2},_0x5e4cf6=await this[_0x344709(0x141)][_0x344709(0x15c)](_0x344709(0x13d)+_0x3347b2+_0x344709(0x15b),{'body':_0x575194});return!_0x5e4cf6[_0x344709(0x123)][_0x344709(0x13c)]||_0x5e4cf6['body'][_0x344709(0x13c)][_0x344709(0x177)]===0x1;}async[_0xbf68e1(0x142)](_0x42e936,_0x3cd446,_0x3e4fd3){const _0x1d2485=_0xbf68e1,_0xcf860f={'unitId':_0x42e936,'threadId':_0x3e4fd3},_0x1b0b49=await this[_0x1d2485(0x141)][_0x1d2485(0x15c)](_0x1d2485(0x13d)+_0x42e936+_0x1d2485(0x176),{'body':_0xcf860f}),_0x56c260=_0x3e4fd3[_0x1d2485(0x11d)](_0x46a2e1=>ee(_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x172)][_0x46a2e1],_0x42e936,_0x3cd446))[_0x1d2485(0x13b)](Boolean);return Object[_0x1d2485(0x134)](_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x12b)])[_0x1d2485(0x166)](_0x30ca58=>{const _0x256439=_0x1d2485;this[_0x256439(0x129)]['addUser'](_0x30ca58);}),_0x56c260;}['saveCommentToSnapshot'](_0x78d2e0){const _0x3a3e19=_0xbf68e1;return{'id':_0x78d2e0['id'],'threadId':_0x78d2e0['threadId'],'ref':_0x78d2e0[_0x3a3e19(0x15e)]};}};f=Q([_(0x0,_0x4f3a21(_0x36f428)),_(0x1,_0x4f3a21(_0x4eab9e)),_(0x2,_0x4f3a21(_0x28cbe3)),_(0x3,_0x4f3a21(_0x8d5e07))],f);var re=Object[_0xbf68e1(0x178)],te=(_0x5845b6,_0x46f690,_0x52b141,_0x453933)=>{const _0x11a8a0=_0xbf68e1;for(var _0x59b20d=_0x453933>0x1?void 0x0:_0x453933?re(_0x46f690,_0x52b141):_0x46f690,_0x4c4aa6=_0x5845b6[_0x11a8a0(0x125)]-0x1,_0x47346c;_0x4c4aa6>=0x0;_0x4c4aa6--)(_0x47346c=_0x5845b6[_0x4c4aa6])&&(_0x59b20d=_0x47346c(_0x59b20d)||_0x59b20d);return _0x59b20d;},N=(_0x19e5d2,_0x1686db)=>(_0x4d9ef4,_0x4d4a0b)=>_0x1686db(_0x4d9ef4,_0x4d4a0b,_0x19e5d2);let g=class extends _0x5a933e{constructor(_0x1386e0,_0x411940){const _0x2bb172=_0xbf68e1;super(),this[_0x2bb172(0x175)]=_0x1386e0,this['_threadCommentDataSource']=_0x411940,this[_0x2bb172(0x117)]();}[_0xbf68e1(0x117)](){const _0x4e4959=_0xbf68e1;this[_0x4e4959(0x175)]['dataSource']=this[_0x4e4959(0x157)],this[_0x4e4959(0x175)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xe116fb),N(0x1,_0x4f3a21(f))],g);var se=Object[_0xbf68e1(0x163)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x112488,_0x361639,_0x2ca661)=>_0x361639 in _0x112488?se(_0x112488,_0x361639,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ca661}):_0x112488[_0x361639]=_0x2ca661,ie=(_0x3a3ca9,_0x1d8911,_0x27bba6,_0x1b3536)=>{const _0x6ec18d=_0xbf68e1;for(var _0x1fe28f=_0x1b3536>0x1?void 0x0:_0x1b3536?oe(_0x1d8911,_0x27bba6):_0x1d8911,_0x482e95=_0x3a3ca9[_0x6ec18d(0x125)]-0x1,_0x5d22af;_0x482e95>=0x0;_0x482e95--)(_0x5d22af=_0x3a3ca9[_0x482e95])&&(_0x1fe28f=_0x5d22af(_0x1fe28f)||_0x1fe28f);return _0x1fe28f;},w=(_0x113109,_0x126625)=>(_0x2189b3,_0x5ffa6f)=>_0x126625(_0x2189b3,_0x5ffa6f,_0x113109),$=(_0x11a43c,_0x456808,_0x189106)=>ne(_0x11a43c,typeof _0x456808!=_0xbf68e1(0x169)?_0x456808+'':_0x456808,_0x189106);let b=class extends _0x32d5ff{constructor(_0xb71a87=M,_0x17be08,_0x11d6f2){const _0x4d9ffd=_0xbf68e1;super(),this[_0x4d9ffd(0x146)]=_0xb71a87,this[_0x4d9ffd(0x151)]=_0x17be08,this[_0x4d9ffd(0x15d)]=_0x11d6f2;const {..._0x18e461}=_0x40e613({},M,this[_0x4d9ffd(0x146)]);this['_configService'][_0x4d9ffd(0x137)](z,_0x18e461);}[_0xbf68e1(0x118)](){const _0x3ad986=_0xbf68e1;[[f],[g],[S]][_0x3ad986(0x166)](_0x28bc58=>{const _0x3ca970=_0x3ad986;this[_0x3ca970(0x151)][_0x3ca970(0x12f)](_0x28bc58);});}['onReady'](){const _0x8738b8=_0xbf68e1;this[_0x8738b8(0x151)][_0x8738b8(0x161)](g),this[_0x8738b8(0x151)][_0x8738b8(0x161)](S);}};$(b,_0xbf68e1(0x143),W),$(b,_0xbf68e1(0x133),_0x536cd8['UNIVER_UNKNOWN']),b=ie([_0x38802e(_0x4b97b3,_0x9525d4,_0x864633),w(0x1,_0x4f3a21(_0x8d5e07)),w(0x2,_0x350c90)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12dc97=_0x1bc5;(function(_0x21e0c9,_0xb78217){const _0x4b0789=_0x1bc5,_0x3e8e66=_0x21e0c9();while(!![]){try{const _0x35f53c=parseInt(_0x4b0789(0x134))/0x1*(parseInt(_0x4b0789(0x142))/0x2)+parseInt(_0x4b0789(0x14b))/0x3*(parseInt(_0x4b0789(0x112))/0x4)+parseInt(_0x4b0789(0x10e))/0x5*(parseInt(_0x4b0789(0xfa))/0x6)+parseInt(_0x4b0789(0x108))/0x7*(parseInt(_0x4b0789(0x141))/0x8)+parseInt(_0x4b0789(0x140))/0x9+parseInt(_0x4b0789(0x11e))/0xa+-parseInt(_0x4b0789(0x103))/0xb;if(_0x35f53c===_0xb78217)break;else _0x3e8e66['push'](_0x3e8e66['shift']());}catch(_0x4b5e2a){_0x3e8e66['push'](_0x3e8e66['shift']());}}}(_0x430d,0x2cae5));import{CommentService as _0x26d6de,CollaborationSessionService as _0x289268,UniverCollaborationClientPlugin as _0x40d0cd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a9e0e}from'@univerjs-pro/license';import{dayjs as _0x3f2441,UserManagerService as _0x2bf58a,Inject as _0x4b87e2,Injector as _0x1f0779,Disposable as _0x19e379,CustomRangeType as _0x1f5b42,UniverInstanceType as _0x1dc825,DependentOn as _0x1af6a9,IConfigService as _0x359526,Plugin as _0x44e7f1,merge as _0x486a2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f422}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e1fd,IThreadCommentDataSourceService as _0x245cbd}from'@univerjs/thread-comment';import{bufferTime as _0x24cc49}from'rxjs';import{HTTPService as _0x51d949}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a750a=>(_0x3a750a[_0x3a750a[_0x12dc97(0x145)]=0x0]=_0x12dc97(0x145),_0x3a750a[_0x3a750a[_0x12dc97(0xf8)]=0x1]='Solved',_0x3a750a[_0x3a750a[_0x12dc97(0x13f)]=-0x1]='UNRECOGNIZED',_0x3a750a))(I||{}),v=(_0x414d9b=>(_0x414d9b[_0x414d9b[_0x12dc97(0x113)]=0x0]='Unknown',_0x414d9b[_0x414d9b[_0x12dc97(0x124)]=0x1]='Add',_0x414d9b[_0x414d9b['Reply']=0x2]=_0x12dc97(0x128),_0x414d9b[_0x414d9b[_0x12dc97(0x117)]=0x3]=_0x12dc97(0x117),_0x414d9b[_0x414d9b[_0x12dc97(0xe8)]=0x4]=_0x12dc97(0xe8),_0x414d9b[_0x414d9b[_0x12dc97(0x127)]=0x5]=_0x12dc97(0x127),_0x414d9b[_0x414d9b[_0x12dc97(0x13f)]=-0x1]=_0x12dc97(0x13f),_0x414d9b))(v||{});const D=_0x27e895=>_0x3f2441(new Date(+_0x27e895))[_0x12dc97(0x10b)](_0x12dc97(0xf9)),B=async(_0x58b841,_0x2da5f9)=>{const _0x2d2095=_0x12dc97,_0x5e3cb9=_0x58b841[_0x2d2095(0xf6)](_0x2bf58a),_0x54736e=_0x58b841['get'](_0x51d949);_0x2da5f9[_0x2d2095(0x13b)](_0x5b6471=>{const _0x14705b=_0x2d2095;_0x5e3cb9[_0x14705b(0x11c)](_0x5b6471)&&_0x2da5f9[_0x14705b(0x12c)](_0x5b6471);}),_0x2da5f9['size']&&(await _0x54736e[_0x2d2095(0xf6)](_0x2d2095(0x148),{'params':{'userIDs':[..._0x2da5f9]}}))[_0x2d2095(0xf1)][_0x2d2095(0xfe)][_0x2d2095(0x13b)](_0x125b92=>{const _0x4edf14=_0x2d2095;_0x125b92&&_0x5e3cb9[_0x4edf14(0x102)](_0x125b92);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3ce21e,_0x1fd4b6,_0x1d763e,_0x10c07f)=>{const _0x1b0931=_0x12dc97;for(var _0x5131a3=_0x10c07f>0x1?void 0x0:_0x10c07f?K(_0x1fd4b6,_0x1d763e):_0x1fd4b6,_0x5eac7a=_0x3ce21e[_0x1b0931(0x110)]-0x1,_0x2680c7;_0x5eac7a>=0x0;_0x5eac7a--)(_0x2680c7=_0x3ce21e[_0x5eac7a])&&(_0x5131a3=_0x2680c7(_0x5131a3)||_0x5131a3);return _0x5131a3;},p=(_0x32bc87,_0x45f52f)=>(_0x17021e,_0x420734)=>_0x45f52f(_0x17021e,_0x420734,_0x32bc87);let S=class extends _0x19e379{constructor(_0x171470,_0x3112bf,_0x57358c,_0x3f34b3){const _0x51f7b9=_0x12dc97;super(),this['_commentService']=_0x171470,this[_0x51f7b9(0x147)]=_0x3112bf,this[_0x51f7b9(0x10c)]=_0x57358c,this[_0x51f7b9(0x138)]=_0x3f34b3,this['_init'](),this['_initUserSync']();}[_0x12dc97(0x133)](){const _0x1958da=_0x12dc97;this[_0x1958da(0xef)](this[_0x1958da(0x147)][_0x1958da(0xf5)][_0x1958da(0x131)](_0x24cc49(0x10))[_0x1958da(0x132)](_0x47f92b=>{const _0x18c78e=_0x1958da,_0x16770c=new Set();_0x47f92b['forEach'](_0x5f08fe=>{const _0x2abbb8=_0x1bc5;switch(_0x5f08fe[_0x2abbb8(0x135)]){case'add':{const _0x1dd540=_0x5f08fe[_0x2abbb8(0x146)]['personId'];_0x16770c[_0x2abbb8(0x10a)](_0x1dd540);break;}}}),B(this[_0x18c78e(0x138)],_0x16770c);}));}[_0x12dc97(0x101)](){const _0x29e66d=_0x12dc97;this[_0x29e66d(0xef)](this[_0x29e66d(0x130)]['commentUpdate$'][_0x29e66d(0x132)](async _0x2e6ad=>{const _0x413546=_0x29e66d;var _0x14cf0e,_0xe39692,_0x280a06,_0xeb7d0c;const _0x4bd80b=(_0x14cf0e=this['_threadCommentModel'][_0x413546(0xe7)](_0x2e6ad['unitId'])[_0x413546(0xf2)](_0x3865dd=>_0x3865dd['threadId']===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0x14cf0e[_0x413546(0x104)];if(!_0x4bd80b)return;const {unitId:_0x44d583,subUnitId:_0xf7c61c}=_0x4bd80b;switch(_0x2e6ad[_0x413546(0x120)]&&this['_userService'][_0x413546(0x102)](_0x2e6ad[_0x413546(0x120)]),_0x2e6ad[_0x413546(0x135)]){case v['Add']:break;case v['Reply']:{this[_0x413546(0x147)][_0x413546(0x13e)](_0x44d583,_0xf7c61c,{'unitId':_0x44d583,'subUnitId':_0xf7c61c,'ref':'','id':_0x2e6ad[_0x413546(0x10f)],'dT':D(+_0x2e6ad[_0x413546(0xfc)]),'threadId':_0x2e6ad[_0x413546(0xec)],'personId':(_0x280a06=(_0xe39692=_0x2e6ad[_0x413546(0x120)])==null?void 0x0:_0xe39692[_0x413546(0x126)])!=null?_0x280a06:_0x2e6ad[_0x413546(0x144)],'text':JSON['parse'](_0x2e6ad[_0x413546(0x139)]),'parentId':_0x4bd80b['id']});break;}case v['Delete']:{const _0x35e5fa=this[_0x413546(0x147)][_0x413546(0x11b)](_0x44d583,_0xf7c61c,_0x2e6ad['replyId']);_0x35e5fa&&_0x35e5fa['parentId']&&this[_0x413546(0x147)][_0x413546(0x12b)](_0x44d583,_0xf7c61c,_0x2e6ad[_0x413546(0x10f)]);break;}case v['Edit']:{this[_0x413546(0x147)][_0x413546(0x106)](_0x44d583,_0xf7c61c,{'commentId':_0x2e6ad[_0x413546(0x10f)],'text':JSON[_0x413546(0x13a)](_0x2e6ad[_0x413546(0x139)])});break;}case v['Solve']:{const _0xcbcec2=(_0xeb7d0c=this[_0x413546(0x147)]['getUnit'](_0x2e6ad[_0x413546(0x14a)])['find'](_0x1a73f8=>_0x1a73f8[_0x413546(0xec)]===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0xeb7d0c['root'];_0xcbcec2&&this[_0x413546(0x147)]['resolveComment'](_0x44d583,_0xf7c61c,_0xcbcec2['id'],_0x2e6ad[_0x413546(0x11a)]===I[_0x413546(0xf8)]);break;}}}));}};S=V([p(0x0,_0x4b87e2(_0x26d6de)),p(0x1,_0x4b87e2(_0x53e1fd)),p(0x2,_0x4b87e2(_0x2bf58a)),p(0x3,_0x4b87e2(_0x1f0779))],S);function _0x430d(){const _0x58e240=['61168qlWvQy','16AOrhaP','comment','userId','OpenOrReOpen','payload','_threadCommentModel','/universer-api/user/list','ref','unitId','69LMERwN','error','getUnit','Delete','reply','getMemberID','filter','threadId','/delete','stringify','disposeWithMe','getCurrentUser','body','find','post','_sessionService','commentUpdate$','get','_config','Solved','YYYY/MM/DD\x20HH:mm','7674iwblHh','resolveComment','createTimestamp','_configService','users','syncUpdateMutationToColla','dataSource','_init','addUser','6693522EODwxn','root','rangeId','updateComment','/solved','133LEtNuv','saveCommentToSnapshot','add','format','_userService','/edit','45bthNhX','replyId','length','/list','55676XYObVu','Unknown','comments','customRanges','getOwnPropertyDescriptor','Edit','rangeType','thread-comment-data-source.config','solved','getComment','getUser','replies','790950bcDQWk','map','user','UNIVER_UNKNOWN','/add','values','Add','COMMENT','userID','Solve','Reply','/universer-api/comment/unit/','_httpService','deleteComment','delete','code','/reply','_initDataSource','_commentService','pipe','subscribe','_initUserSync','23095CtMSSb','type','_threadCommentDataSourceService','requireSession','_injector','content','parse','forEach','setConfig','slice','addComment','UNRECOGNIZED','456642LHDjnG'];_0x430d=function(){return _0x58e240;};return _0x430d();}const z=_0x12dc97(0x119),M={};var k=Object[_0x12dc97(0x116)],Q=(_0x3cdc53,_0x2419d0,_0x1d369d,_0x32c511)=>{const _0x51f03f=_0x12dc97;for(var _0x3ec7cd=_0x32c511>0x1?void 0x0:_0x32c511?k(_0x2419d0,_0x1d369d):_0x2419d0,_0x2353c2=_0x3cdc53[_0x51f03f(0x110)]-0x1,_0x594330;_0x2353c2>=0x0;_0x2353c2--)(_0x594330=_0x3cdc53[_0x2353c2])&&(_0x3ec7cd=_0x594330(_0x3ec7cd)||_0x3ec7cd);return _0x3ec7cd;},_=(_0x1bb1f8,_0xb55261)=>(_0xf36bba,_0x1dec31)=>_0xb55261(_0xf36bba,_0x1dec31,_0x1bb1f8);function X(_0x5f457d,_0x50c699){const _0x533343=_0x12dc97,_0x229e7a=_0x5f457d[_0x533343(0x11d)][0x0];return{..._0x50c699,'id':_0x229e7a[_0x533343(0x10f)],'resolved':_0x5f457d[_0x533343(0x11a)]===0x1,'dT':D(_0x229e7a[_0x533343(0xfc)]),'personId':_0x229e7a['userId'],'threadId':_0x229e7a['threadId']};}function ee(_0xa8a2dd,_0x564d9e,_0x205136){const _0x4d5db2=_0x12dc97;var _0x5679b8,_0x5c42ef;if(((_0x5c42ef=(_0x5679b8=_0xa8a2dd==null?void 0x0:_0xa8a2dd[_0x4d5db2(0x11d)])==null?void 0x0:_0x5679b8['length'])!=null?_0x5c42ef:0x0)>0x0){const _0x4a20b8=(_0x5189f4,_0x498f8d)=>({'id':_0x5189f4[_0x4d5db2(0x10f)],'threadId':_0x5189f4[_0x4d5db2(0xec)],'dT':D(_0x5189f4[_0x4d5db2(0xfc)]),'personId':_0x5189f4[_0x4d5db2(0x144)],'resolved':_0xa8a2dd[_0x4d5db2(0x11a)]===I['Solved'],'unitId':_0x564d9e,'subUnitId':_0x205136,'text':JSON[_0x4d5db2(0x13a)](_0x5189f4[_0x4d5db2(0x139)]),'parentId':_0x498f8d}),_0xd03946=_0x4a20b8(_0xa8a2dd[_0x4d5db2(0x11d)][0x0]);return{..._0xd03946,'children':_0xa8a2dd[_0x4d5db2(0x11d)][_0x4d5db2(0x13d)](0x1)['map'](_0x22299a=>_0x4a20b8(_0x22299a,_0xd03946['id']))};}return null;}let f=class{constructor(_0x15583c,_0x46f078,_0x38a432,_0x532b82){const _0x398fc5=_0x12dc97;this[_0x398fc5(0x12a)]=_0x15583c,this[_0x398fc5(0x10c)]=_0x46f078,this['_sessionService']=_0x38a432,this[_0x398fc5(0x138)]=_0x532b82;}async[_0x12dc97(0x13e)](_0x2458a6){const _0x51e6e4=_0x12dc97;var _0x118a78,_0x50b952;const {parentId:_0x455a2f,unitId:_0x1a0de7,text:_0x3ca6c2,threadId:_0x50378d}=_0x2458a6,_0x559a62=(_0x50b952=(_0x118a78=_0x3ca6c2[_0x51e6e4(0x115)])==null?void 0x0:_0x118a78[_0x51e6e4(0xeb)](_0x5e9efe=>_0x5e9efe[_0x51e6e4(0x118)]===_0x1f5b42[_0x51e6e4(0x125)])[_0x51e6e4(0x11f)](_0x3eae8b=>_0x3eae8b[_0x51e6e4(0x105)]))!=null?_0x50b952:[],_0x74f276=JSON[_0x51e6e4(0xee)](_0x3ca6c2),_0x35b5d2=(await this[_0x51e6e4(0xf4)]['requireSession'](_0x1a0de7))[_0x51e6e4(0xea)]();if(_0x455a2f){const _0x3be33c={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62,'threadId':_0x50378d},_0x3b098f=(await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x12e),{'body':_0x3be33c}))[_0x51e6e4(0xf1)][_0x51e6e4(0xe9)];return{..._0x2458a6,'id':_0x3b098f[_0x51e6e4(0x10f)],'dT':_0x3f2441(+_0x3b098f[_0x51e6e4(0xfc)])[_0x51e6e4(0x10b)](_0x51e6e4(0xf9)),'personId':_0x3b098f['userId']};}else{const _0x3d30ae={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62},_0x1a33f9=await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x122),{'body':_0x3d30ae});return X(_0x1a33f9[_0x51e6e4(0xf1)][_0x51e6e4(0x143)],_0x2458a6);}}async[_0x12dc97(0x106)](_0x176260){const _0x40c137=_0x12dc97;var _0x2f11e7,_0x2960b5;const {text:_0x1ab132,unitId:_0xb70ca2}=_0x176260,_0x5876ab=(_0x2960b5=(_0x2f11e7=_0x1ab132['customRanges'])==null?void 0x0:_0x2f11e7[_0x40c137(0xeb)](_0x134a91=>_0x134a91[_0x40c137(0x118)]===_0x1f5b42[_0x40c137(0x125)])[_0x40c137(0x11f)](_0x4eb7d7=>_0x4eb7d7[_0x40c137(0x105)]))!=null?_0x2960b5:[],_0x19624b=JSON['stringify'](_0x1ab132),_0x6f9901=_0x176260['threadId'],_0x507486=_0x176260['id'],_0x40b8fb={'memberId':(await this['_sessionService'][_0x40c137(0x137)](_0xb70ca2))[_0x40c137(0xea)](),'unitId':_0xb70ca2,'threadId':_0x6f9901,'mention':_0x5876ab,'content':_0x19624b,'replyId':_0x507486},_0x5a2b8a=await this['_httpService'][_0x40c137(0xf3)]('/universer-api/comment/unit/'+_0xb70ca2+_0x40c137(0x10d),{'body':_0x40b8fb});return!_0x5a2b8a[_0x40c137(0xf1)]['error']||_0x5a2b8a['body'][_0x40c137(0xe6)][_0x40c137(0x12d)]===0x1;}async[_0x12dc97(0xfb)](_0x697e7a){const _0xc4aae2=_0x12dc97,{unitId:_0xb55d5e}=_0x697e7a,_0x2a97aa=_0x697e7a['threadId'],_0x97f607={'memberId':this[_0xc4aae2(0x10c)][_0xc4aae2(0xf0)]()[_0xc4aae2(0x126)],'unitId':_0xb55d5e,'threadId':_0x2a97aa,'solved':_0x697e7a['resolved']?I[_0xc4aae2(0xf8)]:I[_0xc4aae2(0x145)]},_0x138a35=await this['_httpService'][_0xc4aae2(0xf3)](_0xc4aae2(0x129)+_0xb55d5e+_0xc4aae2(0x107),{'body':_0x97f607});return!_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]||_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]['code']===0x1;}async[_0x12dc97(0x12b)](_0x47a60d,_0x234e46,_0x5aa25d,_0x553c97){const _0x284af2=_0x12dc97,_0x3b823c={'memberId':(await this[_0x284af2(0xf4)]['requireSession'](_0x47a60d))[_0x284af2(0xea)](),'threadId':_0x5aa25d,'replyId':_0x553c97,'unitId':_0x47a60d},_0xab68b0=await this[_0x284af2(0x12a)]['post'](_0x284af2(0x129)+_0x47a60d+_0x284af2(0xed),{'body':_0x3b823c});return!_0xab68b0[_0x284af2(0xf1)]['error']||_0xab68b0['body'][_0x284af2(0xe6)]['code']===0x1;}async['listComments'](_0x57fdf4,_0x893104,_0x652262){const _0x415ff7=_0x12dc97,_0x28ff76={'unitId':_0x57fdf4,'threadId':_0x652262},_0x33f5f4=await this[_0x415ff7(0x12a)][_0x415ff7(0xf3)](_0x415ff7(0x129)+_0x57fdf4+_0x415ff7(0x111),{'body':_0x28ff76}),_0x3fcc79=_0x652262[_0x415ff7(0x11f)](_0x59c5d2=>ee(_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0x114)][_0x59c5d2],_0x57fdf4,_0x893104))[_0x415ff7(0xeb)](Boolean);return Object[_0x415ff7(0x123)](_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0xfe)])['forEach'](_0x29d9b2=>{const _0x2226e0=_0x415ff7;this[_0x2226e0(0x10c)][_0x2226e0(0x102)](_0x29d9b2);}),_0x3fcc79;}[_0x12dc97(0x109)](_0x21b9e8){const _0x62f0fb=_0x12dc97;return{'id':_0x21b9e8['id'],'threadId':_0x21b9e8[_0x62f0fb(0xec)],'ref':_0x21b9e8[_0x62f0fb(0x149)]};}};f=Q([_(0x0,_0x4b87e2(_0x51d949)),_(0x1,_0x4b87e2(_0x2bf58a)),_(0x2,_0x4b87e2(_0x289268)),_(0x3,_0x4b87e2(_0x1f0779))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x15dc41,_0x33c558,_0x228c8c,_0x2d6a88)=>{const _0x5f3fd8=_0x12dc97;for(var _0x5adbfb=_0x2d6a88>0x1?void 0x0:_0x2d6a88?re(_0x33c558,_0x228c8c):_0x33c558,_0x3801fb=_0x15dc41[_0x5f3fd8(0x110)]-0x1,_0x295695;_0x3801fb>=0x0;_0x3801fb--)(_0x295695=_0x15dc41[_0x3801fb])&&(_0x5adbfb=_0x295695(_0x5adbfb)||_0x5adbfb);return _0x5adbfb;},N=(_0x16e8b6,_0x6926c8)=>(_0x5bdb47,_0x345bf7)=>_0x6926c8(_0x5bdb47,_0x345bf7,_0x16e8b6);let g=class extends _0x19e379{constructor(_0x13de5b,_0x4401d6){const _0x1317f9=_0x12dc97;super(),this[_0x1317f9(0x136)]=_0x13de5b,this['_threadCommentDataSource']=_0x4401d6,this[_0x1317f9(0x12f)]();}[_0x12dc97(0x12f)](){const _0x54d7ff=_0x12dc97;this[_0x54d7ff(0x136)][_0x54d7ff(0x100)]=this['_threadCommentDataSource'],this[_0x54d7ff(0x136)][_0x54d7ff(0xff)]=!0x1;}};g=te([N(0x0,_0x245cbd),N(0x1,_0x4b87e2(f))],g);function _0x1bc5(_0x3599da,_0x24e96e){const _0x430d10=_0x430d();return _0x1bc5=function(_0x1bc588,_0x44c62f){_0x1bc588=_0x1bc588-0xe6;let _0x57bd06=_0x430d10[_0x1bc588];return _0x57bd06;},_0x1bc5(_0x3599da,_0x24e96e);}var se=Object['defineProperty'],oe=Object[_0x12dc97(0x116)],ne=(_0x10a38a,_0x32bb98,_0x266df0)=>_0x32bb98 in _0x10a38a?se(_0x10a38a,_0x32bb98,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x266df0}):_0x10a38a[_0x32bb98]=_0x266df0,ie=(_0x283476,_0xa9d5c6,_0x1c36c3,_0x52cbc6)=>{for(var _0x574ddf=_0x52cbc6>0x1?void 0x0:_0x52cbc6?oe(_0xa9d5c6,_0x1c36c3):_0xa9d5c6,_0xe3e07=_0x283476['length']-0x1,_0x4635a1;_0xe3e07>=0x0;_0xe3e07--)(_0x4635a1=_0x283476[_0xe3e07])&&(_0x574ddf=_0x4635a1(_0x574ddf)||_0x574ddf);return _0x574ddf;},w=(_0x105342,_0x34cc49)=>(_0x124080,_0x7cf7f4)=>_0x34cc49(_0x124080,_0x7cf7f4,_0x105342),$=(_0x389833,_0x32a24d,_0x1370bc)=>ne(_0x389833,typeof _0x32a24d!='symbol'?_0x32a24d+'':_0x32a24d,_0x1370bc);let b=class extends _0x44e7f1{constructor(_0x343d69=M,_0x340bf3,_0x2a5d9b){const _0x58a938=_0x12dc97;super(),this['_config']=_0x343d69,this[_0x58a938(0x138)]=_0x340bf3,this[_0x58a938(0xfd)]=_0x2a5d9b;const {..._0x3edb9b}=_0x486a2a({},M,this[_0x58a938(0xf7)]);this[_0x58a938(0xfd)][_0x58a938(0x13c)](z,_0x3edb9b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5ce318=>{const _0x533932=_0x1bc5;this[_0x533932(0x138)][_0x533932(0x10a)](_0x5ce318);});}['onReady'](){const _0x459b9f=_0x12dc97;this[_0x459b9f(0x138)][_0x459b9f(0xf6)](g),this[_0x459b9f(0x138)][_0x459b9f(0xf6)](S);}};$(b,'pluginName',W),$(b,_0x12dc97(0x135),_0x1dc825[_0x12dc97(0x121)]),b=ie([_0x1af6a9(_0x31f422,_0x40d0cd,_0x1a9e0e),w(0x1,_0x4b87e2(_0x1f0779)),w(0x2,_0x359526)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xbf68e1=_0x1c41;(function(_0x2be46d,_0x201409){const _0x166ef4=_0x1c41,_0xe90126=_0x2be46d();while(!![]){try{const _0x18c2e5=parseInt(_0x166ef4(0x148))/0x1+-parseInt(_0x166ef4(0x14b))/0x2*(parseInt(_0x166ef4(0x14e))/0x3)+-parseInt(_0x166ef4(0x130))/0x4*(-parseInt(_0x166ef4(0x17b))/0x5)+parseInt(_0x166ef4(0x165))/0x6+-parseInt(_0x166ef4(0x121))/0x7*(parseInt(_0x166ef4(0x17a))/0x8)+parseInt(_0x166ef4(0x167))/0x9*(parseInt(_0x166ef4(0x14d))/0xa)+-parseInt(_0x166ef4(0x12e))/0xb;if(_0x18c2e5===_0x201409)break;else _0xe90126['push'](_0xe90126['shift']());}catch(_0x55eefc){_0xe90126['push'](_0xe90126['shift']());}}}(_0x39fc,0x3dc1c));import{CommentService as _0x24bf5a,CollaborationSessionService as _0x28cbe3,UniverCollaborationClientPlugin as _0x9525d4}from'@univerjs-pro/collaboration-client';function _0x39fc(){const _0x45054d=['post','_configService','ref','COMMENT','replies','get','getUser','defineProperty','/reply','921930HYOshG','forEach','549QiXcri','rangeType','symbol','Edit','content','user','_threadCommentModel','subscribe','OpenOrReOpen','_initUserSync','pipe','comments','disposeWithMe','parse','_threadCommentDataSourceService','/list','code','getOwnPropertyDescriptor','deleteComment','8cHYvvG','2502155fuuGXf','userId','/universer-api/user/list','slice','_initDataSource','onStarting','customRanges','addUser','Delete','updateComment','map','addComment','delete','getUnit','1170218oiFXSJ','getCurrentUser','body','stringify','length','personId','threadId','UNRECOGNIZED','_userService','userID','users','payload','_sessionService','648197DEFwbZ','add','4LUUVNH','resolveComment','Add','type','values','/solved','comment','setConfig','requireSession','_commentService','replyId','filter','error','/universer-api/comment/unit/','resolved','YYYY/MM/DD\x20HH:mm','getComment','_httpService','listComments','pluginName','root','solved','_config','/edit','138038DmcZue','Reply','/add','64850pfUMdo','Solved','17780OoBxTA','39WcDrPS','Solve','unitId','_injector','commentUpdate$','Unknown','format','_init','getMemberID','_threadCommentDataSource','reply','find','createTimestamp','/delete'];_0x39fc=function(){return _0x45054d;};return _0x39fc();}import{UniverLicensePlugin as _0x864633}from'@univerjs-pro/license';import{dayjs as _0x5e2681,UserManagerService as _0x4eab9e,Inject as _0x4f3a21,Injector as _0x8d5e07,Disposable as _0x5a933e,CustomRangeType as _0x1a431c,UniverInstanceType as _0x536cd8,DependentOn as _0x38802e,IConfigService as _0x350c90,Plugin as _0x32d5ff,merge as _0x40e613}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b97b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5aae77,IThreadCommentDataSourceService as _0xe116fb}from'@univerjs/thread-comment';import{bufferTime as _0x363eac}from'rxjs';import{HTTPService as _0x36f428}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3b924d=>(_0x3b924d[_0x3b924d['OpenOrReOpen']=0x0]=_0xbf68e1(0x16f),_0x3b924d[_0x3b924d[_0xbf68e1(0x14c)]=0x1]=_0xbf68e1(0x14c),_0x3b924d[_0x3b924d[_0xbf68e1(0x128)]=-0x1]='UNRECOGNIZED',_0x3b924d))(I||{}),v=(_0x3663c9=>(_0x3663c9[_0x3663c9[_0xbf68e1(0x153)]=0x0]='Unknown',_0x3663c9[_0x3663c9[_0xbf68e1(0x132)]=0x1]=_0xbf68e1(0x132),_0x3663c9[_0x3663c9[_0xbf68e1(0x149)]=0x2]='Reply',_0x3663c9[_0x3663c9[_0xbf68e1(0x16a)]=0x3]=_0xbf68e1(0x16a),_0x3663c9[_0x3663c9['Delete']=0x4]=_0xbf68e1(0x11b),_0x3663c9[_0x3663c9[_0xbf68e1(0x14f)]=0x5]='Solve',_0x3663c9[_0x3663c9[_0xbf68e1(0x128)]=-0x1]=_0xbf68e1(0x128),_0x3663c9))(v||{});const D=_0x13cf56=>_0x5e2681(new Date(+_0x13cf56))[_0xbf68e1(0x154)](_0xbf68e1(0x13f)),B=async(_0x2a7abd,_0xe2218c)=>{const _0x28c80b=_0xbf68e1,_0x4eb165=_0x2a7abd[_0x28c80b(0x161)](_0x4eab9e),_0xcb30bd=_0x2a7abd['get'](_0x36f428);_0xe2218c[_0x28c80b(0x166)](_0x4c3a2a=>{const _0x547855=_0x28c80b;_0x4eb165[_0x547855(0x162)](_0x4c3a2a)&&_0xe2218c[_0x547855(0x11f)](_0x4c3a2a);}),_0xe2218c['size']&&(await _0xcb30bd[_0x28c80b(0x161)](_0x28c80b(0x115),{'params':{'userIDs':[..._0xe2218c]}}))[_0x28c80b(0x123)]['users']['forEach'](_0x4e7eba=>{const _0x115dba=_0x28c80b;_0x4e7eba&&_0x4eb165[_0x115dba(0x11a)](_0x4e7eba);});};var K=Object[_0xbf68e1(0x178)],V=(_0x59a755,_0x382e52,_0x3f76e9,_0x5d4827)=>{const _0x3c7999=_0xbf68e1;for(var _0x429bc1=_0x5d4827>0x1?void 0x0:_0x5d4827?K(_0x382e52,_0x3f76e9):_0x382e52,_0x510dc0=_0x59a755[_0x3c7999(0x125)]-0x1,_0x253dc0;_0x510dc0>=0x0;_0x510dc0--)(_0x253dc0=_0x59a755[_0x510dc0])&&(_0x429bc1=_0x253dc0(_0x429bc1)||_0x429bc1);return _0x429bc1;},p=(_0x37ddb4,_0x5082f3)=>(_0x4d8057,_0x105950)=>_0x5082f3(_0x4d8057,_0x105950,_0x37ddb4);function _0x1c41(_0x396f2b,_0x59e721){const _0x39fc90=_0x39fc();return _0x1c41=function(_0x1c41d2,_0x4b933d){_0x1c41d2=_0x1c41d2-0x115;let _0x186892=_0x39fc90[_0x1c41d2];return _0x186892;},_0x1c41(_0x396f2b,_0x59e721);}let S=class extends _0x5a933e{constructor(_0x4e3d93,_0x3cd519,_0x4ab288,_0x1843ee){const _0x4f773d=_0xbf68e1;super(),this[_0x4f773d(0x139)]=_0x4e3d93,this[_0x4f773d(0x16d)]=_0x3cd519,this[_0x4f773d(0x129)]=_0x4ab288,this['_injector']=_0x1843ee,this[_0x4f773d(0x155)](),this[_0x4f773d(0x170)]();}['_initUserSync'](){const _0x1dd83a=_0xbf68e1;this[_0x1dd83a(0x173)](this[_0x1dd83a(0x16d)][_0x1dd83a(0x152)][_0x1dd83a(0x171)](_0x363eac(0x10))[_0x1dd83a(0x16e)](_0x112690=>{const _0x49d524=_0x1dd83a,_0x5479b=new Set();_0x112690[_0x49d524(0x166)](_0x20eec5=>{const _0x3ae9fa=_0x49d524;switch(_0x20eec5['type']){case _0x3ae9fa(0x12f):{const _0x4691de=_0x20eec5[_0x3ae9fa(0x12c)][_0x3ae9fa(0x126)];_0x5479b['add'](_0x4691de);break;}}}),B(this[_0x49d524(0x151)],_0x5479b);}));}[_0xbf68e1(0x155)](){const _0x487e35=_0xbf68e1;this['disposeWithMe'](this[_0x487e35(0x139)][_0x487e35(0x152)][_0x487e35(0x16e)](async _0x41f182=>{const _0x25ec51=_0x487e35;var _0x6e1861,_0x434a5c,_0x47cd03,_0x34fbfb;const _0x191590=(_0x6e1861=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x205a71=>_0x205a71[_0x25ec51(0x127)]===_0x41f182[_0x25ec51(0x127)]))==null?void 0x0:_0x6e1861[_0x25ec51(0x144)];if(!_0x191590)return;const {unitId:_0x1d2cf4,subUnitId:_0x554e0b}=_0x191590;switch(_0x41f182[_0x25ec51(0x16c)]&&this[_0x25ec51(0x129)][_0x25ec51(0x11a)](_0x41f182[_0x25ec51(0x16c)]),_0x41f182['type']){case v[_0x25ec51(0x132)]:break;case v[_0x25ec51(0x149)]:{this[_0x25ec51(0x16d)]['addComment'](_0x1d2cf4,_0x554e0b,{'unitId':_0x1d2cf4,'subUnitId':_0x554e0b,'ref':'','id':_0x41f182['replyId'],'dT':D(+_0x41f182[_0x25ec51(0x15a)]),'threadId':_0x41f182['threadId'],'personId':(_0x47cd03=(_0x434a5c=_0x41f182[_0x25ec51(0x16c)])==null?void 0x0:_0x434a5c[_0x25ec51(0x12a)])!=null?_0x47cd03:_0x41f182['userId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content']),'parentId':_0x191590['id']});break;}case v[_0x25ec51(0x11b)]:{const _0x2580ce=this[_0x25ec51(0x16d)][_0x25ec51(0x140)](_0x1d2cf4,_0x554e0b,_0x41f182[_0x25ec51(0x13a)]);_0x2580ce&&_0x2580ce['parentId']&&this[_0x25ec51(0x16d)][_0x25ec51(0x179)](_0x1d2cf4,_0x554e0b,_0x41f182['replyId']);break;}case v[_0x25ec51(0x16a)]:{this['_threadCommentModel'][_0x25ec51(0x11c)](_0x1d2cf4,_0x554e0b,{'commentId':_0x41f182['replyId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content'])});break;}case v[_0x25ec51(0x14f)]:{const _0x226b6d=(_0x34fbfb=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x1f0c9c=>_0x1f0c9c[_0x25ec51(0x127)]===_0x41f182['threadId']))==null?void 0x0:_0x34fbfb[_0x25ec51(0x144)];_0x226b6d&&this['_threadCommentModel'][_0x25ec51(0x131)](_0x1d2cf4,_0x554e0b,_0x226b6d['id'],_0x41f182['solved']===I[_0x25ec51(0x14c)]);break;}}}));}};S=V([p(0x0,_0x4f3a21(_0x24bf5a)),p(0x1,_0x4f3a21(_0x5aae77)),p(0x2,_0x4f3a21(_0x4eab9e)),p(0x3,_0x4f3a21(_0x8d5e07))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x255c02,_0xa0e69f,_0x25383d,_0x1519fd)=>{for(var _0x32de6a=_0x1519fd>0x1?void 0x0:_0x1519fd?k(_0xa0e69f,_0x25383d):_0xa0e69f,_0x48e18c=_0x255c02['length']-0x1,_0x28dfe3;_0x48e18c>=0x0;_0x48e18c--)(_0x28dfe3=_0x255c02[_0x48e18c])&&(_0x32de6a=_0x28dfe3(_0x32de6a)||_0x32de6a);return _0x32de6a;},_=(_0x3a289f,_0x1d6a32)=>(_0x37f1bb,_0x307b91)=>_0x1d6a32(_0x37f1bb,_0x307b91,_0x3a289f);function X(_0x40bf0a,_0x2abb47){const _0x14012f=_0xbf68e1,_0x217399=_0x40bf0a[_0x14012f(0x160)][0x0];return{..._0x2abb47,'id':_0x217399[_0x14012f(0x13a)],'resolved':_0x40bf0a[_0x14012f(0x145)]===0x1,'dT':D(_0x217399[_0x14012f(0x15a)]),'personId':_0x217399['userId'],'threadId':_0x217399[_0x14012f(0x127)]};}function ee(_0x1f96d6,_0x247b6f,_0x343b81){const _0x215786=_0xbf68e1;var _0x17e4e1,_0xbdea56;if(((_0xbdea56=(_0x17e4e1=_0x1f96d6==null?void 0x0:_0x1f96d6[_0x215786(0x160)])==null?void 0x0:_0x17e4e1[_0x215786(0x125)])!=null?_0xbdea56:0x0)>0x0){const _0x2bf7b7=(_0x8034a4,_0x4857c9)=>({'id':_0x8034a4[_0x215786(0x13a)],'threadId':_0x8034a4[_0x215786(0x127)],'dT':D(_0x8034a4[_0x215786(0x15a)]),'personId':_0x8034a4[_0x215786(0x17c)],'resolved':_0x1f96d6['solved']===I['Solved'],'unitId':_0x247b6f,'subUnitId':_0x343b81,'text':JSON['parse'](_0x8034a4[_0x215786(0x16b)]),'parentId':_0x4857c9}),_0x150b4b=_0x2bf7b7(_0x1f96d6[_0x215786(0x160)][0x0]);return{..._0x150b4b,'children':_0x1f96d6[_0x215786(0x160)][_0x215786(0x116)](0x1)[_0x215786(0x11d)](_0x234aaf=>_0x2bf7b7(_0x234aaf,_0x150b4b['id']))};}return null;}let f=class{constructor(_0xa200ee,_0x1df30a,_0x115f26,_0x2b7729){const _0x363a7c=_0xbf68e1;this[_0x363a7c(0x141)]=_0xa200ee,this[_0x363a7c(0x129)]=_0x1df30a,this[_0x363a7c(0x12d)]=_0x115f26,this[_0x363a7c(0x151)]=_0x2b7729;}async[_0xbf68e1(0x11e)](_0x11e6f4){const _0x3d6a56=_0xbf68e1;var _0x575978,_0x5f24cc;const {parentId:_0x110641,unitId:_0x342b4c,text:_0x252a1a,threadId:_0x400bad}=_0x11e6f4,_0x3bbe0b=(_0x5f24cc=(_0x575978=_0x252a1a[_0x3d6a56(0x119)])==null?void 0x0:_0x575978[_0x3d6a56(0x13b)](_0xe1f76a=>_0xe1f76a[_0x3d6a56(0x168)]===_0x1a431c[_0x3d6a56(0x15f)])['map'](_0xb1f29c=>_0xb1f29c['rangeId']))!=null?_0x5f24cc:[],_0x4ffe3c=JSON[_0x3d6a56(0x124)](_0x252a1a),_0x1e00d7=(await this[_0x3d6a56(0x12d)][_0x3d6a56(0x138)](_0x342b4c))[_0x3d6a56(0x156)]();if(_0x110641){const _0x31797d={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b,'threadId':_0x400bad},_0x1784cc=(await this[_0x3d6a56(0x141)][_0x3d6a56(0x15c)](_0x3d6a56(0x13d)+_0x342b4c+_0x3d6a56(0x164),{'body':_0x31797d}))[_0x3d6a56(0x123)][_0x3d6a56(0x158)];return{..._0x11e6f4,'id':_0x1784cc[_0x3d6a56(0x13a)],'dT':_0x5e2681(+_0x1784cc[_0x3d6a56(0x15a)])[_0x3d6a56(0x154)](_0x3d6a56(0x13f)),'personId':_0x1784cc[_0x3d6a56(0x17c)]};}else{const _0x4f68be={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b},_0x54ebc7=await this['_httpService'][_0x3d6a56(0x15c)]('/universer-api/comment/unit/'+_0x342b4c+_0x3d6a56(0x14a),{'body':_0x4f68be});return X(_0x54ebc7[_0x3d6a56(0x123)][_0x3d6a56(0x136)],_0x11e6f4);}}async['updateComment'](_0x77a8af){const _0x5229b8=_0xbf68e1;var _0x5942eb,_0x57cb38;const {text:_0x376793,unitId:_0x5c14d5}=_0x77a8af,_0x256637=(_0x57cb38=(_0x5942eb=_0x376793[_0x5229b8(0x119)])==null?void 0x0:_0x5942eb[_0x5229b8(0x13b)](_0x4fb5ce=>_0x4fb5ce['rangeType']===_0x1a431c[_0x5229b8(0x15f)])[_0x5229b8(0x11d)](_0x265ea5=>_0x265ea5['rangeId']))!=null?_0x57cb38:[],_0xe22770=JSON['stringify'](_0x376793),_0x58c073=_0x77a8af['threadId'],_0x370bc3=_0x77a8af['id'],_0x15b891={'memberId':(await this[_0x5229b8(0x12d)]['requireSession'](_0x5c14d5))[_0x5229b8(0x156)](),'unitId':_0x5c14d5,'threadId':_0x58c073,'mention':_0x256637,'content':_0xe22770,'replyId':_0x370bc3},_0x2d9d46=await this[_0x5229b8(0x141)][_0x5229b8(0x15c)](_0x5229b8(0x13d)+_0x5c14d5+_0x5229b8(0x147),{'body':_0x15b891});return!_0x2d9d46[_0x5229b8(0x123)][_0x5229b8(0x13c)]||_0x2d9d46[_0x5229b8(0x123)]['error'][_0x5229b8(0x177)]===0x1;}async[_0xbf68e1(0x131)](_0x47a996){const _0x1a038d=_0xbf68e1,{unitId:_0x476854}=_0x47a996,_0x339186=_0x47a996[_0x1a038d(0x127)],_0x2ba622={'memberId':this[_0x1a038d(0x129)][_0x1a038d(0x122)]()[_0x1a038d(0x12a)],'unitId':_0x476854,'threadId':_0x339186,'solved':_0x47a996[_0x1a038d(0x13e)]?I[_0x1a038d(0x14c)]:I['OpenOrReOpen']},_0x10bddc=await this[_0x1a038d(0x141)][_0x1a038d(0x15c)](_0x1a038d(0x13d)+_0x476854+_0x1a038d(0x135),{'body':_0x2ba622});return!_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]||_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]['code']===0x1;}async['deleteComment'](_0x3347b2,_0x2033d4,_0x1ef2bf,_0x29ebd5){const _0x344709=_0xbf68e1,_0x575194={'memberId':(await this['_sessionService'][_0x344709(0x138)](_0x3347b2))['getMemberID'](),'threadId':_0x1ef2bf,'replyId':_0x29ebd5,'unitId':_0x3347b2},_0x5e4cf6=await this[_0x344709(0x141)][_0x344709(0x15c)](_0x344709(0x13d)+_0x3347b2+_0x344709(0x15b),{'body':_0x575194});return!_0x5e4cf6[_0x344709(0x123)][_0x344709(0x13c)]||_0x5e4cf6['body'][_0x344709(0x13c)][_0x344709(0x177)]===0x1;}async[_0xbf68e1(0x142)](_0x42e936,_0x3cd446,_0x3e4fd3){const _0x1d2485=_0xbf68e1,_0xcf860f={'unitId':_0x42e936,'threadId':_0x3e4fd3},_0x1b0b49=await this[_0x1d2485(0x141)][_0x1d2485(0x15c)](_0x1d2485(0x13d)+_0x42e936+_0x1d2485(0x176),{'body':_0xcf860f}),_0x56c260=_0x3e4fd3[_0x1d2485(0x11d)](_0x46a2e1=>ee(_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x172)][_0x46a2e1],_0x42e936,_0x3cd446))[_0x1d2485(0x13b)](Boolean);return Object[_0x1d2485(0x134)](_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x12b)])[_0x1d2485(0x166)](_0x30ca58=>{const _0x256439=_0x1d2485;this[_0x256439(0x129)]['addUser'](_0x30ca58);}),_0x56c260;}['saveCommentToSnapshot'](_0x78d2e0){const _0x3a3e19=_0xbf68e1;return{'id':_0x78d2e0['id'],'threadId':_0x78d2e0['threadId'],'ref':_0x78d2e0[_0x3a3e19(0x15e)]};}};f=Q([_(0x0,_0x4f3a21(_0x36f428)),_(0x1,_0x4f3a21(_0x4eab9e)),_(0x2,_0x4f3a21(_0x28cbe3)),_(0x3,_0x4f3a21(_0x8d5e07))],f);var re=Object[_0xbf68e1(0x178)],te=(_0x5845b6,_0x46f690,_0x52b141,_0x453933)=>{const _0x11a8a0=_0xbf68e1;for(var _0x59b20d=_0x453933>0x1?void 0x0:_0x453933?re(_0x46f690,_0x52b141):_0x46f690,_0x4c4aa6=_0x5845b6[_0x11a8a0(0x125)]-0x1,_0x47346c;_0x4c4aa6>=0x0;_0x4c4aa6--)(_0x47346c=_0x5845b6[_0x4c4aa6])&&(_0x59b20d=_0x47346c(_0x59b20d)||_0x59b20d);return _0x59b20d;},N=(_0x19e5d2,_0x1686db)=>(_0x4d9ef4,_0x4d4a0b)=>_0x1686db(_0x4d9ef4,_0x4d4a0b,_0x19e5d2);let g=class extends _0x5a933e{constructor(_0x1386e0,_0x411940){const _0x2bb172=_0xbf68e1;super(),this[_0x2bb172(0x175)]=_0x1386e0,this['_threadCommentDataSource']=_0x411940,this[_0x2bb172(0x117)]();}[_0xbf68e1(0x117)](){const _0x4e4959=_0xbf68e1;this[_0x4e4959(0x175)]['dataSource']=this[_0x4e4959(0x157)],this[_0x4e4959(0x175)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xe116fb),N(0x1,_0x4f3a21(f))],g);var se=Object[_0xbf68e1(0x163)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x112488,_0x361639,_0x2ca661)=>_0x361639 in _0x112488?se(_0x112488,_0x361639,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ca661}):_0x112488[_0x361639]=_0x2ca661,ie=(_0x3a3ca9,_0x1d8911,_0x27bba6,_0x1b3536)=>{const _0x6ec18d=_0xbf68e1;for(var _0x1fe28f=_0x1b3536>0x1?void 0x0:_0x1b3536?oe(_0x1d8911,_0x27bba6):_0x1d8911,_0x482e95=_0x3a3ca9[_0x6ec18d(0x125)]-0x1,_0x5d22af;_0x482e95>=0x0;_0x482e95--)(_0x5d22af=_0x3a3ca9[_0x482e95])&&(_0x1fe28f=_0x5d22af(_0x1fe28f)||_0x1fe28f);return _0x1fe28f;},w=(_0x113109,_0x126625)=>(_0x2189b3,_0x5ffa6f)=>_0x126625(_0x2189b3,_0x5ffa6f,_0x113109),$=(_0x11a43c,_0x456808,_0x189106)=>ne(_0x11a43c,typeof _0x456808!=_0xbf68e1(0x169)?_0x456808+'':_0x456808,_0x189106);let b=class extends _0x32d5ff{constructor(_0xb71a87=M,_0x17be08,_0x11d6f2){const _0x4d9ffd=_0xbf68e1;super(),this[_0x4d9ffd(0x146)]=_0xb71a87,this[_0x4d9ffd(0x151)]=_0x17be08,this[_0x4d9ffd(0x15d)]=_0x11d6f2;const {..._0x18e461}=_0x40e613({},M,this[_0x4d9ffd(0x146)]);this['_configService'][_0x4d9ffd(0x137)](z,_0x18e461);}[_0xbf68e1(0x118)](){const _0x3ad986=_0xbf68e1;[[f],[g],[S]][_0x3ad986(0x166)](_0x28bc58=>{const _0x3ca970=_0x3ad986;this[_0x3ca970(0x151)][_0x3ca970(0x12f)](_0x28bc58);});}['onReady'](){const _0x8738b8=_0xbf68e1;this[_0x8738b8(0x151)][_0x8738b8(0x161)](g),this[_0x8738b8(0x151)][_0x8738b8(0x161)](S);}};$(b,_0xbf68e1(0x143),W),$(b,_0xbf68e1(0x133),_0x536cd8['UNIVER_UNKNOWN']),b=ie([_0x38802e(_0x4b97b3,_0x9525d4,_0x864633),w(0x1,_0x4f3a21(_0x8d5e07)),w(0x2,_0x350c90)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x717b1a,_0x1c1488){const _0x1a0ba4=_0x490f,_0x1606a2=_0x717b1a();while(!![]){try{const _0x169a84=-parseInt(_0x1a0ba4(0x15d))/0x1*(parseInt(_0x1a0ba4(0xfc))/0x2)+parseInt(_0x1a0ba4(0xf6))/0x3+-parseInt(_0x1a0ba4(0xf4))/0x4*(-parseInt(_0x1a0ba4(0x11a))/0x5)+parseInt(_0x1a0ba4(0x13f))/0x6+parseInt(_0x1a0ba4(0x11c))/0x7*(parseInt(_0x1a0ba4(0x131))/0x8)+parseInt(_0x1a0ba4(0x134))/0x9+parseInt(_0x1a0ba4(0x13a))/0xa*(-parseInt(_0x1a0ba4(0x14f))/0xb);if(_0x169a84===_0x1c1488)break;else _0x1606a2['push'](_0x1606a2['shift']());}catch(_0xb63bf1){_0x1606a2['push'](_0x1606a2['shift']());}}}(_0x5e01,0xa121f),function(_0x5671a6,_0x3923f7){const _0x3f7696=_0x490f;typeof exports==_0x3f7696(0x12a)&&typeof module<'u'?_0x3923f7(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==_0x3f7696(0x133)&&define[_0x3f7696(0x123)]?define(['exports',_0x3f7696(0xf3),_0x3f7696(0x14d),_0x3f7696(0xfa),_0x3f7696(0x159),_0x3f7696(0x100),_0x3f7696(0x138),_0x3f7696(0x15e)],_0x3923f7):(_0x5671a6=typeof globalThis<'u'?globalThis:_0x5671a6||self,_0x3923f7(_0x5671a6[_0x3f7696(0xdf)]={},_0x5671a6['UniverProCollaborationClient'],_0x5671a6[_0x3f7696(0x106)],_0x5671a6[_0x3f7696(0x12b)],_0x5671a6['UniverThreadCommentUi'],_0x5671a6['UniverThreadComment'],_0x5671a6[_0x3f7696(0x138)],_0x5671a6[_0x3f7696(0x122)]));}(this,function(_0x573a9b,_0x417d9d,_0x145f0d,_0x39a36f,_0x3c6dc3,_0x33a67d,_0x1a6568,_0x148cf0){'use strict';const _0x215611=_0x490f;const _0x492416=_0x215611(0xf1);var _0xdbfad2=(_0x1fea17=>(_0x1fea17[_0x1fea17[_0x215611(0xfe)]=0x0]=_0x215611(0xfe),_0x1fea17[_0x1fea17[_0x215611(0x10f)]=0x1]='Solved',_0x1fea17[_0x1fea17[_0x215611(0xeb)]=-0x1]=_0x215611(0xeb),_0x1fea17))(_0xdbfad2||{}),_0x376ebd=(_0x4dc7b7=>(_0x4dc7b7[_0x4dc7b7[_0x215611(0x15b)]=0x0]=_0x215611(0x15b),_0x4dc7b7[_0x4dc7b7['Add']=0x1]=_0x215611(0x112),_0x4dc7b7[_0x4dc7b7['Reply']=0x2]=_0x215611(0xe4),_0x4dc7b7[_0x4dc7b7['Edit']=0x3]=_0x215611(0x141),_0x4dc7b7[_0x4dc7b7[_0x215611(0x11b)]=0x4]=_0x215611(0x11b),_0x4dc7b7[_0x4dc7b7[_0x215611(0xda)]=0x5]=_0x215611(0xda),_0x4dc7b7[_0x4dc7b7[_0x215611(0xeb)]=-0x1]=_0x215611(0xeb),_0x4dc7b7))(_0x376ebd||{});const _0xa48d69=_0x20d84b=>_0x39a36f[_0x215611(0xe9)](new Date(+_0x20d84b))[_0x215611(0x109)](_0x215611(0x114)),_0x184d32=async(_0x449f44,_0x3418ee)=>{const _0x15e643=_0x215611,_0x3c1491=_0x449f44[_0x15e643(0x137)](_0x39a36f['UserManagerService']),_0xfaf49=_0x449f44[_0x15e643(0x137)](_0x148cf0[_0x15e643(0x13e)]);_0x3418ee[_0x15e643(0xe3)](_0x44dcb9=>{_0x3c1491['getUser'](_0x44dcb9)&&_0x3418ee['delete'](_0x44dcb9);}),_0x3418ee[_0x15e643(0x161)]&&(await _0xfaf49[_0x15e643(0x137)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3418ee]}}))['body'][_0x15e643(0x11d)][_0x15e643(0xe3)](_0x52deb0=>{const _0x2f87c9=_0x15e643;_0x52deb0&&_0x3c1491[_0x2f87c9(0x10b)](_0x52deb0);});};var _0x534ee2=Object[_0x215611(0x14a)],_0x364be=(_0x31abdc,_0x586991,_0x42c625,_0x342ef9)=>{for(var _0x368350=_0x342ef9>0x1?void 0x0:_0x342ef9?_0x534ee2(_0x586991,_0x42c625):_0x586991,_0x35a3a4=_0x31abdc['length']-0x1,_0x21b69e;_0x35a3a4>=0x0;_0x35a3a4--)(_0x21b69e=_0x31abdc[_0x35a3a4])&&(_0x368350=_0x21b69e(_0x368350)||_0x368350);return _0x368350;},_0x3fe9f2=(_0x2e943d,_0x2c10c4)=>(_0x5bbb45,_0x2ddb60)=>_0x2c10c4(_0x5bbb45,_0x2ddb60,_0x2e943d);let _0x1ef255=class extends _0x39a36f['Disposable']{constructor(_0x2610ec,_0x45f51a,_0x4178a,_0x1623c2){const _0x371818=_0x215611;super(),this[_0x371818(0x156)]=_0x2610ec,this[_0x371818(0x10e)]=_0x45f51a,this[_0x371818(0x13d)]=_0x4178a,this[_0x371818(0x117)]=_0x1623c2,this[_0x371818(0x110)](),this[_0x371818(0x14c)]();}[_0x215611(0x14c)](){const _0x3b3ff0=_0x215611;this['disposeWithMe'](this['_threadCommentModel'][_0x3b3ff0(0xec)][_0x3b3ff0(0xfb)](_0x1a6568[_0x3b3ff0(0xde)](0x10))[_0x3b3ff0(0x103)](_0x5c2718=>{const _0x223b7d=_0x3b3ff0,_0x5a5e82=new Set();_0x5c2718['forEach'](_0x6721fb=>{const _0x5575ed=_0x490f;switch(_0x6721fb[_0x5575ed(0x15f)]){case _0x5575ed(0x13c):{const _0xb7a91c=_0x6721fb[_0x5575ed(0xef)][_0x5575ed(0x10d)];_0x5a5e82[_0x5575ed(0x13c)](_0xb7a91c);break;}}}),_0x184d32(this[_0x223b7d(0x117)],_0x5a5e82);}));}[_0x215611(0x110)](){const _0x5f214c=_0x215611;this[_0x5f214c(0x120)](this[_0x5f214c(0x156)][_0x5f214c(0xec)]['subscribe'](async _0x39f8f7=>{const _0x28b062=_0x5f214c;var _0x1c3bb8,_0x36adcb,_0x16382a,_0x529aee;const _0x3094b9=(_0x1c3bb8=this['_threadCommentModel'][_0x28b062(0x118)](_0x39f8f7['unitId'])[_0x28b062(0x162)](_0x50da1c=>_0x50da1c['threadId']===_0x39f8f7[_0x28b062(0xf8)]))==null?void 0x0:_0x1c3bb8[_0x28b062(0x10c)];if(!_0x3094b9)return;const {unitId:_0x5e55ef,subUnitId:_0x597a0a}=_0x3094b9;switch(_0x39f8f7[_0x28b062(0xdc)]&&this[_0x28b062(0x13d)]['addUser'](_0x39f8f7[_0x28b062(0xdc)]),_0x39f8f7[_0x28b062(0x15f)]){case _0x376ebd[_0x28b062(0x112)]:break;case _0x376ebd[_0x28b062(0xe4)]:{this[_0x28b062(0x10e)]['addComment'](_0x5e55ef,_0x597a0a,{'unitId':_0x5e55ef,'subUnitId':_0x597a0a,'ref':'','id':_0x39f8f7[_0x28b062(0x158)],'dT':_0xa48d69(+_0x39f8f7[_0x28b062(0x101)]),'threadId':_0x39f8f7[_0x28b062(0xf8)],'personId':(_0x16382a=(_0x36adcb=_0x39f8f7[_0x28b062(0xdc)])==null?void 0x0:_0x36adcb[_0x28b062(0x150)])!=null?_0x16382a:_0x39f8f7[_0x28b062(0xf2)],'text':JSON['parse'](_0x39f8f7[_0x28b062(0x116)]),'parentId':_0x3094b9['id']});break;}case _0x376ebd[_0x28b062(0x11b)]:{const _0x2533d9=this[_0x28b062(0x10e)][_0x28b062(0xff)](_0x5e55ef,_0x597a0a,_0x39f8f7[_0x28b062(0x158)]);_0x2533d9&&_0x2533d9['parentId']&&this[_0x28b062(0x10e)][_0x28b062(0x147)](_0x5e55ef,_0x597a0a,_0x39f8f7[_0x28b062(0x158)]);break;}case _0x376ebd[_0x28b062(0x141)]:{this[_0x28b062(0x10e)][_0x28b062(0x143)](_0x5e55ef,_0x597a0a,{'commentId':_0x39f8f7['replyId'],'text':JSON[_0x28b062(0x157)](_0x39f8f7[_0x28b062(0x116)])});break;}case _0x376ebd['Solve']:{const _0x4aeaba=(_0x529aee=this[_0x28b062(0x10e)][_0x28b062(0x118)](_0x39f8f7[_0x28b062(0x135)])['find'](_0x76a39=>_0x76a39[_0x28b062(0xf8)]===_0x39f8f7[_0x28b062(0xf8)]))==null?void 0x0:_0x529aee[_0x28b062(0x10c)];_0x4aeaba&&this[_0x28b062(0x10e)]['resolveComment'](_0x5e55ef,_0x597a0a,_0x4aeaba['id'],_0x39f8f7[_0x28b062(0x139)]===_0xdbfad2[_0x28b062(0x10f)]);break;}}}));}};_0x1ef255=_0x364be([_0x3fe9f2(0x0,_0x39a36f['Inject'](_0x417d9d['CommentService'])),_0x3fe9f2(0x1,_0x39a36f[_0x215611(0x145)](_0x33a67d[_0x215611(0x12f)])),_0x3fe9f2(0x2,_0x39a36f[_0x215611(0x145)](_0x39a36f[_0x215611(0xed)])),_0x3fe9f2(0x3,_0x39a36f['Inject'](_0x39a36f[_0x215611(0x154)]))],_0x1ef255);const _0xf38551=_0x215611(0x15c),_0x18a67f={};var _0x50420a=Object[_0x215611(0x14a)],_0x51a085=(_0x277395,_0x11e0cf,_0x43ef4f,_0x4d5257)=>{const _0x547361=_0x215611;for(var _0x363874=_0x4d5257>0x1?void 0x0:_0x4d5257?_0x50420a(_0x11e0cf,_0x43ef4f):_0x11e0cf,_0x3d6766=_0x277395[_0x547361(0x155)]-0x1,_0x2240ee;_0x3d6766>=0x0;_0x3d6766--)(_0x2240ee=_0x277395[_0x3d6766])&&(_0x363874=_0x2240ee(_0x363874)||_0x363874);return _0x363874;},_0x39a575=(_0x582ff0,_0x2ca886)=>(_0x2417a9,_0x552bd8)=>_0x2ca886(_0x2417a9,_0x552bd8,_0x582ff0);function _0x2ba3fb(_0x22c340,_0x4c3694){const _0x24eb7a=_0x215611,_0xcf7e4d=_0x22c340[_0x24eb7a(0x111)][0x0];return{..._0x4c3694,'id':_0xcf7e4d['replyId'],'resolved':_0x22c340[_0x24eb7a(0x139)]===0x1,'dT':_0xa48d69(_0xcf7e4d[_0x24eb7a(0x101)]),'personId':_0xcf7e4d[_0x24eb7a(0xf2)],'threadId':_0xcf7e4d[_0x24eb7a(0xf8)]};}function _0x370efe(_0x3aa029,_0x304dfa,_0x1dee96){const _0x17ab5f=_0x215611;var _0x20ae0c,_0x2c83f5;if(((_0x2c83f5=(_0x20ae0c=_0x3aa029==null?void 0x0:_0x3aa029[_0x17ab5f(0x111)])==null?void 0x0:_0x20ae0c[_0x17ab5f(0x155)])!=null?_0x2c83f5:0x0)>0x0){const _0x55f114=(_0x458a8f,_0x3b9fa6)=>({'id':_0x458a8f[_0x17ab5f(0x158)],'threadId':_0x458a8f[_0x17ab5f(0xf8)],'dT':_0xa48d69(_0x458a8f[_0x17ab5f(0x101)]),'personId':_0x458a8f[_0x17ab5f(0xf2)],'resolved':_0x3aa029[_0x17ab5f(0x139)]===_0xdbfad2[_0x17ab5f(0x10f)],'unitId':_0x304dfa,'subUnitId':_0x1dee96,'text':JSON['parse'](_0x458a8f[_0x17ab5f(0x116)]),'parentId':_0x3b9fa6}),_0x43a749=_0x55f114(_0x3aa029[_0x17ab5f(0x111)][0x0]);return{..._0x43a749,'children':_0x3aa029[_0x17ab5f(0x111)][_0x17ab5f(0x130)](0x1)[_0x17ab5f(0xe0)](_0x10ee9f=>_0x55f114(_0x10ee9f,_0x43a749['id']))};}return null;}let _0x2752c3=class{constructor(_0x477726,_0x4ec4cc,_0x88c88a,_0x3acbcc){const _0x36116f=_0x215611;this[_0x36116f(0x148)]=_0x477726,this[_0x36116f(0x13d)]=_0x4ec4cc,this[_0x36116f(0x126)]=_0x88c88a,this[_0x36116f(0x117)]=_0x3acbcc;}async[_0x215611(0x108)](_0x250461){const _0x11c2da=_0x215611;var _0x521a96,_0xca4f7a;const {parentId:_0x17ebae,unitId:_0x23d20a,text:_0x2ff8a1,threadId:_0x464d07}=_0x250461,_0x3613f0=(_0xca4f7a=(_0x521a96=_0x2ff8a1[_0x11c2da(0xfd)])==null?void 0x0:_0x521a96['filter'](_0x5ec0aa=>_0x5ec0aa[_0x11c2da(0x105)]===_0x39a36f[_0x11c2da(0x144)]['COMMENT'])[_0x11c2da(0xe0)](_0x598791=>_0x598791['rangeId']))!=null?_0xca4f7a:[],_0xbbad2f=JSON[_0x11c2da(0xee)](_0x2ff8a1),_0xc7d8f=(await this[_0x11c2da(0x126)][_0x11c2da(0x153)](_0x23d20a))['getMemberID']();if(_0x17ebae){const _0x3fa330={'memberId':_0xc7d8f,'unitId':_0x23d20a,'content':_0xbbad2f,'mention':_0x3613f0,'threadId':_0x464d07},_0x23dd80=(await this[_0x11c2da(0x148)][_0x11c2da(0x14e)](_0x11c2da(0xe5)+_0x23d20a+_0x11c2da(0x142),{'body':_0x3fa330}))['body'][_0x11c2da(0x152)];return{..._0x250461,'id':_0x23dd80['replyId'],'dT':_0x39a36f[_0x11c2da(0xe9)](+_0x23dd80[_0x11c2da(0x101)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x23dd80[_0x11c2da(0xf2)]};}else{const _0x1fb848={'memberId':_0xc7d8f,'unitId':_0x23d20a,'content':_0xbbad2f,'mention':_0x3613f0},_0x5b0a8c=await this[_0x11c2da(0x148)][_0x11c2da(0x14e)](_0x11c2da(0xe5)+_0x23d20a+_0x11c2da(0xe8),{'body':_0x1fb848});return _0x2ba3fb(_0x5b0a8c[_0x11c2da(0x104)]['comment'],_0x250461);}}async[_0x215611(0x143)](_0xe11599){const _0x4e0deb=_0x215611;var _0x5edc57,_0xcc273e;const {text:_0x25394f,unitId:_0x179a59}=_0xe11599,_0x343c32=(_0xcc273e=(_0x5edc57=_0x25394f['customRanges'])==null?void 0x0:_0x5edc57[_0x4e0deb(0x163)](_0x4055be=>_0x4055be['rangeType']===_0x39a36f[_0x4e0deb(0x144)][_0x4e0deb(0x165)])[_0x4e0deb(0xe0)](_0x3f71c4=>_0x3f71c4[_0x4e0deb(0x12e)]))!=null?_0xcc273e:[],_0x4a3b5e=JSON['stringify'](_0x25394f),_0x4a132b=_0xe11599['threadId'],_0x2e1334=_0xe11599['id'],_0x9651ac={'memberId':(await this[_0x4e0deb(0x126)]['requireSession'](_0x179a59))[_0x4e0deb(0xf9)](),'unitId':_0x179a59,'threadId':_0x4a132b,'mention':_0x343c32,'content':_0x4a3b5e,'replyId':_0x2e1334},_0xe3a22c=await this[_0x4e0deb(0x148)][_0x4e0deb(0x14e)](_0x4e0deb(0xe5)+_0x179a59+_0x4e0deb(0x160),{'body':_0x9651ac});return!_0xe3a22c[_0x4e0deb(0x104)]['error']||_0xe3a22c[_0x4e0deb(0x104)][_0x4e0deb(0xe6)][_0x4e0deb(0x140)]===0x1;}async[_0x215611(0xea)](_0x4313a1){const _0xf05419=_0x215611,{unitId:_0x5ac02b}=_0x4313a1,_0x2be3ee=_0x4313a1[_0xf05419(0xf8)],_0x113dd9={'memberId':this[_0xf05419(0x13d)][_0xf05419(0x15a)]()[_0xf05419(0x150)],'unitId':_0x5ac02b,'threadId':_0x2be3ee,'solved':_0x4313a1[_0xf05419(0x127)]?_0xdbfad2[_0xf05419(0x10f)]:_0xdbfad2['OpenOrReOpen']},_0x1deba5=await this[_0xf05419(0x148)][_0xf05419(0x14e)]('/universer-api/comment/unit/'+_0x5ac02b+_0xf05419(0x12c),{'body':_0x113dd9});return!_0x1deba5[_0xf05419(0x104)][_0xf05419(0xe6)]||_0x1deba5['body'][_0xf05419(0xe6)][_0xf05419(0x140)]===0x1;}async[_0x215611(0x147)](_0x22271f,_0x468ed0,_0xf2c8d2,_0x13acaa){const _0x4e6a72=_0x215611,_0x30b704={'memberId':(await this[_0x4e6a72(0x126)][_0x4e6a72(0x153)](_0x22271f))[_0x4e6a72(0xf9)](),'threadId':_0xf2c8d2,'replyId':_0x13acaa,'unitId':_0x22271f},_0x13ccb8=await this[_0x4e6a72(0x148)][_0x4e6a72(0x14e)](_0x4e6a72(0xe5)+_0x22271f+_0x4e6a72(0x136),{'body':_0x30b704});return!_0x13ccb8['body']['error']||_0x13ccb8[_0x4e6a72(0x104)][_0x4e6a72(0xe6)][_0x4e6a72(0x140)]===0x1;}async[_0x215611(0xf5)](_0x51434b,_0xc8b1ad,_0x3dd323){const _0x5bdee8=_0x215611,_0x345b60={'unitId':_0x51434b,'threadId':_0x3dd323},_0x46e86b=await this[_0x5bdee8(0x148)][_0x5bdee8(0x14e)]('/universer-api/comment/unit/'+_0x51434b+_0x5bdee8(0x119),{'body':_0x345b60}),_0x23b14a=_0x3dd323[_0x5bdee8(0xe0)](_0x56b46b=>_0x370efe(_0x46e86b[_0x5bdee8(0x104)][_0x5bdee8(0xe1)][_0x56b46b],_0x51434b,_0xc8b1ad))[_0x5bdee8(0x163)](Boolean);return Object['values'](_0x46e86b['body']['users'])[_0x5bdee8(0xe3)](_0x2e2cbd=>{const _0x3ee02d=_0x5bdee8;this[_0x3ee02d(0x13d)][_0x3ee02d(0x10b)](_0x2e2cbd);}),_0x23b14a;}[_0x215611(0x124)](_0x53582e){const _0x237553=_0x215611;return{'id':_0x53582e['id'],'threadId':_0x53582e[_0x237553(0xf8)],'ref':_0x53582e[_0x237553(0x164)]};}};_0x2752c3=_0x51a085([_0x39a575(0x0,_0x39a36f[_0x215611(0x145)](_0x148cf0[_0x215611(0x13e)])),_0x39a575(0x1,_0x39a36f[_0x215611(0x145)](_0x39a36f[_0x215611(0xed)])),_0x39a575(0x2,_0x39a36f[_0x215611(0x145)](_0x417d9d[_0x215611(0x14b)])),_0x39a575(0x3,_0x39a36f['Inject'](_0x39a36f[_0x215611(0x154)]))],_0x2752c3);var _0x2491e0=Object['getOwnPropertyDescriptor'],_0x104895=(_0xf65519,_0xa54b29,_0x452ef9,_0x28e6ed)=>{const _0x4adbe0=_0x215611;for(var _0x5b0722=_0x28e6ed>0x1?void 0x0:_0x28e6ed?_0x2491e0(_0xa54b29,_0x452ef9):_0xa54b29,_0x337a58=_0xf65519[_0x4adbe0(0x155)]-0x1,_0x41b152;_0x337a58>=0x0;_0x337a58--)(_0x41b152=_0xf65519[_0x337a58])&&(_0x5b0722=_0x41b152(_0x5b0722)||_0x5b0722);return _0x5b0722;},_0x5daf24=(_0x13075d,_0x3dfcdd)=>(_0x555914,_0x4507f0)=>_0x3dfcdd(_0x555914,_0x4507f0,_0x13075d);let _0x4dec4e=class extends _0x39a36f[_0x215611(0xdd)]{constructor(_0x5c41ba,_0x5f4b77){const _0x4efe7e=_0x215611;super(),this[_0x4efe7e(0x132)]=_0x5c41ba,this[_0x4efe7e(0x113)]=_0x5f4b77,this['_initDataSource']();}[_0x215611(0x11f)](){const _0x5e4e11=_0x215611;this[_0x5e4e11(0x132)]['dataSource']=this[_0x5e4e11(0x113)],this['_threadCommentDataSourceService'][_0x5e4e11(0x102)]=!0x1;}};_0x4dec4e=_0x104895([_0x5daf24(0x0,_0x33a67d[_0x215611(0xe7)]),_0x5daf24(0x1,_0x39a36f[_0x215611(0x145)](_0x2752c3))],_0x4dec4e);var _0xb2c355=Object['defineProperty'],_0x22c91d=Object['getOwnPropertyDescriptor'],_0x35e0ec=(_0x10fa39,_0x4533e8,_0x34c9bf)=>_0x4533e8 in _0x10fa39?_0xb2c355(_0x10fa39,_0x4533e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x34c9bf}):_0x10fa39[_0x4533e8]=_0x34c9bf,_0x34e7b5=(_0x33a997,_0x50fa14,_0x2f69b6,_0x41b665)=>{const _0x2e9ff2=_0x215611;for(var _0x3af611=_0x41b665>0x1?void 0x0:_0x41b665?_0x22c91d(_0x50fa14,_0x2f69b6):_0x50fa14,_0x29be8b=_0x33a997[_0x2e9ff2(0x155)]-0x1,_0x2a23ba;_0x29be8b>=0x0;_0x29be8b--)(_0x2a23ba=_0x33a997[_0x29be8b])&&(_0x3af611=_0x2a23ba(_0x3af611)||_0x3af611);return _0x3af611;},_0xe7f23c=(_0x5cef46,_0x5a13ce)=>(_0x484253,_0x109e46)=>_0x5a13ce(_0x484253,_0x109e46,_0x5cef46),_0x5df7a0=(_0x1d9a54,_0x4c4937,_0x56be0b)=>_0x35e0ec(_0x1d9a54,typeof _0x4c4937!=_0x215611(0x125)?_0x4c4937+'':_0x4c4937,_0x56be0b);_0x573a9b[_0x215611(0x146)]=class extends _0x39a36f[_0x215611(0x128)]{constructor(_0x90cffa=_0x18a67f,_0x475db3,_0x35ca61){const _0x2ca951=_0x215611;super(),this[_0x2ca951(0x115)]=_0x90cffa,this[_0x2ca951(0x117)]=_0x475db3,this[_0x2ca951(0x121)]=_0x35ca61;const {..._0x33f0b3}=_0x39a36f[_0x2ca951(0x11e)]({},_0x18a67f,this[_0x2ca951(0x115)]);this[_0x2ca951(0x121)][_0x2ca951(0xf0)](_0xf38551,_0x33f0b3);}[_0x215611(0xe2)](){[[_0x2752c3],[_0x4dec4e],[_0x1ef255]]['forEach'](_0x1dbc4d=>{const _0x5a8bcf=_0x490f;this[_0x5a8bcf(0x117)][_0x5a8bcf(0x13c)](_0x1dbc4d);});}['onReady'](){const _0x7be63f=_0x215611;this[_0x7be63f(0x117)]['get'](_0x4dec4e),this[_0x7be63f(0x117)][_0x7be63f(0x137)](_0x1ef255);}},_0x5df7a0(_0x573a9b[_0x215611(0x146)],_0x215611(0x129),_0x492416),_0x5df7a0(_0x573a9b[_0x215611(0x146)],_0x215611(0x15f),_0x39a36f['UniverInstanceType'][_0x215611(0x151)]),_0x573a9b[_0x215611(0x146)]=_0x34e7b5([_0x39a36f[_0x215611(0x107)](_0x3c6dc3[_0x215611(0x12d)],_0x417d9d['UniverCollaborationClientPlugin'],_0x145f0d[_0x215611(0x13b)]),_0xe7f23c(0x1,_0x39a36f['Inject'](_0x39a36f[_0x215611(0x154)])),_0xe7f23c(0x2,_0x39a36f[_0x215611(0x10a)])],_0x573a9b[_0x215611(0x146)]),Object[_0x215611(0xdb)](_0x573a9b,Symbol[_0x215611(0xf7)],{'value':_0x215611(0x149)});}));function _0x490f(_0x39c211,_0x3753b4){const _0x5e0152=_0x5e01();return _0x490f=function(_0x490f7e,_0x1c0159){_0x490f7e=_0x490f7e-0xda;let _0x59d18=_0x5e0152[_0x490f7e];return _0x59d18;},_0x490f(_0x39c211,_0x3753b4);}function _0x5e01(){const _0x4b77da=['find','filter','ref','COMMENT','Solve','defineProperty','user','Disposable','bufferTime','UniverProThreadCommentDatasource','map','comments','onStarting','forEach','Reply','/universer-api/comment/unit/','error','IThreadCommentDataSourceService','/add','dayjs','resolveComment','UNRECOGNIZED','commentUpdate$','UserManagerService','stringify','payload','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','@univerjs-pro/collaboration-client','4027740RfbFli','listComments','3403284wIYfWn','toStringTag','threadId','getMemberID','@univerjs/core','pipe','56054NGFqtR','customRanges','OpenOrReOpen','getComment','@univerjs/thread-comment','createTimestamp','syncUpdateMutationToColla','subscribe','body','rangeType','UniverProLicense','DependentOn','addComment','format','IConfigService','addUser','root','personId','_threadCommentModel','Solved','_init','replies','Add','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','_config','content','_injector','getUnit','/list','5RPEKzL','Delete','28shatrX','users','merge','_initDataSource','disposeWithMe','_configService','UniverNetwork','amd','saveCommentToSnapshot','symbol','_sessionService','resolved','Plugin','pluginName','object','UniverCore','/solved','UniverThreadCommentUIPlugin','rangeId','ThreadCommentModel','slice','2196248ZirvQe','_threadCommentDataSourceService','function','3224259tRXLdo','unitId','/delete','get','rxjs','solved','1190SaWvcv','UniverLicensePlugin','add','_userService','HTTPService','5686458fgEzMw','code','Edit','/reply','updateComment','CustomRangeType','Inject','UniverThreadCommentDataSourcePlugin','deleteComment','_httpService','Module','getOwnPropertyDescriptor','CollaborationSessionService','_initUserSync','@univerjs-pro/license','post','284031ECdJTf','userID','UNIVER_UNKNOWN','reply','requireSession','Injector','length','_commentService','parse','replyId','@univerjs/thread-comment-ui','getCurrentUser','Unknown','thread-comment-data-source.config','29tqIgZl','@univerjs/network','type','/edit','size'];_0x5e01=function(){return _0x4b77da;};return _0x5e01();}
1
+ (function(_0x37ae13,_0x5a5cbe){const _0x48274e=_0x2267,_0x369138=_0x37ae13();while(!![]){try{const _0x2c36fa=-parseInt(_0x48274e(0x1a5))/0x1*(parseInt(_0x48274e(0x138))/0x2)+-parseInt(_0x48274e(0x124))/0x3+parseInt(_0x48274e(0x13a))/0x4+parseInt(_0x48274e(0x155))/0x5*(-parseInt(_0x48274e(0x1a0))/0x6)+-parseInt(_0x48274e(0x19c))/0x7*(-parseInt(_0x48274e(0x157))/0x8)+parseInt(_0x48274e(0x126))/0x9*(parseInt(_0x48274e(0x12c))/0xa)+-parseInt(_0x48274e(0x16f))/0xb*(-parseInt(_0x48274e(0x19b))/0xc);if(_0x2c36fa===_0x5a5cbe)break;else _0x369138['push'](_0x369138['shift']());}catch(_0x1c8e54){_0x369138['push'](_0x369138['shift']());}}}(_0x2455,0xd2e20),function(_0x2b867e,_0x16f207){const _0x43d61f=_0x2267;typeof exports==_0x43d61f(0x1a3)&&typeof module<'u'?_0x16f207(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==_0x43d61f(0x175)&&define[_0x43d61f(0x150)]?define([_0x43d61f(0x159),_0x43d61f(0x143),_0x43d61f(0x133),'@univerjs/core',_0x43d61f(0x127),_0x43d61f(0x193),_0x43d61f(0x15d),'@univerjs/network'],_0x16f207):(_0x2b867e=typeof globalThis<'u'?globalThis:_0x2b867e||self,_0x16f207(_0x2b867e[_0x43d61f(0x199)]={},_0x2b867e['UniverProCollaborationClient'],_0x2b867e[_0x43d61f(0x1a7)],_0x2b867e['UniverCore'],_0x2b867e[_0x43d61f(0x154)],_0x2b867e[_0x43d61f(0x17c)],_0x2b867e[_0x43d61f(0x15d)],_0x2b867e[_0x43d61f(0x12b)]));}(this,function(_0x18e5b4,_0x5f3c61,_0x11fede,_0x501cc3,_0x418467,_0x24abdc,_0x5510be,_0x1311d3){'use strict';const _0x2baaa9=_0x2267;const _0x174803='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xa4547d=(_0x2495f4=>(_0x2495f4[_0x2495f4[_0x2baaa9(0x132)]=0x0]=_0x2baaa9(0x132),_0x2495f4[_0x2495f4['Solved']=0x1]=_0x2baaa9(0x14f),_0x2495f4[_0x2495f4[_0x2baaa9(0x179)]=-0x1]=_0x2baaa9(0x179),_0x2495f4))(_0xa4547d||{}),_0x3dc639=(_0xa9a032=>(_0xa9a032[_0xa9a032[_0x2baaa9(0x14a)]=0x0]='Unknown',_0xa9a032[_0xa9a032['Add']=0x1]=_0x2baaa9(0x192),_0xa9a032[_0xa9a032[_0x2baaa9(0x12e)]=0x2]=_0x2baaa9(0x12e),_0xa9a032[_0xa9a032[_0x2baaa9(0x15c)]=0x3]=_0x2baaa9(0x15c),_0xa9a032[_0xa9a032[_0x2baaa9(0x12a)]=0x4]='Delete',_0xa9a032[_0xa9a032[_0x2baaa9(0x152)]=0x5]=_0x2baaa9(0x152),_0xa9a032[_0xa9a032[_0x2baaa9(0x179)]=-0x1]='UNRECOGNIZED',_0xa9a032))(_0x3dc639||{});const _0x1d4ebb=_0x3a193b=>_0x501cc3[_0x2baaa9(0x144)](new Date(+_0x3a193b))['format'](_0x2baaa9(0x194)),_0x59220f=async(_0x1abdf2,_0x317bad)=>{const _0x5ed52b=_0x2baaa9,_0x585fd1=_0x1abdf2[_0x5ed52b(0x136)](_0x501cc3['UserManagerService']),_0xede2d6=_0x1abdf2[_0x5ed52b(0x136)](_0x1311d3[_0x5ed52b(0x148)]);_0x317bad[_0x5ed52b(0x189)](_0x2b38ba=>{const _0x174e69=_0x5ed52b;_0x585fd1[_0x174e69(0x183)](_0x2b38ba)&&_0x317bad[_0x174e69(0x170)](_0x2b38ba);}),_0x317bad['size']&&(await _0xede2d6[_0x5ed52b(0x136)]('/universer-api/user/list',{'params':{'userIDs':[..._0x317bad]}}))['body']['users'][_0x5ed52b(0x189)](_0x4c22a=>{const _0x93ffba=_0x5ed52b;_0x4c22a&&_0x585fd1[_0x93ffba(0x182)](_0x4c22a);});};var _0xbac97=Object[_0x2baaa9(0x13b)],_0x844ec0=(_0x2beb31,_0x1cd827,_0x54b6bb,_0x1b365)=>{const _0xdfe69d=_0x2baaa9;for(var _0x12d335=_0x1b365>0x1?void 0x0:_0x1b365?_0xbac97(_0x1cd827,_0x54b6bb):_0x1cd827,_0x13223f=_0x2beb31[_0xdfe69d(0x14b)]-0x1,_0x2994ba;_0x13223f>=0x0;_0x13223f--)(_0x2994ba=_0x2beb31[_0x13223f])&&(_0x12d335=_0x2994ba(_0x12d335)||_0x12d335);return _0x12d335;},_0x473db9=(_0x35725d,_0x19e3ad)=>(_0x69dacd,_0x4d7879)=>_0x19e3ad(_0x69dacd,_0x4d7879,_0x35725d);let _0x4a3036=class extends _0x501cc3[_0x2baaa9(0x180)]{constructor(_0x1b3c15,_0x4c2acf,_0xbacdfb,_0x3c37ed){const _0x426d90=_0x2baaa9;super(),this['_commentService']=_0x1b3c15,this[_0x426d90(0x19d)]=_0x4c2acf,this['_userService']=_0xbacdfb,this[_0x426d90(0x134)]=_0x3c37ed,this[_0x426d90(0x16e)](),this[_0x426d90(0x18c)]();}[_0x2baaa9(0x18c)](){const _0x13646c=_0x2baaa9;this['disposeWithMe'](this['_threadCommentModel'][_0x13646c(0x17f)]['pipe'](_0x5510be[_0x13646c(0x18d)](0x10))['subscribe'](_0x4f3197=>{const _0x111ed6=_0x13646c,_0x5dc08e=new Set();_0x4f3197[_0x111ed6(0x189)](_0x4ea432=>{const _0x381b3b=_0x111ed6;switch(_0x4ea432[_0x381b3b(0x15e)]){case _0x381b3b(0x162):{const _0x58ac66=_0x4ea432[_0x381b3b(0x16a)][_0x381b3b(0x171)];_0x5dc08e['add'](_0x58ac66);break;}}}),_0x59220f(this['_injector'],_0x5dc08e);}));}['_init'](){const _0x129fed=_0x2baaa9;this[_0x129fed(0x169)](this[_0x129fed(0x14c)][_0x129fed(0x17f)][_0x129fed(0x18e)](async _0x132817=>{const _0x3bec6d=_0x129fed;var _0x15fb9c,_0x14c88a,_0x3200cb,_0x24d51e;const _0x4fea29=(_0x15fb9c=this[_0x3bec6d(0x19d)][_0x3bec6d(0x15b)](_0x132817[_0x3bec6d(0x18f)])[_0x3bec6d(0x149)](_0x1eb50e=>_0x1eb50e[_0x3bec6d(0x176)]===_0x132817['threadId']))==null?void 0x0:_0x15fb9c[_0x3bec6d(0x131)];if(!_0x4fea29)return;const {unitId:_0x4de98e,subUnitId:_0x46be9b}=_0x4fea29;switch(_0x132817['user']&&this[_0x3bec6d(0x156)][_0x3bec6d(0x182)](_0x132817[_0x3bec6d(0x186)]),_0x132817['type']){case _0x3dc639[_0x3bec6d(0x192)]:break;case _0x3dc639['Reply']:{this[_0x3bec6d(0x19d)]['addComment'](_0x4de98e,_0x46be9b,{'unitId':_0x4de98e,'subUnitId':_0x46be9b,'ref':'','id':_0x132817['replyId'],'dT':_0x1d4ebb(+_0x132817[_0x3bec6d(0x173)]),'threadId':_0x132817[_0x3bec6d(0x176)],'personId':(_0x3200cb=(_0x14c88a=_0x132817[_0x3bec6d(0x186)])==null?void 0x0:_0x14c88a['userID'])!=null?_0x3200cb:_0x132817[_0x3bec6d(0x184)],'text':JSON[_0x3bec6d(0x160)](_0x132817['content']),'parentId':_0x4fea29['id']});break;}case _0x3dc639[_0x3bec6d(0x12a)]:{const _0x30162a=this['_threadCommentModel'][_0x3bec6d(0x13c)](_0x4de98e,_0x46be9b,_0x132817[_0x3bec6d(0x145)]);_0x30162a&&_0x30162a[_0x3bec6d(0x19e)]&&this[_0x3bec6d(0x19d)][_0x3bec6d(0x197)](_0x4de98e,_0x46be9b,_0x132817[_0x3bec6d(0x145)]);break;}case _0x3dc639['Edit']:{this[_0x3bec6d(0x19d)][_0x3bec6d(0x17e)](_0x4de98e,_0x46be9b,{'commentId':_0x132817['replyId'],'text':JSON[_0x3bec6d(0x160)](_0x132817[_0x3bec6d(0x140)])});break;}case _0x3dc639[_0x3bec6d(0x152)]:{const _0x44ceff=(_0x24d51e=this[_0x3bec6d(0x19d)][_0x3bec6d(0x15b)](_0x132817[_0x3bec6d(0x18f)])[_0x3bec6d(0x149)](_0x4b260a=>_0x4b260a['threadId']===_0x132817[_0x3bec6d(0x176)]))==null?void 0x0:_0x24d51e[_0x3bec6d(0x131)];_0x44ceff&&this['_threadCommentModel'][_0x3bec6d(0x14d)](_0x4de98e,_0x46be9b,_0x44ceff['id'],_0x132817[_0x3bec6d(0x18a)]===_0xa4547d[_0x3bec6d(0x14f)]);break;}}}));}};_0x4a3036=_0x844ec0([_0x473db9(0x0,_0x501cc3['Inject'](_0x5f3c61['CommentService'])),_0x473db9(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x24abdc[_0x2baaa9(0x161)])),_0x473db9(0x2,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x137)])),_0x473db9(0x3,_0x501cc3['Inject'](_0x501cc3[_0x2baaa9(0x1a4)]))],_0x4a3036);const _0x593c3c=_0x2baaa9(0x187),_0x112cff={};var _0x2a0bd3=Object[_0x2baaa9(0x13b)],_0x5ef65a=(_0x481cd5,_0x18a98a,_0x58298,_0x2e7d31)=>{const _0x30f800=_0x2baaa9;for(var _0x4ba74d=_0x2e7d31>0x1?void 0x0:_0x2e7d31?_0x2a0bd3(_0x18a98a,_0x58298):_0x18a98a,_0x30f1d0=_0x481cd5[_0x30f800(0x14b)]-0x1,_0x444753;_0x30f1d0>=0x0;_0x30f1d0--)(_0x444753=_0x481cd5[_0x30f1d0])&&(_0x4ba74d=_0x444753(_0x4ba74d)||_0x4ba74d);return _0x4ba74d;},_0x16178c=(_0x3e7bcf,_0x3b3eb7)=>(_0x179dcc,_0x164099)=>_0x3b3eb7(_0x179dcc,_0x164099,_0x3e7bcf);function _0x3a7773(_0xd60066,_0x4b22d5){const _0x4e9c1f=_0x2baaa9,_0x193a83=_0xd60066[_0x4e9c1f(0x190)][0x0];return{..._0x4b22d5,'id':_0x193a83[_0x4e9c1f(0x145)],'resolved':_0xd60066[_0x4e9c1f(0x18a)]===0x1,'dT':_0x1d4ebb(_0x193a83[_0x4e9c1f(0x173)]),'personId':_0x193a83[_0x4e9c1f(0x184)],'threadId':_0x193a83[_0x4e9c1f(0x176)]};}function _0x3a55da(_0x46c22c,_0x16aa4a,_0x3a66af){const _0x2ac836=_0x2baaa9;var _0x1889ba,_0x1c397a;if(((_0x1c397a=(_0x1889ba=_0x46c22c==null?void 0x0:_0x46c22c[_0x2ac836(0x190)])==null?void 0x0:_0x1889ba[_0x2ac836(0x14b)])!=null?_0x1c397a:0x0)>0x0){const _0x5ec54a=(_0x32436b,_0x5b6f82)=>({'id':_0x32436b[_0x2ac836(0x145)],'threadId':_0x32436b[_0x2ac836(0x176)],'dT':_0x1d4ebb(_0x32436b[_0x2ac836(0x173)]),'personId':_0x32436b['userId'],'resolved':_0x46c22c[_0x2ac836(0x18a)]===_0xa4547d[_0x2ac836(0x14f)],'unitId':_0x16aa4a,'subUnitId':_0x3a66af,'text':JSON[_0x2ac836(0x160)](_0x32436b[_0x2ac836(0x140)]),'parentId':_0x5b6f82}),_0x2a048d=_0x5ec54a(_0x46c22c['replies'][0x0]);return{..._0x2a048d,'children':_0x46c22c[_0x2ac836(0x190)][_0x2ac836(0x17b)](0x1)[_0x2ac836(0x146)](_0x1e9731=>_0x5ec54a(_0x1e9731,_0x2a048d['id']))};}return null;}let _0x4a09a1=class{constructor(_0x500474,_0x2211df,_0x3e4ca3,_0xb69cf8){const _0x29bc55=_0x2baaa9;this['_httpService']=_0x500474,this[_0x29bc55(0x156)]=_0x2211df,this[_0x29bc55(0x15f)]=_0x3e4ca3,this[_0x29bc55(0x134)]=_0xb69cf8;}async['addComment'](_0x21683c){const _0x477650=_0x2baaa9;var _0x3e935c,_0x2f3a21;const {parentId:_0x36fd15,unitId:_0x528350,text:_0x958ff2,threadId:_0x417487}=_0x21683c,_0x3a52eb=(_0x2f3a21=(_0x3e935c=_0x958ff2[_0x477650(0x195)])==null?void 0x0:_0x3e935c[_0x477650(0x15a)](_0x4bdefd=>_0x4bdefd[_0x477650(0x181)]===_0x501cc3[_0x477650(0x13d)][_0x477650(0x16d)])[_0x477650(0x146)](_0x5d09d9=>_0x5d09d9['rangeId']))!=null?_0x2f3a21:[],_0x22d2d=JSON[_0x477650(0x185)](_0x958ff2),_0xacbe57=(await this[_0x477650(0x15f)][_0x477650(0x147)](_0x528350))[_0x477650(0x19f)]();if(_0x36fd15){const _0x4fa1cc={'memberId':_0xacbe57,'unitId':_0x528350,'content':_0x22d2d,'mention':_0x3a52eb,'threadId':_0x417487},_0x3f1933=(await this[_0x477650(0x17a)]['post'](_0x477650(0x163)+_0x528350+_0x477650(0x188),{'body':_0x4fa1cc}))[_0x477650(0x151)]['reply'];return{..._0x21683c,'id':_0x3f1933[_0x477650(0x145)],'dT':_0x501cc3[_0x477650(0x144)](+_0x3f1933[_0x477650(0x173)])[_0x477650(0x14e)](_0x477650(0x194)),'personId':_0x3f1933[_0x477650(0x184)]};}else{const _0x3ec239={'memberId':_0xacbe57,'unitId':_0x528350,'content':_0x22d2d,'mention':_0x3a52eb},_0x17b483=await this[_0x477650(0x17a)][_0x477650(0x129)](_0x477650(0x163)+_0x528350+_0x477650(0x174),{'body':_0x3ec239});return _0x3a7773(_0x17b483[_0x477650(0x151)]['comment'],_0x21683c);}}async[_0x2baaa9(0x17e)](_0x58ccb6){const _0x3e27cb=_0x2baaa9;var _0x4c9974,_0x1d9d08;const {text:_0x3975a0,unitId:_0x1f8191}=_0x58ccb6,_0x556969=(_0x1d9d08=(_0x4c9974=_0x3975a0['customRanges'])==null?void 0x0:_0x4c9974['filter'](_0x5e0dce=>_0x5e0dce[_0x3e27cb(0x181)]===_0x501cc3[_0x3e27cb(0x13d)][_0x3e27cb(0x16d)])[_0x3e27cb(0x146)](_0x46cc89=>_0x46cc89['rangeId']))!=null?_0x1d9d08:[],_0x22bfb1=JSON[_0x3e27cb(0x185)](_0x3975a0),_0x58fa5c=_0x58ccb6[_0x3e27cb(0x176)],_0xe89cce=_0x58ccb6['id'],_0x25a4b0={'memberId':(await this[_0x3e27cb(0x15f)][_0x3e27cb(0x147)](_0x1f8191))[_0x3e27cb(0x19f)](),'unitId':_0x1f8191,'threadId':_0x58fa5c,'mention':_0x556969,'content':_0x22bfb1,'replyId':_0xe89cce},_0x17f970=await this[_0x3e27cb(0x17a)][_0x3e27cb(0x129)](_0x3e27cb(0x163)+_0x1f8191+_0x3e27cb(0x130),{'body':_0x25a4b0});return!_0x17f970[_0x3e27cb(0x151)][_0x3e27cb(0x139)]||_0x17f970[_0x3e27cb(0x151)]['error']['code']===0x1;}async[_0x2baaa9(0x14d)](_0x55d329){const _0x373a5f=_0x2baaa9,{unitId:_0xa644c9}=_0x55d329,_0x445278=_0x55d329[_0x373a5f(0x176)],_0x4c0fc5={'memberId':this[_0x373a5f(0x156)][_0x373a5f(0x196)]()['userID'],'unitId':_0xa644c9,'threadId':_0x445278,'solved':_0x55d329[_0x373a5f(0x153)]?_0xa4547d[_0x373a5f(0x14f)]:_0xa4547d[_0x373a5f(0x132)]},_0x4c3441=await this[_0x373a5f(0x17a)][_0x373a5f(0x129)]('/universer-api/comment/unit/'+_0xa644c9+_0x373a5f(0x198),{'body':_0x4c0fc5});return!_0x4c3441[_0x373a5f(0x151)][_0x373a5f(0x139)]||_0x4c3441[_0x373a5f(0x151)][_0x373a5f(0x139)][_0x373a5f(0x16b)]===0x1;}async[_0x2baaa9(0x197)](_0x21c5db,_0x3a00ed,_0x15a23a,_0x543e34){const _0x5a5f0=_0x2baaa9,_0x2f194f={'memberId':(await this[_0x5a5f0(0x15f)][_0x5a5f0(0x147)](_0x21c5db))[_0x5a5f0(0x19f)](),'threadId':_0x15a23a,'replyId':_0x543e34,'unitId':_0x21c5db},_0x2f0988=await this[_0x5a5f0(0x17a)]['post'](_0x5a5f0(0x163)+_0x21c5db+_0x5a5f0(0x168),{'body':_0x2f194f});return!_0x2f0988[_0x5a5f0(0x151)][_0x5a5f0(0x139)]||_0x2f0988[_0x5a5f0(0x151)][_0x5a5f0(0x139)][_0x5a5f0(0x16b)]===0x1;}async['listComments'](_0xfb0e29,_0x1a4224,_0x4dfaba){const _0x2f0f03=_0x2baaa9,_0x5c87a6={'unitId':_0xfb0e29,'threadId':_0x4dfaba},_0x383b64=await this[_0x2f0f03(0x17a)][_0x2f0f03(0x129)](_0x2f0f03(0x163)+_0xfb0e29+_0x2f0f03(0x177),{'body':_0x5c87a6}),_0x22d53b=_0x4dfaba['map'](_0x213a6a=>_0x3a55da(_0x383b64[_0x2f0f03(0x151)][_0x2f0f03(0x178)][_0x213a6a],_0xfb0e29,_0x1a4224))[_0x2f0f03(0x15a)](Boolean);return Object[_0x2f0f03(0x13e)](_0x383b64[_0x2f0f03(0x151)][_0x2f0f03(0x158)])[_0x2f0f03(0x189)](_0xb1e878=>{const _0x1378f3=_0x2f0f03;this['_userService'][_0x1378f3(0x182)](_0xb1e878);}),_0x22d53b;}[_0x2baaa9(0x12d)](_0x471735){const _0x9806ea=_0x2baaa9;return{'id':_0x471735['id'],'threadId':_0x471735['threadId'],'ref':_0x471735[_0x9806ea(0x1a6)]};}};_0x4a09a1=_0x5ef65a([_0x16178c(0x0,_0x501cc3['Inject'](_0x1311d3[_0x2baaa9(0x148)])),_0x16178c(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x137)])),_0x16178c(0x2,_0x501cc3[_0x2baaa9(0x142)](_0x5f3c61[_0x2baaa9(0x18b)])),_0x16178c(0x3,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x1a4)]))],_0x4a09a1);var _0x1b819d=Object[_0x2baaa9(0x13b)],_0x241cc5=(_0x1f3afd,_0x4f27f0,_0x55266d,_0x1a54a0)=>{const _0x5edf39=_0x2baaa9;for(var _0x28ba91=_0x1a54a0>0x1?void 0x0:_0x1a54a0?_0x1b819d(_0x4f27f0,_0x55266d):_0x4f27f0,_0x24fbfe=_0x1f3afd[_0x5edf39(0x14b)]-0x1,_0xea4827;_0x24fbfe>=0x0;_0x24fbfe--)(_0xea4827=_0x1f3afd[_0x24fbfe])&&(_0x28ba91=_0xea4827(_0x28ba91)||_0x28ba91);return _0x28ba91;},_0x53fba2=(_0xbed04a,_0xc7887d)=>(_0x1c8624,_0xd89f6d)=>_0xc7887d(_0x1c8624,_0xd89f6d,_0xbed04a);let _0x5a72e8=class extends _0x501cc3[_0x2baaa9(0x180)]{constructor(_0x37fde5,_0x44c06c){const _0x43967b=_0x2baaa9;super(),this[_0x43967b(0x141)]=_0x37fde5,this['_threadCommentDataSource']=_0x44c06c,this[_0x43967b(0x172)]();}['_initDataSource'](){const _0x580ecd=_0x2baaa9;this[_0x580ecd(0x141)][_0x580ecd(0x165)]=this[_0x580ecd(0x135)],this[_0x580ecd(0x141)]['syncUpdateMutationToColla']=!0x1;}};_0x5a72e8=_0x241cc5([_0x53fba2(0x0,_0x24abdc['IThreadCommentDataSourceService']),_0x53fba2(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x4a09a1))],_0x5a72e8);var _0x1706a9=Object['defineProperty'],_0x45938e=Object[_0x2baaa9(0x13b)],_0x271ffa=(_0x155705,_0x275e7e,_0x477101)=>_0x275e7e in _0x155705?_0x1706a9(_0x155705,_0x275e7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x477101}):_0x155705[_0x275e7e]=_0x477101,_0x1bc9d0=(_0xff431,_0x2e63bf,_0x510b46,_0x4bf814)=>{const _0x325988=_0x2baaa9;for(var _0xe1f790=_0x4bf814>0x1?void 0x0:_0x4bf814?_0x45938e(_0x2e63bf,_0x510b46):_0x2e63bf,_0x2a3050=_0xff431[_0x325988(0x14b)]-0x1,_0x539467;_0x2a3050>=0x0;_0x2a3050--)(_0x539467=_0xff431[_0x2a3050])&&(_0xe1f790=_0x539467(_0xe1f790)||_0xe1f790);return _0xe1f790;},_0x3e6875=(_0x547f10,_0x594276)=>(_0x449ad1,_0x33c177)=>_0x594276(_0x449ad1,_0x33c177,_0x547f10),_0x1f5204=(_0x1f8449,_0x42cf6b,_0xe8eda2)=>_0x271ffa(_0x1f8449,typeof _0x42cf6b!=_0x2baaa9(0x164)?_0x42cf6b+'':_0x42cf6b,_0xe8eda2);_0x18e5b4[_0x2baaa9(0x16c)]=class extends _0x501cc3[_0x2baaa9(0x167)]{constructor(_0x3a309e=_0x112cff,_0x30e43c,_0x255c35){const _0x1dfdc1=_0x2baaa9;super(),this[_0x1dfdc1(0x128)]=_0x3a309e,this[_0x1dfdc1(0x134)]=_0x30e43c,this['_configService']=_0x255c35;const {..._0x53b5c7}=_0x501cc3[_0x1dfdc1(0x19a)]({},_0x112cff,this[_0x1dfdc1(0x128)]);this['_configService'][_0x1dfdc1(0x166)](_0x593c3c,_0x53b5c7);}[_0x2baaa9(0x1a2)](){const _0x5adeed=_0x2baaa9;[[_0x4a09a1],[_0x5a72e8],[_0x4a3036]][_0x5adeed(0x189)](_0x2ce39a=>{const _0x4c6dea=_0x5adeed;this['_injector'][_0x4c6dea(0x162)](_0x2ce39a);});}[_0x2baaa9(0x17d)](){const _0x1880a0=_0x2baaa9;this[_0x1880a0(0x134)][_0x1880a0(0x136)](_0x5a72e8),this[_0x1880a0(0x134)]['get'](_0x4a3036);}},_0x1f5204(_0x18e5b4[_0x2baaa9(0x16c)],'pluginName',_0x174803),_0x1f5204(_0x18e5b4[_0x2baaa9(0x16c)],_0x2baaa9(0x15e),_0x501cc3[_0x2baaa9(0x125)][_0x2baaa9(0x1a1)]),_0x18e5b4[_0x2baaa9(0x16c)]=_0x1bc9d0([_0x501cc3['DependentOn'](_0x418467['UniverThreadCommentUIPlugin'],_0x5f3c61['UniverCollaborationClientPlugin'],_0x11fede['UniverLicensePlugin']),_0x3e6875(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x1a4)])),_0x3e6875(0x2,_0x501cc3[_0x2baaa9(0x12f)])],_0x18e5b4['UniverThreadCommentDataSourcePlugin']),Object[_0x2baaa9(0x13f)](_0x18e5b4,Symbol['toStringTag'],{'value':_0x2baaa9(0x191)});}));function _0x2267(_0x3f7a0e,_0x211d0f){const _0x245545=_0x2455();return _0x2267=function(_0x226774,_0x52293f){_0x226774=_0x226774-0x124;let _0x28683e=_0x245545[_0x226774];return _0x28683e;},_0x2267(_0x3f7a0e,_0x211d0f);}function _0x2455(){const _0x1741fa=['object','Injector','1qNWWLq','ref','UniverProLicense','4325610RofXLy','UniverInstanceType','27pAnDJS','@univerjs/thread-comment-ui','_config','post','Delete','UniverNetwork','496420JvrBeC','saveCommentToSnapshot','Reply','IConfigService','/edit','root','OpenOrReOpen','@univerjs-pro/license','_injector','_threadCommentDataSource','get','UserManagerService','908042qXlyRA','error','6218000gVmkxT','getOwnPropertyDescriptor','getComment','CustomRangeType','values','defineProperty','content','_threadCommentDataSourceService','Inject','@univerjs-pro/collaboration-client','dayjs','replyId','map','requireSession','HTTPService','find','Unknown','length','_commentService','resolveComment','format','Solved','amd','body','Solve','resolved','UniverThreadCommentUi','2845GmYhfr','_userService','19360KxRrDA','users','exports','filter','getUnit','Edit','rxjs','type','_sessionService','parse','ThreadCommentModel','add','/universer-api/comment/unit/','symbol','dataSource','setConfig','Plugin','/delete','disposeWithMe','payload','code','UniverThreadCommentDataSourcePlugin','COMMENT','_init','5841cLgDys','delete','personId','_initDataSource','createTimestamp','/add','function','threadId','/list','comments','UNRECOGNIZED','_httpService','slice','UniverThreadComment','onReady','updateComment','commentUpdate$','Disposable','rangeType','addUser','getUser','userId','stringify','user','thread-comment-data-source.config','/reply','forEach','solved','CollaborationSessionService','_initUserSync','bufferTime','subscribe','unitId','replies','Module','Add','@univerjs/thread-comment','YYYY/MM/DD\x20HH:mm','customRanges','getCurrentUser','deleteComment','/solved','UniverProThreadCommentDatasource','merge','36828rTZOUj','616GtKSkE','_threadCommentModel','parentId','getMemberID','8292taVckK','UNIVER_UNKNOWN','onStarting'];_0x2455=function(){return _0x1741fa;};return _0x2455();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-nightly.202507041607",
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.9.0",
49
- "@univerjs-pro/license": "0.9.0",
50
- "@univerjs/network": "0.9.0",
51
- "@univerjs/core": "0.9.0",
52
- "@univerjs/thread-comment": "0.9.0",
53
- "@univerjs/thread-comment-ui": "0.9.0",
54
- "@univerjs/protocol": "0.1.47-alpha.0"
48
+ "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507041607",
49
+ "@univerjs-pro/license": "0.9.1-nightly.202507041607",
50
+ "@univerjs/network": "0.9.1-nightly.202507041607",
51
+ "@univerjs/protocol": "0.1.47-alpha.0",
52
+ "@univerjs/core": "0.9.1-nightly.202507041607",
53
+ "@univerjs/thread-comment": "0.9.1-nightly.202507041607",
54
+ "@univerjs/thread-comment-ui": "0.9.1-nightly.202507041607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.0"
61
+ "@univerjs-infra/shared": "0.9.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",