@univerjs-pro/thread-comment-datasource 0.15.2-insiders.20260119-edc718c → 0.15.2-insiders.20260124-12fc7f0

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 _0x4485d0=_0x4af3;function _0x4af3(_0x2131ce,_0x4077c7){_0x2131ce=_0x2131ce-0x117;const _0x5b48c2=_0x5b48();let _0x4af311=_0x5b48c2[_0x2131ce];return _0x4af311;}(function(_0x496217,_0x5a4f77){const _0x10fcae=_0x4af3,_0x2b210a=_0x496217();while(!![]){try{const _0x2f9152=parseInt(_0x10fcae(0x139))/0x1*(-parseInt(_0x10fcae(0x177))/0x2)+parseInt(_0x10fcae(0x11e))/0x3*(parseInt(_0x10fcae(0x164))/0x4)+-parseInt(_0x10fcae(0x171))/0x5*(parseInt(_0x10fcae(0x135))/0x6)+-parseInt(_0x10fcae(0x189))/0x7+-parseInt(_0x10fcae(0x140))/0x8+parseInt(_0x10fcae(0x187))/0x9*(parseInt(_0x10fcae(0x183))/0xa)+parseInt(_0x10fcae(0x16a))/0xb;if(_0x2f9152===_0x5a4f77)break;else _0x2b210a['push'](_0x2b210a['shift']());}catch(_0x4dd295){_0x2b210a['push'](_0x2b210a['shift']());}}}(_0x5b48,0xacd1f));Object[_0x4485d0(0x11f)](exports,Symbol[_0x4485d0(0x13c)],{'value':_0x4485d0(0x160)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4485d0(0x14f);var I=(_0x74d356=>(_0x74d356[_0x74d356['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x74d356[_0x74d356['Solved']=0x1]=_0x4485d0(0x145),_0x74d356[_0x74d356[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x74d356))(I||{}),v=(_0x4bf3e9=>(_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x168)]=0x0]='Unknown',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x180)]=0x1]=_0x4485d0(0x180),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x165)]=0x2]='Reply',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x166)]=0x3]=_0x4485d0(0x166),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x138)]=0x4]='Delete',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x127)]=0x5]=_0x4485d0(0x127),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x4bf3e9))(v||{});function _0x5b48(){const _0xe90e07=['UniverThreadCommentUIPlugin','commentUpdate$','onReady','Add','onStarting','addComment','344210ukPQRk','getUnit','_threadCommentModel','_configService','81dCbCiz','post','345450sNtNeW','UserManagerService','UniverThreadCommentDataSourcePlugin','resolved','find','requireSession','IConfigService','stringify','_commentService','/universer-api/comment/unit/','userId','CustomRangeType','UniverInstanceType','1362162YoMzth','defineProperty','UNRECOGNIZED','pluginName','users','Inject','pipe','/universer-api/user/list','UniverCollaborationClientPlugin','Solve','COMMENT','ThreadCommentModel','symbol','body','solved','deleteComment','format','map','addUser','/edit','/solved','resolveComment','_threadCommentDataSourceService','66aINZdD','replies','saveCommentToSnapshot','Delete','1YsLOFV','payload','listComments','toStringTag','CollaborationSessionService','root','_config','5458744hkECLn','user','comment','_injector','comments','Solved','createTimestamp','length','replyId','/add','UniverLicensePlugin','/reply','slice','HTTPService','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','CommentService','customRanges','_initDataSource','threadId','IThreadCommentDataSourceService','getMemberID','rangeId','_threadCommentDataSource','Plugin','forEach','Injector','getOwnPropertyDescriptor','type','get','subscribe','Module','reply','error','rangeType','4FdJHjS','Reply','Edit','dayjs','Unknown','content','12047772owvyfQ','personId','userID','_initUserSync','values','filter','disposeWithMe','127795Rqufpj','bufferTime','_init','_sessionService','parse','getComment','276764PePFWi','YYYY/MM/DD\x20HH:mm','code','_httpService','getCurrentUser','parentId'];_0x5b48=function(){return _0xe90e07;};return _0x5b48();}const f=_0x285897=>c[_0x4485d0(0x167)](new Date(+_0x285897))[_0x4485d0(0x12e)](_0x4485d0(0x178)),R=async(_0x455202,_0xc32e69)=>{const _0x26fb46=_0x4485d0,_0xb8a3e1=_0x455202[_0x26fb46(0x15e)](c[_0x26fb46(0x18a)]),_0x25fbd1=_0x455202[_0x26fb46(0x15e)](P['HTTPService']);_0xc32e69[_0x26fb46(0x15a)](_0x1362d8=>{_0xb8a3e1['getUser'](_0x1362d8)&&_0xc32e69['delete'](_0x1362d8);}),_0xc32e69['size']&&(await _0x25fbd1[_0x26fb46(0x15e)](_0x26fb46(0x125),{'params':{'userIDs':[..._0xc32e69]}}))['body'][_0x26fb46(0x122)][_0x26fb46(0x15a)](_0x1ad742=>{_0x1ad742&&_0xb8a3e1['addUser'](_0x1ad742);});};var $=Object[_0x4485d0(0x15c)],E=(_0x56bd90,_0x1aec70,_0x48937c,_0x1d63b2)=>{const _0x22d3ee=_0x4485d0;for(var _0x4f4243=_0x1d63b2>0x1?void 0x0:_0x1d63b2?$(_0x1aec70,_0x48937c):_0x1aec70,_0x580166=_0x56bd90[_0x22d3ee(0x147)]-0x1,_0x41bcc5;_0x580166>=0x0;_0x580166--)(_0x41bcc5=_0x56bd90[_0x580166])&&(_0x4f4243=_0x41bcc5(_0x4f4243)||_0x4f4243);return _0x4f4243;},S=(_0x1f1d55,_0x47715b)=>(_0x1a9e7a,_0x4531bf)=>_0x47715b(_0x1a9e7a,_0x4531bf,_0x1f1d55);let _=class extends c['Disposable']{constructor(_0x253a8e,_0x5f83ae,_0x4813ac,_0x263eef){const _0x4060a4=_0x4485d0;super(),this[_0x4060a4(0x119)]=_0x253a8e,this[_0x4060a4(0x185)]=_0x5f83ae,this[_0x4060a4(0x150)]=_0x4813ac,this[_0x4060a4(0x143)]=_0x263eef,this['_init'](),this[_0x4060a4(0x16d)]();}['_initUserSync'](){const _0x390a22=_0x4485d0;this[_0x390a22(0x170)](this[_0x390a22(0x185)][_0x390a22(0x17e)][_0x390a22(0x124)](j[_0x390a22(0x172)](0x10))[_0x390a22(0x15f)](_0x684686=>{const _0x5eed94=_0x390a22,_0x5c1464=new Set();_0x684686[_0x5eed94(0x15a)](_0x80e962=>{const _0x95113a=_0x5eed94;if(_0x80e962[_0x95113a(0x15d)]===_0x95113a(0x14e)){const _0x3fa10f=_0x80e962[_0x95113a(0x13a)][_0x95113a(0x16b)];_0x5c1464[_0x95113a(0x14e)](_0x3fa10f);}}),R(this[_0x5eed94(0x143)],_0x5c1464);}));}[_0x4485d0(0x173)](){const _0x32f2b7=_0x4485d0;this[_0x32f2b7(0x170)](this['_commentService'][_0x32f2b7(0x17e)]['subscribe'](async _0x3b5bb2=>{const _0x450d6b=_0x32f2b7;var _0x2a27d0,_0x4a7102,_0x4e09d5,_0xebbe91;const _0x403e16=(_0x2a27d0=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x42ae57=>_0x42ae57['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0x2a27d0[_0x450d6b(0x13e)];if(!_0x403e16)return;const {unitId:_0x24959e,subUnitId:_0x32cc45}=_0x403e16;switch(_0x3b5bb2[_0x450d6b(0x141)]&&this['_userService'][_0x450d6b(0x130)](_0x3b5bb2[_0x450d6b(0x141)]),_0x3b5bb2[_0x450d6b(0x15d)]){case v[_0x450d6b(0x180)]:break;case v['Reply']:{this[_0x450d6b(0x185)][_0x450d6b(0x182)](_0x24959e,_0x32cc45,{'unitId':_0x24959e,'subUnitId':_0x32cc45,'ref':'','id':_0x3b5bb2[_0x450d6b(0x148)],'dT':f(+_0x3b5bb2[_0x450d6b(0x146)]),'threadId':_0x3b5bb2[_0x450d6b(0x154)],'personId':(_0x4e09d5=(_0x4a7102=_0x3b5bb2[_0x450d6b(0x141)])==null?void 0x0:_0x4a7102['userID'])!=null?_0x4e09d5:_0x3b5bb2[_0x450d6b(0x11b)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)]),'parentId':_0x403e16['id']});break;}case v[_0x450d6b(0x138)]:{const _0x7a2373=this[_0x450d6b(0x185)][_0x450d6b(0x176)](_0x24959e,_0x32cc45,_0x3b5bb2['replyId']);_0x7a2373&&_0x7a2373[_0x450d6b(0x17c)]&&this[_0x450d6b(0x185)][_0x450d6b(0x12d)](_0x24959e,_0x32cc45,_0x3b5bb2[_0x450d6b(0x148)]);break;}case v[_0x450d6b(0x166)]:{this[_0x450d6b(0x185)]['updateComment'](_0x24959e,_0x32cc45,{'commentId':_0x3b5bb2[_0x450d6b(0x148)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)])});break;}case v['Solve']:{const _0x241a2b=(_0xebbe91=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x1f5eb2=>_0x1f5eb2['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0xebbe91[_0x450d6b(0x13e)];_0x241a2b&&this['_threadCommentModel'][_0x450d6b(0x133)](_0x24959e,_0x32cc45,_0x241a2b['id'],_0x3b5bb2['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4485d0(0x123)](b[_0x4485d0(0x151)])),S(0x1,c[_0x4485d0(0x123)](M[_0x4485d0(0x129)])),S(0x2,c[_0x4485d0(0x123)](c[_0x4485d0(0x18a)])),S(0x3,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4485d0(0x15c)],x=(_0x3f83ed,_0x89d256,_0x2c7370,_0x96cfed)=>{const _0x5e2b09=_0x4485d0;for(var _0x5eb9eb=_0x96cfed>0x1?void 0x0:_0x96cfed?A(_0x89d256,_0x2c7370):_0x89d256,_0x5ef3cc=_0x3f83ed[_0x5e2b09(0x147)]-0x1,_0x370b60;_0x5ef3cc>=0x0;_0x5ef3cc--)(_0x370b60=_0x3f83ed[_0x5ef3cc])&&(_0x5eb9eb=_0x370b60(_0x5eb9eb)||_0x5eb9eb);return _0x5eb9eb;},C=(_0x103dd1,_0x10df01)=>(_0x227640,_0x186514)=>_0x10df01(_0x227640,_0x186514,_0x103dd1);function Y(_0x3bf569,_0xc28e10){const _0x20db1a=_0x4485d0,_0x25a38f=_0x3bf569[_0x20db1a(0x136)][0x0];return{..._0xc28e10,'id':_0x25a38f[_0x20db1a(0x148)],'resolved':_0x3bf569[_0x20db1a(0x12c)]===0x1,'dT':f(_0x25a38f[_0x20db1a(0x146)]),'personId':_0x25a38f[_0x20db1a(0x11b)],'threadId':_0x25a38f[_0x20db1a(0x154)]};}function G(_0x405378,_0x3dc330,_0x1ac440){const _0x31163a=_0x4485d0;var _0xa066e7,_0x46d2e5;if(((_0x46d2e5=(_0xa066e7=_0x405378==null?void 0x0:_0x405378['replies'])==null?void 0x0:_0xa066e7[_0x31163a(0x147)])!=null?_0x46d2e5:0x0)>0x0){const _0x356c56=(_0x1e49f0,_0x20d8d1)=>({'id':_0x1e49f0[_0x31163a(0x148)],'threadId':_0x1e49f0[_0x31163a(0x154)],'dT':f(_0x1e49f0[_0x31163a(0x146)]),'personId':_0x1e49f0['userId'],'resolved':_0x405378[_0x31163a(0x12c)]===I[_0x31163a(0x145)],'unitId':_0x3dc330,'subUnitId':_0x1ac440,'text':JSON[_0x31163a(0x175)](_0x1e49f0[_0x31163a(0x169)]),'parentId':_0x20d8d1}),_0x32b92d=_0x356c56(_0x405378['replies'][0x0]);return{..._0x32b92d,'children':_0x405378[_0x31163a(0x136)][_0x31163a(0x14c)](0x1)[_0x31163a(0x12f)](_0x470e50=>_0x356c56(_0x470e50,_0x32b92d['id']))};}return null;}let p=class{constructor(_0x3119c7,_0x2f3c74,_0x2d7c36){const _0x3a40b6=_0x4485d0;this[_0x3a40b6(0x17a)]=_0x3119c7,this['_userService']=_0x2f3c74,this[_0x3a40b6(0x174)]=_0x2d7c36;}async['addComment'](_0x19030c){const _0x2e074c=_0x4485d0;var _0x3dd260,_0x157e14;const {parentId:_0x42c4c5,unitId:_0x417165,text:_0x330a9b,threadId:_0x9306a7}=_0x19030c,_0x462c83=(_0x157e14=(_0x3dd260=_0x330a9b['customRanges'])==null?void 0x0:_0x3dd260['filter'](_0x332c39=>_0x332c39['rangeType']===c[_0x2e074c(0x11c)][_0x2e074c(0x128)])[_0x2e074c(0x12f)](_0x113a8d=>_0x113a8d[_0x2e074c(0x157)]))!=null?_0x157e14:[],_0xeac8b5=JSON[_0x2e074c(0x118)](_0x330a9b),_0x99bcbe=(await this[_0x2e074c(0x174)]['requireSession'](_0x417165))['getMemberID']();if(_0x42c4c5){const _0x280276={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83,'threadId':_0x9306a7},_0x7ff0ef=(await this[_0x2e074c(0x17a)][_0x2e074c(0x188)](_0x2e074c(0x11a)+_0x417165+_0x2e074c(0x14b),{'body':_0x280276}))[_0x2e074c(0x12b)][_0x2e074c(0x161)];return{..._0x19030c,'id':_0x7ff0ef[_0x2e074c(0x148)],'dT':c['dayjs'](+_0x7ff0ef[_0x2e074c(0x146)])[_0x2e074c(0x12e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x7ff0ef[_0x2e074c(0x11b)]};}else{const _0xe0ab31={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83},_0x34e720=await this[_0x2e074c(0x17a)][_0x2e074c(0x188)]('/universer-api/comment/unit/'+_0x417165+_0x2e074c(0x149),{'body':_0xe0ab31});return Y(_0x34e720[_0x2e074c(0x12b)][_0x2e074c(0x142)],_0x19030c);}}async['updateComment'](_0x58d7d5){const _0x52c1a7=_0x4485d0;var _0x258127,_0x1dcecf;const {text:_0x4d198d,unitId:_0x1847ed}=_0x58d7d5,_0x579b6c=(_0x1dcecf=(_0x258127=_0x4d198d[_0x52c1a7(0x152)])==null?void 0x0:_0x258127[_0x52c1a7(0x16f)](_0x4f7132=>_0x4f7132[_0x52c1a7(0x163)]===c[_0x52c1a7(0x11c)][_0x52c1a7(0x128)])[_0x52c1a7(0x12f)](_0x974ce0=>_0x974ce0[_0x52c1a7(0x157)]))!=null?_0x1dcecf:[],_0x342f64=JSON[_0x52c1a7(0x118)](_0x4d198d),_0x1a472e=_0x58d7d5[_0x52c1a7(0x154)],_0x4f2624=_0x58d7d5['id'],_0x4cdfba={'memberId':(await this[_0x52c1a7(0x174)][_0x52c1a7(0x18e)](_0x1847ed))[_0x52c1a7(0x156)](),'unitId':_0x1847ed,'threadId':_0x1a472e,'mention':_0x579b6c,'content':_0x342f64,'replyId':_0x4f2624},_0x3197cd=await this[_0x52c1a7(0x17a)]['post'](_0x52c1a7(0x11a)+_0x1847ed+_0x52c1a7(0x131),{'body':_0x4cdfba});return!_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)]||_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)][_0x52c1a7(0x179)]===0x1;}async['resolveComment'](_0x5eb72f){const _0x5a0562=_0x4485d0,{unitId:_0x4288e9}=_0x5eb72f,_0x11c57f=_0x5eb72f[_0x5a0562(0x154)],_0x4af4e4={'memberId':this[_0x5a0562(0x150)][_0x5a0562(0x17b)]()[_0x5a0562(0x16c)],'unitId':_0x4288e9,'threadId':_0x11c57f,'solved':_0x5eb72f[_0x5a0562(0x18c)]?I[_0x5a0562(0x145)]:I['OpenOrReOpen']},_0x48b55e=await this[_0x5a0562(0x17a)][_0x5a0562(0x188)](_0x5a0562(0x11a)+_0x4288e9+_0x5a0562(0x132),{'body':_0x4af4e4});return!_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)]||_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)][_0x5a0562(0x179)]===0x1;}async[_0x4485d0(0x12d)](_0x608403,_0x7bc88c,_0x3f5ea1,_0x540086){const _0x5f581d=_0x4485d0,_0x3a8583={'memberId':(await this[_0x5f581d(0x174)][_0x5f581d(0x18e)](_0x608403))[_0x5f581d(0x156)](),'threadId':_0x3f5ea1,'replyId':_0x540086,'unitId':_0x608403},_0x511e5f=await this[_0x5f581d(0x17a)][_0x5f581d(0x188)]('/universer-api/comment/unit/'+_0x608403+'/delete',{'body':_0x3a8583});return!_0x511e5f['body'][_0x5f581d(0x162)]||_0x511e5f[_0x5f581d(0x12b)][_0x5f581d(0x162)][_0x5f581d(0x179)]===0x1;}async[_0x4485d0(0x13b)](_0x28fb89,_0x52aca7,_0x356263){const _0x19a231=_0x4485d0,_0x7f055c={'unitId':_0x28fb89,'threadId':_0x356263},_0x2fca40=await this[_0x19a231(0x17a)][_0x19a231(0x188)]('/universer-api/comment/unit/'+_0x28fb89+'/list',{'body':_0x7f055c}),_0x5c942b=_0x356263['map'](_0x1e0c4d=>G(_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x144)][_0x1e0c4d],_0x28fb89,_0x52aca7))[_0x19a231(0x16f)](Boolean);return Object[_0x19a231(0x16e)](_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x122)])[_0x19a231(0x15a)](_0x542868=>{const _0x45b658=_0x19a231;this['_userService'][_0x45b658(0x130)](_0x542868);}),_0x5c942b;}[_0x4485d0(0x137)](_0x1b7fc3){return{'id':_0x1b7fc3['id'],'threadId':_0x1b7fc3['threadId'],'ref':_0x1b7fc3['ref']};}};p=x([C(0x0,c['Inject'](P[_0x4485d0(0x14d)])),C(0x1,c['Inject'](c[_0x4485d0(0x18a)])),C(0x2,c[_0x4485d0(0x123)](b[_0x4485d0(0x13d)]))],p);var H=Object[_0x4485d0(0x15c)],J=(_0x21ffda,_0x3e7c90,_0x3b99ad,_0xcded46)=>{for(var _0x5de86d=_0xcded46>0x1?void 0x0:_0xcded46?H(_0x3e7c90,_0x3b99ad):_0x3e7c90,_0x571e3f=_0x21ffda['length']-0x1,_0x2eba8a;_0x571e3f>=0x0;_0x571e3f--)(_0x2eba8a=_0x21ffda[_0x571e3f])&&(_0x5de86d=_0x2eba8a(_0x5de86d)||_0x5de86d);return _0x5de86d;},y=(_0x3aaab7,_0x2fdb74)=>(_0x129747,_0x789f8d)=>_0x2fdb74(_0x129747,_0x789f8d,_0x3aaab7);let g=class extends c['Disposable']{constructor(_0x25c56b,_0x2fbc4d){const _0x224ed8=_0x4485d0;super(),this['_threadCommentDataSourceService']=_0x25c56b,this['_threadCommentDataSource']=_0x2fbc4d,this[_0x224ed8(0x153)]();}['_initDataSource'](){const _0xed1f4c=_0x4485d0;this[_0xed1f4c(0x134)]['dataSource']=this[_0xed1f4c(0x158)],this[_0xed1f4c(0x134)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4485d0(0x155)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x2ea3cc,_0x5ef46d,_0x2b169c)=>_0x5ef46d in _0x2ea3cc?F(_0x2ea3cc,_0x5ef46d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b169c}):_0x2ea3cc[_0x5ef46d]=_0x2b169c,W=(_0x5854c2,_0x1392be,_0x1b9687,_0x1ddbfc)=>{for(var _0x5133af=_0x1ddbfc>0x1?void 0x0:_0x1ddbfc?L(_0x1392be,_0x1b9687):_0x1392be,_0x1e77ba=_0x5854c2['length']-0x1,_0x32f5e5;_0x1e77ba>=0x0;_0x1e77ba--)(_0x32f5e5=_0x5854c2[_0x1e77ba])&&(_0x5133af=_0x32f5e5(_0x5133af)||_0x5133af);return _0x5133af;},O=(_0x4587ec,_0x4b6fbe)=>(_0x514f5a,_0x463206)=>_0x4b6fbe(_0x514f5a,_0x463206,_0x4587ec),N=(_0x5e7846,_0x465ab6,_0xf299ba)=>Z(_0x5e7846,typeof _0x465ab6!=_0x4485d0(0x12a)?_0x465ab6+'':_0x465ab6,_0xf299ba);exports[_0x4485d0(0x18b)]=class extends c[_0x4485d0(0x159)]{constructor(_0x18b9e3=D,_0x3934f7,_0xc2f1a6){const _0xb270cb=_0x4485d0;super(),this[_0xb270cb(0x13f)]=_0x18b9e3,this[_0xb270cb(0x143)]=_0x3934f7,this['_configService']=_0xc2f1a6;const {..._0x4d1d56}=c['merge']({},D,this['_config']);this[_0xb270cb(0x186)]['setConfig'](q,_0x4d1d56);}[_0x4485d0(0x181)](){const _0x39c08b=_0x4485d0;[[p],[g],[_]][_0x39c08b(0x15a)](_0x1a4202=>{const _0x45c622=_0x39c08b;this['_injector'][_0x45c622(0x14e)](_0x1a4202);});}[_0x4485d0(0x17f)](){const _0x48d98e=_0x4485d0;this['_injector']['get'](g),this[_0x48d98e(0x143)]['get'](_);}},N(exports[_0x4485d0(0x18b)],_0x4485d0(0x121),U),N(exports[_0x4485d0(0x18b)],_0x4485d0(0x15d),c[_0x4485d0(0x11d)]['UNIVER_UNKNOWN']),exports[_0x4485d0(0x18b)]=W([c['DependentOn'](w[_0x4485d0(0x17d)],b[_0x4485d0(0x126)],T[_0x4485d0(0x14a)]),O(0x1,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)])),O(0x2,c[_0x4485d0(0x117)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x347130=_0x4f64;(function(_0x52acd4,_0x5c800c){const _0xa03dd=_0x4f64,_0x1d3953=_0x52acd4();while(!![]){try{const _0x3df49e=-parseInt(_0xa03dd(0x13e))/0x1+-parseInt(_0xa03dd(0x138))/0x2+parseInt(_0xa03dd(0x132))/0x3+parseInt(_0xa03dd(0x11c))/0x4*(-parseInt(_0xa03dd(0x103))/0x5)+-parseInt(_0xa03dd(0x112))/0x6*(parseInt(_0xa03dd(0x10a))/0x7)+-parseInt(_0xa03dd(0x130))/0x8+-parseInt(_0xa03dd(0x105))/0x9*(-parseInt(_0xa03dd(0x142))/0xa);if(_0x3df49e===_0x5c800c)break;else _0x1d3953['push'](_0x1d3953['shift']());}catch(_0x1aed91){_0x1d3953['push'](_0x1d3953['shift']());}}}(_0x1d56,0x42756));function _0x1d56(){const _0x492ae7=['/universer-api/user/list','_configService','50044bRmldF','updateComment','root','getUser','Edit','resolved','requireSession','_sessionService','users','UserManagerService','symbol','UniverCollaborationClientPlugin','HTTPService','user','Solve','parentId','Reply','_init','filter','find','1898856vHkqpK','YYYY/MM/DD\x20HH:mm','1245240tjQRIu','format','ref','/edit','thread-comment-data-source.config','_httpService','971512dJXNUp','dayjs','toStringTag','forEach','size','solved','156197SvAdfc','add','OpenOrReOpen','getCurrentUser','10gpHGHT','CommentService','pipe','getMemberID','onReady','saveCommentToSnapshot','unitId','rangeId','userId','commentUpdate$','body','DependentOn','Solved','UniverThreadCommentDataSourcePlugin','delete','replyId','post','UNIVER_UNKNOWN','Add','stringify','UniverLicensePlugin','error','parse','UNRECOGNIZED','threadId','length','UniverInstanceType','CustomRangeType','get','/delete','content','getUnit','customRanges','deleteComment','addUser','type','getOwnPropertyDescriptor','/reply','Delete','map','setConfig','disposeWithMe','Disposable','Injector','_userService','_initDataSource','replies','subscribe','values','115TWZwMQ','/universer-api/comment/unit/','9238689xVwSnl','code','_injector','addComment','IThreadCommentDataSourceService','581YLKIQi','_threadCommentModel','_threadCommentDataSourceService','slice','Unknown','getComment','COMMENT','payload','168cAQsIG','_threadCommentDataSource','UniverThreadCommentUIPlugin','defineProperty','createTimestamp','_initUserSync','Inject','resolveComment'];_0x1d56=function(){return _0x492ae7;};return _0x1d56();}Object['defineProperty'](exports,Symbol[_0x347130(0x13a)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a49fc=>(_0x3a49fc[_0x3a49fc[_0x347130(0x140)]=0x0]='OpenOrReOpen',_0x3a49fc[_0x3a49fc['Solved']=0x1]=_0x347130(0x14e),_0x3a49fc[_0x3a49fc[_0x347130(0x159)]=-0x1]='UNRECOGNIZED',_0x3a49fc))(I||{}),v=(_0x391a3a=>(_0x391a3a[_0x391a3a['Unknown']=0x0]=_0x347130(0x10e),_0x391a3a[_0x391a3a[_0x347130(0x154)]=0x1]=_0x347130(0x154),_0x391a3a[_0x391a3a[_0x347130(0x12c)]=0x2]=_0x347130(0x12c),_0x391a3a[_0x391a3a[_0x347130(0x120)]=0x3]=_0x347130(0x120),_0x391a3a[_0x391a3a[_0x347130(0x168)]=0x4]=_0x347130(0x168),_0x391a3a[_0x391a3a[_0x347130(0x12a)]=0x5]='Solve',_0x391a3a[_0x391a3a['UNRECOGNIZED']=-0x1]=_0x347130(0x159),_0x391a3a))(v||{});const f=_0x54989f=>c[_0x347130(0x139)](new Date(+_0x54989f))[_0x347130(0x133)](_0x347130(0x131)),R=async(_0xae9b59,_0x41f7d6)=>{const _0x37f8fa=_0x347130,_0x6e29bd=_0xae9b59['get'](c[_0x37f8fa(0x125)]),_0x93d04c=_0xae9b59[_0x37f8fa(0x15e)](P[_0x37f8fa(0x128)]);_0x41f7d6[_0x37f8fa(0x13b)](_0x4966f3=>{const _0x34fb7b=_0x37f8fa;_0x6e29bd[_0x34fb7b(0x11f)](_0x4966f3)&&_0x41f7d6[_0x34fb7b(0x150)](_0x4966f3);}),_0x41f7d6[_0x37f8fa(0x13c)]&&(await _0x93d04c[_0x37f8fa(0x15e)](_0x37f8fa(0x11a),{'params':{'userIDs':[..._0x41f7d6]}}))[_0x37f8fa(0x14c)][_0x37f8fa(0x124)][_0x37f8fa(0x13b)](_0x3cdbc0=>{const _0x2b2159=_0x37f8fa;_0x3cdbc0&&_0x6e29bd[_0x2b2159(0x164)](_0x3cdbc0);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5be219,_0x2a43e6,_0x207d97,_0x5927d7)=>{const _0x273c22=_0x347130;for(var _0x16473a=_0x5927d7>0x1?void 0x0:_0x5927d7?$(_0x2a43e6,_0x207d97):_0x2a43e6,_0x142c58=_0x5be219[_0x273c22(0x15b)]-0x1,_0x85e943;_0x142c58>=0x0;_0x142c58--)(_0x85e943=_0x5be219[_0x142c58])&&(_0x16473a=_0x85e943(_0x16473a)||_0x16473a);return _0x16473a;},S=(_0x4ff6ee,_0x1cd745)=>(_0x18e5e9,_0x2bb1d1)=>_0x1cd745(_0x18e5e9,_0x2bb1d1,_0x4ff6ee);let _=class extends c[_0x347130(0xfc)]{constructor(_0x2a690f,_0x26aee8,_0x3dcb5e,_0x7bbfda){const _0x533ade=_0x347130;super(),this['_commentService']=_0x2a690f,this[_0x533ade(0x10b)]=_0x26aee8,this[_0x533ade(0xfe)]=_0x3dcb5e,this[_0x533ade(0x107)]=_0x7bbfda,this[_0x533ade(0x12d)](),this['_initUserSync']();}[_0x347130(0x117)](){const _0x22eb92=_0x347130;this[_0x22eb92(0xfb)](this[_0x22eb92(0x10b)]['commentUpdate$'][_0x22eb92(0x144)](j['bufferTime'](0x10))[_0x22eb92(0x101)](_0x12de10=>{const _0x3b4012=_0x22eb92,_0x403fa8=new Set();_0x12de10['forEach'](_0x5a1b70=>{const _0x58e081=_0x4f64;if(_0x5a1b70[_0x58e081(0x165)]===_0x58e081(0x13f)){const _0x204d69=_0x5a1b70[_0x58e081(0x111)]['personId'];_0x403fa8[_0x58e081(0x13f)](_0x204d69);}}),R(this[_0x3b4012(0x107)],_0x403fa8);}));}[_0x347130(0x12d)](){const _0x5bc4d1=_0x347130;this[_0x5bc4d1(0xfb)](this['_commentService'][_0x5bc4d1(0x14b)][_0x5bc4d1(0x101)](async _0x26a95e=>{const _0x4e0aa6=_0x5bc4d1;var _0xcf8bc9,_0x936a1b,_0x85bff7,_0xe99c0b;const _0x2552df=(_0xcf8bc9=this[_0x4e0aa6(0x10b)]['getUnit'](_0x26a95e['unitId'])[_0x4e0aa6(0x12f)](_0x4a27dd=>_0x4a27dd['threadId']===_0x26a95e['threadId']))==null?void 0x0:_0xcf8bc9[_0x4e0aa6(0x11e)];if(!_0x2552df)return;const {unitId:_0xfdcc75,subUnitId:_0x533acd}=_0x2552df;switch(_0x26a95e[_0x4e0aa6(0x129)]&&this[_0x4e0aa6(0xfe)]['addUser'](_0x26a95e[_0x4e0aa6(0x129)]),_0x26a95e[_0x4e0aa6(0x165)]){case v['Add']:break;case v[_0x4e0aa6(0x12c)]:{this['_threadCommentModel'][_0x4e0aa6(0x108)](_0xfdcc75,_0x533acd,{'unitId':_0xfdcc75,'subUnitId':_0x533acd,'ref':'','id':_0x26a95e[_0x4e0aa6(0x151)],'dT':f(+_0x26a95e[_0x4e0aa6(0x116)]),'threadId':_0x26a95e[_0x4e0aa6(0x15a)],'personId':(_0x85bff7=(_0x936a1b=_0x26a95e[_0x4e0aa6(0x129)])==null?void 0x0:_0x936a1b['userID'])!=null?_0x85bff7:_0x26a95e[_0x4e0aa6(0x14a)],'text':JSON[_0x4e0aa6(0x158)](_0x26a95e[_0x4e0aa6(0x160)]),'parentId':_0x2552df['id']});break;}case v[_0x4e0aa6(0x168)]:{const _0x39a4fc=this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x10f)](_0xfdcc75,_0x533acd,_0x26a95e[_0x4e0aa6(0x151)]);_0x39a4fc&&_0x39a4fc[_0x4e0aa6(0x12b)]&&this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x163)](_0xfdcc75,_0x533acd,_0x26a95e[_0x4e0aa6(0x151)]);break;}case v['Edit']:{this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x11d)](_0xfdcc75,_0x533acd,{'commentId':_0x26a95e[_0x4e0aa6(0x151)],'text':JSON[_0x4e0aa6(0x158)](_0x26a95e[_0x4e0aa6(0x160)])});break;}case v['Solve']:{const _0x22aff2=(_0xe99c0b=this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x161)](_0x26a95e[_0x4e0aa6(0x148)])[_0x4e0aa6(0x12f)](_0x4e858d=>_0x4e858d[_0x4e0aa6(0x15a)]===_0x26a95e['threadId']))==null?void 0x0:_0xe99c0b[_0x4e0aa6(0x11e)];_0x22aff2&&this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x119)](_0xfdcc75,_0x533acd,_0x22aff2['id'],_0x26a95e[_0x4e0aa6(0x13d)]===I[_0x4e0aa6(0x14e)]);break;}}}));}};_=E([S(0x0,c[_0x347130(0x118)](b[_0x347130(0x143)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x347130(0x118)](c[_0x347130(0x125)])),S(0x3,c[_0x347130(0x118)](c[_0x347130(0xfd)]))],_);const q=_0x347130(0x136),D={};var A=Object[_0x347130(0x166)],x=(_0xd75edd,_0xd9f53d,_0x42f41d,_0x2c4db7)=>{for(var _0x57b173=_0x2c4db7>0x1?void 0x0:_0x2c4db7?A(_0xd9f53d,_0x42f41d):_0xd9f53d,_0x559c7b=_0xd75edd['length']-0x1,_0x2215e3;_0x559c7b>=0x0;_0x559c7b--)(_0x2215e3=_0xd75edd[_0x559c7b])&&(_0x57b173=_0x2215e3(_0x57b173)||_0x57b173);return _0x57b173;},C=(_0x2621f5,_0x3822c5)=>(_0x42e15c,_0x4343ba)=>_0x3822c5(_0x42e15c,_0x4343ba,_0x2621f5);function Y(_0x115c41,_0x136d02){const _0x5bd4a5=_0x347130,_0x4be33d=_0x115c41[_0x5bd4a5(0x100)][0x0];return{..._0x136d02,'id':_0x4be33d[_0x5bd4a5(0x151)],'resolved':_0x115c41[_0x5bd4a5(0x13d)]===0x1,'dT':f(_0x4be33d[_0x5bd4a5(0x116)]),'personId':_0x4be33d[_0x5bd4a5(0x14a)],'threadId':_0x4be33d[_0x5bd4a5(0x15a)]};}function G(_0x2541df,_0x490f27,_0x329a76){const _0x5d50a2=_0x347130;var _0x2cf2f1,_0x2b77f0;if(((_0x2b77f0=(_0x2cf2f1=_0x2541df==null?void 0x0:_0x2541df['replies'])==null?void 0x0:_0x2cf2f1[_0x5d50a2(0x15b)])!=null?_0x2b77f0:0x0)>0x0){const _0x38ffd5=(_0x43e1e1,_0x381aee)=>({'id':_0x43e1e1[_0x5d50a2(0x151)],'threadId':_0x43e1e1[_0x5d50a2(0x15a)],'dT':f(_0x43e1e1[_0x5d50a2(0x116)]),'personId':_0x43e1e1[_0x5d50a2(0x14a)],'resolved':_0x2541df[_0x5d50a2(0x13d)]===I[_0x5d50a2(0x14e)],'unitId':_0x490f27,'subUnitId':_0x329a76,'text':JSON[_0x5d50a2(0x158)](_0x43e1e1[_0x5d50a2(0x160)]),'parentId':_0x381aee}),_0x36161e=_0x38ffd5(_0x2541df[_0x5d50a2(0x100)][0x0]);return{..._0x36161e,'children':_0x2541df[_0x5d50a2(0x100)][_0x5d50a2(0x10d)](0x1)[_0x5d50a2(0x169)](_0x5743c3=>_0x38ffd5(_0x5743c3,_0x36161e['id']))};}return null;}let p=class{constructor(_0x10dc9a,_0x2fbd84,_0x2d4a1e){const _0x4d6a1b=_0x347130;this[_0x4d6a1b(0x137)]=_0x10dc9a,this[_0x4d6a1b(0xfe)]=_0x2fbd84,this[_0x4d6a1b(0x123)]=_0x2d4a1e;}async[_0x347130(0x108)](_0x26071c){const _0x7185a9=_0x347130;var _0x13a5ca,_0x172152;const {parentId:_0x38605f,unitId:_0x40c384,text:_0x460e05,threadId:_0x59eda2}=_0x26071c,_0x553384=(_0x172152=(_0x13a5ca=_0x460e05[_0x7185a9(0x162)])==null?void 0x0:_0x13a5ca[_0x7185a9(0x12e)](_0x4d3e8d=>_0x4d3e8d['rangeType']===c[_0x7185a9(0x15d)][_0x7185a9(0x110)])['map'](_0x1f0153=>_0x1f0153['rangeId']))!=null?_0x172152:[],_0x44e5ec=JSON[_0x7185a9(0x155)](_0x460e05),_0x5df3d3=(await this[_0x7185a9(0x123)][_0x7185a9(0x122)](_0x40c384))[_0x7185a9(0x145)]();if(_0x38605f){const _0x27ceb8={'memberId':_0x5df3d3,'unitId':_0x40c384,'content':_0x44e5ec,'mention':_0x553384,'threadId':_0x59eda2},_0x159c67=(await this['_httpService'][_0x7185a9(0x152)](_0x7185a9(0x104)+_0x40c384+_0x7185a9(0x167),{'body':_0x27ceb8}))[_0x7185a9(0x14c)]['reply'];return{..._0x26071c,'id':_0x159c67[_0x7185a9(0x151)],'dT':c[_0x7185a9(0x139)](+_0x159c67[_0x7185a9(0x116)])['format'](_0x7185a9(0x131)),'personId':_0x159c67[_0x7185a9(0x14a)]};}else{const _0x16cddb={'memberId':_0x5df3d3,'unitId':_0x40c384,'content':_0x44e5ec,'mention':_0x553384},_0x323fb3=await this[_0x7185a9(0x137)][_0x7185a9(0x152)]('/universer-api/comment/unit/'+_0x40c384+'/add',{'body':_0x16cddb});return Y(_0x323fb3[_0x7185a9(0x14c)]['comment'],_0x26071c);}}async[_0x347130(0x11d)](_0x1222f5){const _0x3f048f=_0x347130;var _0x1d3efa,_0x46820d;const {text:_0x38bcfa,unitId:_0xe7b142}=_0x1222f5,_0xa424c2=(_0x46820d=(_0x1d3efa=_0x38bcfa['customRanges'])==null?void 0x0:_0x1d3efa['filter'](_0x3eb56c=>_0x3eb56c['rangeType']===c[_0x3f048f(0x15d)][_0x3f048f(0x110)])[_0x3f048f(0x169)](_0x15d09d=>_0x15d09d[_0x3f048f(0x149)]))!=null?_0x46820d:[],_0x52f380=JSON['stringify'](_0x38bcfa),_0x1c8567=_0x1222f5['threadId'],_0x1301bf=_0x1222f5['id'],_0x12ce35={'memberId':(await this[_0x3f048f(0x123)][_0x3f048f(0x122)](_0xe7b142))['getMemberID'](),'unitId':_0xe7b142,'threadId':_0x1c8567,'mention':_0xa424c2,'content':_0x52f380,'replyId':_0x1301bf},_0x8c80a=await this['_httpService'][_0x3f048f(0x152)](_0x3f048f(0x104)+_0xe7b142+_0x3f048f(0x135),{'body':_0x12ce35});return!_0x8c80a[_0x3f048f(0x14c)][_0x3f048f(0x157)]||_0x8c80a[_0x3f048f(0x14c)][_0x3f048f(0x157)][_0x3f048f(0x106)]===0x1;}async[_0x347130(0x119)](_0x2df55c){const _0x268e70=_0x347130,{unitId:_0x1e98a5}=_0x2df55c,_0x35040e=_0x2df55c[_0x268e70(0x15a)],_0x3cff48={'memberId':this[_0x268e70(0xfe)][_0x268e70(0x141)]()['userID'],'unitId':_0x1e98a5,'threadId':_0x35040e,'solved':_0x2df55c[_0x268e70(0x121)]?I[_0x268e70(0x14e)]:I['OpenOrReOpen']},_0x3775ac=await this[_0x268e70(0x137)][_0x268e70(0x152)](_0x268e70(0x104)+_0x1e98a5+'/solved',{'body':_0x3cff48});return!_0x3775ac[_0x268e70(0x14c)][_0x268e70(0x157)]||_0x3775ac[_0x268e70(0x14c)]['error'][_0x268e70(0x106)]===0x1;}async[_0x347130(0x163)](_0x30ff0b,_0x9f347f,_0x454aa9,_0x27362c){const _0x352717=_0x347130,_0x193070={'memberId':(await this['_sessionService'][_0x352717(0x122)](_0x30ff0b))[_0x352717(0x145)](),'threadId':_0x454aa9,'replyId':_0x27362c,'unitId':_0x30ff0b},_0x143563=await this[_0x352717(0x137)][_0x352717(0x152)](_0x352717(0x104)+_0x30ff0b+_0x352717(0x15f),{'body':_0x193070});return!_0x143563[_0x352717(0x14c)][_0x352717(0x157)]||_0x143563[_0x352717(0x14c)][_0x352717(0x157)][_0x352717(0x106)]===0x1;}async['listComments'](_0x2bb451,_0x1dc388,_0x138ebc){const _0x432f2f=_0x347130,_0x25077d={'unitId':_0x2bb451,'threadId':_0x138ebc},_0x3883b1=await this[_0x432f2f(0x137)][_0x432f2f(0x152)](_0x432f2f(0x104)+_0x2bb451+'/list',{'body':_0x25077d}),_0x4b4baa=_0x138ebc['map'](_0x58dcf1=>G(_0x3883b1[_0x432f2f(0x14c)]['comments'][_0x58dcf1],_0x2bb451,_0x1dc388))[_0x432f2f(0x12e)](Boolean);return Object[_0x432f2f(0x102)](_0x3883b1[_0x432f2f(0x14c)][_0x432f2f(0x124)])[_0x432f2f(0x13b)](_0x124246=>{const _0x3162b2=_0x432f2f;this[_0x3162b2(0xfe)][_0x3162b2(0x164)](_0x124246);}),_0x4b4baa;}[_0x347130(0x147)](_0x5e9bce){const _0x271f47=_0x347130;return{'id':_0x5e9bce['id'],'threadId':_0x5e9bce[_0x271f47(0x15a)],'ref':_0x5e9bce[_0x271f47(0x134)]};}};p=x([C(0x0,c[_0x347130(0x118)](P['HTTPService'])),C(0x1,c[_0x347130(0x118)](c[_0x347130(0x125)])),C(0x2,c[_0x347130(0x118)](b['CollaborationSessionService']))],p);var H=Object[_0x347130(0x166)],J=(_0xf3aa87,_0x16e6f5,_0x444f6b,_0x40b862)=>{const _0xc6e173=_0x347130;for(var _0x253c28=_0x40b862>0x1?void 0x0:_0x40b862?H(_0x16e6f5,_0x444f6b):_0x16e6f5,_0x4c650c=_0xf3aa87[_0xc6e173(0x15b)]-0x1,_0x1c2223;_0x4c650c>=0x0;_0x4c650c--)(_0x1c2223=_0xf3aa87[_0x4c650c])&&(_0x253c28=_0x1c2223(_0x253c28)||_0x253c28);return _0x253c28;},y=(_0xb3739c,_0x39ba2b)=>(_0x5566d0,_0xec8d4b)=>_0x39ba2b(_0x5566d0,_0xec8d4b,_0xb3739c);let g=class extends c[_0x347130(0xfc)]{constructor(_0x49c1d8,_0x2dd1a7){const _0x3ac574=_0x347130;super(),this[_0x3ac574(0x10c)]=_0x49c1d8,this['_threadCommentDataSource']=_0x2dd1a7,this['_initDataSource']();}[_0x347130(0xff)](){const _0x3e8aab=_0x347130;this[_0x3e8aab(0x10c)]['dataSource']=this[_0x3e8aab(0x113)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};function _0x4f64(_0xe4adf,_0x38ae8e){_0xe4adf=_0xe4adf-0xfa;const _0x1d569a=_0x1d56();let _0x4f6459=_0x1d569a[_0xe4adf];return _0x4f6459;}g=J([y(0x0,M[_0x347130(0x109)]),y(0x1,c[_0x347130(0x118)](p))],g);var F=Object[_0x347130(0x115)],L=Object[_0x347130(0x166)],Z=(_0x556c20,_0x3f5363,_0xf766cd)=>_0x3f5363 in _0x556c20?F(_0x556c20,_0x3f5363,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf766cd}):_0x556c20[_0x3f5363]=_0xf766cd,W=(_0x960383,_0x25eed0,_0xdecd40,_0x3ab13c)=>{const _0x1a61da=_0x347130;for(var _0x226990=_0x3ab13c>0x1?void 0x0:_0x3ab13c?L(_0x25eed0,_0xdecd40):_0x25eed0,_0x22aa39=_0x960383[_0x1a61da(0x15b)]-0x1,_0x5e318a;_0x22aa39>=0x0;_0x22aa39--)(_0x5e318a=_0x960383[_0x22aa39])&&(_0x226990=_0x5e318a(_0x226990)||_0x226990);return _0x226990;},O=(_0x15bc18,_0x73925c)=>(_0x3b168b,_0x446da6)=>_0x73925c(_0x3b168b,_0x446da6,_0x15bc18),N=(_0x153f20,_0x12bf76,_0xbad3a6)=>Z(_0x153f20,typeof _0x12bf76!=_0x347130(0x126)?_0x12bf76+'':_0x12bf76,_0xbad3a6);exports[_0x347130(0x14f)]=class extends c['Plugin']{constructor(_0x583899=D,_0x4edc80,_0x2d9b4d){const _0x228247=_0x347130;super(),this['_config']=_0x583899,this[_0x228247(0x107)]=_0x4edc80,this[_0x228247(0x11b)]=_0x2d9b4d;const {..._0x58e7a2}=c['merge']({},D,this['_config']);this[_0x228247(0x11b)][_0x228247(0xfa)](q,_0x58e7a2);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x578e72=>{this['_injector']['add'](_0x578e72);});}[_0x347130(0x146)](){const _0x34ef3f=_0x347130;this[_0x34ef3f(0x107)][_0x34ef3f(0x15e)](g),this[_0x34ef3f(0x107)][_0x34ef3f(0x15e)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x347130(0x14f)],_0x347130(0x165),c[_0x347130(0x15c)][_0x347130(0x153)]),exports[_0x347130(0x14f)]=W([c[_0x347130(0x14d)](w[_0x347130(0x114)],b[_0x347130(0x127)],T[_0x347130(0x156)]),O(0x1,c['Inject'](c[_0x347130(0xfd)])),O(0x2,c['IConfigService'])],exports[_0x347130(0x14f)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x566e92=_0x4978;(function(_0x4151f4,_0x5ba13e){const _0xf53b9=_0x4978,_0x18764d=_0x4151f4();while(!![]){try{const _0x3c4c55=parseInt(_0xf53b9(0x1a4))/0x1+parseInt(_0xf53b9(0x17b))/0x2+parseInt(_0xf53b9(0x1ce))/0x3+-parseInt(_0xf53b9(0x182))/0x4*(-parseInt(_0xf53b9(0x1c0))/0x5)+-parseInt(_0xf53b9(0x18b))/0x6*(parseInt(_0xf53b9(0x1af))/0x7)+parseInt(_0xf53b9(0x1c4))/0x8+-parseInt(_0xf53b9(0x17f))/0x9;if(_0x3c4c55===_0x5ba13e)break;else _0x18764d['push'](_0x18764d['shift']());}catch(_0x1665a7){_0x18764d['push'](_0x18764d['shift']());}}}(_0x246c,0xb11be));import{CommentService as _0x2bf8f1,CollaborationSessionService as _0x19134d,UniverCollaborationClientPlugin as _0x428713}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56de4c}from'@univerjs-pro/license';import{dayjs as _0x2a6e24,UserManagerService as _0x2b454a,Inject as _0x228d0a,Injector as _0x10100d,Disposable as _0x32bfe7,CustomRangeType as _0x5deff7,UniverInstanceType as _0x2ef3d3,DependentOn as _0x512e62,IConfigService as _0x5c0e15,Plugin as _0x4a70cc,merge as _0xa2d842}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f1117}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e792,IThreadCommentDataSourceService as _0x505b6d}from'@univerjs/thread-comment';import{bufferTime as _0x1d13f7}from'rxjs';import{HTTPService as _0x38e1d4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2fe957=>(_0x2fe957[_0x2fe957['OpenOrReOpen']=0x0]=_0x566e92(0x1ad),_0x2fe957[_0x2fe957[_0x566e92(0x192)]=0x1]=_0x566e92(0x192),_0x2fe957[_0x2fe957['UNRECOGNIZED']=-0x1]=_0x566e92(0x1cb),_0x2fe957))(I||{}),v=(_0x22bda5=>(_0x22bda5[_0x22bda5['Unknown']=0x0]='Unknown',_0x22bda5[_0x22bda5[_0x566e92(0x1cf)]=0x1]=_0x566e92(0x1cf),_0x22bda5[_0x22bda5['Reply']=0x2]=_0x566e92(0x1cd),_0x22bda5[_0x22bda5[_0x566e92(0x1b0)]=0x3]=_0x566e92(0x1b0),_0x22bda5[_0x22bda5[_0x566e92(0x1c3)]=0x4]=_0x566e92(0x1c3),_0x22bda5[_0x22bda5['Solve']=0x5]=_0x566e92(0x1a5),_0x22bda5[_0x22bda5[_0x566e92(0x1cb)]=-0x1]=_0x566e92(0x1cb),_0x22bda5))(v||{});const y=_0x2ebf51=>_0x2a6e24(new Date(+_0x2ebf51))[_0x566e92(0x1bb)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x484a1c,_0x2054c6)=>{const _0x562c9c=_0x566e92,_0x5ad13a=_0x484a1c['get'](_0x2b454a),_0x3d2df6=_0x484a1c[_0x562c9c(0x1d5)](_0x38e1d4);_0x2054c6[_0x562c9c(0x1d0)](_0x3331b7=>{const _0x34ad25=_0x562c9c;_0x5ad13a[_0x34ad25(0x1b9)](_0x3331b7)&&_0x2054c6[_0x34ad25(0x17a)](_0x3331b7);}),_0x2054c6[_0x562c9c(0x195)]&&(await _0x3d2df6['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2054c6]}}))[_0x562c9c(0x1b1)]['users'][_0x562c9c(0x1d0)](_0x24e738=>{const _0x2b3ae3=_0x562c9c;_0x24e738&&_0x5ad13a[_0x2b3ae3(0x1d4)](_0x24e738);});};var K=Object[_0x566e92(0x1d9)],V=(_0x3378e3,_0x54873a,_0x33de9a,_0x1f6117)=>{for(var _0x40f0ca=_0x1f6117>0x1?void 0x0:_0x1f6117?K(_0x54873a,_0x33de9a):_0x54873a,_0x3536b5=_0x3378e3['length']-0x1,_0xaa7fde;_0x3536b5>=0x0;_0x3536b5--)(_0xaa7fde=_0x3378e3[_0x3536b5])&&(_0x40f0ca=_0xaa7fde(_0x40f0ca)||_0x40f0ca);return _0x40f0ca;},p=(_0x15fe6a,_0x2d562b)=>(_0x5e8232,_0x42d333)=>_0x2d562b(_0x5e8232,_0x42d333,_0x15fe6a);let _=class extends _0x32bfe7{constructor(_0x2228ee,_0x5edec9,_0x9e9716,_0xc65a00){const _0xa19c23=_0x566e92;super(),this[_0xa19c23(0x1ac)]=_0x2228ee,this[_0xa19c23(0x1a1)]=_0x5edec9,this['_userService']=_0x9e9716,this[_0xa19c23(0x184)]=_0xc65a00,this[_0xa19c23(0x19a)](),this[_0xa19c23(0x185)]();}['_initUserSync'](){const _0x57e692=_0x566e92;this['disposeWithMe'](this[_0x57e692(0x1a1)][_0x57e692(0x1c9)][_0x57e692(0x1d2)](_0x1d13f7(0x10))['subscribe'](_0x2e7828=>{const _0x1f2996=_0x57e692,_0x27d066=new Set();_0x2e7828['forEach'](_0x451d01=>{const _0x160bc1=_0x4978;if(_0x451d01['type']===_0x160bc1(0x18a)){const _0x3c8c0f=_0x451d01[_0x160bc1(0x17c)][_0x160bc1(0x18d)];_0x27d066[_0x160bc1(0x18a)](_0x3c8c0f);}}),B(this[_0x1f2996(0x184)],_0x27d066);}));}[_0x566e92(0x19a)](){const _0xf2abe2=_0x566e92;this[_0xf2abe2(0x1a6)](this['_commentService'][_0xf2abe2(0x1c9)]['subscribe'](async _0x91ed5b=>{const _0x12e023=_0xf2abe2;var _0x55fc1a,_0x41ac85,_0x3a1d81,_0x29c11e;const _0x16b4df=(_0x55fc1a=this['_threadCommentModel']['getUnit'](_0x91ed5b[_0x12e023(0x1b8)])[_0x12e023(0x188)](_0x1ba272=>_0x1ba272[_0x12e023(0x17d)]===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x55fc1a[_0x12e023(0x1c6)];if(!_0x16b4df)return;const {unitId:_0x5c19df,subUnitId:_0x5ac403}=_0x16b4df;switch(_0x91ed5b[_0x12e023(0x196)]&&this[_0x12e023(0x1b5)][_0x12e023(0x1d4)](_0x91ed5b['user']),_0x91ed5b[_0x12e023(0x1c7)]){case v[_0x12e023(0x1cf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x12e023(0x181)](_0x5c19df,_0x5ac403,{'unitId':_0x5c19df,'subUnitId':_0x5ac403,'ref':'','id':_0x91ed5b[_0x12e023(0x1ae)],'dT':y(+_0x91ed5b[_0x12e023(0x1bf)]),'threadId':_0x91ed5b[_0x12e023(0x17d)],'personId':(_0x3a1d81=(_0x41ac85=_0x91ed5b[_0x12e023(0x196)])==null?void 0x0:_0x41ac85['userID'])!=null?_0x3a1d81:_0x91ed5b[_0x12e023(0x19d)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)]),'parentId':_0x16b4df['id']});break;}case v[_0x12e023(0x1c3)]:{const _0x5b3399=this[_0x12e023(0x1a1)]['getComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);_0x5b3399&&_0x5b3399['parentId']&&this[_0x12e023(0x1a1)]['deleteComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);break;}case v[_0x12e023(0x1b0)]:{this['_threadCommentModel'][_0x12e023(0x1ba)](_0x5c19df,_0x5ac403,{'commentId':_0x91ed5b[_0x12e023(0x1ae)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)])});break;}case v[_0x12e023(0x1a5)]:{const _0x1e4aad=(_0x29c11e=this['_threadCommentModel']['getUnit'](_0x91ed5b['unitId'])[_0x12e023(0x188)](_0x9ca084=>_0x9ca084['threadId']===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x29c11e[_0x12e023(0x1c6)];_0x1e4aad&&this[_0x12e023(0x1a1)]['resolveComment'](_0x5c19df,_0x5ac403,_0x1e4aad['id'],_0x91ed5b[_0x12e023(0x1b4)]===I[_0x12e023(0x192)]);break;}}}));}};_=V([p(0x0,_0x228d0a(_0x2bf8f1)),p(0x1,_0x228d0a(_0x53e792)),p(0x2,_0x228d0a(_0x2b454a)),p(0x3,_0x228d0a(_0x10100d))],_);const z=_0x566e92(0x1d8),O={};var k=Object[_0x566e92(0x1d9)],Q=(_0x1c0a2d,_0x336acf,_0x5e89ed,_0x56b986)=>{const _0x535c20=_0x566e92;for(var _0x54fc48=_0x56b986>0x1?void 0x0:_0x56b986?k(_0x336acf,_0x5e89ed):_0x336acf,_0x293dce=_0x1c0a2d[_0x535c20(0x1c1)]-0x1,_0x24429f;_0x293dce>=0x0;_0x293dce--)(_0x24429f=_0x1c0a2d[_0x293dce])&&(_0x54fc48=_0x24429f(_0x54fc48)||_0x54fc48);return _0x54fc48;},b=(_0x4e31dc,_0x1e03ef)=>(_0xfe5e48,_0x5c6a66)=>_0x1e03ef(_0xfe5e48,_0x5c6a66,_0x4e31dc);function X(_0x4dddad,_0x4830a0){const _0x3ed482=_0x566e92,_0x2b3cd6=_0x4dddad[_0x3ed482(0x190)][0x0];return{..._0x4830a0,'id':_0x2b3cd6[_0x3ed482(0x1ae)],'resolved':_0x4dddad['solved']===0x1,'dT':y(_0x2b3cd6[_0x3ed482(0x1bf)]),'personId':_0x2b3cd6['userId'],'threadId':_0x2b3cd6['threadId']};}function ee(_0x315331,_0x5225d0,_0x45cbfb){const _0x41a946=_0x566e92;var _0x2f2781,_0x59de68;if(((_0x59de68=(_0x2f2781=_0x315331==null?void 0x0:_0x315331[_0x41a946(0x190)])==null?void 0x0:_0x2f2781[_0x41a946(0x1c1)])!=null?_0x59de68:0x0)>0x0){const _0x475fe9=(_0x35f434,_0x1146b8)=>({'id':_0x35f434['replyId'],'threadId':_0x35f434['threadId'],'dT':y(_0x35f434[_0x41a946(0x1bf)]),'personId':_0x35f434[_0x41a946(0x19d)],'resolved':_0x315331['solved']===I[_0x41a946(0x192)],'unitId':_0x5225d0,'subUnitId':_0x45cbfb,'text':JSON[_0x41a946(0x1d7)](_0x35f434[_0x41a946(0x19c)]),'parentId':_0x1146b8}),_0x17b98d=_0x475fe9(_0x315331[_0x41a946(0x190)][0x0]);return{..._0x17b98d,'children':_0x315331['replies'][_0x41a946(0x1aa)](0x1)[_0x41a946(0x1c2)](_0x21b9b8=>_0x475fe9(_0x21b9b8,_0x17b98d['id']))};}return null;}function _0x4978(_0x2e8473,_0x14a663){_0x2e8473=_0x2e8473-0x17a;const _0x246c73=_0x246c();let _0x4978ed=_0x246c73[_0x2e8473];return _0x4978ed;}function _0x246c(){const _0x42e02a=['_httpService','unitId','getUser','updateComment','format','/add','_config','reply','createTimestamp','245065UcGrDW','length','map','Delete','2097704pMVOir','_configService','root','type','/delete','commentUpdate$','getMemberID','UNRECOGNIZED','onStarting','Reply','3906726bdBuof','Add','forEach','listComments','pipe','syncUpdateMutationToColla','addUser','get','customRanges','parse','thread-comment-data-source.config','getOwnPropertyDescriptor','values','ref','delete','459266BVNWdE','payload','threadId','/universer-api/comment/unit/','9947007nrrwdv','onReady','addComment','12RudHoH','requireSession','_injector','_initUserSync','_threadCommentDataSourceService','pluginName','find','stringify','add','7473438niRlcW','getCurrentUser','personId','/list','filter','replies','post','Solved','UNIVER_UNKNOWN','comments','size','user','/reply','_threadCommentDataSource','deleteComment','_init','rangeId','content','userId','saveCommentToSnapshot','dataSource','userID','_threadCommentModel','_initDataSource','resolveComment','1135107xIKmJr','Solve','disposeWithMe','code','COMMENT','rangeType','slice','_sessionService','_commentService','OpenOrReOpen','replyId','7hbXvVG','Edit','body','/solved','setConfig','solved','_userService','error'];_0x246c=function(){return _0x42e02a;};return _0x246c();}let S=class{constructor(_0x4635db,_0x2e161b,_0x34cd79){const _0x3eb3d6=_0x566e92;this['_httpService']=_0x4635db,this[_0x3eb3d6(0x1b5)]=_0x2e161b,this[_0x3eb3d6(0x1ab)]=_0x34cd79;}async['addComment'](_0x55d157){const _0x324ee0=_0x566e92;var _0x3f0b43,_0x145f0f;const {parentId:_0x3f8e8c,unitId:_0x1b23e9,text:_0x5b2696,threadId:_0xffca03}=_0x55d157,_0x1ee016=(_0x145f0f=(_0x3f0b43=_0x5b2696['customRanges'])==null?void 0x0:_0x3f0b43[_0x324ee0(0x18f)](_0x398ad0=>_0x398ad0[_0x324ee0(0x1a9)]===_0x5deff7[_0x324ee0(0x1a8)])[_0x324ee0(0x1c2)](_0xbf3763=>_0xbf3763[_0x324ee0(0x19b)]))!=null?_0x145f0f:[],_0x145931=JSON[_0x324ee0(0x189)](_0x5b2696),_0x39f568=(await this[_0x324ee0(0x1ab)][_0x324ee0(0x183)](_0x1b23e9))[_0x324ee0(0x1ca)]();if(_0x3f8e8c){const _0x2802c5={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016,'threadId':_0xffca03},_0x1750e4=(await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x197),{'body':_0x2802c5}))[_0x324ee0(0x1b1)][_0x324ee0(0x1be)];return{..._0x55d157,'id':_0x1750e4[_0x324ee0(0x1ae)],'dT':_0x2a6e24(+_0x1750e4[_0x324ee0(0x1bf)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1750e4[_0x324ee0(0x19d)]};}else{const _0x3b5c8d={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016},_0x52dd8c=await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x1bc),{'body':_0x3b5c8d});return X(_0x52dd8c[_0x324ee0(0x1b1)]['comment'],_0x55d157);}}async[_0x566e92(0x1ba)](_0x26cf02){const _0x45b8de=_0x566e92;var _0x1da307,_0x58c17f;const {text:_0xc6bd56,unitId:_0x11530b}=_0x26cf02,_0x33160=(_0x58c17f=(_0x1da307=_0xc6bd56[_0x45b8de(0x1d6)])==null?void 0x0:_0x1da307[_0x45b8de(0x18f)](_0x219568=>_0x219568[_0x45b8de(0x1a9)]===_0x5deff7['COMMENT'])['map'](_0x494c58=>_0x494c58[_0x45b8de(0x19b)]))!=null?_0x58c17f:[],_0x2f0e0d=JSON['stringify'](_0xc6bd56),_0x1c7215=_0x26cf02[_0x45b8de(0x17d)],_0x5d7214=_0x26cf02['id'],_0x39d2d8={'memberId':(await this['_sessionService'][_0x45b8de(0x183)](_0x11530b))[_0x45b8de(0x1ca)](),'unitId':_0x11530b,'threadId':_0x1c7215,'mention':_0x33160,'content':_0x2f0e0d,'replyId':_0x5d7214},_0x3abf0f=await this[_0x45b8de(0x1b7)]['post'](_0x45b8de(0x17e)+_0x11530b+'/edit',{'body':_0x39d2d8});return!_0x3abf0f[_0x45b8de(0x1b1)]['error']||_0x3abf0f[_0x45b8de(0x1b1)][_0x45b8de(0x1b6)][_0x45b8de(0x1a7)]===0x1;}async[_0x566e92(0x1a3)](_0x4399d9){const _0x11ed0e=_0x566e92,{unitId:_0x3d244e}=_0x4399d9,_0x144746=_0x4399d9['threadId'],_0x5704ee={'memberId':this[_0x11ed0e(0x1b5)][_0x11ed0e(0x18c)]()[_0x11ed0e(0x1a0)],'unitId':_0x3d244e,'threadId':_0x144746,'solved':_0x4399d9['resolved']?I[_0x11ed0e(0x192)]:I[_0x11ed0e(0x1ad)]},_0x6f25b2=await this[_0x11ed0e(0x1b7)]['post'](_0x11ed0e(0x17e)+_0x3d244e+_0x11ed0e(0x1b2),{'body':_0x5704ee});return!_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)]||_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)][_0x11ed0e(0x1a7)]===0x1;}async[_0x566e92(0x199)](_0x431b40,_0xb61162,_0x50c8ee,_0x2d95f2){const _0x720422=_0x566e92,_0x36d9b0={'memberId':(await this[_0x720422(0x1ab)][_0x720422(0x183)](_0x431b40))[_0x720422(0x1ca)](),'threadId':_0x50c8ee,'replyId':_0x2d95f2,'unitId':_0x431b40},_0x30a198=await this[_0x720422(0x1b7)]['post'](_0x720422(0x17e)+_0x431b40+_0x720422(0x1c8),{'body':_0x36d9b0});return!_0x30a198[_0x720422(0x1b1)][_0x720422(0x1b6)]||_0x30a198['body'][_0x720422(0x1b6)][_0x720422(0x1a7)]===0x1;}async[_0x566e92(0x1d1)](_0x34d883,_0x2c75ce,_0x2def2b){const _0x2efd0c=_0x566e92,_0x3127a8={'unitId':_0x34d883,'threadId':_0x2def2b},_0x1a1361=await this[_0x2efd0c(0x1b7)][_0x2efd0c(0x191)]('/universer-api/comment/unit/'+_0x34d883+_0x2efd0c(0x18e),{'body':_0x3127a8}),_0x2b4838=_0x2def2b['map'](_0x496bbe=>ee(_0x1a1361[_0x2efd0c(0x1b1)][_0x2efd0c(0x194)][_0x496bbe],_0x34d883,_0x2c75ce))[_0x2efd0c(0x18f)](Boolean);return Object[_0x2efd0c(0x1da)](_0x1a1361[_0x2efd0c(0x1b1)]['users'])[_0x2efd0c(0x1d0)](_0x204390=>{const _0x53b07d=_0x2efd0c;this[_0x53b07d(0x1b5)][_0x53b07d(0x1d4)](_0x204390);}),_0x2b4838;}[_0x566e92(0x19e)](_0x1c54fb){const _0x44d066=_0x566e92;return{'id':_0x1c54fb['id'],'threadId':_0x1c54fb[_0x44d066(0x17d)],'ref':_0x1c54fb[_0x44d066(0x1db)]};}};S=Q([b(0x0,_0x228d0a(_0x38e1d4)),b(0x1,_0x228d0a(_0x2b454a)),b(0x2,_0x228d0a(_0x19134d))],S);var re=Object[_0x566e92(0x1d9)],te=(_0x4d767c,_0x501601,_0x37ebf1,_0x2ec760)=>{const _0x2dcdb7=_0x566e92;for(var _0xe5d630=_0x2ec760>0x1?void 0x0:_0x2ec760?re(_0x501601,_0x37ebf1):_0x501601,_0x18be74=_0x4d767c[_0x2dcdb7(0x1c1)]-0x1,_0x4b8bc2;_0x18be74>=0x0;_0x18be74--)(_0x4b8bc2=_0x4d767c[_0x18be74])&&(_0xe5d630=_0x4b8bc2(_0xe5d630)||_0xe5d630);return _0xe5d630;},M=(_0x2d48ba,_0x40c9fc)=>(_0x1f0988,_0x2a43ea)=>_0x40c9fc(_0x1f0988,_0x2a43ea,_0x2d48ba);let f=class extends _0x32bfe7{constructor(_0x38c894,_0x2d11c7){const _0x21f561=_0x566e92;super(),this[_0x21f561(0x186)]=_0x38c894,this[_0x21f561(0x198)]=_0x2d11c7,this[_0x21f561(0x1a2)]();}[_0x566e92(0x1a2)](){const _0x38a7e2=_0x566e92;this[_0x38a7e2(0x186)][_0x38a7e2(0x19f)]=this[_0x38a7e2(0x198)],this[_0x38a7e2(0x186)][_0x38a7e2(0x1d3)]=!0x1;}};f=te([M(0x0,_0x505b6d),M(0x1,_0x228d0a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5abbfa,_0x1ad024,_0x4c70f3)=>_0x1ad024 in _0x5abbfa?se(_0x5abbfa,_0x1ad024,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c70f3}):_0x5abbfa[_0x1ad024]=_0x4c70f3,ie=(_0x25f4b1,_0x5a872d,_0x163863,_0x3ea07f)=>{const _0x2e7586=_0x566e92;for(var _0x30f392=_0x3ea07f>0x1?void 0x0:_0x3ea07f?oe(_0x5a872d,_0x163863):_0x5a872d,_0x1fcda5=_0x25f4b1[_0x2e7586(0x1c1)]-0x1,_0x569861;_0x1fcda5>=0x0;_0x1fcda5--)(_0x569861=_0x25f4b1[_0x1fcda5])&&(_0x30f392=_0x569861(_0x30f392)||_0x30f392);return _0x30f392;},N=(_0x5731a1,_0x2f5d71)=>(_0x1d6782,_0x43b46b)=>_0x2f5d71(_0x1d6782,_0x43b46b,_0x5731a1),$=(_0x247c28,_0x865b9a,_0x29865e)=>ne(_0x247c28,typeof _0x865b9a!='symbol'?_0x865b9a+'':_0x865b9a,_0x29865e);let g=class extends _0x4a70cc{constructor(_0x4750d7=O,_0x29d03c,_0x33b68d){const _0x153224=_0x566e92;super(),this[_0x153224(0x1bd)]=_0x4750d7,this['_injector']=_0x29d03c,this[_0x153224(0x1c5)]=_0x33b68d;const {..._0x577e68}=_0xa2d842({},O,this[_0x153224(0x1bd)]);this[_0x153224(0x1c5)][_0x153224(0x1b3)](z,_0x577e68);}[_0x566e92(0x1cc)](){const _0x18610c=_0x566e92;[[S],[f],[_]][_0x18610c(0x1d0)](_0x5acffd=>{const _0x2b5f70=_0x18610c;this['_injector'][_0x2b5f70(0x18a)](_0x5acffd);});}[_0x566e92(0x180)](){const _0x543873=_0x566e92;this[_0x543873(0x184)][_0x543873(0x1d5)](f),this[_0x543873(0x184)]['get'](_);}};$(g,_0x566e92(0x187),W),$(g,_0x566e92(0x1c7),_0x2ef3d3[_0x566e92(0x193)]),g=ie([_0x512e62(_0x3f1117,_0x428713,_0x56de4c),N(0x1,_0x228d0a(_0x10100d)),N(0x2,_0x5c0e15)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x566e92=_0x4978;(function(_0x4151f4,_0x5ba13e){const _0xf53b9=_0x4978,_0x18764d=_0x4151f4();while(!![]){try{const _0x3c4c55=parseInt(_0xf53b9(0x1a4))/0x1+parseInt(_0xf53b9(0x17b))/0x2+parseInt(_0xf53b9(0x1ce))/0x3+-parseInt(_0xf53b9(0x182))/0x4*(-parseInt(_0xf53b9(0x1c0))/0x5)+-parseInt(_0xf53b9(0x18b))/0x6*(parseInt(_0xf53b9(0x1af))/0x7)+parseInt(_0xf53b9(0x1c4))/0x8+-parseInt(_0xf53b9(0x17f))/0x9;if(_0x3c4c55===_0x5ba13e)break;else _0x18764d['push'](_0x18764d['shift']());}catch(_0x1665a7){_0x18764d['push'](_0x18764d['shift']());}}}(_0x246c,0xb11be));import{CommentService as _0x2bf8f1,CollaborationSessionService as _0x19134d,UniverCollaborationClientPlugin as _0x428713}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56de4c}from'@univerjs-pro/license';import{dayjs as _0x2a6e24,UserManagerService as _0x2b454a,Inject as _0x228d0a,Injector as _0x10100d,Disposable as _0x32bfe7,CustomRangeType as _0x5deff7,UniverInstanceType as _0x2ef3d3,DependentOn as _0x512e62,IConfigService as _0x5c0e15,Plugin as _0x4a70cc,merge as _0xa2d842}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f1117}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e792,IThreadCommentDataSourceService as _0x505b6d}from'@univerjs/thread-comment';import{bufferTime as _0x1d13f7}from'rxjs';import{HTTPService as _0x38e1d4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2fe957=>(_0x2fe957[_0x2fe957['OpenOrReOpen']=0x0]=_0x566e92(0x1ad),_0x2fe957[_0x2fe957[_0x566e92(0x192)]=0x1]=_0x566e92(0x192),_0x2fe957[_0x2fe957['UNRECOGNIZED']=-0x1]=_0x566e92(0x1cb),_0x2fe957))(I||{}),v=(_0x22bda5=>(_0x22bda5[_0x22bda5['Unknown']=0x0]='Unknown',_0x22bda5[_0x22bda5[_0x566e92(0x1cf)]=0x1]=_0x566e92(0x1cf),_0x22bda5[_0x22bda5['Reply']=0x2]=_0x566e92(0x1cd),_0x22bda5[_0x22bda5[_0x566e92(0x1b0)]=0x3]=_0x566e92(0x1b0),_0x22bda5[_0x22bda5[_0x566e92(0x1c3)]=0x4]=_0x566e92(0x1c3),_0x22bda5[_0x22bda5['Solve']=0x5]=_0x566e92(0x1a5),_0x22bda5[_0x22bda5[_0x566e92(0x1cb)]=-0x1]=_0x566e92(0x1cb),_0x22bda5))(v||{});const y=_0x2ebf51=>_0x2a6e24(new Date(+_0x2ebf51))[_0x566e92(0x1bb)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x484a1c,_0x2054c6)=>{const _0x562c9c=_0x566e92,_0x5ad13a=_0x484a1c['get'](_0x2b454a),_0x3d2df6=_0x484a1c[_0x562c9c(0x1d5)](_0x38e1d4);_0x2054c6[_0x562c9c(0x1d0)](_0x3331b7=>{const _0x34ad25=_0x562c9c;_0x5ad13a[_0x34ad25(0x1b9)](_0x3331b7)&&_0x2054c6[_0x34ad25(0x17a)](_0x3331b7);}),_0x2054c6[_0x562c9c(0x195)]&&(await _0x3d2df6['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2054c6]}}))[_0x562c9c(0x1b1)]['users'][_0x562c9c(0x1d0)](_0x24e738=>{const _0x2b3ae3=_0x562c9c;_0x24e738&&_0x5ad13a[_0x2b3ae3(0x1d4)](_0x24e738);});};var K=Object[_0x566e92(0x1d9)],V=(_0x3378e3,_0x54873a,_0x33de9a,_0x1f6117)=>{for(var _0x40f0ca=_0x1f6117>0x1?void 0x0:_0x1f6117?K(_0x54873a,_0x33de9a):_0x54873a,_0x3536b5=_0x3378e3['length']-0x1,_0xaa7fde;_0x3536b5>=0x0;_0x3536b5--)(_0xaa7fde=_0x3378e3[_0x3536b5])&&(_0x40f0ca=_0xaa7fde(_0x40f0ca)||_0x40f0ca);return _0x40f0ca;},p=(_0x15fe6a,_0x2d562b)=>(_0x5e8232,_0x42d333)=>_0x2d562b(_0x5e8232,_0x42d333,_0x15fe6a);let _=class extends _0x32bfe7{constructor(_0x2228ee,_0x5edec9,_0x9e9716,_0xc65a00){const _0xa19c23=_0x566e92;super(),this[_0xa19c23(0x1ac)]=_0x2228ee,this[_0xa19c23(0x1a1)]=_0x5edec9,this['_userService']=_0x9e9716,this[_0xa19c23(0x184)]=_0xc65a00,this[_0xa19c23(0x19a)](),this[_0xa19c23(0x185)]();}['_initUserSync'](){const _0x57e692=_0x566e92;this['disposeWithMe'](this[_0x57e692(0x1a1)][_0x57e692(0x1c9)][_0x57e692(0x1d2)](_0x1d13f7(0x10))['subscribe'](_0x2e7828=>{const _0x1f2996=_0x57e692,_0x27d066=new Set();_0x2e7828['forEach'](_0x451d01=>{const _0x160bc1=_0x4978;if(_0x451d01['type']===_0x160bc1(0x18a)){const _0x3c8c0f=_0x451d01[_0x160bc1(0x17c)][_0x160bc1(0x18d)];_0x27d066[_0x160bc1(0x18a)](_0x3c8c0f);}}),B(this[_0x1f2996(0x184)],_0x27d066);}));}[_0x566e92(0x19a)](){const _0xf2abe2=_0x566e92;this[_0xf2abe2(0x1a6)](this['_commentService'][_0xf2abe2(0x1c9)]['subscribe'](async _0x91ed5b=>{const _0x12e023=_0xf2abe2;var _0x55fc1a,_0x41ac85,_0x3a1d81,_0x29c11e;const _0x16b4df=(_0x55fc1a=this['_threadCommentModel']['getUnit'](_0x91ed5b[_0x12e023(0x1b8)])[_0x12e023(0x188)](_0x1ba272=>_0x1ba272[_0x12e023(0x17d)]===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x55fc1a[_0x12e023(0x1c6)];if(!_0x16b4df)return;const {unitId:_0x5c19df,subUnitId:_0x5ac403}=_0x16b4df;switch(_0x91ed5b[_0x12e023(0x196)]&&this[_0x12e023(0x1b5)][_0x12e023(0x1d4)](_0x91ed5b['user']),_0x91ed5b[_0x12e023(0x1c7)]){case v[_0x12e023(0x1cf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x12e023(0x181)](_0x5c19df,_0x5ac403,{'unitId':_0x5c19df,'subUnitId':_0x5ac403,'ref':'','id':_0x91ed5b[_0x12e023(0x1ae)],'dT':y(+_0x91ed5b[_0x12e023(0x1bf)]),'threadId':_0x91ed5b[_0x12e023(0x17d)],'personId':(_0x3a1d81=(_0x41ac85=_0x91ed5b[_0x12e023(0x196)])==null?void 0x0:_0x41ac85['userID'])!=null?_0x3a1d81:_0x91ed5b[_0x12e023(0x19d)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)]),'parentId':_0x16b4df['id']});break;}case v[_0x12e023(0x1c3)]:{const _0x5b3399=this[_0x12e023(0x1a1)]['getComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);_0x5b3399&&_0x5b3399['parentId']&&this[_0x12e023(0x1a1)]['deleteComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);break;}case v[_0x12e023(0x1b0)]:{this['_threadCommentModel'][_0x12e023(0x1ba)](_0x5c19df,_0x5ac403,{'commentId':_0x91ed5b[_0x12e023(0x1ae)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)])});break;}case v[_0x12e023(0x1a5)]:{const _0x1e4aad=(_0x29c11e=this['_threadCommentModel']['getUnit'](_0x91ed5b['unitId'])[_0x12e023(0x188)](_0x9ca084=>_0x9ca084['threadId']===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x29c11e[_0x12e023(0x1c6)];_0x1e4aad&&this[_0x12e023(0x1a1)]['resolveComment'](_0x5c19df,_0x5ac403,_0x1e4aad['id'],_0x91ed5b[_0x12e023(0x1b4)]===I[_0x12e023(0x192)]);break;}}}));}};_=V([p(0x0,_0x228d0a(_0x2bf8f1)),p(0x1,_0x228d0a(_0x53e792)),p(0x2,_0x228d0a(_0x2b454a)),p(0x3,_0x228d0a(_0x10100d))],_);const z=_0x566e92(0x1d8),O={};var k=Object[_0x566e92(0x1d9)],Q=(_0x1c0a2d,_0x336acf,_0x5e89ed,_0x56b986)=>{const _0x535c20=_0x566e92;for(var _0x54fc48=_0x56b986>0x1?void 0x0:_0x56b986?k(_0x336acf,_0x5e89ed):_0x336acf,_0x293dce=_0x1c0a2d[_0x535c20(0x1c1)]-0x1,_0x24429f;_0x293dce>=0x0;_0x293dce--)(_0x24429f=_0x1c0a2d[_0x293dce])&&(_0x54fc48=_0x24429f(_0x54fc48)||_0x54fc48);return _0x54fc48;},b=(_0x4e31dc,_0x1e03ef)=>(_0xfe5e48,_0x5c6a66)=>_0x1e03ef(_0xfe5e48,_0x5c6a66,_0x4e31dc);function X(_0x4dddad,_0x4830a0){const _0x3ed482=_0x566e92,_0x2b3cd6=_0x4dddad[_0x3ed482(0x190)][0x0];return{..._0x4830a0,'id':_0x2b3cd6[_0x3ed482(0x1ae)],'resolved':_0x4dddad['solved']===0x1,'dT':y(_0x2b3cd6[_0x3ed482(0x1bf)]),'personId':_0x2b3cd6['userId'],'threadId':_0x2b3cd6['threadId']};}function ee(_0x315331,_0x5225d0,_0x45cbfb){const _0x41a946=_0x566e92;var _0x2f2781,_0x59de68;if(((_0x59de68=(_0x2f2781=_0x315331==null?void 0x0:_0x315331[_0x41a946(0x190)])==null?void 0x0:_0x2f2781[_0x41a946(0x1c1)])!=null?_0x59de68:0x0)>0x0){const _0x475fe9=(_0x35f434,_0x1146b8)=>({'id':_0x35f434['replyId'],'threadId':_0x35f434['threadId'],'dT':y(_0x35f434[_0x41a946(0x1bf)]),'personId':_0x35f434[_0x41a946(0x19d)],'resolved':_0x315331['solved']===I[_0x41a946(0x192)],'unitId':_0x5225d0,'subUnitId':_0x45cbfb,'text':JSON[_0x41a946(0x1d7)](_0x35f434[_0x41a946(0x19c)]),'parentId':_0x1146b8}),_0x17b98d=_0x475fe9(_0x315331[_0x41a946(0x190)][0x0]);return{..._0x17b98d,'children':_0x315331['replies'][_0x41a946(0x1aa)](0x1)[_0x41a946(0x1c2)](_0x21b9b8=>_0x475fe9(_0x21b9b8,_0x17b98d['id']))};}return null;}function _0x4978(_0x2e8473,_0x14a663){_0x2e8473=_0x2e8473-0x17a;const _0x246c73=_0x246c();let _0x4978ed=_0x246c73[_0x2e8473];return _0x4978ed;}function _0x246c(){const _0x42e02a=['_httpService','unitId','getUser','updateComment','format','/add','_config','reply','createTimestamp','245065UcGrDW','length','map','Delete','2097704pMVOir','_configService','root','type','/delete','commentUpdate$','getMemberID','UNRECOGNIZED','onStarting','Reply','3906726bdBuof','Add','forEach','listComments','pipe','syncUpdateMutationToColla','addUser','get','customRanges','parse','thread-comment-data-source.config','getOwnPropertyDescriptor','values','ref','delete','459266BVNWdE','payload','threadId','/universer-api/comment/unit/','9947007nrrwdv','onReady','addComment','12RudHoH','requireSession','_injector','_initUserSync','_threadCommentDataSourceService','pluginName','find','stringify','add','7473438niRlcW','getCurrentUser','personId','/list','filter','replies','post','Solved','UNIVER_UNKNOWN','comments','size','user','/reply','_threadCommentDataSource','deleteComment','_init','rangeId','content','userId','saveCommentToSnapshot','dataSource','userID','_threadCommentModel','_initDataSource','resolveComment','1135107xIKmJr','Solve','disposeWithMe','code','COMMENT','rangeType','slice','_sessionService','_commentService','OpenOrReOpen','replyId','7hbXvVG','Edit','body','/solved','setConfig','solved','_userService','error'];_0x246c=function(){return _0x42e02a;};return _0x246c();}let S=class{constructor(_0x4635db,_0x2e161b,_0x34cd79){const _0x3eb3d6=_0x566e92;this['_httpService']=_0x4635db,this[_0x3eb3d6(0x1b5)]=_0x2e161b,this[_0x3eb3d6(0x1ab)]=_0x34cd79;}async['addComment'](_0x55d157){const _0x324ee0=_0x566e92;var _0x3f0b43,_0x145f0f;const {parentId:_0x3f8e8c,unitId:_0x1b23e9,text:_0x5b2696,threadId:_0xffca03}=_0x55d157,_0x1ee016=(_0x145f0f=(_0x3f0b43=_0x5b2696['customRanges'])==null?void 0x0:_0x3f0b43[_0x324ee0(0x18f)](_0x398ad0=>_0x398ad0[_0x324ee0(0x1a9)]===_0x5deff7[_0x324ee0(0x1a8)])[_0x324ee0(0x1c2)](_0xbf3763=>_0xbf3763[_0x324ee0(0x19b)]))!=null?_0x145f0f:[],_0x145931=JSON[_0x324ee0(0x189)](_0x5b2696),_0x39f568=(await this[_0x324ee0(0x1ab)][_0x324ee0(0x183)](_0x1b23e9))[_0x324ee0(0x1ca)]();if(_0x3f8e8c){const _0x2802c5={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016,'threadId':_0xffca03},_0x1750e4=(await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x197),{'body':_0x2802c5}))[_0x324ee0(0x1b1)][_0x324ee0(0x1be)];return{..._0x55d157,'id':_0x1750e4[_0x324ee0(0x1ae)],'dT':_0x2a6e24(+_0x1750e4[_0x324ee0(0x1bf)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1750e4[_0x324ee0(0x19d)]};}else{const _0x3b5c8d={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016},_0x52dd8c=await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x1bc),{'body':_0x3b5c8d});return X(_0x52dd8c[_0x324ee0(0x1b1)]['comment'],_0x55d157);}}async[_0x566e92(0x1ba)](_0x26cf02){const _0x45b8de=_0x566e92;var _0x1da307,_0x58c17f;const {text:_0xc6bd56,unitId:_0x11530b}=_0x26cf02,_0x33160=(_0x58c17f=(_0x1da307=_0xc6bd56[_0x45b8de(0x1d6)])==null?void 0x0:_0x1da307[_0x45b8de(0x18f)](_0x219568=>_0x219568[_0x45b8de(0x1a9)]===_0x5deff7['COMMENT'])['map'](_0x494c58=>_0x494c58[_0x45b8de(0x19b)]))!=null?_0x58c17f:[],_0x2f0e0d=JSON['stringify'](_0xc6bd56),_0x1c7215=_0x26cf02[_0x45b8de(0x17d)],_0x5d7214=_0x26cf02['id'],_0x39d2d8={'memberId':(await this['_sessionService'][_0x45b8de(0x183)](_0x11530b))[_0x45b8de(0x1ca)](),'unitId':_0x11530b,'threadId':_0x1c7215,'mention':_0x33160,'content':_0x2f0e0d,'replyId':_0x5d7214},_0x3abf0f=await this[_0x45b8de(0x1b7)]['post'](_0x45b8de(0x17e)+_0x11530b+'/edit',{'body':_0x39d2d8});return!_0x3abf0f[_0x45b8de(0x1b1)]['error']||_0x3abf0f[_0x45b8de(0x1b1)][_0x45b8de(0x1b6)][_0x45b8de(0x1a7)]===0x1;}async[_0x566e92(0x1a3)](_0x4399d9){const _0x11ed0e=_0x566e92,{unitId:_0x3d244e}=_0x4399d9,_0x144746=_0x4399d9['threadId'],_0x5704ee={'memberId':this[_0x11ed0e(0x1b5)][_0x11ed0e(0x18c)]()[_0x11ed0e(0x1a0)],'unitId':_0x3d244e,'threadId':_0x144746,'solved':_0x4399d9['resolved']?I[_0x11ed0e(0x192)]:I[_0x11ed0e(0x1ad)]},_0x6f25b2=await this[_0x11ed0e(0x1b7)]['post'](_0x11ed0e(0x17e)+_0x3d244e+_0x11ed0e(0x1b2),{'body':_0x5704ee});return!_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)]||_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)][_0x11ed0e(0x1a7)]===0x1;}async[_0x566e92(0x199)](_0x431b40,_0xb61162,_0x50c8ee,_0x2d95f2){const _0x720422=_0x566e92,_0x36d9b0={'memberId':(await this[_0x720422(0x1ab)][_0x720422(0x183)](_0x431b40))[_0x720422(0x1ca)](),'threadId':_0x50c8ee,'replyId':_0x2d95f2,'unitId':_0x431b40},_0x30a198=await this[_0x720422(0x1b7)]['post'](_0x720422(0x17e)+_0x431b40+_0x720422(0x1c8),{'body':_0x36d9b0});return!_0x30a198[_0x720422(0x1b1)][_0x720422(0x1b6)]||_0x30a198['body'][_0x720422(0x1b6)][_0x720422(0x1a7)]===0x1;}async[_0x566e92(0x1d1)](_0x34d883,_0x2c75ce,_0x2def2b){const _0x2efd0c=_0x566e92,_0x3127a8={'unitId':_0x34d883,'threadId':_0x2def2b},_0x1a1361=await this[_0x2efd0c(0x1b7)][_0x2efd0c(0x191)]('/universer-api/comment/unit/'+_0x34d883+_0x2efd0c(0x18e),{'body':_0x3127a8}),_0x2b4838=_0x2def2b['map'](_0x496bbe=>ee(_0x1a1361[_0x2efd0c(0x1b1)][_0x2efd0c(0x194)][_0x496bbe],_0x34d883,_0x2c75ce))[_0x2efd0c(0x18f)](Boolean);return Object[_0x2efd0c(0x1da)](_0x1a1361[_0x2efd0c(0x1b1)]['users'])[_0x2efd0c(0x1d0)](_0x204390=>{const _0x53b07d=_0x2efd0c;this[_0x53b07d(0x1b5)][_0x53b07d(0x1d4)](_0x204390);}),_0x2b4838;}[_0x566e92(0x19e)](_0x1c54fb){const _0x44d066=_0x566e92;return{'id':_0x1c54fb['id'],'threadId':_0x1c54fb[_0x44d066(0x17d)],'ref':_0x1c54fb[_0x44d066(0x1db)]};}};S=Q([b(0x0,_0x228d0a(_0x38e1d4)),b(0x1,_0x228d0a(_0x2b454a)),b(0x2,_0x228d0a(_0x19134d))],S);var re=Object[_0x566e92(0x1d9)],te=(_0x4d767c,_0x501601,_0x37ebf1,_0x2ec760)=>{const _0x2dcdb7=_0x566e92;for(var _0xe5d630=_0x2ec760>0x1?void 0x0:_0x2ec760?re(_0x501601,_0x37ebf1):_0x501601,_0x18be74=_0x4d767c[_0x2dcdb7(0x1c1)]-0x1,_0x4b8bc2;_0x18be74>=0x0;_0x18be74--)(_0x4b8bc2=_0x4d767c[_0x18be74])&&(_0xe5d630=_0x4b8bc2(_0xe5d630)||_0xe5d630);return _0xe5d630;},M=(_0x2d48ba,_0x40c9fc)=>(_0x1f0988,_0x2a43ea)=>_0x40c9fc(_0x1f0988,_0x2a43ea,_0x2d48ba);let f=class extends _0x32bfe7{constructor(_0x38c894,_0x2d11c7){const _0x21f561=_0x566e92;super(),this[_0x21f561(0x186)]=_0x38c894,this[_0x21f561(0x198)]=_0x2d11c7,this[_0x21f561(0x1a2)]();}[_0x566e92(0x1a2)](){const _0x38a7e2=_0x566e92;this[_0x38a7e2(0x186)][_0x38a7e2(0x19f)]=this[_0x38a7e2(0x198)],this[_0x38a7e2(0x186)][_0x38a7e2(0x1d3)]=!0x1;}};f=te([M(0x0,_0x505b6d),M(0x1,_0x228d0a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5abbfa,_0x1ad024,_0x4c70f3)=>_0x1ad024 in _0x5abbfa?se(_0x5abbfa,_0x1ad024,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c70f3}):_0x5abbfa[_0x1ad024]=_0x4c70f3,ie=(_0x25f4b1,_0x5a872d,_0x163863,_0x3ea07f)=>{const _0x2e7586=_0x566e92;for(var _0x30f392=_0x3ea07f>0x1?void 0x0:_0x3ea07f?oe(_0x5a872d,_0x163863):_0x5a872d,_0x1fcda5=_0x25f4b1[_0x2e7586(0x1c1)]-0x1,_0x569861;_0x1fcda5>=0x0;_0x1fcda5--)(_0x569861=_0x25f4b1[_0x1fcda5])&&(_0x30f392=_0x569861(_0x30f392)||_0x30f392);return _0x30f392;},N=(_0x5731a1,_0x2f5d71)=>(_0x1d6782,_0x43b46b)=>_0x2f5d71(_0x1d6782,_0x43b46b,_0x5731a1),$=(_0x247c28,_0x865b9a,_0x29865e)=>ne(_0x247c28,typeof _0x865b9a!='symbol'?_0x865b9a+'':_0x865b9a,_0x29865e);let g=class extends _0x4a70cc{constructor(_0x4750d7=O,_0x29d03c,_0x33b68d){const _0x153224=_0x566e92;super(),this[_0x153224(0x1bd)]=_0x4750d7,this['_injector']=_0x29d03c,this[_0x153224(0x1c5)]=_0x33b68d;const {..._0x577e68}=_0xa2d842({},O,this[_0x153224(0x1bd)]);this[_0x153224(0x1c5)][_0x153224(0x1b3)](z,_0x577e68);}[_0x566e92(0x1cc)](){const _0x18610c=_0x566e92;[[S],[f],[_]][_0x18610c(0x1d0)](_0x5acffd=>{const _0x2b5f70=_0x18610c;this['_injector'][_0x2b5f70(0x18a)](_0x5acffd);});}[_0x566e92(0x180)](){const _0x543873=_0x566e92;this[_0x543873(0x184)][_0x543873(0x1d5)](f),this[_0x543873(0x184)]['get'](_);}};$(g,_0x566e92(0x187),W),$(g,_0x566e92(0x1c7),_0x2ef3d3[_0x566e92(0x193)]),g=ie([_0x512e62(_0x3f1117,_0x428713,_0x56de4c),N(0x1,_0x228d0a(_0x10100d)),N(0x2,_0x5c0e15)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x429c(_0x514cc1,_0x15e815){_0x514cc1=_0x514cc1-0xe3;const _0x57f2ee=_0x57f2();let _0x429ce1=_0x57f2ee[_0x514cc1];return _0x429ce1;}(function(_0x197a96,_0x2a0c0a){const _0x3f671a=_0x429c,_0x6bcca1=_0x197a96();while(!![]){try{const _0xbf5d27=-parseInt(_0x3f671a(0x119))/0x1*(parseInt(_0x3f671a(0xf3))/0x2)+-parseInt(_0x3f671a(0xfc))/0x3*(parseInt(_0x3f671a(0x13f))/0x4)+-parseInt(_0x3f671a(0xe9))/0x5*(-parseInt(_0x3f671a(0x122))/0x6)+parseInt(_0x3f671a(0x158))/0x7+parseInt(_0x3f671a(0x14f))/0x8*(-parseInt(_0x3f671a(0x107))/0x9)+-parseInt(_0x3f671a(0x124))/0xa+-parseInt(_0x3f671a(0x15b))/0xb*(-parseInt(_0x3f671a(0x137))/0xc);if(_0xbf5d27===_0x2a0c0a)break;else _0x6bcca1['push'](_0x6bcca1['shift']());}catch(_0x2e5293){_0x6bcca1['push'](_0x6bcca1['shift']());}}}(_0x57f2,0x770db),function(_0x2bf953,_0x1c05ec){const _0x2d42aa=_0x429c;typeof exports=='object'&&typeof module<'u'?_0x1c05ec(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==_0x2d42aa(0x101)&&define[_0x2d42aa(0x152)]?define([_0x2d42aa(0x10e),_0x2d42aa(0x132),_0x2d42aa(0x14e),_0x2d42aa(0x12e),_0x2d42aa(0x125),_0x2d42aa(0xf5),_0x2d42aa(0xf0),_0x2d42aa(0x104)],_0x1c05ec):(_0x2bf953=typeof globalThis<'u'?globalThis:_0x2bf953||self,_0x1c05ec(_0x2bf953['UniverProThreadCommentDatasource']={},_0x2bf953[_0x2d42aa(0x140)],_0x2bf953[_0x2d42aa(0x13a)],_0x2bf953['UniverCore'],_0x2bf953['UniverThreadCommentUi'],_0x2bf953[_0x2d42aa(0x10b)],_0x2bf953[_0x2d42aa(0xf0)],_0x2bf953[_0x2d42aa(0xed)]));}(this,function(_0x2e86e2,_0x101de3,_0x572db9,_0x5edd3f,_0x525bd8,_0x5b30bc,_0x498f71,_0x431989){'use strict';const _0x263c48=_0x429c;const _0x907ed='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3342ea=(_0x189a1e=>(_0x189a1e[_0x189a1e[_0x263c48(0x14d)]=0x0]='OpenOrReOpen',_0x189a1e[_0x189a1e[_0x263c48(0x142)]=0x1]=_0x263c48(0x142),_0x189a1e[_0x189a1e[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x189a1e))(_0x3342ea||{}),_0x4e3d4b=(_0x29383a=>(_0x29383a[_0x29383a[_0x263c48(0x155)]=0x0]='Unknown',_0x29383a[_0x29383a['Add']=0x1]=_0x263c48(0x109),_0x29383a[_0x29383a['Reply']=0x2]=_0x263c48(0x165),_0x29383a[_0x29383a[_0x263c48(0x10a)]=0x3]=_0x263c48(0x10a),_0x29383a[_0x29383a[_0x263c48(0x11a)]=0x4]=_0x263c48(0x11a),_0x29383a[_0x29383a['Solve']=0x5]='Solve',_0x29383a[_0x29383a[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x29383a))(_0x4e3d4b||{});const _0x10e43f=_0x31d7cb=>_0x5edd3f[_0x263c48(0x13e)](new Date(+_0x31d7cb))[_0x263c48(0xe6)](_0x263c48(0x134)),_0x23ebbc=async(_0x3a3613,_0x36592e)=>{const _0x510563=_0x263c48,_0x17466b=_0x3a3613[_0x510563(0x11b)](_0x5edd3f['UserManagerService']),_0x1324f6=_0x3a3613[_0x510563(0x11b)](_0x431989[_0x510563(0xef)]);_0x36592e[_0x510563(0xfa)](_0x10f3c6=>{const _0x51408f=_0x510563;_0x17466b[_0x51408f(0x161)](_0x10f3c6)&&_0x36592e['delete'](_0x10f3c6);}),_0x36592e['size']&&(await _0x1324f6[_0x510563(0x11b)](_0x510563(0x13c),{'params':{'userIDs':[..._0x36592e]}}))[_0x510563(0x10d)]['users'][_0x510563(0xfa)](_0x5130e3=>{_0x5130e3&&_0x17466b['addUser'](_0x5130e3);});};var _0x2c570c=Object[_0x263c48(0x157)],_0x46261c=(_0x59377d,_0x50994b,_0x3a49,_0x5ec3c2)=>{for(var _0x30b3da=_0x5ec3c2>0x1?void 0x0:_0x5ec3c2?_0x2c570c(_0x50994b,_0x3a49):_0x50994b,_0x3ba2c4=_0x59377d['length']-0x1,_0x53c46e;_0x3ba2c4>=0x0;_0x3ba2c4--)(_0x53c46e=_0x59377d[_0x3ba2c4])&&(_0x30b3da=_0x53c46e(_0x30b3da)||_0x30b3da);return _0x30b3da;},_0x4fbd81=(_0x5206a2,_0x589d41)=>(_0x588db2,_0x4160cf)=>_0x589d41(_0x588db2,_0x4160cf,_0x5206a2);let _0x6779bf=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x2677ba,_0xcea4d6,_0x4c2744,_0x3dd4c5){const _0x50994d=_0x263c48;super(),this[_0x50994d(0xf9)]=_0x2677ba,this[_0x50994d(0xfe)]=_0xcea4d6,this[_0x50994d(0x118)]=_0x4c2744,this[_0x50994d(0x133)]=_0x3dd4c5,this[_0x50994d(0x129)](),this[_0x50994d(0x117)]();}[_0x263c48(0x117)](){const _0x4d1550=_0x263c48;this[_0x4d1550(0x113)](this['_threadCommentModel'][_0x4d1550(0xf2)][_0x4d1550(0x120)](_0x498f71[_0x4d1550(0x100)](0x10))[_0x4d1550(0xe3)](_0x4435b5=>{const _0x3240f9=_0x4d1550,_0x962c49=new Set();_0x4435b5[_0x3240f9(0xfa)](_0x45e45d=>{const _0x502c22=_0x3240f9;if(_0x45e45d[_0x502c22(0xf4)]===_0x502c22(0x154)){const _0x3f30ba=_0x45e45d[_0x502c22(0x146)][_0x502c22(0xf1)];_0x962c49[_0x502c22(0x154)](_0x3f30ba);}}),_0x23ebbc(this['_injector'],_0x962c49);}));}['_init'](){const _0x4f4c00=_0x263c48;this[_0x4f4c00(0x113)](this[_0x4f4c00(0xf9)][_0x4f4c00(0xf2)][_0x4f4c00(0xe3)](async _0x5e5861=>{const _0x53eff6=_0x4f4c00;var _0x21e5b3,_0x111f94,_0x2a4076,_0x12d42c;const _0x372544=(_0x21e5b3=this[_0x53eff6(0xfe)]['getUnit'](_0x5e5861['unitId'])[_0x53eff6(0x111)](_0x4bdc1b=>_0x4bdc1b[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x21e5b3[_0x53eff6(0x141)];if(!_0x372544)return;const {unitId:_0x24f2ef,subUnitId:_0xf99ec7}=_0x372544;switch(_0x5e5861[_0x53eff6(0xfd)]&&this[_0x53eff6(0x118)][_0x53eff6(0x138)](_0x5e5861['user']),_0x5e5861[_0x53eff6(0xf4)]){case _0x4e3d4b['Add']:break;case _0x4e3d4b['Reply']:{this[_0x53eff6(0xfe)][_0x53eff6(0x108)](_0x24f2ef,_0xf99ec7,{'unitId':_0x24f2ef,'subUnitId':_0xf99ec7,'ref':'','id':_0x5e5861[_0x53eff6(0x149)],'dT':_0x10e43f(+_0x5e5861[_0x53eff6(0xe7)]),'threadId':_0x5e5861['threadId'],'personId':(_0x2a4076=(_0x111f94=_0x5e5861['user'])==null?void 0x0:_0x111f94['userID'])!=null?_0x2a4076:_0x5e5861['userId'],'text':JSON['parse'](_0x5e5861['content']),'parentId':_0x372544['id']});break;}case _0x4e3d4b[_0x53eff6(0x11a)]:{const _0x27b98b=this[_0x53eff6(0xfe)][_0x53eff6(0x115)](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);_0x27b98b&&_0x27b98b[_0x53eff6(0x151)]&&this[_0x53eff6(0xfe)]['deleteComment'](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);break;}case _0x4e3d4b[_0x53eff6(0x10a)]:{this[_0x53eff6(0xfe)]['updateComment'](_0x24f2ef,_0xf99ec7,{'commentId':_0x5e5861[_0x53eff6(0x149)],'text':JSON[_0x53eff6(0x121)](_0x5e5861[_0x53eff6(0x130)])});break;}case _0x4e3d4b[_0x53eff6(0x14a)]:{const _0x1a0549=(_0x12d42c=this[_0x53eff6(0xfe)][_0x53eff6(0x12b)](_0x5e5861[_0x53eff6(0x123)])['find'](_0x1fb3a6=>_0x1fb3a6[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x12d42c[_0x53eff6(0x141)];_0x1a0549&&this['_threadCommentModel'][_0x53eff6(0x13b)](_0x24f2ef,_0xf99ec7,_0x1a0549['id'],_0x5e5861['solved']===_0x3342ea[_0x53eff6(0x142)]);break;}}}));}};_0x6779bf=_0x46261c([_0x4fbd81(0x0,_0x5edd3f[_0x263c48(0x105)](_0x101de3['CommentService'])),_0x4fbd81(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5b30bc[_0x263c48(0xf7)])),_0x4fbd81(0x2,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x4fbd81(0x3,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f['Injector']))],_0x6779bf);const _0x12ca71=_0x263c48(0x15e),_0x1c0e90={};var _0x1944b1=Object[_0x263c48(0x157)],_0x5ac215=(_0x1e6b68,_0x2354e7,_0x1902bd,_0xa61d8d)=>{for(var _0x5824a1=_0xa61d8d>0x1?void 0x0:_0xa61d8d?_0x1944b1(_0x2354e7,_0x1902bd):_0x2354e7,_0x58eea1=_0x1e6b68['length']-0x1,_0x2725c9;_0x58eea1>=0x0;_0x58eea1--)(_0x2725c9=_0x1e6b68[_0x58eea1])&&(_0x5824a1=_0x2725c9(_0x5824a1)||_0x5824a1);return _0x5824a1;},_0x34f093=(_0x1f2d59,_0x1932a3)=>(_0x31e27a,_0x39f6bc)=>_0x1932a3(_0x31e27a,_0x39f6bc,_0x1f2d59);function _0x1609c2(_0x306cb3,_0x29d0ef){const _0xe5944=_0x263c48,_0x27d389=_0x306cb3['replies'][0x0];return{..._0x29d0ef,'id':_0x27d389[_0xe5944(0x149)],'resolved':_0x306cb3['solved']===0x1,'dT':_0x10e43f(_0x27d389[_0xe5944(0xe7)]),'personId':_0x27d389[_0xe5944(0x131)],'threadId':_0x27d389[_0xe5944(0x15a)]};}function _0x34bcd1(_0x3747dd,_0x3c5601,_0x46a0ea){const _0x160d94=_0x263c48;var _0x50b01c,_0x56c518;if(((_0x56c518=(_0x50b01c=_0x3747dd==null?void 0x0:_0x3747dd[_0x160d94(0x163)])==null?void 0x0:_0x50b01c[_0x160d94(0x136)])!=null?_0x56c518:0x0)>0x0){const _0x6cd6ee=(_0x1c1d06,_0x37490a)=>({'id':_0x1c1d06[_0x160d94(0x149)],'threadId':_0x1c1d06[_0x160d94(0x15a)],'dT':_0x10e43f(_0x1c1d06[_0x160d94(0xe7)]),'personId':_0x1c1d06[_0x160d94(0x131)],'resolved':_0x3747dd['solved']===_0x3342ea[_0x160d94(0x142)],'unitId':_0x3c5601,'subUnitId':_0x46a0ea,'text':JSON[_0x160d94(0x121)](_0x1c1d06[_0x160d94(0x130)]),'parentId':_0x37490a}),_0x567fa1=_0x6cd6ee(_0x3747dd[_0x160d94(0x163)][0x0]);return{..._0x567fa1,'children':_0x3747dd['replies'][_0x160d94(0x15f)](0x1)['map'](_0x558c53=>_0x6cd6ee(_0x558c53,_0x567fa1['id']))};}return null;}let _0x19c89e=class{constructor(_0x257441,_0x100dac,_0xea8ec1){const _0x58a913=_0x263c48;this[_0x58a913(0x14c)]=_0x257441,this[_0x58a913(0x118)]=_0x100dac,this[_0x58a913(0xee)]=_0xea8ec1;}async['addComment'](_0x1d36e2){const _0x41d359=_0x263c48;var _0x474b99,_0x3a7801;const {parentId:_0x5a081d,unitId:_0x396374,text:_0x39c947,threadId:_0x347963}=_0x1d36e2,_0x4fec81=(_0x3a7801=(_0x474b99=_0x39c947[_0x41d359(0x112)])==null?void 0x0:_0x474b99['filter'](_0x54ab58=>_0x54ab58['rangeType']===_0x5edd3f[_0x41d359(0x150)][_0x41d359(0xea)])[_0x41d359(0x147)](_0x5c5c4f=>_0x5c5c4f['rangeId']))!=null?_0x3a7801:[],_0xf759ed=JSON[_0x41d359(0x144)](_0x39c947),_0x5a5ac7=(await this[_0x41d359(0xee)][_0x41d359(0x11f)](_0x396374))['getMemberID']();if(_0x5a081d){const _0x35700e={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81,'threadId':_0x347963},_0x4d5dbe=(await this['_httpService'][_0x41d359(0x135)]('/universer-api/comment/unit/'+_0x396374+_0x41d359(0x12f),{'body':_0x35700e}))[_0x41d359(0x10d)][_0x41d359(0x116)];return{..._0x1d36e2,'id':_0x4d5dbe[_0x41d359(0x149)],'dT':_0x5edd3f[_0x41d359(0x13e)](+_0x4d5dbe[_0x41d359(0xe7)])[_0x41d359(0xe6)](_0x41d359(0x134)),'personId':_0x4d5dbe[_0x41d359(0x131)]};}else{const _0x1a74f1={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81},_0x4066c2=await this[_0x41d359(0x14c)][_0x41d359(0x135)](_0x41d359(0xeb)+_0x396374+_0x41d359(0xe5),{'body':_0x1a74f1});return _0x1609c2(_0x4066c2[_0x41d359(0x10d)]['comment'],_0x1d36e2);}}async[_0x263c48(0x159)](_0x3ccf29){const _0x17a38e=_0x263c48;var _0x5e0cf4,_0x14eea9;const {text:_0x3eed50,unitId:_0x506b96}=_0x3ccf29,_0x20980e=(_0x14eea9=(_0x5e0cf4=_0x3eed50['customRanges'])==null?void 0x0:_0x5e0cf4['filter'](_0x226f4b=>_0x226f4b[_0x17a38e(0xe8)]===_0x5edd3f[_0x17a38e(0x150)][_0x17a38e(0xea)])[_0x17a38e(0x147)](_0x5b5b3a=>_0x5b5b3a[_0x17a38e(0x139)]))!=null?_0x14eea9:[],_0x56e599=JSON[_0x17a38e(0x144)](_0x3eed50),_0x6fc3ed=_0x3ccf29[_0x17a38e(0x15a)],_0x5e9b73=_0x3ccf29['id'],_0x48f79c={'memberId':(await this['_sessionService']['requireSession'](_0x506b96))['getMemberID'](),'unitId':_0x506b96,'threadId':_0x6fc3ed,'mention':_0x20980e,'content':_0x56e599,'replyId':_0x5e9b73},_0x1315bb=await this['_httpService'][_0x17a38e(0x135)]('/universer-api/comment/unit/'+_0x506b96+_0x17a38e(0x164),{'body':_0x48f79c});return!_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)]||_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)][_0x17a38e(0x12d)]===0x1;}async['resolveComment'](_0x1e897b){const _0x141703=_0x263c48,{unitId:_0x276d22}=_0x1e897b,_0x177686=_0x1e897b[_0x141703(0x15a)],_0x5f1f60={'memberId':this[_0x141703(0x118)]['getCurrentUser']()['userID'],'unitId':_0x276d22,'threadId':_0x177686,'solved':_0x1e897b['resolved']?_0x3342ea[_0x141703(0x142)]:_0x3342ea[_0x141703(0x14d)]},_0x1133d6=await this[_0x141703(0x14c)]['post'](_0x141703(0xeb)+_0x276d22+_0x141703(0x127),{'body':_0x5f1f60});return!_0x1133d6['body'][_0x141703(0x114)]||_0x1133d6[_0x141703(0x10d)][_0x141703(0x114)][_0x141703(0x12d)]===0x1;}async['deleteComment'](_0x391c99,_0xd17749,_0x81214,_0x4641d4){const _0x1f7102=_0x263c48,_0x27c233={'memberId':(await this[_0x1f7102(0xee)][_0x1f7102(0x11f)](_0x391c99))[_0x1f7102(0x10c)](),'threadId':_0x81214,'replyId':_0x4641d4,'unitId':_0x391c99},_0x2ff54e=await this['_httpService'][_0x1f7102(0x135)](_0x1f7102(0xeb)+_0x391c99+'/delete',{'body':_0x27c233});return!_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)]||_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)][_0x1f7102(0x12d)]===0x1;}async[_0x263c48(0xec)](_0x9b4fd8,_0x5a07ce,_0xcb10fc){const _0xb7121a=_0x263c48,_0x414c68={'unitId':_0x9b4fd8,'threadId':_0xcb10fc},_0x3e24d5=await this[_0xb7121a(0x14c)][_0xb7121a(0x135)]('/universer-api/comment/unit/'+_0x9b4fd8+'/list',{'body':_0x414c68}),_0x200b6c=_0xcb10fc[_0xb7121a(0x147)](_0x118d42=>_0x34bcd1(_0x3e24d5['body']['comments'][_0x118d42],_0x9b4fd8,_0x5a07ce))[_0xb7121a(0x167)](Boolean);return Object[_0xb7121a(0xf6)](_0x3e24d5[_0xb7121a(0x10d)]['users'])[_0xb7121a(0xfa)](_0x12205d=>{const _0x1f20eb=_0xb7121a;this['_userService'][_0x1f20eb(0x138)](_0x12205d);}),_0x200b6c;}[_0x263c48(0x153)](_0x5c1cbb){const _0xca3fce=_0x263c48;return{'id':_0x5c1cbb['id'],'threadId':_0x5c1cbb['threadId'],'ref':_0x5c1cbb[_0xca3fce(0x11e)]};}};_0x19c89e=_0x5ac215([_0x34f093(0x0,_0x5edd3f[_0x263c48(0x105)](_0x431989[_0x263c48(0xef)])),_0x34f093(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x34f093(0x2,_0x5edd3f[_0x263c48(0x105)](_0x101de3[_0x263c48(0x110)]))],_0x19c89e);var _0x3af1fe=Object[_0x263c48(0x157)],_0x509cdb=(_0x1ffe20,_0x1e99ff,_0x30bcc0,_0x3bde0b)=>{const _0x586528=_0x263c48;for(var _0x102958=_0x3bde0b>0x1?void 0x0:_0x3bde0b?_0x3af1fe(_0x1e99ff,_0x30bcc0):_0x1e99ff,_0x4450aa=_0x1ffe20[_0x586528(0x136)]-0x1,_0x4fe9b8;_0x4450aa>=0x0;_0x4450aa--)(_0x4fe9b8=_0x1ffe20[_0x4450aa])&&(_0x102958=_0x4fe9b8(_0x102958)||_0x102958);return _0x102958;},_0x305309=(_0x47c6aa,_0x340e33)=>(_0x29236d,_0x2b420f)=>_0x340e33(_0x29236d,_0x2b420f,_0x47c6aa);let _0x4dd3c9=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x3b4b00,_0x32e66d){const _0x29d10d=_0x263c48;super(),this[_0x29d10d(0x148)]=_0x3b4b00,this['_threadCommentDataSource']=_0x32e66d,this[_0x29d10d(0x102)]();}[_0x263c48(0x102)](){const _0x1ceb63=_0x263c48;this[_0x1ceb63(0x148)]['dataSource']=this[_0x1ceb63(0x15d)],this[_0x1ceb63(0x148)][_0x1ceb63(0x12a)]=!0x1;}};_0x4dd3c9=_0x509cdb([_0x305309(0x0,_0x5b30bc['IThreadCommentDataSourceService']),_0x305309(0x1,_0x5edd3f['Inject'](_0x19c89e))],_0x4dd3c9);var _0x54904a=Object[_0x263c48(0x162)],_0x21b3b5=Object[_0x263c48(0x157)],_0x4e2eb3=(_0x36ecf8,_0x4966b0,_0x401b83)=>_0x4966b0 in _0x36ecf8?_0x54904a(_0x36ecf8,_0x4966b0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x401b83}):_0x36ecf8[_0x4966b0]=_0x401b83,_0xf6cd56=(_0x3615a2,_0x595323,_0x350e3e,_0x404de0)=>{const _0x363896=_0x263c48;for(var _0x3dd8a8=_0x404de0>0x1?void 0x0:_0x404de0?_0x21b3b5(_0x595323,_0x350e3e):_0x595323,_0xb42d7=_0x3615a2[_0x363896(0x136)]-0x1,_0x1ae9fa;_0xb42d7>=0x0;_0xb42d7--)(_0x1ae9fa=_0x3615a2[_0xb42d7])&&(_0x3dd8a8=_0x1ae9fa(_0x3dd8a8)||_0x3dd8a8);return _0x3dd8a8;},_0x58fd34=(_0x2e9c8b,_0xc4aec2)=>(_0x4d8a2b,_0xfd1169)=>_0xc4aec2(_0x4d8a2b,_0xfd1169,_0x2e9c8b),_0x1790c1=(_0x4362c8,_0x47d277,_0x2003af)=>_0x4e2eb3(_0x4362c8,typeof _0x47d277!=_0x263c48(0x126)?_0x47d277+'':_0x47d277,_0x2003af);_0x2e86e2[_0x263c48(0x15c)]=class extends _0x5edd3f[_0x263c48(0xf8)]{constructor(_0x1c3de2=_0x1c0e90,_0x4fb401,_0x426b56){const _0x5a9832=_0x263c48;super(),this['_config']=_0x1c3de2,this['_injector']=_0x4fb401,this[_0x5a9832(0x14b)]=_0x426b56;const {..._0x25dc97}=_0x5edd3f[_0x5a9832(0x106)]({},_0x1c0e90,this[_0x5a9832(0x10f)]);this['_configService'][_0x5a9832(0xfb)](_0x12ca71,_0x25dc97);}[_0x263c48(0x11d)](){const _0x5ebc1e=_0x263c48;[[_0x19c89e],[_0x4dd3c9],[_0x6779bf]][_0x5ebc1e(0xfa)](_0x727300=>{const _0x179447=_0x5ebc1e;this[_0x179447(0x133)][_0x179447(0x154)](_0x727300);});}[_0x263c48(0xff)](){const _0xdc3671=_0x263c48;this['_injector'][_0xdc3671(0x11b)](_0x4dd3c9),this[_0xdc3671(0x133)]['get'](_0x6779bf);}},_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],_0x263c48(0x11c),_0x907ed),_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],'type',_0x5edd3f[_0x263c48(0x128)][_0x263c48(0x13d)]),_0x2e86e2[_0x263c48(0x15c)]=_0xf6cd56([_0x5edd3f['DependentOn'](_0x525bd8['UniverThreadCommentUIPlugin'],_0x101de3['UniverCollaborationClientPlugin'],_0x572db9[_0x263c48(0x145)]),_0x58fd34(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0x166)])),_0x58fd34(0x2,_0x5edd3f[_0x263c48(0x12c)])],_0x2e86e2[_0x263c48(0x15c)]),Object[_0x263c48(0x162)](_0x2e86e2,Symbol[_0x263c48(0x103)],{'value':_0x263c48(0x160)});}));function _0x57f2(){const _0x5ca6f4=['syncUpdateMutationToColla','getUnit','IConfigService','code','@univerjs/core','/reply','content','userId','@univerjs-pro/collaboration-client','_injector','YYYY/MM/DD\x20HH:mm','post','length','372ErBjfr','addUser','rangeId','UniverProLicense','resolveComment','/universer-api/user/list','UNIVER_UNKNOWN','dayjs','4CBYCZs','UniverProCollaborationClient','root','Solved','UNRECOGNIZED','stringify','UniverLicensePlugin','payload','map','_threadCommentDataSourceService','replyId','Solve','_configService','_httpService','OpenOrReOpen','@univerjs-pro/license','7348976aBZEMH','CustomRangeType','parentId','amd','saveCommentToSnapshot','add','Unknown','Disposable','getOwnPropertyDescriptor','2524732cUOREB','updateComment','threadId','406274eeKnyA','UniverThreadCommentDataSourcePlugin','_threadCommentDataSource','thread-comment-data-source.config','slice','Module','getUser','defineProperty','replies','/edit','Reply','Injector','filter','subscribe','UserManagerService','/add','format','createTimestamp','rangeType','20ZiTLvq','COMMENT','/universer-api/comment/unit/','listComments','UniverNetwork','_sessionService','HTTPService','rxjs','personId','commentUpdate$','30ZjVZBU','type','@univerjs/thread-comment','values','ThreadCommentModel','Plugin','_commentService','forEach','setConfig','70302RoBKsK','user','_threadCommentModel','onReady','bufferTime','function','_initDataSource','toStringTag','@univerjs/network','Inject','merge','9gSwjAQ','addComment','Add','Edit','UniverThreadComment','getMemberID','body','exports','_config','CollaborationSessionService','find','customRanges','disposeWithMe','error','getComment','reply','_initUserSync','_userService','2130TGqpCY','Delete','get','pluginName','onStarting','ref','requireSession','pipe','parse','819216RZdQLJ','unitId','5901250RsYYTZ','@univerjs/thread-comment-ui','symbol','/solved','UniverInstanceType','_init'];_0x57f2=function(){return _0x5ca6f4;};return _0x57f2();}
1
+ function _0x15a8(_0x2eb11b,_0x28df04){_0x2eb11b=_0x2eb11b-0xdb;const _0x884ca0=_0x884c();let _0x15a848=_0x884ca0[_0x2eb11b];return _0x15a848;}(function(_0x3d10ec,_0x1b9790){const _0x20bb58=_0x15a8,_0x1356ac=_0x3d10ec();while(!![]){try{const _0x109b18=-parseInt(_0x20bb58(0x13c))/0x1+parseInt(_0x20bb58(0xf5))/0x2*(-parseInt(_0x20bb58(0x10a))/0x3)+parseInt(_0x20bb58(0x163))/0x4+parseInt(_0x20bb58(0x106))/0x5*(parseInt(_0x20bb58(0xe4))/0x6)+-parseInt(_0x20bb58(0x10f))/0x7+-parseInt(_0x20bb58(0x15c))/0x8*(-parseInt(_0x20bb58(0x141))/0x9)+parseInt(_0x20bb58(0x112))/0xa;if(_0x109b18===_0x1b9790)break;else _0x1356ac['push'](_0x1356ac['shift']());}catch(_0x52375c){_0x1356ac['push'](_0x1356ac['shift']());}}}(_0x884c,0x49120),function(_0xc4bc2,_0x18b0cc){const _0x5679fb=_0x15a8;typeof exports=='object'&&typeof module<'u'?_0x18b0cc(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==_0x5679fb(0x138)&&define[_0x5679fb(0x146)]?define([_0x5679fb(0xed),_0x5679fb(0x14d),_0x5679fb(0x15b),_0x5679fb(0x15a),_0x5679fb(0x122),_0x5679fb(0x10d),_0x5679fb(0xfd),_0x5679fb(0x162)],_0x18b0cc):(_0xc4bc2=typeof globalThis<'u'?globalThis:_0xc4bc2||self,_0x18b0cc(_0xc4bc2[_0x5679fb(0x134)]={},_0xc4bc2['UniverProCollaborationClient'],_0xc4bc2['UniverProLicense'],_0xc4bc2[_0x5679fb(0x147)],_0xc4bc2[_0x5679fb(0x115)],_0xc4bc2[_0x5679fb(0x14f)],_0xc4bc2[_0x5679fb(0xfd)],_0xc4bc2[_0x5679fb(0xe0)]));}(this,function(_0x2bd891,_0x182376,_0x55a627,_0x3cf436,_0x3221c6,_0x9352bb,_0x23deff,_0xece950){'use strict';const _0x24d132=_0x15a8;const _0x422647='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3ca880=(_0x466370=>(_0x466370[_0x466370[_0x24d132(0xfc)]=0x0]=_0x24d132(0xfc),_0x466370[_0x466370[_0x24d132(0x139)]=0x1]=_0x24d132(0x139),_0x466370[_0x466370[_0x24d132(0x109)]=-0x1]=_0x24d132(0x109),_0x466370))(_0x3ca880||{}),_0x39795b=(_0x24e338=>(_0x24e338[_0x24e338[_0x24d132(0xe7)]=0x0]=_0x24d132(0xe7),_0x24e338[_0x24e338[_0x24d132(0xf6)]=0x1]=_0x24d132(0xf6),_0x24e338[_0x24e338[_0x24d132(0x153)]=0x2]=_0x24d132(0x153),_0x24e338[_0x24e338['Edit']=0x3]=_0x24d132(0x10c),_0x24e338[_0x24e338[_0x24d132(0x151)]=0x4]='Delete',_0x24e338[_0x24e338[_0x24d132(0x13f)]=0x5]='Solve',_0x24e338[_0x24e338[_0x24d132(0x109)]=-0x1]=_0x24d132(0x109),_0x24e338))(_0x39795b||{});const _0x26178e=_0x4f3ab2=>_0x3cf436[_0x24d132(0x127)](new Date(+_0x4f3ab2))[_0x24d132(0xef)](_0x24d132(0x155)),_0x135771=async(_0x1ccca4,_0x5cf549)=>{const _0x280103=_0x24d132,_0x43cc16=_0x1ccca4[_0x280103(0xe5)](_0x3cf436[_0x280103(0xdd)]),_0x59ffcb=_0x1ccca4['get'](_0xece950[_0x280103(0x144)]);_0x5cf549[_0x280103(0xe6)](_0x4cbe26=>{const _0x5a2c33=_0x280103;_0x43cc16[_0x5a2c33(0xe2)](_0x4cbe26)&&_0x5cf549[_0x5a2c33(0x158)](_0x4cbe26);}),_0x5cf549['size']&&(await _0x59ffcb[_0x280103(0xe5)](_0x280103(0xe3),{'params':{'userIDs':[..._0x5cf549]}}))[_0x280103(0xdf)]['users']['forEach'](_0x4ecff7=>{_0x4ecff7&&_0x43cc16['addUser'](_0x4ecff7);});};var _0x2b795e=Object['getOwnPropertyDescriptor'],_0x49a6ec=(_0x58aa84,_0x54b70b,_0x2a44cb,_0x10933c)=>{const _0x155eb9=_0x24d132;for(var _0xd74da2=_0x10933c>0x1?void 0x0:_0x10933c?_0x2b795e(_0x54b70b,_0x2a44cb):_0x54b70b,_0xc8e322=_0x58aa84[_0x155eb9(0x113)]-0x1,_0x5268e0;_0xc8e322>=0x0;_0xc8e322--)(_0x5268e0=_0x58aa84[_0xc8e322])&&(_0xd74da2=_0x5268e0(_0xd74da2)||_0xd74da2);return _0xd74da2;},_0x40294f=(_0x34d9bd,_0x11e520)=>(_0x472376,_0x2f18c1)=>_0x11e520(_0x472376,_0x2f18c1,_0x34d9bd);let _0x468484=class extends _0x3cf436[_0x24d132(0xf3)]{constructor(_0x36ef92,_0x1612ab,_0x5d3e5a,_0x3568cf){const _0xf52273=_0x24d132;super(),this[_0xf52273(0x104)]=_0x36ef92,this[_0xf52273(0x11e)]=_0x1612ab,this[_0xf52273(0x125)]=_0x5d3e5a,this[_0xf52273(0xdc)]=_0x3568cf,this[_0xf52273(0x130)](),this['_initUserSync']();}['_initUserSync'](){const _0x4e2889=_0x24d132;this[_0x4e2889(0x15e)](this[_0x4e2889(0x11e)][_0x4e2889(0x11c)]['pipe'](_0x23deff[_0x4e2889(0x14e)](0x10))[_0x4e2889(0x128)](_0x24d7ca=>{const _0x18961b=_0x4e2889,_0x5a886e=new Set();_0x24d7ca[_0x18961b(0xe6)](_0x43f4ab=>{const _0x4e735f=_0x18961b;if(_0x43f4ab[_0x4e735f(0xfa)]===_0x4e735f(0x135)){const _0x3d5bcd=_0x43f4ab[_0x4e735f(0x12b)][_0x4e735f(0x13a)];_0x5a886e[_0x4e735f(0x135)](_0x3d5bcd);}}),_0x135771(this['_injector'],_0x5a886e);}));}[_0x24d132(0x130)](){const _0x367e49=_0x24d132;this[_0x367e49(0x15e)](this[_0x367e49(0x104)]['commentUpdate$'][_0x367e49(0x128)](async _0x45de5f=>{const _0x32cafb=_0x367e49;var _0x56eb6b,_0x15716f,_0x346d69,_0x558db7;const _0xa827cf=(_0x56eb6b=this[_0x32cafb(0x11e)][_0x32cafb(0x136)](_0x45de5f['unitId'])[_0x32cafb(0x133)](_0x363650=>_0x363650[_0x32cafb(0x137)]===_0x45de5f[_0x32cafb(0x137)]))==null?void 0x0:_0x56eb6b[_0x32cafb(0x148)];if(!_0xa827cf)return;const {unitId:_0x30fd0d,subUnitId:_0x511970}=_0xa827cf;switch(_0x45de5f['user']&&this[_0x32cafb(0x125)][_0x32cafb(0xff)](_0x45de5f['user']),_0x45de5f[_0x32cafb(0xfa)]){case _0x39795b[_0x32cafb(0xf6)]:break;case _0x39795b[_0x32cafb(0x153)]:{this[_0x32cafb(0x11e)][_0x32cafb(0x165)](_0x30fd0d,_0x511970,{'unitId':_0x30fd0d,'subUnitId':_0x511970,'ref':'','id':_0x45de5f[_0x32cafb(0xec)],'dT':_0x26178e(+_0x45de5f['createTimestamp']),'threadId':_0x45de5f[_0x32cafb(0x137)],'personId':(_0x346d69=(_0x15716f=_0x45de5f[_0x32cafb(0x117)])==null?void 0x0:_0x15716f[_0x32cafb(0x11a)])!=null?_0x346d69:_0x45de5f[_0x32cafb(0xf7)],'text':JSON['parse'](_0x45de5f[_0x32cafb(0x13b)]),'parentId':_0xa827cf['id']});break;}case _0x39795b['Delete']:{const _0xf8e80f=this[_0x32cafb(0x11e)][_0x32cafb(0x102)](_0x30fd0d,_0x511970,_0x45de5f['replyId']);_0xf8e80f&&_0xf8e80f[_0x32cafb(0x12c)]&&this[_0x32cafb(0x11e)][_0x32cafb(0x126)](_0x30fd0d,_0x511970,_0x45de5f['replyId']);break;}case _0x39795b[_0x32cafb(0x10c)]:{this[_0x32cafb(0x11e)][_0x32cafb(0xdb)](_0x30fd0d,_0x511970,{'commentId':_0x45de5f[_0x32cafb(0xec)],'text':JSON['parse'](_0x45de5f[_0x32cafb(0x13b)])});break;}case _0x39795b[_0x32cafb(0x13f)]:{const _0x4332ee=(_0x558db7=this[_0x32cafb(0x11e)][_0x32cafb(0x136)](_0x45de5f[_0x32cafb(0xe8)])[_0x32cafb(0x133)](_0x3286e8=>_0x3286e8['threadId']===_0x45de5f[_0x32cafb(0x137)]))==null?void 0x0:_0x558db7[_0x32cafb(0x148)];_0x4332ee&&this['_threadCommentModel'][_0x32cafb(0x107)](_0x30fd0d,_0x511970,_0x4332ee['id'],_0x45de5f[_0x32cafb(0x111)]===_0x3ca880[_0x32cafb(0x139)]);break;}}}));}};_0x468484=_0x49a6ec([_0x40294f(0x0,_0x3cf436[_0x24d132(0xea)](_0x182376[_0x24d132(0x149)])),_0x40294f(0x1,_0x3cf436[_0x24d132(0xea)](_0x9352bb[_0x24d132(0x120)])),_0x40294f(0x2,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0xdd)])),_0x40294f(0x3,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0x140)]))],_0x468484);const _0x5c4310=_0x24d132(0x157),_0x1b4fd6={};var _0x5cd200=Object[_0x24d132(0x145)],_0x28e893=(_0x5c4e62,_0x1050fe,_0x26ae88,_0x46817d)=>{const _0xf9058=_0x24d132;for(var _0x32bb62=_0x46817d>0x1?void 0x0:_0x46817d?_0x5cd200(_0x1050fe,_0x26ae88):_0x1050fe,_0x52e72e=_0x5c4e62[_0xf9058(0x113)]-0x1,_0x335ef4;_0x52e72e>=0x0;_0x52e72e--)(_0x335ef4=_0x5c4e62[_0x52e72e])&&(_0x32bb62=_0x335ef4(_0x32bb62)||_0x32bb62);return _0x32bb62;},_0x359717=(_0x3a7288,_0x4a46bf)=>(_0x586777,_0x3ae275)=>_0x4a46bf(_0x586777,_0x3ae275,_0x3a7288);function _0x1dae63(_0x130875,_0x28e711){const _0x4b4ea3=_0x24d132,_0x5dd877=_0x130875['replies'][0x0];return{..._0x28e711,'id':_0x5dd877[_0x4b4ea3(0xec)],'resolved':_0x130875[_0x4b4ea3(0x111)]===0x1,'dT':_0x26178e(_0x5dd877[_0x4b4ea3(0x13e)]),'personId':_0x5dd877[_0x4b4ea3(0xf7)],'threadId':_0x5dd877['threadId']};}function _0x35c8d0(_0x225682,_0x3455a6,_0x451c34){const _0x47c54e=_0x24d132;var _0x6fcaf3,_0x248d26;if(((_0x248d26=(_0x6fcaf3=_0x225682==null?void 0x0:_0x225682[_0x47c54e(0x118)])==null?void 0x0:_0x6fcaf3[_0x47c54e(0x113)])!=null?_0x248d26:0x0)>0x0){const _0x37925a=(_0x86a1e5,_0x5cdd67)=>({'id':_0x86a1e5['replyId'],'threadId':_0x86a1e5[_0x47c54e(0x137)],'dT':_0x26178e(_0x86a1e5[_0x47c54e(0x13e)]),'personId':_0x86a1e5[_0x47c54e(0xf7)],'resolved':_0x225682[_0x47c54e(0x111)]===_0x3ca880[_0x47c54e(0x139)],'unitId':_0x3455a6,'subUnitId':_0x451c34,'text':JSON[_0x47c54e(0xf8)](_0x86a1e5[_0x47c54e(0x13b)]),'parentId':_0x5cdd67}),_0xbf4485=_0x37925a(_0x225682[_0x47c54e(0x118)][0x0]);return{..._0xbf4485,'children':_0x225682['replies'][_0x47c54e(0x14b)](0x1)[_0x47c54e(0xf2)](_0x31ade6=>_0x37925a(_0x31ade6,_0xbf4485['id']))};}return null;}let _0x3dc6ee=class{constructor(_0x6f8e7b,_0x4fdaef,_0x5e8ca8){const _0x3c8e3d=_0x24d132;this[_0x3c8e3d(0x14c)]=_0x6f8e7b,this[_0x3c8e3d(0x125)]=_0x4fdaef,this[_0x3c8e3d(0xfe)]=_0x5e8ca8;}async[_0x24d132(0x165)](_0x81836d){const _0x45e161=_0x24d132;var _0x42cd96,_0x13746a;const {parentId:_0x37d2eb,unitId:_0x535c2a,text:_0x407665,threadId:_0x5d5dd4}=_0x81836d,_0x2d8f44=(_0x13746a=(_0x42cd96=_0x407665[_0x45e161(0x10e)])==null?void 0x0:_0x42cd96['filter'](_0x16e67f=>_0x16e67f[_0x45e161(0x12e)]===_0x3cf436['CustomRangeType'][_0x45e161(0xf9)])[_0x45e161(0xf2)](_0x1eb024=>_0x1eb024[_0x45e161(0x116)]))!=null?_0x13746a:[],_0x26ca0c=JSON[_0x45e161(0x150)](_0x407665),_0x3da2cb=(await this['_sessionService'][_0x45e161(0x124)](_0x535c2a))[_0x45e161(0x131)]();if(_0x37d2eb){const _0x454f84={'memberId':_0x3da2cb,'unitId':_0x535c2a,'content':_0x26ca0c,'mention':_0x2d8f44,'threadId':_0x5d5dd4},_0x3be613=(await this['_httpService']['post'](_0x45e161(0x11b)+_0x535c2a+_0x45e161(0x123),{'body':_0x454f84}))[_0x45e161(0xdf)][_0x45e161(0x12a)];return{..._0x81836d,'id':_0x3be613[_0x45e161(0xec)],'dT':_0x3cf436['dayjs'](+_0x3be613[_0x45e161(0x13e)])[_0x45e161(0xef)](_0x45e161(0x155)),'personId':_0x3be613[_0x45e161(0xf7)]};}else{const _0x36bc62={'memberId':_0x3da2cb,'unitId':_0x535c2a,'content':_0x26ca0c,'mention':_0x2d8f44},_0x4b107c=await this[_0x45e161(0x14c)][_0x45e161(0x164)](_0x45e161(0x11b)+_0x535c2a+'/add',{'body':_0x36bc62});return _0x1dae63(_0x4b107c[_0x45e161(0xdf)]['comment'],_0x81836d);}}async[_0x24d132(0xdb)](_0x235053){const _0x1085f7=_0x24d132;var _0x2c0075,_0x1b8137;const {text:_0x6b441,unitId:_0x24209a}=_0x235053,_0x168baf=(_0x1b8137=(_0x2c0075=_0x6b441[_0x1085f7(0x10e)])==null?void 0x0:_0x2c0075[_0x1085f7(0x160)](_0xae2a0b=>_0xae2a0b['rangeType']===_0x3cf436[_0x1085f7(0xf1)][_0x1085f7(0xf9)])['map'](_0xb070b0=>_0xb070b0[_0x1085f7(0x116)]))!=null?_0x1b8137:[],_0x44b424=JSON[_0x1085f7(0x150)](_0x6b441),_0x31894c=_0x235053[_0x1085f7(0x137)],_0x413f83=_0x235053['id'],_0x37fb44={'memberId':(await this[_0x1085f7(0xfe)]['requireSession'](_0x24209a))['getMemberID'](),'unitId':_0x24209a,'threadId':_0x31894c,'mention':_0x168baf,'content':_0x44b424,'replyId':_0x413f83},_0x2bb9a7=await this[_0x1085f7(0x14c)]['post'](_0x1085f7(0x11b)+_0x24209a+_0x1085f7(0x154),{'body':_0x37fb44});return!_0x2bb9a7[_0x1085f7(0xdf)][_0x1085f7(0x100)]||_0x2bb9a7[_0x1085f7(0xdf)]['error']['code']===0x1;}async[_0x24d132(0x107)](_0x190490){const _0x44a3f3=_0x24d132,{unitId:_0x4110a8}=_0x190490,_0x4048c4=_0x190490[_0x44a3f3(0x137)],_0x2c6584={'memberId':this[_0x44a3f3(0x125)][_0x44a3f3(0x152)]()['userID'],'unitId':_0x4110a8,'threadId':_0x4048c4,'solved':_0x190490[_0x44a3f3(0x159)]?_0x3ca880['Solved']:_0x3ca880[_0x44a3f3(0xfc)]},_0x58b44c=await this['_httpService'][_0x44a3f3(0x164)](_0x44a3f3(0x11b)+_0x4110a8+_0x44a3f3(0xf4),{'body':_0x2c6584});return!_0x58b44c['body'][_0x44a3f3(0x100)]||_0x58b44c['body'][_0x44a3f3(0x100)]['code']===0x1;}async[_0x24d132(0x126)](_0x1d3898,_0x204a59,_0x328f18,_0x8a9fbb){const _0x221508=_0x24d132,_0x390c00={'memberId':(await this[_0x221508(0xfe)][_0x221508(0x124)](_0x1d3898))[_0x221508(0x131)](),'threadId':_0x328f18,'replyId':_0x8a9fbb,'unitId':_0x1d3898},_0xa57bdb=await this[_0x221508(0x14c)][_0x221508(0x164)](_0x221508(0x11b)+_0x1d3898+_0x221508(0x15f),{'body':_0x390c00});return!_0xa57bdb[_0x221508(0xdf)][_0x221508(0x100)]||_0xa57bdb[_0x221508(0xdf)][_0x221508(0x100)][_0x221508(0x105)]===0x1;}async[_0x24d132(0x103)](_0x43384a,_0x2eb629,_0x3bccbc){const _0x267c2a=_0x24d132,_0x445819={'unitId':_0x43384a,'threadId':_0x3bccbc},_0x1c53ad=await this[_0x267c2a(0x14c)]['post']('/universer-api/comment/unit/'+_0x43384a+_0x267c2a(0x143),{'body':_0x445819}),_0xea8e62=_0x3bccbc[_0x267c2a(0xf2)](_0x4fe749=>_0x35c8d0(_0x1c53ad[_0x267c2a(0xdf)][_0x267c2a(0x11f)][_0x4fe749],_0x43384a,_0x2eb629))[_0x267c2a(0x160)](Boolean);return Object['values'](_0x1c53ad[_0x267c2a(0xdf)][_0x267c2a(0x108)])[_0x267c2a(0xe6)](_0x27a557=>{const _0x45a7cd=_0x267c2a;this[_0x45a7cd(0x125)][_0x45a7cd(0xff)](_0x27a557);}),_0xea8e62;}[_0x24d132(0x156)](_0x42b7a8){const _0x59ebbe=_0x24d132;return{'id':_0x42b7a8['id'],'threadId':_0x42b7a8[_0x59ebbe(0x137)],'ref':_0x42b7a8[_0x59ebbe(0x10b)]};}};_0x3dc6ee=_0x28e893([_0x359717(0x0,_0x3cf436[_0x24d132(0xea)](_0xece950[_0x24d132(0x144)])),_0x359717(0x1,_0x3cf436['Inject'](_0x3cf436['UserManagerService'])),_0x359717(0x2,_0x3cf436[_0x24d132(0xea)](_0x182376[_0x24d132(0x142)]))],_0x3dc6ee);var _0x40cae6=Object[_0x24d132(0x145)],_0x578f53=(_0x1e46e9,_0x38bc85,_0xc9100c,_0x11755e)=>{const _0x16ca4b=_0x24d132;for(var _0x346c6e=_0x11755e>0x1?void 0x0:_0x11755e?_0x40cae6(_0x38bc85,_0xc9100c):_0x38bc85,_0x44169f=_0x1e46e9[_0x16ca4b(0x113)]-0x1,_0x390d53;_0x44169f>=0x0;_0x44169f--)(_0x390d53=_0x1e46e9[_0x44169f])&&(_0x346c6e=_0x390d53(_0x346c6e)||_0x346c6e);return _0x346c6e;},_0x5a83a4=(_0x233c99,_0x1a2d9b)=>(_0x5a47f7,_0xd1a598)=>_0x1a2d9b(_0x5a47f7,_0xd1a598,_0x233c99);let _0x1c6ea4=class extends _0x3cf436[_0x24d132(0xf3)]{constructor(_0x1ce08b,_0x10b066){const _0x3efff2=_0x24d132;super(),this[_0x3efff2(0x14a)]=_0x1ce08b,this[_0x3efff2(0xde)]=_0x10b066,this['_initDataSource']();}[_0x24d132(0x13d)](){const _0xd6c6e8=_0x24d132;this[_0xd6c6e8(0x14a)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xd6c6e8(0xeb)]=!0x1;}};_0x1c6ea4=_0x578f53([_0x5a83a4(0x0,_0x9352bb[_0x24d132(0x101)]),_0x5a83a4(0x1,_0x3cf436[_0x24d132(0xea)](_0x3dc6ee))],_0x1c6ea4);var _0x43e69b=Object[_0x24d132(0x12d)],_0xb1cf58=Object[_0x24d132(0x145)],_0x2f10b8=(_0x5b652d,_0x4f2325,_0x107721)=>_0x4f2325 in _0x5b652d?_0x43e69b(_0x5b652d,_0x4f2325,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x107721}):_0x5b652d[_0x4f2325]=_0x107721,_0x2772a9=(_0x39f55a,_0x57277b,_0x152232,_0x8b6177)=>{const _0x2a82c7=_0x24d132;for(var _0x1e3dd7=_0x8b6177>0x1?void 0x0:_0x8b6177?_0xb1cf58(_0x57277b,_0x152232):_0x57277b,_0x3835e1=_0x39f55a[_0x2a82c7(0x113)]-0x1,_0x379e6f;_0x3835e1>=0x0;_0x3835e1--)(_0x379e6f=_0x39f55a[_0x3835e1])&&(_0x1e3dd7=_0x379e6f(_0x1e3dd7)||_0x1e3dd7);return _0x1e3dd7;},_0x28de69=(_0xfa49cc,_0x435a01)=>(_0x44882d,_0x78046d)=>_0x435a01(_0x44882d,_0x78046d,_0xfa49cc),_0x48ee5c=(_0x374088,_0x4f5b9e,_0xae5018)=>_0x2f10b8(_0x374088,typeof _0x4f5b9e!='symbol'?_0x4f5b9e+'':_0x4f5b9e,_0xae5018);_0x2bd891[_0x24d132(0xe1)]=class extends _0x3cf436[_0x24d132(0x132)]{constructor(_0x349884=_0x1b4fd6,_0x2ba9c6,_0xc06f10){const _0x272aef=_0x24d132;super(),this[_0x272aef(0x114)]=_0x349884,this['_injector']=_0x2ba9c6,this[_0x272aef(0xe9)]=_0xc06f10;const {..._0x4da3d2}=_0x3cf436['merge']({},_0x1b4fd6,this['_config']);this[_0x272aef(0xe9)][_0x272aef(0x110)](_0x5c4310,_0x4da3d2);}[_0x24d132(0xfb)](){const _0x162992=_0x24d132;[[_0x3dc6ee],[_0x1c6ea4],[_0x468484]][_0x162992(0xe6)](_0x2d5f20=>{const _0x2bdaa3=_0x162992;this['_injector'][_0x2bdaa3(0x135)](_0x2d5f20);});}[_0x24d132(0x161)](){const _0x16e048=_0x24d132;this[_0x16e048(0xdc)][_0x16e048(0xe5)](_0x1c6ea4),this[_0x16e048(0xdc)][_0x16e048(0xe5)](_0x468484);}},_0x48ee5c(_0x2bd891[_0x24d132(0xe1)],_0x24d132(0x12f),_0x422647),_0x48ee5c(_0x2bd891[_0x24d132(0xe1)],_0x24d132(0xfa),_0x3cf436[_0x24d132(0x11d)][_0x24d132(0xf0)]),_0x2bd891[_0x24d132(0xe1)]=_0x2772a9([_0x3cf436['DependentOn'](_0x3221c6[_0x24d132(0xee)],_0x182376[_0x24d132(0x15d)],_0x55a627[_0x24d132(0x129)]),_0x28de69(0x1,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0x140)])),_0x28de69(0x2,_0x3cf436['IConfigService'])],_0x2bd891[_0x24d132(0xe1)]),Object[_0x24d132(0x12d)](_0x2bd891,Symbol[_0x24d132(0x121)],{'value':_0x24d132(0x119)});}));function _0x884c(){const _0x13c66e=['UniverLicensePlugin','reply','payload','parentId','defineProperty','rangeType','pluginName','_init','getMemberID','Plugin','find','UniverProThreadCommentDatasource','add','getUnit','threadId','function','Solved','personId','content','251839xVRRwD','_initDataSource','createTimestamp','Solve','Injector','198VrYyou','CollaborationSessionService','/list','HTTPService','getOwnPropertyDescriptor','amd','UniverCore','root','CommentService','_threadCommentDataSourceService','slice','_httpService','@univerjs-pro/collaboration-client','bufferTime','UniverThreadComment','stringify','Delete','getCurrentUser','Reply','/edit','YYYY/MM/DD\x20HH:mm','saveCommentToSnapshot','thread-comment-data-source.config','delete','resolved','@univerjs/core','@univerjs-pro/license','104CaOpjk','UniverCollaborationClientPlugin','disposeWithMe','/delete','filter','onReady','@univerjs/network','149176CZVNET','post','addComment','updateComment','_injector','UserManagerService','_threadCommentDataSource','body','UniverNetwork','UniverThreadCommentDataSourcePlugin','getUser','/universer-api/user/list','6FvMOQm','get','forEach','Unknown','unitId','_configService','Inject','syncUpdateMutationToColla','replyId','exports','UniverThreadCommentUIPlugin','format','UNIVER_UNKNOWN','CustomRangeType','map','Disposable','/solved','985154xsGTuW','Add','userId','parse','COMMENT','type','onStarting','OpenOrReOpen','rxjs','_sessionService','addUser','error','IThreadCommentDataSourceService','getComment','listComments','_commentService','code','1779155Mofyra','resolveComment','users','UNRECOGNIZED','3mNTWXM','ref','Edit','@univerjs/thread-comment','customRanges','4142712FsKydk','setConfig','solved','12421170wttOMU','length','_config','UniverThreadCommentUi','rangeId','user','replies','Module','userID','/universer-api/comment/unit/','commentUpdate$','UniverInstanceType','_threadCommentModel','comments','ThreadCommentModel','toStringTag','@univerjs/thread-comment-ui','/reply','requireSession','_userService','deleteComment','dayjs','subscribe'];_0x884c=function(){return _0x13c66e;};return _0x884c();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.2-insiders.20260119-edc718c",
3
+ "version": "0.15.2-insiders.20260124-12fc7f0",
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.15.2-insiders.20260119-edc718c",
49
- "@univerjs-pro/license": "0.15.2-insiders.20260119-edc718c",
50
- "@univerjs/network": "0.15.2-insiders.20260119-edc718c",
51
- "@univerjs/core": "0.15.2-insiders.20260119-edc718c",
48
+ "@univerjs-pro/collaboration-client": "0.15.2-insiders.20260124-12fc7f0",
52
49
  "@univerjs/protocol": "0.1.48",
53
- "@univerjs/thread-comment-ui": "0.15.2-insiders.20260119-edc718c",
54
- "@univerjs/thread-comment": "0.15.2-insiders.20260119-edc718c"
50
+ "@univerjs/network": "0.15.2-insiders.20260124-12fc7f0",
51
+ "@univerjs/thread-comment": "0.15.2-insiders.20260124-12fc7f0",
52
+ "@univerjs/thread-comment-ui": "0.15.2-insiders.20260124-12fc7f0",
53
+ "@univerjs-pro/license": "0.15.2-insiders.20260124-12fc7f0",
54
+ "@univerjs/core": "0.15.2-insiders.20260124-12fc7f0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",