@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504101607 → 0.6.10-nightly.202504111607

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 _0x39f221=_0x56d9;(function(_0x44f1e6,_0xbe3aaf){const _0x475966=_0x56d9,_0x59b39c=_0x44f1e6();while(!![]){try{const _0x284ed6=parseInt(_0x475966(0x13b))/0x1*(-parseInt(_0x475966(0x159))/0x2)+-parseInt(_0x475966(0x103))/0x3+-parseInt(_0x475966(0x154))/0x4*(parseInt(_0x475966(0x10d))/0x5)+parseInt(_0x475966(0x130))/0x6+-parseInt(_0x475966(0x167))/0x7*(parseInt(_0x475966(0x11e))/0x8)+parseInt(_0x475966(0x135))/0x9*(parseInt(_0x475966(0x101))/0xa)+parseInt(_0x475966(0xfd))/0xb;if(_0x284ed6===_0xbe3aaf)break;else _0x59b39c['push'](_0x59b39c['shift']());}catch(_0x21beab){_0x59b39c['push'](_0x59b39c['shift']());}}}(_0x38aa,0xb6e49));Object[_0x39f221(0xf1)](exports,Symbol[_0x39f221(0x13c)],{'value':_0x39f221(0x10e)});const b=require(_0x39f221(0x11f)),T=require(_0x39f221(0x12f)),c=require(_0x39f221(0x156)),j=require(_0x39f221(0xf2)),M=require(_0x39f221(0x10c)),w=require(_0x39f221(0x149)),P=require('@univerjs/network'),U=_0x39f221(0x12b);var I=(_0x15d6d2=>(_0x15d6d2[_0x15d6d2['OpenOrReOpen']=0x0]=_0x39f221(0x116),_0x15d6d2[_0x15d6d2['Solved']=0x1]=_0x39f221(0x155),_0x15d6d2[_0x15d6d2[_0x39f221(0x13a)]=-0x1]=_0x39f221(0x13a),_0x15d6d2))(I||{}),v=(_0x8ca559=>(_0x8ca559[_0x8ca559[_0x39f221(0x107)]=0x0]=_0x39f221(0x107),_0x8ca559[_0x8ca559['Add']=0x1]=_0x39f221(0x13f),_0x8ca559[_0x8ca559[_0x39f221(0x128)]=0x2]=_0x39f221(0x128),_0x8ca559[_0x8ca559['Edit']=0x3]='Edit',_0x8ca559[_0x8ca559[_0x39f221(0x100)]=0x4]=_0x39f221(0x100),_0x8ca559[_0x8ca559[_0x39f221(0x113)]=0x5]=_0x39f221(0x113),_0x8ca559[_0x8ca559[_0x39f221(0x13a)]=-0x1]=_0x39f221(0x13a),_0x8ca559))(v||{});const f=_0x5d9421=>c[_0x39f221(0x114)](new Date(+_0x5d9421))[_0x39f221(0x162)](_0x39f221(0x10b)),R=async(_0x57e9ed,_0xeab933)=>{const _0x253fe7=_0x39f221,_0x13d6da=_0x57e9ed[_0x253fe7(0x129)](c[_0x253fe7(0x11d)]),_0x28b9cc=_0x57e9ed[_0x253fe7(0x129)](P[_0x253fe7(0x14f)]);_0xeab933['forEach'](_0x56eb61=>{const _0x28877b=_0x253fe7;_0x13d6da[_0x28877b(0x104)](_0x56eb61)&&_0xeab933['delete'](_0x56eb61);}),_0xeab933[_0x253fe7(0x146)]&&(await _0x28b9cc[_0x253fe7(0x129)]('/universer-api/user/list',{'params':{'userIDs':[..._0xeab933]}}))[_0x253fe7(0xff)][_0x253fe7(0x158)][_0x253fe7(0x14d)](_0xb6df84=>{const _0x22569c=_0x253fe7;_0xb6df84&&_0x13d6da[_0x22569c(0xfb)](_0xb6df84);});};var $=Object[_0x39f221(0x14e)],E=(_0x1334dc,_0x2e06c9,_0xae0927,_0x298485)=>{const _0x36b6dd=_0x39f221;for(var _0x1c1df3=_0x298485>0x1?void 0x0:_0x298485?$(_0x2e06c9,_0xae0927):_0x2e06c9,_0x44ef39=_0x1334dc[_0x36b6dd(0x163)]-0x1,_0x318cf0;_0x44ef39>=0x0;_0x44ef39--)(_0x318cf0=_0x1334dc[_0x44ef39])&&(_0x1c1df3=_0x318cf0(_0x1c1df3)||_0x1c1df3);return _0x1c1df3;},S=(_0x358772,_0x58ddb7)=>(_0x476909,_0x3071b9)=>_0x58ddb7(_0x476909,_0x3071b9,_0x358772);let p=class extends c[_0x39f221(0x13d)]{constructor(_0x4d7665,_0xc3398c,_0x35fd32,_0x2586f3){const _0x3a641b=_0x39f221;super(),this['_commentService']=_0x4d7665,this['_threadCommentModel']=_0xc3398c,this[_0x3a641b(0xf8)]=_0x35fd32,this[_0x3a641b(0xfc)]=_0x2586f3,this[_0x3a641b(0x11b)](),this[_0x3a641b(0x148)]();}[_0x39f221(0x148)](){const _0x116667=_0x39f221;this['disposeWithMe'](this[_0x116667(0x126)]['commentUpdate$'][_0x116667(0x169)](w['bufferTime'](0x10))[_0x116667(0x121)](_0x121c1c=>{const _0x59bd8c=_0x116667,_0xa2d64a=new Set();_0x121c1c[_0x59bd8c(0x14d)](_0x21c045=>{const _0x46a717=_0x59bd8c;switch(_0x21c045['type']){case'add':{const _0x21fc99=_0x21c045[_0x46a717(0x140)]['personId'];_0xa2d64a[_0x46a717(0x164)](_0x21fc99);break;}}}),R(this[_0x59bd8c(0xfc)],_0xa2d64a);}));}[_0x39f221(0x11b)](){const _0x38c9fc=_0x39f221;this[_0x38c9fc(0x165)](this[_0x38c9fc(0x153)]['commentUpdate$'][_0x38c9fc(0x121)](async _0x287c2b=>{const _0x275ce5=_0x38c9fc;var _0x496f58,_0x9a5824,_0x4b1195,_0x3ab414;const _0x1ede09=(_0x496f58=this[_0x275ce5(0x126)][_0x275ce5(0xf0)](_0x287c2b['unitId'])[_0x275ce5(0x120)](_0x298f55=>_0x298f55[_0x275ce5(0x112)]===_0x287c2b[_0x275ce5(0x112)]))==null?void 0x0:_0x496f58['root'];if(!_0x1ede09)return;const {unitId:_0x57cf79,subUnitId:_0xc4ef69}=_0x1ede09;switch(_0x287c2b['user']&&this[_0x275ce5(0xf8)]['addUser'](_0x287c2b[_0x275ce5(0x12e)]),_0x287c2b[_0x275ce5(0x122)]){case v['Add']:break;case v[_0x275ce5(0x128)]:{this[_0x275ce5(0x126)][_0x275ce5(0x161)](_0x57cf79,_0xc4ef69,{'unitId':_0x57cf79,'subUnitId':_0xc4ef69,'ref':'','id':_0x287c2b[_0x275ce5(0x145)],'dT':f(+_0x287c2b['createTimestamp']),'threadId':_0x287c2b[_0x275ce5(0x112)],'personId':(_0x4b1195=(_0x9a5824=_0x287c2b[_0x275ce5(0x12e)])==null?void 0x0:_0x9a5824[_0x275ce5(0x106)])!=null?_0x4b1195:_0x287c2b[_0x275ce5(0x137)],'text':JSON[_0x275ce5(0x147)](_0x287c2b[_0x275ce5(0xf3)]),'parentId':_0x1ede09['id']});break;}case v['Delete']:{const _0x2d0471=this[_0x275ce5(0x126)][_0x275ce5(0x105)](_0x57cf79,_0xc4ef69,_0x287c2b[_0x275ce5(0x145)]);_0x2d0471&&_0x2d0471[_0x275ce5(0x151)]&&this['_threadCommentModel']['deleteComment'](_0x57cf79,_0xc4ef69,_0x287c2b['replyId']);break;}case v[_0x275ce5(0x109)]:{this[_0x275ce5(0x126)][_0x275ce5(0x108)](_0x57cf79,_0xc4ef69,{'commentId':_0x287c2b[_0x275ce5(0x145)],'text':JSON[_0x275ce5(0x147)](_0x287c2b['content'])});break;}case v[_0x275ce5(0x113)]:{const _0x262416=(_0x3ab414=this[_0x275ce5(0x126)]['getUnit'](_0x287c2b['unitId'])['find'](_0x206cb1=>_0x206cb1[_0x275ce5(0x112)]===_0x287c2b[_0x275ce5(0x112)]))==null?void 0x0:_0x3ab414['root'];_0x262416&&this[_0x275ce5(0x126)][_0x275ce5(0x11c)](_0x57cf79,_0xc4ef69,_0x262416['id'],_0x287c2b[_0x275ce5(0x138)]===I[_0x275ce5(0x155)]);break;}}}));}};p=E([S(0x0,c[_0x39f221(0x12c)](b[_0x39f221(0xf9)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x39f221(0x12c)](c[_0x39f221(0x11d)])),S(0x3,c['Inject'](c[_0x39f221(0x13e)]))],p);function _0x56d9(_0x5ba12a,_0x52611f){const _0x38aa70=_0x38aa();return _0x56d9=function(_0x56d98b,_0x5ce3e5){_0x56d98b=_0x56d98b-0xec;let _0x3d803e=_0x38aa70[_0x56d98b];return _0x3d803e;},_0x56d9(_0x5ba12a,_0x52611f);}const q=_0x39f221(0x12a),D={};var A=Object[_0x39f221(0x14e)],x=(_0x2ccd48,_0x59ce73,_0x4dda6c,_0x1c5989)=>{const _0xf8556a=_0x39f221;for(var _0x3fd018=_0x1c5989>0x1?void 0x0:_0x1c5989?A(_0x59ce73,_0x4dda6c):_0x59ce73,_0x4a8292=_0x2ccd48[_0xf8556a(0x163)]-0x1,_0x31637b;_0x4a8292>=0x0;_0x4a8292--)(_0x31637b=_0x2ccd48[_0x4a8292])&&(_0x3fd018=_0x31637b(_0x3fd018)||_0x3fd018);return _0x3fd018;},_=(_0x2d0694,_0x21bd45)=>(_0x203358,_0x1bd0ce)=>_0x21bd45(_0x203358,_0x1bd0ce,_0x2d0694);function Y(_0x531c58,_0x292dad){const _0x3375f9=_0x39f221,_0x4d0832=_0x531c58[_0x3375f9(0x115)][0x0];return{..._0x292dad,'id':_0x4d0832[_0x3375f9(0x145)],'resolved':_0x531c58[_0x3375f9(0x138)]===0x1,'dT':f(_0x4d0832[_0x3375f9(0x152)]),'personId':_0x4d0832[_0x3375f9(0x137)],'threadId':_0x4d0832['threadId']};}function _0x38aa(){const _0x416f94=['@univerjs-pro/license','1746690BfRQnk','/universer-api/comment/unit/','_threadCommentDataSource','/edit','/reply','27omYCNx','code','userId','solved','UniverThreadCommentDataSourcePlugin','UNRECOGNIZED','214449zcryYe','toStringTag','Disposable','Injector','Add','payload','CustomRangeType','getCurrentUser','stringify','_configService','replyId','size','parse','_initUserSync','rxjs','comments','symbol','getMemberID','forEach','getOwnPropertyDescriptor','HTTPService','filter','parentId','createTimestamp','_commentService','3676lSEzxI','Solved','@univerjs/core','post','users','2UAtslp','UniverThreadCommentUIPlugin','customRanges','UniverCollaborationClientPlugin','DependentOn','values','rangeId','Plugin','addComment','format','length','add','disposeWithMe','syncUpdateMutationToColla','91MvIKFR','setConfig','pipe','requireSession','map','onReady','onStarting','getUnit','defineProperty','@univerjs/thread-comment-ui','content','_initDataSource','pluginName','/add','_httpService','_userService','CommentService','_config','addUser','_injector','36483062GYFNpn','_threadCommentDataSourceService','body','Delete','895010OwAUfh','IConfigService','2215149KiuPMW','getUser','getComment','userID','Unknown','updateComment','Edit','IThreadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','4050VfGbGu','Module','rangeType','ref','deleteComment','threadId','Solve','dayjs','replies','OpenOrReOpen','comment','resolved','CollaborationSessionService','dataSource','_init','resolveComment','UserManagerService','879944uLURqa','@univerjs-pro/collaboration-client','find','subscribe','type','UNIVER_UNKNOWN','_sessionService','/list','_threadCommentModel','COMMENT','Reply','get','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Inject','error','user'];_0x38aa=function(){return _0x416f94;};return _0x38aa();}function G(_0x15c015,_0x159608,_0x3f54bf){const _0x6b5596=_0x39f221;var _0x42168f,_0x17d887;if(((_0x17d887=(_0x42168f=_0x15c015==null?void 0x0:_0x15c015[_0x6b5596(0x115)])==null?void 0x0:_0x42168f[_0x6b5596(0x163)])!=null?_0x17d887:0x0)>0x0){const _0x3d89f9=(_0x23c4da,_0x2ef9de)=>({'id':_0x23c4da[_0x6b5596(0x145)],'threadId':_0x23c4da['threadId'],'dT':f(_0x23c4da['createTimestamp']),'personId':_0x23c4da['userId'],'resolved':_0x15c015[_0x6b5596(0x138)]===I['Solved'],'unitId':_0x159608,'subUnitId':_0x3f54bf,'text':JSON[_0x6b5596(0x147)](_0x23c4da[_0x6b5596(0xf3)]),'parentId':_0x2ef9de}),_0x1e3438=_0x3d89f9(_0x15c015[_0x6b5596(0x115)][0x0]);return{..._0x1e3438,'children':_0x15c015[_0x6b5596(0x115)]['slice'](0x1)['map'](_0x1125b9=>_0x3d89f9(_0x1125b9,_0x1e3438['id']))};}return null;}let g=class{constructor(_0x414ff1,_0x521a60,_0x4a421d,_0x54ceeb){const _0x282d76=_0x39f221;this['_httpService']=_0x414ff1,this[_0x282d76(0xf8)]=_0x521a60,this['_sessionService']=_0x4a421d,this[_0x282d76(0xfc)]=_0x54ceeb;}async['addComment'](_0x42c36d){const _0x2027be=_0x39f221;var _0x3666fe,_0x3d7108;const {parentId:_0x12f05f,unitId:_0x4966ec,text:_0x4b29c9,threadId:_0x22eaef}=_0x42c36d,_0x33de0e=(_0x3d7108=(_0x3666fe=_0x4b29c9[_0x2027be(0x15b)])==null?void 0x0:_0x3666fe[_0x2027be(0x150)](_0x1ad9d7=>_0x1ad9d7[_0x2027be(0x10f)]===c['CustomRangeType'][_0x2027be(0x127)])[_0x2027be(0xed)](_0x1bd450=>_0x1bd450['rangeId']))!=null?_0x3d7108:[],_0x3cde65=JSON['stringify'](_0x4b29c9),_0x30b676=(await this[_0x2027be(0x124)]['requireSession'](_0x4966ec))[_0x2027be(0x14c)]();if(_0x12f05f){const _0x289171={'memberId':_0x30b676,'unitId':_0x4966ec,'content':_0x3cde65,'mention':_0x33de0e,'threadId':_0x22eaef},_0x4b7c89=(await this[_0x2027be(0xf7)][_0x2027be(0x157)](_0x2027be(0x131)+_0x4966ec+_0x2027be(0x134),{'body':_0x289171}))['body']['reply'];return{..._0x42c36d,'id':_0x4b7c89[_0x2027be(0x145)],'dT':c['dayjs'](+_0x4b7c89[_0x2027be(0x152)])['format'](_0x2027be(0x10b)),'personId':_0x4b7c89[_0x2027be(0x137)]};}else{const _0x1c90c4={'memberId':_0x30b676,'unitId':_0x4966ec,'content':_0x3cde65,'mention':_0x33de0e},_0x71ef62=await this['_httpService']['post'](_0x2027be(0x131)+_0x4966ec+_0x2027be(0xf6),{'body':_0x1c90c4});return Y(_0x71ef62[_0x2027be(0xff)][_0x2027be(0x117)],_0x42c36d);}}async['updateComment'](_0x183ca3){const _0x3abb45=_0x39f221;var _0x418b9b,_0x851cc4;const {text:_0x13cf21,unitId:_0x758326}=_0x183ca3,_0x4530a4=(_0x851cc4=(_0x418b9b=_0x13cf21[_0x3abb45(0x15b)])==null?void 0x0:_0x418b9b[_0x3abb45(0x150)](_0x4cb499=>_0x4cb499[_0x3abb45(0x10f)]===c[_0x3abb45(0x141)][_0x3abb45(0x127)])[_0x3abb45(0xed)](_0x10fae5=>_0x10fae5[_0x3abb45(0x15f)]))!=null?_0x851cc4:[],_0xd64523=JSON[_0x3abb45(0x143)](_0x13cf21),_0x3c305a=_0x183ca3[_0x3abb45(0x112)],_0x128436=_0x183ca3['id'],_0xc75719={'memberId':(await this[_0x3abb45(0x124)][_0x3abb45(0xec)](_0x758326))[_0x3abb45(0x14c)](),'unitId':_0x758326,'threadId':_0x3c305a,'mention':_0x4530a4,'content':_0xd64523,'replyId':_0x128436},_0x5cb3d5=await this[_0x3abb45(0xf7)]['post'](_0x3abb45(0x131)+_0x758326+_0x3abb45(0x133),{'body':_0xc75719});return!_0x5cb3d5['body']['error']||_0x5cb3d5['body'][_0x3abb45(0x12d)]['code']===0x1;}async['resolveComment'](_0x369700){const _0x1eb7b4=_0x39f221,{unitId:_0x3d91e9}=_0x369700,_0x23f53b=_0x369700['threadId'],_0x21c952={'memberId':this['_userService'][_0x1eb7b4(0x142)]()[_0x1eb7b4(0x106)],'unitId':_0x3d91e9,'threadId':_0x23f53b,'solved':_0x369700[_0x1eb7b4(0x118)]?I[_0x1eb7b4(0x155)]:I[_0x1eb7b4(0x116)]},_0x2b0d4f=await this[_0x1eb7b4(0xf7)][_0x1eb7b4(0x157)](_0x1eb7b4(0x131)+_0x3d91e9+'/solved',{'body':_0x21c952});return!_0x2b0d4f[_0x1eb7b4(0xff)][_0x1eb7b4(0x12d)]||_0x2b0d4f['body'][_0x1eb7b4(0x12d)][_0x1eb7b4(0x136)]===0x1;}async[_0x39f221(0x111)](_0x1b51ae,_0x4a3a11,_0x5314c7,_0x2a6925){const _0x2c949a=_0x39f221,_0x29d847={'memberId':(await this['_sessionService'][_0x2c949a(0xec)](_0x1b51ae))['getMemberID'](),'threadId':_0x5314c7,'replyId':_0x2a6925,'unitId':_0x1b51ae},_0x512cc4=await this[_0x2c949a(0xf7)][_0x2c949a(0x157)](_0x2c949a(0x131)+_0x1b51ae+'/delete',{'body':_0x29d847});return!_0x512cc4[_0x2c949a(0xff)]['error']||_0x512cc4[_0x2c949a(0xff)][_0x2c949a(0x12d)][_0x2c949a(0x136)]===0x1;}async['listComments'](_0x38c3ec,_0x569a4b,_0x4c2409){const _0x485b1a=_0x39f221,_0x39c76f={'unitId':_0x38c3ec,'threadId':_0x4c2409},_0xfe1d56=await this['_httpService']['post'](_0x485b1a(0x131)+_0x38c3ec+_0x485b1a(0x125),{'body':_0x39c76f}),_0x115f17=_0x4c2409[_0x485b1a(0xed)](_0x54c8c3=>G(_0xfe1d56[_0x485b1a(0xff)][_0x485b1a(0x14a)][_0x54c8c3],_0x38c3ec,_0x569a4b))[_0x485b1a(0x150)](Boolean);return Object[_0x485b1a(0x15e)](_0xfe1d56['body'][_0x485b1a(0x158)])[_0x485b1a(0x14d)](_0x512e93=>{const _0x3b8021=_0x485b1a;this['_userService'][_0x3b8021(0xfb)](_0x512e93);}),_0x115f17;}['saveCommentToSnapshot'](_0x484aae){const _0x35d573=_0x39f221;return{'id':_0x484aae['id'],'threadId':_0x484aae[_0x35d573(0x112)],'ref':_0x484aae[_0x35d573(0x110)]};}};g=x([_(0x0,c[_0x39f221(0x12c)](P[_0x39f221(0x14f)])),_(0x1,c[_0x39f221(0x12c)](c[_0x39f221(0x11d)])),_(0x2,c[_0x39f221(0x12c)](b[_0x39f221(0x119)])),_(0x3,c['Inject'](c[_0x39f221(0x13e)]))],g);var H=Object[_0x39f221(0x14e)],J=(_0x3a9b2b,_0x4d2c61,_0x596afa,_0x238ac7)=>{const _0x24d46b=_0x39f221;for(var _0x5eca14=_0x238ac7>0x1?void 0x0:_0x238ac7?H(_0x4d2c61,_0x596afa):_0x4d2c61,_0x31a7bc=_0x3a9b2b[_0x24d46b(0x163)]-0x1,_0x5a6b71;_0x31a7bc>=0x0;_0x31a7bc--)(_0x5a6b71=_0x3a9b2b[_0x31a7bc])&&(_0x5eca14=_0x5a6b71(_0x5eca14)||_0x5eca14);return _0x5eca14;},y=(_0x5f3ef5,_0xdb4da1)=>(_0x5e6a90,_0xb4a9b0)=>_0xdb4da1(_0x5e6a90,_0xb4a9b0,_0x5f3ef5);let C=class extends c[_0x39f221(0x13d)]{constructor(_0x1eb359,_0x348717){const _0x3c5a22=_0x39f221;super(),this[_0x3c5a22(0xfe)]=_0x1eb359,this[_0x3c5a22(0x132)]=_0x348717,this[_0x3c5a22(0xf4)]();}[_0x39f221(0xf4)](){const _0x371ed0=_0x39f221;this['_threadCommentDataSourceService'][_0x371ed0(0x11a)]=this['_threadCommentDataSource'],this[_0x371ed0(0xfe)][_0x371ed0(0x166)]=!0x1;}};C=J([y(0x0,M[_0x39f221(0x10a)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x39f221(0xf1)],L=Object[_0x39f221(0x14e)],Z=(_0x3bdf85,_0x2eeb01,_0x34a7d1)=>_0x2eeb01 in _0x3bdf85?F(_0x3bdf85,_0x2eeb01,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x34a7d1}):_0x3bdf85[_0x2eeb01]=_0x34a7d1,W=(_0x2e9fde,_0xf880d5,_0x412c3b,_0x2239b0)=>{const _0x27cd38=_0x39f221;for(var _0x1c98e2=_0x2239b0>0x1?void 0x0:_0x2239b0?L(_0xf880d5,_0x412c3b):_0xf880d5,_0x109cfd=_0x2e9fde[_0x27cd38(0x163)]-0x1,_0x3211ee;_0x109cfd>=0x0;_0x109cfd--)(_0x3211ee=_0x2e9fde[_0x109cfd])&&(_0x1c98e2=_0x3211ee(_0x1c98e2)||_0x1c98e2);return _0x1c98e2;},O=(_0x3baae9,_0x58ee53)=>(_0x59843b,_0x3d9ae6)=>_0x58ee53(_0x59843b,_0x3d9ae6,_0x3baae9),N=(_0x406d41,_0x3872b1,_0x1baf63)=>Z(_0x406d41,typeof _0x3872b1!=_0x39f221(0x14b)?_0x3872b1+'':_0x3872b1,_0x1baf63);exports[_0x39f221(0x139)]=class extends c[_0x39f221(0x160)]{constructor(_0x5b5d8f=D,_0x199ca3,_0x5287b6){const _0x1ec04f=_0x39f221;super(),this[_0x1ec04f(0xfa)]=_0x5b5d8f,this[_0x1ec04f(0xfc)]=_0x199ca3,this[_0x1ec04f(0x144)]=_0x5287b6;const {..._0x36c0ba}=c['merge']({},D,this[_0x1ec04f(0xfa)]);this[_0x1ec04f(0x144)][_0x1ec04f(0x168)](q,_0x36c0ba);}[_0x39f221(0xef)](){const _0xbcdf1e=_0x39f221;[[g],[C],[p]][_0xbcdf1e(0x14d)](_0x51e3ad=>{const _0x147d13=_0xbcdf1e;this['_injector'][_0x147d13(0x164)](_0x51e3ad);});}[_0x39f221(0xee)](){const _0x531dda=_0x39f221;this[_0x531dda(0xfc)][_0x531dda(0x129)](C),this[_0x531dda(0xfc)][_0x531dda(0x129)](p);}},N(exports[_0x39f221(0x139)],_0x39f221(0xf5),U),N(exports[_0x39f221(0x139)],_0x39f221(0x122),c['UniverInstanceType'][_0x39f221(0x123)]),exports[_0x39f221(0x139)]=W([c[_0x39f221(0x15d)](j[_0x39f221(0x15a)],b[_0x39f221(0x15c)],T['UniverLicensePlugin']),O(0x1,c[_0x39f221(0x12c)](c[_0x39f221(0x13e)])),O(0x2,c[_0x39f221(0x102)])],exports[_0x39f221(0x139)]);
1
+ 'use strict';const _0x1d12b1=_0x3b88;(function(_0x3e879e,_0x25054c){const _0x595dbf=_0x3b88,_0x47e9eb=_0x3e879e();while(!![]){try{const _0x564a42=-parseInt(_0x595dbf(0x108))/0x1*(-parseInt(_0x595dbf(0x107))/0x2)+-parseInt(_0x595dbf(0xfa))/0x3*(-parseInt(_0x595dbf(0xb2))/0x4)+parseInt(_0x595dbf(0xb6))/0x5*(parseInt(_0x595dbf(0xbb))/0x6)+-parseInt(_0x595dbf(0x111))/0x7*(-parseInt(_0x595dbf(0xa7))/0x8)+-parseInt(_0x595dbf(0xd1))/0x9+-parseInt(_0x595dbf(0x11a))/0xa+parseInt(_0x595dbf(0xdd))/0xb*(-parseInt(_0x595dbf(0xde))/0xc);if(_0x564a42===_0x25054c)break;else _0x47e9eb['push'](_0x47e9eb['shift']());}catch(_0x186f56){_0x47e9eb['push'](_0x47e9eb['shift']());}}}(_0x5a03,0xc57d7));Object['defineProperty'](exports,Symbol[_0x1d12b1(0x10b)],{'value':'Module'});const b=require(_0x1d12b1(0xb7)),T=require(_0x1d12b1(0x105)),c=require(_0x1d12b1(0xa8)),j=require(_0x1d12b1(0xb3)),M=require(_0x1d12b1(0x10c)),w=require(_0x1d12b1(0xbf)),P=require(_0x1d12b1(0xfb)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x27413e=>(_0x27413e[_0x27413e[_0x1d12b1(0xdb)]=0x0]=_0x1d12b1(0xdb),_0x27413e[_0x27413e[_0x1d12b1(0xf9)]=0x1]=_0x1d12b1(0xf9),_0x27413e[_0x27413e[_0x1d12b1(0xc3)]=-0x1]=_0x1d12b1(0xc3),_0x27413e))(I||{}),v=(_0x437955=>(_0x437955[_0x437955[_0x1d12b1(0xd2)]=0x0]=_0x1d12b1(0xd2),_0x437955[_0x437955[_0x1d12b1(0xd3)]=0x1]=_0x1d12b1(0xd3),_0x437955[_0x437955[_0x1d12b1(0xff)]=0x2]='Reply',_0x437955[_0x437955[_0x1d12b1(0x10e)]=0x3]=_0x1d12b1(0x10e),_0x437955[_0x437955['Delete']=0x4]='Delete',_0x437955[_0x437955[_0x1d12b1(0xa6)]=0x5]=_0x1d12b1(0xa6),_0x437955[_0x437955[_0x1d12b1(0xc3)]=-0x1]=_0x1d12b1(0xc3),_0x437955))(v||{});const f=_0x726d6a=>c[_0x1d12b1(0xdf)](new Date(+_0x726d6a))[_0x1d12b1(0xa5)](_0x1d12b1(0xb8)),R=async(_0x10407b,_0x5e9f6c)=>{const _0x665b9c=_0x1d12b1,_0x11c2ee=_0x10407b[_0x665b9c(0xcf)](c[_0x665b9c(0xe5)]),_0x3428c3=_0x10407b[_0x665b9c(0xcf)](P['HTTPService']);_0x5e9f6c[_0x665b9c(0xc4)](_0x2a6676=>{const _0xde2e87=_0x665b9c;_0x11c2ee[_0xde2e87(0x9e)](_0x2a6676)&&_0x5e9f6c[_0xde2e87(0x104)](_0x2a6676);}),_0x5e9f6c[_0x665b9c(0x101)]&&(await _0x3428c3['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5e9f6c]}}))['body'][_0x665b9c(0x11b)][_0x665b9c(0xc4)](_0xf1fb4=>{const _0x417758=_0x665b9c;_0xf1fb4&&_0x11c2ee[_0x417758(0xda)](_0xf1fb4);});};var $=Object[_0x1d12b1(0xf8)],E=(_0xa7ad2b,_0x2835c9,_0xb3ef18,_0x2d97f1)=>{const _0x2965bb=_0x1d12b1;for(var _0xfef901=_0x2d97f1>0x1?void 0x0:_0x2d97f1?$(_0x2835c9,_0xb3ef18):_0x2835c9,_0x457559=_0xa7ad2b[_0x2965bb(0xcd)]-0x1,_0x25d095;_0x457559>=0x0;_0x457559--)(_0x25d095=_0xa7ad2b[_0x457559])&&(_0xfef901=_0x25d095(_0xfef901)||_0xfef901);return _0xfef901;},S=(_0x1156a4,_0x3df10c)=>(_0x262b2e,_0x50199c)=>_0x3df10c(_0x262b2e,_0x50199c,_0x1156a4);let p=class extends c[_0x1d12b1(0xa2)]{constructor(_0x11d9d8,_0x5293e1,_0x5f47c3,_0x191c16){const _0x30256d=_0x1d12b1;super(),this[_0x30256d(0xe6)]=_0x11d9d8,this[_0x30256d(0xab)]=_0x5293e1,this[_0x30256d(0x11d)]=_0x5f47c3,this[_0x30256d(0xad)]=_0x191c16,this['_init'](),this['_initUserSync']();}[_0x1d12b1(0xf1)](){const _0x26ce0f=_0x1d12b1;this['disposeWithMe'](this[_0x26ce0f(0xab)]['commentUpdate$'][_0x26ce0f(0x114)](w[_0x26ce0f(0x115)](0x10))[_0x26ce0f(0xbc)](_0x5707e1=>{const _0x1438af=new Set();_0x5707e1['forEach'](_0xd9458f=>{const _0x37870d=_0x3b88;switch(_0xd9458f[_0x37870d(0xd0)]){case _0x37870d(0xd4):{const _0x3fed5f=_0xd9458f[_0x37870d(0x10d)]['personId'];_0x1438af[_0x37870d(0xd4)](_0x3fed5f);break;}}}),R(this['_injector'],_0x1438af);}));}[_0x1d12b1(0xd9)](){const _0x22534f=_0x1d12b1;this[_0x22534f(0xfd)](this[_0x22534f(0xe6)][_0x22534f(0xc8)][_0x22534f(0xbc)](async _0x79ea64=>{const _0x5a55dd=_0x22534f;var _0x1dfb80,_0x1c7d57,_0x3fd1e0,_0x36180c;const _0x4712e4=(_0x1dfb80=this[_0x5a55dd(0xab)]['getUnit'](_0x79ea64[_0x5a55dd(0xb5)])['find'](_0x5e8486=>_0x5e8486[_0x5a55dd(0x113)]===_0x79ea64['threadId']))==null?void 0x0:_0x1dfb80[_0x5a55dd(0xe1)];if(!_0x4712e4)return;const {unitId:_0x189872,subUnitId:_0x32e7c4}=_0x4712e4;switch(_0x79ea64[_0x5a55dd(0xf3)]&&this[_0x5a55dd(0x11d)][_0x5a55dd(0xda)](_0x79ea64[_0x5a55dd(0xf3)]),_0x79ea64[_0x5a55dd(0xd0)]){case v[_0x5a55dd(0xd3)]:break;case v[_0x5a55dd(0xff)]:{this['_threadCommentModel'][_0x5a55dd(0xe0)](_0x189872,_0x32e7c4,{'unitId':_0x189872,'subUnitId':_0x32e7c4,'ref':'','id':_0x79ea64[_0x5a55dd(0xd8)],'dT':f(+_0x79ea64['createTimestamp']),'threadId':_0x79ea64[_0x5a55dd(0x113)],'personId':(_0x3fd1e0=(_0x1c7d57=_0x79ea64[_0x5a55dd(0xf3)])==null?void 0x0:_0x1c7d57[_0x5a55dd(0xd6)])!=null?_0x3fd1e0:_0x79ea64[_0x5a55dd(0xfc)],'text':JSON['parse'](_0x79ea64[_0x5a55dd(0xcc)]),'parentId':_0x4712e4['id']});break;}case v[_0x5a55dd(0x10f)]:{const _0x2870ba=this[_0x5a55dd(0xab)][_0x5a55dd(0xc7)](_0x189872,_0x32e7c4,_0x79ea64['replyId']);_0x2870ba&&_0x2870ba['parentId']&&this[_0x5a55dd(0xab)][_0x5a55dd(0x117)](_0x189872,_0x32e7c4,_0x79ea64[_0x5a55dd(0xd8)]);break;}case v[_0x5a55dd(0x10e)]:{this[_0x5a55dd(0xab)][_0x5a55dd(0xb1)](_0x189872,_0x32e7c4,{'commentId':_0x79ea64[_0x5a55dd(0xd8)],'text':JSON[_0x5a55dd(0xc2)](_0x79ea64['content'])});break;}case v[_0x5a55dd(0xa6)]:{const _0x2e25a1=(_0x36180c=this['_threadCommentModel'][_0x5a55dd(0x112)](_0x79ea64[_0x5a55dd(0xb5)])[_0x5a55dd(0xf7)](_0x486363=>_0x486363['threadId']===_0x79ea64[_0x5a55dd(0x113)]))==null?void 0x0:_0x36180c[_0x5a55dd(0xe1)];_0x2e25a1&&this[_0x5a55dd(0xab)][_0x5a55dd(0xe9)](_0x189872,_0x32e7c4,_0x2e25a1['id'],_0x79ea64['solved']===I[_0x5a55dd(0xf9)]);break;}}}));}};p=E([S(0x0,c[_0x1d12b1(0xef)](b[_0x1d12b1(0xb4)])),S(0x1,c['Inject'](M[_0x1d12b1(0x103)])),S(0x2,c[_0x1d12b1(0xef)](c['UserManagerService'])),S(0x3,c[_0x1d12b1(0xef)](c[_0x1d12b1(0xca)]))],p);const q=_0x1d12b1(0x11c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x675dd0,_0x4605c6,_0x159d57,_0x25961b)=>{const _0x59d72b=_0x1d12b1;for(var _0x3ec62a=_0x25961b>0x1?void 0x0:_0x25961b?A(_0x4605c6,_0x159d57):_0x4605c6,_0x55fc79=_0x675dd0[_0x59d72b(0xcd)]-0x1,_0x19f791;_0x55fc79>=0x0;_0x55fc79--)(_0x19f791=_0x675dd0[_0x55fc79])&&(_0x3ec62a=_0x19f791(_0x3ec62a)||_0x3ec62a);return _0x3ec62a;},_=(_0x1c6d33,_0xe669d1)=>(_0x4f784a,_0x5aa3ae)=>_0xe669d1(_0x4f784a,_0x5aa3ae,_0x1c6d33);function Y(_0x27d56d,_0x109042){const _0x43d0b9=_0x1d12b1,_0x1a62fc=_0x27d56d[_0x43d0b9(0xf4)][0x0];return{..._0x109042,'id':_0x1a62fc[_0x43d0b9(0xd8)],'resolved':_0x27d56d[_0x43d0b9(0xd5)]===0x1,'dT':f(_0x1a62fc[_0x43d0b9(0x102)]),'personId':_0x1a62fc[_0x43d0b9(0xfc)],'threadId':_0x1a62fc[_0x43d0b9(0x113)]};}function _0x3b88(_0x4fca49,_0x3060ca){const _0x5a03e3=_0x5a03();return _0x3b88=function(_0x3b8823,_0x1c31e7){_0x3b8823=_0x3b8823-0x9d;let _0x13ba47=_0x5a03e3[_0x3b8823];return _0x13ba47;},_0x3b88(_0x4fca49,_0x3060ca);}function G(_0x3c9a21,_0x4477ad,_0xf34a43){const _0x1c644a=_0x1d12b1;var _0x23879f,_0x26e718;if(((_0x26e718=(_0x23879f=_0x3c9a21==null?void 0x0:_0x3c9a21[_0x1c644a(0xf4)])==null?void 0x0:_0x23879f['length'])!=null?_0x26e718:0x0)>0x0){const _0x453c16=(_0x141fae,_0x7f0dc1)=>({'id':_0x141fae[_0x1c644a(0xd8)],'threadId':_0x141fae[_0x1c644a(0x113)],'dT':f(_0x141fae[_0x1c644a(0x102)]),'personId':_0x141fae[_0x1c644a(0xfc)],'resolved':_0x3c9a21[_0x1c644a(0xd5)]===I[_0x1c644a(0xf9)],'unitId':_0x4477ad,'subUnitId':_0xf34a43,'text':JSON[_0x1c644a(0xc2)](_0x141fae[_0x1c644a(0xcc)]),'parentId':_0x7f0dc1}),_0x2f9e8c=_0x453c16(_0x3c9a21[_0x1c644a(0xf4)][0x0]);return{..._0x2f9e8c,'children':_0x3c9a21['replies'][_0x1c644a(0xdc)](0x1)['map'](_0x1d2562=>_0x453c16(_0x1d2562,_0x2f9e8c['id']))};}return null;}let g=class{constructor(_0x4bd198,_0xd23516,_0x4cec9e,_0x229055){const _0x59bee2=_0x1d12b1;this[_0x59bee2(0xbe)]=_0x4bd198,this[_0x59bee2(0x11d)]=_0xd23516,this[_0x59bee2(0x121)]=_0x4cec9e,this[_0x59bee2(0xad)]=_0x229055;}async[_0x1d12b1(0xe0)](_0x2fe4ef){const _0x3f0079=_0x1d12b1;var _0xb40b1f,_0x2c8916;const {parentId:_0x34ceec,unitId:_0x3ddafe,text:_0x120117,threadId:_0x11fd04}=_0x2fe4ef,_0x658176=(_0x2c8916=(_0xb40b1f=_0x120117[_0x3f0079(0x119)])==null?void 0x0:_0xb40b1f[_0x3f0079(0xa0)](_0x9bd55b=>_0x9bd55b[_0x3f0079(0xce)]===c[_0x3f0079(0xe4)][_0x3f0079(0xa9)])[_0x3f0079(0xfe)](_0x44d8df=>_0x44d8df['rangeId']))!=null?_0x2c8916:[],_0x3cf016=JSON[_0x3f0079(0xc1)](_0x120117),_0x3fa94b=(await this[_0x3f0079(0x121)][_0x3f0079(0xf6)](_0x3ddafe))[_0x3f0079(0xed)]();if(_0x34ceec){const _0x201feb={'memberId':_0x3fa94b,'unitId':_0x3ddafe,'content':_0x3cf016,'mention':_0x658176,'threadId':_0x11fd04},_0x5901b4=(await this[_0x3f0079(0xbe)]['post']('/universer-api/comment/unit/'+_0x3ddafe+_0x3f0079(0xe2),{'body':_0x201feb}))[_0x3f0079(0xea)][_0x3f0079(0x10a)];return{..._0x2fe4ef,'id':_0x5901b4[_0x3f0079(0xd8)],'dT':c[_0x3f0079(0xdf)](+_0x5901b4['createTimestamp'])[_0x3f0079(0xa5)](_0x3f0079(0xb8)),'personId':_0x5901b4[_0x3f0079(0xfc)]};}else{const _0x40f7c7={'memberId':_0x3fa94b,'unitId':_0x3ddafe,'content':_0x3cf016,'mention':_0x658176},_0x2acd20=await this[_0x3f0079(0xbe)][_0x3f0079(0xe7)]('/universer-api/comment/unit/'+_0x3ddafe+_0x3f0079(0xa4),{'body':_0x40f7c7});return Y(_0x2acd20[_0x3f0079(0xea)]['comment'],_0x2fe4ef);}}async[_0x1d12b1(0xb1)](_0x5efb64){const _0x3e9076=_0x1d12b1;var _0x46c88e,_0x29a3b7;const {text:_0x1b36b0,unitId:_0x137f01}=_0x5efb64,_0x338122=(_0x29a3b7=(_0x46c88e=_0x1b36b0['customRanges'])==null?void 0x0:_0x46c88e[_0x3e9076(0xa0)](_0x2d191d=>_0x2d191d[_0x3e9076(0xce)]===c[_0x3e9076(0xe4)]['COMMENT'])[_0x3e9076(0xfe)](_0x31d205=>_0x31d205[_0x3e9076(0x120)]))!=null?_0x29a3b7:[],_0x19beb9=JSON[_0x3e9076(0xc1)](_0x1b36b0),_0x2a4b0c=_0x5efb64[_0x3e9076(0x113)],_0x393b37=_0x5efb64['id'],_0x38ed11={'memberId':(await this['_sessionService'][_0x3e9076(0xf6)](_0x137f01))[_0x3e9076(0xed)](),'unitId':_0x137f01,'threadId':_0x2a4b0c,'mention':_0x338122,'content':_0x19beb9,'replyId':_0x393b37},_0x9ce6d5=await this[_0x3e9076(0xbe)][_0x3e9076(0xe7)](_0x3e9076(0xec)+_0x137f01+_0x3e9076(0xa3),{'body':_0x38ed11});return!_0x9ce6d5[_0x3e9076(0xea)][_0x3e9076(0x106)]||_0x9ce6d5[_0x3e9076(0xea)]['error'][_0x3e9076(0x9f)]===0x1;}async[_0x1d12b1(0xe9)](_0x27ce7a){const _0x59224b=_0x1d12b1,{unitId:_0x4caab9}=_0x27ce7a,_0x54b232=_0x27ce7a[_0x59224b(0x113)],_0x426016={'memberId':this[_0x59224b(0x11d)][_0x59224b(0xc9)]()[_0x59224b(0xd6)],'unitId':_0x4caab9,'threadId':_0x54b232,'solved':_0x27ce7a[_0x59224b(0xaa)]?I[_0x59224b(0xf9)]:I[_0x59224b(0xdb)]},_0x465c97=await this[_0x59224b(0xbe)]['post'](_0x59224b(0xec)+_0x4caab9+_0x59224b(0xb0),{'body':_0x426016});return!_0x465c97['body'][_0x59224b(0x106)]||_0x465c97[_0x59224b(0xea)][_0x59224b(0x106)][_0x59224b(0x9f)]===0x1;}async['deleteComment'](_0x303485,_0x383cdd,_0x45c1ae,_0x43b6db){const _0x3fab2c=_0x1d12b1,_0x128904={'memberId':(await this[_0x3fab2c(0x121)][_0x3fab2c(0xf6)](_0x303485))[_0x3fab2c(0xed)](),'threadId':_0x45c1ae,'replyId':_0x43b6db,'unitId':_0x303485},_0x5a2589=await this[_0x3fab2c(0xbe)][_0x3fab2c(0xe7)](_0x3fab2c(0xec)+_0x303485+_0x3fab2c(0xaf),{'body':_0x128904});return!_0x5a2589['body']['error']||_0x5a2589[_0x3fab2c(0xea)][_0x3fab2c(0x106)][_0x3fab2c(0x9f)]===0x1;}async[_0x1d12b1(0xc0)](_0x109012,_0x5772ab,_0x5441e6){const _0xd6470c=_0x1d12b1,_0x4f9281={'unitId':_0x109012,'threadId':_0x5441e6},_0x614733=await this[_0xd6470c(0xbe)][_0xd6470c(0xe7)](_0xd6470c(0xec)+_0x109012+_0xd6470c(0xd7),{'body':_0x4f9281}),_0x11b180=_0x5441e6['map'](_0x315dbd=>G(_0x614733[_0xd6470c(0xea)]['comments'][_0x315dbd],_0x109012,_0x5772ab))[_0xd6470c(0xa0)](Boolean);return Object[_0xd6470c(0x122)](_0x614733[_0xd6470c(0xea)]['users'])[_0xd6470c(0xc4)](_0x540301=>{const _0x5cf38f=_0xd6470c;this[_0x5cf38f(0x11d)][_0x5cf38f(0xda)](_0x540301);}),_0x11b180;}[_0x1d12b1(0xeb)](_0x10079e){const _0x3fc5cb=_0x1d12b1;return{'id':_0x10079e['id'],'threadId':_0x10079e['threadId'],'ref':_0x10079e[_0x3fc5cb(0xf0)]};}};function _0x5a03(){const _0x12b2e9=['getCurrentUser','Injector','Plugin','content','length','rangeType','get','type','6928929zUHwRd','Unknown','Add','add','solved','userID','/list','replyId','_init','addUser','OpenOrReOpen','slice','14043007beiCUF','12AVyjep','dayjs','addComment','root','/reply','HTTPService','CustomRangeType','UserManagerService','_commentService','post','onReady','resolveComment','body','saveCommentToSnapshot','/universer-api/comment/unit/','getMemberID','UniverLicensePlugin','Inject','ref','_initUserSync','defineProperty','user','replies','_config','requireSession','find','getOwnPropertyDescriptor','Solved','6MKhola','@univerjs/network','userId','disposeWithMe','map','Reply','merge','size','createTimestamp','ThreadCommentModel','delete','@univerjs-pro/license','error','14zVtWAM','134839ioYjQV','syncUpdateMutationToColla','reply','toStringTag','@univerjs/thread-comment','payload','Edit','Delete','_threadCommentDataSourceService','3297rwzAgm','getUnit','threadId','pipe','bufferTime','pluginName','deleteComment','IConfigService','customRanges','6513060jEqVXG','users','thread-comment-data-source.config','_userService','_configService','onStarting','rangeId','_sessionService','values','UNIVER_UNKNOWN','getUser','code','filter','UniverInstanceType','Disposable','/edit','/add','format','Solve','22160rdjLZk','@univerjs/core','COMMENT','resolved','_threadCommentModel','_initDataSource','_injector','UniverCollaborationClientPlugin','/delete','/solved','updateComment','1574608TjKJDV','@univerjs/thread-comment-ui','CommentService','unitId','588620OitlBp','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','setConfig','CollaborationSessionService','24sBuRsJ','subscribe','UniverThreadCommentDataSourcePlugin','_httpService','rxjs','listComments','stringify','parse','UNRECOGNIZED','forEach','DependentOn','UniverThreadCommentUIPlugin','getComment','commentUpdate$'];_0x5a03=function(){return _0x12b2e9;};return _0x5a03();}g=x([_(0x0,c['Inject'](P[_0x1d12b1(0xe3)])),_(0x1,c[_0x1d12b1(0xef)](c[_0x1d12b1(0xe5)])),_(0x2,c[_0x1d12b1(0xef)](b[_0x1d12b1(0xba)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x1d12b1(0xf8)],J=(_0x47825d,_0x92816f,_0xe12f07,_0x58239f)=>{for(var _0x4d441b=_0x58239f>0x1?void 0x0:_0x58239f?H(_0x92816f,_0xe12f07):_0x92816f,_0x351e7b=_0x47825d['length']-0x1,_0x2d5be5;_0x351e7b>=0x0;_0x351e7b--)(_0x2d5be5=_0x47825d[_0x351e7b])&&(_0x4d441b=_0x2d5be5(_0x4d441b)||_0x4d441b);return _0x4d441b;},y=(_0x33af69,_0x9ca7e6)=>(_0x37a25e,_0x1a95cf)=>_0x9ca7e6(_0x37a25e,_0x1a95cf,_0x33af69);let C=class extends c[_0x1d12b1(0xa2)]{constructor(_0x4bfc00,_0x1ff00a){super(),this['_threadCommentDataSourceService']=_0x4bfc00,this['_threadCommentDataSource']=_0x1ff00a,this['_initDataSource']();}[_0x1d12b1(0xac)](){const _0x321a8d=_0x1d12b1;this[_0x321a8d(0x110)]['dataSource']=this['_threadCommentDataSource'],this[_0x321a8d(0x110)][_0x321a8d(0x109)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1d12b1(0xef)](g))],C);var F=Object[_0x1d12b1(0xf2)],L=Object[_0x1d12b1(0xf8)],Z=(_0x8caa85,_0x22f4f1,_0x3cce45)=>_0x22f4f1 in _0x8caa85?F(_0x8caa85,_0x22f4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cce45}):_0x8caa85[_0x22f4f1]=_0x3cce45,W=(_0x19adee,_0x3058ec,_0x447437,_0x4c369a)=>{const _0x5bf11f=_0x1d12b1;for(var _0x38654b=_0x4c369a>0x1?void 0x0:_0x4c369a?L(_0x3058ec,_0x447437):_0x3058ec,_0x321b78=_0x19adee[_0x5bf11f(0xcd)]-0x1,_0x4542b0;_0x321b78>=0x0;_0x321b78--)(_0x4542b0=_0x19adee[_0x321b78])&&(_0x38654b=_0x4542b0(_0x38654b)||_0x38654b);return _0x38654b;},O=(_0x3cc668,_0x11444f)=>(_0x55715c,_0x33c181)=>_0x11444f(_0x55715c,_0x33c181,_0x3cc668),N=(_0x866490,_0x29885b,_0x16c696)=>Z(_0x866490,typeof _0x29885b!='symbol'?_0x29885b+'':_0x29885b,_0x16c696);exports[_0x1d12b1(0xbd)]=class extends c[_0x1d12b1(0xcb)]{constructor(_0x56c1a7=D,_0x18d25e,_0x38fe61){const _0x1b94d2=_0x1d12b1;super(),this['_config']=_0x56c1a7,this['_injector']=_0x18d25e,this[_0x1b94d2(0x11e)]=_0x38fe61;const {..._0x59387a}=c[_0x1b94d2(0x100)]({},D,this[_0x1b94d2(0xf5)]);this[_0x1b94d2(0x11e)][_0x1b94d2(0xb9)](q,_0x59387a);}[_0x1d12b1(0x11f)](){const _0x19af26=_0x1d12b1;[[g],[C],[p]][_0x19af26(0xc4)](_0x226d7a=>{const _0x55ad95=_0x19af26;this['_injector'][_0x55ad95(0xd4)](_0x226d7a);});}[_0x1d12b1(0xe8)](){const _0x5eff65=_0x1d12b1;this[_0x5eff65(0xad)][_0x5eff65(0xcf)](C),this['_injector'][_0x5eff65(0xcf)](p);}},N(exports[_0x1d12b1(0xbd)],_0x1d12b1(0x116),U),N(exports[_0x1d12b1(0xbd)],'type',c[_0x1d12b1(0xa1)][_0x1d12b1(0x9d)]),exports[_0x1d12b1(0xbd)]=W([c[_0x1d12b1(0xc5)](j[_0x1d12b1(0xc6)],b[_0x1d12b1(0xae)],T[_0x1d12b1(0xee)]),O(0x1,c['Inject'](c[_0x1d12b1(0xca)])),O(0x2,c[_0x1d12b1(0x118)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x250c37=_0x3209;(function(_0x38c6a3,_0x27cf70){const _0x50a111=_0x3209,_0x1d05cd=_0x38c6a3();while(!![]){try{const _0x3c2d7a=parseInt(_0x50a111(0x226))/0x1*(parseInt(_0x50a111(0x1da))/0x2)+-parseInt(_0x50a111(0x1d1))/0x3*(-parseInt(_0x50a111(0x1d5))/0x4)+-parseInt(_0x50a111(0x1dc))/0x5*(-parseInt(_0x50a111(0x1de))/0x6)+-parseInt(_0x50a111(0x22f))/0x7+parseInt(_0x50a111(0x1d6))/0x8+parseInt(_0x50a111(0x229))/0x9+parseInt(_0x50a111(0x1d2))/0xa*(-parseInt(_0x50a111(0x1e2))/0xb);if(_0x3c2d7a===_0x27cf70)break;else _0x1d05cd['push'](_0x1d05cd['shift']());}catch(_0x3d6605){_0x1d05cd['push'](_0x1d05cd['shift']());}}}(_0x1a94,0x20f02));import{CommentService as _0x5f5413,CollaborationSessionService as _0x3789a0,UniverCollaborationClientPlugin as _0x1cdb0e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xbfd596}from'@univerjs-pro/license';import{dayjs as _0x359d28,UserManagerService as _0x4a2855,Inject as _0x2eead0,Injector as _0x56143a,Disposable as _0x40c5ab,CustomRangeType as _0x15a14a,UniverInstanceType as _0x65f626,DependentOn as _0x29d9a1,IConfigService as _0x48d952,Plugin as _0x5d11df,merge as _0x8d2716}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4a5fa9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53c82a,IThreadCommentDataSourceService as _0x500676}from'@univerjs/thread-comment';import{bufferTime as _0x273417}from'rxjs';import{HTTPService as _0x145491}from'@univerjs/network';const W=_0x250c37(0x1e1);var I=(_0x4ad229=>(_0x4ad229[_0x4ad229['OpenOrReOpen']=0x0]=_0x250c37(0x214),_0x4ad229[_0x4ad229[_0x250c37(0x1d3)]=0x1]=_0x250c37(0x1d3),_0x4ad229[_0x4ad229[_0x250c37(0x21a)]=-0x1]=_0x250c37(0x21a),_0x4ad229))(I||{}),v=(_0x522eb7=>(_0x522eb7[_0x522eb7['Unknown']=0x0]=_0x250c37(0x1d4),_0x522eb7[_0x522eb7['Add']=0x1]=_0x250c37(0x219),_0x522eb7[_0x522eb7[_0x250c37(0x1f6)]=0x2]=_0x250c37(0x1f6),_0x522eb7[_0x522eb7[_0x250c37(0x1ce)]=0x3]=_0x250c37(0x1ce),_0x522eb7[_0x522eb7[_0x250c37(0x20c)]=0x4]=_0x250c37(0x20c),_0x522eb7[_0x522eb7[_0x250c37(0x1cf)]=0x5]=_0x250c37(0x1cf),_0x522eb7[_0x522eb7[_0x250c37(0x21a)]=-0x1]=_0x250c37(0x21a),_0x522eb7))(v||{});const D=_0x1ead83=>_0x359d28(new Date(+_0x1ead83))[_0x250c37(0x222)](_0x250c37(0x1fb)),B=async(_0x2c0810,_0x344830)=>{const _0x9be845=_0x250c37,_0x2b6d99=_0x2c0810[_0x9be845(0x1f7)](_0x4a2855),_0x209d23=_0x2c0810[_0x9be845(0x1f7)](_0x145491);_0x344830['forEach'](_0x42ff63=>{const _0x56e806=_0x9be845;_0x2b6d99[_0x56e806(0x1cc)](_0x42ff63)&&_0x344830[_0x56e806(0x20d)](_0x42ff63);}),_0x344830[_0x9be845(0x1e9)]&&(await _0x209d23[_0x9be845(0x1f7)](_0x9be845(0x227),{'params':{'userIDs':[..._0x344830]}}))[_0x9be845(0x1ca)][_0x9be845(0x1e5)][_0x9be845(0x1d9)](_0x22beea=>{const _0x3714b9=_0x9be845;_0x22beea&&_0x2b6d99[_0x3714b9(0x201)](_0x22beea);});};function _0x1a94(){const _0x4b6f3d=['reply','_config','Delete','delete','getOwnPropertyDescriptor','error','requireSession','dataSource','deleteComment','/reply','OpenOrReOpen','onReady','comment','/universer-api/comment/unit/','resolved','Add','UNRECOGNIZED','_injector','/delete','unitId','parentId','disposeWithMe','payload','root','format','_threadCommentDataSourceService','rangeId','addComment','177iNOUDZ','/universer-api/user/list','_sessionService','501480BZopPV','values','length','code','solved','_commentService','1391747gLvaMk','commentUpdate$','body','parse','getUser','add','Edit','Solve','subscribe','24VDaMsl','210MRKaTf','Solved','Unknown','77432nkCBVZ','34992HiHums','userId','resolveComment','forEach','570GaRYDx','updateComment','5mKuiIC','thread-comment-data-source.config','813570eokdzA','_httpService','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','35233zgeLRv','_init','replies','users','map','_userService','_threadCommentDataSource','size','post','/edit','slice','getComment','userID','createTimestamp','type','filter','ref','pluginName','defineProperty','getMemberID','Reply','get','content','saveCommentToSnapshot','_configService','YYYY/MM/DD\x20HH:mm','/solved','replyId','getUnit','user','/add','addUser','threadId','onStarting','COMMENT','stringify','symbol','rangeType','_initUserSync','customRanges'];_0x1a94=function(){return _0x4b6f3d;};return _0x1a94();}var K=Object[_0x250c37(0x20e)],V=(_0x3e8f14,_0x2fada9,_0x132522,_0x3af55f)=>{const _0x25d619=_0x250c37;for(var _0x34f07e=_0x3af55f>0x1?void 0x0:_0x3af55f?K(_0x2fada9,_0x132522):_0x2fada9,_0x2aa05e=_0x3e8f14[_0x25d619(0x22b)]-0x1,_0x151eb0;_0x2aa05e>=0x0;_0x2aa05e--)(_0x151eb0=_0x3e8f14[_0x2aa05e])&&(_0x34f07e=_0x151eb0(_0x34f07e)||_0x34f07e);return _0x34f07e;},p=(_0x568fbc,_0x59e94c)=>(_0x370b4d,_0x160125)=>_0x59e94c(_0x370b4d,_0x160125,_0x568fbc);let S=class extends _0x40c5ab{constructor(_0x4c1c37,_0x4e8384,_0x55505d,_0x4b42cf){const _0x3423f8=_0x250c37;super(),this[_0x3423f8(0x22e)]=_0x4c1c37,this['_threadCommentModel']=_0x4e8384,this[_0x3423f8(0x1e7)]=_0x55505d,this[_0x3423f8(0x21b)]=_0x4b42cf,this[_0x3423f8(0x1e3)](),this[_0x3423f8(0x208)]();}[_0x250c37(0x208)](){const _0x4a2b5c=_0x250c37;this['disposeWithMe'](this[_0x4a2b5c(0x1e0)][_0x4a2b5c(0x1c9)]['pipe'](_0x273417(0x10))[_0x4a2b5c(0x1d0)](_0x2ecd35=>{const _0x2711eb=_0x4a2b5c,_0x9baa56=new Set();_0x2ecd35[_0x2711eb(0x1d9)](_0x5d071e=>{const _0x33eaba=_0x2711eb;switch(_0x5d071e[_0x33eaba(0x1f0)]){case _0x33eaba(0x1cd):{const _0x4d9eb1=_0x5d071e[_0x33eaba(0x220)]['personId'];_0x9baa56[_0x33eaba(0x1cd)](_0x4d9eb1);break;}}}),B(this[_0x2711eb(0x21b)],_0x9baa56);}));}[_0x250c37(0x1e3)](){const _0x11cd69=_0x250c37;this[_0x11cd69(0x21f)](this[_0x11cd69(0x22e)][_0x11cd69(0x1c9)][_0x11cd69(0x1d0)](async _0x24f3f2=>{const _0x2e8054=_0x11cd69;var _0x5f1438,_0x27ea77,_0xceaac0,_0x48b868;const _0x17f898=(_0x5f1438=this[_0x2e8054(0x1e0)][_0x2e8054(0x1fe)](_0x24f3f2['unitId'])['find'](_0x11d879=>_0x11d879['threadId']===_0x24f3f2[_0x2e8054(0x202)]))==null?void 0x0:_0x5f1438[_0x2e8054(0x221)];if(!_0x17f898)return;const {unitId:_0x17b4c1,subUnitId:_0x378ac6}=_0x17f898;switch(_0x24f3f2['user']&&this['_userService'][_0x2e8054(0x201)](_0x24f3f2['user']),_0x24f3f2[_0x2e8054(0x1f0)]){case v[_0x2e8054(0x219)]:break;case v['Reply']:{this[_0x2e8054(0x1e0)][_0x2e8054(0x225)](_0x17b4c1,_0x378ac6,{'unitId':_0x17b4c1,'subUnitId':_0x378ac6,'ref':'','id':_0x24f3f2[_0x2e8054(0x1fd)],'dT':D(+_0x24f3f2[_0x2e8054(0x1ef)]),'threadId':_0x24f3f2[_0x2e8054(0x202)],'personId':(_0xceaac0=(_0x27ea77=_0x24f3f2[_0x2e8054(0x1ff)])==null?void 0x0:_0x27ea77['userID'])!=null?_0xceaac0:_0x24f3f2[_0x2e8054(0x1d7)],'text':JSON[_0x2e8054(0x1cb)](_0x24f3f2[_0x2e8054(0x1f8)]),'parentId':_0x17f898['id']});break;}case v[_0x2e8054(0x20c)]:{const _0x1de473=this[_0x2e8054(0x1e0)][_0x2e8054(0x1ed)](_0x17b4c1,_0x378ac6,_0x24f3f2[_0x2e8054(0x1fd)]);_0x1de473&&_0x1de473[_0x2e8054(0x21e)]&&this[_0x2e8054(0x1e0)][_0x2e8054(0x212)](_0x17b4c1,_0x378ac6,_0x24f3f2[_0x2e8054(0x1fd)]);break;}case v[_0x2e8054(0x1ce)]:{this[_0x2e8054(0x1e0)][_0x2e8054(0x1db)](_0x17b4c1,_0x378ac6,{'commentId':_0x24f3f2[_0x2e8054(0x1fd)],'text':JSON[_0x2e8054(0x1cb)](_0x24f3f2[_0x2e8054(0x1f8)])});break;}case v[_0x2e8054(0x1cf)]:{const _0x19dbec=(_0x48b868=this[_0x2e8054(0x1e0)]['getUnit'](_0x24f3f2[_0x2e8054(0x21d)])['find'](_0x14a50a=>_0x14a50a[_0x2e8054(0x202)]===_0x24f3f2[_0x2e8054(0x202)]))==null?void 0x0:_0x48b868[_0x2e8054(0x221)];_0x19dbec&&this['_threadCommentModel']['resolveComment'](_0x17b4c1,_0x378ac6,_0x19dbec['id'],_0x24f3f2[_0x2e8054(0x22d)]===I[_0x2e8054(0x1d3)]);break;}}}));}};S=V([p(0x0,_0x2eead0(_0x5f5413)),p(0x1,_0x2eead0(_0x53c82a)),p(0x2,_0x2eead0(_0x4a2855)),p(0x3,_0x2eead0(_0x56143a))],S);const z=_0x250c37(0x1dd),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x24a661,_0x5f1a36,_0x43a7a2,_0x559730)=>{const _0x2eb08b=_0x250c37;for(var _0x11b85e=_0x559730>0x1?void 0x0:_0x559730?k(_0x5f1a36,_0x43a7a2):_0x5f1a36,_0x68aaa5=_0x24a661[_0x2eb08b(0x22b)]-0x1,_0x2ab012;_0x68aaa5>=0x0;_0x68aaa5--)(_0x2ab012=_0x24a661[_0x68aaa5])&&(_0x11b85e=_0x2ab012(_0x11b85e)||_0x11b85e);return _0x11b85e;},_=(_0x1d3ce8,_0x53d3df)=>(_0x210e6e,_0x5cce19)=>_0x53d3df(_0x210e6e,_0x5cce19,_0x1d3ce8);function X(_0x1e992a,_0x4fe8ab){const _0x17c720=_0x250c37,_0x2a8d6e=_0x1e992a[_0x17c720(0x1e4)][0x0];return{..._0x4fe8ab,'id':_0x2a8d6e[_0x17c720(0x1fd)],'resolved':_0x1e992a['solved']===0x1,'dT':D(_0x2a8d6e[_0x17c720(0x1ef)]),'personId':_0x2a8d6e[_0x17c720(0x1d7)],'threadId':_0x2a8d6e[_0x17c720(0x202)]};}function ee(_0x10be29,_0x677aee,_0x33aac2){const _0x4f1976=_0x250c37;var _0x22e0e2,_0x53c98a;if(((_0x53c98a=(_0x22e0e2=_0x10be29==null?void 0x0:_0x10be29['replies'])==null?void 0x0:_0x22e0e2[_0x4f1976(0x22b)])!=null?_0x53c98a:0x0)>0x0){const _0x31a617=(_0x466f34,_0x34fe82)=>({'id':_0x466f34[_0x4f1976(0x1fd)],'threadId':_0x466f34['threadId'],'dT':D(_0x466f34[_0x4f1976(0x1ef)]),'personId':_0x466f34[_0x4f1976(0x1d7)],'resolved':_0x10be29[_0x4f1976(0x22d)]===I[_0x4f1976(0x1d3)],'unitId':_0x677aee,'subUnitId':_0x33aac2,'text':JSON['parse'](_0x466f34[_0x4f1976(0x1f8)]),'parentId':_0x34fe82}),_0x991c06=_0x31a617(_0x10be29[_0x4f1976(0x1e4)][0x0]);return{..._0x991c06,'children':_0x10be29[_0x4f1976(0x1e4)][_0x4f1976(0x1ec)](0x1)[_0x4f1976(0x1e6)](_0x521240=>_0x31a617(_0x521240,_0x991c06['id']))};}return null;}let f=class{constructor(_0x561b55,_0x27ccea,_0x53ab02,_0x1c7476){const _0x1e2fc4=_0x250c37;this['_httpService']=_0x561b55,this['_userService']=_0x27ccea,this[_0x1e2fc4(0x228)]=_0x53ab02,this[_0x1e2fc4(0x21b)]=_0x1c7476;}async[_0x250c37(0x225)](_0x221db2){const _0x443a5f=_0x250c37;var _0x1dfa6f,_0xc4a4af;const {parentId:_0x3319ef,unitId:_0x5b3f1c,text:_0x97d340,threadId:_0x41c646}=_0x221db2,_0x123a30=(_0xc4a4af=(_0x1dfa6f=_0x97d340[_0x443a5f(0x209)])==null?void 0x0:_0x1dfa6f[_0x443a5f(0x1f1)](_0x1dac73=>_0x1dac73[_0x443a5f(0x207)]===_0x15a14a[_0x443a5f(0x204)])[_0x443a5f(0x1e6)](_0x5cc819=>_0x5cc819[_0x443a5f(0x224)]))!=null?_0xc4a4af:[],_0x1d153e=JSON['stringify'](_0x97d340),_0x2a2acb=(await this[_0x443a5f(0x228)][_0x443a5f(0x210)](_0x5b3f1c))[_0x443a5f(0x1f5)]();if(_0x3319ef){const _0x4ae67d={'memberId':_0x2a2acb,'unitId':_0x5b3f1c,'content':_0x1d153e,'mention':_0x123a30,'threadId':_0x41c646},_0xa2a63f=(await this[_0x443a5f(0x1df)][_0x443a5f(0x1ea)]('/universer-api/comment/unit/'+_0x5b3f1c+_0x443a5f(0x213),{'body':_0x4ae67d}))[_0x443a5f(0x1ca)][_0x443a5f(0x20a)];return{..._0x221db2,'id':_0xa2a63f[_0x443a5f(0x1fd)],'dT':_0x359d28(+_0xa2a63f[_0x443a5f(0x1ef)])[_0x443a5f(0x222)](_0x443a5f(0x1fb)),'personId':_0xa2a63f[_0x443a5f(0x1d7)]};}else{const _0x51276a={'memberId':_0x2a2acb,'unitId':_0x5b3f1c,'content':_0x1d153e,'mention':_0x123a30},_0x5e6a58=await this['_httpService']['post'](_0x443a5f(0x217)+_0x5b3f1c+_0x443a5f(0x200),{'body':_0x51276a});return X(_0x5e6a58[_0x443a5f(0x1ca)][_0x443a5f(0x216)],_0x221db2);}}async[_0x250c37(0x1db)](_0x5ce98b){const _0x567303=_0x250c37;var _0x1a2514,_0x5a8e3c;const {text:_0x2c771c,unitId:_0x320085}=_0x5ce98b,_0x191436=(_0x5a8e3c=(_0x1a2514=_0x2c771c[_0x567303(0x209)])==null?void 0x0:_0x1a2514['filter'](_0x278069=>_0x278069[_0x567303(0x207)]===_0x15a14a[_0x567303(0x204)])['map'](_0x51f28e=>_0x51f28e[_0x567303(0x224)]))!=null?_0x5a8e3c:[],_0x257582=JSON[_0x567303(0x205)](_0x2c771c),_0x1913c7=_0x5ce98b[_0x567303(0x202)],_0x2c9b81=_0x5ce98b['id'],_0x5e003f={'memberId':(await this['_sessionService'][_0x567303(0x210)](_0x320085))[_0x567303(0x1f5)](),'unitId':_0x320085,'threadId':_0x1913c7,'mention':_0x191436,'content':_0x257582,'replyId':_0x2c9b81},_0x59e8e1=await this['_httpService'][_0x567303(0x1ea)](_0x567303(0x217)+_0x320085+_0x567303(0x1eb),{'body':_0x5e003f});return!_0x59e8e1['body'][_0x567303(0x20f)]||_0x59e8e1[_0x567303(0x1ca)][_0x567303(0x20f)][_0x567303(0x22c)]===0x1;}async[_0x250c37(0x1d8)](_0x293b2c){const _0x1f2549=_0x250c37,{unitId:_0x22f479}=_0x293b2c,_0x501a0c=_0x293b2c[_0x1f2549(0x202)],_0x283d78={'memberId':this['_userService']['getCurrentUser']()[_0x1f2549(0x1ee)],'unitId':_0x22f479,'threadId':_0x501a0c,'solved':_0x293b2c[_0x1f2549(0x218)]?I[_0x1f2549(0x1d3)]:I[_0x1f2549(0x214)]},_0x5ec2b6=await this[_0x1f2549(0x1df)][_0x1f2549(0x1ea)](_0x1f2549(0x217)+_0x22f479+_0x1f2549(0x1fc),{'body':_0x283d78});return!_0x5ec2b6[_0x1f2549(0x1ca)][_0x1f2549(0x20f)]||_0x5ec2b6[_0x1f2549(0x1ca)][_0x1f2549(0x20f)][_0x1f2549(0x22c)]===0x1;}async[_0x250c37(0x212)](_0x343588,_0x473d18,_0x2c01d1,_0x1a67dc){const _0x14ee07=_0x250c37,_0x4b5706={'memberId':(await this[_0x14ee07(0x228)][_0x14ee07(0x210)](_0x343588))['getMemberID'](),'threadId':_0x2c01d1,'replyId':_0x1a67dc,'unitId':_0x343588},_0x545853=await this[_0x14ee07(0x1df)]['post'](_0x14ee07(0x217)+_0x343588+_0x14ee07(0x21c),{'body':_0x4b5706});return!_0x545853[_0x14ee07(0x1ca)]['error']||_0x545853[_0x14ee07(0x1ca)]['error'][_0x14ee07(0x22c)]===0x1;}async['listComments'](_0x55fb4e,_0x22ad27,_0x3cc1d0){const _0x54477d=_0x250c37,_0x458299={'unitId':_0x55fb4e,'threadId':_0x3cc1d0},_0x263b0f=await this['_httpService'][_0x54477d(0x1ea)](_0x54477d(0x217)+_0x55fb4e+'/list',{'body':_0x458299}),_0x37d851=_0x3cc1d0[_0x54477d(0x1e6)](_0x47e6cb=>ee(_0x263b0f[_0x54477d(0x1ca)]['comments'][_0x47e6cb],_0x55fb4e,_0x22ad27))[_0x54477d(0x1f1)](Boolean);return Object[_0x54477d(0x22a)](_0x263b0f[_0x54477d(0x1ca)]['users'])[_0x54477d(0x1d9)](_0x137718=>{const _0x29dd17=_0x54477d;this[_0x29dd17(0x1e7)][_0x29dd17(0x201)](_0x137718);}),_0x37d851;}[_0x250c37(0x1f9)](_0x34b686){const _0x3c4b14=_0x250c37;return{'id':_0x34b686['id'],'threadId':_0x34b686['threadId'],'ref':_0x34b686[_0x3c4b14(0x1f2)]};}};f=Q([_(0x0,_0x2eead0(_0x145491)),_(0x1,_0x2eead0(_0x4a2855)),_(0x2,_0x2eead0(_0x3789a0)),_(0x3,_0x2eead0(_0x56143a))],f);var re=Object[_0x250c37(0x20e)],te=(_0x27d50f,_0x5efad5,_0x3d447c,_0xf5bd92)=>{const _0x28be17=_0x250c37;for(var _0x4830c4=_0xf5bd92>0x1?void 0x0:_0xf5bd92?re(_0x5efad5,_0x3d447c):_0x5efad5,_0xb0aafa=_0x27d50f[_0x28be17(0x22b)]-0x1,_0x31117a;_0xb0aafa>=0x0;_0xb0aafa--)(_0x31117a=_0x27d50f[_0xb0aafa])&&(_0x4830c4=_0x31117a(_0x4830c4)||_0x4830c4);return _0x4830c4;},N=(_0x56bed4,_0x2edec8)=>(_0xbc1593,_0x27193d)=>_0x2edec8(_0xbc1593,_0x27193d,_0x56bed4);let g=class extends _0x40c5ab{constructor(_0x5d355f,_0x55079f){const _0x42869a=_0x250c37;super(),this[_0x42869a(0x223)]=_0x5d355f,this[_0x42869a(0x1e8)]=_0x55079f,this['_initDataSource']();}['_initDataSource'](){const _0x3608b1=_0x250c37;this[_0x3608b1(0x223)][_0x3608b1(0x211)]=this[_0x3608b1(0x1e8)],this[_0x3608b1(0x223)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x500676),N(0x1,_0x2eead0(f))],g);var se=Object[_0x250c37(0x1f4)],oe=Object[_0x250c37(0x20e)],ne=(_0xfa9f90,_0x1534ee,_0x360c15)=>_0x1534ee in _0xfa9f90?se(_0xfa9f90,_0x1534ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x360c15}):_0xfa9f90[_0x1534ee]=_0x360c15,ie=(_0x5e727c,_0x16fe4a,_0x35441e,_0x4de2ae)=>{const _0x373daf=_0x250c37;for(var _0x44c96f=_0x4de2ae>0x1?void 0x0:_0x4de2ae?oe(_0x16fe4a,_0x35441e):_0x16fe4a,_0x47bbf8=_0x5e727c[_0x373daf(0x22b)]-0x1,_0x2b5e32;_0x47bbf8>=0x0;_0x47bbf8--)(_0x2b5e32=_0x5e727c[_0x47bbf8])&&(_0x44c96f=_0x2b5e32(_0x44c96f)||_0x44c96f);return _0x44c96f;},w=(_0x4bcf94,_0xc55283)=>(_0x534c95,_0x2720aa)=>_0xc55283(_0x534c95,_0x2720aa,_0x4bcf94),$=(_0x1db9b1,_0x44db92,_0x4aa499)=>ne(_0x1db9b1,typeof _0x44db92!=_0x250c37(0x206)?_0x44db92+'':_0x44db92,_0x4aa499);let b=class extends _0x5d11df{constructor(_0x432bd0=M,_0x381ce5,_0x2014c2){const _0x32fb91=_0x250c37;super(),this[_0x32fb91(0x20b)]=_0x432bd0,this[_0x32fb91(0x21b)]=_0x381ce5,this[_0x32fb91(0x1fa)]=_0x2014c2;const {..._0x1d5f35}=_0x8d2716({},M,this['_config']);this[_0x32fb91(0x1fa)]['setConfig'](z,_0x1d5f35);}[_0x250c37(0x203)](){const _0x1223bf=_0x250c37;[[f],[g],[S]][_0x1223bf(0x1d9)](_0x329722=>{const _0x5a943b=_0x1223bf;this[_0x5a943b(0x21b)][_0x5a943b(0x1cd)](_0x329722);});}[_0x250c37(0x215)](){const _0x33b8f7=_0x250c37;this['_injector'][_0x33b8f7(0x1f7)](g),this[_0x33b8f7(0x21b)]['get'](S);}};$(b,_0x250c37(0x1f3),W),$(b,_0x250c37(0x1f0),_0x65f626['UNIVER_UNKNOWN']),b=ie([_0x29d9a1(_0x4a5fa9,_0x1cdb0e,_0xbfd596),w(0x1,_0x2eead0(_0x56143a)),w(0x2,_0x48d952)],b);function _0x3209(_0xa639e3,_0x543c53){const _0x1a9434=_0x1a94();return _0x3209=function(_0x3209c0,_0x24ca37){_0x3209c0=_0x3209c0-0x1c9;let _0x1ca39f=_0x1a9434[_0x3209c0];return _0x1ca39f;},_0x3209(_0xa639e3,_0x543c53);}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xcdfce=_0x2004;(function(_0x1daad5,_0x10d4cd){const _0x4650d3=_0x2004,_0x347d08=_0x1daad5();while(!![]){try{const _0x196bce=parseInt(_0x4650d3(0x1eb))/0x1+-parseInt(_0x4650d3(0x212))/0x2*(-parseInt(_0x4650d3(0x1df))/0x3)+parseInt(_0x4650d3(0x209))/0x4+-parseInt(_0x4650d3(0x1e2))/0x5+-parseInt(_0x4650d3(0x1e5))/0x6*(parseInt(_0x4650d3(0x201))/0x7)+parseInt(_0x4650d3(0x208))/0x8+-parseInt(_0x4650d3(0x1e9))/0x9;if(_0x196bce===_0x10d4cd)break;else _0x347d08['push'](_0x347d08['shift']());}catch(_0x3be08d){_0x347d08['push'](_0x347d08['shift']());}}}(_0x329f,0xd8f5d));import{CommentService as _0x53178a,CollaborationSessionService as _0x7ba2fe,UniverCollaborationClientPlugin as _0x2b8655}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5194f4}from'@univerjs-pro/license';import{dayjs as _0x22b8fb,UserManagerService as _0x425e2e,Inject as _0x1e713f,Injector as _0x597a1b,Disposable as _0xe54b50,CustomRangeType as _0x276b42,UniverInstanceType as _0x2464a3,DependentOn as _0xdde362,IConfigService as _0x35e2d6,Plugin as _0x268aaa,merge as _0x3fd75f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa80b49}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9d6255,IThreadCommentDataSourceService as _0x3a21e7}from'@univerjs/thread-comment';import{bufferTime as _0x429795}from'rxjs';import{HTTPService as _0x5bc95d}from'@univerjs/network';const W=_0xcdfce(0x202);var I=(_0x8320cf=>(_0x8320cf[_0x8320cf['OpenOrReOpen']=0x0]=_0xcdfce(0x1fe),_0x8320cf[_0x8320cf[_0xcdfce(0x1fc)]=0x1]=_0xcdfce(0x1fc),_0x8320cf[_0x8320cf[_0xcdfce(0x1d2)]=-0x1]=_0xcdfce(0x1d2),_0x8320cf))(I||{}),v=(_0x41678d=>(_0x41678d[_0x41678d['Unknown']=0x0]='Unknown',_0x41678d[_0x41678d[_0xcdfce(0x1ee)]=0x1]='Add',_0x41678d[_0x41678d['Reply']=0x2]='Reply',_0x41678d[_0x41678d[_0xcdfce(0x1f4)]=0x3]=_0xcdfce(0x1f4),_0x41678d[_0x41678d[_0xcdfce(0x1f1)]=0x4]='Delete',_0x41678d[_0x41678d[_0xcdfce(0x21b)]=0x5]=_0xcdfce(0x21b),_0x41678d[_0x41678d['UNRECOGNIZED']=-0x1]=_0xcdfce(0x1d2),_0x41678d))(v||{});const D=_0x93ec66=>_0x22b8fb(new Date(+_0x93ec66))[_0xcdfce(0x1f0)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x5c655a,_0x53acaa)=>{const _0x7b7045=_0xcdfce,_0x808a08=_0x5c655a[_0x7b7045(0x228)](_0x425e2e),_0x30dab2=_0x5c655a['get'](_0x5bc95d);_0x53acaa[_0x7b7045(0x214)](_0x50a02b=>{_0x808a08['getUser'](_0x50a02b)&&_0x53acaa['delete'](_0x50a02b);}),_0x53acaa['size']&&(await _0x30dab2[_0x7b7045(0x228)](_0x7b7045(0x22b),{'params':{'userIDs':[..._0x53acaa]}}))[_0x7b7045(0x1d8)][_0x7b7045(0x1d1)][_0x7b7045(0x214)](_0x261c79=>{const _0x9d5c5b=_0x7b7045;_0x261c79&&_0x808a08[_0x9d5c5b(0x20d)](_0x261c79);});};var K=Object[_0xcdfce(0x226)],V=(_0x5e3a8a,_0xacfc2e,_0x6b7f2f,_0x4c1455)=>{const _0x146e42=_0xcdfce;for(var _0x18a984=_0x4c1455>0x1?void 0x0:_0x4c1455?K(_0xacfc2e,_0x6b7f2f):_0xacfc2e,_0x105807=_0x5e3a8a[_0x146e42(0x225)]-0x1,_0x1a21e4;_0x105807>=0x0;_0x105807--)(_0x1a21e4=_0x5e3a8a[_0x105807])&&(_0x18a984=_0x1a21e4(_0x18a984)||_0x18a984);return _0x18a984;},p=(_0x3e3fa5,_0x15e0be)=>(_0x48c963,_0x3fb625)=>_0x15e0be(_0x48c963,_0x3fb625,_0x3e3fa5);let S=class extends _0xe54b50{constructor(_0x13334d,_0x12c1bd,_0x5b2acf,_0x9fee5e){const _0x261743=_0xcdfce;super(),this[_0x261743(0x22f)]=_0x13334d,this[_0x261743(0x221)]=_0x12c1bd,this[_0x261743(0x204)]=_0x5b2acf,this[_0x261743(0x1db)]=_0x9fee5e,this[_0x261743(0x211)](),this[_0x261743(0x21d)]();}[_0xcdfce(0x21d)](){const _0x8ec1ff=_0xcdfce;this[_0x8ec1ff(0x1d4)](this[_0x8ec1ff(0x221)][_0x8ec1ff(0x1e6)]['pipe'](_0x429795(0x10))['subscribe'](_0x3a4d25=>{const _0xb458dc=_0x8ec1ff,_0x4f4c04=new Set();_0x3a4d25[_0xb458dc(0x214)](_0x14dfb9=>{const _0x4b5a3f=_0xb458dc;switch(_0x14dfb9[_0x4b5a3f(0x1e0)]){case _0x4b5a3f(0x1f6):{const _0x531a28=_0x14dfb9[_0x4b5a3f(0x1f9)][_0x4b5a3f(0x1dd)];_0x4f4c04[_0x4b5a3f(0x1f6)](_0x531a28);break;}}}),B(this['_injector'],_0x4f4c04);}));}[_0xcdfce(0x211)](){const _0x422892=_0xcdfce;this[_0x422892(0x1d4)](this[_0x422892(0x22f)][_0x422892(0x1e6)]['subscribe'](async _0x142bf3=>{const _0x3e2152=_0x422892;var _0x31dbef,_0x18780c,_0x2487f1,_0x15a59d;const _0x182b80=(_0x31dbef=this[_0x3e2152(0x221)][_0x3e2152(0x233)](_0x142bf3[_0x3e2152(0x227)])[_0x3e2152(0x205)](_0x18ac39=>_0x18ac39['threadId']===_0x142bf3[_0x3e2152(0x1d9)]))==null?void 0x0:_0x31dbef[_0x3e2152(0x1e8)];if(!_0x182b80)return;const {unitId:_0x45b559,subUnitId:_0xfee62a}=_0x182b80;switch(_0x142bf3[_0x3e2152(0x1d3)]&&this[_0x3e2152(0x204)][_0x3e2152(0x20d)](_0x142bf3[_0x3e2152(0x1d3)]),_0x142bf3[_0x3e2152(0x1e0)]){case v[_0x3e2152(0x1ee)]:break;case v[_0x3e2152(0x1e4)]:{this[_0x3e2152(0x221)][_0x3e2152(0x1fa)](_0x45b559,_0xfee62a,{'unitId':_0x45b559,'subUnitId':_0xfee62a,'ref':'','id':_0x142bf3['replyId'],'dT':D(+_0x142bf3['createTimestamp']),'threadId':_0x142bf3['threadId'],'personId':(_0x2487f1=(_0x18780c=_0x142bf3['user'])==null?void 0x0:_0x18780c['userID'])!=null?_0x2487f1:_0x142bf3[_0x3e2152(0x1fb)],'text':JSON['parse'](_0x142bf3['content']),'parentId':_0x182b80['id']});break;}case v[_0x3e2152(0x1f1)]:{const _0x57974d=this[_0x3e2152(0x221)][_0x3e2152(0x1da)](_0x45b559,_0xfee62a,_0x142bf3[_0x3e2152(0x1d6)]);_0x57974d&&_0x57974d[_0x3e2152(0x21c)]&&this[_0x3e2152(0x221)]['deleteComment'](_0x45b559,_0xfee62a,_0x142bf3['replyId']);break;}case v[_0x3e2152(0x1f4)]:{this['_threadCommentModel'][_0x3e2152(0x218)](_0x45b559,_0xfee62a,{'commentId':_0x142bf3['replyId'],'text':JSON['parse'](_0x142bf3[_0x3e2152(0x1ff)])});break;}case v[_0x3e2152(0x21b)]:{const _0x5d6840=(_0x15a59d=this[_0x3e2152(0x221)]['getUnit'](_0x142bf3[_0x3e2152(0x227)])[_0x3e2152(0x205)](_0x4c13e7=>_0x4c13e7[_0x3e2152(0x1d9)]===_0x142bf3[_0x3e2152(0x1d9)]))==null?void 0x0:_0x15a59d[_0x3e2152(0x1e8)];_0x5d6840&&this[_0x3e2152(0x221)][_0x3e2152(0x230)](_0x45b559,_0xfee62a,_0x5d6840['id'],_0x142bf3['solved']===I[_0x3e2152(0x1fc)]);break;}}}));}};S=V([p(0x0,_0x1e713f(_0x53178a)),p(0x1,_0x1e713f(_0x9d6255)),p(0x2,_0x1e713f(_0x425e2e)),p(0x3,_0x1e713f(_0x597a1b))],S);const z=_0xcdfce(0x20f),M={};var k=Object[_0xcdfce(0x226)],Q=(_0x44a117,_0x56de9c,_0x305163,_0x4a49b3)=>{const _0x2b8736=_0xcdfce;for(var _0x11b068=_0x4a49b3>0x1?void 0x0:_0x4a49b3?k(_0x56de9c,_0x305163):_0x56de9c,_0xc10edb=_0x44a117[_0x2b8736(0x225)]-0x1,_0x4f3086;_0xc10edb>=0x0;_0xc10edb--)(_0x4f3086=_0x44a117[_0xc10edb])&&(_0x11b068=_0x4f3086(_0x11b068)||_0x11b068);return _0x11b068;},_=(_0x4f6f7c,_0x511b50)=>(_0x1a6c78,_0x50602f)=>_0x511b50(_0x1a6c78,_0x50602f,_0x4f6f7c);function X(_0x57c2f5,_0x3bab99){const _0x32042b=_0xcdfce,_0x58bdeb=_0x57c2f5[_0x32042b(0x232)][0x0];return{..._0x3bab99,'id':_0x58bdeb[_0x32042b(0x1d6)],'resolved':_0x57c2f5[_0x32042b(0x1fd)]===0x1,'dT':D(_0x58bdeb[_0x32042b(0x203)]),'personId':_0x58bdeb[_0x32042b(0x1fb)],'threadId':_0x58bdeb[_0x32042b(0x1d9)]};}function ee(_0xc08cc0,_0x4005af,_0x2b6594){const _0x3cbfe4=_0xcdfce;var _0x3c35a2,_0x29ce61;if(((_0x29ce61=(_0x3c35a2=_0xc08cc0==null?void 0x0:_0xc08cc0[_0x3cbfe4(0x232)])==null?void 0x0:_0x3c35a2[_0x3cbfe4(0x225)])!=null?_0x29ce61:0x0)>0x0){const _0x50bb35=(_0xc102c5,_0x58c21f)=>({'id':_0xc102c5['replyId'],'threadId':_0xc102c5['threadId'],'dT':D(_0xc102c5['createTimestamp']),'personId':_0xc102c5['userId'],'resolved':_0xc08cc0[_0x3cbfe4(0x1fd)]===I[_0x3cbfe4(0x1fc)],'unitId':_0x4005af,'subUnitId':_0x2b6594,'text':JSON['parse'](_0xc102c5[_0x3cbfe4(0x1ff)]),'parentId':_0x58c21f}),_0x42c78f=_0x50bb35(_0xc08cc0['replies'][0x0]);return{..._0x42c78f,'children':_0xc08cc0[_0x3cbfe4(0x232)]['slice'](0x1)[_0x3cbfe4(0x1ea)](_0x17a8ad=>_0x50bb35(_0x17a8ad,_0x42c78f['id']))};}return null;}let f=class{constructor(_0x4b2bd3,_0x24dea7,_0x25ce24,_0x21b5f0){const _0x4d0b7d=_0xcdfce;this[_0x4d0b7d(0x20b)]=_0x4b2bd3,this[_0x4d0b7d(0x204)]=_0x24dea7,this[_0x4d0b7d(0x1d7)]=_0x25ce24,this[_0x4d0b7d(0x1db)]=_0x21b5f0;}async[_0xcdfce(0x1fa)](_0x47b094){const _0x4c1ba3=_0xcdfce;var _0x5e43db,_0x301fb4;const {parentId:_0x77df64,unitId:_0x2d27b6,text:_0x3b60f6,threadId:_0xe3add4}=_0x47b094,_0x552207=(_0x301fb4=(_0x5e43db=_0x3b60f6[_0x4c1ba3(0x20a)])==null?void 0x0:_0x5e43db['filter'](_0x1358dc=>_0x1358dc[_0x4c1ba3(0x1e3)]===_0x276b42[_0x4c1ba3(0x1e7)])[_0x4c1ba3(0x1ea)](_0x2e32df=>_0x2e32df['rangeId']))!=null?_0x301fb4:[],_0x55d6e1=JSON['stringify'](_0x3b60f6),_0x4a4dd9=(await this['_sessionService'][_0x4c1ba3(0x1f3)](_0x2d27b6))[_0x4c1ba3(0x223)]();if(_0x77df64){const _0x10997e={'memberId':_0x4a4dd9,'unitId':_0x2d27b6,'content':_0x55d6e1,'mention':_0x552207,'threadId':_0xe3add4},_0x1d2d2e=(await this[_0x4c1ba3(0x20b)][_0x4c1ba3(0x206)](_0x4c1ba3(0x1de)+_0x2d27b6+_0x4c1ba3(0x1dc),{'body':_0x10997e}))['body'][_0x4c1ba3(0x1f8)];return{..._0x47b094,'id':_0x1d2d2e[_0x4c1ba3(0x1d6)],'dT':_0x22b8fb(+_0x1d2d2e[_0x4c1ba3(0x203)])['format'](_0x4c1ba3(0x1ef)),'personId':_0x1d2d2e[_0x4c1ba3(0x1fb)]};}else{const _0x53974a={'memberId':_0x4a4dd9,'unitId':_0x2d27b6,'content':_0x55d6e1,'mention':_0x552207},_0x1ec1f6=await this[_0x4c1ba3(0x20b)]['post'](_0x4c1ba3(0x1de)+_0x2d27b6+_0x4c1ba3(0x22e),{'body':_0x53974a});return X(_0x1ec1f6[_0x4c1ba3(0x1d8)][_0x4c1ba3(0x207)],_0x47b094);}}async[_0xcdfce(0x218)](_0x543fac){const _0x5ce40a=_0xcdfce;var _0x3c063c,_0x39d1f0;const {text:_0x907df2,unitId:_0x3222c8}=_0x543fac,_0x4cf4bb=(_0x39d1f0=(_0x3c063c=_0x907df2['customRanges'])==null?void 0x0:_0x3c063c[_0x5ce40a(0x210)](_0x58c68c=>_0x58c68c[_0x5ce40a(0x1e3)]===_0x276b42[_0x5ce40a(0x1e7)])[_0x5ce40a(0x1ea)](_0xef69c3=>_0xef69c3[_0x5ce40a(0x21e)]))!=null?_0x39d1f0:[],_0x183167=JSON[_0x5ce40a(0x217)](_0x907df2),_0x37a303=_0x543fac[_0x5ce40a(0x1d9)],_0x3ea46a=_0x543fac['id'],_0x5eec14={'memberId':(await this[_0x5ce40a(0x1d7)][_0x5ce40a(0x1f3)](_0x3222c8))[_0x5ce40a(0x223)](),'unitId':_0x3222c8,'threadId':_0x37a303,'mention':_0x4cf4bb,'content':_0x183167,'replyId':_0x3ea46a},_0x2185e1=await this[_0x5ce40a(0x20b)][_0x5ce40a(0x206)](_0x5ce40a(0x1de)+_0x3222c8+_0x5ce40a(0x1ed),{'body':_0x5eec14});return!_0x2185e1[_0x5ce40a(0x1d8)][_0x5ce40a(0x213)]||_0x2185e1[_0x5ce40a(0x1d8)][_0x5ce40a(0x213)][_0x5ce40a(0x215)]===0x1;}async[_0xcdfce(0x230)](_0x4d3e72){const _0x4f61e1=_0xcdfce,{unitId:_0x3fdaae}=_0x4d3e72,_0x54c97f=_0x4d3e72[_0x4f61e1(0x1d9)],_0x6f7b34={'memberId':this[_0x4f61e1(0x204)][_0x4f61e1(0x1ec)]()['userID'],'unitId':_0x3fdaae,'threadId':_0x54c97f,'solved':_0x4d3e72[_0x4f61e1(0x222)]?I[_0x4f61e1(0x1fc)]:I[_0x4f61e1(0x1fe)]},_0x3fa1f8=await this[_0x4f61e1(0x20b)]['post']('/universer-api/comment/unit/'+_0x3fdaae+_0x4f61e1(0x216),{'body':_0x6f7b34});return!_0x3fa1f8[_0x4f61e1(0x1d8)][_0x4f61e1(0x213)]||_0x3fa1f8[_0x4f61e1(0x1d8)][_0x4f61e1(0x213)][_0x4f61e1(0x215)]===0x1;}async['deleteComment'](_0x1c691e,_0x10fc85,_0x5e1e07,_0x4aa27a){const _0x37c270=_0xcdfce,_0x2b61ea={'memberId':(await this['_sessionService']['requireSession'](_0x1c691e))['getMemberID'](),'threadId':_0x5e1e07,'replyId':_0x4aa27a,'unitId':_0x1c691e},_0x28533d=await this[_0x37c270(0x20b)]['post'](_0x37c270(0x1de)+_0x1c691e+_0x37c270(0x1d5),{'body':_0x2b61ea});return!_0x28533d[_0x37c270(0x1d8)][_0x37c270(0x213)]||_0x28533d['body'][_0x37c270(0x213)][_0x37c270(0x215)]===0x1;}async[_0xcdfce(0x22d)](_0x332116,_0x2db837,_0x1418ee){const _0x9efe51=_0xcdfce,_0x578c96={'unitId':_0x332116,'threadId':_0x1418ee},_0x1ddc10=await this[_0x9efe51(0x20b)]['post'](_0x9efe51(0x1de)+_0x332116+_0x9efe51(0x231),{'body':_0x578c96}),_0x31d200=_0x1418ee['map'](_0x45085c=>ee(_0x1ddc10['body'][_0x9efe51(0x1f5)][_0x45085c],_0x332116,_0x2db837))[_0x9efe51(0x210)](Boolean);return Object[_0x9efe51(0x200)](_0x1ddc10['body'][_0x9efe51(0x1d1)])[_0x9efe51(0x214)](_0x30311e=>{const _0x381016=_0x9efe51;this[_0x381016(0x204)][_0x381016(0x20d)](_0x30311e);}),_0x31d200;}[_0xcdfce(0x229)](_0x37bc3e){const _0x3bfc5a=_0xcdfce;return{'id':_0x37bc3e['id'],'threadId':_0x37bc3e[_0x3bfc5a(0x1d9)],'ref':_0x37bc3e[_0x3bfc5a(0x1f7)]};}};function _0x329f(){const _0x34f6cb=['getMemberID','_configService','length','getOwnPropertyDescriptor','unitId','get','saveCommentToSnapshot','_threadCommentDataSource','/universer-api/user/list','syncUpdateMutationToColla','listComments','/add','_commentService','resolveComment','/list','replies','getUnit','onReady','users','UNRECOGNIZED','user','disposeWithMe','/delete','replyId','_sessionService','body','threadId','getComment','_injector','/reply','personId','/universer-api/comment/unit/','225fycjiu','type','setConfig','8544605TmpSOj','rangeType','Reply','258CvylPi','commentUpdate$','COMMENT','root','15250698JcpzCY','map','1233582ZJCfIP','getCurrentUser','/edit','Add','YYYY/MM/DD\x20HH:mm','format','Delete','pluginName','requireSession','Edit','comments','add','ref','reply','payload','addComment','userId','Solved','solved','OpenOrReOpen','content','values','195223FpmaNr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','_userService','find','post','comment','11358504DqUmiV','6491476hsgvDR','customRanges','_httpService','defineProperty','addUser','_initDataSource','thread-comment-data-source.config','filter','_init','32402yQOLOo','error','forEach','code','/solved','stringify','updateComment','dataSource','_threadCommentDataSourceService','Solve','parentId','_initUserSync','rangeId','UNIVER_UNKNOWN','_config','_threadCommentModel','resolved'];_0x329f=function(){return _0x34f6cb;};return _0x329f();}f=Q([_(0x0,_0x1e713f(_0x5bc95d)),_(0x1,_0x1e713f(_0x425e2e)),_(0x2,_0x1e713f(_0x7ba2fe)),_(0x3,_0x1e713f(_0x597a1b))],f);var re=Object[_0xcdfce(0x226)],te=(_0x22d4d9,_0x1fcc78,_0x19fc86,_0x3f8e14)=>{for(var _0x36742f=_0x3f8e14>0x1?void 0x0:_0x3f8e14?re(_0x1fcc78,_0x19fc86):_0x1fcc78,_0x6f27fd=_0x22d4d9['length']-0x1,_0x250e72;_0x6f27fd>=0x0;_0x6f27fd--)(_0x250e72=_0x22d4d9[_0x6f27fd])&&(_0x36742f=_0x250e72(_0x36742f)||_0x36742f);return _0x36742f;},N=(_0x5553a4,_0x3fcfb9)=>(_0x47fc59,_0x37d56b)=>_0x3fcfb9(_0x47fc59,_0x37d56b,_0x5553a4);let g=class extends _0xe54b50{constructor(_0x20ddaa,_0x2cd077){const _0x489ec9=_0xcdfce;super(),this[_0x489ec9(0x21a)]=_0x20ddaa,this[_0x489ec9(0x22a)]=_0x2cd077,this[_0x489ec9(0x20e)]();}['_initDataSource'](){const _0x121f79=_0xcdfce;this['_threadCommentDataSourceService'][_0x121f79(0x219)]=this[_0x121f79(0x22a)],this[_0x121f79(0x21a)][_0x121f79(0x22c)]=!0x1;}};g=te([N(0x0,_0x3a21e7),N(0x1,_0x1e713f(f))],g);function _0x2004(_0x32d186,_0x2d50e7){const _0x329f96=_0x329f();return _0x2004=function(_0x2004d5,_0x2d2f9f){_0x2004d5=_0x2004d5-0x1d0;let _0x10219b=_0x329f96[_0x2004d5];return _0x10219b;},_0x2004(_0x32d186,_0x2d50e7);}var se=Object[_0xcdfce(0x20c)],oe=Object[_0xcdfce(0x226)],ne=(_0x4f5da4,_0x157efc,_0x23f2bd)=>_0x157efc in _0x4f5da4?se(_0x4f5da4,_0x157efc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23f2bd}):_0x4f5da4[_0x157efc]=_0x23f2bd,ie=(_0xc87644,_0x3b7ef7,_0x5eee42,_0x4dbb84)=>{const _0x38df34=_0xcdfce;for(var _0x29d0db=_0x4dbb84>0x1?void 0x0:_0x4dbb84?oe(_0x3b7ef7,_0x5eee42):_0x3b7ef7,_0x3abfd9=_0xc87644[_0x38df34(0x225)]-0x1,_0x33ac7a;_0x3abfd9>=0x0;_0x3abfd9--)(_0x33ac7a=_0xc87644[_0x3abfd9])&&(_0x29d0db=_0x33ac7a(_0x29d0db)||_0x29d0db);return _0x29d0db;},w=(_0x4c2021,_0x543040)=>(_0xd0ab94,_0x45e5cb)=>_0x543040(_0xd0ab94,_0x45e5cb,_0x4c2021),$=(_0x1fc76a,_0x34dba1,_0x3d4474)=>ne(_0x1fc76a,typeof _0x34dba1!='symbol'?_0x34dba1+'':_0x34dba1,_0x3d4474);let b=class extends _0x268aaa{constructor(_0x390d7b=M,_0x493d55,_0x9cd7fe){const _0x5be96c=_0xcdfce;super(),this[_0x5be96c(0x220)]=_0x390d7b,this[_0x5be96c(0x1db)]=_0x493d55,this[_0x5be96c(0x224)]=_0x9cd7fe;const {..._0x1210fc}=_0x3fd75f({},M,this['_config']);this[_0x5be96c(0x224)][_0x5be96c(0x1e1)](z,_0x1210fc);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x490cd6=>{const _0x2d4f9a=_0x2004;this['_injector'][_0x2d4f9a(0x1f6)](_0x490cd6);});}[_0xcdfce(0x1d0)](){const _0x2d2346=_0xcdfce;this[_0x2d2346(0x1db)]['get'](g),this['_injector'][_0x2d2346(0x228)](S);}};$(b,_0xcdfce(0x1f2),W),$(b,'type',_0x2464a3[_0xcdfce(0x21f)]),b=ie([_0xdde362(_0xa80b49,_0x2b8655,_0x5194f4),w(0x1,_0x1e713f(_0x597a1b)),w(0x2,_0x35e2d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x250c37=_0x3209;(function(_0x38c6a3,_0x27cf70){const _0x50a111=_0x3209,_0x1d05cd=_0x38c6a3();while(!![]){try{const _0x3c2d7a=parseInt(_0x50a111(0x226))/0x1*(parseInt(_0x50a111(0x1da))/0x2)+-parseInt(_0x50a111(0x1d1))/0x3*(-parseInt(_0x50a111(0x1d5))/0x4)+-parseInt(_0x50a111(0x1dc))/0x5*(-parseInt(_0x50a111(0x1de))/0x6)+-parseInt(_0x50a111(0x22f))/0x7+parseInt(_0x50a111(0x1d6))/0x8+parseInt(_0x50a111(0x229))/0x9+parseInt(_0x50a111(0x1d2))/0xa*(-parseInt(_0x50a111(0x1e2))/0xb);if(_0x3c2d7a===_0x27cf70)break;else _0x1d05cd['push'](_0x1d05cd['shift']());}catch(_0x3d6605){_0x1d05cd['push'](_0x1d05cd['shift']());}}}(_0x1a94,0x20f02));import{CommentService as _0x5f5413,CollaborationSessionService as _0x3789a0,UniverCollaborationClientPlugin as _0x1cdb0e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xbfd596}from'@univerjs-pro/license';import{dayjs as _0x359d28,UserManagerService as _0x4a2855,Inject as _0x2eead0,Injector as _0x56143a,Disposable as _0x40c5ab,CustomRangeType as _0x15a14a,UniverInstanceType as _0x65f626,DependentOn as _0x29d9a1,IConfigService as _0x48d952,Plugin as _0x5d11df,merge as _0x8d2716}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4a5fa9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53c82a,IThreadCommentDataSourceService as _0x500676}from'@univerjs/thread-comment';import{bufferTime as _0x273417}from'rxjs';import{HTTPService as _0x145491}from'@univerjs/network';const W=_0x250c37(0x1e1);var I=(_0x4ad229=>(_0x4ad229[_0x4ad229['OpenOrReOpen']=0x0]=_0x250c37(0x214),_0x4ad229[_0x4ad229[_0x250c37(0x1d3)]=0x1]=_0x250c37(0x1d3),_0x4ad229[_0x4ad229[_0x250c37(0x21a)]=-0x1]=_0x250c37(0x21a),_0x4ad229))(I||{}),v=(_0x522eb7=>(_0x522eb7[_0x522eb7['Unknown']=0x0]=_0x250c37(0x1d4),_0x522eb7[_0x522eb7['Add']=0x1]=_0x250c37(0x219),_0x522eb7[_0x522eb7[_0x250c37(0x1f6)]=0x2]=_0x250c37(0x1f6),_0x522eb7[_0x522eb7[_0x250c37(0x1ce)]=0x3]=_0x250c37(0x1ce),_0x522eb7[_0x522eb7[_0x250c37(0x20c)]=0x4]=_0x250c37(0x20c),_0x522eb7[_0x522eb7[_0x250c37(0x1cf)]=0x5]=_0x250c37(0x1cf),_0x522eb7[_0x522eb7[_0x250c37(0x21a)]=-0x1]=_0x250c37(0x21a),_0x522eb7))(v||{});const D=_0x1ead83=>_0x359d28(new Date(+_0x1ead83))[_0x250c37(0x222)](_0x250c37(0x1fb)),B=async(_0x2c0810,_0x344830)=>{const _0x9be845=_0x250c37,_0x2b6d99=_0x2c0810[_0x9be845(0x1f7)](_0x4a2855),_0x209d23=_0x2c0810[_0x9be845(0x1f7)](_0x145491);_0x344830['forEach'](_0x42ff63=>{const _0x56e806=_0x9be845;_0x2b6d99[_0x56e806(0x1cc)](_0x42ff63)&&_0x344830[_0x56e806(0x20d)](_0x42ff63);}),_0x344830[_0x9be845(0x1e9)]&&(await _0x209d23[_0x9be845(0x1f7)](_0x9be845(0x227),{'params':{'userIDs':[..._0x344830]}}))[_0x9be845(0x1ca)][_0x9be845(0x1e5)][_0x9be845(0x1d9)](_0x22beea=>{const _0x3714b9=_0x9be845;_0x22beea&&_0x2b6d99[_0x3714b9(0x201)](_0x22beea);});};function _0x1a94(){const _0x4b6f3d=['reply','_config','Delete','delete','getOwnPropertyDescriptor','error','requireSession','dataSource','deleteComment','/reply','OpenOrReOpen','onReady','comment','/universer-api/comment/unit/','resolved','Add','UNRECOGNIZED','_injector','/delete','unitId','parentId','disposeWithMe','payload','root','format','_threadCommentDataSourceService','rangeId','addComment','177iNOUDZ','/universer-api/user/list','_sessionService','501480BZopPV','values','length','code','solved','_commentService','1391747gLvaMk','commentUpdate$','body','parse','getUser','add','Edit','Solve','subscribe','24VDaMsl','210MRKaTf','Solved','Unknown','77432nkCBVZ','34992HiHums','userId','resolveComment','forEach','570GaRYDx','updateComment','5mKuiIC','thread-comment-data-source.config','813570eokdzA','_httpService','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','35233zgeLRv','_init','replies','users','map','_userService','_threadCommentDataSource','size','post','/edit','slice','getComment','userID','createTimestamp','type','filter','ref','pluginName','defineProperty','getMemberID','Reply','get','content','saveCommentToSnapshot','_configService','YYYY/MM/DD\x20HH:mm','/solved','replyId','getUnit','user','/add','addUser','threadId','onStarting','COMMENT','stringify','symbol','rangeType','_initUserSync','customRanges'];_0x1a94=function(){return _0x4b6f3d;};return _0x1a94();}var K=Object[_0x250c37(0x20e)],V=(_0x3e8f14,_0x2fada9,_0x132522,_0x3af55f)=>{const _0x25d619=_0x250c37;for(var _0x34f07e=_0x3af55f>0x1?void 0x0:_0x3af55f?K(_0x2fada9,_0x132522):_0x2fada9,_0x2aa05e=_0x3e8f14[_0x25d619(0x22b)]-0x1,_0x151eb0;_0x2aa05e>=0x0;_0x2aa05e--)(_0x151eb0=_0x3e8f14[_0x2aa05e])&&(_0x34f07e=_0x151eb0(_0x34f07e)||_0x34f07e);return _0x34f07e;},p=(_0x568fbc,_0x59e94c)=>(_0x370b4d,_0x160125)=>_0x59e94c(_0x370b4d,_0x160125,_0x568fbc);let S=class extends _0x40c5ab{constructor(_0x4c1c37,_0x4e8384,_0x55505d,_0x4b42cf){const _0x3423f8=_0x250c37;super(),this[_0x3423f8(0x22e)]=_0x4c1c37,this['_threadCommentModel']=_0x4e8384,this[_0x3423f8(0x1e7)]=_0x55505d,this[_0x3423f8(0x21b)]=_0x4b42cf,this[_0x3423f8(0x1e3)](),this[_0x3423f8(0x208)]();}[_0x250c37(0x208)](){const _0x4a2b5c=_0x250c37;this['disposeWithMe'](this[_0x4a2b5c(0x1e0)][_0x4a2b5c(0x1c9)]['pipe'](_0x273417(0x10))[_0x4a2b5c(0x1d0)](_0x2ecd35=>{const _0x2711eb=_0x4a2b5c,_0x9baa56=new Set();_0x2ecd35[_0x2711eb(0x1d9)](_0x5d071e=>{const _0x33eaba=_0x2711eb;switch(_0x5d071e[_0x33eaba(0x1f0)]){case _0x33eaba(0x1cd):{const _0x4d9eb1=_0x5d071e[_0x33eaba(0x220)]['personId'];_0x9baa56[_0x33eaba(0x1cd)](_0x4d9eb1);break;}}}),B(this[_0x2711eb(0x21b)],_0x9baa56);}));}[_0x250c37(0x1e3)](){const _0x11cd69=_0x250c37;this[_0x11cd69(0x21f)](this[_0x11cd69(0x22e)][_0x11cd69(0x1c9)][_0x11cd69(0x1d0)](async _0x24f3f2=>{const _0x2e8054=_0x11cd69;var _0x5f1438,_0x27ea77,_0xceaac0,_0x48b868;const _0x17f898=(_0x5f1438=this[_0x2e8054(0x1e0)][_0x2e8054(0x1fe)](_0x24f3f2['unitId'])['find'](_0x11d879=>_0x11d879['threadId']===_0x24f3f2[_0x2e8054(0x202)]))==null?void 0x0:_0x5f1438[_0x2e8054(0x221)];if(!_0x17f898)return;const {unitId:_0x17b4c1,subUnitId:_0x378ac6}=_0x17f898;switch(_0x24f3f2['user']&&this['_userService'][_0x2e8054(0x201)](_0x24f3f2['user']),_0x24f3f2[_0x2e8054(0x1f0)]){case v[_0x2e8054(0x219)]:break;case v['Reply']:{this[_0x2e8054(0x1e0)][_0x2e8054(0x225)](_0x17b4c1,_0x378ac6,{'unitId':_0x17b4c1,'subUnitId':_0x378ac6,'ref':'','id':_0x24f3f2[_0x2e8054(0x1fd)],'dT':D(+_0x24f3f2[_0x2e8054(0x1ef)]),'threadId':_0x24f3f2[_0x2e8054(0x202)],'personId':(_0xceaac0=(_0x27ea77=_0x24f3f2[_0x2e8054(0x1ff)])==null?void 0x0:_0x27ea77['userID'])!=null?_0xceaac0:_0x24f3f2[_0x2e8054(0x1d7)],'text':JSON[_0x2e8054(0x1cb)](_0x24f3f2[_0x2e8054(0x1f8)]),'parentId':_0x17f898['id']});break;}case v[_0x2e8054(0x20c)]:{const _0x1de473=this[_0x2e8054(0x1e0)][_0x2e8054(0x1ed)](_0x17b4c1,_0x378ac6,_0x24f3f2[_0x2e8054(0x1fd)]);_0x1de473&&_0x1de473[_0x2e8054(0x21e)]&&this[_0x2e8054(0x1e0)][_0x2e8054(0x212)](_0x17b4c1,_0x378ac6,_0x24f3f2[_0x2e8054(0x1fd)]);break;}case v[_0x2e8054(0x1ce)]:{this[_0x2e8054(0x1e0)][_0x2e8054(0x1db)](_0x17b4c1,_0x378ac6,{'commentId':_0x24f3f2[_0x2e8054(0x1fd)],'text':JSON[_0x2e8054(0x1cb)](_0x24f3f2[_0x2e8054(0x1f8)])});break;}case v[_0x2e8054(0x1cf)]:{const _0x19dbec=(_0x48b868=this[_0x2e8054(0x1e0)]['getUnit'](_0x24f3f2[_0x2e8054(0x21d)])['find'](_0x14a50a=>_0x14a50a[_0x2e8054(0x202)]===_0x24f3f2[_0x2e8054(0x202)]))==null?void 0x0:_0x48b868[_0x2e8054(0x221)];_0x19dbec&&this['_threadCommentModel']['resolveComment'](_0x17b4c1,_0x378ac6,_0x19dbec['id'],_0x24f3f2[_0x2e8054(0x22d)]===I[_0x2e8054(0x1d3)]);break;}}}));}};S=V([p(0x0,_0x2eead0(_0x5f5413)),p(0x1,_0x2eead0(_0x53c82a)),p(0x2,_0x2eead0(_0x4a2855)),p(0x3,_0x2eead0(_0x56143a))],S);const z=_0x250c37(0x1dd),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x24a661,_0x5f1a36,_0x43a7a2,_0x559730)=>{const _0x2eb08b=_0x250c37;for(var _0x11b85e=_0x559730>0x1?void 0x0:_0x559730?k(_0x5f1a36,_0x43a7a2):_0x5f1a36,_0x68aaa5=_0x24a661[_0x2eb08b(0x22b)]-0x1,_0x2ab012;_0x68aaa5>=0x0;_0x68aaa5--)(_0x2ab012=_0x24a661[_0x68aaa5])&&(_0x11b85e=_0x2ab012(_0x11b85e)||_0x11b85e);return _0x11b85e;},_=(_0x1d3ce8,_0x53d3df)=>(_0x210e6e,_0x5cce19)=>_0x53d3df(_0x210e6e,_0x5cce19,_0x1d3ce8);function X(_0x1e992a,_0x4fe8ab){const _0x17c720=_0x250c37,_0x2a8d6e=_0x1e992a[_0x17c720(0x1e4)][0x0];return{..._0x4fe8ab,'id':_0x2a8d6e[_0x17c720(0x1fd)],'resolved':_0x1e992a['solved']===0x1,'dT':D(_0x2a8d6e[_0x17c720(0x1ef)]),'personId':_0x2a8d6e[_0x17c720(0x1d7)],'threadId':_0x2a8d6e[_0x17c720(0x202)]};}function ee(_0x10be29,_0x677aee,_0x33aac2){const _0x4f1976=_0x250c37;var _0x22e0e2,_0x53c98a;if(((_0x53c98a=(_0x22e0e2=_0x10be29==null?void 0x0:_0x10be29['replies'])==null?void 0x0:_0x22e0e2[_0x4f1976(0x22b)])!=null?_0x53c98a:0x0)>0x0){const _0x31a617=(_0x466f34,_0x34fe82)=>({'id':_0x466f34[_0x4f1976(0x1fd)],'threadId':_0x466f34['threadId'],'dT':D(_0x466f34[_0x4f1976(0x1ef)]),'personId':_0x466f34[_0x4f1976(0x1d7)],'resolved':_0x10be29[_0x4f1976(0x22d)]===I[_0x4f1976(0x1d3)],'unitId':_0x677aee,'subUnitId':_0x33aac2,'text':JSON['parse'](_0x466f34[_0x4f1976(0x1f8)]),'parentId':_0x34fe82}),_0x991c06=_0x31a617(_0x10be29[_0x4f1976(0x1e4)][0x0]);return{..._0x991c06,'children':_0x10be29[_0x4f1976(0x1e4)][_0x4f1976(0x1ec)](0x1)[_0x4f1976(0x1e6)](_0x521240=>_0x31a617(_0x521240,_0x991c06['id']))};}return null;}let f=class{constructor(_0x561b55,_0x27ccea,_0x53ab02,_0x1c7476){const _0x1e2fc4=_0x250c37;this['_httpService']=_0x561b55,this['_userService']=_0x27ccea,this[_0x1e2fc4(0x228)]=_0x53ab02,this[_0x1e2fc4(0x21b)]=_0x1c7476;}async[_0x250c37(0x225)](_0x221db2){const _0x443a5f=_0x250c37;var _0x1dfa6f,_0xc4a4af;const {parentId:_0x3319ef,unitId:_0x5b3f1c,text:_0x97d340,threadId:_0x41c646}=_0x221db2,_0x123a30=(_0xc4a4af=(_0x1dfa6f=_0x97d340[_0x443a5f(0x209)])==null?void 0x0:_0x1dfa6f[_0x443a5f(0x1f1)](_0x1dac73=>_0x1dac73[_0x443a5f(0x207)]===_0x15a14a[_0x443a5f(0x204)])[_0x443a5f(0x1e6)](_0x5cc819=>_0x5cc819[_0x443a5f(0x224)]))!=null?_0xc4a4af:[],_0x1d153e=JSON['stringify'](_0x97d340),_0x2a2acb=(await this[_0x443a5f(0x228)][_0x443a5f(0x210)](_0x5b3f1c))[_0x443a5f(0x1f5)]();if(_0x3319ef){const _0x4ae67d={'memberId':_0x2a2acb,'unitId':_0x5b3f1c,'content':_0x1d153e,'mention':_0x123a30,'threadId':_0x41c646},_0xa2a63f=(await this[_0x443a5f(0x1df)][_0x443a5f(0x1ea)]('/universer-api/comment/unit/'+_0x5b3f1c+_0x443a5f(0x213),{'body':_0x4ae67d}))[_0x443a5f(0x1ca)][_0x443a5f(0x20a)];return{..._0x221db2,'id':_0xa2a63f[_0x443a5f(0x1fd)],'dT':_0x359d28(+_0xa2a63f[_0x443a5f(0x1ef)])[_0x443a5f(0x222)](_0x443a5f(0x1fb)),'personId':_0xa2a63f[_0x443a5f(0x1d7)]};}else{const _0x51276a={'memberId':_0x2a2acb,'unitId':_0x5b3f1c,'content':_0x1d153e,'mention':_0x123a30},_0x5e6a58=await this['_httpService']['post'](_0x443a5f(0x217)+_0x5b3f1c+_0x443a5f(0x200),{'body':_0x51276a});return X(_0x5e6a58[_0x443a5f(0x1ca)][_0x443a5f(0x216)],_0x221db2);}}async[_0x250c37(0x1db)](_0x5ce98b){const _0x567303=_0x250c37;var _0x1a2514,_0x5a8e3c;const {text:_0x2c771c,unitId:_0x320085}=_0x5ce98b,_0x191436=(_0x5a8e3c=(_0x1a2514=_0x2c771c[_0x567303(0x209)])==null?void 0x0:_0x1a2514['filter'](_0x278069=>_0x278069[_0x567303(0x207)]===_0x15a14a[_0x567303(0x204)])['map'](_0x51f28e=>_0x51f28e[_0x567303(0x224)]))!=null?_0x5a8e3c:[],_0x257582=JSON[_0x567303(0x205)](_0x2c771c),_0x1913c7=_0x5ce98b[_0x567303(0x202)],_0x2c9b81=_0x5ce98b['id'],_0x5e003f={'memberId':(await this['_sessionService'][_0x567303(0x210)](_0x320085))[_0x567303(0x1f5)](),'unitId':_0x320085,'threadId':_0x1913c7,'mention':_0x191436,'content':_0x257582,'replyId':_0x2c9b81},_0x59e8e1=await this['_httpService'][_0x567303(0x1ea)](_0x567303(0x217)+_0x320085+_0x567303(0x1eb),{'body':_0x5e003f});return!_0x59e8e1['body'][_0x567303(0x20f)]||_0x59e8e1[_0x567303(0x1ca)][_0x567303(0x20f)][_0x567303(0x22c)]===0x1;}async[_0x250c37(0x1d8)](_0x293b2c){const _0x1f2549=_0x250c37,{unitId:_0x22f479}=_0x293b2c,_0x501a0c=_0x293b2c[_0x1f2549(0x202)],_0x283d78={'memberId':this['_userService']['getCurrentUser']()[_0x1f2549(0x1ee)],'unitId':_0x22f479,'threadId':_0x501a0c,'solved':_0x293b2c[_0x1f2549(0x218)]?I[_0x1f2549(0x1d3)]:I[_0x1f2549(0x214)]},_0x5ec2b6=await this[_0x1f2549(0x1df)][_0x1f2549(0x1ea)](_0x1f2549(0x217)+_0x22f479+_0x1f2549(0x1fc),{'body':_0x283d78});return!_0x5ec2b6[_0x1f2549(0x1ca)][_0x1f2549(0x20f)]||_0x5ec2b6[_0x1f2549(0x1ca)][_0x1f2549(0x20f)][_0x1f2549(0x22c)]===0x1;}async[_0x250c37(0x212)](_0x343588,_0x473d18,_0x2c01d1,_0x1a67dc){const _0x14ee07=_0x250c37,_0x4b5706={'memberId':(await this[_0x14ee07(0x228)][_0x14ee07(0x210)](_0x343588))['getMemberID'](),'threadId':_0x2c01d1,'replyId':_0x1a67dc,'unitId':_0x343588},_0x545853=await this[_0x14ee07(0x1df)]['post'](_0x14ee07(0x217)+_0x343588+_0x14ee07(0x21c),{'body':_0x4b5706});return!_0x545853[_0x14ee07(0x1ca)]['error']||_0x545853[_0x14ee07(0x1ca)]['error'][_0x14ee07(0x22c)]===0x1;}async['listComments'](_0x55fb4e,_0x22ad27,_0x3cc1d0){const _0x54477d=_0x250c37,_0x458299={'unitId':_0x55fb4e,'threadId':_0x3cc1d0},_0x263b0f=await this['_httpService'][_0x54477d(0x1ea)](_0x54477d(0x217)+_0x55fb4e+'/list',{'body':_0x458299}),_0x37d851=_0x3cc1d0[_0x54477d(0x1e6)](_0x47e6cb=>ee(_0x263b0f[_0x54477d(0x1ca)]['comments'][_0x47e6cb],_0x55fb4e,_0x22ad27))[_0x54477d(0x1f1)](Boolean);return Object[_0x54477d(0x22a)](_0x263b0f[_0x54477d(0x1ca)]['users'])[_0x54477d(0x1d9)](_0x137718=>{const _0x29dd17=_0x54477d;this[_0x29dd17(0x1e7)][_0x29dd17(0x201)](_0x137718);}),_0x37d851;}[_0x250c37(0x1f9)](_0x34b686){const _0x3c4b14=_0x250c37;return{'id':_0x34b686['id'],'threadId':_0x34b686['threadId'],'ref':_0x34b686[_0x3c4b14(0x1f2)]};}};f=Q([_(0x0,_0x2eead0(_0x145491)),_(0x1,_0x2eead0(_0x4a2855)),_(0x2,_0x2eead0(_0x3789a0)),_(0x3,_0x2eead0(_0x56143a))],f);var re=Object[_0x250c37(0x20e)],te=(_0x27d50f,_0x5efad5,_0x3d447c,_0xf5bd92)=>{const _0x28be17=_0x250c37;for(var _0x4830c4=_0xf5bd92>0x1?void 0x0:_0xf5bd92?re(_0x5efad5,_0x3d447c):_0x5efad5,_0xb0aafa=_0x27d50f[_0x28be17(0x22b)]-0x1,_0x31117a;_0xb0aafa>=0x0;_0xb0aafa--)(_0x31117a=_0x27d50f[_0xb0aafa])&&(_0x4830c4=_0x31117a(_0x4830c4)||_0x4830c4);return _0x4830c4;},N=(_0x56bed4,_0x2edec8)=>(_0xbc1593,_0x27193d)=>_0x2edec8(_0xbc1593,_0x27193d,_0x56bed4);let g=class extends _0x40c5ab{constructor(_0x5d355f,_0x55079f){const _0x42869a=_0x250c37;super(),this[_0x42869a(0x223)]=_0x5d355f,this[_0x42869a(0x1e8)]=_0x55079f,this['_initDataSource']();}['_initDataSource'](){const _0x3608b1=_0x250c37;this[_0x3608b1(0x223)][_0x3608b1(0x211)]=this[_0x3608b1(0x1e8)],this[_0x3608b1(0x223)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x500676),N(0x1,_0x2eead0(f))],g);var se=Object[_0x250c37(0x1f4)],oe=Object[_0x250c37(0x20e)],ne=(_0xfa9f90,_0x1534ee,_0x360c15)=>_0x1534ee in _0xfa9f90?se(_0xfa9f90,_0x1534ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x360c15}):_0xfa9f90[_0x1534ee]=_0x360c15,ie=(_0x5e727c,_0x16fe4a,_0x35441e,_0x4de2ae)=>{const _0x373daf=_0x250c37;for(var _0x44c96f=_0x4de2ae>0x1?void 0x0:_0x4de2ae?oe(_0x16fe4a,_0x35441e):_0x16fe4a,_0x47bbf8=_0x5e727c[_0x373daf(0x22b)]-0x1,_0x2b5e32;_0x47bbf8>=0x0;_0x47bbf8--)(_0x2b5e32=_0x5e727c[_0x47bbf8])&&(_0x44c96f=_0x2b5e32(_0x44c96f)||_0x44c96f);return _0x44c96f;},w=(_0x4bcf94,_0xc55283)=>(_0x534c95,_0x2720aa)=>_0xc55283(_0x534c95,_0x2720aa,_0x4bcf94),$=(_0x1db9b1,_0x44db92,_0x4aa499)=>ne(_0x1db9b1,typeof _0x44db92!=_0x250c37(0x206)?_0x44db92+'':_0x44db92,_0x4aa499);let b=class extends _0x5d11df{constructor(_0x432bd0=M,_0x381ce5,_0x2014c2){const _0x32fb91=_0x250c37;super(),this[_0x32fb91(0x20b)]=_0x432bd0,this[_0x32fb91(0x21b)]=_0x381ce5,this[_0x32fb91(0x1fa)]=_0x2014c2;const {..._0x1d5f35}=_0x8d2716({},M,this['_config']);this[_0x32fb91(0x1fa)]['setConfig'](z,_0x1d5f35);}[_0x250c37(0x203)](){const _0x1223bf=_0x250c37;[[f],[g],[S]][_0x1223bf(0x1d9)](_0x329722=>{const _0x5a943b=_0x1223bf;this[_0x5a943b(0x21b)][_0x5a943b(0x1cd)](_0x329722);});}[_0x250c37(0x215)](){const _0x33b8f7=_0x250c37;this['_injector'][_0x33b8f7(0x1f7)](g),this[_0x33b8f7(0x21b)]['get'](S);}};$(b,_0x250c37(0x1f3),W),$(b,_0x250c37(0x1f0),_0x65f626['UNIVER_UNKNOWN']),b=ie([_0x29d9a1(_0x4a5fa9,_0x1cdb0e,_0xbfd596),w(0x1,_0x2eead0(_0x56143a)),w(0x2,_0x48d952)],b);function _0x3209(_0xa639e3,_0x543c53){const _0x1a9434=_0x1a94();return _0x3209=function(_0x3209c0,_0x24ca37){_0x3209c0=_0x3209c0-0x1c9;let _0x1ca39f=_0x1a9434[_0x3209c0];return _0x1ca39f;},_0x3209(_0xa639e3,_0x543c53);}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xcdfce=_0x2004;(function(_0x1daad5,_0x10d4cd){const _0x4650d3=_0x2004,_0x347d08=_0x1daad5();while(!![]){try{const _0x196bce=parseInt(_0x4650d3(0x1eb))/0x1+-parseInt(_0x4650d3(0x212))/0x2*(-parseInt(_0x4650d3(0x1df))/0x3)+parseInt(_0x4650d3(0x209))/0x4+-parseInt(_0x4650d3(0x1e2))/0x5+-parseInt(_0x4650d3(0x1e5))/0x6*(parseInt(_0x4650d3(0x201))/0x7)+parseInt(_0x4650d3(0x208))/0x8+-parseInt(_0x4650d3(0x1e9))/0x9;if(_0x196bce===_0x10d4cd)break;else _0x347d08['push'](_0x347d08['shift']());}catch(_0x3be08d){_0x347d08['push'](_0x347d08['shift']());}}}(_0x329f,0xd8f5d));import{CommentService as _0x53178a,CollaborationSessionService as _0x7ba2fe,UniverCollaborationClientPlugin as _0x2b8655}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5194f4}from'@univerjs-pro/license';import{dayjs as _0x22b8fb,UserManagerService as _0x425e2e,Inject as _0x1e713f,Injector as _0x597a1b,Disposable as _0xe54b50,CustomRangeType as _0x276b42,UniverInstanceType as _0x2464a3,DependentOn as _0xdde362,IConfigService as _0x35e2d6,Plugin as _0x268aaa,merge as _0x3fd75f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa80b49}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9d6255,IThreadCommentDataSourceService as _0x3a21e7}from'@univerjs/thread-comment';import{bufferTime as _0x429795}from'rxjs';import{HTTPService as _0x5bc95d}from'@univerjs/network';const W=_0xcdfce(0x202);var I=(_0x8320cf=>(_0x8320cf[_0x8320cf['OpenOrReOpen']=0x0]=_0xcdfce(0x1fe),_0x8320cf[_0x8320cf[_0xcdfce(0x1fc)]=0x1]=_0xcdfce(0x1fc),_0x8320cf[_0x8320cf[_0xcdfce(0x1d2)]=-0x1]=_0xcdfce(0x1d2),_0x8320cf))(I||{}),v=(_0x41678d=>(_0x41678d[_0x41678d['Unknown']=0x0]='Unknown',_0x41678d[_0x41678d[_0xcdfce(0x1ee)]=0x1]='Add',_0x41678d[_0x41678d['Reply']=0x2]='Reply',_0x41678d[_0x41678d[_0xcdfce(0x1f4)]=0x3]=_0xcdfce(0x1f4),_0x41678d[_0x41678d[_0xcdfce(0x1f1)]=0x4]='Delete',_0x41678d[_0x41678d[_0xcdfce(0x21b)]=0x5]=_0xcdfce(0x21b),_0x41678d[_0x41678d['UNRECOGNIZED']=-0x1]=_0xcdfce(0x1d2),_0x41678d))(v||{});const D=_0x93ec66=>_0x22b8fb(new Date(+_0x93ec66))[_0xcdfce(0x1f0)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x5c655a,_0x53acaa)=>{const _0x7b7045=_0xcdfce,_0x808a08=_0x5c655a[_0x7b7045(0x228)](_0x425e2e),_0x30dab2=_0x5c655a['get'](_0x5bc95d);_0x53acaa[_0x7b7045(0x214)](_0x50a02b=>{_0x808a08['getUser'](_0x50a02b)&&_0x53acaa['delete'](_0x50a02b);}),_0x53acaa['size']&&(await _0x30dab2[_0x7b7045(0x228)](_0x7b7045(0x22b),{'params':{'userIDs':[..._0x53acaa]}}))[_0x7b7045(0x1d8)][_0x7b7045(0x1d1)][_0x7b7045(0x214)](_0x261c79=>{const _0x9d5c5b=_0x7b7045;_0x261c79&&_0x808a08[_0x9d5c5b(0x20d)](_0x261c79);});};var K=Object[_0xcdfce(0x226)],V=(_0x5e3a8a,_0xacfc2e,_0x6b7f2f,_0x4c1455)=>{const _0x146e42=_0xcdfce;for(var _0x18a984=_0x4c1455>0x1?void 0x0:_0x4c1455?K(_0xacfc2e,_0x6b7f2f):_0xacfc2e,_0x105807=_0x5e3a8a[_0x146e42(0x225)]-0x1,_0x1a21e4;_0x105807>=0x0;_0x105807--)(_0x1a21e4=_0x5e3a8a[_0x105807])&&(_0x18a984=_0x1a21e4(_0x18a984)||_0x18a984);return _0x18a984;},p=(_0x3e3fa5,_0x15e0be)=>(_0x48c963,_0x3fb625)=>_0x15e0be(_0x48c963,_0x3fb625,_0x3e3fa5);let S=class extends _0xe54b50{constructor(_0x13334d,_0x12c1bd,_0x5b2acf,_0x9fee5e){const _0x261743=_0xcdfce;super(),this[_0x261743(0x22f)]=_0x13334d,this[_0x261743(0x221)]=_0x12c1bd,this[_0x261743(0x204)]=_0x5b2acf,this[_0x261743(0x1db)]=_0x9fee5e,this[_0x261743(0x211)](),this[_0x261743(0x21d)]();}[_0xcdfce(0x21d)](){const _0x8ec1ff=_0xcdfce;this[_0x8ec1ff(0x1d4)](this[_0x8ec1ff(0x221)][_0x8ec1ff(0x1e6)]['pipe'](_0x429795(0x10))['subscribe'](_0x3a4d25=>{const _0xb458dc=_0x8ec1ff,_0x4f4c04=new Set();_0x3a4d25[_0xb458dc(0x214)](_0x14dfb9=>{const _0x4b5a3f=_0xb458dc;switch(_0x14dfb9[_0x4b5a3f(0x1e0)]){case _0x4b5a3f(0x1f6):{const _0x531a28=_0x14dfb9[_0x4b5a3f(0x1f9)][_0x4b5a3f(0x1dd)];_0x4f4c04[_0x4b5a3f(0x1f6)](_0x531a28);break;}}}),B(this['_injector'],_0x4f4c04);}));}[_0xcdfce(0x211)](){const _0x422892=_0xcdfce;this[_0x422892(0x1d4)](this[_0x422892(0x22f)][_0x422892(0x1e6)]['subscribe'](async _0x142bf3=>{const _0x3e2152=_0x422892;var _0x31dbef,_0x18780c,_0x2487f1,_0x15a59d;const _0x182b80=(_0x31dbef=this[_0x3e2152(0x221)][_0x3e2152(0x233)](_0x142bf3[_0x3e2152(0x227)])[_0x3e2152(0x205)](_0x18ac39=>_0x18ac39['threadId']===_0x142bf3[_0x3e2152(0x1d9)]))==null?void 0x0:_0x31dbef[_0x3e2152(0x1e8)];if(!_0x182b80)return;const {unitId:_0x45b559,subUnitId:_0xfee62a}=_0x182b80;switch(_0x142bf3[_0x3e2152(0x1d3)]&&this[_0x3e2152(0x204)][_0x3e2152(0x20d)](_0x142bf3[_0x3e2152(0x1d3)]),_0x142bf3[_0x3e2152(0x1e0)]){case v[_0x3e2152(0x1ee)]:break;case v[_0x3e2152(0x1e4)]:{this[_0x3e2152(0x221)][_0x3e2152(0x1fa)](_0x45b559,_0xfee62a,{'unitId':_0x45b559,'subUnitId':_0xfee62a,'ref':'','id':_0x142bf3['replyId'],'dT':D(+_0x142bf3['createTimestamp']),'threadId':_0x142bf3['threadId'],'personId':(_0x2487f1=(_0x18780c=_0x142bf3['user'])==null?void 0x0:_0x18780c['userID'])!=null?_0x2487f1:_0x142bf3[_0x3e2152(0x1fb)],'text':JSON['parse'](_0x142bf3['content']),'parentId':_0x182b80['id']});break;}case v[_0x3e2152(0x1f1)]:{const _0x57974d=this[_0x3e2152(0x221)][_0x3e2152(0x1da)](_0x45b559,_0xfee62a,_0x142bf3[_0x3e2152(0x1d6)]);_0x57974d&&_0x57974d[_0x3e2152(0x21c)]&&this[_0x3e2152(0x221)]['deleteComment'](_0x45b559,_0xfee62a,_0x142bf3['replyId']);break;}case v[_0x3e2152(0x1f4)]:{this['_threadCommentModel'][_0x3e2152(0x218)](_0x45b559,_0xfee62a,{'commentId':_0x142bf3['replyId'],'text':JSON['parse'](_0x142bf3[_0x3e2152(0x1ff)])});break;}case v[_0x3e2152(0x21b)]:{const _0x5d6840=(_0x15a59d=this[_0x3e2152(0x221)]['getUnit'](_0x142bf3[_0x3e2152(0x227)])[_0x3e2152(0x205)](_0x4c13e7=>_0x4c13e7[_0x3e2152(0x1d9)]===_0x142bf3[_0x3e2152(0x1d9)]))==null?void 0x0:_0x15a59d[_0x3e2152(0x1e8)];_0x5d6840&&this[_0x3e2152(0x221)][_0x3e2152(0x230)](_0x45b559,_0xfee62a,_0x5d6840['id'],_0x142bf3['solved']===I[_0x3e2152(0x1fc)]);break;}}}));}};S=V([p(0x0,_0x1e713f(_0x53178a)),p(0x1,_0x1e713f(_0x9d6255)),p(0x2,_0x1e713f(_0x425e2e)),p(0x3,_0x1e713f(_0x597a1b))],S);const z=_0xcdfce(0x20f),M={};var k=Object[_0xcdfce(0x226)],Q=(_0x44a117,_0x56de9c,_0x305163,_0x4a49b3)=>{const _0x2b8736=_0xcdfce;for(var _0x11b068=_0x4a49b3>0x1?void 0x0:_0x4a49b3?k(_0x56de9c,_0x305163):_0x56de9c,_0xc10edb=_0x44a117[_0x2b8736(0x225)]-0x1,_0x4f3086;_0xc10edb>=0x0;_0xc10edb--)(_0x4f3086=_0x44a117[_0xc10edb])&&(_0x11b068=_0x4f3086(_0x11b068)||_0x11b068);return _0x11b068;},_=(_0x4f6f7c,_0x511b50)=>(_0x1a6c78,_0x50602f)=>_0x511b50(_0x1a6c78,_0x50602f,_0x4f6f7c);function X(_0x57c2f5,_0x3bab99){const _0x32042b=_0xcdfce,_0x58bdeb=_0x57c2f5[_0x32042b(0x232)][0x0];return{..._0x3bab99,'id':_0x58bdeb[_0x32042b(0x1d6)],'resolved':_0x57c2f5[_0x32042b(0x1fd)]===0x1,'dT':D(_0x58bdeb[_0x32042b(0x203)]),'personId':_0x58bdeb[_0x32042b(0x1fb)],'threadId':_0x58bdeb[_0x32042b(0x1d9)]};}function ee(_0xc08cc0,_0x4005af,_0x2b6594){const _0x3cbfe4=_0xcdfce;var _0x3c35a2,_0x29ce61;if(((_0x29ce61=(_0x3c35a2=_0xc08cc0==null?void 0x0:_0xc08cc0[_0x3cbfe4(0x232)])==null?void 0x0:_0x3c35a2[_0x3cbfe4(0x225)])!=null?_0x29ce61:0x0)>0x0){const _0x50bb35=(_0xc102c5,_0x58c21f)=>({'id':_0xc102c5['replyId'],'threadId':_0xc102c5['threadId'],'dT':D(_0xc102c5['createTimestamp']),'personId':_0xc102c5['userId'],'resolved':_0xc08cc0[_0x3cbfe4(0x1fd)]===I[_0x3cbfe4(0x1fc)],'unitId':_0x4005af,'subUnitId':_0x2b6594,'text':JSON['parse'](_0xc102c5[_0x3cbfe4(0x1ff)]),'parentId':_0x58c21f}),_0x42c78f=_0x50bb35(_0xc08cc0['replies'][0x0]);return{..._0x42c78f,'children':_0xc08cc0[_0x3cbfe4(0x232)]['slice'](0x1)[_0x3cbfe4(0x1ea)](_0x17a8ad=>_0x50bb35(_0x17a8ad,_0x42c78f['id']))};}return null;}let f=class{constructor(_0x4b2bd3,_0x24dea7,_0x25ce24,_0x21b5f0){const _0x4d0b7d=_0xcdfce;this[_0x4d0b7d(0x20b)]=_0x4b2bd3,this[_0x4d0b7d(0x204)]=_0x24dea7,this[_0x4d0b7d(0x1d7)]=_0x25ce24,this[_0x4d0b7d(0x1db)]=_0x21b5f0;}async[_0xcdfce(0x1fa)](_0x47b094){const _0x4c1ba3=_0xcdfce;var _0x5e43db,_0x301fb4;const {parentId:_0x77df64,unitId:_0x2d27b6,text:_0x3b60f6,threadId:_0xe3add4}=_0x47b094,_0x552207=(_0x301fb4=(_0x5e43db=_0x3b60f6[_0x4c1ba3(0x20a)])==null?void 0x0:_0x5e43db['filter'](_0x1358dc=>_0x1358dc[_0x4c1ba3(0x1e3)]===_0x276b42[_0x4c1ba3(0x1e7)])[_0x4c1ba3(0x1ea)](_0x2e32df=>_0x2e32df['rangeId']))!=null?_0x301fb4:[],_0x55d6e1=JSON['stringify'](_0x3b60f6),_0x4a4dd9=(await this['_sessionService'][_0x4c1ba3(0x1f3)](_0x2d27b6))[_0x4c1ba3(0x223)]();if(_0x77df64){const _0x10997e={'memberId':_0x4a4dd9,'unitId':_0x2d27b6,'content':_0x55d6e1,'mention':_0x552207,'threadId':_0xe3add4},_0x1d2d2e=(await this[_0x4c1ba3(0x20b)][_0x4c1ba3(0x206)](_0x4c1ba3(0x1de)+_0x2d27b6+_0x4c1ba3(0x1dc),{'body':_0x10997e}))['body'][_0x4c1ba3(0x1f8)];return{..._0x47b094,'id':_0x1d2d2e[_0x4c1ba3(0x1d6)],'dT':_0x22b8fb(+_0x1d2d2e[_0x4c1ba3(0x203)])['format'](_0x4c1ba3(0x1ef)),'personId':_0x1d2d2e[_0x4c1ba3(0x1fb)]};}else{const _0x53974a={'memberId':_0x4a4dd9,'unitId':_0x2d27b6,'content':_0x55d6e1,'mention':_0x552207},_0x1ec1f6=await this[_0x4c1ba3(0x20b)]['post'](_0x4c1ba3(0x1de)+_0x2d27b6+_0x4c1ba3(0x22e),{'body':_0x53974a});return X(_0x1ec1f6[_0x4c1ba3(0x1d8)][_0x4c1ba3(0x207)],_0x47b094);}}async[_0xcdfce(0x218)](_0x543fac){const _0x5ce40a=_0xcdfce;var _0x3c063c,_0x39d1f0;const {text:_0x907df2,unitId:_0x3222c8}=_0x543fac,_0x4cf4bb=(_0x39d1f0=(_0x3c063c=_0x907df2['customRanges'])==null?void 0x0:_0x3c063c[_0x5ce40a(0x210)](_0x58c68c=>_0x58c68c[_0x5ce40a(0x1e3)]===_0x276b42[_0x5ce40a(0x1e7)])[_0x5ce40a(0x1ea)](_0xef69c3=>_0xef69c3[_0x5ce40a(0x21e)]))!=null?_0x39d1f0:[],_0x183167=JSON[_0x5ce40a(0x217)](_0x907df2),_0x37a303=_0x543fac[_0x5ce40a(0x1d9)],_0x3ea46a=_0x543fac['id'],_0x5eec14={'memberId':(await this[_0x5ce40a(0x1d7)][_0x5ce40a(0x1f3)](_0x3222c8))[_0x5ce40a(0x223)](),'unitId':_0x3222c8,'threadId':_0x37a303,'mention':_0x4cf4bb,'content':_0x183167,'replyId':_0x3ea46a},_0x2185e1=await this[_0x5ce40a(0x20b)][_0x5ce40a(0x206)](_0x5ce40a(0x1de)+_0x3222c8+_0x5ce40a(0x1ed),{'body':_0x5eec14});return!_0x2185e1[_0x5ce40a(0x1d8)][_0x5ce40a(0x213)]||_0x2185e1[_0x5ce40a(0x1d8)][_0x5ce40a(0x213)][_0x5ce40a(0x215)]===0x1;}async[_0xcdfce(0x230)](_0x4d3e72){const _0x4f61e1=_0xcdfce,{unitId:_0x3fdaae}=_0x4d3e72,_0x54c97f=_0x4d3e72[_0x4f61e1(0x1d9)],_0x6f7b34={'memberId':this[_0x4f61e1(0x204)][_0x4f61e1(0x1ec)]()['userID'],'unitId':_0x3fdaae,'threadId':_0x54c97f,'solved':_0x4d3e72[_0x4f61e1(0x222)]?I[_0x4f61e1(0x1fc)]:I[_0x4f61e1(0x1fe)]},_0x3fa1f8=await this[_0x4f61e1(0x20b)]['post']('/universer-api/comment/unit/'+_0x3fdaae+_0x4f61e1(0x216),{'body':_0x6f7b34});return!_0x3fa1f8[_0x4f61e1(0x1d8)][_0x4f61e1(0x213)]||_0x3fa1f8[_0x4f61e1(0x1d8)][_0x4f61e1(0x213)][_0x4f61e1(0x215)]===0x1;}async['deleteComment'](_0x1c691e,_0x10fc85,_0x5e1e07,_0x4aa27a){const _0x37c270=_0xcdfce,_0x2b61ea={'memberId':(await this['_sessionService']['requireSession'](_0x1c691e))['getMemberID'](),'threadId':_0x5e1e07,'replyId':_0x4aa27a,'unitId':_0x1c691e},_0x28533d=await this[_0x37c270(0x20b)]['post'](_0x37c270(0x1de)+_0x1c691e+_0x37c270(0x1d5),{'body':_0x2b61ea});return!_0x28533d[_0x37c270(0x1d8)][_0x37c270(0x213)]||_0x28533d['body'][_0x37c270(0x213)][_0x37c270(0x215)]===0x1;}async[_0xcdfce(0x22d)](_0x332116,_0x2db837,_0x1418ee){const _0x9efe51=_0xcdfce,_0x578c96={'unitId':_0x332116,'threadId':_0x1418ee},_0x1ddc10=await this[_0x9efe51(0x20b)]['post'](_0x9efe51(0x1de)+_0x332116+_0x9efe51(0x231),{'body':_0x578c96}),_0x31d200=_0x1418ee['map'](_0x45085c=>ee(_0x1ddc10['body'][_0x9efe51(0x1f5)][_0x45085c],_0x332116,_0x2db837))[_0x9efe51(0x210)](Boolean);return Object[_0x9efe51(0x200)](_0x1ddc10['body'][_0x9efe51(0x1d1)])[_0x9efe51(0x214)](_0x30311e=>{const _0x381016=_0x9efe51;this[_0x381016(0x204)][_0x381016(0x20d)](_0x30311e);}),_0x31d200;}[_0xcdfce(0x229)](_0x37bc3e){const _0x3bfc5a=_0xcdfce;return{'id':_0x37bc3e['id'],'threadId':_0x37bc3e[_0x3bfc5a(0x1d9)],'ref':_0x37bc3e[_0x3bfc5a(0x1f7)]};}};function _0x329f(){const _0x34f6cb=['getMemberID','_configService','length','getOwnPropertyDescriptor','unitId','get','saveCommentToSnapshot','_threadCommentDataSource','/universer-api/user/list','syncUpdateMutationToColla','listComments','/add','_commentService','resolveComment','/list','replies','getUnit','onReady','users','UNRECOGNIZED','user','disposeWithMe','/delete','replyId','_sessionService','body','threadId','getComment','_injector','/reply','personId','/universer-api/comment/unit/','225fycjiu','type','setConfig','8544605TmpSOj','rangeType','Reply','258CvylPi','commentUpdate$','COMMENT','root','15250698JcpzCY','map','1233582ZJCfIP','getCurrentUser','/edit','Add','YYYY/MM/DD\x20HH:mm','format','Delete','pluginName','requireSession','Edit','comments','add','ref','reply','payload','addComment','userId','Solved','solved','OpenOrReOpen','content','values','195223FpmaNr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','_userService','find','post','comment','11358504DqUmiV','6491476hsgvDR','customRanges','_httpService','defineProperty','addUser','_initDataSource','thread-comment-data-source.config','filter','_init','32402yQOLOo','error','forEach','code','/solved','stringify','updateComment','dataSource','_threadCommentDataSourceService','Solve','parentId','_initUserSync','rangeId','UNIVER_UNKNOWN','_config','_threadCommentModel','resolved'];_0x329f=function(){return _0x34f6cb;};return _0x329f();}f=Q([_(0x0,_0x1e713f(_0x5bc95d)),_(0x1,_0x1e713f(_0x425e2e)),_(0x2,_0x1e713f(_0x7ba2fe)),_(0x3,_0x1e713f(_0x597a1b))],f);var re=Object[_0xcdfce(0x226)],te=(_0x22d4d9,_0x1fcc78,_0x19fc86,_0x3f8e14)=>{for(var _0x36742f=_0x3f8e14>0x1?void 0x0:_0x3f8e14?re(_0x1fcc78,_0x19fc86):_0x1fcc78,_0x6f27fd=_0x22d4d9['length']-0x1,_0x250e72;_0x6f27fd>=0x0;_0x6f27fd--)(_0x250e72=_0x22d4d9[_0x6f27fd])&&(_0x36742f=_0x250e72(_0x36742f)||_0x36742f);return _0x36742f;},N=(_0x5553a4,_0x3fcfb9)=>(_0x47fc59,_0x37d56b)=>_0x3fcfb9(_0x47fc59,_0x37d56b,_0x5553a4);let g=class extends _0xe54b50{constructor(_0x20ddaa,_0x2cd077){const _0x489ec9=_0xcdfce;super(),this[_0x489ec9(0x21a)]=_0x20ddaa,this[_0x489ec9(0x22a)]=_0x2cd077,this[_0x489ec9(0x20e)]();}['_initDataSource'](){const _0x121f79=_0xcdfce;this['_threadCommentDataSourceService'][_0x121f79(0x219)]=this[_0x121f79(0x22a)],this[_0x121f79(0x21a)][_0x121f79(0x22c)]=!0x1;}};g=te([N(0x0,_0x3a21e7),N(0x1,_0x1e713f(f))],g);function _0x2004(_0x32d186,_0x2d50e7){const _0x329f96=_0x329f();return _0x2004=function(_0x2004d5,_0x2d2f9f){_0x2004d5=_0x2004d5-0x1d0;let _0x10219b=_0x329f96[_0x2004d5];return _0x10219b;},_0x2004(_0x32d186,_0x2d50e7);}var se=Object[_0xcdfce(0x20c)],oe=Object[_0xcdfce(0x226)],ne=(_0x4f5da4,_0x157efc,_0x23f2bd)=>_0x157efc in _0x4f5da4?se(_0x4f5da4,_0x157efc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23f2bd}):_0x4f5da4[_0x157efc]=_0x23f2bd,ie=(_0xc87644,_0x3b7ef7,_0x5eee42,_0x4dbb84)=>{const _0x38df34=_0xcdfce;for(var _0x29d0db=_0x4dbb84>0x1?void 0x0:_0x4dbb84?oe(_0x3b7ef7,_0x5eee42):_0x3b7ef7,_0x3abfd9=_0xc87644[_0x38df34(0x225)]-0x1,_0x33ac7a;_0x3abfd9>=0x0;_0x3abfd9--)(_0x33ac7a=_0xc87644[_0x3abfd9])&&(_0x29d0db=_0x33ac7a(_0x29d0db)||_0x29d0db);return _0x29d0db;},w=(_0x4c2021,_0x543040)=>(_0xd0ab94,_0x45e5cb)=>_0x543040(_0xd0ab94,_0x45e5cb,_0x4c2021),$=(_0x1fc76a,_0x34dba1,_0x3d4474)=>ne(_0x1fc76a,typeof _0x34dba1!='symbol'?_0x34dba1+'':_0x34dba1,_0x3d4474);let b=class extends _0x268aaa{constructor(_0x390d7b=M,_0x493d55,_0x9cd7fe){const _0x5be96c=_0xcdfce;super(),this[_0x5be96c(0x220)]=_0x390d7b,this[_0x5be96c(0x1db)]=_0x493d55,this[_0x5be96c(0x224)]=_0x9cd7fe;const {..._0x1210fc}=_0x3fd75f({},M,this['_config']);this[_0x5be96c(0x224)][_0x5be96c(0x1e1)](z,_0x1210fc);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x490cd6=>{const _0x2d4f9a=_0x2004;this['_injector'][_0x2d4f9a(0x1f6)](_0x490cd6);});}[_0xcdfce(0x1d0)](){const _0x2d2346=_0xcdfce;this[_0x2d2346(0x1db)]['get'](g),this['_injector'][_0x2d2346(0x228)](S);}};$(b,_0xcdfce(0x1f2),W),$(b,'type',_0x2464a3[_0xcdfce(0x21f)]),b=ie([_0xdde362(_0xa80b49,_0x2b8655,_0x5194f4),w(0x1,_0x1e713f(_0x597a1b)),w(0x2,_0x35e2d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x118b(){const _0x163400=['2893877aLtspp','UNRECOGNIZED','userID','parse','_threadCommentDataSource','Solve','150960vppnro','ref','getUnit','values','_injector','Delete','CollaborationSessionService','onStarting','requireSession','length','root','UniverLicensePlugin','DependentOn','130rcibBA','/edit','UniverThreadCommentUIPlugin','4DDdSxF','UniverProCollaborationClient','_initUserSync','updateComment','/delete','defineProperty','personId','dayjs','comments','find','UserManagerService','exports','get','Injector','@univerjs-pro/collaboration-client','threadId','Plugin','toStringTag','userId','IThreadCommentDataSourceService','disposeWithMe','Disposable','forEach','users','size','CommentService','getOwnPropertyDescriptor','pipe','replies','createTimestamp','commentUpdate$','Unknown','deleteComment','1017684reLqXA','rangeId','156NsXSaQ','Edit','error','addComment','333513daLkRC','filter','_sessionService','@univerjs/network','content','_threadCommentDataSourceService','@univerjs-pro/license','UniverProThreadCommentDatasource','stringify','4SCQZJN','/universer-api/user/list','user','syncUpdateMutationToColla','HTTPService','Solved','subscribe','30021IezpZq','parentId','addUser','835615ZGeUSp','map','COMMENT','_initDataSource','_httpService','8ACqcgE','type','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','object','OpenOrReOpen','saveCommentToSnapshot','code','rangeType','reply','setConfig','amd','IConfigService','onReady','Reply','/solved','@univerjs/thread-comment-ui','slice','_threadCommentModel','@univerjs/thread-comment','customRanges','replyId','/reply','Add','pluginName','UniverInstanceType','bufferTime','getCurrentUser','@univerjs/core','body','listComments','Inject','format','_configService','/list','rxjs','UNIVER_UNKNOWN','function','getMemberID','_commentService','merge','add','_init','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','solved','325930xlKoPL','post','_userService','resolveComment','CustomRangeType','unitId','_config'];_0x118b=function(){return _0x163400;};return _0x118b();}function _0x12ad(_0x12645a,_0x4b9445){const _0x118b47=_0x118b();return _0x12ad=function(_0x12adf6,_0x5b7bf1){_0x12adf6=_0x12adf6-0xe4;let _0x111cf2=_0x118b47[_0x12adf6];return _0x111cf2;},_0x12ad(_0x12645a,_0x4b9445);}(function(_0x1bd6d4,_0xd18537){const _0x4c6fea=_0x12ad,_0x3102f7=_0x1bd6d4();while(!![]){try{const _0x26bc85=parseInt(_0x4c6fea(0x131))/0x1*(-parseInt(_0x4c6fea(0x12a))/0x2)+-parseInt(_0x4c6fea(0x11b))/0x3+parseInt(_0x4c6fea(0xfa))/0x4*(parseInt(_0x4c6fea(0x134))/0x5)+-parseInt(_0x4c6fea(0xea))/0x6+-parseInt(_0x4c6fea(0xe4))/0x7*(-parseInt(_0x4c6fea(0x139))/0x8)+parseInt(_0x4c6fea(0x121))/0x9*(parseInt(_0x4c6fea(0xf7))/0xa)+-parseInt(_0x4c6fea(0x168))/0xb*(parseInt(_0x4c6fea(0x11d))/0xc);if(_0x26bc85===_0xd18537)break;else _0x3102f7['push'](_0x3102f7['shift']());}catch(_0x28d261){_0x3102f7['push'](_0x3102f7['shift']());}}}(_0x118b,0x3daef),function(_0x3b9421,_0x529078){const _0x10063a=_0x12ad;typeof exports==_0x10063a(0x13d)&&typeof module<'u'?_0x529078(exports,require(_0x10063a(0x108)),require(_0x10063a(0x127)),require(_0x10063a(0x155)),require(_0x10063a(0x149)),require(_0x10063a(0x14c)),require(_0x10063a(0x15c)),require(_0x10063a(0x124))):typeof define==_0x10063a(0x15e)&&define[_0x10063a(0x144)]?define([_0x10063a(0x105),_0x10063a(0x108),_0x10063a(0x127),'@univerjs/core',_0x10063a(0x149),'@univerjs/thread-comment','rxjs',_0x10063a(0x124)],_0x529078):(_0x3b9421=typeof globalThis<'u'?globalThis:_0x3b9421||self,_0x529078(_0x3b9421[_0x10063a(0x128)]={},_0x3b9421[_0x10063a(0xfb)],_0x3b9421['UniverProLicense'],_0x3b9421['UniverCore'],_0x3b9421['UniverThreadCommentUi'],_0x3b9421['UniverThreadComment'],_0x3b9421['rxjs'],_0x3b9421['UniverNetwork']));}(this,function(_0x2939f7,_0x532cff,_0x201e25,_0xca6c7f,_0x1161d3,_0x58290e,_0x47eac2,_0x367759){'use strict';const _0xdc6cc5=_0x12ad;const _0xdd2b1f=_0xdc6cc5(0x13c);var _0xc3551d=(_0x1ccc95=>(_0x1ccc95[_0x1ccc95[_0xdc6cc5(0x13e)]=0x0]=_0xdc6cc5(0x13e),_0x1ccc95[_0x1ccc95[_0xdc6cc5(0x12f)]=0x1]=_0xdc6cc5(0x12f),_0x1ccc95[_0x1ccc95[_0xdc6cc5(0xe5)]=-0x1]=_0xdc6cc5(0xe5),_0x1ccc95))(_0xc3551d||{}),_0x52eab4=(_0x576f29=>(_0x576f29[_0x576f29[_0xdc6cc5(0x119)]=0x0]=_0xdc6cc5(0x119),_0x576f29[_0x576f29[_0xdc6cc5(0x150)]=0x1]=_0xdc6cc5(0x150),_0x576f29[_0x576f29[_0xdc6cc5(0x147)]=0x2]=_0xdc6cc5(0x147),_0x576f29[_0x576f29[_0xdc6cc5(0x11e)]=0x3]=_0xdc6cc5(0x11e),_0x576f29[_0x576f29[_0xdc6cc5(0xef)]=0x4]=_0xdc6cc5(0xef),_0x576f29[_0x576f29[_0xdc6cc5(0xe9)]=0x5]='Solve',_0x576f29[_0x576f29[_0xdc6cc5(0xe5)]=-0x1]=_0xdc6cc5(0xe5),_0x576f29))(_0x52eab4||{});const _0x24aff7=_0x37d9d4=>_0xca6c7f[_0xdc6cc5(0x101)](new Date(+_0x37d9d4))[_0xdc6cc5(0x159)](_0xdc6cc5(0x165)),_0xf9194=async(_0x209ee2,_0x485a80)=>{const _0x3e0977=_0xdc6cc5,_0x4e2f3b=_0x209ee2[_0x3e0977(0x106)](_0xca6c7f[_0x3e0977(0x104)]),_0x8cf72c=_0x209ee2[_0x3e0977(0x106)](_0x367759[_0x3e0977(0x12e)]);_0x485a80['forEach'](_0x4bebfb=>{_0x4e2f3b['getUser'](_0x4bebfb)&&_0x485a80['delete'](_0x4bebfb);}),_0x485a80[_0x3e0977(0x112)]&&(await _0x8cf72c[_0x3e0977(0x106)](_0x3e0977(0x12b),{'params':{'userIDs':[..._0x485a80]}}))['body'][_0x3e0977(0x111)][_0x3e0977(0x110)](_0x1fd875=>{const _0x16c066=_0x3e0977;_0x1fd875&&_0x4e2f3b[_0x16c066(0x133)](_0x1fd875);});};var _0x204022=Object[_0xdc6cc5(0x114)],_0x437716=(_0x4dd4f6,_0x5422a6,_0xe7ef39,_0x25a712)=>{const _0x3d6d5b=_0xdc6cc5;for(var _0x1c3d18=_0x25a712>0x1?void 0x0:_0x25a712?_0x204022(_0x5422a6,_0xe7ef39):_0x5422a6,_0x3cda54=_0x4dd4f6[_0x3d6d5b(0xf3)]-0x1,_0x1ff5c4;_0x3cda54>=0x0;_0x3cda54--)(_0x1ff5c4=_0x4dd4f6[_0x3cda54])&&(_0x1c3d18=_0x1ff5c4(_0x1c3d18)||_0x1c3d18);return _0x1c3d18;},_0xd9328b=(_0x520e72,_0x13a642)=>(_0x20a1fa,_0x3a5331)=>_0x13a642(_0x20a1fa,_0x3a5331,_0x520e72);let _0x125ede=class extends _0xca6c7f[_0xdc6cc5(0x10f)]{constructor(_0x495072,_0x40579b,_0x29f93e,_0x58f74b){const _0x474b74=_0xdc6cc5;super(),this['_commentService']=_0x495072,this[_0x474b74(0x14b)]=_0x40579b,this[_0x474b74(0x16a)]=_0x29f93e,this[_0x474b74(0xee)]=_0x58f74b,this[_0x474b74(0x163)](),this[_0x474b74(0xfc)]();}[_0xdc6cc5(0xfc)](){const _0x328995=_0xdc6cc5;this[_0x328995(0x10e)](this[_0x328995(0x14b)]['commentUpdate$'][_0x328995(0x115)](_0x47eac2[_0x328995(0x153)](0x10))[_0x328995(0x130)](_0x56ae32=>{const _0x537309=_0x328995,_0x91f114=new Set();_0x56ae32[_0x537309(0x110)](_0x4a7d2d=>{const _0x1c6fae=_0x537309;switch(_0x4a7d2d[_0x1c6fae(0x13a)]){case _0x1c6fae(0x162):{const _0xd40c43=_0x4a7d2d['payload'][_0x1c6fae(0x100)];_0x91f114['add'](_0xd40c43);break;}}}),_0xf9194(this['_injector'],_0x91f114);}));}['_init'](){const _0x22184f=_0xdc6cc5;this[_0x22184f(0x10e)](this[_0x22184f(0x160)][_0x22184f(0x118)]['subscribe'](async _0x3ae68e=>{const _0x3e251b=_0x22184f;var _0x2cf61d,_0x3fc37b,_0x599ada,_0x19b871;const _0x31d14c=(_0x2cf61d=this['_threadCommentModel'][_0x3e251b(0xec)](_0x3ae68e[_0x3e251b(0x16d)])['find'](_0x5e4025=>_0x5e4025[_0x3e251b(0x109)]===_0x3ae68e[_0x3e251b(0x109)]))==null?void 0x0:_0x2cf61d[_0x3e251b(0xf4)];if(!_0x31d14c)return;const {unitId:_0x34415d,subUnitId:_0x1ec539}=_0x31d14c;switch(_0x3ae68e[_0x3e251b(0x12c)]&&this[_0x3e251b(0x16a)][_0x3e251b(0x133)](_0x3ae68e[_0x3e251b(0x12c)]),_0x3ae68e['type']){case _0x52eab4[_0x3e251b(0x150)]:break;case _0x52eab4[_0x3e251b(0x147)]:{this[_0x3e251b(0x14b)]['addComment'](_0x34415d,_0x1ec539,{'unitId':_0x34415d,'subUnitId':_0x1ec539,'ref':'','id':_0x3ae68e[_0x3e251b(0x14e)],'dT':_0x24aff7(+_0x3ae68e[_0x3e251b(0x117)]),'threadId':_0x3ae68e[_0x3e251b(0x109)],'personId':(_0x599ada=(_0x3fc37b=_0x3ae68e[_0x3e251b(0x12c)])==null?void 0x0:_0x3fc37b[_0x3e251b(0xe6)])!=null?_0x599ada:_0x3ae68e[_0x3e251b(0x10c)],'text':JSON[_0x3e251b(0xe7)](_0x3ae68e[_0x3e251b(0x125)]),'parentId':_0x31d14c['id']});break;}case _0x52eab4['Delete']:{const _0x1a789e=this['_threadCommentModel']['getComment'](_0x34415d,_0x1ec539,_0x3ae68e[_0x3e251b(0x14e)]);_0x1a789e&&_0x1a789e[_0x3e251b(0x132)]&&this[_0x3e251b(0x14b)][_0x3e251b(0x11a)](_0x34415d,_0x1ec539,_0x3ae68e['replyId']);break;}case _0x52eab4[_0x3e251b(0x11e)]:{this[_0x3e251b(0x14b)][_0x3e251b(0xfd)](_0x34415d,_0x1ec539,{'commentId':_0x3ae68e['replyId'],'text':JSON[_0x3e251b(0xe7)](_0x3ae68e[_0x3e251b(0x125)])});break;}case _0x52eab4[_0x3e251b(0xe9)]:{const _0x2fe324=(_0x19b871=this['_threadCommentModel'][_0x3e251b(0xec)](_0x3ae68e['unitId'])[_0x3e251b(0x103)](_0x23886d=>_0x23886d[_0x3e251b(0x109)]===_0x3ae68e[_0x3e251b(0x109)]))==null?void 0x0:_0x19b871[_0x3e251b(0xf4)];_0x2fe324&&this[_0x3e251b(0x14b)][_0x3e251b(0x16b)](_0x34415d,_0x1ec539,_0x2fe324['id'],_0x3ae68e[_0x3e251b(0x167)]===_0xc3551d[_0x3e251b(0x12f)]);break;}}}));}};_0x125ede=_0x437716([_0xd9328b(0x0,_0xca6c7f[_0xdc6cc5(0x158)](_0x532cff[_0xdc6cc5(0x113)])),_0xd9328b(0x1,_0xca6c7f[_0xdc6cc5(0x158)](_0x58290e['ThreadCommentModel'])),_0xd9328b(0x2,_0xca6c7f[_0xdc6cc5(0x158)](_0xca6c7f[_0xdc6cc5(0x104)])),_0xd9328b(0x3,_0xca6c7f[_0xdc6cc5(0x158)](_0xca6c7f[_0xdc6cc5(0x107)]))],_0x125ede);const _0x23c182='thread-comment-data-source.config',_0xbdf5d2={};var _0x1ea198=Object['getOwnPropertyDescriptor'],_0x1031b2=(_0x22ae33,_0x4575f6,_0x547dba,_0x2e2f4e)=>{const _0x2fff41=_0xdc6cc5;for(var _0x20255e=_0x2e2f4e>0x1?void 0x0:_0x2e2f4e?_0x1ea198(_0x4575f6,_0x547dba):_0x4575f6,_0x4fb6ce=_0x22ae33[_0x2fff41(0xf3)]-0x1,_0x162948;_0x4fb6ce>=0x0;_0x4fb6ce--)(_0x162948=_0x22ae33[_0x4fb6ce])&&(_0x20255e=_0x162948(_0x20255e)||_0x20255e);return _0x20255e;},_0xaf0bd9=(_0x18ef06,_0x570533)=>(_0x1171e8,_0xe3f1f5)=>_0x570533(_0x1171e8,_0xe3f1f5,_0x18ef06);function _0x2bdf23(_0x28d8b2,_0x44ed61){const _0x28372e=_0xdc6cc5,_0x44dc60=_0x28d8b2[_0x28372e(0x116)][0x0];return{..._0x44ed61,'id':_0x44dc60[_0x28372e(0x14e)],'resolved':_0x28d8b2[_0x28372e(0x167)]===0x1,'dT':_0x24aff7(_0x44dc60[_0x28372e(0x117)]),'personId':_0x44dc60[_0x28372e(0x10c)],'threadId':_0x44dc60['threadId']};}function _0x155a8c(_0x74b4d9,_0xecabac,_0x4a228e){const _0x47b3b7=_0xdc6cc5;var _0x55e8ed,_0xe3fc85;if(((_0xe3fc85=(_0x55e8ed=_0x74b4d9==null?void 0x0:_0x74b4d9[_0x47b3b7(0x116)])==null?void 0x0:_0x55e8ed[_0x47b3b7(0xf3)])!=null?_0xe3fc85:0x0)>0x0){const _0x2cad93=(_0x3d8a07,_0x5c3ca5)=>({'id':_0x3d8a07[_0x47b3b7(0x14e)],'threadId':_0x3d8a07[_0x47b3b7(0x109)],'dT':_0x24aff7(_0x3d8a07[_0x47b3b7(0x117)]),'personId':_0x3d8a07[_0x47b3b7(0x10c)],'resolved':_0x74b4d9[_0x47b3b7(0x167)]===_0xc3551d[_0x47b3b7(0x12f)],'unitId':_0xecabac,'subUnitId':_0x4a228e,'text':JSON[_0x47b3b7(0xe7)](_0x3d8a07['content']),'parentId':_0x5c3ca5}),_0x35a368=_0x2cad93(_0x74b4d9[_0x47b3b7(0x116)][0x0]);return{..._0x35a368,'children':_0x74b4d9[_0x47b3b7(0x116)][_0x47b3b7(0x14a)](0x1)[_0x47b3b7(0x135)](_0x1fd5e9=>_0x2cad93(_0x1fd5e9,_0x35a368['id']))};}return null;}let _0x172e0d=class{constructor(_0x195e3a,_0x58b900,_0x1280a0,_0x3873b9){const _0x438869=_0xdc6cc5;this[_0x438869(0x138)]=_0x195e3a,this[_0x438869(0x16a)]=_0x58b900,this['_sessionService']=_0x1280a0,this[_0x438869(0xee)]=_0x3873b9;}async[_0xdc6cc5(0x120)](_0x237c95){const _0x220a82=_0xdc6cc5;var _0x250e26,_0xf5ed6;const {parentId:_0x56f28a,unitId:_0x1eaf11,text:_0x4b9a04,threadId:_0x4d0bda}=_0x237c95,_0x1d8fb1=(_0xf5ed6=(_0x250e26=_0x4b9a04[_0x220a82(0x14d)])==null?void 0x0:_0x250e26[_0x220a82(0x122)](_0x2ab735=>_0x2ab735[_0x220a82(0x141)]===_0xca6c7f[_0x220a82(0x16c)][_0x220a82(0x136)])['map'](_0xbe2652=>_0xbe2652[_0x220a82(0x11c)]))!=null?_0xf5ed6:[],_0x3d6426=JSON[_0x220a82(0x129)](_0x4b9a04),_0x46757f=(await this[_0x220a82(0x123)][_0x220a82(0xf2)](_0x1eaf11))['getMemberID']();if(_0x56f28a){const _0x1c0de2={'memberId':_0x46757f,'unitId':_0x1eaf11,'content':_0x3d6426,'mention':_0x1d8fb1,'threadId':_0x4d0bda},_0x3f8f9a=(await this[_0x220a82(0x138)][_0x220a82(0x169)](_0x220a82(0x164)+_0x1eaf11+_0x220a82(0x14f),{'body':_0x1c0de2}))[_0x220a82(0x156)][_0x220a82(0x142)];return{..._0x237c95,'id':_0x3f8f9a['replyId'],'dT':_0xca6c7f[_0x220a82(0x101)](+_0x3f8f9a['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3f8f9a[_0x220a82(0x10c)]};}else{const _0x2530ce={'memberId':_0x46757f,'unitId':_0x1eaf11,'content':_0x3d6426,'mention':_0x1d8fb1},_0x334df4=await this[_0x220a82(0x138)]['post'](_0x220a82(0x164)+_0x1eaf11+'/add',{'body':_0x2530ce});return _0x2bdf23(_0x334df4[_0x220a82(0x156)]['comment'],_0x237c95);}}async[_0xdc6cc5(0xfd)](_0x38b6c5){const _0x28076f=_0xdc6cc5;var _0x1a5258,_0x103ee6;const {text:_0x4e5ad2,unitId:_0x400b48}=_0x38b6c5,_0x3722f4=(_0x103ee6=(_0x1a5258=_0x4e5ad2[_0x28076f(0x14d)])==null?void 0x0:_0x1a5258[_0x28076f(0x122)](_0x296370=>_0x296370['rangeType']===_0xca6c7f[_0x28076f(0x16c)][_0x28076f(0x136)])[_0x28076f(0x135)](_0x2c42c2=>_0x2c42c2[_0x28076f(0x11c)]))!=null?_0x103ee6:[],_0x4cf8f6=JSON[_0x28076f(0x129)](_0x4e5ad2),_0x4c163f=_0x38b6c5[_0x28076f(0x109)],_0x3d0592=_0x38b6c5['id'],_0x49fcaf={'memberId':(await this['_sessionService'][_0x28076f(0xf2)](_0x400b48))[_0x28076f(0x15f)](),'unitId':_0x400b48,'threadId':_0x4c163f,'mention':_0x3722f4,'content':_0x4cf8f6,'replyId':_0x3d0592},_0xf56ab4=await this[_0x28076f(0x138)][_0x28076f(0x169)](_0x28076f(0x164)+_0x400b48+_0x28076f(0xf8),{'body':_0x49fcaf});return!_0xf56ab4[_0x28076f(0x156)]['error']||_0xf56ab4[_0x28076f(0x156)][_0x28076f(0x11f)]['code']===0x1;}async[_0xdc6cc5(0x16b)](_0x4101bf){const _0x154fa6=_0xdc6cc5,{unitId:_0x497d8a}=_0x4101bf,_0x203ba3=_0x4101bf['threadId'],_0x50afd7={'memberId':this[_0x154fa6(0x16a)][_0x154fa6(0x154)]()[_0x154fa6(0xe6)],'unitId':_0x497d8a,'threadId':_0x203ba3,'solved':_0x4101bf['resolved']?_0xc3551d[_0x154fa6(0x12f)]:_0xc3551d[_0x154fa6(0x13e)]},_0x3740a9=await this['_httpService'][_0x154fa6(0x169)](_0x154fa6(0x164)+_0x497d8a+_0x154fa6(0x148),{'body':_0x50afd7});return!_0x3740a9['body'][_0x154fa6(0x11f)]||_0x3740a9['body'][_0x154fa6(0x11f)][_0x154fa6(0x140)]===0x1;}async['deleteComment'](_0x58201d,_0x3b438b,_0x5d4d48,_0xb2846b){const _0xa0d6c5=_0xdc6cc5,_0x5790f3={'memberId':(await this[_0xa0d6c5(0x123)][_0xa0d6c5(0xf2)](_0x58201d))[_0xa0d6c5(0x15f)](),'threadId':_0x5d4d48,'replyId':_0xb2846b,'unitId':_0x58201d},_0x308c2f=await this[_0xa0d6c5(0x138)][_0xa0d6c5(0x169)]('/universer-api/comment/unit/'+_0x58201d+_0xa0d6c5(0xfe),{'body':_0x5790f3});return!_0x308c2f[_0xa0d6c5(0x156)][_0xa0d6c5(0x11f)]||_0x308c2f['body'][_0xa0d6c5(0x11f)][_0xa0d6c5(0x140)]===0x1;}async[_0xdc6cc5(0x157)](_0x1204f3,_0x38af33,_0x1b2d91){const _0x54125a=_0xdc6cc5,_0x3d3372={'unitId':_0x1204f3,'threadId':_0x1b2d91},_0x5e1997=await this['_httpService'][_0x54125a(0x169)](_0x54125a(0x164)+_0x1204f3+_0x54125a(0x15b),{'body':_0x3d3372}),_0x2540c5=_0x1b2d91[_0x54125a(0x135)](_0x3c0a97=>_0x155a8c(_0x5e1997[_0x54125a(0x156)][_0x54125a(0x102)][_0x3c0a97],_0x1204f3,_0x38af33))[_0x54125a(0x122)](Boolean);return Object[_0x54125a(0xed)](_0x5e1997[_0x54125a(0x156)]['users'])[_0x54125a(0x110)](_0x1542b3=>{const _0x28e284=_0x54125a;this[_0x28e284(0x16a)][_0x28e284(0x133)](_0x1542b3);}),_0x2540c5;}[_0xdc6cc5(0x13f)](_0x2bc2fc){const _0x358c7a=_0xdc6cc5;return{'id':_0x2bc2fc['id'],'threadId':_0x2bc2fc[_0x358c7a(0x109)],'ref':_0x2bc2fc[_0x358c7a(0xeb)]};}};_0x172e0d=_0x1031b2([_0xaf0bd9(0x0,_0xca6c7f[_0xdc6cc5(0x158)](_0x367759[_0xdc6cc5(0x12e)])),_0xaf0bd9(0x1,_0xca6c7f[_0xdc6cc5(0x158)](_0xca6c7f[_0xdc6cc5(0x104)])),_0xaf0bd9(0x2,_0xca6c7f[_0xdc6cc5(0x158)](_0x532cff[_0xdc6cc5(0xf0)])),_0xaf0bd9(0x3,_0xca6c7f[_0xdc6cc5(0x158)](_0xca6c7f[_0xdc6cc5(0x107)]))],_0x172e0d);var _0x11137c=Object[_0xdc6cc5(0x114)],_0x20b72d=(_0x2d2182,_0x42515b,_0x7c906c,_0x13068a)=>{for(var _0x237747=_0x13068a>0x1?void 0x0:_0x13068a?_0x11137c(_0x42515b,_0x7c906c):_0x42515b,_0x3c9c0a=_0x2d2182['length']-0x1,_0x10ac0c;_0x3c9c0a>=0x0;_0x3c9c0a--)(_0x10ac0c=_0x2d2182[_0x3c9c0a])&&(_0x237747=_0x10ac0c(_0x237747)||_0x237747);return _0x237747;},_0x17da4a=(_0x487840,_0x1ef9ce)=>(_0x2a3ffe,_0x3f966e)=>_0x1ef9ce(_0x2a3ffe,_0x3f966e,_0x487840);let _0x57c239=class extends _0xca6c7f['Disposable']{constructor(_0x10c117,_0x284f80){const _0x3868da=_0xdc6cc5;super(),this[_0x3868da(0x126)]=_0x10c117,this[_0x3868da(0xe8)]=_0x284f80,this[_0x3868da(0x137)]();}['_initDataSource'](){const _0x29445f=_0xdc6cc5;this[_0x29445f(0x126)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x29445f(0x12d)]=!0x1;}};_0x57c239=_0x20b72d([_0x17da4a(0x0,_0x58290e[_0xdc6cc5(0x10d)]),_0x17da4a(0x1,_0xca6c7f[_0xdc6cc5(0x158)](_0x172e0d))],_0x57c239);var _0x2da69f=Object[_0xdc6cc5(0xff)],_0x2b03d7=Object[_0xdc6cc5(0x114)],_0x5b6b09=(_0x2f7098,_0x1e16db,_0x51432c)=>_0x1e16db in _0x2f7098?_0x2da69f(_0x2f7098,_0x1e16db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x51432c}):_0x2f7098[_0x1e16db]=_0x51432c,_0x555fc5=(_0x484f46,_0x2a10d4,_0x3dd2b8,_0x573992)=>{for(var _0x4a96bb=_0x573992>0x1?void 0x0:_0x573992?_0x2b03d7(_0x2a10d4,_0x3dd2b8):_0x2a10d4,_0x262886=_0x484f46['length']-0x1,_0x379eab;_0x262886>=0x0;_0x262886--)(_0x379eab=_0x484f46[_0x262886])&&(_0x4a96bb=_0x379eab(_0x4a96bb)||_0x4a96bb);return _0x4a96bb;},_0x3869d3=(_0x51d82d,_0x469e63)=>(_0x7cc62d,_0x28064a)=>_0x469e63(_0x7cc62d,_0x28064a,_0x51d82d),_0x56c50d=(_0x252dee,_0x328871,_0x951ae7)=>_0x5b6b09(_0x252dee,typeof _0x328871!=_0xdc6cc5(0x13b)?_0x328871+'':_0x328871,_0x951ae7);_0x2939f7[_0xdc6cc5(0x166)]=class extends _0xca6c7f[_0xdc6cc5(0x10a)]{constructor(_0x360a62=_0xbdf5d2,_0xd59969,_0x597d0e){const _0x638abb=_0xdc6cc5;super(),this['_config']=_0x360a62,this[_0x638abb(0xee)]=_0xd59969,this['_configService']=_0x597d0e;const {..._0xcf358d}=_0xca6c7f[_0x638abb(0x161)]({},_0xbdf5d2,this[_0x638abb(0x16e)]);this[_0x638abb(0x15a)][_0x638abb(0x143)](_0x23c182,_0xcf358d);}[_0xdc6cc5(0xf1)](){const _0x3512e7=_0xdc6cc5;[[_0x172e0d],[_0x57c239],[_0x125ede]][_0x3512e7(0x110)](_0x530589=>{const _0x5b896b=_0x3512e7;this['_injector'][_0x5b896b(0x162)](_0x530589);});}[_0xdc6cc5(0x146)](){const _0x409b77=_0xdc6cc5;this[_0x409b77(0xee)][_0x409b77(0x106)](_0x57c239),this[_0x409b77(0xee)][_0x409b77(0x106)](_0x125ede);}},_0x56c50d(_0x2939f7['UniverThreadCommentDataSourcePlugin'],_0xdc6cc5(0x151),_0xdd2b1f),_0x56c50d(_0x2939f7[_0xdc6cc5(0x166)],_0xdc6cc5(0x13a),_0xca6c7f[_0xdc6cc5(0x152)][_0xdc6cc5(0x15d)]),_0x2939f7[_0xdc6cc5(0x166)]=_0x555fc5([_0xca6c7f[_0xdc6cc5(0xf6)](_0x1161d3[_0xdc6cc5(0xf9)],_0x532cff['UniverCollaborationClientPlugin'],_0x201e25[_0xdc6cc5(0xf5)]),_0x3869d3(0x1,_0xca6c7f['Inject'](_0xca6c7f[_0xdc6cc5(0x107)])),_0x3869d3(0x2,_0xca6c7f[_0xdc6cc5(0x145)])],_0x2939f7[_0xdc6cc5(0x166)]),Object[_0xdc6cc5(0xff)](_0x2939f7,Symbol[_0xdc6cc5(0x10b)],{'value':'Module'});}));
1
+ (function(_0x2656e6,_0x3f03f2){const _0x4321df=_0x648e,_0x5ba198=_0x2656e6();while(!![]){try{const _0x3b25fc=parseInt(_0x4321df(0xd5))/0x1+parseInt(_0x4321df(0x14f))/0x2+parseInt(_0x4321df(0x141))/0x3*(-parseInt(_0x4321df(0xdd))/0x4)+parseInt(_0x4321df(0xe6))/0x5+-parseInt(_0x4321df(0x13f))/0x6+-parseInt(_0x4321df(0x11c))/0x7*(-parseInt(_0x4321df(0xe2))/0x8)+-parseInt(_0x4321df(0x101))/0x9*(parseInt(_0x4321df(0x10b))/0xa);if(_0x3b25fc===_0x3f03f2)break;else _0x5ba198['push'](_0x5ba198['shift']());}catch(_0x3367dc){_0x5ba198['push'](_0x5ba198['shift']());}}}(_0x473b,0xa4718),function(_0x447fd8,_0x59db26){const _0x2e15f6=_0x648e;typeof exports==_0x2e15f6(0xd8)&&typeof module<'u'?_0x59db26(exports,require(_0x2e15f6(0x115)),require(_0x2e15f6(0x152)),require(_0x2e15f6(0xd0)),require(_0x2e15f6(0xc6)),require(_0x2e15f6(0x136)),require('rxjs'),require(_0x2e15f6(0x12d))):typeof define=='function'&&define[_0x2e15f6(0x153)]?define([_0x2e15f6(0x110),'@univerjs-pro/collaboration-client',_0x2e15f6(0x152),'@univerjs/core',_0x2e15f6(0xc6),_0x2e15f6(0x136),'rxjs',_0x2e15f6(0x12d)],_0x59db26):(_0x447fd8=typeof globalThis<'u'?globalThis:_0x447fd8||self,_0x59db26(_0x447fd8[_0x2e15f6(0xcc)]={},_0x447fd8[_0x2e15f6(0x156)],_0x447fd8[_0x2e15f6(0x120)],_0x447fd8[_0x2e15f6(0x12a)],_0x447fd8['UniverThreadCommentUi'],_0x447fd8[_0x2e15f6(0xe0)],_0x447fd8['rxjs'],_0x447fd8[_0x2e15f6(0xe3)]));}(this,function(_0x5743f9,_0x42d533,_0x4d35d8,_0x103e59,_0x3754b2,_0x17908e,_0x41ef24,_0x5810d8){'use strict';const _0x120190=_0x648e;const _0x278f2b=_0x120190(0xc7);var _0x3451b8=(_0x2197cb=>(_0x2197cb[_0x2197cb['OpenOrReOpen']=0x0]=_0x120190(0xf1),_0x2197cb[_0x2197cb[_0x120190(0xcd)]=0x1]=_0x120190(0xcd),_0x2197cb[_0x2197cb[_0x120190(0x155)]=-0x1]='UNRECOGNIZED',_0x2197cb))(_0x3451b8||{}),_0x2c46a1=(_0x51f2a7=>(_0x51f2a7[_0x51f2a7[_0x120190(0x12e)]=0x0]='Unknown',_0x51f2a7[_0x51f2a7[_0x120190(0x107)]=0x1]=_0x120190(0x107),_0x51f2a7[_0x51f2a7[_0x120190(0x149)]=0x2]=_0x120190(0x149),_0x51f2a7[_0x51f2a7[_0x120190(0xf4)]=0x3]=_0x120190(0xf4),_0x51f2a7[_0x51f2a7[_0x120190(0xde)]=0x4]=_0x120190(0xde),_0x51f2a7[_0x51f2a7[_0x120190(0xf7)]=0x5]=_0x120190(0xf7),_0x51f2a7[_0x51f2a7[_0x120190(0x155)]=-0x1]=_0x120190(0x155),_0x51f2a7))(_0x2c46a1||{});const _0x310eac=_0x2ff319=>_0x103e59['dayjs'](new Date(+_0x2ff319))[_0x120190(0xd2)](_0x120190(0x123)),_0x6cec57=async(_0x43355e,_0x384b2e)=>{const _0x544217=_0x120190,_0x55473c=_0x43355e['get'](_0x103e59[_0x544217(0xea)]),_0xa94282=_0x43355e['get'](_0x5810d8[_0x544217(0xff)]);_0x384b2e[_0x544217(0xe5)](_0x9a3e71=>{const _0x428f5f=_0x544217;_0x55473c[_0x428f5f(0x105)](_0x9a3e71)&&_0x384b2e[_0x428f5f(0x114)](_0x9a3e71);}),_0x384b2e[_0x544217(0x12b)]&&(await _0xa94282[_0x544217(0x121)](_0x544217(0x144),{'params':{'userIDs':[..._0x384b2e]}}))[_0x544217(0x112)][_0x544217(0x111)][_0x544217(0xe5)](_0x3a3c91=>{const _0x273d72=_0x544217;_0x3a3c91&&_0x55473c[_0x273d72(0x10e)](_0x3a3c91);});};var _0x45bb36=Object[_0x120190(0x137)],_0x55e6db=(_0x2606ff,_0xcbb7a8,_0x3ccdac,_0x3c426b)=>{for(var _0x4c9e35=_0x3c426b>0x1?void 0x0:_0x3c426b?_0x45bb36(_0xcbb7a8,_0x3ccdac):_0xcbb7a8,_0x188731=_0x2606ff['length']-0x1,_0x3902ac;_0x188731>=0x0;_0x188731--)(_0x3902ac=_0x2606ff[_0x188731])&&(_0x4c9e35=_0x3902ac(_0x4c9e35)||_0x4c9e35);return _0x4c9e35;},_0x1d1348=(_0x148d3b,_0x3609c3)=>(_0x2d9606,_0x5f059f)=>_0x3609c3(_0x2d9606,_0x5f059f,_0x148d3b);let _0x2345db=class extends _0x103e59[_0x120190(0x151)]{constructor(_0x5988bc,_0x4bd380,_0xa747b8,_0x5b3931){const _0xb90e11=_0x120190;super(),this[_0xb90e11(0xd4)]=_0x5988bc,this[_0xb90e11(0xd9)]=_0x4bd380,this[_0xb90e11(0x154)]=_0xa747b8,this[_0xb90e11(0x146)]=_0x5b3931,this['_init'](),this[_0xb90e11(0x131)]();}[_0x120190(0x131)](){const _0x50626f=_0x120190;this[_0x50626f(0xdc)](this[_0x50626f(0xd9)][_0x50626f(0x135)][_0x50626f(0x143)](_0x41ef24[_0x50626f(0x11a)](0x10))[_0x50626f(0x142)](_0x567c92=>{const _0x50099a=_0x50626f,_0x407d5e=new Set();_0x567c92[_0x50099a(0xe5)](_0x40df28=>{const _0x3148af=_0x50099a;switch(_0x40df28[_0x3148af(0x10a)]){case _0x3148af(0x106):{const _0x58bd94=_0x40df28[_0x3148af(0x150)][_0x3148af(0x145)];_0x407d5e[_0x3148af(0x106)](_0x58bd94);break;}}}),_0x6cec57(this[_0x50099a(0x146)],_0x407d5e);}));}[_0x120190(0x11d)](){const _0x17a987=_0x120190;this[_0x17a987(0xdc)](this['_commentService'][_0x17a987(0x135)]['subscribe'](async _0x22503d=>{const _0x3597f8=_0x17a987;var _0x71dca9,_0x3ff773,_0x3ff4da,_0x398753;const _0x3f6fc5=(_0x71dca9=this['_threadCommentModel'][_0x3597f8(0x128)](_0x22503d[_0x3597f8(0xf3)])['find'](_0x38fc35=>_0x38fc35['threadId']===_0x22503d[_0x3597f8(0xeb)]))==null?void 0x0:_0x71dca9[_0x3597f8(0x138)];if(!_0x3f6fc5)return;const {unitId:_0x5d9127,subUnitId:_0x36424d}=_0x3f6fc5;switch(_0x22503d[_0x3597f8(0x12c)]&&this[_0x3597f8(0x154)]['addUser'](_0x22503d[_0x3597f8(0x12c)]),_0x22503d[_0x3597f8(0x10a)]){case _0x2c46a1[_0x3597f8(0x107)]:break;case _0x2c46a1[_0x3597f8(0x149)]:{this[_0x3597f8(0xd9)][_0x3597f8(0xfb)](_0x5d9127,_0x36424d,{'unitId':_0x5d9127,'subUnitId':_0x36424d,'ref':'','id':_0x22503d[_0x3597f8(0xef)],'dT':_0x310eac(+_0x22503d[_0x3597f8(0xd1)]),'threadId':_0x22503d[_0x3597f8(0xeb)],'personId':(_0x3ff4da=(_0x3ff773=_0x22503d[_0x3597f8(0x12c)])==null?void 0x0:_0x3ff773[_0x3597f8(0xe9)])!=null?_0x3ff4da:_0x22503d[_0x3597f8(0x12f)],'text':JSON[_0x3597f8(0x122)](_0x22503d[_0x3597f8(0x11b)]),'parentId':_0x3f6fc5['id']});break;}case _0x2c46a1['Delete']:{const _0x37ae60=this[_0x3597f8(0xd9)]['getComment'](_0x5d9127,_0x36424d,_0x22503d[_0x3597f8(0xef)]);_0x37ae60&&_0x37ae60[_0x3597f8(0xf9)]&&this[_0x3597f8(0xd9)][_0x3597f8(0xc8)](_0x5d9127,_0x36424d,_0x22503d[_0x3597f8(0xef)]);break;}case _0x2c46a1['Edit']:{this['_threadCommentModel'][_0x3597f8(0x139)](_0x5d9127,_0x36424d,{'commentId':_0x22503d[_0x3597f8(0xef)],'text':JSON[_0x3597f8(0x122)](_0x22503d[_0x3597f8(0x11b)])});break;}case _0x2c46a1['Solve']:{const _0x23a2c4=(_0x398753=this[_0x3597f8(0xd9)][_0x3597f8(0x128)](_0x22503d[_0x3597f8(0xf3)])[_0x3597f8(0xfe)](_0x4ef279=>_0x4ef279[_0x3597f8(0xeb)]===_0x22503d['threadId']))==null?void 0x0:_0x398753[_0x3597f8(0x138)];_0x23a2c4&&this[_0x3597f8(0xd9)][_0x3597f8(0x127)](_0x5d9127,_0x36424d,_0x23a2c4['id'],_0x22503d[_0x3597f8(0x14a)]===_0x3451b8[_0x3597f8(0xcd)]);break;}}}));}};_0x2345db=_0x55e6db([_0x1d1348(0x0,_0x103e59[_0x120190(0xdf)](_0x42d533[_0x120190(0xf8)])),_0x1d1348(0x1,_0x103e59['Inject'](_0x17908e[_0x120190(0x126)])),_0x1d1348(0x2,_0x103e59[_0x120190(0xdf)](_0x103e59[_0x120190(0xea)])),_0x1d1348(0x3,_0x103e59['Inject'](_0x103e59[_0x120190(0x108)]))],_0x2345db);const _0x27a003=_0x120190(0x109),_0x10c1d8={};var _0x1ac7fe=Object['getOwnPropertyDescriptor'],_0x1af39e=(_0x2fae8e,_0x214548,_0x19205a,_0x1a6329)=>{for(var _0x399e9c=_0x1a6329>0x1?void 0x0:_0x1a6329?_0x1ac7fe(_0x214548,_0x19205a):_0x214548,_0x3b01ea=_0x2fae8e['length']-0x1,_0x2a6629;_0x3b01ea>=0x0;_0x3b01ea--)(_0x2a6629=_0x2fae8e[_0x3b01ea])&&(_0x399e9c=_0x2a6629(_0x399e9c)||_0x399e9c);return _0x399e9c;},_0xaa0980=(_0x6de5c9,_0x4dc2da)=>(_0x5b9b5c,_0x48593f)=>_0x4dc2da(_0x5b9b5c,_0x48593f,_0x6de5c9);function _0xce977(_0x1a96c9,_0x278783){const _0x9f22d=_0x120190,_0x3839b2=_0x1a96c9['replies'][0x0];return{..._0x278783,'id':_0x3839b2[_0x9f22d(0xef)],'resolved':_0x1a96c9['solved']===0x1,'dT':_0x310eac(_0x3839b2['createTimestamp']),'personId':_0x3839b2[_0x9f22d(0x12f)],'threadId':_0x3839b2[_0x9f22d(0xeb)]};}function _0x1c696d(_0x9b949,_0x196b74,_0x99d675){const _0x587699=_0x120190;var _0x153ebd,_0x33b98c;if(((_0x33b98c=(_0x153ebd=_0x9b949==null?void 0x0:_0x9b949[_0x587699(0x13c)])==null?void 0x0:_0x153ebd[_0x587699(0x117)])!=null?_0x33b98c:0x0)>0x0){const _0x280b96=(_0xc3d822,_0x3da1e4)=>({'id':_0xc3d822['replyId'],'threadId':_0xc3d822[_0x587699(0xeb)],'dT':_0x310eac(_0xc3d822['createTimestamp']),'personId':_0xc3d822['userId'],'resolved':_0x9b949[_0x587699(0x14a)]===_0x3451b8[_0x587699(0xcd)],'unitId':_0x196b74,'subUnitId':_0x99d675,'text':JSON[_0x587699(0x122)](_0xc3d822[_0x587699(0x11b)]),'parentId':_0x3da1e4}),_0x2ac894=_0x280b96(_0x9b949['replies'][0x0]);return{..._0x2ac894,'children':_0x9b949[_0x587699(0x13c)][_0x587699(0xe1)](0x1)[_0x587699(0x113)](_0x30485d=>_0x280b96(_0x30485d,_0x2ac894['id']))};}return null;}let _0x146d55=class{constructor(_0x3d8349,_0x2a06cc,_0x5b8465,_0x29f2f6){const _0x1d74d9=_0x120190;this[_0x1d74d9(0x103)]=_0x3d8349,this[_0x1d74d9(0x154)]=_0x2a06cc,this[_0x1d74d9(0xee)]=_0x5b8465,this['_injector']=_0x29f2f6;}async[_0x120190(0xfb)](_0x70ae7){const _0x3ba9ec=_0x120190;var _0x19eecd,_0x12aaa8;const {parentId:_0x490bc4,unitId:_0x15f4bc,text:_0x1a2d2d,threadId:_0x1e89f5}=_0x70ae7,_0x46ab92=(_0x12aaa8=(_0x19eecd=_0x1a2d2d[_0x3ba9ec(0xcb)])==null?void 0x0:_0x19eecd[_0x3ba9ec(0x13a)](_0x299ae7=>_0x299ae7[_0x3ba9ec(0xd7)]===_0x103e59[_0x3ba9ec(0x13b)][_0x3ba9ec(0x100)])[_0x3ba9ec(0x113)](_0xbbfe10=>_0xbbfe10['rangeId']))!=null?_0x12aaa8:[],_0x4e8c5d=JSON[_0x3ba9ec(0x133)](_0x1a2d2d),_0x44fba1=(await this[_0x3ba9ec(0xee)][_0x3ba9ec(0x134)](_0x15f4bc))[_0x3ba9ec(0xe7)]();if(_0x490bc4){const _0x2e0a83={'memberId':_0x44fba1,'unitId':_0x15f4bc,'content':_0x4e8c5d,'mention':_0x46ab92,'threadId':_0x1e89f5},_0x141f9e=(await this[_0x3ba9ec(0x103)]['post']('/universer-api/comment/unit/'+_0x15f4bc+'/reply',{'body':_0x2e0a83}))['body'][_0x3ba9ec(0xec)];return{..._0x70ae7,'id':_0x141f9e[_0x3ba9ec(0xef)],'dT':_0x103e59[_0x3ba9ec(0x10d)](+_0x141f9e[_0x3ba9ec(0xd1)])[_0x3ba9ec(0xd2)](_0x3ba9ec(0x123)),'personId':_0x141f9e[_0x3ba9ec(0x12f)]};}else{const _0x132e16={'memberId':_0x44fba1,'unitId':_0x15f4bc,'content':_0x4e8c5d,'mention':_0x46ab92},_0x5c512a=await this['_httpService']['post'](_0x3ba9ec(0xf6)+_0x15f4bc+_0x3ba9ec(0x104),{'body':_0x132e16});return _0xce977(_0x5c512a['body'][_0x3ba9ec(0x116)],_0x70ae7);}}async[_0x120190(0x139)](_0x1c1b00){const _0x9c3b9e=_0x120190;var _0x4d63a5,_0xef9ea4;const {text:_0x65f94,unitId:_0x245aeb}=_0x1c1b00,_0x1cbb6a=(_0xef9ea4=(_0x4d63a5=_0x65f94[_0x9c3b9e(0xcb)])==null?void 0x0:_0x4d63a5[_0x9c3b9e(0x13a)](_0x4ad339=>_0x4ad339[_0x9c3b9e(0xd7)]===_0x103e59[_0x9c3b9e(0x13b)][_0x9c3b9e(0x100)])['map'](_0x92fcbe=>_0x92fcbe['rangeId']))!=null?_0xef9ea4:[],_0x325fee=JSON[_0x9c3b9e(0x133)](_0x65f94),_0x3b31ba=_0x1c1b00['threadId'],_0x41507b=_0x1c1b00['id'],_0x18941d={'memberId':(await this[_0x9c3b9e(0xee)][_0x9c3b9e(0x134)](_0x245aeb))[_0x9c3b9e(0xe7)](),'unitId':_0x245aeb,'threadId':_0x3b31ba,'mention':_0x1cbb6a,'content':_0x325fee,'replyId':_0x41507b},_0x1c6262=await this[_0x9c3b9e(0x103)][_0x9c3b9e(0x14b)](_0x9c3b9e(0xf6)+_0x245aeb+_0x9c3b9e(0x129),{'body':_0x18941d});return!_0x1c6262['body']['error']||_0x1c6262['body'][_0x9c3b9e(0xf2)]['code']===0x1;}async[_0x120190(0x127)](_0x143a16){const _0x566b5f=_0x120190,{unitId:_0x711688}=_0x143a16,_0x2da232=_0x143a16['threadId'],_0x18f6f9={'memberId':this[_0x566b5f(0x154)][_0x566b5f(0xe8)]()[_0x566b5f(0xe9)],'unitId':_0x711688,'threadId':_0x2da232,'solved':_0x143a16[_0x566b5f(0x125)]?_0x3451b8[_0x566b5f(0xcd)]:_0x3451b8['OpenOrReOpen']},_0x2c4505=await this[_0x566b5f(0x103)][_0x566b5f(0x14b)]('/universer-api/comment/unit/'+_0x711688+_0x566b5f(0xca),{'body':_0x18f6f9});return!_0x2c4505[_0x566b5f(0x112)][_0x566b5f(0xf2)]||_0x2c4505[_0x566b5f(0x112)][_0x566b5f(0xf2)][_0x566b5f(0xfd)]===0x1;}async[_0x120190(0xc8)](_0x321184,_0x41faed,_0x3d6b94,_0x1f8cb1){const _0x377b4f=_0x120190,_0x4455d2={'memberId':(await this[_0x377b4f(0xee)][_0x377b4f(0x134)](_0x321184))['getMemberID'](),'threadId':_0x3d6b94,'replyId':_0x1f8cb1,'unitId':_0x321184},_0x4726c4=await this[_0x377b4f(0x103)][_0x377b4f(0x14b)](_0x377b4f(0xf6)+_0x321184+_0x377b4f(0x10f),{'body':_0x4455d2});return!_0x4726c4[_0x377b4f(0x112)][_0x377b4f(0xf2)]||_0x4726c4[_0x377b4f(0x112)]['error'][_0x377b4f(0xfd)]===0x1;}async[_0x120190(0x148)](_0x52c146,_0x1a17cf,_0x46642b){const _0x47af31=_0x120190,_0x10188d={'unitId':_0x52c146,'threadId':_0x46642b},_0x255f4b=await this[_0x47af31(0x103)][_0x47af31(0x14b)](_0x47af31(0xf6)+_0x52c146+'/list',{'body':_0x10188d}),_0x460b9e=_0x46642b['map'](_0x432393=>_0x1c696d(_0x255f4b[_0x47af31(0x112)][_0x47af31(0xed)][_0x432393],_0x52c146,_0x1a17cf))['filter'](Boolean);return Object[_0x47af31(0x119)](_0x255f4b[_0x47af31(0x112)][_0x47af31(0x111)])['forEach'](_0xcde693=>{const _0x4df124=_0x47af31;this['_userService'][_0x4df124(0x10e)](_0xcde693);}),_0x460b9e;}[_0x120190(0xd6)](_0x4e58dd){const _0x1042a6=_0x120190;return{'id':_0x4e58dd['id'],'threadId':_0x4e58dd[_0x1042a6(0xeb)],'ref':_0x4e58dd[_0x1042a6(0xfa)]};}};_0x146d55=_0x1af39e([_0xaa0980(0x0,_0x103e59[_0x120190(0xdf)](_0x5810d8[_0x120190(0xff)])),_0xaa0980(0x1,_0x103e59[_0x120190(0xdf)](_0x103e59[_0x120190(0xea)])),_0xaa0980(0x2,_0x103e59[_0x120190(0xdf)](_0x42d533[_0x120190(0xce)])),_0xaa0980(0x3,_0x103e59[_0x120190(0xdf)](_0x103e59['Injector']))],_0x146d55);var _0x2ffaf1=Object['getOwnPropertyDescriptor'],_0x536568=(_0x4c9fe0,_0x319122,_0x2c945a,_0x5c4e05)=>{const _0x2e6cd1=_0x120190;for(var _0x393ec8=_0x5c4e05>0x1?void 0x0:_0x5c4e05?_0x2ffaf1(_0x319122,_0x2c945a):_0x319122,_0x354dea=_0x4c9fe0[_0x2e6cd1(0x117)]-0x1,_0x5c87ae;_0x354dea>=0x0;_0x354dea--)(_0x5c87ae=_0x4c9fe0[_0x354dea])&&(_0x393ec8=_0x5c87ae(_0x393ec8)||_0x393ec8);return _0x393ec8;},_0x459d68=(_0x2393de,_0x59b50d)=>(_0x5ba456,_0x24a005)=>_0x59b50d(_0x5ba456,_0x24a005,_0x2393de);let _0x5886e1=class extends _0x103e59[_0x120190(0x151)]{constructor(_0x4ba2b4,_0x5864ec){const _0x305bef=_0x120190;super(),this[_0x305bef(0x13e)]=_0x4ba2b4,this['_threadCommentDataSource']=_0x5864ec,this[_0x305bef(0xd3)]();}[_0x120190(0xd3)](){const _0x3abfcc=_0x120190;this[_0x3abfcc(0x13e)][_0x3abfcc(0x118)]=this[_0x3abfcc(0x147)],this[_0x3abfcc(0x13e)][_0x3abfcc(0xda)]=!0x1;}};_0x5886e1=_0x536568([_0x459d68(0x0,_0x17908e[_0x120190(0x13d)]),_0x459d68(0x1,_0x103e59[_0x120190(0xdf)](_0x146d55))],_0x5886e1);var _0x3a6eea=Object[_0x120190(0x11f)],_0x1a3b56=Object[_0x120190(0x137)],_0x6ec9f2=(_0x2d9eff,_0x514525,_0x4ad2a4)=>_0x514525 in _0x2d9eff?_0x3a6eea(_0x2d9eff,_0x514525,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ad2a4}):_0x2d9eff[_0x514525]=_0x4ad2a4,_0x682c99=(_0x265abd,_0x4c0e08,_0xecc90,_0x4981e6)=>{const _0x84f41d=_0x120190;for(var _0x476346=_0x4981e6>0x1?void 0x0:_0x4981e6?_0x1a3b56(_0x4c0e08,_0xecc90):_0x4c0e08,_0x1a475f=_0x265abd[_0x84f41d(0x117)]-0x1,_0x397cbe;_0x1a475f>=0x0;_0x1a475f--)(_0x397cbe=_0x265abd[_0x1a475f])&&(_0x476346=_0x397cbe(_0x476346)||_0x476346);return _0x476346;},_0x4168a6=(_0x3ef15f,_0x108d58)=>(_0x54e5ec,_0x567684)=>_0x108d58(_0x54e5ec,_0x567684,_0x3ef15f),_0x385161=(_0x16fc90,_0x1a53dd,_0x762210)=>_0x6ec9f2(_0x16fc90,typeof _0x1a53dd!=_0x120190(0xe4)?_0x1a53dd+'':_0x1a53dd,_0x762210);_0x5743f9[_0x120190(0x132)]=class extends _0x103e59[_0x120190(0xfc)]{constructor(_0xbd8967=_0x10c1d8,_0x132459,_0x43f4b2){const _0x51924d=_0x120190;super(),this[_0x51924d(0xcf)]=_0xbd8967,this[_0x51924d(0x146)]=_0x132459,this[_0x51924d(0x11e)]=_0x43f4b2;const {..._0x2a8898}=_0x103e59['merge']({},_0x10c1d8,this[_0x51924d(0xcf)]);this[_0x51924d(0x11e)][_0x51924d(0x14d)](_0x27a003,_0x2a8898);}[_0x120190(0x130)](){const _0x279232=_0x120190;[[_0x146d55],[_0x5886e1],[_0x2345db]][_0x279232(0xe5)](_0x4f8aa7=>{const _0x6160f6=_0x279232;this[_0x6160f6(0x146)][_0x6160f6(0x106)](_0x4f8aa7);});}[_0x120190(0x140)](){const _0x5075e4=_0x120190;this[_0x5075e4(0x146)][_0x5075e4(0x121)](_0x5886e1),this[_0x5075e4(0x146)][_0x5075e4(0x121)](_0x2345db);}},_0x385161(_0x5743f9['UniverThreadCommentDataSourcePlugin'],_0x120190(0x10c),_0x278f2b),_0x385161(_0x5743f9[_0x120190(0x132)],'type',_0x103e59[_0x120190(0xc9)][_0x120190(0xf5)]),_0x5743f9[_0x120190(0x132)]=_0x682c99([_0x103e59[_0x120190(0x14e)](_0x3754b2[_0x120190(0x102)],_0x42d533[_0x120190(0x14c)],_0x4d35d8[_0x120190(0xdb)]),_0x4168a6(0x1,_0x103e59[_0x120190(0xdf)](_0x103e59[_0x120190(0x108)])),_0x4168a6(0x2,_0x103e59[_0x120190(0x124)])],_0x5743f9[_0x120190(0x132)]),Object[_0x120190(0x11f)](_0x5743f9,Symbol[_0x120190(0xf0)],{'value':'Module'});}));function _0x648e(_0x14574f,_0x43aa93){const _0x473b28=_0x473b();return _0x648e=function(_0x648e5,_0x33c204){_0x648e5=_0x648e5-0xc6;let _0x56200a=_0x473b28[_0x648e5];return _0x56200a;},_0x648e(_0x14574f,_0x43aa93);}function _0x473b(){const _0x57219a=['UniverCollaborationClientPlugin','setConfig','DependentOn','1644074WGRNWu','payload','Disposable','@univerjs-pro/license','amd','_userService','UNRECOGNIZED','UniverProCollaborationClient','@univerjs/thread-comment-ui','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','deleteComment','UniverInstanceType','/solved','customRanges','UniverProThreadCommentDatasource','Solved','CollaborationSessionService','_config','@univerjs/core','createTimestamp','format','_initDataSource','_commentService','665848SkWWgP','saveCommentToSnapshot','rangeType','object','_threadCommentModel','syncUpdateMutationToColla','UniverLicensePlugin','disposeWithMe','361540rCsOlq','Delete','Inject','UniverThreadComment','slice','8KwmfdQ','UniverNetwork','symbol','forEach','6684890wqdqTS','getMemberID','getCurrentUser','userID','UserManagerService','threadId','reply','comments','_sessionService','replyId','toStringTag','OpenOrReOpen','error','unitId','Edit','UNIVER_UNKNOWN','/universer-api/comment/unit/','Solve','CommentService','parentId','ref','addComment','Plugin','code','find','HTTPService','COMMENT','531uDCIvG','UniverThreadCommentUIPlugin','_httpService','/add','getUser','add','Add','Injector','thread-comment-data-source.config','type','292280SqZMMY','pluginName','dayjs','addUser','/delete','exports','users','body','map','delete','@univerjs-pro/collaboration-client','comment','length','dataSource','values','bufferTime','content','1501822MgBnFT','_init','_configService','defineProperty','UniverProLicense','get','parse','YYYY/MM/DD\x20HH:mm','IConfigService','resolved','ThreadCommentModel','resolveComment','getUnit','/edit','UniverCore','size','user','@univerjs/network','Unknown','userId','onStarting','_initUserSync','UniverThreadCommentDataSourcePlugin','stringify','requireSession','commentUpdate$','@univerjs/thread-comment','getOwnPropertyDescriptor','root','updateComment','filter','CustomRangeType','replies','IThreadCommentDataSourceService','_threadCommentDataSourceService','3306072ABHwdp','onReady','3gMzUaj','subscribe','pipe','/universer-api/user/list','personId','_injector','_threadCommentDataSource','listComments','Reply','solved','post'];_0x473b=function(){return _0x57219a;};return _0x473b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504101607",
3
+ "version": "0.6.10-nightly.202504111607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504101607",
49
- "@univerjs-pro/license": "0.6.10-nightly.202504101607",
50
- "@univerjs/network": "0.6.10-nightly.202504101607",
51
- "@univerjs/core": "0.6.10-nightly.202504101607",
52
- "@univerjs/thread-comment": "0.6.10-nightly.202504101607",
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504111607",
49
+ "@univerjs-pro/license": "0.6.10-nightly.202504111607",
50
+ "@univerjs/core": "0.6.10-nightly.202504111607",
51
+ "@univerjs/network": "0.6.10-nightly.202504111607",
53
52
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504101607"
53
+ "@univerjs/thread-comment": "0.6.10-nightly.202504111607",
54
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504111607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",