@univerjs-pro/thread-comment-datasource 0.10.5 → 0.10.6-experimental.20250903-f52e3bf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x5bf54d=_0x59b2;(function(_0x16ab0f,_0x281691){const _0x28d030=_0x59b2,_0x1f91b4=_0x16ab0f();while(!![]){try{const _0x11e5da=-parseInt(_0x28d030(0xf8))/0x1+parseInt(_0x28d030(0xc6))/0x2+-parseInt(_0x28d030(0xc4))/0x3+-parseInt(_0x28d030(0xf9))/0x4+parseInt(_0x28d030(0xc0))/0x5*(-parseInt(_0x28d030(0xbe))/0x6)+-parseInt(_0x28d030(0xdb))/0x7*(parseInt(_0x28d030(0xd7))/0x8)+parseInt(_0x28d030(0xd2))/0x9*(parseInt(_0x28d030(0xd5))/0xa);if(_0x11e5da===_0x281691)break;else _0x1f91b4['push'](_0x1f91b4['shift']());}catch(_0x4fb416){_0x1f91b4['push'](_0x1f91b4['shift']());}}}(_0x59cd,0x311f2));Object[_0x5bf54d(0xea)](exports,Symbol[_0x5bf54d(0xc3)],{'value':_0x5bf54d(0xe1)});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=_0x5bf54d(0xed);var I=(_0x203a4f=>(_0x203a4f[_0x203a4f[_0x5bf54d(0x106)]=0x0]=_0x5bf54d(0x106),_0x203a4f[_0x203a4f['Solved']=0x1]=_0x5bf54d(0x110),_0x203a4f[_0x203a4f['UNRECOGNIZED']=-0x1]=_0x5bf54d(0xb9),_0x203a4f))(I||{}),v=(_0x46a195=>(_0x46a195[_0x46a195[_0x5bf54d(0xf2)]=0x0]=_0x5bf54d(0xf2),_0x46a195[_0x46a195['Add']=0x1]=_0x5bf54d(0x12e),_0x46a195[_0x46a195['Reply']=0x2]=_0x5bf54d(0x111),_0x46a195[_0x46a195[_0x5bf54d(0x121)]=0x3]=_0x5bf54d(0x121),_0x46a195[_0x46a195['Delete']=0x4]=_0x5bf54d(0xef),_0x46a195[_0x46a195['Solve']=0x5]=_0x5bf54d(0x12b),_0x46a195[_0x46a195[_0x5bf54d(0xb9)]=-0x1]=_0x5bf54d(0xb9),_0x46a195))(v||{});const f=_0x81a5dd=>c['dayjs'](new Date(+_0x81a5dd))[_0x5bf54d(0xd3)](_0x5bf54d(0xba)),R=async(_0x102eee,_0x141fa1)=>{const _0x109c46=_0x5bf54d,_0x40a430=_0x102eee[_0x109c46(0x125)](c['UserManagerService']),_0xa66843=_0x102eee[_0x109c46(0x125)](P[_0x109c46(0xff)]);_0x141fa1['forEach'](_0x364b2f=>{const _0x373572=_0x109c46;_0x40a430[_0x373572(0xdd)](_0x364b2f)&&_0x141fa1[_0x373572(0x12a)](_0x364b2f);}),_0x141fa1[_0x109c46(0xbd)]&&(await _0xa66843[_0x109c46(0x125)](_0x109c46(0x115),{'params':{'userIDs':[..._0x141fa1]}}))[_0x109c46(0xbc)][_0x109c46(0xce)]['forEach'](_0x59ba71=>{const _0x1e8fba=_0x109c46;_0x59ba71&&_0x40a430[_0x1e8fba(0xfc)](_0x59ba71);});};function _0x59b2(_0x231d39,_0x478d15){const _0x59cd80=_0x59cd();return _0x59b2=function(_0x59b257,_0x33e077){_0x59b257=_0x59b257-0xb9;let _0x3ffa1c=_0x59cd80[_0x59b257];return _0x3ffa1c;},_0x59b2(_0x231d39,_0x478d15);}var $=Object[_0x5bf54d(0xd9)],E=(_0x47db58,_0x45fc89,_0x5710eb,_0x18e7bf)=>{for(var _0x1f75af=_0x18e7bf>0x1?void 0x0:_0x18e7bf?$(_0x45fc89,_0x5710eb):_0x45fc89,_0x51538b=_0x47db58['length']-0x1,_0x56fce4;_0x51538b>=0x0;_0x51538b--)(_0x56fce4=_0x47db58[_0x51538b])&&(_0x1f75af=_0x56fce4(_0x1f75af)||_0x1f75af);return _0x1f75af;},S=(_0x489742,_0x4313e1)=>(_0x4434d9,_0x27acb6)=>_0x4313e1(_0x4434d9,_0x27acb6,_0x489742);function _0x59cd(){const _0x35701c=['_httpService','Delete','find','parse','Unknown','IConfigService','_userService','user','/delete','reply','213489AJReDZ','880336sWkLZX','Disposable','ThreadCommentModel','addUser','solved','threadId','HTTPService','/solved','_threadCommentDataSource','userId','dayjs','replyId','unitId','OpenOrReOpen','Plugin','subscribe','getComment','_injector','map','UniverLicensePlugin','userID','filter','ref','Solved','Reply','error','personId','code','/universer-api/user/list','/edit','deleteComment','values','saveCommentToSnapshot','/list','/universer-api/comment/unit/','UniverCollaborationClientPlugin','DependentOn','customRanges','UniverThreadCommentUIPlugin','Inject','Edit','_threadCommentModel','stringify','/reply','get','_sessionService','getCurrentUser','rangeType','CollaborationSessionService','delete','Solve','pluginName','parentId','Add','type','UniverThreadCommentDataSourcePlugin','replies','getUnit','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','UserManagerService','body','size','318uDTYDq','COMMENT','7565ZuQsuW','UNIVER_UNKNOWN','requireSession','toStringTag','1136115JLyHQe','disposeWithMe','86626XxUjby','createTimestamp','length','_initDataSource','add','resolveComment','slice','_config','users','content','symbol','/add','36333ZFzsXs','format','thread-comment-data-source.config','3340eTYbeZ','addComment','16EusKiu','listComments','getOwnPropertyDescriptor','commentUpdate$','1043007eKeTnq','comment','getUser','_init','CustomRangeType','_commentService','Module','rangeId','forEach','_threadCommentDataSourceService','post','updateComment','Injector','syncUpdateMutationToColla','getMemberID','defineProperty','root','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x59cd=function(){return _0x35701c;};return _0x59cd();}let _=class extends c[_0x5bf54d(0xfa)]{constructor(_0x4699d8,_0x32b01e,_0xc6dcbe,_0x22dc20){const _0xf9ca19=_0x5bf54d;super(),this[_0xf9ca19(0xe0)]=_0x4699d8,this[_0xf9ca19(0x122)]=_0x32b01e,this[_0xf9ca19(0xf4)]=_0xc6dcbe,this['_injector']=_0x22dc20,this[_0xf9ca19(0xde)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f39d9=_0x5bf54d;this[_0x1f39d9(0xc5)](this[_0x1f39d9(0x122)][_0x1f39d9(0xda)]['pipe'](j['bufferTime'](0x10))[_0x1f39d9(0x108)](_0x376003=>{const _0x329f99=_0x1f39d9,_0xe5e5c3=new Set();_0x376003[_0x329f99(0xe3)](_0x746891=>{const _0x321b24=_0x329f99;switch(_0x746891[_0x321b24(0x12f)]){case'add':{const _0x4b15df=_0x746891['payload'][_0x321b24(0x113)];_0xe5e5c3[_0x321b24(0xca)](_0x4b15df);break;}}}),R(this[_0x329f99(0x10a)],_0xe5e5c3);}));}[_0x5bf54d(0xde)](){const _0x13ad38=_0x5bf54d;this['disposeWithMe'](this[_0x13ad38(0xe0)]['commentUpdate$'][_0x13ad38(0x108)](async _0x19fa40=>{const _0x1d6f38=_0x13ad38;var _0x98fc07,_0xb32506,_0x35ca34,_0x58c843;const _0x8f8b68=(_0x98fc07=this['_threadCommentModel']['getUnit'](_0x19fa40[_0x1d6f38(0x105)])[_0x1d6f38(0xf0)](_0x171883=>_0x171883[_0x1d6f38(0xfe)]===_0x19fa40[_0x1d6f38(0xfe)]))==null?void 0x0:_0x98fc07[_0x1d6f38(0xeb)];if(!_0x8f8b68)return;const {unitId:_0x400e9b,subUnitId:_0x4bc6c5}=_0x8f8b68;switch(_0x19fa40['user']&&this[_0x1d6f38(0xf4)][_0x1d6f38(0xfc)](_0x19fa40[_0x1d6f38(0xf5)]),_0x19fa40[_0x1d6f38(0x12f)]){case v[_0x1d6f38(0x12e)]:break;case v[_0x1d6f38(0x111)]:{this['_threadCommentModel'][_0x1d6f38(0xd6)](_0x400e9b,_0x4bc6c5,{'unitId':_0x400e9b,'subUnitId':_0x4bc6c5,'ref':'','id':_0x19fa40[_0x1d6f38(0x104)],'dT':f(+_0x19fa40[_0x1d6f38(0xc7)]),'threadId':_0x19fa40[_0x1d6f38(0xfe)],'personId':(_0x35ca34=(_0xb32506=_0x19fa40['user'])==null?void 0x0:_0xb32506[_0x1d6f38(0x10d)])!=null?_0x35ca34:_0x19fa40[_0x1d6f38(0x102)],'text':JSON[_0x1d6f38(0xf1)](_0x19fa40['content']),'parentId':_0x8f8b68['id']});break;}case v['Delete']:{const _0x509f97=this[_0x1d6f38(0x122)][_0x1d6f38(0x109)](_0x400e9b,_0x4bc6c5,_0x19fa40[_0x1d6f38(0x104)]);_0x509f97&&_0x509f97[_0x1d6f38(0x12d)]&&this[_0x1d6f38(0x122)][_0x1d6f38(0x117)](_0x400e9b,_0x4bc6c5,_0x19fa40[_0x1d6f38(0x104)]);break;}case v[_0x1d6f38(0x121)]:{this[_0x1d6f38(0x122)][_0x1d6f38(0xe6)](_0x400e9b,_0x4bc6c5,{'commentId':_0x19fa40[_0x1d6f38(0x104)],'text':JSON[_0x1d6f38(0xf1)](_0x19fa40[_0x1d6f38(0xcf)])});break;}case v[_0x1d6f38(0x12b)]:{const _0x3f8b76=(_0x58c843=this[_0x1d6f38(0x122)][_0x1d6f38(0x132)](_0x19fa40[_0x1d6f38(0x105)])[_0x1d6f38(0xf0)](_0x5569e2=>_0x5569e2['threadId']===_0x19fa40[_0x1d6f38(0xfe)]))==null?void 0x0:_0x58c843[_0x1d6f38(0xeb)];_0x3f8b76&&this['_threadCommentModel'][_0x1d6f38(0xcb)](_0x400e9b,_0x4bc6c5,_0x3f8b76['id'],_0x19fa40['solved']===I[_0x1d6f38(0x110)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c['Inject'](M[_0x5bf54d(0xfb)])),S(0x2,c['Inject'](c[_0x5bf54d(0xbb)])),S(0x3,c[_0x5bf54d(0x120)](c[_0x5bf54d(0xe7)]))],_);const q=_0x5bf54d(0xd4),D={};var A=Object[_0x5bf54d(0xd9)],x=(_0x5561fb,_0x47b135,_0x4fe027,_0x80aabc)=>{const _0x4feafd=_0x5bf54d;for(var _0xe7a446=_0x80aabc>0x1?void 0x0:_0x80aabc?A(_0x47b135,_0x4fe027):_0x47b135,_0x1796ea=_0x5561fb[_0x4feafd(0xc8)]-0x1,_0x19c82d;_0x1796ea>=0x0;_0x1796ea--)(_0x19c82d=_0x5561fb[_0x1796ea])&&(_0xe7a446=_0x19c82d(_0xe7a446)||_0xe7a446);return _0xe7a446;},C=(_0x3468e9,_0x1b3438)=>(_0x21de7a,_0x3c2893)=>_0x1b3438(_0x21de7a,_0x3c2893,_0x3468e9);function Y(_0x206ec7,_0x4fc9e3){const _0x1b6a67=_0x5bf54d,_0x31c236=_0x206ec7[_0x1b6a67(0x131)][0x0];return{..._0x4fc9e3,'id':_0x31c236[_0x1b6a67(0x104)],'resolved':_0x206ec7[_0x1b6a67(0xfd)]===0x1,'dT':f(_0x31c236[_0x1b6a67(0xc7)]),'personId':_0x31c236[_0x1b6a67(0x102)],'threadId':_0x31c236[_0x1b6a67(0xfe)]};}function G(_0x27c0a0,_0x2e6c58,_0x549c9e){const _0x16fcba=_0x5bf54d;var _0x411d21,_0x2a4f5f;if(((_0x2a4f5f=(_0x411d21=_0x27c0a0==null?void 0x0:_0x27c0a0[_0x16fcba(0x131)])==null?void 0x0:_0x411d21[_0x16fcba(0xc8)])!=null?_0x2a4f5f:0x0)>0x0){const _0x340a6f=(_0xb0df88,_0x4267f2)=>({'id':_0xb0df88[_0x16fcba(0x104)],'threadId':_0xb0df88[_0x16fcba(0xfe)],'dT':f(_0xb0df88['createTimestamp']),'personId':_0xb0df88[_0x16fcba(0x102)],'resolved':_0x27c0a0[_0x16fcba(0xfd)]===I[_0x16fcba(0x110)],'unitId':_0x2e6c58,'subUnitId':_0x549c9e,'text':JSON[_0x16fcba(0xf1)](_0xb0df88['content']),'parentId':_0x4267f2}),_0x570d4f=_0x340a6f(_0x27c0a0[_0x16fcba(0x131)][0x0]);return{..._0x570d4f,'children':_0x27c0a0['replies'][_0x16fcba(0xcc)](0x1)['map'](_0x485f27=>_0x340a6f(_0x485f27,_0x570d4f['id']))};}return null;}let p=class{constructor(_0x25d174,_0x4e5c06,_0x10eebe){const _0x565cae=_0x5bf54d;this[_0x565cae(0xee)]=_0x25d174,this[_0x565cae(0xf4)]=_0x4e5c06,this[_0x565cae(0x126)]=_0x10eebe;}async['addComment'](_0x5966d6){const _0x27d55c=_0x5bf54d;var _0x45f2de,_0x492b7e;const {parentId:_0x778233,unitId:_0x41f4f1,text:_0x3912b6,threadId:_0x4e3cf0}=_0x5966d6,_0x32b591=(_0x492b7e=(_0x45f2de=_0x3912b6[_0x27d55c(0x11e)])==null?void 0x0:_0x45f2de[_0x27d55c(0x10e)](_0x1c905a=>_0x1c905a[_0x27d55c(0x128)]===c['CustomRangeType'][_0x27d55c(0xbf)])[_0x27d55c(0x10b)](_0x47b896=>_0x47b896[_0x27d55c(0xe2)]))!=null?_0x492b7e:[],_0x15cf1a=JSON[_0x27d55c(0x123)](_0x3912b6),_0x40b36a=(await this[_0x27d55c(0x126)][_0x27d55c(0xc2)](_0x41f4f1))['getMemberID']();if(_0x778233){const _0xebbd95={'memberId':_0x40b36a,'unitId':_0x41f4f1,'content':_0x15cf1a,'mention':_0x32b591,'threadId':_0x4e3cf0},_0x4d60af=(await this[_0x27d55c(0xee)][_0x27d55c(0xe5)](_0x27d55c(0x11b)+_0x41f4f1+_0x27d55c(0x124),{'body':_0xebbd95}))[_0x27d55c(0xbc)][_0x27d55c(0xf7)];return{..._0x5966d6,'id':_0x4d60af[_0x27d55c(0x104)],'dT':c[_0x27d55c(0x103)](+_0x4d60af['createTimestamp'])['format'](_0x27d55c(0xba)),'personId':_0x4d60af['userId']};}else{const _0x383c67={'memberId':_0x40b36a,'unitId':_0x41f4f1,'content':_0x15cf1a,'mention':_0x32b591},_0x1438a8=await this[_0x27d55c(0xee)][_0x27d55c(0xe5)]('/universer-api/comment/unit/'+_0x41f4f1+_0x27d55c(0xd1),{'body':_0x383c67});return Y(_0x1438a8['body'][_0x27d55c(0xdc)],_0x5966d6);}}async['updateComment'](_0x4835f0){const _0x8b3a0c=_0x5bf54d;var _0x4d9fc5,_0x3b2ec3;const {text:_0x1ad376,unitId:_0x10b331}=_0x4835f0,_0x265955=(_0x3b2ec3=(_0x4d9fc5=_0x1ad376[_0x8b3a0c(0x11e)])==null?void 0x0:_0x4d9fc5[_0x8b3a0c(0x10e)](_0x20238f=>_0x20238f[_0x8b3a0c(0x128)]===c[_0x8b3a0c(0xdf)][_0x8b3a0c(0xbf)])[_0x8b3a0c(0x10b)](_0x247c39=>_0x247c39[_0x8b3a0c(0xe2)]))!=null?_0x3b2ec3:[],_0x3f6ea4=JSON[_0x8b3a0c(0x123)](_0x1ad376),_0x20e0d1=_0x4835f0[_0x8b3a0c(0xfe)],_0x1d674d=_0x4835f0['id'],_0x4afc61={'memberId':(await this['_sessionService'][_0x8b3a0c(0xc2)](_0x10b331))[_0x8b3a0c(0xe9)](),'unitId':_0x10b331,'threadId':_0x20e0d1,'mention':_0x265955,'content':_0x3f6ea4,'replyId':_0x1d674d},_0x5788e0=await this[_0x8b3a0c(0xee)]['post'](_0x8b3a0c(0x11b)+_0x10b331+_0x8b3a0c(0x116),{'body':_0x4afc61});return!_0x5788e0[_0x8b3a0c(0xbc)][_0x8b3a0c(0x112)]||_0x5788e0['body'][_0x8b3a0c(0x112)][_0x8b3a0c(0x114)]===0x1;}async[_0x5bf54d(0xcb)](_0xcc55fe){const _0x567d80=_0x5bf54d,{unitId:_0x49aa01}=_0xcc55fe,_0x2a53ce=_0xcc55fe[_0x567d80(0xfe)],_0x34d61b={'memberId':this[_0x567d80(0xf4)][_0x567d80(0x127)]()['userID'],'unitId':_0x49aa01,'threadId':_0x2a53ce,'solved':_0xcc55fe['resolved']?I[_0x567d80(0x110)]:I[_0x567d80(0x106)]},_0x6d3239=await this[_0x567d80(0xee)][_0x567d80(0xe5)](_0x567d80(0x11b)+_0x49aa01+_0x567d80(0x100),{'body':_0x34d61b});return!_0x6d3239[_0x567d80(0xbc)]['error']||_0x6d3239[_0x567d80(0xbc)][_0x567d80(0x112)][_0x567d80(0x114)]===0x1;}async[_0x5bf54d(0x117)](_0x160e19,_0x3bc802,_0x40c0b6,_0x130c28){const _0x1b31ff=_0x5bf54d,_0x165e70={'memberId':(await this[_0x1b31ff(0x126)][_0x1b31ff(0xc2)](_0x160e19))['getMemberID'](),'threadId':_0x40c0b6,'replyId':_0x130c28,'unitId':_0x160e19},_0x51604a=await this[_0x1b31ff(0xee)][_0x1b31ff(0xe5)](_0x1b31ff(0x11b)+_0x160e19+_0x1b31ff(0xf6),{'body':_0x165e70});return!_0x51604a[_0x1b31ff(0xbc)][_0x1b31ff(0x112)]||_0x51604a[_0x1b31ff(0xbc)][_0x1b31ff(0x112)][_0x1b31ff(0x114)]===0x1;}async[_0x5bf54d(0xd8)](_0x24a7e0,_0xd4c277,_0x83ce54){const _0x3d9163=_0x5bf54d,_0x4b2e96={'unitId':_0x24a7e0,'threadId':_0x83ce54},_0x13ae4c=await this[_0x3d9163(0xee)][_0x3d9163(0xe5)](_0x3d9163(0x11b)+_0x24a7e0+_0x3d9163(0x11a),{'body':_0x4b2e96}),_0x5779c4=_0x83ce54[_0x3d9163(0x10b)](_0x4cd5cb=>G(_0x13ae4c[_0x3d9163(0xbc)]['comments'][_0x4cd5cb],_0x24a7e0,_0xd4c277))[_0x3d9163(0x10e)](Boolean);return Object[_0x3d9163(0x118)](_0x13ae4c[_0x3d9163(0xbc)][_0x3d9163(0xce)])['forEach'](_0xaa2531=>{const _0x4c9eeb=_0x3d9163;this['_userService'][_0x4c9eeb(0xfc)](_0xaa2531);}),_0x5779c4;}[_0x5bf54d(0x119)](_0x232651){const _0x1623b2=_0x5bf54d;return{'id':_0x232651['id'],'threadId':_0x232651[_0x1623b2(0xfe)],'ref':_0x232651[_0x1623b2(0x10f)]};}};p=x([C(0x0,c[_0x5bf54d(0x120)](P[_0x5bf54d(0xff)])),C(0x1,c[_0x5bf54d(0x120)](c[_0x5bf54d(0xbb)])),C(0x2,c[_0x5bf54d(0x120)](b[_0x5bf54d(0x129)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x2fc94f,_0x2e49c8,_0x100587,_0x848388)=>{const _0x9d5b71=_0x5bf54d;for(var _0x36a1e4=_0x848388>0x1?void 0x0:_0x848388?H(_0x2e49c8,_0x100587):_0x2e49c8,_0x2b14da=_0x2fc94f[_0x9d5b71(0xc8)]-0x1,_0x37c3fe;_0x2b14da>=0x0;_0x2b14da--)(_0x37c3fe=_0x2fc94f[_0x2b14da])&&(_0x36a1e4=_0x37c3fe(_0x36a1e4)||_0x36a1e4);return _0x36a1e4;},y=(_0xca43a9,_0x4fb7e3)=>(_0x54b248,_0x498f90)=>_0x4fb7e3(_0x54b248,_0x498f90,_0xca43a9);let g=class extends c[_0x5bf54d(0xfa)]{constructor(_0x2ebce6,_0x15ec3e){const _0x59e008=_0x5bf54d;super(),this[_0x59e008(0xe4)]=_0x2ebce6,this[_0x59e008(0x101)]=_0x15ec3e,this[_0x59e008(0xc9)]();}[_0x5bf54d(0xc9)](){const _0x2a2f7f=_0x5bf54d;this[_0x2a2f7f(0xe4)]['dataSource']=this[_0x2a2f7f(0x101)],this['_threadCommentDataSourceService'][_0x2a2f7f(0xe8)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5bf54d(0x120)](p))],g);var F=Object[_0x5bf54d(0xea)],L=Object[_0x5bf54d(0xd9)],Z=(_0x2fc9c9,_0x5e7cb3,_0x3fd35f)=>_0x5e7cb3 in _0x2fc9c9?F(_0x2fc9c9,_0x5e7cb3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fd35f}):_0x2fc9c9[_0x5e7cb3]=_0x3fd35f,W=(_0x5efcf6,_0x3dae20,_0x4d3b78,_0xb9bb12)=>{for(var _0x502209=_0xb9bb12>0x1?void 0x0:_0xb9bb12?L(_0x3dae20,_0x4d3b78):_0x3dae20,_0x46cd1e=_0x5efcf6['length']-0x1,_0x236a0b;_0x46cd1e>=0x0;_0x46cd1e--)(_0x236a0b=_0x5efcf6[_0x46cd1e])&&(_0x502209=_0x236a0b(_0x502209)||_0x502209);return _0x502209;},O=(_0x23df05,_0x5bf7d0)=>(_0x2e951a,_0x42ac5d)=>_0x5bf7d0(_0x2e951a,_0x42ac5d,_0x23df05),N=(_0x50211f,_0x4b087f,_0x5eb9fb)=>Z(_0x50211f,typeof _0x4b087f!=_0x5bf54d(0xd0)?_0x4b087f+'':_0x4b087f,_0x5eb9fb);exports[_0x5bf54d(0x130)]=class extends c[_0x5bf54d(0x107)]{constructor(_0x534cb6=D,_0x13f48f,_0x482c0c){const _0x2e4f3e=_0x5bf54d;super(),this[_0x2e4f3e(0xcd)]=_0x534cb6,this[_0x2e4f3e(0x10a)]=_0x13f48f,this[_0x2e4f3e(0xec)]=_0x482c0c;const {..._0x23c285}=c['merge']({},D,this[_0x2e4f3e(0xcd)]);this[_0x2e4f3e(0xec)]['setConfig'](q,_0x23c285);}['onStarting'](){const _0x2932c7=_0x5bf54d;[[p],[g],[_]][_0x2932c7(0xe3)](_0x178d9c=>{this['_injector']['add'](_0x178d9c);});}['onReady'](){const _0x3d7e3b=_0x5bf54d;this[_0x3d7e3b(0x10a)]['get'](g),this[_0x3d7e3b(0x10a)][_0x3d7e3b(0x125)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5bf54d(0x12c),U),N(exports[_0x5bf54d(0x130)],'type',c['UniverInstanceType'][_0x5bf54d(0xc1)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x5bf54d(0x11d)](w[_0x5bf54d(0x11f)],b[_0x5bf54d(0x11c)],T[_0x5bf54d(0x10c)]),O(0x1,c[_0x5bf54d(0x120)](c[_0x5bf54d(0xe7)])),O(0x2,c[_0x5bf54d(0xf3)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x232800=_0x2f6c;(function(_0x4cef54,_0x570db4){const _0x42d198=_0x2f6c,_0x41ff4b=_0x4cef54();while(!![]){try{const _0x687806=-parseInt(_0x42d198(0x142))/0x1+-parseInt(_0x42d198(0xfd))/0x2*(parseInt(_0x42d198(0xd3))/0x3)+-parseInt(_0x42d198(0x140))/0x4+parseInt(_0x42d198(0xe5))/0x5*(-parseInt(_0x42d198(0xff))/0x6)+-parseInt(_0x42d198(0x137))/0x7+parseInt(_0x42d198(0xfa))/0x8*(-parseInt(_0x42d198(0x135))/0x9)+-parseInt(_0x42d198(0x149))/0xa*(-parseInt(_0x42d198(0x139))/0xb);if(_0x687806===_0x570db4)break;else _0x41ff4b['push'](_0x41ff4b['shift']());}catch(_0x58a28a){_0x41ff4b['push'](_0x41ff4b['shift']());}}}(_0x4da0,0x6bbe6));Object[_0x232800(0x145)](exports,Symbol[_0x232800(0x118)],{'value':_0x232800(0xda)});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=(_0x53ee4c=>(_0x53ee4c[_0x53ee4c[_0x232800(0x119)]=0x0]=_0x232800(0x119),_0x53ee4c[_0x53ee4c[_0x232800(0x13a)]=0x1]='Solved',_0x53ee4c[_0x53ee4c['UNRECOGNIZED']=-0x1]=_0x232800(0x102),_0x53ee4c))(I||{}),v=(_0x166b5b=>(_0x166b5b[_0x166b5b[_0x232800(0xf8)]=0x0]=_0x232800(0xf8),_0x166b5b[_0x166b5b[_0x232800(0xe9)]=0x1]=_0x232800(0xe9),_0x166b5b[_0x166b5b[_0x232800(0x126)]=0x2]=_0x232800(0x126),_0x166b5b[_0x166b5b[_0x232800(0xee)]=0x3]=_0x232800(0xee),_0x166b5b[_0x166b5b[_0x232800(0x105)]=0x4]=_0x232800(0x105),_0x166b5b[_0x166b5b['Solve']=0x5]=_0x232800(0x127),_0x166b5b[_0x166b5b[_0x232800(0x102)]=-0x1]=_0x232800(0x102),_0x166b5b))(v||{});const f=_0x284b9c=>c[_0x232800(0x13b)](new Date(+_0x284b9c))[_0x232800(0x117)](_0x232800(0xf0)),R=async(_0x209bf9,_0x206fde)=>{const _0x6aaccc=_0x232800,_0x33cf93=_0x209bf9[_0x6aaccc(0x12c)](c[_0x6aaccc(0xe6)]),_0x44e7b0=_0x209bf9['get'](P[_0x6aaccc(0x10c)]);_0x206fde[_0x6aaccc(0x120)](_0xd1394a=>{const _0x57a77f=_0x6aaccc;_0x33cf93[_0x57a77f(0xd4)](_0xd1394a)&&_0x206fde['delete'](_0xd1394a);}),_0x206fde['size']&&(await _0x44e7b0[_0x6aaccc(0x12c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x206fde]}}))[_0x6aaccc(0xfc)]['users'][_0x6aaccc(0x120)](_0x42a8d6=>{const _0x506eb1=_0x6aaccc;_0x42a8d6&&_0x33cf93[_0x506eb1(0x132)](_0x42a8d6);});};var $=Object[_0x232800(0xed)],E=(_0x2da6c7,_0x50889f,_0x3a8414,_0x4e096e)=>{const _0x58bc84=_0x232800;for(var _0x21a82f=_0x4e096e>0x1?void 0x0:_0x4e096e?$(_0x50889f,_0x3a8414):_0x50889f,_0x3c2f0f=_0x2da6c7[_0x58bc84(0x115)]-0x1,_0x3f9aca;_0x3c2f0f>=0x0;_0x3c2f0f--)(_0x3f9aca=_0x2da6c7[_0x3c2f0f])&&(_0x21a82f=_0x3f9aca(_0x21a82f)||_0x21a82f);return _0x21a82f;},S=(_0x11941d,_0x2d0f0c)=>(_0x2eafc3,_0x41e4f4)=>_0x2d0f0c(_0x2eafc3,_0x41e4f4,_0x11941d);let _=class extends c[_0x232800(0x136)]{constructor(_0x579f24,_0x2c4c37,_0x5e134f,_0x380eb3){const _0x26a89b=_0x232800;super(),this[_0x26a89b(0x10a)]=_0x579f24,this[_0x26a89b(0x13e)]=_0x2c4c37,this[_0x26a89b(0xd2)]=_0x5e134f,this['_injector']=_0x380eb3,this[_0x26a89b(0x13c)](),this[_0x26a89b(0xe3)]();}[_0x232800(0xe3)](){const _0x5528ac=_0x232800;this[_0x5528ac(0x11f)](this[_0x5528ac(0x13e)][_0x5528ac(0xe4)][_0x5528ac(0xde)](j[_0x5528ac(0x12b)](0x10))[_0x5528ac(0x143)](_0x3acec4=>{const _0x1498c5=_0x5528ac,_0x4eac11=new Set();_0x3acec4[_0x1498c5(0x120)](_0xe11b62=>{const _0xd70e6c=_0x1498c5;switch(_0xe11b62[_0xd70e6c(0x12f)]){case _0xd70e6c(0xdc):{const _0x194e1d=_0xe11b62['payload']['personId'];_0x4eac11[_0xd70e6c(0xdc)](_0x194e1d);break;}}}),R(this[_0x1498c5(0xd0)],_0x4eac11);}));}['_init'](){const _0x286d85=_0x232800;this[_0x286d85(0x11f)](this['_commentService']['commentUpdate$'][_0x286d85(0x143)](async _0x51c5d3=>{const _0x15f401=_0x286d85;var _0x4e8f12,_0x412f47,_0x309fd2,_0x4f2c69;const _0x383e2a=(_0x4e8f12=this[_0x15f401(0x13e)][_0x15f401(0x110)](_0x51c5d3['unitId'])[_0x15f401(0xfb)](_0x225c0f=>_0x225c0f['threadId']===_0x51c5d3[_0x15f401(0xf6)]))==null?void 0x0:_0x4e8f12[_0x15f401(0x112)];if(!_0x383e2a)return;const {unitId:_0x545aa6,subUnitId:_0x1df2d0}=_0x383e2a;switch(_0x51c5d3[_0x15f401(0x11d)]&&this[_0x15f401(0xd2)][_0x15f401(0x132)](_0x51c5d3[_0x15f401(0x11d)]),_0x51c5d3[_0x15f401(0x12f)]){case v[_0x15f401(0xe9)]:break;case v['Reply']:{this['_threadCommentModel'][_0x15f401(0xf7)](_0x545aa6,_0x1df2d0,{'unitId':_0x545aa6,'subUnitId':_0x1df2d0,'ref':'','id':_0x51c5d3[_0x15f401(0xd8)],'dT':f(+_0x51c5d3[_0x15f401(0x10f)]),'threadId':_0x51c5d3[_0x15f401(0xf6)],'personId':(_0x309fd2=(_0x412f47=_0x51c5d3[_0x15f401(0x11d)])==null?void 0x0:_0x412f47['userID'])!=null?_0x309fd2:_0x51c5d3['userId'],'text':JSON['parse'](_0x51c5d3[_0x15f401(0x10d)]),'parentId':_0x383e2a['id']});break;}case v[_0x15f401(0x105)]:{const _0xbe11c4=this[_0x15f401(0x13e)][_0x15f401(0x101)](_0x545aa6,_0x1df2d0,_0x51c5d3[_0x15f401(0xd8)]);_0xbe11c4&&_0xbe11c4[_0x15f401(0x12a)]&&this[_0x15f401(0x13e)][_0x15f401(0xef)](_0x545aa6,_0x1df2d0,_0x51c5d3[_0x15f401(0xd8)]);break;}case v[_0x15f401(0xee)]:{this[_0x15f401(0x13e)][_0x15f401(0x131)](_0x545aa6,_0x1df2d0,{'commentId':_0x51c5d3[_0x15f401(0xd8)],'text':JSON['parse'](_0x51c5d3['content'])});break;}case v[_0x15f401(0x127)]:{const _0x17b61d=(_0x4f2c69=this[_0x15f401(0x13e)][_0x15f401(0x110)](_0x51c5d3[_0x15f401(0x133)])[_0x15f401(0xfb)](_0x28b666=>_0x28b666[_0x15f401(0xf6)]===_0x51c5d3[_0x15f401(0xf6)]))==null?void 0x0:_0x4f2c69[_0x15f401(0x112)];_0x17b61d&&this[_0x15f401(0x13e)][_0x15f401(0x122)](_0x545aa6,_0x1df2d0,_0x17b61d['id'],_0x51c5d3[_0x15f401(0x13d)]===I[_0x15f401(0x13a)]);break;}}}));}};_=E([S(0x0,c[_0x232800(0x12e)](b[_0x232800(0xd6)])),S(0x1,c[_0x232800(0x12e)](M[_0x232800(0xfe)])),S(0x2,c[_0x232800(0x12e)](c[_0x232800(0xe6)])),S(0x3,c[_0x232800(0x12e)](c[_0x232800(0x111)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x232800(0xed)],x=(_0x25e1f7,_0x19ebc5,_0x37e45d,_0x697cd1)=>{const _0x1d9d8e=_0x232800;for(var _0x3983df=_0x697cd1>0x1?void 0x0:_0x697cd1?A(_0x19ebc5,_0x37e45d):_0x19ebc5,_0x133e19=_0x25e1f7[_0x1d9d8e(0x115)]-0x1,_0x209105;_0x133e19>=0x0;_0x133e19--)(_0x209105=_0x25e1f7[_0x133e19])&&(_0x3983df=_0x209105(_0x3983df)||_0x3983df);return _0x3983df;},C=(_0x1821cc,_0x2de965)=>(_0x26bc5f,_0x138d15)=>_0x2de965(_0x26bc5f,_0x138d15,_0x1821cc);function Y(_0x506859,_0x526012){const _0x4aba2d=_0x232800,_0x2d6cfb=_0x506859[_0x4aba2d(0x11b)][0x0];return{..._0x526012,'id':_0x2d6cfb[_0x4aba2d(0xd8)],'resolved':_0x506859[_0x4aba2d(0x13d)]===0x1,'dT':f(_0x2d6cfb[_0x4aba2d(0x10f)]),'personId':_0x2d6cfb[_0x4aba2d(0x13f)],'threadId':_0x2d6cfb[_0x4aba2d(0xf6)]};}function _0x4da0(){const _0x717f59=['UNRECOGNIZED','symbol','COMMENT','Delete','_config','/universer-api/comment/unit/','IConfigService','dataSource','_commentService','_sessionService','HTTPService','content','getCurrentUser','createTimestamp','getUnit','Injector','root','ref','merge','length','customRanges','format','toStringTag','OpenOrReOpen','UniverCollaborationClientPlugin','replies','saveCommentToSnapshot','user','IThreadCommentDataSourceService','disposeWithMe','forEach','filter','resolveComment','comments','UniverThreadCommentUIPlugin','CollaborationSessionService','Reply','Solve','listComments','UniverInstanceType','parentId','bufferTime','get','post','Inject','type','comment','updateComment','addUser','unitId','resolved','1179486VtfshR','Disposable','5777450yQImSE','setConfig','20017778VbDsIh','Solved','dayjs','_init','solved','_threadCommentModel','userId','3061972TnSrpo','_initDataSource','16818paLjYF','subscribe','users','defineProperty','error','/list','getMemberID','20xnbEGi','DependentOn','_httpService','code','/delete','_injector','pluginName','_userService','21XOVSAW','getUser','UniverLicensePlugin','CommentService','CustomRangeType','replyId','/solved','Module','onReady','add','syncUpdateMutationToColla','pipe','/add','Plugin','slice','_threadCommentDataSource','_initUserSync','commentUpdate$','4405730QDOloJ','UserManagerService','map','_threadCommentDataSourceService','Add','UniverThreadCommentDataSourcePlugin','/edit','/reply','getOwnPropertyDescriptor','Edit','deleteComment','YYYY/MM/DD\x20HH:mm','requireSession','_configService','UNIVER_UNKNOWN','parse','rangeId','threadId','addComment','Unknown','stringify','8EEcovH','find','body','165262Ryzjsf','ThreadCommentModel','6LtUnDY','rangeType','getComment'];_0x4da0=function(){return _0x717f59;};return _0x4da0();}function G(_0x5ab6b5,_0x477dcd,_0x38dbd8){const _0x570768=_0x232800;var _0x205fd0,_0x14f7e5;if(((_0x14f7e5=(_0x205fd0=_0x5ab6b5==null?void 0x0:_0x5ab6b5['replies'])==null?void 0x0:_0x205fd0[_0x570768(0x115)])!=null?_0x14f7e5:0x0)>0x0){const _0x1e73f4=(_0x1a2bd3,_0x2b1e5d)=>({'id':_0x1a2bd3[_0x570768(0xd8)],'threadId':_0x1a2bd3[_0x570768(0xf6)],'dT':f(_0x1a2bd3[_0x570768(0x10f)]),'personId':_0x1a2bd3[_0x570768(0x13f)],'resolved':_0x5ab6b5['solved']===I['Solved'],'unitId':_0x477dcd,'subUnitId':_0x38dbd8,'text':JSON[_0x570768(0xf4)](_0x1a2bd3['content']),'parentId':_0x2b1e5d}),_0x5e9e44=_0x1e73f4(_0x5ab6b5[_0x570768(0x11b)][0x0]);return{..._0x5e9e44,'children':_0x5ab6b5[_0x570768(0x11b)][_0x570768(0xe1)](0x1)[_0x570768(0xe7)](_0x2787c8=>_0x1e73f4(_0x2787c8,_0x5e9e44['id']))};}return null;}let p=class{constructor(_0xd98f83,_0x384ffb,_0x32addd){const _0x35c11c=_0x232800;this[_0x35c11c(0x14b)]=_0xd98f83,this[_0x35c11c(0xd2)]=_0x384ffb,this[_0x35c11c(0x10b)]=_0x32addd;}async[_0x232800(0xf7)](_0x52c3a5){const _0x21b70e=_0x232800;var _0x2d6257,_0x1a8319;const {parentId:_0x44dc39,unitId:_0x1c2efe,text:_0x2a0e21,threadId:_0x266f95}=_0x52c3a5,_0x58d29e=(_0x1a8319=(_0x2d6257=_0x2a0e21[_0x21b70e(0x116)])==null?void 0x0:_0x2d6257[_0x21b70e(0x121)](_0x434278=>_0x434278[_0x21b70e(0x100)]===c[_0x21b70e(0xd7)][_0x21b70e(0x104)])[_0x21b70e(0xe7)](_0x234003=>_0x234003[_0x21b70e(0xf5)]))!=null?_0x1a8319:[],_0x5da659=JSON[_0x21b70e(0xf9)](_0x2a0e21),_0x312697=(await this[_0x21b70e(0x10b)]['requireSession'](_0x1c2efe))['getMemberID']();if(_0x44dc39){const _0x535cb2={'memberId':_0x312697,'unitId':_0x1c2efe,'content':_0x5da659,'mention':_0x58d29e,'threadId':_0x266f95},_0x2143ca=(await this['_httpService'][_0x21b70e(0x12d)](_0x21b70e(0x107)+_0x1c2efe+_0x21b70e(0xec),{'body':_0x535cb2}))[_0x21b70e(0xfc)]['reply'];return{..._0x52c3a5,'id':_0x2143ca[_0x21b70e(0xd8)],'dT':c[_0x21b70e(0x13b)](+_0x2143ca[_0x21b70e(0x10f)])[_0x21b70e(0x117)](_0x21b70e(0xf0)),'personId':_0x2143ca[_0x21b70e(0x13f)]};}else{const _0x460dad={'memberId':_0x312697,'unitId':_0x1c2efe,'content':_0x5da659,'mention':_0x58d29e},_0xb84c0e=await this[_0x21b70e(0x14b)][_0x21b70e(0x12d)](_0x21b70e(0x107)+_0x1c2efe+_0x21b70e(0xdf),{'body':_0x460dad});return Y(_0xb84c0e[_0x21b70e(0xfc)][_0x21b70e(0x130)],_0x52c3a5);}}async[_0x232800(0x131)](_0xbe2287){const _0x25bd2c=_0x232800;var _0x2bb2a3,_0x20c21c;const {text:_0x25d993,unitId:_0x54e56e}=_0xbe2287,_0x843773=(_0x20c21c=(_0x2bb2a3=_0x25d993['customRanges'])==null?void 0x0:_0x2bb2a3[_0x25bd2c(0x121)](_0x25a29e=>_0x25a29e[_0x25bd2c(0x100)]===c[_0x25bd2c(0xd7)][_0x25bd2c(0x104)])[_0x25bd2c(0xe7)](_0x5b02f1=>_0x5b02f1['rangeId']))!=null?_0x20c21c:[],_0x25ade0=JSON[_0x25bd2c(0xf9)](_0x25d993),_0x35ad10=_0xbe2287['threadId'],_0x1a38ca=_0xbe2287['id'],_0x335074={'memberId':(await this[_0x25bd2c(0x10b)][_0x25bd2c(0xf1)](_0x54e56e))[_0x25bd2c(0x148)](),'unitId':_0x54e56e,'threadId':_0x35ad10,'mention':_0x843773,'content':_0x25ade0,'replyId':_0x1a38ca},_0x5731cc=await this[_0x25bd2c(0x14b)]['post'](_0x25bd2c(0x107)+_0x54e56e+_0x25bd2c(0xeb),{'body':_0x335074});return!_0x5731cc[_0x25bd2c(0xfc)][_0x25bd2c(0x146)]||_0x5731cc[_0x25bd2c(0xfc)][_0x25bd2c(0x146)][_0x25bd2c(0xce)]===0x1;}async[_0x232800(0x122)](_0x139b71){const _0x39aa16=_0x232800,{unitId:_0x3941fc}=_0x139b71,_0x2d335c=_0x139b71[_0x39aa16(0xf6)],_0xc46bbc={'memberId':this[_0x39aa16(0xd2)][_0x39aa16(0x10e)]()['userID'],'unitId':_0x3941fc,'threadId':_0x2d335c,'solved':_0x139b71[_0x39aa16(0x134)]?I[_0x39aa16(0x13a)]:I[_0x39aa16(0x119)]},_0x2d656c=await this[_0x39aa16(0x14b)][_0x39aa16(0x12d)](_0x39aa16(0x107)+_0x3941fc+_0x39aa16(0xd9),{'body':_0xc46bbc});return!_0x2d656c[_0x39aa16(0xfc)][_0x39aa16(0x146)]||_0x2d656c['body'][_0x39aa16(0x146)][_0x39aa16(0xce)]===0x1;}async[_0x232800(0xef)](_0x3f6177,_0x53d5b3,_0x3c6c4d,_0x3dac18){const _0x41dc85=_0x232800,_0x13680a={'memberId':(await this[_0x41dc85(0x10b)][_0x41dc85(0xf1)](_0x3f6177))[_0x41dc85(0x148)](),'threadId':_0x3c6c4d,'replyId':_0x3dac18,'unitId':_0x3f6177},_0x2c8d20=await this[_0x41dc85(0x14b)]['post'](_0x41dc85(0x107)+_0x3f6177+_0x41dc85(0xcf),{'body':_0x13680a});return!_0x2c8d20[_0x41dc85(0xfc)][_0x41dc85(0x146)]||_0x2c8d20[_0x41dc85(0xfc)]['error']['code']===0x1;}async[_0x232800(0x128)](_0xd81062,_0x369037,_0x37f49b){const _0x46dff5=_0x232800,_0x54c628={'unitId':_0xd81062,'threadId':_0x37f49b},_0x17646f=await this['_httpService'][_0x46dff5(0x12d)](_0x46dff5(0x107)+_0xd81062+_0x46dff5(0x147),{'body':_0x54c628}),_0x432580=_0x37f49b['map'](_0x4f6392=>G(_0x17646f[_0x46dff5(0xfc)][_0x46dff5(0x123)][_0x4f6392],_0xd81062,_0x369037))[_0x46dff5(0x121)](Boolean);return Object['values'](_0x17646f['body'][_0x46dff5(0x144)])['forEach'](_0x2d3203=>{const _0x28521a=_0x46dff5;this['_userService'][_0x28521a(0x132)](_0x2d3203);}),_0x432580;}[_0x232800(0x11c)](_0x28246f){const _0x14ac55=_0x232800;return{'id':_0x28246f['id'],'threadId':_0x28246f[_0x14ac55(0xf6)],'ref':_0x28246f[_0x14ac55(0x113)]};}};function _0x2f6c(_0x308771,_0x63d342){const _0x4da0f0=_0x4da0();return _0x2f6c=function(_0x2f6cce,_0x165cbc){_0x2f6cce=_0x2f6cce-0xce;let _0x11983f=_0x4da0f0[_0x2f6cce];return _0x11983f;},_0x2f6c(_0x308771,_0x63d342);}p=x([C(0x0,c[_0x232800(0x12e)](P[_0x232800(0x10c)])),C(0x1,c[_0x232800(0x12e)](c[_0x232800(0xe6)])),C(0x2,c[_0x232800(0x12e)](b[_0x232800(0x125)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5d588e,_0x19c714,_0x16a5a3,_0x40004e)=>{const _0x4aef67=_0x232800;for(var _0x27d31d=_0x40004e>0x1?void 0x0:_0x40004e?H(_0x19c714,_0x16a5a3):_0x19c714,_0x48607d=_0x5d588e[_0x4aef67(0x115)]-0x1,_0x28f728;_0x48607d>=0x0;_0x48607d--)(_0x28f728=_0x5d588e[_0x48607d])&&(_0x27d31d=_0x28f728(_0x27d31d)||_0x27d31d);return _0x27d31d;},y=(_0x218727,_0x59bce8)=>(_0xd91f64,_0x5f4857)=>_0x59bce8(_0xd91f64,_0x5f4857,_0x218727);let g=class extends c[_0x232800(0x136)]{constructor(_0x3fd8dc,_0x5dc067){const _0x47eee9=_0x232800;super(),this[_0x47eee9(0xe8)]=_0x3fd8dc,this['_threadCommentDataSource']=_0x5dc067,this['_initDataSource']();}[_0x232800(0x141)](){const _0xcf11d9=_0x232800;this['_threadCommentDataSourceService'][_0xcf11d9(0x109)]=this[_0xcf11d9(0xe2)],this['_threadCommentDataSourceService'][_0xcf11d9(0xdd)]=!0x1;}};g=J([y(0x0,M[_0x232800(0x11e)]),y(0x1,c[_0x232800(0x12e)](p))],g);var F=Object[_0x232800(0x145)],L=Object[_0x232800(0xed)],Z=(_0x5283f9,_0x2b3b3f,_0x42b621)=>_0x2b3b3f in _0x5283f9?F(_0x5283f9,_0x2b3b3f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42b621}):_0x5283f9[_0x2b3b3f]=_0x42b621,W=(_0x1e8ee3,_0x2de0a7,_0xdd8b2f,_0x3a9f2b)=>{const _0x5694b0=_0x232800;for(var _0x3ea703=_0x3a9f2b>0x1?void 0x0:_0x3a9f2b?L(_0x2de0a7,_0xdd8b2f):_0x2de0a7,_0x3f33b7=_0x1e8ee3[_0x5694b0(0x115)]-0x1,_0x37b398;_0x3f33b7>=0x0;_0x3f33b7--)(_0x37b398=_0x1e8ee3[_0x3f33b7])&&(_0x3ea703=_0x37b398(_0x3ea703)||_0x3ea703);return _0x3ea703;},O=(_0x1f4802,_0x4ed76f)=>(_0x4f7ff6,_0x1f2db6)=>_0x4ed76f(_0x4f7ff6,_0x1f2db6,_0x1f4802),N=(_0x354e25,_0x1ef61d,_0x59fe12)=>Z(_0x354e25,typeof _0x1ef61d!=_0x232800(0x103)?_0x1ef61d+'':_0x1ef61d,_0x59fe12);exports[_0x232800(0xea)]=class extends c[_0x232800(0xe0)]{constructor(_0x5c7f8b=D,_0x2d27bc,_0x4270e6){const _0x4602b9=_0x232800;super(),this[_0x4602b9(0x106)]=_0x5c7f8b,this[_0x4602b9(0xd0)]=_0x2d27bc,this[_0x4602b9(0xf2)]=_0x4270e6;const {..._0x296edd}=c[_0x4602b9(0x114)]({},D,this[_0x4602b9(0x106)]);this[_0x4602b9(0xf2)][_0x4602b9(0x138)](q,_0x296edd);}['onStarting'](){const _0x29ead1=_0x232800;[[p],[g],[_]][_0x29ead1(0x120)](_0x311977=>{const _0x4ba5f9=_0x29ead1;this[_0x4ba5f9(0xd0)]['add'](_0x311977);});}[_0x232800(0xdb)](){const _0x22b8b8=_0x232800;this[_0x22b8b8(0xd0)][_0x22b8b8(0x12c)](g),this['_injector'][_0x22b8b8(0x12c)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x232800(0xd1),U),N(exports[_0x232800(0xea)],_0x232800(0x12f),c[_0x232800(0x129)][_0x232800(0xf3)]),exports[_0x232800(0xea)]=W([c[_0x232800(0x14a)](w[_0x232800(0x124)],b[_0x232800(0x11a)],T[_0x232800(0xd5)]),O(0x1,c[_0x232800(0x12e)](c[_0x232800(0x111)])),O(0x2,c[_0x232800(0x108)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5cf493=_0x30fe;(function(_0x266077,_0x647e33){const _0x4d3d03=_0x30fe,_0x3b0d8c=_0x266077();while(!![]){try{const _0x2a8050=parseInt(_0x4d3d03(0x191))/0x1+parseInt(_0x4d3d03(0x18d))/0x2+-parseInt(_0x4d3d03(0x1aa))/0x3*(-parseInt(_0x4d3d03(0x1b5))/0x4)+parseInt(_0x4d3d03(0x185))/0x5+-parseInt(_0x4d3d03(0x19e))/0x6+-parseInt(_0x4d3d03(0x1a0))/0x7+parseInt(_0x4d3d03(0x1c3))/0x8*(-parseInt(_0x4d3d03(0x1c2))/0x9);if(_0x2a8050===_0x647e33)break;else _0x3b0d8c['push'](_0x3b0d8c['shift']());}catch(_0x3f02c6){_0x3b0d8c['push'](_0x3b0d8c['shift']());}}}(_0x44e4,0xd412c));import{CommentService as _0x11cf3a,CollaborationSessionService as _0x1dd800,UniverCollaborationClientPlugin as _0x11c3a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c715f}from'@univerjs-pro/license';import{dayjs as _0x243e5e,UserManagerService as _0x38a066,Inject as _0x38eaf9,Injector as _0x441a4f,Disposable as _0x5b2137,CustomRangeType as _0x512e3e,UniverInstanceType as _0x39fe04,DependentOn as _0x45af73,IConfigService as _0x58e505,Plugin as _0x4810b6,merge as _0x190b26}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x338aee}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49dc2a,IThreadCommentDataSourceService as _0x410ff5}from'@univerjs/thread-comment';function _0x44e4(){const _0x257666=['_sessionService','defineProperty','ref','setConfig','getUnit','getComment','disposeWithMe','onReady','find','_threadCommentDataSource','post','/reply','rangeId','add','syncUpdateMutationToColla','userId','/edit','commentUpdate$','replyId','addUser','Solved','7204960haRvJX','OpenOrReOpen','_commentService','error','user','_threadCommentDataSourceService','/list','saveCommentToSnapshot','3109774DAhlrC','unitId','getMemberID','getUser','758388Dimkqe','Unknown','map','/add','_config','stringify','values','Add','format','rangeType','_injector','createTimestamp','replies','8773524HrZBqt','userID','5630107uRtDiU','threadId','size','filter','/solved','updateComment','Solve','_init','type','body','2813721lQpCNo','forEach','get','Delete','pipe','COMMENT','resolved','UNRECOGNIZED','customRanges','UNIVER_UNKNOWN','subscribe','4QSVnOe','slice','comment','comments','parentId','addComment','users','_threadCommentModel','Edit','parse','personId','getOwnPropertyDescriptor','length','9HKqpcS','12455736jZYerc','_userService','solved','/universer-api/comment/unit/','_initDataSource','resolveComment','_httpService','requireSession','code','root','deleteComment','Reply','content','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','pluginName'];_0x44e4=function(){return _0x257666;};return _0x44e4();}import{bufferTime as _0x1e0753}from'rxjs';import{HTTPService as _0x45151c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5dac0e=>(_0x5dac0e[_0x5dac0e[_0x5cf493(0x186)]=0x0]=_0x5cf493(0x186),_0x5dac0e[_0x5dac0e[_0x5cf493(0x184)]=0x1]='Solved',_0x5dac0e[_0x5dac0e[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x5dac0e))(I||{}),v=(_0x379224=>(_0x379224[_0x379224[_0x5cf493(0x192)]=0x0]='Unknown',_0x379224[_0x379224[_0x5cf493(0x198)]=0x1]=_0x5cf493(0x198),_0x379224[_0x379224[_0x5cf493(0x1ce)]=0x2]=_0x5cf493(0x1ce),_0x379224[_0x379224[_0x5cf493(0x1bd)]=0x3]='Edit',_0x379224[_0x379224[_0x5cf493(0x1ad)]=0x4]=_0x5cf493(0x1ad),_0x379224[_0x379224[_0x5cf493(0x1a6)]=0x5]=_0x5cf493(0x1a6),_0x379224[_0x379224[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x379224))(v||{});const y=_0xcafa98=>_0x243e5e(new Date(+_0xcafa98))['format'](_0x5cf493(0x1d0)),B=async(_0x159eeb,_0x5af047)=>{const _0x39c960=_0x5cf493,_0x5f009a=_0x159eeb[_0x39c960(0x1ac)](_0x38a066),_0x15dfee=_0x159eeb['get'](_0x45151c);_0x5af047[_0x39c960(0x1ab)](_0x2193d9=>{const _0x4b57f4=_0x39c960;_0x5f009a[_0x4b57f4(0x190)](_0x2193d9)&&_0x5af047['delete'](_0x2193d9);}),_0x5af047[_0x39c960(0x1a2)]&&(await _0x15dfee[_0x39c960(0x1ac)](_0x39c960(0x1d1),{'params':{'userIDs':[..._0x5af047]}}))[_0x39c960(0x1a9)][_0x39c960(0x1bb)]['forEach'](_0x229654=>{const _0x1a13d1=_0x39c960;_0x229654&&_0x5f009a[_0x1a13d1(0x183)](_0x229654);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3a2940,_0xda7fd1,_0x52959d,_0x4bee49)=>{const _0x3d218f=_0x5cf493;for(var _0x347075=_0x4bee49>0x1?void 0x0:_0x4bee49?K(_0xda7fd1,_0x52959d):_0xda7fd1,_0x5d40ca=_0x3a2940[_0x3d218f(0x1c1)]-0x1,_0x49d6f0;_0x5d40ca>=0x0;_0x5d40ca--)(_0x49d6f0=_0x3a2940[_0x5d40ca])&&(_0x347075=_0x49d6f0(_0x347075)||_0x347075);return _0x347075;},p=(_0x4a4942,_0x540efb)=>(_0x4258d3,_0x3cc4e7)=>_0x540efb(_0x4258d3,_0x3cc4e7,_0x4a4942);let _=class extends _0x5b2137{constructor(_0x4b04d2,_0xd0c488,_0x277951,_0x30550d){const _0x309dcc=_0x5cf493;super(),this[_0x309dcc(0x187)]=_0x4b04d2,this[_0x309dcc(0x1bc)]=_0xd0c488,this[_0x309dcc(0x1c4)]=_0x277951,this[_0x309dcc(0x19b)]=_0x30550d,this[_0x309dcc(0x1a7)](),this['_initUserSync']();}['_initUserSync'](){const _0x3de209=_0x5cf493;this[_0x3de209(0x1d9)](this[_0x3de209(0x1bc)][_0x3de209(0x181)][_0x3de209(0x1ae)](_0x1e0753(0x10))[_0x3de209(0x1b4)](_0x54f43b=>{const _0xaf60a8=_0x3de209,_0x36babf=new Set();_0x54f43b['forEach'](_0x3c853b=>{const _0x4636cc=_0x30fe;switch(_0x3c853b['type']){case _0x4636cc(0x1e0):{const _0x5e26ee=_0x3c853b['payload'][_0x4636cc(0x1bf)];_0x36babf['add'](_0x5e26ee);break;}}}),B(this[_0xaf60a8(0x19b)],_0x36babf);}));}[_0x5cf493(0x1a7)](){const _0xe4034d=_0x5cf493;this[_0xe4034d(0x1d9)](this[_0xe4034d(0x187)][_0xe4034d(0x181)][_0xe4034d(0x1b4)](async _0x19e72a=>{const _0x40de7b=_0xe4034d;var _0x4009d6,_0x1f5826,_0x4a6f45,_0x59f6a0;const _0x188fc2=(_0x4009d6=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d7)](_0x19e72a['unitId'])[_0x40de7b(0x1db)](_0x139775=>_0x139775['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x4009d6[_0x40de7b(0x1cc)];if(!_0x188fc2)return;const {unitId:_0x207f87,subUnitId:_0x1d032b}=_0x188fc2;switch(_0x19e72a[_0x40de7b(0x189)]&&this[_0x40de7b(0x1c4)][_0x40de7b(0x183)](_0x19e72a['user']),_0x19e72a[_0x40de7b(0x1a8)]){case v[_0x40de7b(0x198)]:break;case v[_0x40de7b(0x1ce)]:{this['_threadCommentModel'][_0x40de7b(0x1ba)](_0x207f87,_0x1d032b,{'unitId':_0x207f87,'subUnitId':_0x1d032b,'ref':'','id':_0x19e72a[_0x40de7b(0x182)],'dT':y(+_0x19e72a[_0x40de7b(0x19c)]),'threadId':_0x19e72a[_0x40de7b(0x1a1)],'personId':(_0x4a6f45=(_0x1f5826=_0x19e72a[_0x40de7b(0x189)])==null?void 0x0:_0x1f5826[_0x40de7b(0x19f)])!=null?_0x4a6f45:_0x19e72a[_0x40de7b(0x1e2)],'text':JSON[_0x40de7b(0x1be)](_0x19e72a[_0x40de7b(0x1cf)]),'parentId':_0x188fc2['id']});break;}case v[_0x40de7b(0x1ad)]:{const _0x1f0f3a=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d8)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);_0x1f0f3a&&_0x1f0f3a[_0x40de7b(0x1b9)]&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1cd)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);break;}case v[_0x40de7b(0x1bd)]:{this['_threadCommentModel'][_0x40de7b(0x1a5)](_0x207f87,_0x1d032b,{'commentId':_0x19e72a[_0x40de7b(0x182)],'text':JSON['parse'](_0x19e72a[_0x40de7b(0x1cf)])});break;}case v[_0x40de7b(0x1a6)]:{const _0x279b78=(_0x59f6a0=this['_threadCommentModel'][_0x40de7b(0x1d7)](_0x19e72a[_0x40de7b(0x18e)])[_0x40de7b(0x1db)](_0x3a3750=>_0x3a3750['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x59f6a0[_0x40de7b(0x1cc)];_0x279b78&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1c8)](_0x207f87,_0x1d032b,_0x279b78['id'],_0x19e72a[_0x40de7b(0x1c5)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38eaf9(_0x11cf3a)),p(0x1,_0x38eaf9(_0x49dc2a)),p(0x2,_0x38eaf9(_0x38a066)),p(0x3,_0x38eaf9(_0x441a4f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5cf493(0x1c0)],Q=(_0x5785b9,_0x38e50f,_0xe4a653,_0x553775)=>{const _0x3aba7d=_0x5cf493;for(var _0x15b12e=_0x553775>0x1?void 0x0:_0x553775?k(_0x38e50f,_0xe4a653):_0x38e50f,_0x5d7298=_0x5785b9[_0x3aba7d(0x1c1)]-0x1,_0x5ef502;_0x5d7298>=0x0;_0x5d7298--)(_0x5ef502=_0x5785b9[_0x5d7298])&&(_0x15b12e=_0x5ef502(_0x15b12e)||_0x15b12e);return _0x15b12e;},b=(_0x28b6cd,_0x36e2cf)=>(_0x2c6030,_0x5e1f7c)=>_0x36e2cf(_0x2c6030,_0x5e1f7c,_0x28b6cd);function _0x30fe(_0x13a02c,_0x5d4466){const _0x44e44c=_0x44e4();return _0x30fe=function(_0x30fea5,_0x15e992){_0x30fea5=_0x30fea5-0x180;let _0x56a1e8=_0x44e44c[_0x30fea5];return _0x56a1e8;},_0x30fe(_0x13a02c,_0x5d4466);}function X(_0x5b0494,_0x41587e){const _0x51d25d=_0x5cf493,_0x5df8c5=_0x5b0494[_0x51d25d(0x19d)][0x0];return{..._0x41587e,'id':_0x5df8c5[_0x51d25d(0x182)],'resolved':_0x5b0494[_0x51d25d(0x1c5)]===0x1,'dT':y(_0x5df8c5['createTimestamp']),'personId':_0x5df8c5[_0x51d25d(0x1e2)],'threadId':_0x5df8c5[_0x51d25d(0x1a1)]};}function ee(_0x4b4c9f,_0x11e9ac,_0x321768){const _0x5d75e1=_0x5cf493;var _0x14a91d,_0xc77e90;if(((_0xc77e90=(_0x14a91d=_0x4b4c9f==null?void 0x0:_0x4b4c9f[_0x5d75e1(0x19d)])==null?void 0x0:_0x14a91d[_0x5d75e1(0x1c1)])!=null?_0xc77e90:0x0)>0x0){const _0x58d1e5=(_0x2de3f9,_0x25a553)=>({'id':_0x2de3f9[_0x5d75e1(0x182)],'threadId':_0x2de3f9[_0x5d75e1(0x1a1)],'dT':y(_0x2de3f9[_0x5d75e1(0x19c)]),'personId':_0x2de3f9['userId'],'resolved':_0x4b4c9f[_0x5d75e1(0x1c5)]===I['Solved'],'unitId':_0x11e9ac,'subUnitId':_0x321768,'text':JSON[_0x5d75e1(0x1be)](_0x2de3f9[_0x5d75e1(0x1cf)]),'parentId':_0x25a553}),_0x46dcff=_0x58d1e5(_0x4b4c9f[_0x5d75e1(0x19d)][0x0]);return{..._0x46dcff,'children':_0x4b4c9f[_0x5d75e1(0x19d)][_0x5d75e1(0x1b6)](0x1)[_0x5d75e1(0x193)](_0xfbcb40=>_0x58d1e5(_0xfbcb40,_0x46dcff['id']))};}return null;}let S=class{constructor(_0x3c22a6,_0x4e4cd7,_0x2662a4){const _0x1ce1be=_0x5cf493;this[_0x1ce1be(0x1c9)]=_0x3c22a6,this['_userService']=_0x4e4cd7,this['_sessionService']=_0x2662a4;}async['addComment'](_0x28bc44){const _0x50f00c=_0x5cf493;var _0x276f49,_0x3a6e54;const {parentId:_0x1030d0,unitId:_0x2d8f23,text:_0x1141bd,threadId:_0x5b8b5c}=_0x28bc44,_0x5d0582=(_0x3a6e54=(_0x276f49=_0x1141bd['customRanges'])==null?void 0x0:_0x276f49[_0x50f00c(0x1a3)](_0x25e74f=>_0x25e74f[_0x50f00c(0x19a)]===_0x512e3e[_0x50f00c(0x1af)])[_0x50f00c(0x193)](_0x6b099d=>_0x6b099d[_0x50f00c(0x1df)]))!=null?_0x3a6e54:[],_0x252da3=JSON['stringify'](_0x1141bd),_0x2e3441=(await this[_0x50f00c(0x1d3)][_0x50f00c(0x1ca)](_0x2d8f23))[_0x50f00c(0x18f)]();if(_0x1030d0){const _0xeb8965={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582,'threadId':_0x5b8b5c},_0x173ef4=(await this[_0x50f00c(0x1c9)]['post'](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x1de),{'body':_0xeb8965}))[_0x50f00c(0x1a9)]['reply'];return{..._0x28bc44,'id':_0x173ef4[_0x50f00c(0x182)],'dT':_0x243e5e(+_0x173ef4[_0x50f00c(0x19c)])[_0x50f00c(0x199)](_0x50f00c(0x1d0)),'personId':_0x173ef4[_0x50f00c(0x1e2)]};}else{const _0xcc9556={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582},_0x2917be=await this[_0x50f00c(0x1c9)][_0x50f00c(0x1dd)](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x194),{'body':_0xcc9556});return X(_0x2917be[_0x50f00c(0x1a9)][_0x50f00c(0x1b7)],_0x28bc44);}}async[_0x5cf493(0x1a5)](_0x2329c9){const _0xbb189d=_0x5cf493;var _0x36fad4,_0xeb881b;const {text:_0xf85fc1,unitId:_0x2ad134}=_0x2329c9,_0x10397c=(_0xeb881b=(_0x36fad4=_0xf85fc1[_0xbb189d(0x1b2)])==null?void 0x0:_0x36fad4['filter'](_0x3706e5=>_0x3706e5[_0xbb189d(0x19a)]===_0x512e3e['COMMENT'])['map'](_0x15a8f0=>_0x15a8f0[_0xbb189d(0x1df)]))!=null?_0xeb881b:[],_0x3dfd5a=JSON[_0xbb189d(0x196)](_0xf85fc1),_0x59c3e4=_0x2329c9['threadId'],_0x31e033=_0x2329c9['id'],_0xc57238={'memberId':(await this[_0xbb189d(0x1d3)]['requireSession'](_0x2ad134))['getMemberID'](),'unitId':_0x2ad134,'threadId':_0x59c3e4,'mention':_0x10397c,'content':_0x3dfd5a,'replyId':_0x31e033},_0x3c8372=await this[_0xbb189d(0x1c9)][_0xbb189d(0x1dd)]('/universer-api/comment/unit/'+_0x2ad134+_0xbb189d(0x180),{'body':_0xc57238});return!_0x3c8372['body']['error']||_0x3c8372[_0xbb189d(0x1a9)][_0xbb189d(0x188)]['code']===0x1;}async[_0x5cf493(0x1c8)](_0x56cf98){const _0x558233=_0x5cf493,{unitId:_0x2fcdae}=_0x56cf98,_0x5bc2bb=_0x56cf98[_0x558233(0x1a1)],_0x6e8a89={'memberId':this[_0x558233(0x1c4)]['getCurrentUser']()[_0x558233(0x19f)],'unitId':_0x2fcdae,'threadId':_0x5bc2bb,'solved':_0x56cf98[_0x558233(0x1b0)]?I[_0x558233(0x184)]:I[_0x558233(0x186)]},_0xc0b15b=await this[_0x558233(0x1c9)][_0x558233(0x1dd)](_0x558233(0x1c6)+_0x2fcdae+_0x558233(0x1a4),{'body':_0x6e8a89});return!_0xc0b15b[_0x558233(0x1a9)]['error']||_0xc0b15b[_0x558233(0x1a9)][_0x558233(0x188)][_0x558233(0x1cb)]===0x1;}async['deleteComment'](_0x3593cf,_0x5e8d47,_0x2a0744,_0x5499a6){const _0x2eadfb=_0x5cf493,_0x4d4976={'memberId':(await this['_sessionService'][_0x2eadfb(0x1ca)](_0x3593cf))[_0x2eadfb(0x18f)](),'threadId':_0x2a0744,'replyId':_0x5499a6,'unitId':_0x3593cf},_0x2b1f24=await this[_0x2eadfb(0x1c9)][_0x2eadfb(0x1dd)](_0x2eadfb(0x1c6)+_0x3593cf+'/delete',{'body':_0x4d4976});return!_0x2b1f24[_0x2eadfb(0x1a9)][_0x2eadfb(0x188)]||_0x2b1f24['body'][_0x2eadfb(0x188)]['code']===0x1;}async['listComments'](_0x5d42b1,_0x1352ec,_0x4f0e99){const _0x195858=_0x5cf493,_0x5c002b={'unitId':_0x5d42b1,'threadId':_0x4f0e99},_0x9ab942=await this['_httpService'][_0x195858(0x1dd)](_0x195858(0x1c6)+_0x5d42b1+_0x195858(0x18b),{'body':_0x5c002b}),_0x27d9d5=_0x4f0e99['map'](_0x18910c=>ee(_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1b8)][_0x18910c],_0x5d42b1,_0x1352ec))[_0x195858(0x1a3)](Boolean);return Object[_0x195858(0x197)](_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1bb)])[_0x195858(0x1ab)](_0x1b2e9c=>{const _0x3e2c7a=_0x195858;this[_0x3e2c7a(0x1c4)][_0x3e2c7a(0x183)](_0x1b2e9c);}),_0x27d9d5;}[_0x5cf493(0x18c)](_0x11d155){const _0x511a74=_0x5cf493;return{'id':_0x11d155['id'],'threadId':_0x11d155['threadId'],'ref':_0x11d155[_0x511a74(0x1d5)]};}};S=Q([b(0x0,_0x38eaf9(_0x45151c)),b(0x1,_0x38eaf9(_0x38a066)),b(0x2,_0x38eaf9(_0x1dd800))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x265245,_0xeff6e2,_0x4a888c,_0x3cbdcd)=>{for(var _0x35f1d8=_0x3cbdcd>0x1?void 0x0:_0x3cbdcd?re(_0xeff6e2,_0x4a888c):_0xeff6e2,_0x76137c=_0x265245['length']-0x1,_0x277408;_0x76137c>=0x0;_0x76137c--)(_0x277408=_0x265245[_0x76137c])&&(_0x35f1d8=_0x277408(_0x35f1d8)||_0x35f1d8);return _0x35f1d8;},M=(_0x31d5db,_0x4bba8c)=>(_0x417642,_0x3e8fa6)=>_0x4bba8c(_0x417642,_0x3e8fa6,_0x31d5db);let f=class extends _0x5b2137{constructor(_0x3533dd,_0x102c02){const _0x435735=_0x5cf493;super(),this[_0x435735(0x18a)]=_0x3533dd,this['_threadCommentDataSource']=_0x102c02,this[_0x435735(0x1c7)]();}['_initDataSource'](){const _0x1dbfd6=_0x5cf493;this[_0x1dbfd6(0x18a)]['dataSource']=this[_0x1dbfd6(0x1dc)],this[_0x1dbfd6(0x18a)][_0x1dbfd6(0x1e1)]=!0x1;}};f=te([M(0x0,_0x410ff5),M(0x1,_0x38eaf9(S))],f);var se=Object[_0x5cf493(0x1d4)],oe=Object[_0x5cf493(0x1c0)],ne=(_0x5f4bfc,_0x6bdb32,_0x20bc0a)=>_0x6bdb32 in _0x5f4bfc?se(_0x5f4bfc,_0x6bdb32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20bc0a}):_0x5f4bfc[_0x6bdb32]=_0x20bc0a,ie=(_0x311c4f,_0xdd2b9d,_0x47fdc6,_0x1a02dd)=>{for(var _0x35739b=_0x1a02dd>0x1?void 0x0:_0x1a02dd?oe(_0xdd2b9d,_0x47fdc6):_0xdd2b9d,_0x531f39=_0x311c4f['length']-0x1,_0x117aed;_0x531f39>=0x0;_0x531f39--)(_0x117aed=_0x311c4f[_0x531f39])&&(_0x35739b=_0x117aed(_0x35739b)||_0x35739b);return _0x35739b;},N=(_0x5c21fa,_0x4c0e23)=>(_0x513e4d,_0x50cc87)=>_0x4c0e23(_0x513e4d,_0x50cc87,_0x5c21fa),$=(_0x1d2f77,_0x49c925,_0x3a3f71)=>ne(_0x1d2f77,typeof _0x49c925!='symbol'?_0x49c925+'':_0x49c925,_0x3a3f71);let g=class extends _0x4810b6{constructor(_0xec447b=O,_0x2a2daa,_0x2bf3d5){const _0x3bb493=_0x5cf493;super(),this[_0x3bb493(0x195)]=_0xec447b,this[_0x3bb493(0x19b)]=_0x2a2daa,this['_configService']=_0x2bf3d5;const {..._0x34e84d}=_0x190b26({},O,this[_0x3bb493(0x195)]);this['_configService'][_0x3bb493(0x1d6)](z,_0x34e84d);}['onStarting'](){const _0x29ff60=_0x5cf493;[[S],[f],[_]][_0x29ff60(0x1ab)](_0xb34e77=>{const _0x5962e4=_0x29ff60;this[_0x5962e4(0x19b)][_0x5962e4(0x1e0)](_0xb34e77);});}[_0x5cf493(0x1da)](){const _0x3de54b=_0x5cf493;this[_0x3de54b(0x19b)][_0x3de54b(0x1ac)](f),this[_0x3de54b(0x19b)]['get'](_);}};$(g,_0x5cf493(0x1d2),W),$(g,'type',_0x39fe04[_0x5cf493(0x1b3)]),g=ie([_0x45af73(_0x338aee,_0x11c3a8,_0x1c715f),N(0x1,_0x38eaf9(_0x441a4f)),N(0x2,_0x58e505)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x15cd(){const _0x3ba6ad=['Reply','Unknown','_threadCommentDataSource','4tdPchq','6fbgOrZ','type','8627880tAtNqW','1528BYvkDZ','/universer-api/user/list','requireSession','add','createTimestamp','8208SlrLsQ','_initUserSync','_userService','symbol','resolveComment','/solved','3139455byeWhe','filter','dataSource','_injector','deleteComment','YYYY/MM/DD\x20HH:mm','commentUpdate$','addComment','replyId','content','user','threadId','error','reply','unitId','format','forEach','_config','syncUpdateMutationToColla','getMemberID','4093453GWzeSq','_threadCommentModel','159OzTvAV','disposeWithMe','/universer-api/comment/unit/','subscribe','onReady','Solved','rangeType','Solve','getOwnPropertyDescriptor','ref','setConfig','/add','_init','20966bfBniH','Add','slice','_configService','/reply','replies','values','_sessionService','_threadCommentDataSourceService','solved','get','OpenOrReOpen','308996SmvDBF','COMMENT','body','users','_httpService','payload','onStarting','getCurrentUser','UNRECOGNIZED','parse','/delete','code','getUser','listComments','post','getUnit','Delete','userID','thread-comment-data-source.config','8796FQzEkC','_initDataSource','userId','find','rangeId','personId','root','length','customRanges','comment','4160RbcSyz','Edit','delete','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','addUser'];_0x15cd=function(){return _0x3ba6ad;};return _0x15cd();}const _0x484af3=_0x448c;(function(_0x905c0e,_0x2fab82){const _0x4e6bd0=_0x448c,_0x3ba09a=_0x905c0e();while(!![]){try{const _0x3bde17=parseInt(_0x4e6bd0(0xb4))/0x1*(-parseInt(_0x4e6bd0(0xdb))/0x2)+parseInt(_0x4e6bd0(0x9b))/0x3*(-parseInt(_0x4e6bd0(0xdf))/0x4)+parseInt(_0x4e6bd0(0xea))/0x5+-parseInt(_0x4e6bd0(0xdc))/0x6*(-parseInt(_0x4e6bd0(0x99))/0x7)+-parseInt(_0x4e6bd0(0xd1))/0x8*(-parseInt(_0x4e6bd0(0xe4))/0x9)+parseInt(_0x4e6bd0(0xde))/0xa+parseInt(_0x4e6bd0(0xa8))/0xb*(-parseInt(_0x4e6bd0(0xc7))/0xc);if(_0x3bde17===_0x2fab82)break;else _0x3ba09a['push'](_0x3ba09a['shift']());}catch(_0x5f0343){_0x3ba09a['push'](_0x3ba09a['shift']());}}}(_0x15cd,0x7d93a));import{CommentService as _0x410c99,CollaborationSessionService as _0x844a5f,UniverCollaborationClientPlugin as _0x706f71}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3aca80}from'@univerjs-pro/license';import{dayjs as _0x16b3d9,UserManagerService as _0x587f73,Inject as _0x489677,Injector as _0x4b33d3,Disposable as _0x3eeb98,CustomRangeType as _0x25a850,UniverInstanceType as _0x4f170b,DependentOn as _0x24b919,IConfigService as _0x1d6929,Plugin as _0x284dc3,merge as _0x35db6f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3da613}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2321f4,IThreadCommentDataSourceService as _0x3e8143}from'@univerjs/thread-comment';import{bufferTime as _0x46d570}from'rxjs';import{HTTPService as _0x5d2277}from'@univerjs/network';const W=_0x484af3(0xd5);var I=(_0x2417ab=>(_0x2417ab[_0x2417ab[_0x484af3(0xb3)]=0x0]=_0x484af3(0xb3),_0x2417ab[_0x2417ab[_0x484af3(0xa0)]=0x1]=_0x484af3(0xa0),_0x2417ab[_0x2417ab[_0x484af3(0xbc)]=-0x1]='UNRECOGNIZED',_0x2417ab))(I||{}),v=(_0x460bd6=>(_0x460bd6[_0x460bd6[_0x484af3(0xd9)]=0x0]=_0x484af3(0xd9),_0x460bd6[_0x460bd6['Add']=0x1]=_0x484af3(0xa9),_0x460bd6[_0x460bd6[_0x484af3(0xd8)]=0x2]=_0x484af3(0xd8),_0x460bd6[_0x460bd6['Edit']=0x3]=_0x484af3(0xd2),_0x460bd6[_0x460bd6['Delete']=0x4]=_0x484af3(0xc4),_0x460bd6[_0x460bd6[_0x484af3(0xa2)]=0x5]=_0x484af3(0xa2),_0x460bd6[_0x460bd6[_0x484af3(0xbc)]=-0x1]=_0x484af3(0xbc),_0x460bd6))(v||{});const y=_0x3bf6e9=>_0x16b3d9(new Date(+_0x3bf6e9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x48c2bc,_0x2ddefc)=>{const _0x32cea1=_0x484af3,_0x22886a=_0x48c2bc[_0x32cea1(0xb2)](_0x587f73),_0x57fd7f=_0x48c2bc[_0x32cea1(0xb2)](_0x5d2277);_0x2ddefc[_0x32cea1(0x95)](_0x4de656=>{const _0x14126e=_0x32cea1;_0x22886a[_0x14126e(0xc0)](_0x4de656)&&_0x2ddefc[_0x14126e(0xd3)](_0x4de656);}),_0x2ddefc['size']&&(await _0x57fd7f[_0x32cea1(0xb2)](_0x32cea1(0xe0),{'params':{'userIDs':[..._0x2ddefc]}}))['body'][_0x32cea1(0xb7)][_0x32cea1(0x95)](_0x15b07d=>{const _0x2ab095=_0x32cea1;_0x15b07d&&_0x22886a[_0x2ab095(0xd7)](_0x15b07d);});};function _0x448c(_0x2064a8,_0xe4404c){const _0x15cd26=_0x15cd();return _0x448c=function(_0x448ca1,_0x37a6e6){_0x448ca1=_0x448ca1-0x93;let _0x768dfc=_0x15cd26[_0x448ca1];return _0x768dfc;},_0x448c(_0x2064a8,_0xe4404c);}var K=Object[_0x484af3(0xa3)],V=(_0x10d94f,_0x2b18be,_0x3f5aea,_0x35c7f2)=>{const _0x3ebb44=_0x484af3;for(var _0x324436=_0x35c7f2>0x1?void 0x0:_0x35c7f2?K(_0x2b18be,_0x3f5aea):_0x2b18be,_0x3ae2d1=_0x10d94f[_0x3ebb44(0xce)]-0x1,_0xbf06f2;_0x3ae2d1>=0x0;_0x3ae2d1--)(_0xbf06f2=_0x10d94f[_0x3ae2d1])&&(_0x324436=_0xbf06f2(_0x324436)||_0x324436);return _0x324436;},p=(_0x4c2e6d,_0x5589a2)=>(_0x495644,_0x15801a)=>_0x5589a2(_0x495644,_0x15801a,_0x4c2e6d);let _=class extends _0x3eeb98{constructor(_0x934b1e,_0x4ee911,_0x1bffd9,_0x404782){const _0x2dc7e3=_0x484af3;super(),this['_commentService']=_0x934b1e,this[_0x2dc7e3(0x9a)]=_0x4ee911,this[_0x2dc7e3(0xe6)]=_0x1bffd9,this[_0x2dc7e3(0xed)]=_0x404782,this[_0x2dc7e3(0xa7)](),this[_0x2dc7e3(0xe5)]();}[_0x484af3(0xe5)](){const _0x5ec0d8=_0x484af3;this['disposeWithMe'](this[_0x5ec0d8(0x9a)]['commentUpdate$']['pipe'](_0x46d570(0x10))['subscribe'](_0x520229=>{const _0x41e715=_0x5ec0d8,_0x11d514=new Set();_0x520229[_0x41e715(0x95)](_0x3a4c8a=>{const _0x31cd41=_0x41e715;switch(_0x3a4c8a[_0x31cd41(0xdd)]){case _0x31cd41(0xe2):{const _0x1faa56=_0x3a4c8a[_0x31cd41(0xb9)][_0x31cd41(0xcc)];_0x11d514['add'](_0x1faa56);break;}}}),B(this[_0x41e715(0xed)],_0x11d514);}));}[_0x484af3(0xa7)](){const _0x181688=_0x484af3;this[_0x181688(0x9c)](this['_commentService'][_0x181688(0xf0)][_0x181688(0x9e)](async _0x3f64d0=>{const _0x2ba8d1=_0x181688;var _0x5ca012,_0x4dce7e,_0x515b93,_0x1fcfb8;const _0x981617=(_0x5ca012=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0[_0x2ba8d1(0x93)])[_0x2ba8d1(0xca)](_0x500fe0=>_0x500fe0['threadId']===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x5ca012[_0x2ba8d1(0xcd)];if(!_0x981617)return;const {unitId:_0xe883c0,subUnitId:_0x1c9acb}=_0x981617;switch(_0x3f64d0[_0x2ba8d1(0xf4)]&&this[_0x2ba8d1(0xe6)][_0x2ba8d1(0xd7)](_0x3f64d0[_0x2ba8d1(0xf4)]),_0x3f64d0[_0x2ba8d1(0xdd)]){case v[_0x2ba8d1(0xa9)]:break;case v['Reply']:{this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xf1)](_0xe883c0,_0x1c9acb,{'unitId':_0xe883c0,'subUnitId':_0x1c9acb,'ref':'','id':_0x3f64d0['replyId'],'dT':y(+_0x3f64d0['createTimestamp']),'threadId':_0x3f64d0[_0x2ba8d1(0xf5)],'personId':(_0x515b93=(_0x4dce7e=_0x3f64d0[_0x2ba8d1(0xf4)])==null?void 0x0:_0x4dce7e[_0x2ba8d1(0xc5)])!=null?_0x515b93:_0x3f64d0[_0x2ba8d1(0xc9)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)]),'parentId':_0x981617['id']});break;}case v[_0x2ba8d1(0xc4)]:{const _0x2321f3=this[_0x2ba8d1(0x9a)]['getComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);_0x2321f3&&_0x2321f3['parentId']&&this[_0x2ba8d1(0x9a)]['deleteComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);break;}case v[_0x2ba8d1(0xd2)]:{this['_threadCommentModel']['updateComment'](_0xe883c0,_0x1c9acb,{'commentId':_0x3f64d0[_0x2ba8d1(0xf2)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)])});break;}case v[_0x2ba8d1(0xa2)]:{const _0x2037ac=(_0x1fcfb8=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0['unitId'])[_0x2ba8d1(0xca)](_0x1bc15e=>_0x1bc15e[_0x2ba8d1(0xf5)]===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x1fcfb8['root'];_0x2037ac&&this['_threadCommentModel'][_0x2ba8d1(0xe8)](_0xe883c0,_0x1c9acb,_0x2037ac['id'],_0x3f64d0[_0x2ba8d1(0xb1)]===I[_0x2ba8d1(0xa0)]);break;}}}));}};_=V([p(0x0,_0x489677(_0x410c99)),p(0x1,_0x489677(_0x2321f4)),p(0x2,_0x489677(_0x587f73)),p(0x3,_0x489677(_0x4b33d3))],_);const z=_0x484af3(0xc6),O={};var k=Object[_0x484af3(0xa3)],Q=(_0x21b830,_0x5a1f04,_0x5e9582,_0x351cc0)=>{const _0x1befda=_0x484af3;for(var _0x2b57e4=_0x351cc0>0x1?void 0x0:_0x351cc0?k(_0x5a1f04,_0x5e9582):_0x5a1f04,_0x195b38=_0x21b830[_0x1befda(0xce)]-0x1,_0x429f7f;_0x195b38>=0x0;_0x195b38--)(_0x429f7f=_0x21b830[_0x195b38])&&(_0x2b57e4=_0x429f7f(_0x2b57e4)||_0x2b57e4);return _0x2b57e4;},b=(_0x11471f,_0x4d8b98)=>(_0x306e83,_0x4cef75)=>_0x4d8b98(_0x306e83,_0x4cef75,_0x11471f);function X(_0x4d28c0,_0x35001c){const _0x487168=_0x484af3,_0x4ec3d8=_0x4d28c0['replies'][0x0];return{..._0x35001c,'id':_0x4ec3d8['replyId'],'resolved':_0x4d28c0['solved']===0x1,'dT':y(_0x4ec3d8[_0x487168(0xe3)]),'personId':_0x4ec3d8[_0x487168(0xc9)],'threadId':_0x4ec3d8[_0x487168(0xf5)]};}function ee(_0x5a4fd0,_0x4bc89f,_0x262494){const _0x1a90c7=_0x484af3;var _0x592fa9,_0x1bbd44;if(((_0x1bbd44=(_0x592fa9=_0x5a4fd0==null?void 0x0:_0x5a4fd0[_0x1a90c7(0xad)])==null?void 0x0:_0x592fa9['length'])!=null?_0x1bbd44:0x0)>0x0){const _0xd0b0a5=(_0x35b21e,_0x2e4267)=>({'id':_0x35b21e[_0x1a90c7(0xf2)],'threadId':_0x35b21e[_0x1a90c7(0xf5)],'dT':y(_0x35b21e[_0x1a90c7(0xe3)]),'personId':_0x35b21e['userId'],'resolved':_0x5a4fd0[_0x1a90c7(0xb1)]===I['Solved'],'unitId':_0x4bc89f,'subUnitId':_0x262494,'text':JSON['parse'](_0x35b21e['content']),'parentId':_0x2e4267}),_0xfd9577=_0xd0b0a5(_0x5a4fd0[_0x1a90c7(0xad)][0x0]);return{..._0xfd9577,'children':_0x5a4fd0[_0x1a90c7(0xad)][_0x1a90c7(0xaa)](0x1)['map'](_0x45e001=>_0xd0b0a5(_0x45e001,_0xfd9577['id']))};}return null;}let S=class{constructor(_0xb47edd,_0x35a420,_0x2a58a1){const _0x183084=_0x484af3;this[_0x183084(0xb8)]=_0xb47edd,this[_0x183084(0xe6)]=_0x35a420,this[_0x183084(0xaf)]=_0x2a58a1;}async[_0x484af3(0xf1)](_0x542a55){const _0x4a0d05=_0x484af3;var _0x3e71a4,_0x1d1a48;const {parentId:_0x2fd295,unitId:_0xf5a6b1,text:_0x57d8ea,threadId:_0x1b1f97}=_0x542a55,_0x2d3f20=(_0x1d1a48=(_0x3e71a4=_0x57d8ea['customRanges'])==null?void 0x0:_0x3e71a4[_0x4a0d05(0xeb)](_0x450d52=>_0x450d52[_0x4a0d05(0xa1)]===_0x25a850['COMMENT'])[_0x4a0d05(0xd6)](_0x50863b=>_0x50863b[_0x4a0d05(0xcb)]))!=null?_0x1d1a48:[],_0x3cfdde=JSON[_0x4a0d05(0xd4)](_0x57d8ea),_0x452449=(await this[_0x4a0d05(0xaf)][_0x4a0d05(0xe1)](_0xf5a6b1))[_0x4a0d05(0x98)]();if(_0x2fd295){const _0x3aa433={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20,'threadId':_0x1b1f97},_0x42fe71=(await this[_0x4a0d05(0xb8)][_0x4a0d05(0xc2)]('/universer-api/comment/unit/'+_0xf5a6b1+_0x4a0d05(0xac),{'body':_0x3aa433}))[_0x4a0d05(0xb6)][_0x4a0d05(0xf7)];return{..._0x542a55,'id':_0x42fe71[_0x4a0d05(0xf2)],'dT':_0x16b3d9(+_0x42fe71[_0x4a0d05(0xe3)])[_0x4a0d05(0x94)](_0x4a0d05(0xef)),'personId':_0x42fe71[_0x4a0d05(0xc9)]};}else{const _0x53bf30={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20},_0x1ec399=await this[_0x4a0d05(0xb8)]['post'](_0x4a0d05(0x9d)+_0xf5a6b1+_0x4a0d05(0xa6),{'body':_0x53bf30});return X(_0x1ec399['body'][_0x4a0d05(0xd0)],_0x542a55);}}async['updateComment'](_0x3002fb){const _0x55c190=_0x484af3;var _0x2180f7,_0x37dbc6;const {text:_0x36e5e5,unitId:_0x23d397}=_0x3002fb,_0x29f0f6=(_0x37dbc6=(_0x2180f7=_0x36e5e5[_0x55c190(0xcf)])==null?void 0x0:_0x2180f7[_0x55c190(0xeb)](_0x2878b4=>_0x2878b4[_0x55c190(0xa1)]===_0x25a850[_0x55c190(0xb5)])[_0x55c190(0xd6)](_0x40f54e=>_0x40f54e[_0x55c190(0xcb)]))!=null?_0x37dbc6:[],_0xae4095=JSON[_0x55c190(0xd4)](_0x36e5e5),_0x2a6771=_0x3002fb[_0x55c190(0xf5)],_0x56cf47=_0x3002fb['id'],_0x130163={'memberId':(await this[_0x55c190(0xaf)][_0x55c190(0xe1)](_0x23d397))['getMemberID'](),'unitId':_0x23d397,'threadId':_0x2a6771,'mention':_0x29f0f6,'content':_0xae4095,'replyId':_0x56cf47},_0xc88552=await this[_0x55c190(0xb8)][_0x55c190(0xc2)](_0x55c190(0x9d)+_0x23d397+'/edit',{'body':_0x130163});return!_0xc88552[_0x55c190(0xb6)][_0x55c190(0xf6)]||_0xc88552[_0x55c190(0xb6)]['error'][_0x55c190(0xbf)]===0x1;}async[_0x484af3(0xe8)](_0x5ee94c){const _0x5717fa=_0x484af3,{unitId:_0x365c3d}=_0x5ee94c,_0xefed8a=_0x5ee94c[_0x5717fa(0xf5)],_0xc0b204={'memberId':this[_0x5717fa(0xe6)][_0x5717fa(0xbb)]()['userID'],'unitId':_0x365c3d,'threadId':_0xefed8a,'solved':_0x5ee94c['resolved']?I[_0x5717fa(0xa0)]:I[_0x5717fa(0xb3)]},_0x3b8582=await this['_httpService'][_0x5717fa(0xc2)]('/universer-api/comment/unit/'+_0x365c3d+_0x5717fa(0xe9),{'body':_0xc0b204});return!_0x3b8582['body']['error']||_0x3b8582['body'][_0x5717fa(0xf6)][_0x5717fa(0xbf)]===0x1;}async[_0x484af3(0xee)](_0x1d2846,_0x559a89,_0x21f46c,_0x2ce7cc){const _0x8e75cd=_0x484af3,_0x3c700f={'memberId':(await this['_sessionService'][_0x8e75cd(0xe1)](_0x1d2846))[_0x8e75cd(0x98)](),'threadId':_0x21f46c,'replyId':_0x2ce7cc,'unitId':_0x1d2846},_0x538de8=await this[_0x8e75cd(0xb8)][_0x8e75cd(0xc2)](_0x8e75cd(0x9d)+_0x1d2846+_0x8e75cd(0xbe),{'body':_0x3c700f});return!_0x538de8[_0x8e75cd(0xb6)][_0x8e75cd(0xf6)]||_0x538de8[_0x8e75cd(0xb6)]['error'][_0x8e75cd(0xbf)]===0x1;}async[_0x484af3(0xc1)](_0x46a981,_0x502468,_0x3d0730){const _0x1c029c=_0x484af3,_0x208a1e={'unitId':_0x46a981,'threadId':_0x3d0730},_0x201c48=await this[_0x1c029c(0xb8)][_0x1c029c(0xc2)]('/universer-api/comment/unit/'+_0x46a981+'/list',{'body':_0x208a1e}),_0x5ad548=_0x3d0730[_0x1c029c(0xd6)](_0x2c81d2=>ee(_0x201c48['body']['comments'][_0x2c81d2],_0x46a981,_0x502468))[_0x1c029c(0xeb)](Boolean);return Object[_0x1c029c(0xae)](_0x201c48[_0x1c029c(0xb6)][_0x1c029c(0xb7)])[_0x1c029c(0x95)](_0x58c6fd=>{const _0x2b548c=_0x1c029c;this[_0x2b548c(0xe6)][_0x2b548c(0xd7)](_0x58c6fd);}),_0x5ad548;}['saveCommentToSnapshot'](_0x18ec7f){const _0xcd3cdc=_0x484af3;return{'id':_0x18ec7f['id'],'threadId':_0x18ec7f[_0xcd3cdc(0xf5)],'ref':_0x18ec7f[_0xcd3cdc(0xa4)]};}};S=Q([b(0x0,_0x489677(_0x5d2277)),b(0x1,_0x489677(_0x587f73)),b(0x2,_0x489677(_0x844a5f))],S);var re=Object[_0x484af3(0xa3)],te=(_0x40e849,_0xea08,_0x4eadd1,_0x6dc0b0)=>{const _0x10cf87=_0x484af3;for(var _0x1cb20f=_0x6dc0b0>0x1?void 0x0:_0x6dc0b0?re(_0xea08,_0x4eadd1):_0xea08,_0x2a77e3=_0x40e849[_0x10cf87(0xce)]-0x1,_0x7d6160;_0x2a77e3>=0x0;_0x2a77e3--)(_0x7d6160=_0x40e849[_0x2a77e3])&&(_0x1cb20f=_0x7d6160(_0x1cb20f)||_0x1cb20f);return _0x1cb20f;},M=(_0x233f64,_0x42e0ce)=>(_0x110b6e,_0x1eea80)=>_0x42e0ce(_0x110b6e,_0x1eea80,_0x233f64);let f=class extends _0x3eeb98{constructor(_0x5eb981,_0x152c19){const _0x4e4333=_0x484af3;super(),this[_0x4e4333(0xb0)]=_0x5eb981,this[_0x4e4333(0xda)]=_0x152c19,this[_0x4e4333(0xc8)]();}[_0x484af3(0xc8)](){const _0x20935a=_0x484af3;this[_0x20935a(0xb0)][_0x20935a(0xec)]=this[_0x20935a(0xda)],this[_0x20935a(0xb0)][_0x20935a(0x97)]=!0x1;}};f=te([M(0x0,_0x3e8143),M(0x1,_0x489677(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x242656,_0x368037,_0x533a56)=>_0x368037 in _0x242656?se(_0x242656,_0x368037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533a56}):_0x242656[_0x368037]=_0x533a56,ie=(_0x5efba4,_0xe6c025,_0x47db5e,_0x5e550c)=>{const _0x5946bf=_0x484af3;for(var _0x25ea17=_0x5e550c>0x1?void 0x0:_0x5e550c?oe(_0xe6c025,_0x47db5e):_0xe6c025,_0x2d8507=_0x5efba4[_0x5946bf(0xce)]-0x1,_0x8838ce;_0x2d8507>=0x0;_0x2d8507--)(_0x8838ce=_0x5efba4[_0x2d8507])&&(_0x25ea17=_0x8838ce(_0x25ea17)||_0x25ea17);return _0x25ea17;},N=(_0x42d093,_0x369d82)=>(_0x195ffc,_0x3a2654)=>_0x369d82(_0x195ffc,_0x3a2654,_0x42d093),$=(_0x2996cf,_0x475366,_0x41333f)=>ne(_0x2996cf,typeof _0x475366!=_0x484af3(0xe7)?_0x475366+'':_0x475366,_0x41333f);let g=class extends _0x284dc3{constructor(_0x5516de=O,_0x2030a7,_0x5c15f7){const _0x47dfe4=_0x484af3;super(),this[_0x47dfe4(0x96)]=_0x5516de,this[_0x47dfe4(0xed)]=_0x2030a7,this[_0x47dfe4(0xab)]=_0x5c15f7;const {..._0x8f9e45}=_0x35db6f({},O,this[_0x47dfe4(0x96)]);this[_0x47dfe4(0xab)][_0x47dfe4(0xa5)](z,_0x8f9e45);}[_0x484af3(0xba)](){const _0x481b45=_0x484af3;[[S],[f],[_]][_0x481b45(0x95)](_0x16081b=>{const _0x37ac73=_0x481b45;this[_0x37ac73(0xed)][_0x37ac73(0xe2)](_0x16081b);});}[_0x484af3(0x9f)](){const _0x57a4ab=_0x484af3;this[_0x57a4ab(0xed)]['get'](f),this[_0x57a4ab(0xed)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x4f170b['UNIVER_UNKNOWN']),g=ie([_0x24b919(_0x3da613,_0x706f71,_0x3aca80),N(0x1,_0x489677(_0x4b33d3)),N(0x2,_0x1d6929)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5cf493=_0x30fe;(function(_0x266077,_0x647e33){const _0x4d3d03=_0x30fe,_0x3b0d8c=_0x266077();while(!![]){try{const _0x2a8050=parseInt(_0x4d3d03(0x191))/0x1+parseInt(_0x4d3d03(0x18d))/0x2+-parseInt(_0x4d3d03(0x1aa))/0x3*(-parseInt(_0x4d3d03(0x1b5))/0x4)+parseInt(_0x4d3d03(0x185))/0x5+-parseInt(_0x4d3d03(0x19e))/0x6+-parseInt(_0x4d3d03(0x1a0))/0x7+parseInt(_0x4d3d03(0x1c3))/0x8*(-parseInt(_0x4d3d03(0x1c2))/0x9);if(_0x2a8050===_0x647e33)break;else _0x3b0d8c['push'](_0x3b0d8c['shift']());}catch(_0x3f02c6){_0x3b0d8c['push'](_0x3b0d8c['shift']());}}}(_0x44e4,0xd412c));import{CommentService as _0x11cf3a,CollaborationSessionService as _0x1dd800,UniverCollaborationClientPlugin as _0x11c3a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c715f}from'@univerjs-pro/license';import{dayjs as _0x243e5e,UserManagerService as _0x38a066,Inject as _0x38eaf9,Injector as _0x441a4f,Disposable as _0x5b2137,CustomRangeType as _0x512e3e,UniverInstanceType as _0x39fe04,DependentOn as _0x45af73,IConfigService as _0x58e505,Plugin as _0x4810b6,merge as _0x190b26}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x338aee}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49dc2a,IThreadCommentDataSourceService as _0x410ff5}from'@univerjs/thread-comment';function _0x44e4(){const _0x257666=['_sessionService','defineProperty','ref','setConfig','getUnit','getComment','disposeWithMe','onReady','find','_threadCommentDataSource','post','/reply','rangeId','add','syncUpdateMutationToColla','userId','/edit','commentUpdate$','replyId','addUser','Solved','7204960haRvJX','OpenOrReOpen','_commentService','error','user','_threadCommentDataSourceService','/list','saveCommentToSnapshot','3109774DAhlrC','unitId','getMemberID','getUser','758388Dimkqe','Unknown','map','/add','_config','stringify','values','Add','format','rangeType','_injector','createTimestamp','replies','8773524HrZBqt','userID','5630107uRtDiU','threadId','size','filter','/solved','updateComment','Solve','_init','type','body','2813721lQpCNo','forEach','get','Delete','pipe','COMMENT','resolved','UNRECOGNIZED','customRanges','UNIVER_UNKNOWN','subscribe','4QSVnOe','slice','comment','comments','parentId','addComment','users','_threadCommentModel','Edit','parse','personId','getOwnPropertyDescriptor','length','9HKqpcS','12455736jZYerc','_userService','solved','/universer-api/comment/unit/','_initDataSource','resolveComment','_httpService','requireSession','code','root','deleteComment','Reply','content','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','pluginName'];_0x44e4=function(){return _0x257666;};return _0x44e4();}import{bufferTime as _0x1e0753}from'rxjs';import{HTTPService as _0x45151c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5dac0e=>(_0x5dac0e[_0x5dac0e[_0x5cf493(0x186)]=0x0]=_0x5cf493(0x186),_0x5dac0e[_0x5dac0e[_0x5cf493(0x184)]=0x1]='Solved',_0x5dac0e[_0x5dac0e[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x5dac0e))(I||{}),v=(_0x379224=>(_0x379224[_0x379224[_0x5cf493(0x192)]=0x0]='Unknown',_0x379224[_0x379224[_0x5cf493(0x198)]=0x1]=_0x5cf493(0x198),_0x379224[_0x379224[_0x5cf493(0x1ce)]=0x2]=_0x5cf493(0x1ce),_0x379224[_0x379224[_0x5cf493(0x1bd)]=0x3]='Edit',_0x379224[_0x379224[_0x5cf493(0x1ad)]=0x4]=_0x5cf493(0x1ad),_0x379224[_0x379224[_0x5cf493(0x1a6)]=0x5]=_0x5cf493(0x1a6),_0x379224[_0x379224[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x379224))(v||{});const y=_0xcafa98=>_0x243e5e(new Date(+_0xcafa98))['format'](_0x5cf493(0x1d0)),B=async(_0x159eeb,_0x5af047)=>{const _0x39c960=_0x5cf493,_0x5f009a=_0x159eeb[_0x39c960(0x1ac)](_0x38a066),_0x15dfee=_0x159eeb['get'](_0x45151c);_0x5af047[_0x39c960(0x1ab)](_0x2193d9=>{const _0x4b57f4=_0x39c960;_0x5f009a[_0x4b57f4(0x190)](_0x2193d9)&&_0x5af047['delete'](_0x2193d9);}),_0x5af047[_0x39c960(0x1a2)]&&(await _0x15dfee[_0x39c960(0x1ac)](_0x39c960(0x1d1),{'params':{'userIDs':[..._0x5af047]}}))[_0x39c960(0x1a9)][_0x39c960(0x1bb)]['forEach'](_0x229654=>{const _0x1a13d1=_0x39c960;_0x229654&&_0x5f009a[_0x1a13d1(0x183)](_0x229654);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3a2940,_0xda7fd1,_0x52959d,_0x4bee49)=>{const _0x3d218f=_0x5cf493;for(var _0x347075=_0x4bee49>0x1?void 0x0:_0x4bee49?K(_0xda7fd1,_0x52959d):_0xda7fd1,_0x5d40ca=_0x3a2940[_0x3d218f(0x1c1)]-0x1,_0x49d6f0;_0x5d40ca>=0x0;_0x5d40ca--)(_0x49d6f0=_0x3a2940[_0x5d40ca])&&(_0x347075=_0x49d6f0(_0x347075)||_0x347075);return _0x347075;},p=(_0x4a4942,_0x540efb)=>(_0x4258d3,_0x3cc4e7)=>_0x540efb(_0x4258d3,_0x3cc4e7,_0x4a4942);let _=class extends _0x5b2137{constructor(_0x4b04d2,_0xd0c488,_0x277951,_0x30550d){const _0x309dcc=_0x5cf493;super(),this[_0x309dcc(0x187)]=_0x4b04d2,this[_0x309dcc(0x1bc)]=_0xd0c488,this[_0x309dcc(0x1c4)]=_0x277951,this[_0x309dcc(0x19b)]=_0x30550d,this[_0x309dcc(0x1a7)](),this['_initUserSync']();}['_initUserSync'](){const _0x3de209=_0x5cf493;this[_0x3de209(0x1d9)](this[_0x3de209(0x1bc)][_0x3de209(0x181)][_0x3de209(0x1ae)](_0x1e0753(0x10))[_0x3de209(0x1b4)](_0x54f43b=>{const _0xaf60a8=_0x3de209,_0x36babf=new Set();_0x54f43b['forEach'](_0x3c853b=>{const _0x4636cc=_0x30fe;switch(_0x3c853b['type']){case _0x4636cc(0x1e0):{const _0x5e26ee=_0x3c853b['payload'][_0x4636cc(0x1bf)];_0x36babf['add'](_0x5e26ee);break;}}}),B(this[_0xaf60a8(0x19b)],_0x36babf);}));}[_0x5cf493(0x1a7)](){const _0xe4034d=_0x5cf493;this[_0xe4034d(0x1d9)](this[_0xe4034d(0x187)][_0xe4034d(0x181)][_0xe4034d(0x1b4)](async _0x19e72a=>{const _0x40de7b=_0xe4034d;var _0x4009d6,_0x1f5826,_0x4a6f45,_0x59f6a0;const _0x188fc2=(_0x4009d6=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d7)](_0x19e72a['unitId'])[_0x40de7b(0x1db)](_0x139775=>_0x139775['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x4009d6[_0x40de7b(0x1cc)];if(!_0x188fc2)return;const {unitId:_0x207f87,subUnitId:_0x1d032b}=_0x188fc2;switch(_0x19e72a[_0x40de7b(0x189)]&&this[_0x40de7b(0x1c4)][_0x40de7b(0x183)](_0x19e72a['user']),_0x19e72a[_0x40de7b(0x1a8)]){case v[_0x40de7b(0x198)]:break;case v[_0x40de7b(0x1ce)]:{this['_threadCommentModel'][_0x40de7b(0x1ba)](_0x207f87,_0x1d032b,{'unitId':_0x207f87,'subUnitId':_0x1d032b,'ref':'','id':_0x19e72a[_0x40de7b(0x182)],'dT':y(+_0x19e72a[_0x40de7b(0x19c)]),'threadId':_0x19e72a[_0x40de7b(0x1a1)],'personId':(_0x4a6f45=(_0x1f5826=_0x19e72a[_0x40de7b(0x189)])==null?void 0x0:_0x1f5826[_0x40de7b(0x19f)])!=null?_0x4a6f45:_0x19e72a[_0x40de7b(0x1e2)],'text':JSON[_0x40de7b(0x1be)](_0x19e72a[_0x40de7b(0x1cf)]),'parentId':_0x188fc2['id']});break;}case v[_0x40de7b(0x1ad)]:{const _0x1f0f3a=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d8)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);_0x1f0f3a&&_0x1f0f3a[_0x40de7b(0x1b9)]&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1cd)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);break;}case v[_0x40de7b(0x1bd)]:{this['_threadCommentModel'][_0x40de7b(0x1a5)](_0x207f87,_0x1d032b,{'commentId':_0x19e72a[_0x40de7b(0x182)],'text':JSON['parse'](_0x19e72a[_0x40de7b(0x1cf)])});break;}case v[_0x40de7b(0x1a6)]:{const _0x279b78=(_0x59f6a0=this['_threadCommentModel'][_0x40de7b(0x1d7)](_0x19e72a[_0x40de7b(0x18e)])[_0x40de7b(0x1db)](_0x3a3750=>_0x3a3750['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x59f6a0[_0x40de7b(0x1cc)];_0x279b78&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1c8)](_0x207f87,_0x1d032b,_0x279b78['id'],_0x19e72a[_0x40de7b(0x1c5)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38eaf9(_0x11cf3a)),p(0x1,_0x38eaf9(_0x49dc2a)),p(0x2,_0x38eaf9(_0x38a066)),p(0x3,_0x38eaf9(_0x441a4f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5cf493(0x1c0)],Q=(_0x5785b9,_0x38e50f,_0xe4a653,_0x553775)=>{const _0x3aba7d=_0x5cf493;for(var _0x15b12e=_0x553775>0x1?void 0x0:_0x553775?k(_0x38e50f,_0xe4a653):_0x38e50f,_0x5d7298=_0x5785b9[_0x3aba7d(0x1c1)]-0x1,_0x5ef502;_0x5d7298>=0x0;_0x5d7298--)(_0x5ef502=_0x5785b9[_0x5d7298])&&(_0x15b12e=_0x5ef502(_0x15b12e)||_0x15b12e);return _0x15b12e;},b=(_0x28b6cd,_0x36e2cf)=>(_0x2c6030,_0x5e1f7c)=>_0x36e2cf(_0x2c6030,_0x5e1f7c,_0x28b6cd);function _0x30fe(_0x13a02c,_0x5d4466){const _0x44e44c=_0x44e4();return _0x30fe=function(_0x30fea5,_0x15e992){_0x30fea5=_0x30fea5-0x180;let _0x56a1e8=_0x44e44c[_0x30fea5];return _0x56a1e8;},_0x30fe(_0x13a02c,_0x5d4466);}function X(_0x5b0494,_0x41587e){const _0x51d25d=_0x5cf493,_0x5df8c5=_0x5b0494[_0x51d25d(0x19d)][0x0];return{..._0x41587e,'id':_0x5df8c5[_0x51d25d(0x182)],'resolved':_0x5b0494[_0x51d25d(0x1c5)]===0x1,'dT':y(_0x5df8c5['createTimestamp']),'personId':_0x5df8c5[_0x51d25d(0x1e2)],'threadId':_0x5df8c5[_0x51d25d(0x1a1)]};}function ee(_0x4b4c9f,_0x11e9ac,_0x321768){const _0x5d75e1=_0x5cf493;var _0x14a91d,_0xc77e90;if(((_0xc77e90=(_0x14a91d=_0x4b4c9f==null?void 0x0:_0x4b4c9f[_0x5d75e1(0x19d)])==null?void 0x0:_0x14a91d[_0x5d75e1(0x1c1)])!=null?_0xc77e90:0x0)>0x0){const _0x58d1e5=(_0x2de3f9,_0x25a553)=>({'id':_0x2de3f9[_0x5d75e1(0x182)],'threadId':_0x2de3f9[_0x5d75e1(0x1a1)],'dT':y(_0x2de3f9[_0x5d75e1(0x19c)]),'personId':_0x2de3f9['userId'],'resolved':_0x4b4c9f[_0x5d75e1(0x1c5)]===I['Solved'],'unitId':_0x11e9ac,'subUnitId':_0x321768,'text':JSON[_0x5d75e1(0x1be)](_0x2de3f9[_0x5d75e1(0x1cf)]),'parentId':_0x25a553}),_0x46dcff=_0x58d1e5(_0x4b4c9f[_0x5d75e1(0x19d)][0x0]);return{..._0x46dcff,'children':_0x4b4c9f[_0x5d75e1(0x19d)][_0x5d75e1(0x1b6)](0x1)[_0x5d75e1(0x193)](_0xfbcb40=>_0x58d1e5(_0xfbcb40,_0x46dcff['id']))};}return null;}let S=class{constructor(_0x3c22a6,_0x4e4cd7,_0x2662a4){const _0x1ce1be=_0x5cf493;this[_0x1ce1be(0x1c9)]=_0x3c22a6,this['_userService']=_0x4e4cd7,this['_sessionService']=_0x2662a4;}async['addComment'](_0x28bc44){const _0x50f00c=_0x5cf493;var _0x276f49,_0x3a6e54;const {parentId:_0x1030d0,unitId:_0x2d8f23,text:_0x1141bd,threadId:_0x5b8b5c}=_0x28bc44,_0x5d0582=(_0x3a6e54=(_0x276f49=_0x1141bd['customRanges'])==null?void 0x0:_0x276f49[_0x50f00c(0x1a3)](_0x25e74f=>_0x25e74f[_0x50f00c(0x19a)]===_0x512e3e[_0x50f00c(0x1af)])[_0x50f00c(0x193)](_0x6b099d=>_0x6b099d[_0x50f00c(0x1df)]))!=null?_0x3a6e54:[],_0x252da3=JSON['stringify'](_0x1141bd),_0x2e3441=(await this[_0x50f00c(0x1d3)][_0x50f00c(0x1ca)](_0x2d8f23))[_0x50f00c(0x18f)]();if(_0x1030d0){const _0xeb8965={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582,'threadId':_0x5b8b5c},_0x173ef4=(await this[_0x50f00c(0x1c9)]['post'](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x1de),{'body':_0xeb8965}))[_0x50f00c(0x1a9)]['reply'];return{..._0x28bc44,'id':_0x173ef4[_0x50f00c(0x182)],'dT':_0x243e5e(+_0x173ef4[_0x50f00c(0x19c)])[_0x50f00c(0x199)](_0x50f00c(0x1d0)),'personId':_0x173ef4[_0x50f00c(0x1e2)]};}else{const _0xcc9556={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582},_0x2917be=await this[_0x50f00c(0x1c9)][_0x50f00c(0x1dd)](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x194),{'body':_0xcc9556});return X(_0x2917be[_0x50f00c(0x1a9)][_0x50f00c(0x1b7)],_0x28bc44);}}async[_0x5cf493(0x1a5)](_0x2329c9){const _0xbb189d=_0x5cf493;var _0x36fad4,_0xeb881b;const {text:_0xf85fc1,unitId:_0x2ad134}=_0x2329c9,_0x10397c=(_0xeb881b=(_0x36fad4=_0xf85fc1[_0xbb189d(0x1b2)])==null?void 0x0:_0x36fad4['filter'](_0x3706e5=>_0x3706e5[_0xbb189d(0x19a)]===_0x512e3e['COMMENT'])['map'](_0x15a8f0=>_0x15a8f0[_0xbb189d(0x1df)]))!=null?_0xeb881b:[],_0x3dfd5a=JSON[_0xbb189d(0x196)](_0xf85fc1),_0x59c3e4=_0x2329c9['threadId'],_0x31e033=_0x2329c9['id'],_0xc57238={'memberId':(await this[_0xbb189d(0x1d3)]['requireSession'](_0x2ad134))['getMemberID'](),'unitId':_0x2ad134,'threadId':_0x59c3e4,'mention':_0x10397c,'content':_0x3dfd5a,'replyId':_0x31e033},_0x3c8372=await this[_0xbb189d(0x1c9)][_0xbb189d(0x1dd)]('/universer-api/comment/unit/'+_0x2ad134+_0xbb189d(0x180),{'body':_0xc57238});return!_0x3c8372['body']['error']||_0x3c8372[_0xbb189d(0x1a9)][_0xbb189d(0x188)]['code']===0x1;}async[_0x5cf493(0x1c8)](_0x56cf98){const _0x558233=_0x5cf493,{unitId:_0x2fcdae}=_0x56cf98,_0x5bc2bb=_0x56cf98[_0x558233(0x1a1)],_0x6e8a89={'memberId':this[_0x558233(0x1c4)]['getCurrentUser']()[_0x558233(0x19f)],'unitId':_0x2fcdae,'threadId':_0x5bc2bb,'solved':_0x56cf98[_0x558233(0x1b0)]?I[_0x558233(0x184)]:I[_0x558233(0x186)]},_0xc0b15b=await this[_0x558233(0x1c9)][_0x558233(0x1dd)](_0x558233(0x1c6)+_0x2fcdae+_0x558233(0x1a4),{'body':_0x6e8a89});return!_0xc0b15b[_0x558233(0x1a9)]['error']||_0xc0b15b[_0x558233(0x1a9)][_0x558233(0x188)][_0x558233(0x1cb)]===0x1;}async['deleteComment'](_0x3593cf,_0x5e8d47,_0x2a0744,_0x5499a6){const _0x2eadfb=_0x5cf493,_0x4d4976={'memberId':(await this['_sessionService'][_0x2eadfb(0x1ca)](_0x3593cf))[_0x2eadfb(0x18f)](),'threadId':_0x2a0744,'replyId':_0x5499a6,'unitId':_0x3593cf},_0x2b1f24=await this[_0x2eadfb(0x1c9)][_0x2eadfb(0x1dd)](_0x2eadfb(0x1c6)+_0x3593cf+'/delete',{'body':_0x4d4976});return!_0x2b1f24[_0x2eadfb(0x1a9)][_0x2eadfb(0x188)]||_0x2b1f24['body'][_0x2eadfb(0x188)]['code']===0x1;}async['listComments'](_0x5d42b1,_0x1352ec,_0x4f0e99){const _0x195858=_0x5cf493,_0x5c002b={'unitId':_0x5d42b1,'threadId':_0x4f0e99},_0x9ab942=await this['_httpService'][_0x195858(0x1dd)](_0x195858(0x1c6)+_0x5d42b1+_0x195858(0x18b),{'body':_0x5c002b}),_0x27d9d5=_0x4f0e99['map'](_0x18910c=>ee(_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1b8)][_0x18910c],_0x5d42b1,_0x1352ec))[_0x195858(0x1a3)](Boolean);return Object[_0x195858(0x197)](_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1bb)])[_0x195858(0x1ab)](_0x1b2e9c=>{const _0x3e2c7a=_0x195858;this[_0x3e2c7a(0x1c4)][_0x3e2c7a(0x183)](_0x1b2e9c);}),_0x27d9d5;}[_0x5cf493(0x18c)](_0x11d155){const _0x511a74=_0x5cf493;return{'id':_0x11d155['id'],'threadId':_0x11d155['threadId'],'ref':_0x11d155[_0x511a74(0x1d5)]};}};S=Q([b(0x0,_0x38eaf9(_0x45151c)),b(0x1,_0x38eaf9(_0x38a066)),b(0x2,_0x38eaf9(_0x1dd800))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x265245,_0xeff6e2,_0x4a888c,_0x3cbdcd)=>{for(var _0x35f1d8=_0x3cbdcd>0x1?void 0x0:_0x3cbdcd?re(_0xeff6e2,_0x4a888c):_0xeff6e2,_0x76137c=_0x265245['length']-0x1,_0x277408;_0x76137c>=0x0;_0x76137c--)(_0x277408=_0x265245[_0x76137c])&&(_0x35f1d8=_0x277408(_0x35f1d8)||_0x35f1d8);return _0x35f1d8;},M=(_0x31d5db,_0x4bba8c)=>(_0x417642,_0x3e8fa6)=>_0x4bba8c(_0x417642,_0x3e8fa6,_0x31d5db);let f=class extends _0x5b2137{constructor(_0x3533dd,_0x102c02){const _0x435735=_0x5cf493;super(),this[_0x435735(0x18a)]=_0x3533dd,this['_threadCommentDataSource']=_0x102c02,this[_0x435735(0x1c7)]();}['_initDataSource'](){const _0x1dbfd6=_0x5cf493;this[_0x1dbfd6(0x18a)]['dataSource']=this[_0x1dbfd6(0x1dc)],this[_0x1dbfd6(0x18a)][_0x1dbfd6(0x1e1)]=!0x1;}};f=te([M(0x0,_0x410ff5),M(0x1,_0x38eaf9(S))],f);var se=Object[_0x5cf493(0x1d4)],oe=Object[_0x5cf493(0x1c0)],ne=(_0x5f4bfc,_0x6bdb32,_0x20bc0a)=>_0x6bdb32 in _0x5f4bfc?se(_0x5f4bfc,_0x6bdb32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20bc0a}):_0x5f4bfc[_0x6bdb32]=_0x20bc0a,ie=(_0x311c4f,_0xdd2b9d,_0x47fdc6,_0x1a02dd)=>{for(var _0x35739b=_0x1a02dd>0x1?void 0x0:_0x1a02dd?oe(_0xdd2b9d,_0x47fdc6):_0xdd2b9d,_0x531f39=_0x311c4f['length']-0x1,_0x117aed;_0x531f39>=0x0;_0x531f39--)(_0x117aed=_0x311c4f[_0x531f39])&&(_0x35739b=_0x117aed(_0x35739b)||_0x35739b);return _0x35739b;},N=(_0x5c21fa,_0x4c0e23)=>(_0x513e4d,_0x50cc87)=>_0x4c0e23(_0x513e4d,_0x50cc87,_0x5c21fa),$=(_0x1d2f77,_0x49c925,_0x3a3f71)=>ne(_0x1d2f77,typeof _0x49c925!='symbol'?_0x49c925+'':_0x49c925,_0x3a3f71);let g=class extends _0x4810b6{constructor(_0xec447b=O,_0x2a2daa,_0x2bf3d5){const _0x3bb493=_0x5cf493;super(),this[_0x3bb493(0x195)]=_0xec447b,this[_0x3bb493(0x19b)]=_0x2a2daa,this['_configService']=_0x2bf3d5;const {..._0x34e84d}=_0x190b26({},O,this[_0x3bb493(0x195)]);this['_configService'][_0x3bb493(0x1d6)](z,_0x34e84d);}['onStarting'](){const _0x29ff60=_0x5cf493;[[S],[f],[_]][_0x29ff60(0x1ab)](_0xb34e77=>{const _0x5962e4=_0x29ff60;this[_0x5962e4(0x19b)][_0x5962e4(0x1e0)](_0xb34e77);});}[_0x5cf493(0x1da)](){const _0x3de54b=_0x5cf493;this[_0x3de54b(0x19b)][_0x3de54b(0x1ac)](f),this[_0x3de54b(0x19b)]['get'](_);}};$(g,_0x5cf493(0x1d2),W),$(g,'type',_0x39fe04[_0x5cf493(0x1b3)]),g=ie([_0x45af73(_0x338aee,_0x11c3a8,_0x1c715f),N(0x1,_0x38eaf9(_0x441a4f)),N(0x2,_0x58e505)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x15cd(){const _0x3ba6ad=['Reply','Unknown','_threadCommentDataSource','4tdPchq','6fbgOrZ','type','8627880tAtNqW','1528BYvkDZ','/universer-api/user/list','requireSession','add','createTimestamp','8208SlrLsQ','_initUserSync','_userService','symbol','resolveComment','/solved','3139455byeWhe','filter','dataSource','_injector','deleteComment','YYYY/MM/DD\x20HH:mm','commentUpdate$','addComment','replyId','content','user','threadId','error','reply','unitId','format','forEach','_config','syncUpdateMutationToColla','getMemberID','4093453GWzeSq','_threadCommentModel','159OzTvAV','disposeWithMe','/universer-api/comment/unit/','subscribe','onReady','Solved','rangeType','Solve','getOwnPropertyDescriptor','ref','setConfig','/add','_init','20966bfBniH','Add','slice','_configService','/reply','replies','values','_sessionService','_threadCommentDataSourceService','solved','get','OpenOrReOpen','308996SmvDBF','COMMENT','body','users','_httpService','payload','onStarting','getCurrentUser','UNRECOGNIZED','parse','/delete','code','getUser','listComments','post','getUnit','Delete','userID','thread-comment-data-source.config','8796FQzEkC','_initDataSource','userId','find','rangeId','personId','root','length','customRanges','comment','4160RbcSyz','Edit','delete','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','addUser'];_0x15cd=function(){return _0x3ba6ad;};return _0x15cd();}const _0x484af3=_0x448c;(function(_0x905c0e,_0x2fab82){const _0x4e6bd0=_0x448c,_0x3ba09a=_0x905c0e();while(!![]){try{const _0x3bde17=parseInt(_0x4e6bd0(0xb4))/0x1*(-parseInt(_0x4e6bd0(0xdb))/0x2)+parseInt(_0x4e6bd0(0x9b))/0x3*(-parseInt(_0x4e6bd0(0xdf))/0x4)+parseInt(_0x4e6bd0(0xea))/0x5+-parseInt(_0x4e6bd0(0xdc))/0x6*(-parseInt(_0x4e6bd0(0x99))/0x7)+-parseInt(_0x4e6bd0(0xd1))/0x8*(-parseInt(_0x4e6bd0(0xe4))/0x9)+parseInt(_0x4e6bd0(0xde))/0xa+parseInt(_0x4e6bd0(0xa8))/0xb*(-parseInt(_0x4e6bd0(0xc7))/0xc);if(_0x3bde17===_0x2fab82)break;else _0x3ba09a['push'](_0x3ba09a['shift']());}catch(_0x5f0343){_0x3ba09a['push'](_0x3ba09a['shift']());}}}(_0x15cd,0x7d93a));import{CommentService as _0x410c99,CollaborationSessionService as _0x844a5f,UniverCollaborationClientPlugin as _0x706f71}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3aca80}from'@univerjs-pro/license';import{dayjs as _0x16b3d9,UserManagerService as _0x587f73,Inject as _0x489677,Injector as _0x4b33d3,Disposable as _0x3eeb98,CustomRangeType as _0x25a850,UniverInstanceType as _0x4f170b,DependentOn as _0x24b919,IConfigService as _0x1d6929,Plugin as _0x284dc3,merge as _0x35db6f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3da613}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2321f4,IThreadCommentDataSourceService as _0x3e8143}from'@univerjs/thread-comment';import{bufferTime as _0x46d570}from'rxjs';import{HTTPService as _0x5d2277}from'@univerjs/network';const W=_0x484af3(0xd5);var I=(_0x2417ab=>(_0x2417ab[_0x2417ab[_0x484af3(0xb3)]=0x0]=_0x484af3(0xb3),_0x2417ab[_0x2417ab[_0x484af3(0xa0)]=0x1]=_0x484af3(0xa0),_0x2417ab[_0x2417ab[_0x484af3(0xbc)]=-0x1]='UNRECOGNIZED',_0x2417ab))(I||{}),v=(_0x460bd6=>(_0x460bd6[_0x460bd6[_0x484af3(0xd9)]=0x0]=_0x484af3(0xd9),_0x460bd6[_0x460bd6['Add']=0x1]=_0x484af3(0xa9),_0x460bd6[_0x460bd6[_0x484af3(0xd8)]=0x2]=_0x484af3(0xd8),_0x460bd6[_0x460bd6['Edit']=0x3]=_0x484af3(0xd2),_0x460bd6[_0x460bd6['Delete']=0x4]=_0x484af3(0xc4),_0x460bd6[_0x460bd6[_0x484af3(0xa2)]=0x5]=_0x484af3(0xa2),_0x460bd6[_0x460bd6[_0x484af3(0xbc)]=-0x1]=_0x484af3(0xbc),_0x460bd6))(v||{});const y=_0x3bf6e9=>_0x16b3d9(new Date(+_0x3bf6e9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x48c2bc,_0x2ddefc)=>{const _0x32cea1=_0x484af3,_0x22886a=_0x48c2bc[_0x32cea1(0xb2)](_0x587f73),_0x57fd7f=_0x48c2bc[_0x32cea1(0xb2)](_0x5d2277);_0x2ddefc[_0x32cea1(0x95)](_0x4de656=>{const _0x14126e=_0x32cea1;_0x22886a[_0x14126e(0xc0)](_0x4de656)&&_0x2ddefc[_0x14126e(0xd3)](_0x4de656);}),_0x2ddefc['size']&&(await _0x57fd7f[_0x32cea1(0xb2)](_0x32cea1(0xe0),{'params':{'userIDs':[..._0x2ddefc]}}))['body'][_0x32cea1(0xb7)][_0x32cea1(0x95)](_0x15b07d=>{const _0x2ab095=_0x32cea1;_0x15b07d&&_0x22886a[_0x2ab095(0xd7)](_0x15b07d);});};function _0x448c(_0x2064a8,_0xe4404c){const _0x15cd26=_0x15cd();return _0x448c=function(_0x448ca1,_0x37a6e6){_0x448ca1=_0x448ca1-0x93;let _0x768dfc=_0x15cd26[_0x448ca1];return _0x768dfc;},_0x448c(_0x2064a8,_0xe4404c);}var K=Object[_0x484af3(0xa3)],V=(_0x10d94f,_0x2b18be,_0x3f5aea,_0x35c7f2)=>{const _0x3ebb44=_0x484af3;for(var _0x324436=_0x35c7f2>0x1?void 0x0:_0x35c7f2?K(_0x2b18be,_0x3f5aea):_0x2b18be,_0x3ae2d1=_0x10d94f[_0x3ebb44(0xce)]-0x1,_0xbf06f2;_0x3ae2d1>=0x0;_0x3ae2d1--)(_0xbf06f2=_0x10d94f[_0x3ae2d1])&&(_0x324436=_0xbf06f2(_0x324436)||_0x324436);return _0x324436;},p=(_0x4c2e6d,_0x5589a2)=>(_0x495644,_0x15801a)=>_0x5589a2(_0x495644,_0x15801a,_0x4c2e6d);let _=class extends _0x3eeb98{constructor(_0x934b1e,_0x4ee911,_0x1bffd9,_0x404782){const _0x2dc7e3=_0x484af3;super(),this['_commentService']=_0x934b1e,this[_0x2dc7e3(0x9a)]=_0x4ee911,this[_0x2dc7e3(0xe6)]=_0x1bffd9,this[_0x2dc7e3(0xed)]=_0x404782,this[_0x2dc7e3(0xa7)](),this[_0x2dc7e3(0xe5)]();}[_0x484af3(0xe5)](){const _0x5ec0d8=_0x484af3;this['disposeWithMe'](this[_0x5ec0d8(0x9a)]['commentUpdate$']['pipe'](_0x46d570(0x10))['subscribe'](_0x520229=>{const _0x41e715=_0x5ec0d8,_0x11d514=new Set();_0x520229[_0x41e715(0x95)](_0x3a4c8a=>{const _0x31cd41=_0x41e715;switch(_0x3a4c8a[_0x31cd41(0xdd)]){case _0x31cd41(0xe2):{const _0x1faa56=_0x3a4c8a[_0x31cd41(0xb9)][_0x31cd41(0xcc)];_0x11d514['add'](_0x1faa56);break;}}}),B(this[_0x41e715(0xed)],_0x11d514);}));}[_0x484af3(0xa7)](){const _0x181688=_0x484af3;this[_0x181688(0x9c)](this['_commentService'][_0x181688(0xf0)][_0x181688(0x9e)](async _0x3f64d0=>{const _0x2ba8d1=_0x181688;var _0x5ca012,_0x4dce7e,_0x515b93,_0x1fcfb8;const _0x981617=(_0x5ca012=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0[_0x2ba8d1(0x93)])[_0x2ba8d1(0xca)](_0x500fe0=>_0x500fe0['threadId']===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x5ca012[_0x2ba8d1(0xcd)];if(!_0x981617)return;const {unitId:_0xe883c0,subUnitId:_0x1c9acb}=_0x981617;switch(_0x3f64d0[_0x2ba8d1(0xf4)]&&this[_0x2ba8d1(0xe6)][_0x2ba8d1(0xd7)](_0x3f64d0[_0x2ba8d1(0xf4)]),_0x3f64d0[_0x2ba8d1(0xdd)]){case v[_0x2ba8d1(0xa9)]:break;case v['Reply']:{this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xf1)](_0xe883c0,_0x1c9acb,{'unitId':_0xe883c0,'subUnitId':_0x1c9acb,'ref':'','id':_0x3f64d0['replyId'],'dT':y(+_0x3f64d0['createTimestamp']),'threadId':_0x3f64d0[_0x2ba8d1(0xf5)],'personId':(_0x515b93=(_0x4dce7e=_0x3f64d0[_0x2ba8d1(0xf4)])==null?void 0x0:_0x4dce7e[_0x2ba8d1(0xc5)])!=null?_0x515b93:_0x3f64d0[_0x2ba8d1(0xc9)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)]),'parentId':_0x981617['id']});break;}case v[_0x2ba8d1(0xc4)]:{const _0x2321f3=this[_0x2ba8d1(0x9a)]['getComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);_0x2321f3&&_0x2321f3['parentId']&&this[_0x2ba8d1(0x9a)]['deleteComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);break;}case v[_0x2ba8d1(0xd2)]:{this['_threadCommentModel']['updateComment'](_0xe883c0,_0x1c9acb,{'commentId':_0x3f64d0[_0x2ba8d1(0xf2)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)])});break;}case v[_0x2ba8d1(0xa2)]:{const _0x2037ac=(_0x1fcfb8=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0['unitId'])[_0x2ba8d1(0xca)](_0x1bc15e=>_0x1bc15e[_0x2ba8d1(0xf5)]===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x1fcfb8['root'];_0x2037ac&&this['_threadCommentModel'][_0x2ba8d1(0xe8)](_0xe883c0,_0x1c9acb,_0x2037ac['id'],_0x3f64d0[_0x2ba8d1(0xb1)]===I[_0x2ba8d1(0xa0)]);break;}}}));}};_=V([p(0x0,_0x489677(_0x410c99)),p(0x1,_0x489677(_0x2321f4)),p(0x2,_0x489677(_0x587f73)),p(0x3,_0x489677(_0x4b33d3))],_);const z=_0x484af3(0xc6),O={};var k=Object[_0x484af3(0xa3)],Q=(_0x21b830,_0x5a1f04,_0x5e9582,_0x351cc0)=>{const _0x1befda=_0x484af3;for(var _0x2b57e4=_0x351cc0>0x1?void 0x0:_0x351cc0?k(_0x5a1f04,_0x5e9582):_0x5a1f04,_0x195b38=_0x21b830[_0x1befda(0xce)]-0x1,_0x429f7f;_0x195b38>=0x0;_0x195b38--)(_0x429f7f=_0x21b830[_0x195b38])&&(_0x2b57e4=_0x429f7f(_0x2b57e4)||_0x2b57e4);return _0x2b57e4;},b=(_0x11471f,_0x4d8b98)=>(_0x306e83,_0x4cef75)=>_0x4d8b98(_0x306e83,_0x4cef75,_0x11471f);function X(_0x4d28c0,_0x35001c){const _0x487168=_0x484af3,_0x4ec3d8=_0x4d28c0['replies'][0x0];return{..._0x35001c,'id':_0x4ec3d8['replyId'],'resolved':_0x4d28c0['solved']===0x1,'dT':y(_0x4ec3d8[_0x487168(0xe3)]),'personId':_0x4ec3d8[_0x487168(0xc9)],'threadId':_0x4ec3d8[_0x487168(0xf5)]};}function ee(_0x5a4fd0,_0x4bc89f,_0x262494){const _0x1a90c7=_0x484af3;var _0x592fa9,_0x1bbd44;if(((_0x1bbd44=(_0x592fa9=_0x5a4fd0==null?void 0x0:_0x5a4fd0[_0x1a90c7(0xad)])==null?void 0x0:_0x592fa9['length'])!=null?_0x1bbd44:0x0)>0x0){const _0xd0b0a5=(_0x35b21e,_0x2e4267)=>({'id':_0x35b21e[_0x1a90c7(0xf2)],'threadId':_0x35b21e[_0x1a90c7(0xf5)],'dT':y(_0x35b21e[_0x1a90c7(0xe3)]),'personId':_0x35b21e['userId'],'resolved':_0x5a4fd0[_0x1a90c7(0xb1)]===I['Solved'],'unitId':_0x4bc89f,'subUnitId':_0x262494,'text':JSON['parse'](_0x35b21e['content']),'parentId':_0x2e4267}),_0xfd9577=_0xd0b0a5(_0x5a4fd0[_0x1a90c7(0xad)][0x0]);return{..._0xfd9577,'children':_0x5a4fd0[_0x1a90c7(0xad)][_0x1a90c7(0xaa)](0x1)['map'](_0x45e001=>_0xd0b0a5(_0x45e001,_0xfd9577['id']))};}return null;}let S=class{constructor(_0xb47edd,_0x35a420,_0x2a58a1){const _0x183084=_0x484af3;this[_0x183084(0xb8)]=_0xb47edd,this[_0x183084(0xe6)]=_0x35a420,this[_0x183084(0xaf)]=_0x2a58a1;}async[_0x484af3(0xf1)](_0x542a55){const _0x4a0d05=_0x484af3;var _0x3e71a4,_0x1d1a48;const {parentId:_0x2fd295,unitId:_0xf5a6b1,text:_0x57d8ea,threadId:_0x1b1f97}=_0x542a55,_0x2d3f20=(_0x1d1a48=(_0x3e71a4=_0x57d8ea['customRanges'])==null?void 0x0:_0x3e71a4[_0x4a0d05(0xeb)](_0x450d52=>_0x450d52[_0x4a0d05(0xa1)]===_0x25a850['COMMENT'])[_0x4a0d05(0xd6)](_0x50863b=>_0x50863b[_0x4a0d05(0xcb)]))!=null?_0x1d1a48:[],_0x3cfdde=JSON[_0x4a0d05(0xd4)](_0x57d8ea),_0x452449=(await this[_0x4a0d05(0xaf)][_0x4a0d05(0xe1)](_0xf5a6b1))[_0x4a0d05(0x98)]();if(_0x2fd295){const _0x3aa433={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20,'threadId':_0x1b1f97},_0x42fe71=(await this[_0x4a0d05(0xb8)][_0x4a0d05(0xc2)]('/universer-api/comment/unit/'+_0xf5a6b1+_0x4a0d05(0xac),{'body':_0x3aa433}))[_0x4a0d05(0xb6)][_0x4a0d05(0xf7)];return{..._0x542a55,'id':_0x42fe71[_0x4a0d05(0xf2)],'dT':_0x16b3d9(+_0x42fe71[_0x4a0d05(0xe3)])[_0x4a0d05(0x94)](_0x4a0d05(0xef)),'personId':_0x42fe71[_0x4a0d05(0xc9)]};}else{const _0x53bf30={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20},_0x1ec399=await this[_0x4a0d05(0xb8)]['post'](_0x4a0d05(0x9d)+_0xf5a6b1+_0x4a0d05(0xa6),{'body':_0x53bf30});return X(_0x1ec399['body'][_0x4a0d05(0xd0)],_0x542a55);}}async['updateComment'](_0x3002fb){const _0x55c190=_0x484af3;var _0x2180f7,_0x37dbc6;const {text:_0x36e5e5,unitId:_0x23d397}=_0x3002fb,_0x29f0f6=(_0x37dbc6=(_0x2180f7=_0x36e5e5[_0x55c190(0xcf)])==null?void 0x0:_0x2180f7[_0x55c190(0xeb)](_0x2878b4=>_0x2878b4[_0x55c190(0xa1)]===_0x25a850[_0x55c190(0xb5)])[_0x55c190(0xd6)](_0x40f54e=>_0x40f54e[_0x55c190(0xcb)]))!=null?_0x37dbc6:[],_0xae4095=JSON[_0x55c190(0xd4)](_0x36e5e5),_0x2a6771=_0x3002fb[_0x55c190(0xf5)],_0x56cf47=_0x3002fb['id'],_0x130163={'memberId':(await this[_0x55c190(0xaf)][_0x55c190(0xe1)](_0x23d397))['getMemberID'](),'unitId':_0x23d397,'threadId':_0x2a6771,'mention':_0x29f0f6,'content':_0xae4095,'replyId':_0x56cf47},_0xc88552=await this[_0x55c190(0xb8)][_0x55c190(0xc2)](_0x55c190(0x9d)+_0x23d397+'/edit',{'body':_0x130163});return!_0xc88552[_0x55c190(0xb6)][_0x55c190(0xf6)]||_0xc88552[_0x55c190(0xb6)]['error'][_0x55c190(0xbf)]===0x1;}async[_0x484af3(0xe8)](_0x5ee94c){const _0x5717fa=_0x484af3,{unitId:_0x365c3d}=_0x5ee94c,_0xefed8a=_0x5ee94c[_0x5717fa(0xf5)],_0xc0b204={'memberId':this[_0x5717fa(0xe6)][_0x5717fa(0xbb)]()['userID'],'unitId':_0x365c3d,'threadId':_0xefed8a,'solved':_0x5ee94c['resolved']?I[_0x5717fa(0xa0)]:I[_0x5717fa(0xb3)]},_0x3b8582=await this['_httpService'][_0x5717fa(0xc2)]('/universer-api/comment/unit/'+_0x365c3d+_0x5717fa(0xe9),{'body':_0xc0b204});return!_0x3b8582['body']['error']||_0x3b8582['body'][_0x5717fa(0xf6)][_0x5717fa(0xbf)]===0x1;}async[_0x484af3(0xee)](_0x1d2846,_0x559a89,_0x21f46c,_0x2ce7cc){const _0x8e75cd=_0x484af3,_0x3c700f={'memberId':(await this['_sessionService'][_0x8e75cd(0xe1)](_0x1d2846))[_0x8e75cd(0x98)](),'threadId':_0x21f46c,'replyId':_0x2ce7cc,'unitId':_0x1d2846},_0x538de8=await this[_0x8e75cd(0xb8)][_0x8e75cd(0xc2)](_0x8e75cd(0x9d)+_0x1d2846+_0x8e75cd(0xbe),{'body':_0x3c700f});return!_0x538de8[_0x8e75cd(0xb6)][_0x8e75cd(0xf6)]||_0x538de8[_0x8e75cd(0xb6)]['error'][_0x8e75cd(0xbf)]===0x1;}async[_0x484af3(0xc1)](_0x46a981,_0x502468,_0x3d0730){const _0x1c029c=_0x484af3,_0x208a1e={'unitId':_0x46a981,'threadId':_0x3d0730},_0x201c48=await this[_0x1c029c(0xb8)][_0x1c029c(0xc2)]('/universer-api/comment/unit/'+_0x46a981+'/list',{'body':_0x208a1e}),_0x5ad548=_0x3d0730[_0x1c029c(0xd6)](_0x2c81d2=>ee(_0x201c48['body']['comments'][_0x2c81d2],_0x46a981,_0x502468))[_0x1c029c(0xeb)](Boolean);return Object[_0x1c029c(0xae)](_0x201c48[_0x1c029c(0xb6)][_0x1c029c(0xb7)])[_0x1c029c(0x95)](_0x58c6fd=>{const _0x2b548c=_0x1c029c;this[_0x2b548c(0xe6)][_0x2b548c(0xd7)](_0x58c6fd);}),_0x5ad548;}['saveCommentToSnapshot'](_0x18ec7f){const _0xcd3cdc=_0x484af3;return{'id':_0x18ec7f['id'],'threadId':_0x18ec7f[_0xcd3cdc(0xf5)],'ref':_0x18ec7f[_0xcd3cdc(0xa4)]};}};S=Q([b(0x0,_0x489677(_0x5d2277)),b(0x1,_0x489677(_0x587f73)),b(0x2,_0x489677(_0x844a5f))],S);var re=Object[_0x484af3(0xa3)],te=(_0x40e849,_0xea08,_0x4eadd1,_0x6dc0b0)=>{const _0x10cf87=_0x484af3;for(var _0x1cb20f=_0x6dc0b0>0x1?void 0x0:_0x6dc0b0?re(_0xea08,_0x4eadd1):_0xea08,_0x2a77e3=_0x40e849[_0x10cf87(0xce)]-0x1,_0x7d6160;_0x2a77e3>=0x0;_0x2a77e3--)(_0x7d6160=_0x40e849[_0x2a77e3])&&(_0x1cb20f=_0x7d6160(_0x1cb20f)||_0x1cb20f);return _0x1cb20f;},M=(_0x233f64,_0x42e0ce)=>(_0x110b6e,_0x1eea80)=>_0x42e0ce(_0x110b6e,_0x1eea80,_0x233f64);let f=class extends _0x3eeb98{constructor(_0x5eb981,_0x152c19){const _0x4e4333=_0x484af3;super(),this[_0x4e4333(0xb0)]=_0x5eb981,this[_0x4e4333(0xda)]=_0x152c19,this[_0x4e4333(0xc8)]();}[_0x484af3(0xc8)](){const _0x20935a=_0x484af3;this[_0x20935a(0xb0)][_0x20935a(0xec)]=this[_0x20935a(0xda)],this[_0x20935a(0xb0)][_0x20935a(0x97)]=!0x1;}};f=te([M(0x0,_0x3e8143),M(0x1,_0x489677(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x242656,_0x368037,_0x533a56)=>_0x368037 in _0x242656?se(_0x242656,_0x368037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533a56}):_0x242656[_0x368037]=_0x533a56,ie=(_0x5efba4,_0xe6c025,_0x47db5e,_0x5e550c)=>{const _0x5946bf=_0x484af3;for(var _0x25ea17=_0x5e550c>0x1?void 0x0:_0x5e550c?oe(_0xe6c025,_0x47db5e):_0xe6c025,_0x2d8507=_0x5efba4[_0x5946bf(0xce)]-0x1,_0x8838ce;_0x2d8507>=0x0;_0x2d8507--)(_0x8838ce=_0x5efba4[_0x2d8507])&&(_0x25ea17=_0x8838ce(_0x25ea17)||_0x25ea17);return _0x25ea17;},N=(_0x42d093,_0x369d82)=>(_0x195ffc,_0x3a2654)=>_0x369d82(_0x195ffc,_0x3a2654,_0x42d093),$=(_0x2996cf,_0x475366,_0x41333f)=>ne(_0x2996cf,typeof _0x475366!=_0x484af3(0xe7)?_0x475366+'':_0x475366,_0x41333f);let g=class extends _0x284dc3{constructor(_0x5516de=O,_0x2030a7,_0x5c15f7){const _0x47dfe4=_0x484af3;super(),this[_0x47dfe4(0x96)]=_0x5516de,this[_0x47dfe4(0xed)]=_0x2030a7,this[_0x47dfe4(0xab)]=_0x5c15f7;const {..._0x8f9e45}=_0x35db6f({},O,this[_0x47dfe4(0x96)]);this[_0x47dfe4(0xab)][_0x47dfe4(0xa5)](z,_0x8f9e45);}[_0x484af3(0xba)](){const _0x481b45=_0x484af3;[[S],[f],[_]][_0x481b45(0x95)](_0x16081b=>{const _0x37ac73=_0x481b45;this[_0x37ac73(0xed)][_0x37ac73(0xe2)](_0x16081b);});}[_0x484af3(0x9f)](){const _0x57a4ab=_0x484af3;this[_0x57a4ab(0xed)]['get'](f),this[_0x57a4ab(0xed)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x4f170b['UNIVER_UNKNOWN']),g=ie([_0x24b919(_0x3da613,_0x706f71,_0x3aca80),N(0x1,_0x489677(_0x4b33d3)),N(0x2,_0x1d6929)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x16fd(_0x167e95,_0x3bb8dc){const _0x4091e0=_0x4091();return _0x16fd=function(_0x16fd01,_0x22231e){_0x16fd01=_0x16fd01-0x1a7;let _0x24b159=_0x4091e0[_0x16fd01];return _0x24b159;},_0x16fd(_0x167e95,_0x3bb8dc);}function _0x4091(){const _0x477050=['subscribe','map','bufferTime','CommentService','updateComment','threadId','_initUserSync','Reply','getUnit','_init','CollaborationSessionService','content','91oYsmHo','pluginName','onStarting','UniverThreadCommentUi','Solved','amd','21159ZFoSOC','COMMENT','requireSession','2204213VTZXTC','code','reply','getComment','payload','body','userId','getMemberID','getCurrentUser','getOwnPropertyDescriptor','_userService','forEach','symbol','find','UNRECOGNIZED','customRanges','3084veOXms','replies','Edit','users','Unknown','57232vBYLuX','setConfig','IConfigService','dayjs','YYYY/MM/DD\x20HH:mm','1256190SENcTF','Add','_initDataSource','createTimestamp','stringify','type','parse','slice','UniverThreadComment','CustomRangeType','post','syncUpdateMutationToColla','exports','Injector','UserManagerService','3305hWdzLy','_commentService','pipe','566052pTJHkt','Solve','29926GzRBgS','resolveComment','listComments','/edit','UniverThreadCommentUIPlugin','_httpService','12vkVpvK','UniverNetwork','@univerjs/thread-comment','@univerjs-pro/collaboration-client','merge','@univerjs/network','format','HTTPService','Module','UniverProCollaborationClient','/universer-api/comment/unit/','_injector','31jGlMbi','get','_threadCommentDataSource','disposeWithMe','rxjs','addComment','deleteComment','UniverThreadCommentDataSourcePlugin','personId','user','_sessionService','error','/add','userID','resolved','ref','delete','_threadCommentModel','size','/universer-api/user/list','commentUpdate$','filter','defineProperty','2070EhRuOw','replyId','length','Inject','/solved','Delete','add','thread-comment-data-source.config','OpenOrReOpen','_threadCommentDataSourceService','_config','addUser','_configService','root','parentId','onReady','values','unitId','/list','solved','toStringTag','@univerjs/thread-comment-ui','rangeType','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x4091=function(){return _0x477050;};return _0x4091();}(function(_0x216582,_0xec6793){const _0x6cc068=_0x16fd,_0x268ba4=_0x216582();while(!![]){try{const _0x2c91b3=parseInt(_0x6cc068(0x223))/0x1*(-parseInt(_0x6cc068(0x211))/0x2)+parseInt(_0x6cc068(0x1fd))/0x3+parseInt(_0x6cc068(0x1f3))/0x4*(-parseInt(_0x6cc068(0x20c))/0x5)+parseInt(_0x6cc068(0x20f))/0x6+-parseInt(_0x6cc068(0x1da))/0x7*(-parseInt(_0x6cc068(0x1f8))/0x8)+-parseInt(_0x6cc068(0x1e0))/0x9*(-parseInt(_0x6cc068(0x1b5))/0xa)+parseInt(_0x6cc068(0x1e3))/0xb*(parseInt(_0x6cc068(0x217))/0xc);if(_0x2c91b3===_0xec6793)break;else _0x268ba4['push'](_0x268ba4['shift']());}catch(_0x3999e5){_0x268ba4['push'](_0x268ba4['shift']());}}}(_0x4091,0x4e08e),function(_0x29f917,_0x27e7a5){const _0x18477f=_0x16fd;typeof exports=='object'&&typeof module<'u'?_0x27e7a5(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[_0x18477f(0x1df)]?define([_0x18477f(0x209),_0x18477f(0x21a),'@univerjs-pro/license','@univerjs/core',_0x18477f(0x1ca),_0x18477f(0x219),_0x18477f(0x227),_0x18477f(0x21c)],_0x27e7a5):(_0x29f917=typeof globalThis<'u'?globalThis:_0x29f917||self,_0x27e7a5(_0x29f917['UniverProThreadCommentDatasource']={},_0x29f917[_0x18477f(0x220)],_0x29f917['UniverProLicense'],_0x29f917['UniverCore'],_0x29f917[_0x18477f(0x1dd)],_0x29f917[_0x18477f(0x205)],_0x29f917[_0x18477f(0x227)],_0x29f917[_0x18477f(0x218)]));}(this,function(_0x8942d1,_0x1e3e43,_0x437980,_0x13acdc,_0x4ea396,_0x21e65e,_0x47b58d,_0x2c8ff4){'use strict';const _0x2c96ed=_0x16fd;const _0x753262=_0x2c96ed(0x1cd);var _0x56e932=(_0x243239=>(_0x243239[_0x243239[_0x2c96ed(0x1bd)]=0x0]=_0x2c96ed(0x1bd),_0x243239[_0x243239[_0x2c96ed(0x1de)]=0x1]=_0x2c96ed(0x1de),_0x243239[_0x243239['UNRECOGNIZED']=-0x1]=_0x2c96ed(0x1f1),_0x243239))(_0x56e932||{}),_0x34a4b7=(_0x1efff5=>(_0x1efff5[_0x1efff5[_0x2c96ed(0x1f7)]=0x0]='Unknown',_0x1efff5[_0x1efff5[_0x2c96ed(0x1fe)]=0x1]=_0x2c96ed(0x1fe),_0x1efff5[_0x1efff5[_0x2c96ed(0x1d5)]=0x2]=_0x2c96ed(0x1d5),_0x1efff5[_0x1efff5[_0x2c96ed(0x1f5)]=0x3]=_0x2c96ed(0x1f5),_0x1efff5[_0x1efff5[_0x2c96ed(0x1ba)]=0x4]=_0x2c96ed(0x1ba),_0x1efff5[_0x1efff5[_0x2c96ed(0x210)]=0x5]=_0x2c96ed(0x210),_0x1efff5[_0x1efff5[_0x2c96ed(0x1f1)]=-0x1]=_0x2c96ed(0x1f1),_0x1efff5))(_0x34a4b7||{});const _0x3ea739=_0x24d398=>_0x13acdc[_0x2c96ed(0x1fb)](new Date(+_0x24d398))[_0x2c96ed(0x21d)](_0x2c96ed(0x1fc)),_0x4c7e1c=async(_0x3489a6,_0x3f8a4e)=>{const _0x7965e7=_0x2c96ed,_0x12219c=_0x3489a6[_0x7965e7(0x224)](_0x13acdc[_0x7965e7(0x20b)]),_0x2523c5=_0x3489a6['get'](_0x2c8ff4[_0x7965e7(0x21e)]);_0x3f8a4e['forEach'](_0xc58724=>{const _0x25a985=_0x7965e7;_0x12219c[_0x25a985(0x1cc)](_0xc58724)&&_0x3f8a4e[_0x25a985(0x1ae)](_0xc58724);}),_0x3f8a4e[_0x7965e7(0x1b0)]&&(await _0x2523c5[_0x7965e7(0x224)](_0x7965e7(0x1b1),{'params':{'userIDs':[..._0x3f8a4e]}}))[_0x7965e7(0x1e8)]['users'][_0x7965e7(0x1ee)](_0x1f0839=>{const _0x542949=_0x7965e7;_0x1f0839&&_0x12219c[_0x542949(0x1c0)](_0x1f0839);});};var _0x132a56=Object[_0x2c96ed(0x1ec)],_0xab0d97=(_0x45ce59,_0x1ae86c,_0x3fe94d,_0x3a8e79)=>{for(var _0x36db56=_0x3a8e79>0x1?void 0x0:_0x3a8e79?_0x132a56(_0x1ae86c,_0x3fe94d):_0x1ae86c,_0x1cf691=_0x45ce59['length']-0x1,_0x30c8dd;_0x1cf691>=0x0;_0x1cf691--)(_0x30c8dd=_0x45ce59[_0x1cf691])&&(_0x36db56=_0x30c8dd(_0x36db56)||_0x36db56);return _0x36db56;},_0x17f2d1=(_0x48cb13,_0x3af144)=>(_0xbb0ea7,_0x51d705)=>_0x3af144(_0xbb0ea7,_0x51d705,_0x48cb13);let _0x4bd4db=class extends _0x13acdc['Disposable']{constructor(_0x1a159f,_0x2452d0,_0x1831a6,_0xfa0a4c){const _0x3b8f0b=_0x2c96ed;super(),this[_0x3b8f0b(0x20d)]=_0x1a159f,this[_0x3b8f0b(0x1af)]=_0x2452d0,this[_0x3b8f0b(0x1ed)]=_0x1831a6,this[_0x3b8f0b(0x222)]=_0xfa0a4c,this[_0x3b8f0b(0x1d7)](),this[_0x3b8f0b(0x1d4)]();}['_initUserSync'](){const _0x5ef521=_0x2c96ed;this[_0x5ef521(0x226)](this[_0x5ef521(0x1af)][_0x5ef521(0x1b2)][_0x5ef521(0x20e)](_0x47b58d[_0x5ef521(0x1d0)](0x10))[_0x5ef521(0x1ce)](_0x2e750a=>{const _0x414ccf=_0x5ef521,_0x38d9d3=new Set();_0x2e750a[_0x414ccf(0x1ee)](_0x1afd52=>{const _0x5cefb7=_0x414ccf;switch(_0x1afd52[_0x5cefb7(0x202)]){case _0x5cefb7(0x1bb):{const _0x2c180c=_0x1afd52[_0x5cefb7(0x1e7)][_0x5cefb7(0x22b)];_0x38d9d3['add'](_0x2c180c);break;}}}),_0x4c7e1c(this[_0x414ccf(0x222)],_0x38d9d3);}));}['_init'](){const _0x55a109=_0x2c96ed;this['disposeWithMe'](this[_0x55a109(0x20d)][_0x55a109(0x1b2)][_0x55a109(0x1ce)](async _0x5ea56d=>{const _0x512eff=_0x55a109;var _0x1b2590,_0x121b1d,_0x8495f5,_0x4d5d65;const _0x17b986=(_0x1b2590=this[_0x512eff(0x1af)][_0x512eff(0x1d6)](_0x5ea56d['unitId'])[_0x512eff(0x1f0)](_0x2e885b=>_0x2e885b[_0x512eff(0x1d3)]===_0x5ea56d[_0x512eff(0x1d3)]))==null?void 0x0:_0x1b2590[_0x512eff(0x1c2)];if(!_0x17b986)return;const {unitId:_0x2bde01,subUnitId:_0xc2b0b5}=_0x17b986;switch(_0x5ea56d[_0x512eff(0x1a7)]&&this['_userService'][_0x512eff(0x1c0)](_0x5ea56d['user']),_0x5ea56d['type']){case _0x34a4b7[_0x512eff(0x1fe)]:break;case _0x34a4b7[_0x512eff(0x1d5)]:{this[_0x512eff(0x1af)][_0x512eff(0x228)](_0x2bde01,_0xc2b0b5,{'unitId':_0x2bde01,'subUnitId':_0xc2b0b5,'ref':'','id':_0x5ea56d['replyId'],'dT':_0x3ea739(+_0x5ea56d['createTimestamp']),'threadId':_0x5ea56d['threadId'],'personId':(_0x8495f5=(_0x121b1d=_0x5ea56d['user'])==null?void 0x0:_0x121b1d[_0x512eff(0x1ab)])!=null?_0x8495f5:_0x5ea56d[_0x512eff(0x1e9)],'text':JSON[_0x512eff(0x203)](_0x5ea56d['content']),'parentId':_0x17b986['id']});break;}case _0x34a4b7['Delete']:{const _0x130862=this[_0x512eff(0x1af)][_0x512eff(0x1e6)](_0x2bde01,_0xc2b0b5,_0x5ea56d[_0x512eff(0x1b6)]);_0x130862&&_0x130862[_0x512eff(0x1c3)]&&this[_0x512eff(0x1af)][_0x512eff(0x229)](_0x2bde01,_0xc2b0b5,_0x5ea56d[_0x512eff(0x1b6)]);break;}case _0x34a4b7[_0x512eff(0x1f5)]:{this[_0x512eff(0x1af)][_0x512eff(0x1d2)](_0x2bde01,_0xc2b0b5,{'commentId':_0x5ea56d['replyId'],'text':JSON['parse'](_0x5ea56d[_0x512eff(0x1d9)])});break;}case _0x34a4b7[_0x512eff(0x210)]:{const _0x500555=(_0x4d5d65=this[_0x512eff(0x1af)][_0x512eff(0x1d6)](_0x5ea56d[_0x512eff(0x1c6)])['find'](_0x4001cb=>_0x4001cb[_0x512eff(0x1d3)]===_0x5ea56d['threadId']))==null?void 0x0:_0x4d5d65['root'];_0x500555&&this[_0x512eff(0x1af)][_0x512eff(0x212)](_0x2bde01,_0xc2b0b5,_0x500555['id'],_0x5ea56d['solved']===_0x56e932[_0x512eff(0x1de)]);break;}}}));}};_0x4bd4db=_0xab0d97([_0x17f2d1(0x0,_0x13acdc['Inject'](_0x1e3e43[_0x2c96ed(0x1d1)])),_0x17f2d1(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0x21e65e['ThreadCommentModel'])),_0x17f2d1(0x2,_0x13acdc['Inject'](_0x13acdc[_0x2c96ed(0x20b)])),_0x17f2d1(0x3,_0x13acdc[_0x2c96ed(0x1b8)](_0x13acdc['Injector']))],_0x4bd4db);const _0x2ef9ba=_0x2c96ed(0x1bc),_0x5234e2={};var _0x20b0ce=Object['getOwnPropertyDescriptor'],_0x43b44e=(_0x430436,_0x151885,_0x56ada1,_0x59a1fd)=>{const _0x30e591=_0x2c96ed;for(var _0x21b14e=_0x59a1fd>0x1?void 0x0:_0x59a1fd?_0x20b0ce(_0x151885,_0x56ada1):_0x151885,_0x41db46=_0x430436[_0x30e591(0x1b7)]-0x1,_0x4b61a7;_0x41db46>=0x0;_0x41db46--)(_0x4b61a7=_0x430436[_0x41db46])&&(_0x21b14e=_0x4b61a7(_0x21b14e)||_0x21b14e);return _0x21b14e;},_0x1865db=(_0x178f7b,_0x459176)=>(_0x2084e9,_0x58f5a2)=>_0x459176(_0x2084e9,_0x58f5a2,_0x178f7b);function _0x142ac2(_0x5f3662,_0x27d05a){const _0x5af76d=_0x2c96ed,_0x3fb48a=_0x5f3662[_0x5af76d(0x1f4)][0x0];return{..._0x27d05a,'id':_0x3fb48a['replyId'],'resolved':_0x5f3662[_0x5af76d(0x1c8)]===0x1,'dT':_0x3ea739(_0x3fb48a['createTimestamp']),'personId':_0x3fb48a[_0x5af76d(0x1e9)],'threadId':_0x3fb48a['threadId']};}function _0x5707b4(_0x180705,_0x30c3e0,_0x3cbc59){const _0x308e41=_0x2c96ed;var _0x3a684c,_0x16d78d;if(((_0x16d78d=(_0x3a684c=_0x180705==null?void 0x0:_0x180705[_0x308e41(0x1f4)])==null?void 0x0:_0x3a684c[_0x308e41(0x1b7)])!=null?_0x16d78d:0x0)>0x0){const _0x35cc75=(_0x45c132,_0x446033)=>({'id':_0x45c132[_0x308e41(0x1b6)],'threadId':_0x45c132[_0x308e41(0x1d3)],'dT':_0x3ea739(_0x45c132[_0x308e41(0x200)]),'personId':_0x45c132[_0x308e41(0x1e9)],'resolved':_0x180705[_0x308e41(0x1c8)]===_0x56e932[_0x308e41(0x1de)],'unitId':_0x30c3e0,'subUnitId':_0x3cbc59,'text':JSON[_0x308e41(0x203)](_0x45c132[_0x308e41(0x1d9)]),'parentId':_0x446033}),_0xaef4cb=_0x35cc75(_0x180705['replies'][0x0]);return{..._0xaef4cb,'children':_0x180705[_0x308e41(0x1f4)][_0x308e41(0x204)](0x1)['map'](_0x185d4e=>_0x35cc75(_0x185d4e,_0xaef4cb['id']))};}return null;}let _0xbb7deb=class{constructor(_0x39de0c,_0x1b3be0,_0x1072c0){const _0x546fc3=_0x2c96ed;this[_0x546fc3(0x216)]=_0x39de0c,this[_0x546fc3(0x1ed)]=_0x1b3be0,this[_0x546fc3(0x1a8)]=_0x1072c0;}async[_0x2c96ed(0x228)](_0x496289){const _0x192790=_0x2c96ed;var _0x24f55e,_0x4d4803;const {parentId:_0x2be98b,unitId:_0x5f8e20,text:_0x16c51f,threadId:_0x16df52}=_0x496289,_0x21f1de=(_0x4d4803=(_0x24f55e=_0x16c51f[_0x192790(0x1f2)])==null?void 0x0:_0x24f55e[_0x192790(0x1b3)](_0x33f459=>_0x33f459[_0x192790(0x1cb)]===_0x13acdc[_0x192790(0x206)][_0x192790(0x1e1)])[_0x192790(0x1cf)](_0x9b10bb=>_0x9b10bb['rangeId']))!=null?_0x4d4803:[],_0x482514=JSON[_0x192790(0x201)](_0x16c51f),_0x50ed37=(await this['_sessionService'][_0x192790(0x1e2)](_0x5f8e20))['getMemberID']();if(_0x2be98b){const _0x306260={'memberId':_0x50ed37,'unitId':_0x5f8e20,'content':_0x482514,'mention':_0x21f1de,'threadId':_0x16df52},_0x54a4fa=(await this[_0x192790(0x216)][_0x192790(0x207)](_0x192790(0x221)+_0x5f8e20+'/reply',{'body':_0x306260}))[_0x192790(0x1e8)][_0x192790(0x1e5)];return{..._0x496289,'id':_0x54a4fa[_0x192790(0x1b6)],'dT':_0x13acdc[_0x192790(0x1fb)](+_0x54a4fa[_0x192790(0x200)])[_0x192790(0x21d)](_0x192790(0x1fc)),'personId':_0x54a4fa[_0x192790(0x1e9)]};}else{const _0x33234b={'memberId':_0x50ed37,'unitId':_0x5f8e20,'content':_0x482514,'mention':_0x21f1de},_0x586981=await this[_0x192790(0x216)]['post']('/universer-api/comment/unit/'+_0x5f8e20+_0x192790(0x1aa),{'body':_0x33234b});return _0x142ac2(_0x586981[_0x192790(0x1e8)]['comment'],_0x496289);}}async[_0x2c96ed(0x1d2)](_0x5351a3){const _0x17b7cc=_0x2c96ed;var _0xcc9717,_0x320f62;const {text:_0x3de68a,unitId:_0x3e5fb9}=_0x5351a3,_0x192875=(_0x320f62=(_0xcc9717=_0x3de68a[_0x17b7cc(0x1f2)])==null?void 0x0:_0xcc9717[_0x17b7cc(0x1b3)](_0x1a6a62=>_0x1a6a62[_0x17b7cc(0x1cb)]===_0x13acdc['CustomRangeType'][_0x17b7cc(0x1e1)])[_0x17b7cc(0x1cf)](_0x264ee9=>_0x264ee9['rangeId']))!=null?_0x320f62:[],_0x29dab8=JSON['stringify'](_0x3de68a),_0xd7f6c=_0x5351a3[_0x17b7cc(0x1d3)],_0x4870ef=_0x5351a3['id'],_0x2bb0de={'memberId':(await this[_0x17b7cc(0x1a8)]['requireSession'](_0x3e5fb9))[_0x17b7cc(0x1ea)](),'unitId':_0x3e5fb9,'threadId':_0xd7f6c,'mention':_0x192875,'content':_0x29dab8,'replyId':_0x4870ef},_0x4e66de=await this[_0x17b7cc(0x216)][_0x17b7cc(0x207)](_0x17b7cc(0x221)+_0x3e5fb9+_0x17b7cc(0x214),{'body':_0x2bb0de});return!_0x4e66de[_0x17b7cc(0x1e8)][_0x17b7cc(0x1a9)]||_0x4e66de['body'][_0x17b7cc(0x1a9)][_0x17b7cc(0x1e4)]===0x1;}async['resolveComment'](_0x5c9e21){const _0x2b7dd1=_0x2c96ed,{unitId:_0x3dea26}=_0x5c9e21,_0x2477d2=_0x5c9e21[_0x2b7dd1(0x1d3)],_0x33ae85={'memberId':this[_0x2b7dd1(0x1ed)][_0x2b7dd1(0x1eb)]()[_0x2b7dd1(0x1ab)],'unitId':_0x3dea26,'threadId':_0x2477d2,'solved':_0x5c9e21[_0x2b7dd1(0x1ac)]?_0x56e932['Solved']:_0x56e932['OpenOrReOpen']},_0x2e515a=await this[_0x2b7dd1(0x216)][_0x2b7dd1(0x207)](_0x2b7dd1(0x221)+_0x3dea26+_0x2b7dd1(0x1b9),{'body':_0x33ae85});return!_0x2e515a['body'][_0x2b7dd1(0x1a9)]||_0x2e515a[_0x2b7dd1(0x1e8)][_0x2b7dd1(0x1a9)][_0x2b7dd1(0x1e4)]===0x1;}async[_0x2c96ed(0x229)](_0x92bf41,_0x18de5f,_0x47b10c,_0x280ee5){const _0x3876ec=_0x2c96ed,_0x3d3f50={'memberId':(await this[_0x3876ec(0x1a8)][_0x3876ec(0x1e2)](_0x92bf41))[_0x3876ec(0x1ea)](),'threadId':_0x47b10c,'replyId':_0x280ee5,'unitId':_0x92bf41},_0x5cf407=await this[_0x3876ec(0x216)][_0x3876ec(0x207)](_0x3876ec(0x221)+_0x92bf41+'/delete',{'body':_0x3d3f50});return!_0x5cf407['body'][_0x3876ec(0x1a9)]||_0x5cf407['body']['error']['code']===0x1;}async[_0x2c96ed(0x213)](_0x4af876,_0x24879a,_0x53d2ba){const _0x3adb63=_0x2c96ed,_0x15f957={'unitId':_0x4af876,'threadId':_0x53d2ba},_0x2bf4be=await this[_0x3adb63(0x216)][_0x3adb63(0x207)](_0x3adb63(0x221)+_0x4af876+_0x3adb63(0x1c7),{'body':_0x15f957}),_0x20267b=_0x53d2ba[_0x3adb63(0x1cf)](_0x33d0ca=>_0x5707b4(_0x2bf4be[_0x3adb63(0x1e8)]['comments'][_0x33d0ca],_0x4af876,_0x24879a))[_0x3adb63(0x1b3)](Boolean);return Object[_0x3adb63(0x1c5)](_0x2bf4be[_0x3adb63(0x1e8)][_0x3adb63(0x1f6)])[_0x3adb63(0x1ee)](_0xd8a3fc=>{const _0x47fa8c=_0x3adb63;this[_0x47fa8c(0x1ed)][_0x47fa8c(0x1c0)](_0xd8a3fc);}),_0x20267b;}['saveCommentToSnapshot'](_0x842e5b){const _0x5db1ff=_0x2c96ed;return{'id':_0x842e5b['id'],'threadId':_0x842e5b[_0x5db1ff(0x1d3)],'ref':_0x842e5b[_0x5db1ff(0x1ad)]};}};_0xbb7deb=_0x43b44e([_0x1865db(0x0,_0x13acdc['Inject'](_0x2c8ff4[_0x2c96ed(0x21e)])),_0x1865db(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0x13acdc[_0x2c96ed(0x20b)])),_0x1865db(0x2,_0x13acdc['Inject'](_0x1e3e43[_0x2c96ed(0x1d8)]))],_0xbb7deb);var _0x4ba162=Object[_0x2c96ed(0x1ec)],_0x9f187e=(_0x21ebaa,_0x496157,_0x2dd549,_0xe3100c)=>{const _0x3535f9=_0x2c96ed;for(var _0x4c790d=_0xe3100c>0x1?void 0x0:_0xe3100c?_0x4ba162(_0x496157,_0x2dd549):_0x496157,_0x24c146=_0x21ebaa[_0x3535f9(0x1b7)]-0x1,_0x4e355d;_0x24c146>=0x0;_0x24c146--)(_0x4e355d=_0x21ebaa[_0x24c146])&&(_0x4c790d=_0x4e355d(_0x4c790d)||_0x4c790d);return _0x4c790d;},_0x265dff=(_0xd2e34,_0x2f0906)=>(_0x3eed2f,_0x44b7b5)=>_0x2f0906(_0x3eed2f,_0x44b7b5,_0xd2e34);let _0x46c52c=class extends _0x13acdc['Disposable']{constructor(_0x3f49c3,_0x250472){const _0x5b8ea3=_0x2c96ed;super(),this[_0x5b8ea3(0x1be)]=_0x3f49c3,this[_0x5b8ea3(0x225)]=_0x250472,this[_0x5b8ea3(0x1ff)]();}[_0x2c96ed(0x1ff)](){const _0x22f035=_0x2c96ed;this[_0x22f035(0x1be)]['dataSource']=this[_0x22f035(0x225)],this['_threadCommentDataSourceService'][_0x22f035(0x208)]=!0x1;}};_0x46c52c=_0x9f187e([_0x265dff(0x0,_0x21e65e['IThreadCommentDataSourceService']),_0x265dff(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0xbb7deb))],_0x46c52c);var _0x338dcf=Object[_0x2c96ed(0x1b4)],_0x172ec6=Object[_0x2c96ed(0x1ec)],_0x3683d6=(_0x3f9cea,_0x5c774b,_0x4d5e86)=>_0x5c774b in _0x3f9cea?_0x338dcf(_0x3f9cea,_0x5c774b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d5e86}):_0x3f9cea[_0x5c774b]=_0x4d5e86,_0x251416=(_0x2a5dc7,_0x51037f,_0x1f5d40,_0x688b6)=>{const _0x24c08f=_0x2c96ed;for(var _0x5280b1=_0x688b6>0x1?void 0x0:_0x688b6?_0x172ec6(_0x51037f,_0x1f5d40):_0x51037f,_0x5087f6=_0x2a5dc7[_0x24c08f(0x1b7)]-0x1,_0x5cb876;_0x5087f6>=0x0;_0x5087f6--)(_0x5cb876=_0x2a5dc7[_0x5087f6])&&(_0x5280b1=_0x5cb876(_0x5280b1)||_0x5280b1);return _0x5280b1;},_0x95863e=(_0x4ee6fb,_0x2f7f50)=>(_0x557571,_0x5e847a)=>_0x2f7f50(_0x557571,_0x5e847a,_0x4ee6fb),_0x16f189=(_0x268f9d,_0x415d76,_0x149f48)=>_0x3683d6(_0x268f9d,typeof _0x415d76!=_0x2c96ed(0x1ef)?_0x415d76+'':_0x415d76,_0x149f48);_0x8942d1[_0x2c96ed(0x22a)]=class extends _0x13acdc['Plugin']{constructor(_0x1911a7=_0x5234e2,_0x3632ea,_0x3b302f){const _0x187780=_0x2c96ed;super(),this[_0x187780(0x1bf)]=_0x1911a7,this[_0x187780(0x222)]=_0x3632ea,this[_0x187780(0x1c1)]=_0x3b302f;const {..._0x54354d}=_0x13acdc[_0x187780(0x21b)]({},_0x5234e2,this[_0x187780(0x1bf)]);this[_0x187780(0x1c1)][_0x187780(0x1f9)](_0x2ef9ba,_0x54354d);}[_0x2c96ed(0x1dc)](){const _0x519ebe=_0x2c96ed;[[_0xbb7deb],[_0x46c52c],[_0x4bd4db]][_0x519ebe(0x1ee)](_0x17e177=>{const _0x1d77ae=_0x519ebe;this[_0x1d77ae(0x222)]['add'](_0x17e177);});}[_0x2c96ed(0x1c4)](){const _0x458057=_0x2c96ed;this[_0x458057(0x222)]['get'](_0x46c52c),this[_0x458057(0x222)]['get'](_0x4bd4db);}},_0x16f189(_0x8942d1[_0x2c96ed(0x22a)],_0x2c96ed(0x1db),_0x753262),_0x16f189(_0x8942d1['UniverThreadCommentDataSourcePlugin'],_0x2c96ed(0x202),_0x13acdc['UniverInstanceType']['UNIVER_UNKNOWN']),_0x8942d1['UniverThreadCommentDataSourcePlugin']=_0x251416([_0x13acdc['DependentOn'](_0x4ea396[_0x2c96ed(0x215)],_0x1e3e43['UniverCollaborationClientPlugin'],_0x437980['UniverLicensePlugin']),_0x95863e(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0x13acdc[_0x2c96ed(0x20a)])),_0x95863e(0x2,_0x13acdc[_0x2c96ed(0x1fa)])],_0x8942d1[_0x2c96ed(0x22a)]),Object[_0x2c96ed(0x1b4)](_0x8942d1,Symbol[_0x2c96ed(0x1c9)],{'value':_0x2c96ed(0x21f)});}));
1
+ function _0x46f8(){const _0x2991b5=['ref','format','Solved','Plugin','getUnit','syncUpdateMutationToColla','pipe','code','toStringTag','userId','_config','dayjs','341709MkPcpg','customRanges','UniverCollaborationClientPlugin','_threadCommentModel','UniverInstanceType','UniverThreadCommentUIPlugin','parentId','32sYVqLY','users','5686624fTZmbm','/add','resolved','onReady','createTimestamp','UniverThreadComment','Edit','length','OpenOrReOpen','_sessionService','type','Disposable','UserManagerService','rangeType','pluginName','getMemberID','rangeId','listComments','/universer-api/comment/unit/','reply','values','saveCommentToSnapshot','root','8898JYSAaB','onStarting','function','Solve','content','add','_commentService','/reply','personId','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','post','addComment','@univerjs/core','UniverLicensePlugin','stringify','deleteComment','3028550FHQVnn','IConfigService','Reply','Injector','_injector','comments','exports','Add','userID','resolveComment','_init','Module','ThreadCommentModel','COMMENT','7NGZRtN','HTTPService','Unknown','getCurrentUser','delete','solved','parse','addUser','amd','getOwnPropertyDescriptor','thread-comment-data-source.config','payload','230733SVQiZf','_initDataSource','@univerjs-pro/collaboration-client','threadId','1848306uXeNBq','commentUpdate$','forEach','updateComment','body','requireSession','_initUserSync','CollaborationSessionService','Inject','get','filter','disposeWithMe','error','@univerjs/thread-comment-ui','symbol','UniverCore','_configService','IThreadCommentDataSourceService','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','18slOrWI','rxjs','subscribe','replies','@univerjs/network','5425800jzKeGS','_threadCommentDataSource','UniverNetwork','bufferTime','map','@univerjs-pro/license','dataSource','merge','size','defineProperty','user','Delete','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','comment','UniverProCollaborationClient','_threadCommentDataSourceService','CustomRangeType','replyId','_httpService'];_0x46f8=function(){return _0x2991b5;};return _0x46f8();}function _0x468f(_0x3a84e3,_0x3e7562){const _0x46f811=_0x46f8();return _0x468f=function(_0x468f3c,_0x16c6a0){_0x468f3c=_0x468f3c-0x1f4;let _0x42cd54=_0x46f811[_0x468f3c];return _0x42cd54;},_0x468f(_0x3a84e3,_0x3e7562);}(function(_0x469a81,_0x1b2f79){const _0x280261=_0x468f,_0x2ea531=_0x469a81();while(!![]){try{const _0x202986=parseInt(_0x280261(0x274))/0x1*(parseInt(_0x280261(0x231))/0x2)+parseInt(_0x280261(0x211))/0x3*(parseInt(_0x280261(0x218))/0x4)+-parseInt(_0x280261(0x279))/0x5+-parseInt(_0x280261(0x260))/0x6*(-parseInt(_0x280261(0x250))/0x7)+parseInt(_0x280261(0x21a))/0x8+-parseInt(_0x280261(0x25c))/0x9+-parseInt(_0x280261(0x242))/0xa;if(_0x202986===_0x1b2f79)break;else _0x2ea531['push'](_0x2ea531['shift']());}catch(_0x10a45c){_0x2ea531['push'](_0x2ea531['shift']());}}}(_0x46f8,0x91a35),function(_0x327c2b,_0x37d1bf){const _0x6f1daf=_0x468f;typeof exports=='object'&&typeof module<'u'?_0x37d1bf(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==_0x6f1daf(0x233)&&define[_0x6f1daf(0x258)]?define([_0x6f1daf(0x248),_0x6f1daf(0x25e),_0x6f1daf(0x1f6),_0x6f1daf(0x23e),_0x6f1daf(0x26d),_0x6f1daf(0x23a),'rxjs',_0x6f1daf(0x278)],_0x37d1bf):(_0x327c2b=typeof globalThis<'u'?globalThis:_0x327c2b||self,_0x37d1bf(_0x327c2b['UniverProThreadCommentDatasource']={},_0x327c2b[_0x6f1daf(0x200)],_0x327c2b['UniverProLicense'],_0x327c2b[_0x6f1daf(0x26f)],_0x327c2b['UniverThreadCommentUi'],_0x327c2b[_0x6f1daf(0x21f)],_0x327c2b[_0x6f1daf(0x275)],_0x327c2b[_0x6f1daf(0x27b)]));}(this,function(_0x3f72c,_0x52eae7,_0x1cf475,_0x459f9a,_0x47763d,_0x1bf7c4,_0x1a357c,_0x51fe71){'use strict';const _0x4b3d97=_0x468f;const _0x201b52=_0x4b3d97(0x273);var _0x57973f=(_0x323e0e=>(_0x323e0e[_0x323e0e[_0x4b3d97(0x222)]=0x0]=_0x4b3d97(0x222),_0x323e0e[_0x323e0e['Solved']=0x1]=_0x4b3d97(0x207),_0x323e0e[_0x323e0e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x323e0e))(_0x57973f||{}),_0x16a70e=(_0x8f0a4e=>(_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x252)]=0x0]=_0x4b3d97(0x252),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x249)]=0x1]=_0x4b3d97(0x249),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x244)]=0x2]=_0x4b3d97(0x244),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x220)]=0x3]=_0x4b3d97(0x220),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x1fc)]=0x4]=_0x4b3d97(0x1fc),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x234)]=0x5]=_0x4b3d97(0x234),_0x8f0a4e[_0x8f0a4e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x8f0a4e))(_0x16a70e||{});const _0x2e0003=_0x14b184=>_0x459f9a[_0x4b3d97(0x210)](new Date(+_0x14b184))[_0x4b3d97(0x206)](_0x4b3d97(0x1fd)),_0x50984b=async(_0x580c25,_0x717de1)=>{const _0x4852fa=_0x4b3d97,_0x57fca6=_0x580c25['get'](_0x459f9a[_0x4852fa(0x226)]),_0x46b733=_0x580c25[_0x4852fa(0x269)](_0x51fe71[_0x4852fa(0x251)]);_0x717de1['forEach'](_0xce610d=>{const _0x30e574=_0x4852fa;_0x57fca6['getUser'](_0xce610d)&&_0x717de1[_0x30e574(0x254)](_0xce610d);}),_0x717de1[_0x4852fa(0x1f9)]&&(await _0x46b733['get'](_0x4852fa(0x1fe),{'params':{'userIDs':[..._0x717de1]}}))[_0x4852fa(0x264)][_0x4852fa(0x219)]['forEach'](_0x292cb0=>{const _0x568e19=_0x4852fa;_0x292cb0&&_0x57fca6[_0x568e19(0x257)](_0x292cb0);});};var _0x1fed9a=Object['getOwnPropertyDescriptor'],_0x18ceba=(_0x138ab1,_0x51a04d,_0x3ee152,_0x25c122)=>{const _0x1429d1=_0x4b3d97;for(var _0x233168=_0x25c122>0x1?void 0x0:_0x25c122?_0x1fed9a(_0x51a04d,_0x3ee152):_0x51a04d,_0x4e2e32=_0x138ab1[_0x1429d1(0x221)]-0x1,_0x38dc3b;_0x4e2e32>=0x0;_0x4e2e32--)(_0x38dc3b=_0x138ab1[_0x4e2e32])&&(_0x233168=_0x38dc3b(_0x233168)||_0x233168);return _0x233168;},_0x16e1fe=(_0x109cf9,_0x2d4843)=>(_0x3a819d,_0x4ebd16)=>_0x2d4843(_0x3a819d,_0x4ebd16,_0x109cf9);let _0x2b7552=class extends _0x459f9a[_0x4b3d97(0x225)]{constructor(_0x32d9fd,_0x2ba241,_0x343162,_0x4e2d65){const _0x12528b=_0x4b3d97;super(),this[_0x12528b(0x237)]=_0x32d9fd,this[_0x12528b(0x214)]=_0x2ba241,this[_0x12528b(0x272)]=_0x343162,this[_0x12528b(0x246)]=_0x4e2d65,this[_0x12528b(0x24c)](),this[_0x12528b(0x266)]();}['_initUserSync'](){const _0x21ea08=_0x4b3d97;this[_0x21ea08(0x26b)](this[_0x21ea08(0x214)][_0x21ea08(0x261)][_0x21ea08(0x20b)](_0x1a357c[_0x21ea08(0x1f4)](0x10))['subscribe'](_0x575a3b=>{const _0x72c7d9=_0x21ea08,_0x54c70d=new Set();_0x575a3b[_0x72c7d9(0x262)](_0xe23b16=>{const _0x1cc353=_0x72c7d9;switch(_0xe23b16[_0x1cc353(0x224)]){case _0x1cc353(0x236):{const _0x11fa84=_0xe23b16[_0x1cc353(0x25b)][_0x1cc353(0x239)];_0x54c70d['add'](_0x11fa84);break;}}}),_0x50984b(this[_0x72c7d9(0x246)],_0x54c70d);}));}['_init'](){const _0x1a0f20=_0x4b3d97;this[_0x1a0f20(0x26b)](this[_0x1a0f20(0x237)][_0x1a0f20(0x261)][_0x1a0f20(0x276)](async _0x77ee2d=>{const _0x564644=_0x1a0f20;var _0x3df349,_0x2f3ba9,_0x524fdf,_0x124d3e;const _0x25ec5f=(_0x3df349=this[_0x564644(0x214)][_0x564644(0x209)](_0x77ee2d['unitId'])['find'](_0x7e3ce6=>_0x7e3ce6[_0x564644(0x25f)]===_0x77ee2d['threadId']))==null?void 0x0:_0x3df349[_0x564644(0x230)];if(!_0x25ec5f)return;const {unitId:_0x176671,subUnitId:_0x52c605}=_0x25ec5f;switch(_0x77ee2d[_0x564644(0x1fb)]&&this[_0x564644(0x272)][_0x564644(0x257)](_0x77ee2d[_0x564644(0x1fb)]),_0x77ee2d[_0x564644(0x224)]){case _0x16a70e[_0x564644(0x249)]:break;case _0x16a70e[_0x564644(0x244)]:{this[_0x564644(0x214)][_0x564644(0x23d)](_0x176671,_0x52c605,{'unitId':_0x176671,'subUnitId':_0x52c605,'ref':'','id':_0x77ee2d[_0x564644(0x203)],'dT':_0x2e0003(+_0x77ee2d[_0x564644(0x21e)]),'threadId':_0x77ee2d[_0x564644(0x25f)],'personId':(_0x524fdf=(_0x2f3ba9=_0x77ee2d[_0x564644(0x1fb)])==null?void 0x0:_0x2f3ba9[_0x564644(0x24a)])!=null?_0x524fdf:_0x77ee2d[_0x564644(0x20e)],'text':JSON[_0x564644(0x256)](_0x77ee2d['content']),'parentId':_0x25ec5f['id']});break;}case _0x16a70e['Delete']:{const _0x42b3e2=this['_threadCommentModel']['getComment'](_0x176671,_0x52c605,_0x77ee2d['replyId']);_0x42b3e2&&_0x42b3e2[_0x564644(0x217)]&&this['_threadCommentModel'][_0x564644(0x241)](_0x176671,_0x52c605,_0x77ee2d[_0x564644(0x203)]);break;}case _0x16a70e[_0x564644(0x220)]:{this[_0x564644(0x214)][_0x564644(0x263)](_0x176671,_0x52c605,{'commentId':_0x77ee2d[_0x564644(0x203)],'text':JSON[_0x564644(0x256)](_0x77ee2d['content'])});break;}case _0x16a70e[_0x564644(0x234)]:{const _0x13ab61=(_0x124d3e=this[_0x564644(0x214)][_0x564644(0x209)](_0x77ee2d['unitId'])['find'](_0x1e184c=>_0x1e184c['threadId']===_0x77ee2d['threadId']))==null?void 0x0:_0x124d3e['root'];_0x13ab61&&this[_0x564644(0x214)][_0x564644(0x24b)](_0x176671,_0x52c605,_0x13ab61['id'],_0x77ee2d[_0x564644(0x255)]===_0x57973f[_0x564644(0x207)]);break;}}}));}};_0x2b7552=_0x18ceba([_0x16e1fe(0x0,_0x459f9a[_0x4b3d97(0x268)](_0x52eae7['CommentService'])),_0x16e1fe(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x1bf7c4[_0x4b3d97(0x24e)])),_0x16e1fe(0x2,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a[_0x4b3d97(0x226)])),_0x16e1fe(0x3,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a['Injector']))],_0x2b7552);const _0x5ad761=_0x4b3d97(0x25a),_0x5d8192={};var _0x160841=Object[_0x4b3d97(0x259)],_0x10685d=(_0x390467,_0x3496a9,_0x4886df,_0x4dce3a)=>{const _0x28879e=_0x4b3d97;for(var _0x4ce218=_0x4dce3a>0x1?void 0x0:_0x4dce3a?_0x160841(_0x3496a9,_0x4886df):_0x3496a9,_0x1603a0=_0x390467[_0x28879e(0x221)]-0x1,_0x178972;_0x1603a0>=0x0;_0x1603a0--)(_0x178972=_0x390467[_0x1603a0])&&(_0x4ce218=_0x178972(_0x4ce218)||_0x4ce218);return _0x4ce218;},_0x4ad7df=(_0x1be61b,_0x37ff4f)=>(_0x483607,_0x1d7654)=>_0x37ff4f(_0x483607,_0x1d7654,_0x1be61b);function _0x50b5eb(_0x18c689,_0x40ef2c){const _0x538daf=_0x4b3d97,_0x55d2b1=_0x18c689[_0x538daf(0x277)][0x0];return{..._0x40ef2c,'id':_0x55d2b1[_0x538daf(0x203)],'resolved':_0x18c689[_0x538daf(0x255)]===0x1,'dT':_0x2e0003(_0x55d2b1[_0x538daf(0x21e)]),'personId':_0x55d2b1[_0x538daf(0x20e)],'threadId':_0x55d2b1[_0x538daf(0x25f)]};}function _0x15a7dd(_0x21b871,_0x3a6cf5,_0x19ab5e){const _0x2fcedf=_0x4b3d97;var _0x50055b,_0x3f6508;if(((_0x3f6508=(_0x50055b=_0x21b871==null?void 0x0:_0x21b871[_0x2fcedf(0x277)])==null?void 0x0:_0x50055b['length'])!=null?_0x3f6508:0x0)>0x0){const _0x1f7a9f=(_0x1d9c63,_0x2a17b1)=>({'id':_0x1d9c63[_0x2fcedf(0x203)],'threadId':_0x1d9c63[_0x2fcedf(0x25f)],'dT':_0x2e0003(_0x1d9c63[_0x2fcedf(0x21e)]),'personId':_0x1d9c63[_0x2fcedf(0x20e)],'resolved':_0x21b871[_0x2fcedf(0x255)]===_0x57973f[_0x2fcedf(0x207)],'unitId':_0x3a6cf5,'subUnitId':_0x19ab5e,'text':JSON['parse'](_0x1d9c63[_0x2fcedf(0x235)]),'parentId':_0x2a17b1}),_0x536aeb=_0x1f7a9f(_0x21b871['replies'][0x0]);return{..._0x536aeb,'children':_0x21b871[_0x2fcedf(0x277)]['slice'](0x1)['map'](_0x11442c=>_0x1f7a9f(_0x11442c,_0x536aeb['id']))};}return null;}let _0x5d8526=class{constructor(_0x3152f6,_0x58513,_0xc57a41){const _0x535b0e=_0x4b3d97;this[_0x535b0e(0x204)]=_0x3152f6,this[_0x535b0e(0x272)]=_0x58513,this[_0x535b0e(0x223)]=_0xc57a41;}async['addComment'](_0x5d8b53){const _0x22c6e1=_0x4b3d97;var _0x233807,_0x350ffe;const {parentId:_0x582f80,unitId:_0x2200a4,text:_0x4d99e5,threadId:_0x1f6168}=_0x5d8b53,_0xcc9817=(_0x350ffe=(_0x233807=_0x4d99e5[_0x22c6e1(0x212)])==null?void 0x0:_0x233807[_0x22c6e1(0x26a)](_0xb9cf54=>_0xb9cf54[_0x22c6e1(0x227)]===_0x459f9a[_0x22c6e1(0x202)][_0x22c6e1(0x24f)])[_0x22c6e1(0x1f5)](_0x57ad8b=>_0x57ad8b[_0x22c6e1(0x22a)]))!=null?_0x350ffe:[],_0x344b43=JSON[_0x22c6e1(0x240)](_0x4d99e5),_0x513f63=(await this[_0x22c6e1(0x223)][_0x22c6e1(0x265)](_0x2200a4))['getMemberID']();if(_0x582f80){const _0x5de1b1={'memberId':_0x513f63,'unitId':_0x2200a4,'content':_0x344b43,'mention':_0xcc9817,'threadId':_0x1f6168},_0x225988=(await this['_httpService'][_0x22c6e1(0x23c)](_0x22c6e1(0x22c)+_0x2200a4+_0x22c6e1(0x238),{'body':_0x5de1b1}))[_0x22c6e1(0x264)][_0x22c6e1(0x22d)];return{..._0x5d8b53,'id':_0x225988[_0x22c6e1(0x203)],'dT':_0x459f9a[_0x22c6e1(0x210)](+_0x225988[_0x22c6e1(0x21e)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x225988['userId']};}else{const _0x5c70e3={'memberId':_0x513f63,'unitId':_0x2200a4,'content':_0x344b43,'mention':_0xcc9817},_0x4d786b=await this[_0x22c6e1(0x204)][_0x22c6e1(0x23c)](_0x22c6e1(0x22c)+_0x2200a4+_0x22c6e1(0x21b),{'body':_0x5c70e3});return _0x50b5eb(_0x4d786b[_0x22c6e1(0x264)][_0x22c6e1(0x1ff)],_0x5d8b53);}}async[_0x4b3d97(0x263)](_0x4b4b){const _0x22a70d=_0x4b3d97;var _0x5aa49a,_0x268ebc;const {text:_0xd1da81,unitId:_0xafe7ac}=_0x4b4b,_0xcf3c3a=(_0x268ebc=(_0x5aa49a=_0xd1da81[_0x22a70d(0x212)])==null?void 0x0:_0x5aa49a[_0x22a70d(0x26a)](_0x20813b=>_0x20813b[_0x22a70d(0x227)]===_0x459f9a[_0x22a70d(0x202)][_0x22a70d(0x24f)])[_0x22a70d(0x1f5)](_0x46c382=>_0x46c382[_0x22a70d(0x22a)]))!=null?_0x268ebc:[],_0x371f3c=JSON[_0x22a70d(0x240)](_0xd1da81),_0x55a478=_0x4b4b[_0x22a70d(0x25f)],_0x26c539=_0x4b4b['id'],_0x21c86c={'memberId':(await this[_0x22a70d(0x223)][_0x22a70d(0x265)](_0xafe7ac))[_0x22a70d(0x229)](),'unitId':_0xafe7ac,'threadId':_0x55a478,'mention':_0xcf3c3a,'content':_0x371f3c,'replyId':_0x26c539},_0x261e34=await this[_0x22a70d(0x204)]['post']('/universer-api/comment/unit/'+_0xafe7ac+'/edit',{'body':_0x21c86c});return!_0x261e34[_0x22a70d(0x264)][_0x22a70d(0x26c)]||_0x261e34['body'][_0x22a70d(0x26c)][_0x22a70d(0x20c)]===0x1;}async[_0x4b3d97(0x24b)](_0x59b687){const _0x2b85ca=_0x4b3d97,{unitId:_0x51da5b}=_0x59b687,_0x46564e=_0x59b687['threadId'],_0x14a0a3={'memberId':this[_0x2b85ca(0x272)][_0x2b85ca(0x253)]()[_0x2b85ca(0x24a)],'unitId':_0x51da5b,'threadId':_0x46564e,'solved':_0x59b687[_0x2b85ca(0x21c)]?_0x57973f[_0x2b85ca(0x207)]:_0x57973f[_0x2b85ca(0x222)]},_0x1bd6a5=await this[_0x2b85ca(0x204)][_0x2b85ca(0x23c)](_0x2b85ca(0x22c)+_0x51da5b+'/solved',{'body':_0x14a0a3});return!_0x1bd6a5[_0x2b85ca(0x264)][_0x2b85ca(0x26c)]||_0x1bd6a5[_0x2b85ca(0x264)][_0x2b85ca(0x26c)]['code']===0x1;}async[_0x4b3d97(0x241)](_0xdfc77c,_0x2bf876,_0x13eaae,_0x1924de){const _0x195161=_0x4b3d97,_0x23c1fe={'memberId':(await this[_0x195161(0x223)][_0x195161(0x265)](_0xdfc77c))['getMemberID'](),'threadId':_0x13eaae,'replyId':_0x1924de,'unitId':_0xdfc77c},_0x2cfdcc=await this[_0x195161(0x204)][_0x195161(0x23c)](_0x195161(0x22c)+_0xdfc77c+'/delete',{'body':_0x23c1fe});return!_0x2cfdcc['body'][_0x195161(0x26c)]||_0x2cfdcc['body']['error'][_0x195161(0x20c)]===0x1;}async[_0x4b3d97(0x22b)](_0x57f7d2,_0x34bfc4,_0x5c9ff8){const _0xbf00f0=_0x4b3d97,_0xdfcc81={'unitId':_0x57f7d2,'threadId':_0x5c9ff8},_0x2df658=await this[_0xbf00f0(0x204)]['post'](_0xbf00f0(0x22c)+_0x57f7d2+'/list',{'body':_0xdfcc81}),_0x2c82b7=_0x5c9ff8['map'](_0x7c75e8=>_0x15a7dd(_0x2df658[_0xbf00f0(0x264)][_0xbf00f0(0x247)][_0x7c75e8],_0x57f7d2,_0x34bfc4))[_0xbf00f0(0x26a)](Boolean);return Object[_0xbf00f0(0x22e)](_0x2df658[_0xbf00f0(0x264)][_0xbf00f0(0x219)])[_0xbf00f0(0x262)](_0x14f567=>{const _0x47574e=_0xbf00f0;this[_0x47574e(0x272)][_0x47574e(0x257)](_0x14f567);}),_0x2c82b7;}[_0x4b3d97(0x22f)](_0x343186){const _0x73987f=_0x4b3d97;return{'id':_0x343186['id'],'threadId':_0x343186[_0x73987f(0x25f)],'ref':_0x343186[_0x73987f(0x205)]};}};_0x5d8526=_0x10685d([_0x4ad7df(0x0,_0x459f9a[_0x4b3d97(0x268)](_0x51fe71[_0x4b3d97(0x251)])),_0x4ad7df(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a['UserManagerService'])),_0x4ad7df(0x2,_0x459f9a['Inject'](_0x52eae7[_0x4b3d97(0x267)]))],_0x5d8526);var _0x552e37=Object['getOwnPropertyDescriptor'],_0x5a4769=(_0x5e8dfd,_0x142ed6,_0x30f157,_0x458d15)=>{const _0x243fda=_0x4b3d97;for(var _0x17dfa0=_0x458d15>0x1?void 0x0:_0x458d15?_0x552e37(_0x142ed6,_0x30f157):_0x142ed6,_0xe3071=_0x5e8dfd[_0x243fda(0x221)]-0x1,_0x214f0a;_0xe3071>=0x0;_0xe3071--)(_0x214f0a=_0x5e8dfd[_0xe3071])&&(_0x17dfa0=_0x214f0a(_0x17dfa0)||_0x17dfa0);return _0x17dfa0;},_0x3daec0=(_0x359599,_0x38e571)=>(_0x1eae8f,_0x49b04d)=>_0x38e571(_0x1eae8f,_0x49b04d,_0x359599);let _0x13bed7=class extends _0x459f9a[_0x4b3d97(0x225)]{constructor(_0x1b0ec4,_0x1cdbad){const _0x5de7f2=_0x4b3d97;super(),this[_0x5de7f2(0x201)]=_0x1b0ec4,this[_0x5de7f2(0x27a)]=_0x1cdbad,this[_0x5de7f2(0x25d)]();}['_initDataSource'](){const _0x576f06=_0x4b3d97;this[_0x576f06(0x201)][_0x576f06(0x1f7)]=this[_0x576f06(0x27a)],this['_threadCommentDataSourceService'][_0x576f06(0x20a)]=!0x1;}};_0x13bed7=_0x5a4769([_0x3daec0(0x0,_0x1bf7c4[_0x4b3d97(0x271)]),_0x3daec0(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x5d8526))],_0x13bed7);var _0x438a08=Object[_0x4b3d97(0x1fa)],_0x4b984a=Object[_0x4b3d97(0x259)],_0x3308aa=(_0x2192ff,_0x283c10,_0x5a85e1)=>_0x283c10 in _0x2192ff?_0x438a08(_0x2192ff,_0x283c10,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a85e1}):_0x2192ff[_0x283c10]=_0x5a85e1,_0x52fdd2=(_0xed8445,_0x49691c,_0x2c2bc7,_0x222e76)=>{const _0x563650=_0x4b3d97;for(var _0xd98fb6=_0x222e76>0x1?void 0x0:_0x222e76?_0x4b984a(_0x49691c,_0x2c2bc7):_0x49691c,_0x211d17=_0xed8445[_0x563650(0x221)]-0x1,_0x192c69;_0x211d17>=0x0;_0x211d17--)(_0x192c69=_0xed8445[_0x211d17])&&(_0xd98fb6=_0x192c69(_0xd98fb6)||_0xd98fb6);return _0xd98fb6;},_0x1b80d8=(_0x4c774f,_0x2ba105)=>(_0x4423ff,_0x2eae73)=>_0x2ba105(_0x4423ff,_0x2eae73,_0x4c774f),_0x29c54d=(_0x577aac,_0xca7ecb,_0x3123f6)=>_0x3308aa(_0x577aac,typeof _0xca7ecb!=_0x4b3d97(0x26e)?_0xca7ecb+'':_0xca7ecb,_0x3123f6);_0x3f72c[_0x4b3d97(0x23b)]=class extends _0x459f9a[_0x4b3d97(0x208)]{constructor(_0x3bdbef=_0x5d8192,_0x9756e3,_0x268d3b){const _0x36b919=_0x4b3d97;super(),this['_config']=_0x3bdbef,this[_0x36b919(0x246)]=_0x9756e3,this[_0x36b919(0x270)]=_0x268d3b;const {..._0x45b1d9}=_0x459f9a[_0x36b919(0x1f8)]({},_0x5d8192,this[_0x36b919(0x20f)]);this[_0x36b919(0x270)]['setConfig'](_0x5ad761,_0x45b1d9);}[_0x4b3d97(0x232)](){[[_0x5d8526],[_0x13bed7],[_0x2b7552]]['forEach'](_0x5bb171=>{const _0x411254=_0x468f;this[_0x411254(0x246)][_0x411254(0x236)](_0x5bb171);});}[_0x4b3d97(0x21d)](){const _0x53a3a4=_0x4b3d97;this[_0x53a3a4(0x246)][_0x53a3a4(0x269)](_0x13bed7),this[_0x53a3a4(0x246)][_0x53a3a4(0x269)](_0x2b7552);}},_0x29c54d(_0x3f72c[_0x4b3d97(0x23b)],_0x4b3d97(0x228),_0x201b52),_0x29c54d(_0x3f72c[_0x4b3d97(0x23b)],_0x4b3d97(0x224),_0x459f9a[_0x4b3d97(0x215)]['UNIVER_UNKNOWN']),_0x3f72c['UniverThreadCommentDataSourcePlugin']=_0x52fdd2([_0x459f9a['DependentOn'](_0x47763d[_0x4b3d97(0x216)],_0x52eae7[_0x4b3d97(0x213)],_0x1cf475[_0x4b3d97(0x23f)]),_0x1b80d8(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a[_0x4b3d97(0x245)])),_0x1b80d8(0x2,_0x459f9a[_0x4b3d97(0x243)])],_0x3f72c[_0x4b3d97(0x23b)]),Object[_0x4b3d97(0x1fa)](_0x3f72c,Symbol[_0x4b3d97(0x20d)],{'value':_0x4b3d97(0x24d)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.5",
3
+ "version": "0.10.6-experimental.20250903-f52e3bf",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.5",
49
- "@univerjs-pro/license": "0.10.5",
50
- "@univerjs/core": "0.10.5",
51
- "@univerjs/network": "0.10.5",
48
+ "@univerjs-pro/collaboration-client": "0.10.6-experimental.20250903-f52e3bf",
49
+ "@univerjs-pro/license": "0.10.6-experimental.20250903-f52e3bf",
50
+ "@univerjs/core": "0.10.6-experimental.20250903-f52e3bf",
51
+ "@univerjs/network": "0.10.6-experimental.20250903-f52e3bf",
52
52
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.10.5",
54
- "@univerjs/thread-comment-ui": "0.10.5"
53
+ "@univerjs/thread-comment-ui": "0.10.6-experimental.20250903-f52e3bf",
54
+ "@univerjs/thread-comment": "0.10.6-experimental.20250903-f52e3bf"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
- "typescript": "^5.8.3",
58
+ "typescript": "^5.9.2",
59
59
  "vite": "^7.1.3",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.5"
61
+ "@univerjs-infra/shared": "0.10.6"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",