@univerjs-pro/thread-comment-datasource 0.9.2 → 0.9.3-nightly.202507250750

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x154d(_0x964fa3,_0x4b2814){const _0x27bfea=_0x27bf();return _0x154d=function(_0x154da2,_0x1f5e06){_0x154da2=_0x154da2-0xf8;let _0x283ff9=_0x27bfea[_0x154da2];return _0x283ff9;},_0x154d(_0x964fa3,_0x4b2814);}const _0x1cdece=_0x154d;(function(_0x4a1b3e,_0x55a7a5){const _0x4038c3=_0x154d,_0x42aba7=_0x4a1b3e();while(!![]){try{const _0x3378f1=parseInt(_0x4038c3(0x110))/0x1+parseInt(_0x4038c3(0x11f))/0x2+parseInt(_0x4038c3(0x12d))/0x3+parseInt(_0x4038c3(0x101))/0x4+parseInt(_0x4038c3(0x141))/0x5+parseInt(_0x4038c3(0x122))/0x6*(-parseInt(_0x4038c3(0x115))/0x7)+parseInt(_0x4038c3(0x160))/0x8*(-parseInt(_0x4038c3(0x12f))/0x9);if(_0x3378f1===_0x55a7a5)break;else _0x42aba7['push'](_0x42aba7['shift']());}catch(_0x5128ee){_0x42aba7['push'](_0x42aba7['shift']());}}}(_0x27bf,0x712ab));Object[_0x1cdece(0x12e)](exports,Symbol[_0x1cdece(0x111)],{'value':_0x1cdece(0x134)});function _0x27bf(){const _0x29c928=['Inject','body','1925574vRjHuN','_threadCommentDataSourceService','length','unitId','bufferTime','commentUpdate$','replies','payload','getComment','Delete','add','487335uwUWyG','defineProperty','9RGlLtV','Plugin','/universer-api/comment/unit/','type','replyId','Module','size','IThreadCommentDataSourceService','disposeWithMe','_threadCommentDataSource','updateComment','/add','_configService','/delete','rangeType','/solved','_sessionService','customRanges','361145BryIfe','OpenOrReOpen','filter','COMMENT','comment','userId','Unknown','CustomRangeType','_threadCommentModel','threadId','DependentOn','UniverThreadCommentDataSourcePlugin','userID','user','reply','YYYY/MM/DD\x20HH:mm','dataSource','UNRECOGNIZED','UniverThreadCommentUIPlugin','error','onStarting','_injector','_httpService','addComment','thread-comment-data-source.config','UniverInstanceType','getMemberID','/list','subscribe','requireSession','addUser','4485752aiYdZy','post','Disposable','_commentService','parentId','listComments','Solved','map','UNIVER_UNKNOWN','deleteComment','root','CollaborationSessionService','IConfigService','getUnit','UserManagerService','format','_initDataSource','CommentService','syncUpdateMutationToColla','dayjs','getOwnPropertyDescriptor','createTimestamp','solved','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','1414984EDOTdi','Edit','forEach','get','resolved','HTTPService','Add','code','slice','getCurrentUser','rangeId','content','Reply','_config','setConfig','265910WrinAP','toStringTag','Injector','find','_initUserSync','14osAUJY','UniverLicensePlugin','onReady','pluginName','_userService','stringify','Solve','pipe','comments','/universer-api/user/list','1623556ZlRzjx'];_0x27bf=function(){return _0x29c928;};return _0x27bf();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1cdece(0xff);var I=(_0x9b81c8=>(_0x9b81c8[_0x9b81c8[_0x1cdece(0x142)]=0x0]=_0x1cdece(0x142),_0x9b81c8[_0x9b81c8['Solved']=0x1]=_0x1cdece(0x166),_0x9b81c8[_0x9b81c8['UNRECOGNIZED']=-0x1]=_0x1cdece(0x152),_0x9b81c8))(I||{}),v=(_0x498ae7=>(_0x498ae7[_0x498ae7[_0x1cdece(0x147)]=0x0]=_0x1cdece(0x147),_0x498ae7[_0x498ae7[_0x1cdece(0x107)]=0x1]=_0x1cdece(0x107),_0x498ae7[_0x498ae7[_0x1cdece(0x10d)]=0x2]=_0x1cdece(0x10d),_0x498ae7[_0x498ae7[_0x1cdece(0x102)]=0x3]=_0x1cdece(0x102),_0x498ae7[_0x498ae7['Delete']=0x4]=_0x1cdece(0x12b),_0x498ae7[_0x498ae7[_0x1cdece(0x11b)]=0x5]=_0x1cdece(0x11b),_0x498ae7[_0x498ae7[_0x1cdece(0x152)]=-0x1]=_0x1cdece(0x152),_0x498ae7))(v||{});const f=_0x205ced=>c[_0x1cdece(0xfa)](new Date(+_0x205ced))[_0x1cdece(0x16f)](_0x1cdece(0x150)),R=async(_0x2160ae,_0x13f704)=>{const _0x2f4b7a=_0x1cdece,_0x41e62a=_0x2160ae[_0x2f4b7a(0x104)](c[_0x2f4b7a(0x16e)]),_0x39b5d9=_0x2160ae[_0x2f4b7a(0x104)](P[_0x2f4b7a(0x106)]);_0x13f704[_0x2f4b7a(0x103)](_0x47ec22=>{const _0x217a33=_0x2f4b7a;_0x41e62a[_0x217a33(0xfe)](_0x47ec22)&&_0x13f704['delete'](_0x47ec22);}),_0x13f704[_0x2f4b7a(0x135)]&&(await _0x39b5d9[_0x2f4b7a(0x104)](_0x2f4b7a(0x11e),{'params':{'userIDs':[..._0x13f704]}}))['body']['users'][_0x2f4b7a(0x103)](_0x1297ad=>{const _0x58ab69=_0x2f4b7a;_0x1297ad&&_0x41e62a[_0x58ab69(0x15f)](_0x1297ad);});};var $=Object[_0x1cdece(0xfb)],E=(_0x2d9da3,_0x460848,_0x1e027e,_0x12ab78)=>{for(var _0x532b86=_0x12ab78>0x1?void 0x0:_0x12ab78?$(_0x460848,_0x1e027e):_0x460848,_0x326f93=_0x2d9da3['length']-0x1,_0x1211ff;_0x326f93>=0x0;_0x326f93--)(_0x1211ff=_0x2d9da3[_0x326f93])&&(_0x532b86=_0x1211ff(_0x532b86)||_0x532b86);return _0x532b86;},S=(_0x4e48ca,_0x50a9d9)=>(_0x1c3054,_0x3ff8cc)=>_0x50a9d9(_0x1c3054,_0x3ff8cc,_0x4e48ca);let p=class extends c['Disposable']{constructor(_0x5e66ba,_0x3cdf92,_0x3b7156,_0x2a1d42){const _0x1fb3a4=_0x1cdece;super(),this[_0x1fb3a4(0x163)]=_0x5e66ba,this[_0x1fb3a4(0x149)]=_0x3cdf92,this[_0x1fb3a4(0x119)]=_0x3b7156,this[_0x1fb3a4(0x156)]=_0x2a1d42,this[_0x1fb3a4(0x100)](),this[_0x1fb3a4(0x114)]();}[_0x1cdece(0x114)](){const _0x4cd5a5=_0x1cdece;this[_0x4cd5a5(0x137)](this[_0x4cd5a5(0x149)][_0x4cd5a5(0x127)][_0x4cd5a5(0x11c)](w[_0x4cd5a5(0x126)](0x10))['subscribe'](_0x4f99b9=>{const _0x130571=_0x4cd5a5,_0x5a8002=new Set();_0x4f99b9[_0x130571(0x103)](_0x31c19c=>{const _0x681396=_0x130571;switch(_0x31c19c[_0x681396(0x132)]){case _0x681396(0x12c):{const _0x6e8a49=_0x31c19c[_0x681396(0x129)]['personId'];_0x5a8002[_0x681396(0x12c)](_0x6e8a49);break;}}}),R(this[_0x130571(0x156)],_0x5a8002);}));}[_0x1cdece(0x100)](){const _0x4e8600=_0x1cdece;this[_0x4e8600(0x137)](this[_0x4e8600(0x163)][_0x4e8600(0x127)][_0x4e8600(0x15d)](async _0x3858a3=>{const _0x217a7e=_0x4e8600;var _0x166ff9,_0x3185a1,_0x44375f,_0x447faf;const _0x4982d3=(_0x166ff9=this[_0x217a7e(0x149)][_0x217a7e(0x16d)](_0x3858a3[_0x217a7e(0x125)])[_0x217a7e(0x113)](_0x5e911f=>_0x5e911f[_0x217a7e(0x14a)]===_0x3858a3['threadId']))==null?void 0x0:_0x166ff9[_0x217a7e(0x16a)];if(!_0x4982d3)return;const {unitId:_0x313877,subUnitId:_0x596427}=_0x4982d3;switch(_0x3858a3[_0x217a7e(0x14e)]&&this['_userService'][_0x217a7e(0x15f)](_0x3858a3[_0x217a7e(0x14e)]),_0x3858a3[_0x217a7e(0x132)]){case v[_0x217a7e(0x107)]:break;case v[_0x217a7e(0x10d)]:{this['_threadCommentModel'][_0x217a7e(0x158)](_0x313877,_0x596427,{'unitId':_0x313877,'subUnitId':_0x596427,'ref':'','id':_0x3858a3[_0x217a7e(0x133)],'dT':f(+_0x3858a3['createTimestamp']),'threadId':_0x3858a3[_0x217a7e(0x14a)],'personId':(_0x44375f=(_0x3185a1=_0x3858a3['user'])==null?void 0x0:_0x3185a1[_0x217a7e(0x14d)])!=null?_0x44375f:_0x3858a3[_0x217a7e(0x146)],'text':JSON['parse'](_0x3858a3[_0x217a7e(0x10c)]),'parentId':_0x4982d3['id']});break;}case v[_0x217a7e(0x12b)]:{const _0x3f3ddb=this[_0x217a7e(0x149)][_0x217a7e(0x12a)](_0x313877,_0x596427,_0x3858a3['replyId']);_0x3f3ddb&&_0x3f3ddb[_0x217a7e(0x164)]&&this['_threadCommentModel']['deleteComment'](_0x313877,_0x596427,_0x3858a3[_0x217a7e(0x133)]);break;}case v[_0x217a7e(0x102)]:{this[_0x217a7e(0x149)][_0x217a7e(0x139)](_0x313877,_0x596427,{'commentId':_0x3858a3[_0x217a7e(0x133)],'text':JSON['parse'](_0x3858a3['content'])});break;}case v['Solve']:{const _0x20326f=(_0x447faf=this['_threadCommentModel'][_0x217a7e(0x16d)](_0x3858a3['unitId'])['find'](_0x5f1975=>_0x5f1975[_0x217a7e(0x14a)]===_0x3858a3[_0x217a7e(0x14a)]))==null?void 0x0:_0x447faf[_0x217a7e(0x16a)];_0x20326f&&this[_0x217a7e(0x149)]['resolveComment'](_0x313877,_0x596427,_0x20326f['id'],_0x3858a3[_0x217a7e(0xfd)]===I[_0x217a7e(0x166)]);break;}}}));}};p=E([S(0x0,c[_0x1cdece(0x120)](b[_0x1cdece(0xf8)])),S(0x1,c[_0x1cdece(0x120)](M['ThreadCommentModel'])),S(0x2,c[_0x1cdece(0x120)](c[_0x1cdece(0x16e)])),S(0x3,c[_0x1cdece(0x120)](c[_0x1cdece(0x112)]))],p);const q=_0x1cdece(0x159),D={};var A=Object[_0x1cdece(0xfb)],x=(_0x39797c,_0x4b75e4,_0xfe5d86,_0x519f8c)=>{const _0x1b3acf=_0x1cdece;for(var _0xa10a53=_0x519f8c>0x1?void 0x0:_0x519f8c?A(_0x4b75e4,_0xfe5d86):_0x4b75e4,_0x2fc488=_0x39797c[_0x1b3acf(0x124)]-0x1,_0x4da0b4;_0x2fc488>=0x0;_0x2fc488--)(_0x4da0b4=_0x39797c[_0x2fc488])&&(_0xa10a53=_0x4da0b4(_0xa10a53)||_0xa10a53);return _0xa10a53;},_=(_0x58dcd7,_0x3fa1ae)=>(_0x42a870,_0x5ef034)=>_0x3fa1ae(_0x42a870,_0x5ef034,_0x58dcd7);function Y(_0x539976,_0xbc8b85){const _0x2ab75a=_0x1cdece,_0xc19200=_0x539976[_0x2ab75a(0x128)][0x0];return{..._0xbc8b85,'id':_0xc19200[_0x2ab75a(0x133)],'resolved':_0x539976[_0x2ab75a(0xfd)]===0x1,'dT':f(_0xc19200[_0x2ab75a(0xfc)]),'personId':_0xc19200['userId'],'threadId':_0xc19200[_0x2ab75a(0x14a)]};}function G(_0x1e12bb,_0xa59bee,_0x153b3a){const _0x41b7a6=_0x1cdece;var _0x15668e,_0x51c009;if(((_0x51c009=(_0x15668e=_0x1e12bb==null?void 0x0:_0x1e12bb[_0x41b7a6(0x128)])==null?void 0x0:_0x15668e[_0x41b7a6(0x124)])!=null?_0x51c009:0x0)>0x0){const _0x351812=(_0x54f8a3,_0xae6f83)=>({'id':_0x54f8a3[_0x41b7a6(0x133)],'threadId':_0x54f8a3[_0x41b7a6(0x14a)],'dT':f(_0x54f8a3['createTimestamp']),'personId':_0x54f8a3[_0x41b7a6(0x146)],'resolved':_0x1e12bb[_0x41b7a6(0xfd)]===I['Solved'],'unitId':_0xa59bee,'subUnitId':_0x153b3a,'text':JSON['parse'](_0x54f8a3['content']),'parentId':_0xae6f83}),_0x56c4de=_0x351812(_0x1e12bb[_0x41b7a6(0x128)][0x0]);return{..._0x56c4de,'children':_0x1e12bb[_0x41b7a6(0x128)][_0x41b7a6(0x109)](0x1)[_0x41b7a6(0x167)](_0x2c7e1b=>_0x351812(_0x2c7e1b,_0x56c4de['id']))};}return null;}let g=class{constructor(_0x566e26,_0x4b8a12,_0x5c42ca,_0x228291){const _0x25b0f8=_0x1cdece;this[_0x25b0f8(0x157)]=_0x566e26,this['_userService']=_0x4b8a12,this['_sessionService']=_0x5c42ca,this[_0x25b0f8(0x156)]=_0x228291;}async[_0x1cdece(0x158)](_0x468c9d){const _0x4dbec8=_0x1cdece;var _0x1dfce3,_0x1ed8cb;const {parentId:_0x19009f,unitId:_0x3850a9,text:_0x560911,threadId:_0x47c88a}=_0x468c9d,_0x4dce38=(_0x1ed8cb=(_0x1dfce3=_0x560911['customRanges'])==null?void 0x0:_0x1dfce3[_0x4dbec8(0x143)](_0x166642=>_0x166642[_0x4dbec8(0x13d)]===c['CustomRangeType'][_0x4dbec8(0x144)])[_0x4dbec8(0x167)](_0x127664=>_0x127664[_0x4dbec8(0x10b)]))!=null?_0x1ed8cb:[],_0x5c821e=JSON['stringify'](_0x560911),_0x273c0b=(await this[_0x4dbec8(0x13f)][_0x4dbec8(0x15e)](_0x3850a9))[_0x4dbec8(0x15b)]();if(_0x19009f){const _0x5538cd={'memberId':_0x273c0b,'unitId':_0x3850a9,'content':_0x5c821e,'mention':_0x4dce38,'threadId':_0x47c88a},_0x19a1a=(await this[_0x4dbec8(0x157)][_0x4dbec8(0x161)](_0x4dbec8(0x131)+_0x3850a9+'/reply',{'body':_0x5538cd}))['body'][_0x4dbec8(0x14f)];return{..._0x468c9d,'id':_0x19a1a[_0x4dbec8(0x133)],'dT':c[_0x4dbec8(0xfa)](+_0x19a1a['createTimestamp'])[_0x4dbec8(0x16f)](_0x4dbec8(0x150)),'personId':_0x19a1a['userId']};}else{const _0x404a47={'memberId':_0x273c0b,'unitId':_0x3850a9,'content':_0x5c821e,'mention':_0x4dce38},_0x5b5af9=await this['_httpService'][_0x4dbec8(0x161)]('/universer-api/comment/unit/'+_0x3850a9+_0x4dbec8(0x13a),{'body':_0x404a47});return Y(_0x5b5af9[_0x4dbec8(0x121)][_0x4dbec8(0x145)],_0x468c9d);}}async[_0x1cdece(0x139)](_0x300020){const _0xdf3f14=_0x1cdece;var _0x3b86a6,_0x343760;const {text:_0x388880,unitId:_0x5aa23d}=_0x300020,_0x56e823=(_0x343760=(_0x3b86a6=_0x388880[_0xdf3f14(0x140)])==null?void 0x0:_0x3b86a6['filter'](_0xce2df8=>_0xce2df8[_0xdf3f14(0x13d)]===c[_0xdf3f14(0x148)][_0xdf3f14(0x144)])[_0xdf3f14(0x167)](_0x5a04d7=>_0x5a04d7['rangeId']))!=null?_0x343760:[],_0x283bef=JSON[_0xdf3f14(0x11a)](_0x388880),_0x1329c5=_0x300020[_0xdf3f14(0x14a)],_0x54a21d=_0x300020['id'],_0x53e41d={'memberId':(await this['_sessionService'][_0xdf3f14(0x15e)](_0x5aa23d))['getMemberID'](),'unitId':_0x5aa23d,'threadId':_0x1329c5,'mention':_0x56e823,'content':_0x283bef,'replyId':_0x54a21d},_0x5cb09b=await this[_0xdf3f14(0x157)][_0xdf3f14(0x161)](_0xdf3f14(0x131)+_0x5aa23d+'/edit',{'body':_0x53e41d});return!_0x5cb09b[_0xdf3f14(0x121)]['error']||_0x5cb09b[_0xdf3f14(0x121)][_0xdf3f14(0x154)][_0xdf3f14(0x108)]===0x1;}async['resolveComment'](_0x27d730){const _0xf810fa=_0x1cdece,{unitId:_0x4dbc09}=_0x27d730,_0x294e20=_0x27d730[_0xf810fa(0x14a)],_0x243e45={'memberId':this[_0xf810fa(0x119)][_0xf810fa(0x10a)]()[_0xf810fa(0x14d)],'unitId':_0x4dbc09,'threadId':_0x294e20,'solved':_0x27d730[_0xf810fa(0x105)]?I[_0xf810fa(0x166)]:I[_0xf810fa(0x142)]},_0x1d0096=await this[_0xf810fa(0x157)][_0xf810fa(0x161)]('/universer-api/comment/unit/'+_0x4dbc09+_0xf810fa(0x13e),{'body':_0x243e45});return!_0x1d0096['body'][_0xf810fa(0x154)]||_0x1d0096[_0xf810fa(0x121)][_0xf810fa(0x154)][_0xf810fa(0x108)]===0x1;}async[_0x1cdece(0x169)](_0x161750,_0x5966e9,_0x109b11,_0x1e0a92){const _0xd049e8=_0x1cdece,_0x24761c={'memberId':(await this[_0xd049e8(0x13f)][_0xd049e8(0x15e)](_0x161750))[_0xd049e8(0x15b)](),'threadId':_0x109b11,'replyId':_0x1e0a92,'unitId':_0x161750},_0x568120=await this[_0xd049e8(0x157)][_0xd049e8(0x161)](_0xd049e8(0x131)+_0x161750+_0xd049e8(0x13c),{'body':_0x24761c});return!_0x568120['body']['error']||_0x568120[_0xd049e8(0x121)][_0xd049e8(0x154)][_0xd049e8(0x108)]===0x1;}async[_0x1cdece(0x165)](_0x528d11,_0xfa5bd3,_0x359e70){const _0xecf4f=_0x1cdece,_0x534d6d={'unitId':_0x528d11,'threadId':_0x359e70},_0x4e224b=await this[_0xecf4f(0x157)][_0xecf4f(0x161)](_0xecf4f(0x131)+_0x528d11+_0xecf4f(0x15c),{'body':_0x534d6d}),_0xaf194c=_0x359e70['map'](_0x9c682e=>G(_0x4e224b[_0xecf4f(0x121)][_0xecf4f(0x11d)][_0x9c682e],_0x528d11,_0xfa5bd3))[_0xecf4f(0x143)](Boolean);return Object['values'](_0x4e224b[_0xecf4f(0x121)]['users'])[_0xecf4f(0x103)](_0x2badab=>{const _0x15cecc=_0xecf4f;this[_0x15cecc(0x119)][_0x15cecc(0x15f)](_0x2badab);}),_0xaf194c;}['saveCommentToSnapshot'](_0x1556c9){const _0x26cd28=_0x1cdece;return{'id':_0x1556c9['id'],'threadId':_0x1556c9[_0x26cd28(0x14a)],'ref':_0x1556c9['ref']};}};g=x([_(0x0,c[_0x1cdece(0x120)](P['HTTPService'])),_(0x1,c[_0x1cdece(0x120)](c['UserManagerService'])),_(0x2,c[_0x1cdece(0x120)](b[_0x1cdece(0x16b)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x1cdece(0xfb)],J=(_0x533032,_0x4f0731,_0x5ec73b,_0x40dcf7)=>{const _0x35f5ff=_0x1cdece;for(var _0x3119e6=_0x40dcf7>0x1?void 0x0:_0x40dcf7?H(_0x4f0731,_0x5ec73b):_0x4f0731,_0x650bf6=_0x533032[_0x35f5ff(0x124)]-0x1,_0x172e11;_0x650bf6>=0x0;_0x650bf6--)(_0x172e11=_0x533032[_0x650bf6])&&(_0x3119e6=_0x172e11(_0x3119e6)||_0x3119e6);return _0x3119e6;},y=(_0x35453e,_0x2f0e55)=>(_0x49ab9b,_0x50e254)=>_0x2f0e55(_0x49ab9b,_0x50e254,_0x35453e);let C=class extends c[_0x1cdece(0x162)]{constructor(_0x22f54e,_0x5e3926){const _0x159814=_0x1cdece;super(),this[_0x159814(0x123)]=_0x22f54e,this[_0x159814(0x138)]=_0x5e3926,this['_initDataSource']();}[_0x1cdece(0x170)](){const _0x16087b=_0x1cdece;this['_threadCommentDataSourceService'][_0x16087b(0x151)]=this['_threadCommentDataSource'],this[_0x16087b(0x123)][_0x16087b(0xf9)]=!0x1;}};C=J([y(0x0,M[_0x1cdece(0x136)]),y(0x1,c[_0x1cdece(0x120)](g))],C);var F=Object[_0x1cdece(0x12e)],L=Object[_0x1cdece(0xfb)],Z=(_0x141202,_0x33f99f,_0x3f2a81)=>_0x33f99f in _0x141202?F(_0x141202,_0x33f99f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f2a81}):_0x141202[_0x33f99f]=_0x3f2a81,W=(_0x3c3207,_0x516a3d,_0x29fde6,_0x8fa4b5)=>{const _0x3d53f8=_0x1cdece;for(var _0x3dce79=_0x8fa4b5>0x1?void 0x0:_0x8fa4b5?L(_0x516a3d,_0x29fde6):_0x516a3d,_0x189abd=_0x3c3207[_0x3d53f8(0x124)]-0x1,_0x38e621;_0x189abd>=0x0;_0x189abd--)(_0x38e621=_0x3c3207[_0x189abd])&&(_0x3dce79=_0x38e621(_0x3dce79)||_0x3dce79);return _0x3dce79;},O=(_0x12cfe2,_0x565765)=>(_0x2ad9d3,_0x543848)=>_0x565765(_0x2ad9d3,_0x543848,_0x12cfe2),N=(_0x5638c7,_0x5c6e0f,_0x45823c)=>Z(_0x5638c7,typeof _0x5c6e0f!='symbol'?_0x5c6e0f+'':_0x5c6e0f,_0x45823c);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1cdece(0x130)]{constructor(_0x12bdf6=D,_0x59d21a,_0x47225f){const _0x115432=_0x1cdece;super(),this[_0x115432(0x10e)]=_0x12bdf6,this[_0x115432(0x156)]=_0x59d21a,this[_0x115432(0x13b)]=_0x47225f;const {..._0x1d2680}=c['merge']({},D,this['_config']);this[_0x115432(0x13b)][_0x115432(0x10f)](q,_0x1d2680);}[_0x1cdece(0x155)](){const _0x23a3e3=_0x1cdece;[[g],[C],[p]][_0x23a3e3(0x103)](_0x18acf7=>{const _0x534c8b=_0x23a3e3;this[_0x534c8b(0x156)][_0x534c8b(0x12c)](_0x18acf7);});}[_0x1cdece(0x117)](){const _0x133745=_0x1cdece;this[_0x133745(0x156)][_0x133745(0x104)](C),this[_0x133745(0x156)][_0x133745(0x104)](p);}},N(exports[_0x1cdece(0x14c)],_0x1cdece(0x118),U),N(exports[_0x1cdece(0x14c)],_0x1cdece(0x132),c[_0x1cdece(0x15a)][_0x1cdece(0x168)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1cdece(0x14b)](j[_0x1cdece(0x153)],b['UniverCollaborationClientPlugin'],T[_0x1cdece(0x116)]),O(0x1,c[_0x1cdece(0x120)](c[_0x1cdece(0x112)])),O(0x2,c[_0x1cdece(0x16c)])],exports[_0x1cdece(0x14c)]);
1
+ 'use strict';const _0x1dd4ba=_0x2691;function _0x2691(_0x1b07ce,_0x247264){const _0x3cebcb=_0x3ceb();return _0x2691=function(_0x26915e,_0x52f6fc){_0x26915e=_0x26915e-0xd9;let _0x5630c6=_0x3cebcb[_0x26915e];return _0x5630c6;},_0x2691(_0x1b07ce,_0x247264);}(function(_0x53eccb,_0x3a5021){const _0x7b97f1=_0x2691,_0x437919=_0x53eccb();while(!![]){try{const _0x2fbc95=parseInt(_0x7b97f1(0xe7))/0x1*(parseInt(_0x7b97f1(0x106))/0x2)+-parseInt(_0x7b97f1(0x132))/0x3+-parseInt(_0x7b97f1(0x100))/0x4+parseInt(_0x7b97f1(0x103))/0x5+parseInt(_0x7b97f1(0x107))/0x6+-parseInt(_0x7b97f1(0xe8))/0x7+-parseInt(_0x7b97f1(0xf4))/0x8*(-parseInt(_0x7b97f1(0x117))/0x9);if(_0x2fbc95===_0x3a5021)break;else _0x437919['push'](_0x437919['shift']());}catch(_0x4087e7){_0x437919['push'](_0x437919['shift']());}}}(_0x3ceb,0xf00f1));Object[_0x1dd4ba(0xf6)](exports,Symbol[_0x1dd4ba(0x143)],{'value':_0x1dd4ba(0x11c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1dd4ba(0x10e);var I=(_0x206243=>(_0x206243[_0x206243[_0x1dd4ba(0xe0)]=0x0]=_0x1dd4ba(0xe0),_0x206243[_0x206243[_0x1dd4ba(0x112)]=0x1]=_0x1dd4ba(0x112),_0x206243[_0x206243[_0x1dd4ba(0x10d)]=-0x1]='UNRECOGNIZED',_0x206243))(I||{}),v=(_0x4ddfcf=>(_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x14e)]=0x0]='Unknown',_0x4ddfcf[_0x4ddfcf['Add']=0x1]=_0x1dd4ba(0x126),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x125)]=0x2]=_0x1dd4ba(0x125),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0xfe)]=0x3]=_0x1dd4ba(0xfe),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x131)]=0x4]=_0x1dd4ba(0x131),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0xe1)]=0x5]=_0x1dd4ba(0xe1),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x10d)]=-0x1]=_0x1dd4ba(0x10d),_0x4ddfcf))(v||{});const f=_0x155566=>c[_0x1dd4ba(0x150)](new Date(+_0x155566))[_0x1dd4ba(0xf0)](_0x1dd4ba(0xf2)),R=async(_0x2e5c41,_0x1dbe25)=>{const _0x56dada=_0x1dd4ba,_0x4407fd=_0x2e5c41[_0x56dada(0x122)](c[_0x56dada(0x14b)]),_0x1672e4=_0x2e5c41[_0x56dada(0x122)](P[_0x56dada(0x14f)]);_0x1dbe25['forEach'](_0x26efb6=>{const _0x41b9a4=_0x56dada;_0x4407fd[_0x41b9a4(0x121)](_0x26efb6)&&_0x1dbe25[_0x41b9a4(0x142)](_0x26efb6);}),_0x1dbe25[_0x56dada(0x149)]&&(await _0x1672e4[_0x56dada(0x122)](_0x56dada(0xfd),{'params':{'userIDs':[..._0x1dbe25]}}))[_0x56dada(0x102)]['users'][_0x56dada(0x135)](_0x4ca107=>{const _0xd1cee6=_0x56dada;_0x4ca107&&_0x4407fd[_0xd1cee6(0x138)](_0x4ca107);});};var $=Object[_0x1dd4ba(0x147)],E=(_0x16db06,_0x4c64cb,_0x2c5255,_0x400812)=>{const _0x57f013=_0x1dd4ba;for(var _0x2e9b48=_0x400812>0x1?void 0x0:_0x400812?$(_0x4c64cb,_0x2c5255):_0x4c64cb,_0x1d160b=_0x16db06[_0x57f013(0x146)]-0x1,_0x4ad2cc;_0x1d160b>=0x0;_0x1d160b--)(_0x4ad2cc=_0x16db06[_0x1d160b])&&(_0x2e9b48=_0x4ad2cc(_0x2e9b48)||_0x2e9b48);return _0x2e9b48;},S=(_0x2db835,_0x114d2a)=>(_0x672b6a,_0x46579d)=>_0x114d2a(_0x672b6a,_0x46579d,_0x2db835);let p=class extends c[_0x1dd4ba(0x139)]{constructor(_0x5c7fa9,_0x3a7846,_0x321c12,_0x13ac4e){const _0x3b78ea=_0x1dd4ba;super(),this[_0x3b78ea(0x153)]=_0x5c7fa9,this[_0x3b78ea(0x11f)]=_0x3a7846,this[_0x3b78ea(0x12d)]=_0x321c12,this['_injector']=_0x13ac4e,this['_init'](),this[_0x3b78ea(0x145)]();}[_0x1dd4ba(0x145)](){const _0x2a602b=_0x1dd4ba;this[_0x2a602b(0x10b)](this['_threadCommentModel'][_0x2a602b(0x10a)][_0x2a602b(0x144)](w[_0x2a602b(0x152)](0x10))['subscribe'](_0x5af9e7=>{const _0xad85ba=_0x2a602b,_0x45e8fc=new Set();_0x5af9e7[_0xad85ba(0x135)](_0x2a18b5=>{const _0x4e24eb=_0xad85ba;switch(_0x2a18b5['type']){case'add':{const _0x19ab8a=_0x2a18b5[_0x4e24eb(0x14d)]['personId'];_0x45e8fc['add'](_0x19ab8a);break;}}}),R(this['_injector'],_0x45e8fc);}));}[_0x1dd4ba(0x129)](){const _0x4fa95b=_0x1dd4ba;this[_0x4fa95b(0x10b)](this[_0x4fa95b(0x153)]['commentUpdate$'][_0x4fa95b(0x119)](async _0x334025=>{const _0x1dd918=_0x4fa95b;var _0x2df40b,_0x9b70d8,_0x2fdf0c,_0x5176f8;const _0x5454c2=(_0x2df40b=this[_0x1dd918(0x11f)][_0x1dd918(0xee)](_0x334025[_0x1dd918(0xe9)])[_0x1dd918(0x10c)](_0x11f648=>_0x11f648[_0x1dd918(0x13f)]===_0x334025[_0x1dd918(0x13f)]))==null?void 0x0:_0x2df40b['root'];if(!_0x5454c2)return;const {unitId:_0x5ef7cc,subUnitId:_0x57a49a}=_0x5454c2;switch(_0x334025[_0x1dd918(0x14c)]&&this[_0x1dd918(0x12d)]['addUser'](_0x334025[_0x1dd918(0x14c)]),_0x334025[_0x1dd918(0x12c)]){case v[_0x1dd918(0x126)]:break;case v[_0x1dd918(0x125)]:{this['_threadCommentModel'][_0x1dd918(0xef)](_0x5ef7cc,_0x57a49a,{'unitId':_0x5ef7cc,'subUnitId':_0x57a49a,'ref':'','id':_0x334025[_0x1dd918(0x140)],'dT':f(+_0x334025['createTimestamp']),'threadId':_0x334025[_0x1dd918(0x13f)],'personId':(_0x2fdf0c=(_0x9b70d8=_0x334025[_0x1dd918(0x14c)])==null?void 0x0:_0x9b70d8[_0x1dd918(0x137)])!=null?_0x2fdf0c:_0x334025['userId'],'text':JSON[_0x1dd918(0x123)](_0x334025['content']),'parentId':_0x5454c2['id']});break;}case v[_0x1dd918(0x131)]:{const _0x5b2ade=this[_0x1dd918(0x11f)][_0x1dd918(0x12a)](_0x5ef7cc,_0x57a49a,_0x334025[_0x1dd918(0x140)]);_0x5b2ade&&_0x5b2ade['parentId']&&this[_0x1dd918(0x11f)][_0x1dd918(0xe2)](_0x5ef7cc,_0x57a49a,_0x334025[_0x1dd918(0x140)]);break;}case v[_0x1dd918(0xfe)]:{this[_0x1dd918(0x11f)][_0x1dd918(0x118)](_0x5ef7cc,_0x57a49a,{'commentId':_0x334025[_0x1dd918(0x140)],'text':JSON[_0x1dd918(0x123)](_0x334025['content'])});break;}case v['Solve']:{const _0xd8ab48=(_0x5176f8=this[_0x1dd918(0x11f)][_0x1dd918(0xee)](_0x334025[_0x1dd918(0xe9)])[_0x1dd918(0x10c)](_0x46f7c4=>_0x46f7c4[_0x1dd918(0x13f)]===_0x334025[_0x1dd918(0x13f)]))==null?void 0x0:_0x5176f8['root'];_0xd8ab48&&this[_0x1dd918(0x11f)][_0x1dd918(0xdc)](_0x5ef7cc,_0x57a49a,_0xd8ab48['id'],_0x334025[_0x1dd918(0x113)]===I[_0x1dd918(0x112)]);break;}}}));}};p=E([S(0x0,c[_0x1dd4ba(0xe4)](b[_0x1dd4ba(0xfa)])),S(0x1,c['Inject'](M[_0x1dd4ba(0xec)])),S(0x2,c[_0x1dd4ba(0xe4)](c[_0x1dd4ba(0x14b)])),S(0x3,c['Inject'](c[_0x1dd4ba(0xe5)]))],p);const q=_0x1dd4ba(0xde),D={};var A=Object[_0x1dd4ba(0x147)],x=(_0x501def,_0x11389a,_0xc35fdf,_0x3c6367)=>{const _0x4a466d=_0x1dd4ba;for(var _0x5bc73a=_0x3c6367>0x1?void 0x0:_0x3c6367?A(_0x11389a,_0xc35fdf):_0x11389a,_0x51cc16=_0x501def[_0x4a466d(0x146)]-0x1,_0x578325;_0x51cc16>=0x0;_0x51cc16--)(_0x578325=_0x501def[_0x51cc16])&&(_0x5bc73a=_0x578325(_0x5bc73a)||_0x5bc73a);return _0x5bc73a;},_=(_0x30c47e,_0x75f420)=>(_0x5a6cf6,_0x320b6a)=>_0x75f420(_0x5a6cf6,_0x320b6a,_0x30c47e);function Y(_0x2e56a2,_0x1a3d9b){const _0x1adf42=_0x1dd4ba,_0x12c422=_0x2e56a2[_0x1adf42(0x110)][0x0];return{..._0x1a3d9b,'id':_0x12c422[_0x1adf42(0x140)],'resolved':_0x2e56a2['solved']===0x1,'dT':f(_0x12c422[_0x1adf42(0xfb)]),'personId':_0x12c422['userId'],'threadId':_0x12c422['threadId']};}function G(_0x1415a6,_0x1165af,_0x462036){const _0x15860d=_0x1dd4ba;var _0x4a0744,_0x1578b0;if(((_0x1578b0=(_0x4a0744=_0x1415a6==null?void 0x0:_0x1415a6[_0x15860d(0x110)])==null?void 0x0:_0x4a0744[_0x15860d(0x146)])!=null?_0x1578b0:0x0)>0x0){const _0xc174bb=(_0x5e4de1,_0x152c8d)=>({'id':_0x5e4de1[_0x15860d(0x140)],'threadId':_0x5e4de1[_0x15860d(0x13f)],'dT':f(_0x5e4de1[_0x15860d(0xfb)]),'personId':_0x5e4de1[_0x15860d(0x10f)],'resolved':_0x1415a6['solved']===I[_0x15860d(0x112)],'unitId':_0x1165af,'subUnitId':_0x462036,'text':JSON[_0x15860d(0x123)](_0x5e4de1[_0x15860d(0x13a)]),'parentId':_0x152c8d}),_0x3b61d0=_0xc174bb(_0x1415a6[_0x15860d(0x110)][0x0]);return{..._0x3b61d0,'children':_0x1415a6[_0x15860d(0x110)][_0x15860d(0x13c)](0x1)['map'](_0x4710c6=>_0xc174bb(_0x4710c6,_0x3b61d0['id']))};}return null;}let g=class{constructor(_0x43380a,_0x8b4e5d,_0x28098c,_0x34b009){const _0x1c2708=_0x1dd4ba;this[_0x1c2708(0xeb)]=_0x43380a,this[_0x1c2708(0x12d)]=_0x8b4e5d,this[_0x1c2708(0x108)]=_0x28098c,this[_0x1c2708(0x151)]=_0x34b009;}async[_0x1dd4ba(0xef)](_0x30a778){const _0x3a34a1=_0x1dd4ba;var _0x34453e,_0x5b5920;const {parentId:_0x29a5a4,unitId:_0x1fe86c,text:_0x450b72,threadId:_0x292110}=_0x30a778,_0x3dd852=(_0x5b5920=(_0x34453e=_0x450b72[_0x3a34a1(0xf8)])==null?void 0x0:_0x34453e['filter'](_0x162a23=>_0x162a23[_0x3a34a1(0x13b)]===c['CustomRangeType'][_0x3a34a1(0x11a)])['map'](_0x17afe7=>_0x17afe7[_0x3a34a1(0xfc)]))!=null?_0x5b5920:[],_0x49c600=JSON[_0x3a34a1(0x11b)](_0x450b72),_0x471ed8=(await this[_0x3a34a1(0x108)]['requireSession'](_0x1fe86c))[_0x3a34a1(0x12f)]();if(_0x29a5a4){const _0x3ee836={'memberId':_0x471ed8,'unitId':_0x1fe86c,'content':_0x49c600,'mention':_0x3dd852,'threadId':_0x292110},_0x14120b=(await this[_0x3a34a1(0xeb)]['post']('/universer-api/comment/unit/'+_0x1fe86c+'/reply',{'body':_0x3ee836}))[_0x3a34a1(0x102)][_0x3a34a1(0x115)];return{..._0x30a778,'id':_0x14120b[_0x3a34a1(0x140)],'dT':c[_0x3a34a1(0x150)](+_0x14120b[_0x3a34a1(0xfb)])[_0x3a34a1(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x14120b['userId']};}else{const _0x4f9d06={'memberId':_0x471ed8,'unitId':_0x1fe86c,'content':_0x49c600,'mention':_0x3dd852},_0x545a93=await this[_0x3a34a1(0xeb)]['post'](_0x3a34a1(0xdd)+_0x1fe86c+_0x3a34a1(0x136),{'body':_0x4f9d06});return Y(_0x545a93[_0x3a34a1(0x102)][_0x3a34a1(0x116)],_0x30a778);}}async[_0x1dd4ba(0x118)](_0x4a9836){const _0x3c8a06=_0x1dd4ba;var _0x43ad1c,_0x23556e;const {text:_0x5b75c9,unitId:_0x2851}=_0x4a9836,_0x40dc32=(_0x23556e=(_0x43ad1c=_0x5b75c9[_0x3c8a06(0xf8)])==null?void 0x0:_0x43ad1c['filter'](_0x443b56=>_0x443b56[_0x3c8a06(0x13b)]===c[_0x3c8a06(0xf3)][_0x3c8a06(0x11a)])['map'](_0x51767b=>_0x51767b[_0x3c8a06(0xfc)]))!=null?_0x23556e:[],_0x5f0708=JSON[_0x3c8a06(0x11b)](_0x5b75c9),_0x2156ff=_0x4a9836[_0x3c8a06(0x13f)],_0x2de1cb=_0x4a9836['id'],_0x42964b={'memberId':(await this['_sessionService'][_0x3c8a06(0xea)](_0x2851))[_0x3c8a06(0x12f)](),'unitId':_0x2851,'threadId':_0x2156ff,'mention':_0x40dc32,'content':_0x5f0708,'replyId':_0x2de1cb},_0x1024fc=await this['_httpService'][_0x3c8a06(0xf9)]('/universer-api/comment/unit/'+_0x2851+_0x3c8a06(0xe6),{'body':_0x42964b});return!_0x1024fc['body'][_0x3c8a06(0xf1)]||_0x1024fc['body'][_0x3c8a06(0xf1)][_0x3c8a06(0x127)]===0x1;}async[_0x1dd4ba(0xdc)](_0x401945){const _0x2e87b4=_0x1dd4ba,{unitId:_0x5ecc09}=_0x401945,_0xf810df=_0x401945[_0x2e87b4(0x13f)],_0x236787={'memberId':this[_0x2e87b4(0x12d)][_0x2e87b4(0xf7)]()['userID'],'unitId':_0x5ecc09,'threadId':_0xf810df,'solved':_0x401945['resolved']?I[_0x2e87b4(0x112)]:I[_0x2e87b4(0xe0)]},_0x39a68a=await this[_0x2e87b4(0xeb)][_0x2e87b4(0xf9)]('/universer-api/comment/unit/'+_0x5ecc09+_0x2e87b4(0x128),{'body':_0x236787});return!_0x39a68a['body'][_0x2e87b4(0xf1)]||_0x39a68a[_0x2e87b4(0x102)][_0x2e87b4(0xf1)][_0x2e87b4(0x127)]===0x1;}async[_0x1dd4ba(0xe2)](_0x286fa5,_0x36cf28,_0x293534,_0x531a11){const _0x2aff67=_0x1dd4ba,_0x1a2bce={'memberId':(await this[_0x2aff67(0x108)][_0x2aff67(0xea)](_0x286fa5))[_0x2aff67(0x12f)](),'threadId':_0x293534,'replyId':_0x531a11,'unitId':_0x286fa5},_0x3a9dbf=await this[_0x2aff67(0xeb)][_0x2aff67(0xf9)](_0x2aff67(0xdd)+_0x286fa5+'/delete',{'body':_0x1a2bce});return!_0x3a9dbf[_0x2aff67(0x102)][_0x2aff67(0xf1)]||_0x3a9dbf[_0x2aff67(0x102)][_0x2aff67(0xf1)][_0x2aff67(0x127)]===0x1;}async[_0x1dd4ba(0x11d)](_0x863158,_0x40844a,_0x25c547){const _0x24478c=_0x1dd4ba,_0x207a1e={'unitId':_0x863158,'threadId':_0x25c547},_0x4e1326=await this[_0x24478c(0xeb)]['post'](_0x24478c(0xdd)+_0x863158+_0x24478c(0x109),{'body':_0x207a1e}),_0x173ba2=_0x25c547[_0x24478c(0x12e)](_0x22ab9b=>G(_0x4e1326[_0x24478c(0x102)][_0x24478c(0x124)][_0x22ab9b],_0x863158,_0x40844a))['filter'](Boolean);return Object[_0x24478c(0xff)](_0x4e1326[_0x24478c(0x102)][_0x24478c(0xdb)])['forEach'](_0x42dee3=>{const _0x425fe9=_0x24478c;this['_userService'][_0x425fe9(0x138)](_0x42dee3);}),_0x173ba2;}[_0x1dd4ba(0x134)](_0x5aab80){const _0x22133c=_0x1dd4ba;return{'id':_0x5aab80['id'],'threadId':_0x5aab80[_0x22133c(0x13f)],'ref':_0x5aab80[_0x22133c(0x120)]};}};g=x([_(0x0,c[_0x1dd4ba(0xe4)](P[_0x1dd4ba(0x14f)])),_(0x1,c['Inject'](c[_0x1dd4ba(0x14b)])),_(0x2,c[_0x1dd4ba(0xe4)](b[_0x1dd4ba(0xed)])),_(0x3,c[_0x1dd4ba(0xe4)](c[_0x1dd4ba(0xe5)]))],g);var H=Object[_0x1dd4ba(0x147)],J=(_0x3b6937,_0x50b52b,_0xd8e354,_0x400615)=>{const _0x488675=_0x1dd4ba;for(var _0x47581d=_0x400615>0x1?void 0x0:_0x400615?H(_0x50b52b,_0xd8e354):_0x50b52b,_0x49411f=_0x3b6937[_0x488675(0x146)]-0x1,_0x1865d8;_0x49411f>=0x0;_0x49411f--)(_0x1865d8=_0x3b6937[_0x49411f])&&(_0x47581d=_0x1865d8(_0x47581d)||_0x47581d);return _0x47581d;},y=(_0x26eb6c,_0x5f1949)=>(_0x4ba766,_0x22c923)=>_0x5f1949(_0x4ba766,_0x22c923,_0x26eb6c);let C=class extends c[_0x1dd4ba(0x139)]{constructor(_0x210352,_0x3fdd45){const _0x572963=_0x1dd4ba;super(),this[_0x572963(0x141)]=_0x210352,this[_0x572963(0x13e)]=_0x3fdd45,this['_initDataSource']();}[_0x1dd4ba(0x148)](){const _0x3ec04e=_0x1dd4ba;this['_threadCommentDataSourceService'][_0x3ec04e(0x130)]=this[_0x3ec04e(0x13e)],this[_0x3ec04e(0x141)]['syncUpdateMutationToColla']=!0x1;}};function _0x3ceb(){const _0x533463=['setConfig','_threadCommentDataSource','threadId','replyId','_threadCommentDataSourceService','delete','toStringTag','pipe','_initUserSync','length','getOwnPropertyDescriptor','_initDataSource','size','DependentOn','UserManagerService','user','payload','Unknown','HTTPService','dayjs','_injector','bufferTime','_commentService','add','onStarting','users','resolveComment','/universer-api/comment/unit/','thread-comment-data-source.config','symbol','OpenOrReOpen','Solve','deleteComment','UniverCollaborationClientPlugin','Inject','Injector','/edit','5okaMNQ','13373241HbrqyW','unitId','requireSession','_httpService','ThreadCommentModel','CollaborationSessionService','getUnit','addComment','format','error','YYYY/MM/DD\x20HH:mm','CustomRangeType','1548280gOvbjZ','UniverThreadCommentDataSourcePlugin','defineProperty','getCurrentUser','customRanges','post','CommentService','createTimestamp','rangeId','/universer-api/user/list','Edit','values','2090572sndTWy','_configService','body','235955UlEtEj','_config','IConfigService','708560iXpwUk','10664838giXSqk','_sessionService','/list','commentUpdate$','disposeWithMe','find','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','replies','IThreadCommentDataSourceService','Solved','solved','pluginName','reply','comment','72HOEfnn','updateComment','subscribe','COMMENT','stringify','Module','listComments','UniverThreadCommentUIPlugin','_threadCommentModel','ref','getUser','get','parse','comments','Reply','Add','code','/solved','_init','getComment','Plugin','type','_userService','map','getMemberID','dataSource','Delete','5183871Kykrzs','merge','saveCommentToSnapshot','forEach','/add','userID','addUser','Disposable','content','rangeType','slice'];_0x3ceb=function(){return _0x533463;};return _0x3ceb();}C=J([y(0x0,M[_0x1dd4ba(0x111)]),y(0x1,c[_0x1dd4ba(0xe4)](g))],C);var F=Object['defineProperty'],L=Object[_0x1dd4ba(0x147)],Z=(_0x431a09,_0x266a6b,_0x1a6902)=>_0x266a6b in _0x431a09?F(_0x431a09,_0x266a6b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a6902}):_0x431a09[_0x266a6b]=_0x1a6902,W=(_0xd4d7cc,_0x55114d,_0x1ab601,_0x24441f)=>{const _0x477570=_0x1dd4ba;for(var _0x2c482b=_0x24441f>0x1?void 0x0:_0x24441f?L(_0x55114d,_0x1ab601):_0x55114d,_0x42abf1=_0xd4d7cc[_0x477570(0x146)]-0x1,_0x3a7e14;_0x42abf1>=0x0;_0x42abf1--)(_0x3a7e14=_0xd4d7cc[_0x42abf1])&&(_0x2c482b=_0x3a7e14(_0x2c482b)||_0x2c482b);return _0x2c482b;},O=(_0x322710,_0x37b6a7)=>(_0xce5305,_0x32180a)=>_0x37b6a7(_0xce5305,_0x32180a,_0x322710),N=(_0x5dbbab,_0x83840,_0x1a9103)=>Z(_0x5dbbab,typeof _0x83840!=_0x1dd4ba(0xdf)?_0x83840+'':_0x83840,_0x1a9103);exports[_0x1dd4ba(0xf5)]=class extends c[_0x1dd4ba(0x12b)]{constructor(_0xb8c392=D,_0x3e7b0b,_0x650ecf){const _0x605506=_0x1dd4ba;super(),this['_config']=_0xb8c392,this[_0x605506(0x151)]=_0x3e7b0b,this[_0x605506(0x101)]=_0x650ecf;const {..._0x1f7e33}=c[_0x605506(0x133)]({},D,this[_0x605506(0x104)]);this['_configService'][_0x605506(0x13d)](q,_0x1f7e33);}[_0x1dd4ba(0xda)](){[[g],[C],[p]]['forEach'](_0x5a758c=>{const _0x3158d0=_0x2691;this[_0x3158d0(0x151)][_0x3158d0(0xd9)](_0x5a758c);});}['onReady'](){const _0x268ce3=_0x1dd4ba;this[_0x268ce3(0x151)]['get'](C),this[_0x268ce3(0x151)][_0x268ce3(0x122)](p);}},N(exports[_0x1dd4ba(0xf5)],_0x1dd4ba(0x114),U),N(exports[_0x1dd4ba(0xf5)],_0x1dd4ba(0x12c),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1dd4ba(0xf5)]=W([c[_0x1dd4ba(0x14a)](j[_0x1dd4ba(0x11e)],b[_0x1dd4ba(0xe3)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x1dd4ba(0x105)])],exports[_0x1dd4ba(0xf5)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3ac7fc=_0x1e53;(function(_0x3c488b,_0x46a2d5){const _0x2b441d=_0x1e53,_0x788a96=_0x3c488b();while(!![]){try{const _0x3aa45e=-parseInt(_0x2b441d(0x183))/0x1*(-parseInt(_0x2b441d(0x165))/0x2)+parseInt(_0x2b441d(0x163))/0x3+-parseInt(_0x2b441d(0x16f))/0x4+-parseInt(_0x2b441d(0x168))/0x5*(parseInt(_0x2b441d(0x132))/0x6)+parseInt(_0x2b441d(0x169))/0x7+-parseInt(_0x2b441d(0x17d))/0x8*(parseInt(_0x2b441d(0x182))/0x9)+-parseInt(_0x2b441d(0x140))/0xa*(-parseInt(_0x2b441d(0x126))/0xb);if(_0x3aa45e===_0x46a2d5)break;else _0x788a96['push'](_0x788a96['shift']());}catch(_0x2160f3){_0x788a96['push'](_0x788a96['shift']());}}}(_0x4a8f,0x648a8));import{CommentService as _0xc12547,CollaborationSessionService as _0x4085da,UniverCollaborationClientPlugin as _0x25082e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x34bfc7}from'@univerjs-pro/license';import{dayjs as _0x4356fa,UserManagerService as _0x2b2172,Inject as _0x133874,Injector as _0x43a099,Disposable as _0x2967d0,CustomRangeType as _0x370612,UniverInstanceType as _0x29d262,DependentOn as _0x541538,IConfigService as _0x55cc27,Plugin as _0x365976,merge as _0x531f64}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37de3d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2b6937,IThreadCommentDataSourceService as _0xecaf32}from'@univerjs/thread-comment';import{bufferTime as _0x10be35}from'rxjs';import{HTTPService as _0x16aebc}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x64e6af=>(_0x64e6af[_0x64e6af[_0x3ac7fc(0x136)]=0x0]=_0x3ac7fc(0x136),_0x64e6af[_0x64e6af[_0x3ac7fc(0x13d)]=0x1]='Solved',_0x64e6af[_0x64e6af[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x64e6af))(I||{}),v=(_0x1c4999=>(_0x1c4999[_0x1c4999[_0x3ac7fc(0x150)]=0x0]='Unknown',_0x1c4999[_0x1c4999[_0x3ac7fc(0x170)]=0x1]=_0x3ac7fc(0x170),_0x1c4999[_0x1c4999['Reply']=0x2]=_0x3ac7fc(0x133),_0x1c4999[_0x1c4999[_0x3ac7fc(0x124)]=0x3]=_0x3ac7fc(0x124),_0x1c4999[_0x1c4999[_0x3ac7fc(0x147)]=0x4]=_0x3ac7fc(0x147),_0x1c4999[_0x1c4999['Solve']=0x5]=_0x3ac7fc(0x173),_0x1c4999[_0x1c4999[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x1c4999))(v||{});const D=_0x1fcb2b=>_0x4356fa(new Date(+_0x1fcb2b))[_0x3ac7fc(0x12d)](_0x3ac7fc(0x14c)),B=async(_0x5dda6b,_0x32ae58)=>{const _0x3786f1=_0x3ac7fc,_0x5d46d2=_0x5dda6b[_0x3786f1(0x14e)](_0x2b2172),_0x3ea773=_0x5dda6b[_0x3786f1(0x14e)](_0x16aebc);_0x32ae58['forEach'](_0x30952f=>{const _0x4f4d26=_0x3786f1;_0x5d46d2[_0x4f4d26(0x16c)](_0x30952f)&&_0x32ae58['delete'](_0x30952f);}),_0x32ae58['size']&&(await _0x3ea773[_0x3786f1(0x14e)](_0x3786f1(0x12e),{'params':{'userIDs':[..._0x32ae58]}}))[_0x3786f1(0x171)][_0x3786f1(0x17b)][_0x3786f1(0x15a)](_0x27cd20=>{_0x27cd20&&_0x5d46d2['addUser'](_0x27cd20);});};var K=Object[_0x3ac7fc(0x13a)],V=(_0x9c9ec5,_0x54eea9,_0x1784f6,_0x3ecb5c)=>{const _0xa9d929=_0x3ac7fc;for(var _0x1f5f09=_0x3ecb5c>0x1?void 0x0:_0x3ecb5c?K(_0x54eea9,_0x1784f6):_0x54eea9,_0x16c95a=_0x9c9ec5[_0xa9d929(0x143)]-0x1,_0x481af1;_0x16c95a>=0x0;_0x16c95a--)(_0x481af1=_0x9c9ec5[_0x16c95a])&&(_0x1f5f09=_0x481af1(_0x1f5f09)||_0x1f5f09);return _0x1f5f09;},p=(_0x140d90,_0x244f45)=>(_0x1dc97a,_0x40ab5d)=>_0x244f45(_0x1dc97a,_0x40ab5d,_0x140d90);let S=class extends _0x2967d0{constructor(_0x4e5bac,_0x190b4b,_0xb469e6,_0x5060ed){const _0x2dd255=_0x3ac7fc;super(),this[_0x2dd255(0x180)]=_0x4e5bac,this[_0x2dd255(0x139)]=_0x190b4b,this[_0x2dd255(0x144)]=_0xb469e6,this[_0x2dd255(0x135)]=_0x5060ed,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x45abb6=_0x3ac7fc;this[_0x45abb6(0x167)](this['_threadCommentModel'][_0x45abb6(0x14f)]['pipe'](_0x10be35(0x10))[_0x45abb6(0x131)](_0x1f3872=>{const _0x52825b=_0x45abb6,_0x59c1fa=new Set();_0x1f3872['forEach'](_0x5fafbc=>{const _0x363275=_0x1e53;switch(_0x5fafbc[_0x363275(0x16a)]){case _0x363275(0x177):{const _0x1234cf=_0x5fafbc['payload'][_0x363275(0x164)];_0x59c1fa['add'](_0x1234cf);break;}}}),B(this[_0x52825b(0x135)],_0x59c1fa);}));}['_init'](){const _0x57fda4=_0x3ac7fc;this[_0x57fda4(0x167)](this[_0x57fda4(0x180)]['commentUpdate$'][_0x57fda4(0x131)](async _0x3175ea=>{const _0x3ad442=_0x57fda4;var _0x431cc8,_0x50fdf5,_0x1367aa,_0x7df48c;const _0x4db176=(_0x431cc8=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x3bd968=>_0x3bd968[_0x3ad442(0x148)]===_0x3175ea[_0x3ad442(0x148)]))==null?void 0x0:_0x431cc8[_0x3ad442(0x14a)];if(!_0x4db176)return;const {unitId:_0xf50944,subUnitId:_0x1b9ca5}=_0x4db176;switch(_0x3175ea['user']&&this[_0x3ad442(0x144)]['addUser'](_0x3175ea['user']),_0x3175ea[_0x3ad442(0x16a)]){case v[_0x3ad442(0x170)]:break;case v[_0x3ad442(0x133)]:{this['_threadCommentModel']['addComment'](_0xf50944,_0x1b9ca5,{'unitId':_0xf50944,'subUnitId':_0x1b9ca5,'ref':'','id':_0x3175ea[_0x3ad442(0x15e)],'dT':D(+_0x3175ea[_0x3ad442(0x175)]),'threadId':_0x3175ea['threadId'],'personId':(_0x1367aa=(_0x50fdf5=_0x3175ea[_0x3ad442(0x151)])==null?void 0x0:_0x50fdf5[_0x3ad442(0x152)])!=null?_0x1367aa:_0x3175ea[_0x3ad442(0x12b)],'text':JSON[_0x3ad442(0x16b)](_0x3175ea['content']),'parentId':_0x4db176['id']});break;}case v[_0x3ad442(0x147)]:{const _0x2a42a5=this['_threadCommentModel'][_0x3ad442(0x123)](_0xf50944,_0x1b9ca5,_0x3175ea[_0x3ad442(0x15e)]);_0x2a42a5&&_0x2a42a5[_0x3ad442(0x179)]&&this[_0x3ad442(0x139)]['deleteComment'](_0xf50944,_0x1b9ca5,_0x3175ea['replyId']);break;}case v[_0x3ad442(0x124)]:{this['_threadCommentModel'][_0x3ad442(0x161)](_0xf50944,_0x1b9ca5,{'commentId':_0x3175ea['replyId'],'text':JSON[_0x3ad442(0x16b)](_0x3175ea[_0x3ad442(0x162)])});break;}case v[_0x3ad442(0x173)]:{const _0x9d67ab=(_0x7df48c=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x1aea0d=>_0x1aea0d[_0x3ad442(0x148)]===_0x3175ea['threadId']))==null?void 0x0:_0x7df48c[_0x3ad442(0x14a)];_0x9d67ab&&this[_0x3ad442(0x139)][_0x3ad442(0x15b)](_0xf50944,_0x1b9ca5,_0x9d67ab['id'],_0x3175ea[_0x3ad442(0x141)]===I[_0x3ad442(0x13d)]);break;}}}));}};S=V([p(0x0,_0x133874(_0xc12547)),p(0x1,_0x133874(_0x2b6937)),p(0x2,_0x133874(_0x2b2172)),p(0x3,_0x133874(_0x43a099))],S);const z=_0x3ac7fc(0x13e),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x501ca2,_0xa1fbc4,_0x11fb06,_0x28900e)=>{const _0x2df4fa=_0x3ac7fc;for(var _0x362364=_0x28900e>0x1?void 0x0:_0x28900e?k(_0xa1fbc4,_0x11fb06):_0xa1fbc4,_0x4bb0d6=_0x501ca2[_0x2df4fa(0x143)]-0x1,_0x59e303;_0x4bb0d6>=0x0;_0x4bb0d6--)(_0x59e303=_0x501ca2[_0x4bb0d6])&&(_0x362364=_0x59e303(_0x362364)||_0x362364);return _0x362364;},_=(_0x49ec5c,_0x25eaf1)=>(_0x390f4d,_0x35d4b7)=>_0x25eaf1(_0x390f4d,_0x35d4b7,_0x49ec5c);function X(_0xa0b21e,_0x34cf6d){const _0x3bf43d=_0x3ac7fc,_0x3e3523=_0xa0b21e['replies'][0x0];return{..._0x34cf6d,'id':_0x3e3523[_0x3bf43d(0x15e)],'resolved':_0xa0b21e[_0x3bf43d(0x141)]===0x1,'dT':D(_0x3e3523[_0x3bf43d(0x175)]),'personId':_0x3e3523[_0x3bf43d(0x12b)],'threadId':_0x3e3523[_0x3bf43d(0x148)]};}function ee(_0x2c04df,_0xb3cb9c,_0x136815){const _0x58017a=_0x3ac7fc;var _0x1baa27,_0x49920f;if(((_0x49920f=(_0x1baa27=_0x2c04df==null?void 0x0:_0x2c04df[_0x58017a(0x122)])==null?void 0x0:_0x1baa27[_0x58017a(0x143)])!=null?_0x49920f:0x0)>0x0){const _0x519d5b=(_0x43cf51,_0x1df085)=>({'id':_0x43cf51['replyId'],'threadId':_0x43cf51[_0x58017a(0x148)],'dT':D(_0x43cf51[_0x58017a(0x175)]),'personId':_0x43cf51[_0x58017a(0x12b)],'resolved':_0x2c04df[_0x58017a(0x141)]===I['Solved'],'unitId':_0xb3cb9c,'subUnitId':_0x136815,'text':JSON[_0x58017a(0x16b)](_0x43cf51[_0x58017a(0x162)]),'parentId':_0x1df085}),_0x153840=_0x519d5b(_0x2c04df[_0x58017a(0x122)][0x0]);return{..._0x153840,'children':_0x2c04df[_0x58017a(0x122)][_0x58017a(0x185)](0x1)[_0x58017a(0x142)](_0x314fd5=>_0x519d5b(_0x314fd5,_0x153840['id']))};}return null;}let f=class{constructor(_0x18366e,_0x278479,_0x19eaf3,_0xdd2b2){const _0x39ed7a=_0x3ac7fc;this[_0x39ed7a(0x14b)]=_0x18366e,this['_userService']=_0x278479,this['_sessionService']=_0x19eaf3,this[_0x39ed7a(0x135)]=_0xdd2b2;}async[_0x3ac7fc(0x160)](_0x2e9431){const _0x421395=_0x3ac7fc;var _0x47bbc4,_0xfce07;const {parentId:_0x13553b,unitId:_0x392ad9,text:_0x20e764,threadId:_0xade419}=_0x2e9431,_0x4978bc=(_0xfce07=(_0x47bbc4=_0x20e764[_0x421395(0x153)])==null?void 0x0:_0x47bbc4[_0x421395(0x154)](_0x2685e3=>_0x2685e3[_0x421395(0x178)]===_0x370612[_0x421395(0x127)])[_0x421395(0x142)](_0x3a1302=>_0x3a1302[_0x421395(0x15f)]))!=null?_0xfce07:[],_0x1c2407=JSON[_0x421395(0x155)](_0x20e764),_0x25570c=(await this[_0x421395(0x125)][_0x421395(0x176)](_0x392ad9))[_0x421395(0x17f)]();if(_0x13553b){const _0x139d8a={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc,'threadId':_0xade419},_0x3b3648=(await this[_0x421395(0x14b)]['post']('/universer-api/comment/unit/'+_0x392ad9+'/reply',{'body':_0x139d8a}))[_0x421395(0x171)][_0x421395(0x159)];return{..._0x2e9431,'id':_0x3b3648['replyId'],'dT':_0x4356fa(+_0x3b3648[_0x421395(0x175)])[_0x421395(0x12d)](_0x421395(0x14c)),'personId':_0x3b3648[_0x421395(0x12b)]};}else{const _0x8f02d3={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc},_0x67b627=await this[_0x421395(0x14b)][_0x421395(0x130)]('/universer-api/comment/unit/'+_0x392ad9+_0x421395(0x15d),{'body':_0x8f02d3});return X(_0x67b627[_0x421395(0x171)][_0x421395(0x13c)],_0x2e9431);}}async[_0x3ac7fc(0x161)](_0x72161b){const _0xec4031=_0x3ac7fc;var _0x178880,_0x8ade41;const {text:_0x168322,unitId:_0x393c03}=_0x72161b,_0x3f46aa=(_0x8ade41=(_0x178880=_0x168322[_0xec4031(0x153)])==null?void 0x0:_0x178880[_0xec4031(0x154)](_0x2cf5f6=>_0x2cf5f6[_0xec4031(0x178)]===_0x370612[_0xec4031(0x127)])['map'](_0x21570f=>_0x21570f[_0xec4031(0x15f)]))!=null?_0x8ade41:[],_0x18aa83=JSON['stringify'](_0x168322),_0x37893f=_0x72161b[_0xec4031(0x148)],_0x34221d=_0x72161b['id'],_0x4cb833={'memberId':(await this[_0xec4031(0x125)][_0xec4031(0x176)](_0x393c03))['getMemberID'](),'unitId':_0x393c03,'threadId':_0x37893f,'mention':_0x3f46aa,'content':_0x18aa83,'replyId':_0x34221d},_0x3da072=await this['_httpService']['post'](_0xec4031(0x129)+_0x393c03+_0xec4031(0x15c),{'body':_0x4cb833});return!_0x3da072[_0xec4031(0x171)][_0xec4031(0x156)]||_0x3da072[_0xec4031(0x171)]['error'][_0xec4031(0x134)]===0x1;}async[_0x3ac7fc(0x15b)](_0x59af16){const _0x51fe06=_0x3ac7fc,{unitId:_0x3e53e2}=_0x59af16,_0x3ab3c5=_0x59af16[_0x51fe06(0x148)],_0x172970={'memberId':this[_0x51fe06(0x144)][_0x51fe06(0x13f)]()[_0x51fe06(0x152)],'unitId':_0x3e53e2,'threadId':_0x3ab3c5,'solved':_0x59af16[_0x51fe06(0x17a)]?I[_0x51fe06(0x13d)]:I['OpenOrReOpen']},_0x5a6c0a=await this['_httpService'][_0x51fe06(0x130)](_0x51fe06(0x129)+_0x3e53e2+_0x51fe06(0x17e),{'body':_0x172970});return!_0x5a6c0a['body']['error']||_0x5a6c0a[_0x51fe06(0x171)][_0x51fe06(0x156)][_0x51fe06(0x134)]===0x1;}async[_0x3ac7fc(0x12a)](_0x5e6025,_0x43bec9,_0x5a8ca1,_0x5321c1){const _0x50bfec=_0x3ac7fc,_0x28f8cf={'memberId':(await this[_0x50bfec(0x125)][_0x50bfec(0x176)](_0x5e6025))[_0x50bfec(0x17f)](),'threadId':_0x5a8ca1,'replyId':_0x5321c1,'unitId':_0x5e6025},_0xaea3cb=await this['_httpService'][_0x50bfec(0x130)](_0x50bfec(0x129)+_0x5e6025+_0x50bfec(0x166),{'body':_0x28f8cf});return!_0xaea3cb[_0x50bfec(0x171)][_0x50bfec(0x156)]||_0xaea3cb['body']['error'][_0x50bfec(0x134)]===0x1;}async['listComments'](_0x5ac970,_0x13f9fd,_0x2ba9fd){const _0x35e3d3=_0x3ac7fc,_0x58a38c={'unitId':_0x5ac970,'threadId':_0x2ba9fd},_0x5e5aaa=await this['_httpService']['post'](_0x35e3d3(0x129)+_0x5ac970+_0x35e3d3(0x128),{'body':_0x58a38c}),_0x30b1d6=_0x2ba9fd['map'](_0xf8fb31=>ee(_0x5e5aaa['body'][_0x35e3d3(0x14d)][_0xf8fb31],_0x5ac970,_0x13f9fd))[_0x35e3d3(0x154)](Boolean);return Object['values'](_0x5e5aaa[_0x35e3d3(0x171)][_0x35e3d3(0x17b)])[_0x35e3d3(0x15a)](_0x113258=>{const _0x994361=_0x35e3d3;this[_0x994361(0x144)]['addUser'](_0x113258);}),_0x30b1d6;}[_0x3ac7fc(0x145)](_0x4aba45){return{'id':_0x4aba45['id'],'threadId':_0x4aba45['threadId'],'ref':_0x4aba45['ref']};}};function _0x4a8f(){const _0x880634=['syncUpdateMutationToColla','defineProperty','reply','forEach','resolveComment','/edit','/add','replyId','rangeId','addComment','updateComment','content','736005lLkIqg','personId','2GPnCqa','/delete','disposeWithMe','291695PyWAwR','3511102DxeEgM','type','parse','getUser','dataSource','_config','2299816UByDWs','Add','body','UNIVER_UNKNOWN','Solve','unitId','createTimestamp','requireSession','add','rangeType','parentId','resolved','users','_threadCommentDataSourceService','136RJtCLK','/solved','getMemberID','_commentService','find','74124jiXvNm','552835koRClE','pluginName','slice','_threadCommentDataSource','replies','getComment','Edit','_sessionService','7491beKqOM','COMMENT','/list','/universer-api/comment/unit/','deleteComment','userId','UNRECOGNIZED','format','/universer-api/user/list','onReady','post','subscribe','36DuTVYe','Reply','code','_injector','OpenOrReOpen','getUnit','_initDataSource','_threadCommentModel','getOwnPropertyDescriptor','setConfig','comment','Solved','thread-comment-data-source.config','getCurrentUser','2600eeSHJB','solved','map','length','_userService','saveCommentToSnapshot','symbol','Delete','threadId','_configService','root','_httpService','YYYY/MM/DD\x20HH:mm','comments','get','commentUpdate$','Unknown','user','userID','customRanges','filter','stringify','error'];_0x4a8f=function(){return _0x880634;};return _0x4a8f();}f=Q([_(0x0,_0x133874(_0x16aebc)),_(0x1,_0x133874(_0x2b2172)),_(0x2,_0x133874(_0x4085da)),_(0x3,_0x133874(_0x43a099))],f);var re=Object[_0x3ac7fc(0x13a)],te=(_0x5543c5,_0x32b8d4,_0x5cc2e2,_0x184b1e)=>{const _0x347c38=_0x3ac7fc;for(var _0x25f001=_0x184b1e>0x1?void 0x0:_0x184b1e?re(_0x32b8d4,_0x5cc2e2):_0x32b8d4,_0x19c13b=_0x5543c5[_0x347c38(0x143)]-0x1,_0x209cc4;_0x19c13b>=0x0;_0x19c13b--)(_0x209cc4=_0x5543c5[_0x19c13b])&&(_0x25f001=_0x209cc4(_0x25f001)||_0x25f001);return _0x25f001;},N=(_0x29267f,_0x57e409)=>(_0x561270,_0x4f56af)=>_0x57e409(_0x561270,_0x4f56af,_0x29267f);let g=class extends _0x2967d0{constructor(_0x392f63,_0x2d8064){const _0x3f5f85=_0x3ac7fc;super(),this[_0x3f5f85(0x17c)]=_0x392f63,this[_0x3f5f85(0x121)]=_0x2d8064,this[_0x3f5f85(0x138)]();}['_initDataSource'](){const _0x1c745a=_0x3ac7fc;this[_0x1c745a(0x17c)][_0x1c745a(0x16d)]=this[_0x1c745a(0x121)],this[_0x1c745a(0x17c)][_0x1c745a(0x157)]=!0x1;}};g=te([N(0x0,_0xecaf32),N(0x1,_0x133874(f))],g);var se=Object[_0x3ac7fc(0x158)],oe=Object[_0x3ac7fc(0x13a)],ne=(_0x20ec89,_0xa8e439,_0x1fc979)=>_0xa8e439 in _0x20ec89?se(_0x20ec89,_0xa8e439,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fc979}):_0x20ec89[_0xa8e439]=_0x1fc979,ie=(_0x53e0b9,_0x4d8263,_0x97d81d,_0x1e97ae)=>{const _0x216cdf=_0x3ac7fc;for(var _0x2b8073=_0x1e97ae>0x1?void 0x0:_0x1e97ae?oe(_0x4d8263,_0x97d81d):_0x4d8263,_0x4c531f=_0x53e0b9[_0x216cdf(0x143)]-0x1,_0xcfb379;_0x4c531f>=0x0;_0x4c531f--)(_0xcfb379=_0x53e0b9[_0x4c531f])&&(_0x2b8073=_0xcfb379(_0x2b8073)||_0x2b8073);return _0x2b8073;},w=(_0x2f1726,_0x4591cc)=>(_0x2cb41b,_0x28b6e3)=>_0x4591cc(_0x2cb41b,_0x28b6e3,_0x2f1726),$=(_0x4b8505,_0x2bd292,_0x503f3a)=>ne(_0x4b8505,typeof _0x2bd292!=_0x3ac7fc(0x146)?_0x2bd292+'':_0x2bd292,_0x503f3a);let b=class extends _0x365976{constructor(_0x41552d=M,_0x372897,_0x2d67fd){const _0x41b63b=_0x3ac7fc;super(),this['_config']=_0x41552d,this[_0x41b63b(0x135)]=_0x372897,this[_0x41b63b(0x149)]=_0x2d67fd;const {..._0xee986e}=_0x531f64({},M,this[_0x41b63b(0x16e)]);this['_configService'][_0x41b63b(0x13b)](z,_0xee986e);}['onStarting'](){const _0x3e29e0=_0x3ac7fc;[[f],[g],[S]][_0x3e29e0(0x15a)](_0x5ad961=>{const _0x15ccb9=_0x3e29e0;this[_0x15ccb9(0x135)][_0x15ccb9(0x177)](_0x5ad961);});}[_0x3ac7fc(0x12f)](){const _0x155de3=_0x3ac7fc;this[_0x155de3(0x135)][_0x155de3(0x14e)](g),this[_0x155de3(0x135)][_0x155de3(0x14e)](S);}};function _0x1e53(_0x41dabb,_0x2a22ed){const _0x4a8f57=_0x4a8f();return _0x1e53=function(_0x1e5396,_0x44f623){_0x1e5396=_0x1e5396-0x121;let _0x47d694=_0x4a8f57[_0x1e5396];return _0x47d694;},_0x1e53(_0x41dabb,_0x2a22ed);}$(b,_0x3ac7fc(0x184),W),$(b,_0x3ac7fc(0x16a),_0x29d262[_0x3ac7fc(0x172)]),b=ie([_0x541538(_0x37de3d,_0x25082e,_0x34bfc7),w(0x1,_0x133874(_0x43a099)),w(0x2,_0x55cc27)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2319(){const _0x5d0f62=['/delete','parse','payload','rangeType','OpenOrReOpen','_injector','user','subscribe','users','/list','body','getCurrentUser','updateComment','userId','replies','40ZLfDWk','172BrtCUe','root','YYYY/MM/DD\x20HH:mm','_httpService','ref','1042281EYBXlf','_threadCommentDataSource','_initUserSync','code','get','Solve','281969ILZRYe','delete','/solved','resolveComment','_configService','requireSession','values','disposeWithMe','find','threadId','userID','UNRECOGNIZED','getMemberID','error','addUser','content','_commentService','onReady','slice','replyId','getOwnPropertyDescriptor','getUser','format','createTimestamp','getComment','_sessionService','solved','syncUpdateMutationToColla','resolved','/add','Solved','type','setConfig','_threadCommentModel','UNIVER_UNKNOWN','Reply','onStarting','17280aVxQUW','_initDataSource','addComment','Delete','1274862hFUalg','reply','_threadCommentDataSourceService','symbol','saveCommentToSnapshot','filter','forEach','237534gtaeKT','_userService','/universer-api/user/list','stringify','/universer-api/comment/unit/','thread-comment-data-source.config','rangeId','post','add','Edit','map','length','commentUpdate$','customRanges','getUnit','comments','Unknown','73479LMqijt','unitId','17646GVUvGS','/edit','COMMENT','Add'];_0x2319=function(){return _0x5d0f62;};return _0x2319();}const _0x47fc26=_0x260c;(function(_0x34ba70,_0x281d95){const _0x164bb9=_0x260c,_0x41c8a0=_0x34ba70();while(!![]){try{const _0x5d2c18=parseInt(_0x164bb9(0x1e7))/0x1+-parseInt(_0x164bb9(0x1c8))/0x2+-parseInt(_0x164bb9(0x1ae))/0x3+parseInt(_0x164bb9(0x1dc))/0x4*(-parseInt(_0x164bb9(0x1aa))/0x5)+-parseInt(_0x164bb9(0x1b5))/0x6+-parseInt(_0x164bb9(0x1c6))/0x7+-parseInt(_0x164bb9(0x1db))/0x8*(-parseInt(_0x164bb9(0x1e1))/0x9);if(_0x5d2c18===_0x281d95)break;else _0x41c8a0['push'](_0x41c8a0['shift']());}catch(_0x57ff1e){_0x41c8a0['push'](_0x41c8a0['shift']());}}}(_0x2319,0x37cbf));import{CommentService as _0x5dcb26,CollaborationSessionService as _0xf33af6,UniverCollaborationClientPlugin as _0x83ef3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xc79184}from'@univerjs-pro/license';import{dayjs as _0x9aa364,UserManagerService as _0x3be824,Inject as _0x321edf,Injector as _0x1f30c6,Disposable as _0x585462,CustomRangeType as _0x2d49c8,UniverInstanceType as _0xede23f,DependentOn as _0xa6f944,IConfigService as _0x54450d,Plugin as _0x2d2250,merge as _0x54b819}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ec74e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f0c98,IThreadCommentDataSourceService as _0x41c736}from'@univerjs/thread-comment';import{bufferTime as _0x5c1b54}from'rxjs';import{HTTPService as _0x1c9089}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x260c(_0x1b6059,_0x4b5457){const _0x2319c2=_0x2319();return _0x260c=function(_0x260cb4,_0x1d9c9f){_0x260cb4=_0x260cb4-0x196;let _0x2ba24f=_0x2319c2[_0x260cb4];return _0x2ba24f;},_0x260c(_0x1b6059,_0x4b5457);}var I=(_0x1735f5=>(_0x1735f5[_0x1735f5['OpenOrReOpen']=0x0]=_0x47fc26(0x1d0),_0x1735f5[_0x1735f5[_0x47fc26(0x1a3)]=0x1]=_0x47fc26(0x1a3),_0x1735f5[_0x1735f5[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0x1735f5))(I||{}),v=(_0xa927a8=>(_0xa927a8[_0xa927a8[_0x47fc26(0x1c5)]=0x0]=_0x47fc26(0x1c5),_0xa927a8[_0xa927a8[_0x47fc26(0x1cb)]=0x1]=_0x47fc26(0x1cb),_0xa927a8[_0xa927a8['Reply']=0x2]=_0x47fc26(0x1a8),_0xa927a8[_0xa927a8[_0x47fc26(0x1be)]=0x3]=_0x47fc26(0x1be),_0xa927a8[_0xa927a8[_0x47fc26(0x1ad)]=0x4]='Delete',_0xa927a8[_0xa927a8['Solve']=0x5]=_0x47fc26(0x1e6),_0xa927a8[_0xa927a8[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0xa927a8))(v||{});const D=_0x16a323=>_0x9aa364(new Date(+_0x16a323))[_0x47fc26(0x19b)](_0x47fc26(0x1de)),B=async(_0x2b5b34,_0xb608ae)=>{const _0x5e9aa2=_0x47fc26,_0x166a96=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x3be824),_0x53447d=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x1c9089);_0xb608ae[_0x5e9aa2(0x1b4)](_0x12b073=>{const _0x50362d=_0x5e9aa2;_0x166a96[_0x50362d(0x19a)](_0x12b073)&&_0xb608ae[_0x50362d(0x1e8)](_0x12b073);}),_0xb608ae['size']&&(await _0x53447d[_0x5e9aa2(0x1e5)](_0x5e9aa2(0x1b7),{'params':{'userIDs':[..._0xb608ae]}}))[_0x5e9aa2(0x1d6)][_0x5e9aa2(0x1d4)]['forEach'](_0x218867=>{const _0x55796c=_0x5e9aa2;_0x218867&&_0x166a96[_0x55796c(0x1f5)](_0x218867);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x927c31,_0x5203ba,_0x7daad,_0x33d3a2)=>{for(var _0x13fef0=_0x33d3a2>0x1?void 0x0:_0x33d3a2?K(_0x5203ba,_0x7daad):_0x5203ba,_0x3ab8a3=_0x927c31['length']-0x1,_0x15c4ec;_0x3ab8a3>=0x0;_0x3ab8a3--)(_0x15c4ec=_0x927c31[_0x3ab8a3])&&(_0x13fef0=_0x15c4ec(_0x13fef0)||_0x13fef0);return _0x13fef0;},p=(_0x319415,_0x408d31)=>(_0x3ce163,_0x330555)=>_0x408d31(_0x3ce163,_0x330555,_0x319415);let S=class extends _0x585462{constructor(_0x328b88,_0x299aec,_0x4122a8,_0x371c70){const _0xe29ead=_0x47fc26;super(),this[_0xe29ead(0x1f7)]=_0x328b88,this['_threadCommentModel']=_0x299aec,this[_0xe29ead(0x1b6)]=_0x4122a8,this[_0xe29ead(0x1d1)]=_0x371c70,this['_init'](),this[_0xe29ead(0x1e3)]();}[_0x47fc26(0x1e3)](){const _0x17bd23=_0x47fc26;this[_0x17bd23(0x1ee)](this[_0x17bd23(0x1a6)][_0x17bd23(0x1c1)]['pipe'](_0x5c1b54(0x10))[_0x17bd23(0x1d3)](_0x4c50a4=>{const _0x39c352=new Set();_0x4c50a4['forEach'](_0x4ced81=>{const _0x293fa5=_0x260c;switch(_0x4ced81['type']){case _0x293fa5(0x1bd):{const _0x1259e1=_0x4ced81[_0x293fa5(0x1ce)]['personId'];_0x39c352[_0x293fa5(0x1bd)](_0x1259e1);break;}}}),B(this['_injector'],_0x39c352);}));}['_init'](){const _0x488d94=_0x47fc26;this[_0x488d94(0x1ee)](this['_commentService'][_0x488d94(0x1c1)]['subscribe'](async _0x1d5bc8=>{const _0x117830=_0x488d94;var _0x375766,_0x1b270a,_0x140070,_0x3ca7fa;const _0x1520a3=(_0x375766=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8[_0x117830(0x1c7)])[_0x117830(0x1ef)](_0x3d2791=>_0x3d2791[_0x117830(0x1f0)]===_0x1d5bc8['threadId']))==null?void 0x0:_0x375766['root'];if(!_0x1520a3)return;const {unitId:_0xeef3a8,subUnitId:_0x46d4dd}=_0x1520a3;switch(_0x1d5bc8[_0x117830(0x1d2)]&&this[_0x117830(0x1b6)]['addUser'](_0x1d5bc8['user']),_0x1d5bc8[_0x117830(0x1a4)]){case v['Add']:break;case v[_0x117830(0x1a8)]:{this[_0x117830(0x1a6)][_0x117830(0x1ac)](_0xeef3a8,_0x46d4dd,{'unitId':_0xeef3a8,'subUnitId':_0x46d4dd,'ref':'','id':_0x1d5bc8[_0x117830(0x198)],'dT':D(+_0x1d5bc8[_0x117830(0x19c)]),'threadId':_0x1d5bc8['threadId'],'personId':(_0x140070=(_0x1b270a=_0x1d5bc8[_0x117830(0x1d2)])==null?void 0x0:_0x1b270a[_0x117830(0x1f1)])!=null?_0x140070:_0x1d5bc8[_0x117830(0x1d9)],'text':JSON['parse'](_0x1d5bc8[_0x117830(0x1f6)]),'parentId':_0x1520a3['id']});break;}case v[_0x117830(0x1ad)]:{const _0x1583aa=this[_0x117830(0x1a6)][_0x117830(0x19d)](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);_0x1583aa&&_0x1583aa['parentId']&&this[_0x117830(0x1a6)]['deleteComment'](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);break;}case v[_0x117830(0x1be)]:{this[_0x117830(0x1a6)][_0x117830(0x1d8)](_0xeef3a8,_0x46d4dd,{'commentId':_0x1d5bc8['replyId'],'text':JSON[_0x117830(0x1cd)](_0x1d5bc8[_0x117830(0x1f6)])});break;}case v[_0x117830(0x1e6)]:{const _0x43ddca=(_0x3ca7fa=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8['unitId'])[_0x117830(0x1ef)](_0x1ead56=>_0x1ead56[_0x117830(0x1f0)]===_0x1d5bc8[_0x117830(0x1f0)]))==null?void 0x0:_0x3ca7fa[_0x117830(0x1dd)];_0x43ddca&&this[_0x117830(0x1a6)][_0x117830(0x1ea)](_0xeef3a8,_0x46d4dd,_0x43ddca['id'],_0x1d5bc8[_0x117830(0x19f)]===I[_0x117830(0x1a3)]);break;}}}));}};S=V([p(0x0,_0x321edf(_0x5dcb26)),p(0x1,_0x321edf(_0x2f0c98)),p(0x2,_0x321edf(_0x3be824)),p(0x3,_0x321edf(_0x1f30c6))],S);const z=_0x47fc26(0x1ba),M={};var k=Object[_0x47fc26(0x199)],Q=(_0xb09a87,_0x49f828,_0x39d4ac,_0x11304b)=>{const _0x5f43b1=_0x47fc26;for(var _0x2a38ae=_0x11304b>0x1?void 0x0:_0x11304b?k(_0x49f828,_0x39d4ac):_0x49f828,_0xae389=_0xb09a87[_0x5f43b1(0x1c0)]-0x1,_0x4b9d81;_0xae389>=0x0;_0xae389--)(_0x4b9d81=_0xb09a87[_0xae389])&&(_0x2a38ae=_0x4b9d81(_0x2a38ae)||_0x2a38ae);return _0x2a38ae;},_=(_0x35d2f9,_0x1ad20e)=>(_0x437467,_0x3bf411)=>_0x1ad20e(_0x437467,_0x3bf411,_0x35d2f9);function X(_0x13a250,_0x3481b4){const _0x4c4870=_0x47fc26,_0x30cb26=_0x13a250[_0x4c4870(0x1da)][0x0];return{..._0x3481b4,'id':_0x30cb26['replyId'],'resolved':_0x13a250[_0x4c4870(0x19f)]===0x1,'dT':D(_0x30cb26[_0x4c4870(0x19c)]),'personId':_0x30cb26[_0x4c4870(0x1d9)],'threadId':_0x30cb26[_0x4c4870(0x1f0)]};}function ee(_0x36cb90,_0x243ef9,_0x36dd4b){const _0x491b54=_0x47fc26;var _0x1bdd23,_0x3e3238;if(((_0x3e3238=(_0x1bdd23=_0x36cb90==null?void 0x0:_0x36cb90[_0x491b54(0x1da)])==null?void 0x0:_0x1bdd23[_0x491b54(0x1c0)])!=null?_0x3e3238:0x0)>0x0){const _0x2ee385=(_0x4deaeb,_0x527cf1)=>({'id':_0x4deaeb[_0x491b54(0x198)],'threadId':_0x4deaeb[_0x491b54(0x1f0)],'dT':D(_0x4deaeb[_0x491b54(0x19c)]),'personId':_0x4deaeb[_0x491b54(0x1d9)],'resolved':_0x36cb90[_0x491b54(0x19f)]===I[_0x491b54(0x1a3)],'unitId':_0x243ef9,'subUnitId':_0x36dd4b,'text':JSON[_0x491b54(0x1cd)](_0x4deaeb[_0x491b54(0x1f6)]),'parentId':_0x527cf1}),_0x28a5c6=_0x2ee385(_0x36cb90[_0x491b54(0x1da)][0x0]);return{..._0x28a5c6,'children':_0x36cb90[_0x491b54(0x1da)][_0x491b54(0x197)](0x1)[_0x491b54(0x1bf)](_0x43b292=>_0x2ee385(_0x43b292,_0x28a5c6['id']))};}return null;}let f=class{constructor(_0xabc3b9,_0x3519ce,_0x521326,_0x36f213){const _0x283bd4=_0x47fc26;this[_0x283bd4(0x1df)]=_0xabc3b9,this[_0x283bd4(0x1b6)]=_0x3519ce,this['_sessionService']=_0x521326,this[_0x283bd4(0x1d1)]=_0x36f213;}async[_0x47fc26(0x1ac)](_0x52630d){const _0x2eb6c6=_0x47fc26;var _0x23bfc9,_0x42c2ba;const {parentId:_0x25451b,unitId:_0x31df77,text:_0x5e6e3e,threadId:_0x3794f7}=_0x52630d,_0x6d3777=(_0x42c2ba=(_0x23bfc9=_0x5e6e3e[_0x2eb6c6(0x1c2)])==null?void 0x0:_0x23bfc9[_0x2eb6c6(0x1b3)](_0x549e21=>_0x549e21[_0x2eb6c6(0x1cf)]===_0x2d49c8[_0x2eb6c6(0x1ca)])[_0x2eb6c6(0x1bf)](_0x3ae6da=>_0x3ae6da[_0x2eb6c6(0x1bb)]))!=null?_0x42c2ba:[],_0xfc668a=JSON[_0x2eb6c6(0x1b8)](_0x5e6e3e),_0xa4f0eb=(await this[_0x2eb6c6(0x19e)][_0x2eb6c6(0x1ec)](_0x31df77))['getMemberID']();if(_0x25451b){const _0x549871={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777,'threadId':_0x3794f7},_0x3343f1=(await this[_0x2eb6c6(0x1df)]['post'](_0x2eb6c6(0x1b9)+_0x31df77+'/reply',{'body':_0x549871}))['body'][_0x2eb6c6(0x1af)];return{..._0x52630d,'id':_0x3343f1[_0x2eb6c6(0x198)],'dT':_0x9aa364(+_0x3343f1[_0x2eb6c6(0x19c)])['format'](_0x2eb6c6(0x1de)),'personId':_0x3343f1[_0x2eb6c6(0x1d9)]};}else{const _0x3b5f58={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777},_0x1064e7=await this[_0x2eb6c6(0x1df)][_0x2eb6c6(0x1bc)](_0x2eb6c6(0x1b9)+_0x31df77+_0x2eb6c6(0x1a2),{'body':_0x3b5f58});return X(_0x1064e7['body']['comment'],_0x52630d);}}async[_0x47fc26(0x1d8)](_0x3f2525){const _0x135b2c=_0x47fc26;var _0x532785,_0x1c5ce6;const {text:_0x34b779,unitId:_0x45480a}=_0x3f2525,_0x2555c6=(_0x1c5ce6=(_0x532785=_0x34b779[_0x135b2c(0x1c2)])==null?void 0x0:_0x532785[_0x135b2c(0x1b3)](_0x356601=>_0x356601[_0x135b2c(0x1cf)]===_0x2d49c8[_0x135b2c(0x1ca)])[_0x135b2c(0x1bf)](_0x16f542=>_0x16f542[_0x135b2c(0x1bb)]))!=null?_0x1c5ce6:[],_0x1f488d=JSON[_0x135b2c(0x1b8)](_0x34b779),_0x346b58=_0x3f2525[_0x135b2c(0x1f0)],_0x576f41=_0x3f2525['id'],_0xc798ea={'memberId':(await this[_0x135b2c(0x19e)][_0x135b2c(0x1ec)](_0x45480a))[_0x135b2c(0x1f3)](),'unitId':_0x45480a,'threadId':_0x346b58,'mention':_0x2555c6,'content':_0x1f488d,'replyId':_0x576f41},_0x56a8b3=await this['_httpService']['post'](_0x135b2c(0x1b9)+_0x45480a+_0x135b2c(0x1c9),{'body':_0xc798ea});return!_0x56a8b3[_0x135b2c(0x1d6)]['error']||_0x56a8b3[_0x135b2c(0x1d6)][_0x135b2c(0x1f4)][_0x135b2c(0x1e4)]===0x1;}async[_0x47fc26(0x1ea)](_0x4cdbc9){const _0x352b68=_0x47fc26,{unitId:_0x395a1e}=_0x4cdbc9,_0x248276=_0x4cdbc9[_0x352b68(0x1f0)],_0x395e81={'memberId':this[_0x352b68(0x1b6)][_0x352b68(0x1d7)]()[_0x352b68(0x1f1)],'unitId':_0x395a1e,'threadId':_0x248276,'solved':_0x4cdbc9[_0x352b68(0x1a1)]?I[_0x352b68(0x1a3)]:I['OpenOrReOpen']},_0x3938f9=await this['_httpService'][_0x352b68(0x1bc)](_0x352b68(0x1b9)+_0x395a1e+_0x352b68(0x1e9),{'body':_0x395e81});return!_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]||_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]['code']===0x1;}async['deleteComment'](_0x19388c,_0x13ffcc,_0x109415,_0x536d68){const _0x4a289e=_0x47fc26,_0x2b09eb={'memberId':(await this['_sessionService'][_0x4a289e(0x1ec)](_0x19388c))['getMemberID'](),'threadId':_0x109415,'replyId':_0x536d68,'unitId':_0x19388c},_0x223195=await this[_0x4a289e(0x1df)][_0x4a289e(0x1bc)](_0x4a289e(0x1b9)+_0x19388c+_0x4a289e(0x1cc),{'body':_0x2b09eb});return!_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]||_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]['code']===0x1;}async['listComments'](_0x57d844,_0xe2c5f7,_0x474ede){const _0x248abd=_0x47fc26,_0x384bc3={'unitId':_0x57d844,'threadId':_0x474ede},_0x1e8b60=await this[_0x248abd(0x1df)][_0x248abd(0x1bc)](_0x248abd(0x1b9)+_0x57d844+_0x248abd(0x1d5),{'body':_0x384bc3}),_0x5d5815=_0x474ede['map'](_0x3835e5=>ee(_0x1e8b60['body'][_0x248abd(0x1c4)][_0x3835e5],_0x57d844,_0xe2c5f7))['filter'](Boolean);return Object[_0x248abd(0x1ed)](_0x1e8b60[_0x248abd(0x1d6)][_0x248abd(0x1d4)])[_0x248abd(0x1b4)](_0x20a2ef=>{const _0x9d257f=_0x248abd;this['_userService'][_0x9d257f(0x1f5)](_0x20a2ef);}),_0x5d5815;}[_0x47fc26(0x1b2)](_0x565e7e){const _0x52ea76=_0x47fc26;return{'id':_0x565e7e['id'],'threadId':_0x565e7e[_0x52ea76(0x1f0)],'ref':_0x565e7e[_0x52ea76(0x1e0)]};}};f=Q([_(0x0,_0x321edf(_0x1c9089)),_(0x1,_0x321edf(_0x3be824)),_(0x2,_0x321edf(_0xf33af6)),_(0x3,_0x321edf(_0x1f30c6))],f);var re=Object[_0x47fc26(0x199)],te=(_0x4a0a8d,_0x678ea1,_0x36a12c,_0x508e21)=>{const _0x359bd0=_0x47fc26;for(var _0x1986fb=_0x508e21>0x1?void 0x0:_0x508e21?re(_0x678ea1,_0x36a12c):_0x678ea1,_0x14943a=_0x4a0a8d[_0x359bd0(0x1c0)]-0x1,_0x5b2474;_0x14943a>=0x0;_0x14943a--)(_0x5b2474=_0x4a0a8d[_0x14943a])&&(_0x1986fb=_0x5b2474(_0x1986fb)||_0x1986fb);return _0x1986fb;},N=(_0x50fb3c,_0x55a612)=>(_0x3d1b84,_0x389020)=>_0x55a612(_0x3d1b84,_0x389020,_0x50fb3c);let g=class extends _0x585462{constructor(_0x2dd2b4,_0x59b55b){const _0x109c38=_0x47fc26;super(),this['_threadCommentDataSourceService']=_0x2dd2b4,this[_0x109c38(0x1e2)]=_0x59b55b,this[_0x109c38(0x1ab)]();}['_initDataSource'](){const _0x49f5d8=_0x47fc26;this['_threadCommentDataSourceService']['dataSource']=this[_0x49f5d8(0x1e2)],this[_0x49f5d8(0x1b0)][_0x49f5d8(0x1a0)]=!0x1;}};g=te([N(0x0,_0x41c736),N(0x1,_0x321edf(f))],g);var se=Object['defineProperty'],oe=Object[_0x47fc26(0x199)],ne=(_0x1efed7,_0x3878e0,_0x1dfefd)=>_0x3878e0 in _0x1efed7?se(_0x1efed7,_0x3878e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dfefd}):_0x1efed7[_0x3878e0]=_0x1dfefd,ie=(_0x49bc90,_0x15fb9c,_0x19e5c9,_0xfb9733)=>{const _0x51b755=_0x47fc26;for(var _0x4b70bb=_0xfb9733>0x1?void 0x0:_0xfb9733?oe(_0x15fb9c,_0x19e5c9):_0x15fb9c,_0x2b4c59=_0x49bc90[_0x51b755(0x1c0)]-0x1,_0x5e1f2a;_0x2b4c59>=0x0;_0x2b4c59--)(_0x5e1f2a=_0x49bc90[_0x2b4c59])&&(_0x4b70bb=_0x5e1f2a(_0x4b70bb)||_0x4b70bb);return _0x4b70bb;},w=(_0x39523f,_0x2f4b3c)=>(_0x34bfe4,_0x237f64)=>_0x2f4b3c(_0x34bfe4,_0x237f64,_0x39523f),$=(_0x4a94e3,_0x1c03af,_0x5e4f58)=>ne(_0x4a94e3,typeof _0x1c03af!=_0x47fc26(0x1b1)?_0x1c03af+'':_0x1c03af,_0x5e4f58);let b=class extends _0x2d2250{constructor(_0x45ee8c=M,_0x2f3010,_0x1dd338){const _0x372e26=_0x47fc26;super(),this['_config']=_0x45ee8c,this[_0x372e26(0x1d1)]=_0x2f3010,this[_0x372e26(0x1eb)]=_0x1dd338;const {..._0x59f697}=_0x54b819({},M,this['_config']);this[_0x372e26(0x1eb)][_0x372e26(0x1a5)](z,_0x59f697);}[_0x47fc26(0x1a9)](){[[f],[g],[S]]['forEach'](_0x18c6a2=>{const _0x284bd3=_0x260c;this[_0x284bd3(0x1d1)][_0x284bd3(0x1bd)](_0x18c6a2);});}[_0x47fc26(0x196)](){const _0x9ed62=_0x47fc26;this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](g),this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](S);}};$(b,'pluginName',W),$(b,_0x47fc26(0x1a4),_0xede23f[_0x47fc26(0x1a7)]),b=ie([_0xa6f944(_0x5ec74e,_0x83ef3,_0xc79184),w(0x1,_0x321edf(_0x1f30c6)),w(0x2,_0x54450d)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3ac7fc=_0x1e53;(function(_0x3c488b,_0x46a2d5){const _0x2b441d=_0x1e53,_0x788a96=_0x3c488b();while(!![]){try{const _0x3aa45e=-parseInt(_0x2b441d(0x183))/0x1*(-parseInt(_0x2b441d(0x165))/0x2)+parseInt(_0x2b441d(0x163))/0x3+-parseInt(_0x2b441d(0x16f))/0x4+-parseInt(_0x2b441d(0x168))/0x5*(parseInt(_0x2b441d(0x132))/0x6)+parseInt(_0x2b441d(0x169))/0x7+-parseInt(_0x2b441d(0x17d))/0x8*(parseInt(_0x2b441d(0x182))/0x9)+-parseInt(_0x2b441d(0x140))/0xa*(-parseInt(_0x2b441d(0x126))/0xb);if(_0x3aa45e===_0x46a2d5)break;else _0x788a96['push'](_0x788a96['shift']());}catch(_0x2160f3){_0x788a96['push'](_0x788a96['shift']());}}}(_0x4a8f,0x648a8));import{CommentService as _0xc12547,CollaborationSessionService as _0x4085da,UniverCollaborationClientPlugin as _0x25082e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x34bfc7}from'@univerjs-pro/license';import{dayjs as _0x4356fa,UserManagerService as _0x2b2172,Inject as _0x133874,Injector as _0x43a099,Disposable as _0x2967d0,CustomRangeType as _0x370612,UniverInstanceType as _0x29d262,DependentOn as _0x541538,IConfigService as _0x55cc27,Plugin as _0x365976,merge as _0x531f64}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37de3d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2b6937,IThreadCommentDataSourceService as _0xecaf32}from'@univerjs/thread-comment';import{bufferTime as _0x10be35}from'rxjs';import{HTTPService as _0x16aebc}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x64e6af=>(_0x64e6af[_0x64e6af[_0x3ac7fc(0x136)]=0x0]=_0x3ac7fc(0x136),_0x64e6af[_0x64e6af[_0x3ac7fc(0x13d)]=0x1]='Solved',_0x64e6af[_0x64e6af[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x64e6af))(I||{}),v=(_0x1c4999=>(_0x1c4999[_0x1c4999[_0x3ac7fc(0x150)]=0x0]='Unknown',_0x1c4999[_0x1c4999[_0x3ac7fc(0x170)]=0x1]=_0x3ac7fc(0x170),_0x1c4999[_0x1c4999['Reply']=0x2]=_0x3ac7fc(0x133),_0x1c4999[_0x1c4999[_0x3ac7fc(0x124)]=0x3]=_0x3ac7fc(0x124),_0x1c4999[_0x1c4999[_0x3ac7fc(0x147)]=0x4]=_0x3ac7fc(0x147),_0x1c4999[_0x1c4999['Solve']=0x5]=_0x3ac7fc(0x173),_0x1c4999[_0x1c4999[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x1c4999))(v||{});const D=_0x1fcb2b=>_0x4356fa(new Date(+_0x1fcb2b))[_0x3ac7fc(0x12d)](_0x3ac7fc(0x14c)),B=async(_0x5dda6b,_0x32ae58)=>{const _0x3786f1=_0x3ac7fc,_0x5d46d2=_0x5dda6b[_0x3786f1(0x14e)](_0x2b2172),_0x3ea773=_0x5dda6b[_0x3786f1(0x14e)](_0x16aebc);_0x32ae58['forEach'](_0x30952f=>{const _0x4f4d26=_0x3786f1;_0x5d46d2[_0x4f4d26(0x16c)](_0x30952f)&&_0x32ae58['delete'](_0x30952f);}),_0x32ae58['size']&&(await _0x3ea773[_0x3786f1(0x14e)](_0x3786f1(0x12e),{'params':{'userIDs':[..._0x32ae58]}}))[_0x3786f1(0x171)][_0x3786f1(0x17b)][_0x3786f1(0x15a)](_0x27cd20=>{_0x27cd20&&_0x5d46d2['addUser'](_0x27cd20);});};var K=Object[_0x3ac7fc(0x13a)],V=(_0x9c9ec5,_0x54eea9,_0x1784f6,_0x3ecb5c)=>{const _0xa9d929=_0x3ac7fc;for(var _0x1f5f09=_0x3ecb5c>0x1?void 0x0:_0x3ecb5c?K(_0x54eea9,_0x1784f6):_0x54eea9,_0x16c95a=_0x9c9ec5[_0xa9d929(0x143)]-0x1,_0x481af1;_0x16c95a>=0x0;_0x16c95a--)(_0x481af1=_0x9c9ec5[_0x16c95a])&&(_0x1f5f09=_0x481af1(_0x1f5f09)||_0x1f5f09);return _0x1f5f09;},p=(_0x140d90,_0x244f45)=>(_0x1dc97a,_0x40ab5d)=>_0x244f45(_0x1dc97a,_0x40ab5d,_0x140d90);let S=class extends _0x2967d0{constructor(_0x4e5bac,_0x190b4b,_0xb469e6,_0x5060ed){const _0x2dd255=_0x3ac7fc;super(),this[_0x2dd255(0x180)]=_0x4e5bac,this[_0x2dd255(0x139)]=_0x190b4b,this[_0x2dd255(0x144)]=_0xb469e6,this[_0x2dd255(0x135)]=_0x5060ed,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x45abb6=_0x3ac7fc;this[_0x45abb6(0x167)](this['_threadCommentModel'][_0x45abb6(0x14f)]['pipe'](_0x10be35(0x10))[_0x45abb6(0x131)](_0x1f3872=>{const _0x52825b=_0x45abb6,_0x59c1fa=new Set();_0x1f3872['forEach'](_0x5fafbc=>{const _0x363275=_0x1e53;switch(_0x5fafbc[_0x363275(0x16a)]){case _0x363275(0x177):{const _0x1234cf=_0x5fafbc['payload'][_0x363275(0x164)];_0x59c1fa['add'](_0x1234cf);break;}}}),B(this[_0x52825b(0x135)],_0x59c1fa);}));}['_init'](){const _0x57fda4=_0x3ac7fc;this[_0x57fda4(0x167)](this[_0x57fda4(0x180)]['commentUpdate$'][_0x57fda4(0x131)](async _0x3175ea=>{const _0x3ad442=_0x57fda4;var _0x431cc8,_0x50fdf5,_0x1367aa,_0x7df48c;const _0x4db176=(_0x431cc8=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x3bd968=>_0x3bd968[_0x3ad442(0x148)]===_0x3175ea[_0x3ad442(0x148)]))==null?void 0x0:_0x431cc8[_0x3ad442(0x14a)];if(!_0x4db176)return;const {unitId:_0xf50944,subUnitId:_0x1b9ca5}=_0x4db176;switch(_0x3175ea['user']&&this[_0x3ad442(0x144)]['addUser'](_0x3175ea['user']),_0x3175ea[_0x3ad442(0x16a)]){case v[_0x3ad442(0x170)]:break;case v[_0x3ad442(0x133)]:{this['_threadCommentModel']['addComment'](_0xf50944,_0x1b9ca5,{'unitId':_0xf50944,'subUnitId':_0x1b9ca5,'ref':'','id':_0x3175ea[_0x3ad442(0x15e)],'dT':D(+_0x3175ea[_0x3ad442(0x175)]),'threadId':_0x3175ea['threadId'],'personId':(_0x1367aa=(_0x50fdf5=_0x3175ea[_0x3ad442(0x151)])==null?void 0x0:_0x50fdf5[_0x3ad442(0x152)])!=null?_0x1367aa:_0x3175ea[_0x3ad442(0x12b)],'text':JSON[_0x3ad442(0x16b)](_0x3175ea['content']),'parentId':_0x4db176['id']});break;}case v[_0x3ad442(0x147)]:{const _0x2a42a5=this['_threadCommentModel'][_0x3ad442(0x123)](_0xf50944,_0x1b9ca5,_0x3175ea[_0x3ad442(0x15e)]);_0x2a42a5&&_0x2a42a5[_0x3ad442(0x179)]&&this[_0x3ad442(0x139)]['deleteComment'](_0xf50944,_0x1b9ca5,_0x3175ea['replyId']);break;}case v[_0x3ad442(0x124)]:{this['_threadCommentModel'][_0x3ad442(0x161)](_0xf50944,_0x1b9ca5,{'commentId':_0x3175ea['replyId'],'text':JSON[_0x3ad442(0x16b)](_0x3175ea[_0x3ad442(0x162)])});break;}case v[_0x3ad442(0x173)]:{const _0x9d67ab=(_0x7df48c=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x1aea0d=>_0x1aea0d[_0x3ad442(0x148)]===_0x3175ea['threadId']))==null?void 0x0:_0x7df48c[_0x3ad442(0x14a)];_0x9d67ab&&this[_0x3ad442(0x139)][_0x3ad442(0x15b)](_0xf50944,_0x1b9ca5,_0x9d67ab['id'],_0x3175ea[_0x3ad442(0x141)]===I[_0x3ad442(0x13d)]);break;}}}));}};S=V([p(0x0,_0x133874(_0xc12547)),p(0x1,_0x133874(_0x2b6937)),p(0x2,_0x133874(_0x2b2172)),p(0x3,_0x133874(_0x43a099))],S);const z=_0x3ac7fc(0x13e),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x501ca2,_0xa1fbc4,_0x11fb06,_0x28900e)=>{const _0x2df4fa=_0x3ac7fc;for(var _0x362364=_0x28900e>0x1?void 0x0:_0x28900e?k(_0xa1fbc4,_0x11fb06):_0xa1fbc4,_0x4bb0d6=_0x501ca2[_0x2df4fa(0x143)]-0x1,_0x59e303;_0x4bb0d6>=0x0;_0x4bb0d6--)(_0x59e303=_0x501ca2[_0x4bb0d6])&&(_0x362364=_0x59e303(_0x362364)||_0x362364);return _0x362364;},_=(_0x49ec5c,_0x25eaf1)=>(_0x390f4d,_0x35d4b7)=>_0x25eaf1(_0x390f4d,_0x35d4b7,_0x49ec5c);function X(_0xa0b21e,_0x34cf6d){const _0x3bf43d=_0x3ac7fc,_0x3e3523=_0xa0b21e['replies'][0x0];return{..._0x34cf6d,'id':_0x3e3523[_0x3bf43d(0x15e)],'resolved':_0xa0b21e[_0x3bf43d(0x141)]===0x1,'dT':D(_0x3e3523[_0x3bf43d(0x175)]),'personId':_0x3e3523[_0x3bf43d(0x12b)],'threadId':_0x3e3523[_0x3bf43d(0x148)]};}function ee(_0x2c04df,_0xb3cb9c,_0x136815){const _0x58017a=_0x3ac7fc;var _0x1baa27,_0x49920f;if(((_0x49920f=(_0x1baa27=_0x2c04df==null?void 0x0:_0x2c04df[_0x58017a(0x122)])==null?void 0x0:_0x1baa27[_0x58017a(0x143)])!=null?_0x49920f:0x0)>0x0){const _0x519d5b=(_0x43cf51,_0x1df085)=>({'id':_0x43cf51['replyId'],'threadId':_0x43cf51[_0x58017a(0x148)],'dT':D(_0x43cf51[_0x58017a(0x175)]),'personId':_0x43cf51[_0x58017a(0x12b)],'resolved':_0x2c04df[_0x58017a(0x141)]===I['Solved'],'unitId':_0xb3cb9c,'subUnitId':_0x136815,'text':JSON[_0x58017a(0x16b)](_0x43cf51[_0x58017a(0x162)]),'parentId':_0x1df085}),_0x153840=_0x519d5b(_0x2c04df[_0x58017a(0x122)][0x0]);return{..._0x153840,'children':_0x2c04df[_0x58017a(0x122)][_0x58017a(0x185)](0x1)[_0x58017a(0x142)](_0x314fd5=>_0x519d5b(_0x314fd5,_0x153840['id']))};}return null;}let f=class{constructor(_0x18366e,_0x278479,_0x19eaf3,_0xdd2b2){const _0x39ed7a=_0x3ac7fc;this[_0x39ed7a(0x14b)]=_0x18366e,this['_userService']=_0x278479,this['_sessionService']=_0x19eaf3,this[_0x39ed7a(0x135)]=_0xdd2b2;}async[_0x3ac7fc(0x160)](_0x2e9431){const _0x421395=_0x3ac7fc;var _0x47bbc4,_0xfce07;const {parentId:_0x13553b,unitId:_0x392ad9,text:_0x20e764,threadId:_0xade419}=_0x2e9431,_0x4978bc=(_0xfce07=(_0x47bbc4=_0x20e764[_0x421395(0x153)])==null?void 0x0:_0x47bbc4[_0x421395(0x154)](_0x2685e3=>_0x2685e3[_0x421395(0x178)]===_0x370612[_0x421395(0x127)])[_0x421395(0x142)](_0x3a1302=>_0x3a1302[_0x421395(0x15f)]))!=null?_0xfce07:[],_0x1c2407=JSON[_0x421395(0x155)](_0x20e764),_0x25570c=(await this[_0x421395(0x125)][_0x421395(0x176)](_0x392ad9))[_0x421395(0x17f)]();if(_0x13553b){const _0x139d8a={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc,'threadId':_0xade419},_0x3b3648=(await this[_0x421395(0x14b)]['post']('/universer-api/comment/unit/'+_0x392ad9+'/reply',{'body':_0x139d8a}))[_0x421395(0x171)][_0x421395(0x159)];return{..._0x2e9431,'id':_0x3b3648['replyId'],'dT':_0x4356fa(+_0x3b3648[_0x421395(0x175)])[_0x421395(0x12d)](_0x421395(0x14c)),'personId':_0x3b3648[_0x421395(0x12b)]};}else{const _0x8f02d3={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc},_0x67b627=await this[_0x421395(0x14b)][_0x421395(0x130)]('/universer-api/comment/unit/'+_0x392ad9+_0x421395(0x15d),{'body':_0x8f02d3});return X(_0x67b627[_0x421395(0x171)][_0x421395(0x13c)],_0x2e9431);}}async[_0x3ac7fc(0x161)](_0x72161b){const _0xec4031=_0x3ac7fc;var _0x178880,_0x8ade41;const {text:_0x168322,unitId:_0x393c03}=_0x72161b,_0x3f46aa=(_0x8ade41=(_0x178880=_0x168322[_0xec4031(0x153)])==null?void 0x0:_0x178880[_0xec4031(0x154)](_0x2cf5f6=>_0x2cf5f6[_0xec4031(0x178)]===_0x370612[_0xec4031(0x127)])['map'](_0x21570f=>_0x21570f[_0xec4031(0x15f)]))!=null?_0x8ade41:[],_0x18aa83=JSON['stringify'](_0x168322),_0x37893f=_0x72161b[_0xec4031(0x148)],_0x34221d=_0x72161b['id'],_0x4cb833={'memberId':(await this[_0xec4031(0x125)][_0xec4031(0x176)](_0x393c03))['getMemberID'](),'unitId':_0x393c03,'threadId':_0x37893f,'mention':_0x3f46aa,'content':_0x18aa83,'replyId':_0x34221d},_0x3da072=await this['_httpService']['post'](_0xec4031(0x129)+_0x393c03+_0xec4031(0x15c),{'body':_0x4cb833});return!_0x3da072[_0xec4031(0x171)][_0xec4031(0x156)]||_0x3da072[_0xec4031(0x171)]['error'][_0xec4031(0x134)]===0x1;}async[_0x3ac7fc(0x15b)](_0x59af16){const _0x51fe06=_0x3ac7fc,{unitId:_0x3e53e2}=_0x59af16,_0x3ab3c5=_0x59af16[_0x51fe06(0x148)],_0x172970={'memberId':this[_0x51fe06(0x144)][_0x51fe06(0x13f)]()[_0x51fe06(0x152)],'unitId':_0x3e53e2,'threadId':_0x3ab3c5,'solved':_0x59af16[_0x51fe06(0x17a)]?I[_0x51fe06(0x13d)]:I['OpenOrReOpen']},_0x5a6c0a=await this['_httpService'][_0x51fe06(0x130)](_0x51fe06(0x129)+_0x3e53e2+_0x51fe06(0x17e),{'body':_0x172970});return!_0x5a6c0a['body']['error']||_0x5a6c0a[_0x51fe06(0x171)][_0x51fe06(0x156)][_0x51fe06(0x134)]===0x1;}async[_0x3ac7fc(0x12a)](_0x5e6025,_0x43bec9,_0x5a8ca1,_0x5321c1){const _0x50bfec=_0x3ac7fc,_0x28f8cf={'memberId':(await this[_0x50bfec(0x125)][_0x50bfec(0x176)](_0x5e6025))[_0x50bfec(0x17f)](),'threadId':_0x5a8ca1,'replyId':_0x5321c1,'unitId':_0x5e6025},_0xaea3cb=await this['_httpService'][_0x50bfec(0x130)](_0x50bfec(0x129)+_0x5e6025+_0x50bfec(0x166),{'body':_0x28f8cf});return!_0xaea3cb[_0x50bfec(0x171)][_0x50bfec(0x156)]||_0xaea3cb['body']['error'][_0x50bfec(0x134)]===0x1;}async['listComments'](_0x5ac970,_0x13f9fd,_0x2ba9fd){const _0x35e3d3=_0x3ac7fc,_0x58a38c={'unitId':_0x5ac970,'threadId':_0x2ba9fd},_0x5e5aaa=await this['_httpService']['post'](_0x35e3d3(0x129)+_0x5ac970+_0x35e3d3(0x128),{'body':_0x58a38c}),_0x30b1d6=_0x2ba9fd['map'](_0xf8fb31=>ee(_0x5e5aaa['body'][_0x35e3d3(0x14d)][_0xf8fb31],_0x5ac970,_0x13f9fd))[_0x35e3d3(0x154)](Boolean);return Object['values'](_0x5e5aaa[_0x35e3d3(0x171)][_0x35e3d3(0x17b)])[_0x35e3d3(0x15a)](_0x113258=>{const _0x994361=_0x35e3d3;this[_0x994361(0x144)]['addUser'](_0x113258);}),_0x30b1d6;}[_0x3ac7fc(0x145)](_0x4aba45){return{'id':_0x4aba45['id'],'threadId':_0x4aba45['threadId'],'ref':_0x4aba45['ref']};}};function _0x4a8f(){const _0x880634=['syncUpdateMutationToColla','defineProperty','reply','forEach','resolveComment','/edit','/add','replyId','rangeId','addComment','updateComment','content','736005lLkIqg','personId','2GPnCqa','/delete','disposeWithMe','291695PyWAwR','3511102DxeEgM','type','parse','getUser','dataSource','_config','2299816UByDWs','Add','body','UNIVER_UNKNOWN','Solve','unitId','createTimestamp','requireSession','add','rangeType','parentId','resolved','users','_threadCommentDataSourceService','136RJtCLK','/solved','getMemberID','_commentService','find','74124jiXvNm','552835koRClE','pluginName','slice','_threadCommentDataSource','replies','getComment','Edit','_sessionService','7491beKqOM','COMMENT','/list','/universer-api/comment/unit/','deleteComment','userId','UNRECOGNIZED','format','/universer-api/user/list','onReady','post','subscribe','36DuTVYe','Reply','code','_injector','OpenOrReOpen','getUnit','_initDataSource','_threadCommentModel','getOwnPropertyDescriptor','setConfig','comment','Solved','thread-comment-data-source.config','getCurrentUser','2600eeSHJB','solved','map','length','_userService','saveCommentToSnapshot','symbol','Delete','threadId','_configService','root','_httpService','YYYY/MM/DD\x20HH:mm','comments','get','commentUpdate$','Unknown','user','userID','customRanges','filter','stringify','error'];_0x4a8f=function(){return _0x880634;};return _0x4a8f();}f=Q([_(0x0,_0x133874(_0x16aebc)),_(0x1,_0x133874(_0x2b2172)),_(0x2,_0x133874(_0x4085da)),_(0x3,_0x133874(_0x43a099))],f);var re=Object[_0x3ac7fc(0x13a)],te=(_0x5543c5,_0x32b8d4,_0x5cc2e2,_0x184b1e)=>{const _0x347c38=_0x3ac7fc;for(var _0x25f001=_0x184b1e>0x1?void 0x0:_0x184b1e?re(_0x32b8d4,_0x5cc2e2):_0x32b8d4,_0x19c13b=_0x5543c5[_0x347c38(0x143)]-0x1,_0x209cc4;_0x19c13b>=0x0;_0x19c13b--)(_0x209cc4=_0x5543c5[_0x19c13b])&&(_0x25f001=_0x209cc4(_0x25f001)||_0x25f001);return _0x25f001;},N=(_0x29267f,_0x57e409)=>(_0x561270,_0x4f56af)=>_0x57e409(_0x561270,_0x4f56af,_0x29267f);let g=class extends _0x2967d0{constructor(_0x392f63,_0x2d8064){const _0x3f5f85=_0x3ac7fc;super(),this[_0x3f5f85(0x17c)]=_0x392f63,this[_0x3f5f85(0x121)]=_0x2d8064,this[_0x3f5f85(0x138)]();}['_initDataSource'](){const _0x1c745a=_0x3ac7fc;this[_0x1c745a(0x17c)][_0x1c745a(0x16d)]=this[_0x1c745a(0x121)],this[_0x1c745a(0x17c)][_0x1c745a(0x157)]=!0x1;}};g=te([N(0x0,_0xecaf32),N(0x1,_0x133874(f))],g);var se=Object[_0x3ac7fc(0x158)],oe=Object[_0x3ac7fc(0x13a)],ne=(_0x20ec89,_0xa8e439,_0x1fc979)=>_0xa8e439 in _0x20ec89?se(_0x20ec89,_0xa8e439,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fc979}):_0x20ec89[_0xa8e439]=_0x1fc979,ie=(_0x53e0b9,_0x4d8263,_0x97d81d,_0x1e97ae)=>{const _0x216cdf=_0x3ac7fc;for(var _0x2b8073=_0x1e97ae>0x1?void 0x0:_0x1e97ae?oe(_0x4d8263,_0x97d81d):_0x4d8263,_0x4c531f=_0x53e0b9[_0x216cdf(0x143)]-0x1,_0xcfb379;_0x4c531f>=0x0;_0x4c531f--)(_0xcfb379=_0x53e0b9[_0x4c531f])&&(_0x2b8073=_0xcfb379(_0x2b8073)||_0x2b8073);return _0x2b8073;},w=(_0x2f1726,_0x4591cc)=>(_0x2cb41b,_0x28b6e3)=>_0x4591cc(_0x2cb41b,_0x28b6e3,_0x2f1726),$=(_0x4b8505,_0x2bd292,_0x503f3a)=>ne(_0x4b8505,typeof _0x2bd292!=_0x3ac7fc(0x146)?_0x2bd292+'':_0x2bd292,_0x503f3a);let b=class extends _0x365976{constructor(_0x41552d=M,_0x372897,_0x2d67fd){const _0x41b63b=_0x3ac7fc;super(),this['_config']=_0x41552d,this[_0x41b63b(0x135)]=_0x372897,this[_0x41b63b(0x149)]=_0x2d67fd;const {..._0xee986e}=_0x531f64({},M,this[_0x41b63b(0x16e)]);this['_configService'][_0x41b63b(0x13b)](z,_0xee986e);}['onStarting'](){const _0x3e29e0=_0x3ac7fc;[[f],[g],[S]][_0x3e29e0(0x15a)](_0x5ad961=>{const _0x15ccb9=_0x3e29e0;this[_0x15ccb9(0x135)][_0x15ccb9(0x177)](_0x5ad961);});}[_0x3ac7fc(0x12f)](){const _0x155de3=_0x3ac7fc;this[_0x155de3(0x135)][_0x155de3(0x14e)](g),this[_0x155de3(0x135)][_0x155de3(0x14e)](S);}};function _0x1e53(_0x41dabb,_0x2a22ed){const _0x4a8f57=_0x4a8f();return _0x1e53=function(_0x1e5396,_0x44f623){_0x1e5396=_0x1e5396-0x121;let _0x47d694=_0x4a8f57[_0x1e5396];return _0x47d694;},_0x1e53(_0x41dabb,_0x2a22ed);}$(b,_0x3ac7fc(0x184),W),$(b,_0x3ac7fc(0x16a),_0x29d262[_0x3ac7fc(0x172)]),b=ie([_0x541538(_0x37de3d,_0x25082e,_0x34bfc7),w(0x1,_0x133874(_0x43a099)),w(0x2,_0x55cc27)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2319(){const _0x5d0f62=['/delete','parse','payload','rangeType','OpenOrReOpen','_injector','user','subscribe','users','/list','body','getCurrentUser','updateComment','userId','replies','40ZLfDWk','172BrtCUe','root','YYYY/MM/DD\x20HH:mm','_httpService','ref','1042281EYBXlf','_threadCommentDataSource','_initUserSync','code','get','Solve','281969ILZRYe','delete','/solved','resolveComment','_configService','requireSession','values','disposeWithMe','find','threadId','userID','UNRECOGNIZED','getMemberID','error','addUser','content','_commentService','onReady','slice','replyId','getOwnPropertyDescriptor','getUser','format','createTimestamp','getComment','_sessionService','solved','syncUpdateMutationToColla','resolved','/add','Solved','type','setConfig','_threadCommentModel','UNIVER_UNKNOWN','Reply','onStarting','17280aVxQUW','_initDataSource','addComment','Delete','1274862hFUalg','reply','_threadCommentDataSourceService','symbol','saveCommentToSnapshot','filter','forEach','237534gtaeKT','_userService','/universer-api/user/list','stringify','/universer-api/comment/unit/','thread-comment-data-source.config','rangeId','post','add','Edit','map','length','commentUpdate$','customRanges','getUnit','comments','Unknown','73479LMqijt','unitId','17646GVUvGS','/edit','COMMENT','Add'];_0x2319=function(){return _0x5d0f62;};return _0x2319();}const _0x47fc26=_0x260c;(function(_0x34ba70,_0x281d95){const _0x164bb9=_0x260c,_0x41c8a0=_0x34ba70();while(!![]){try{const _0x5d2c18=parseInt(_0x164bb9(0x1e7))/0x1+-parseInt(_0x164bb9(0x1c8))/0x2+-parseInt(_0x164bb9(0x1ae))/0x3+parseInt(_0x164bb9(0x1dc))/0x4*(-parseInt(_0x164bb9(0x1aa))/0x5)+-parseInt(_0x164bb9(0x1b5))/0x6+-parseInt(_0x164bb9(0x1c6))/0x7+-parseInt(_0x164bb9(0x1db))/0x8*(-parseInt(_0x164bb9(0x1e1))/0x9);if(_0x5d2c18===_0x281d95)break;else _0x41c8a0['push'](_0x41c8a0['shift']());}catch(_0x57ff1e){_0x41c8a0['push'](_0x41c8a0['shift']());}}}(_0x2319,0x37cbf));import{CommentService as _0x5dcb26,CollaborationSessionService as _0xf33af6,UniverCollaborationClientPlugin as _0x83ef3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xc79184}from'@univerjs-pro/license';import{dayjs as _0x9aa364,UserManagerService as _0x3be824,Inject as _0x321edf,Injector as _0x1f30c6,Disposable as _0x585462,CustomRangeType as _0x2d49c8,UniverInstanceType as _0xede23f,DependentOn as _0xa6f944,IConfigService as _0x54450d,Plugin as _0x2d2250,merge as _0x54b819}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ec74e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f0c98,IThreadCommentDataSourceService as _0x41c736}from'@univerjs/thread-comment';import{bufferTime as _0x5c1b54}from'rxjs';import{HTTPService as _0x1c9089}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x260c(_0x1b6059,_0x4b5457){const _0x2319c2=_0x2319();return _0x260c=function(_0x260cb4,_0x1d9c9f){_0x260cb4=_0x260cb4-0x196;let _0x2ba24f=_0x2319c2[_0x260cb4];return _0x2ba24f;},_0x260c(_0x1b6059,_0x4b5457);}var I=(_0x1735f5=>(_0x1735f5[_0x1735f5['OpenOrReOpen']=0x0]=_0x47fc26(0x1d0),_0x1735f5[_0x1735f5[_0x47fc26(0x1a3)]=0x1]=_0x47fc26(0x1a3),_0x1735f5[_0x1735f5[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0x1735f5))(I||{}),v=(_0xa927a8=>(_0xa927a8[_0xa927a8[_0x47fc26(0x1c5)]=0x0]=_0x47fc26(0x1c5),_0xa927a8[_0xa927a8[_0x47fc26(0x1cb)]=0x1]=_0x47fc26(0x1cb),_0xa927a8[_0xa927a8['Reply']=0x2]=_0x47fc26(0x1a8),_0xa927a8[_0xa927a8[_0x47fc26(0x1be)]=0x3]=_0x47fc26(0x1be),_0xa927a8[_0xa927a8[_0x47fc26(0x1ad)]=0x4]='Delete',_0xa927a8[_0xa927a8['Solve']=0x5]=_0x47fc26(0x1e6),_0xa927a8[_0xa927a8[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0xa927a8))(v||{});const D=_0x16a323=>_0x9aa364(new Date(+_0x16a323))[_0x47fc26(0x19b)](_0x47fc26(0x1de)),B=async(_0x2b5b34,_0xb608ae)=>{const _0x5e9aa2=_0x47fc26,_0x166a96=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x3be824),_0x53447d=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x1c9089);_0xb608ae[_0x5e9aa2(0x1b4)](_0x12b073=>{const _0x50362d=_0x5e9aa2;_0x166a96[_0x50362d(0x19a)](_0x12b073)&&_0xb608ae[_0x50362d(0x1e8)](_0x12b073);}),_0xb608ae['size']&&(await _0x53447d[_0x5e9aa2(0x1e5)](_0x5e9aa2(0x1b7),{'params':{'userIDs':[..._0xb608ae]}}))[_0x5e9aa2(0x1d6)][_0x5e9aa2(0x1d4)]['forEach'](_0x218867=>{const _0x55796c=_0x5e9aa2;_0x218867&&_0x166a96[_0x55796c(0x1f5)](_0x218867);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x927c31,_0x5203ba,_0x7daad,_0x33d3a2)=>{for(var _0x13fef0=_0x33d3a2>0x1?void 0x0:_0x33d3a2?K(_0x5203ba,_0x7daad):_0x5203ba,_0x3ab8a3=_0x927c31['length']-0x1,_0x15c4ec;_0x3ab8a3>=0x0;_0x3ab8a3--)(_0x15c4ec=_0x927c31[_0x3ab8a3])&&(_0x13fef0=_0x15c4ec(_0x13fef0)||_0x13fef0);return _0x13fef0;},p=(_0x319415,_0x408d31)=>(_0x3ce163,_0x330555)=>_0x408d31(_0x3ce163,_0x330555,_0x319415);let S=class extends _0x585462{constructor(_0x328b88,_0x299aec,_0x4122a8,_0x371c70){const _0xe29ead=_0x47fc26;super(),this[_0xe29ead(0x1f7)]=_0x328b88,this['_threadCommentModel']=_0x299aec,this[_0xe29ead(0x1b6)]=_0x4122a8,this[_0xe29ead(0x1d1)]=_0x371c70,this['_init'](),this[_0xe29ead(0x1e3)]();}[_0x47fc26(0x1e3)](){const _0x17bd23=_0x47fc26;this[_0x17bd23(0x1ee)](this[_0x17bd23(0x1a6)][_0x17bd23(0x1c1)]['pipe'](_0x5c1b54(0x10))[_0x17bd23(0x1d3)](_0x4c50a4=>{const _0x39c352=new Set();_0x4c50a4['forEach'](_0x4ced81=>{const _0x293fa5=_0x260c;switch(_0x4ced81['type']){case _0x293fa5(0x1bd):{const _0x1259e1=_0x4ced81[_0x293fa5(0x1ce)]['personId'];_0x39c352[_0x293fa5(0x1bd)](_0x1259e1);break;}}}),B(this['_injector'],_0x39c352);}));}['_init'](){const _0x488d94=_0x47fc26;this[_0x488d94(0x1ee)](this['_commentService'][_0x488d94(0x1c1)]['subscribe'](async _0x1d5bc8=>{const _0x117830=_0x488d94;var _0x375766,_0x1b270a,_0x140070,_0x3ca7fa;const _0x1520a3=(_0x375766=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8[_0x117830(0x1c7)])[_0x117830(0x1ef)](_0x3d2791=>_0x3d2791[_0x117830(0x1f0)]===_0x1d5bc8['threadId']))==null?void 0x0:_0x375766['root'];if(!_0x1520a3)return;const {unitId:_0xeef3a8,subUnitId:_0x46d4dd}=_0x1520a3;switch(_0x1d5bc8[_0x117830(0x1d2)]&&this[_0x117830(0x1b6)]['addUser'](_0x1d5bc8['user']),_0x1d5bc8[_0x117830(0x1a4)]){case v['Add']:break;case v[_0x117830(0x1a8)]:{this[_0x117830(0x1a6)][_0x117830(0x1ac)](_0xeef3a8,_0x46d4dd,{'unitId':_0xeef3a8,'subUnitId':_0x46d4dd,'ref':'','id':_0x1d5bc8[_0x117830(0x198)],'dT':D(+_0x1d5bc8[_0x117830(0x19c)]),'threadId':_0x1d5bc8['threadId'],'personId':(_0x140070=(_0x1b270a=_0x1d5bc8[_0x117830(0x1d2)])==null?void 0x0:_0x1b270a[_0x117830(0x1f1)])!=null?_0x140070:_0x1d5bc8[_0x117830(0x1d9)],'text':JSON['parse'](_0x1d5bc8[_0x117830(0x1f6)]),'parentId':_0x1520a3['id']});break;}case v[_0x117830(0x1ad)]:{const _0x1583aa=this[_0x117830(0x1a6)][_0x117830(0x19d)](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);_0x1583aa&&_0x1583aa['parentId']&&this[_0x117830(0x1a6)]['deleteComment'](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);break;}case v[_0x117830(0x1be)]:{this[_0x117830(0x1a6)][_0x117830(0x1d8)](_0xeef3a8,_0x46d4dd,{'commentId':_0x1d5bc8['replyId'],'text':JSON[_0x117830(0x1cd)](_0x1d5bc8[_0x117830(0x1f6)])});break;}case v[_0x117830(0x1e6)]:{const _0x43ddca=(_0x3ca7fa=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8['unitId'])[_0x117830(0x1ef)](_0x1ead56=>_0x1ead56[_0x117830(0x1f0)]===_0x1d5bc8[_0x117830(0x1f0)]))==null?void 0x0:_0x3ca7fa[_0x117830(0x1dd)];_0x43ddca&&this[_0x117830(0x1a6)][_0x117830(0x1ea)](_0xeef3a8,_0x46d4dd,_0x43ddca['id'],_0x1d5bc8[_0x117830(0x19f)]===I[_0x117830(0x1a3)]);break;}}}));}};S=V([p(0x0,_0x321edf(_0x5dcb26)),p(0x1,_0x321edf(_0x2f0c98)),p(0x2,_0x321edf(_0x3be824)),p(0x3,_0x321edf(_0x1f30c6))],S);const z=_0x47fc26(0x1ba),M={};var k=Object[_0x47fc26(0x199)],Q=(_0xb09a87,_0x49f828,_0x39d4ac,_0x11304b)=>{const _0x5f43b1=_0x47fc26;for(var _0x2a38ae=_0x11304b>0x1?void 0x0:_0x11304b?k(_0x49f828,_0x39d4ac):_0x49f828,_0xae389=_0xb09a87[_0x5f43b1(0x1c0)]-0x1,_0x4b9d81;_0xae389>=0x0;_0xae389--)(_0x4b9d81=_0xb09a87[_0xae389])&&(_0x2a38ae=_0x4b9d81(_0x2a38ae)||_0x2a38ae);return _0x2a38ae;},_=(_0x35d2f9,_0x1ad20e)=>(_0x437467,_0x3bf411)=>_0x1ad20e(_0x437467,_0x3bf411,_0x35d2f9);function X(_0x13a250,_0x3481b4){const _0x4c4870=_0x47fc26,_0x30cb26=_0x13a250[_0x4c4870(0x1da)][0x0];return{..._0x3481b4,'id':_0x30cb26['replyId'],'resolved':_0x13a250[_0x4c4870(0x19f)]===0x1,'dT':D(_0x30cb26[_0x4c4870(0x19c)]),'personId':_0x30cb26[_0x4c4870(0x1d9)],'threadId':_0x30cb26[_0x4c4870(0x1f0)]};}function ee(_0x36cb90,_0x243ef9,_0x36dd4b){const _0x491b54=_0x47fc26;var _0x1bdd23,_0x3e3238;if(((_0x3e3238=(_0x1bdd23=_0x36cb90==null?void 0x0:_0x36cb90[_0x491b54(0x1da)])==null?void 0x0:_0x1bdd23[_0x491b54(0x1c0)])!=null?_0x3e3238:0x0)>0x0){const _0x2ee385=(_0x4deaeb,_0x527cf1)=>({'id':_0x4deaeb[_0x491b54(0x198)],'threadId':_0x4deaeb[_0x491b54(0x1f0)],'dT':D(_0x4deaeb[_0x491b54(0x19c)]),'personId':_0x4deaeb[_0x491b54(0x1d9)],'resolved':_0x36cb90[_0x491b54(0x19f)]===I[_0x491b54(0x1a3)],'unitId':_0x243ef9,'subUnitId':_0x36dd4b,'text':JSON[_0x491b54(0x1cd)](_0x4deaeb[_0x491b54(0x1f6)]),'parentId':_0x527cf1}),_0x28a5c6=_0x2ee385(_0x36cb90[_0x491b54(0x1da)][0x0]);return{..._0x28a5c6,'children':_0x36cb90[_0x491b54(0x1da)][_0x491b54(0x197)](0x1)[_0x491b54(0x1bf)](_0x43b292=>_0x2ee385(_0x43b292,_0x28a5c6['id']))};}return null;}let f=class{constructor(_0xabc3b9,_0x3519ce,_0x521326,_0x36f213){const _0x283bd4=_0x47fc26;this[_0x283bd4(0x1df)]=_0xabc3b9,this[_0x283bd4(0x1b6)]=_0x3519ce,this['_sessionService']=_0x521326,this[_0x283bd4(0x1d1)]=_0x36f213;}async[_0x47fc26(0x1ac)](_0x52630d){const _0x2eb6c6=_0x47fc26;var _0x23bfc9,_0x42c2ba;const {parentId:_0x25451b,unitId:_0x31df77,text:_0x5e6e3e,threadId:_0x3794f7}=_0x52630d,_0x6d3777=(_0x42c2ba=(_0x23bfc9=_0x5e6e3e[_0x2eb6c6(0x1c2)])==null?void 0x0:_0x23bfc9[_0x2eb6c6(0x1b3)](_0x549e21=>_0x549e21[_0x2eb6c6(0x1cf)]===_0x2d49c8[_0x2eb6c6(0x1ca)])[_0x2eb6c6(0x1bf)](_0x3ae6da=>_0x3ae6da[_0x2eb6c6(0x1bb)]))!=null?_0x42c2ba:[],_0xfc668a=JSON[_0x2eb6c6(0x1b8)](_0x5e6e3e),_0xa4f0eb=(await this[_0x2eb6c6(0x19e)][_0x2eb6c6(0x1ec)](_0x31df77))['getMemberID']();if(_0x25451b){const _0x549871={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777,'threadId':_0x3794f7},_0x3343f1=(await this[_0x2eb6c6(0x1df)]['post'](_0x2eb6c6(0x1b9)+_0x31df77+'/reply',{'body':_0x549871}))['body'][_0x2eb6c6(0x1af)];return{..._0x52630d,'id':_0x3343f1[_0x2eb6c6(0x198)],'dT':_0x9aa364(+_0x3343f1[_0x2eb6c6(0x19c)])['format'](_0x2eb6c6(0x1de)),'personId':_0x3343f1[_0x2eb6c6(0x1d9)]};}else{const _0x3b5f58={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777},_0x1064e7=await this[_0x2eb6c6(0x1df)][_0x2eb6c6(0x1bc)](_0x2eb6c6(0x1b9)+_0x31df77+_0x2eb6c6(0x1a2),{'body':_0x3b5f58});return X(_0x1064e7['body']['comment'],_0x52630d);}}async[_0x47fc26(0x1d8)](_0x3f2525){const _0x135b2c=_0x47fc26;var _0x532785,_0x1c5ce6;const {text:_0x34b779,unitId:_0x45480a}=_0x3f2525,_0x2555c6=(_0x1c5ce6=(_0x532785=_0x34b779[_0x135b2c(0x1c2)])==null?void 0x0:_0x532785[_0x135b2c(0x1b3)](_0x356601=>_0x356601[_0x135b2c(0x1cf)]===_0x2d49c8[_0x135b2c(0x1ca)])[_0x135b2c(0x1bf)](_0x16f542=>_0x16f542[_0x135b2c(0x1bb)]))!=null?_0x1c5ce6:[],_0x1f488d=JSON[_0x135b2c(0x1b8)](_0x34b779),_0x346b58=_0x3f2525[_0x135b2c(0x1f0)],_0x576f41=_0x3f2525['id'],_0xc798ea={'memberId':(await this[_0x135b2c(0x19e)][_0x135b2c(0x1ec)](_0x45480a))[_0x135b2c(0x1f3)](),'unitId':_0x45480a,'threadId':_0x346b58,'mention':_0x2555c6,'content':_0x1f488d,'replyId':_0x576f41},_0x56a8b3=await this['_httpService']['post'](_0x135b2c(0x1b9)+_0x45480a+_0x135b2c(0x1c9),{'body':_0xc798ea});return!_0x56a8b3[_0x135b2c(0x1d6)]['error']||_0x56a8b3[_0x135b2c(0x1d6)][_0x135b2c(0x1f4)][_0x135b2c(0x1e4)]===0x1;}async[_0x47fc26(0x1ea)](_0x4cdbc9){const _0x352b68=_0x47fc26,{unitId:_0x395a1e}=_0x4cdbc9,_0x248276=_0x4cdbc9[_0x352b68(0x1f0)],_0x395e81={'memberId':this[_0x352b68(0x1b6)][_0x352b68(0x1d7)]()[_0x352b68(0x1f1)],'unitId':_0x395a1e,'threadId':_0x248276,'solved':_0x4cdbc9[_0x352b68(0x1a1)]?I[_0x352b68(0x1a3)]:I['OpenOrReOpen']},_0x3938f9=await this['_httpService'][_0x352b68(0x1bc)](_0x352b68(0x1b9)+_0x395a1e+_0x352b68(0x1e9),{'body':_0x395e81});return!_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]||_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]['code']===0x1;}async['deleteComment'](_0x19388c,_0x13ffcc,_0x109415,_0x536d68){const _0x4a289e=_0x47fc26,_0x2b09eb={'memberId':(await this['_sessionService'][_0x4a289e(0x1ec)](_0x19388c))['getMemberID'](),'threadId':_0x109415,'replyId':_0x536d68,'unitId':_0x19388c},_0x223195=await this[_0x4a289e(0x1df)][_0x4a289e(0x1bc)](_0x4a289e(0x1b9)+_0x19388c+_0x4a289e(0x1cc),{'body':_0x2b09eb});return!_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]||_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]['code']===0x1;}async['listComments'](_0x57d844,_0xe2c5f7,_0x474ede){const _0x248abd=_0x47fc26,_0x384bc3={'unitId':_0x57d844,'threadId':_0x474ede},_0x1e8b60=await this[_0x248abd(0x1df)][_0x248abd(0x1bc)](_0x248abd(0x1b9)+_0x57d844+_0x248abd(0x1d5),{'body':_0x384bc3}),_0x5d5815=_0x474ede['map'](_0x3835e5=>ee(_0x1e8b60['body'][_0x248abd(0x1c4)][_0x3835e5],_0x57d844,_0xe2c5f7))['filter'](Boolean);return Object[_0x248abd(0x1ed)](_0x1e8b60[_0x248abd(0x1d6)][_0x248abd(0x1d4)])[_0x248abd(0x1b4)](_0x20a2ef=>{const _0x9d257f=_0x248abd;this['_userService'][_0x9d257f(0x1f5)](_0x20a2ef);}),_0x5d5815;}[_0x47fc26(0x1b2)](_0x565e7e){const _0x52ea76=_0x47fc26;return{'id':_0x565e7e['id'],'threadId':_0x565e7e[_0x52ea76(0x1f0)],'ref':_0x565e7e[_0x52ea76(0x1e0)]};}};f=Q([_(0x0,_0x321edf(_0x1c9089)),_(0x1,_0x321edf(_0x3be824)),_(0x2,_0x321edf(_0xf33af6)),_(0x3,_0x321edf(_0x1f30c6))],f);var re=Object[_0x47fc26(0x199)],te=(_0x4a0a8d,_0x678ea1,_0x36a12c,_0x508e21)=>{const _0x359bd0=_0x47fc26;for(var _0x1986fb=_0x508e21>0x1?void 0x0:_0x508e21?re(_0x678ea1,_0x36a12c):_0x678ea1,_0x14943a=_0x4a0a8d[_0x359bd0(0x1c0)]-0x1,_0x5b2474;_0x14943a>=0x0;_0x14943a--)(_0x5b2474=_0x4a0a8d[_0x14943a])&&(_0x1986fb=_0x5b2474(_0x1986fb)||_0x1986fb);return _0x1986fb;},N=(_0x50fb3c,_0x55a612)=>(_0x3d1b84,_0x389020)=>_0x55a612(_0x3d1b84,_0x389020,_0x50fb3c);let g=class extends _0x585462{constructor(_0x2dd2b4,_0x59b55b){const _0x109c38=_0x47fc26;super(),this['_threadCommentDataSourceService']=_0x2dd2b4,this[_0x109c38(0x1e2)]=_0x59b55b,this[_0x109c38(0x1ab)]();}['_initDataSource'](){const _0x49f5d8=_0x47fc26;this['_threadCommentDataSourceService']['dataSource']=this[_0x49f5d8(0x1e2)],this[_0x49f5d8(0x1b0)][_0x49f5d8(0x1a0)]=!0x1;}};g=te([N(0x0,_0x41c736),N(0x1,_0x321edf(f))],g);var se=Object['defineProperty'],oe=Object[_0x47fc26(0x199)],ne=(_0x1efed7,_0x3878e0,_0x1dfefd)=>_0x3878e0 in _0x1efed7?se(_0x1efed7,_0x3878e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dfefd}):_0x1efed7[_0x3878e0]=_0x1dfefd,ie=(_0x49bc90,_0x15fb9c,_0x19e5c9,_0xfb9733)=>{const _0x51b755=_0x47fc26;for(var _0x4b70bb=_0xfb9733>0x1?void 0x0:_0xfb9733?oe(_0x15fb9c,_0x19e5c9):_0x15fb9c,_0x2b4c59=_0x49bc90[_0x51b755(0x1c0)]-0x1,_0x5e1f2a;_0x2b4c59>=0x0;_0x2b4c59--)(_0x5e1f2a=_0x49bc90[_0x2b4c59])&&(_0x4b70bb=_0x5e1f2a(_0x4b70bb)||_0x4b70bb);return _0x4b70bb;},w=(_0x39523f,_0x2f4b3c)=>(_0x34bfe4,_0x237f64)=>_0x2f4b3c(_0x34bfe4,_0x237f64,_0x39523f),$=(_0x4a94e3,_0x1c03af,_0x5e4f58)=>ne(_0x4a94e3,typeof _0x1c03af!=_0x47fc26(0x1b1)?_0x1c03af+'':_0x1c03af,_0x5e4f58);let b=class extends _0x2d2250{constructor(_0x45ee8c=M,_0x2f3010,_0x1dd338){const _0x372e26=_0x47fc26;super(),this['_config']=_0x45ee8c,this[_0x372e26(0x1d1)]=_0x2f3010,this[_0x372e26(0x1eb)]=_0x1dd338;const {..._0x59f697}=_0x54b819({},M,this['_config']);this[_0x372e26(0x1eb)][_0x372e26(0x1a5)](z,_0x59f697);}[_0x47fc26(0x1a9)](){[[f],[g],[S]]['forEach'](_0x18c6a2=>{const _0x284bd3=_0x260c;this[_0x284bd3(0x1d1)][_0x284bd3(0x1bd)](_0x18c6a2);});}[_0x47fc26(0x196)](){const _0x9ed62=_0x47fc26;this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](g),this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](S);}};$(b,'pluginName',W),$(b,_0x47fc26(0x1a4),_0xede23f[_0x47fc26(0x1a7)]),b=ie([_0xa6f944(_0x5ec74e,_0x83ef3,_0xc79184),w(0x1,_0x321edf(_0x1f30c6)),w(0x2,_0x54450d)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x476fde,_0x526651){const _0x1c2f3b=_0x374f,_0x206f9b=_0x476fde();while(!![]){try{const _0x56806d=parseInt(_0x1c2f3b(0x211))/0x1+parseInt(_0x1c2f3b(0x1c7))/0x2*(parseInt(_0x1c2f3b(0x1cc))/0x3)+parseInt(_0x1c2f3b(0x21c))/0x4+-parseInt(_0x1c2f3b(0x1bb))/0x5+parseInt(_0x1c2f3b(0x1fc))/0x6*(parseInt(_0x1c2f3b(0x1be))/0x7)+parseInt(_0x1c2f3b(0x1e5))/0x8+-parseInt(_0x1c2f3b(0x1ee))/0x9*(parseInt(_0x1c2f3b(0x1ed))/0xa);if(_0x56806d===_0x526651)break;else _0x206f9b['push'](_0x206f9b['shift']());}catch(_0x26d4ee){_0x206f9b['push'](_0x206f9b['shift']());}}}(_0x36e1,0x79168),function(_0x5b3448,_0x11b030){const _0x5f3e1a=_0x374f;typeof exports==_0x5f3e1a(0x1ef)&&typeof module<'u'?_0x11b030(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5f3e1a(0x239)&&define['amd']?define([_0x5f3e1a(0x21f),_0x5f3e1a(0x236),'@univerjs-pro/license',_0x5f3e1a(0x1d7),_0x5f3e1a(0x1c2),_0x5f3e1a(0x1f4),'rxjs',_0x5f3e1a(0x1f7)],_0x11b030):(_0x5b3448=typeof globalThis<'u'?globalThis:_0x5b3448||self,_0x11b030(_0x5b3448[_0x5f3e1a(0x209)]={},_0x5b3448['UniverProCollaborationClient'],_0x5b3448[_0x5f3e1a(0x210)],_0x5b3448[_0x5f3e1a(0x228)],_0x5b3448[_0x5f3e1a(0x1c1)],_0x5b3448[_0x5f3e1a(0x223)],_0x5b3448['rxjs'],_0x5b3448[_0x5f3e1a(0x1d2)]));}(this,function(_0x3249bc,_0x5e13bf,_0x1cc471,_0x3ca6c2,_0x54c9f1,_0x5cdebe,_0x56fbfb,_0x4e4338){'use strict';const _0x3017c1=_0x374f;const _0x12dec8=_0x3017c1(0x22e);var _0x4938f1=(_0x56a403=>(_0x56a403[_0x56a403[_0x3017c1(0x1e9)]=0x0]=_0x3017c1(0x1e9),_0x56a403[_0x56a403[_0x3017c1(0x1db)]=0x1]=_0x3017c1(0x1db),_0x56a403[_0x56a403[_0x3017c1(0x1ff)]=-0x1]=_0x3017c1(0x1ff),_0x56a403))(_0x4938f1||{}),_0x2b0a24=(_0x3fdf6a=>(_0x3fdf6a[_0x3fdf6a['Unknown']=0x0]=_0x3017c1(0x230),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x204)]=0x1]=_0x3017c1(0x204),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x22f)]=0x2]=_0x3017c1(0x22f),_0x3fdf6a[_0x3fdf6a['Edit']=0x3]='Edit',_0x3fdf6a[_0x3fdf6a['Delete']=0x4]=_0x3017c1(0x1e1),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x220)]=0x5]=_0x3017c1(0x220),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x1ff)]=-0x1]=_0x3017c1(0x1ff),_0x3fdf6a))(_0x2b0a24||{});const _0x2a4cdf=_0x5c5dac=>_0x3ca6c2[_0x3017c1(0x1c5)](new Date(+_0x5c5dac))[_0x3017c1(0x202)](_0x3017c1(0x1da)),_0x5bc2e7=async(_0x4e3809,_0xedac2d)=>{const _0x415695=_0x3017c1,_0x44f117=_0x4e3809['get'](_0x3ca6c2[_0x415695(0x226)]),_0x2600b7=_0x4e3809[_0x415695(0x20d)](_0x4e4338[_0x415695(0x1d8)]);_0xedac2d[_0x415695(0x1fd)](_0x26d4bf=>{const _0x430b15=_0x415695;_0x44f117[_0x430b15(0x1f1)](_0x26d4bf)&&_0xedac2d[_0x430b15(0x221)](_0x26d4bf);}),_0xedac2d['size']&&(await _0x2600b7[_0x415695(0x20d)](_0x415695(0x1cf),{'params':{'userIDs':[..._0xedac2d]}}))['body']['users']['forEach'](_0x32d64e=>{const _0x361ed3=_0x415695;_0x32d64e&&_0x44f117[_0x361ed3(0x1ba)](_0x32d64e);});};var _0x515550=Object['getOwnPropertyDescriptor'],_0x2de564=(_0x521c1e,_0x569597,_0x4e4a7e,_0x5689d0)=>{for(var _0x53cd1c=_0x5689d0>0x1?void 0x0:_0x5689d0?_0x515550(_0x569597,_0x4e4a7e):_0x569597,_0x576b99=_0x521c1e['length']-0x1,_0x5d4a35;_0x576b99>=0x0;_0x576b99--)(_0x5d4a35=_0x521c1e[_0x576b99])&&(_0x53cd1c=_0x5d4a35(_0x53cd1c)||_0x53cd1c);return _0x53cd1c;},_0x5b70e9=(_0x23964c,_0x2fef51)=>(_0x39b160,_0x47cfff)=>_0x2fef51(_0x39b160,_0x47cfff,_0x23964c);let _0x519bdd=class extends _0x3ca6c2[_0x3017c1(0x22b)]{constructor(_0x362321,_0x398b1e,_0x59b215,_0x32390a){const _0x13025d=_0x3017c1;super(),this[_0x13025d(0x20b)]=_0x362321,this[_0x13025d(0x1f5)]=_0x398b1e,this[_0x13025d(0x23a)]=_0x59b215,this['_injector']=_0x32390a,this[_0x13025d(0x229)](),this['_initUserSync']();}['_initUserSync'](){const _0x5d4d85=_0x3017c1;this[_0x5d4d85(0x21e)](this['_threadCommentModel'][_0x5d4d85(0x207)][_0x5d4d85(0x213)](_0x56fbfb[_0x5d4d85(0x1c6)](0x10))[_0x5d4d85(0x1e2)](_0x20945d=>{const _0xcb932b=_0x5d4d85,_0x4264ef=new Set();_0x20945d[_0xcb932b(0x1fd)](_0x3ac9e1=>{const _0x1d01ec=_0xcb932b;switch(_0x3ac9e1[_0x1d01ec(0x1b7)]){case'add':{const _0x188f16=_0x3ac9e1[_0x1d01ec(0x1b6)][_0x1d01ec(0x21d)];_0x4264ef[_0x1d01ec(0x1b8)](_0x188f16);break;}}}),_0x5bc2e7(this[_0xcb932b(0x1d9)],_0x4264ef);}));}['_init'](){const _0x10a2db=_0x3017c1;this[_0x10a2db(0x21e)](this[_0x10a2db(0x20b)][_0x10a2db(0x207)][_0x10a2db(0x1e2)](async _0x4b8479=>{const _0x146273=_0x10a2db;var _0x8a399,_0x3ad49e,_0x580ccc,_0x1b7273;const _0x528be3=(_0x8a399=this[_0x146273(0x1f5)]['getUnit'](_0x4b8479[_0x146273(0x1e6)])[_0x146273(0x20a)](_0x58fa35=>_0x58fa35[_0x146273(0x1bd)]===_0x4b8479[_0x146273(0x1bd)]))==null?void 0x0:_0x8a399[_0x146273(0x222)];if(!_0x528be3)return;const {unitId:_0x5ce8bf,subUnitId:_0x3066c4}=_0x528be3;switch(_0x4b8479[_0x146273(0x1c9)]&&this[_0x146273(0x23a)][_0x146273(0x1ba)](_0x4b8479[_0x146273(0x1c9)]),_0x4b8479['type']){case _0x2b0a24[_0x146273(0x204)]:break;case _0x2b0a24['Reply']:{this[_0x146273(0x1f5)][_0x146273(0x1cd)](_0x5ce8bf,_0x3066c4,{'unitId':_0x5ce8bf,'subUnitId':_0x3066c4,'ref':'','id':_0x4b8479[_0x146273(0x1d3)],'dT':_0x2a4cdf(+_0x4b8479[_0x146273(0x1f0)]),'threadId':_0x4b8479[_0x146273(0x1bd)],'personId':(_0x580ccc=(_0x3ad49e=_0x4b8479[_0x146273(0x1c9)])==null?void 0x0:_0x3ad49e['userID'])!=null?_0x580ccc:_0x4b8479[_0x146273(0x1d4)],'text':JSON['parse'](_0x4b8479[_0x146273(0x227)]),'parentId':_0x528be3['id']});break;}case _0x2b0a24[_0x146273(0x1e1)]:{const _0x36521f=this['_threadCommentModel'][_0x146273(0x203)](_0x5ce8bf,_0x3066c4,_0x4b8479[_0x146273(0x1d3)]);_0x36521f&&_0x36521f[_0x146273(0x1d5)]&&this[_0x146273(0x1f5)][_0x146273(0x201)](_0x5ce8bf,_0x3066c4,_0x4b8479[_0x146273(0x1d3)]);break;}case _0x2b0a24['Edit']:{this[_0x146273(0x1f5)][_0x146273(0x1f3)](_0x5ce8bf,_0x3066c4,{'commentId':_0x4b8479[_0x146273(0x1d3)],'text':JSON[_0x146273(0x231)](_0x4b8479[_0x146273(0x227)])});break;}case _0x2b0a24[_0x146273(0x220)]:{const _0x110252=(_0x1b7273=this[_0x146273(0x1f5)][_0x146273(0x1e0)](_0x4b8479[_0x146273(0x1e6)])[_0x146273(0x20a)](_0x532782=>_0x532782[_0x146273(0x1bd)]===_0x4b8479[_0x146273(0x1bd)]))==null?void 0x0:_0x1b7273[_0x146273(0x222)];_0x110252&&this['_threadCommentModel'][_0x146273(0x1e3)](_0x5ce8bf,_0x3066c4,_0x110252['id'],_0x4b8479['solved']===_0x4938f1[_0x146273(0x1db)]);break;}}}));}};_0x519bdd=_0x2de564([_0x5b70e9(0x0,_0x3ca6c2['Inject'](_0x5e13bf[_0x3017c1(0x1de)])),_0x5b70e9(0x1,_0x3ca6c2[_0x3017c1(0x1c0)](_0x5cdebe[_0x3017c1(0x234)])),_0x5b70e9(0x2,_0x3ca6c2['Inject'](_0x3ca6c2['UserManagerService'])),_0x5b70e9(0x3,_0x3ca6c2[_0x3017c1(0x1c0)](_0x3ca6c2['Injector']))],_0x519bdd);const _0x270cda=_0x3017c1(0x212),_0x52a5e4={};var _0x57c51d=Object[_0x3017c1(0x215)],_0x1249c1=(_0x19c6b3,_0x3d9bf2,_0x45c62f,_0x387434)=>{const _0x1bd3f1=_0x3017c1;for(var _0x29e935=_0x387434>0x1?void 0x0:_0x387434?_0x57c51d(_0x3d9bf2,_0x45c62f):_0x3d9bf2,_0x452926=_0x19c6b3[_0x1bd3f1(0x1fa)]-0x1,_0x3c0c6a;_0x452926>=0x0;_0x452926--)(_0x3c0c6a=_0x19c6b3[_0x452926])&&(_0x29e935=_0x3c0c6a(_0x29e935)||_0x29e935);return _0x29e935;},_0x58a856=(_0x212ac0,_0x503595)=>(_0x3b6b0e,_0x2d08dc)=>_0x503595(_0x3b6b0e,_0x2d08dc,_0x212ac0);function _0x5cceda(_0x340f21,_0x5210b6){const _0x572e2e=_0x3017c1,_0x4f86e4=_0x340f21[_0x572e2e(0x1d6)][0x0];return{..._0x5210b6,'id':_0x4f86e4[_0x572e2e(0x1d3)],'resolved':_0x340f21[_0x572e2e(0x22d)]===0x1,'dT':_0x2a4cdf(_0x4f86e4[_0x572e2e(0x1f0)]),'personId':_0x4f86e4[_0x572e2e(0x1d4)],'threadId':_0x4f86e4[_0x572e2e(0x1bd)]};}function _0x12ce0b(_0x3849ae,_0x884c53,_0x34c86e){const _0x5bf7f1=_0x3017c1;var _0x267a81,_0xe426ce;if(((_0xe426ce=(_0x267a81=_0x3849ae==null?void 0x0:_0x3849ae['replies'])==null?void 0x0:_0x267a81['length'])!=null?_0xe426ce:0x0)>0x0){const _0x165d8e=(_0x3b4927,_0x364701)=>({'id':_0x3b4927[_0x5bf7f1(0x1d3)],'threadId':_0x3b4927[_0x5bf7f1(0x1bd)],'dT':_0x2a4cdf(_0x3b4927['createTimestamp']),'personId':_0x3b4927[_0x5bf7f1(0x1d4)],'resolved':_0x3849ae[_0x5bf7f1(0x22d)]===_0x4938f1['Solved'],'unitId':_0x884c53,'subUnitId':_0x34c86e,'text':JSON[_0x5bf7f1(0x231)](_0x3b4927[_0x5bf7f1(0x227)]),'parentId':_0x364701}),_0x21eb18=_0x165d8e(_0x3849ae['replies'][0x0]);return{..._0x21eb18,'children':_0x3849ae[_0x5bf7f1(0x1d6)][_0x5bf7f1(0x22a)](0x1)['map'](_0x5eb299=>_0x165d8e(_0x5eb299,_0x21eb18['id']))};}return null;}let _0x1bcc49=class{constructor(_0x3114f9,_0x33bc1b,_0x2763af,_0x45bead){const _0x2bb272=_0x3017c1;this[_0x2bb272(0x1fe)]=_0x3114f9,this[_0x2bb272(0x23a)]=_0x33bc1b,this['_sessionService']=_0x2763af,this[_0x2bb272(0x1d9)]=_0x45bead;}async['addComment'](_0x468777){const _0x415ddd=_0x3017c1;var _0x42d03e,_0x547247;const {parentId:_0x527323,unitId:_0x2232a9,text:_0x4a2a76,threadId:_0x4af3d8}=_0x468777,_0x28267c=(_0x547247=(_0x42d03e=_0x4a2a76[_0x415ddd(0x1f2)])==null?void 0x0:_0x42d03e['filter'](_0x3d43b1=>_0x3d43b1['rangeType']===_0x3ca6c2[_0x415ddd(0x1cb)]['COMMENT'])[_0x415ddd(0x22c)](_0x15e4c0=>_0x15e4c0['rangeId']))!=null?_0x547247:[],_0x2ae1bf=JSON[_0x415ddd(0x233)](_0x4a2a76),_0x36959c=(await this[_0x415ddd(0x1e4)][_0x415ddd(0x1ca)](_0x2232a9))[_0x415ddd(0x216)]();if(_0x527323){const _0x16b6a8={'memberId':_0x36959c,'unitId':_0x2232a9,'content':_0x2ae1bf,'mention':_0x28267c,'threadId':_0x4af3d8},_0x19c26e=(await this[_0x415ddd(0x1fe)]['post']('/universer-api/comment/unit/'+_0x2232a9+_0x415ddd(0x1c8),{'body':_0x16b6a8}))['body']['reply'];return{..._0x468777,'id':_0x19c26e['replyId'],'dT':_0x3ca6c2['dayjs'](+_0x19c26e['createTimestamp'])[_0x415ddd(0x202)](_0x415ddd(0x1da)),'personId':_0x19c26e[_0x415ddd(0x1d4)]};}else{const _0x2e845f={'memberId':_0x36959c,'unitId':_0x2232a9,'content':_0x2ae1bf,'mention':_0x28267c},_0x3b2ca0=await this[_0x415ddd(0x1fe)][_0x415ddd(0x224)](_0x415ddd(0x237)+_0x2232a9+_0x415ddd(0x1bc),{'body':_0x2e845f});return _0x5cceda(_0x3b2ca0[_0x415ddd(0x1df)][_0x415ddd(0x1c3)],_0x468777);}}async[_0x3017c1(0x1f3)](_0x18fa89){const _0x283c3b=_0x3017c1;var _0x1b36d5,_0xee6228;const {text:_0x142e19,unitId:_0x3f69b0}=_0x18fa89,_0x3c4c56=(_0xee6228=(_0x1b36d5=_0x142e19[_0x283c3b(0x1f2)])==null?void 0x0:_0x1b36d5[_0x283c3b(0x20e)](_0x18c8c4=>_0x18c8c4[_0x283c3b(0x1eb)]===_0x3ca6c2[_0x283c3b(0x1cb)]['COMMENT'])[_0x283c3b(0x22c)](_0x5a17d8=>_0x5a17d8[_0x283c3b(0x20c)]))!=null?_0xee6228:[],_0x1eda19=JSON[_0x283c3b(0x233)](_0x142e19),_0x53c5ad=_0x18fa89[_0x283c3b(0x1bd)],_0x244537=_0x18fa89['id'],_0xa5d1b8={'memberId':(await this[_0x283c3b(0x1e4)][_0x283c3b(0x1ca)](_0x3f69b0))[_0x283c3b(0x216)](),'unitId':_0x3f69b0,'threadId':_0x53c5ad,'mention':_0x3c4c56,'content':_0x1eda19,'replyId':_0x244537},_0x3eb265=await this[_0x283c3b(0x1fe)][_0x283c3b(0x224)](_0x283c3b(0x237)+_0x3f69b0+_0x283c3b(0x1f8),{'body':_0xa5d1b8});return!_0x3eb265[_0x283c3b(0x1df)][_0x283c3b(0x1ec)]||_0x3eb265['body'][_0x283c3b(0x1ec)][_0x283c3b(0x238)]===0x1;}async[_0x3017c1(0x1e3)](_0x4a97df){const _0x379756=_0x3017c1,{unitId:_0x4d0b85}=_0x4a97df,_0x51f954=_0x4a97df[_0x379756(0x1bd)],_0x40398a={'memberId':this[_0x379756(0x23a)][_0x379756(0x1e8)]()[_0x379756(0x1d1)],'unitId':_0x4d0b85,'threadId':_0x51f954,'solved':_0x4a97df[_0x379756(0x217)]?_0x4938f1[_0x379756(0x1db)]:_0x4938f1[_0x379756(0x1e9)]},_0x34f48b=await this[_0x379756(0x1fe)][_0x379756(0x224)](_0x379756(0x237)+_0x4d0b85+'/solved',{'body':_0x40398a});return!_0x34f48b[_0x379756(0x1df)]['error']||_0x34f48b[_0x379756(0x1df)]['error'][_0x379756(0x238)]===0x1;}async[_0x3017c1(0x201)](_0x4541a3,_0xcee5e1,_0x59d6a7,_0x5ede43){const _0x195171=_0x3017c1,_0x115f07={'memberId':(await this[_0x195171(0x1e4)]['requireSession'](_0x4541a3))['getMemberID'](),'threadId':_0x59d6a7,'replyId':_0x5ede43,'unitId':_0x4541a3},_0x288c4f=await this[_0x195171(0x1fe)][_0x195171(0x224)](_0x195171(0x237)+_0x4541a3+'/delete',{'body':_0x115f07});return!_0x288c4f['body'][_0x195171(0x1ec)]||_0x288c4f[_0x195171(0x1df)][_0x195171(0x1ec)][_0x195171(0x238)]===0x1;}async[_0x3017c1(0x235)](_0x27468b,_0x2abccc,_0x57a189){const _0x80fb8c=_0x3017c1,_0x13546e={'unitId':_0x27468b,'threadId':_0x57a189},_0x5d1c9a=await this[_0x80fb8c(0x1fe)][_0x80fb8c(0x224)](_0x80fb8c(0x237)+_0x27468b+_0x80fb8c(0x208),{'body':_0x13546e}),_0x1737d2=_0x57a189['map'](_0x41e9fe=>_0x12ce0b(_0x5d1c9a[_0x80fb8c(0x1df)][_0x80fb8c(0x20f)][_0x41e9fe],_0x27468b,_0x2abccc))[_0x80fb8c(0x20e)](Boolean);return Object[_0x80fb8c(0x1ea)](_0x5d1c9a['body']['users'])[_0x80fb8c(0x1fd)](_0x309b07=>{const _0x581385=_0x80fb8c;this[_0x581385(0x23a)][_0x581385(0x1ba)](_0x309b07);}),_0x1737d2;}['saveCommentToSnapshot'](_0x47eebb){const _0x4b2188=_0x3017c1;return{'id':_0x47eebb['id'],'threadId':_0x47eebb['threadId'],'ref':_0x47eebb[_0x4b2188(0x214)]};}};_0x1bcc49=_0x1249c1([_0x58a856(0x0,_0x3ca6c2[_0x3017c1(0x1c0)](_0x4e4338[_0x3017c1(0x1d8)])),_0x58a856(0x1,_0x3ca6c2['Inject'](_0x3ca6c2[_0x3017c1(0x226)])),_0x58a856(0x2,_0x3ca6c2[_0x3017c1(0x1c0)](_0x5e13bf['CollaborationSessionService'])),_0x58a856(0x3,_0x3ca6c2[_0x3017c1(0x1c0)](_0x3ca6c2[_0x3017c1(0x1b5)]))],_0x1bcc49);var _0x5da1f1=Object['getOwnPropertyDescriptor'],_0x3e075d=(_0x38aa85,_0x5cdd21,_0xbb6b56,_0xf84515)=>{for(var _0x56be57=_0xf84515>0x1?void 0x0:_0xf84515?_0x5da1f1(_0x5cdd21,_0xbb6b56):_0x5cdd21,_0x52d949=_0x38aa85['length']-0x1,_0x1129d2;_0x52d949>=0x0;_0x52d949--)(_0x1129d2=_0x38aa85[_0x52d949])&&(_0x56be57=_0x1129d2(_0x56be57)||_0x56be57);return _0x56be57;},_0x289326=(_0x18d567,_0x49136a)=>(_0x2b61f3,_0xbd4666)=>_0x49136a(_0x2b61f3,_0xbd4666,_0x18d567);let _0x1e3fea=class extends _0x3ca6c2[_0x3017c1(0x22b)]{constructor(_0x21dd43,_0x377f55){const _0x55f807=_0x3017c1;super(),this[_0x55f807(0x21b)]=_0x21dd43,this['_threadCommentDataSource']=_0x377f55,this['_initDataSource']();}[_0x3017c1(0x205)](){const _0x2374dd=_0x3017c1;this[_0x2374dd(0x21b)][_0x2374dd(0x232)]=this[_0x2374dd(0x219)],this[_0x2374dd(0x21b)][_0x2374dd(0x1e7)]=!0x1;}};_0x1e3fea=_0x3e075d([_0x289326(0x0,_0x5cdebe[_0x3017c1(0x1b9)]),_0x289326(0x1,_0x3ca6c2[_0x3017c1(0x1c0)](_0x1bcc49))],_0x1e3fea);var _0x178877=Object[_0x3017c1(0x225)],_0x4c9661=Object[_0x3017c1(0x215)],_0x576344=(_0x1d48d1,_0x20b164,_0x4cc996)=>_0x20b164 in _0x1d48d1?_0x178877(_0x1d48d1,_0x20b164,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4cc996}):_0x1d48d1[_0x20b164]=_0x4cc996,_0xec005e=(_0x102822,_0x421ddb,_0x4416de,_0xf8031e)=>{const _0x34285f=_0x3017c1;for(var _0x408611=_0xf8031e>0x1?void 0x0:_0xf8031e?_0x4c9661(_0x421ddb,_0x4416de):_0x421ddb,_0x466eb6=_0x102822[_0x34285f(0x1fa)]-0x1,_0x2fc491;_0x466eb6>=0x0;_0x466eb6--)(_0x2fc491=_0x102822[_0x466eb6])&&(_0x408611=_0x2fc491(_0x408611)||_0x408611);return _0x408611;},_0x245f9e=(_0x4f4d3f,_0x4d915a)=>(_0x896c1b,_0x5eb7c2)=>_0x4d915a(_0x896c1b,_0x5eb7c2,_0x4f4d3f),_0x43d67a=(_0x61863e,_0x4ad5bf,_0x5b5ce5)=>_0x576344(_0x61863e,typeof _0x4ad5bf!=_0x3017c1(0x1f9)?_0x4ad5bf+'':_0x4ad5bf,_0x5b5ce5);_0x3249bc['UniverThreadCommentDataSourcePlugin']=class extends _0x3ca6c2[_0x3017c1(0x1fb)]{constructor(_0x4e70b4=_0x52a5e4,_0x4fe8a6,_0x7b65ee){const _0x28ea32=_0x3017c1;super(),this['_config']=_0x4e70b4,this[_0x28ea32(0x1d9)]=_0x4fe8a6,this['_configService']=_0x7b65ee;const {..._0x45293b}=_0x3ca6c2[_0x28ea32(0x1f6)]({},_0x52a5e4,this[_0x28ea32(0x1bf)]);this[_0x28ea32(0x21a)]['setConfig'](_0x270cda,_0x45293b);}['onStarting'](){const _0x9532a3=_0x3017c1;[[_0x1bcc49],[_0x1e3fea],[_0x519bdd]][_0x9532a3(0x1fd)](_0x10abdb=>{const _0x2ad315=_0x9532a3;this[_0x2ad315(0x1d9)][_0x2ad315(0x1b8)](_0x10abdb);});}[_0x3017c1(0x1d0)](){const _0x14a6ba=_0x3017c1;this[_0x14a6ba(0x1d9)][_0x14a6ba(0x20d)](_0x1e3fea),this[_0x14a6ba(0x1d9)][_0x14a6ba(0x20d)](_0x519bdd);}},_0x43d67a(_0x3249bc[_0x3017c1(0x1dd)],_0x3017c1(0x218),_0x12dec8),_0x43d67a(_0x3249bc[_0x3017c1(0x1dd)],_0x3017c1(0x1b7),_0x3ca6c2['UniverInstanceType'][_0x3017c1(0x1ce)]),_0x3249bc[_0x3017c1(0x1dd)]=_0xec005e([_0x3ca6c2['DependentOn'](_0x54c9f1['UniverThreadCommentUIPlugin'],_0x5e13bf[_0x3017c1(0x1dc)],_0x1cc471[_0x3017c1(0x200)]),_0x245f9e(0x1,_0x3ca6c2[_0x3017c1(0x1c0)](_0x3ca6c2['Injector'])),_0x245f9e(0x2,_0x3ca6c2[_0x3017c1(0x1c4)])],_0x3249bc['UniverThreadCommentDataSourcePlugin']),Object[_0x3017c1(0x225)](_0x3249bc,Symbol[_0x3017c1(0x206)],{'value':'Module'});}));function _0x374f(_0x4b7f2d,_0x391662){const _0x36e16d=_0x36e1();return _0x374f=function(_0x374f04,_0x25f069){_0x374f04=_0x374f04-0x1b5;let _0x598e8c=_0x36e16d[_0x374f04];return _0x598e8c;},_0x374f(_0x4b7f2d,_0x391662);}function _0x36e1(){const _0x40f506=['unitId','syncUpdateMutationToColla','getCurrentUser','OpenOrReOpen','values','rangeType','error','1466930GjVAhe','99eQyksA','object','createTimestamp','getUser','customRanges','updateComment','@univerjs/thread-comment','_threadCommentModel','merge','@univerjs/network','/edit','symbol','length','Plugin','144048vlrzlJ','forEach','_httpService','UNRECOGNIZED','UniverLicensePlugin','deleteComment','format','getComment','Add','_initDataSource','toStringTag','commentUpdate$','/list','UniverProThreadCommentDatasource','find','_commentService','rangeId','get','filter','comments','UniverProLicense','271330OZdTkH','thread-comment-data-source.config','pipe','ref','getOwnPropertyDescriptor','getMemberID','resolved','pluginName','_threadCommentDataSource','_configService','_threadCommentDataSourceService','1721160RJkqyV','personId','disposeWithMe','exports','Solve','delete','root','UniverThreadComment','post','defineProperty','UserManagerService','content','UniverCore','_init','slice','Disposable','map','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','Unknown','parse','dataSource','stringify','ThreadCommentModel','listComments','@univerjs-pro/collaboration-client','/universer-api/comment/unit/','code','function','_userService','Injector','payload','type','add','IThreadCommentDataSourceService','addUser','15140LqUrKa','/add','threadId','140BkCGAh','_config','Inject','UniverThreadCommentUi','@univerjs/thread-comment-ui','comment','IConfigService','dayjs','bufferTime','156954kYDJYT','/reply','user','requireSession','CustomRangeType','3IoIkBX','addComment','UNIVER_UNKNOWN','/universer-api/user/list','onReady','userID','UniverNetwork','replyId','userId','parentId','replies','@univerjs/core','HTTPService','_injector','YYYY/MM/DD\x20HH:mm','Solved','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','CommentService','body','getUnit','Delete','subscribe','resolveComment','_sessionService','6818960xWncrB'];_0x36e1=function(){return _0x40f506;};return _0x36e1();}
1
+ (function(_0x20017f,_0x9da6d5){const _0x9cea28=_0x3c17,_0x4fda3d=_0x20017f();while(!![]){try{const _0x15636a=-parseInt(_0x9cea28(0x1ce))/0x1*(-parseInt(_0x9cea28(0x1fd))/0x2)+-parseInt(_0x9cea28(0x1f2))/0x3+parseInt(_0x9cea28(0x1f0))/0x4*(-parseInt(_0x9cea28(0x226))/0x5)+parseInt(_0x9cea28(0x1fb))/0x6*(parseInt(_0x9cea28(0x1d7))/0x7)+parseInt(_0x9cea28(0x1eb))/0x8+-parseInt(_0x9cea28(0x1e1))/0x9*(parseInt(_0x9cea28(0x1b5))/0xa)+-parseInt(_0x9cea28(0x1ad))/0xb*(-parseInt(_0x9cea28(0x1f3))/0xc);if(_0x15636a===_0x9da6d5)break;else _0x4fda3d['push'](_0x4fda3d['shift']());}catch(_0x19b3c6){_0x4fda3d['push'](_0x4fda3d['shift']());}}}(_0xe3de,0xcf058),function(_0x441c75,_0x28be67){const _0xf37031=_0x3c17;typeof exports=='object'&&typeof module<'u'?_0x28be67(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xf37031(0x1a4)&&define[_0xf37031(0x218)]?define([_0xf37031(0x1b0),_0xf37031(0x20b),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0xf37031(0x1e8),_0xf37031(0x22a),_0xf37031(0x21c)],_0x28be67):(_0x441c75=typeof globalThis<'u'?globalThis:_0x441c75||self,_0x28be67(_0x441c75[_0xf37031(0x1a9)]={},_0x441c75['UniverProCollaborationClient'],_0x441c75['UniverProLicense'],_0x441c75[_0xf37031(0x204)],_0x441c75[_0xf37031(0x208)],_0x441c75[_0xf37031(0x1ff)],_0x441c75[_0xf37031(0x22a)],_0x441c75['UniverNetwork']));}(this,function(_0x4f18fd,_0x27707d,_0x2e38c4,_0x36e2ec,_0x53f578,_0x1a56f1,_0x5e0e6d,_0x49a291){'use strict';const _0x162ef1=_0x3c17;const _0x1be69d=_0x162ef1(0x1a8);var _0x4fe311=(_0x1fe0e3=>(_0x1fe0e3[_0x1fe0e3['OpenOrReOpen']=0x0]=_0x162ef1(0x1a2),_0x1fe0e3[_0x1fe0e3['Solved']=0x1]=_0x162ef1(0x20d),_0x1fe0e3[_0x1fe0e3[_0x162ef1(0x1cb)]=-0x1]='UNRECOGNIZED',_0x1fe0e3))(_0x4fe311||{}),_0x2fcded=(_0x50243f=>(_0x50243f[_0x50243f[_0x162ef1(0x216)]=0x0]='Unknown',_0x50243f[_0x50243f['Add']=0x1]='Add',_0x50243f[_0x50243f[_0x162ef1(0x1ac)]=0x2]=_0x162ef1(0x1ac),_0x50243f[_0x50243f[_0x162ef1(0x1d2)]=0x3]=_0x162ef1(0x1d2),_0x50243f[_0x50243f[_0x162ef1(0x1e3)]=0x4]=_0x162ef1(0x1e3),_0x50243f[_0x50243f[_0x162ef1(0x210)]=0x5]=_0x162ef1(0x210),_0x50243f[_0x50243f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50243f))(_0x2fcded||{});const _0x4b5b8b=_0x23e4f5=>_0x36e2ec['dayjs'](new Date(+_0x23e4f5))[_0x162ef1(0x200)](_0x162ef1(0x1d9)),_0x2e3032=async(_0x12be96,_0x5110b0)=>{const _0x1fe7b0=_0x162ef1,_0x238f7d=_0x12be96[_0x1fe7b0(0x229)](_0x36e2ec['UserManagerService']),_0x49ca52=_0x12be96[_0x1fe7b0(0x229)](_0x49a291[_0x1fe7b0(0x1e9)]);_0x5110b0['forEach'](_0x21b4a5=>{const _0x532a84=_0x1fe7b0;_0x238f7d[_0x532a84(0x1af)](_0x21b4a5)&&_0x5110b0[_0x532a84(0x1bd)](_0x21b4a5);}),_0x5110b0['size']&&(await _0x49ca52[_0x1fe7b0(0x229)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5110b0]}}))[_0x1fe7b0(0x20e)][_0x1fe7b0(0x1d5)][_0x1fe7b0(0x1dd)](_0x12f942=>{const _0x45aa9c=_0x1fe7b0;_0x12f942&&_0x238f7d[_0x45aa9c(0x219)](_0x12f942);});};var _0x52240f=Object[_0x162ef1(0x206)],_0x5568ba=(_0x59e142,_0x1adeea,_0x57bf8d,_0x3c650e)=>{const _0xdf4eb1=_0x162ef1;for(var _0x38e378=_0x3c650e>0x1?void 0x0:_0x3c650e?_0x52240f(_0x1adeea,_0x57bf8d):_0x1adeea,_0x75fae8=_0x59e142[_0xdf4eb1(0x1d6)]-0x1,_0x3e3437;_0x75fae8>=0x0;_0x75fae8--)(_0x3e3437=_0x59e142[_0x75fae8])&&(_0x38e378=_0x3e3437(_0x38e378)||_0x38e378);return _0x38e378;},_0x3f603f=(_0x117571,_0x1ef572)=>(_0x465310,_0x3b3ba0)=>_0x1ef572(_0x465310,_0x3b3ba0,_0x117571);let _0x26bce3=class extends _0x36e2ec['Disposable']{constructor(_0x895ad,_0x28f732,_0x1d5370,_0x162010){const _0x43549c=_0x162ef1;super(),this['_commentService']=_0x895ad,this[_0x43549c(0x21d)]=_0x28f732,this[_0x43549c(0x20c)]=_0x1d5370,this[_0x43549c(0x21a)]=_0x162010,this[_0x43549c(0x1e5)](),this[_0x43549c(0x1cd)]();}[_0x162ef1(0x1cd)](){const _0x21592a=_0x162ef1;this['disposeWithMe'](this[_0x21592a(0x21d)]['commentUpdate$'][_0x21592a(0x1b6)](_0x5e0e6d[_0x21592a(0x202)](0x10))[_0x21592a(0x1c8)](_0x53c964=>{const _0x3fde3d=_0x21592a,_0x4e1bdb=new Set();_0x53c964[_0x3fde3d(0x1dd)](_0x2265c5=>{const _0x618ed0=_0x3fde3d;switch(_0x2265c5[_0x618ed0(0x1cc)]){case _0x618ed0(0x207):{const _0x6eb410=_0x2265c5[_0x618ed0(0x1d1)][_0x618ed0(0x225)];_0x4e1bdb[_0x618ed0(0x207)](_0x6eb410);break;}}}),_0x2e3032(this[_0x3fde3d(0x21a)],_0x4e1bdb);}));}[_0x162ef1(0x1e5)](){const _0x5b6fe3=_0x162ef1;this[_0x5b6fe3(0x1a1)](this[_0x5b6fe3(0x1c6)][_0x5b6fe3(0x1ca)][_0x5b6fe3(0x1c8)](async _0x2838b7=>{const _0x4a5155=_0x5b6fe3;var _0x3b1395,_0x147285,_0x1fe734,_0xbcf770;const _0x361017=(_0x3b1395=this[_0x4a5155(0x21d)][_0x4a5155(0x1ab)](_0x2838b7[_0x4a5155(0x1ee)])[_0x4a5155(0x1e7)](_0x35ecd9=>_0x35ecd9[_0x4a5155(0x21f)]===_0x2838b7['threadId']))==null?void 0x0:_0x3b1395['root'];if(!_0x361017)return;const {unitId:_0x4edb60,subUnitId:_0x260997}=_0x361017;switch(_0x2838b7[_0x4a5155(0x1bc)]&&this[_0x4a5155(0x20c)][_0x4a5155(0x219)](_0x2838b7[_0x4a5155(0x1bc)]),_0x2838b7['type']){case _0x2fcded['Add']:break;case _0x2fcded[_0x4a5155(0x1ac)]:{this['_threadCommentModel'][_0x4a5155(0x1c3)](_0x4edb60,_0x260997,{'unitId':_0x4edb60,'subUnitId':_0x260997,'ref':'','id':_0x2838b7['replyId'],'dT':_0x4b5b8b(+_0x2838b7[_0x4a5155(0x1b8)]),'threadId':_0x2838b7[_0x4a5155(0x21f)],'personId':(_0x1fe734=(_0x147285=_0x2838b7[_0x4a5155(0x1bc)])==null?void 0x0:_0x147285[_0x4a5155(0x1c0)])!=null?_0x1fe734:_0x2838b7[_0x4a5155(0x227)],'text':JSON['parse'](_0x2838b7[_0x4a5155(0x1f7)]),'parentId':_0x361017['id']});break;}case _0x2fcded[_0x4a5155(0x1e3)]:{const _0x4a3483=this['_threadCommentModel'][_0x4a5155(0x1c9)](_0x4edb60,_0x260997,_0x2838b7[_0x4a5155(0x1b4)]);_0x4a3483&&_0x4a3483[_0x4a5155(0x20f)]&&this[_0x4a5155(0x21d)][_0x4a5155(0x1b2)](_0x4edb60,_0x260997,_0x2838b7['replyId']);break;}case _0x2fcded['Edit']:{this[_0x4a5155(0x21d)][_0x4a5155(0x1b9)](_0x4edb60,_0x260997,{'commentId':_0x2838b7[_0x4a5155(0x1b4)],'text':JSON[_0x4a5155(0x1dc)](_0x2838b7[_0x4a5155(0x1f7)])});break;}case _0x2fcded['Solve']:{const _0x3c6a27=(_0xbcf770=this[_0x4a5155(0x21d)]['getUnit'](_0x2838b7[_0x4a5155(0x1ee)])[_0x4a5155(0x1e7)](_0x151e5e=>_0x151e5e[_0x4a5155(0x21f)]===_0x2838b7[_0x4a5155(0x21f)]))==null?void 0x0:_0xbcf770[_0x4a5155(0x1ef)];_0x3c6a27&&this['_threadCommentModel']['resolveComment'](_0x4edb60,_0x260997,_0x3c6a27['id'],_0x2838b7[_0x4a5155(0x1fc)]===_0x4fe311[_0x4a5155(0x20d)]);break;}}}));}};_0x26bce3=_0x5568ba([_0x3f603f(0x0,_0x36e2ec[_0x162ef1(0x1a6)](_0x27707d['CommentService'])),_0x3f603f(0x1,_0x36e2ec['Inject'](_0x1a56f1[_0x162ef1(0x1be)])),_0x3f603f(0x2,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1df)])),_0x3f603f(0x3,_0x36e2ec['Inject'](_0x36e2ec[_0x162ef1(0x1c4)]))],_0x26bce3);const _0x2a6a6e=_0x162ef1(0x212),_0x2d0d8f={};var _0x4c7736=Object['getOwnPropertyDescriptor'],_0x4b5860=(_0x557e34,_0x3ef565,_0x3486cd,_0x39a76b)=>{const _0x4e5818=_0x162ef1;for(var _0x3c2ecc=_0x39a76b>0x1?void 0x0:_0x39a76b?_0x4c7736(_0x3ef565,_0x3486cd):_0x3ef565,_0x5b8fa9=_0x557e34[_0x4e5818(0x1d6)]-0x1,_0x59ad06;_0x5b8fa9>=0x0;_0x5b8fa9--)(_0x59ad06=_0x557e34[_0x5b8fa9])&&(_0x3c2ecc=_0x59ad06(_0x3c2ecc)||_0x3c2ecc);return _0x3c2ecc;},_0x8e5bc9=(_0x161d2d,_0x86ace)=>(_0xa3eae2,_0x277b7a)=>_0x86ace(_0xa3eae2,_0x277b7a,_0x161d2d);function _0x24ed59(_0x351768,_0x4d4818){const _0x55d84a=_0x162ef1,_0x4f26df=_0x351768[_0x55d84a(0x1fa)][0x0];return{..._0x4d4818,'id':_0x4f26df['replyId'],'resolved':_0x351768['solved']===0x1,'dT':_0x4b5b8b(_0x4f26df[_0x55d84a(0x1b8)]),'personId':_0x4f26df[_0x55d84a(0x227)],'threadId':_0x4f26df[_0x55d84a(0x21f)]};}function _0x2db9fb(_0x1e614c,_0x13ee02,_0x24774f){const _0x5ac472=_0x162ef1;var _0x33da79,_0x55fdc2;if(((_0x55fdc2=(_0x33da79=_0x1e614c==null?void 0x0:_0x1e614c['replies'])==null?void 0x0:_0x33da79[_0x5ac472(0x1d6)])!=null?_0x55fdc2:0x0)>0x0){const _0x3135a5=(_0x7ae1a8,_0x456b31)=>({'id':_0x7ae1a8[_0x5ac472(0x1b4)],'threadId':_0x7ae1a8[_0x5ac472(0x21f)],'dT':_0x4b5b8b(_0x7ae1a8[_0x5ac472(0x1b8)]),'personId':_0x7ae1a8['userId'],'resolved':_0x1e614c[_0x5ac472(0x1fc)]===_0x4fe311[_0x5ac472(0x20d)],'unitId':_0x13ee02,'subUnitId':_0x24774f,'text':JSON['parse'](_0x7ae1a8[_0x5ac472(0x1f7)]),'parentId':_0x456b31}),_0x2e9a2c=_0x3135a5(_0x1e614c['replies'][0x0]);return{..._0x2e9a2c,'children':_0x1e614c[_0x5ac472(0x1fa)][_0x5ac472(0x1cf)](0x1)[_0x5ac472(0x217)](_0x16cd70=>_0x3135a5(_0x16cd70,_0x2e9a2c['id']))};}return null;}let _0x39b1bf=class{constructor(_0x911241,_0x3c0e3d,_0x10dea7,_0x383024){const _0x591153=_0x162ef1;this[_0x591153(0x1bb)]=_0x911241,this[_0x591153(0x20c)]=_0x3c0e3d,this['_sessionService']=_0x10dea7,this[_0x591153(0x21a)]=_0x383024;}async[_0x162ef1(0x1c3)](_0x143599){const _0x31a9f3=_0x162ef1;var _0x5d83e2,_0x1cfb64;const {parentId:_0x388039,unitId:_0x4f9ecd,text:_0x46745d,threadId:_0x509d0a}=_0x143599,_0xa9a6d6=(_0x1cfb64=(_0x5d83e2=_0x46745d[_0x31a9f3(0x20a)])==null?void 0x0:_0x5d83e2['filter'](_0x1cdcb0=>_0x1cdcb0[_0x31a9f3(0x1b7)]===_0x36e2ec[_0x31a9f3(0x1e4)][_0x31a9f3(0x213)])[_0x31a9f3(0x217)](_0x505480=>_0x505480['rangeId']))!=null?_0x1cfb64:[],_0x3a54e0=JSON[_0x31a9f3(0x1ba)](_0x46745d),_0x91760=(await this['_sessionService'][_0x31a9f3(0x1c7)](_0x4f9ecd))[_0x31a9f3(0x205)]();if(_0x388039){const _0xa4ab4b={'memberId':_0x91760,'unitId':_0x4f9ecd,'content':_0x3a54e0,'mention':_0xa9a6d6,'threadId':_0x509d0a},_0x1644f7=(await this[_0x31a9f3(0x1bb)]['post']('/universer-api/comment/unit/'+_0x4f9ecd+_0x31a9f3(0x1c2),{'body':_0xa4ab4b}))[_0x31a9f3(0x20e)][_0x31a9f3(0x1ae)];return{..._0x143599,'id':_0x1644f7[_0x31a9f3(0x1b4)],'dT':_0x36e2ec['dayjs'](+_0x1644f7[_0x31a9f3(0x1b8)])[_0x31a9f3(0x200)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1644f7[_0x31a9f3(0x227)]};}else{const _0x5741fa={'memberId':_0x91760,'unitId':_0x4f9ecd,'content':_0x3a54e0,'mention':_0xa9a6d6},_0x367f0d=await this[_0x31a9f3(0x1bb)]['post'](_0x31a9f3(0x1f1)+_0x4f9ecd+_0x31a9f3(0x1bf),{'body':_0x5741fa});return _0x24ed59(_0x367f0d[_0x31a9f3(0x20e)][_0x31a9f3(0x1ed)],_0x143599);}}async[_0x162ef1(0x1b9)](_0x5920c1){const _0x24c8af=_0x162ef1;var _0x5d7696,_0x17ba2a;const {text:_0x141ee8,unitId:_0x417d63}=_0x5920c1,_0x49f208=(_0x17ba2a=(_0x5d7696=_0x141ee8['customRanges'])==null?void 0x0:_0x5d7696[_0x24c8af(0x1f4)](_0x49794b=>_0x49794b[_0x24c8af(0x1b7)]===_0x36e2ec['CustomRangeType']['COMMENT'])[_0x24c8af(0x217)](_0x495a01=>_0x495a01[_0x24c8af(0x1f5)]))!=null?_0x17ba2a:[],_0x488fa8=JSON['stringify'](_0x141ee8),_0x3a446a=_0x5920c1[_0x24c8af(0x21f)],_0x199d67=_0x5920c1['id'],_0x24c635={'memberId':(await this[_0x24c8af(0x1b1)][_0x24c8af(0x1c7)](_0x417d63))[_0x24c8af(0x205)](),'unitId':_0x417d63,'threadId':_0x3a446a,'mention':_0x49f208,'content':_0x488fa8,'replyId':_0x199d67},_0x2631ed=await this[_0x24c8af(0x1bb)][_0x24c8af(0x1e0)](_0x24c8af(0x1f1)+_0x417d63+_0x24c8af(0x1f6),{'body':_0x24c635});return!_0x2631ed['body'][_0x24c8af(0x1d4)]||_0x2631ed[_0x24c8af(0x20e)][_0x24c8af(0x1d4)]['code']===0x1;}async[_0x162ef1(0x1f8)](_0x4a9958){const _0x3c35ff=_0x162ef1,{unitId:_0x56720c}=_0x4a9958,_0x321e5d=_0x4a9958[_0x3c35ff(0x21f)],_0x567d6c={'memberId':this[_0x3c35ff(0x20c)][_0x3c35ff(0x1e2)]()[_0x3c35ff(0x1c0)],'unitId':_0x56720c,'threadId':_0x321e5d,'solved':_0x4a9958[_0x3c35ff(0x1e6)]?_0x4fe311[_0x3c35ff(0x20d)]:_0x4fe311[_0x3c35ff(0x1a2)]},_0x268382=await this[_0x3c35ff(0x1bb)]['post']('/universer-api/comment/unit/'+_0x56720c+_0x3c35ff(0x1a7),{'body':_0x567d6c});return!_0x268382[_0x3c35ff(0x20e)]['error']||_0x268382['body'][_0x3c35ff(0x1d4)][_0x3c35ff(0x1ec)]===0x1;}async[_0x162ef1(0x1b2)](_0x3f3c33,_0x1caf73,_0x2f208d,_0x272fe4){const _0x4012e4=_0x162ef1,_0x44aeae={'memberId':(await this[_0x4012e4(0x1b1)][_0x4012e4(0x1c7)](_0x3f3c33))['getMemberID'](),'threadId':_0x2f208d,'replyId':_0x272fe4,'unitId':_0x3f3c33},_0x2397d7=await this[_0x4012e4(0x1bb)][_0x4012e4(0x1e0)]('/universer-api/comment/unit/'+_0x3f3c33+'/delete',{'body':_0x44aeae});return!_0x2397d7['body'][_0x4012e4(0x1d4)]||_0x2397d7[_0x4012e4(0x20e)][_0x4012e4(0x1d4)][_0x4012e4(0x1ec)]===0x1;}async[_0x162ef1(0x21e)](_0x49d0e9,_0x35de42,_0x26e106){const _0x4b754d=_0x162ef1,_0x4ecfcc={'unitId':_0x49d0e9,'threadId':_0x26e106},_0x42ee52=await this[_0x4b754d(0x1bb)][_0x4b754d(0x1e0)](_0x4b754d(0x1f1)+_0x49d0e9+_0x4b754d(0x209),{'body':_0x4ecfcc}),_0x45239a=_0x26e106[_0x4b754d(0x217)](_0x3d8495=>_0x2db9fb(_0x42ee52[_0x4b754d(0x20e)][_0x4b754d(0x1d8)][_0x3d8495],_0x49d0e9,_0x35de42))[_0x4b754d(0x1f4)](Boolean);return Object[_0x4b754d(0x21b)](_0x42ee52[_0x4b754d(0x20e)][_0x4b754d(0x1d5)])[_0x4b754d(0x1dd)](_0x1f8509=>{const _0x54ec3d=_0x4b754d;this[_0x54ec3d(0x20c)][_0x54ec3d(0x219)](_0x1f8509);}),_0x45239a;}[_0x162ef1(0x201)](_0x2f5c64){const _0x482819=_0x162ef1;return{'id':_0x2f5c64['id'],'threadId':_0x2f5c64[_0x482819(0x21f)],'ref':_0x2f5c64[_0x482819(0x1d3)]};}};_0x39b1bf=_0x4b5860([_0x8e5bc9(0x0,_0x36e2ec[_0x162ef1(0x1a6)](_0x49a291['HTTPService'])),_0x8e5bc9(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1df)])),_0x8e5bc9(0x2,_0x36e2ec[_0x162ef1(0x1a6)](_0x27707d[_0x162ef1(0x228)])),_0x8e5bc9(0x3,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1c4)]))],_0x39b1bf);var _0x209822=Object[_0x162ef1(0x206)],_0x1afb0a=(_0x1c784a,_0x29dc53,_0x225288,_0x1ca312)=>{const _0x35655e=_0x162ef1;for(var _0x4c3f69=_0x1ca312>0x1?void 0x0:_0x1ca312?_0x209822(_0x29dc53,_0x225288):_0x29dc53,_0x552c91=_0x1c784a[_0x35655e(0x1d6)]-0x1,_0xe7313b;_0x552c91>=0x0;_0x552c91--)(_0xe7313b=_0x1c784a[_0x552c91])&&(_0x4c3f69=_0xe7313b(_0x4c3f69)||_0x4c3f69);return _0x4c3f69;},_0x122138=(_0x2b7042,_0x3ea823)=>(_0x354de3,_0x4bd542)=>_0x3ea823(_0x354de3,_0x4bd542,_0x2b7042);let _0x44ea26=class extends _0x36e2ec['Disposable']{constructor(_0x5dee39,_0x5f0d4c){const _0xd9fc6e=_0x162ef1;super(),this[_0xd9fc6e(0x222)]=_0x5dee39,this[_0xd9fc6e(0x1c5)]=_0x5f0d4c,this[_0xd9fc6e(0x1da)]();}[_0x162ef1(0x1da)](){const _0x2d82ef=_0x162ef1;this[_0x2d82ef(0x222)][_0x2d82ef(0x224)]=this['_threadCommentDataSource'],this[_0x2d82ef(0x222)][_0x2d82ef(0x215)]=!0x1;}};_0x44ea26=_0x1afb0a([_0x122138(0x0,_0x1a56f1[_0x162ef1(0x223)]),_0x122138(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x39b1bf))],_0x44ea26);var _0x2a0ab3=Object[_0x162ef1(0x1a3)],_0x51772b=Object[_0x162ef1(0x206)],_0x538a6c=(_0x107c4d,_0x241348,_0x5e7ba3)=>_0x241348 in _0x107c4d?_0x2a0ab3(_0x107c4d,_0x241348,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e7ba3}):_0x107c4d[_0x241348]=_0x5e7ba3,_0x43c099=(_0x2f4979,_0x52ff32,_0x3982e8,_0x2012e8)=>{const _0x59f018=_0x162ef1;for(var _0x772624=_0x2012e8>0x1?void 0x0:_0x2012e8?_0x51772b(_0x52ff32,_0x3982e8):_0x52ff32,_0x4c60cd=_0x2f4979[_0x59f018(0x1d6)]-0x1,_0x494008;_0x4c60cd>=0x0;_0x4c60cd--)(_0x494008=_0x2f4979[_0x4c60cd])&&(_0x772624=_0x494008(_0x772624)||_0x772624);return _0x772624;},_0x114544=(_0x4ce7bd,_0x544e5b)=>(_0xd1d86d,_0x30a6d3)=>_0x544e5b(_0xd1d86d,_0x30a6d3,_0x4ce7bd),_0x93394a=(_0x48fcb9,_0x2786ed,_0x2b8bf2)=>_0x538a6c(_0x48fcb9,typeof _0x2786ed!=_0x162ef1(0x1f9)?_0x2786ed+'':_0x2786ed,_0x2b8bf2);_0x4f18fd[_0x162ef1(0x203)]=class extends _0x36e2ec[_0x162ef1(0x1b3)]{constructor(_0x568446=_0x2d0d8f,_0x5d063a,_0x4a6416){const _0xc30e35=_0x162ef1;super(),this[_0xc30e35(0x1aa)]=_0x568446,this['_injector']=_0x5d063a,this[_0xc30e35(0x1ea)]=_0x4a6416;const {..._0x41de00}=_0x36e2ec[_0xc30e35(0x220)]({},_0x2d0d8f,this[_0xc30e35(0x1aa)]);this[_0xc30e35(0x1ea)]['setConfig'](_0x2a6a6e,_0x41de00);}[_0x162ef1(0x211)](){const _0x50e7cd=_0x162ef1;[[_0x39b1bf],[_0x44ea26],[_0x26bce3]][_0x50e7cd(0x1dd)](_0x2f2045=>{const _0x39b2db=_0x50e7cd;this[_0x39b2db(0x21a)][_0x39b2db(0x207)](_0x2f2045);});}[_0x162ef1(0x1c1)](){const _0x592fdb=_0x162ef1;this[_0x592fdb(0x21a)][_0x592fdb(0x229)](_0x44ea26),this[_0x592fdb(0x21a)][_0x592fdb(0x229)](_0x26bce3);}},_0x93394a(_0x4f18fd[_0x162ef1(0x203)],'pluginName',_0x1be69d),_0x93394a(_0x4f18fd['UniverThreadCommentDataSourcePlugin'],_0x162ef1(0x1cc),_0x36e2ec['UniverInstanceType'][_0x162ef1(0x214)]),_0x4f18fd['UniverThreadCommentDataSourcePlugin']=_0x43c099([_0x36e2ec[_0x162ef1(0x221)](_0x53f578[_0x162ef1(0x1de)],_0x27707d[_0x162ef1(0x1fe)],_0x2e38c4['UniverLicensePlugin']),_0x114544(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1c4)])),_0x114544(0x2,_0x36e2ec[_0x162ef1(0x1a5)])],_0x4f18fd[_0x162ef1(0x203)]),Object[_0x162ef1(0x1a3)](_0x4f18fd,Symbol[_0x162ef1(0x1d0)],{'value':_0x162ef1(0x1db)});}));function _0x3c17(_0x58a67f,_0xce7fd0){const _0xe3ded8=_0xe3de();return _0x3c17=function(_0x3c176c,_0x25da38){_0x3c176c=_0x3c176c-0x1a1;let _0x27aad5=_0xe3ded8[_0x3c176c];return _0x27aad5;},_0x3c17(_0x58a67f,_0xce7fd0);}function _0xe3de(){const _0x113e14=['/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProThreadCommentDatasource','_config','getUnit','Reply','2211TiPzUR','reply','getUser','exports','_sessionService','deleteComment','Plugin','replyId','123790vpVVyz','pipe','rangeType','createTimestamp','updateComment','stringify','_httpService','user','delete','ThreadCommentModel','/add','userID','onReady','/reply','addComment','Injector','_threadCommentDataSource','_commentService','requireSession','subscribe','getComment','commentUpdate$','UNRECOGNIZED','type','_initUserSync','166tFsiXf','slice','toStringTag','payload','Edit','ref','error','users','length','38290PCopLF','comments','YYYY/MM/DD\x20HH:mm','_initDataSource','Module','parse','forEach','UniverThreadCommentUIPlugin','UserManagerService','post','135UIwMsx','getCurrentUser','Delete','CustomRangeType','_init','resolved','find','@univerjs/thread-comment','HTTPService','_configService','12744928HdIozL','code','comment','unitId','root','2176mQgNqn','/universer-api/comment/unit/','3484770UORplT','28716BMuwwA','filter','rangeId','/edit','content','resolveComment','symbol','replies','612huUfDH','solved','7046kmzkFx','UniverCollaborationClientPlugin','UniverThreadComment','format','saveCommentToSnapshot','bufferTime','UniverThreadCommentDataSourcePlugin','UniverCore','getMemberID','getOwnPropertyDescriptor','add','UniverThreadCommentUi','/list','customRanges','@univerjs-pro/collaboration-client','_userService','Solved','body','parentId','Solve','onStarting','thread-comment-data-source.config','COMMENT','UNIVER_UNKNOWN','syncUpdateMutationToColla','Unknown','map','amd','addUser','_injector','values','@univerjs/network','_threadCommentModel','listComments','threadId','merge','DependentOn','_threadCommentDataSourceService','IThreadCommentDataSourceService','dataSource','personId','9390xBwBQW','userId','CollaborationSessionService','get','rxjs','disposeWithMe','OpenOrReOpen','defineProperty','function','IConfigService','Inject'];_0xe3de=function(){return _0x113e14;};return _0xe3de();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.2",
3
+ "version": "0.9.3-nightly.202507250750",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -42,23 +42,30 @@
42
42
  "lib"
43
43
  ],
44
44
  "peerDependencies": {
45
- "rxjs": ">=7.0.0"
45
+ "rxjs": ">=7.0.0",
46
+ "@univerjs-pro/collaboration-client": "0.9.3-nightly.202507250750",
47
+ "@univerjs/core": "0.9.3-nightly.202507250750",
48
+ "@univerjs/network": "0.9.3-nightly.202507250750",
49
+ "@univerjs-pro/license": "0.9.3-nightly.202507250750",
50
+ "@univerjs/thread-comment": "0.9.3-nightly.202507250750",
51
+ "@univerjs/protocol": "0.1.47-alpha.0",
52
+ "@univerjs/thread-comment-ui": "0.9.3-nightly.202507250750"
46
53
  },
47
54
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.2",
49
- "@univerjs-pro/license": "0.9.2",
50
- "@univerjs/network": "0.9.2",
51
- "@univerjs/core": "0.9.2",
52
- "@univerjs/thread-comment": "0.9.2",
55
+ "@univerjs-pro/collaboration-client": "0.9.3-nightly.202507250750",
56
+ "@univerjs-pro/license": "0.9.3-nightly.202507250750",
57
+ "@univerjs/network": "0.9.3-nightly.202507250750",
53
58
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.9.2"
59
+ "@univerjs/thread-comment": "0.9.3-nightly.202507250750",
60
+ "@univerjs/core": "0.9.3-nightly.202507250750",
61
+ "@univerjs/thread-comment-ui": "0.9.3-nightly.202507250750"
55
62
  },
56
63
  "devDependencies": {
57
64
  "rxjs": "7.8.2",
58
65
  "typescript": "^5.8.3",
59
- "vite": "^6.3.5",
66
+ "vite": "^7.0.5",
60
67
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.2"
68
+ "@univerjs-infra/shared": "0.9.3"
62
69
  },
63
70
  "scripts": {
64
71
  "test": "vitest run",