@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507071607 → 0.9.1-nightly.202507091606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x521b44=_0x32b1;(function(_0x4feed5,_0x494d9f){const _0x458319=_0x32b1,_0x2102d9=_0x4feed5();while(!![]){try{const _0x152a40=parseInt(_0x458319(0x1c5))/0x1*(parseInt(_0x458319(0x1ab))/0x2)+-parseInt(_0x458319(0x1a8))/0x3*(-parseInt(_0x458319(0x1e7))/0x4)+-parseInt(_0x458319(0x1dc))/0x5*(parseInt(_0x458319(0x1db))/0x6)+-parseInt(_0x458319(0x210))/0x7*(-parseInt(_0x458319(0x1fe))/0x8)+parseInt(_0x458319(0x1e5))/0x9*(parseInt(_0x458319(0x1d0))/0xa)+parseInt(_0x458319(0x207))/0xb+-parseInt(_0x458319(0x1cc))/0xc;if(_0x152a40===_0x494d9f)break;else _0x2102d9['push'](_0x2102d9['shift']());}catch(_0x54b4aa){_0x2102d9['push'](_0x2102d9['shift']());}}}(_0x7c30,0xc3493));Object[_0x521b44(0x1b8)](exports,Symbol['toStringTag'],{'value':_0x521b44(0x1f9)});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=_0x521b44(0x20f);var I=(_0x9abb67=>(_0x9abb67[_0x9abb67[_0x521b44(0x1d3)]=0x0]='OpenOrReOpen',_0x9abb67[_0x9abb67['Solved']=0x1]=_0x521b44(0x1c4),_0x9abb67[_0x9abb67[_0x521b44(0x1d9)]=-0x1]=_0x521b44(0x1d9),_0x9abb67))(I||{}),v=(_0x4a33da=>(_0x4a33da[_0x4a33da[_0x521b44(0x1a6)]=0x0]=_0x521b44(0x1a6),_0x4a33da[_0x4a33da[_0x521b44(0x1c3)]=0x1]=_0x521b44(0x1c3),_0x4a33da[_0x4a33da['Reply']=0x2]=_0x521b44(0x1ed),_0x4a33da[_0x4a33da[_0x521b44(0x1b3)]=0x3]=_0x521b44(0x1b3),_0x4a33da[_0x4a33da['Delete']=0x4]=_0x521b44(0x1de),_0x4a33da[_0x4a33da[_0x521b44(0x219)]=0x5]=_0x521b44(0x219),_0x4a33da[_0x4a33da['UNRECOGNIZED']=-0x1]=_0x521b44(0x1d9),_0x4a33da))(v||{});const f=_0x688d9e=>c[_0x521b44(0x1e0)](new Date(+_0x688d9e))[_0x521b44(0x1ca)](_0x521b44(0x20c)),R=async(_0x52a0ec,_0x2b76f7)=>{const _0x195ddb=_0x521b44,_0x220359=_0x52a0ec[_0x195ddb(0x1a9)](c[_0x195ddb(0x1c7)]),_0x21640a=_0x52a0ec[_0x195ddb(0x1a9)](P[_0x195ddb(0x1e3)]);_0x2b76f7[_0x195ddb(0x1c1)](_0x19b89c=>{const _0x36fdb0=_0x195ddb;_0x220359[_0x36fdb0(0x1f4)](_0x19b89c)&&_0x2b76f7[_0x36fdb0(0x20a)](_0x19b89c);}),_0x2b76f7[_0x195ddb(0x1ef)]&&(await _0x21640a[_0x195ddb(0x1a9)](_0x195ddb(0x1bd),{'params':{'userIDs':[..._0x2b76f7]}}))[_0x195ddb(0x1e2)][_0x195ddb(0x1ee)][_0x195ddb(0x1c1)](_0x15dfef=>{const _0x271b61=_0x195ddb;_0x15dfef&&_0x220359[_0x271b61(0x1df)](_0x15dfef);});};var $=Object[_0x521b44(0x202)],E=(_0x3b3516,_0x3f2793,_0x14b025,_0x399b15)=>{const _0x22e2ea=_0x521b44;for(var _0x12ff73=_0x399b15>0x1?void 0x0:_0x399b15?$(_0x3f2793,_0x14b025):_0x3f2793,_0x2eb18d=_0x3b3516[_0x22e2ea(0x1eb)]-0x1,_0x5a1d95;_0x2eb18d>=0x0;_0x2eb18d--)(_0x5a1d95=_0x3b3516[_0x2eb18d])&&(_0x12ff73=_0x5a1d95(_0x12ff73)||_0x12ff73);return _0x12ff73;},S=(_0x5728b9,_0x32071d)=>(_0x11786d,_0x2890a3)=>_0x32071d(_0x11786d,_0x2890a3,_0x5728b9);let p=class extends c[_0x521b44(0x1ad)]{constructor(_0x10f24b,_0x17edb1,_0x2f7ebc,_0x2a023c){const _0x305176=_0x521b44;super(),this[_0x305176(0x1e6)]=_0x10f24b,this[_0x305176(0x1f6)]=_0x17edb1,this[_0x305176(0x1ba)]=_0x2f7ebc,this[_0x305176(0x1a0)]=_0x2a023c,this[_0x305176(0x1f1)](),this['_initUserSync']();}[_0x521b44(0x1b2)](){const _0x5599bb=_0x521b44;this['disposeWithMe'](this[_0x5599bb(0x1f6)][_0x5599bb(0x1c2)][_0x5599bb(0x1e1)](w[_0x5599bb(0x1a3)](0x10))['subscribe'](_0x514d9e=>{const _0x4448df=_0x5599bb,_0x41b2b1=new Set();_0x514d9e['forEach'](_0x4cdcaa=>{const _0x5603f6=_0x32b1;switch(_0x4cdcaa[_0x5603f6(0x1bb)]){case'add':{const _0x27958c=_0x4cdcaa['payload'][_0x5603f6(0x1cd)];_0x41b2b1[_0x5603f6(0x1d8)](_0x27958c);break;}}}),R(this[_0x4448df(0x1a0)],_0x41b2b1);}));}['_init'](){const _0x30e6aa=_0x521b44;this[_0x30e6aa(0x1be)](this['_commentService'][_0x30e6aa(0x1c2)][_0x30e6aa(0x1b7)](async _0x4f5807=>{const _0x1fd602=_0x30e6aa;var _0x31d39e,_0x578633,_0x4cfcc4,_0xdf1854;const _0x4002a2=(_0x31d39e=this['_threadCommentModel']['getUnit'](_0x4f5807['unitId'])[_0x1fd602(0x1c8)](_0x1bacb5=>_0x1bacb5[_0x1fd602(0x214)]===_0x4f5807[_0x1fd602(0x214)]))==null?void 0x0:_0x31d39e[_0x1fd602(0x1a7)];if(!_0x4002a2)return;const {unitId:_0x13c638,subUnitId:_0x330523}=_0x4002a2;switch(_0x4f5807[_0x1fd602(0x209)]&&this['_userService'][_0x1fd602(0x1df)](_0x4f5807[_0x1fd602(0x209)]),_0x4f5807[_0x1fd602(0x1bb)]){case v[_0x1fd602(0x1c3)]:break;case v[_0x1fd602(0x1ed)]:{this[_0x1fd602(0x1f6)][_0x1fd602(0x1b9)](_0x13c638,_0x330523,{'unitId':_0x13c638,'subUnitId':_0x330523,'ref':'','id':_0x4f5807[_0x1fd602(0x1b4)],'dT':f(+_0x4f5807[_0x1fd602(0x1e4)]),'threadId':_0x4f5807[_0x1fd602(0x214)],'personId':(_0x4cfcc4=(_0x578633=_0x4f5807['user'])==null?void 0x0:_0x578633[_0x1fd602(0x217)])!=null?_0x4cfcc4:_0x4f5807[_0x1fd602(0x200)],'text':JSON[_0x1fd602(0x1f0)](_0x4f5807[_0x1fd602(0x203)]),'parentId':_0x4002a2['id']});break;}case v[_0x1fd602(0x1de)]:{const _0x1b6516=this[_0x1fd602(0x1f6)][_0x1fd602(0x1a4)](_0x13c638,_0x330523,_0x4f5807[_0x1fd602(0x1b4)]);_0x1b6516&&_0x1b6516[_0x1fd602(0x1a2)]&&this[_0x1fd602(0x1f6)][_0x1fd602(0x1da)](_0x13c638,_0x330523,_0x4f5807[_0x1fd602(0x1b4)]);break;}case v[_0x1fd602(0x1b3)]:{this['_threadCommentModel']['updateComment'](_0x13c638,_0x330523,{'commentId':_0x4f5807['replyId'],'text':JSON[_0x1fd602(0x1f0)](_0x4f5807[_0x1fd602(0x203)])});break;}case v[_0x1fd602(0x219)]:{const _0x42ba23=(_0xdf1854=this['_threadCommentModel']['getUnit'](_0x4f5807[_0x1fd602(0x1c0)])[_0x1fd602(0x1c8)](_0x180693=>_0x180693[_0x1fd602(0x214)]===_0x4f5807[_0x1fd602(0x214)]))==null?void 0x0:_0xdf1854[_0x1fd602(0x1a7)];_0x42ba23&&this[_0x1fd602(0x1f6)][_0x1fd602(0x208)](_0x13c638,_0x330523,_0x42ba23['id'],_0x4f5807['solved']===I[_0x1fd602(0x1c4)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x521b44(0x1d7)])),S(0x1,c['Inject'](M[_0x521b44(0x1fd)])),S(0x2,c[_0x521b44(0x1ff)](c[_0x521b44(0x1c7)])),S(0x3,c[_0x521b44(0x1ff)](c[_0x521b44(0x1a1)]))],p);const q=_0x521b44(0x1af),D={};function _0x7c30(){const _0x46e783=['UniverInstanceType','comments','userID','/add','Solve','ref','_injector','Injector','parentId','bufferTime','getComment','map','Unknown','root','9GufAPx','get','_configService','16JcwtII','onReady','Disposable','filter','thread-comment-data-source.config','_threadCommentDataSource','code','_initUserSync','Edit','replyId','CustomRangeType','onStarting','subscribe','defineProperty','addComment','_userService','type','UniverThreadCommentDataSourcePlugin','/universer-api/user/list','disposeWithMe','rangeId','unitId','forEach','commentUpdate$','Add','Solved','195346uKFZTV','/reply','UserManagerService','find','error','format','reply','29101764hhOcpb','personId','comment','stringify','1450Xclgjp','setConfig','DependentOn','OpenOrReOpen','_sessionService','customRanges','replies','CommentService','add','UNRECOGNIZED','deleteComment','396CSrlAB','71705aZnbkz','_config','Delete','addUser','dayjs','pipe','body','HTTPService','createTimestamp','63981oACQqq','_commentService','926620pFkYww','getMemberID','Plugin','_threadCommentDataSourceService','length','IThreadCommentDataSourceService','Reply','users','size','parse','_init','IConfigService','rangeType','getUser','COMMENT','_threadCommentModel','values','/solved','Module','CollaborationSessionService','slice','_initDataSource','ThreadCommentModel','8lLndew','Inject','userId','updateComment','getOwnPropertyDescriptor','content','UniverLicensePlugin','_httpService','merge','2765499kcqwMG','resolveComment','user','delete','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4421179DmjAmi','/delete','resolved','requireSession','threadId'];_0x7c30=function(){return _0x46e783;};return _0x7c30();}var A=Object['getOwnPropertyDescriptor'],x=(_0x3c493e,_0x28c3e7,_0x4aad6b,_0x38f82f)=>{for(var _0x38cae6=_0x38f82f>0x1?void 0x0:_0x38f82f?A(_0x28c3e7,_0x4aad6b):_0x28c3e7,_0x202806=_0x3c493e['length']-0x1,_0x14b48c;_0x202806>=0x0;_0x202806--)(_0x14b48c=_0x3c493e[_0x202806])&&(_0x38cae6=_0x14b48c(_0x38cae6)||_0x38cae6);return _0x38cae6;},_=(_0x22dd7e,_0x2820a1)=>(_0x58599a,_0x2d9c5a)=>_0x2820a1(_0x58599a,_0x2d9c5a,_0x22dd7e);function Y(_0x9a3a09,_0x446cd1){const _0xdfff7=_0x521b44,_0x1c7941=_0x9a3a09['replies'][0x0];return{..._0x446cd1,'id':_0x1c7941[_0xdfff7(0x1b4)],'resolved':_0x9a3a09['solved']===0x1,'dT':f(_0x1c7941['createTimestamp']),'personId':_0x1c7941[_0xdfff7(0x200)],'threadId':_0x1c7941['threadId']};}function G(_0x38eaf9,_0x5a5a77,_0x185497){const _0x323258=_0x521b44;var _0x30ab19,_0x5ceda4;if(((_0x5ceda4=(_0x30ab19=_0x38eaf9==null?void 0x0:_0x38eaf9['replies'])==null?void 0x0:_0x30ab19[_0x323258(0x1eb)])!=null?_0x5ceda4:0x0)>0x0){const _0x570e3b=(_0x3c4471,_0x5722dd)=>({'id':_0x3c4471[_0x323258(0x1b4)],'threadId':_0x3c4471[_0x323258(0x214)],'dT':f(_0x3c4471[_0x323258(0x1e4)]),'personId':_0x3c4471['userId'],'resolved':_0x38eaf9['solved']===I[_0x323258(0x1c4)],'unitId':_0x5a5a77,'subUnitId':_0x185497,'text':JSON[_0x323258(0x1f0)](_0x3c4471['content']),'parentId':_0x5722dd}),_0x5d773b=_0x570e3b(_0x38eaf9[_0x323258(0x1d6)][0x0]);return{..._0x5d773b,'children':_0x38eaf9['replies'][_0x323258(0x1fb)](0x1)[_0x323258(0x1a5)](_0x5a3625=>_0x570e3b(_0x5a3625,_0x5d773b['id']))};}return null;}let g=class{constructor(_0x5f472b,_0xcd98c0,_0xd6c3f6,_0x3d905a){const _0x5f11cf=_0x521b44;this['_httpService']=_0x5f472b,this[_0x5f11cf(0x1ba)]=_0xcd98c0,this[_0x5f11cf(0x1d4)]=_0xd6c3f6,this[_0x5f11cf(0x1a0)]=_0x3d905a;}async[_0x521b44(0x1b9)](_0x1068b1){const _0x49fde9=_0x521b44;var _0x51e734,_0x2c3ae3;const {parentId:_0x92ee9d,unitId:_0x275479,text:_0x59d975,threadId:_0x5f00a5}=_0x1068b1,_0x789368=(_0x2c3ae3=(_0x51e734=_0x59d975[_0x49fde9(0x1d5)])==null?void 0x0:_0x51e734[_0x49fde9(0x1ae)](_0x1fffce=>_0x1fffce[_0x49fde9(0x1f3)]===c['CustomRangeType'][_0x49fde9(0x1f5)])[_0x49fde9(0x1a5)](_0x2d4687=>_0x2d4687['rangeId']))!=null?_0x2c3ae3:[],_0x2e70b7=JSON[_0x49fde9(0x1cf)](_0x59d975),_0x583b3a=(await this[_0x49fde9(0x1d4)]['requireSession'](_0x275479))[_0x49fde9(0x1e8)]();if(_0x92ee9d){const _0x54c3b2={'memberId':_0x583b3a,'unitId':_0x275479,'content':_0x2e70b7,'mention':_0x789368,'threadId':_0x5f00a5},_0x29330e=(await this[_0x49fde9(0x205)][_0x49fde9(0x20e)]('/universer-api/comment/unit/'+_0x275479+_0x49fde9(0x1c6),{'body':_0x54c3b2}))[_0x49fde9(0x1e2)][_0x49fde9(0x1cb)];return{..._0x1068b1,'id':_0x29330e[_0x49fde9(0x1b4)],'dT':c[_0x49fde9(0x1e0)](+_0x29330e[_0x49fde9(0x1e4)])['format'](_0x49fde9(0x20c)),'personId':_0x29330e[_0x49fde9(0x200)]};}else{const _0x2c1e1f={'memberId':_0x583b3a,'unitId':_0x275479,'content':_0x2e70b7,'mention':_0x789368},_0x1763b8=await this[_0x49fde9(0x205)][_0x49fde9(0x20e)](_0x49fde9(0x20d)+_0x275479+_0x49fde9(0x218),{'body':_0x2c1e1f});return Y(_0x1763b8[_0x49fde9(0x1e2)][_0x49fde9(0x1ce)],_0x1068b1);}}async[_0x521b44(0x201)](_0x1824a4){const _0x245bb2=_0x521b44;var _0x1d9e58,_0x2a7a27;const {text:_0x2a75de,unitId:_0x4a171a}=_0x1824a4,_0x2dcc93=(_0x2a7a27=(_0x1d9e58=_0x2a75de[_0x245bb2(0x1d5)])==null?void 0x0:_0x1d9e58[_0x245bb2(0x1ae)](_0x353059=>_0x353059['rangeType']===c[_0x245bb2(0x1b5)][_0x245bb2(0x1f5)])['map'](_0x282937=>_0x282937[_0x245bb2(0x1bf)]))!=null?_0x2a7a27:[],_0x5d8885=JSON['stringify'](_0x2a75de),_0x313ed5=_0x1824a4[_0x245bb2(0x214)],_0x1426e0=_0x1824a4['id'],_0x213729={'memberId':(await this['_sessionService'][_0x245bb2(0x213)](_0x4a171a))[_0x245bb2(0x1e8)](),'unitId':_0x4a171a,'threadId':_0x313ed5,'mention':_0x2dcc93,'content':_0x5d8885,'replyId':_0x1426e0},_0x32edae=await this[_0x245bb2(0x205)][_0x245bb2(0x20e)](_0x245bb2(0x20d)+_0x4a171a+'/edit',{'body':_0x213729});return!_0x32edae['body'][_0x245bb2(0x1c9)]||_0x32edae[_0x245bb2(0x1e2)]['error'][_0x245bb2(0x1b1)]===0x1;}async[_0x521b44(0x208)](_0x8803f6){const _0x3aa29e=_0x521b44,{unitId:_0x5418df}=_0x8803f6,_0x14f915=_0x8803f6['threadId'],_0x2509ab={'memberId':this[_0x3aa29e(0x1ba)]['getCurrentUser']()[_0x3aa29e(0x217)],'unitId':_0x5418df,'threadId':_0x14f915,'solved':_0x8803f6[_0x3aa29e(0x212)]?I[_0x3aa29e(0x1c4)]:I[_0x3aa29e(0x1d3)]},_0x17bed=await this[_0x3aa29e(0x205)]['post']('/universer-api/comment/unit/'+_0x5418df+_0x3aa29e(0x1f8),{'body':_0x2509ab});return!_0x17bed[_0x3aa29e(0x1e2)][_0x3aa29e(0x1c9)]||_0x17bed[_0x3aa29e(0x1e2)][_0x3aa29e(0x1c9)]['code']===0x1;}async[_0x521b44(0x1da)](_0x5ac3da,_0x4db8df,_0x1607aa,_0x27aa08){const _0x91e0cf=_0x521b44,_0x273f5b={'memberId':(await this['_sessionService']['requireSession'](_0x5ac3da))[_0x91e0cf(0x1e8)](),'threadId':_0x1607aa,'replyId':_0x27aa08,'unitId':_0x5ac3da},_0x3c249e=await this[_0x91e0cf(0x205)][_0x91e0cf(0x20e)](_0x91e0cf(0x20d)+_0x5ac3da+_0x91e0cf(0x211),{'body':_0x273f5b});return!_0x3c249e[_0x91e0cf(0x1e2)][_0x91e0cf(0x1c9)]||_0x3c249e[_0x91e0cf(0x1e2)][_0x91e0cf(0x1c9)][_0x91e0cf(0x1b1)]===0x1;}async['listComments'](_0x5dad61,_0x2fb792,_0xb5792){const _0x1e8d29=_0x521b44,_0x5be9c3={'unitId':_0x5dad61,'threadId':_0xb5792},_0x1e051e=await this[_0x1e8d29(0x205)]['post']('/universer-api/comment/unit/'+_0x5dad61+'/list',{'body':_0x5be9c3}),_0x19253=_0xb5792[_0x1e8d29(0x1a5)](_0x1e412c=>G(_0x1e051e[_0x1e8d29(0x1e2)][_0x1e8d29(0x216)][_0x1e412c],_0x5dad61,_0x2fb792))['filter'](Boolean);return Object[_0x1e8d29(0x1f7)](_0x1e051e[_0x1e8d29(0x1e2)][_0x1e8d29(0x1ee)])[_0x1e8d29(0x1c1)](_0x3b0e7b=>{const _0xec37b4=_0x1e8d29;this['_userService'][_0xec37b4(0x1df)](_0x3b0e7b);}),_0x19253;}['saveCommentToSnapshot'](_0x29ca1a){const _0xff4628=_0x521b44;return{'id':_0x29ca1a['id'],'threadId':_0x29ca1a[_0xff4628(0x214)],'ref':_0x29ca1a[_0xff4628(0x21a)]};}};g=x([_(0x0,c[_0x521b44(0x1ff)](P[_0x521b44(0x1e3)])),_(0x1,c[_0x521b44(0x1ff)](c[_0x521b44(0x1c7)])),_(0x2,c['Inject'](b[_0x521b44(0x1fa)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x521b44(0x202)],J=(_0xdc97df,_0x5f2ff6,_0x866a5f,_0x81d2b3)=>{const _0x482946=_0x521b44;for(var _0x1ff006=_0x81d2b3>0x1?void 0x0:_0x81d2b3?H(_0x5f2ff6,_0x866a5f):_0x5f2ff6,_0x34bc5c=_0xdc97df[_0x482946(0x1eb)]-0x1,_0x3b50a3;_0x34bc5c>=0x0;_0x34bc5c--)(_0x3b50a3=_0xdc97df[_0x34bc5c])&&(_0x1ff006=_0x3b50a3(_0x1ff006)||_0x1ff006);return _0x1ff006;},y=(_0x841878,_0x2c0210)=>(_0x105b37,_0x174076)=>_0x2c0210(_0x105b37,_0x174076,_0x841878);let C=class extends c[_0x521b44(0x1ad)]{constructor(_0xb9864c,_0x5d5503){const _0x39b962=_0x521b44;super(),this['_threadCommentDataSourceService']=_0xb9864c,this[_0x39b962(0x1b0)]=_0x5d5503,this[_0x39b962(0x1fc)]();}[_0x521b44(0x1fc)](){const _0x265206=_0x521b44;this['_threadCommentDataSourceService']['dataSource']=this[_0x265206(0x1b0)],this[_0x265206(0x1ea)]['syncUpdateMutationToColla']=!0x1;}};function _0x32b1(_0xb3d53f,_0x2447c5){const _0x7c3046=_0x7c30();return _0x32b1=function(_0x32b1e9,_0x169573){_0x32b1e9=_0x32b1e9-0x1a0;let _0x5733a3=_0x7c3046[_0x32b1e9];return _0x5733a3;},_0x32b1(_0xb3d53f,_0x2447c5);}C=J([y(0x0,M[_0x521b44(0x1ec)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x521b44(0x1b8)],L=Object[_0x521b44(0x202)],Z=(_0x268edd,_0x3a6d17,_0x3c76cd)=>_0x3a6d17 in _0x268edd?F(_0x268edd,_0x3a6d17,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3c76cd}):_0x268edd[_0x3a6d17]=_0x3c76cd,W=(_0x14a44c,_0x1558f5,_0x859687,_0x485dfa)=>{const _0x5ab1eb=_0x521b44;for(var _0x19367a=_0x485dfa>0x1?void 0x0:_0x485dfa?L(_0x1558f5,_0x859687):_0x1558f5,_0x486d5e=_0x14a44c[_0x5ab1eb(0x1eb)]-0x1,_0x6f6fa1;_0x486d5e>=0x0;_0x486d5e--)(_0x6f6fa1=_0x14a44c[_0x486d5e])&&(_0x19367a=_0x6f6fa1(_0x19367a)||_0x19367a);return _0x19367a;},O=(_0x23513c,_0x27dce5)=>(_0x18b0ab,_0x183d4c)=>_0x27dce5(_0x18b0ab,_0x183d4c,_0x23513c),N=(_0x5b080f,_0x4a669c,_0x8c8ebc)=>Z(_0x5b080f,typeof _0x4a669c!='symbol'?_0x4a669c+'':_0x4a669c,_0x8c8ebc);exports[_0x521b44(0x1bc)]=class extends c[_0x521b44(0x1e9)]{constructor(_0xc9d1a=D,_0x2b5a0c,_0x17990b){const _0x9c5cbb=_0x521b44;super(),this[_0x9c5cbb(0x1dd)]=_0xc9d1a,this['_injector']=_0x2b5a0c,this['_configService']=_0x17990b;const {..._0x3990bc}=c[_0x9c5cbb(0x206)]({},D,this[_0x9c5cbb(0x1dd)]);this[_0x9c5cbb(0x1aa)][_0x9c5cbb(0x1d1)](q,_0x3990bc);}[_0x521b44(0x1b6)](){const _0x23e138=_0x521b44;[[g],[C],[p]][_0x23e138(0x1c1)](_0x4c4c13=>{const _0x2f97ca=_0x23e138;this['_injector'][_0x2f97ca(0x1d8)](_0x4c4c13);});}[_0x521b44(0x1ac)](){const _0x5b9248=_0x521b44;this[_0x5b9248(0x1a0)][_0x5b9248(0x1a9)](C),this[_0x5b9248(0x1a0)][_0x5b9248(0x1a9)](p);}},N(exports[_0x521b44(0x1bc)],'pluginName',U),N(exports[_0x521b44(0x1bc)],_0x521b44(0x1bb),c[_0x521b44(0x215)]['UNIVER_UNKNOWN']),exports[_0x521b44(0x1bc)]=W([c[_0x521b44(0x1d2)](j['UniverThreadCommentUIPlugin'],b[_0x521b44(0x20b)],T[_0x521b44(0x204)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x521b44(0x1f2)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x154b14=_0x564f;(function(_0xb69453,_0x11b739){const _0x4abf1c=_0x564f,_0x550e06=_0xb69453();while(!![]){try{const _0x393fae=parseInt(_0x4abf1c(0x85))/0x1*(-parseInt(_0x4abf1c(0xbf))/0x2)+-parseInt(_0x4abf1c(0xee))/0x3+parseInt(_0x4abf1c(0x97))/0x4+-parseInt(_0x4abf1c(0xdc))/0x5*(parseInt(_0x4abf1c(0xf9))/0x6)+parseInt(_0x4abf1c(0xe1))/0x7*(parseInt(_0x4abf1c(0xb7))/0x8)+-parseInt(_0x4abf1c(0xb2))/0x9*(parseInt(_0x4abf1c(0xc6))/0xa)+parseInt(_0x4abf1c(0x8e))/0xb*(parseInt(_0x4abf1c(0xd0))/0xc);if(_0x393fae===_0x11b739)break;else _0x550e06['push'](_0x550e06['shift']());}catch(_0x2e06eb){_0x550e06['push'](_0x550e06['shift']());}}}(_0x161b,0x5bdac));Object[_0x154b14(0xcf)](exports,Symbol[_0x154b14(0x8f)],{'value':_0x154b14(0xd4)});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=_0x154b14(0xa1);var I=(_0x135fff=>(_0x135fff[_0x135fff[_0x154b14(0x9c)]=0x0]=_0x154b14(0x9c),_0x135fff[_0x135fff[_0x154b14(0xd6)]=0x1]=_0x154b14(0xd6),_0x135fff[_0x135fff[_0x154b14(0xf8)]=-0x1]=_0x154b14(0xf8),_0x135fff))(I||{}),v=(_0x324633=>(_0x324633[_0x324633[_0x154b14(0x9e)]=0x0]=_0x154b14(0x9e),_0x324633[_0x324633[_0x154b14(0xa4)]=0x1]='Add',_0x324633[_0x324633['Reply']=0x2]=_0x154b14(0x7d),_0x324633[_0x324633['Edit']=0x3]=_0x154b14(0xc3),_0x324633[_0x324633[_0x154b14(0xbd)]=0x4]=_0x154b14(0xbd),_0x324633[_0x324633[_0x154b14(0x91)]=0x5]=_0x154b14(0x91),_0x324633[_0x324633[_0x154b14(0xf8)]=-0x1]=_0x154b14(0xf8),_0x324633))(v||{});const f=_0x1734ea=>c[_0x154b14(0x83)](new Date(+_0x1734ea))[_0x154b14(0x98)](_0x154b14(0xed)),R=async(_0x2320f0,_0x226446)=>{const _0x5349ca=_0x154b14,_0x147428=_0x2320f0['get'](c['UserManagerService']),_0x5dcbf4=_0x2320f0[_0x5349ca(0x82)](P['HTTPService']);_0x226446[_0x5349ca(0xc8)](_0x2958c5=>{const _0x1e0ed8=_0x5349ca;_0x147428[_0x1e0ed8(0xcd)](_0x2958c5)&&_0x226446[_0x1e0ed8(0xda)](_0x2958c5);}),_0x226446[_0x5349ca(0x89)]&&(await _0x5dcbf4[_0x5349ca(0x82)](_0x5349ca(0x87),{'params':{'userIDs':[..._0x226446]}}))[_0x5349ca(0xa3)]['users'][_0x5349ca(0xc8)](_0x5009f2=>{_0x5009f2&&_0x147428['addUser'](_0x5009f2);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x57340d,_0x37616a,_0x48a955,_0x51b887)=>{const _0x44e352=_0x154b14;for(var _0x22d6b4=_0x51b887>0x1?void 0x0:_0x51b887?$(_0x37616a,_0x48a955):_0x37616a,_0x41bd04=_0x57340d[_0x44e352(0x9b)]-0x1,_0x4ad376;_0x41bd04>=0x0;_0x41bd04--)(_0x4ad376=_0x57340d[_0x41bd04])&&(_0x22d6b4=_0x4ad376(_0x22d6b4)||_0x22d6b4);return _0x22d6b4;},S=(_0x1de6cc,_0x36eefe)=>(_0x40e026,_0x437d9e)=>_0x36eefe(_0x40e026,_0x437d9e,_0x1de6cc);let p=class extends c[_0x154b14(0xd2)]{constructor(_0x5cf7cf,_0x3ef836,_0x27157a,_0x48ba70){const _0x2ec671=_0x154b14;super(),this[_0x2ec671(0xb9)]=_0x5cf7cf,this[_0x2ec671(0xbe)]=_0x3ef836,this[_0x2ec671(0xb0)]=_0x27157a,this[_0x2ec671(0xc5)]=_0x48ba70,this['_init'](),this[_0x2ec671(0xb6)]();}[_0x154b14(0xb6)](){const _0x47c80a=_0x154b14;this['disposeWithMe'](this[_0x47c80a(0xbe)][_0x47c80a(0x7c)][_0x47c80a(0xa8)](w[_0x47c80a(0xb8)](0x10))[_0x47c80a(0xd5)](_0x205331=>{const _0x4d0200=_0x47c80a,_0x3d62dc=new Set();_0x205331[_0x4d0200(0xc8)](_0x3df591=>{const _0x29006f=_0x4d0200;switch(_0x3df591[_0x29006f(0x88)]){case _0x29006f(0xcb):{const _0xc667b2=_0x3df591[_0x29006f(0xf2)][_0x29006f(0xef)];_0x3d62dc[_0x29006f(0xcb)](_0xc667b2);break;}}}),R(this[_0x4d0200(0xc5)],_0x3d62dc);}));}[_0x154b14(0xba)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x200fc7=>{const _0x5b3869=_0x564f;var _0x616792,_0x2792ad,_0x4665e2,_0x1c2262;const _0xf185ae=(_0x616792=this[_0x5b3869(0xbe)][_0x5b3869(0x86)](_0x200fc7[_0x5b3869(0xec)])[_0x5b3869(0xf6)](_0x4388c0=>_0x4388c0['threadId']===_0x200fc7[_0x5b3869(0xeb)]))==null?void 0x0:_0x616792['root'];if(!_0xf185ae)return;const {unitId:_0x42d20f,subUnitId:_0x3f7174}=_0xf185ae;switch(_0x200fc7['user']&&this['_userService'][_0x5b3869(0x95)](_0x200fc7['user']),_0x200fc7[_0x5b3869(0x88)]){case v['Add']:break;case v[_0x5b3869(0x7d)]:{this['_threadCommentModel'][_0x5b3869(0xf4)](_0x42d20f,_0x3f7174,{'unitId':_0x42d20f,'subUnitId':_0x3f7174,'ref':'','id':_0x200fc7[_0x5b3869(0xab)],'dT':f(+_0x200fc7[_0x5b3869(0xe6)]),'threadId':_0x200fc7[_0x5b3869(0xeb)],'personId':(_0x4665e2=(_0x2792ad=_0x200fc7[_0x5b3869(0x9a)])==null?void 0x0:_0x2792ad['userID'])!=null?_0x4665e2:_0x200fc7[_0x5b3869(0xd9)],'text':JSON[_0x5b3869(0xb1)](_0x200fc7[_0x5b3869(0xe2)]),'parentId':_0xf185ae['id']});break;}case v[_0x5b3869(0xbd)]:{const _0x40439f=this[_0x5b3869(0xbe)][_0x5b3869(0xc2)](_0x42d20f,_0x3f7174,_0x200fc7[_0x5b3869(0xab)]);_0x40439f&&_0x40439f['parentId']&&this[_0x5b3869(0xbe)][_0x5b3869(0xdd)](_0x42d20f,_0x3f7174,_0x200fc7[_0x5b3869(0xab)]);break;}case v[_0x5b3869(0xc3)]:{this[_0x5b3869(0xbe)][_0x5b3869(0x7b)](_0x42d20f,_0x3f7174,{'commentId':_0x200fc7[_0x5b3869(0xab)],'text':JSON[_0x5b3869(0xb1)](_0x200fc7[_0x5b3869(0xe2)])});break;}case v['Solve']:{const _0x56f5b8=(_0x1c2262=this[_0x5b3869(0xbe)]['getUnit'](_0x200fc7[_0x5b3869(0xec)])[_0x5b3869(0xf6)](_0x98094f=>_0x98094f[_0x5b3869(0xeb)]===_0x200fc7[_0x5b3869(0xeb)]))==null?void 0x0:_0x1c2262['root'];_0x56f5b8&&this[_0x5b3869(0xbe)][_0x5b3869(0xf0)](_0x42d20f,_0x3f7174,_0x56f5b8['id'],_0x200fc7['solved']===I[_0x5b3869(0xd6)]);break;}}}));}};p=E([S(0x0,c[_0x154b14(0x8c)](b[_0x154b14(0xce)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x154b14(0x8c)](c[_0x154b14(0xa7)])),S(0x3,c['Inject'](c[_0x154b14(0xb3)]))],p);const q=_0x154b14(0x94),D={};var A=Object[_0x154b14(0xa6)],x=(_0x4978bc,_0x1b1807,_0x3ec0ab,_0x13f0f3)=>{const _0x5bf1dd=_0x154b14;for(var _0x1f8df4=_0x13f0f3>0x1?void 0x0:_0x13f0f3?A(_0x1b1807,_0x3ec0ab):_0x1b1807,_0x1b75cc=_0x4978bc[_0x5bf1dd(0x9b)]-0x1,_0x87a7d2;_0x1b75cc>=0x0;_0x1b75cc--)(_0x87a7d2=_0x4978bc[_0x1b75cc])&&(_0x1f8df4=_0x87a7d2(_0x1f8df4)||_0x1f8df4);return _0x1f8df4;},_=(_0x1fb64e,_0x1264f4)=>(_0x20bcfc,_0x41d5ad)=>_0x1264f4(_0x20bcfc,_0x41d5ad,_0x1fb64e);function Y(_0x270151,_0x49a0d4){const _0x8f66ab=_0x154b14,_0x52f5cd=_0x270151[_0x8f66ab(0xa0)][0x0];return{..._0x49a0d4,'id':_0x52f5cd[_0x8f66ab(0xab)],'resolved':_0x270151['solved']===0x1,'dT':f(_0x52f5cd[_0x8f66ab(0xe6)]),'personId':_0x52f5cd[_0x8f66ab(0xd9)],'threadId':_0x52f5cd[_0x8f66ab(0xeb)]};}function G(_0x23d365,_0x5e7d6d,_0x4b51fd){const _0x43b1dd=_0x154b14;var _0x25818f,_0xe56e10;if(((_0xe56e10=(_0x25818f=_0x23d365==null?void 0x0:_0x23d365[_0x43b1dd(0xa0)])==null?void 0x0:_0x25818f['length'])!=null?_0xe56e10:0x0)>0x0){const _0x446cfa=(_0x5160d3,_0x52cb3b)=>({'id':_0x5160d3[_0x43b1dd(0xab)],'threadId':_0x5160d3['threadId'],'dT':f(_0x5160d3[_0x43b1dd(0xe6)]),'personId':_0x5160d3[_0x43b1dd(0xd9)],'resolved':_0x23d365[_0x43b1dd(0xd3)]===I['Solved'],'unitId':_0x5e7d6d,'subUnitId':_0x4b51fd,'text':JSON[_0x43b1dd(0xb1)](_0x5160d3[_0x43b1dd(0xe2)]),'parentId':_0x52cb3b}),_0x2e3609=_0x446cfa(_0x23d365[_0x43b1dd(0xa0)][0x0]);return{..._0x2e3609,'children':_0x23d365['replies'][_0x43b1dd(0xc4)](0x1)[_0x43b1dd(0xca)](_0x302bf9=>_0x446cfa(_0x302bf9,_0x2e3609['id']))};}return null;}let g=class{constructor(_0x54d2f8,_0x1c872a,_0x5f247e,_0x521cb6){const _0x4fbf71=_0x154b14;this[_0x4fbf71(0xdf)]=_0x54d2f8,this[_0x4fbf71(0xb0)]=_0x1c872a,this[_0x4fbf71(0xcc)]=_0x5f247e,this['_injector']=_0x521cb6;}async[_0x154b14(0xf4)](_0x4979b3){const _0x1c14c7=_0x154b14;var _0x409371,_0x30643d;const {parentId:_0x3c49fe,unitId:_0x2d2899,text:_0x4bb6d1,threadId:_0x146cd4}=_0x4979b3,_0x572adf=(_0x30643d=(_0x409371=_0x4bb6d1[_0x1c14c7(0x96)])==null?void 0x0:_0x409371[_0x1c14c7(0x90)](_0x7dc6d6=>_0x7dc6d6[_0x1c14c7(0xaf)]===c[_0x1c14c7(0xe5)][_0x1c14c7(0x84)])[_0x1c14c7(0xca)](_0x4e94e1=>_0x4e94e1['rangeId']))!=null?_0x30643d:[],_0x2403f2=JSON[_0x1c14c7(0xe9)](_0x4bb6d1),_0x1e59a1=(await this['_sessionService'][_0x1c14c7(0xa2)](_0x2d2899))[_0x1c14c7(0x8d)]();if(_0x3c49fe){const _0x57e8f1={'memberId':_0x1e59a1,'unitId':_0x2d2899,'content':_0x2403f2,'mention':_0x572adf,'threadId':_0x146cd4},_0x5b992c=(await this[_0x1c14c7(0xdf)][_0x1c14c7(0xe3)](_0x1c14c7(0xbb)+_0x2d2899+_0x1c14c7(0x92),{'body':_0x57e8f1}))[_0x1c14c7(0xa3)]['reply'];return{..._0x4979b3,'id':_0x5b992c[_0x1c14c7(0xab)],'dT':c[_0x1c14c7(0x83)](+_0x5b992c[_0x1c14c7(0xe6)])[_0x1c14c7(0x98)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5b992c[_0x1c14c7(0xd9)]};}else{const _0x1f978d={'memberId':_0x1e59a1,'unitId':_0x2d2899,'content':_0x2403f2,'mention':_0x572adf},_0x228c06=await this[_0x1c14c7(0xdf)][_0x1c14c7(0xe3)](_0x1c14c7(0xbb)+_0x2d2899+_0x1c14c7(0xa5),{'body':_0x1f978d});return Y(_0x228c06[_0x1c14c7(0xa3)][_0x1c14c7(0xac)],_0x4979b3);}}async[_0x154b14(0x7b)](_0x51be92){const _0xd235ce=_0x154b14;var _0x7bb15c,_0x221d36;const {text:_0x2d2ca3,unitId:_0x246841}=_0x51be92,_0xb83352=(_0x221d36=(_0x7bb15c=_0x2d2ca3[_0xd235ce(0x96)])==null?void 0x0:_0x7bb15c[_0xd235ce(0x90)](_0x40341c=>_0x40341c['rangeType']===c['CustomRangeType']['COMMENT'])['map'](_0x4fec7e=>_0x4fec7e[_0xd235ce(0x93)]))!=null?_0x221d36:[],_0x4b8bb2=JSON['stringify'](_0x2d2ca3),_0x59e06e=_0x51be92['threadId'],_0x541794=_0x51be92['id'],_0x5bff25={'memberId':(await this[_0xd235ce(0xcc)][_0xd235ce(0xa2)](_0x246841))[_0xd235ce(0x8d)](),'unitId':_0x246841,'threadId':_0x59e06e,'mention':_0xb83352,'content':_0x4b8bb2,'replyId':_0x541794},_0x3914f1=await this['_httpService'][_0xd235ce(0xe3)]('/universer-api/comment/unit/'+_0x246841+_0xd235ce(0xc0),{'body':_0x5bff25});return!_0x3914f1['body'][_0xd235ce(0xb4)]||_0x3914f1['body'][_0xd235ce(0xb4)][_0xd235ce(0xd1)]===0x1;}async[_0x154b14(0xf0)](_0x8bb49){const _0x1f7ca3=_0x154b14,{unitId:_0x1020de}=_0x8bb49,_0x305d22=_0x8bb49[_0x1f7ca3(0xeb)],_0x31e66d={'memberId':this[_0x1f7ca3(0xb0)][_0x1f7ca3(0xf5)]()[_0x1f7ca3(0xaa)],'unitId':_0x1020de,'threadId':_0x305d22,'solved':_0x8bb49[_0x1f7ca3(0xd7)]?I[_0x1f7ca3(0xd6)]:I[_0x1f7ca3(0x9c)]},_0x5361f3=await this[_0x1f7ca3(0xdf)][_0x1f7ca3(0xe3)](_0x1f7ca3(0xbb)+_0x1020de+_0x1f7ca3(0xc1),{'body':_0x31e66d});return!_0x5361f3[_0x1f7ca3(0xa3)][_0x1f7ca3(0xb4)]||_0x5361f3[_0x1f7ca3(0xa3)][_0x1f7ca3(0xb4)]['code']===0x1;}async[_0x154b14(0xdd)](_0x3efb08,_0x533869,_0x40b513,_0x11bd1f){const _0x56b8e8=_0x154b14,_0x29b9e5={'memberId':(await this['_sessionService'][_0x56b8e8(0xa2)](_0x3efb08))[_0x56b8e8(0x8d)](),'threadId':_0x40b513,'replyId':_0x11bd1f,'unitId':_0x3efb08},_0x3cd4a4=await this['_httpService'][_0x56b8e8(0xe3)](_0x56b8e8(0xbb)+_0x3efb08+_0x56b8e8(0xc9),{'body':_0x29b9e5});return!_0x3cd4a4[_0x56b8e8(0xa3)][_0x56b8e8(0xb4)]||_0x3cd4a4[_0x56b8e8(0xa3)]['error'][_0x56b8e8(0xd1)]===0x1;}async['listComments'](_0x4f03c5,_0x264324,_0x4a02e0){const _0x58eec9=_0x154b14,_0x1a870a={'unitId':_0x4f03c5,'threadId':_0x4a02e0},_0x1221e5=await this[_0x58eec9(0xdf)][_0x58eec9(0xe3)](_0x58eec9(0xbb)+_0x4f03c5+_0x58eec9(0xe7),{'body':_0x1a870a}),_0x5f01ef=_0x4a02e0[_0x58eec9(0xca)](_0x15aa01=>G(_0x1221e5[_0x58eec9(0xa3)][_0x58eec9(0xae)][_0x15aa01],_0x4f03c5,_0x264324))[_0x58eec9(0x90)](Boolean);return Object[_0x58eec9(0xf7)](_0x1221e5[_0x58eec9(0xa3)][_0x58eec9(0xea)])['forEach'](_0x43cbd5=>{const _0x32a49a=_0x58eec9;this['_userService'][_0x32a49a(0x95)](_0x43cbd5);}),_0x5f01ef;}[_0x154b14(0xc7)](_0xe800fb){const _0x532cbd=_0x154b14;return{'id':_0xe800fb['id'],'threadId':_0xe800fb[_0x532cbd(0xeb)],'ref':_0xe800fb[_0x532cbd(0x8b)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c['Inject'](c[_0x154b14(0xa7)])),_(0x2,c['Inject'](b[_0x154b14(0xe0)])),_(0x3,c[_0x154b14(0x8c)](c[_0x154b14(0xb3)]))],g);var H=Object[_0x154b14(0xa6)],J=(_0x1bbc9f,_0x5e45c8,_0x587c59,_0x1bf8df)=>{const _0x5c614b=_0x154b14;for(var _0x1eb476=_0x1bf8df>0x1?void 0x0:_0x1bf8df?H(_0x5e45c8,_0x587c59):_0x5e45c8,_0x4f6948=_0x1bbc9f[_0x5c614b(0x9b)]-0x1,_0x5a0833;_0x4f6948>=0x0;_0x4f6948--)(_0x5a0833=_0x1bbc9f[_0x4f6948])&&(_0x1eb476=_0x5a0833(_0x1eb476)||_0x1eb476);return _0x1eb476;},y=(_0x4a2f58,_0x17cb58)=>(_0xc34804,_0x1d023d)=>_0x17cb58(_0xc34804,_0x1d023d,_0x4a2f58);function _0x161b(){const _0x1ddcc3=['_config','stringify','users','threadId','unitId','YYYY/MM/DD\x20HH:mm','245199KAGVFw','personId','resolveComment','onReady','payload','_threadCommentDataSourceService','addComment','getCurrentUser','find','values','UNRECOGNIZED','6rTbveV','updateComment','commentUpdate$','Reply','UniverThreadCommentDataSourcePlugin','Plugin','_initDataSource','pluginName','get','dayjs','COMMENT','417572uEnvxD','getUnit','/universer-api/user/list','type','size','UNIVER_UNKNOWN','ref','Inject','getMemberID','6115307vjaejL','toStringTag','filter','Solve','/reply','rangeId','thread-comment-data-source.config','addUser','customRanges','1358416tbnIzF','format','syncUpdateMutationToColla','user','length','OpenOrReOpen','UniverInstanceType','Unknown','_threadCommentDataSource','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','body','Add','/add','getOwnPropertyDescriptor','UserManagerService','pipe','IConfigService','userID','replyId','comment','_configService','comments','rangeType','_userService','parse','5004crahpg','Injector','error','setConfig','_initUserSync','1263400ROCJyl','bufferTime','_commentService','_init','/universer-api/comment/unit/','DependentOn','Delete','_threadCommentModel','2iMAOms','/edit','/solved','getComment','Edit','slice','_injector','12630UWgptm','saveCommentToSnapshot','forEach','/delete','map','add','_sessionService','getUser','CommentService','defineProperty','24ZYnCTG','code','Disposable','solved','Module','subscribe','Solved','resolved','symbol','userId','delete','onStarting','158170PaXlYo','deleteComment','IThreadCommentDataSourceService','_httpService','CollaborationSessionService','7ZJlPiT','content','post','dataSource','CustomRangeType','createTimestamp','/list'];_0x161b=function(){return _0x1ddcc3;};return _0x161b();}let C=class extends c[_0x154b14(0xd2)]{constructor(_0xe67c77,_0x47e08d){const _0x319675=_0x154b14;super(),this[_0x319675(0xf3)]=_0xe67c77,this[_0x319675(0x9f)]=_0x47e08d,this[_0x319675(0x80)]();}[_0x154b14(0x80)](){const _0x4cccf9=_0x154b14;this[_0x4cccf9(0xf3)][_0x4cccf9(0xe4)]=this[_0x4cccf9(0x9f)],this[_0x4cccf9(0xf3)][_0x4cccf9(0x99)]=!0x1;}};C=J([y(0x0,M[_0x154b14(0xde)]),y(0x1,c[_0x154b14(0x8c)](g))],C);function _0x564f(_0xa4f6a1,_0x2c1d8a){const _0x161bb8=_0x161b();return _0x564f=function(_0x564f20,_0x141af0){_0x564f20=_0x564f20-0x7b;let _0x311d27=_0x161bb8[_0x564f20];return _0x311d27;},_0x564f(_0xa4f6a1,_0x2c1d8a);}var F=Object['defineProperty'],L=Object[_0x154b14(0xa6)],Z=(_0x367e03,_0x538d92,_0x440c6c)=>_0x538d92 in _0x367e03?F(_0x367e03,_0x538d92,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x440c6c}):_0x367e03[_0x538d92]=_0x440c6c,W=(_0x34fc6a,_0x569e25,_0x265150,_0x3cc707)=>{for(var _0x459a2a=_0x3cc707>0x1?void 0x0:_0x3cc707?L(_0x569e25,_0x265150):_0x569e25,_0x52918d=_0x34fc6a['length']-0x1,_0x1adba5;_0x52918d>=0x0;_0x52918d--)(_0x1adba5=_0x34fc6a[_0x52918d])&&(_0x459a2a=_0x1adba5(_0x459a2a)||_0x459a2a);return _0x459a2a;},O=(_0x6b3010,_0x1e0751)=>(_0x28b390,_0x1ee3c3)=>_0x1e0751(_0x28b390,_0x1ee3c3,_0x6b3010),N=(_0x2b8ad8,_0x23d88b,_0x34f8e0)=>Z(_0x2b8ad8,typeof _0x23d88b!=_0x154b14(0xd8)?_0x23d88b+'':_0x23d88b,_0x34f8e0);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x154b14(0x7f)]{constructor(_0x369f7e=D,_0x5260bd,_0x37eefa){const _0x41613e=_0x154b14;super(),this['_config']=_0x369f7e,this[_0x41613e(0xc5)]=_0x5260bd,this[_0x41613e(0xad)]=_0x37eefa;const {..._0x10a37c}=c['merge']({},D,this[_0x41613e(0xe8)]);this['_configService'][_0x41613e(0xb5)](q,_0x10a37c);}[_0x154b14(0xdb)](){const _0x215003=_0x154b14;[[g],[C],[p]][_0x215003(0xc8)](_0x26cde9=>{const _0x48a2eb=_0x215003;this['_injector'][_0x48a2eb(0xcb)](_0x26cde9);});}[_0x154b14(0xf1)](){const _0x55ee9e=_0x154b14;this[_0x55ee9e(0xc5)][_0x55ee9e(0x82)](C),this[_0x55ee9e(0xc5)][_0x55ee9e(0x82)](p);}},N(exports[_0x154b14(0x7e)],_0x154b14(0x81),U),N(exports[_0x154b14(0x7e)],_0x154b14(0x88),c[_0x154b14(0x9d)][_0x154b14(0x8a)]),exports[_0x154b14(0x7e)]=W([c[_0x154b14(0xbc)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x154b14(0x8c)](c['Injector'])),O(0x2,c[_0x154b14(0xa9)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x20c3f7=_0x348c;(function(_0x2049a0,_0x5a40c5){const _0x4a0828=_0x348c,_0x54afdb=_0x2049a0();while(!![]){try{const _0xd97ac9=parseInt(_0x4a0828(0x24b))/0x1+-parseInt(_0x4a0828(0x200))/0x2+-parseInt(_0x4a0828(0x235))/0x3*(-parseInt(_0x4a0828(0x203))/0x4)+-parseInt(_0x4a0828(0x212))/0x5*(parseInt(_0x4a0828(0x1f0))/0x6)+-parseInt(_0x4a0828(0x227))/0x7+parseInt(_0x4a0828(0x244))/0x8+parseInt(_0x4a0828(0x205))/0x9*(parseInt(_0x4a0828(0x211))/0xa);if(_0xd97ac9===_0x5a40c5)break;else _0x54afdb['push'](_0x54afdb['shift']());}catch(_0x3fa38a){_0x54afdb['push'](_0x54afdb['shift']());}}}(_0x1759,0x4dad9));import{CommentService as _0x393445,CollaborationSessionService as _0x7d48d8,UniverCollaborationClientPlugin as _0x1cc7c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x469578}from'@univerjs-pro/license';import{dayjs as _0x5c03d1,UserManagerService as _0x283f92,Inject as _0x390cd4,Injector as _0x279b5f,Disposable as _0x4a3ac7,CustomRangeType as _0x4d3601,UniverInstanceType as _0x3f06dc,DependentOn as _0x3b7dec,IConfigService as _0xa6d69f,Plugin as _0x5d9d3b,merge as _0x1c4ddb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11263e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x386f71,IThreadCommentDataSourceService as _0x59a2d9}from'@univerjs/thread-comment';import{bufferTime as _0x2facfe}from'rxjs';import{HTTPService as _0x417b86}from'@univerjs/network';function _0x1759(){const _0x11eeab=['replies','dataSource','rangeType','496413dlCWHY','_threadCommentDataSource','userId','listComments','post','Unknown','rangeId','deleteComment','add','stringify','getUser','subscribe','find','threadId','Reply','2405680LhvRUK','values','body','parse','setConfig','disposeWithMe','pipe','514443agNRPH','thread-comment-data-source.config','length','_injector','root','comment','YYYY/MM/DD\x20HH:mm','format','881832oQKkWm','type','UNRECOGNIZED','_threadCommentDataSourceService','/reply','Solved','error','user','delete','map','parentId','OpenOrReOpen','size','pluginName','resolveComment','syncUpdateMutationToColla','555786SGvEPL','users','_threadCommentModel','4wnPMWb','solved','2109879SUUfJo','/delete','comments','getMemberID','payload','COMMENT','content','Add','replyId','saveCommentToSnapshot','_httpService','userID','30YNbdZV','20zYbwHw','_init','/universer-api/comment/unit/','slice','commentUpdate$','getOwnPropertyDescriptor','requireSession','_configService','forEach','getUnit','get','createTimestamp','/edit','_userService','/list','addUser','code','filter','updateComment','Solve','unitId','3499769flzpoA','Edit','_initUserSync','_config','reply','addComment','personId','customRanges','_commentService','symbol','_sessionService'];_0x1759=function(){return _0x11eeab;};return _0x1759();}function _0x348c(_0xed6c39,_0x2d8b83){const _0x175945=_0x1759();return _0x348c=function(_0x348c47,_0x57a9d6){_0x348c47=_0x348c47-0x1ea;let _0x50be2c=_0x175945[_0x348c47];return _0x50be2c;},_0x348c(_0xed6c39,_0x2d8b83);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x398f42=>(_0x398f42[_0x398f42[_0x20c3f7(0x1fb)]=0x0]='OpenOrReOpen',_0x398f42[_0x398f42[_0x20c3f7(0x1f5)]=0x1]=_0x20c3f7(0x1f5),_0x398f42[_0x398f42[_0x20c3f7(0x1f2)]=-0x1]=_0x20c3f7(0x1f2),_0x398f42))(I||{}),v=(_0x1fdd40=>(_0x1fdd40[_0x1fdd40[_0x20c3f7(0x23a)]=0x0]=_0x20c3f7(0x23a),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x20c)]=0x1]=_0x20c3f7(0x20c),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x243)]=0x2]=_0x20c3f7(0x243),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x228)]=0x3]=_0x20c3f7(0x228),_0x1fdd40[_0x1fdd40['Delete']=0x4]='Delete',_0x1fdd40[_0x1fdd40[_0x20c3f7(0x225)]=0x5]=_0x20c3f7(0x225),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x1f2)]=-0x1]='UNRECOGNIZED',_0x1fdd40))(v||{});const D=_0x5d2ebb=>_0x5c03d1(new Date(+_0x5d2ebb))[_0x20c3f7(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x22db6f,_0x2f044e)=>{const _0x12b9dc=_0x20c3f7,_0x2c5545=_0x22db6f['get'](_0x283f92),_0x17cff5=_0x22db6f[_0x12b9dc(0x21c)](_0x417b86);_0x2f044e['forEach'](_0x1084fc=>{const _0x51f7f8=_0x12b9dc;_0x2c5545[_0x51f7f8(0x23f)](_0x1084fc)&&_0x2f044e[_0x51f7f8(0x1f8)](_0x1084fc);}),_0x2f044e[_0x12b9dc(0x1fc)]&&(await _0x17cff5[_0x12b9dc(0x21c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2f044e]}}))[_0x12b9dc(0x246)]['users']['forEach'](_0x1da854=>{const _0x1d306e=_0x12b9dc;_0x1da854&&_0x2c5545[_0x1d306e(0x221)](_0x1da854);});};var K=Object[_0x20c3f7(0x217)],V=(_0x161bd4,_0x4d581f,_0x5662c1,_0x707f8e)=>{const _0x1862bf=_0x20c3f7;for(var _0xa21cbf=_0x707f8e>0x1?void 0x0:_0x707f8e?K(_0x4d581f,_0x5662c1):_0x4d581f,_0xe94021=_0x161bd4[_0x1862bf(0x1ea)]-0x1,_0x45b1b7;_0xe94021>=0x0;_0xe94021--)(_0x45b1b7=_0x161bd4[_0xe94021])&&(_0xa21cbf=_0x45b1b7(_0xa21cbf)||_0xa21cbf);return _0xa21cbf;},p=(_0x763387,_0x12c8e1)=>(_0x859521,_0x4093e7)=>_0x12c8e1(_0x859521,_0x4093e7,_0x763387);let S=class extends _0x4a3ac7{constructor(_0x268f94,_0x304a08,_0x18edc3,_0x2b0526){const _0x48277b=_0x20c3f7;super(),this[_0x48277b(0x22f)]=_0x268f94,this['_threadCommentModel']=_0x304a08,this[_0x48277b(0x21f)]=_0x18edc3,this[_0x48277b(0x1eb)]=_0x2b0526,this[_0x48277b(0x213)](),this[_0x48277b(0x229)]();}[_0x20c3f7(0x229)](){const _0x5036e2=_0x20c3f7;this[_0x5036e2(0x249)](this[_0x5036e2(0x202)][_0x5036e2(0x216)][_0x5036e2(0x24a)](_0x2facfe(0x10))['subscribe'](_0x5ddd9d=>{const _0x161876=_0x5036e2,_0x17451f=new Set();_0x5ddd9d[_0x161876(0x21a)](_0x2e372f=>{const _0x3c59ff=_0x161876;switch(_0x2e372f[_0x3c59ff(0x1f1)]){case _0x3c59ff(0x23d):{const _0xd8551f=_0x2e372f[_0x3c59ff(0x209)][_0x3c59ff(0x22d)];_0x17451f[_0x3c59ff(0x23d)](_0xd8551f);break;}}}),B(this['_injector'],_0x17451f);}));}[_0x20c3f7(0x213)](){const _0x42080=_0x20c3f7;this['disposeWithMe'](this[_0x42080(0x22f)][_0x42080(0x216)][_0x42080(0x240)](async _0x3fc319=>{const _0x1e81f0=_0x42080;var _0x17933c,_0x29bc56,_0xd14a48,_0x3ec092;const _0x51bb7e=(_0x17933c=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x14113a=>_0x14113a[_0x1e81f0(0x242)]===_0x3fc319[_0x1e81f0(0x242)]))==null?void 0x0:_0x17933c['root'];if(!_0x51bb7e)return;const {unitId:_0x298f94,subUnitId:_0x2591e7}=_0x51bb7e;switch(_0x3fc319[_0x1e81f0(0x1f7)]&&this[_0x1e81f0(0x21f)][_0x1e81f0(0x221)](_0x3fc319['user']),_0x3fc319[_0x1e81f0(0x1f1)]){case v[_0x1e81f0(0x20c)]:break;case v[_0x1e81f0(0x243)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x22c)](_0x298f94,_0x2591e7,{'unitId':_0x298f94,'subUnitId':_0x2591e7,'ref':'','id':_0x3fc319['replyId'],'dT':D(+_0x3fc319[_0x1e81f0(0x21d)]),'threadId':_0x3fc319['threadId'],'personId':(_0xd14a48=(_0x29bc56=_0x3fc319['user'])==null?void 0x0:_0x29bc56[_0x1e81f0(0x210)])!=null?_0xd14a48:_0x3fc319[_0x1e81f0(0x237)],'text':JSON[_0x1e81f0(0x247)](_0x3fc319[_0x1e81f0(0x20b)]),'parentId':_0x51bb7e['id']});break;}case v['Delete']:{const _0x4f7301=this[_0x1e81f0(0x202)]['getComment'](_0x298f94,_0x2591e7,_0x3fc319['replyId']);_0x4f7301&&_0x4f7301[_0x1e81f0(0x1fa)]&&this[_0x1e81f0(0x202)][_0x1e81f0(0x23c)](_0x298f94,_0x2591e7,_0x3fc319[_0x1e81f0(0x20d)]);break;}case v[_0x1e81f0(0x228)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x224)](_0x298f94,_0x2591e7,{'commentId':_0x3fc319['replyId'],'text':JSON['parse'](_0x3fc319[_0x1e81f0(0x20b)])});break;}case v[_0x1e81f0(0x225)]:{const _0x457853=(_0x3ec092=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x4b18dc=>_0x4b18dc[_0x1e81f0(0x242)]===_0x3fc319['threadId']))==null?void 0x0:_0x3ec092[_0x1e81f0(0x1ec)];_0x457853&&this[_0x1e81f0(0x202)]['resolveComment'](_0x298f94,_0x2591e7,_0x457853['id'],_0x3fc319[_0x1e81f0(0x204)]===I[_0x1e81f0(0x1f5)]);break;}}}));}};S=V([p(0x0,_0x390cd4(_0x393445)),p(0x1,_0x390cd4(_0x386f71)),p(0x2,_0x390cd4(_0x283f92)),p(0x3,_0x390cd4(_0x279b5f))],S);const z=_0x20c3f7(0x24c),M={};var k=Object[_0x20c3f7(0x217)],Q=(_0x5ac6a4,_0x25e3e6,_0x198873,_0x4fb1dd)=>{const _0xfcc63b=_0x20c3f7;for(var _0x51af79=_0x4fb1dd>0x1?void 0x0:_0x4fb1dd?k(_0x25e3e6,_0x198873):_0x25e3e6,_0xda4edd=_0x5ac6a4[_0xfcc63b(0x1ea)]-0x1,_0xa8634e;_0xda4edd>=0x0;_0xda4edd--)(_0xa8634e=_0x5ac6a4[_0xda4edd])&&(_0x51af79=_0xa8634e(_0x51af79)||_0x51af79);return _0x51af79;},_=(_0x3a6470,_0x45d0fa)=>(_0x112011,_0x28b1e4)=>_0x45d0fa(_0x112011,_0x28b1e4,_0x3a6470);function X(_0x11808b,_0x77de00){const _0x1aa43e=_0x20c3f7,_0x2f7e6c=_0x11808b[_0x1aa43e(0x232)][0x0];return{..._0x77de00,'id':_0x2f7e6c[_0x1aa43e(0x20d)],'resolved':_0x11808b[_0x1aa43e(0x204)]===0x1,'dT':D(_0x2f7e6c[_0x1aa43e(0x21d)]),'personId':_0x2f7e6c[_0x1aa43e(0x237)],'threadId':_0x2f7e6c[_0x1aa43e(0x242)]};}function ee(_0x1acc51,_0x46f0e4,_0x679100){const _0x427b3b=_0x20c3f7;var _0x4dd982,_0x22b615;if(((_0x22b615=(_0x4dd982=_0x1acc51==null?void 0x0:_0x1acc51[_0x427b3b(0x232)])==null?void 0x0:_0x4dd982[_0x427b3b(0x1ea)])!=null?_0x22b615:0x0)>0x0){const _0x46846d=(_0x2b8871,_0x2c89bc)=>({'id':_0x2b8871[_0x427b3b(0x20d)],'threadId':_0x2b8871[_0x427b3b(0x242)],'dT':D(_0x2b8871[_0x427b3b(0x21d)]),'personId':_0x2b8871['userId'],'resolved':_0x1acc51[_0x427b3b(0x204)]===I[_0x427b3b(0x1f5)],'unitId':_0x46f0e4,'subUnitId':_0x679100,'text':JSON[_0x427b3b(0x247)](_0x2b8871[_0x427b3b(0x20b)]),'parentId':_0x2c89bc}),_0xcd4119=_0x46846d(_0x1acc51[_0x427b3b(0x232)][0x0]);return{..._0xcd4119,'children':_0x1acc51['replies'][_0x427b3b(0x215)](0x1)['map'](_0x28e41d=>_0x46846d(_0x28e41d,_0xcd4119['id']))};}return null;}let f=class{constructor(_0x40b2f2,_0x5b2288,_0x521195,_0x30b4e2){const _0x51ccdc=_0x20c3f7;this['_httpService']=_0x40b2f2,this[_0x51ccdc(0x21f)]=_0x5b2288,this[_0x51ccdc(0x231)]=_0x521195,this[_0x51ccdc(0x1eb)]=_0x30b4e2;}async[_0x20c3f7(0x22c)](_0x2340db){const _0x2b392e=_0x20c3f7;var _0x252db5,_0x3e35e1;const {parentId:_0x44bbc4,unitId:_0x292cdc,text:_0x52e0a6,threadId:_0x4575d7}=_0x2340db,_0x1c0ee5=(_0x3e35e1=(_0x252db5=_0x52e0a6['customRanges'])==null?void 0x0:_0x252db5[_0x2b392e(0x223)](_0x2d3786=>_0x2d3786[_0x2b392e(0x234)]===_0x4d3601['COMMENT'])[_0x2b392e(0x1f9)](_0x309a1e=>_0x309a1e[_0x2b392e(0x23b)]))!=null?_0x3e35e1:[],_0x2dce12=JSON['stringify'](_0x52e0a6),_0xf5198e=(await this['_sessionService']['requireSession'](_0x292cdc))['getMemberID']();if(_0x44bbc4){const _0x1fea10={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5,'threadId':_0x4575d7},_0x49e346=(await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+_0x2b392e(0x1f4),{'body':_0x1fea10}))[_0x2b392e(0x246)][_0x2b392e(0x22b)];return{..._0x2340db,'id':_0x49e346[_0x2b392e(0x20d)],'dT':_0x5c03d1(+_0x49e346['createTimestamp'])[_0x2b392e(0x1ef)](_0x2b392e(0x1ee)),'personId':_0x49e346[_0x2b392e(0x237)]};}else{const _0x346782={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5},_0x380452=await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+'/add',{'body':_0x346782});return X(_0x380452[_0x2b392e(0x246)][_0x2b392e(0x1ed)],_0x2340db);}}async['updateComment'](_0x270acc){const _0x2f1f1b=_0x20c3f7;var _0x299165,_0x25977b;const {text:_0x18bd7e,unitId:_0x112b10}=_0x270acc,_0x4e5a99=(_0x25977b=(_0x299165=_0x18bd7e[_0x2f1f1b(0x22e)])==null?void 0x0:_0x299165[_0x2f1f1b(0x223)](_0x41507a=>_0x41507a[_0x2f1f1b(0x234)]===_0x4d3601[_0x2f1f1b(0x20a)])[_0x2f1f1b(0x1f9)](_0x333709=>_0x333709[_0x2f1f1b(0x23b)]))!=null?_0x25977b:[],_0x4d04c8=JSON[_0x2f1f1b(0x23e)](_0x18bd7e),_0x21ce33=_0x270acc[_0x2f1f1b(0x242)],_0x50c99d=_0x270acc['id'],_0x1ce0eb={'memberId':(await this['_sessionService'][_0x2f1f1b(0x218)](_0x112b10))[_0x2f1f1b(0x208)](),'unitId':_0x112b10,'threadId':_0x21ce33,'mention':_0x4e5a99,'content':_0x4d04c8,'replyId':_0x50c99d},_0x387bf1=await this[_0x2f1f1b(0x20f)][_0x2f1f1b(0x239)](_0x2f1f1b(0x214)+_0x112b10+_0x2f1f1b(0x21e),{'body':_0x1ce0eb});return!_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)]||_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)][_0x2f1f1b(0x222)]===0x1;}async[_0x20c3f7(0x1fe)](_0x2d1bb3){const _0x309ed8=_0x20c3f7,{unitId:_0x5d570f}=_0x2d1bb3,_0x18f8f=_0x2d1bb3[_0x309ed8(0x242)],_0x2339b6={'memberId':this[_0x309ed8(0x21f)]['getCurrentUser']()[_0x309ed8(0x210)],'unitId':_0x5d570f,'threadId':_0x18f8f,'solved':_0x2d1bb3['resolved']?I[_0x309ed8(0x1f5)]:I[_0x309ed8(0x1fb)]},_0x3f8c8d=await this['_httpService'][_0x309ed8(0x239)]('/universer-api/comment/unit/'+_0x5d570f+'/solved',{'body':_0x2339b6});return!_0x3f8c8d[_0x309ed8(0x246)]['error']||_0x3f8c8d[_0x309ed8(0x246)]['error']['code']===0x1;}async[_0x20c3f7(0x23c)](_0x1d22f2,_0x1f743b,_0x5f57ef,_0x45540e){const _0x349599=_0x20c3f7,_0x441b65={'memberId':(await this[_0x349599(0x231)][_0x349599(0x218)](_0x1d22f2))[_0x349599(0x208)](),'threadId':_0x5f57ef,'replyId':_0x45540e,'unitId':_0x1d22f2},_0x2c28d7=await this[_0x349599(0x20f)]['post'](_0x349599(0x214)+_0x1d22f2+_0x349599(0x206),{'body':_0x441b65});return!_0x2c28d7[_0x349599(0x246)][_0x349599(0x1f6)]||_0x2c28d7[_0x349599(0x246)]['error'][_0x349599(0x222)]===0x1;}async[_0x20c3f7(0x238)](_0x277d49,_0x4cdcaf,_0x10167d){const _0x36c9cf=_0x20c3f7,_0x2cdf58={'unitId':_0x277d49,'threadId':_0x10167d},_0x51a490=await this[_0x36c9cf(0x20f)][_0x36c9cf(0x239)](_0x36c9cf(0x214)+_0x277d49+_0x36c9cf(0x220),{'body':_0x2cdf58}),_0x585dbe=_0x10167d[_0x36c9cf(0x1f9)](_0x3f6f3b=>ee(_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x207)][_0x3f6f3b],_0x277d49,_0x4cdcaf))[_0x36c9cf(0x223)](Boolean);return Object[_0x36c9cf(0x245)](_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x201)])['forEach'](_0x14e9db=>{const _0x4761ec=_0x36c9cf;this[_0x4761ec(0x21f)][_0x4761ec(0x221)](_0x14e9db);}),_0x585dbe;}[_0x20c3f7(0x20e)](_0x29361d){const _0x1d6e20=_0x20c3f7;return{'id':_0x29361d['id'],'threadId':_0x29361d[_0x1d6e20(0x242)],'ref':_0x29361d['ref']};}};f=Q([_(0x0,_0x390cd4(_0x417b86)),_(0x1,_0x390cd4(_0x283f92)),_(0x2,_0x390cd4(_0x7d48d8)),_(0x3,_0x390cd4(_0x279b5f))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x50f1b8,_0x275d2e,_0x4d7b10,_0x1f7b73)=>{const _0x43989d=_0x20c3f7;for(var _0x217dca=_0x1f7b73>0x1?void 0x0:_0x1f7b73?re(_0x275d2e,_0x4d7b10):_0x275d2e,_0x15c101=_0x50f1b8[_0x43989d(0x1ea)]-0x1,_0x599d2b;_0x15c101>=0x0;_0x15c101--)(_0x599d2b=_0x50f1b8[_0x15c101])&&(_0x217dca=_0x599d2b(_0x217dca)||_0x217dca);return _0x217dca;},N=(_0x3ce9ed,_0x1d5d2f)=>(_0x289dbc,_0x1957b6)=>_0x1d5d2f(_0x289dbc,_0x1957b6,_0x3ce9ed);let g=class extends _0x4a3ac7{constructor(_0x272b55,_0x10f6a8){const _0x405383=_0x20c3f7;super(),this['_threadCommentDataSourceService']=_0x272b55,this[_0x405383(0x236)]=_0x10f6a8,this['_initDataSource']();}['_initDataSource'](){const _0x15413d=_0x20c3f7;this[_0x15413d(0x1f3)][_0x15413d(0x233)]=this[_0x15413d(0x236)],this[_0x15413d(0x1f3)][_0x15413d(0x1ff)]=!0x1;}};g=te([N(0x0,_0x59a2d9),N(0x1,_0x390cd4(f))],g);var se=Object['defineProperty'],oe=Object[_0x20c3f7(0x217)],ne=(_0x25cd94,_0x185bd8,_0x32270e)=>_0x185bd8 in _0x25cd94?se(_0x25cd94,_0x185bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32270e}):_0x25cd94[_0x185bd8]=_0x32270e,ie=(_0x3110aa,_0x4aeb01,_0x42dd1f,_0xb9c540)=>{const _0x5cc3ef=_0x20c3f7;for(var _0x52bf8f=_0xb9c540>0x1?void 0x0:_0xb9c540?oe(_0x4aeb01,_0x42dd1f):_0x4aeb01,_0x18f52=_0x3110aa[_0x5cc3ef(0x1ea)]-0x1,_0x1da036;_0x18f52>=0x0;_0x18f52--)(_0x1da036=_0x3110aa[_0x18f52])&&(_0x52bf8f=_0x1da036(_0x52bf8f)||_0x52bf8f);return _0x52bf8f;},w=(_0x32123e,_0x48b2fe)=>(_0x1cb524,_0x1a77b3)=>_0x48b2fe(_0x1cb524,_0x1a77b3,_0x32123e),$=(_0x3bfa92,_0xc2b19a,_0x478f3e)=>ne(_0x3bfa92,typeof _0xc2b19a!=_0x20c3f7(0x230)?_0xc2b19a+'':_0xc2b19a,_0x478f3e);let b=class extends _0x5d9d3b{constructor(_0x39616b=M,_0xcd8679,_0x30b76a){const _0x2467e1=_0x20c3f7;super(),this[_0x2467e1(0x22a)]=_0x39616b,this['_injector']=_0xcd8679,this[_0x2467e1(0x219)]=_0x30b76a;const {..._0x486380}=_0x1c4ddb({},M,this[_0x2467e1(0x22a)]);this[_0x2467e1(0x219)][_0x2467e1(0x248)](z,_0x486380);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5bdc67=>{const _0x1327b2=_0x348c;this[_0x1327b2(0x1eb)]['add'](_0x5bdc67);});}['onReady'](){const _0x54912f=_0x20c3f7;this[_0x54912f(0x1eb)]['get'](g),this[_0x54912f(0x1eb)][_0x54912f(0x21c)](S);}};$(b,_0x20c3f7(0x1fd),W),$(b,_0x20c3f7(0x1f1),_0x3f06dc['UNIVER_UNKNOWN']),b=ie([_0x3b7dec(_0x11263e,_0x1cc7c5,_0x469578),w(0x1,_0x390cd4(_0x279b5f)),w(0x2,_0xa6d69f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4c386b=_0x4dee;(function(_0x57fd8a,_0x48aa77){const _0x30643a=_0x4dee,_0x1171ab=_0x57fd8a();while(!![]){try{const _0x5dfee9=-parseInt(_0x30643a(0x117))/0x1+-parseInt(_0x30643a(0x10a))/0x2+parseInt(_0x30643a(0x103))/0x3*(parseInt(_0x30643a(0xe9))/0x4)+-parseInt(_0x30643a(0x10c))/0x5+parseInt(_0x30643a(0xe6))/0x6*(parseInt(_0x30643a(0x13a))/0x7)+-parseInt(_0x30643a(0x112))/0x8*(parseInt(_0x30643a(0xf7))/0x9)+parseInt(_0x30643a(0x124))/0xa;if(_0x5dfee9===_0x48aa77)break;else _0x1171ab['push'](_0x1171ab['shift']());}catch(_0x5b0cd7){_0x1171ab['push'](_0x1171ab['shift']());}}}(_0x51eb,0x81956));import{CommentService as _0x557342,CollaborationSessionService as _0xfb639f,UniverCollaborationClientPlugin as _0x308f6a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x295138}from'@univerjs-pro/license';import{dayjs as _0x386800,UserManagerService as _0x2d6bfb,Inject as _0x5df9cf,Injector as _0x366845,Disposable as _0x2cf2a6,CustomRangeType as _0x3596ea,UniverInstanceType as _0x2a606d,DependentOn as _0x335001,IConfigService as _0x48a89e,Plugin as _0x449e4b,merge as _0xfbe004}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2680ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x277e92,IThreadCommentDataSourceService as _0x14ca09}from'@univerjs/thread-comment';import{bufferTime as _0x2fb0ee}from'rxjs';import{HTTPService as _0x135e04}from'@univerjs/network';const W=_0x4c386b(0x136);var I=(_0x4e5b48=>(_0x4e5b48[_0x4e5b48[_0x4c386b(0x101)]=0x0]=_0x4c386b(0x101),_0x4e5b48[_0x4e5b48[_0x4c386b(0x10f)]=0x1]=_0x4c386b(0x10f),_0x4e5b48[_0x4e5b48[_0x4c386b(0xfd)]=-0x1]='UNRECOGNIZED',_0x4e5b48))(I||{}),v=(_0x7f0e7e=>(_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x11f)]=0x0]=_0x4c386b(0x11f),_0x7f0e7e[_0x7f0e7e['Add']=0x1]=_0x4c386b(0xdc),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf4)]=0x2]='Reply',_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x13f)]=0x3]=_0x4c386b(0x13f),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf9)]=0x4]=_0x4c386b(0xf9),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x111)]=0x5]=_0x4c386b(0x111),_0x7f0e7e[_0x7f0e7e['UNRECOGNIZED']=-0x1]=_0x4c386b(0xfd),_0x7f0e7e))(v||{});const D=_0x4579c4=>_0x386800(new Date(+_0x4579c4))[_0x4c386b(0x119)](_0x4c386b(0xe5)),B=async(_0x151372,_0x472bbe)=>{const _0x3c76e5=_0x4c386b,_0x1b13a5=_0x151372[_0x3c76e5(0x11a)](_0x2d6bfb),_0x1f2ac9=_0x151372['get'](_0x135e04);_0x472bbe[_0x3c76e5(0x133)](_0x1fd6b5=>{const _0x1adac6=_0x3c76e5;_0x1b13a5[_0x1adac6(0x10e)](_0x1fd6b5)&&_0x472bbe[_0x1adac6(0x10b)](_0x1fd6b5);}),_0x472bbe[_0x3c76e5(0x11b)]&&(await _0x1f2ac9[_0x3c76e5(0x11a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x472bbe]}}))['body']['users']['forEach'](_0x5c993e=>{_0x5c993e&&_0x1b13a5['addUser'](_0x5c993e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1f2a83,_0xa3729c,_0x32b37d,_0x3d45ed)=>{const _0x45988d=_0x4c386b;for(var _0x2fe9b3=_0x3d45ed>0x1?void 0x0:_0x3d45ed?K(_0xa3729c,_0x32b37d):_0xa3729c,_0x45350d=_0x1f2a83[_0x45988d(0x100)]-0x1,_0x516c64;_0x45350d>=0x0;_0x45350d--)(_0x516c64=_0x1f2a83[_0x45350d])&&(_0x2fe9b3=_0x516c64(_0x2fe9b3)||_0x2fe9b3);return _0x2fe9b3;},p=(_0x5e9155,_0x4ddd73)=>(_0x4ee9a8,_0x40939c)=>_0x4ddd73(_0x4ee9a8,_0x40939c,_0x5e9155);let S=class extends _0x2cf2a6{constructor(_0x2b4079,_0x12f057,_0x52694f,_0x2ca9f0){const _0x2d0650=_0x4c386b;super(),this['_commentService']=_0x2b4079,this[_0x2d0650(0x12e)]=_0x12f057,this[_0x2d0650(0xfc)]=_0x52694f,this[_0x2d0650(0xf6)]=_0x2ca9f0,this[_0x2d0650(0x12f)](),this[_0x2d0650(0x106)]();}[_0x4c386b(0x106)](){const _0x2b70e9=_0x4c386b;this[_0x2b70e9(0x11c)](this[_0x2b70e9(0x12e)][_0x2b70e9(0x107)][_0x2b70e9(0x13c)](_0x2fb0ee(0x10))[_0x2b70e9(0x12c)](_0xf653fe=>{const _0x181918=_0x2b70e9,_0x32f2b3=new Set();_0xf653fe['forEach'](_0x1e7d8d=>{const _0x218316=_0x4dee;switch(_0x1e7d8d[_0x218316(0x127)]){case'add':{const _0x53b211=_0x1e7d8d[_0x218316(0xec)][_0x218316(0x118)];_0x32f2b3[_0x218316(0x142)](_0x53b211);break;}}}),B(this[_0x181918(0xf6)],_0x32f2b3);}));}['_init'](){const _0x4121c9=_0x4c386b;this[_0x4121c9(0x11c)](this[_0x4121c9(0xfa)][_0x4121c9(0x107)][_0x4121c9(0x12c)](async _0x1b4d67=>{const _0x7b8ee3=_0x4121c9;var _0x18355b,_0x513aa8,_0x374449,_0x362e91;const _0x4e774b=(_0x18355b=this['_threadCommentModel']['getUnit'](_0x1b4d67[_0x7b8ee3(0x132)])['find'](_0x3e0849=>_0x3e0849[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x18355b[_0x7b8ee3(0xf2)];if(!_0x4e774b)return;const {unitId:_0x1478e8,subUnitId:_0x16cc52}=_0x4e774b;switch(_0x1b4d67[_0x7b8ee3(0xe0)]&&this['_userService'][_0x7b8ee3(0xe7)](_0x1b4d67[_0x7b8ee3(0xe0)]),_0x1b4d67[_0x7b8ee3(0x127)]){case v[_0x7b8ee3(0xdc)]:break;case v['Reply']:{this['_threadCommentModel'][_0x7b8ee3(0x110)](_0x1478e8,_0x16cc52,{'unitId':_0x1478e8,'subUnitId':_0x16cc52,'ref':'','id':_0x1b4d67[_0x7b8ee3(0x128)],'dT':D(+_0x1b4d67[_0x7b8ee3(0x116)]),'threadId':_0x1b4d67[_0x7b8ee3(0x126)],'personId':(_0x374449=(_0x513aa8=_0x1b4d67[_0x7b8ee3(0xe0)])==null?void 0x0:_0x513aa8['userID'])!=null?_0x374449:_0x1b4d67[_0x7b8ee3(0x12a)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67['content']),'parentId':_0x4e774b['id']});break;}case v[_0x7b8ee3(0xf9)]:{const _0x3d54b2=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xde)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);_0x3d54b2&&_0x3d54b2[_0x7b8ee3(0xf1)]&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xfe)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);break;}case v[_0x7b8ee3(0x13f)]:{this['_threadCommentModel'][_0x7b8ee3(0x130)](_0x1478e8,_0x16cc52,{'commentId':_0x1b4d67[_0x7b8ee3(0x128)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67[_0x7b8ee3(0x102)])});break;}case v[_0x7b8ee3(0x111)]:{const _0x5abdfc=(_0x362e91=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xed)](_0x1b4d67[_0x7b8ee3(0x132)])[_0x7b8ee3(0xe4)](_0x5dd4b8=>_0x5dd4b8[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x362e91['root'];_0x5abdfc&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0x141)](_0x1478e8,_0x16cc52,_0x5abdfc['id'],_0x1b4d67[_0x7b8ee3(0x11e)]===I[_0x7b8ee3(0x10f)]);break;}}}));}};function _0x4dee(_0x72d138,_0x34f66d){const _0x51eb80=_0x51eb();return _0x4dee=function(_0x4dee1f,_0xa9f298){_0x4dee1f=_0x4dee1f-0xdc;let _0x318b8e=_0x51eb80[_0x4dee1f];return _0x318b8e;},_0x4dee(_0x72d138,_0x34f66d);}S=V([p(0x0,_0x5df9cf(_0x557342)),p(0x1,_0x5df9cf(_0x277e92)),p(0x2,_0x5df9cf(_0x2d6bfb)),p(0x3,_0x5df9cf(_0x366845))],S);const z=_0x4c386b(0x120),M={};var k=Object[_0x4c386b(0xdf)],Q=(_0x1dcd15,_0x3ad3e5,_0x12b5d6,_0x3d0907)=>{const _0x1267a8=_0x4c386b;for(var _0x400c65=_0x3d0907>0x1?void 0x0:_0x3d0907?k(_0x3ad3e5,_0x12b5d6):_0x3ad3e5,_0x13a468=_0x1dcd15[_0x1267a8(0x100)]-0x1,_0x549d8f;_0x13a468>=0x0;_0x13a468--)(_0x549d8f=_0x1dcd15[_0x13a468])&&(_0x400c65=_0x549d8f(_0x400c65)||_0x400c65);return _0x400c65;},_=(_0x45bdc9,_0x3998c6)=>(_0xc4775,_0x28f405)=>_0x3998c6(_0xc4775,_0x28f405,_0x45bdc9);function X(_0x7cb4e6,_0x4daa2a){const _0x2dadc2=_0x4c386b,_0x54ef10=_0x7cb4e6[_0x2dadc2(0x135)][0x0];return{..._0x4daa2a,'id':_0x54ef10[_0x2dadc2(0x128)],'resolved':_0x7cb4e6[_0x2dadc2(0x11e)]===0x1,'dT':D(_0x54ef10[_0x2dadc2(0x116)]),'personId':_0x54ef10['userId'],'threadId':_0x54ef10[_0x2dadc2(0x126)]};}function ee(_0x97973e,_0x4eec2e,_0x1ed8db){const _0x585081=_0x4c386b;var _0x387e6c,_0x2b625b;if(((_0x2b625b=(_0x387e6c=_0x97973e==null?void 0x0:_0x97973e[_0x585081(0x135)])==null?void 0x0:_0x387e6c[_0x585081(0x100)])!=null?_0x2b625b:0x0)>0x0){const _0x3f1644=(_0x248b0c,_0x380295)=>({'id':_0x248b0c[_0x585081(0x128)],'threadId':_0x248b0c[_0x585081(0x126)],'dT':D(_0x248b0c['createTimestamp']),'personId':_0x248b0c[_0x585081(0x12a)],'resolved':_0x97973e['solved']===I[_0x585081(0x10f)],'unitId':_0x4eec2e,'subUnitId':_0x1ed8db,'text':JSON[_0x585081(0x125)](_0x248b0c[_0x585081(0x102)]),'parentId':_0x380295}),_0x104c1f=_0x3f1644(_0x97973e[_0x585081(0x135)][0x0]);return{..._0x104c1f,'children':_0x97973e[_0x585081(0x135)][_0x585081(0xfb)](0x1)[_0x585081(0xf8)](_0x1734e5=>_0x3f1644(_0x1734e5,_0x104c1f['id']))};}return null;}let f=class{constructor(_0x56f777,_0x2401af,_0x54ebd0,_0x2f4216){const _0x206103=_0x4c386b;this[_0x206103(0x123)]=_0x56f777,this['_userService']=_0x2401af,this[_0x206103(0x140)]=_0x54ebd0,this[_0x206103(0xf6)]=_0x2f4216;}async[_0x4c386b(0x110)](_0x2f1641){const _0x29e658=_0x4c386b;var _0xd18f35,_0x177461;const {parentId:_0x5003cd,unitId:_0x47a4a9,text:_0x380d4b,threadId:_0x5058c0}=_0x2f1641,_0x3b5011=(_0x177461=(_0xd18f35=_0x380d4b[_0x29e658(0xee)])==null?void 0x0:_0xd18f35[_0x29e658(0xdd)](_0x22f5d1=>_0x22f5d1[_0x29e658(0x108)]===_0x3596ea['COMMENT'])['map'](_0x37d606=>_0x37d606['rangeId']))!=null?_0x177461:[],_0x4c66ce=JSON[_0x29e658(0x12d)](_0x380d4b),_0x985712=(await this[_0x29e658(0x140)][_0x29e658(0x114)](_0x47a4a9))[_0x29e658(0x109)]();if(_0x5003cd){const _0x1f72ef={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011,'threadId':_0x5058c0},_0x5a92c6=(await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0xe3),{'body':_0x1f72ef}))[_0x29e658(0x129)][_0x29e658(0xf5)];return{..._0x2f1641,'id':_0x5a92c6['replyId'],'dT':_0x386800(+_0x5a92c6[_0x29e658(0x116)])[_0x29e658(0x119)](_0x29e658(0xe5)),'personId':_0x5a92c6['userId']};}else{const _0x4d8b5e={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011},_0x3eecc0=await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0x10d),{'body':_0x4d8b5e});return X(_0x3eecc0[_0x29e658(0x129)][_0x29e658(0x105)],_0x2f1641);}}async[_0x4c386b(0x130)](_0x6b1ff0){const _0xede77=_0x4c386b;var _0xfa6d02,_0x7abad5;const {text:_0x1d1359,unitId:_0x18f6b0}=_0x6b1ff0,_0x1ef9f5=(_0x7abad5=(_0xfa6d02=_0x1d1359[_0xede77(0xee)])==null?void 0x0:_0xfa6d02[_0xede77(0xdd)](_0x4f2917=>_0x4f2917[_0xede77(0x108)]===_0x3596ea['COMMENT'])[_0xede77(0xf8)](_0x1bd702=>_0x1bd702[_0xede77(0xf0)]))!=null?_0x7abad5:[],_0x85fbcb=JSON['stringify'](_0x1d1359),_0x586508=_0x6b1ff0[_0xede77(0x126)],_0x139876=_0x6b1ff0['id'],_0x41d304={'memberId':(await this['_sessionService'][_0xede77(0x114)](_0x18f6b0))[_0xede77(0x109)](),'unitId':_0x18f6b0,'threadId':_0x586508,'mention':_0x1ef9f5,'content':_0x85fbcb,'replyId':_0x139876},_0x58f33c=await this['_httpService'][_0xede77(0x115)](_0xede77(0xe8)+_0x18f6b0+_0xede77(0xf3),{'body':_0x41d304});return!_0x58f33c[_0xede77(0x129)][_0xede77(0x122)]||_0x58f33c[_0xede77(0x129)][_0xede77(0x122)][_0xede77(0xeb)]===0x1;}async[_0x4c386b(0x141)](_0x2e18d6){const _0x189f40=_0x4c386b,{unitId:_0x59f1ea}=_0x2e18d6,_0x4b4b32=_0x2e18d6[_0x189f40(0x126)],_0x5c8b45={'memberId':this['_userService'][_0x189f40(0x13b)]()[_0x189f40(0x12b)],'unitId':_0x59f1ea,'threadId':_0x4b4b32,'solved':_0x2e18d6['resolved']?I[_0x189f40(0x10f)]:I['OpenOrReOpen']},_0x3b5ca6=await this[_0x189f40(0x123)][_0x189f40(0x115)]('/universer-api/comment/unit/'+_0x59f1ea+'/solved',{'body':_0x5c8b45});return!_0x3b5ca6[_0x189f40(0x129)]['error']||_0x3b5ca6[_0x189f40(0x129)]['error'][_0x189f40(0xeb)]===0x1;}async[_0x4c386b(0xfe)](_0x55a318,_0x1d7f89,_0x57da0f,_0x1f6080){const _0x48f581=_0x4c386b,_0x114565={'memberId':(await this[_0x48f581(0x140)]['requireSession'](_0x55a318))[_0x48f581(0x109)](),'threadId':_0x57da0f,'replyId':_0x1f6080,'unitId':_0x55a318},_0x412a0a=await this['_httpService'][_0x48f581(0x115)](_0x48f581(0xe8)+_0x55a318+_0x48f581(0x13e),{'body':_0x114565});return!_0x412a0a[_0x48f581(0x129)]['error']||_0x412a0a[_0x48f581(0x129)][_0x48f581(0x122)][_0x48f581(0xeb)]===0x1;}async[_0x4c386b(0x104)](_0x56c76f,_0xed8875,_0x517f33){const _0x546ea5=_0x4c386b,_0x15c93e={'unitId':_0x56c76f,'threadId':_0x517f33},_0x1a715d=await this[_0x546ea5(0x123)][_0x546ea5(0x115)](_0x546ea5(0xe8)+_0x56c76f+'/list',{'body':_0x15c93e}),_0x34cc2c=_0x517f33[_0x546ea5(0xf8)](_0x3b24a0=>ee(_0x1a715d['body'][_0x546ea5(0xff)][_0x3b24a0],_0x56c76f,_0xed8875))[_0x546ea5(0xdd)](Boolean);return Object[_0x546ea5(0x137)](_0x1a715d[_0x546ea5(0x129)][_0x546ea5(0x11d)])[_0x546ea5(0x133)](_0x84f9fc=>{const _0x4ee4c6=_0x546ea5;this[_0x4ee4c6(0xfc)][_0x4ee4c6(0xe7)](_0x84f9fc);}),_0x34cc2c;}['saveCommentToSnapshot'](_0x2eb497){const _0x229f5c=_0x4c386b;return{'id':_0x2eb497['id'],'threadId':_0x2eb497[_0x229f5c(0x126)],'ref':_0x2eb497[_0x229f5c(0xe2)]};}};f=Q([_(0x0,_0x5df9cf(_0x135e04)),_(0x1,_0x5df9cf(_0x2d6bfb)),_(0x2,_0x5df9cf(_0xfb639f)),_(0x3,_0x5df9cf(_0x366845))],f);function _0x51eb(){const _0x45239f=['_initUserSync','commentUpdate$','rangeType','getMemberID','642480GKohPC','delete','3501355IejjYN','/add','getUser','Solved','addComment','Solve','9928IndejH','pluginName','requireSession','post','createTimestamp','278267EuUymt','personId','format','get','size','disposeWithMe','users','solved','Unknown','thread-comment-data-source.config','_configService','error','_httpService','6364550NGNurC','parse','threadId','type','replyId','body','userId','userID','subscribe','stringify','_threadCommentModel','_init','updateComment','UNIVER_UNKNOWN','unitId','forEach','syncUpdateMutationToColla','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','onReady','onStarting','7vjKFZU','getCurrentUser','pipe','_initDataSource','/delete','Edit','_sessionService','resolveComment','add','Add','filter','getComment','getOwnPropertyDescriptor','user','defineProperty','ref','/reply','find','YYYY/MM/DD\x20HH:mm','2848722boPpBw','addUser','/universer-api/comment/unit/','4uOXOXy','_config','code','payload','getUnit','customRanges','_threadCommentDataSourceService','rangeId','parentId','root','/edit','Reply','reply','_injector','1674VRKktY','map','Delete','_commentService','slice','_userService','UNRECOGNIZED','deleteComment','comments','length','OpenOrReOpen','content','2850408AilNxk','listComments','comment'];_0x51eb=function(){return _0x45239f;};return _0x51eb();}var re=Object['getOwnPropertyDescriptor'],te=(_0x29f780,_0x17ac51,_0x227c71,_0x9142da)=>{const _0x4c1417=_0x4c386b;for(var _0x4cdf62=_0x9142da>0x1?void 0x0:_0x9142da?re(_0x17ac51,_0x227c71):_0x17ac51,_0x592e48=_0x29f780[_0x4c1417(0x100)]-0x1,_0xafaac0;_0x592e48>=0x0;_0x592e48--)(_0xafaac0=_0x29f780[_0x592e48])&&(_0x4cdf62=_0xafaac0(_0x4cdf62)||_0x4cdf62);return _0x4cdf62;},N=(_0x593e02,_0xf03de6)=>(_0x2e4d79,_0x5bf062)=>_0xf03de6(_0x2e4d79,_0x5bf062,_0x593e02);let g=class extends _0x2cf2a6{constructor(_0x5c0094,_0xc013d9){const _0x9991dd=_0x4c386b;super(),this[_0x9991dd(0xef)]=_0x5c0094,this['_threadCommentDataSource']=_0xc013d9,this[_0x9991dd(0x13d)]();}[_0x4c386b(0x13d)](){const _0x232b66=_0x4c386b;this[_0x232b66(0xef)]['dataSource']=this['_threadCommentDataSource'],this[_0x232b66(0xef)][_0x232b66(0x134)]=!0x1;}};g=te([N(0x0,_0x14ca09),N(0x1,_0x5df9cf(f))],g);var se=Object[_0x4c386b(0xe1)],oe=Object[_0x4c386b(0xdf)],ne=(_0xbe5566,_0x34011f,_0x56fa3c)=>_0x34011f in _0xbe5566?se(_0xbe5566,_0x34011f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56fa3c}):_0xbe5566[_0x34011f]=_0x56fa3c,ie=(_0x3ec7f2,_0x502340,_0x5d02ca,_0x149f89)=>{for(var _0xe23d6e=_0x149f89>0x1?void 0x0:_0x149f89?oe(_0x502340,_0x5d02ca):_0x502340,_0x2c4c55=_0x3ec7f2['length']-0x1,_0x43dadb;_0x2c4c55>=0x0;_0x2c4c55--)(_0x43dadb=_0x3ec7f2[_0x2c4c55])&&(_0xe23d6e=_0x43dadb(_0xe23d6e)||_0xe23d6e);return _0xe23d6e;},w=(_0x1a7be5,_0x58392f)=>(_0x207bfc,_0x1eff2d)=>_0x58392f(_0x207bfc,_0x1eff2d,_0x1a7be5),$=(_0x3adf8b,_0x1369f5,_0x5d3284)=>ne(_0x3adf8b,typeof _0x1369f5!='symbol'?_0x1369f5+'':_0x1369f5,_0x5d3284);let b=class extends _0x449e4b{constructor(_0x2b942c=M,_0x523c88,_0x80ea4d){const _0x48385e=_0x4c386b;super(),this[_0x48385e(0xea)]=_0x2b942c,this[_0x48385e(0xf6)]=_0x523c88,this[_0x48385e(0x121)]=_0x80ea4d;const {..._0x45d3b2}=_0xfbe004({},M,this[_0x48385e(0xea)]);this['_configService']['setConfig'](z,_0x45d3b2);}[_0x4c386b(0x139)](){const _0x33ae6d=_0x4c386b;[[f],[g],[S]][_0x33ae6d(0x133)](_0x66a21a=>{const _0x491afd=_0x33ae6d;this[_0x491afd(0xf6)][_0x491afd(0x142)](_0x66a21a);});}[_0x4c386b(0x138)](){const _0x202216=_0x4c386b;this[_0x202216(0xf6)][_0x202216(0x11a)](g),this[_0x202216(0xf6)][_0x202216(0x11a)](S);}};$(b,_0x4c386b(0x113),W),$(b,_0x4c386b(0x127),_0x2a606d[_0x4c386b(0x131)]),b=ie([_0x335001(_0x2680ad,_0x308f6a,_0x295138),w(0x1,_0x5df9cf(_0x366845)),w(0x2,_0x48a89e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x20c3f7=_0x348c;(function(_0x2049a0,_0x5a40c5){const _0x4a0828=_0x348c,_0x54afdb=_0x2049a0();while(!![]){try{const _0xd97ac9=parseInt(_0x4a0828(0x24b))/0x1+-parseInt(_0x4a0828(0x200))/0x2+-parseInt(_0x4a0828(0x235))/0x3*(-parseInt(_0x4a0828(0x203))/0x4)+-parseInt(_0x4a0828(0x212))/0x5*(parseInt(_0x4a0828(0x1f0))/0x6)+-parseInt(_0x4a0828(0x227))/0x7+parseInt(_0x4a0828(0x244))/0x8+parseInt(_0x4a0828(0x205))/0x9*(parseInt(_0x4a0828(0x211))/0xa);if(_0xd97ac9===_0x5a40c5)break;else _0x54afdb['push'](_0x54afdb['shift']());}catch(_0x3fa38a){_0x54afdb['push'](_0x54afdb['shift']());}}}(_0x1759,0x4dad9));import{CommentService as _0x393445,CollaborationSessionService as _0x7d48d8,UniverCollaborationClientPlugin as _0x1cc7c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x469578}from'@univerjs-pro/license';import{dayjs as _0x5c03d1,UserManagerService as _0x283f92,Inject as _0x390cd4,Injector as _0x279b5f,Disposable as _0x4a3ac7,CustomRangeType as _0x4d3601,UniverInstanceType as _0x3f06dc,DependentOn as _0x3b7dec,IConfigService as _0xa6d69f,Plugin as _0x5d9d3b,merge as _0x1c4ddb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11263e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x386f71,IThreadCommentDataSourceService as _0x59a2d9}from'@univerjs/thread-comment';import{bufferTime as _0x2facfe}from'rxjs';import{HTTPService as _0x417b86}from'@univerjs/network';function _0x1759(){const _0x11eeab=['replies','dataSource','rangeType','496413dlCWHY','_threadCommentDataSource','userId','listComments','post','Unknown','rangeId','deleteComment','add','stringify','getUser','subscribe','find','threadId','Reply','2405680LhvRUK','values','body','parse','setConfig','disposeWithMe','pipe','514443agNRPH','thread-comment-data-source.config','length','_injector','root','comment','YYYY/MM/DD\x20HH:mm','format','881832oQKkWm','type','UNRECOGNIZED','_threadCommentDataSourceService','/reply','Solved','error','user','delete','map','parentId','OpenOrReOpen','size','pluginName','resolveComment','syncUpdateMutationToColla','555786SGvEPL','users','_threadCommentModel','4wnPMWb','solved','2109879SUUfJo','/delete','comments','getMemberID','payload','COMMENT','content','Add','replyId','saveCommentToSnapshot','_httpService','userID','30YNbdZV','20zYbwHw','_init','/universer-api/comment/unit/','slice','commentUpdate$','getOwnPropertyDescriptor','requireSession','_configService','forEach','getUnit','get','createTimestamp','/edit','_userService','/list','addUser','code','filter','updateComment','Solve','unitId','3499769flzpoA','Edit','_initUserSync','_config','reply','addComment','personId','customRanges','_commentService','symbol','_sessionService'];_0x1759=function(){return _0x11eeab;};return _0x1759();}function _0x348c(_0xed6c39,_0x2d8b83){const _0x175945=_0x1759();return _0x348c=function(_0x348c47,_0x57a9d6){_0x348c47=_0x348c47-0x1ea;let _0x50be2c=_0x175945[_0x348c47];return _0x50be2c;},_0x348c(_0xed6c39,_0x2d8b83);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x398f42=>(_0x398f42[_0x398f42[_0x20c3f7(0x1fb)]=0x0]='OpenOrReOpen',_0x398f42[_0x398f42[_0x20c3f7(0x1f5)]=0x1]=_0x20c3f7(0x1f5),_0x398f42[_0x398f42[_0x20c3f7(0x1f2)]=-0x1]=_0x20c3f7(0x1f2),_0x398f42))(I||{}),v=(_0x1fdd40=>(_0x1fdd40[_0x1fdd40[_0x20c3f7(0x23a)]=0x0]=_0x20c3f7(0x23a),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x20c)]=0x1]=_0x20c3f7(0x20c),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x243)]=0x2]=_0x20c3f7(0x243),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x228)]=0x3]=_0x20c3f7(0x228),_0x1fdd40[_0x1fdd40['Delete']=0x4]='Delete',_0x1fdd40[_0x1fdd40[_0x20c3f7(0x225)]=0x5]=_0x20c3f7(0x225),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x1f2)]=-0x1]='UNRECOGNIZED',_0x1fdd40))(v||{});const D=_0x5d2ebb=>_0x5c03d1(new Date(+_0x5d2ebb))[_0x20c3f7(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x22db6f,_0x2f044e)=>{const _0x12b9dc=_0x20c3f7,_0x2c5545=_0x22db6f['get'](_0x283f92),_0x17cff5=_0x22db6f[_0x12b9dc(0x21c)](_0x417b86);_0x2f044e['forEach'](_0x1084fc=>{const _0x51f7f8=_0x12b9dc;_0x2c5545[_0x51f7f8(0x23f)](_0x1084fc)&&_0x2f044e[_0x51f7f8(0x1f8)](_0x1084fc);}),_0x2f044e[_0x12b9dc(0x1fc)]&&(await _0x17cff5[_0x12b9dc(0x21c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2f044e]}}))[_0x12b9dc(0x246)]['users']['forEach'](_0x1da854=>{const _0x1d306e=_0x12b9dc;_0x1da854&&_0x2c5545[_0x1d306e(0x221)](_0x1da854);});};var K=Object[_0x20c3f7(0x217)],V=(_0x161bd4,_0x4d581f,_0x5662c1,_0x707f8e)=>{const _0x1862bf=_0x20c3f7;for(var _0xa21cbf=_0x707f8e>0x1?void 0x0:_0x707f8e?K(_0x4d581f,_0x5662c1):_0x4d581f,_0xe94021=_0x161bd4[_0x1862bf(0x1ea)]-0x1,_0x45b1b7;_0xe94021>=0x0;_0xe94021--)(_0x45b1b7=_0x161bd4[_0xe94021])&&(_0xa21cbf=_0x45b1b7(_0xa21cbf)||_0xa21cbf);return _0xa21cbf;},p=(_0x763387,_0x12c8e1)=>(_0x859521,_0x4093e7)=>_0x12c8e1(_0x859521,_0x4093e7,_0x763387);let S=class extends _0x4a3ac7{constructor(_0x268f94,_0x304a08,_0x18edc3,_0x2b0526){const _0x48277b=_0x20c3f7;super(),this[_0x48277b(0x22f)]=_0x268f94,this['_threadCommentModel']=_0x304a08,this[_0x48277b(0x21f)]=_0x18edc3,this[_0x48277b(0x1eb)]=_0x2b0526,this[_0x48277b(0x213)](),this[_0x48277b(0x229)]();}[_0x20c3f7(0x229)](){const _0x5036e2=_0x20c3f7;this[_0x5036e2(0x249)](this[_0x5036e2(0x202)][_0x5036e2(0x216)][_0x5036e2(0x24a)](_0x2facfe(0x10))['subscribe'](_0x5ddd9d=>{const _0x161876=_0x5036e2,_0x17451f=new Set();_0x5ddd9d[_0x161876(0x21a)](_0x2e372f=>{const _0x3c59ff=_0x161876;switch(_0x2e372f[_0x3c59ff(0x1f1)]){case _0x3c59ff(0x23d):{const _0xd8551f=_0x2e372f[_0x3c59ff(0x209)][_0x3c59ff(0x22d)];_0x17451f[_0x3c59ff(0x23d)](_0xd8551f);break;}}}),B(this['_injector'],_0x17451f);}));}[_0x20c3f7(0x213)](){const _0x42080=_0x20c3f7;this['disposeWithMe'](this[_0x42080(0x22f)][_0x42080(0x216)][_0x42080(0x240)](async _0x3fc319=>{const _0x1e81f0=_0x42080;var _0x17933c,_0x29bc56,_0xd14a48,_0x3ec092;const _0x51bb7e=(_0x17933c=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x14113a=>_0x14113a[_0x1e81f0(0x242)]===_0x3fc319[_0x1e81f0(0x242)]))==null?void 0x0:_0x17933c['root'];if(!_0x51bb7e)return;const {unitId:_0x298f94,subUnitId:_0x2591e7}=_0x51bb7e;switch(_0x3fc319[_0x1e81f0(0x1f7)]&&this[_0x1e81f0(0x21f)][_0x1e81f0(0x221)](_0x3fc319['user']),_0x3fc319[_0x1e81f0(0x1f1)]){case v[_0x1e81f0(0x20c)]:break;case v[_0x1e81f0(0x243)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x22c)](_0x298f94,_0x2591e7,{'unitId':_0x298f94,'subUnitId':_0x2591e7,'ref':'','id':_0x3fc319['replyId'],'dT':D(+_0x3fc319[_0x1e81f0(0x21d)]),'threadId':_0x3fc319['threadId'],'personId':(_0xd14a48=(_0x29bc56=_0x3fc319['user'])==null?void 0x0:_0x29bc56[_0x1e81f0(0x210)])!=null?_0xd14a48:_0x3fc319[_0x1e81f0(0x237)],'text':JSON[_0x1e81f0(0x247)](_0x3fc319[_0x1e81f0(0x20b)]),'parentId':_0x51bb7e['id']});break;}case v['Delete']:{const _0x4f7301=this[_0x1e81f0(0x202)]['getComment'](_0x298f94,_0x2591e7,_0x3fc319['replyId']);_0x4f7301&&_0x4f7301[_0x1e81f0(0x1fa)]&&this[_0x1e81f0(0x202)][_0x1e81f0(0x23c)](_0x298f94,_0x2591e7,_0x3fc319[_0x1e81f0(0x20d)]);break;}case v[_0x1e81f0(0x228)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x224)](_0x298f94,_0x2591e7,{'commentId':_0x3fc319['replyId'],'text':JSON['parse'](_0x3fc319[_0x1e81f0(0x20b)])});break;}case v[_0x1e81f0(0x225)]:{const _0x457853=(_0x3ec092=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x4b18dc=>_0x4b18dc[_0x1e81f0(0x242)]===_0x3fc319['threadId']))==null?void 0x0:_0x3ec092[_0x1e81f0(0x1ec)];_0x457853&&this[_0x1e81f0(0x202)]['resolveComment'](_0x298f94,_0x2591e7,_0x457853['id'],_0x3fc319[_0x1e81f0(0x204)]===I[_0x1e81f0(0x1f5)]);break;}}}));}};S=V([p(0x0,_0x390cd4(_0x393445)),p(0x1,_0x390cd4(_0x386f71)),p(0x2,_0x390cd4(_0x283f92)),p(0x3,_0x390cd4(_0x279b5f))],S);const z=_0x20c3f7(0x24c),M={};var k=Object[_0x20c3f7(0x217)],Q=(_0x5ac6a4,_0x25e3e6,_0x198873,_0x4fb1dd)=>{const _0xfcc63b=_0x20c3f7;for(var _0x51af79=_0x4fb1dd>0x1?void 0x0:_0x4fb1dd?k(_0x25e3e6,_0x198873):_0x25e3e6,_0xda4edd=_0x5ac6a4[_0xfcc63b(0x1ea)]-0x1,_0xa8634e;_0xda4edd>=0x0;_0xda4edd--)(_0xa8634e=_0x5ac6a4[_0xda4edd])&&(_0x51af79=_0xa8634e(_0x51af79)||_0x51af79);return _0x51af79;},_=(_0x3a6470,_0x45d0fa)=>(_0x112011,_0x28b1e4)=>_0x45d0fa(_0x112011,_0x28b1e4,_0x3a6470);function X(_0x11808b,_0x77de00){const _0x1aa43e=_0x20c3f7,_0x2f7e6c=_0x11808b[_0x1aa43e(0x232)][0x0];return{..._0x77de00,'id':_0x2f7e6c[_0x1aa43e(0x20d)],'resolved':_0x11808b[_0x1aa43e(0x204)]===0x1,'dT':D(_0x2f7e6c[_0x1aa43e(0x21d)]),'personId':_0x2f7e6c[_0x1aa43e(0x237)],'threadId':_0x2f7e6c[_0x1aa43e(0x242)]};}function ee(_0x1acc51,_0x46f0e4,_0x679100){const _0x427b3b=_0x20c3f7;var _0x4dd982,_0x22b615;if(((_0x22b615=(_0x4dd982=_0x1acc51==null?void 0x0:_0x1acc51[_0x427b3b(0x232)])==null?void 0x0:_0x4dd982[_0x427b3b(0x1ea)])!=null?_0x22b615:0x0)>0x0){const _0x46846d=(_0x2b8871,_0x2c89bc)=>({'id':_0x2b8871[_0x427b3b(0x20d)],'threadId':_0x2b8871[_0x427b3b(0x242)],'dT':D(_0x2b8871[_0x427b3b(0x21d)]),'personId':_0x2b8871['userId'],'resolved':_0x1acc51[_0x427b3b(0x204)]===I[_0x427b3b(0x1f5)],'unitId':_0x46f0e4,'subUnitId':_0x679100,'text':JSON[_0x427b3b(0x247)](_0x2b8871[_0x427b3b(0x20b)]),'parentId':_0x2c89bc}),_0xcd4119=_0x46846d(_0x1acc51[_0x427b3b(0x232)][0x0]);return{..._0xcd4119,'children':_0x1acc51['replies'][_0x427b3b(0x215)](0x1)['map'](_0x28e41d=>_0x46846d(_0x28e41d,_0xcd4119['id']))};}return null;}let f=class{constructor(_0x40b2f2,_0x5b2288,_0x521195,_0x30b4e2){const _0x51ccdc=_0x20c3f7;this['_httpService']=_0x40b2f2,this[_0x51ccdc(0x21f)]=_0x5b2288,this[_0x51ccdc(0x231)]=_0x521195,this[_0x51ccdc(0x1eb)]=_0x30b4e2;}async[_0x20c3f7(0x22c)](_0x2340db){const _0x2b392e=_0x20c3f7;var _0x252db5,_0x3e35e1;const {parentId:_0x44bbc4,unitId:_0x292cdc,text:_0x52e0a6,threadId:_0x4575d7}=_0x2340db,_0x1c0ee5=(_0x3e35e1=(_0x252db5=_0x52e0a6['customRanges'])==null?void 0x0:_0x252db5[_0x2b392e(0x223)](_0x2d3786=>_0x2d3786[_0x2b392e(0x234)]===_0x4d3601['COMMENT'])[_0x2b392e(0x1f9)](_0x309a1e=>_0x309a1e[_0x2b392e(0x23b)]))!=null?_0x3e35e1:[],_0x2dce12=JSON['stringify'](_0x52e0a6),_0xf5198e=(await this['_sessionService']['requireSession'](_0x292cdc))['getMemberID']();if(_0x44bbc4){const _0x1fea10={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5,'threadId':_0x4575d7},_0x49e346=(await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+_0x2b392e(0x1f4),{'body':_0x1fea10}))[_0x2b392e(0x246)][_0x2b392e(0x22b)];return{..._0x2340db,'id':_0x49e346[_0x2b392e(0x20d)],'dT':_0x5c03d1(+_0x49e346['createTimestamp'])[_0x2b392e(0x1ef)](_0x2b392e(0x1ee)),'personId':_0x49e346[_0x2b392e(0x237)]};}else{const _0x346782={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5},_0x380452=await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+'/add',{'body':_0x346782});return X(_0x380452[_0x2b392e(0x246)][_0x2b392e(0x1ed)],_0x2340db);}}async['updateComment'](_0x270acc){const _0x2f1f1b=_0x20c3f7;var _0x299165,_0x25977b;const {text:_0x18bd7e,unitId:_0x112b10}=_0x270acc,_0x4e5a99=(_0x25977b=(_0x299165=_0x18bd7e[_0x2f1f1b(0x22e)])==null?void 0x0:_0x299165[_0x2f1f1b(0x223)](_0x41507a=>_0x41507a[_0x2f1f1b(0x234)]===_0x4d3601[_0x2f1f1b(0x20a)])[_0x2f1f1b(0x1f9)](_0x333709=>_0x333709[_0x2f1f1b(0x23b)]))!=null?_0x25977b:[],_0x4d04c8=JSON[_0x2f1f1b(0x23e)](_0x18bd7e),_0x21ce33=_0x270acc[_0x2f1f1b(0x242)],_0x50c99d=_0x270acc['id'],_0x1ce0eb={'memberId':(await this['_sessionService'][_0x2f1f1b(0x218)](_0x112b10))[_0x2f1f1b(0x208)](),'unitId':_0x112b10,'threadId':_0x21ce33,'mention':_0x4e5a99,'content':_0x4d04c8,'replyId':_0x50c99d},_0x387bf1=await this[_0x2f1f1b(0x20f)][_0x2f1f1b(0x239)](_0x2f1f1b(0x214)+_0x112b10+_0x2f1f1b(0x21e),{'body':_0x1ce0eb});return!_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)]||_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)][_0x2f1f1b(0x222)]===0x1;}async[_0x20c3f7(0x1fe)](_0x2d1bb3){const _0x309ed8=_0x20c3f7,{unitId:_0x5d570f}=_0x2d1bb3,_0x18f8f=_0x2d1bb3[_0x309ed8(0x242)],_0x2339b6={'memberId':this[_0x309ed8(0x21f)]['getCurrentUser']()[_0x309ed8(0x210)],'unitId':_0x5d570f,'threadId':_0x18f8f,'solved':_0x2d1bb3['resolved']?I[_0x309ed8(0x1f5)]:I[_0x309ed8(0x1fb)]},_0x3f8c8d=await this['_httpService'][_0x309ed8(0x239)]('/universer-api/comment/unit/'+_0x5d570f+'/solved',{'body':_0x2339b6});return!_0x3f8c8d[_0x309ed8(0x246)]['error']||_0x3f8c8d[_0x309ed8(0x246)]['error']['code']===0x1;}async[_0x20c3f7(0x23c)](_0x1d22f2,_0x1f743b,_0x5f57ef,_0x45540e){const _0x349599=_0x20c3f7,_0x441b65={'memberId':(await this[_0x349599(0x231)][_0x349599(0x218)](_0x1d22f2))[_0x349599(0x208)](),'threadId':_0x5f57ef,'replyId':_0x45540e,'unitId':_0x1d22f2},_0x2c28d7=await this[_0x349599(0x20f)]['post'](_0x349599(0x214)+_0x1d22f2+_0x349599(0x206),{'body':_0x441b65});return!_0x2c28d7[_0x349599(0x246)][_0x349599(0x1f6)]||_0x2c28d7[_0x349599(0x246)]['error'][_0x349599(0x222)]===0x1;}async[_0x20c3f7(0x238)](_0x277d49,_0x4cdcaf,_0x10167d){const _0x36c9cf=_0x20c3f7,_0x2cdf58={'unitId':_0x277d49,'threadId':_0x10167d},_0x51a490=await this[_0x36c9cf(0x20f)][_0x36c9cf(0x239)](_0x36c9cf(0x214)+_0x277d49+_0x36c9cf(0x220),{'body':_0x2cdf58}),_0x585dbe=_0x10167d[_0x36c9cf(0x1f9)](_0x3f6f3b=>ee(_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x207)][_0x3f6f3b],_0x277d49,_0x4cdcaf))[_0x36c9cf(0x223)](Boolean);return Object[_0x36c9cf(0x245)](_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x201)])['forEach'](_0x14e9db=>{const _0x4761ec=_0x36c9cf;this[_0x4761ec(0x21f)][_0x4761ec(0x221)](_0x14e9db);}),_0x585dbe;}[_0x20c3f7(0x20e)](_0x29361d){const _0x1d6e20=_0x20c3f7;return{'id':_0x29361d['id'],'threadId':_0x29361d[_0x1d6e20(0x242)],'ref':_0x29361d['ref']};}};f=Q([_(0x0,_0x390cd4(_0x417b86)),_(0x1,_0x390cd4(_0x283f92)),_(0x2,_0x390cd4(_0x7d48d8)),_(0x3,_0x390cd4(_0x279b5f))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x50f1b8,_0x275d2e,_0x4d7b10,_0x1f7b73)=>{const _0x43989d=_0x20c3f7;for(var _0x217dca=_0x1f7b73>0x1?void 0x0:_0x1f7b73?re(_0x275d2e,_0x4d7b10):_0x275d2e,_0x15c101=_0x50f1b8[_0x43989d(0x1ea)]-0x1,_0x599d2b;_0x15c101>=0x0;_0x15c101--)(_0x599d2b=_0x50f1b8[_0x15c101])&&(_0x217dca=_0x599d2b(_0x217dca)||_0x217dca);return _0x217dca;},N=(_0x3ce9ed,_0x1d5d2f)=>(_0x289dbc,_0x1957b6)=>_0x1d5d2f(_0x289dbc,_0x1957b6,_0x3ce9ed);let g=class extends _0x4a3ac7{constructor(_0x272b55,_0x10f6a8){const _0x405383=_0x20c3f7;super(),this['_threadCommentDataSourceService']=_0x272b55,this[_0x405383(0x236)]=_0x10f6a8,this['_initDataSource']();}['_initDataSource'](){const _0x15413d=_0x20c3f7;this[_0x15413d(0x1f3)][_0x15413d(0x233)]=this[_0x15413d(0x236)],this[_0x15413d(0x1f3)][_0x15413d(0x1ff)]=!0x1;}};g=te([N(0x0,_0x59a2d9),N(0x1,_0x390cd4(f))],g);var se=Object['defineProperty'],oe=Object[_0x20c3f7(0x217)],ne=(_0x25cd94,_0x185bd8,_0x32270e)=>_0x185bd8 in _0x25cd94?se(_0x25cd94,_0x185bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32270e}):_0x25cd94[_0x185bd8]=_0x32270e,ie=(_0x3110aa,_0x4aeb01,_0x42dd1f,_0xb9c540)=>{const _0x5cc3ef=_0x20c3f7;for(var _0x52bf8f=_0xb9c540>0x1?void 0x0:_0xb9c540?oe(_0x4aeb01,_0x42dd1f):_0x4aeb01,_0x18f52=_0x3110aa[_0x5cc3ef(0x1ea)]-0x1,_0x1da036;_0x18f52>=0x0;_0x18f52--)(_0x1da036=_0x3110aa[_0x18f52])&&(_0x52bf8f=_0x1da036(_0x52bf8f)||_0x52bf8f);return _0x52bf8f;},w=(_0x32123e,_0x48b2fe)=>(_0x1cb524,_0x1a77b3)=>_0x48b2fe(_0x1cb524,_0x1a77b3,_0x32123e),$=(_0x3bfa92,_0xc2b19a,_0x478f3e)=>ne(_0x3bfa92,typeof _0xc2b19a!=_0x20c3f7(0x230)?_0xc2b19a+'':_0xc2b19a,_0x478f3e);let b=class extends _0x5d9d3b{constructor(_0x39616b=M,_0xcd8679,_0x30b76a){const _0x2467e1=_0x20c3f7;super(),this[_0x2467e1(0x22a)]=_0x39616b,this['_injector']=_0xcd8679,this[_0x2467e1(0x219)]=_0x30b76a;const {..._0x486380}=_0x1c4ddb({},M,this[_0x2467e1(0x22a)]);this[_0x2467e1(0x219)][_0x2467e1(0x248)](z,_0x486380);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5bdc67=>{const _0x1327b2=_0x348c;this[_0x1327b2(0x1eb)]['add'](_0x5bdc67);});}['onReady'](){const _0x54912f=_0x20c3f7;this[_0x54912f(0x1eb)]['get'](g),this[_0x54912f(0x1eb)][_0x54912f(0x21c)](S);}};$(b,_0x20c3f7(0x1fd),W),$(b,_0x20c3f7(0x1f1),_0x3f06dc['UNIVER_UNKNOWN']),b=ie([_0x3b7dec(_0x11263e,_0x1cc7c5,_0x469578),w(0x1,_0x390cd4(_0x279b5f)),w(0x2,_0xa6d69f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4c386b=_0x4dee;(function(_0x57fd8a,_0x48aa77){const _0x30643a=_0x4dee,_0x1171ab=_0x57fd8a();while(!![]){try{const _0x5dfee9=-parseInt(_0x30643a(0x117))/0x1+-parseInt(_0x30643a(0x10a))/0x2+parseInt(_0x30643a(0x103))/0x3*(parseInt(_0x30643a(0xe9))/0x4)+-parseInt(_0x30643a(0x10c))/0x5+parseInt(_0x30643a(0xe6))/0x6*(parseInt(_0x30643a(0x13a))/0x7)+-parseInt(_0x30643a(0x112))/0x8*(parseInt(_0x30643a(0xf7))/0x9)+parseInt(_0x30643a(0x124))/0xa;if(_0x5dfee9===_0x48aa77)break;else _0x1171ab['push'](_0x1171ab['shift']());}catch(_0x5b0cd7){_0x1171ab['push'](_0x1171ab['shift']());}}}(_0x51eb,0x81956));import{CommentService as _0x557342,CollaborationSessionService as _0xfb639f,UniverCollaborationClientPlugin as _0x308f6a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x295138}from'@univerjs-pro/license';import{dayjs as _0x386800,UserManagerService as _0x2d6bfb,Inject as _0x5df9cf,Injector as _0x366845,Disposable as _0x2cf2a6,CustomRangeType as _0x3596ea,UniverInstanceType as _0x2a606d,DependentOn as _0x335001,IConfigService as _0x48a89e,Plugin as _0x449e4b,merge as _0xfbe004}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2680ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x277e92,IThreadCommentDataSourceService as _0x14ca09}from'@univerjs/thread-comment';import{bufferTime as _0x2fb0ee}from'rxjs';import{HTTPService as _0x135e04}from'@univerjs/network';const W=_0x4c386b(0x136);var I=(_0x4e5b48=>(_0x4e5b48[_0x4e5b48[_0x4c386b(0x101)]=0x0]=_0x4c386b(0x101),_0x4e5b48[_0x4e5b48[_0x4c386b(0x10f)]=0x1]=_0x4c386b(0x10f),_0x4e5b48[_0x4e5b48[_0x4c386b(0xfd)]=-0x1]='UNRECOGNIZED',_0x4e5b48))(I||{}),v=(_0x7f0e7e=>(_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x11f)]=0x0]=_0x4c386b(0x11f),_0x7f0e7e[_0x7f0e7e['Add']=0x1]=_0x4c386b(0xdc),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf4)]=0x2]='Reply',_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x13f)]=0x3]=_0x4c386b(0x13f),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0xf9)]=0x4]=_0x4c386b(0xf9),_0x7f0e7e[_0x7f0e7e[_0x4c386b(0x111)]=0x5]=_0x4c386b(0x111),_0x7f0e7e[_0x7f0e7e['UNRECOGNIZED']=-0x1]=_0x4c386b(0xfd),_0x7f0e7e))(v||{});const D=_0x4579c4=>_0x386800(new Date(+_0x4579c4))[_0x4c386b(0x119)](_0x4c386b(0xe5)),B=async(_0x151372,_0x472bbe)=>{const _0x3c76e5=_0x4c386b,_0x1b13a5=_0x151372[_0x3c76e5(0x11a)](_0x2d6bfb),_0x1f2ac9=_0x151372['get'](_0x135e04);_0x472bbe[_0x3c76e5(0x133)](_0x1fd6b5=>{const _0x1adac6=_0x3c76e5;_0x1b13a5[_0x1adac6(0x10e)](_0x1fd6b5)&&_0x472bbe[_0x1adac6(0x10b)](_0x1fd6b5);}),_0x472bbe[_0x3c76e5(0x11b)]&&(await _0x1f2ac9[_0x3c76e5(0x11a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x472bbe]}}))['body']['users']['forEach'](_0x5c993e=>{_0x5c993e&&_0x1b13a5['addUser'](_0x5c993e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1f2a83,_0xa3729c,_0x32b37d,_0x3d45ed)=>{const _0x45988d=_0x4c386b;for(var _0x2fe9b3=_0x3d45ed>0x1?void 0x0:_0x3d45ed?K(_0xa3729c,_0x32b37d):_0xa3729c,_0x45350d=_0x1f2a83[_0x45988d(0x100)]-0x1,_0x516c64;_0x45350d>=0x0;_0x45350d--)(_0x516c64=_0x1f2a83[_0x45350d])&&(_0x2fe9b3=_0x516c64(_0x2fe9b3)||_0x2fe9b3);return _0x2fe9b3;},p=(_0x5e9155,_0x4ddd73)=>(_0x4ee9a8,_0x40939c)=>_0x4ddd73(_0x4ee9a8,_0x40939c,_0x5e9155);let S=class extends _0x2cf2a6{constructor(_0x2b4079,_0x12f057,_0x52694f,_0x2ca9f0){const _0x2d0650=_0x4c386b;super(),this['_commentService']=_0x2b4079,this[_0x2d0650(0x12e)]=_0x12f057,this[_0x2d0650(0xfc)]=_0x52694f,this[_0x2d0650(0xf6)]=_0x2ca9f0,this[_0x2d0650(0x12f)](),this[_0x2d0650(0x106)]();}[_0x4c386b(0x106)](){const _0x2b70e9=_0x4c386b;this[_0x2b70e9(0x11c)](this[_0x2b70e9(0x12e)][_0x2b70e9(0x107)][_0x2b70e9(0x13c)](_0x2fb0ee(0x10))[_0x2b70e9(0x12c)](_0xf653fe=>{const _0x181918=_0x2b70e9,_0x32f2b3=new Set();_0xf653fe['forEach'](_0x1e7d8d=>{const _0x218316=_0x4dee;switch(_0x1e7d8d[_0x218316(0x127)]){case'add':{const _0x53b211=_0x1e7d8d[_0x218316(0xec)][_0x218316(0x118)];_0x32f2b3[_0x218316(0x142)](_0x53b211);break;}}}),B(this[_0x181918(0xf6)],_0x32f2b3);}));}['_init'](){const _0x4121c9=_0x4c386b;this[_0x4121c9(0x11c)](this[_0x4121c9(0xfa)][_0x4121c9(0x107)][_0x4121c9(0x12c)](async _0x1b4d67=>{const _0x7b8ee3=_0x4121c9;var _0x18355b,_0x513aa8,_0x374449,_0x362e91;const _0x4e774b=(_0x18355b=this['_threadCommentModel']['getUnit'](_0x1b4d67[_0x7b8ee3(0x132)])['find'](_0x3e0849=>_0x3e0849[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x18355b[_0x7b8ee3(0xf2)];if(!_0x4e774b)return;const {unitId:_0x1478e8,subUnitId:_0x16cc52}=_0x4e774b;switch(_0x1b4d67[_0x7b8ee3(0xe0)]&&this['_userService'][_0x7b8ee3(0xe7)](_0x1b4d67[_0x7b8ee3(0xe0)]),_0x1b4d67[_0x7b8ee3(0x127)]){case v[_0x7b8ee3(0xdc)]:break;case v['Reply']:{this['_threadCommentModel'][_0x7b8ee3(0x110)](_0x1478e8,_0x16cc52,{'unitId':_0x1478e8,'subUnitId':_0x16cc52,'ref':'','id':_0x1b4d67[_0x7b8ee3(0x128)],'dT':D(+_0x1b4d67[_0x7b8ee3(0x116)]),'threadId':_0x1b4d67[_0x7b8ee3(0x126)],'personId':(_0x374449=(_0x513aa8=_0x1b4d67[_0x7b8ee3(0xe0)])==null?void 0x0:_0x513aa8['userID'])!=null?_0x374449:_0x1b4d67[_0x7b8ee3(0x12a)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67['content']),'parentId':_0x4e774b['id']});break;}case v[_0x7b8ee3(0xf9)]:{const _0x3d54b2=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xde)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);_0x3d54b2&&_0x3d54b2[_0x7b8ee3(0xf1)]&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xfe)](_0x1478e8,_0x16cc52,_0x1b4d67[_0x7b8ee3(0x128)]);break;}case v[_0x7b8ee3(0x13f)]:{this['_threadCommentModel'][_0x7b8ee3(0x130)](_0x1478e8,_0x16cc52,{'commentId':_0x1b4d67[_0x7b8ee3(0x128)],'text':JSON[_0x7b8ee3(0x125)](_0x1b4d67[_0x7b8ee3(0x102)])});break;}case v[_0x7b8ee3(0x111)]:{const _0x5abdfc=(_0x362e91=this[_0x7b8ee3(0x12e)][_0x7b8ee3(0xed)](_0x1b4d67[_0x7b8ee3(0x132)])[_0x7b8ee3(0xe4)](_0x5dd4b8=>_0x5dd4b8[_0x7b8ee3(0x126)]===_0x1b4d67[_0x7b8ee3(0x126)]))==null?void 0x0:_0x362e91['root'];_0x5abdfc&&this[_0x7b8ee3(0x12e)][_0x7b8ee3(0x141)](_0x1478e8,_0x16cc52,_0x5abdfc['id'],_0x1b4d67[_0x7b8ee3(0x11e)]===I[_0x7b8ee3(0x10f)]);break;}}}));}};function _0x4dee(_0x72d138,_0x34f66d){const _0x51eb80=_0x51eb();return _0x4dee=function(_0x4dee1f,_0xa9f298){_0x4dee1f=_0x4dee1f-0xdc;let _0x318b8e=_0x51eb80[_0x4dee1f];return _0x318b8e;},_0x4dee(_0x72d138,_0x34f66d);}S=V([p(0x0,_0x5df9cf(_0x557342)),p(0x1,_0x5df9cf(_0x277e92)),p(0x2,_0x5df9cf(_0x2d6bfb)),p(0x3,_0x5df9cf(_0x366845))],S);const z=_0x4c386b(0x120),M={};var k=Object[_0x4c386b(0xdf)],Q=(_0x1dcd15,_0x3ad3e5,_0x12b5d6,_0x3d0907)=>{const _0x1267a8=_0x4c386b;for(var _0x400c65=_0x3d0907>0x1?void 0x0:_0x3d0907?k(_0x3ad3e5,_0x12b5d6):_0x3ad3e5,_0x13a468=_0x1dcd15[_0x1267a8(0x100)]-0x1,_0x549d8f;_0x13a468>=0x0;_0x13a468--)(_0x549d8f=_0x1dcd15[_0x13a468])&&(_0x400c65=_0x549d8f(_0x400c65)||_0x400c65);return _0x400c65;},_=(_0x45bdc9,_0x3998c6)=>(_0xc4775,_0x28f405)=>_0x3998c6(_0xc4775,_0x28f405,_0x45bdc9);function X(_0x7cb4e6,_0x4daa2a){const _0x2dadc2=_0x4c386b,_0x54ef10=_0x7cb4e6[_0x2dadc2(0x135)][0x0];return{..._0x4daa2a,'id':_0x54ef10[_0x2dadc2(0x128)],'resolved':_0x7cb4e6[_0x2dadc2(0x11e)]===0x1,'dT':D(_0x54ef10[_0x2dadc2(0x116)]),'personId':_0x54ef10['userId'],'threadId':_0x54ef10[_0x2dadc2(0x126)]};}function ee(_0x97973e,_0x4eec2e,_0x1ed8db){const _0x585081=_0x4c386b;var _0x387e6c,_0x2b625b;if(((_0x2b625b=(_0x387e6c=_0x97973e==null?void 0x0:_0x97973e[_0x585081(0x135)])==null?void 0x0:_0x387e6c[_0x585081(0x100)])!=null?_0x2b625b:0x0)>0x0){const _0x3f1644=(_0x248b0c,_0x380295)=>({'id':_0x248b0c[_0x585081(0x128)],'threadId':_0x248b0c[_0x585081(0x126)],'dT':D(_0x248b0c['createTimestamp']),'personId':_0x248b0c[_0x585081(0x12a)],'resolved':_0x97973e['solved']===I[_0x585081(0x10f)],'unitId':_0x4eec2e,'subUnitId':_0x1ed8db,'text':JSON[_0x585081(0x125)](_0x248b0c[_0x585081(0x102)]),'parentId':_0x380295}),_0x104c1f=_0x3f1644(_0x97973e[_0x585081(0x135)][0x0]);return{..._0x104c1f,'children':_0x97973e[_0x585081(0x135)][_0x585081(0xfb)](0x1)[_0x585081(0xf8)](_0x1734e5=>_0x3f1644(_0x1734e5,_0x104c1f['id']))};}return null;}let f=class{constructor(_0x56f777,_0x2401af,_0x54ebd0,_0x2f4216){const _0x206103=_0x4c386b;this[_0x206103(0x123)]=_0x56f777,this['_userService']=_0x2401af,this[_0x206103(0x140)]=_0x54ebd0,this[_0x206103(0xf6)]=_0x2f4216;}async[_0x4c386b(0x110)](_0x2f1641){const _0x29e658=_0x4c386b;var _0xd18f35,_0x177461;const {parentId:_0x5003cd,unitId:_0x47a4a9,text:_0x380d4b,threadId:_0x5058c0}=_0x2f1641,_0x3b5011=(_0x177461=(_0xd18f35=_0x380d4b[_0x29e658(0xee)])==null?void 0x0:_0xd18f35[_0x29e658(0xdd)](_0x22f5d1=>_0x22f5d1[_0x29e658(0x108)]===_0x3596ea['COMMENT'])['map'](_0x37d606=>_0x37d606['rangeId']))!=null?_0x177461:[],_0x4c66ce=JSON[_0x29e658(0x12d)](_0x380d4b),_0x985712=(await this[_0x29e658(0x140)][_0x29e658(0x114)](_0x47a4a9))[_0x29e658(0x109)]();if(_0x5003cd){const _0x1f72ef={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011,'threadId':_0x5058c0},_0x5a92c6=(await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0xe3),{'body':_0x1f72ef}))[_0x29e658(0x129)][_0x29e658(0xf5)];return{..._0x2f1641,'id':_0x5a92c6['replyId'],'dT':_0x386800(+_0x5a92c6[_0x29e658(0x116)])[_0x29e658(0x119)](_0x29e658(0xe5)),'personId':_0x5a92c6['userId']};}else{const _0x4d8b5e={'memberId':_0x985712,'unitId':_0x47a4a9,'content':_0x4c66ce,'mention':_0x3b5011},_0x3eecc0=await this[_0x29e658(0x123)][_0x29e658(0x115)](_0x29e658(0xe8)+_0x47a4a9+_0x29e658(0x10d),{'body':_0x4d8b5e});return X(_0x3eecc0[_0x29e658(0x129)][_0x29e658(0x105)],_0x2f1641);}}async[_0x4c386b(0x130)](_0x6b1ff0){const _0xede77=_0x4c386b;var _0xfa6d02,_0x7abad5;const {text:_0x1d1359,unitId:_0x18f6b0}=_0x6b1ff0,_0x1ef9f5=(_0x7abad5=(_0xfa6d02=_0x1d1359[_0xede77(0xee)])==null?void 0x0:_0xfa6d02[_0xede77(0xdd)](_0x4f2917=>_0x4f2917[_0xede77(0x108)]===_0x3596ea['COMMENT'])[_0xede77(0xf8)](_0x1bd702=>_0x1bd702[_0xede77(0xf0)]))!=null?_0x7abad5:[],_0x85fbcb=JSON['stringify'](_0x1d1359),_0x586508=_0x6b1ff0[_0xede77(0x126)],_0x139876=_0x6b1ff0['id'],_0x41d304={'memberId':(await this['_sessionService'][_0xede77(0x114)](_0x18f6b0))[_0xede77(0x109)](),'unitId':_0x18f6b0,'threadId':_0x586508,'mention':_0x1ef9f5,'content':_0x85fbcb,'replyId':_0x139876},_0x58f33c=await this['_httpService'][_0xede77(0x115)](_0xede77(0xe8)+_0x18f6b0+_0xede77(0xf3),{'body':_0x41d304});return!_0x58f33c[_0xede77(0x129)][_0xede77(0x122)]||_0x58f33c[_0xede77(0x129)][_0xede77(0x122)][_0xede77(0xeb)]===0x1;}async[_0x4c386b(0x141)](_0x2e18d6){const _0x189f40=_0x4c386b,{unitId:_0x59f1ea}=_0x2e18d6,_0x4b4b32=_0x2e18d6[_0x189f40(0x126)],_0x5c8b45={'memberId':this['_userService'][_0x189f40(0x13b)]()[_0x189f40(0x12b)],'unitId':_0x59f1ea,'threadId':_0x4b4b32,'solved':_0x2e18d6['resolved']?I[_0x189f40(0x10f)]:I['OpenOrReOpen']},_0x3b5ca6=await this[_0x189f40(0x123)][_0x189f40(0x115)]('/universer-api/comment/unit/'+_0x59f1ea+'/solved',{'body':_0x5c8b45});return!_0x3b5ca6[_0x189f40(0x129)]['error']||_0x3b5ca6[_0x189f40(0x129)]['error'][_0x189f40(0xeb)]===0x1;}async[_0x4c386b(0xfe)](_0x55a318,_0x1d7f89,_0x57da0f,_0x1f6080){const _0x48f581=_0x4c386b,_0x114565={'memberId':(await this[_0x48f581(0x140)]['requireSession'](_0x55a318))[_0x48f581(0x109)](),'threadId':_0x57da0f,'replyId':_0x1f6080,'unitId':_0x55a318},_0x412a0a=await this['_httpService'][_0x48f581(0x115)](_0x48f581(0xe8)+_0x55a318+_0x48f581(0x13e),{'body':_0x114565});return!_0x412a0a[_0x48f581(0x129)]['error']||_0x412a0a[_0x48f581(0x129)][_0x48f581(0x122)][_0x48f581(0xeb)]===0x1;}async[_0x4c386b(0x104)](_0x56c76f,_0xed8875,_0x517f33){const _0x546ea5=_0x4c386b,_0x15c93e={'unitId':_0x56c76f,'threadId':_0x517f33},_0x1a715d=await this[_0x546ea5(0x123)][_0x546ea5(0x115)](_0x546ea5(0xe8)+_0x56c76f+'/list',{'body':_0x15c93e}),_0x34cc2c=_0x517f33[_0x546ea5(0xf8)](_0x3b24a0=>ee(_0x1a715d['body'][_0x546ea5(0xff)][_0x3b24a0],_0x56c76f,_0xed8875))[_0x546ea5(0xdd)](Boolean);return Object[_0x546ea5(0x137)](_0x1a715d[_0x546ea5(0x129)][_0x546ea5(0x11d)])[_0x546ea5(0x133)](_0x84f9fc=>{const _0x4ee4c6=_0x546ea5;this[_0x4ee4c6(0xfc)][_0x4ee4c6(0xe7)](_0x84f9fc);}),_0x34cc2c;}['saveCommentToSnapshot'](_0x2eb497){const _0x229f5c=_0x4c386b;return{'id':_0x2eb497['id'],'threadId':_0x2eb497[_0x229f5c(0x126)],'ref':_0x2eb497[_0x229f5c(0xe2)]};}};f=Q([_(0x0,_0x5df9cf(_0x135e04)),_(0x1,_0x5df9cf(_0x2d6bfb)),_(0x2,_0x5df9cf(_0xfb639f)),_(0x3,_0x5df9cf(_0x366845))],f);function _0x51eb(){const _0x45239f=['_initUserSync','commentUpdate$','rangeType','getMemberID','642480GKohPC','delete','3501355IejjYN','/add','getUser','Solved','addComment','Solve','9928IndejH','pluginName','requireSession','post','createTimestamp','278267EuUymt','personId','format','get','size','disposeWithMe','users','solved','Unknown','thread-comment-data-source.config','_configService','error','_httpService','6364550NGNurC','parse','threadId','type','replyId','body','userId','userID','subscribe','stringify','_threadCommentModel','_init','updateComment','UNIVER_UNKNOWN','unitId','forEach','syncUpdateMutationToColla','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','onReady','onStarting','7vjKFZU','getCurrentUser','pipe','_initDataSource','/delete','Edit','_sessionService','resolveComment','add','Add','filter','getComment','getOwnPropertyDescriptor','user','defineProperty','ref','/reply','find','YYYY/MM/DD\x20HH:mm','2848722boPpBw','addUser','/universer-api/comment/unit/','4uOXOXy','_config','code','payload','getUnit','customRanges','_threadCommentDataSourceService','rangeId','parentId','root','/edit','Reply','reply','_injector','1674VRKktY','map','Delete','_commentService','slice','_userService','UNRECOGNIZED','deleteComment','comments','length','OpenOrReOpen','content','2850408AilNxk','listComments','comment'];_0x51eb=function(){return _0x45239f;};return _0x51eb();}var re=Object['getOwnPropertyDescriptor'],te=(_0x29f780,_0x17ac51,_0x227c71,_0x9142da)=>{const _0x4c1417=_0x4c386b;for(var _0x4cdf62=_0x9142da>0x1?void 0x0:_0x9142da?re(_0x17ac51,_0x227c71):_0x17ac51,_0x592e48=_0x29f780[_0x4c1417(0x100)]-0x1,_0xafaac0;_0x592e48>=0x0;_0x592e48--)(_0xafaac0=_0x29f780[_0x592e48])&&(_0x4cdf62=_0xafaac0(_0x4cdf62)||_0x4cdf62);return _0x4cdf62;},N=(_0x593e02,_0xf03de6)=>(_0x2e4d79,_0x5bf062)=>_0xf03de6(_0x2e4d79,_0x5bf062,_0x593e02);let g=class extends _0x2cf2a6{constructor(_0x5c0094,_0xc013d9){const _0x9991dd=_0x4c386b;super(),this[_0x9991dd(0xef)]=_0x5c0094,this['_threadCommentDataSource']=_0xc013d9,this[_0x9991dd(0x13d)]();}[_0x4c386b(0x13d)](){const _0x232b66=_0x4c386b;this[_0x232b66(0xef)]['dataSource']=this['_threadCommentDataSource'],this[_0x232b66(0xef)][_0x232b66(0x134)]=!0x1;}};g=te([N(0x0,_0x14ca09),N(0x1,_0x5df9cf(f))],g);var se=Object[_0x4c386b(0xe1)],oe=Object[_0x4c386b(0xdf)],ne=(_0xbe5566,_0x34011f,_0x56fa3c)=>_0x34011f in _0xbe5566?se(_0xbe5566,_0x34011f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56fa3c}):_0xbe5566[_0x34011f]=_0x56fa3c,ie=(_0x3ec7f2,_0x502340,_0x5d02ca,_0x149f89)=>{for(var _0xe23d6e=_0x149f89>0x1?void 0x0:_0x149f89?oe(_0x502340,_0x5d02ca):_0x502340,_0x2c4c55=_0x3ec7f2['length']-0x1,_0x43dadb;_0x2c4c55>=0x0;_0x2c4c55--)(_0x43dadb=_0x3ec7f2[_0x2c4c55])&&(_0xe23d6e=_0x43dadb(_0xe23d6e)||_0xe23d6e);return _0xe23d6e;},w=(_0x1a7be5,_0x58392f)=>(_0x207bfc,_0x1eff2d)=>_0x58392f(_0x207bfc,_0x1eff2d,_0x1a7be5),$=(_0x3adf8b,_0x1369f5,_0x5d3284)=>ne(_0x3adf8b,typeof _0x1369f5!='symbol'?_0x1369f5+'':_0x1369f5,_0x5d3284);let b=class extends _0x449e4b{constructor(_0x2b942c=M,_0x523c88,_0x80ea4d){const _0x48385e=_0x4c386b;super(),this[_0x48385e(0xea)]=_0x2b942c,this[_0x48385e(0xf6)]=_0x523c88,this[_0x48385e(0x121)]=_0x80ea4d;const {..._0x45d3b2}=_0xfbe004({},M,this[_0x48385e(0xea)]);this['_configService']['setConfig'](z,_0x45d3b2);}[_0x4c386b(0x139)](){const _0x33ae6d=_0x4c386b;[[f],[g],[S]][_0x33ae6d(0x133)](_0x66a21a=>{const _0x491afd=_0x33ae6d;this[_0x491afd(0xf6)][_0x491afd(0x142)](_0x66a21a);});}[_0x4c386b(0x138)](){const _0x202216=_0x4c386b;this[_0x202216(0xf6)][_0x202216(0x11a)](g),this[_0x202216(0xf6)][_0x202216(0x11a)](S);}};$(b,_0x4c386b(0x113),W),$(b,_0x4c386b(0x127),_0x2a606d[_0x4c386b(0x131)]),b=ie([_0x335001(_0x2680ad,_0x308f6a,_0x295138),w(0x1,_0x5df9cf(_0x366845)),w(0x2,_0x48a89e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x19d002,_0x552841){const _0x3fa2ab=_0xffa4,_0x2bdd03=_0x19d002();while(!![]){try{const _0x3be997=parseInt(_0x3fa2ab(0x1b3))/0x1+-parseInt(_0x3fa2ab(0x1d9))/0x2*(parseInt(_0x3fa2ab(0x1a2))/0x3)+-parseInt(_0x3fa2ab(0x1e0))/0x4*(parseInt(_0x3fa2ab(0x1a7))/0x5)+-parseInt(_0x3fa2ab(0x197))/0x6+-parseInt(_0x3fa2ab(0x1c3))/0x7*(parseInt(_0x3fa2ab(0x1da))/0x8)+parseInt(_0x3fa2ab(0x1d8))/0x9+parseInt(_0x3fa2ab(0x169))/0xa*(parseInt(_0x3fa2ab(0x1a0))/0xb);if(_0x3be997===_0x552841)break;else _0x2bdd03['push'](_0x2bdd03['shift']());}catch(_0xc36fa6){_0x2bdd03['push'](_0x2bdd03['shift']());}}}(_0x800a,0xc6850),function(_0x26dfdc,_0x2e87e2){const _0x43493e=_0xffa4;typeof exports=='object'&&typeof module<'u'?_0x2e87e2(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x43493e(0x165)]?define(['exports',_0x43493e(0x1b4),'@univerjs-pro/license',_0x43493e(0x195),_0x43493e(0x161),_0x43493e(0x1a8),'rxjs',_0x43493e(0x1d5)],_0x2e87e2):(_0x26dfdc=typeof globalThis<'u'?globalThis:_0x26dfdc||self,_0x2e87e2(_0x26dfdc[_0x43493e(0x1b6)]={},_0x26dfdc[_0x43493e(0x190)],_0x26dfdc[_0x43493e(0x16b)],_0x26dfdc[_0x43493e(0x1bc)],_0x26dfdc[_0x43493e(0x1c8)],_0x26dfdc[_0x43493e(0x15d)],_0x26dfdc[_0x43493e(0x19f)],_0x26dfdc[_0x43493e(0x19e)]));}(this,function(_0x234d07,_0x3328cd,_0x13cd89,_0x54b890,_0x4dc3e5,_0x12d312,_0x42a5e8,_0x548bea){'use strict';const _0x4632ab=_0xffa4;const _0x5d64bb='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x148b4a=(_0x459648=>(_0x459648[_0x459648[_0x4632ab(0x1b2)]=0x0]=_0x4632ab(0x1b2),_0x459648[_0x459648[_0x4632ab(0x159)]=0x1]=_0x4632ab(0x159),_0x459648[_0x459648['UNRECOGNIZED']=-0x1]=_0x4632ab(0x1cb),_0x459648))(_0x148b4a||{}),_0x4d83a5=(_0x4527b3=>(_0x4527b3[_0x4527b3[_0x4632ab(0x17d)]=0x0]='Unknown',_0x4527b3[_0x4527b3[_0x4632ab(0x1ca)]=0x1]=_0x4632ab(0x1ca),_0x4527b3[_0x4527b3[_0x4632ab(0x1a6)]=0x2]=_0x4632ab(0x1a6),_0x4527b3[_0x4527b3[_0x4632ab(0x194)]=0x3]=_0x4632ab(0x194),_0x4527b3[_0x4527b3[_0x4632ab(0x163)]=0x4]=_0x4632ab(0x163),_0x4527b3[_0x4527b3['Solve']=0x5]=_0x4632ab(0x18b),_0x4527b3[_0x4527b3[_0x4632ab(0x1cb)]=-0x1]=_0x4632ab(0x1cb),_0x4527b3))(_0x4d83a5||{});const _0xa0b0bf=_0x5ec99d=>_0x54b890[_0x4632ab(0x19d)](new Date(+_0x5ec99d))[_0x4632ab(0x1a4)]('YYYY/MM/DD\x20HH:mm'),_0x2ad00d=async(_0x4d8e6d,_0x32c854)=>{const _0x347924=_0x4632ab,_0x2e7309=_0x4d8e6d[_0x347924(0x16e)](_0x54b890['UserManagerService']),_0xb7ff89=_0x4d8e6d['get'](_0x548bea[_0x347924(0x15f)]);_0x32c854[_0x347924(0x1a5)](_0x3c4263=>{const _0x127db1=_0x347924;_0x2e7309[_0x127db1(0x1d1)](_0x3c4263)&&_0x32c854[_0x127db1(0x184)](_0x3c4263);}),_0x32c854[_0x347924(0x1a3)]&&(await _0xb7ff89[_0x347924(0x16e)](_0x347924(0x15b),{'params':{'userIDs':[..._0x32c854]}}))[_0x347924(0x16f)][_0x347924(0x1c7)][_0x347924(0x1a5)](_0xc877f2=>{const _0x514038=_0x347924;_0xc877f2&&_0x2e7309[_0x514038(0x15e)](_0xc877f2);});};var _0x331f38=Object['getOwnPropertyDescriptor'],_0x1caeb4=(_0x4e0cd6,_0x512c72,_0x3f4e91,_0x3bea53)=>{const _0x33e2dc=_0x4632ab;for(var _0x78d5d=_0x3bea53>0x1?void 0x0:_0x3bea53?_0x331f38(_0x512c72,_0x3f4e91):_0x512c72,_0x192f08=_0x4e0cd6[_0x33e2dc(0x1ac)]-0x1,_0xfaa109;_0x192f08>=0x0;_0x192f08--)(_0xfaa109=_0x4e0cd6[_0x192f08])&&(_0x78d5d=_0xfaa109(_0x78d5d)||_0x78d5d);return _0x78d5d;},_0x171e33=(_0x51b308,_0x256aa0)=>(_0x333acc,_0x3274a1)=>_0x256aa0(_0x333acc,_0x3274a1,_0x51b308);let _0x2d267e=class extends _0x54b890[_0x4632ab(0x186)]{constructor(_0x1d7504,_0x9271da,_0x213ba9,_0x5d3a85){const _0x43227b=_0x4632ab;super(),this[_0x43227b(0x182)]=_0x1d7504,this[_0x43227b(0x185)]=_0x9271da,this[_0x43227b(0x1b1)]=_0x213ba9,this['_injector']=_0x5d3a85,this[_0x43227b(0x1dd)](),this['_initUserSync']();}[_0x4632ab(0x180)](){const _0x545379=_0x4632ab;this[_0x545379(0x1ad)](this[_0x545379(0x185)][_0x545379(0x1d2)][_0x545379(0x1b8)](_0x42a5e8[_0x545379(0x1a9)](0x10))[_0x545379(0x189)](_0x4eac68=>{const _0x557f90=_0x545379,_0x1c4d27=new Set();_0x4eac68['forEach'](_0x57383e=>{const _0x2f385b=_0xffa4;switch(_0x57383e[_0x2f385b(0x1c2)]){case _0x2f385b(0x173):{const _0xebb964=_0x57383e[_0x2f385b(0x167)][_0x2f385b(0x191)];_0x1c4d27[_0x2f385b(0x173)](_0xebb964);break;}}}),_0x2ad00d(this[_0x557f90(0x157)],_0x1c4d27);}));}[_0x4632ab(0x1dd)](){const _0x55d3ae=_0x4632ab;this[_0x55d3ae(0x1ad)](this[_0x55d3ae(0x182)][_0x55d3ae(0x1d2)]['subscribe'](async _0x65ffc3=>{const _0x20f088=_0x55d3ae;var _0x59ee04,_0x1eb77f,_0x5d0a02,_0x341eb4;const _0x23ebc7=(_0x59ee04=this[_0x20f088(0x185)][_0x20f088(0x172)](_0x65ffc3[_0x20f088(0x1ab)])[_0x20f088(0x17a)](_0x11fde8=>_0x11fde8[_0x20f088(0x1de)]===_0x65ffc3[_0x20f088(0x1de)]))==null?void 0x0:_0x59ee04[_0x20f088(0x168)];if(!_0x23ebc7)return;const {unitId:_0x25c9be,subUnitId:_0x245b8d}=_0x23ebc7;switch(_0x65ffc3[_0x20f088(0x16a)]&&this[_0x20f088(0x1b1)][_0x20f088(0x15e)](_0x65ffc3[_0x20f088(0x16a)]),_0x65ffc3[_0x20f088(0x1c2)]){case _0x4d83a5['Add']:break;case _0x4d83a5[_0x20f088(0x1a6)]:{this[_0x20f088(0x185)]['addComment'](_0x25c9be,_0x245b8d,{'unitId':_0x25c9be,'subUnitId':_0x245b8d,'ref':'','id':_0x65ffc3[_0x20f088(0x176)],'dT':_0xa0b0bf(+_0x65ffc3[_0x20f088(0x174)]),'threadId':_0x65ffc3['threadId'],'personId':(_0x5d0a02=(_0x1eb77f=_0x65ffc3['user'])==null?void 0x0:_0x1eb77f[_0x20f088(0x1dc)])!=null?_0x5d0a02:_0x65ffc3[_0x20f088(0x18e)],'text':JSON[_0x20f088(0x18d)](_0x65ffc3[_0x20f088(0x1a1)]),'parentId':_0x23ebc7['id']});break;}case _0x4d83a5[_0x20f088(0x163)]:{const _0x23dfd4=this[_0x20f088(0x185)][_0x20f088(0x1c6)](_0x25c9be,_0x245b8d,_0x65ffc3[_0x20f088(0x176)]);_0x23dfd4&&_0x23dfd4[_0x20f088(0x171)]&&this[_0x20f088(0x185)][_0x20f088(0x17f)](_0x25c9be,_0x245b8d,_0x65ffc3[_0x20f088(0x176)]);break;}case _0x4d83a5[_0x20f088(0x194)]:{this[_0x20f088(0x185)][_0x20f088(0x1d7)](_0x25c9be,_0x245b8d,{'commentId':_0x65ffc3[_0x20f088(0x176)],'text':JSON[_0x20f088(0x18d)](_0x65ffc3[_0x20f088(0x1a1)])});break;}case _0x4d83a5[_0x20f088(0x18b)]:{const _0x1beafe=(_0x341eb4=this[_0x20f088(0x185)][_0x20f088(0x172)](_0x65ffc3[_0x20f088(0x1ab)])[_0x20f088(0x17a)](_0x4587a8=>_0x4587a8['threadId']===_0x65ffc3[_0x20f088(0x1de)]))==null?void 0x0:_0x341eb4[_0x20f088(0x168)];_0x1beafe&&this[_0x20f088(0x185)][_0x20f088(0x1c9)](_0x25c9be,_0x245b8d,_0x1beafe['id'],_0x65ffc3[_0x20f088(0x17b)]===_0x148b4a[_0x20f088(0x159)]);break;}}}));}};_0x2d267e=_0x1caeb4([_0x171e33(0x0,_0x54b890[_0x4632ab(0x158)](_0x3328cd[_0x4632ab(0x181)])),_0x171e33(0x1,_0x54b890[_0x4632ab(0x158)](_0x12d312[_0x4632ab(0x1d0)])),_0x171e33(0x2,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x198)])),_0x171e33(0x3,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x1be)]))],_0x2d267e);const _0x5ad00c=_0x4632ab(0x1aa),_0xd1723f={};var _0x39afa4=Object[_0x4632ab(0x19c)],_0x5dcbd7=(_0x496287,_0x381fa7,_0x12096e,_0x179eb9)=>{const _0x129253=_0x4632ab;for(var _0x298a9c=_0x179eb9>0x1?void 0x0:_0x179eb9?_0x39afa4(_0x381fa7,_0x12096e):_0x381fa7,_0x35f666=_0x496287[_0x129253(0x1ac)]-0x1,_0x5a4d9f;_0x35f666>=0x0;_0x35f666--)(_0x5a4d9f=_0x496287[_0x35f666])&&(_0x298a9c=_0x5a4d9f(_0x298a9c)||_0x298a9c);return _0x298a9c;},_0x5270f6=(_0x158b33,_0x5807ce)=>(_0x39919f,_0x59069d)=>_0x5807ce(_0x39919f,_0x59069d,_0x158b33);function _0x40beb2(_0xf6eba7,_0x4114d9){const _0x357d7f=_0x4632ab,_0x54ea23=_0xf6eba7[_0x357d7f(0x18f)][0x0];return{..._0x4114d9,'id':_0x54ea23[_0x357d7f(0x176)],'resolved':_0xf6eba7[_0x357d7f(0x17b)]===0x1,'dT':_0xa0b0bf(_0x54ea23['createTimestamp']),'personId':_0x54ea23[_0x357d7f(0x18e)],'threadId':_0x54ea23[_0x357d7f(0x1de)]};}function _0x19dca9(_0x26378c,_0x2adc02,_0xa66525){const _0x28527f=_0x4632ab;var _0x2837dd,_0x3aa33f;if(((_0x3aa33f=(_0x2837dd=_0x26378c==null?void 0x0:_0x26378c[_0x28527f(0x18f)])==null?void 0x0:_0x2837dd[_0x28527f(0x1ac)])!=null?_0x3aa33f:0x0)>0x0){const _0x23de83=(_0x21fcf3,_0x5b2234)=>({'id':_0x21fcf3[_0x28527f(0x176)],'threadId':_0x21fcf3['threadId'],'dT':_0xa0b0bf(_0x21fcf3[_0x28527f(0x174)]),'personId':_0x21fcf3[_0x28527f(0x18e)],'resolved':_0x26378c['solved']===_0x148b4a[_0x28527f(0x159)],'unitId':_0x2adc02,'subUnitId':_0xa66525,'text':JSON['parse'](_0x21fcf3[_0x28527f(0x1a1)]),'parentId':_0x5b2234}),_0x42eab2=_0x23de83(_0x26378c[_0x28527f(0x18f)][0x0]);return{..._0x42eab2,'children':_0x26378c[_0x28527f(0x18f)]['slice'](0x1)[_0x28527f(0x16d)](_0xd855ab=>_0x23de83(_0xd855ab,_0x42eab2['id']))};}return null;}let _0x1b3a48=class{constructor(_0x3ce4fc,_0x67c1ef,_0x2cdaef,_0x31a61e){const _0x146da4=_0x4632ab;this[_0x146da4(0x179)]=_0x3ce4fc,this[_0x146da4(0x1b1)]=_0x67c1ef,this[_0x146da4(0x17c)]=_0x2cdaef,this[_0x146da4(0x157)]=_0x31a61e;}async[_0x4632ab(0x188)](_0x5f4c70){const _0x229413=_0x4632ab;var _0x512059,_0x5f0941;const {parentId:_0x48bdab,unitId:_0xee1cea,text:_0x19c05a,threadId:_0xcc7b86}=_0x5f4c70,_0x568da3=(_0x5f0941=(_0x512059=_0x19c05a['customRanges'])==null?void 0x0:_0x512059['filter'](_0x51e056=>_0x51e056[_0x229413(0x1b7)]===_0x54b890['CustomRangeType'][_0x229413(0x175)])[_0x229413(0x16d)](_0x205517=>_0x205517[_0x229413(0x170)]))!=null?_0x5f0941:[],_0x2991e3=JSON[_0x229413(0x1ce)](_0x19c05a),_0x382e47=(await this['_sessionService'][_0x229413(0x1ae)](_0xee1cea))[_0x229413(0x1c1)]();if(_0x48bdab){const _0x15a4ef={'memberId':_0x382e47,'unitId':_0xee1cea,'content':_0x2991e3,'mention':_0x568da3,'threadId':_0xcc7b86},_0x3ea18a=(await this[_0x229413(0x179)][_0x229413(0x19b)]('/universer-api/comment/unit/'+_0xee1cea+_0x229413(0x1cf),{'body':_0x15a4ef}))[_0x229413(0x16f)][_0x229413(0x1db)];return{..._0x5f4c70,'id':_0x3ea18a[_0x229413(0x176)],'dT':_0x54b890[_0x229413(0x19d)](+_0x3ea18a[_0x229413(0x174)])[_0x229413(0x1a4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3ea18a[_0x229413(0x18e)]};}else{const _0x1c50d4={'memberId':_0x382e47,'unitId':_0xee1cea,'content':_0x2991e3,'mention':_0x568da3},_0x325021=await this[_0x229413(0x179)][_0x229413(0x19b)](_0x229413(0x1b5)+_0xee1cea+_0x229413(0x1b9),{'body':_0x1c50d4});return _0x40beb2(_0x325021[_0x229413(0x16f)][_0x229413(0x16c)],_0x5f4c70);}}async[_0x4632ab(0x1d7)](_0x23fd1a){const _0x93ef5f=_0x4632ab;var _0x50a7ff,_0x3e509d;const {text:_0x2ef6ea,unitId:_0x105929}=_0x23fd1a,_0x413ef4=(_0x3e509d=(_0x50a7ff=_0x2ef6ea['customRanges'])==null?void 0x0:_0x50a7ff[_0x93ef5f(0x15c)](_0x5b06b1=>_0x5b06b1['rangeType']===_0x54b890[_0x93ef5f(0x1cd)]['COMMENT'])[_0x93ef5f(0x16d)](_0x342e92=>_0x342e92[_0x93ef5f(0x170)]))!=null?_0x3e509d:[],_0x5ebbe2=JSON[_0x93ef5f(0x1ce)](_0x2ef6ea),_0x3563d5=_0x23fd1a['threadId'],_0x18125b=_0x23fd1a['id'],_0x36fe2a={'memberId':(await this[_0x93ef5f(0x17c)]['requireSession'](_0x105929))['getMemberID'](),'unitId':_0x105929,'threadId':_0x3563d5,'mention':_0x413ef4,'content':_0x5ebbe2,'replyId':_0x18125b},_0x16a34a=await this[_0x93ef5f(0x179)][_0x93ef5f(0x19b)]('/universer-api/comment/unit/'+_0x105929+_0x93ef5f(0x15a),{'body':_0x36fe2a});return!_0x16a34a['body']['error']||_0x16a34a[_0x93ef5f(0x16f)]['error']['code']===0x1;}async['resolveComment'](_0x581741){const _0x3d69c7=_0x4632ab,{unitId:_0x50ddf5}=_0x581741,_0x46e70c=_0x581741[_0x3d69c7(0x1de)],_0x137d63={'memberId':this[_0x3d69c7(0x1b1)]['getCurrentUser']()[_0x3d69c7(0x1dc)],'unitId':_0x50ddf5,'threadId':_0x46e70c,'solved':_0x581741[_0x3d69c7(0x187)]?_0x148b4a['Solved']:_0x148b4a[_0x3d69c7(0x1b2)]},_0x42a8ed=await this['_httpService'][_0x3d69c7(0x19b)](_0x3d69c7(0x1b5)+_0x50ddf5+_0x3d69c7(0x1ba),{'body':_0x137d63});return!_0x42a8ed[_0x3d69c7(0x16f)][_0x3d69c7(0x18c)]||_0x42a8ed[_0x3d69c7(0x16f)]['error'][_0x3d69c7(0x160)]===0x1;}async[_0x4632ab(0x17f)](_0x324a2c,_0xbe77a9,_0x4f4955,_0x241466){const _0x568465=_0x4632ab,_0x32d606={'memberId':(await this[_0x568465(0x17c)][_0x568465(0x1ae)](_0x324a2c))['getMemberID'](),'threadId':_0x4f4955,'replyId':_0x241466,'unitId':_0x324a2c},_0x3ffbf0=await this['_httpService'][_0x568465(0x19b)](_0x568465(0x1b5)+_0x324a2c+'/delete',{'body':_0x32d606});return!_0x3ffbf0[_0x568465(0x16f)]['error']||_0x3ffbf0['body'][_0x568465(0x18c)][_0x568465(0x160)]===0x1;}async['listComments'](_0x372569,_0x20318b,_0x22e3f3){const _0x1d5291=_0x4632ab,_0x33a12b={'unitId':_0x372569,'threadId':_0x22e3f3},_0x1e4b64=await this[_0x1d5291(0x179)][_0x1d5291(0x19b)]('/universer-api/comment/unit/'+_0x372569+_0x1d5291(0x183),{'body':_0x33a12b}),_0x4e5478=_0x22e3f3[_0x1d5291(0x16d)](_0xb89f13=>_0x19dca9(_0x1e4b64[_0x1d5291(0x16f)][_0x1d5291(0x177)][_0xb89f13],_0x372569,_0x20318b))[_0x1d5291(0x15c)](Boolean);return Object[_0x1d5291(0x1c0)](_0x1e4b64[_0x1d5291(0x16f)][_0x1d5291(0x1c7)])[_0x1d5291(0x1a5)](_0x5c1a79=>{const _0x1b1220=_0x1d5291;this[_0x1b1220(0x1b1)][_0x1b1220(0x15e)](_0x5c1a79);}),_0x4e5478;}[_0x4632ab(0x19a)](_0x538649){const _0x234965=_0x4632ab;return{'id':_0x538649['id'],'threadId':_0x538649['threadId'],'ref':_0x538649[_0x234965(0x1b0)]};}};_0x1b3a48=_0x5dcbd7([_0x5270f6(0x0,_0x54b890['Inject'](_0x548bea[_0x4632ab(0x15f)])),_0x5270f6(0x1,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x198)])),_0x5270f6(0x2,_0x54b890[_0x4632ab(0x158)](_0x3328cd[_0x4632ab(0x1bb)])),_0x5270f6(0x3,_0x54b890[_0x4632ab(0x158)](_0x54b890['Injector']))],_0x1b3a48);var _0x1d90a2=Object[_0x4632ab(0x19c)],_0x5a69e1=(_0x3c912c,_0x41adc4,_0x1e5d6e,_0x22044e)=>{const _0x5bf16e=_0x4632ab;for(var _0x46b794=_0x22044e>0x1?void 0x0:_0x22044e?_0x1d90a2(_0x41adc4,_0x1e5d6e):_0x41adc4,_0x13fc0f=_0x3c912c[_0x5bf16e(0x1ac)]-0x1,_0x5585dd;_0x13fc0f>=0x0;_0x13fc0f--)(_0x5585dd=_0x3c912c[_0x13fc0f])&&(_0x46b794=_0x5585dd(_0x46b794)||_0x46b794);return _0x46b794;},_0x185cc3=(_0x18ddc1,_0x410b8c)=>(_0x26345f,_0xb14a7b)=>_0x410b8c(_0x26345f,_0xb14a7b,_0x18ddc1);let _0x3dac20=class extends _0x54b890[_0x4632ab(0x186)]{constructor(_0x5c24b0,_0x3cbeb1){const _0x39d1e9=_0x4632ab;super(),this[_0x39d1e9(0x192)]=_0x5c24b0,this[_0x39d1e9(0x1c5)]=_0x3cbeb1,this[_0x39d1e9(0x1c4)]();}[_0x4632ab(0x1c4)](){const _0x4743f2=_0x4632ab;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x4743f2(0x192)][_0x4743f2(0x178)]=!0x1;}};_0x3dac20=_0x5a69e1([_0x185cc3(0x0,_0x12d312[_0x4632ab(0x162)]),_0x185cc3(0x1,_0x54b890[_0x4632ab(0x158)](_0x1b3a48))],_0x3dac20);var _0x332a30=Object['defineProperty'],_0x79a404=Object[_0x4632ab(0x19c)],_0x488182=(_0x29fb81,_0x54e2c3,_0x49b75a)=>_0x54e2c3 in _0x29fb81?_0x332a30(_0x29fb81,_0x54e2c3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49b75a}):_0x29fb81[_0x54e2c3]=_0x49b75a,_0x33fb6f=(_0x27d19d,_0x2381ac,_0x24f38f,_0x141711)=>{for(var _0x24af7d=_0x141711>0x1?void 0x0:_0x141711?_0x79a404(_0x2381ac,_0x24f38f):_0x2381ac,_0x45864b=_0x27d19d['length']-0x1,_0x40e6bd;_0x45864b>=0x0;_0x45864b--)(_0x40e6bd=_0x27d19d[_0x45864b])&&(_0x24af7d=_0x40e6bd(_0x24af7d)||_0x24af7d);return _0x24af7d;},_0x492fed=(_0x4087ae,_0x4adc96)=>(_0x4362b9,_0x1d80cd)=>_0x4adc96(_0x4362b9,_0x1d80cd,_0x4087ae),_0x5bd2eb=(_0x1d6bb7,_0x148ccf,_0x32a070)=>_0x488182(_0x1d6bb7,typeof _0x148ccf!='symbol'?_0x148ccf+'':_0x148ccf,_0x32a070);_0x234d07[_0x4632ab(0x1bf)]=class extends _0x54b890[_0x4632ab(0x1d6)]{constructor(_0x186023=_0xd1723f,_0x1e3254,_0x2f0cef){const _0x4839a5=_0x4632ab;super(),this[_0x4839a5(0x193)]=_0x186023,this[_0x4839a5(0x157)]=_0x1e3254,this[_0x4839a5(0x1cc)]=_0x2f0cef;const {..._0xb5e471}=_0x54b890[_0x4839a5(0x199)]({},_0xd1723f,this[_0x4839a5(0x193)]);this[_0x4839a5(0x1cc)][_0x4839a5(0x1df)](_0x5ad00c,_0xb5e471);}[_0x4632ab(0x1bd)](){[[_0x1b3a48],[_0x3dac20],[_0x2d267e]]['forEach'](_0x1f5464=>{const _0x298082=_0xffa4;this['_injector'][_0x298082(0x173)](_0x1f5464);});}['onReady'](){const _0x3731c0=_0x4632ab;this['_injector'][_0x3731c0(0x16e)](_0x3dac20),this[_0x3731c0(0x157)][_0x3731c0(0x16e)](_0x2d267e);}},_0x5bd2eb(_0x234d07[_0x4632ab(0x1bf)],_0x4632ab(0x196),_0x5d64bb),_0x5bd2eb(_0x234d07['UniverThreadCommentDataSourcePlugin'],'type',_0x54b890[_0x4632ab(0x1d4)][_0x4632ab(0x18a)]),_0x234d07[_0x4632ab(0x1bf)]=_0x33fb6f([_0x54b890[_0x4632ab(0x1af)](_0x4dc3e5[_0x4632ab(0x166)],_0x3328cd['UniverCollaborationClientPlugin'],_0x13cd89[_0x4632ab(0x1d3)]),_0x492fed(0x1,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x1be)])),_0x492fed(0x2,_0x54b890['IConfigService'])],_0x234d07['UniverThreadCommentDataSourcePlugin']),Object[_0x4632ab(0x1e1)](_0x234d07,Symbol[_0x4632ab(0x17e)],{'value':_0x4632ab(0x164)});}));function _0xffa4(_0x465abd,_0x1c2fd4){const _0x800aa5=_0x800a();return _0xffa4=function(_0xffa47f,_0x5dc7ab){_0xffa47f=_0xffa47f-0x157;let _0x5a4517=_0x800aa5[_0xffa47f];return _0x5a4517;},_0xffa4(_0x465abd,_0x1c2fd4);}function _0x800a(){const _0x598507=['saveCommentToSnapshot','post','getOwnPropertyDescriptor','dayjs','UniverNetwork','rxjs','8090269LvDbKL','content','385023gWvEmE','size','format','forEach','Reply','837245DqDumA','@univerjs/thread-comment','bufferTime','thread-comment-data-source.config','unitId','length','disposeWithMe','requireSession','DependentOn','ref','_userService','OpenOrReOpen','384165qOVdSX','@univerjs-pro/collaboration-client','/universer-api/comment/unit/','UniverProThreadCommentDatasource','rangeType','pipe','/add','/solved','CollaborationSessionService','UniverCore','onStarting','Injector','UniverThreadCommentDataSourcePlugin','values','getMemberID','type','21DvsMoR','_initDataSource','_threadCommentDataSource','getComment','users','UniverThreadCommentUi','resolveComment','Add','UNRECOGNIZED','_configService','CustomRangeType','stringify','/reply','ThreadCommentModel','getUser','commentUpdate$','UniverLicensePlugin','UniverInstanceType','@univerjs/network','Plugin','updateComment','12987441ReXgaH','2YloTJM','1877528lThlsG','reply','userID','_init','threadId','setConfig','20xNwQDA','defineProperty','_injector','Inject','Solved','/edit','/universer-api/user/list','filter','UniverThreadComment','addUser','HTTPService','code','@univerjs/thread-comment-ui','IThreadCommentDataSourceService','Delete','Module','amd','UniverThreadCommentUIPlugin','payload','root','30bSreZo','user','UniverProLicense','comment','map','get','body','rangeId','parentId','getUnit','add','createTimestamp','COMMENT','replyId','comments','syncUpdateMutationToColla','_httpService','find','solved','_sessionService','Unknown','toStringTag','deleteComment','_initUserSync','CommentService','_commentService','/list','delete','_threadCommentModel','Disposable','resolved','addComment','subscribe','UNIVER_UNKNOWN','Solve','error','parse','userId','replies','UniverProCollaborationClient','personId','_threadCommentDataSourceService','_config','Edit','@univerjs/core','pluginName','9305136fnDHwt','UserManagerService','merge'];_0x800a=function(){return _0x598507;};return _0x800a();}
1
+ function _0x2459(){const _0x57dd7e=['map','dayjs','DependentOn','stringify','/list','/universer-api/comment/unit/','UniverProLicense','comments','UniverNetwork','onReady','@univerjs/core','getUnit','parse','error','rangeId','saveCommentToSnapshot','_userService','getComment','UniverThreadCommentUIPlugin','Injector','userId','exports','getUser','listComments','COMMENT','Module','getMemberID','Delete','HTTPService','UNRECOGNIZED','slice','symbol','CommentService','/delete','_config','parentId','_sessionService','replies','rangeType','users','UNIVER_UNKNOWN','IThreadCommentDataSourceService','482386wCIDmb','_injector','post','addUser','UniverThreadCommentDataSourcePlugin','toStringTag','filter','pipe','728664kmXQMt','_commentService','thread-comment-data-source.config','resolveComment','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','values','UserManagerService','@univerjs-pro/collaboration-client','_initUserSync','@univerjs-pro/license','Solved','payload','4240313eYbUDX','root','Inject','Disposable','setConfig','_init','merge','IConfigService','_threadCommentDataSourceService','UniverProCollaborationClient','body','_httpService','customRanges','threadId','delete','_initDataSource','updateComment','comment','/universer-api/user/list','24wKIEqW','content','pluginName','/solved','ThreadCommentModel','commentUpdate$','ref','9943704QaDnSC','OpenOrReOpen','get','code','12712912JpkpRB','_threadCommentDataSource','unitId','createTimestamp','@univerjs/thread-comment-ui','getCurrentUser','amd','UniverThreadComment','Edit','defineProperty','type','UniverProThreadCommentDatasource','Add','5jPYalI','1393286aWqKXe','requireSession','add','rxjs','addComment','Solve','format','size','_threadCommentModel','forEach','_configService','CollaborationSessionService','UniverCore','user','resolved','subscribe','3917556XlHxzA','solved','syncUpdateMutationToColla','deleteComment','reply','/reply','userID','disposeWithMe','onStarting','length','getOwnPropertyDescriptor','bufferTime','Reply','find','Unknown','replyId'];_0x2459=function(){return _0x57dd7e;};return _0x2459();}function _0x5808(_0x1f92e2,_0x2a98bb){const _0x24594e=_0x2459();return _0x5808=function(_0x580833,_0x35d2d8){_0x580833=_0x580833-0x1dc;let _0x46c27a=_0x24594e[_0x580833];return _0x46c27a;},_0x5808(_0x1f92e2,_0x2a98bb);}(function(_0x3e389f,_0x19f43a){const _0x52effb=_0x5808,_0x17eb8c=_0x3e389f();while(!![]){try{const _0x15d312=-parseInt(_0x52effb(0x1f2))/0x1+-parseInt(_0x52effb(0x23c))/0x2+parseInt(_0x52effb(0x264))/0x3*(parseInt(_0x52effb(0x244))/0x4)+parseInt(_0x52effb(0x1f1))/0x5*(parseInt(_0x52effb(0x1e0))/0x6)+parseInt(_0x52effb(0x251))/0x7+-parseInt(_0x52effb(0x1e4))/0x8+parseInt(_0x52effb(0x202))/0x9;if(_0x15d312===_0x19f43a)break;else _0x17eb8c['push'](_0x17eb8c['shift']());}catch(_0x5d059e){_0x17eb8c['push'](_0x17eb8c['shift']());}}}(_0x2459,0xe38de),function(_0xe76928,_0x305acc){const _0x286e4b=_0x5808;typeof exports=='object'&&typeof module<'u'?_0x305acc(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x286e4b(0x1ea)]?define([_0x286e4b(0x227),_0x286e4b(0x24c),_0x286e4b(0x24e),_0x286e4b(0x21c),_0x286e4b(0x1e8),'@univerjs/thread-comment',_0x286e4b(0x1f5),'@univerjs/network'],_0x305acc):(_0xe76928=typeof globalThis<'u'?globalThis:_0xe76928||self,_0x305acc(_0xe76928[_0x286e4b(0x1ef)]={},_0xe76928[_0x286e4b(0x25a)],_0xe76928[_0x286e4b(0x218)],_0xe76928[_0x286e4b(0x1fe)],_0xe76928['UniverThreadCommentUi'],_0xe76928[_0x286e4b(0x1eb)],_0xe76928[_0x286e4b(0x1f5)],_0xe76928[_0x286e4b(0x21a)]));}(this,function(_0x2bb25f,_0x16a5d5,_0x49481d,_0x55170a,_0x41bf77,_0x229cda,_0x409949,_0x2ab838){'use strict';const _0x677f04=_0x5808;const _0x59e29c='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3972c1=(_0x3c7bfb=>(_0x3c7bfb[_0x3c7bfb[_0x677f04(0x1e1)]=0x0]='OpenOrReOpen',_0x3c7bfb[_0x3c7bfb['Solved']=0x1]=_0x677f04(0x24f),_0x3c7bfb[_0x3c7bfb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3c7bfb))(_0x3972c1||{}),_0x2f7755=(_0x32d046=>(_0x32d046[_0x32d046[_0x677f04(0x210)]=0x0]=_0x677f04(0x210),_0x32d046[_0x32d046['Add']=0x1]=_0x677f04(0x1f0),_0x32d046[_0x32d046[_0x677f04(0x20e)]=0x2]=_0x677f04(0x20e),_0x32d046[_0x32d046[_0x677f04(0x1ec)]=0x3]=_0x677f04(0x1ec),_0x32d046[_0x32d046[_0x677f04(0x22d)]=0x4]='Delete',_0x32d046[_0x32d046['Solve']=0x5]=_0x677f04(0x1f7),_0x32d046[_0x32d046[_0x677f04(0x22f)]=-0x1]='UNRECOGNIZED',_0x32d046))(_0x2f7755||{});const _0x5d25af=_0x1b7d3e=>_0x55170a[_0x677f04(0x213)](new Date(+_0x1b7d3e))[_0x677f04(0x1f8)](_0x677f04(0x249)),_0x1a2cf2=async(_0x3adf8b,_0x1e7fec)=>{const _0x4fc4ce=_0x677f04,_0x4a92bf=_0x3adf8b[_0x4fc4ce(0x1e2)](_0x55170a[_0x4fc4ce(0x24b)]),_0x35af33=_0x3adf8b[_0x4fc4ce(0x1e2)](_0x2ab838[_0x4fc4ce(0x22e)]);_0x1e7fec[_0x4fc4ce(0x1fb)](_0x253085=>{const _0x38cca5=_0x4fc4ce;_0x4a92bf[_0x38cca5(0x228)](_0x253085)&&_0x1e7fec[_0x38cca5(0x25f)](_0x253085);}),_0x1e7fec[_0x4fc4ce(0x1f9)]&&(await _0x35af33[_0x4fc4ce(0x1e2)](_0x4fc4ce(0x263),{'params':{'userIDs':[..._0x1e7fec]}}))['body'][_0x4fc4ce(0x239)]['forEach'](_0x43f49c=>{const _0x9ad891=_0x4fc4ce;_0x43f49c&&_0x4a92bf[_0x9ad891(0x23f)](_0x43f49c);});};var _0x357315=Object[_0x677f04(0x20c)],_0x12d80f=(_0x5238f7,_0x3ce488,_0x2e3d8d,_0x22d7be)=>{for(var _0x50c2d8=_0x22d7be>0x1?void 0x0:_0x22d7be?_0x357315(_0x3ce488,_0x2e3d8d):_0x3ce488,_0x49bc66=_0x5238f7['length']-0x1,_0x4023a7;_0x49bc66>=0x0;_0x49bc66--)(_0x4023a7=_0x5238f7[_0x49bc66])&&(_0x50c2d8=_0x4023a7(_0x50c2d8)||_0x50c2d8);return _0x50c2d8;},_0x2c2403=(_0x447b95,_0x3f051c)=>(_0x3355fb,_0x3d9e65)=>_0x3f051c(_0x3355fb,_0x3d9e65,_0x447b95);let _0x2b08e9=class extends _0x55170a[_0x677f04(0x254)]{constructor(_0xb448f8,_0x4b7434,_0x4ce51a,_0x362e02){const _0x18f46e=_0x677f04;super(),this[_0x18f46e(0x245)]=_0xb448f8,this[_0x18f46e(0x1fa)]=_0x4b7434,this[_0x18f46e(0x222)]=_0x4ce51a,this[_0x18f46e(0x23d)]=_0x362e02,this['_init'](),this['_initUserSync']();}[_0x677f04(0x24d)](){const _0x545aa1=_0x677f04;this['disposeWithMe'](this[_0x545aa1(0x1fa)][_0x545aa1(0x1de)][_0x545aa1(0x243)](_0x409949[_0x545aa1(0x20d)](0x10))[_0x545aa1(0x201)](_0x28097c=>{const _0x159ec6=_0x545aa1,_0xeb604a=new Set();_0x28097c['forEach'](_0x210b25=>{const _0x28d110=_0x5808;switch(_0x210b25[_0x28d110(0x1ee)]){case _0x28d110(0x1f4):{const _0x211fd8=_0x210b25[_0x28d110(0x250)]['personId'];_0xeb604a[_0x28d110(0x1f4)](_0x211fd8);break;}}}),_0x1a2cf2(this[_0x159ec6(0x23d)],_0xeb604a);}));}[_0x677f04(0x256)](){const _0x2b76ce=_0x677f04;this[_0x2b76ce(0x209)](this['_commentService'][_0x2b76ce(0x1de)][_0x2b76ce(0x201)](async _0x1b5af8=>{const _0x1cadd8=_0x2b76ce;var _0x505cd3,_0x9855d6,_0x3785b1,_0x531daf;const _0x30a111=(_0x505cd3=this[_0x1cadd8(0x1fa)][_0x1cadd8(0x21d)](_0x1b5af8[_0x1cadd8(0x1e6)])[_0x1cadd8(0x20f)](_0x2affdc=>_0x2affdc[_0x1cadd8(0x25e)]===_0x1b5af8[_0x1cadd8(0x25e)]))==null?void 0x0:_0x505cd3['root'];if(!_0x30a111)return;const {unitId:_0x4996ac,subUnitId:_0x36a355}=_0x30a111;switch(_0x1b5af8[_0x1cadd8(0x1ff)]&&this[_0x1cadd8(0x222)][_0x1cadd8(0x23f)](_0x1b5af8[_0x1cadd8(0x1ff)]),_0x1b5af8[_0x1cadd8(0x1ee)]){case _0x2f7755[_0x1cadd8(0x1f0)]:break;case _0x2f7755[_0x1cadd8(0x20e)]:{this[_0x1cadd8(0x1fa)][_0x1cadd8(0x1f6)](_0x4996ac,_0x36a355,{'unitId':_0x4996ac,'subUnitId':_0x36a355,'ref':'','id':_0x1b5af8[_0x1cadd8(0x211)],'dT':_0x5d25af(+_0x1b5af8[_0x1cadd8(0x1e7)]),'threadId':_0x1b5af8['threadId'],'personId':(_0x3785b1=(_0x9855d6=_0x1b5af8[_0x1cadd8(0x1ff)])==null?void 0x0:_0x9855d6[_0x1cadd8(0x208)])!=null?_0x3785b1:_0x1b5af8[_0x1cadd8(0x226)],'text':JSON[_0x1cadd8(0x21e)](_0x1b5af8[_0x1cadd8(0x265)]),'parentId':_0x30a111['id']});break;}case _0x2f7755[_0x1cadd8(0x22d)]:{const _0x4c66eb=this[_0x1cadd8(0x1fa)][_0x1cadd8(0x223)](_0x4996ac,_0x36a355,_0x1b5af8['replyId']);_0x4c66eb&&_0x4c66eb[_0x1cadd8(0x235)]&&this[_0x1cadd8(0x1fa)][_0x1cadd8(0x205)](_0x4996ac,_0x36a355,_0x1b5af8[_0x1cadd8(0x211)]);break;}case _0x2f7755[_0x1cadd8(0x1ec)]:{this[_0x1cadd8(0x1fa)][_0x1cadd8(0x261)](_0x4996ac,_0x36a355,{'commentId':_0x1b5af8[_0x1cadd8(0x211)],'text':JSON[_0x1cadd8(0x21e)](_0x1b5af8[_0x1cadd8(0x265)])});break;}case _0x2f7755[_0x1cadd8(0x1f7)]:{const _0x2dd4f5=(_0x531daf=this[_0x1cadd8(0x1fa)]['getUnit'](_0x1b5af8[_0x1cadd8(0x1e6)])[_0x1cadd8(0x20f)](_0x4a427a=>_0x4a427a['threadId']===_0x1b5af8[_0x1cadd8(0x25e)]))==null?void 0x0:_0x531daf[_0x1cadd8(0x252)];_0x2dd4f5&&this[_0x1cadd8(0x1fa)][_0x1cadd8(0x247)](_0x4996ac,_0x36a355,_0x2dd4f5['id'],_0x1b5af8[_0x1cadd8(0x203)]===_0x3972c1[_0x1cadd8(0x24f)]);break;}}}));}};_0x2b08e9=_0x12d80f([_0x2c2403(0x0,_0x55170a[_0x677f04(0x253)](_0x16a5d5[_0x677f04(0x232)])),_0x2c2403(0x1,_0x55170a[_0x677f04(0x253)](_0x229cda[_0x677f04(0x1dd)])),_0x2c2403(0x2,_0x55170a[_0x677f04(0x253)](_0x55170a['UserManagerService'])),_0x2c2403(0x3,_0x55170a[_0x677f04(0x253)](_0x55170a[_0x677f04(0x225)]))],_0x2b08e9);const _0x238f63=_0x677f04(0x246),_0x2df36f={};var _0x40d3f1=Object[_0x677f04(0x20c)],_0x172d33=(_0x190034,_0x2bd088,_0x2002c0,_0x30e9e9)=>{const _0x56bb8e=_0x677f04;for(var _0x5295b4=_0x30e9e9>0x1?void 0x0:_0x30e9e9?_0x40d3f1(_0x2bd088,_0x2002c0):_0x2bd088,_0x2bedc8=_0x190034[_0x56bb8e(0x20b)]-0x1,_0x33f639;_0x2bedc8>=0x0;_0x2bedc8--)(_0x33f639=_0x190034[_0x2bedc8])&&(_0x5295b4=_0x33f639(_0x5295b4)||_0x5295b4);return _0x5295b4;},_0x87d388=(_0x7e920d,_0x164075)=>(_0x4c0f44,_0x4f023d)=>_0x164075(_0x4c0f44,_0x4f023d,_0x7e920d);function _0x5dbb96(_0x44203e,_0x12312b){const _0x50371a=_0x677f04,_0x2be319=_0x44203e[_0x50371a(0x237)][0x0];return{..._0x12312b,'id':_0x2be319[_0x50371a(0x211)],'resolved':_0x44203e[_0x50371a(0x203)]===0x1,'dT':_0x5d25af(_0x2be319['createTimestamp']),'personId':_0x2be319['userId'],'threadId':_0x2be319['threadId']};}function _0x5bfb4c(_0x2b37bd,_0x48ea91,_0x1d97e6){const _0x3c8160=_0x677f04;var _0xd34e5f,_0x16396e;if(((_0x16396e=(_0xd34e5f=_0x2b37bd==null?void 0x0:_0x2b37bd['replies'])==null?void 0x0:_0xd34e5f[_0x3c8160(0x20b)])!=null?_0x16396e:0x0)>0x0){const _0x5eddd3=(_0x48a0e2,_0x206f72)=>({'id':_0x48a0e2[_0x3c8160(0x211)],'threadId':_0x48a0e2[_0x3c8160(0x25e)],'dT':_0x5d25af(_0x48a0e2['createTimestamp']),'personId':_0x48a0e2['userId'],'resolved':_0x2b37bd[_0x3c8160(0x203)]===_0x3972c1[_0x3c8160(0x24f)],'unitId':_0x48ea91,'subUnitId':_0x1d97e6,'text':JSON['parse'](_0x48a0e2[_0x3c8160(0x265)]),'parentId':_0x206f72}),_0x959663=_0x5eddd3(_0x2b37bd['replies'][0x0]);return{..._0x959663,'children':_0x2b37bd[_0x3c8160(0x237)][_0x3c8160(0x230)](0x1)[_0x3c8160(0x212)](_0x16cc29=>_0x5eddd3(_0x16cc29,_0x959663['id']))};}return null;}let _0x4cd70d=class{constructor(_0x4639c0,_0x27f082,_0x294e5f,_0xf8e09){const _0x406dd2=_0x677f04;this[_0x406dd2(0x25c)]=_0x4639c0,this[_0x406dd2(0x222)]=_0x27f082,this[_0x406dd2(0x236)]=_0x294e5f,this['_injector']=_0xf8e09;}async[_0x677f04(0x1f6)](_0x2ca706){const _0x4c86d6=_0x677f04;var _0x33c5e8,_0x3d5803;const {parentId:_0x2a4248,unitId:_0x31e494,text:_0x3de8c4,threadId:_0x149cb3}=_0x2ca706,_0x27257b=(_0x3d5803=(_0x33c5e8=_0x3de8c4[_0x4c86d6(0x25d)])==null?void 0x0:_0x33c5e8['filter'](_0x20e5fc=>_0x20e5fc[_0x4c86d6(0x238)]===_0x55170a['CustomRangeType'][_0x4c86d6(0x22a)])[_0x4c86d6(0x212)](_0x339925=>_0x339925[_0x4c86d6(0x220)]))!=null?_0x3d5803:[],_0x4b8d8b=JSON[_0x4c86d6(0x215)](_0x3de8c4),_0x318f6d=(await this[_0x4c86d6(0x236)]['requireSession'](_0x31e494))[_0x4c86d6(0x22c)]();if(_0x2a4248){const _0x2ff053={'memberId':_0x318f6d,'unitId':_0x31e494,'content':_0x4b8d8b,'mention':_0x27257b,'threadId':_0x149cb3},_0x116916=(await this[_0x4c86d6(0x25c)]['post'](_0x4c86d6(0x217)+_0x31e494+_0x4c86d6(0x207),{'body':_0x2ff053}))[_0x4c86d6(0x25b)][_0x4c86d6(0x206)];return{..._0x2ca706,'id':_0x116916['replyId'],'dT':_0x55170a[_0x4c86d6(0x213)](+_0x116916[_0x4c86d6(0x1e7)])[_0x4c86d6(0x1f8)](_0x4c86d6(0x249)),'personId':_0x116916[_0x4c86d6(0x226)]};}else{const _0x3dd902={'memberId':_0x318f6d,'unitId':_0x31e494,'content':_0x4b8d8b,'mention':_0x27257b},_0x29c623=await this[_0x4c86d6(0x25c)][_0x4c86d6(0x23e)](_0x4c86d6(0x217)+_0x31e494+'/add',{'body':_0x3dd902});return _0x5dbb96(_0x29c623['body'][_0x4c86d6(0x262)],_0x2ca706);}}async[_0x677f04(0x261)](_0x4c5a3e){const _0xa88396=_0x677f04;var _0x279150,_0x21be5d;const {text:_0x4403ff,unitId:_0x14742b}=_0x4c5a3e,_0x4955d9=(_0x21be5d=(_0x279150=_0x4403ff[_0xa88396(0x25d)])==null?void 0x0:_0x279150[_0xa88396(0x242)](_0x370f72=>_0x370f72[_0xa88396(0x238)]===_0x55170a['CustomRangeType']['COMMENT'])[_0xa88396(0x212)](_0x5d6ba1=>_0x5d6ba1[_0xa88396(0x220)]))!=null?_0x21be5d:[],_0x49b758=JSON[_0xa88396(0x215)](_0x4403ff),_0x5c5262=_0x4c5a3e['threadId'],_0x12add6=_0x4c5a3e['id'],_0x6dfd9e={'memberId':(await this[_0xa88396(0x236)][_0xa88396(0x1f3)](_0x14742b))[_0xa88396(0x22c)](),'unitId':_0x14742b,'threadId':_0x5c5262,'mention':_0x4955d9,'content':_0x49b758,'replyId':_0x12add6},_0x2c43f6=await this['_httpService'][_0xa88396(0x23e)]('/universer-api/comment/unit/'+_0x14742b+'/edit',{'body':_0x6dfd9e});return!_0x2c43f6[_0xa88396(0x25b)]['error']||_0x2c43f6[_0xa88396(0x25b)][_0xa88396(0x21f)][_0xa88396(0x1e3)]===0x1;}async[_0x677f04(0x247)](_0x5b1aa1){const _0x1cf1cf=_0x677f04,{unitId:_0x38a473}=_0x5b1aa1,_0x3a80a6=_0x5b1aa1[_0x1cf1cf(0x25e)],_0x1f5045={'memberId':this[_0x1cf1cf(0x222)][_0x1cf1cf(0x1e9)]()['userID'],'unitId':_0x38a473,'threadId':_0x3a80a6,'solved':_0x5b1aa1[_0x1cf1cf(0x200)]?_0x3972c1[_0x1cf1cf(0x24f)]:_0x3972c1[_0x1cf1cf(0x1e1)]},_0x356e64=await this[_0x1cf1cf(0x25c)][_0x1cf1cf(0x23e)]('/universer-api/comment/unit/'+_0x38a473+_0x1cf1cf(0x1dc),{'body':_0x1f5045});return!_0x356e64[_0x1cf1cf(0x25b)][_0x1cf1cf(0x21f)]||_0x356e64['body']['error'][_0x1cf1cf(0x1e3)]===0x1;}async['deleteComment'](_0x3cea75,_0x256790,_0x351a00,_0x5cb5fb){const _0x4267ea=_0x677f04,_0x172919={'memberId':(await this[_0x4267ea(0x236)][_0x4267ea(0x1f3)](_0x3cea75))[_0x4267ea(0x22c)](),'threadId':_0x351a00,'replyId':_0x5cb5fb,'unitId':_0x3cea75},_0x5fcc9a=await this[_0x4267ea(0x25c)][_0x4267ea(0x23e)](_0x4267ea(0x217)+_0x3cea75+_0x4267ea(0x233),{'body':_0x172919});return!_0x5fcc9a[_0x4267ea(0x25b)][_0x4267ea(0x21f)]||_0x5fcc9a[_0x4267ea(0x25b)][_0x4267ea(0x21f)][_0x4267ea(0x1e3)]===0x1;}async[_0x677f04(0x229)](_0x1c8cb8,_0x395aca,_0x1b75e8){const _0x34de5e=_0x677f04,_0x3bcc8d={'unitId':_0x1c8cb8,'threadId':_0x1b75e8},_0x451d20=await this[_0x34de5e(0x25c)][_0x34de5e(0x23e)](_0x34de5e(0x217)+_0x1c8cb8+_0x34de5e(0x216),{'body':_0x3bcc8d}),_0x28749b=_0x1b75e8[_0x34de5e(0x212)](_0x56f9b8=>_0x5bfb4c(_0x451d20[_0x34de5e(0x25b)][_0x34de5e(0x219)][_0x56f9b8],_0x1c8cb8,_0x395aca))[_0x34de5e(0x242)](Boolean);return Object[_0x34de5e(0x24a)](_0x451d20[_0x34de5e(0x25b)][_0x34de5e(0x239)])[_0x34de5e(0x1fb)](_0x1fdbfc=>{const _0x37ecf1=_0x34de5e;this[_0x37ecf1(0x222)]['addUser'](_0x1fdbfc);}),_0x28749b;}[_0x677f04(0x221)](_0x2cca80){const _0x32302a=_0x677f04;return{'id':_0x2cca80['id'],'threadId':_0x2cca80[_0x32302a(0x25e)],'ref':_0x2cca80[_0x32302a(0x1df)]};}};_0x4cd70d=_0x172d33([_0x87d388(0x0,_0x55170a[_0x677f04(0x253)](_0x2ab838['HTTPService'])),_0x87d388(0x1,_0x55170a[_0x677f04(0x253)](_0x55170a[_0x677f04(0x24b)])),_0x87d388(0x2,_0x55170a['Inject'](_0x16a5d5[_0x677f04(0x1fd)])),_0x87d388(0x3,_0x55170a['Inject'](_0x55170a[_0x677f04(0x225)]))],_0x4cd70d);var _0x381e7b=Object[_0x677f04(0x20c)],_0x3035e8=(_0x1a31a7,_0x226152,_0x16b5ab,_0x4c093f)=>{const _0x43f727=_0x677f04;for(var _0x478322=_0x4c093f>0x1?void 0x0:_0x4c093f?_0x381e7b(_0x226152,_0x16b5ab):_0x226152,_0x5cdfa1=_0x1a31a7[_0x43f727(0x20b)]-0x1,_0xb28325;_0x5cdfa1>=0x0;_0x5cdfa1--)(_0xb28325=_0x1a31a7[_0x5cdfa1])&&(_0x478322=_0xb28325(_0x478322)||_0x478322);return _0x478322;},_0x5439a1=(_0x383df9,_0x59e1a0)=>(_0x3c856b,_0x441754)=>_0x59e1a0(_0x3c856b,_0x441754,_0x383df9);let _0x1466eb=class extends _0x55170a[_0x677f04(0x254)]{constructor(_0xadac9e,_0x2c01d4){const _0x1eadb2=_0x677f04;super(),this[_0x1eadb2(0x259)]=_0xadac9e,this[_0x1eadb2(0x1e5)]=_0x2c01d4,this[_0x1eadb2(0x260)]();}['_initDataSource'](){const _0x268c93=_0x677f04;this[_0x268c93(0x259)]['dataSource']=this[_0x268c93(0x1e5)],this[_0x268c93(0x259)][_0x268c93(0x204)]=!0x1;}};_0x1466eb=_0x3035e8([_0x5439a1(0x0,_0x229cda[_0x677f04(0x23b)]),_0x5439a1(0x1,_0x55170a[_0x677f04(0x253)](_0x4cd70d))],_0x1466eb);var _0x2f09f8=Object['defineProperty'],_0x16bb81=Object[_0x677f04(0x20c)],_0xc34ba8=(_0x230293,_0x24692e,_0x59f67f)=>_0x24692e in _0x230293?_0x2f09f8(_0x230293,_0x24692e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f67f}):_0x230293[_0x24692e]=_0x59f67f,_0x58cf89=(_0x4d2ced,_0x50ada5,_0x929143,_0x4498ad)=>{for(var _0x15c302=_0x4498ad>0x1?void 0x0:_0x4498ad?_0x16bb81(_0x50ada5,_0x929143):_0x50ada5,_0x1b4911=_0x4d2ced['length']-0x1,_0x4dc434;_0x1b4911>=0x0;_0x1b4911--)(_0x4dc434=_0x4d2ced[_0x1b4911])&&(_0x15c302=_0x4dc434(_0x15c302)||_0x15c302);return _0x15c302;},_0x3ff931=(_0x1ff3e5,_0x55f4c1)=>(_0x961f46,_0x440b10)=>_0x55f4c1(_0x961f46,_0x440b10,_0x1ff3e5),_0x2a8ec6=(_0x3386ee,_0x2eaea5,_0x525547)=>_0xc34ba8(_0x3386ee,typeof _0x2eaea5!=_0x677f04(0x231)?_0x2eaea5+'':_0x2eaea5,_0x525547);_0x2bb25f[_0x677f04(0x240)]=class extends _0x55170a['Plugin']{constructor(_0x2d3368=_0x2df36f,_0x5e67d7,_0x261ffc){const _0x248f0c=_0x677f04;super(),this[_0x248f0c(0x234)]=_0x2d3368,this[_0x248f0c(0x23d)]=_0x5e67d7,this[_0x248f0c(0x1fc)]=_0x261ffc;const {..._0x15393e}=_0x55170a[_0x248f0c(0x257)]({},_0x2df36f,this[_0x248f0c(0x234)]);this['_configService'][_0x248f0c(0x255)](_0x238f63,_0x15393e);}[_0x677f04(0x20a)](){const _0x35bbe0=_0x677f04;[[_0x4cd70d],[_0x1466eb],[_0x2b08e9]][_0x35bbe0(0x1fb)](_0x4b889f=>{const _0x19072e=_0x35bbe0;this[_0x19072e(0x23d)]['add'](_0x4b889f);});}[_0x677f04(0x21b)](){const _0x55ddeb=_0x677f04;this[_0x55ddeb(0x23d)]['get'](_0x1466eb),this[_0x55ddeb(0x23d)][_0x55ddeb(0x1e2)](_0x2b08e9);}},_0x2a8ec6(_0x2bb25f['UniverThreadCommentDataSourcePlugin'],_0x677f04(0x266),_0x59e29c),_0x2a8ec6(_0x2bb25f[_0x677f04(0x240)],_0x677f04(0x1ee),_0x55170a['UniverInstanceType'][_0x677f04(0x23a)]),_0x2bb25f[_0x677f04(0x240)]=_0x58cf89([_0x55170a[_0x677f04(0x214)](_0x41bf77[_0x677f04(0x224)],_0x16a5d5['UniverCollaborationClientPlugin'],_0x49481d[_0x677f04(0x248)]),_0x3ff931(0x1,_0x55170a[_0x677f04(0x253)](_0x55170a[_0x677f04(0x225)])),_0x3ff931(0x2,_0x55170a[_0x677f04(0x258)])],_0x2bb25f[_0x677f04(0x240)]),Object[_0x677f04(0x1ed)](_0x2bb25f,Symbol[_0x677f04(0x241)],{'value':_0x677f04(0x22b)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1-nightly.202507071607",
3
+ "version": "0.9.1-nightly.202507091606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507071607",
49
- "@univerjs-pro/license": "0.9.1-nightly.202507071607",
50
- "@univerjs/core": "0.9.1-nightly.202507071607",
51
- "@univerjs/thread-comment": "0.9.1-nightly.202507071607",
52
- "@univerjs/network": "0.9.1-nightly.202507071607",
48
+ "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507091606",
49
+ "@univerjs-pro/license": "0.9.1-nightly.202507091606",
50
+ "@univerjs/core": "0.9.1-nightly.202507091606",
51
+ "@univerjs/network": "0.9.1-nightly.202507091606",
53
52
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.9.1-nightly.202507071607"
53
+ "@univerjs/thread-comment": "0.9.1-nightly.202507091606",
54
+ "@univerjs/thread-comment-ui": "0.9.1-nightly.202507091606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",