@univerjs-pro/thread-comment-datasource 0.6.3 → 0.6.4

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 _0x5ec575=_0x3387;(function(_0x534494,_0x4706ae){const _0x42eecc=_0x3387,_0x14ab89=_0x534494();while(!![]){try{const _0x2fa8da=-parseInt(_0x42eecc(0x1f9))/0x1*(-parseInt(_0x42eecc(0x1df))/0x2)+parseInt(_0x42eecc(0x22f))/0x3+-parseInt(_0x42eecc(0x1ed))/0x4*(parseInt(_0x42eecc(0x1ff))/0x5)+-parseInt(_0x42eecc(0x1d0))/0x6*(parseInt(_0x42eecc(0x229))/0x7)+-parseInt(_0x42eecc(0x1e1))/0x8*(parseInt(_0x42eecc(0x1ba))/0x9)+parseInt(_0x42eecc(0x204))/0xa+-parseInt(_0x42eecc(0x1e9))/0xb*(parseInt(_0x42eecc(0x1bb))/0xc);if(_0x2fa8da===_0x4706ae)break;else _0x14ab89['push'](_0x14ab89['shift']());}catch(_0x5a6b98){_0x14ab89['push'](_0x14ab89['shift']());}}}(_0x7400,0x6b21b));Object[_0x5ec575(0x1c0)](exports,Symbol['toStringTag'],{'value':_0x5ec575(0x1c5)});const b=require(_0x5ec575(0x1c8)),T=require(_0x5ec575(0x1d2)),c=require(_0x5ec575(0x1d1)),j=require(_0x5ec575(0x1f8)),M=require('@univerjs/thread-comment'),w=require(_0x5ec575(0x1e6)),P=require(_0x5ec575(0x203)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53ad6c=>(_0x53ad6c[_0x53ad6c[_0x5ec575(0x20f)]=0x0]=_0x5ec575(0x20f),_0x53ad6c[_0x53ad6c['Solved']=0x1]=_0x5ec575(0x22b),_0x53ad6c[_0x53ad6c[_0x5ec575(0x1b5)]=-0x1]=_0x5ec575(0x1b5),_0x53ad6c))(I||{}),v=(_0x47d06a=>(_0x47d06a[_0x47d06a[_0x5ec575(0x1b9)]=0x0]=_0x5ec575(0x1b9),_0x47d06a[_0x47d06a[_0x5ec575(0x22e)]=0x1]=_0x5ec575(0x22e),_0x47d06a[_0x47d06a[_0x5ec575(0x22d)]=0x2]=_0x5ec575(0x22d),_0x47d06a[_0x47d06a[_0x5ec575(0x1cf)]=0x3]=_0x5ec575(0x1cf),_0x47d06a[_0x47d06a[_0x5ec575(0x1bd)]=0x4]=_0x5ec575(0x1bd),_0x47d06a[_0x47d06a[_0x5ec575(0x1b7)]=0x5]=_0x5ec575(0x1b7),_0x47d06a[_0x47d06a[_0x5ec575(0x1b5)]=-0x1]=_0x5ec575(0x1b5),_0x47d06a))(v||{});const f=_0x59bd1a=>c['dayjs'](new Date(+_0x59bd1a))['format'](_0x5ec575(0x1f7)),R=async(_0x2aa50b,_0x1fcb83)=>{const _0x4b6a8f=_0x5ec575,_0x18fe19=_0x2aa50b[_0x4b6a8f(0x1fa)](c[_0x4b6a8f(0x1d7)]),_0x3ade1e=_0x2aa50b[_0x4b6a8f(0x1fa)](P['HTTPService']);_0x1fcb83[_0x4b6a8f(0x206)](_0x2ce65a=>{const _0x2dd4f8=_0x4b6a8f;_0x18fe19[_0x2dd4f8(0x225)](_0x2ce65a)&&_0x1fcb83[_0x2dd4f8(0x1c7)](_0x2ce65a);}),_0x1fcb83[_0x4b6a8f(0x1fc)]&&(await _0x3ade1e[_0x4b6a8f(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1fcb83]}}))['body'][_0x4b6a8f(0x21a)][_0x4b6a8f(0x206)](_0x2f6b63=>{const _0x487ae0=_0x4b6a8f;_0x2f6b63&&_0x18fe19[_0x487ae0(0x1d8)](_0x2f6b63);});};var $=Object[_0x5ec575(0x1eb)],E=(_0x40e06f,_0x534bd1,_0x957df8,_0xee6c9d)=>{const _0x4f6c08=_0x5ec575;for(var _0x7e0533=_0xee6c9d>0x1?void 0x0:_0xee6c9d?$(_0x534bd1,_0x957df8):_0x534bd1,_0x15f8c7=_0x40e06f[_0x4f6c08(0x1bc)]-0x1,_0x19e5e0;_0x15f8c7>=0x0;_0x15f8c7--)(_0x19e5e0=_0x40e06f[_0x15f8c7])&&(_0x7e0533=_0x19e5e0(_0x7e0533)||_0x7e0533);return _0x7e0533;},S=(_0x2b7d66,_0x100853)=>(_0x40e9f5,_0x176f57)=>_0x100853(_0x40e9f5,_0x176f57,_0x2b7d66);let p=class extends c[_0x5ec575(0x1ef)]{constructor(_0x451d19,_0x49cfe6,_0x268a6a,_0x3b63fe){const _0x4753fa=_0x5ec575;super(),this['_commentService']=_0x451d19,this['_threadCommentModel']=_0x49cfe6,this[_0x4753fa(0x1de)]=_0x268a6a,this['_injector']=_0x3b63fe,this[_0x4753fa(0x1ea)](),this[_0x4753fa(0x1cd)]();}[_0x5ec575(0x1cd)](){const _0x421063=_0x5ec575;this[_0x421063(0x1fb)](this[_0x421063(0x1da)]['commentUpdate$']['pipe'](w['bufferTime'](0x10))[_0x421063(0x1be)](_0x2991f0=>{const _0x5bba91=_0x421063,_0x74a01c=new Set();_0x2991f0['forEach'](_0x9cdf13=>{const _0x4a9de9=_0x3387;switch(_0x9cdf13['type']){case _0x4a9de9(0x1b6):{const _0x3a283c=_0x9cdf13[_0x4a9de9(0x21e)]['personId'];_0x74a01c[_0x4a9de9(0x1b6)](_0x3a283c);break;}}}),R(this[_0x5bba91(0x231)],_0x74a01c);}));}[_0x5ec575(0x1ea)](){const _0x27ebdc=_0x5ec575;this[_0x27ebdc(0x1fb)](this[_0x27ebdc(0x213)][_0x27ebdc(0x20d)]['subscribe'](async _0x4ac93f=>{const _0x558904=_0x27ebdc;var _0x4032ee,_0x2b4674,_0x5eac3a,_0x2d53e2;const _0x2b32d1=(_0x4032ee=this[_0x558904(0x1da)][_0x558904(0x1fe)](_0x4ac93f[_0x558904(0x223)])['find'](_0x40fc55=>_0x40fc55[_0x558904(0x20c)]===_0x4ac93f[_0x558904(0x20c)]))==null?void 0x0:_0x4032ee[_0x558904(0x1ec)];if(!_0x2b32d1)return;const {unitId:_0x23fc47,subUnitId:_0x5bc5c2}=_0x2b32d1;switch(_0x4ac93f[_0x558904(0x216)]&&this[_0x558904(0x1de)][_0x558904(0x1d8)](_0x4ac93f[_0x558904(0x216)]),_0x4ac93f[_0x558904(0x1f0)]){case v[_0x558904(0x22e)]:break;case v[_0x558904(0x22d)]:{this[_0x558904(0x1da)][_0x558904(0x217)](_0x23fc47,_0x5bc5c2,{'unitId':_0x23fc47,'subUnitId':_0x5bc5c2,'ref':'','id':_0x4ac93f[_0x558904(0x1f4)],'dT':f(+_0x4ac93f['createTimestamp']),'threadId':_0x4ac93f['threadId'],'personId':(_0x5eac3a=(_0x2b4674=_0x4ac93f[_0x558904(0x216)])==null?void 0x0:_0x2b4674[_0x558904(0x200)])!=null?_0x5eac3a:_0x4ac93f[_0x558904(0x1c4)],'text':JSON[_0x558904(0x201)](_0x4ac93f[_0x558904(0x21f)]),'parentId':_0x2b32d1['id']});break;}case v['Delete']:{const _0x157e8d=this[_0x558904(0x1da)][_0x558904(0x212)](_0x23fc47,_0x5bc5c2,_0x4ac93f[_0x558904(0x1f4)]);_0x157e8d&&_0x157e8d[_0x558904(0x1d4)]&&this[_0x558904(0x1da)][_0x558904(0x1e8)](_0x23fc47,_0x5bc5c2,_0x4ac93f['replyId']);break;}case v[_0x558904(0x1cf)]:{this[_0x558904(0x1da)]['updateComment'](_0x23fc47,_0x5bc5c2,{'commentId':_0x4ac93f[_0x558904(0x1f4)],'text':JSON['parse'](_0x4ac93f['content'])});break;}case v[_0x558904(0x1b7)]:{const _0x1734c0=(_0x2d53e2=this[_0x558904(0x1da)][_0x558904(0x1fe)](_0x4ac93f[_0x558904(0x223)])[_0x558904(0x1c3)](_0x87da49=>_0x87da49[_0x558904(0x20c)]===_0x4ac93f[_0x558904(0x20c)]))==null?void 0x0:_0x2d53e2[_0x558904(0x1ec)];_0x1734c0&&this['_threadCommentModel'][_0x558904(0x1d6)](_0x23fc47,_0x5bc5c2,_0x1734c0['id'],_0x4ac93f[_0x558904(0x1c1)]===I[_0x558904(0x22b)]);break;}}}));}};p=E([S(0x0,c[_0x5ec575(0x207)](b['CommentService'])),S(0x1,c[_0x5ec575(0x207)](M[_0x5ec575(0x1f6)])),S(0x2,c[_0x5ec575(0x207)](c[_0x5ec575(0x1d7)])),S(0x3,c[_0x5ec575(0x207)](c[_0x5ec575(0x1f3)]))],p);const q=_0x5ec575(0x20a),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x44554b,_0x5c618e,_0x323cd2,_0xd71627)=>{const _0x1c34b6=_0x5ec575;for(var _0x46c9fd=_0xd71627>0x1?void 0x0:_0xd71627?A(_0x5c618e,_0x323cd2):_0x5c618e,_0x59368a=_0x44554b[_0x1c34b6(0x1bc)]-0x1,_0x15a338;_0x59368a>=0x0;_0x59368a--)(_0x15a338=_0x44554b[_0x59368a])&&(_0x46c9fd=_0x15a338(_0x46c9fd)||_0x46c9fd);return _0x46c9fd;},_=(_0x580316,_0x1e3cc2)=>(_0x1e4630,_0x3b95cd)=>_0x1e3cc2(_0x1e4630,_0x3b95cd,_0x580316);function Y(_0x4c877b,_0x168ca9){const _0x129688=_0x5ec575,_0x733f99=_0x4c877b[_0x129688(0x215)][0x0];return{..._0x168ca9,'id':_0x733f99[_0x129688(0x1f4)],'resolved':_0x4c877b['solved']===0x1,'dT':f(_0x733f99[_0x129688(0x1f1)]),'personId':_0x733f99[_0x129688(0x1c4)],'threadId':_0x733f99['threadId']};}function _0x3387(_0x201e8e,_0x4e421d){const _0x740066=_0x7400();return _0x3387=function(_0x33878b,_0x1ec359){_0x33878b=_0x33878b-0x1b3;let _0x3cfd00=_0x740066[_0x33878b];return _0x3cfd00;},_0x3387(_0x201e8e,_0x4e421d);}function _0x7400(){const _0x1cbd88=['Add','2448699EsdXIs','code','_injector','getCurrentUser','/universer-api/comment/unit/','UNRECOGNIZED','add','Solve','map','Unknown','9lVBGFm','3075840kSqIzV','length','Delete','subscribe','_threadCommentDataSource','defineProperty','solved','/list','find','userId','Module','slice','delete','@univerjs-pro/collaboration-client','body','UniverThreadCommentDataSourcePlugin','/solved','stringify','_initUserSync','onStarting','Edit','77340ZeGdgq','@univerjs/core','@univerjs-pro/license','onReady','parentId','dayjs','resolveComment','UserManagerService','addUser','pluginName','_threadCommentModel','saveCommentToSnapshot','IThreadCommentDataSourceService','_threadCommentDataSourceService','_userService','378046CYVvkp','post','1348792qcNhEy','_configService','/delete','UNIVER_UNKNOWN','COMMENT','rxjs','/add','deleteComment','22WQSqDi','_init','getOwnPropertyDescriptor','root','4QxGEkj','/edit','Disposable','type','createTimestamp','filter','Injector','replyId','/reply','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','4NSpQor','get','disposeWithMe','size','UniverCollaborationClientPlugin','getUnit','3524390DJnaKy','userID','parse','getMemberID','@univerjs/network','3686130KohaWE','HTTPService','forEach','Inject','updateComment','customRanges','thread-comment-data-source.config','_sessionService','threadId','commentUpdate$','_httpService','OpenOrReOpen','dataSource','IConfigService','getComment','_commentService','_initDataSource','replies','user','addComment','listComments','error','users','requireSession','_config','UniverLicensePlugin','payload','content','setConfig','merge','rangeType','unitId','format','getUser','symbol','comments','Plugin','63SnKOue','reply','Solved','CustomRangeType','Reply'];_0x7400=function(){return _0x1cbd88;};return _0x7400();}function G(_0x413428,_0x17ca0e,_0x31c005){const _0x152b45=_0x5ec575;var _0x2dea2e,_0x538b3a;if(((_0x538b3a=(_0x2dea2e=_0x413428==null?void 0x0:_0x413428['replies'])==null?void 0x0:_0x2dea2e[_0x152b45(0x1bc)])!=null?_0x538b3a:0x0)>0x0){const _0x566917=(_0x1c3945,_0x392752)=>({'id':_0x1c3945[_0x152b45(0x1f4)],'threadId':_0x1c3945[_0x152b45(0x20c)],'dT':f(_0x1c3945[_0x152b45(0x1f1)]),'personId':_0x1c3945[_0x152b45(0x1c4)],'resolved':_0x413428[_0x152b45(0x1c1)]===I['Solved'],'unitId':_0x17ca0e,'subUnitId':_0x31c005,'text':JSON['parse'](_0x1c3945['content']),'parentId':_0x392752}),_0xbe1e4=_0x566917(_0x413428[_0x152b45(0x215)][0x0]);return{..._0xbe1e4,'children':_0x413428[_0x152b45(0x215)][_0x152b45(0x1c6)](0x1)[_0x152b45(0x1b8)](_0x4f4c20=>_0x566917(_0x4f4c20,_0xbe1e4['id']))};}return null;}let g=class{constructor(_0x536de8,_0x362963,_0xd34ffe,_0x2638d6){const _0x319f0c=_0x5ec575;this[_0x319f0c(0x20e)]=_0x536de8,this[_0x319f0c(0x1de)]=_0x362963,this[_0x319f0c(0x20b)]=_0xd34ffe,this[_0x319f0c(0x231)]=_0x2638d6;}async[_0x5ec575(0x217)](_0x3ef956){const _0x38952b=_0x5ec575;var _0x437854,_0x595906;const {parentId:_0x43f16a,unitId:_0x55d0b3,text:_0x25809c,threadId:_0x430b9b}=_0x3ef956,_0x555566=(_0x595906=(_0x437854=_0x25809c[_0x38952b(0x209)])==null?void 0x0:_0x437854['filter'](_0x57e67a=>_0x57e67a['rangeType']===c[_0x38952b(0x22c)][_0x38952b(0x1e5)])[_0x38952b(0x1b8)](_0x8b3ced=>_0x8b3ced['rangeId']))!=null?_0x595906:[],_0x17aa88=JSON['stringify'](_0x25809c),_0x1202d9=(await this[_0x38952b(0x20b)][_0x38952b(0x21b)](_0x55d0b3))['getMemberID']();if(_0x43f16a){const _0x2a84d9={'memberId':_0x1202d9,'unitId':_0x55d0b3,'content':_0x17aa88,'mention':_0x555566,'threadId':_0x430b9b},_0x37a2d6=(await this[_0x38952b(0x20e)][_0x38952b(0x1e0)](_0x38952b(0x1b4)+_0x55d0b3+_0x38952b(0x1f5),{'body':_0x2a84d9}))[_0x38952b(0x1c9)][_0x38952b(0x22a)];return{..._0x3ef956,'id':_0x37a2d6[_0x38952b(0x1f4)],'dT':c[_0x38952b(0x1d5)](+_0x37a2d6[_0x38952b(0x1f1)])[_0x38952b(0x224)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37a2d6[_0x38952b(0x1c4)]};}else{const _0x48bb2b={'memberId':_0x1202d9,'unitId':_0x55d0b3,'content':_0x17aa88,'mention':_0x555566},_0x5e05dc=await this[_0x38952b(0x20e)][_0x38952b(0x1e0)](_0x38952b(0x1b4)+_0x55d0b3+_0x38952b(0x1e7),{'body':_0x48bb2b});return Y(_0x5e05dc[_0x38952b(0x1c9)]['comment'],_0x3ef956);}}async[_0x5ec575(0x208)](_0x32bc0a){const _0x30629c=_0x5ec575;var _0x4a4d95,_0x4f59c5;const {text:_0x88ea38,unitId:_0x5b815a}=_0x32bc0a,_0x5ca495=(_0x4f59c5=(_0x4a4d95=_0x88ea38[_0x30629c(0x209)])==null?void 0x0:_0x4a4d95[_0x30629c(0x1f2)](_0x4e3ecb=>_0x4e3ecb[_0x30629c(0x222)]===c[_0x30629c(0x22c)][_0x30629c(0x1e5)])['map'](_0x252da6=>_0x252da6['rangeId']))!=null?_0x4f59c5:[],_0x81cd25=JSON[_0x30629c(0x1cc)](_0x88ea38),_0x50afa0=_0x32bc0a[_0x30629c(0x20c)],_0x3e43b0=_0x32bc0a['id'],_0xd4c1b8={'memberId':(await this[_0x30629c(0x20b)][_0x30629c(0x21b)](_0x5b815a))[_0x30629c(0x202)](),'unitId':_0x5b815a,'threadId':_0x50afa0,'mention':_0x5ca495,'content':_0x81cd25,'replyId':_0x3e43b0},_0x220789=await this[_0x30629c(0x20e)][_0x30629c(0x1e0)]('/universer-api/comment/unit/'+_0x5b815a+_0x30629c(0x1ee),{'body':_0xd4c1b8});return!_0x220789[_0x30629c(0x1c9)][_0x30629c(0x219)]||_0x220789[_0x30629c(0x1c9)]['error'][_0x30629c(0x230)]===0x1;}async[_0x5ec575(0x1d6)](_0x5005d0){const _0x236e0e=_0x5ec575,{unitId:_0x50ad93}=_0x5005d0,_0xf5bc97=_0x5005d0[_0x236e0e(0x20c)],_0x45837a={'memberId':this['_userService'][_0x236e0e(0x1b3)]()[_0x236e0e(0x200)],'unitId':_0x50ad93,'threadId':_0xf5bc97,'solved':_0x5005d0['resolved']?I[_0x236e0e(0x22b)]:I[_0x236e0e(0x20f)]},_0x49d567=await this[_0x236e0e(0x20e)][_0x236e0e(0x1e0)](_0x236e0e(0x1b4)+_0x50ad93+_0x236e0e(0x1cb),{'body':_0x45837a});return!_0x49d567[_0x236e0e(0x1c9)]['error']||_0x49d567[_0x236e0e(0x1c9)]['error']['code']===0x1;}async['deleteComment'](_0x136421,_0x1c61fc,_0x4a2237,_0x286587){const _0x4edb67=_0x5ec575,_0x207b78={'memberId':(await this[_0x4edb67(0x20b)]['requireSession'](_0x136421))[_0x4edb67(0x202)](),'threadId':_0x4a2237,'replyId':_0x286587,'unitId':_0x136421},_0x478946=await this[_0x4edb67(0x20e)][_0x4edb67(0x1e0)]('/universer-api/comment/unit/'+_0x136421+_0x4edb67(0x1e3),{'body':_0x207b78});return!_0x478946[_0x4edb67(0x1c9)][_0x4edb67(0x219)]||_0x478946['body'][_0x4edb67(0x219)]['code']===0x1;}async[_0x5ec575(0x218)](_0x427dc3,_0x11bf8a,_0x3ef232){const _0x424769=_0x5ec575,_0x185df0={'unitId':_0x427dc3,'threadId':_0x3ef232},_0x55b395=await this[_0x424769(0x20e)]['post'](_0x424769(0x1b4)+_0x427dc3+_0x424769(0x1c2),{'body':_0x185df0}),_0x4d1b52=_0x3ef232[_0x424769(0x1b8)](_0x34d1da=>G(_0x55b395[_0x424769(0x1c9)][_0x424769(0x227)][_0x34d1da],_0x427dc3,_0x11bf8a))[_0x424769(0x1f2)](Boolean);return Object['values'](_0x55b395[_0x424769(0x1c9)][_0x424769(0x21a)])[_0x424769(0x206)](_0x13c8f4=>{this['_userService']['addUser'](_0x13c8f4);}),_0x4d1b52;}[_0x5ec575(0x1db)](_0x3703d5){const _0x4149e7=_0x5ec575;return{'id':_0x3703d5['id'],'threadId':_0x3703d5[_0x4149e7(0x20c)],'ref':_0x3703d5['ref']};}};g=x([_(0x0,c[_0x5ec575(0x207)](P[_0x5ec575(0x205)])),_(0x1,c[_0x5ec575(0x207)](c[_0x5ec575(0x1d7)])),_(0x2,c[_0x5ec575(0x207)](b['CollaborationSessionService'])),_(0x3,c[_0x5ec575(0x207)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3e0612,_0x42ef71,_0x546db6,_0x7f6443)=>{const _0x245340=_0x5ec575;for(var _0x1bc69c=_0x7f6443>0x1?void 0x0:_0x7f6443?H(_0x42ef71,_0x546db6):_0x42ef71,_0x128966=_0x3e0612[_0x245340(0x1bc)]-0x1,_0x40f8c9;_0x128966>=0x0;_0x128966--)(_0x40f8c9=_0x3e0612[_0x128966])&&(_0x1bc69c=_0x40f8c9(_0x1bc69c)||_0x1bc69c);return _0x1bc69c;},y=(_0x1b5089,_0x4b05d2)=>(_0x50d5f0,_0xce471)=>_0x4b05d2(_0x50d5f0,_0xce471,_0x1b5089);let C=class extends c[_0x5ec575(0x1ef)]{constructor(_0x1ad581,_0x51426a){const _0x3f0801=_0x5ec575;super(),this[_0x3f0801(0x1dd)]=_0x1ad581,this[_0x3f0801(0x1bf)]=_0x51426a,this[_0x3f0801(0x214)]();}[_0x5ec575(0x214)](){const _0x1cafb8=_0x5ec575;this['_threadCommentDataSourceService'][_0x1cafb8(0x210)]=this[_0x1cafb8(0x1bf)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x5ec575(0x1dc)]),y(0x1,c[_0x5ec575(0x207)](g))],C);var F=Object[_0x5ec575(0x1c0)],L=Object[_0x5ec575(0x1eb)],Z=(_0x3565de,_0x3c25b5,_0x15ef16)=>_0x3c25b5 in _0x3565de?F(_0x3565de,_0x3c25b5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15ef16}):_0x3565de[_0x3c25b5]=_0x15ef16,W=(_0x207dd2,_0x805df6,_0x12689f,_0x1c2298)=>{const _0x4304e8=_0x5ec575;for(var _0x5f0319=_0x1c2298>0x1?void 0x0:_0x1c2298?L(_0x805df6,_0x12689f):_0x805df6,_0x483841=_0x207dd2[_0x4304e8(0x1bc)]-0x1,_0xdf502c;_0x483841>=0x0;_0x483841--)(_0xdf502c=_0x207dd2[_0x483841])&&(_0x5f0319=_0xdf502c(_0x5f0319)||_0x5f0319);return _0x5f0319;},O=(_0x38b208,_0xdcab5b)=>(_0xa7b1b0,_0x58bfb8)=>_0xdcab5b(_0xa7b1b0,_0x58bfb8,_0x38b208),N=(_0x2f7bf7,_0x207ff3,_0x13828f)=>Z(_0x2f7bf7,typeof _0x207ff3!=_0x5ec575(0x226)?_0x207ff3+'':_0x207ff3,_0x13828f);exports[_0x5ec575(0x1ca)]=class extends c[_0x5ec575(0x228)]{constructor(_0x7a7fc0=D,_0x3da4bf,_0x17d08e){const _0x11ab15=_0x5ec575;super(),this[_0x11ab15(0x21c)]=_0x7a7fc0,this[_0x11ab15(0x231)]=_0x3da4bf,this[_0x11ab15(0x1e2)]=_0x17d08e;const {..._0x3f2607}=c[_0x11ab15(0x221)]({},D,this[_0x11ab15(0x21c)]);this[_0x11ab15(0x1e2)][_0x11ab15(0x220)](q,_0x3f2607);}[_0x5ec575(0x1ce)](){const _0x497483=_0x5ec575;[[g],[C],[p]][_0x497483(0x206)](_0x3b2382=>{this['_injector']['add'](_0x3b2382);});}[_0x5ec575(0x1d3)](){const _0x48bcea=_0x5ec575;this[_0x48bcea(0x231)][_0x48bcea(0x1fa)](C),this[_0x48bcea(0x231)][_0x48bcea(0x1fa)](p);}},N(exports[_0x5ec575(0x1ca)],_0x5ec575(0x1d9),U),N(exports[_0x5ec575(0x1ca)],_0x5ec575(0x1f0),c['UniverInstanceType'][_0x5ec575(0x1e4)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x5ec575(0x1fd)],T[_0x5ec575(0x21d)]),O(0x1,c[_0x5ec575(0x207)](c[_0x5ec575(0x1f3)])),O(0x2,c[_0x5ec575(0x211)])],exports[_0x5ec575(0x1ca)]);
1
+ 'use strict';const _0x5b4944=_0x515c;(function(_0x332033,_0x30fdad){const _0x147e5c=_0x515c,_0x43447c=_0x332033();while(!![]){try{const _0x1937cd=-parseInt(_0x147e5c(0x1a8))/0x1+parseInt(_0x147e5c(0x17c))/0x2+parseInt(_0x147e5c(0x180))/0x3*(parseInt(_0x147e5c(0x1f6))/0x4)+parseInt(_0x147e5c(0x1c4))/0x5+-parseInt(_0x147e5c(0x1b9))/0x6+parseInt(_0x147e5c(0x1da))/0x7+-parseInt(_0x147e5c(0x1a2))/0x8;if(_0x1937cd===_0x30fdad)break;else _0x43447c['push'](_0x43447c['shift']());}catch(_0x28530b){_0x43447c['push'](_0x43447c['shift']());}}}(_0x1a14,0xb4036));Object[_0x5b4944(0x1be)](exports,Symbol[_0x5b4944(0x1f1)],{'value':_0x5b4944(0x1ba)});const b=require(_0x5b4944(0x1c1)),T=require(_0x5b4944(0x1f3)),c=require('@univerjs/core'),j=require(_0x5b4944(0x18e)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x5b4944(0x1e1)),U=_0x5b4944(0x1c3);var I=(_0x5b92a0=>(_0x5b92a0[_0x5b92a0[_0x5b4944(0x1fb)]=0x0]=_0x5b4944(0x1fb),_0x5b92a0[_0x5b92a0['Solved']=0x1]=_0x5b4944(0x19f),_0x5b92a0[_0x5b92a0[_0x5b4944(0x1a3)]=-0x1]=_0x5b4944(0x1a3),_0x5b92a0))(I||{}),v=(_0x3eb117=>(_0x3eb117[_0x3eb117[_0x5b4944(0x18d)]=0x0]=_0x5b4944(0x18d),_0x3eb117[_0x3eb117[_0x5b4944(0x1d1)]=0x1]='Add',_0x3eb117[_0x3eb117[_0x5b4944(0x1a6)]=0x2]=_0x5b4944(0x1a6),_0x3eb117[_0x3eb117['Edit']=0x3]=_0x5b4944(0x1dd),_0x3eb117[_0x3eb117[_0x5b4944(0x1ee)]=0x4]=_0x5b4944(0x1ee),_0x3eb117[_0x3eb117['Solve']=0x5]=_0x5b4944(0x18a),_0x3eb117[_0x3eb117['UNRECOGNIZED']=-0x1]=_0x5b4944(0x1a3),_0x3eb117))(v||{});function _0x1a14(){const _0x50facb=['dayjs','saveCommentToSnapshot','Inject','_threadCommentModel','UniverThreadCommentUIPlugin','UniverCollaborationClientPlugin','subscribe','UniverLicensePlugin','root','6017670Xdgyfs','Module','_userService','onStarting','UserManagerService','defineProperty','_initUserSync','/delete','@univerjs-pro/collaboration-client','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6145numINv','map','IThreadCommentDataSourceService','IConfigService','bufferTime','format','_threadCommentDataSourceService','setConfig','_initDataSource','body','UniverInstanceType','dataSource','pluginName','Add','ThreadCommentModel','get','HTTPService','resolved','/universer-api/user/list','getUser','stringify','userId','9629613VDEbBN','users','getOwnPropertyDescriptor','Edit','pipe','COMMENT','threadId','@univerjs/network','addComment','error','values','find','delete','updateComment','size','CommentService','_config','addUser','/solved','unitId','Delete','slice','_httpService','toStringTag','parse','@univerjs-pro/license','filter','content','17116oPFWWf','resolveComment','_configService','getComment','replyId','OpenOrReOpen','user','listComments','post','ref','1339530LAKqgK','parentId','solved','Injector','687RZbtRU','createTimestamp','syncUpdateMutationToColla','replies','disposeWithMe','requireSession','_init','customRanges','CustomRangeType','/list','Solve','_commentService','getMemberID','Unknown','@univerjs/thread-comment-ui','commentUpdate$','/universer-api/comment/unit/','_sessionService','rangeType','forEach','UNIVER_UNKNOWN','/add','comment','personId','Disposable','_threadCommentDataSource','Plugin','getUnit','reply','add','length','Solved','code','DependentOn','2471896hjWNvU','UNRECOGNIZED','/edit','_injector','Reply','/reply','977278pTKpBS','CollaborationSessionService','deleteComment','symbol','UniverThreadCommentDataSourcePlugin','comments','rangeId','YYYY/MM/DD\x20HH:mm'];_0x1a14=function(){return _0x50facb;};return _0x1a14();}const f=_0x5b729e=>c['dayjs'](new Date(+_0x5b729e))['format'](_0x5b4944(0x1af)),R=async(_0x265582,_0xcf7fa2)=>{const _0x51062e=_0x5b4944,_0x483076=_0x265582[_0x51062e(0x1d3)](c[_0x51062e(0x1bd)]),_0x52d261=_0x265582[_0x51062e(0x1d3)](P['HTTPService']);_0xcf7fa2['forEach'](_0x4cb5ea=>{const _0x2fc242=_0x51062e;_0x483076[_0x2fc242(0x1d7)](_0x4cb5ea)&&_0xcf7fa2[_0x2fc242(0x1e6)](_0x4cb5ea);}),_0xcf7fa2[_0x51062e(0x1e8)]&&(await _0x52d261[_0x51062e(0x1d3)](_0x51062e(0x1d6),{'params':{'userIDs':[..._0xcf7fa2]}}))[_0x51062e(0x1cd)][_0x51062e(0x1db)][_0x51062e(0x193)](_0x154b36=>{const _0x2907ae=_0x51062e;_0x154b36&&_0x483076[_0x2907ae(0x1eb)](_0x154b36);});};var $=Object[_0x5b4944(0x1dc)],E=(_0x3406f4,_0xea2513,_0x2b524a,_0x417162)=>{const _0x5a4a41=_0x5b4944;for(var _0x22ba1e=_0x417162>0x1?void 0x0:_0x417162?$(_0xea2513,_0x2b524a):_0xea2513,_0x5ddf42=_0x3406f4[_0x5a4a41(0x19e)]-0x1,_0xfb231a;_0x5ddf42>=0x0;_0x5ddf42--)(_0xfb231a=_0x3406f4[_0x5ddf42])&&(_0x22ba1e=_0xfb231a(_0x22ba1e)||_0x22ba1e);return _0x22ba1e;},S=(_0x5c60ea,_0x691d1b)=>(_0x2adbc8,_0x5b337c)=>_0x691d1b(_0x2adbc8,_0x5b337c,_0x5c60ea);let p=class extends c['Disposable']{constructor(_0x4bde17,_0x2da715,_0x5688e0,_0x1b71a7){const _0x4135c0=_0x5b4944;super(),this[_0x4135c0(0x18b)]=_0x4bde17,this[_0x4135c0(0x1b3)]=_0x2da715,this[_0x4135c0(0x1bb)]=_0x5688e0,this[_0x4135c0(0x1a5)]=_0x1b71a7,this[_0x4135c0(0x186)](),this[_0x4135c0(0x1bf)]();}[_0x5b4944(0x1bf)](){const _0x3c1687=_0x5b4944;this[_0x3c1687(0x184)](this['_threadCommentModel'][_0x3c1687(0x18f)][_0x3c1687(0x1de)](w[_0x3c1687(0x1c8)](0x10))[_0x3c1687(0x1b6)](_0x58d643=>{const _0x23c484=_0x3c1687,_0x5bd303=new Set();_0x58d643['forEach'](_0x471862=>{const _0x11d80f=_0x515c;switch(_0x471862[_0x11d80f(0x1c2)]){case'add':{const _0x4db40f=_0x471862['payload'][_0x11d80f(0x197)];_0x5bd303[_0x11d80f(0x19d)](_0x4db40f);break;}}}),R(this[_0x23c484(0x1a5)],_0x5bd303);}));}['_init'](){const _0x394af5=_0x5b4944;this[_0x394af5(0x184)](this['_commentService'][_0x394af5(0x18f)][_0x394af5(0x1b6)](async _0x3cb518=>{const _0x2c3704=_0x394af5;var _0x716613,_0x34fe3c,_0x5dcdd4,_0x6c3ebf;const _0x1530aa=(_0x716613=this['_threadCommentModel'][_0x2c3704(0x19b)](_0x3cb518['unitId'])[_0x2c3704(0x1e5)](_0x5037f1=>_0x5037f1[_0x2c3704(0x1e0)]===_0x3cb518[_0x2c3704(0x1e0)]))==null?void 0x0:_0x716613[_0x2c3704(0x1b8)];if(!_0x1530aa)return;const {unitId:_0x49209b,subUnitId:_0x4431dc}=_0x1530aa;switch(_0x3cb518[_0x2c3704(0x1fc)]&&this[_0x2c3704(0x1bb)][_0x2c3704(0x1eb)](_0x3cb518[_0x2c3704(0x1fc)]),_0x3cb518[_0x2c3704(0x1c2)]){case v[_0x2c3704(0x1d1)]:break;case v[_0x2c3704(0x1a6)]:{this[_0x2c3704(0x1b3)][_0x2c3704(0x1e2)](_0x49209b,_0x4431dc,{'unitId':_0x49209b,'subUnitId':_0x4431dc,'ref':'','id':_0x3cb518['replyId'],'dT':f(+_0x3cb518[_0x2c3704(0x181)]),'threadId':_0x3cb518[_0x2c3704(0x1e0)],'personId':(_0x5dcdd4=(_0x34fe3c=_0x3cb518[_0x2c3704(0x1fc)])==null?void 0x0:_0x34fe3c['userID'])!=null?_0x5dcdd4:_0x3cb518['userId'],'text':JSON[_0x2c3704(0x1f2)](_0x3cb518[_0x2c3704(0x1f5)]),'parentId':_0x1530aa['id']});break;}case v['Delete']:{const _0x2ae398=this[_0x2c3704(0x1b3)][_0x2c3704(0x1f9)](_0x49209b,_0x4431dc,_0x3cb518[_0x2c3704(0x1fa)]);_0x2ae398&&_0x2ae398[_0x2c3704(0x17d)]&&this[_0x2c3704(0x1b3)][_0x2c3704(0x1aa)](_0x49209b,_0x4431dc,_0x3cb518['replyId']);break;}case v[_0x2c3704(0x1dd)]:{this[_0x2c3704(0x1b3)][_0x2c3704(0x1e7)](_0x49209b,_0x4431dc,{'commentId':_0x3cb518[_0x2c3704(0x1fa)],'text':JSON[_0x2c3704(0x1f2)](_0x3cb518[_0x2c3704(0x1f5)])});break;}case v[_0x2c3704(0x18a)]:{const _0x11b491=(_0x6c3ebf=this[_0x2c3704(0x1b3)][_0x2c3704(0x19b)](_0x3cb518[_0x2c3704(0x1ed)])[_0x2c3704(0x1e5)](_0x3003b0=>_0x3003b0['threadId']===_0x3cb518[_0x2c3704(0x1e0)]))==null?void 0x0:_0x6c3ebf[_0x2c3704(0x1b8)];_0x11b491&&this[_0x2c3704(0x1b3)][_0x2c3704(0x1f7)](_0x49209b,_0x4431dc,_0x11b491['id'],_0x3cb518[_0x2c3704(0x17e)]===I[_0x2c3704(0x19f)]);break;}}}));}};p=E([S(0x0,c[_0x5b4944(0x1b2)](b[_0x5b4944(0x1e9)])),S(0x1,c[_0x5b4944(0x1b2)](M[_0x5b4944(0x1d2)])),S(0x2,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x1bd)])),S(0x3,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x17f)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x5b4944(0x1dc)],x=(_0x4f8f80,_0x39d68f,_0x232d74,_0x4e67f9)=>{for(var _0xb37159=_0x4e67f9>0x1?void 0x0:_0x4e67f9?A(_0x39d68f,_0x232d74):_0x39d68f,_0x1ef799=_0x4f8f80['length']-0x1,_0x4e8b9a;_0x1ef799>=0x0;_0x1ef799--)(_0x4e8b9a=_0x4f8f80[_0x1ef799])&&(_0xb37159=_0x4e8b9a(_0xb37159)||_0xb37159);return _0xb37159;},_=(_0xe8afcd,_0x2bce7c)=>(_0x4ddd53,_0x44ffe1)=>_0x2bce7c(_0x4ddd53,_0x44ffe1,_0xe8afcd);function Y(_0x20c9f6,_0xf52310){const _0x2b1439=_0x5b4944,_0x5a7543=_0x20c9f6[_0x2b1439(0x183)][0x0];return{..._0xf52310,'id':_0x5a7543[_0x2b1439(0x1fa)],'resolved':_0x20c9f6['solved']===0x1,'dT':f(_0x5a7543[_0x2b1439(0x181)]),'personId':_0x5a7543['userId'],'threadId':_0x5a7543[_0x2b1439(0x1e0)]};}function G(_0x9b93b6,_0x397e11,_0x4cf5f9){const _0x543a6e=_0x5b4944;var _0x5e9d98,_0xf14d77;if(((_0xf14d77=(_0x5e9d98=_0x9b93b6==null?void 0x0:_0x9b93b6[_0x543a6e(0x183)])==null?void 0x0:_0x5e9d98['length'])!=null?_0xf14d77:0x0)>0x0){const _0x416871=(_0x1f7585,_0x26551d)=>({'id':_0x1f7585[_0x543a6e(0x1fa)],'threadId':_0x1f7585['threadId'],'dT':f(_0x1f7585[_0x543a6e(0x181)]),'personId':_0x1f7585[_0x543a6e(0x1d9)],'resolved':_0x9b93b6[_0x543a6e(0x17e)]===I[_0x543a6e(0x19f)],'unitId':_0x397e11,'subUnitId':_0x4cf5f9,'text':JSON[_0x543a6e(0x1f2)](_0x1f7585[_0x543a6e(0x1f5)]),'parentId':_0x26551d}),_0x3b9f3d=_0x416871(_0x9b93b6['replies'][0x0]);return{..._0x3b9f3d,'children':_0x9b93b6[_0x543a6e(0x183)][_0x543a6e(0x1ef)](0x1)[_0x543a6e(0x1c5)](_0x2bda50=>_0x416871(_0x2bda50,_0x3b9f3d['id']))};}return null;}let g=class{constructor(_0x51cc89,_0x5d52f6,_0x39bf8a,_0x5aa1aa){const _0x44dbbf=_0x5b4944;this['_httpService']=_0x51cc89,this[_0x44dbbf(0x1bb)]=_0x5d52f6,this[_0x44dbbf(0x191)]=_0x39bf8a,this['_injector']=_0x5aa1aa;}async['addComment'](_0x18787d){const _0x3dfce3=_0x5b4944;var _0x3db1b6,_0x3d54f4;const {parentId:_0x24b658,unitId:_0x149add,text:_0x5150f3,threadId:_0x356253}=_0x18787d,_0x9468f4=(_0x3d54f4=(_0x3db1b6=_0x5150f3[_0x3dfce3(0x187)])==null?void 0x0:_0x3db1b6[_0x3dfce3(0x1f4)](_0x14666f=>_0x14666f[_0x3dfce3(0x192)]===c['CustomRangeType'][_0x3dfce3(0x1df)])[_0x3dfce3(0x1c5)](_0xff3d3f=>_0xff3d3f[_0x3dfce3(0x1ae)]))!=null?_0x3d54f4:[],_0x2ac2c1=JSON[_0x3dfce3(0x1d8)](_0x5150f3),_0x11eac7=(await this['_sessionService'][_0x3dfce3(0x185)](_0x149add))[_0x3dfce3(0x18c)]();if(_0x24b658){const _0x20053d={'memberId':_0x11eac7,'unitId':_0x149add,'content':_0x2ac2c1,'mention':_0x9468f4,'threadId':_0x356253},_0x498058=(await this[_0x3dfce3(0x1f0)][_0x3dfce3(0x1fe)]('/universer-api/comment/unit/'+_0x149add+_0x3dfce3(0x1a7),{'body':_0x20053d}))[_0x3dfce3(0x1cd)][_0x3dfce3(0x19c)];return{..._0x18787d,'id':_0x498058[_0x3dfce3(0x1fa)],'dT':c[_0x3dfce3(0x1b0)](+_0x498058[_0x3dfce3(0x181)])[_0x3dfce3(0x1c9)](_0x3dfce3(0x1af)),'personId':_0x498058['userId']};}else{const _0x5106b0={'memberId':_0x11eac7,'unitId':_0x149add,'content':_0x2ac2c1,'mention':_0x9468f4},_0x2cc363=await this['_httpService'][_0x3dfce3(0x1fe)](_0x3dfce3(0x190)+_0x149add+_0x3dfce3(0x195),{'body':_0x5106b0});return Y(_0x2cc363[_0x3dfce3(0x1cd)][_0x3dfce3(0x196)],_0x18787d);}}async['updateComment'](_0x1e404d){const _0x2e1c5b=_0x5b4944;var _0x9d5f01,_0x459d52;const {text:_0x2f7003,unitId:_0x2aca6f}=_0x1e404d,_0x163724=(_0x459d52=(_0x9d5f01=_0x2f7003[_0x2e1c5b(0x187)])==null?void 0x0:_0x9d5f01[_0x2e1c5b(0x1f4)](_0x14b35e=>_0x14b35e[_0x2e1c5b(0x192)]===c[_0x2e1c5b(0x188)][_0x2e1c5b(0x1df)])[_0x2e1c5b(0x1c5)](_0x4cc1f8=>_0x4cc1f8[_0x2e1c5b(0x1ae)]))!=null?_0x459d52:[],_0x47df13=JSON[_0x2e1c5b(0x1d8)](_0x2f7003),_0x1dac11=_0x1e404d[_0x2e1c5b(0x1e0)],_0x4d7cff=_0x1e404d['id'],_0x57eb21={'memberId':(await this['_sessionService'][_0x2e1c5b(0x185)](_0x2aca6f))[_0x2e1c5b(0x18c)](),'unitId':_0x2aca6f,'threadId':_0x1dac11,'mention':_0x163724,'content':_0x47df13,'replyId':_0x4d7cff},_0x1343bc=await this[_0x2e1c5b(0x1f0)][_0x2e1c5b(0x1fe)](_0x2e1c5b(0x190)+_0x2aca6f+_0x2e1c5b(0x1a4),{'body':_0x57eb21});return!_0x1343bc[_0x2e1c5b(0x1cd)][_0x2e1c5b(0x1e3)]||_0x1343bc[_0x2e1c5b(0x1cd)]['error'][_0x2e1c5b(0x1a0)]===0x1;}async[_0x5b4944(0x1f7)](_0x1eabde){const _0x3b3f42=_0x5b4944,{unitId:_0x282604}=_0x1eabde,_0x442052=_0x1eabde[_0x3b3f42(0x1e0)],_0x1b0eef={'memberId':this[_0x3b3f42(0x1bb)]['getCurrentUser']()['userID'],'unitId':_0x282604,'threadId':_0x442052,'solved':_0x1eabde[_0x3b3f42(0x1d5)]?I[_0x3b3f42(0x19f)]:I[_0x3b3f42(0x1fb)]},_0x4e1c92=await this[_0x3b3f42(0x1f0)][_0x3b3f42(0x1fe)](_0x3b3f42(0x190)+_0x282604+_0x3b3f42(0x1ec),{'body':_0x1b0eef});return!_0x4e1c92[_0x3b3f42(0x1cd)][_0x3b3f42(0x1e3)]||_0x4e1c92[_0x3b3f42(0x1cd)][_0x3b3f42(0x1e3)][_0x3b3f42(0x1a0)]===0x1;}async[_0x5b4944(0x1aa)](_0x194719,_0x3d5d07,_0x2acc75,_0x471641){const _0x3b2c05=_0x5b4944,_0x3f593a={'memberId':(await this[_0x3b2c05(0x191)][_0x3b2c05(0x185)](_0x194719))[_0x3b2c05(0x18c)](),'threadId':_0x2acc75,'replyId':_0x471641,'unitId':_0x194719},_0xafdf5b=await this[_0x3b2c05(0x1f0)][_0x3b2c05(0x1fe)](_0x3b2c05(0x190)+_0x194719+_0x3b2c05(0x1c0),{'body':_0x3f593a});return!_0xafdf5b['body'][_0x3b2c05(0x1e3)]||_0xafdf5b[_0x3b2c05(0x1cd)][_0x3b2c05(0x1e3)]['code']===0x1;}async[_0x5b4944(0x1fd)](_0x57da6a,_0x27c680,_0x1318f6){const _0xe1a8e0=_0x5b4944,_0x37b279={'unitId':_0x57da6a,'threadId':_0x1318f6},_0x249307=await this['_httpService'][_0xe1a8e0(0x1fe)](_0xe1a8e0(0x190)+_0x57da6a+_0xe1a8e0(0x189),{'body':_0x37b279}),_0x2214aa=_0x1318f6['map'](_0x247b80=>G(_0x249307[_0xe1a8e0(0x1cd)][_0xe1a8e0(0x1ad)][_0x247b80],_0x57da6a,_0x27c680))[_0xe1a8e0(0x1f4)](Boolean);return Object[_0xe1a8e0(0x1e4)](_0x249307[_0xe1a8e0(0x1cd)][_0xe1a8e0(0x1db)])[_0xe1a8e0(0x193)](_0x372cf3=>{const _0x57f7b4=_0xe1a8e0;this[_0x57f7b4(0x1bb)][_0x57f7b4(0x1eb)](_0x372cf3);}),_0x2214aa;}[_0x5b4944(0x1b1)](_0xed0728){const _0x653b7f=_0x5b4944;return{'id':_0xed0728['id'],'threadId':_0xed0728[_0x653b7f(0x1e0)],'ref':_0xed0728[_0x653b7f(0x17b)]};}};g=x([_(0x0,c[_0x5b4944(0x1b2)](P[_0x5b4944(0x1d4)])),_(0x1,c[_0x5b4944(0x1b2)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x5b4944(0x1a9)])),_(0x3,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x17f)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xbb859c,_0x111278,_0x2caede,_0x50bbcc)=>{for(var _0x1f742d=_0x50bbcc>0x1?void 0x0:_0x50bbcc?H(_0x111278,_0x2caede):_0x111278,_0x12d0fb=_0xbb859c['length']-0x1,_0x553bd3;_0x12d0fb>=0x0;_0x12d0fb--)(_0x553bd3=_0xbb859c[_0x12d0fb])&&(_0x1f742d=_0x553bd3(_0x1f742d)||_0x1f742d);return _0x1f742d;},y=(_0x48c0d8,_0x5a3ec4)=>(_0x51651e,_0x2852c9)=>_0x5a3ec4(_0x51651e,_0x2852c9,_0x48c0d8);let C=class extends c[_0x5b4944(0x198)]{constructor(_0x54c875,_0x4f9389){const _0x1c1763=_0x5b4944;super(),this[_0x1c1763(0x1ca)]=_0x54c875,this['_threadCommentDataSource']=_0x4f9389,this['_initDataSource']();}[_0x5b4944(0x1cc)](){const _0x29bd78=_0x5b4944;this[_0x29bd78(0x1ca)][_0x29bd78(0x1cf)]=this[_0x29bd78(0x199)],this[_0x29bd78(0x1ca)][_0x29bd78(0x182)]=!0x1;}};function _0x515c(_0x288b38,_0x450dba){const _0x1a1418=_0x1a14();return _0x515c=function(_0x515c07,_0x5b2d94){_0x515c07=_0x515c07-0x17b;let _0x4bbc1c=_0x1a1418[_0x515c07];return _0x4bbc1c;},_0x515c(_0x288b38,_0x450dba);}C=J([y(0x0,M[_0x5b4944(0x1c6)]),y(0x1,c[_0x5b4944(0x1b2)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x3cb348,_0x367bae,_0x271844)=>_0x367bae in _0x3cb348?F(_0x3cb348,_0x367bae,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271844}):_0x3cb348[_0x367bae]=_0x271844,W=(_0x3579b8,_0x52b8e3,_0x2b6735,_0x234ef6)=>{const _0x2492f3=_0x5b4944;for(var _0x51be5c=_0x234ef6>0x1?void 0x0:_0x234ef6?L(_0x52b8e3,_0x2b6735):_0x52b8e3,_0x4f7838=_0x3579b8[_0x2492f3(0x19e)]-0x1,_0x5ecc55;_0x4f7838>=0x0;_0x4f7838--)(_0x5ecc55=_0x3579b8[_0x4f7838])&&(_0x51be5c=_0x5ecc55(_0x51be5c)||_0x51be5c);return _0x51be5c;},O=(_0x1bb35b,_0x169108)=>(_0xae00ea,_0x16209b)=>_0x169108(_0xae00ea,_0x16209b,_0x1bb35b),N=(_0x475e65,_0x30511a,_0x31564d)=>Z(_0x475e65,typeof _0x30511a!=_0x5b4944(0x1ab)?_0x30511a+'':_0x30511a,_0x31564d);exports[_0x5b4944(0x1ac)]=class extends c[_0x5b4944(0x19a)]{constructor(_0xd82cfa=D,_0x530706,_0x47edf3){const _0x5d79de=_0x5b4944;super(),this[_0x5d79de(0x1ea)]=_0xd82cfa,this['_injector']=_0x530706,this['_configService']=_0x47edf3;const {..._0x190039}=c['merge']({},D,this[_0x5d79de(0x1ea)]);this[_0x5d79de(0x1f8)][_0x5d79de(0x1cb)](q,_0x190039);}[_0x5b4944(0x1bc)](){const _0x183168=_0x5b4944;[[g],[C],[p]][_0x183168(0x193)](_0x3a82d7=>{const _0x327422=_0x183168;this[_0x327422(0x1a5)]['add'](_0x3a82d7);});}['onReady'](){const _0x4b66f5=_0x5b4944;this[_0x4b66f5(0x1a5)]['get'](C),this[_0x4b66f5(0x1a5)][_0x4b66f5(0x1d3)](p);}},N(exports[_0x5b4944(0x1ac)],_0x5b4944(0x1d0),U),N(exports[_0x5b4944(0x1ac)],_0x5b4944(0x1c2),c[_0x5b4944(0x1ce)][_0x5b4944(0x194)]),exports[_0x5b4944(0x1ac)]=W([c[_0x5b4944(0x1a1)](j[_0x5b4944(0x1b4)],b[_0x5b4944(0x1b5)],T[_0x5b4944(0x1b7)]),O(0x1,c[_0x5b4944(0x1b2)](c[_0x5b4944(0x17f)])),O(0x2,c[_0x5b4944(0x1c7)])],exports[_0x5b4944(0x1ac)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3f4afc=_0x2b04;(function(_0x4f6264,_0x411fbb){const _0x5e5296=_0x2b04,_0x58837c=_0x4f6264();while(!![]){try{const _0x3a62cc=parseInt(_0x5e5296(0x155))/0x1*(-parseInt(_0x5e5296(0x14a))/0x2)+parseInt(_0x5e5296(0x164))/0x3*(-parseInt(_0x5e5296(0x10f))/0x4)+parseInt(_0x5e5296(0x11f))/0x5*(-parseInt(_0x5e5296(0x169))/0x6)+-parseInt(_0x5e5296(0x14c))/0x7+-parseInt(_0x5e5296(0x10a))/0x8*(-parseInt(_0x5e5296(0x120))/0x9)+-parseInt(_0x5e5296(0x166))/0xa*(-parseInt(_0x5e5296(0x128))/0xb)+parseInt(_0x5e5296(0x132))/0xc;if(_0x3a62cc===_0x411fbb)break;else _0x58837c['push'](_0x58837c['shift']());}catch(_0x2e548b){_0x58837c['push'](_0x58837c['shift']());}}}(_0x3af9,0x5489e));import{CommentService as _0x84580b,CollaborationSessionService as _0x1bf408,UniverCollaborationClientPlugin as _0x1e3b86}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2a1bc5}from'@univerjs-pro/license';import{dayjs as _0x4f4ce7,UserManagerService as _0x554e61,Inject as _0x194cc9,Injector as _0x3963d7,Disposable as _0x3fd518,CustomRangeType as _0x1a473c,UniverInstanceType as _0x183756,DependentOn as _0x5c3377,IConfigService as _0x1131bc,Plugin as _0x3f2e1d,merge as _0x5e9b24}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b39b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f8fec,IThreadCommentDataSourceService as _0x31dd5a}from'@univerjs/thread-comment';import{bufferTime as _0x72024c}from'rxjs';import{HTTPService as _0x5554b4}from'@univerjs/network';const W=_0x3f4afc(0x130);function _0x3af9(){const _0x38bd9d=['/universer-api/comment/unit/','root','commentUpdate$','UNIVER_UNKNOWN','_threadCommentDataSource','_httpService','OpenOrReOpen','getCurrentUser','deleteComment','Solved','disposeWithMe','_configService','addComment','find','_initDataSource','listComments','content','onReady','personId','getUser','_threadCommentModel','Reply','add','5626dyfDJg','COMMENT','2464385DcpgGI','/solved','values','delete','map','_initUserSync','Edit','post','slice','19rOLctN','rangeType','_threadCommentDataSourceService','_sessionService','get','syncUpdateMutationToColla','/edit','saveCommentToSnapshot','Delete','_commentService','Solve','stringify','parse','_userService','resolveComment','3oFVddP','_injector','10xIQJYj','filter','getUnit','2046FFEfba','threadId','pluginName','unitId','_init','replies','41048fiIeRx','onStarting','forEach','addUser','reply','1692892RkaMfl','getMemberID','userId','YYYY/MM/DD\x20HH:mm','resolved','parentId','length','Unknown','_config','size','error','/universer-api/user/list','replyId','getOwnPropertyDescriptor','createTimestamp','body','6585Kybagt','1017ZnkAAE','subscribe','dataSource','type','code','comments','ref','userID','3242613wunRSx','UNRECOGNIZED','user','rangeId','solved','/reply','requireSession','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','8994072MEdlCo'];_0x3af9=function(){return _0x38bd9d;};return _0x3af9();}var I=(_0x45267d=>(_0x45267d[_0x45267d[_0x3f4afc(0x139)]=0x0]=_0x3f4afc(0x139),_0x45267d[_0x45267d[_0x3f4afc(0x13c)]=0x1]='Solved',_0x45267d[_0x45267d[_0x3f4afc(0x129)]=-0x1]=_0x3f4afc(0x129),_0x45267d))(I||{}),v=(_0x2863e8=>(_0x2863e8[_0x2863e8[_0x3f4afc(0x116)]=0x0]='Unknown',_0x2863e8[_0x2863e8[_0x3f4afc(0x12f)]=0x1]='Add',_0x2863e8[_0x2863e8[_0x3f4afc(0x148)]=0x2]=_0x3f4afc(0x148),_0x2863e8[_0x2863e8[_0x3f4afc(0x152)]=0x3]=_0x3f4afc(0x152),_0x2863e8[_0x2863e8['Delete']=0x4]=_0x3f4afc(0x15d),_0x2863e8[_0x2863e8[_0x3f4afc(0x15f)]=0x5]='Solve',_0x2863e8[_0x2863e8[_0x3f4afc(0x129)]=-0x1]=_0x3f4afc(0x129),_0x2863e8))(v||{});const D=_0x4b910a=>_0x4f4ce7(new Date(+_0x4b910a))['format'](_0x3f4afc(0x112)),B=async(_0x121f67,_0x41a19b)=>{const _0x55ff18=_0x3f4afc,_0x313d9b=_0x121f67['get'](_0x554e61),_0x477a19=_0x121f67[_0x55ff18(0x159)](_0x5554b4);_0x41a19b[_0x55ff18(0x10c)](_0x2de2bb=>{const _0x2b7b42=_0x55ff18;_0x313d9b[_0x2b7b42(0x146)](_0x2de2bb)&&_0x41a19b[_0x2b7b42(0x14f)](_0x2de2bb);}),_0x41a19b[_0x55ff18(0x118)]&&(await _0x477a19[_0x55ff18(0x159)](_0x55ff18(0x11a),{'params':{'userIDs':[..._0x41a19b]}}))[_0x55ff18(0x11e)][_0x55ff18(0x131)][_0x55ff18(0x10c)](_0x3bd3d9=>{_0x3bd3d9&&_0x313d9b['addUser'](_0x3bd3d9);});};var K=Object[_0x3f4afc(0x11c)],V=(_0x433eed,_0x278ba2,_0xee277b,_0x57fc2b)=>{const _0x566bf9=_0x3f4afc;for(var _0x3bd754=_0x57fc2b>0x1?void 0x0:_0x57fc2b?K(_0x278ba2,_0xee277b):_0x278ba2,_0x54c20d=_0x433eed[_0x566bf9(0x115)]-0x1,_0x388b7e;_0x54c20d>=0x0;_0x54c20d--)(_0x388b7e=_0x433eed[_0x54c20d])&&(_0x3bd754=_0x388b7e(_0x3bd754)||_0x3bd754);return _0x3bd754;},p=(_0x19716e,_0x2a201f)=>(_0x205992,_0x19f59a)=>_0x2a201f(_0x205992,_0x19f59a,_0x19716e);let S=class extends _0x3fd518{constructor(_0x562c46,_0x5d6969,_0x1fa01a,_0x13cab5){const _0x126c75=_0x3f4afc;super(),this[_0x126c75(0x15e)]=_0x562c46,this[_0x126c75(0x147)]=_0x5d6969,this[_0x126c75(0x162)]=_0x1fa01a,this[_0x126c75(0x165)]=_0x13cab5,this[_0x126c75(0x16d)](),this[_0x126c75(0x151)]();}[_0x3f4afc(0x151)](){const _0x5780f8=_0x3f4afc;this[_0x5780f8(0x13d)](this[_0x5780f8(0x147)][_0x5780f8(0x135)]['pipe'](_0x72024c(0x10))[_0x5780f8(0x121)](_0x142ab9=>{const _0x1eb9cb=_0x5780f8,_0x4efb78=new Set();_0x142ab9[_0x1eb9cb(0x10c)](_0xa31414=>{const _0x188b3f=_0x1eb9cb;switch(_0xa31414[_0x188b3f(0x123)]){case _0x188b3f(0x149):{const _0x374951=_0xa31414['payload'][_0x188b3f(0x145)];_0x4efb78[_0x188b3f(0x149)](_0x374951);break;}}}),B(this[_0x1eb9cb(0x165)],_0x4efb78);}));}[_0x3f4afc(0x16d)](){const _0x33780d=_0x3f4afc;this['disposeWithMe'](this[_0x33780d(0x15e)][_0x33780d(0x135)][_0x33780d(0x121)](async _0x211bbb=>{const _0x36efe0=_0x33780d;var _0x3869e5,_0x306a69,_0x24d03c,_0x328514;const _0x2f2aeb=(_0x3869e5=this[_0x36efe0(0x147)][_0x36efe0(0x168)](_0x211bbb['unitId'])[_0x36efe0(0x140)](_0x113db3=>_0x113db3['threadId']===_0x211bbb[_0x36efe0(0x16a)]))==null?void 0x0:_0x3869e5[_0x36efe0(0x134)];if(!_0x2f2aeb)return;const {unitId:_0x2c5c7e,subUnitId:_0x464c80}=_0x2f2aeb;switch(_0x211bbb[_0x36efe0(0x12a)]&&this[_0x36efe0(0x162)][_0x36efe0(0x10d)](_0x211bbb[_0x36efe0(0x12a)]),_0x211bbb[_0x36efe0(0x123)]){case v['Add']:break;case v[_0x36efe0(0x148)]:{this[_0x36efe0(0x147)][_0x36efe0(0x13f)](_0x2c5c7e,_0x464c80,{'unitId':_0x2c5c7e,'subUnitId':_0x464c80,'ref':'','id':_0x211bbb[_0x36efe0(0x11b)],'dT':D(+_0x211bbb[_0x36efe0(0x11d)]),'threadId':_0x211bbb[_0x36efe0(0x16a)],'personId':(_0x24d03c=(_0x306a69=_0x211bbb[_0x36efe0(0x12a)])==null?void 0x0:_0x306a69[_0x36efe0(0x127)])!=null?_0x24d03c:_0x211bbb[_0x36efe0(0x111)],'text':JSON[_0x36efe0(0x161)](_0x211bbb['content']),'parentId':_0x2f2aeb['id']});break;}case v[_0x36efe0(0x15d)]:{const _0x751070=this['_threadCommentModel']['getComment'](_0x2c5c7e,_0x464c80,_0x211bbb[_0x36efe0(0x11b)]);_0x751070&&_0x751070[_0x36efe0(0x114)]&&this[_0x36efe0(0x147)]['deleteComment'](_0x2c5c7e,_0x464c80,_0x211bbb[_0x36efe0(0x11b)]);break;}case v[_0x36efe0(0x152)]:{this[_0x36efe0(0x147)]['updateComment'](_0x2c5c7e,_0x464c80,{'commentId':_0x211bbb[_0x36efe0(0x11b)],'text':JSON[_0x36efe0(0x161)](_0x211bbb[_0x36efe0(0x143)])});break;}case v['Solve']:{const _0x52b99c=(_0x328514=this[_0x36efe0(0x147)][_0x36efe0(0x168)](_0x211bbb[_0x36efe0(0x16c)])[_0x36efe0(0x140)](_0x18fe3b=>_0x18fe3b[_0x36efe0(0x16a)]===_0x211bbb[_0x36efe0(0x16a)]))==null?void 0x0:_0x328514[_0x36efe0(0x134)];_0x52b99c&&this[_0x36efe0(0x147)][_0x36efe0(0x163)](_0x2c5c7e,_0x464c80,_0x52b99c['id'],_0x211bbb[_0x36efe0(0x12c)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x194cc9(_0x84580b)),p(0x1,_0x194cc9(_0x4f8fec)),p(0x2,_0x194cc9(_0x554e61)),p(0x3,_0x194cc9(_0x3963d7))],S);function _0x2b04(_0x2db369,_0x29528b){const _0x3af9bc=_0x3af9();return _0x2b04=function(_0x2b0459,_0x20ea74){_0x2b0459=_0x2b0459-0x10a;let _0x40b1f9=_0x3af9bc[_0x2b0459];return _0x40b1f9;},_0x2b04(_0x2db369,_0x29528b);}const z='thread-comment-data-source.config',M={};var k=Object[_0x3f4afc(0x11c)],Q=(_0xb926e9,_0x250cac,_0x33a466,_0xdf9c8f)=>{const _0x167dcc=_0x3f4afc;for(var _0x4c49ed=_0xdf9c8f>0x1?void 0x0:_0xdf9c8f?k(_0x250cac,_0x33a466):_0x250cac,_0x57d643=_0xb926e9[_0x167dcc(0x115)]-0x1,_0x5c3bfa;_0x57d643>=0x0;_0x57d643--)(_0x5c3bfa=_0xb926e9[_0x57d643])&&(_0x4c49ed=_0x5c3bfa(_0x4c49ed)||_0x4c49ed);return _0x4c49ed;},_=(_0x3f0552,_0x1e53c1)=>(_0x1b1375,_0x3975f9)=>_0x1e53c1(_0x1b1375,_0x3975f9,_0x3f0552);function X(_0x557cd9,_0x2a2ef0){const _0x2474ef=_0x3f4afc,_0xf3f1a=_0x557cd9[_0x2474ef(0x16e)][0x0];return{..._0x2a2ef0,'id':_0xf3f1a[_0x2474ef(0x11b)],'resolved':_0x557cd9[_0x2474ef(0x12c)]===0x1,'dT':D(_0xf3f1a[_0x2474ef(0x11d)]),'personId':_0xf3f1a[_0x2474ef(0x111)],'threadId':_0xf3f1a[_0x2474ef(0x16a)]};}function ee(_0x461dd0,_0x50c5df,_0x229142){const _0x54db6d=_0x3f4afc;var _0x5220d8,_0x25e555;if(((_0x25e555=(_0x5220d8=_0x461dd0==null?void 0x0:_0x461dd0[_0x54db6d(0x16e)])==null?void 0x0:_0x5220d8['length'])!=null?_0x25e555:0x0)>0x0){const _0x57e980=(_0xf3fd5d,_0x574ab7)=>({'id':_0xf3fd5d['replyId'],'threadId':_0xf3fd5d[_0x54db6d(0x16a)],'dT':D(_0xf3fd5d[_0x54db6d(0x11d)]),'personId':_0xf3fd5d[_0x54db6d(0x111)],'resolved':_0x461dd0['solved']===I['Solved'],'unitId':_0x50c5df,'subUnitId':_0x229142,'text':JSON[_0x54db6d(0x161)](_0xf3fd5d[_0x54db6d(0x143)]),'parentId':_0x574ab7}),_0x2df3f1=_0x57e980(_0x461dd0['replies'][0x0]);return{..._0x2df3f1,'children':_0x461dd0[_0x54db6d(0x16e)][_0x54db6d(0x154)](0x1)[_0x54db6d(0x150)](_0x4391eb=>_0x57e980(_0x4391eb,_0x2df3f1['id']))};}return null;}let f=class{constructor(_0x558c28,_0x1b2da6,_0x141787,_0x5a2a64){const _0x313d84=_0x3f4afc;this['_httpService']=_0x558c28,this[_0x313d84(0x162)]=_0x1b2da6,this[_0x313d84(0x158)]=_0x141787,this[_0x313d84(0x165)]=_0x5a2a64;}async[_0x3f4afc(0x13f)](_0x1e2556){const _0xb15899=_0x3f4afc;var _0x336231,_0x4a67f6;const {parentId:_0x506db6,unitId:_0x2d1a51,text:_0x937a74,threadId:_0x94bbbd}=_0x1e2556,_0x2e8a98=(_0x4a67f6=(_0x336231=_0x937a74['customRanges'])==null?void 0x0:_0x336231['filter'](_0x14ebf9=>_0x14ebf9[_0xb15899(0x156)]===_0x1a473c[_0xb15899(0x14b)])[_0xb15899(0x150)](_0xd33dc1=>_0xd33dc1[_0xb15899(0x12b)]))!=null?_0x4a67f6:[],_0x569aea=JSON[_0xb15899(0x160)](_0x937a74),_0x17a80a=(await this[_0xb15899(0x158)][_0xb15899(0x12e)](_0x2d1a51))[_0xb15899(0x110)]();if(_0x506db6){const _0x3c9087={'memberId':_0x17a80a,'unitId':_0x2d1a51,'content':_0x569aea,'mention':_0x2e8a98,'threadId':_0x94bbbd},_0x3daae6=(await this['_httpService']['post'](_0xb15899(0x133)+_0x2d1a51+_0xb15899(0x12d),{'body':_0x3c9087}))[_0xb15899(0x11e)][_0xb15899(0x10e)];return{..._0x1e2556,'id':_0x3daae6[_0xb15899(0x11b)],'dT':_0x4f4ce7(+_0x3daae6[_0xb15899(0x11d)])['format'](_0xb15899(0x112)),'personId':_0x3daae6[_0xb15899(0x111)]};}else{const _0x1d9f74={'memberId':_0x17a80a,'unitId':_0x2d1a51,'content':_0x569aea,'mention':_0x2e8a98},_0x2cd041=await this[_0xb15899(0x138)][_0xb15899(0x153)](_0xb15899(0x133)+_0x2d1a51+'/add',{'body':_0x1d9f74});return X(_0x2cd041[_0xb15899(0x11e)]['comment'],_0x1e2556);}}async['updateComment'](_0x22bbeb){const _0x461865=_0x3f4afc;var _0x16ee45,_0x5409b3;const {text:_0x18b3aa,unitId:_0x1b1c60}=_0x22bbeb,_0x1327fc=(_0x5409b3=(_0x16ee45=_0x18b3aa['customRanges'])==null?void 0x0:_0x16ee45[_0x461865(0x167)](_0x13dcea=>_0x13dcea[_0x461865(0x156)]===_0x1a473c[_0x461865(0x14b)])[_0x461865(0x150)](_0x4842f7=>_0x4842f7['rangeId']))!=null?_0x5409b3:[],_0x416e0c=JSON['stringify'](_0x18b3aa),_0x4114e1=_0x22bbeb[_0x461865(0x16a)],_0x3ea8ca=_0x22bbeb['id'],_0x537967={'memberId':(await this[_0x461865(0x158)][_0x461865(0x12e)](_0x1b1c60))[_0x461865(0x110)](),'unitId':_0x1b1c60,'threadId':_0x4114e1,'mention':_0x1327fc,'content':_0x416e0c,'replyId':_0x3ea8ca},_0x5f2c5f=await this[_0x461865(0x138)][_0x461865(0x153)](_0x461865(0x133)+_0x1b1c60+_0x461865(0x15b),{'body':_0x537967});return!_0x5f2c5f[_0x461865(0x11e)][_0x461865(0x119)]||_0x5f2c5f[_0x461865(0x11e)][_0x461865(0x119)][_0x461865(0x124)]===0x1;}async[_0x3f4afc(0x163)](_0x19a137){const _0x4c6129=_0x3f4afc,{unitId:_0x2eac6f}=_0x19a137,_0x22faec=_0x19a137['threadId'],_0x19428f={'memberId':this[_0x4c6129(0x162)][_0x4c6129(0x13a)]()[_0x4c6129(0x127)],'unitId':_0x2eac6f,'threadId':_0x22faec,'solved':_0x19a137[_0x4c6129(0x113)]?I[_0x4c6129(0x13c)]:I[_0x4c6129(0x139)]},_0x3d9016=await this[_0x4c6129(0x138)][_0x4c6129(0x153)](_0x4c6129(0x133)+_0x2eac6f+_0x4c6129(0x14d),{'body':_0x19428f});return!_0x3d9016[_0x4c6129(0x11e)][_0x4c6129(0x119)]||_0x3d9016[_0x4c6129(0x11e)][_0x4c6129(0x119)]['code']===0x1;}async[_0x3f4afc(0x13b)](_0x46777e,_0x57e2e1,_0x1b58e3,_0x5c30e5){const _0x16fe79=_0x3f4afc,_0x18a286={'memberId':(await this['_sessionService'][_0x16fe79(0x12e)](_0x46777e))[_0x16fe79(0x110)](),'threadId':_0x1b58e3,'replyId':_0x5c30e5,'unitId':_0x46777e},_0x5c8110=await this[_0x16fe79(0x138)][_0x16fe79(0x153)](_0x16fe79(0x133)+_0x46777e+'/delete',{'body':_0x18a286});return!_0x5c8110['body'][_0x16fe79(0x119)]||_0x5c8110[_0x16fe79(0x11e)][_0x16fe79(0x119)]['code']===0x1;}async[_0x3f4afc(0x142)](_0x3e5076,_0x3a72e9,_0x2d0c0a){const _0x558211=_0x3f4afc,_0xb8f250={'unitId':_0x3e5076,'threadId':_0x2d0c0a},_0x5113b4=await this[_0x558211(0x138)][_0x558211(0x153)](_0x558211(0x133)+_0x3e5076+'/list',{'body':_0xb8f250}),_0x1911c4=_0x2d0c0a[_0x558211(0x150)](_0xe56040=>ee(_0x5113b4[_0x558211(0x11e)][_0x558211(0x125)][_0xe56040],_0x3e5076,_0x3a72e9))[_0x558211(0x167)](Boolean);return Object[_0x558211(0x14e)](_0x5113b4[_0x558211(0x11e)]['users'])[_0x558211(0x10c)](_0x13ed2c=>{const _0x5a2ee6=_0x558211;this[_0x5a2ee6(0x162)]['addUser'](_0x13ed2c);}),_0x1911c4;}[_0x3f4afc(0x15c)](_0x4b9484){const _0x8e9c02=_0x3f4afc;return{'id':_0x4b9484['id'],'threadId':_0x4b9484[_0x8e9c02(0x16a)],'ref':_0x4b9484[_0x8e9c02(0x126)]};}};f=Q([_(0x0,_0x194cc9(_0x5554b4)),_(0x1,_0x194cc9(_0x554e61)),_(0x2,_0x194cc9(_0x1bf408)),_(0x3,_0x194cc9(_0x3963d7))],f);var re=Object[_0x3f4afc(0x11c)],te=(_0x23b5b8,_0x47ce9f,_0x5517ab,_0x18e0f8)=>{for(var _0x4507a5=_0x18e0f8>0x1?void 0x0:_0x18e0f8?re(_0x47ce9f,_0x5517ab):_0x47ce9f,_0x31e1c7=_0x23b5b8['length']-0x1,_0x56f430;_0x31e1c7>=0x0;_0x31e1c7--)(_0x56f430=_0x23b5b8[_0x31e1c7])&&(_0x4507a5=_0x56f430(_0x4507a5)||_0x4507a5);return _0x4507a5;},N=(_0x1a72f6,_0x25bf7d)=>(_0x563b78,_0x468051)=>_0x25bf7d(_0x563b78,_0x468051,_0x1a72f6);let g=class extends _0x3fd518{constructor(_0x436d57,_0x4b9b7d){const _0x57d6d3=_0x3f4afc;super(),this[_0x57d6d3(0x157)]=_0x436d57,this[_0x57d6d3(0x137)]=_0x4b9b7d,this[_0x57d6d3(0x141)]();}['_initDataSource'](){const _0x5ab8bf=_0x3f4afc;this[_0x5ab8bf(0x157)][_0x5ab8bf(0x122)]=this['_threadCommentDataSource'],this[_0x5ab8bf(0x157)][_0x5ab8bf(0x15a)]=!0x1;}};g=te([N(0x0,_0x31dd5a),N(0x1,_0x194cc9(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1ae983,_0x3f59c7,_0x45340f)=>_0x3f59c7 in _0x1ae983?se(_0x1ae983,_0x3f59c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45340f}):_0x1ae983[_0x3f59c7]=_0x45340f,ie=(_0x799293,_0x1ba068,_0x278065,_0x37b063)=>{const _0x41c4b2=_0x3f4afc;for(var _0x547c5c=_0x37b063>0x1?void 0x0:_0x37b063?oe(_0x1ba068,_0x278065):_0x1ba068,_0x1c653f=_0x799293[_0x41c4b2(0x115)]-0x1,_0x49d070;_0x1c653f>=0x0;_0x1c653f--)(_0x49d070=_0x799293[_0x1c653f])&&(_0x547c5c=_0x49d070(_0x547c5c)||_0x547c5c);return _0x547c5c;},w=(_0x55dbc7,_0x568707)=>(_0x582e9e,_0x3a3058)=>_0x568707(_0x582e9e,_0x3a3058,_0x55dbc7),$=(_0x955e4b,_0x44cb04,_0x416483)=>ne(_0x955e4b,typeof _0x44cb04!='symbol'?_0x44cb04+'':_0x44cb04,_0x416483);let b=class extends _0x3f2e1d{constructor(_0xb7d3c7=M,_0xf946ae,_0x416222){const _0x4649cd=_0x3f4afc;super(),this['_config']=_0xb7d3c7,this[_0x4649cd(0x165)]=_0xf946ae,this[_0x4649cd(0x13e)]=_0x416222;const {..._0x29dec7}=_0x5e9b24({},M,this[_0x4649cd(0x117)]);this['_configService']['setConfig'](z,_0x29dec7);}[_0x3f4afc(0x10b)](){const _0x385187=_0x3f4afc;[[f],[g],[S]][_0x385187(0x10c)](_0x2916b6=>{const _0x53192a=_0x385187;this[_0x53192a(0x165)]['add'](_0x2916b6);});}[_0x3f4afc(0x144)](){const _0x43a544=_0x3f4afc;this[_0x43a544(0x165)][_0x43a544(0x159)](g),this[_0x43a544(0x165)]['get'](S);}};$(b,_0x3f4afc(0x16b),W),$(b,'type',_0x183756[_0x3f4afc(0x136)]),b=ie([_0x5c3377(_0x5b39b7,_0x1e3b86,_0x2a1bc5),w(0x1,_0x194cc9(_0x3963d7)),w(0x2,_0x1131bc)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x450490=_0x28d3;(function(_0x391c96,_0x287992){const _0x4a5ecd=_0x28d3,_0x5b1d7e=_0x391c96();while(!![]){try{const _0x2521a8=parseInt(_0x4a5ecd(0x21e))/0x1*(parseInt(_0x4a5ecd(0x1fb))/0x2)+parseInt(_0x4a5ecd(0x1e7))/0x3+-parseInt(_0x4a5ecd(0x22f))/0x4+-parseInt(_0x4a5ecd(0x224))/0x5+parseInt(_0x4a5ecd(0x226))/0x6*(parseInt(_0x4a5ecd(0x209))/0x7)+-parseInt(_0x4a5ecd(0x229))/0x8+-parseInt(_0x4a5ecd(0x1fa))/0x9;if(_0x2521a8===_0x287992)break;else _0x5b1d7e['push'](_0x5b1d7e['shift']());}catch(_0x2f6ac3){_0x5b1d7e['push'](_0x5b1d7e['shift']());}}}(_0x39a8,0x47adc));import{CommentService as _0x17c949,CollaborationSessionService as _0x14474b,UniverCollaborationClientPlugin as _0x36e610}from'@univerjs-pro/collaboration-client';function _0x28d3(_0x1902ea,_0x5c158b){const _0x39a8bd=_0x39a8();return _0x28d3=function(_0x28d3ac,_0x207e3b){_0x28d3ac=_0x28d3ac-0x1d8;let _0x2d896d=_0x39a8bd[_0x28d3ac];return _0x2d896d;},_0x28d3(_0x1902ea,_0x5c158b);}import{UniverLicensePlugin as _0x3c7bfb}from'@univerjs-pro/license';import{dayjs as _0x3aaae1,UserManagerService as _0x4324c3,Inject as _0x4fa82d,Injector as _0x177e93,Disposable as _0x3b01cc,CustomRangeType as _0x75b4f0,UniverInstanceType as _0x499be0,DependentOn as _0x274cbd,IConfigService as _0x1b371a,Plugin as _0x34bf4b,merge as _0x19037b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52f165}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35ed95,IThreadCommentDataSourceService as _0x456f56}from'@univerjs/thread-comment';import{bufferTime as _0x26d7c9}from'rxjs';import{HTTPService as _0x54e253}from'@univerjs/network';const W=_0x450490(0x21d);var I=(_0x21de72=>(_0x21de72[_0x21de72[_0x450490(0x1e4)]=0x0]=_0x450490(0x1e4),_0x21de72[_0x21de72[_0x450490(0x22a)]=0x1]=_0x450490(0x22a),_0x21de72[_0x21de72[_0x450490(0x223)]=-0x1]='UNRECOGNIZED',_0x21de72))(I||{}),v=(_0x40b8de=>(_0x40b8de[_0x40b8de[_0x450490(0x20d)]=0x0]=_0x450490(0x20d),_0x40b8de[_0x40b8de[_0x450490(0x234)]=0x1]='Add',_0x40b8de[_0x40b8de[_0x450490(0x225)]=0x2]=_0x450490(0x225),_0x40b8de[_0x40b8de['Edit']=0x3]=_0x450490(0x1ef),_0x40b8de[_0x40b8de['Delete']=0x4]=_0x450490(0x212),_0x40b8de[_0x40b8de[_0x450490(0x1ea)]=0x5]='Solve',_0x40b8de[_0x40b8de[_0x450490(0x223)]=-0x1]=_0x450490(0x223),_0x40b8de))(v||{});const D=_0x48d5c8=>_0x3aaae1(new Date(+_0x48d5c8))['format'](_0x450490(0x22e)),B=async(_0x714718,_0x5dc3c1)=>{const _0x39b6a5=_0x450490,_0x43e9ab=_0x714718['get'](_0x4324c3),_0x7a637f=_0x714718[_0x39b6a5(0x1e8)](_0x54e253);_0x5dc3c1[_0x39b6a5(0x1f3)](_0x55b91a=>{const _0x5011d3=_0x39b6a5;_0x43e9ab[_0x5011d3(0x22d)](_0x55b91a)&&_0x5dc3c1[_0x5011d3(0x220)](_0x55b91a);}),_0x5dc3c1[_0x39b6a5(0x1f0)]&&(await _0x7a637f[_0x39b6a5(0x1e8)](_0x39b6a5(0x1eb),{'params':{'userIDs':[..._0x5dc3c1]}}))[_0x39b6a5(0x1dd)][_0x39b6a5(0x20b)][_0x39b6a5(0x1f3)](_0x55d208=>{_0x55d208&&_0x43e9ab['addUser'](_0x55d208);});};var K=Object[_0x450490(0x218)],V=(_0x3f8b60,_0x4c36c5,_0x44422f,_0x40a0c2)=>{const _0xa9f825=_0x450490;for(var _0x3d6de2=_0x40a0c2>0x1?void 0x0:_0x40a0c2?K(_0x4c36c5,_0x44422f):_0x4c36c5,_0x3a897b=_0x3f8b60[_0xa9f825(0x1d9)]-0x1,_0x296513;_0x3a897b>=0x0;_0x3a897b--)(_0x296513=_0x3f8b60[_0x3a897b])&&(_0x3d6de2=_0x296513(_0x3d6de2)||_0x3d6de2);return _0x3d6de2;},p=(_0x188093,_0x590fc0)=>(_0x494c11,_0x5eb0fa)=>_0x590fc0(_0x494c11,_0x5eb0fa,_0x188093);let S=class extends _0x3b01cc{constructor(_0x4f4412,_0x4b8c77,_0xc29fd9,_0x5add0c){const _0x907b44=_0x450490;super(),this[_0x907b44(0x214)]=_0x4f4412,this[_0x907b44(0x231)]=_0x4b8c77,this[_0x907b44(0x221)]=_0xc29fd9,this[_0x907b44(0x210)]=_0x5add0c,this[_0x907b44(0x1f5)](),this[_0x907b44(0x1f6)]();}['_initUserSync'](){const _0x4b0331=_0x450490;this[_0x4b0331(0x202)](this[_0x4b0331(0x231)][_0x4b0331(0x22b)][_0x4b0331(0x201)](_0x26d7c9(0x10))['subscribe'](_0x4e0901=>{const _0xa7b471=_0x4b0331,_0x1b54fd=new Set();_0x4e0901['forEach'](_0x53369c=>{const _0x34b95e=_0x28d3;switch(_0x53369c[_0x34b95e(0x1f7)]){case'add':{const _0x23e1e3=_0x53369c[_0x34b95e(0x233)][_0x34b95e(0x204)];_0x1b54fd[_0x34b95e(0x203)](_0x23e1e3);break;}}}),B(this[_0xa7b471(0x210)],_0x1b54fd);}));}['_init'](){const _0x16e5ba=_0x450490;this[_0x16e5ba(0x202)](this[_0x16e5ba(0x214)][_0x16e5ba(0x22b)][_0x16e5ba(0x1f9)](async _0x5bc146=>{const _0x29c86f=_0x16e5ba;var _0x2054f8,_0x5baf12,_0x4e085c,_0x26d821;const _0x19f01e=(_0x2054f8=this[_0x29c86f(0x231)][_0x29c86f(0x205)](_0x5bc146[_0x29c86f(0x238)])[_0x29c86f(0x1e2)](_0x466a4e=>_0x466a4e[_0x29c86f(0x21c)]===_0x5bc146[_0x29c86f(0x21c)]))==null?void 0x0:_0x2054f8['root'];if(!_0x19f01e)return;const {unitId:_0x5c7e23,subUnitId:_0x3e7250}=_0x19f01e;switch(_0x5bc146[_0x29c86f(0x1e3)]&&this[_0x29c86f(0x221)][_0x29c86f(0x21f)](_0x5bc146[_0x29c86f(0x1e3)]),_0x5bc146[_0x29c86f(0x1f7)]){case v[_0x29c86f(0x234)]:break;case v[_0x29c86f(0x225)]:{this[_0x29c86f(0x231)][_0x29c86f(0x1ec)](_0x5c7e23,_0x3e7250,{'unitId':_0x5c7e23,'subUnitId':_0x3e7250,'ref':'','id':_0x5bc146[_0x29c86f(0x1e0)],'dT':D(+_0x5bc146[_0x29c86f(0x215)]),'threadId':_0x5bc146[_0x29c86f(0x21c)],'personId':(_0x4e085c=(_0x5baf12=_0x5bc146[_0x29c86f(0x1e3)])==null?void 0x0:_0x5baf12[_0x29c86f(0x213)])!=null?_0x4e085c:_0x5bc146[_0x29c86f(0x1db)],'text':JSON[_0x29c86f(0x1fe)](_0x5bc146['content']),'parentId':_0x19f01e['id']});break;}case v[_0x29c86f(0x212)]:{const _0x1b78e1=this[_0x29c86f(0x231)][_0x29c86f(0x227)](_0x5c7e23,_0x3e7250,_0x5bc146[_0x29c86f(0x1e0)]);_0x1b78e1&&_0x1b78e1[_0x29c86f(0x1f4)]&&this[_0x29c86f(0x231)][_0x29c86f(0x200)](_0x5c7e23,_0x3e7250,_0x5bc146[_0x29c86f(0x1e0)]);break;}case v[_0x29c86f(0x1ef)]:{this['_threadCommentModel']['updateComment'](_0x5c7e23,_0x3e7250,{'commentId':_0x5bc146[_0x29c86f(0x1e0)],'text':JSON[_0x29c86f(0x1fe)](_0x5bc146['content'])});break;}case v[_0x29c86f(0x1ea)]:{const _0x169773=(_0x26d821=this[_0x29c86f(0x231)][_0x29c86f(0x205)](_0x5bc146['unitId'])[_0x29c86f(0x1e2)](_0x1f5d10=>_0x1f5d10[_0x29c86f(0x21c)]===_0x5bc146[_0x29c86f(0x21c)]))==null?void 0x0:_0x26d821[_0x29c86f(0x236)];_0x169773&&this[_0x29c86f(0x231)]['resolveComment'](_0x5c7e23,_0x3e7250,_0x169773['id'],_0x5bc146['solved']===I[_0x29c86f(0x22a)]);break;}}}));}};S=V([p(0x0,_0x4fa82d(_0x17c949)),p(0x1,_0x4fa82d(_0x35ed95)),p(0x2,_0x4fa82d(_0x4324c3)),p(0x3,_0x4fa82d(_0x177e93))],S);const z=_0x450490(0x20f),M={};var k=Object[_0x450490(0x218)],Q=(_0x2c0e21,_0x5eade7,_0x45c358,_0x2df47f)=>{const _0xa6eb1f=_0x450490;for(var _0x91c3fd=_0x2df47f>0x1?void 0x0:_0x2df47f?k(_0x5eade7,_0x45c358):_0x5eade7,_0x1a057c=_0x2c0e21[_0xa6eb1f(0x1d9)]-0x1,_0x685f10;_0x1a057c>=0x0;_0x1a057c--)(_0x685f10=_0x2c0e21[_0x1a057c])&&(_0x91c3fd=_0x685f10(_0x91c3fd)||_0x91c3fd);return _0x91c3fd;},_=(_0x191de0,_0x38b9e5)=>(_0x1aabcb,_0x51c303)=>_0x38b9e5(_0x1aabcb,_0x51c303,_0x191de0);function X(_0x994757,_0x44ac1d){const _0x97e8ee=_0x450490,_0x18b487=_0x994757[_0x97e8ee(0x1da)][0x0];return{..._0x44ac1d,'id':_0x18b487[_0x97e8ee(0x1e0)],'resolved':_0x994757[_0x97e8ee(0x1fd)]===0x1,'dT':D(_0x18b487[_0x97e8ee(0x215)]),'personId':_0x18b487['userId'],'threadId':_0x18b487['threadId']};}function ee(_0x390c54,_0x39753c,_0x1e9c4a){const _0x25e75b=_0x450490;var _0x4eb4e7,_0x50ee55;if(((_0x50ee55=(_0x4eb4e7=_0x390c54==null?void 0x0:_0x390c54[_0x25e75b(0x1da)])==null?void 0x0:_0x4eb4e7[_0x25e75b(0x1d9)])!=null?_0x50ee55:0x0)>0x0){const _0x12f09c=(_0xef4b12,_0x14d0b6)=>({'id':_0xef4b12[_0x25e75b(0x1e0)],'threadId':_0xef4b12[_0x25e75b(0x21c)],'dT':D(_0xef4b12['createTimestamp']),'personId':_0xef4b12[_0x25e75b(0x1db)],'resolved':_0x390c54[_0x25e75b(0x1fd)]===I[_0x25e75b(0x22a)],'unitId':_0x39753c,'subUnitId':_0x1e9c4a,'text':JSON[_0x25e75b(0x1fe)](_0xef4b12[_0x25e75b(0x219)]),'parentId':_0x14d0b6}),_0x9e160=_0x12f09c(_0x390c54[_0x25e75b(0x1da)][0x0]);return{..._0x9e160,'children':_0x390c54[_0x25e75b(0x1da)][_0x25e75b(0x20e)](0x1)[_0x25e75b(0x217)](_0x20997f=>_0x12f09c(_0x20997f,_0x9e160['id']))};}return null;}let f=class{constructor(_0x56a0c5,_0x2f75e8,_0x40f236,_0xfa858c){const _0x91c437=_0x450490;this[_0x91c437(0x1f2)]=_0x56a0c5,this[_0x91c437(0x221)]=_0x2f75e8,this['_sessionService']=_0x40f236,this[_0x91c437(0x210)]=_0xfa858c;}async[_0x450490(0x1ec)](_0x5f5b53){const _0x49f9f3=_0x450490;var _0xa3b04f,_0x19c4de;const {parentId:_0x2f8f47,unitId:_0x4608d9,text:_0x4cb3b6,threadId:_0x15cecb}=_0x5f5b53,_0x3a405b=(_0x19c4de=(_0xa3b04f=_0x4cb3b6[_0x49f9f3(0x1ee)])==null?void 0x0:_0xa3b04f[_0x49f9f3(0x21a)](_0xf0f054=>_0xf0f054['rangeType']===_0x75b4f0[_0x49f9f3(0x1de)])[_0x49f9f3(0x217)](_0x1aec59=>_0x1aec59[_0x49f9f3(0x208)]))!=null?_0x19c4de:[],_0x26c9f5=JSON['stringify'](_0x4cb3b6),_0x5c0dc7=(await this[_0x49f9f3(0x20a)]['requireSession'](_0x4608d9))[_0x49f9f3(0x232)]();if(_0x2f8f47){const _0x484308={'memberId':_0x5c0dc7,'unitId':_0x4608d9,'content':_0x26c9f5,'mention':_0x3a405b,'threadId':_0x15cecb},_0x39105e=(await this[_0x49f9f3(0x1f2)][_0x49f9f3(0x1df)](_0x49f9f3(0x1e9)+_0x4608d9+'/reply',{'body':_0x484308}))['body']['reply'];return{..._0x5f5b53,'id':_0x39105e[_0x49f9f3(0x1e0)],'dT':_0x3aaae1(+_0x39105e[_0x49f9f3(0x215)])[_0x49f9f3(0x211)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x39105e['userId']};}else{const _0x539b54={'memberId':_0x5c0dc7,'unitId':_0x4608d9,'content':_0x26c9f5,'mention':_0x3a405b},_0x509c28=await this[_0x49f9f3(0x1f2)]['post']('/universer-api/comment/unit/'+_0x4608d9+_0x49f9f3(0x207),{'body':_0x539b54});return X(_0x509c28[_0x49f9f3(0x1dd)][_0x49f9f3(0x1fc)],_0x5f5b53);}}async[_0x450490(0x235)](_0x54db86){const _0x10bcd3=_0x450490;var _0x5cbb3f,_0x3ad180;const {text:_0x1ce4a6,unitId:_0x4ffe4d}=_0x54db86,_0x558833=(_0x3ad180=(_0x5cbb3f=_0x1ce4a6[_0x10bcd3(0x1ee)])==null?void 0x0:_0x5cbb3f[_0x10bcd3(0x21a)](_0x356e16=>_0x356e16[_0x10bcd3(0x230)]===_0x75b4f0[_0x10bcd3(0x1de)])[_0x10bcd3(0x217)](_0x34000f=>_0x34000f[_0x10bcd3(0x208)]))!=null?_0x3ad180:[],_0xad934a=JSON['stringify'](_0x1ce4a6),_0x31b07e=_0x54db86[_0x10bcd3(0x21c)],_0x8d94dd=_0x54db86['id'],_0x5c864d={'memberId':(await this[_0x10bcd3(0x20a)][_0x10bcd3(0x1d8)](_0x4ffe4d))['getMemberID'](),'unitId':_0x4ffe4d,'threadId':_0x31b07e,'mention':_0x558833,'content':_0xad934a,'replyId':_0x8d94dd},_0x2da91e=await this[_0x10bcd3(0x1f2)]['post']('/universer-api/comment/unit/'+_0x4ffe4d+_0x10bcd3(0x216),{'body':_0x5c864d});return!_0x2da91e[_0x10bcd3(0x1dd)][_0x10bcd3(0x1e5)]||_0x2da91e[_0x10bcd3(0x1dd)][_0x10bcd3(0x1e5)]['code']===0x1;}async[_0x450490(0x22c)](_0x28e5a4){const _0x68a3ae=_0x450490,{unitId:_0x6f7401}=_0x28e5a4,_0x2a775e=_0x28e5a4[_0x68a3ae(0x21c)],_0xb15d39={'memberId':this[_0x68a3ae(0x221)][_0x68a3ae(0x239)]()[_0x68a3ae(0x213)],'unitId':_0x6f7401,'threadId':_0x2a775e,'solved':_0x28e5a4[_0x68a3ae(0x1ed)]?I[_0x68a3ae(0x22a)]:I[_0x68a3ae(0x1e4)]},_0x4f91fb=await this[_0x68a3ae(0x1f2)][_0x68a3ae(0x1df)]('/universer-api/comment/unit/'+_0x6f7401+'/solved',{'body':_0xb15d39});return!_0x4f91fb['body'][_0x68a3ae(0x1e5)]||_0x4f91fb['body']['error'][_0x68a3ae(0x1dc)]===0x1;}async[_0x450490(0x200)](_0x1430aa,_0x415c58,_0x56a870,_0x18e826){const _0x15921c=_0x450490,_0x1bc3da={'memberId':(await this[_0x15921c(0x20a)]['requireSession'](_0x1430aa))[_0x15921c(0x232)](),'threadId':_0x56a870,'replyId':_0x18e826,'unitId':_0x1430aa},_0x57ee3a=await this[_0x15921c(0x1f2)][_0x15921c(0x1df)]('/universer-api/comment/unit/'+_0x1430aa+'/delete',{'body':_0x1bc3da});return!_0x57ee3a[_0x15921c(0x1dd)][_0x15921c(0x1e5)]||_0x57ee3a[_0x15921c(0x1dd)][_0x15921c(0x1e5)][_0x15921c(0x1dc)]===0x1;}async['listComments'](_0x7ee900,_0x2816ff,_0x19e094){const _0x425c06=_0x450490,_0x59e863={'unitId':_0x7ee900,'threadId':_0x19e094},_0x9ed4ec=await this[_0x425c06(0x1f2)][_0x425c06(0x1df)](_0x425c06(0x1e9)+_0x7ee900+_0x425c06(0x20c),{'body':_0x59e863}),_0x44725d=_0x19e094[_0x425c06(0x217)](_0x25d174=>ee(_0x9ed4ec[_0x425c06(0x1dd)][_0x425c06(0x1f1)][_0x25d174],_0x7ee900,_0x2816ff))['filter'](Boolean);return Object['values'](_0x9ed4ec['body']['users'])[_0x425c06(0x1f3)](_0x41061d=>{const _0x5a722f=_0x425c06;this[_0x5a722f(0x221)][_0x5a722f(0x21f)](_0x41061d);}),_0x44725d;}[_0x450490(0x1ff)](_0x2cafbd){return{'id':_0x2cafbd['id'],'threadId':_0x2cafbd['threadId'],'ref':_0x2cafbd['ref']};}};f=Q([_(0x0,_0x4fa82d(_0x54e253)),_(0x1,_0x4fa82d(_0x4324c3)),_(0x2,_0x4fa82d(_0x14474b)),_(0x3,_0x4fa82d(_0x177e93))],f);var re=Object[_0x450490(0x218)],te=(_0x46d228,_0x5c7d5d,_0x36082a,_0x3bcf91)=>{const _0x24eac4=_0x450490;for(var _0x4a080f=_0x3bcf91>0x1?void 0x0:_0x3bcf91?re(_0x5c7d5d,_0x36082a):_0x5c7d5d,_0x323d44=_0x46d228[_0x24eac4(0x1d9)]-0x1,_0x4de727;_0x323d44>=0x0;_0x323d44--)(_0x4de727=_0x46d228[_0x323d44])&&(_0x4a080f=_0x4de727(_0x4a080f)||_0x4a080f);return _0x4a080f;},N=(_0x327c58,_0xdc2650)=>(_0x12fef2,_0xde5e18)=>_0xdc2650(_0x12fef2,_0xde5e18,_0x327c58);let g=class extends _0x3b01cc{constructor(_0x243361,_0xe00ef5){const _0x23283a=_0x450490;super(),this['_threadCommentDataSourceService']=_0x243361,this[_0x23283a(0x206)]=_0xe00ef5,this[_0x23283a(0x1f8)]();}[_0x450490(0x1f8)](){const _0x2a1967=_0x450490;this[_0x2a1967(0x228)][_0x2a1967(0x23a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x2a1967(0x1e6)]=!0x1;}};g=te([N(0x0,_0x456f56),N(0x1,_0x4fa82d(f))],g);var se=Object['defineProperty'],oe=Object[_0x450490(0x218)],ne=(_0x14415e,_0x1c9a07,_0x545161)=>_0x1c9a07 in _0x14415e?se(_0x14415e,_0x1c9a07,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x545161}):_0x14415e[_0x1c9a07]=_0x545161,ie=(_0x13b9af,_0xea1823,_0x305719,_0x4892f1)=>{for(var _0x203087=_0x4892f1>0x1?void 0x0:_0x4892f1?oe(_0xea1823,_0x305719):_0xea1823,_0x5157e5=_0x13b9af['length']-0x1,_0x2e62a1;_0x5157e5>=0x0;_0x5157e5--)(_0x2e62a1=_0x13b9af[_0x5157e5])&&(_0x203087=_0x2e62a1(_0x203087)||_0x203087);return _0x203087;},w=(_0x15919c,_0x57782c)=>(_0x284506,_0x410599)=>_0x57782c(_0x284506,_0x410599,_0x15919c),$=(_0x1e1c72,_0x22e486,_0x347ce7)=>ne(_0x1e1c72,typeof _0x22e486!=_0x450490(0x237)?_0x22e486+'':_0x22e486,_0x347ce7);let b=class extends _0x34bf4b{constructor(_0x33d55f=M,_0x3284ac,_0x48ce07){const _0xbb0efe=_0x450490;super(),this['_config']=_0x33d55f,this[_0xbb0efe(0x210)]=_0x3284ac,this[_0xbb0efe(0x222)]=_0x48ce07;const {..._0x57119e}=_0x19037b({},M,this['_config']);this['_configService'][_0xbb0efe(0x1e1)](z,_0x57119e);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x170b3a=>{const _0x4c29d6=_0x28d3;this['_injector'][_0x4c29d6(0x203)](_0x170b3a);});}[_0x450490(0x21b)](){const _0x269b4d=_0x450490;this[_0x269b4d(0x210)][_0x269b4d(0x1e8)](g),this[_0x269b4d(0x210)][_0x269b4d(0x1e8)](S);}};$(b,'pluginName',W),$(b,_0x450490(0x1f7),_0x499be0['UNIVER_UNKNOWN']),b=ie([_0x274cbd(_0x52f165,_0x36e610,_0x3c7bfb),w(0x1,_0x4fa82d(_0x177e93)),w(0x2,_0x1b371a)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x39a8(){const _0x5c7eb1=['/edit','map','getOwnPropertyDescriptor','content','filter','onReady','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','24363WcXksp','addUser','delete','_userService','_configService','UNRECOGNIZED','225080TEPajc','Reply','244410sFLEdU','getComment','_threadCommentDataSourceService','3503432TEzVkL','Solved','commentUpdate$','resolveComment','getUser','YYYY/MM/DD\x20HH:mm','2171500UNqhjE','rangeType','_threadCommentModel','getMemberID','payload','Add','updateComment','root','symbol','unitId','getCurrentUser','dataSource','requireSession','length','replies','userId','code','body','COMMENT','post','replyId','setConfig','find','user','OpenOrReOpen','error','syncUpdateMutationToColla','1301790KMEayF','get','/universer-api/comment/unit/','Solve','/universer-api/user/list','addComment','resolved','customRanges','Edit','size','comments','_httpService','forEach','parentId','_init','_initUserSync','type','_initDataSource','subscribe','301383HYJYLO','42NTegPa','comment','solved','parse','saveCommentToSnapshot','deleteComment','pipe','disposeWithMe','add','personId','getUnit','_threadCommentDataSource','/add','rangeId','70erKCGG','_sessionService','users','/list','Unknown','slice','thread-comment-data-source.config','_injector','format','Delete','userID','_commentService','createTimestamp'];_0x39a8=function(){return _0x5c7eb1;};return _0x39a8();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5343(){const _0x3b6b50=['format','144CZNrtp','addUser','rangeId','YYYY/MM/DD\x20HH:mm','Plugin','UniverThreadCommentUi','subscribe','listComments','unitId','find','/solved','getUnit','toStringTag','delete','_injector','getMemberID','forEach','payload','HTTPService','getUser','onStarting','disposeWithMe','/delete','Edit','reply','/add','Inject','OpenOrReOpen','@univerjs/thread-comment-ui','comment','UniverThreadCommentDataSourcePlugin','content','UniverProCollaborationClient','amd','_initUserSync','replies','length','_configService','ThreadCommentModel','onReady','/universer-api/user/list','_sessionService','bufferTime','syncUpdateMutationToColla','@univerjs/core','createTimestamp','values','_threadCommentModel','3817bcWXYA','6332778XkWHbE','post','_initDataSource','UNRECOGNIZED','_threadCommentDataSource','3640287nQveBS','replyId','pluginName','updateComment','UserManagerService','162BgoSMm','Module','thread-comment-data-source.config','body','parentId','dataSource','12722iFsCpO','COMMENT','93wdrOAp','personId','add','userID','user','UniverThreadCommentUIPlugin','3358855FtTkYL','UniverLicensePlugin','IConfigService','UniverThreadComment','UniverCollaborationClientPlugin','35148uBYqvV','threadId','getOwnPropertyDescriptor','_userService','addComment','@univerjs-pro/collaboration-client','_httpService','/list','Disposable','30489oysZSG','defineProperty','Delete','CommentService','code','_threadCommentDataSourceService','commentUpdate$','125770zNszgo','stringify','_commentService','UniverProThreadCommentDatasource','@univerjs/thread-comment','symbol','userId','UniverProLicense','resolved','map','error','setConfig','rangeType','Reply','Solve','UniverNetwork','requireSession','_config','get','UniverCore','UniverInstanceType','_init','solved','merge','rxjs','deleteComment','Unknown','root','filter','Injector','Add','/edit','UNIVER_UNKNOWN','8rutlUl','type','parse','@univerjs-pro/license','@univerjs/network','object','Solved','IThreadCommentDataSourceService','users','dayjs','CustomRangeType','/universer-api/comment/unit/'];_0x5343=function(){return _0x3b6b50;};return _0x5343();}function _0x311e(_0x21c42f,_0xc8ff4a){const _0x53434e=_0x5343();return _0x311e=function(_0x311ef5,_0x2d3c97){_0x311ef5=_0x311ef5-0x135;let _0x77e1a2=_0x53434e[_0x311ef5];return _0x77e1a2;},_0x311e(_0x21c42f,_0xc8ff4a);}(function(_0x1fb94c,_0x5280a1){const _0x147c1f=_0x311e,_0x2276b2=_0x1fb94c();while(!![]){try{const _0x529a88=-parseInt(_0x147c1f(0x197))/0x1*(parseInt(_0x147c1f(0x195))/0x2)+parseInt(_0x147c1f(0x1ab))/0x3*(-parseInt(_0x147c1f(0x154))/0x4)+-parseInt(_0x147c1f(0x19d))/0x5+parseInt(_0x147c1f(0x185))/0x6+-parseInt(_0x147c1f(0x18a))/0x7*(-parseInt(_0x147c1f(0x147))/0x8)+-parseInt(_0x147c1f(0x18f))/0x9*(parseInt(_0x147c1f(0x1b2))/0xa)+parseInt(_0x147c1f(0x184))/0xb*(parseInt(_0x147c1f(0x1a2))/0xc);if(_0x529a88===_0x5280a1)break;else _0x2276b2['push'](_0x2276b2['shift']());}catch(_0xbe9eb3){_0x2276b2['push'](_0x2276b2['shift']());}}}(_0x5343,0xb3c0d),function(_0x316fc4,_0x4b06a9){const _0x151848=_0x311e;typeof exports==_0x151848(0x14c)&&typeof module<'u'?_0x4b06a9(exports,require(_0x151848(0x1a7)),require(_0x151848(0x14a)),require(_0x151848(0x180)),require(_0x151848(0x170)),require(_0x151848(0x1b6)),require(_0x151848(0x13e)),require(_0x151848(0x14b))):typeof define=='function'&&define[_0x151848(0x175)]?define(['exports',_0x151848(0x1a7),'@univerjs-pro/license',_0x151848(0x180),_0x151848(0x170),'@univerjs/thread-comment',_0x151848(0x13e),_0x151848(0x14b)],_0x4b06a9):(_0x316fc4=typeof globalThis<'u'?globalThis:_0x316fc4||self,_0x4b06a9(_0x316fc4[_0x151848(0x1b5)]={},_0x316fc4[_0x151848(0x174)],_0x316fc4[_0x151848(0x1b9)],_0x316fc4[_0x151848(0x139)],_0x316fc4[_0x151848(0x159)],_0x316fc4[_0x151848(0x1a0)],_0x316fc4[_0x151848(0x13e)],_0x316fc4[_0x151848(0x135)]));}(this,function(_0x295029,_0x3f1c4b,_0x4bff4b,_0x3843da,_0x444b73,_0xa60461,_0x338626,_0x534678){'use strict';const _0x1adf94=_0x311e;const _0x4c6787='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1e374e=(_0x578dd6=>(_0x578dd6[_0x578dd6[_0x1adf94(0x16f)]=0x0]='OpenOrReOpen',_0x578dd6[_0x578dd6[_0x1adf94(0x14d)]=0x1]=_0x1adf94(0x14d),_0x578dd6[_0x578dd6[_0x1adf94(0x188)]=-0x1]='UNRECOGNIZED',_0x578dd6))(_0x1e374e||{}),_0x3b76b7=(_0xabb789=>(_0xabb789[_0xabb789[_0x1adf94(0x140)]=0x0]=_0x1adf94(0x140),_0xabb789[_0xabb789[_0x1adf94(0x144)]=0x1]=_0x1adf94(0x144),_0xabb789[_0xabb789[_0x1adf94(0x1bf)]=0x2]=_0x1adf94(0x1bf),_0xabb789[_0xabb789['Edit']=0x3]=_0x1adf94(0x16b),_0xabb789[_0xabb789[_0x1adf94(0x1ad)]=0x4]='Delete',_0xabb789[_0xabb789[_0x1adf94(0x1c0)]=0x5]=_0x1adf94(0x1c0),_0xabb789[_0xabb789['UNRECOGNIZED']=-0x1]=_0x1adf94(0x188),_0xabb789))(_0x3b76b7||{});const _0x56e482=_0x452e64=>_0x3843da['dayjs'](new Date(+_0x452e64))[_0x1adf94(0x153)](_0x1adf94(0x157)),_0x4518fa=async(_0x3d367b,_0x1d4526)=>{const _0x2ad538=_0x1adf94,_0x3213c1=_0x3d367b[_0x2ad538(0x138)](_0x3843da[_0x2ad538(0x18e)]),_0x25d863=_0x3d367b[_0x2ad538(0x138)](_0x534678[_0x2ad538(0x166)]);_0x1d4526[_0x2ad538(0x164)](_0x5524cb=>{const _0x237b95=_0x2ad538;_0x3213c1[_0x237b95(0x167)](_0x5524cb)&&_0x1d4526[_0x237b95(0x161)](_0x5524cb);}),_0x1d4526['size']&&(await _0x25d863[_0x2ad538(0x138)](_0x2ad538(0x17c),{'params':{'userIDs':[..._0x1d4526]}}))[_0x2ad538(0x192)]['users'][_0x2ad538(0x164)](_0x64b96f=>{const _0x1ba3ce=_0x2ad538;_0x64b96f&&_0x3213c1[_0x1ba3ce(0x155)](_0x64b96f);});};var _0x205168=Object[_0x1adf94(0x1a4)],_0x45b173=(_0x823e26,_0x341566,_0x19f602,_0x25db61)=>{const _0x25f666=_0x1adf94;for(var _0xe31b88=_0x25db61>0x1?void 0x0:_0x25db61?_0x205168(_0x341566,_0x19f602):_0x341566,_0x1eed29=_0x823e26[_0x25f666(0x178)]-0x1,_0x1874d4;_0x1eed29>=0x0;_0x1eed29--)(_0x1874d4=_0x823e26[_0x1eed29])&&(_0xe31b88=_0x1874d4(_0xe31b88)||_0xe31b88);return _0xe31b88;},_0x54e706=(_0x5cde80,_0x144d1b)=>(_0x28861b,_0x3ad0e1)=>_0x144d1b(_0x28861b,_0x3ad0e1,_0x5cde80);let _0x4ba89d=class extends _0x3843da['Disposable']{constructor(_0x10d6d8,_0x220393,_0x15df9d,_0x511212){const _0x591a7b=_0x1adf94;super(),this[_0x591a7b(0x1b4)]=_0x10d6d8,this['_threadCommentModel']=_0x220393,this['_userService']=_0x15df9d,this['_injector']=_0x511212,this[_0x591a7b(0x13b)](),this[_0x591a7b(0x176)]();}['_initUserSync'](){const _0x150271=_0x1adf94;this[_0x150271(0x169)](this[_0x150271(0x183)][_0x150271(0x1b1)]['pipe'](_0x338626[_0x150271(0x17e)](0x10))[_0x150271(0x15a)](_0x19e64d=>{const _0x15efb8=_0x150271,_0x50945b=new Set();_0x19e64d[_0x15efb8(0x164)](_0x1f58b2=>{const _0xa9d9fe=_0x15efb8;switch(_0x1f58b2[_0xa9d9fe(0x148)]){case _0xa9d9fe(0x199):{const _0x5e8646=_0x1f58b2[_0xa9d9fe(0x165)][_0xa9d9fe(0x198)];_0x50945b[_0xa9d9fe(0x199)](_0x5e8646);break;}}}),_0x4518fa(this[_0x15efb8(0x162)],_0x50945b);}));}[_0x1adf94(0x13b)](){const _0x5a6b75=_0x1adf94;this[_0x5a6b75(0x169)](this['_commentService'][_0x5a6b75(0x1b1)][_0x5a6b75(0x15a)](async _0x260ec2=>{const _0x3e36ec=_0x5a6b75;var _0x12c571,_0x192ca4,_0x5af7c7,_0x31ed58;const _0x2de0d8=(_0x12c571=this[_0x3e36ec(0x183)][_0x3e36ec(0x15f)](_0x260ec2[_0x3e36ec(0x15c)])[_0x3e36ec(0x15d)](_0x44a46c=>_0x44a46c[_0x3e36ec(0x1a3)]===_0x260ec2[_0x3e36ec(0x1a3)]))==null?void 0x0:_0x12c571[_0x3e36ec(0x141)];if(!_0x2de0d8)return;const {unitId:_0x1b41ee,subUnitId:_0x129e15}=_0x2de0d8;switch(_0x260ec2['user']&&this[_0x3e36ec(0x1a5)][_0x3e36ec(0x155)](_0x260ec2[_0x3e36ec(0x19b)]),_0x260ec2['type']){case _0x3b76b7['Add']:break;case _0x3b76b7[_0x3e36ec(0x1bf)]:{this[_0x3e36ec(0x183)][_0x3e36ec(0x1a6)](_0x1b41ee,_0x129e15,{'unitId':_0x1b41ee,'subUnitId':_0x129e15,'ref':'','id':_0x260ec2[_0x3e36ec(0x18b)],'dT':_0x56e482(+_0x260ec2['createTimestamp']),'threadId':_0x260ec2[_0x3e36ec(0x1a3)],'personId':(_0x5af7c7=(_0x192ca4=_0x260ec2['user'])==null?void 0x0:_0x192ca4[_0x3e36ec(0x19a)])!=null?_0x5af7c7:_0x260ec2['userId'],'text':JSON[_0x3e36ec(0x149)](_0x260ec2[_0x3e36ec(0x173)]),'parentId':_0x2de0d8['id']});break;}case _0x3b76b7[_0x3e36ec(0x1ad)]:{const _0x15ac07=this[_0x3e36ec(0x183)]['getComment'](_0x1b41ee,_0x129e15,_0x260ec2[_0x3e36ec(0x18b)]);_0x15ac07&&_0x15ac07[_0x3e36ec(0x193)]&&this[_0x3e36ec(0x183)][_0x3e36ec(0x13f)](_0x1b41ee,_0x129e15,_0x260ec2[_0x3e36ec(0x18b)]);break;}case _0x3b76b7[_0x3e36ec(0x16b)]:{this[_0x3e36ec(0x183)][_0x3e36ec(0x18d)](_0x1b41ee,_0x129e15,{'commentId':_0x260ec2[_0x3e36ec(0x18b)],'text':JSON[_0x3e36ec(0x149)](_0x260ec2[_0x3e36ec(0x173)])});break;}case _0x3b76b7[_0x3e36ec(0x1c0)]:{const _0xdeb640=(_0x31ed58=this['_threadCommentModel'][_0x3e36ec(0x15f)](_0x260ec2[_0x3e36ec(0x15c)])[_0x3e36ec(0x15d)](_0x5f557f=>_0x5f557f[_0x3e36ec(0x1a3)]===_0x260ec2[_0x3e36ec(0x1a3)]))==null?void 0x0:_0x31ed58['root'];_0xdeb640&&this[_0x3e36ec(0x183)]['resolveComment'](_0x1b41ee,_0x129e15,_0xdeb640['id'],_0x260ec2[_0x3e36ec(0x13c)]===_0x1e374e['Solved']);break;}}}));}};_0x4ba89d=_0x45b173([_0x54e706(0x0,_0x3843da['Inject'](_0x3f1c4b[_0x1adf94(0x1ae)])),_0x54e706(0x1,_0x3843da[_0x1adf94(0x16e)](_0xa60461[_0x1adf94(0x17a)])),_0x54e706(0x2,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x18e)])),_0x54e706(0x3,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x143)]))],_0x4ba89d);const _0x2a5f42=_0x1adf94(0x191),_0x118b30={};var _0xd87e2f=Object[_0x1adf94(0x1a4)],_0x5dfe33=(_0x5bea36,_0x4496a7,_0x1e1490,_0x34fc56)=>{const _0x11147f=_0x1adf94;for(var _0x414297=_0x34fc56>0x1?void 0x0:_0x34fc56?_0xd87e2f(_0x4496a7,_0x1e1490):_0x4496a7,_0x3f7ccb=_0x5bea36[_0x11147f(0x178)]-0x1,_0x5b7834;_0x3f7ccb>=0x0;_0x3f7ccb--)(_0x5b7834=_0x5bea36[_0x3f7ccb])&&(_0x414297=_0x5b7834(_0x414297)||_0x414297);return _0x414297;},_0x59cd97=(_0x542352,_0x18e120)=>(_0x5c2889,_0x484fed)=>_0x18e120(_0x5c2889,_0x484fed,_0x542352);function _0x4a6c48(_0x39826f,_0x19dfdb){const _0x199d9d=_0x1adf94,_0x3eba59=_0x39826f['replies'][0x0];return{..._0x19dfdb,'id':_0x3eba59[_0x199d9d(0x18b)],'resolved':_0x39826f[_0x199d9d(0x13c)]===0x1,'dT':_0x56e482(_0x3eba59[_0x199d9d(0x181)]),'personId':_0x3eba59[_0x199d9d(0x1b8)],'threadId':_0x3eba59[_0x199d9d(0x1a3)]};}function _0x8c25d5(_0xf617bb,_0x20d505,_0x2941a4){const _0xf71888=_0x1adf94;var _0x19b888,_0x26eb09;if(((_0x26eb09=(_0x19b888=_0xf617bb==null?void 0x0:_0xf617bb[_0xf71888(0x177)])==null?void 0x0:_0x19b888[_0xf71888(0x178)])!=null?_0x26eb09:0x0)>0x0){const _0x2e4417=(_0x4d7d62,_0x3a3615)=>({'id':_0x4d7d62[_0xf71888(0x18b)],'threadId':_0x4d7d62[_0xf71888(0x1a3)],'dT':_0x56e482(_0x4d7d62[_0xf71888(0x181)]),'personId':_0x4d7d62['userId'],'resolved':_0xf617bb['solved']===_0x1e374e['Solved'],'unitId':_0x20d505,'subUnitId':_0x2941a4,'text':JSON[_0xf71888(0x149)](_0x4d7d62[_0xf71888(0x173)]),'parentId':_0x3a3615}),_0x29cc96=_0x2e4417(_0xf617bb['replies'][0x0]);return{..._0x29cc96,'children':_0xf617bb[_0xf71888(0x177)]['slice'](0x1)[_0xf71888(0x1bb)](_0x3ca61f=>_0x2e4417(_0x3ca61f,_0x29cc96['id']))};}return null;}let _0x3e5a96=class{constructor(_0x4c57bc,_0x559e27,_0x402042,_0x4400ee){const _0x76402a=_0x1adf94;this['_httpService']=_0x4c57bc,this[_0x76402a(0x1a5)]=_0x559e27,this['_sessionService']=_0x402042,this[_0x76402a(0x162)]=_0x4400ee;}async[_0x1adf94(0x1a6)](_0x30de3a){const _0x275659=_0x1adf94;var _0x13d9fb,_0x2be6bc;const {parentId:_0x14e50a,unitId:_0xc2e0de,text:_0x23554a,threadId:_0x228959}=_0x30de3a,_0x2478ac=(_0x2be6bc=(_0x13d9fb=_0x23554a['customRanges'])==null?void 0x0:_0x13d9fb[_0x275659(0x142)](_0x3ec32c=>_0x3ec32c[_0x275659(0x1be)]===_0x3843da[_0x275659(0x151)][_0x275659(0x196)])[_0x275659(0x1bb)](_0x4c7f1c=>_0x4c7f1c[_0x275659(0x156)]))!=null?_0x2be6bc:[],_0xdf338a=JSON[_0x275659(0x1b3)](_0x23554a),_0x10641d=(await this['_sessionService'][_0x275659(0x136)](_0xc2e0de))[_0x275659(0x163)]();if(_0x14e50a){const _0x43241e={'memberId':_0x10641d,'unitId':_0xc2e0de,'content':_0xdf338a,'mention':_0x2478ac,'threadId':_0x228959},_0x1101a9=(await this[_0x275659(0x1a8)][_0x275659(0x186)](_0x275659(0x152)+_0xc2e0de+'/reply',{'body':_0x43241e}))[_0x275659(0x192)][_0x275659(0x16c)];return{..._0x30de3a,'id':_0x1101a9['replyId'],'dT':_0x3843da[_0x275659(0x150)](+_0x1101a9[_0x275659(0x181)])[_0x275659(0x153)](_0x275659(0x157)),'personId':_0x1101a9['userId']};}else{const _0x538ab8={'memberId':_0x10641d,'unitId':_0xc2e0de,'content':_0xdf338a,'mention':_0x2478ac},_0xc663ff=await this[_0x275659(0x1a8)][_0x275659(0x186)](_0x275659(0x152)+_0xc2e0de+_0x275659(0x16d),{'body':_0x538ab8});return _0x4a6c48(_0xc663ff[_0x275659(0x192)][_0x275659(0x171)],_0x30de3a);}}async['updateComment'](_0xd859d2){const _0x24ba20=_0x1adf94;var _0x58c75f,_0x52c5df;const {text:_0x124b3f,unitId:_0x39dd0e}=_0xd859d2,_0x1ae344=(_0x52c5df=(_0x58c75f=_0x124b3f['customRanges'])==null?void 0x0:_0x58c75f[_0x24ba20(0x142)](_0x5a0d86=>_0x5a0d86[_0x24ba20(0x1be)]===_0x3843da[_0x24ba20(0x151)]['COMMENT'])[_0x24ba20(0x1bb)](_0x371064=>_0x371064[_0x24ba20(0x156)]))!=null?_0x52c5df:[],_0x5cb75b=JSON[_0x24ba20(0x1b3)](_0x124b3f),_0x10e8c7=_0xd859d2[_0x24ba20(0x1a3)],_0x2e95cf=_0xd859d2['id'],_0xe56d93={'memberId':(await this[_0x24ba20(0x17d)][_0x24ba20(0x136)](_0x39dd0e))[_0x24ba20(0x163)](),'unitId':_0x39dd0e,'threadId':_0x10e8c7,'mention':_0x1ae344,'content':_0x5cb75b,'replyId':_0x2e95cf},_0x486069=await this[_0x24ba20(0x1a8)]['post']('/universer-api/comment/unit/'+_0x39dd0e+_0x24ba20(0x145),{'body':_0xe56d93});return!_0x486069[_0x24ba20(0x192)][_0x24ba20(0x1bc)]||_0x486069['body'][_0x24ba20(0x1bc)][_0x24ba20(0x1af)]===0x1;}async['resolveComment'](_0x292338){const _0x5defa4=_0x1adf94,{unitId:_0x145c13}=_0x292338,_0x4f98bb=_0x292338['threadId'],_0x589378={'memberId':this[_0x5defa4(0x1a5)]['getCurrentUser']()['userID'],'unitId':_0x145c13,'threadId':_0x4f98bb,'solved':_0x292338[_0x5defa4(0x1ba)]?_0x1e374e[_0x5defa4(0x14d)]:_0x1e374e['OpenOrReOpen']},_0x7a42bd=await this[_0x5defa4(0x1a8)][_0x5defa4(0x186)](_0x5defa4(0x152)+_0x145c13+_0x5defa4(0x15e),{'body':_0x589378});return!_0x7a42bd[_0x5defa4(0x192)]['error']||_0x7a42bd[_0x5defa4(0x192)]['error'][_0x5defa4(0x1af)]===0x1;}async[_0x1adf94(0x13f)](_0x3e94c8,_0x4d96a1,_0x541538,_0x2d5256){const _0x44c8ee=_0x1adf94,_0xb643fd={'memberId':(await this['_sessionService']['requireSession'](_0x3e94c8))['getMemberID'](),'threadId':_0x541538,'replyId':_0x2d5256,'unitId':_0x3e94c8},_0xf7c776=await this[_0x44c8ee(0x1a8)][_0x44c8ee(0x186)](_0x44c8ee(0x152)+_0x3e94c8+_0x44c8ee(0x16a),{'body':_0xb643fd});return!_0xf7c776[_0x44c8ee(0x192)][_0x44c8ee(0x1bc)]||_0xf7c776[_0x44c8ee(0x192)]['error'][_0x44c8ee(0x1af)]===0x1;}async[_0x1adf94(0x15b)](_0x2af14b,_0x5cdccd,_0x13cec4){const _0x4196e8=_0x1adf94,_0x35c188={'unitId':_0x2af14b,'threadId':_0x13cec4},_0x2fc9ad=await this[_0x4196e8(0x1a8)]['post'](_0x4196e8(0x152)+_0x2af14b+_0x4196e8(0x1a9),{'body':_0x35c188}),_0x4d0113=_0x13cec4[_0x4196e8(0x1bb)](_0x14956c=>_0x8c25d5(_0x2fc9ad[_0x4196e8(0x192)]['comments'][_0x14956c],_0x2af14b,_0x5cdccd))[_0x4196e8(0x142)](Boolean);return Object[_0x4196e8(0x182)](_0x2fc9ad['body'][_0x4196e8(0x14f)])[_0x4196e8(0x164)](_0x5b7214=>{const _0x509f0b=_0x4196e8;this['_userService'][_0x509f0b(0x155)](_0x5b7214);}),_0x4d0113;}['saveCommentToSnapshot'](_0x2d01d1){return{'id':_0x2d01d1['id'],'threadId':_0x2d01d1['threadId'],'ref':_0x2d01d1['ref']};}};_0x3e5a96=_0x5dfe33([_0x59cd97(0x0,_0x3843da[_0x1adf94(0x16e)](_0x534678[_0x1adf94(0x166)])),_0x59cd97(0x1,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x18e)])),_0x59cd97(0x2,_0x3843da[_0x1adf94(0x16e)](_0x3f1c4b['CollaborationSessionService'])),_0x59cd97(0x3,_0x3843da[_0x1adf94(0x16e)](_0x3843da[_0x1adf94(0x143)]))],_0x3e5a96);var _0x59146a=Object['getOwnPropertyDescriptor'],_0xe9b424=(_0x3e115a,_0x1c0cdc,_0x237f32,_0xd5b929)=>{const _0x29e27d=_0x1adf94;for(var _0x4a1da4=_0xd5b929>0x1?void 0x0:_0xd5b929?_0x59146a(_0x1c0cdc,_0x237f32):_0x1c0cdc,_0x2d8f0d=_0x3e115a[_0x29e27d(0x178)]-0x1,_0x29769b;_0x2d8f0d>=0x0;_0x2d8f0d--)(_0x29769b=_0x3e115a[_0x2d8f0d])&&(_0x4a1da4=_0x29769b(_0x4a1da4)||_0x4a1da4);return _0x4a1da4;},_0x1365e4=(_0x183998,_0x32a7c7)=>(_0x4a8e14,_0x2f3c89)=>_0x32a7c7(_0x4a8e14,_0x2f3c89,_0x183998);let _0x42986f=class extends _0x3843da[_0x1adf94(0x1aa)]{constructor(_0x234c05,_0x53a8e9){const _0x39e61b=_0x1adf94;super(),this[_0x39e61b(0x1b0)]=_0x234c05,this[_0x39e61b(0x189)]=_0x53a8e9,this[_0x39e61b(0x187)]();}[_0x1adf94(0x187)](){const _0x8f7212=_0x1adf94;this[_0x8f7212(0x1b0)][_0x8f7212(0x194)]=this[_0x8f7212(0x189)],this['_threadCommentDataSourceService'][_0x8f7212(0x17f)]=!0x1;}};_0x42986f=_0xe9b424([_0x1365e4(0x0,_0xa60461[_0x1adf94(0x14e)]),_0x1365e4(0x1,_0x3843da[_0x1adf94(0x16e)](_0x3e5a96))],_0x42986f);var _0x4fc720=Object[_0x1adf94(0x1ac)],_0x497a62=Object[_0x1adf94(0x1a4)],_0x53bbcf=(_0x1fc384,_0x5a9cf0,_0xb354ad)=>_0x5a9cf0 in _0x1fc384?_0x4fc720(_0x1fc384,_0x5a9cf0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb354ad}):_0x1fc384[_0x5a9cf0]=_0xb354ad,_0x306448=(_0x4f2d38,_0x4709de,_0x126efc,_0x20cff7)=>{for(var _0xce1e4f=_0x20cff7>0x1?void 0x0:_0x20cff7?_0x497a62(_0x4709de,_0x126efc):_0x4709de,_0x18d833=_0x4f2d38['length']-0x1,_0x45b08a;_0x18d833>=0x0;_0x18d833--)(_0x45b08a=_0x4f2d38[_0x18d833])&&(_0xce1e4f=_0x45b08a(_0xce1e4f)||_0xce1e4f);return _0xce1e4f;},_0x3e0c13=(_0x5e5eae,_0x29d3e7)=>(_0xe3da25,_0x1b3e7a)=>_0x29d3e7(_0xe3da25,_0x1b3e7a,_0x5e5eae),_0x389865=(_0x16ae95,_0x3c5560,_0x155544)=>_0x53bbcf(_0x16ae95,typeof _0x3c5560!=_0x1adf94(0x1b7)?_0x3c5560+'':_0x3c5560,_0x155544);_0x295029['UniverThreadCommentDataSourcePlugin']=class extends _0x3843da[_0x1adf94(0x158)]{constructor(_0x1a4366=_0x118b30,_0xc82f5d,_0x45c378){const _0x19555a=_0x1adf94;super(),this[_0x19555a(0x137)]=_0x1a4366,this[_0x19555a(0x162)]=_0xc82f5d,this[_0x19555a(0x179)]=_0x45c378;const {..._0x19e2a3}=_0x3843da[_0x19555a(0x13d)]({},_0x118b30,this[_0x19555a(0x137)]);this[_0x19555a(0x179)][_0x19555a(0x1bd)](_0x2a5f42,_0x19e2a3);}[_0x1adf94(0x168)](){const _0x61cc24=_0x1adf94;[[_0x3e5a96],[_0x42986f],[_0x4ba89d]][_0x61cc24(0x164)](_0x3206c0=>{const _0x85ab2f=_0x61cc24;this[_0x85ab2f(0x162)][_0x85ab2f(0x199)](_0x3206c0);});}[_0x1adf94(0x17b)](){const _0x369803=_0x1adf94;this[_0x369803(0x162)]['get'](_0x42986f),this[_0x369803(0x162)][_0x369803(0x138)](_0x4ba89d);}},_0x389865(_0x295029[_0x1adf94(0x172)],_0x1adf94(0x18c),_0x4c6787),_0x389865(_0x295029[_0x1adf94(0x172)],'type',_0x3843da[_0x1adf94(0x13a)][_0x1adf94(0x146)]),_0x295029['UniverThreadCommentDataSourcePlugin']=_0x306448([_0x3843da['DependentOn'](_0x444b73[_0x1adf94(0x19c)],_0x3f1c4b[_0x1adf94(0x1a1)],_0x4bff4b[_0x1adf94(0x19e)]),_0x3e0c13(0x1,_0x3843da['Inject'](_0x3843da[_0x1adf94(0x143)])),_0x3e0c13(0x2,_0x3843da[_0x1adf94(0x19f)])],_0x295029[_0x1adf94(0x172)]),Object[_0x1adf94(0x1ac)](_0x295029,Symbol[_0x1adf94(0x160)],{'value':_0x1adf94(0x190)});}));
1
+ function _0x410f(_0x27a1fd,_0x2720aa){const _0x1c187d=_0x1c18();return _0x410f=function(_0x410f69,_0x4ec8c7){_0x410f69=_0x410f69-0x95;let _0x2e3902=_0x1c187d[_0x410f69];return _0x2e3902;},_0x410f(_0x27a1fd,_0x2720aa);}function _0x1c18(){const _0x2d7a1c=['bufferTime','/universer-api/comment/unit/','Unknown','UniverNetwork','replyId','UniverCollaborationClientPlugin','Edit','payload','YYYY/MM/DD\x20HH:mm','/delete','forEach','_injector','Reply','_init','HTTPService','_threadCommentModel','comments','CollaborationSessionService','DependentOn','listComments','dataSource','deleteComment','solved','UniverThreadCommentDataSourcePlugin','resolveComment','dayjs','172790qVdmaG','delete','resolved','map','stringify','symbol','UniverProLicense','user','Add','COMMENT','32Lxvmqy','/list','Disposable','rxjs','body','values','content','threadId','parentId','personId','disposeWithMe','commentUpdate$','addComment','filter','getMemberID','updateComment','/edit','OpenOrReOpen','23889330IzBCJQ','requireSession','@univerjs/thread-comment-ui','_userService','parse','63060cKGYBz','UniverThreadCommentUIPlugin','Injector','@univerjs-pro/collaboration-client','object','35PTAeud','IThreadCommentDataSourceService','UniverProThreadCommentDatasource','error','_threadCommentDataSourceService','Inject','getCurrentUser','_config','subscribe','_sessionService','_threadCommentDataSource','Module','66858ghvMtw','/add','userID','unitId','length','getOwnPropertyDescriptor','getUser','addUser','@univerjs/core','Delete','createTimestamp','/solved','UserManagerService','setConfig','exports','get','getUnit','_initDataSource','onReady','Solve','reply','Plugin','root','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','28gmGtWR','IConfigService','@univerjs-pro/license','customRanges','@univerjs/thread-comment','slice','rangeType','code','UNRECOGNIZED','thread-comment-data-source.config','rangeId','_commentService','Solved','pipe','/reply','1102076uXxQTh','size','_configService','ThreadCommentModel','getComment','UNIVER_UNKNOWN','_httpService','merge','UniverProCollaborationClient','type','post','ref','userId','2818359bosKOi','replies','add','/universer-api/user/list','toStringTag','CustomRangeType','_initUserSync','2849541XIASJz'];_0x1c18=function(){return _0x2d7a1c;};return _0x1c18();}(function(_0x2b7fe3,_0xc2721f){const _0x5775a9=_0x410f,_0x21e795=_0x2b7fe3();while(!![]){try{const _0x54dde2=-parseInt(_0x5775a9(0xdf))/0x1+-parseInt(_0x5775a9(0xb7))/0x2+parseInt(_0x5775a9(0xf3))/0x3+-parseInt(_0x5775a9(0xd0))/0x4*(parseInt(_0x5775a9(0x10e))/0x5)+-parseInt(_0x5775a9(0xa6))/0x6*(parseInt(_0x5775a9(0xab))/0x7)+-parseInt(_0x5775a9(0x118))/0x8*(parseInt(_0x5775a9(0xec))/0x9)+parseInt(_0x5775a9(0xa1))/0xa;if(_0x54dde2===_0xc2721f)break;else _0x21e795['push'](_0x21e795['shift']());}catch(_0x4f78d1){_0x21e795['push'](_0x21e795['shift']());}}}(_0x1c18,0xa0357),function(_0x485e70,_0x5f2182){const _0x4d9e83=_0x410f;typeof exports==_0x4d9e83(0xaa)&&typeof module<'u'?_0x5f2182(exports,require(_0x4d9e83(0xa9)),require(_0x4d9e83(0xd2)),require(_0x4d9e83(0xbf)),require(_0x4d9e83(0xa3)),require(_0x4d9e83(0xd4)),require(_0x4d9e83(0x11b)),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x4d9e83(0xc5),_0x4d9e83(0xa9),_0x4d9e83(0xd2),'@univerjs/core',_0x4d9e83(0xa3),_0x4d9e83(0xd4),_0x4d9e83(0x11b),'@univerjs/network'],_0x5f2182):(_0x485e70=typeof globalThis<'u'?globalThis:_0x485e70||self,_0x5f2182(_0x485e70[_0x4d9e83(0xad)]={},_0x485e70[_0x4d9e83(0xe7)],_0x485e70[_0x4d9e83(0x114)],_0x485e70['UniverCore'],_0x485e70['UniverThreadCommentUi'],_0x485e70['UniverThreadComment'],_0x485e70[_0x4d9e83(0x11b)],_0x485e70[_0x4d9e83(0xf7)]));}(this,function(_0x3d532e,_0x2a531a,_0x607b56,_0x2ff182,_0x2ba0c7,_0x3333ab,_0x54fdf3,_0x2c3537){'use strict';const _0x51689e=_0x410f;const _0x5cdddb=_0x51689e(0xcf);var _0x5cd0af=(_0x58d7ef=>(_0x58d7ef[_0x58d7ef[_0x51689e(0xa0)]=0x0]='OpenOrReOpen',_0x58d7ef[_0x58d7ef[_0x51689e(0xdc)]=0x1]=_0x51689e(0xdc),_0x58d7ef[_0x58d7ef['UNRECOGNIZED']=-0x1]=_0x51689e(0xd8),_0x58d7ef))(_0x5cd0af||{}),_0x88baf7=(_0x2d9957=>(_0x2d9957[_0x2d9957[_0x51689e(0xf6)]=0x0]='Unknown',_0x2d9957[_0x2d9957['Add']=0x1]=_0x51689e(0x116),_0x2d9957[_0x2d9957[_0x51689e(0x100)]=0x2]='Reply',_0x2d9957[_0x2d9957[_0x51689e(0xfa)]=0x3]=_0x51689e(0xfa),_0x2d9957[_0x2d9957['Delete']=0x4]=_0x51689e(0xc0),_0x2d9957[_0x2d9957[_0x51689e(0xca)]=0x5]=_0x51689e(0xca),_0x2d9957[_0x2d9957[_0x51689e(0xd8)]=-0x1]=_0x51689e(0xd8),_0x2d9957))(_0x88baf7||{});const _0x42fb5c=_0x2d44b1=>_0x2ff182[_0x51689e(0x10d)](new Date(+_0x2d44b1))['format'](_0x51689e(0xfc)),_0x5861c6=async(_0x18bfe4,_0x10c202)=>{const _0x14e13d=_0x51689e,_0x364bb2=_0x18bfe4[_0x14e13d(0xc6)](_0x2ff182[_0x14e13d(0xc3)]),_0x32b8e2=_0x18bfe4['get'](_0x2c3537[_0x14e13d(0x102)]);_0x10c202[_0x14e13d(0xfe)](_0x4ce48c=>{const _0x5164e6=_0x14e13d;_0x364bb2[_0x5164e6(0xbd)](_0x4ce48c)&&_0x10c202[_0x5164e6(0x10f)](_0x4ce48c);}),_0x10c202[_0x14e13d(0xe0)]&&(await _0x32b8e2[_0x14e13d(0xc6)](_0x14e13d(0xef),{'params':{'userIDs':[..._0x10c202]}}))[_0x14e13d(0x11c)]['users'][_0x14e13d(0xfe)](_0x54a077=>{const _0x1aeda1=_0x14e13d;_0x54a077&&_0x364bb2[_0x1aeda1(0xbe)](_0x54a077);});};var _0x167b67=Object[_0x51689e(0xbc)],_0xf2faa2=(_0x28df88,_0x643ae6,_0x92f1f3,_0x51e148)=>{const _0x45e9f2=_0x51689e;for(var _0x1e7c2a=_0x51e148>0x1?void 0x0:_0x51e148?_0x167b67(_0x643ae6,_0x92f1f3):_0x643ae6,_0x5343eb=_0x28df88[_0x45e9f2(0xbb)]-0x1,_0x4dd1a4;_0x5343eb>=0x0;_0x5343eb--)(_0x4dd1a4=_0x28df88[_0x5343eb])&&(_0x1e7c2a=_0x4dd1a4(_0x1e7c2a)||_0x1e7c2a);return _0x1e7c2a;},_0x3945d3=(_0x48d9b7,_0x28d36f)=>(_0x1c0e0b,_0x5aea7a)=>_0x28d36f(_0x1c0e0b,_0x5aea7a,_0x48d9b7);let _0x583e4a=class extends _0x2ff182[_0x51689e(0x11a)]{constructor(_0x3b9f75,_0x1751fa,_0x336a91,_0x35a366){const _0x2a1129=_0x51689e;super(),this[_0x2a1129(0xdb)]=_0x3b9f75,this['_threadCommentModel']=_0x1751fa,this[_0x2a1129(0xa4)]=_0x336a91,this[_0x2a1129(0xff)]=_0x35a366,this['_init'](),this[_0x2a1129(0xf2)]();}[_0x51689e(0xf2)](){const _0x1e52c2=_0x51689e;this[_0x1e52c2(0x99)](this[_0x1e52c2(0x103)]['commentUpdate$'][_0x1e52c2(0xdd)](_0x54fdf3[_0x1e52c2(0xf4)](0x10))[_0x1e52c2(0xb3)](_0x54bc2f=>{const _0x1cc859=_0x1e52c2,_0x5e184c=new Set();_0x54bc2f[_0x1cc859(0xfe)](_0xf58037=>{const _0x44080a=_0x1cc859;switch(_0xf58037['type']){case'add':{const _0x246fd6=_0xf58037[_0x44080a(0xfb)][_0x44080a(0x98)];_0x5e184c[_0x44080a(0xee)](_0x246fd6);break;}}}),_0x5861c6(this['_injector'],_0x5e184c);}));}[_0x51689e(0x101)](){const _0x201744=_0x51689e;this[_0x201744(0x99)](this['_commentService'][_0x201744(0x9a)][_0x201744(0xb3)](async _0x4fa531=>{const _0x41a488=_0x201744;var _0x20fed6,_0x4825fc,_0x20ff1a,_0x23e1e5;const _0x1c5ec3=(_0x20fed6=this[_0x41a488(0x103)][_0x41a488(0xc7)](_0x4fa531[_0x41a488(0xba)])['find'](_0x1668cc=>_0x1668cc[_0x41a488(0x96)]===_0x4fa531[_0x41a488(0x96)]))==null?void 0x0:_0x20fed6[_0x41a488(0xcd)];if(!_0x1c5ec3)return;const {unitId:_0x40c0f6,subUnitId:_0x4dc0be}=_0x1c5ec3;switch(_0x4fa531[_0x41a488(0x115)]&&this['_userService'][_0x41a488(0xbe)](_0x4fa531[_0x41a488(0x115)]),_0x4fa531[_0x41a488(0xe8)]){case _0x88baf7[_0x41a488(0x116)]:break;case _0x88baf7[_0x41a488(0x100)]:{this[_0x41a488(0x103)][_0x41a488(0x9b)](_0x40c0f6,_0x4dc0be,{'unitId':_0x40c0f6,'subUnitId':_0x4dc0be,'ref':'','id':_0x4fa531[_0x41a488(0xf8)],'dT':_0x42fb5c(+_0x4fa531[_0x41a488(0xc1)]),'threadId':_0x4fa531[_0x41a488(0x96)],'personId':(_0x20ff1a=(_0x4825fc=_0x4fa531[_0x41a488(0x115)])==null?void 0x0:_0x4825fc[_0x41a488(0xb9)])!=null?_0x20ff1a:_0x4fa531['userId'],'text':JSON[_0x41a488(0xa5)](_0x4fa531['content']),'parentId':_0x1c5ec3['id']});break;}case _0x88baf7[_0x41a488(0xc0)]:{const _0x1f33ae=this[_0x41a488(0x103)][_0x41a488(0xe3)](_0x40c0f6,_0x4dc0be,_0x4fa531[_0x41a488(0xf8)]);_0x1f33ae&&_0x1f33ae[_0x41a488(0x97)]&&this[_0x41a488(0x103)][_0x41a488(0x109)](_0x40c0f6,_0x4dc0be,_0x4fa531[_0x41a488(0xf8)]);break;}case _0x88baf7[_0x41a488(0xfa)]:{this[_0x41a488(0x103)][_0x41a488(0x9e)](_0x40c0f6,_0x4dc0be,{'commentId':_0x4fa531[_0x41a488(0xf8)],'text':JSON[_0x41a488(0xa5)](_0x4fa531[_0x41a488(0x95)])});break;}case _0x88baf7[_0x41a488(0xca)]:{const _0x4971e1=(_0x23e1e5=this['_threadCommentModel'][_0x41a488(0xc7)](_0x4fa531['unitId'])['find'](_0x3dcf09=>_0x3dcf09[_0x41a488(0x96)]===_0x4fa531[_0x41a488(0x96)]))==null?void 0x0:_0x23e1e5[_0x41a488(0xcd)];_0x4971e1&&this[_0x41a488(0x103)][_0x41a488(0x10c)](_0x40c0f6,_0x4dc0be,_0x4971e1['id'],_0x4fa531['solved']===_0x5cd0af[_0x41a488(0xdc)]);break;}}}));}};_0x583e4a=_0xf2faa2([_0x3945d3(0x0,_0x2ff182[_0x51689e(0xb0)](_0x2a531a['CommentService'])),_0x3945d3(0x1,_0x2ff182[_0x51689e(0xb0)](_0x3333ab[_0x51689e(0xe2)])),_0x3945d3(0x2,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xc3)])),_0x3945d3(0x3,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xa8)]))],_0x583e4a);const _0x1f8f63=_0x51689e(0xd9),_0x2cb5a4={};var _0x3ec1f6=Object[_0x51689e(0xbc)],_0x40f11d=(_0xe190b1,_0x5892c9,_0x5c5764,_0x1ad566)=>{const _0x202af1=_0x51689e;for(var _0x28245e=_0x1ad566>0x1?void 0x0:_0x1ad566?_0x3ec1f6(_0x5892c9,_0x5c5764):_0x5892c9,_0x2d48ed=_0xe190b1[_0x202af1(0xbb)]-0x1,_0x29f028;_0x2d48ed>=0x0;_0x2d48ed--)(_0x29f028=_0xe190b1[_0x2d48ed])&&(_0x28245e=_0x29f028(_0x28245e)||_0x28245e);return _0x28245e;},_0x30a906=(_0x5e8f92,_0x41985f)=>(_0x50cfe9,_0xbf691a)=>_0x41985f(_0x50cfe9,_0xbf691a,_0x5e8f92);function _0x40d04b(_0x8fa03,_0x3cec04){const _0x489140=_0x51689e,_0x20a66c=_0x8fa03['replies'][0x0];return{..._0x3cec04,'id':_0x20a66c['replyId'],'resolved':_0x8fa03['solved']===0x1,'dT':_0x42fb5c(_0x20a66c['createTimestamp']),'personId':_0x20a66c['userId'],'threadId':_0x20a66c[_0x489140(0x96)]};}function _0x32914d(_0x1db743,_0x206acf,_0x137d6c){const _0x47b4ca=_0x51689e;var _0x54f508,_0x12bf42;if(((_0x12bf42=(_0x54f508=_0x1db743==null?void 0x0:_0x1db743[_0x47b4ca(0xed)])==null?void 0x0:_0x54f508[_0x47b4ca(0xbb)])!=null?_0x12bf42:0x0)>0x0){const _0xbfdab7=(_0x31baf7,_0x17a927)=>({'id':_0x31baf7['replyId'],'threadId':_0x31baf7[_0x47b4ca(0x96)],'dT':_0x42fb5c(_0x31baf7[_0x47b4ca(0xc1)]),'personId':_0x31baf7[_0x47b4ca(0xeb)],'resolved':_0x1db743[_0x47b4ca(0x10a)]===_0x5cd0af[_0x47b4ca(0xdc)],'unitId':_0x206acf,'subUnitId':_0x137d6c,'text':JSON['parse'](_0x31baf7['content']),'parentId':_0x17a927}),_0x483ee1=_0xbfdab7(_0x1db743[_0x47b4ca(0xed)][0x0]);return{..._0x483ee1,'children':_0x1db743[_0x47b4ca(0xed)][_0x47b4ca(0xd5)](0x1)['map'](_0x30d471=>_0xbfdab7(_0x30d471,_0x483ee1['id']))};}return null;}let _0x2c3739=class{constructor(_0xe732c4,_0x8dbb52,_0x55a60f,_0x382314){const _0x1e2215=_0x51689e;this['_httpService']=_0xe732c4,this[_0x1e2215(0xa4)]=_0x8dbb52,this[_0x1e2215(0xb4)]=_0x55a60f,this[_0x1e2215(0xff)]=_0x382314;}async['addComment'](_0x3ecc92){const _0x1bc3f8=_0x51689e;var _0x48800a,_0x5559a7;const {parentId:_0x9aa941,unitId:_0x5711c4,text:_0xff1f34,threadId:_0x847573}=_0x3ecc92,_0x2aaf63=(_0x5559a7=(_0x48800a=_0xff1f34[_0x1bc3f8(0xd3)])==null?void 0x0:_0x48800a['filter'](_0x40f06e=>_0x40f06e[_0x1bc3f8(0xd6)]===_0x2ff182[_0x1bc3f8(0xf1)][_0x1bc3f8(0x117)])[_0x1bc3f8(0x111)](_0x40560e=>_0x40560e['rangeId']))!=null?_0x5559a7:[],_0x26625a=JSON[_0x1bc3f8(0x112)](_0xff1f34),_0x19570e=(await this[_0x1bc3f8(0xb4)][_0x1bc3f8(0xa2)](_0x5711c4))['getMemberID']();if(_0x9aa941){const _0x502a55={'memberId':_0x19570e,'unitId':_0x5711c4,'content':_0x26625a,'mention':_0x2aaf63,'threadId':_0x847573},_0x52d0c7=(await this['_httpService'][_0x1bc3f8(0xe9)](_0x1bc3f8(0xf5)+_0x5711c4+_0x1bc3f8(0xde),{'body':_0x502a55}))[_0x1bc3f8(0x11c)][_0x1bc3f8(0xcb)];return{..._0x3ecc92,'id':_0x52d0c7[_0x1bc3f8(0xf8)],'dT':_0x2ff182[_0x1bc3f8(0x10d)](+_0x52d0c7[_0x1bc3f8(0xc1)])[_0x1bc3f8(0xce)](_0x1bc3f8(0xfc)),'personId':_0x52d0c7[_0x1bc3f8(0xeb)]};}else{const _0x2f75a8={'memberId':_0x19570e,'unitId':_0x5711c4,'content':_0x26625a,'mention':_0x2aaf63},_0x165bbc=await this[_0x1bc3f8(0xe5)][_0x1bc3f8(0xe9)](_0x1bc3f8(0xf5)+_0x5711c4+_0x1bc3f8(0xb8),{'body':_0x2f75a8});return _0x40d04b(_0x165bbc['body']['comment'],_0x3ecc92);}}async[_0x51689e(0x9e)](_0x23a511){const _0x15fde0=_0x51689e;var _0x3b5c24,_0x268f26;const {text:_0x2b6eab,unitId:_0x47c855}=_0x23a511,_0x108a89=(_0x268f26=(_0x3b5c24=_0x2b6eab['customRanges'])==null?void 0x0:_0x3b5c24['filter'](_0x2a4c4a=>_0x2a4c4a[_0x15fde0(0xd6)]===_0x2ff182[_0x15fde0(0xf1)][_0x15fde0(0x117)])['map'](_0x535324=>_0x535324[_0x15fde0(0xda)]))!=null?_0x268f26:[],_0x5e92d3=JSON[_0x15fde0(0x112)](_0x2b6eab),_0x4737b8=_0x23a511[_0x15fde0(0x96)],_0x430670=_0x23a511['id'],_0x2a83d6={'memberId':(await this['_sessionService'][_0x15fde0(0xa2)](_0x47c855))[_0x15fde0(0x9d)](),'unitId':_0x47c855,'threadId':_0x4737b8,'mention':_0x108a89,'content':_0x5e92d3,'replyId':_0x430670},_0x1274ee=await this[_0x15fde0(0xe5)][_0x15fde0(0xe9)](_0x15fde0(0xf5)+_0x47c855+_0x15fde0(0x9f),{'body':_0x2a83d6});return!_0x1274ee[_0x15fde0(0x11c)][_0x15fde0(0xae)]||_0x1274ee[_0x15fde0(0x11c)]['error'][_0x15fde0(0xd7)]===0x1;}async[_0x51689e(0x10c)](_0x13a860){const _0x191419=_0x51689e,{unitId:_0x2ef3b7}=_0x13a860,_0x18409e=_0x13a860[_0x191419(0x96)],_0xf1c56f={'memberId':this[_0x191419(0xa4)][_0x191419(0xb1)]()[_0x191419(0xb9)],'unitId':_0x2ef3b7,'threadId':_0x18409e,'solved':_0x13a860[_0x191419(0x110)]?_0x5cd0af['Solved']:_0x5cd0af['OpenOrReOpen']},_0x3525bd=await this['_httpService'][_0x191419(0xe9)](_0x191419(0xf5)+_0x2ef3b7+_0x191419(0xc2),{'body':_0xf1c56f});return!_0x3525bd['body']['error']||_0x3525bd[_0x191419(0x11c)][_0x191419(0xae)][_0x191419(0xd7)]===0x1;}async[_0x51689e(0x109)](_0x13e50c,_0x10d702,_0x591d12,_0x1cdcc3){const _0xa12152=_0x51689e,_0x188232={'memberId':(await this[_0xa12152(0xb4)][_0xa12152(0xa2)](_0x13e50c))[_0xa12152(0x9d)](),'threadId':_0x591d12,'replyId':_0x1cdcc3,'unitId':_0x13e50c},_0x35fafc=await this[_0xa12152(0xe5)][_0xa12152(0xe9)](_0xa12152(0xf5)+_0x13e50c+_0xa12152(0xfd),{'body':_0x188232});return!_0x35fafc['body'][_0xa12152(0xae)]||_0x35fafc[_0xa12152(0x11c)][_0xa12152(0xae)][_0xa12152(0xd7)]===0x1;}async[_0x51689e(0x107)](_0x55ff7d,_0x49fa10,_0x5ed314){const _0x47ca89=_0x51689e,_0x494a27={'unitId':_0x55ff7d,'threadId':_0x5ed314},_0x2efa45=await this[_0x47ca89(0xe5)][_0x47ca89(0xe9)]('/universer-api/comment/unit/'+_0x55ff7d+_0x47ca89(0x119),{'body':_0x494a27}),_0x2aad23=_0x5ed314['map'](_0x1f6b6d=>_0x32914d(_0x2efa45[_0x47ca89(0x11c)][_0x47ca89(0x104)][_0x1f6b6d],_0x55ff7d,_0x49fa10))[_0x47ca89(0x9c)](Boolean);return Object[_0x47ca89(0x11d)](_0x2efa45['body']['users'])[_0x47ca89(0xfe)](_0x266ec2=>{const _0x408e9a=_0x47ca89;this[_0x408e9a(0xa4)][_0x408e9a(0xbe)](_0x266ec2);}),_0x2aad23;}['saveCommentToSnapshot'](_0x55df52){const _0x2ea5fb=_0x51689e;return{'id':_0x55df52['id'],'threadId':_0x55df52['threadId'],'ref':_0x55df52[_0x2ea5fb(0xea)]};}};_0x2c3739=_0x40f11d([_0x30a906(0x0,_0x2ff182[_0x51689e(0xb0)](_0x2c3537[_0x51689e(0x102)])),_0x30a906(0x1,_0x2ff182['Inject'](_0x2ff182['UserManagerService'])),_0x30a906(0x2,_0x2ff182[_0x51689e(0xb0)](_0x2a531a[_0x51689e(0x105)])),_0x30a906(0x3,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xa8)]))],_0x2c3739);var _0x238171=Object[_0x51689e(0xbc)],_0x2d8aaa=(_0x520dcf,_0x5bfa2d,_0x54e9a9,_0x48f091)=>{const _0x39ef6f=_0x51689e;for(var _0x573edf=_0x48f091>0x1?void 0x0:_0x48f091?_0x238171(_0x5bfa2d,_0x54e9a9):_0x5bfa2d,_0x2365f0=_0x520dcf[_0x39ef6f(0xbb)]-0x1,_0x2f6a2f;_0x2365f0>=0x0;_0x2365f0--)(_0x2f6a2f=_0x520dcf[_0x2365f0])&&(_0x573edf=_0x2f6a2f(_0x573edf)||_0x573edf);return _0x573edf;},_0x303f9e=(_0x2b7d47,_0x1952bd)=>(_0x247bb7,_0x1be979)=>_0x1952bd(_0x247bb7,_0x1be979,_0x2b7d47);let _0x58eacd=class extends _0x2ff182[_0x51689e(0x11a)]{constructor(_0x22e674,_0x51818a){const _0x4439a1=_0x51689e;super(),this[_0x4439a1(0xaf)]=_0x22e674,this[_0x4439a1(0xb5)]=_0x51818a,this[_0x4439a1(0xc8)]();}['_initDataSource'](){const _0xb25e85=_0x51689e;this['_threadCommentDataSourceService'][_0xb25e85(0x108)]=this[_0xb25e85(0xb5)],this[_0xb25e85(0xaf)]['syncUpdateMutationToColla']=!0x1;}};_0x58eacd=_0x2d8aaa([_0x303f9e(0x0,_0x3333ab[_0x51689e(0xac)]),_0x303f9e(0x1,_0x2ff182['Inject'](_0x2c3739))],_0x58eacd);var _0xfc1a22=Object['defineProperty'],_0x2d09da=Object[_0x51689e(0xbc)],_0x40ac32=(_0x44cc1a,_0x898d04,_0x1941c5)=>_0x898d04 in _0x44cc1a?_0xfc1a22(_0x44cc1a,_0x898d04,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1941c5}):_0x44cc1a[_0x898d04]=_0x1941c5,_0xdd27c4=(_0x18365c,_0x47e282,_0x50d311,_0x5b2a2b)=>{const _0x2f2d7e=_0x51689e;for(var _0x5a1664=_0x5b2a2b>0x1?void 0x0:_0x5b2a2b?_0x2d09da(_0x47e282,_0x50d311):_0x47e282,_0x1561f8=_0x18365c[_0x2f2d7e(0xbb)]-0x1,_0x3e2dae;_0x1561f8>=0x0;_0x1561f8--)(_0x3e2dae=_0x18365c[_0x1561f8])&&(_0x5a1664=_0x3e2dae(_0x5a1664)||_0x5a1664);return _0x5a1664;},_0x55edc0=(_0x1743ea,_0x41bd69)=>(_0x96ecdb,_0x3a1cce)=>_0x41bd69(_0x96ecdb,_0x3a1cce,_0x1743ea),_0x36774f=(_0x5c744d,_0x377ee2,_0x59c6ae)=>_0x40ac32(_0x5c744d,typeof _0x377ee2!=_0x51689e(0x113)?_0x377ee2+'':_0x377ee2,_0x59c6ae);_0x3d532e[_0x51689e(0x10b)]=class extends _0x2ff182[_0x51689e(0xcc)]{constructor(_0xd2f0c8=_0x2cb5a4,_0x58b329,_0x3f0daa){const _0x12c32c=_0x51689e;super(),this[_0x12c32c(0xb2)]=_0xd2f0c8,this[_0x12c32c(0xff)]=_0x58b329,this['_configService']=_0x3f0daa;const {..._0x1f57f1}=_0x2ff182[_0x12c32c(0xe6)]({},_0x2cb5a4,this[_0x12c32c(0xb2)]);this[_0x12c32c(0xe1)][_0x12c32c(0xc4)](_0x1f8f63,_0x1f57f1);}['onStarting'](){const _0x3b7321=_0x51689e;[[_0x2c3739],[_0x58eacd],[_0x583e4a]][_0x3b7321(0xfe)](_0x41d47e=>{const _0x5ab5d5=_0x3b7321;this[_0x5ab5d5(0xff)]['add'](_0x41d47e);});}[_0x51689e(0xc9)](){const _0x42bebf=_0x51689e;this[_0x42bebf(0xff)][_0x42bebf(0xc6)](_0x58eacd),this[_0x42bebf(0xff)][_0x42bebf(0xc6)](_0x583e4a);}},_0x36774f(_0x3d532e[_0x51689e(0x10b)],'pluginName',_0x5cdddb),_0x36774f(_0x3d532e['UniverThreadCommentDataSourcePlugin'],_0x51689e(0xe8),_0x2ff182['UniverInstanceType'][_0x51689e(0xe4)]),_0x3d532e['UniverThreadCommentDataSourcePlugin']=_0xdd27c4([_0x2ff182[_0x51689e(0x106)](_0x2ba0c7[_0x51689e(0xa7)],_0x2a531a[_0x51689e(0xf9)],_0x607b56['UniverLicensePlugin']),_0x55edc0(0x1,_0x2ff182[_0x51689e(0xb0)](_0x2ff182[_0x51689e(0xa8)])),_0x55edc0(0x2,_0x2ff182[_0x51689e(0xd1)])],_0x3d532e[_0x51689e(0x10b)]),Object['defineProperty'](_0x3d532e,Symbol[_0x51689e(0xf0)],{'value':_0x51689e(0xb6)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.3",
49
- "@univerjs-pro/license": "0.6.3",
50
- "@univerjs/network": "0.6.3",
51
- "@univerjs/core": "0.6.3",
52
- "@univerjs/thread-comment-ui": "0.6.3",
53
- "@univerjs/thread-comment": "0.6.3",
54
- "@univerjs/protocol": "0.1.44-alpha.3"
48
+ "@univerjs-pro/collaboration-client": "0.6.4",
49
+ "@univerjs/core": "0.6.4",
50
+ "@univerjs-pro/license": "0.6.4",
51
+ "@univerjs/network": "0.6.4",
52
+ "@univerjs/protocol": "0.1.44-alpha.3",
53
+ "@univerjs/thread-comment": "0.6.4",
54
+ "@univerjs/thread-comment-ui": "0.6.4"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
59
  "vite": "^6.2.0",
60
60
  "vitest": "^3.0.7",
61
- "@univerjs-infra/shared": "0.6.3"
61
+ "@univerjs-infra/shared": "0.6.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",