@univerjs-pro/thread-comment-datasource 0.10.14-nightly.202511070640 → 0.10.14-nightly.202511070939

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';function _0xeebf(){const _0x571f90=['parse','code','requireSession','symbol','_sessionService','_threadCommentModel','addUser','ThreadCommentModel','/list','/add','/universer-api/comment/unit/','commentUpdate$','UNIVER_UNKNOWN','Injector','_injector','saveCommentToSnapshot','createTimestamp','stringify','format','subscribe','CustomRangeType','dayjs','Solve','CommentService','replies','pluginName','delete','IThreadCommentDataSourceService','getMemberID','deleteComment','216egMSgq','disposeWithMe','UniverThreadCommentDataSourcePlugin','_config','Edit','getOwnPropertyDescriptor','Module','UNRECOGNIZED','UniverCollaborationClientPlugin','replyId','/edit','onReady','length','userId','users','getCurrentUser','COMMENT','comments','_initUserSync','_userService','_initDataSource','unitId','_httpService','UniverInstanceType','syncUpdateMutationToColla','userID','5qVZMjy','175740TtaFKF','Disposable','UniverThreadCommentUIPlugin','85041aZUAzz','error','merge','dataSource','toStringTag','threadId','4675180ZQwaUU','payload','Unknown','forEach','map','1619548qLFovl','Reply','_threadCommentDataSource','HTTPService','add','_configService','Delete','get','CollaborationSessionService','filter','378888cftDHQ','customRanges','_threadCommentDataSourceService','getComment','size','type','post','/universer-api/user/list','3UuvXuO','_commentService','defineProperty','549396Pzgyni','Add','user','content','_init','addComment','values','UserManagerService','Solved','comment','/solved','root','reply','find','solved','394564BIqpBh','parentId','Inject','updateComment','resolveComment','body','YYYY/MM/DD\x20HH:mm','rangeId','thread-comment-data-source.config','UniverLicensePlugin','listComments','/reply','OpenOrReOpen','rangeType','personId','resolved'];_0xeebf=function(){return _0x571f90;};return _0xeebf();}const _0x343277=_0x1e16;(function(_0x253fe7,_0x2830ac){const _0x50a770=_0x1e16,_0x33b538=_0x253fe7();while(!![]){try{const _0x5add5b=parseInt(_0x50a770(0x185))/0x1+parseInt(_0x50a770(0x1b7))/0x2*(parseInt(_0x50a770(0x1a5))/0x3)+parseInt(_0x50a770(0x19d))/0x4*(-parseInt(_0x50a770(0x184))/0x5)+-parseInt(_0x50a770(0x1a8))/0x6+-parseInt(_0x50a770(0x193))/0x7+-parseInt(_0x50a770(0x1e5))/0x8*(parseInt(_0x50a770(0x188))/0x9)+parseInt(_0x50a770(0x18e))/0xa;if(_0x5add5b===_0x2830ac)break;else _0x33b538['push'](_0x33b538['shift']());}catch(_0x49459e){_0x33b538['push'](_0x33b538['shift']());}}}(_0xeebf,0x28f55));Object[_0x343277(0x1a7)](exports,Symbol[_0x343277(0x18c)],{'value':_0x343277(0x1eb)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543549=>(_0x543549[_0x543549[_0x343277(0x1c3)]=0x0]=_0x343277(0x1c3),_0x543549[_0x543549['Solved']=0x1]=_0x343277(0x1b0),_0x543549[_0x543549[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x543549))(I||{}),v=(_0x1c095f=>(_0x1c095f[_0x1c095f[_0x343277(0x190)]=0x0]=_0x343277(0x190),_0x1c095f[_0x1c095f[_0x343277(0x1a9)]=0x1]=_0x343277(0x1a9),_0x1c095f[_0x1c095f[_0x343277(0x194)]=0x2]='Reply',_0x1c095f[_0x1c095f[_0x343277(0x1e9)]=0x3]=_0x343277(0x1e9),_0x1c095f[_0x1c095f[_0x343277(0x199)]=0x4]='Delete',_0x1c095f[_0x1c095f[_0x343277(0x1dd)]=0x5]=_0x343277(0x1dd),_0x1c095f[_0x1c095f[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x1c095f))(v||{});const f=_0x5cc7b8=>c[_0x343277(0x1dc)](new Date(+_0x5cc7b8))['format'](_0x343277(0x1bd)),R=async(_0x1e8863,_0x2f8f6e)=>{const _0x278a82=_0x343277,_0x2a201a=_0x1e8863['get'](c[_0x278a82(0x1af)]),_0x2dc413=_0x1e8863[_0x278a82(0x19a)](P[_0x278a82(0x196)]);_0x2f8f6e['forEach'](_0xdb69bb=>{const _0x4bf723=_0x278a82;_0x2a201a['getUser'](_0xdb69bb)&&_0x2f8f6e[_0x4bf723(0x1e1)](_0xdb69bb);}),_0x2f8f6e[_0x278a82(0x1a1)]&&(await _0x2dc413['get'](_0x278a82(0x1a4),{'params':{'userIDs':[..._0x2f8f6e]}}))[_0x278a82(0x1bc)][_0x278a82(0x178)][_0x278a82(0x191)](_0x5cd1eb=>{const _0x1b88ea=_0x278a82;_0x5cd1eb&&_0x2a201a[_0x1b88ea(0x1cd)](_0x5cd1eb);});};var $=Object[_0x343277(0x1ea)],E=(_0x3049d0,_0x3e2ad6,_0x14e003,_0x5c8bb9)=>{const _0x4085a6=_0x343277;for(var _0x592e34=_0x5c8bb9>0x1?void 0x0:_0x5c8bb9?$(_0x3e2ad6,_0x14e003):_0x3e2ad6,_0x3408af=_0x3049d0[_0x4085a6(0x176)]-0x1,_0x4eafdd;_0x3408af>=0x0;_0x3408af--)(_0x4eafdd=_0x3049d0[_0x3408af])&&(_0x592e34=_0x4eafdd(_0x592e34)||_0x592e34);return _0x592e34;},S=(_0x5034f3,_0x4d8d85)=>(_0x3f3739,_0x4b5992)=>_0x4d8d85(_0x3f3739,_0x4b5992,_0x5034f3);let _=class extends c[_0x343277(0x186)]{constructor(_0x28cc22,_0x45cc9e,_0x2a18ac,_0x276156){const _0x40c795=_0x343277;super(),this[_0x40c795(0x1a6)]=_0x28cc22,this[_0x40c795(0x1cc)]=_0x45cc9e,this[_0x40c795(0x17d)]=_0x2a18ac,this[_0x40c795(0x1d5)]=_0x276156,this[_0x40c795(0x1ac)](),this[_0x40c795(0x17c)]();}[_0x343277(0x17c)](){const _0x531d3e=_0x343277;this['disposeWithMe'](this['_threadCommentModel'][_0x531d3e(0x1d2)]['pipe'](j['bufferTime'](0x10))[_0x531d3e(0x1da)](_0x1f9fe8=>{const _0x2a1c47=_0x531d3e,_0x2f8933=new Set();_0x1f9fe8[_0x2a1c47(0x191)](_0x49c74d=>{const _0x4dd2a2=_0x2a1c47;switch(_0x49c74d['type']){case _0x4dd2a2(0x197):{const _0x337b09=_0x49c74d[_0x4dd2a2(0x18f)][_0x4dd2a2(0x1c5)];_0x2f8933[_0x4dd2a2(0x197)](_0x337b09);break;}}}),R(this[_0x2a1c47(0x1d5)],_0x2f8933);}));}[_0x343277(0x1ac)](){const _0x418cf2=_0x343277;this[_0x418cf2(0x1e6)](this[_0x418cf2(0x1a6)]['commentUpdate$']['subscribe'](async _0x2607ab=>{const _0x3b8392=_0x418cf2;var _0x35b83e,_0x58df92,_0x33ce5f,_0x22421c;const _0x2595bf=(_0x35b83e=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab[_0x3b8392(0x17f)])[_0x3b8392(0x1b5)](_0xf2cd3a=>_0xf2cd3a[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x35b83e[_0x3b8392(0x1b3)];if(!_0x2595bf)return;const {unitId:_0x3cb9f5,subUnitId:_0x5f06ba}=_0x2595bf;switch(_0x2607ab[_0x3b8392(0x1aa)]&&this[_0x3b8392(0x17d)][_0x3b8392(0x1cd)](_0x2607ab['user']),_0x2607ab['type']){case v['Add']:break;case v['Reply']:{this[_0x3b8392(0x1cc)]['addComment'](_0x3cb9f5,_0x5f06ba,{'unitId':_0x3cb9f5,'subUnitId':_0x5f06ba,'ref':'','id':_0x2607ab[_0x3b8392(0x1ee)],'dT':f(+_0x2607ab['createTimestamp']),'threadId':_0x2607ab['threadId'],'personId':(_0x33ce5f=(_0x58df92=_0x2607ab['user'])==null?void 0x0:_0x58df92['userID'])!=null?_0x33ce5f:_0x2607ab[_0x3b8392(0x177)],'text':JSON['parse'](_0x2607ab['content']),'parentId':_0x2595bf['id']});break;}case v[_0x3b8392(0x199)]:{const _0x577316=this[_0x3b8392(0x1cc)][_0x3b8392(0x1a0)](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);_0x577316&&_0x577316[_0x3b8392(0x1b8)]&&this[_0x3b8392(0x1cc)]['deleteComment'](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);break;}case v[_0x3b8392(0x1e9)]:{this[_0x3b8392(0x1cc)]['updateComment'](_0x3cb9f5,_0x5f06ba,{'commentId':_0x2607ab['replyId'],'text':JSON[_0x3b8392(0x1c7)](_0x2607ab[_0x3b8392(0x1ab)])});break;}case v['Solve']:{const _0x7847de=(_0x22421c=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab['unitId'])[_0x3b8392(0x1b5)](_0x4cf7ec=>_0x4cf7ec[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x22421c[_0x3b8392(0x1b3)];_0x7847de&&this[_0x3b8392(0x1cc)][_0x3b8392(0x1bb)](_0x3cb9f5,_0x5f06ba,_0x7847de['id'],_0x2607ab[_0x3b8392(0x1b6)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x343277(0x1b9)](b[_0x343277(0x1de)])),S(0x1,c[_0x343277(0x1b9)](M[_0x343277(0x1ce)])),S(0x2,c['Inject'](c[_0x343277(0x1af)])),S(0x3,c[_0x343277(0x1b9)](c['Injector']))],_);const q=_0x343277(0x1bf),D={};var A=Object[_0x343277(0x1ea)],x=(_0x544170,_0x2231f4,_0x3340af,_0x938d7)=>{const _0x114875=_0x343277;for(var _0x2fc965=_0x938d7>0x1?void 0x0:_0x938d7?A(_0x2231f4,_0x3340af):_0x2231f4,_0x5477d4=_0x544170[_0x114875(0x176)]-0x1,_0x2c63fa;_0x5477d4>=0x0;_0x5477d4--)(_0x2c63fa=_0x544170[_0x5477d4])&&(_0x2fc965=_0x2c63fa(_0x2fc965)||_0x2fc965);return _0x2fc965;},C=(_0x728044,_0x49f86d)=>(_0x306ab8,_0x233d6b)=>_0x49f86d(_0x306ab8,_0x233d6b,_0x728044);function Y(_0x2e9565,_0x33f623){const _0x34258f=_0x343277,_0x39b164=_0x2e9565['replies'][0x0];return{..._0x33f623,'id':_0x39b164['replyId'],'resolved':_0x2e9565[_0x34258f(0x1b6)]===0x1,'dT':f(_0x39b164[_0x34258f(0x1d7)]),'personId':_0x39b164['userId'],'threadId':_0x39b164['threadId']};}function G(_0x4fb167,_0x53f968,_0x160d5b){const _0x4f74b6=_0x343277;var _0x3ccd20,_0x241c12;if(((_0x241c12=(_0x3ccd20=_0x4fb167==null?void 0x0:_0x4fb167[_0x4f74b6(0x1df)])==null?void 0x0:_0x3ccd20[_0x4f74b6(0x176)])!=null?_0x241c12:0x0)>0x0){const _0x31dae8=(_0x2db5a3,_0x2300a3)=>({'id':_0x2db5a3[_0x4f74b6(0x1ee)],'threadId':_0x2db5a3[_0x4f74b6(0x18d)],'dT':f(_0x2db5a3['createTimestamp']),'personId':_0x2db5a3[_0x4f74b6(0x177)],'resolved':_0x4fb167[_0x4f74b6(0x1b6)]===I[_0x4f74b6(0x1b0)],'unitId':_0x53f968,'subUnitId':_0x160d5b,'text':JSON[_0x4f74b6(0x1c7)](_0x2db5a3[_0x4f74b6(0x1ab)]),'parentId':_0x2300a3}),_0x41ada5=_0x31dae8(_0x4fb167['replies'][0x0]);return{..._0x41ada5,'children':_0x4fb167[_0x4f74b6(0x1df)]['slice'](0x1)[_0x4f74b6(0x192)](_0x1ea079=>_0x31dae8(_0x1ea079,_0x41ada5['id']))};}return null;}let p=class{constructor(_0x103b13,_0x5a34e6,_0x21be92){const _0x712b1d=_0x343277;this[_0x712b1d(0x180)]=_0x103b13,this[_0x712b1d(0x17d)]=_0x5a34e6,this['_sessionService']=_0x21be92;}async[_0x343277(0x1ad)](_0x550185){const _0x3fa8e0=_0x343277;var _0xc6a894,_0x5bf9cb;const {parentId:_0x1fe7b3,unitId:_0x213a19,text:_0x2ce286,threadId:_0x3bbb97}=_0x550185,_0x185b6f=(_0x5bf9cb=(_0xc6a894=_0x2ce286[_0x3fa8e0(0x19e)])==null?void 0x0:_0xc6a894[_0x3fa8e0(0x19c)](_0x39a279=>_0x39a279['rangeType']===c['CustomRangeType'][_0x3fa8e0(0x17a)])['map'](_0x5cd10c=>_0x5cd10c[_0x3fa8e0(0x1be)]))!=null?_0x5bf9cb:[],_0x4cd6b5=JSON[_0x3fa8e0(0x1d8)](_0x2ce286),_0x20fab7=(await this[_0x3fa8e0(0x1cb)][_0x3fa8e0(0x1c9)](_0x213a19))[_0x3fa8e0(0x1e3)]();if(_0x1fe7b3){const _0x459c0d={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f,'threadId':_0x3bbb97},_0x207ff2=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1c2),{'body':_0x459c0d}))['body'][_0x3fa8e0(0x1b4)];return{..._0x550185,'id':_0x207ff2[_0x3fa8e0(0x1ee)],'dT':c[_0x3fa8e0(0x1dc)](+_0x207ff2[_0x3fa8e0(0x1d7)])[_0x3fa8e0(0x1d9)](_0x3fa8e0(0x1bd)),'personId':_0x207ff2[_0x3fa8e0(0x177)]};}else{const _0x1dbbfd={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f},_0x267f6e=await this[_0x3fa8e0(0x180)][_0x3fa8e0(0x1a3)]('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1d0),{'body':_0x1dbbfd});return Y(_0x267f6e[_0x3fa8e0(0x1bc)][_0x3fa8e0(0x1b1)],_0x550185);}}async[_0x343277(0x1ba)](_0x3c1a2d){const _0x4cf655=_0x343277;var _0x257cfa,_0x4f4e49;const {text:_0x39c906,unitId:_0x8d856d}=_0x3c1a2d,_0xb395d9=(_0x4f4e49=(_0x257cfa=_0x39c906[_0x4cf655(0x19e)])==null?void 0x0:_0x257cfa[_0x4cf655(0x19c)](_0x58c8a0=>_0x58c8a0[_0x4cf655(0x1c4)]===c[_0x4cf655(0x1db)]['COMMENT'])[_0x4cf655(0x192)](_0x8974ac=>_0x8974ac[_0x4cf655(0x1be)]))!=null?_0x4f4e49:[],_0xaea036=JSON[_0x4cf655(0x1d8)](_0x39c906),_0x168574=_0x3c1a2d[_0x4cf655(0x18d)],_0x51d246=_0x3c1a2d['id'],_0x20134b={'memberId':(await this[_0x4cf655(0x1cb)][_0x4cf655(0x1c9)](_0x8d856d))[_0x4cf655(0x1e3)](),'unitId':_0x8d856d,'threadId':_0x168574,'mention':_0xb395d9,'content':_0xaea036,'replyId':_0x51d246},_0x513fcf=await this[_0x4cf655(0x180)][_0x4cf655(0x1a3)](_0x4cf655(0x1d1)+_0x8d856d+_0x4cf655(0x1ef),{'body':_0x20134b});return!_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)]||_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)][_0x4cf655(0x1c8)]===0x1;}async[_0x343277(0x1bb)](_0x2483f9){const _0x4c0a50=_0x343277,{unitId:_0x14b36e}=_0x2483f9,_0x3f1e1d=_0x2483f9[_0x4c0a50(0x18d)],_0x28b2d2={'memberId':this[_0x4c0a50(0x17d)][_0x4c0a50(0x179)]()[_0x4c0a50(0x183)],'unitId':_0x14b36e,'threadId':_0x3f1e1d,'solved':_0x2483f9[_0x4c0a50(0x1c6)]?I[_0x4c0a50(0x1b0)]:I[_0x4c0a50(0x1c3)]},_0xaf4aad=await this[_0x4c0a50(0x180)][_0x4c0a50(0x1a3)](_0x4c0a50(0x1d1)+_0x14b36e+_0x4c0a50(0x1b2),{'body':_0x28b2d2});return!_0xaf4aad['body']['error']||_0xaf4aad[_0x4c0a50(0x1bc)][_0x4c0a50(0x189)][_0x4c0a50(0x1c8)]===0x1;}async[_0x343277(0x1e4)](_0x57bd4b,_0x22b8bb,_0x4433ec,_0x25b20e){const _0x3cc841=_0x343277,_0x488665={'memberId':(await this[_0x3cc841(0x1cb)]['requireSession'](_0x57bd4b))['getMemberID'](),'threadId':_0x4433ec,'replyId':_0x25b20e,'unitId':_0x57bd4b},_0x3e94f1=await this[_0x3cc841(0x180)][_0x3cc841(0x1a3)](_0x3cc841(0x1d1)+_0x57bd4b+'/delete',{'body':_0x488665});return!_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)]||_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)][_0x3cc841(0x1c8)]===0x1;}async[_0x343277(0x1c1)](_0x44c0fa,_0x21e513,_0x153997){const _0x316190=_0x343277,_0x5079d3={'unitId':_0x44c0fa,'threadId':_0x153997},_0x1b8594=await this[_0x316190(0x180)][_0x316190(0x1a3)]('/universer-api/comment/unit/'+_0x44c0fa+_0x316190(0x1cf),{'body':_0x5079d3}),_0x47f2ea=_0x153997['map'](_0x2b60c0=>G(_0x1b8594[_0x316190(0x1bc)][_0x316190(0x17b)][_0x2b60c0],_0x44c0fa,_0x21e513))[_0x316190(0x19c)](Boolean);return Object[_0x316190(0x1ae)](_0x1b8594[_0x316190(0x1bc)][_0x316190(0x178)])[_0x316190(0x191)](_0x697836=>{const _0xfa3978=_0x316190;this[_0xfa3978(0x17d)][_0xfa3978(0x1cd)](_0x697836);}),_0x47f2ea;}[_0x343277(0x1d6)](_0x1b4ec9){const _0x437636=_0x343277;return{'id':_0x1b4ec9['id'],'threadId':_0x1b4ec9[_0x437636(0x18d)],'ref':_0x1b4ec9['ref']};}};p=x([C(0x0,c[_0x343277(0x1b9)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x343277(0x1af)])),C(0x2,c[_0x343277(0x1b9)](b[_0x343277(0x19b)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1cef70,_0x2216fc,_0x5be4c6,_0x378d7f)=>{const _0x4e6573=_0x343277;for(var _0x4b8a97=_0x378d7f>0x1?void 0x0:_0x378d7f?H(_0x2216fc,_0x5be4c6):_0x2216fc,_0x5f56fc=_0x1cef70[_0x4e6573(0x176)]-0x1,_0x39aa2e;_0x5f56fc>=0x0;_0x5f56fc--)(_0x39aa2e=_0x1cef70[_0x5f56fc])&&(_0x4b8a97=_0x39aa2e(_0x4b8a97)||_0x4b8a97);return _0x4b8a97;},y=(_0x187aec,_0x112785)=>(_0x1f4bbf,_0x996a4d)=>_0x112785(_0x1f4bbf,_0x996a4d,_0x187aec);let g=class extends c[_0x343277(0x186)]{constructor(_0xff1d42,_0x2819e9){const _0x830f97=_0x343277;super(),this['_threadCommentDataSourceService']=_0xff1d42,this[_0x830f97(0x195)]=_0x2819e9,this[_0x830f97(0x17e)]();}['_initDataSource'](){const _0x3520fc=_0x343277;this['_threadCommentDataSourceService'][_0x3520fc(0x18b)]=this['_threadCommentDataSource'],this[_0x3520fc(0x19f)][_0x3520fc(0x182)]=!0x1;}};function _0x1e16(_0x3701c3,_0x51a83b){const _0xeebf9c=_0xeebf();return _0x1e16=function(_0x1e1638,_0x30674b){_0x1e1638=_0x1e1638-0x175;let _0x1831fb=_0xeebf9c[_0x1e1638];return _0x1831fb;},_0x1e16(_0x3701c3,_0x51a83b);}g=J([y(0x0,M[_0x343277(0x1e2)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x343277(0x1a7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x4fbbb0,_0x14deaa,_0x14a2c7)=>_0x14deaa in _0x4fbbb0?F(_0x4fbbb0,_0x14deaa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a2c7}):_0x4fbbb0[_0x14deaa]=_0x14a2c7,W=(_0x10c2fa,_0x41444b,_0x3be036,_0x3b5be8)=>{const _0x12192e=_0x343277;for(var _0x3db597=_0x3b5be8>0x1?void 0x0:_0x3b5be8?L(_0x41444b,_0x3be036):_0x41444b,_0x55f01f=_0x10c2fa[_0x12192e(0x176)]-0x1,_0x349c68;_0x55f01f>=0x0;_0x55f01f--)(_0x349c68=_0x10c2fa[_0x55f01f])&&(_0x3db597=_0x349c68(_0x3db597)||_0x3db597);return _0x3db597;},O=(_0x54dcac,_0x5a0a87)=>(_0x204c55,_0xf363ba)=>_0x5a0a87(_0x204c55,_0xf363ba,_0x54dcac),N=(_0x252faf,_0x18d33f,_0x4b8c23)=>Z(_0x252faf,typeof _0x18d33f!=_0x343277(0x1ca)?_0x18d33f+'':_0x18d33f,_0x4b8c23);exports[_0x343277(0x1e7)]=class extends c['Plugin']{constructor(_0x5a2fcd=D,_0x203d03,_0xa81f46){const _0x53f8e=_0x343277;super(),this[_0x53f8e(0x1e8)]=_0x5a2fcd,this[_0x53f8e(0x1d5)]=_0x203d03,this[_0x53f8e(0x198)]=_0xa81f46;const {..._0xd3836d}=c[_0x53f8e(0x18a)]({},D,this['_config']);this[_0x53f8e(0x198)]['setConfig'](q,_0xd3836d);}['onStarting'](){const _0x2ef9d6=_0x343277;[[p],[g],[_]][_0x2ef9d6(0x191)](_0x8db7a=>{const _0x569310=_0x2ef9d6;this[_0x569310(0x1d5)][_0x569310(0x197)](_0x8db7a);});}[_0x343277(0x175)](){const _0x2bc8b4=_0x343277;this['_injector'][_0x2bc8b4(0x19a)](g),this[_0x2bc8b4(0x1d5)][_0x2bc8b4(0x19a)](_);}},N(exports[_0x343277(0x1e7)],_0x343277(0x1e0),U),N(exports[_0x343277(0x1e7)],_0x343277(0x1a2),c[_0x343277(0x181)][_0x343277(0x1d3)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x343277(0x187)],b[_0x343277(0x1ed)],T[_0x343277(0x1c0)]),O(0x1,c[_0x343277(0x1b9)](c[_0x343277(0x1d4)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';function _0x51fb(){const _0x472b2c=['map','3484977NSmBPh','length','Edit','personId','getUnit','Solve','338031MOWLAr','_initUserSync','getMemberID','merge','_configService','format','bufferTime','_initDataSource','_injector','comments','UniverInstanceType','getComment','UserManagerService','toStringTag','content','parse','getOwnPropertyDescriptor','userId','_threadCommentDataSourceService','pluginName','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','add','userID','getUser','resolved','requireSession','/delete','IConfigService','Injector','comment','get','stringify','24JqkAdN','_config','delete','rangeId','_commentService','_init','COMMENT','Module','find','28416piHiCm','body','OpenOrReOpen','Inject','/universer-api/comment/unit/','rangeType','values','YYYY/MM/DD\x20HH:mm','_threadCommentModel','updateComment','replyId','slice','17945838cgWaRU','deleteComment','_sessionService','commentUpdate$','dataSource','Plugin','createTimestamp','addComment','filter','forEach','315692NiWCnK','post','UniverThreadCommentUIPlugin','ThreadCommentModel','Delete','UNRECOGNIZED','resolveComment','size','onReady','_threadCommentDataSource','type','subscribe','Unknown','/universer-api/user/list','Add','customRanges','error','UNIVER_UNKNOWN','Reply','Solved','payload','solved','dayjs','thread-comment-data-source.config','1944900hpjBcp','677665abJBrQ','replies','Disposable','syncUpdateMutationToColla','addUser','UniverCollaborationClientPlugin','CommentService','threadId','user','10jUThEe','disposeWithMe','HTTPService','code','_httpService','/list','pipe','symbol','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','DependentOn','504PFBdeh','/reply','setConfig','root','_userService'];_0x51fb=function(){return _0x472b2c;};return _0x51fb();}const _0x54b0a0=_0x7cf5;(function(_0x495962,_0xb4d0c8){const _0x5f118e=_0x7cf5,_0x134e80=_0x495962();while(!![]){try{const _0x14bda2=parseInt(_0x5f118e(0x139))/0x1+parseInt(_0x5f118e(0x192))/0x2+parseInt(_0x5f118e(0x133))/0x3+-parseInt(_0x5f118e(0x17a))/0x4+-parseInt(_0x5f118e(0x193))/0x5*(-parseInt(_0x5f118e(0x15b))/0x6)+-parseInt(_0x5f118e(0x1a7))/0x7*(parseInt(_0x5f118e(0x164))/0x8)+parseInt(_0x5f118e(0x170))/0x9*(-parseInt(_0x5f118e(0x19c))/0xa);if(_0x14bda2===_0xb4d0c8)break;else _0x134e80['push'](_0x134e80['shift']());}catch(_0x10268c){_0x134e80['push'](_0x134e80['shift']());}}}(_0x51fb,0xa7637));Object['defineProperty'](exports,Symbol[_0x54b0a0(0x146)],{'value':_0x54b0a0(0x162)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x54b0a0(0x14e);var I=(_0x55881b=>(_0x55881b[_0x55881b[_0x54b0a0(0x166)]=0x0]=_0x54b0a0(0x166),_0x55881b[_0x55881b[_0x54b0a0(0x18d)]=0x1]=_0x54b0a0(0x18d),_0x55881b[_0x55881b['UNRECOGNIZED']=-0x1]=_0x54b0a0(0x17f),_0x55881b))(I||{}),v=(_0x3e01c5=>(_0x3e01c5[_0x3e01c5[_0x54b0a0(0x186)]=0x0]=_0x54b0a0(0x186),_0x3e01c5[_0x3e01c5[_0x54b0a0(0x188)]=0x1]=_0x54b0a0(0x188),_0x3e01c5[_0x3e01c5[_0x54b0a0(0x18c)]=0x2]='Reply',_0x3e01c5[_0x3e01c5[_0x54b0a0(0x135)]=0x3]=_0x54b0a0(0x135),_0x3e01c5[_0x3e01c5[_0x54b0a0(0x17e)]=0x4]=_0x54b0a0(0x17e),_0x3e01c5[_0x3e01c5[_0x54b0a0(0x138)]=0x5]='Solve',_0x3e01c5[_0x3e01c5[_0x54b0a0(0x17f)]=-0x1]=_0x54b0a0(0x17f),_0x3e01c5))(v||{});const f=_0x40e3ff=>c['dayjs'](new Date(+_0x40e3ff))[_0x54b0a0(0x13e)](_0x54b0a0(0x16b)),R=async(_0x20bf93,_0x4550e5)=>{const _0x1a52c6=_0x54b0a0,_0xeacf40=_0x20bf93[_0x1a52c6(0x159)](c['UserManagerService']),_0x4edcd4=_0x20bf93[_0x1a52c6(0x159)](P[_0x1a52c6(0x19e)]);_0x4550e5[_0x1a52c6(0x179)](_0x21f68b=>{const _0x29c10c=_0x1a52c6;_0xeacf40[_0x29c10c(0x152)](_0x21f68b)&&_0x4550e5[_0x29c10c(0x15d)](_0x21f68b);}),_0x4550e5[_0x1a52c6(0x181)]&&(await _0x4edcd4[_0x1a52c6(0x159)](_0x1a52c6(0x187),{'params':{'userIDs':[..._0x4550e5]}}))['body']['users'][_0x1a52c6(0x179)](_0x27b8d6=>{_0x27b8d6&&_0xeacf40['addUser'](_0x27b8d6);});};var $=Object[_0x54b0a0(0x149)],E=(_0x403495,_0x402b73,_0x11ffb2,_0x141ce6)=>{const _0x405470=_0x54b0a0;for(var _0xcf8867=_0x141ce6>0x1?void 0x0:_0x141ce6?$(_0x402b73,_0x11ffb2):_0x402b73,_0x2a002b=_0x403495[_0x405470(0x134)]-0x1,_0x5f0320;_0x2a002b>=0x0;_0x2a002b--)(_0x5f0320=_0x403495[_0x2a002b])&&(_0xcf8867=_0x5f0320(_0xcf8867)||_0xcf8867);return _0xcf8867;},S=(_0x595bea,_0x1ce0db)=>(_0x494917,_0x310cd4)=>_0x1ce0db(_0x494917,_0x310cd4,_0x595bea);let _=class extends c[_0x54b0a0(0x195)]{constructor(_0x219087,_0x243637,_0x521c1c,_0x44ed30){const _0x44e06e=_0x54b0a0;super(),this[_0x44e06e(0x15f)]=_0x219087,this[_0x44e06e(0x16c)]=_0x243637,this[_0x44e06e(0x131)]=_0x521c1c,this[_0x44e06e(0x141)]=_0x44ed30,this[_0x44e06e(0x160)](),this[_0x44e06e(0x13a)]();}[_0x54b0a0(0x13a)](){const _0x3f6146=_0x54b0a0;this[_0x3f6146(0x19d)](this[_0x3f6146(0x16c)][_0x3f6146(0x173)][_0x3f6146(0x1a2)](j[_0x3f6146(0x13f)](0x10))['subscribe'](_0x180227=>{const _0x5b2802=_0x3f6146,_0x4d007c=new Set();_0x180227[_0x5b2802(0x179)](_0x180e97=>{const _0x2e77bd=_0x5b2802;switch(_0x180e97['type']){case _0x2e77bd(0x150):{const _0x2b12f2=_0x180e97[_0x2e77bd(0x18e)][_0x2e77bd(0x136)];_0x4d007c['add'](_0x2b12f2);break;}}}),R(this[_0x5b2802(0x141)],_0x4d007c);}));}[_0x54b0a0(0x160)](){const _0x1e5ba9=_0x54b0a0;this[_0x1e5ba9(0x19d)](this[_0x1e5ba9(0x15f)]['commentUpdate$'][_0x1e5ba9(0x185)](async _0x4ce0cb=>{const _0x5cd8ac=_0x1e5ba9;var _0x337ae9,_0x59295c,_0x502c2b,_0x5104de;const _0x27222f=(_0x337ae9=this[_0x5cd8ac(0x16c)][_0x5cd8ac(0x137)](_0x4ce0cb['unitId'])[_0x5cd8ac(0x163)](_0x4a8abe=>_0x4a8abe[_0x5cd8ac(0x19a)]===_0x4ce0cb['threadId']))==null?void 0x0:_0x337ae9[_0x5cd8ac(0x130)];if(!_0x27222f)return;const {unitId:_0x5a5634,subUnitId:_0x74ff2}=_0x27222f;switch(_0x4ce0cb[_0x5cd8ac(0x19b)]&&this[_0x5cd8ac(0x131)][_0x5cd8ac(0x197)](_0x4ce0cb['user']),_0x4ce0cb[_0x5cd8ac(0x184)]){case v[_0x5cd8ac(0x188)]:break;case v[_0x5cd8ac(0x18c)]:{this['_threadCommentModel'][_0x5cd8ac(0x177)](_0x5a5634,_0x74ff2,{'unitId':_0x5a5634,'subUnitId':_0x74ff2,'ref':'','id':_0x4ce0cb[_0x5cd8ac(0x16e)],'dT':f(+_0x4ce0cb[_0x5cd8ac(0x176)]),'threadId':_0x4ce0cb['threadId'],'personId':(_0x502c2b=(_0x59295c=_0x4ce0cb[_0x5cd8ac(0x19b)])==null?void 0x0:_0x59295c[_0x5cd8ac(0x151)])!=null?_0x502c2b:_0x4ce0cb['userId'],'text':JSON['parse'](_0x4ce0cb['content']),'parentId':_0x27222f['id']});break;}case v[_0x5cd8ac(0x17e)]:{const _0xcd7c39=this['_threadCommentModel'][_0x5cd8ac(0x144)](_0x5a5634,_0x74ff2,_0x4ce0cb[_0x5cd8ac(0x16e)]);_0xcd7c39&&_0xcd7c39['parentId']&&this['_threadCommentModel'][_0x5cd8ac(0x171)](_0x5a5634,_0x74ff2,_0x4ce0cb[_0x5cd8ac(0x16e)]);break;}case v[_0x5cd8ac(0x135)]:{this[_0x5cd8ac(0x16c)][_0x5cd8ac(0x16d)](_0x5a5634,_0x74ff2,{'commentId':_0x4ce0cb['replyId'],'text':JSON[_0x5cd8ac(0x148)](_0x4ce0cb[_0x5cd8ac(0x147)])});break;}case v[_0x5cd8ac(0x138)]:{const _0x2e6692=(_0x5104de=this['_threadCommentModel']['getUnit'](_0x4ce0cb['unitId'])['find'](_0x5c5fc9=>_0x5c5fc9[_0x5cd8ac(0x19a)]===_0x4ce0cb[_0x5cd8ac(0x19a)]))==null?void 0x0:_0x5104de[_0x5cd8ac(0x130)];_0x2e6692&&this[_0x5cd8ac(0x16c)][_0x5cd8ac(0x180)](_0x5a5634,_0x74ff2,_0x2e6692['id'],_0x4ce0cb[_0x5cd8ac(0x18f)]===I[_0x5cd8ac(0x18d)]);break;}}}));}};_=E([S(0x0,c[_0x54b0a0(0x167)](b[_0x54b0a0(0x199)])),S(0x1,c[_0x54b0a0(0x167)](M[_0x54b0a0(0x17d)])),S(0x2,c[_0x54b0a0(0x167)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x54b0a0(0x157)]))],_);const q=_0x54b0a0(0x191),D={};var A=Object[_0x54b0a0(0x149)],x=(_0x5cd014,_0x88dd06,_0x55f598,_0x1883ab)=>{const _0x4da8f0=_0x54b0a0;for(var _0x1ee5c9=_0x1883ab>0x1?void 0x0:_0x1883ab?A(_0x88dd06,_0x55f598):_0x88dd06,_0x1d911f=_0x5cd014[_0x4da8f0(0x134)]-0x1,_0x3e1775;_0x1d911f>=0x0;_0x1d911f--)(_0x3e1775=_0x5cd014[_0x1d911f])&&(_0x1ee5c9=_0x3e1775(_0x1ee5c9)||_0x1ee5c9);return _0x1ee5c9;},C=(_0xf10960,_0x4b4c99)=>(_0x2d1b23,_0x1ca273)=>_0x4b4c99(_0x2d1b23,_0x1ca273,_0xf10960);function _0x7cf5(_0x33f1d6,_0x117346){const _0x51fb2c=_0x51fb();return _0x7cf5=function(_0x7cf511,_0x19b2e6){_0x7cf511=_0x7cf511-0x12e;let _0x2aac4d=_0x51fb2c[_0x7cf511];return _0x2aac4d;},_0x7cf5(_0x33f1d6,_0x117346);}function Y(_0x6d5cc7,_0x1a5a3a){const _0x5bba88=_0x54b0a0,_0x298caf=_0x6d5cc7[_0x5bba88(0x194)][0x0];return{..._0x1a5a3a,'id':_0x298caf['replyId'],'resolved':_0x6d5cc7[_0x5bba88(0x18f)]===0x1,'dT':f(_0x298caf[_0x5bba88(0x176)]),'personId':_0x298caf[_0x5bba88(0x14a)],'threadId':_0x298caf[_0x5bba88(0x19a)]};}function G(_0x4fe1c4,_0x2542cd,_0x5da18b){const _0x23b5d8=_0x54b0a0;var _0x521bba,_0x49fe9c;if(((_0x49fe9c=(_0x521bba=_0x4fe1c4==null?void 0x0:_0x4fe1c4[_0x23b5d8(0x194)])==null?void 0x0:_0x521bba[_0x23b5d8(0x134)])!=null?_0x49fe9c:0x0)>0x0){const _0x5d2d96=(_0x6e2911,_0x58c104)=>({'id':_0x6e2911[_0x23b5d8(0x16e)],'threadId':_0x6e2911[_0x23b5d8(0x19a)],'dT':f(_0x6e2911[_0x23b5d8(0x176)]),'personId':_0x6e2911['userId'],'resolved':_0x4fe1c4[_0x23b5d8(0x18f)]===I[_0x23b5d8(0x18d)],'unitId':_0x2542cd,'subUnitId':_0x5da18b,'text':JSON[_0x23b5d8(0x148)](_0x6e2911[_0x23b5d8(0x147)]),'parentId':_0x58c104}),_0xc8038e=_0x5d2d96(_0x4fe1c4[_0x23b5d8(0x194)][0x0]);return{..._0xc8038e,'children':_0x4fe1c4[_0x23b5d8(0x194)][_0x23b5d8(0x16f)](0x1)[_0x23b5d8(0x132)](_0x279d28=>_0x5d2d96(_0x279d28,_0xc8038e['id']))};}return null;}let p=class{constructor(_0x54564d,_0x45d437,_0x13f77a){const _0x8cf3e3=_0x54b0a0;this[_0x8cf3e3(0x1a0)]=_0x54564d,this[_0x8cf3e3(0x131)]=_0x45d437,this[_0x8cf3e3(0x172)]=_0x13f77a;}async[_0x54b0a0(0x177)](_0x12cfe8){const _0xace3b6=_0x54b0a0;var _0x423752,_0x29b33e;const {parentId:_0x3f5303,unitId:_0x3561af,text:_0x392931,threadId:_0x384fde}=_0x12cfe8,_0x133470=(_0x29b33e=(_0x423752=_0x392931['customRanges'])==null?void 0x0:_0x423752['filter'](_0x28fb24=>_0x28fb24['rangeType']===c[_0xace3b6(0x14f)][_0xace3b6(0x161)])[_0xace3b6(0x132)](_0x8e6d5c=>_0x8e6d5c[_0xace3b6(0x15e)]))!=null?_0x29b33e:[],_0x1406d9=JSON['stringify'](_0x392931),_0x2a2baa=(await this[_0xace3b6(0x172)][_0xace3b6(0x154)](_0x3561af))[_0xace3b6(0x13b)]();if(_0x3f5303){const _0x40d5b8={'memberId':_0x2a2baa,'unitId':_0x3561af,'content':_0x1406d9,'mention':_0x133470,'threadId':_0x384fde},_0x611740=(await this[_0xace3b6(0x1a0)][_0xace3b6(0x17b)](_0xace3b6(0x168)+_0x3561af+_0xace3b6(0x12e),{'body':_0x40d5b8}))[_0xace3b6(0x165)]['reply'];return{..._0x12cfe8,'id':_0x611740['replyId'],'dT':c[_0xace3b6(0x190)](+_0x611740[_0xace3b6(0x176)])[_0xace3b6(0x13e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x611740[_0xace3b6(0x14a)]};}else{const _0x7d1cae={'memberId':_0x2a2baa,'unitId':_0x3561af,'content':_0x1406d9,'mention':_0x133470},_0x2c59c9=await this[_0xace3b6(0x1a0)][_0xace3b6(0x17b)]('/universer-api/comment/unit/'+_0x3561af+'/add',{'body':_0x7d1cae});return Y(_0x2c59c9[_0xace3b6(0x165)][_0xace3b6(0x158)],_0x12cfe8);}}async['updateComment'](_0x561394){const _0x4c763e=_0x54b0a0;var _0x4b2d86,_0x998402;const {text:_0x436c05,unitId:_0x55ce41}=_0x561394,_0x5c7d7a=(_0x998402=(_0x4b2d86=_0x436c05[_0x4c763e(0x189)])==null?void 0x0:_0x4b2d86[_0x4c763e(0x178)](_0x256f39=>_0x256f39[_0x4c763e(0x169)]===c[_0x4c763e(0x14f)]['COMMENT'])[_0x4c763e(0x132)](_0x1e6246=>_0x1e6246[_0x4c763e(0x15e)]))!=null?_0x998402:[],_0x49b23b=JSON[_0x4c763e(0x15a)](_0x436c05),_0x6a6b02=_0x561394['threadId'],_0x4e1666=_0x561394['id'],_0x47f70f={'memberId':(await this[_0x4c763e(0x172)][_0x4c763e(0x154)](_0x55ce41))[_0x4c763e(0x13b)](),'unitId':_0x55ce41,'threadId':_0x6a6b02,'mention':_0x5c7d7a,'content':_0x49b23b,'replyId':_0x4e1666},_0x2474eb=await this[_0x4c763e(0x1a0)][_0x4c763e(0x17b)](_0x4c763e(0x168)+_0x55ce41+'/edit',{'body':_0x47f70f});return!_0x2474eb[_0x4c763e(0x165)][_0x4c763e(0x18a)]||_0x2474eb['body'][_0x4c763e(0x18a)][_0x4c763e(0x19f)]===0x1;}async['resolveComment'](_0x3d7831){const _0x9e0b7a=_0x54b0a0,{unitId:_0x271b1a}=_0x3d7831,_0x48b401=_0x3d7831[_0x9e0b7a(0x19a)],_0x2219c6={'memberId':this[_0x9e0b7a(0x131)]['getCurrentUser']()[_0x9e0b7a(0x151)],'unitId':_0x271b1a,'threadId':_0x48b401,'solved':_0x3d7831[_0x9e0b7a(0x153)]?I[_0x9e0b7a(0x18d)]:I[_0x9e0b7a(0x166)]},_0x5de145=await this['_httpService']['post'](_0x9e0b7a(0x168)+_0x271b1a+'/solved',{'body':_0x2219c6});return!_0x5de145['body'][_0x9e0b7a(0x18a)]||_0x5de145[_0x9e0b7a(0x165)]['error'][_0x9e0b7a(0x19f)]===0x1;}async[_0x54b0a0(0x171)](_0x1621e4,_0xd9d6f4,_0x97768d,_0x15b211){const _0xf7f3d5=_0x54b0a0,_0x53df72={'memberId':(await this[_0xf7f3d5(0x172)][_0xf7f3d5(0x154)](_0x1621e4))['getMemberID'](),'threadId':_0x97768d,'replyId':_0x15b211,'unitId':_0x1621e4},_0x2e7ca8=await this['_httpService'][_0xf7f3d5(0x17b)](_0xf7f3d5(0x168)+_0x1621e4+_0xf7f3d5(0x155),{'body':_0x53df72});return!_0x2e7ca8[_0xf7f3d5(0x165)][_0xf7f3d5(0x18a)]||_0x2e7ca8[_0xf7f3d5(0x165)][_0xf7f3d5(0x18a)][_0xf7f3d5(0x19f)]===0x1;}async['listComments'](_0x241465,_0x159df2,_0x31e157){const _0xf3fad5=_0x54b0a0,_0x3e9a2b={'unitId':_0x241465,'threadId':_0x31e157},_0x2971aa=await this['_httpService'][_0xf3fad5(0x17b)](_0xf3fad5(0x168)+_0x241465+_0xf3fad5(0x1a1),{'body':_0x3e9a2b}),_0x368393=_0x31e157[_0xf3fad5(0x132)](_0x307d27=>G(_0x2971aa['body'][_0xf3fad5(0x142)][_0x307d27],_0x241465,_0x159df2))[_0xf3fad5(0x178)](Boolean);return Object[_0xf3fad5(0x16a)](_0x2971aa[_0xf3fad5(0x165)]['users'])['forEach'](_0x51131f=>{const _0x4047cb=_0xf3fad5;this['_userService'][_0x4047cb(0x197)](_0x51131f);}),_0x368393;}[_0x54b0a0(0x1a5)](_0x34c780){const _0x431800=_0x54b0a0;return{'id':_0x34c780['id'],'threadId':_0x34c780[_0x431800(0x19a)],'ref':_0x34c780['ref']};}};p=x([C(0x0,c[_0x54b0a0(0x167)](P['HTTPService'])),C(0x1,c[_0x54b0a0(0x167)](c[_0x54b0a0(0x145)])),C(0x2,c[_0x54b0a0(0x167)](b[_0x54b0a0(0x14d)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x171d00,_0x572200,_0x660e0c,_0x2ded7c)=>{const _0x54dc67=_0x54b0a0;for(var _0x478a90=_0x2ded7c>0x1?void 0x0:_0x2ded7c?H(_0x572200,_0x660e0c):_0x572200,_0xc0a730=_0x171d00[_0x54dc67(0x134)]-0x1,_0x49440b;_0xc0a730>=0x0;_0xc0a730--)(_0x49440b=_0x171d00[_0xc0a730])&&(_0x478a90=_0x49440b(_0x478a90)||_0x478a90);return _0x478a90;},y=(_0x41a38a,_0x144f82)=>(_0x11046d,_0x156884)=>_0x144f82(_0x11046d,_0x156884,_0x41a38a);let g=class extends c[_0x54b0a0(0x195)]{constructor(_0x77494b,_0x1b4413){const _0x90a8f7=_0x54b0a0;super(),this['_threadCommentDataSourceService']=_0x77494b,this[_0x90a8f7(0x183)]=_0x1b4413,this[_0x90a8f7(0x140)]();}[_0x54b0a0(0x140)](){const _0x227c97=_0x54b0a0;this['_threadCommentDataSourceService'][_0x227c97(0x174)]=this[_0x227c97(0x183)],this[_0x227c97(0x14b)][_0x227c97(0x196)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x54b0a0(0x167)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x181a0d,_0x4db565,_0x43ffff)=>_0x4db565 in _0x181a0d?F(_0x181a0d,_0x4db565,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43ffff}):_0x181a0d[_0x4db565]=_0x43ffff,W=(_0x30c2b9,_0x25d4d7,_0x413c61,_0x3a47b7)=>{for(var _0x4032c5=_0x3a47b7>0x1?void 0x0:_0x3a47b7?L(_0x25d4d7,_0x413c61):_0x25d4d7,_0x1339f6=_0x30c2b9['length']-0x1,_0x4f2a88;_0x1339f6>=0x0;_0x1339f6--)(_0x4f2a88=_0x30c2b9[_0x1339f6])&&(_0x4032c5=_0x4f2a88(_0x4032c5)||_0x4032c5);return _0x4032c5;},O=(_0x2e34bc,_0x271416)=>(_0x984ab8,_0x4378b6)=>_0x271416(_0x984ab8,_0x4378b6,_0x2e34bc),N=(_0x57c961,_0x25475d,_0x6b41ea)=>Z(_0x57c961,typeof _0x25475d!=_0x54b0a0(0x1a3)?_0x25475d+'':_0x25475d,_0x6b41ea);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x54b0a0(0x175)]{constructor(_0x1b9b7b=D,_0x158941,_0x3340e6){const _0x4c1c7c=_0x54b0a0;super(),this['_config']=_0x1b9b7b,this['_injector']=_0x158941,this['_configService']=_0x3340e6;const {..._0x416f8c}=c[_0x4c1c7c(0x13c)]({},D,this[_0x4c1c7c(0x15c)]);this[_0x4c1c7c(0x13d)][_0x4c1c7c(0x12f)](q,_0x416f8c);}['onStarting'](){const _0x377565=_0x54b0a0;[[p],[g],[_]][_0x377565(0x179)](_0x277867=>{const _0x132665=_0x377565;this[_0x132665(0x141)]['add'](_0x277867);});}[_0x54b0a0(0x182)](){const _0x11965b=_0x54b0a0;this['_injector'][_0x11965b(0x159)](g),this[_0x11965b(0x141)][_0x11965b(0x159)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x54b0a0(0x14c),U),N(exports[_0x54b0a0(0x1a4)],'type',c[_0x54b0a0(0x143)][_0x54b0a0(0x18b)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x54b0a0(0x1a6)](w[_0x54b0a0(0x17c)],b[_0x54b0a0(0x198)],T['UniverLicensePlugin']),O(0x1,c[_0x54b0a0(0x167)](c[_0x54b0a0(0x157)])),O(0x2,c[_0x54b0a0(0x156)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
1
+ const _0x28792c=_0x9282;(function(_0x5c672e,_0x29ea28){const _0x174807=_0x9282,_0x5acd2e=_0x5c672e();while(!![]){try{const _0xddb26a=-parseInt(_0x174807(0x1b2))/0x1+-parseInt(_0x174807(0x189))/0x2+parseInt(_0x174807(0x1c5))/0x3+-parseInt(_0x174807(0x19f))/0x4+parseInt(_0x174807(0x1e2))/0x5+-parseInt(_0x174807(0x1c7))/0x6+parseInt(_0x174807(0x1ac))/0x7;if(_0xddb26a===_0x29ea28)break;else _0x5acd2e['push'](_0x5acd2e['shift']());}catch(_0x5d8cda){_0x5acd2e['push'](_0x5acd2e['shift']());}}}(_0x46a5,0x9ced4));import{CommentService as _0x278e6b,CollaborationSessionService as _0x500cd9,UniverCollaborationClientPlugin as _0x2cedd5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c3717}from'@univerjs-pro/license';import{dayjs as _0x42d6cb,UserManagerService as _0x535f39,Inject as _0x5552fa,Injector as _0x3ee6f7,Disposable as _0x4e7dc4,CustomRangeType as _0x368bee,UniverInstanceType as _0x35dea2,DependentOn as _0x5ae564,IConfigService as _0x520722,Plugin as _0x51a888,merge as _0x37f002}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53e8cb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x368681,IThreadCommentDataSourceService as _0x28c527}from'@univerjs/thread-comment';import{bufferTime as _0x2daca4}from'rxjs';function _0x9282(_0x599777,_0x1a5ee4){const _0x46a5da=_0x46a5();return _0x9282=function(_0x928204,_0x48473c){_0x928204=_0x928204-0x186;let _0x7285bb=_0x46a5da[_0x928204];return _0x7285bb;},_0x9282(_0x599777,_0x1a5ee4);}import{HTTPService as _0x2ab469}from'@univerjs/network';const W=_0x28792c(0x18d);var I=(_0x3cf558=>(_0x3cf558[_0x3cf558[_0x28792c(0x1aa)]=0x0]=_0x28792c(0x1aa),_0x3cf558[_0x3cf558[_0x28792c(0x1d0)]=0x1]=_0x28792c(0x1d0),_0x3cf558[_0x3cf558[_0x28792c(0x1d3)]=-0x1]=_0x28792c(0x1d3),_0x3cf558))(I||{}),v=(_0x5097ac=>(_0x5097ac[_0x5097ac[_0x28792c(0x1a9)]=0x0]=_0x28792c(0x1a9),_0x5097ac[_0x5097ac['Add']=0x1]='Add',_0x5097ac[_0x5097ac['Reply']=0x2]='Reply',_0x5097ac[_0x5097ac[_0x28792c(0x1d9)]=0x3]=_0x28792c(0x1d9),_0x5097ac[_0x5097ac[_0x28792c(0x1e6)]=0x4]=_0x28792c(0x1e6),_0x5097ac[_0x5097ac[_0x28792c(0x1bb)]=0x5]='Solve',_0x5097ac[_0x5097ac[_0x28792c(0x1d3)]=-0x1]=_0x28792c(0x1d3),_0x5097ac))(v||{});const y=_0x910b6d=>_0x42d6cb(new Date(+_0x910b6d))[_0x28792c(0x1d2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x294e8c,_0x5b1f70)=>{const _0x320f94=_0x28792c,_0x1191ed=_0x294e8c[_0x320f94(0x190)](_0x535f39),_0x15b419=_0x294e8c['get'](_0x2ab469);_0x5b1f70[_0x320f94(0x1be)](_0xb27928=>{const _0x41af10=_0x320f94;_0x1191ed[_0x41af10(0x1de)](_0xb27928)&&_0x5b1f70[_0x41af10(0x1c2)](_0xb27928);}),_0x5b1f70[_0x320f94(0x19b)]&&(await _0x15b419[_0x320f94(0x190)](_0x320f94(0x1d7),{'params':{'userIDs':[..._0x5b1f70]}}))['body']['users'][_0x320f94(0x1be)](_0x23581b=>{const _0x5aed3e=_0x320f94;_0x23581b&&_0x1191ed[_0x5aed3e(0x1b0)](_0x23581b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x19faa0,_0x4e4328,_0x1ffb2f,_0x66071)=>{const _0xd99ea0=_0x28792c;for(var _0x53d054=_0x66071>0x1?void 0x0:_0x66071?K(_0x4e4328,_0x1ffb2f):_0x4e4328,_0x1d5169=_0x19faa0[_0xd99ea0(0x1dd)]-0x1,_0x4a9612;_0x1d5169>=0x0;_0x1d5169--)(_0x4a9612=_0x19faa0[_0x1d5169])&&(_0x53d054=_0x4a9612(_0x53d054)||_0x53d054);return _0x53d054;},p=(_0x3142ba,_0x5f0e97)=>(_0x2569cc,_0x595882)=>_0x5f0e97(_0x2569cc,_0x595882,_0x3142ba);let _=class extends _0x4e7dc4{constructor(_0x3e6862,_0x5dd14e,_0x5a0b26,_0x42566c){const _0x372cbb=_0x28792c;super(),this[_0x372cbb(0x18e)]=_0x3e6862,this[_0x372cbb(0x1bf)]=_0x5dd14e,this['_userService']=_0x5a0b26,this[_0x372cbb(0x1a0)]=_0x42566c,this[_0x372cbb(0x1a8)](),this['_initUserSync']();}['_initUserSync'](){const _0x124032=_0x28792c;this[_0x124032(0x19e)](this[_0x124032(0x1bf)][_0x124032(0x1da)][_0x124032(0x1a4)](_0x2daca4(0x10))[_0x124032(0x1dc)](_0x2e4eb4=>{const _0x428742=_0x124032,_0x3f996c=new Set();_0x2e4eb4[_0x428742(0x1be)](_0x589750=>{const _0xcf4fd6=_0x428742;switch(_0x589750[_0xcf4fd6(0x1c3)]){case'add':{const _0x1c834d=_0x589750[_0xcf4fd6(0x1ce)][_0xcf4fd6(0x1bc)];_0x3f996c[_0xcf4fd6(0x196)](_0x1c834d);break;}}}),B(this[_0x428742(0x1a0)],_0x3f996c);}));}['_init'](){const _0x3c4119=_0x28792c;this[_0x3c4119(0x19e)](this[_0x3c4119(0x18e)]['commentUpdate$']['subscribe'](async _0x33ec9b=>{const _0x13b969=_0x3c4119;var _0x4a878e,_0x3ff656,_0x1c0140,_0xf2287;const _0x566b67=(_0x4a878e=this[_0x13b969(0x1bf)][_0x13b969(0x1db)](_0x33ec9b['unitId'])[_0x13b969(0x1b7)](_0x2928be=>_0x2928be[_0x13b969(0x1b5)]===_0x33ec9b[_0x13b969(0x1b5)]))==null?void 0x0:_0x4a878e[_0x13b969(0x191)];if(!_0x566b67)return;const {unitId:_0x2ecaff,subUnitId:_0xd033da}=_0x566b67;switch(_0x33ec9b['user']&&this[_0x13b969(0x1b8)][_0x13b969(0x1b0)](_0x33ec9b['user']),_0x33ec9b['type']){case v[_0x13b969(0x195)]:break;case v['Reply']:{this[_0x13b969(0x1bf)][_0x13b969(0x1d1)](_0x2ecaff,_0xd033da,{'unitId':_0x2ecaff,'subUnitId':_0xd033da,'ref':'','id':_0x33ec9b[_0x13b969(0x19a)],'dT':y(+_0x33ec9b['createTimestamp']),'threadId':_0x33ec9b[_0x13b969(0x1b5)],'personId':(_0x1c0140=(_0x3ff656=_0x33ec9b['user'])==null?void 0x0:_0x3ff656['userID'])!=null?_0x1c0140:_0x33ec9b['userId'],'text':JSON[_0x13b969(0x1cb)](_0x33ec9b[_0x13b969(0x1cc)]),'parentId':_0x566b67['id']});break;}case v['Delete']:{const _0x3b53fe=this['_threadCommentModel']['getComment'](_0x2ecaff,_0xd033da,_0x33ec9b[_0x13b969(0x19a)]);_0x3b53fe&&_0x3b53fe['parentId']&&this[_0x13b969(0x1bf)][_0x13b969(0x1b9)](_0x2ecaff,_0xd033da,_0x33ec9b[_0x13b969(0x19a)]);break;}case v[_0x13b969(0x1d9)]:{this[_0x13b969(0x1bf)][_0x13b969(0x1ba)](_0x2ecaff,_0xd033da,{'commentId':_0x33ec9b[_0x13b969(0x19a)],'text':JSON[_0x13b969(0x1cb)](_0x33ec9b[_0x13b969(0x1cc)])});break;}case v[_0x13b969(0x1bb)]:{const _0xe7c341=(_0xf2287=this[_0x13b969(0x1bf)]['getUnit'](_0x33ec9b[_0x13b969(0x1ae)])[_0x13b969(0x1b7)](_0x5dd2ed=>_0x5dd2ed[_0x13b969(0x1b5)]===_0x33ec9b[_0x13b969(0x1b5)]))==null?void 0x0:_0xf2287[_0x13b969(0x191)];_0xe7c341&&this[_0x13b969(0x1bf)][_0x13b969(0x1df)](_0x2ecaff,_0xd033da,_0xe7c341['id'],_0x33ec9b[_0x13b969(0x187)]===I[_0x13b969(0x1d0)]);break;}}}));}};function _0x46a5(){const _0x140e71=['personId','_httpService','forEach','_threadCommentModel','userID','ref','delete','type','_sessionService','2019552pIqcwe','stringify','4906386NRyhzs','pluginName','error','getCurrentUser','parse','content','_threadCommentDataSource','payload','map','Solved','addComment','format','UNRECOGNIZED','syncUpdateMutationToColla','filter','userId','/universer-api/user/list','replies','Edit','commentUpdate$','getUnit','subscribe','length','getUser','resolveComment','UNIVER_UNKNOWN','/list','4500485OUgXMG','getMemberID','_threadCommentDataSourceService','/edit','Delete','/reply','solved','reply','163088iVonSb','COMMENT','rangeType','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','YYYY/MM/DD\x20HH:mm','get','root','createTimestamp','code','/delete','Add','add','post','resolved','symbol','replyId','size','_initDataSource','_configService','disposeWithMe','1826136SoASEs','_injector','/add','rangeId','requireSession','pipe','saveCommentToSnapshot','slice','dataSource','_init','Unknown','OpenOrReOpen','defineProperty','7257985vZfOBA','onReady','unitId','getOwnPropertyDescriptor','addUser','/universer-api/comment/unit/','611555IseowA','customRanges','/solved','threadId','body','find','_userService','deleteComment','updateComment','Solve'];_0x46a5=function(){return _0x140e71;};return _0x46a5();}_=V([p(0x0,_0x5552fa(_0x278e6b)),p(0x1,_0x5552fa(_0x368681)),p(0x2,_0x5552fa(_0x535f39)),p(0x3,_0x5552fa(_0x3ee6f7))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x28792c(0x1af)],Q=(_0x414b89,_0x446b8e,_0x4c0c52,_0x4a2379)=>{const _0x3e08e1=_0x28792c;for(var _0x3b011e=_0x4a2379>0x1?void 0x0:_0x4a2379?k(_0x446b8e,_0x4c0c52):_0x446b8e,_0x4b25ed=_0x414b89[_0x3e08e1(0x1dd)]-0x1,_0x500275;_0x4b25ed>=0x0;_0x4b25ed--)(_0x500275=_0x414b89[_0x4b25ed])&&(_0x3b011e=_0x500275(_0x3b011e)||_0x3b011e);return _0x3b011e;},b=(_0x5bfe25,_0xc124f5)=>(_0x10b97e,_0x374d64)=>_0xc124f5(_0x10b97e,_0x374d64,_0x5bfe25);function X(_0x319657,_0x1203b9){const _0x5adcae=_0x28792c,_0xffa2af=_0x319657[_0x5adcae(0x1d8)][0x0];return{..._0x1203b9,'id':_0xffa2af['replyId'],'resolved':_0x319657[_0x5adcae(0x187)]===0x1,'dT':y(_0xffa2af['createTimestamp']),'personId':_0xffa2af[_0x5adcae(0x1d6)],'threadId':_0xffa2af[_0x5adcae(0x1b5)]};}function ee(_0x3ef88d,_0x354c62,_0x2b50a1){const _0x1e5ac1=_0x28792c;var _0x4a9c9c,_0x1fa949;if(((_0x1fa949=(_0x4a9c9c=_0x3ef88d==null?void 0x0:_0x3ef88d[_0x1e5ac1(0x1d8)])==null?void 0x0:_0x4a9c9c[_0x1e5ac1(0x1dd)])!=null?_0x1fa949:0x0)>0x0){const _0x5dcc19=(_0x474641,_0x21b627)=>({'id':_0x474641[_0x1e5ac1(0x19a)],'threadId':_0x474641[_0x1e5ac1(0x1b5)],'dT':y(_0x474641[_0x1e5ac1(0x192)]),'personId':_0x474641['userId'],'resolved':_0x3ef88d[_0x1e5ac1(0x187)]===I[_0x1e5ac1(0x1d0)],'unitId':_0x354c62,'subUnitId':_0x2b50a1,'text':JSON[_0x1e5ac1(0x1cb)](_0x474641['content']),'parentId':_0x21b627}),_0x21e8be=_0x5dcc19(_0x3ef88d[_0x1e5ac1(0x1d8)][0x0]);return{..._0x21e8be,'children':_0x3ef88d[_0x1e5ac1(0x1d8)][_0x1e5ac1(0x1a6)](0x1)[_0x1e5ac1(0x1cf)](_0x108cfd=>_0x5dcc19(_0x108cfd,_0x21e8be['id']))};}return null;}let S=class{constructor(_0x2c2c14,_0x53f13e,_0x336d7e){const _0x25acd5=_0x28792c;this[_0x25acd5(0x1bd)]=_0x2c2c14,this[_0x25acd5(0x1b8)]=_0x53f13e,this[_0x25acd5(0x1c4)]=_0x336d7e;}async[_0x28792c(0x1d1)](_0x2d78c2){const _0x30e818=_0x28792c;var _0x4251e3,_0x54cc26;const {parentId:_0x3ee6fc,unitId:_0xca5f8b,text:_0x374900,threadId:_0x6dc432}=_0x2d78c2,_0x4764ec=(_0x54cc26=(_0x4251e3=_0x374900[_0x30e818(0x1b3)])==null?void 0x0:_0x4251e3[_0x30e818(0x1d5)](_0x33a32e=>_0x33a32e[_0x30e818(0x18b)]===_0x368bee[_0x30e818(0x18a)])[_0x30e818(0x1cf)](_0x22f655=>_0x22f655[_0x30e818(0x1a2)]))!=null?_0x54cc26:[],_0x3c654a=JSON[_0x30e818(0x1c6)](_0x374900),_0x5003fa=(await this[_0x30e818(0x1c4)][_0x30e818(0x1a3)](_0xca5f8b))['getMemberID']();if(_0x3ee6fc){const _0x282797={'memberId':_0x5003fa,'unitId':_0xca5f8b,'content':_0x3c654a,'mention':_0x4764ec,'threadId':_0x6dc432},_0x3463ea=(await this[_0x30e818(0x1bd)][_0x30e818(0x197)](_0x30e818(0x1b1)+_0xca5f8b+_0x30e818(0x186),{'body':_0x282797}))['body'][_0x30e818(0x188)];return{..._0x2d78c2,'id':_0x3463ea[_0x30e818(0x19a)],'dT':_0x42d6cb(+_0x3463ea['createTimestamp'])[_0x30e818(0x1d2)](_0x30e818(0x18f)),'personId':_0x3463ea['userId']};}else{const _0x378a4b={'memberId':_0x5003fa,'unitId':_0xca5f8b,'content':_0x3c654a,'mention':_0x4764ec},_0x267fce=await this['_httpService'][_0x30e818(0x197)](_0x30e818(0x1b1)+_0xca5f8b+_0x30e818(0x1a1),{'body':_0x378a4b});return X(_0x267fce[_0x30e818(0x1b6)]['comment'],_0x2d78c2);}}async['updateComment'](_0x490db4){const _0x56b320=_0x28792c;var _0x5b4d95,_0x3aebb8;const {text:_0x200331,unitId:_0x4e397d}=_0x490db4,_0x2de75a=(_0x3aebb8=(_0x5b4d95=_0x200331[_0x56b320(0x1b3)])==null?void 0x0:_0x5b4d95[_0x56b320(0x1d5)](_0x2a66cb=>_0x2a66cb[_0x56b320(0x18b)]===_0x368bee[_0x56b320(0x18a)])[_0x56b320(0x1cf)](_0x4e5790=>_0x4e5790[_0x56b320(0x1a2)]))!=null?_0x3aebb8:[],_0x35dee8=JSON[_0x56b320(0x1c6)](_0x200331),_0x540916=_0x490db4[_0x56b320(0x1b5)],_0x1db8ea=_0x490db4['id'],_0x53857e={'memberId':(await this[_0x56b320(0x1c4)]['requireSession'](_0x4e397d))[_0x56b320(0x1e3)](),'unitId':_0x4e397d,'threadId':_0x540916,'mention':_0x2de75a,'content':_0x35dee8,'replyId':_0x1db8ea},_0x425dfc=await this[_0x56b320(0x1bd)][_0x56b320(0x197)](_0x56b320(0x1b1)+_0x4e397d+_0x56b320(0x1e5),{'body':_0x53857e});return!_0x425dfc['body']['error']||_0x425dfc['body'][_0x56b320(0x1c9)][_0x56b320(0x193)]===0x1;}async[_0x28792c(0x1df)](_0x183224){const _0x18c20a=_0x28792c,{unitId:_0x16bcae}=_0x183224,_0x171942=_0x183224[_0x18c20a(0x1b5)],_0x191790={'memberId':this[_0x18c20a(0x1b8)][_0x18c20a(0x1ca)]()[_0x18c20a(0x1c0)],'unitId':_0x16bcae,'threadId':_0x171942,'solved':_0x183224[_0x18c20a(0x198)]?I[_0x18c20a(0x1d0)]:I['OpenOrReOpen']},_0xa910f=await this[_0x18c20a(0x1bd)][_0x18c20a(0x197)](_0x18c20a(0x1b1)+_0x16bcae+_0x18c20a(0x1b4),{'body':_0x191790});return!_0xa910f[_0x18c20a(0x1b6)][_0x18c20a(0x1c9)]||_0xa910f['body'][_0x18c20a(0x1c9)][_0x18c20a(0x193)]===0x1;}async[_0x28792c(0x1b9)](_0x41aa6b,_0x59ec8b,_0x564ecf,_0x33de5e){const _0x168702=_0x28792c,_0x2408c7={'memberId':(await this[_0x168702(0x1c4)][_0x168702(0x1a3)](_0x41aa6b))[_0x168702(0x1e3)](),'threadId':_0x564ecf,'replyId':_0x33de5e,'unitId':_0x41aa6b},_0x19f4cf=await this[_0x168702(0x1bd)][_0x168702(0x197)](_0x168702(0x1b1)+_0x41aa6b+_0x168702(0x194),{'body':_0x2408c7});return!_0x19f4cf['body'][_0x168702(0x1c9)]||_0x19f4cf[_0x168702(0x1b6)][_0x168702(0x1c9)][_0x168702(0x193)]===0x1;}async['listComments'](_0x223f5c,_0xf75ea5,_0x113ca2){const _0x1d30ee=_0x28792c,_0x1ffdbf={'unitId':_0x223f5c,'threadId':_0x113ca2},_0x3d6882=await this[_0x1d30ee(0x1bd)][_0x1d30ee(0x197)](_0x1d30ee(0x1b1)+_0x223f5c+_0x1d30ee(0x1e1),{'body':_0x1ffdbf}),_0x159e9e=_0x113ca2[_0x1d30ee(0x1cf)](_0x24e3e3=>ee(_0x3d6882[_0x1d30ee(0x1b6)]['comments'][_0x24e3e3],_0x223f5c,_0xf75ea5))[_0x1d30ee(0x1d5)](Boolean);return Object['values'](_0x3d6882['body']['users'])[_0x1d30ee(0x1be)](_0x4fad27=>{const _0x491bf9=_0x1d30ee;this[_0x491bf9(0x1b8)]['addUser'](_0x4fad27);}),_0x159e9e;}[_0x28792c(0x1a5)](_0x3025f1){const _0x3da437=_0x28792c;return{'id':_0x3025f1['id'],'threadId':_0x3025f1[_0x3da437(0x1b5)],'ref':_0x3025f1[_0x3da437(0x1c1)]};}};S=Q([b(0x0,_0x5552fa(_0x2ab469)),b(0x1,_0x5552fa(_0x535f39)),b(0x2,_0x5552fa(_0x500cd9))],S);var re=Object[_0x28792c(0x1af)],te=(_0x3bfdd8,_0x5f5999,_0x13524c,_0x73d7d6)=>{for(var _0x170f43=_0x73d7d6>0x1?void 0x0:_0x73d7d6?re(_0x5f5999,_0x13524c):_0x5f5999,_0x972319=_0x3bfdd8['length']-0x1,_0x1d29e0;_0x972319>=0x0;_0x972319--)(_0x1d29e0=_0x3bfdd8[_0x972319])&&(_0x170f43=_0x1d29e0(_0x170f43)||_0x170f43);return _0x170f43;},M=(_0x135b9b,_0x28d5a8)=>(_0x490604,_0x35ffd8)=>_0x28d5a8(_0x490604,_0x35ffd8,_0x135b9b);let f=class extends _0x4e7dc4{constructor(_0x2e100a,_0x2142cb){const _0x53458f=_0x28792c;super(),this[_0x53458f(0x1e4)]=_0x2e100a,this['_threadCommentDataSource']=_0x2142cb,this[_0x53458f(0x19c)]();}['_initDataSource'](){const _0x1360a2=_0x28792c;this[_0x1360a2(0x1e4)][_0x1360a2(0x1a7)]=this[_0x1360a2(0x1cd)],this[_0x1360a2(0x1e4)][_0x1360a2(0x1d4)]=!0x1;}};f=te([M(0x0,_0x28c527),M(0x1,_0x5552fa(S))],f);var se=Object[_0x28792c(0x1ab)],oe=Object[_0x28792c(0x1af)],ne=(_0x21c4ff,_0xad48fb,_0x2b410a)=>_0xad48fb in _0x21c4ff?se(_0x21c4ff,_0xad48fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b410a}):_0x21c4ff[_0xad48fb]=_0x2b410a,ie=(_0x1a65fe,_0x1c2d22,_0x2f247c,_0x23adf4)=>{const _0x3babe0=_0x28792c;for(var _0x30aec8=_0x23adf4>0x1?void 0x0:_0x23adf4?oe(_0x1c2d22,_0x2f247c):_0x1c2d22,_0x3e12c=_0x1a65fe[_0x3babe0(0x1dd)]-0x1,_0x11e2e5;_0x3e12c>=0x0;_0x3e12c--)(_0x11e2e5=_0x1a65fe[_0x3e12c])&&(_0x30aec8=_0x11e2e5(_0x30aec8)||_0x30aec8);return _0x30aec8;},N=(_0x1ac5bf,_0x369391)=>(_0x1cc38a,_0x1a38ff)=>_0x369391(_0x1cc38a,_0x1a38ff,_0x1ac5bf),$=(_0x505570,_0x1ecb22,_0x503a27)=>ne(_0x505570,typeof _0x1ecb22!=_0x28792c(0x199)?_0x1ecb22+'':_0x1ecb22,_0x503a27);let g=class extends _0x51a888{constructor(_0x24d007=O,_0x1df087,_0xe3aacf){const _0x527dc6=_0x28792c;super(),this[_0x527dc6(0x18c)]=_0x24d007,this[_0x527dc6(0x1a0)]=_0x1df087,this[_0x527dc6(0x19d)]=_0xe3aacf;const {..._0x5e4010}=_0x37f002({},O,this[_0x527dc6(0x18c)]);this[_0x527dc6(0x19d)]['setConfig'](z,_0x5e4010);}['onStarting'](){const _0x4c10a1=_0x28792c;[[S],[f],[_]][_0x4c10a1(0x1be)](_0x1f4b2e=>{this['_injector']['add'](_0x1f4b2e);});}[_0x28792c(0x1ad)](){const _0x5e11b5=_0x28792c;this[_0x5e11b5(0x1a0)][_0x5e11b5(0x190)](f),this[_0x5e11b5(0x1a0)][_0x5e11b5(0x190)](_);}};$(g,_0x28792c(0x1c8),W),$(g,_0x28792c(0x1c3),_0x35dea2[_0x28792c(0x1e0)]),g=ie([_0x5ae564(_0x53e8cb,_0x2cedd5,_0x1c3717),N(0x1,_0x5552fa(_0x3ee6f7)),N(0x2,_0x520722)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
1
+ const _0x28792c=_0x9282;(function(_0x5c672e,_0x29ea28){const _0x174807=_0x9282,_0x5acd2e=_0x5c672e();while(!![]){try{const _0xddb26a=-parseInt(_0x174807(0x1b2))/0x1+-parseInt(_0x174807(0x189))/0x2+parseInt(_0x174807(0x1c5))/0x3+-parseInt(_0x174807(0x19f))/0x4+parseInt(_0x174807(0x1e2))/0x5+-parseInt(_0x174807(0x1c7))/0x6+parseInt(_0x174807(0x1ac))/0x7;if(_0xddb26a===_0x29ea28)break;else _0x5acd2e['push'](_0x5acd2e['shift']());}catch(_0x5d8cda){_0x5acd2e['push'](_0x5acd2e['shift']());}}}(_0x46a5,0x9ced4));import{CommentService as _0x278e6b,CollaborationSessionService as _0x500cd9,UniverCollaborationClientPlugin as _0x2cedd5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c3717}from'@univerjs-pro/license';import{dayjs as _0x42d6cb,UserManagerService as _0x535f39,Inject as _0x5552fa,Injector as _0x3ee6f7,Disposable as _0x4e7dc4,CustomRangeType as _0x368bee,UniverInstanceType as _0x35dea2,DependentOn as _0x5ae564,IConfigService as _0x520722,Plugin as _0x51a888,merge as _0x37f002}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53e8cb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x368681,IThreadCommentDataSourceService as _0x28c527}from'@univerjs/thread-comment';import{bufferTime as _0x2daca4}from'rxjs';function _0x9282(_0x599777,_0x1a5ee4){const _0x46a5da=_0x46a5();return _0x9282=function(_0x928204,_0x48473c){_0x928204=_0x928204-0x186;let _0x7285bb=_0x46a5da[_0x928204];return _0x7285bb;},_0x9282(_0x599777,_0x1a5ee4);}import{HTTPService as _0x2ab469}from'@univerjs/network';const W=_0x28792c(0x18d);var I=(_0x3cf558=>(_0x3cf558[_0x3cf558[_0x28792c(0x1aa)]=0x0]=_0x28792c(0x1aa),_0x3cf558[_0x3cf558[_0x28792c(0x1d0)]=0x1]=_0x28792c(0x1d0),_0x3cf558[_0x3cf558[_0x28792c(0x1d3)]=-0x1]=_0x28792c(0x1d3),_0x3cf558))(I||{}),v=(_0x5097ac=>(_0x5097ac[_0x5097ac[_0x28792c(0x1a9)]=0x0]=_0x28792c(0x1a9),_0x5097ac[_0x5097ac['Add']=0x1]='Add',_0x5097ac[_0x5097ac['Reply']=0x2]='Reply',_0x5097ac[_0x5097ac[_0x28792c(0x1d9)]=0x3]=_0x28792c(0x1d9),_0x5097ac[_0x5097ac[_0x28792c(0x1e6)]=0x4]=_0x28792c(0x1e6),_0x5097ac[_0x5097ac[_0x28792c(0x1bb)]=0x5]='Solve',_0x5097ac[_0x5097ac[_0x28792c(0x1d3)]=-0x1]=_0x28792c(0x1d3),_0x5097ac))(v||{});const y=_0x910b6d=>_0x42d6cb(new Date(+_0x910b6d))[_0x28792c(0x1d2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x294e8c,_0x5b1f70)=>{const _0x320f94=_0x28792c,_0x1191ed=_0x294e8c[_0x320f94(0x190)](_0x535f39),_0x15b419=_0x294e8c['get'](_0x2ab469);_0x5b1f70[_0x320f94(0x1be)](_0xb27928=>{const _0x41af10=_0x320f94;_0x1191ed[_0x41af10(0x1de)](_0xb27928)&&_0x5b1f70[_0x41af10(0x1c2)](_0xb27928);}),_0x5b1f70[_0x320f94(0x19b)]&&(await _0x15b419[_0x320f94(0x190)](_0x320f94(0x1d7),{'params':{'userIDs':[..._0x5b1f70]}}))['body']['users'][_0x320f94(0x1be)](_0x23581b=>{const _0x5aed3e=_0x320f94;_0x23581b&&_0x1191ed[_0x5aed3e(0x1b0)](_0x23581b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x19faa0,_0x4e4328,_0x1ffb2f,_0x66071)=>{const _0xd99ea0=_0x28792c;for(var _0x53d054=_0x66071>0x1?void 0x0:_0x66071?K(_0x4e4328,_0x1ffb2f):_0x4e4328,_0x1d5169=_0x19faa0[_0xd99ea0(0x1dd)]-0x1,_0x4a9612;_0x1d5169>=0x0;_0x1d5169--)(_0x4a9612=_0x19faa0[_0x1d5169])&&(_0x53d054=_0x4a9612(_0x53d054)||_0x53d054);return _0x53d054;},p=(_0x3142ba,_0x5f0e97)=>(_0x2569cc,_0x595882)=>_0x5f0e97(_0x2569cc,_0x595882,_0x3142ba);let _=class extends _0x4e7dc4{constructor(_0x3e6862,_0x5dd14e,_0x5a0b26,_0x42566c){const _0x372cbb=_0x28792c;super(),this[_0x372cbb(0x18e)]=_0x3e6862,this[_0x372cbb(0x1bf)]=_0x5dd14e,this['_userService']=_0x5a0b26,this[_0x372cbb(0x1a0)]=_0x42566c,this[_0x372cbb(0x1a8)](),this['_initUserSync']();}['_initUserSync'](){const _0x124032=_0x28792c;this[_0x124032(0x19e)](this[_0x124032(0x1bf)][_0x124032(0x1da)][_0x124032(0x1a4)](_0x2daca4(0x10))[_0x124032(0x1dc)](_0x2e4eb4=>{const _0x428742=_0x124032,_0x3f996c=new Set();_0x2e4eb4[_0x428742(0x1be)](_0x589750=>{const _0xcf4fd6=_0x428742;switch(_0x589750[_0xcf4fd6(0x1c3)]){case'add':{const _0x1c834d=_0x589750[_0xcf4fd6(0x1ce)][_0xcf4fd6(0x1bc)];_0x3f996c[_0xcf4fd6(0x196)](_0x1c834d);break;}}}),B(this[_0x428742(0x1a0)],_0x3f996c);}));}['_init'](){const _0x3c4119=_0x28792c;this[_0x3c4119(0x19e)](this[_0x3c4119(0x18e)]['commentUpdate$']['subscribe'](async _0x33ec9b=>{const _0x13b969=_0x3c4119;var _0x4a878e,_0x3ff656,_0x1c0140,_0xf2287;const _0x566b67=(_0x4a878e=this[_0x13b969(0x1bf)][_0x13b969(0x1db)](_0x33ec9b['unitId'])[_0x13b969(0x1b7)](_0x2928be=>_0x2928be[_0x13b969(0x1b5)]===_0x33ec9b[_0x13b969(0x1b5)]))==null?void 0x0:_0x4a878e[_0x13b969(0x191)];if(!_0x566b67)return;const {unitId:_0x2ecaff,subUnitId:_0xd033da}=_0x566b67;switch(_0x33ec9b['user']&&this[_0x13b969(0x1b8)][_0x13b969(0x1b0)](_0x33ec9b['user']),_0x33ec9b['type']){case v[_0x13b969(0x195)]:break;case v['Reply']:{this[_0x13b969(0x1bf)][_0x13b969(0x1d1)](_0x2ecaff,_0xd033da,{'unitId':_0x2ecaff,'subUnitId':_0xd033da,'ref':'','id':_0x33ec9b[_0x13b969(0x19a)],'dT':y(+_0x33ec9b['createTimestamp']),'threadId':_0x33ec9b[_0x13b969(0x1b5)],'personId':(_0x1c0140=(_0x3ff656=_0x33ec9b['user'])==null?void 0x0:_0x3ff656['userID'])!=null?_0x1c0140:_0x33ec9b['userId'],'text':JSON[_0x13b969(0x1cb)](_0x33ec9b[_0x13b969(0x1cc)]),'parentId':_0x566b67['id']});break;}case v['Delete']:{const _0x3b53fe=this['_threadCommentModel']['getComment'](_0x2ecaff,_0xd033da,_0x33ec9b[_0x13b969(0x19a)]);_0x3b53fe&&_0x3b53fe['parentId']&&this[_0x13b969(0x1bf)][_0x13b969(0x1b9)](_0x2ecaff,_0xd033da,_0x33ec9b[_0x13b969(0x19a)]);break;}case v[_0x13b969(0x1d9)]:{this[_0x13b969(0x1bf)][_0x13b969(0x1ba)](_0x2ecaff,_0xd033da,{'commentId':_0x33ec9b[_0x13b969(0x19a)],'text':JSON[_0x13b969(0x1cb)](_0x33ec9b[_0x13b969(0x1cc)])});break;}case v[_0x13b969(0x1bb)]:{const _0xe7c341=(_0xf2287=this[_0x13b969(0x1bf)]['getUnit'](_0x33ec9b[_0x13b969(0x1ae)])[_0x13b969(0x1b7)](_0x5dd2ed=>_0x5dd2ed[_0x13b969(0x1b5)]===_0x33ec9b[_0x13b969(0x1b5)]))==null?void 0x0:_0xf2287[_0x13b969(0x191)];_0xe7c341&&this[_0x13b969(0x1bf)][_0x13b969(0x1df)](_0x2ecaff,_0xd033da,_0xe7c341['id'],_0x33ec9b[_0x13b969(0x187)]===I[_0x13b969(0x1d0)]);break;}}}));}};function _0x46a5(){const _0x140e71=['personId','_httpService','forEach','_threadCommentModel','userID','ref','delete','type','_sessionService','2019552pIqcwe','stringify','4906386NRyhzs','pluginName','error','getCurrentUser','parse','content','_threadCommentDataSource','payload','map','Solved','addComment','format','UNRECOGNIZED','syncUpdateMutationToColla','filter','userId','/universer-api/user/list','replies','Edit','commentUpdate$','getUnit','subscribe','length','getUser','resolveComment','UNIVER_UNKNOWN','/list','4500485OUgXMG','getMemberID','_threadCommentDataSourceService','/edit','Delete','/reply','solved','reply','163088iVonSb','COMMENT','rangeType','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','YYYY/MM/DD\x20HH:mm','get','root','createTimestamp','code','/delete','Add','add','post','resolved','symbol','replyId','size','_initDataSource','_configService','disposeWithMe','1826136SoASEs','_injector','/add','rangeId','requireSession','pipe','saveCommentToSnapshot','slice','dataSource','_init','Unknown','OpenOrReOpen','defineProperty','7257985vZfOBA','onReady','unitId','getOwnPropertyDescriptor','addUser','/universer-api/comment/unit/','611555IseowA','customRanges','/solved','threadId','body','find','_userService','deleteComment','updateComment','Solve'];_0x46a5=function(){return _0x140e71;};return _0x46a5();}_=V([p(0x0,_0x5552fa(_0x278e6b)),p(0x1,_0x5552fa(_0x368681)),p(0x2,_0x5552fa(_0x535f39)),p(0x3,_0x5552fa(_0x3ee6f7))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x28792c(0x1af)],Q=(_0x414b89,_0x446b8e,_0x4c0c52,_0x4a2379)=>{const _0x3e08e1=_0x28792c;for(var _0x3b011e=_0x4a2379>0x1?void 0x0:_0x4a2379?k(_0x446b8e,_0x4c0c52):_0x446b8e,_0x4b25ed=_0x414b89[_0x3e08e1(0x1dd)]-0x1,_0x500275;_0x4b25ed>=0x0;_0x4b25ed--)(_0x500275=_0x414b89[_0x4b25ed])&&(_0x3b011e=_0x500275(_0x3b011e)||_0x3b011e);return _0x3b011e;},b=(_0x5bfe25,_0xc124f5)=>(_0x10b97e,_0x374d64)=>_0xc124f5(_0x10b97e,_0x374d64,_0x5bfe25);function X(_0x319657,_0x1203b9){const _0x5adcae=_0x28792c,_0xffa2af=_0x319657[_0x5adcae(0x1d8)][0x0];return{..._0x1203b9,'id':_0xffa2af['replyId'],'resolved':_0x319657[_0x5adcae(0x187)]===0x1,'dT':y(_0xffa2af['createTimestamp']),'personId':_0xffa2af[_0x5adcae(0x1d6)],'threadId':_0xffa2af[_0x5adcae(0x1b5)]};}function ee(_0x3ef88d,_0x354c62,_0x2b50a1){const _0x1e5ac1=_0x28792c;var _0x4a9c9c,_0x1fa949;if(((_0x1fa949=(_0x4a9c9c=_0x3ef88d==null?void 0x0:_0x3ef88d[_0x1e5ac1(0x1d8)])==null?void 0x0:_0x4a9c9c[_0x1e5ac1(0x1dd)])!=null?_0x1fa949:0x0)>0x0){const _0x5dcc19=(_0x474641,_0x21b627)=>({'id':_0x474641[_0x1e5ac1(0x19a)],'threadId':_0x474641[_0x1e5ac1(0x1b5)],'dT':y(_0x474641[_0x1e5ac1(0x192)]),'personId':_0x474641['userId'],'resolved':_0x3ef88d[_0x1e5ac1(0x187)]===I[_0x1e5ac1(0x1d0)],'unitId':_0x354c62,'subUnitId':_0x2b50a1,'text':JSON[_0x1e5ac1(0x1cb)](_0x474641['content']),'parentId':_0x21b627}),_0x21e8be=_0x5dcc19(_0x3ef88d[_0x1e5ac1(0x1d8)][0x0]);return{..._0x21e8be,'children':_0x3ef88d[_0x1e5ac1(0x1d8)][_0x1e5ac1(0x1a6)](0x1)[_0x1e5ac1(0x1cf)](_0x108cfd=>_0x5dcc19(_0x108cfd,_0x21e8be['id']))};}return null;}let S=class{constructor(_0x2c2c14,_0x53f13e,_0x336d7e){const _0x25acd5=_0x28792c;this[_0x25acd5(0x1bd)]=_0x2c2c14,this[_0x25acd5(0x1b8)]=_0x53f13e,this[_0x25acd5(0x1c4)]=_0x336d7e;}async[_0x28792c(0x1d1)](_0x2d78c2){const _0x30e818=_0x28792c;var _0x4251e3,_0x54cc26;const {parentId:_0x3ee6fc,unitId:_0xca5f8b,text:_0x374900,threadId:_0x6dc432}=_0x2d78c2,_0x4764ec=(_0x54cc26=(_0x4251e3=_0x374900[_0x30e818(0x1b3)])==null?void 0x0:_0x4251e3[_0x30e818(0x1d5)](_0x33a32e=>_0x33a32e[_0x30e818(0x18b)]===_0x368bee[_0x30e818(0x18a)])[_0x30e818(0x1cf)](_0x22f655=>_0x22f655[_0x30e818(0x1a2)]))!=null?_0x54cc26:[],_0x3c654a=JSON[_0x30e818(0x1c6)](_0x374900),_0x5003fa=(await this[_0x30e818(0x1c4)][_0x30e818(0x1a3)](_0xca5f8b))['getMemberID']();if(_0x3ee6fc){const _0x282797={'memberId':_0x5003fa,'unitId':_0xca5f8b,'content':_0x3c654a,'mention':_0x4764ec,'threadId':_0x6dc432},_0x3463ea=(await this[_0x30e818(0x1bd)][_0x30e818(0x197)](_0x30e818(0x1b1)+_0xca5f8b+_0x30e818(0x186),{'body':_0x282797}))['body'][_0x30e818(0x188)];return{..._0x2d78c2,'id':_0x3463ea[_0x30e818(0x19a)],'dT':_0x42d6cb(+_0x3463ea['createTimestamp'])[_0x30e818(0x1d2)](_0x30e818(0x18f)),'personId':_0x3463ea['userId']};}else{const _0x378a4b={'memberId':_0x5003fa,'unitId':_0xca5f8b,'content':_0x3c654a,'mention':_0x4764ec},_0x267fce=await this['_httpService'][_0x30e818(0x197)](_0x30e818(0x1b1)+_0xca5f8b+_0x30e818(0x1a1),{'body':_0x378a4b});return X(_0x267fce[_0x30e818(0x1b6)]['comment'],_0x2d78c2);}}async['updateComment'](_0x490db4){const _0x56b320=_0x28792c;var _0x5b4d95,_0x3aebb8;const {text:_0x200331,unitId:_0x4e397d}=_0x490db4,_0x2de75a=(_0x3aebb8=(_0x5b4d95=_0x200331[_0x56b320(0x1b3)])==null?void 0x0:_0x5b4d95[_0x56b320(0x1d5)](_0x2a66cb=>_0x2a66cb[_0x56b320(0x18b)]===_0x368bee[_0x56b320(0x18a)])[_0x56b320(0x1cf)](_0x4e5790=>_0x4e5790[_0x56b320(0x1a2)]))!=null?_0x3aebb8:[],_0x35dee8=JSON[_0x56b320(0x1c6)](_0x200331),_0x540916=_0x490db4[_0x56b320(0x1b5)],_0x1db8ea=_0x490db4['id'],_0x53857e={'memberId':(await this[_0x56b320(0x1c4)]['requireSession'](_0x4e397d))[_0x56b320(0x1e3)](),'unitId':_0x4e397d,'threadId':_0x540916,'mention':_0x2de75a,'content':_0x35dee8,'replyId':_0x1db8ea},_0x425dfc=await this[_0x56b320(0x1bd)][_0x56b320(0x197)](_0x56b320(0x1b1)+_0x4e397d+_0x56b320(0x1e5),{'body':_0x53857e});return!_0x425dfc['body']['error']||_0x425dfc['body'][_0x56b320(0x1c9)][_0x56b320(0x193)]===0x1;}async[_0x28792c(0x1df)](_0x183224){const _0x18c20a=_0x28792c,{unitId:_0x16bcae}=_0x183224,_0x171942=_0x183224[_0x18c20a(0x1b5)],_0x191790={'memberId':this[_0x18c20a(0x1b8)][_0x18c20a(0x1ca)]()[_0x18c20a(0x1c0)],'unitId':_0x16bcae,'threadId':_0x171942,'solved':_0x183224[_0x18c20a(0x198)]?I[_0x18c20a(0x1d0)]:I['OpenOrReOpen']},_0xa910f=await this[_0x18c20a(0x1bd)][_0x18c20a(0x197)](_0x18c20a(0x1b1)+_0x16bcae+_0x18c20a(0x1b4),{'body':_0x191790});return!_0xa910f[_0x18c20a(0x1b6)][_0x18c20a(0x1c9)]||_0xa910f['body'][_0x18c20a(0x1c9)][_0x18c20a(0x193)]===0x1;}async[_0x28792c(0x1b9)](_0x41aa6b,_0x59ec8b,_0x564ecf,_0x33de5e){const _0x168702=_0x28792c,_0x2408c7={'memberId':(await this[_0x168702(0x1c4)][_0x168702(0x1a3)](_0x41aa6b))[_0x168702(0x1e3)](),'threadId':_0x564ecf,'replyId':_0x33de5e,'unitId':_0x41aa6b},_0x19f4cf=await this[_0x168702(0x1bd)][_0x168702(0x197)](_0x168702(0x1b1)+_0x41aa6b+_0x168702(0x194),{'body':_0x2408c7});return!_0x19f4cf['body'][_0x168702(0x1c9)]||_0x19f4cf[_0x168702(0x1b6)][_0x168702(0x1c9)][_0x168702(0x193)]===0x1;}async['listComments'](_0x223f5c,_0xf75ea5,_0x113ca2){const _0x1d30ee=_0x28792c,_0x1ffdbf={'unitId':_0x223f5c,'threadId':_0x113ca2},_0x3d6882=await this[_0x1d30ee(0x1bd)][_0x1d30ee(0x197)](_0x1d30ee(0x1b1)+_0x223f5c+_0x1d30ee(0x1e1),{'body':_0x1ffdbf}),_0x159e9e=_0x113ca2[_0x1d30ee(0x1cf)](_0x24e3e3=>ee(_0x3d6882[_0x1d30ee(0x1b6)]['comments'][_0x24e3e3],_0x223f5c,_0xf75ea5))[_0x1d30ee(0x1d5)](Boolean);return Object['values'](_0x3d6882['body']['users'])[_0x1d30ee(0x1be)](_0x4fad27=>{const _0x491bf9=_0x1d30ee;this[_0x491bf9(0x1b8)]['addUser'](_0x4fad27);}),_0x159e9e;}[_0x28792c(0x1a5)](_0x3025f1){const _0x3da437=_0x28792c;return{'id':_0x3025f1['id'],'threadId':_0x3025f1[_0x3da437(0x1b5)],'ref':_0x3025f1[_0x3da437(0x1c1)]};}};S=Q([b(0x0,_0x5552fa(_0x2ab469)),b(0x1,_0x5552fa(_0x535f39)),b(0x2,_0x5552fa(_0x500cd9))],S);var re=Object[_0x28792c(0x1af)],te=(_0x3bfdd8,_0x5f5999,_0x13524c,_0x73d7d6)=>{for(var _0x170f43=_0x73d7d6>0x1?void 0x0:_0x73d7d6?re(_0x5f5999,_0x13524c):_0x5f5999,_0x972319=_0x3bfdd8['length']-0x1,_0x1d29e0;_0x972319>=0x0;_0x972319--)(_0x1d29e0=_0x3bfdd8[_0x972319])&&(_0x170f43=_0x1d29e0(_0x170f43)||_0x170f43);return _0x170f43;},M=(_0x135b9b,_0x28d5a8)=>(_0x490604,_0x35ffd8)=>_0x28d5a8(_0x490604,_0x35ffd8,_0x135b9b);let f=class extends _0x4e7dc4{constructor(_0x2e100a,_0x2142cb){const _0x53458f=_0x28792c;super(),this[_0x53458f(0x1e4)]=_0x2e100a,this['_threadCommentDataSource']=_0x2142cb,this[_0x53458f(0x19c)]();}['_initDataSource'](){const _0x1360a2=_0x28792c;this[_0x1360a2(0x1e4)][_0x1360a2(0x1a7)]=this[_0x1360a2(0x1cd)],this[_0x1360a2(0x1e4)][_0x1360a2(0x1d4)]=!0x1;}};f=te([M(0x0,_0x28c527),M(0x1,_0x5552fa(S))],f);var se=Object[_0x28792c(0x1ab)],oe=Object[_0x28792c(0x1af)],ne=(_0x21c4ff,_0xad48fb,_0x2b410a)=>_0xad48fb in _0x21c4ff?se(_0x21c4ff,_0xad48fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b410a}):_0x21c4ff[_0xad48fb]=_0x2b410a,ie=(_0x1a65fe,_0x1c2d22,_0x2f247c,_0x23adf4)=>{const _0x3babe0=_0x28792c;for(var _0x30aec8=_0x23adf4>0x1?void 0x0:_0x23adf4?oe(_0x1c2d22,_0x2f247c):_0x1c2d22,_0x3e12c=_0x1a65fe[_0x3babe0(0x1dd)]-0x1,_0x11e2e5;_0x3e12c>=0x0;_0x3e12c--)(_0x11e2e5=_0x1a65fe[_0x3e12c])&&(_0x30aec8=_0x11e2e5(_0x30aec8)||_0x30aec8);return _0x30aec8;},N=(_0x1ac5bf,_0x369391)=>(_0x1cc38a,_0x1a38ff)=>_0x369391(_0x1cc38a,_0x1a38ff,_0x1ac5bf),$=(_0x505570,_0x1ecb22,_0x503a27)=>ne(_0x505570,typeof _0x1ecb22!=_0x28792c(0x199)?_0x1ecb22+'':_0x1ecb22,_0x503a27);let g=class extends _0x51a888{constructor(_0x24d007=O,_0x1df087,_0xe3aacf){const _0x527dc6=_0x28792c;super(),this[_0x527dc6(0x18c)]=_0x24d007,this[_0x527dc6(0x1a0)]=_0x1df087,this[_0x527dc6(0x19d)]=_0xe3aacf;const {..._0x5e4010}=_0x37f002({},O,this[_0x527dc6(0x18c)]);this[_0x527dc6(0x19d)]['setConfig'](z,_0x5e4010);}['onStarting'](){const _0x4c10a1=_0x28792c;[[S],[f],[_]][_0x4c10a1(0x1be)](_0x1f4b2e=>{this['_injector']['add'](_0x1f4b2e);});}[_0x28792c(0x1ad)](){const _0x5e11b5=_0x28792c;this[_0x5e11b5(0x1a0)][_0x5e11b5(0x190)](f),this[_0x5e11b5(0x1a0)][_0x5e11b5(0x190)](_);}};$(g,_0x28792c(0x1c8),W),$(g,_0x28792c(0x1c3),_0x35dea2[_0x28792c(0x1e0)]),g=ie([_0x5ae564(_0x53e8cb,_0x2cedd5,_0x1c3717),N(0x1,_0x5552fa(_0x3ee6f7)),N(0x2,_0x520722)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x22a6(_0x419804,_0xdee646){const _0x31cc1a=_0x31cc();return _0x22a6=function(_0x22a686,_0x304ef3){_0x22a686=_0x22a686-0xbf;let _0x5c7ff7=_0x31cc1a[_0x22a686];return _0x5c7ff7;},_0x22a6(_0x419804,_0xdee646);}(function(_0x294f1e,_0x172fe6){const _0x3b4f1c=_0x22a6,_0x53da08=_0x294f1e();while(!![]){try{const _0x245cb3=parseInt(_0x3b4f1c(0x103))/0x1*(parseInt(_0x3b4f1c(0x126))/0x2)+parseInt(_0x3b4f1c(0xc1))/0x3+-parseInt(_0x3b4f1c(0x132))/0x4*(parseInt(_0x3b4f1c(0xf0))/0x5)+-parseInt(_0x3b4f1c(0xc0))/0x6+parseInt(_0x3b4f1c(0xf4))/0x7+-parseInt(_0x3b4f1c(0x10c))/0x8+parseInt(_0x3b4f1c(0xe6))/0x9;if(_0x245cb3===_0x172fe6)break;else _0x53da08['push'](_0x53da08['shift']());}catch(_0x407e9d){_0x53da08['push'](_0x53da08['shift']());}}}(_0x31cc,0x2b498),function(_0x59d4af,_0xa7c9fe){const _0x1f0330=_0x22a6;typeof exports==_0x1f0330(0x13b)&&typeof module<'u'?_0xa7c9fe(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1f0330(0xe3)]?define([_0x1f0330(0x141),_0x1f0330(0x100),'@univerjs-pro/license','@univerjs/core',_0x1f0330(0xc2),_0x1f0330(0x12d),_0x1f0330(0xdd),_0x1f0330(0x131)],_0xa7c9fe):(_0x59d4af=typeof globalThis<'u'?globalThis:_0x59d4af||self,_0xa7c9fe(_0x59d4af['UniverProThreadCommentDatasource']={},_0x59d4af[_0x1f0330(0x101)],_0x59d4af[_0x1f0330(0xea)],_0x59d4af[_0x1f0330(0x121)],_0x59d4af[_0x1f0330(0xc9)],_0x59d4af[_0x1f0330(0xff)],_0x59d4af[_0x1f0330(0xdd)],_0x59d4af[_0x1f0330(0x114)]));}(this,function(_0x243787,_0x502bd1,_0x202b06,_0x18f897,_0x3f5e55,_0x56d817,_0xee20,_0x3117ec){'use strict';const _0x3c178a=_0x22a6;const _0x3d4d00=_0x3c178a(0x119);var _0x357142=(_0x55d121=>(_0x55d121[_0x55d121[_0x3c178a(0x130)]=0x0]=_0x3c178a(0x130),_0x55d121[_0x55d121[_0x3c178a(0xe9)]=0x1]=_0x3c178a(0xe9),_0x55d121[_0x55d121[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x55d121))(_0x357142||{}),_0x3adca7=(_0x44e039=>(_0x44e039[_0x44e039['Unknown']=0x0]=_0x3c178a(0x110),_0x44e039[_0x44e039['Add']=0x1]='Add',_0x44e039[_0x44e039[_0x3c178a(0xc3)]=0x2]=_0x3c178a(0xc3),_0x44e039[_0x44e039[_0x3c178a(0xe2)]=0x3]=_0x3c178a(0xe2),_0x44e039[_0x44e039[_0x3c178a(0x10e)]=0x4]=_0x3c178a(0x10e),_0x44e039[_0x44e039[_0x3c178a(0x136)]=0x5]=_0x3c178a(0x136),_0x44e039[_0x44e039[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x44e039))(_0x3adca7||{});const _0x1a4050=_0x434f06=>_0x18f897[_0x3c178a(0xc8)](new Date(+_0x434f06))[_0x3c178a(0x12f)]('YYYY/MM/DD\x20HH:mm'),_0x306df8=async(_0x2e5bbf,_0x15c608)=>{const _0x36f4a3=_0x3c178a,_0x2cb2e8=_0x2e5bbf[_0x36f4a3(0xc6)](_0x18f897[_0x36f4a3(0x11d)]),_0x2be29d=_0x2e5bbf['get'](_0x3117ec[_0x36f4a3(0x138)]);_0x15c608[_0x36f4a3(0x125)](_0x3e2699=>{const _0x3b9f97=_0x36f4a3;_0x2cb2e8[_0x3b9f97(0xe1)](_0x3e2699)&&_0x15c608[_0x3b9f97(0xda)](_0x3e2699);}),_0x15c608[_0x36f4a3(0x133)]&&(await _0x2be29d[_0x36f4a3(0xc6)](_0x36f4a3(0xdb),{'params':{'userIDs':[..._0x15c608]}}))[_0x36f4a3(0xf8)][_0x36f4a3(0x12a)][_0x36f4a3(0x125)](_0x406e68=>{const _0x6e7f0b=_0x36f4a3;_0x406e68&&_0x2cb2e8[_0x6e7f0b(0xd6)](_0x406e68);});};var _0x30a999=Object['getOwnPropertyDescriptor'],_0x460654=(_0x1668c4,_0x417b4f,_0x40da8f,_0x312f99)=>{const _0x2140aa=_0x3c178a;for(var _0x2bade3=_0x312f99>0x1?void 0x0:_0x312f99?_0x30a999(_0x417b4f,_0x40da8f):_0x417b4f,_0x520a6e=_0x1668c4[_0x2140aa(0xfc)]-0x1,_0x73bb09;_0x520a6e>=0x0;_0x520a6e--)(_0x73bb09=_0x1668c4[_0x520a6e])&&(_0x2bade3=_0x73bb09(_0x2bade3)||_0x2bade3);return _0x2bade3;},_0x155543=(_0x4302ad,_0x5ec3e9)=>(_0x30f4eb,_0x1bf27b)=>_0x5ec3e9(_0x30f4eb,_0x1bf27b,_0x4302ad);let _0x167433=class extends _0x18f897['Disposable']{constructor(_0x21f979,_0x5f14a9,_0x531055,_0x39bf6d){const _0x536207=_0x3c178a;super(),this[_0x536207(0x122)]=_0x21f979,this[_0x536207(0x10f)]=_0x5f14a9,this['_userService']=_0x531055,this[_0x536207(0xc5)]=_0x39bf6d,this[_0x536207(0xf7)](),this['_initUserSync']();}['_initUserSync'](){const _0x25feb6=_0x3c178a;this[_0x25feb6(0xd9)](this[_0x25feb6(0x10f)]['commentUpdate$'][_0x25feb6(0xf1)](_0xee20['bufferTime'](0x10))[_0x25feb6(0xdf)](_0x2cfabf=>{const _0x3f8b3a=_0x25feb6,_0x17935b=new Set();_0x2cfabf[_0x3f8b3a(0x125)](_0x59e2aa=>{const _0x32f25f=_0x3f8b3a;switch(_0x59e2aa[_0x32f25f(0x11e)]){case _0x32f25f(0x104):{const _0x44a26a=_0x59e2aa[_0x32f25f(0xeb)]['personId'];_0x17935b[_0x32f25f(0x104)](_0x44a26a);break;}}}),_0x306df8(this[_0x3f8b3a(0xc5)],_0x17935b);}));}[_0x3c178a(0xf7)](){const _0x1a981b=_0x3c178a;this[_0x1a981b(0xd9)](this[_0x1a981b(0x122)]['commentUpdate$']['subscribe'](async _0x420eb4=>{const _0x2e5a47=_0x1a981b;var _0x191df1,_0xcd698b,_0x586aa2,_0x3540ea;const _0x5d1010=(_0x191df1=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])[_0x2e5a47(0x105)](_0x35ed5c=>_0x35ed5c[_0x2e5a47(0xf5)]===_0x420eb4[_0x2e5a47(0xf5)]))==null?void 0x0:_0x191df1[_0x2e5a47(0x128)];if(!_0x5d1010)return;const {unitId:_0x2ef8e5,subUnitId:_0x5db400}=_0x5d1010;switch(_0x420eb4[_0x2e5a47(0xd8)]&&this['_userService'][_0x2e5a47(0xd6)](_0x420eb4[_0x2e5a47(0xd8)]),_0x420eb4[_0x2e5a47(0x11e)]){case _0x3adca7[_0x2e5a47(0x139)]:break;case _0x3adca7['Reply']:{this['_threadCommentModel'][_0x2e5a47(0xf9)](_0x2ef8e5,_0x5db400,{'unitId':_0x2ef8e5,'subUnitId':_0x5db400,'ref':'','id':_0x420eb4[_0x2e5a47(0xcf)],'dT':_0x1a4050(+_0x420eb4[_0x2e5a47(0xe5)]),'threadId':_0x420eb4[_0x2e5a47(0xf5)],'personId':(_0x586aa2=(_0xcd698b=_0x420eb4['user'])==null?void 0x0:_0xcd698b['userID'])!=null?_0x586aa2:_0x420eb4[_0x2e5a47(0xd2)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4['content']),'parentId':_0x5d1010['id']});break;}case _0x3adca7[_0x2e5a47(0x10e)]:{const _0x1a4e40=this[_0x2e5a47(0x10f)][_0x2e5a47(0x120)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);_0x1a4e40&&_0x1a4e40[_0x2e5a47(0xe7)]&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xe4)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);break;}case _0x3adca7[_0x2e5a47(0xe2)]:{this[_0x2e5a47(0x10f)]['updateComment'](_0x2ef8e5,_0x5db400,{'commentId':_0x420eb4[_0x2e5a47(0xcf)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4[_0x2e5a47(0x129)])});break;}case _0x3adca7[_0x2e5a47(0x136)]:{const _0x2c46c5=(_0x3540ea=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])['find'](_0x5be5c0=>_0x5be5c0[_0x2e5a47(0xf5)]===_0x420eb4['threadId']))==null?void 0x0:_0x3540ea[_0x2e5a47(0x128)];_0x2c46c5&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xf3)](_0x2ef8e5,_0x5db400,_0x2c46c5['id'],_0x420eb4[_0x2e5a47(0x124)]===_0x357142[_0x2e5a47(0xe9)]);break;}}}));}};_0x167433=_0x460654([_0x155543(0x0,_0x18f897[_0x3c178a(0x123)](_0x502bd1['CommentService'])),_0x155543(0x1,_0x18f897[_0x3c178a(0x123)](_0x56d817[_0x3c178a(0xca)])),_0x155543(0x2,_0x18f897['Inject'](_0x18f897['UserManagerService'])),_0x155543(0x3,_0x18f897['Inject'](_0x18f897[_0x3c178a(0xf6)]))],_0x167433);const _0x4fafca=_0x3c178a(0x11c),_0x50de83={};var _0x44595d=Object[_0x3c178a(0x118)],_0xa0bbd0=(_0x41ef90,_0x3d07c9,_0xea53e0,_0x1e840c)=>{const _0x1d417c=_0x3c178a;for(var _0x1cecfd=_0x1e840c>0x1?void 0x0:_0x1e840c?_0x44595d(_0x3d07c9,_0xea53e0):_0x3d07c9,_0x32ff63=_0x41ef90[_0x1d417c(0xfc)]-0x1,_0x4dcbd8;_0x32ff63>=0x0;_0x32ff63--)(_0x4dcbd8=_0x41ef90[_0x32ff63])&&(_0x1cecfd=_0x4dcbd8(_0x1cecfd)||_0x1cecfd);return _0x1cecfd;},_0x3a60a8=(_0x4735c2,_0x948371)=>(_0x470f74,_0x1135bc)=>_0x948371(_0x470f74,_0x1135bc,_0x4735c2);function _0x19a2ab(_0x3b0acf,_0x2c957a){const _0x2aa4f3=_0x3c178a,_0x108b3f=_0x3b0acf[_0x2aa4f3(0xfd)][0x0];return{..._0x2c957a,'id':_0x108b3f['replyId'],'resolved':_0x3b0acf['solved']===0x1,'dT':_0x1a4050(_0x108b3f[_0x2aa4f3(0xe5)]),'personId':_0x108b3f[_0x2aa4f3(0xd2)],'threadId':_0x108b3f['threadId']};}function _0x3d4c28(_0x39a742,_0x157313,_0x2312e1){const _0x459cb6=_0x3c178a;var _0x438ff,_0x4a445c;if(((_0x4a445c=(_0x438ff=_0x39a742==null?void 0x0:_0x39a742[_0x459cb6(0xfd)])==null?void 0x0:_0x438ff['length'])!=null?_0x4a445c:0x0)>0x0){const _0x8c464f=(_0xccc072,_0x16cdd6)=>({'id':_0xccc072[_0x459cb6(0xcf)],'threadId':_0xccc072[_0x459cb6(0xf5)],'dT':_0x1a4050(_0xccc072[_0x459cb6(0xe5)]),'personId':_0xccc072[_0x459cb6(0xd2)],'resolved':_0x39a742[_0x459cb6(0x124)]===_0x357142[_0x459cb6(0xe9)],'unitId':_0x157313,'subUnitId':_0x2312e1,'text':JSON[_0x459cb6(0x112)](_0xccc072[_0x459cb6(0x129)]),'parentId':_0x16cdd6}),_0x4ca69c=_0x8c464f(_0x39a742[_0x459cb6(0xfd)][0x0]);return{..._0x4ca69c,'children':_0x39a742[_0x459cb6(0xfd)][_0x459cb6(0x13e)](0x1)[_0x459cb6(0xf2)](_0x1fa2c3=>_0x8c464f(_0x1fa2c3,_0x4ca69c['id']))};}return null;}let _0x1f8a13=class{constructor(_0x55215f,_0x17e638,_0x2254a4){const _0x3c7340=_0x3c178a;this[_0x3c7340(0x116)]=_0x55215f,this['_userService']=_0x17e638,this[_0x3c7340(0xed)]=_0x2254a4;}async['addComment'](_0x44b159){const _0x252bbd=_0x3c178a;var _0x5d50c2,_0x63c049;const {parentId:_0x5b961f,unitId:_0x7c792d,text:_0x368ab0,threadId:_0x5c5136}=_0x44b159,_0x40f682=(_0x63c049=(_0x5d50c2=_0x368ab0[_0x252bbd(0x12b)])==null?void 0x0:_0x5d50c2['filter'](_0x8f0cc7=>_0x8f0cc7['rangeType']===_0x18f897[_0x252bbd(0xfa)]['COMMENT'])['map'](_0x3338b6=>_0x3338b6[_0x252bbd(0x12e)]))!=null?_0x63c049:[],_0x43cbd1=JSON[_0x252bbd(0x107)](_0x368ab0),_0x8b1753=(await this['_sessionService'][_0x252bbd(0xd4)](_0x7c792d))[_0x252bbd(0xd5)]();if(_0x5b961f){const _0x2bd84a={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682,'threadId':_0x5c5136},_0x1bc25a=(await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+'/reply',{'body':_0x2bd84a}))['body'][_0x252bbd(0x12c)];return{..._0x44b159,'id':_0x1bc25a[_0x252bbd(0xcf)],'dT':_0x18f897['dayjs'](+_0x1bc25a[_0x252bbd(0xe5)])[_0x252bbd(0x12f)](_0x252bbd(0x127)),'personId':_0x1bc25a[_0x252bbd(0xd2)]};}else{const _0x31ac71={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682},_0xe6c72c=await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+_0x252bbd(0x13f),{'body':_0x31ac71});return _0x19a2ab(_0xe6c72c['body'][_0x252bbd(0xcd)],_0x44b159);}}async[_0x3c178a(0xef)](_0x5b311e){const _0x6f7536=_0x3c178a;var _0x18a316,_0x580694;const {text:_0xe8ae00,unitId:_0xda708c}=_0x5b311e,_0x20e6e4=(_0x580694=(_0x18a316=_0xe8ae00[_0x6f7536(0x12b)])==null?void 0x0:_0x18a316[_0x6f7536(0x134)](_0x167e5c=>_0x167e5c[_0x6f7536(0x10b)]===_0x18f897[_0x6f7536(0xfa)]['COMMENT'])['map'](_0x13ed50=>_0x13ed50[_0x6f7536(0x12e)]))!=null?_0x580694:[],_0x148540=JSON[_0x6f7536(0x107)](_0xe8ae00),_0x2c0c54=_0x5b311e[_0x6f7536(0xf5)],_0x13449c=_0x5b311e['id'],_0x5776ed={'memberId':(await this[_0x6f7536(0xed)]['requireSession'](_0xda708c))[_0x6f7536(0xd5)](),'unitId':_0xda708c,'threadId':_0x2c0c54,'mention':_0x20e6e4,'content':_0x148540,'replyId':_0x13449c},_0x131f98=await this[_0x6f7536(0x116)][_0x6f7536(0xd0)](_0x6f7536(0x10a)+_0xda708c+_0x6f7536(0x108),{'body':_0x5776ed});return!_0x131f98[_0x6f7536(0xf8)]['error']||_0x131f98['body'][_0x6f7536(0x11f)][_0x6f7536(0x13d)]===0x1;}async[_0x3c178a(0xf3)](_0x169833){const _0x1c757e=_0x3c178a,{unitId:_0x4403d6}=_0x169833,_0x98012d=_0x169833[_0x1c757e(0xf5)],_0x1b77d7={'memberId':this['_userService'][_0x1c757e(0x142)]()[_0x1c757e(0xdc)],'unitId':_0x4403d6,'threadId':_0x98012d,'solved':_0x169833[_0x1c757e(0xd3)]?_0x357142[_0x1c757e(0xe9)]:_0x357142[_0x1c757e(0x130)]},_0x25c586=await this[_0x1c757e(0x116)]['post']('/universer-api/comment/unit/'+_0x4403d6+_0x1c757e(0x140),{'body':_0x1b77d7});return!_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]||_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]['code']===0x1;}async[_0x3c178a(0xe4)](_0x925fb6,_0x4821d8,_0x2b93b3,_0x2d2e9b){const _0x3c57ba=_0x3c178a,_0x1ea47c={'memberId':(await this['_sessionService'][_0x3c57ba(0xd4)](_0x925fb6))[_0x3c57ba(0xd5)](),'threadId':_0x2b93b3,'replyId':_0x2d2e9b,'unitId':_0x925fb6},_0x191ac7=await this[_0x3c57ba(0x116)]['post'](_0x3c57ba(0x10a)+_0x925fb6+'/delete',{'body':_0x1ea47c});return!_0x191ac7[_0x3c57ba(0xf8)][_0x3c57ba(0x11f)]||_0x191ac7[_0x3c57ba(0xf8)]['error'][_0x3c57ba(0x13d)]===0x1;}async[_0x3c178a(0x109)](_0x5931d0,_0x2f9e4a,_0x1fa66b){const _0x3e1e22=_0x3c178a,_0x4213a5={'unitId':_0x5931d0,'threadId':_0x1fa66b},_0x73be5b=await this[_0x3e1e22(0x116)][_0x3e1e22(0xd0)]('/universer-api/comment/unit/'+_0x5931d0+_0x3e1e22(0x13a),{'body':_0x4213a5}),_0x3f7678=_0x1fa66b[_0x3e1e22(0xf2)](_0x5ed43d=>_0x3d4c28(_0x73be5b[_0x3e1e22(0xf8)][_0x3e1e22(0x13c)][_0x5ed43d],_0x5931d0,_0x2f9e4a))[_0x3e1e22(0x134)](Boolean);return Object[_0x3e1e22(0x106)](_0x73be5b['body'][_0x3e1e22(0x12a)])[_0x3e1e22(0x125)](_0x625c5=>{const _0x668594=_0x3e1e22;this[_0x668594(0xfe)]['addUser'](_0x625c5);}),_0x3f7678;}[_0x3c178a(0xce)](_0x14b099){const _0x5d6050=_0x3c178a;return{'id':_0x14b099['id'],'threadId':_0x14b099[_0x5d6050(0xf5)],'ref':_0x14b099['ref']};}};_0x1f8a13=_0xa0bbd0([_0x3a60a8(0x0,_0x18f897[_0x3c178a(0x123)](_0x3117ec[_0x3c178a(0x138)])),_0x3a60a8(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897['UserManagerService'])),_0x3a60a8(0x2,_0x18f897['Inject'](_0x502bd1[_0x3c178a(0xd7)]))],_0x1f8a13);var _0xeb0d32=Object[_0x3c178a(0x118)],_0x5a8a9f=(_0x242a39,_0x2252a0,_0x39f488,_0x12a6ed)=>{const _0x224115=_0x3c178a;for(var _0x599f93=_0x12a6ed>0x1?void 0x0:_0x12a6ed?_0xeb0d32(_0x2252a0,_0x39f488):_0x2252a0,_0x3584b9=_0x242a39[_0x224115(0xfc)]-0x1,_0x308ba4;_0x3584b9>=0x0;_0x3584b9--)(_0x308ba4=_0x242a39[_0x3584b9])&&(_0x599f93=_0x308ba4(_0x599f93)||_0x599f93);return _0x599f93;},_0x3acd58=(_0x22f0a1,_0x3e9633)=>(_0x2f67e2,_0x1f0ae7)=>_0x3e9633(_0x2f67e2,_0x1f0ae7,_0x22f0a1);let _0x30438a=class extends _0x18f897[_0x3c178a(0x111)]{constructor(_0x3654c7,_0x1f48f0){const _0x5e636b=_0x3c178a;super(),this[_0x5e636b(0x11a)]=_0x3654c7,this['_threadCommentDataSource']=_0x1f48f0,this[_0x5e636b(0xec)]();}['_initDataSource'](){const _0x2ab420=_0x3c178a;this[_0x2ab420(0x11a)][_0x2ab420(0xde)]=this[_0x2ab420(0x113)],this[_0x2ab420(0x11a)][_0x2ab420(0xe8)]=!0x1;}};_0x30438a=_0x5a8a9f([_0x3acd58(0x0,_0x56d817['IThreadCommentDataSourceService']),_0x3acd58(0x1,_0x18f897[_0x3c178a(0x123)](_0x1f8a13))],_0x30438a);var _0x2d9d46=Object[_0x3c178a(0xc7)],_0x385914=Object[_0x3c178a(0x118)],_0x38067e=(_0x4daafd,_0x497a27,_0x4734c5)=>_0x497a27 in _0x4daafd?_0x2d9d46(_0x4daafd,_0x497a27,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4734c5}):_0x4daafd[_0x497a27]=_0x4734c5,_0x46b08a=(_0x1ec1ca,_0x518719,_0x202a3e,_0xe98453)=>{const _0x3ba571=_0x3c178a;for(var _0x2149f0=_0xe98453>0x1?void 0x0:_0xe98453?_0x385914(_0x518719,_0x202a3e):_0x518719,_0x5da5d0=_0x1ec1ca[_0x3ba571(0xfc)]-0x1,_0x3e4c63;_0x5da5d0>=0x0;_0x5da5d0--)(_0x3e4c63=_0x1ec1ca[_0x5da5d0])&&(_0x2149f0=_0x3e4c63(_0x2149f0)||_0x2149f0);return _0x2149f0;},_0x42334c=(_0x35c083,_0x1861b9)=>(_0x11d970,_0x577ed3)=>_0x1861b9(_0x11d970,_0x577ed3,_0x35c083),_0x6549fc=(_0x366b18,_0x30557d,_0x56b8b0)=>_0x38067e(_0x366b18,typeof _0x30557d!='symbol'?_0x30557d+'':_0x30557d,_0x56b8b0);_0x243787['UniverThreadCommentDataSourcePlugin']=class extends _0x18f897[_0x3c178a(0xcb)]{constructor(_0x36e243=_0x50de83,_0x53c994,_0x3b0fa5){const _0x10c369=_0x3c178a;super(),this[_0x10c369(0x11b)]=_0x36e243,this[_0x10c369(0xc5)]=_0x53c994,this[_0x10c369(0xee)]=_0x3b0fa5;const {..._0x18ab64}=_0x18f897['merge']({},_0x50de83,this[_0x10c369(0x11b)]);this[_0x10c369(0xee)]['setConfig'](_0x4fafca,_0x18ab64);}[_0x3c178a(0x137)](){const _0x3fb8f2=_0x3c178a;[[_0x1f8a13],[_0x30438a],[_0x167433]][_0x3fb8f2(0x125)](_0x4231e9=>{const _0x58be02=_0x3fb8f2;this['_injector'][_0x58be02(0x104)](_0x4231e9);});}[_0x3c178a(0x135)](){const _0x142dfc=_0x3c178a;this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x30438a),this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x167433);}},_0x6549fc(_0x243787[_0x3c178a(0xc4)],'pluginName',_0x3d4d00),_0x6549fc(_0x243787[_0x3c178a(0xc4)],_0x3c178a(0x11e),_0x18f897['UniverInstanceType'][_0x3c178a(0xe0)]),_0x243787['UniverThreadCommentDataSourcePlugin']=_0x46b08a([_0x18f897[_0x3c178a(0x117)](_0x3f5e55[_0x3c178a(0x115)],_0x502bd1[_0x3c178a(0xfb)],_0x202b06[_0x3c178a(0x143)]),_0x42334c(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897[_0x3c178a(0xf6)])),_0x42334c(0x2,_0x18f897[_0x3c178a(0xd1)])],_0x243787[_0x3c178a(0xc4)]),Object[_0x3c178a(0xc7)](_0x243787,Symbol['toStringTag'],{'value':_0x3c178a(0x102)});}));function _0x31cc(){const _0x55ee7d=['getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','_config','thread-comment-data-source.config','UserManagerService','type','error','getComment','UniverCore','_commentService','Inject','solved','forEach','2jROPFk','YYYY/MM/DD\x20HH:mm','root','content','users','customRanges','reply','@univerjs/thread-comment','rangeId','format','OpenOrReOpen','@univerjs/network','236GccEAp','size','filter','onReady','Solve','onStarting','HTTPService','Add','/list','object','comments','code','slice','/add','/solved','exports','getCurrentUser','UniverLicensePlugin','unitId','212712LwDaPB','55143YgVmbC','@univerjs/thread-comment-ui','Reply','UniverThreadCommentDataSourcePlugin','_injector','get','defineProperty','dayjs','UniverThreadCommentUi','ThreadCommentModel','Plugin','UNRECOGNIZED','comment','saveCommentToSnapshot','replyId','post','IConfigService','userId','resolved','requireSession','getMemberID','addUser','CollaborationSessionService','user','disposeWithMe','delete','/universer-api/user/list','userID','rxjs','dataSource','subscribe','UNIVER_UNKNOWN','getUser','Edit','amd','deleteComment','createTimestamp','4066857PdarRv','parentId','syncUpdateMutationToColla','Solved','UniverProLicense','payload','_initDataSource','_sessionService','_configService','updateComment','12235RfoFHZ','pipe','map','resolveComment','432068hngZzF','threadId','Injector','_init','body','addComment','CustomRangeType','UniverCollaborationClientPlugin','length','replies','_userService','UniverThreadComment','@univerjs-pro/collaboration-client','UniverProCollaborationClient','Module','109189vzjuoy','add','find','values','stringify','/edit','listComments','/universer-api/comment/unit/','rangeType','2272304pVWhGL','getUnit','Delete','_threadCommentModel','Unknown','Disposable','parse','_threadCommentDataSource','UniverNetwork','UniverThreadCommentUIPlugin','_httpService','DependentOn'];_0x31cc=function(){return _0x55ee7d;};return _0x31cc();}
1
+ function _0x4bfe(){const _0x54d436=['Injector','code','_injector','reply','UniverThreadCommentUi','function','getUser','_init','UserManagerService','IConfigService','@univerjs/network','12643227MctafB','subscribe','size','threadId','root','amd','find','forEach','CustomRangeType','getUnit','Delete','_configService','filter','COMMENT','getCurrentUser','ref','dataSource','CommentService','comments','Solved','Unknown','UNRECOGNIZED','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','40806elnIcI','/edit','Module','_config','parse','type','solved','UniverLicensePlugin','UNIVER_UNKNOWN','getMemberID','_userService','_sessionService','OpenOrReOpen','stringify','/universer-api/comment/unit/','rangeType','Disposable','_initDataSource','onStarting','/add','_threadCommentDataSourceService','comment','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','content','getOwnPropertyDescriptor','length','replyId','38485vLoZVG','object','updateComment','_commentService','_initUserSync','slice','_threadCommentModel','Edit','parentId','185RIeMSU','/universer-api/user/list','@univerjs-pro/license','userID','users','Reply','Plugin','customRanges','toStringTag','error','HTTPService','disposeWithMe','337074pINwva','get','personId','add','map','7120SPevBO','rangeId','DependentOn','UniverThreadCommentUIPlugin','_httpService','rxjs','UniverProCollaborationClient','1710rQMZtg','onReady','replies','getComment','UniverProThreadCommentDatasource','addUser','payload','Inject','5364674HCeoOX','UniverProLicense','requireSession','exports','commentUpdate$','_threadCommentDataSource','body','Solve','format','addComment','UniverThreadComment','UniverNetwork','delete','Add','bufferTime','7776680WdYMRB','defineProperty','resolved','userId','createTimestamp','listComments','unitId','user','@univerjs/thread-comment-ui','UniverThreadCommentDataSourcePlugin','UniverInstanceType','deleteComment','post'];_0x4bfe=function(){return _0x54d436;};return _0x4bfe();}function _0xbb26(_0x235b88,_0x20d52b){const _0x4bfec5=_0x4bfe();return _0xbb26=function(_0xbb260f,_0x4ae5fe){_0xbb260f=_0xbb260f-0x86;let _0x271e02=_0x4bfec5[_0xbb260f];return _0x271e02;},_0xbb26(_0x235b88,_0x20d52b);}(function(_0x563956,_0x6e3a38){const _0x45e50d=_0xbb26,_0x150037=_0x563956();while(!![]){try{const _0x6e4cb4=-parseInt(_0x45e50d(0xfb))/0x1+parseInt(_0x45e50d(0x8b))/0x2+-parseInt(_0x45e50d(0x97))/0x3*(-parseInt(_0x45e50d(0x90))/0x4)+-parseInt(_0x45e50d(0x104))/0x5*(parseInt(_0x45e50d(0xdf))/0x6)+-parseInt(_0x45e50d(0x9f))/0x7+-parseInt(_0x45e50d(0xae))/0x8+parseInt(_0x45e50d(0xc6))/0x9;if(_0x6e4cb4===_0x6e3a38)break;else _0x150037['push'](_0x150037['shift']());}catch(_0x13d255){_0x150037['push'](_0x150037['shift']());}}}(_0x4bfe,0x888f7),function(_0x17d692,_0x3b512f){const _0x145b43=_0xbb26;typeof exports==_0x145b43(0xfc)&&typeof module<'u'?_0x3b512f(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x145b43(0xc0)&&define[_0x145b43(0xcb)]?define([_0x145b43(0xa2),'@univerjs-pro/collaboration-client',_0x145b43(0x106),'@univerjs/core',_0x145b43(0xb6),_0x145b43(0xf6),_0x145b43(0x95),_0x145b43(0xc5)],_0x3b512f):(_0x17d692=typeof globalThis<'u'?globalThis:_0x17d692||self,_0x3b512f(_0x17d692[_0x145b43(0x9b)]={},_0x17d692[_0x145b43(0x96)],_0x17d692[_0x145b43(0xa0)],_0x17d692['UniverCore'],_0x17d692[_0x145b43(0xbf)],_0x17d692[_0x145b43(0xa9)],_0x17d692['rxjs'],_0x17d692[_0x145b43(0xaa)]));}(this,function(_0x12d985,_0x1f59dc,_0x79183c,_0x3660bf,_0x545869,_0x390328,_0x36f763,_0x38add4){'use strict';const _0x434598=_0xbb26;const _0x2459ed=_0x434598(0xdd);var _0x5a2a34=(_0x36482a=>(_0x36482a[_0x36482a[_0x434598(0xeb)]=0x0]='OpenOrReOpen',_0x36482a[_0x36482a['Solved']=0x1]=_0x434598(0xd9),_0x36482a[_0x36482a['UNRECOGNIZED']=-0x1]=_0x434598(0xdb),_0x36482a))(_0x5a2a34||{}),_0x36bf08=(_0x513ca9=>(_0x513ca9[_0x513ca9[_0x434598(0xda)]=0x0]='Unknown',_0x513ca9[_0x513ca9[_0x434598(0xac)]=0x1]=_0x434598(0xac),_0x513ca9[_0x513ca9[_0x434598(0x109)]=0x2]='Reply',_0x513ca9[_0x513ca9[_0x434598(0x102)]=0x3]=_0x434598(0x102),_0x513ca9[_0x513ca9[_0x434598(0xd0)]=0x4]=_0x434598(0xd0),_0x513ca9[_0x513ca9['Solve']=0x5]='Solve',_0x513ca9[_0x513ca9[_0x434598(0xdb)]=-0x1]=_0x434598(0xdb),_0x513ca9))(_0x36bf08||{});const _0x303a6a=_0x4af91f=>_0x3660bf['dayjs'](new Date(+_0x4af91f))[_0x434598(0xa7)](_0x434598(0xf5)),_0x3d8dad=async(_0x31015f,_0x252109)=>{const _0x3cf85d=_0x434598,_0x3c6393=_0x31015f[_0x3cf85d(0x8c)](_0x3660bf[_0x3cf85d(0xc3)]),_0xafb3e9=_0x31015f['get'](_0x38add4[_0x3cf85d(0x89)]);_0x252109[_0x3cf85d(0xcd)](_0x2f7b1b=>{const _0x42c276=_0x3cf85d;_0x3c6393[_0x42c276(0xc1)](_0x2f7b1b)&&_0x252109[_0x42c276(0xab)](_0x2f7b1b);}),_0x252109[_0x3cf85d(0xc8)]&&(await _0xafb3e9[_0x3cf85d(0x8c)](_0x3cf85d(0x105),{'params':{'userIDs':[..._0x252109]}}))[_0x3cf85d(0xa5)][_0x3cf85d(0x108)][_0x3cf85d(0xcd)](_0x2de8a5=>{const _0xb20edb=_0x3cf85d;_0x2de8a5&&_0x3c6393[_0xb20edb(0x9c)](_0x2de8a5);});};var _0xb52b41=Object[_0x434598(0xf8)],_0x4bcab8=(_0x3f7695,_0x348f22,_0x58c3f5,_0x3f81cc)=>{const _0x43c41e=_0x434598;for(var _0x339fe4=_0x3f81cc>0x1?void 0x0:_0x3f81cc?_0xb52b41(_0x348f22,_0x58c3f5):_0x348f22,_0x26a423=_0x3f7695[_0x43c41e(0xf9)]-0x1,_0x34bd9c;_0x26a423>=0x0;_0x26a423--)(_0x34bd9c=_0x3f7695[_0x26a423])&&(_0x339fe4=_0x34bd9c(_0x339fe4)||_0x339fe4);return _0x339fe4;},_0x5c35bb=(_0x26b659,_0x4cd5db)=>(_0x5831f3,_0x350bf9)=>_0x4cd5db(_0x5831f3,_0x350bf9,_0x26b659);let _0x309e4e=class extends _0x3660bf['Disposable']{constructor(_0x58d5ed,_0xbb41df,_0x94e02e,_0x3a848e){const _0x3bdfe1=_0x434598;super(),this[_0x3bdfe1(0xfe)]=_0x58d5ed,this[_0x3bdfe1(0x101)]=_0xbb41df,this[_0x3bdfe1(0xe9)]=_0x94e02e,this['_injector']=_0x3a848e,this['_init'](),this[_0x3bdfe1(0xff)]();}['_initUserSync'](){const _0x2b3f71=_0x434598;this['disposeWithMe'](this[_0x2b3f71(0x101)]['commentUpdate$']['pipe'](_0x36f763[_0x2b3f71(0xad)](0x10))[_0x2b3f71(0xc7)](_0x1eed73=>{const _0x4d9b6a=_0x2b3f71,_0x54850d=new Set();_0x1eed73[_0x4d9b6a(0xcd)](_0x571445=>{const _0x4ed4a0=_0x4d9b6a;switch(_0x571445[_0x4ed4a0(0xe4)]){case _0x4ed4a0(0x8e):{const _0x3272ea=_0x571445[_0x4ed4a0(0x9d)][_0x4ed4a0(0x8d)];_0x54850d[_0x4ed4a0(0x8e)](_0x3272ea);break;}}}),_0x3d8dad(this['_injector'],_0x54850d);}));}[_0x434598(0xc2)](){const _0x249151=_0x434598;this[_0x249151(0x8a)](this[_0x249151(0xfe)][_0x249151(0xa3)]['subscribe'](async _0x191cec=>{const _0x4e36f8=_0x249151;var _0x481eca,_0x58b069,_0x3b279d,_0x29a66b;const _0x2a02bc=(_0x481eca=this['_threadCommentModel'][_0x4e36f8(0xcf)](_0x191cec[_0x4e36f8(0xb4)])[_0x4e36f8(0xcc)](_0x42a9b6=>_0x42a9b6['threadId']===_0x191cec[_0x4e36f8(0xc9)]))==null?void 0x0:_0x481eca[_0x4e36f8(0xca)];if(!_0x2a02bc)return;const {unitId:_0x1b206b,subUnitId:_0x4f51f3}=_0x2a02bc;switch(_0x191cec[_0x4e36f8(0xb5)]&&this['_userService']['addUser'](_0x191cec['user']),_0x191cec['type']){case _0x36bf08['Add']:break;case _0x36bf08['Reply']:{this['_threadCommentModel'][_0x4e36f8(0xa8)](_0x1b206b,_0x4f51f3,{'unitId':_0x1b206b,'subUnitId':_0x4f51f3,'ref':'','id':_0x191cec['replyId'],'dT':_0x303a6a(+_0x191cec[_0x4e36f8(0xb2)]),'threadId':_0x191cec['threadId'],'personId':(_0x3b279d=(_0x58b069=_0x191cec[_0x4e36f8(0xb5)])==null?void 0x0:_0x58b069[_0x4e36f8(0x107)])!=null?_0x3b279d:_0x191cec[_0x4e36f8(0xb1)],'text':JSON['parse'](_0x191cec[_0x4e36f8(0xf7)]),'parentId':_0x2a02bc['id']});break;}case _0x36bf08[_0x4e36f8(0xd0)]:{const _0x18ff6=this[_0x4e36f8(0x101)][_0x4e36f8(0x9a)](_0x1b206b,_0x4f51f3,_0x191cec[_0x4e36f8(0xfa)]);_0x18ff6&&_0x18ff6[_0x4e36f8(0x103)]&&this[_0x4e36f8(0x101)][_0x4e36f8(0xb9)](_0x1b206b,_0x4f51f3,_0x191cec[_0x4e36f8(0xfa)]);break;}case _0x36bf08[_0x4e36f8(0x102)]:{this[_0x4e36f8(0x101)][_0x4e36f8(0xfd)](_0x1b206b,_0x4f51f3,{'commentId':_0x191cec[_0x4e36f8(0xfa)],'text':JSON[_0x4e36f8(0xe3)](_0x191cec[_0x4e36f8(0xf7)])});break;}case _0x36bf08[_0x4e36f8(0xa6)]:{const _0x38ad7c=(_0x29a66b=this[_0x4e36f8(0x101)][_0x4e36f8(0xcf)](_0x191cec['unitId'])[_0x4e36f8(0xcc)](_0x315e22=>_0x315e22[_0x4e36f8(0xc9)]===_0x191cec[_0x4e36f8(0xc9)]))==null?void 0x0:_0x29a66b[_0x4e36f8(0xca)];_0x38ad7c&&this[_0x4e36f8(0x101)]['resolveComment'](_0x1b206b,_0x4f51f3,_0x38ad7c['id'],_0x191cec[_0x4e36f8(0xe5)]===_0x5a2a34[_0x4e36f8(0xd9)]);break;}}}));}};_0x309e4e=_0x4bcab8([_0x5c35bb(0x0,_0x3660bf['Inject'](_0x1f59dc[_0x434598(0xd7)])),_0x5c35bb(0x1,_0x3660bf[_0x434598(0x9e)](_0x390328['ThreadCommentModel'])),_0x5c35bb(0x2,_0x3660bf[_0x434598(0x9e)](_0x3660bf[_0x434598(0xc3)])),_0x5c35bb(0x3,_0x3660bf[_0x434598(0x9e)](_0x3660bf[_0x434598(0xbb)]))],_0x309e4e);const _0x278f10='thread-comment-data-source.config',_0x3566b0={};var _0x23d258=Object[_0x434598(0xf8)],_0x258fa1=(_0x3fc7b8,_0x5338b1,_0x439b13,_0x52b490)=>{const _0x327ad1=_0x434598;for(var _0x34728b=_0x52b490>0x1?void 0x0:_0x52b490?_0x23d258(_0x5338b1,_0x439b13):_0x5338b1,_0x389462=_0x3fc7b8[_0x327ad1(0xf9)]-0x1,_0x2e3ca7;_0x389462>=0x0;_0x389462--)(_0x2e3ca7=_0x3fc7b8[_0x389462])&&(_0x34728b=_0x2e3ca7(_0x34728b)||_0x34728b);return _0x34728b;},_0xcadb1a=(_0x41e0ac,_0x3c766a)=>(_0x2d2aed,_0x421a21)=>_0x3c766a(_0x2d2aed,_0x421a21,_0x41e0ac);function _0x516810(_0x3afddf,_0x182f0a){const _0x51c607=_0x434598,_0x2ad357=_0x3afddf[_0x51c607(0x99)][0x0];return{..._0x182f0a,'id':_0x2ad357['replyId'],'resolved':_0x3afddf['solved']===0x1,'dT':_0x303a6a(_0x2ad357[_0x51c607(0xb2)]),'personId':_0x2ad357[_0x51c607(0xb1)],'threadId':_0x2ad357['threadId']};}function _0x53d249(_0x4be5aa,_0x595885,_0x21c051){const _0x416cbc=_0x434598;var _0x53e310,_0x54dc7c;if(((_0x54dc7c=(_0x53e310=_0x4be5aa==null?void 0x0:_0x4be5aa[_0x416cbc(0x99)])==null?void 0x0:_0x53e310[_0x416cbc(0xf9)])!=null?_0x54dc7c:0x0)>0x0){const _0x38a98a=(_0x49213e,_0x5a2b34)=>({'id':_0x49213e[_0x416cbc(0xfa)],'threadId':_0x49213e[_0x416cbc(0xc9)],'dT':_0x303a6a(_0x49213e[_0x416cbc(0xb2)]),'personId':_0x49213e['userId'],'resolved':_0x4be5aa[_0x416cbc(0xe5)]===_0x5a2a34[_0x416cbc(0xd9)],'unitId':_0x595885,'subUnitId':_0x21c051,'text':JSON[_0x416cbc(0xe3)](_0x49213e[_0x416cbc(0xf7)]),'parentId':_0x5a2b34}),_0x51d23a=_0x38a98a(_0x4be5aa[_0x416cbc(0x99)][0x0]);return{..._0x51d23a,'children':_0x4be5aa[_0x416cbc(0x99)][_0x416cbc(0x100)](0x1)['map'](_0x5fdfc=>_0x38a98a(_0x5fdfc,_0x51d23a['id']))};}return null;}let _0x4a06a0=class{constructor(_0x1b6e09,_0x4064d4,_0x54d0e8){const _0x3a7138=_0x434598;this['_httpService']=_0x1b6e09,this[_0x3a7138(0xe9)]=_0x4064d4,this[_0x3a7138(0xea)]=_0x54d0e8;}async[_0x434598(0xa8)](_0x41351a){const _0x306a37=_0x434598;var _0x26c2dc,_0x4cb89e;const {parentId:_0x596545,unitId:_0x535cf1,text:_0x216b08,threadId:_0x513d2e}=_0x41351a,_0x1873a8=(_0x4cb89e=(_0x26c2dc=_0x216b08[_0x306a37(0x86)])==null?void 0x0:_0x26c2dc[_0x306a37(0xd2)](_0x3d5063=>_0x3d5063['rangeType']===_0x3660bf[_0x306a37(0xce)][_0x306a37(0xd3)])[_0x306a37(0x8f)](_0x138b6a=>_0x138b6a[_0x306a37(0x91)]))!=null?_0x4cb89e:[],_0x279876=JSON[_0x306a37(0xec)](_0x216b08),_0x347a6b=(await this[_0x306a37(0xea)][_0x306a37(0xa1)](_0x535cf1))[_0x306a37(0xe8)]();if(_0x596545){const _0x151c0b={'memberId':_0x347a6b,'unitId':_0x535cf1,'content':_0x279876,'mention':_0x1873a8,'threadId':_0x513d2e},_0x5ac2a3=(await this['_httpService'][_0x306a37(0xba)](_0x306a37(0xed)+_0x535cf1+'/reply',{'body':_0x151c0b}))[_0x306a37(0xa5)][_0x306a37(0xbe)];return{..._0x41351a,'id':_0x5ac2a3[_0x306a37(0xfa)],'dT':_0x3660bf['dayjs'](+_0x5ac2a3[_0x306a37(0xb2)])[_0x306a37(0xa7)](_0x306a37(0xf5)),'personId':_0x5ac2a3[_0x306a37(0xb1)]};}else{const _0x2243a0={'memberId':_0x347a6b,'unitId':_0x535cf1,'content':_0x279876,'mention':_0x1873a8},_0x58512f=await this[_0x306a37(0x94)][_0x306a37(0xba)](_0x306a37(0xed)+_0x535cf1+_0x306a37(0xf2),{'body':_0x2243a0});return _0x516810(_0x58512f[_0x306a37(0xa5)][_0x306a37(0xf4)],_0x41351a);}}async[_0x434598(0xfd)](_0x220dfd){const _0x53645d=_0x434598;var _0x317298,_0x4dafb1;const {text:_0x5a31a8,unitId:_0x50b6ac}=_0x220dfd,_0x375bb0=(_0x4dafb1=(_0x317298=_0x5a31a8[_0x53645d(0x86)])==null?void 0x0:_0x317298[_0x53645d(0xd2)](_0x5eb75b=>_0x5eb75b[_0x53645d(0xee)]===_0x3660bf['CustomRangeType'][_0x53645d(0xd3)])[_0x53645d(0x8f)](_0x287d06=>_0x287d06[_0x53645d(0x91)]))!=null?_0x4dafb1:[],_0x5cbfcb=JSON[_0x53645d(0xec)](_0x5a31a8),_0x3f9866=_0x220dfd[_0x53645d(0xc9)],_0x383e9d=_0x220dfd['id'],_0x1278b3={'memberId':(await this['_sessionService'][_0x53645d(0xa1)](_0x50b6ac))[_0x53645d(0xe8)](),'unitId':_0x50b6ac,'threadId':_0x3f9866,'mention':_0x375bb0,'content':_0x5cbfcb,'replyId':_0x383e9d},_0x5734ae=await this[_0x53645d(0x94)]['post'](_0x53645d(0xed)+_0x50b6ac+_0x53645d(0xe0),{'body':_0x1278b3});return!_0x5734ae[_0x53645d(0xa5)][_0x53645d(0x88)]||_0x5734ae[_0x53645d(0xa5)]['error'][_0x53645d(0xbc)]===0x1;}async['resolveComment'](_0x4a6b82){const _0x15c452=_0x434598,{unitId:_0x4c4a30}=_0x4a6b82,_0x2e0c56=_0x4a6b82['threadId'],_0x140fb3={'memberId':this[_0x15c452(0xe9)][_0x15c452(0xd4)]()['userID'],'unitId':_0x4c4a30,'threadId':_0x2e0c56,'solved':_0x4a6b82[_0x15c452(0xb0)]?_0x5a2a34['Solved']:_0x5a2a34[_0x15c452(0xeb)]},_0x21c977=await this[_0x15c452(0x94)][_0x15c452(0xba)](_0x15c452(0xed)+_0x4c4a30+'/solved',{'body':_0x140fb3});return!_0x21c977[_0x15c452(0xa5)][_0x15c452(0x88)]||_0x21c977[_0x15c452(0xa5)]['error']['code']===0x1;}async[_0x434598(0xb9)](_0x2a79e6,_0x7ca4f2,_0x3a00ca,_0x4031bc){const _0x2a3500=_0x434598,_0x29b6ba={'memberId':(await this[_0x2a3500(0xea)][_0x2a3500(0xa1)](_0x2a79e6))[_0x2a3500(0xe8)](),'threadId':_0x3a00ca,'replyId':_0x4031bc,'unitId':_0x2a79e6},_0xb37214=await this[_0x2a3500(0x94)][_0x2a3500(0xba)](_0x2a3500(0xed)+_0x2a79e6+'/delete',{'body':_0x29b6ba});return!_0xb37214[_0x2a3500(0xa5)][_0x2a3500(0x88)]||_0xb37214[_0x2a3500(0xa5)]['error'][_0x2a3500(0xbc)]===0x1;}async[_0x434598(0xb3)](_0x4b93f7,_0x1ad8d4,_0x1146c7){const _0x5d1204=_0x434598,_0x552726={'unitId':_0x4b93f7,'threadId':_0x1146c7},_0x2385f1=await this['_httpService'][_0x5d1204(0xba)](_0x5d1204(0xed)+_0x4b93f7+'/list',{'body':_0x552726}),_0x4eb051=_0x1146c7[_0x5d1204(0x8f)](_0xe4cb11=>_0x53d249(_0x2385f1[_0x5d1204(0xa5)][_0x5d1204(0xd8)][_0xe4cb11],_0x4b93f7,_0x1ad8d4))['filter'](Boolean);return Object[_0x5d1204(0xde)](_0x2385f1[_0x5d1204(0xa5)][_0x5d1204(0x108)])[_0x5d1204(0xcd)](_0x1a8a0f=>{const _0x4c362b=_0x5d1204;this['_userService'][_0x4c362b(0x9c)](_0x1a8a0f);}),_0x4eb051;}['saveCommentToSnapshot'](_0x3d5f90){const _0x4be649=_0x434598;return{'id':_0x3d5f90['id'],'threadId':_0x3d5f90['threadId'],'ref':_0x3d5f90[_0x4be649(0xd5)]};}};_0x4a06a0=_0x258fa1([_0xcadb1a(0x0,_0x3660bf[_0x434598(0x9e)](_0x38add4[_0x434598(0x89)])),_0xcadb1a(0x1,_0x3660bf['Inject'](_0x3660bf[_0x434598(0xc3)])),_0xcadb1a(0x2,_0x3660bf[_0x434598(0x9e)](_0x1f59dc[_0x434598(0xdc)]))],_0x4a06a0);var _0x54332d=Object[_0x434598(0xf8)],_0x287fad=(_0x5d4962,_0x1549a9,_0x485cfa,_0x1f72a0)=>{for(var _0x409bf6=_0x1f72a0>0x1?void 0x0:_0x1f72a0?_0x54332d(_0x1549a9,_0x485cfa):_0x1549a9,_0x37366b=_0x5d4962['length']-0x1,_0xd6080e;_0x37366b>=0x0;_0x37366b--)(_0xd6080e=_0x5d4962[_0x37366b])&&(_0x409bf6=_0xd6080e(_0x409bf6)||_0x409bf6);return _0x409bf6;},_0x2f17e3=(_0x14d6f3,_0x35a5a5)=>(_0x447f90,_0x11435c)=>_0x35a5a5(_0x447f90,_0x11435c,_0x14d6f3);let _0xe9dcd2=class extends _0x3660bf[_0x434598(0xef)]{constructor(_0x37dca7,_0x12950c){const _0x176cca=_0x434598;super(),this[_0x176cca(0xf3)]=_0x37dca7,this[_0x176cca(0xa4)]=_0x12950c,this[_0x176cca(0xf0)]();}[_0x434598(0xf0)](){const _0x1c4477=_0x434598;this[_0x1c4477(0xf3)][_0x1c4477(0xd6)]=this[_0x1c4477(0xa4)],this[_0x1c4477(0xf3)]['syncUpdateMutationToColla']=!0x1;}};_0xe9dcd2=_0x287fad([_0x2f17e3(0x0,_0x390328['IThreadCommentDataSourceService']),_0x2f17e3(0x1,_0x3660bf[_0x434598(0x9e)](_0x4a06a0))],_0xe9dcd2);var _0x11a3a1=Object[_0x434598(0xaf)],_0x3bd21a=Object[_0x434598(0xf8)],_0x51f3b8=(_0x38e70f,_0x1cf08d,_0x4ec21b)=>_0x1cf08d in _0x38e70f?_0x11a3a1(_0x38e70f,_0x1cf08d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ec21b}):_0x38e70f[_0x1cf08d]=_0x4ec21b,_0x29f823=(_0x4a9dbe,_0x52bf0b,_0x25962d,_0x343956)=>{const _0x36b72b=_0x434598;for(var _0x16d840=_0x343956>0x1?void 0x0:_0x343956?_0x3bd21a(_0x52bf0b,_0x25962d):_0x52bf0b,_0x212b60=_0x4a9dbe[_0x36b72b(0xf9)]-0x1,_0x5c69f4;_0x212b60>=0x0;_0x212b60--)(_0x5c69f4=_0x4a9dbe[_0x212b60])&&(_0x16d840=_0x5c69f4(_0x16d840)||_0x16d840);return _0x16d840;},_0x4d1413=(_0x19eeea,_0x1ad09b)=>(_0x4f3eb6,_0x453857)=>_0x1ad09b(_0x4f3eb6,_0x453857,_0x19eeea),_0x34ca35=(_0x184bce,_0x53d40b,_0x28c8b8)=>_0x51f3b8(_0x184bce,typeof _0x53d40b!='symbol'?_0x53d40b+'':_0x53d40b,_0x28c8b8);_0x12d985['UniverThreadCommentDataSourcePlugin']=class extends _0x3660bf[_0x434598(0x10a)]{constructor(_0x1e6b00=_0x3566b0,_0x4e2fd6,_0x1582f0){const _0x352d51=_0x434598;super(),this['_config']=_0x1e6b00,this[_0x352d51(0xbd)]=_0x4e2fd6,this['_configService']=_0x1582f0;const {..._0x53f486}=_0x3660bf['merge']({},_0x3566b0,this[_0x352d51(0xe2)]);this[_0x352d51(0xd1)]['setConfig'](_0x278f10,_0x53f486);}[_0x434598(0xf1)](){[[_0x4a06a0],[_0xe9dcd2],[_0x309e4e]]['forEach'](_0x42d11b=>{const _0x47efb5=_0xbb26;this[_0x47efb5(0xbd)][_0x47efb5(0x8e)](_0x42d11b);});}[_0x434598(0x98)](){const _0x24d114=_0x434598;this[_0x24d114(0xbd)][_0x24d114(0x8c)](_0xe9dcd2),this['_injector']['get'](_0x309e4e);}},_0x34ca35(_0x12d985[_0x434598(0xb7)],'pluginName',_0x2459ed),_0x34ca35(_0x12d985[_0x434598(0xb7)],_0x434598(0xe4),_0x3660bf[_0x434598(0xb8)][_0x434598(0xe7)]),_0x12d985['UniverThreadCommentDataSourcePlugin']=_0x29f823([_0x3660bf[_0x434598(0x92)](_0x545869[_0x434598(0x93)],_0x1f59dc['UniverCollaborationClientPlugin'],_0x79183c[_0x434598(0xe6)]),_0x4d1413(0x1,_0x3660bf[_0x434598(0x9e)](_0x3660bf['Injector'])),_0x4d1413(0x2,_0x3660bf[_0x434598(0xc4)])],_0x12d985['UniverThreadCommentDataSourcePlugin']),Object[_0x434598(0xaf)](_0x12d985,Symbol[_0x434598(0x87)],{'value':_0x434598(0xe1)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.14-nightly.202511070640",
3
+ "version": "0.10.14-nightly.202511070939",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.10.14-nightly.202511070640",
49
- "@univerjs-pro/collaboration-client": "0.10.14-nightly.202511070640",
50
- "@univerjs/core": "0.10.14-nightly.202511070640",
51
- "@univerjs/network": "0.10.14-nightly.202511070640",
52
- "@univerjs/thread-comment": "0.10.14-nightly.202511070640",
48
+ "@univerjs-pro/collaboration-client": "0.10.14-nightly.202511070939",
49
+ "@univerjs-pro/license": "0.10.14-nightly.202511070939",
50
+ "@univerjs/core": "0.10.14-nightly.202511070939",
53
51
  "@univerjs/protocol": "0.1.47",
54
- "@univerjs/thread-comment-ui": "0.10.14-nightly.202511070640"
52
+ "@univerjs/network": "0.10.14-nightly.202511070939",
53
+ "@univerjs/thread-comment": "0.10.14-nightly.202511070939",
54
+ "@univerjs/thread-comment-ui": "0.10.14-nightly.202511070939"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",